X-Git-Url: http://repos.xcallymotion.com/?a=blobdiff_plain;f=snippet%2F3.5.0%2Fscripts%2Fvendor-angular-material.js;fp=snippet%2F3.5.0%2Fscripts%2Fvendor-angular-material.js;h=7a68641d8b05a0edca8570047b056e2c4e23b180;hb=8cdeeda1196ee7d2ad7723378ea9a4f6c5d1e83a;hp=0000000000000000000000000000000000000000;hpb=b8feeab5a72cbb7651a1c603fc767034cd5922cc;p=motion2.git diff --git a/snippet/3.5.0/scripts/vendor-angular-material.js b/snippet/3.5.0/scripts/vendor-angular-material.js new file mode 100644 index 0000000..7a68641 --- /dev/null +++ b/snippet/3.5.0/scripts/vendor-angular-material.js @@ -0,0 +1,3 @@ +/*! For license information please see vendor-angular-material.js.LICENSE.txt */ +(self.webpackChunkmotion_chat=self.webpackChunkmotion_chat||[]).push([["vendor-angular-material"],{"./node_modules/angular-material/angular-material.js":(e,t,n)=>{var o=n("./node_modules/jquery/dist/jquery.js");!function(e,t,n){"use strict";t.module("ngMaterial",["ng","ngAnimate","ngAria","material.core","material.core.animate","material.core.gestures","material.core.interaction","material.core.layout","material.core.meta","material.core.theming.palette","material.core.theming","material.components.autocomplete","material.components.backdrop","material.components.bottomSheet","material.components.button","material.components.card","material.components.checkbox","material.components.chips","material.components.colors","material.components.content","material.components.datepicker","material.components.dialog","material.components.divider","material.components.fabActions","material.components.fabShared","material.components.fabSpeedDial","material.components.fabToolbar","material.components.gridList","material.components.icon","material.components.input","material.components.list","material.components.menu","material.components.menuBar","material.components.navBar","material.components.panel","material.components.progressCircular","material.components.progressLinear","material.components.radioButton","material.components.select","material.components.showHide","material.components.sidenav","material.components.slider","material.components.sticky","material.components.subheader","material.components.swipe","material.components.switch","material.components.tabs","material.components.toast","material.components.toolbar","material.components.tooltip","material.components.truncate","material.components.virtualRepeat","material.components.whiteframe"]),function(){function e(e,t){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 n(e,t){e.decorator("$$rAF",["$delegate",o]),e.decorator("$q",["$delegate",i]),t.theme("default").primaryPalette("indigo").accentPalette("pink").warnPalette("deep-orange").backgroundPalette("grey")}function o(e){return e.throttle=function(t){var n,o,i,r;return function(){n=arguments,r=this,i=t,o||(o=!0,e((function(){i.apply(r,Array.prototype.slice.call(n)),o=!1})))}},e}function i(e){return e.resolve||(e.resolve=e.when),e}e.$inject=["$log","$injector"],n.$inject=["$provide","$mdThemingProvider"],o.$inject=["$delegate"],i.$inject=["$delegate"],t.module("material.core",["ngAnimate","material.core.animate","material.core.layout","material.core.interaction","material.core.gestures","material.core.theming"]).config(n).run(e)}(),function(){function e(e){return{restrict:"A",link:{pre:function(n,o,i){var r=i.mdAutoFocus||i.mdAutofocus||i.mdSidenavFocus;function a(e){t.isUndefined(e)&&(e=!0),o.toggleClass("md-autofocus",!!e)}a(e(r)(n)),r&&n.$watch(r,a)}}}}e.$inject=["$parse"],t.module("material.core").directive("mdAutofocus",e)}(),t.module("material.core").factory("$mdColorUtil",(function(){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),i=t.substr(n,n),r=t.substr(2*n);return 1===n&&(o+=o,i+=i,r+=r),"rgba("+parseInt(o,16)+","+parseInt(i,16)+","+parseInt(r,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)"}}})),t.module("material.core").factory("$mdConstant",(function(){var e=document.createElement("div"),n=function(e){var t,n,o=/^(Moz|webkit|ms)(?=[A-Z])/;for(t in e.style)if(n=o.exec(t))return n[0]}(e),o=/webkit/i.test(n),i=/([:\-_]+(.))/g;function r(t){var o=(n+"-"+t).replace(i,(function(e,t,n,o){return o?n.toUpperCase():n})),r=o.charAt(0).toLowerCase()+o.substring(1);return a(e,t)?t:a(e,o)?o:a(e,r)?r:t}function a(e,n){return t.isDefined(e.style[n])}var d={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=d.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"+(o?" webkitTransitionEnd":""),ANIMATIONEND:"animationend"+(o?" webkitAnimationEnd":""),TRANSFORM:r("transform"),TRANSFORM_ORIGIN:r("transformOrigin"),TRANSITION:r("transition"),TRANSITION_DURATION:r("transitionDuration"),ANIMATION_PLAY_STATE:r("animationPlayState"),ANIMATION_DURATION:r("animationDuration"),ANIMATION_NAME:r("animationName"),ANIMATION_TIMING:r("animationTimingFunction"),ANIMATION_DIRECTION:r("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 d})),function(){function e(e,n){var o=function(){return!0};e&&!t.isArray(e)&&(e=Array.prototype.slice.call(e)),n=!!n;var i=e||[];return{items:function(){return[].concat(i)},count:function(){return i.length},inRange:r,contains:d,indexOf:a,itemAt:function(e){return r(e)?i[e]:null},findBy:function(e,t){return i.filter((function(n){return n[e]===t}))},add:function(e,n){return e?(t.isNumber(n)||(n=i.length),i.splice(n,0,e),a(e)):-1},remove:function(e){d(e)&&i.splice(a(e),1)},first:s,last:l,next:t.bind(null,c,!1),previous:t.bind(null,c,!0),hasPrevious:function(e){return!!e&&r(a(e)-1)},hasNext:function(e){return!!e&&r(a(e)+1)}};function r(e){return i.length&&e>-1&&e-1}function s(){return i.length?i[0]:null}function l(){return i.length?i[i.length-1]:null}function c(e,d,c,m){c=c||o;for(var u=a(d);;){if(!r(u))return null;var p=u+(e?-1:1),h=null;if(r(p)?h=i[p]:n&&(p=a(h=e?l():s())),null===h||p===m)return null;if(c(h))return h;t.isUndefined(m)&&(m=p),u=p}}}t.module("material.core").config(["$provide",function(t){t.decorator("$mdUtil",["$delegate",function(t){return t.iterator=e,t}])}])}(),function(){function e(e,n,o){var i={},r={},a={},d={};return s.getResponsiveAttribute=function(t,n){for(var o=0;o-1}(e)||function(e){return String(e).indexOf("%")>-1}(e)?e:e+"px":"0"}var y={dom:{},isIos:o,isAndroid:i,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]}},isRtl:function(e){switch(t.isDefined(e)&&e.hasOwnProperty("dir")&&e.dir){case"ltr":return!1;case"rtl":return!0}return"rtl"===d[0].dir||"rtl"===d[0].body.dir},bidi:function(e,n,o,i){var r=!this.isRtl();if(0==arguments.length)return r?"ltr":"rtl";var a=t.element(e);r&&t.isDefined(o)?a.css(n,M(o)):!r&&t.isDefined(i)&&a.css(n,M(i))},bidiProperty:function(e,n,o,i){var r=!this.isRtl(),a=t.element(e);r&&t.isDefined(n)?(a.css(n,M(i)),a.css(o,"")):!r&&t.isDefined(o)&&(a.css(o,M(i)),a.css(n,""))},clientRect:function(e,t,n){var o=C(e);t=C(t||o.offsetParent||document.body);var i=o.getBoundingClientRect(),r=n?t.getBoundingClientRect():{left:0,top:0,width:0,height:0};return{left:i.left-r.left,top:i.top-r.top,width:i.width,height:i.height}},offsetRect:function(e,t){return y.clientRect(e,t,!0)},nodesToArray:function(e){var t,n=[];for(e=e||[],t=0;ti.clientHeight+1,l=e.scrollTop>0?e:i;return s&&t.element(i).css({position:"fixed",width:"100%",top:-r+"px"}),i.clientWidth
'),r.append(o)),o.on("wheel touchmove",a),function(){o.off("wheel touchmove",a),!n.disableScrollMask&&o[0].parentNode&&o[0].parentNode.removeChild(o[0])}}(n,o);return y.disableScrollAround._restoreScroll=function(){--y.disableScrollAround._count<=0&&(delete y.disableScrollAround._viewPortTop,r(),a(),delete y.disableScrollAround._restoreScroll)}},enableScrolling:function(){var e=this.disableScrollAround._restoreScroll;e&&e()},floatingScrollbars:function(){if(this.floatingScrollbars.cached===n){var e=t.element("
").css({width:"100%","z-index":-1,position:"absolute",height:"35px","overflow-y":"scroll"});e.children().css("height","60px"),d[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 e(t){t.target===n&&t.$focus&&(n.focus(),t.stopImmediatePropagation(),t.preventDefault(),n.removeEventListener("click",e))}),!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 l(y.supplant('',[t]))(e)},supplant:function(e,t,n){return n=n||/\{([^{}]*)\}/g,e.replace(n,(function(e,n){var o=n.split("."),i=t;try{for(var r in o)o.hasOwnProperty(r)&&(i=i[o[r]])}catch(t){i=e}return"string"==typeof i||"number"==typeof i?i: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,i){var r;return function(){var a=o,d=Array.prototype.slice.call(arguments);s.cancel(r),r=s((function(){r=n,e.apply(a,d)}),t||10,i)}},throttle:function(e,t){var n;return function(){var o=this,i=arguments,r=y.now();(!n||r-n>t)&&(e.apply(o,i),n=r)}},time:function(e){var t=y.now();return e(),y.now()-t},valueOnUse:function(e,t,n){var o=null,i=Array.prototype.slice.call(arguments),r=i.length>3?i.slice(3):[];Object.defineProperty(e,t,{get:function(){return null===o&&(o=n.apply(e,r)),o}})},nextUid:function(){return""+a++},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(e,n){var o=n.toUpperCase();return e instanceof t.element&&(e=e[0]),Array.prototype.filter.call(e.parentNode.children,(function(t){return e!==t&&t.tagName.toUpperCase()===o})).map((function(e){return t.element(e)}))},getClosest:function(e,n,o){if(t.isString(n)){var i=n.toUpperCase();n=function(e){return e.nodeName.toUpperCase()===i}}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){return(e.Node&&e.Node.prototype&&Node.prototype.contains?t.bind(n,n.contains):t.bind(n,(function(e){return n===o||!!(16&this.compareDocumentPosition(e))})))(o)},extractElementByName:function(e,n,o,i){var r=function e(t){return function(e){if(e)for(var t=0,o=e.length;t");d[0].body.appendChild(n[0]);for(var o=["sticky","-webkit-sticky"],i=0;io)return t+n;var i=(e/=o)*e;return t+n*(i*e*-2+3*i)}(y.now()-a,o,i,s));e.scrollTop=l,(r?lt)&&b(d)}))},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:e.document.documentMode,getTouchAction:function(){for(var e=document.createElement("div"),n=["","webkit","Moz","MS","ms","o"],o=0;o=0)},isFocusable:function(e){return y.isPotentiallyFocusable(e)&&!y.isDisabled(e)&&y.isVisible(e)},isPotentiallyFocusable:function(e){return!y.isHiddenInput(e)&&(y.isNativeFormElement(e)||y.isAnchorWithHref(e)||e.hasAttribute("contenteditable")||y.hasValidTabIndex(e))},isPotentiallyTabbableIOS:function(e){var t=e.nodeName.toLowerCase(),n="input"===t&&e.type;return"text"===n||"password"===n||"select"===t||"textarea"===t},getTabIndexValue:function(e){if(!y.hasValidTabIndex(e))return null;var t=parseInt(e.getAttribute("tabindex")||"",10);return isNaN(t)?-1:t},hasValidTabIndex:function(e){if(!e.hasAttribute("tabindex")||e.tabIndex===n)return!1;var t=e.getAttribute("tabindex");return"-32768"!=t&&!(!t||isNaN(parseInt(t,10)))},hasGeometry:function(e){return!!(e.offsetWidth||e.offsetHeight||"function"==typeof e.getClientRects&&e.getClientRects().length)},getFrameElement:function(e){try{return e.frameElement}catch(e){return null}},getWindow:function(t){return t.ownerDocument&&t.ownerDocument.defaultView||e},isNativeFormElement:function(e){var t=e.nodeName.toLowerCase();return"input"===t||"select"===t||"button"===t||"textarea"===t},isHiddenInput:function(e){return y.isInputElement(e)&&"hidden"==e.type},isAnchorWithHref:function(e){return y.isAnchorElement(e)&&e.hasAttribute("href")},isInputElement:function(e){return"input"==e.nodeName.toLowerCase()},isAnchorElement:function(e){return"a"==e.nodeName.toLowerCase()},getFirstTabbableElement:function(e){if(y.isFocusable(e)&&y.isTabbable(e))return e;for(var t=e.children||e.childNodes,n=0;n=0;n--){var o=t[n].nodeType===d[0].ELEMENT_NODE?y.getLastTabbableElement(t[n]):null;if(o)return o}return null}};return y.dom.animator=m(y),y;function C(e){return e[0]||e}}t.module("material.core").factory("$mdUtil",s),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}}(),t.module("material.core").factory("$$mdAnimate",["$q","$timeout","$mdConstant","$animateCss",function(n,o,i,r){return function(a){return function(n,o,i,r,a){var d;return d={translate3d:function(e,t,n,o){return a(e,{from:t,to:n,addClass:o.transitionInClass,removeClass:o.transitionOutClass,duration:o.duration}).start().then((function(){return i}));function i(n){return a(e,{to:n||t,addClass:o.transitionOutClass,removeClass:o.transitionInClass,duration:o.duration}).start()}},waitTransitionEnd:function(t,n){var a=3e3;return o((function(o,d){var s;("0s"===(s=(s=(n=n||{}).cachedTransitionStyles)||e.getComputedStyle(t[0])).transitionDuration||!s.transition&&!s.transitionProperty)&&(a=0);var l=i(c,n.timeout||a);function c(e){e&&e.target!==t[0]||(e&&i.cancel(l),t.off(r.CSS.TRANSITIONEND,c),o())}t.on(r.CSS.TRANSITIONEND,c)}))},calculateTransformValues:function(e,t){var n,o,i=t.element,r=t.bounds;if(i||r){var a=i?d.clientRect(i)||(n=e?e.parent():null,(o=n?n.parent():null)?d.clientRect(o):null):d.copyRect(r),s=d.copyRect(e[0].getBoundingClientRect()),l=d.centerPointFor(s),c=d.centerPointFor(a);return{centerX:c.x-l.x,centerY:c.y-l.y,scaleX:Math.round(100*Math.min(.5,a.width/s.width))/100,scaleY:Math.round(100*Math.min(.5,a.height/s.height))/100}}return{centerX:0,centerY:0,scaleX:.5,scaleY:.5}},calculateZoomToOrigin:function(e,o){return t.bind(null,n.supplant,"translate3d( {centerX}px, {centerY}px, 0 ) scale( {scaleX}, {scaleY} )")(d.calculateTransformValues(e,o))},calculateSlideToOrigin:function(e,o){return t.bind(null,n.supplant,"translate3d( {centerX}px, {centerY}px, 0 )")(d.calculateTransformValues(e,o))},toCss:function(e){var n={};return t.forEach(e,(function(e,i){if(!t.isUndefined(e))if("left top right bottom width height x y min-width min-height max-width max-height".indexOf(i)>=0)n[i]=e+"px";else switch(i){case"transition":o(0,r.CSS.TRANSITION,e);break;case"transform":o(0,r.CSS.TRANSFORM,e);break;case"transformOrigin":o(0,r.CSS.TRANSFORM_ORIGIN,e);break;case"font-size":n["font-size"]=e}})),n;function o(e,o,i){t.forEach(o.split(" "),(function(e){n[e]=i}))}},toTransformCss:function(e,n,o){var i={};return t.forEach(r.CSS.TRANSFORM.split(" "),(function(t){i[t]=e})),n&&(o=o||"all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1) !important",i.transition=o),i},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,o=t.element(e)[0].getBoundingClientRect();return(n=o)&&n.width>0&&n.height>0?d.copyRect(o):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}}}}(a,n,o,i,r)}}]),t.version.minor>=4?t.module("material.core.animate",[]):function(){var e=t.forEach,n=t.isDefined(document.documentElement.style.WebkitAppearance),o=n?"-webkit-":"",i=(n?"webkitTransitionEnd ":"")+"transitionend",r=(n?"webkitAnimationEnd ":"")+"animationend",a=["$q","$$rAFMutex",function(n,o){function i(e){this.setHost(e),this._doneCallbacks=[],this._runInAnimationFrame=o(),this._state=0}return i.prototype={setHost:function(e){this.host=e||{}},done:function(e){2===this._state?e():this._doneCallbacks.push(e)},progress:t.noop,getPromise:function(){if(!this.promise){var e=this;this.promise=n((function(t,n){e.done((function(e){!1===e?n():t()}))}))}return this.promise},then:function(e,t){return this.getPromise().then(e,t)},catch:function(e){return this.getPromise().catch(e)},finally:function(e){return this.getPromise().finally(e)},pause:function(){this.host.pause&&this.host.pause()},resume:function(){this.host.resume&&this.host.resume()},end:function(){this.host.end&&this.host.end(),this._resolve(!0)},cancel:function(){this.host.cancel&&this.host.cancel(),this._resolve(!1)},complete:function(e){var t=this;0===t._state&&(t._state=1,t._runInAnimationFrame((function(){t._resolve(e)})))},_resolve:function(t){2!==this._state&&(e(this._doneCallbacks,(function(e){e(t)})),this._doneCallbacks.length=0,this._state=2)}},i.all=function(t,n){var o=0,i=!0;function r(e){i=i&&e,++o===t.length&&n(i)}e(t,(function(e){e.done(r)}))},i}];function d(e){return e.replace(/-[a-z]/g,(function(e){return e.charAt(1).toUpperCase()}))}t.module("material.core.animate",[]).factory("$$forceReflow",["$document",function(e){return function(){return e[0].body.clientWidth+1}}]).factory("$$AnimateRunner",a).factory("$$rAFMutex",["$$rAF",function(e){return function(){var t=!1;return e((function(){t=!0})),function(n){t?n():e(n)}}}]).factory("$animateCss",["$window","$$rAF","$$AnimateRunner","$$forceReflow","$$jqLite","$timeout","$animate",function(t,a,s,l,c,m,u){function p(e,t){t.addClass&&(c.addClass(e,t.addClass),t.addClass=null),t.removeClass&&(c.removeClass(e,t.removeClass),t.removeClass=null)}function h(t){var n=0,o=(t||"").split(/\s*,\s*/);return e(o,(function(e){"s"==e.charAt(e.length-1)&&(e=e.substring(0,e.length-1)),e=parseFloat(e)||0,n=n?Math.max(e,n):e})),n}var f,b=[];function g(e,t){t.from&&(e.css(t.from),t.from=null)}function E(e,t){t.to&&(e.css(t.to),t.to=null)}function v(e){for(var t=0;t0||M.transitionStyle),w=!!M.addClass||!!M.removeClass,$(c,!0));var _=T&&(A||w);g(c,M);var k,x,N=!1;return{close:t.close,start:function(){var u,T=new s;return u=function(){if($(c,!1),!_)return A();e(y,(function(e){var t=e[0],n=e[1];C.style[d(t)]=n})),p(c,M);var a=function(e){var o=v(e),i=t.getComputedStyle(o),r=h(i[l("transitionDuration")]),a=h(i[l("animationDuration")]),d=h(i[l("transitionDelay")]),s=h(i[l("animationDelay")]);return a*=parseInt(i[l("animationIterationCount")],10)||1,{duration:Math.max(a,r),delay:Math.max(s,d),animationDuration:a,transitionDuration:r,animationDelay:s,transitionDelay:d};function l(e){return n?"Webkit"+e.charAt(0).toUpperCase()+e.substr(1):e}}(c);if(0===a.duration)return A();var s=[];M.easing&&(a.transitionDuration&&s.push([o+"transition-timing-function",M.easing]),a.animationDuration&&s.push([o+"animation-timing-function",M.easing])),M.delay&&a.animationDelay&&s.push([o+"animation-delay",M.delay+"s"]),M.duration&&a.animationDuration&&s.push([o+"animation-duration",M.duration+"s"]),e(s,(function(e){var t=e[0],n=e[1];C.style[d(t)]=n,y.push(e)}));var l=1e3*a.delay,u=a.duration,f=1e3*u,b=Date.now();k=[],a.transitionDuration&&k.push(i),a.animationDuration&&k.push(r),k=k.join(" "),x=function(e){e.stopPropagation();var t=e.originalEvent||e,n=t.timeStamp||Date.now(),o=parseFloat(t.elapsedTime.toFixed(3));Math.max(n-b,0)>=l&&o>=u&&A()},c.on(k,x),E(c,M),m(A,l+1.5*f,!1)},f&&f(),b.push(u),f=a((function(){f=null;for(var e=l(),t=0;t-1?d(e,t,(function(){return s(e)})):a(e,t,n)},expectWithoutText:function(e,t){var n=s(e);n.indexOf(i.startSymbol())>-1||n||a(e,t,n)},getText:s,hasAriaLabel:l,parentHasAriaLabel:function e(n,o){o=o||1;var i=t.element(n)[0]||n;return!!i.parentNode&&(!!function(e){if(!l(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}(i.parentNode)||!!--o&&e(i.parentNode,o))}};function a(e,i,a){var d=t.element(e)[0]||e;!d||d.hasAttribute(i)&&0!==d.getAttribute(i).length||function(e,t){var n,i=!1;if(e.hasChildNodes())for(var r=e.childNodes,a=0;a").html(i.trim()).contents();return n._compileElement(o,r,e)}))},e.prototype._compileElement=function(e,n,o){var i=this,r=this.$compile(n),a={element:n,cleanup:n.remove.bind(n),locals:e,link:function(d){if(e.$scope=d,o.controller){var s=t.extend({},e,{$element:n}),l=i._createController(o,s,e);t.isFunction(l.$onDestroy)&&d.$on("$destroy",(function(){t.isFunction(l.$onDestroy)&&l.$onDestroy()})),n.data("$ngControllerController",l),n.children().data("$ngControllerController",l),a.controller=l}return r(d)}};return a},e.prototype._createController=function(e,n,o){var i=this.$controller(e.controller,n);return e.bindToController&&t.extend(i,o),e.controllerAs&&(n.$scope[e.controllerAs]=i),t.isFunction(i.$onInit)&&i.$onInit(),i},e.prototype._fetchContentElement=function(e){var n,o=e.contentElement;return t.isString(o)?n=i(o=document.querySelector(o)):(o=o[0]||o,n=document.contains(o)?i(o):function(){o.parentNode&&o.parentNode.removeChild(o)}),{element:t.element(o),restore:n};function i(e){var t=e.parentNode,n=e.nextElementSibling;return function(){n?t.insertBefore(e,n):t.appendChild(e)}}}}t.module("material.core").provider("$mdCompiler",e),e.$inject=["$compileProvider"]}(),function(){u.$inject=["$$MdGestureHandler","$$rAF","$timeout","$mdUtil"],h.$inject=["$mdGesture","$$MdGestureHandler","$mdUtil"];var n,i,r={},a=6,d=!1,s=!1,l=null,c=!1;function m(){}function u(e,n,i,s){var l=s.getTouchAction(),c=void 0!==o&&t.element===o,m={handler:function(n,o){var i=new e(n);return t.extend(i,o),r[n]=i,m},register:function(e,t,n){var o=r[t.replace(/^\$md./,"")];if(!o)throw new Error("Failed to register element with handler "+t+". Available handlers: "+Object.keys(r).join(", "));return o.registerElement(e,n)},isAndroid:s.isAndroid,isIos:s.isIos,isHijackingClicks:(s.isIos||s.isAndroid)&&!c&&!d};function u(e){return function(t,n){n.distancethis.options.maxDistance&&this.cancel()},onEnd:function(){this.onCancel()}}).handler("drag",{options:{minDistance:6,horizontal:!0,cancelMultiplier:1.5},onSetup:function(e,t){l&&(this.oldTouchAction=e[0].style[l],e[0].style[l]=t.horizontal?"pan-y":"pan-x")},onCleanup:function(e){this.oldTouchAction?e[0].style[l]=this.oldTouchAction:e[0].style[l]=null},onStart:function(e){this.state.registeredParent||this.cancel()},onMove:function(e,t){var n,o;l||"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=f(e),E(e,this.state.dragPointer),this.dispatchEvent(e,"$md.dragstart",this.state.dragPointer)):o&&this.cancel())},dispatchDragMove:n.throttle((function(e){this.state.isRunning&&(E(e,this.state.dragPointer),this.dispatchEvent(e,"$md.drag",this.state.dragPointer))})),onEnd:function(e,t){this.state.dragPointer&&(E(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 p(e){this.name=e,this.state={}}function h(e,o,a){function d(e){!e.clientX&&!e.clientY||e.$material||e.isIonicTap||g(e)||"mousedown"===e.type&&($(e.target)||$(document.activeElement))||(e.preventDefault(),e.stopPropagation())}function m(e,t){var i;for(var a in r)(i=r[a])instanceof o&&("start"===e&&i.cancel(),i[e](t,n))}s||(!c&&e.isHijackingClicks&&(document.addEventListener("click",(function(e){(a.isIos?t.isDefined(e.webkitForce)&&0===e.webkitForce:0===e.clientX&&0===e.clientY)||e.$material||e.isIonicTap||g(e)?(l=null,"label"===e.target.tagName.toLowerCase()&&(l={x:e.x,y:e.y})):(e.preventDefault(),e.stopPropagation(),l=null)}),!0),document.addEventListener("mouseup",d,!0),document.addEventListener("mousedown",d,!0),document.addEventListener("focus",d,!0),c=!0),t.element(document).on("mousedown touchstart pointerdown",(function(e){if(!n){var t=+Date.now();i&&!b(e,i)&&t-i.endTime<1500||(n=f(e),m("start",e))}})).on("mousemove touchmove pointermove",(function(e){n&&b(e,n)&&(E(e,n),m("move",e))})).on("mouseup mouseleave touchend touchcancel pointerup pointercancel",(function(e){n&&b(e,n)&&(E(e,n),n.endTime=+Date.now(),"pointercancel"!==e.type&&m("end",e),i=n,n=null)})).on("$$mdGestureReset",(function(){i=n=null})))}function f(e){var t=v(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 b(e,t){return e&&t&&e.type.charAt(0)===t.type}function g(e){return l&&l.x===e.x&&l.y===e.y}function E(e,t){var n=v(e),o=t.x=n.pageX,i=t.y=n.pageY;t.distanceX=o-t.startX,t.distanceY=i-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 v(e){return(e=e.originalEvent||e).touches&&e.touches[0]||e.changedTouches&&e.changedTouches[0]||e}function $(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))}t.module("material.core.gestures",[]).provider("$mdGesture",m).factory("$$MdGestureHandler",(function(){var i=void 0!==o&&t.element===o;return p.prototype={options:{},dispatchEvent:i?function(e,o,i){i=i||n;var r=new t.element.Event(o);r.$material=!0,r.pointer=i,r.srcEvent=e,t.extend(r,{clientX:i.x,clientY:i.y,screenX:i.x,screenY:i.y,pageX:i.x,pageY:i.y,ctrlKey:e.ctrlKey,altKey:e.altKey,shiftKey:e.shiftKey,metaKey:e.metaKey}),t.element(i.target).trigger(r)}:function(t,o,i){var r;i=i||n,"click"===o||"mouseup"===o||"mousedown"===o?"function"==typeof e.MouseEvent?r=new MouseEvent(o,{bubbles:!0,cancelable:!0,screenX:Number(t.screenX),screenY:Number(t.screenY),clientX:Number(i.x),clientY:Number(i.y),ctrlKey:t.ctrlKey,altKey:t.altKey,shiftKey:t.shiftKey,metaKey:t.metaKey,button:t.button,buttons:t.buttons,relatedTarget:t.relatedTarget||null}):(r=document.createEvent("MouseEvents")).initMouseEvent(o,!0,!0,e,t.detail,i.x,i.y,i.x,i.y,t.ctrlKey,t.altKey,t.shiftKey,t.metaKey,t.button,t.relatedTarget||null):"function"==typeof e.CustomEvent?r=new CustomEvent(o,{bubbles:!0,cancelable:!0,detail:{}}):(r=document.createEvent("CustomEvent")).initCustomEvent(o,!0,!0,{}),r.$material=!0,r.pointer=i,r.srcEvent=t,i.target.dispatchEvent(r)},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),i=o&&o.$mdGesture[this.name]||{};this.state={isRunning:!0,options:t.extend({},this.options,i),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.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||{})}}},p})).run(h),m.prototype={disableAll:function(){s=!0},skipClickHijack:function(){return d=!0},setMaxClickDistance:function(e){a=parseInt(e)},$get:["$$MdGestureHandler","$$rAF","$timeout","$mdUtil",function(e,t,n,o){return new u(e,t,n,o)}]}}(),function(){function n(n,o,i){this.$timeout=n,this.$mdUtil=o,this.$rootScope=i,this.pointerEvent="MSPointerEvent"in e?"MSPointerDown":"PointerEvent"in e?"pointerdown":null,this.bodyElement=t.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))}n.$inject=["$timeout","$mdUtil","$rootScope"],t.module("material.core.interaction",[]).service("$mdInteraction",n),n.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)},n.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)},n.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()}},n.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)},n.prototype.getLastInteractionType=function(){return this.lastInteractionType},n.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(){return o.$inject=["$document","$q","$rootScope","$timeout","$rootElement","$animate","$mdUtil","$mdCompiler","$mdTheming","$injector","$exceptionHandler"],e.$get=o,e;function e(e){a.$inject=["$$interimElement","$injector"];var n=["onHide","onShow","onRemove"],o={},i={presets:{}},r={setDefaults:function(e){return i.optionsFactory=e.options,i.methods=(e.methods||[]).concat(n),r},addPreset:function(t,o){if((o=o||{}).methods=o.methods||[],o.options=o.options||function(){return{}},/^cancel|hide|show$/.test(t))throw new Error("Preset '"+t+"' in "+e+" is reserved!");if(o.methods.indexOf("_options")>-1)throw new Error("Method '_options' in "+e+" is reserved!");return i.presets[t]={methods:o.methods.concat(n),optionsFactory:o.options,argOption:o.argOption},r},addMethod:function(e,t){return o[e]=t,r},$get:a};return r.addPreset("build",{methods:["controller","controllerAs","resolve","multiple","template","templateUrl","themable","transformTemplate","parent","contentElement"]}),r;function a(n,r){var a,d,s=n(),l={hide:s.hide,cancel:s.cancel,show:function(e){return(e=e||{})._options&&(e=e._options),s.show(t.extend({},d,e))},destroy:function(e){return s.destroy(e)}};return a=i.methods||[],d=c(i.optionsFactory,{}),t.forEach(o,(function(e,t){l[t]=e})),t.forEach(i.presets,(function(e,n){var o=c(e.optionsFactory,{}),i=(e.methods||[]).concat(a);function r(e){this._options=t.extend({},o,e)}if(t.extend(o,{$type:n}),t.forEach(i,(function(e){r.prototype[e]=function(t){return this._options[e]=t,this}})),e.argOption){var d="show"+n.charAt(0).toUpperCase()+n.slice(1);l[d]=function(e){var t=l[n](e);return l.show(t)}}l[n]=function(n){return arguments.length&&e.argOption&&!t.isObject(n)&&!t.isArray(n)?(new r)[e.argOption](n):new r(n)}})),l;function c(t,n){var o={};return o[e]=l,r.invoke(t||function(){return n},{},o)}}}function o(e,o,i,r,a,d,s,l,c,m,u){return function(){var p,h=[],f=[],b=[];return p={show:function(e){var t=new E((e=e||{})||{}),n=e.multiple?o.resolve():o.all(h);e.multiple||(n=n.then((function(){var e=f.concat(b.map(p.cancel));return o.all(e)})));var i=n.then((function(){return t.show().then((function(){b.push(t)})).catch((function(e){return e})).finally((function(){h.splice(h.indexOf(i),1)}))}));return h.push(i),t.deferred.promise.catch((function(e){return e instanceof Error&&u(e),e})),t.deferred.promise},hide:g((function(e,t){return(t=t||{}).closeAll?o.all(b.slice().reverse().map(i)):t.closeTo!==n?o.all(b.slice(t.closeTo).map(i)):i(b[b.length-1]);function i(n){if(!n)return o.when(e);var i=n.remove(e,!1,t||{}).catch((function(e){return e})).finally((function(){f.splice(f.indexOf(i),1)}));return b.splice(b.indexOf(n),1),f.push(i),n.deferred.promise}})),cancel:g((function(e,n){var i=b.pop();if(!i)return o.when(e);var r=i.remove(e,!0,n||{}).catch((function(e){return e})).finally((function(){f.splice(f.indexOf(r),1)}));return f.push(r),i.deferred.promise.catch(t.noop)})),destroy:function(e){var n=e?null:b.shift(),i=t.element(e).length&&t.element(e)[0].parentNode;if(i){var r=b.filter((function(e){return e.options.element[0]===i}));r.length&&(n=r[0],b.splice(b.indexOf(n),1))}return n?n.remove(!1,!1,{$destroy:!0}):o.when(!1)},$injector_:m};function g(e){return function(){var t=arguments;return b.length?e.apply(p,t):h.length?h[0].finally((function(){return e.apply(p,t)})):o.when("No interim elements currently showing up.")}}function E(m){var u,h,f=o.when(!0);return m=function(e){return(e=e||{}).template&&(e.template=s.processTemplate(e.template)),t.extend({preserveScope:!1,cancelAutoHide:t.noop,scope:e.scope||i.$new(e.isolateScope),onShow:function(e,t,n){return d.enter(t,n.parent)},onRemove:function(e,t){return t&&d.leave(t)||o.when()}},e)}(m),u={options:m,deferred:o.defer(),show:function(){return o((function(n,i){function r(e){u.deferred.reject(e),i(e)}m.onCompiling&&m.onCompiling(m),function(e){return(e.skipCompile?null:l.compile(e))||o((function(t){t({locals:{},link:function(){return e.element}})}))}(m).then((function(i){h=function(n,o){t.extend(n.locals,o);var i=n.link(o.scope);return o.element=i,o.parent=function(n,o){var i,r=o.parent;return((r=t.isFunction(r)?r(o.scope,n,o):t.isString(r)?t.element(e[0].querySelector(r)):t.element(r))||{}).length?r:(a[0]&&a[0].querySelector&&(i=a[0].querySelector(":not(svg) > body")),i||(i=a[0]),"#comment"===i.nodeName&&(i=e[0].body),t.element(i))}(i,o),o.themable&&c(i),i}(i,m),m.cleanupElement=i.cleanup,f=function(e,n,i){var r=n.onShowing||t.noop,a=n.onComplete||t.noop;try{r(n.scope,e,n,i)}catch(e){return o.reject(e)}return o((function(t,i){try{o.when(n.onShow(n.scope,e,n)).then((function(){a(n.scope,e,n),b(),t(e)}),i)}catch(e){i(e.message)}}))}(h,m,i.controller).then(n,r)})).catch(r)}))},remove:function(e,n,i){return h?((m=t.extend(m||{},i||{})).cancelAutoHide&&m.cancelAutoHide(),m.element.triggerHandler("$mdInterimElementRemove"),!0===m.$destroy?g(m.element,m).then((function(){n&&a(e)||r(e)})):(o.when(f).finally((function(){g(m.element,m).then((function(){n?a(e):r(e)}),a)})),u.deferred.promise)):o.when(!1);function r(e){u.deferred.resolve(e)}function a(e){u.deferred.reject(e)}}};function b(){var e,o=t.noop;m.hideDelay&&(e=r(p.hide,m.hideDelay),o=function(){r.cancel(e)}),m.cancelAutoHide=function(){o(),m.cancelAutoHide=n}}function g(e,n){var i=n.onRemoving||t.noop;return o((function(t,r){try{var a=o.when(n.onRemove(n.scope,e,n)||!0);i(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)}),r)}catch(e){r(e.message)}}))}}}}})),function(){var e,n,o,i=/(-gt)?-(sm|md|lg|print)/g,r=/\s+/g,a=["grow","initial","auto","none","noshrink","nogrow"],d=["row","column"],s=["","start","center","end","stretch","space-around","space-between"],l=["","start","center","end","stretch"],c={enabled:!0,breakpoints:[]};function m(){var e=!!document.querySelector("[md-layouts-disabled]");c.enabled=!e}function u(){return c.enabled=!1,{restrict:"A",priority:"900"}}function p(i){return["$mdUtil","$interpolate","$log",function(a,d,s){return e=a,n=d,o=s,{restrict:"A",compile:function(e,n){var o;return c.enabled&&(f(i,E(i,n,""),b(0,i,n)),r(0,e),o=r),o||t.noop}}}];function r(e,t){t.addClass(i)}}function h(t,n,o,r){var a,d=o[0].nodeName.toLowerCase();switch(t.replace(i,"")){case"flex":"md-button"!==d&&"fieldset"!==d||(a="<"+d+" "+t+">",r.warn(e.supplant("Markup '{0}' may not work as expected in IE Browsers. Consult '{1}' for details.",[a,"https://github.com/philipwalton/flexbugs#9-some-html-elements-cant-be-flex-containers"])))}}function f(n,o,c){var m=o;if(!g(o)){switch(n.replace(i,"")){case"layout":v(o,d)||(o=d[0]);break;case"flex":v(o,a)||isNaN(o)&&(o="");break;case"flex-offset":case"flex-order":o&&!isNaN(+o)||(o="0");break;case"layout-align":var u=function(e){var t,n={main:"start",cross:"stretch"};return 0!==(e=e||"").indexOf("-")&&0!==e.indexOf(" ")||(e="none"+e),(t=e.toLowerCase().trim().replace(r,"-").split("-")).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),s.indexOf(n.main)<0&&(n.main="start"),l.indexOf(n.cross)<0&&(n.cross="stretch"),n}(o);o=e.supplant("{main}-{cross}",u);break;case"layout-padding":case"layout-margin":case"layout-fill":case"layout-wrap":case"layout-nowrap":o=""}o!==m&&(c||t.noop)(o)}return o?o.trim():""}function b(e,t,n){return function(e){g(e)||(n[n.$normalize(t)]=e)}}function g(e){return(e||"").indexOf(n.startSymbol())>-1}function E(e,t,n){var o=t.$normalize(e);return t[o]?t[o].trim().replace(r,"-"):n||null}function v(e,t,n){e=n&&e?e.replace(r,n):e;var o=!1;return e&&t.forEach((function(t){t=n?t.replace(r,n):t,o=o||t===e})),o}!function(i){var a,d=/^((?:x|data)[:\-_])/i,s=/([:\-_]+(.))/g,l=["layout","flex","flex-order","flex-offset","layout-align"],g=["show","hide","layout-padding","layout-margin"];function v(e){return e.replace(d,"").replace(s,(function(e,t,n,o){return o?n.toUpperCase():n}))}t.forEach(["","xs","gt-xs","sm","gt-sm","md","gt-md","lg","gt-lg","xl","print"],(function(a){t.forEach(l,(function(d){var s=a?d+"-"+a:d;i.directive(v(s),function(i){return["$mdUtil","$interpolate","$log",function(r,d,s){return e=r,n=d,o=s,{restrict:"A",compile:function(e,n){var r;return c.enabled&&(h(i,0,e,o),f(i,E(i,n,""),b(0,i,n)),r=a),r||t.noop}}}];function a(e,n,o){var a=function(e,n){var o;return function(i){var a=f(n,i||"");t.isDefined(a)&&(o&&e.removeClass(o),o=a?n+"-"+a.trim().replace(r,"-"):n,e.addClass(o))}}(n,i),d=o.$observe(o.$normalize(i),a);a(E(i,o,"")),e.$on("$destroy",(function(){d()}))}}(s))})),t.forEach(g,(function(e){var t=a?e+"-"+a:e;i.directive(v(t),p(t))}))})),i.provider("$$mdLayout",(function(){return{$get:t.noop,validateAttributeValue:f,validateAttributeUsage:h,disableLayouts:function(e){c.enabled=!0!==e}}})).directive("mdLayoutCss",u).directive("ngCloak",(a="ng-cloak",["$timeout",function(e){return{restrict:"A",priority:-10,compile:function(n){return c.enabled?(n.addClass(a),function(t,n){e((function(){n.removeClass(a)}),10,!1)}):t.noop}}}])).directive("layoutWrap",p("layout-wrap")).directive("layoutNowrap",p("layout-nowrap")).directive("layoutNoWrap",p("layout-no-wrap")).directive("layoutFill",p("layout-fill")).config(m)}(t.module("material.core.layout",["ng"]))}(),function(){function e(e){this._$timeout=e,this._liveElement=this._createLiveElement(),this._announceTimeout=100}e.$inject=["$timeout"],t.module("material.core").service("$mdLiveAnnouncer",e),e.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)},e.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(){var e=t.element(document.head),n={};function o(e){if(n[e])return!0;var o=document.getElementsByName(e)[0];return!!o&&(n[e]=t.element(o),!0)}var i={setMeta:function(i,r){if(o(i),n[i])n[i].attr("content",r);else{var a=t.element('');e.append(a),n[i]=a}return function(){n[i].attr("content",""),n[i].remove(),delete n[i]}},getMeta:function(e){if(!o(e))throw Error("$$mdMeta: could not find a meta tag with the name '"+e+"'");return n[e].attr("content")}};return t.extend({},i,{$get:function(){return i}})})),function(){function e(e,o){var i,r=[],a={};return i={notFoundError:function(t,n){e.error((n||"")+"No instance found for handle",t)},getInstances:function(){return r},get:function(e){if(!d(e))return null;var t,n,o;for(t=0,n=r.length;t');return this.$element.append(e),e},n.prototype.clearTimeout=function(){this.timeout&&(this.$timeout.cancel(this.timeout),this.timeout=null)},n.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},n.prototype.inkRipple=function(){return this.$element.attr("md-ink-ripple")},n.prototype.createRipple=function(e,n){if(this.isRippleAllowed()){var o=this,i=o.$mdColorUtil,r=t.element('
'),a=this.$element.prop("clientWidth"),d=this.$element.prop("clientHeight"),s=2*Math.max(Math.abs(a-e),e),l=2*Math.max(Math.abs(d-n),n),c=function(e,t,n){return e?Math.max(t,n):Math.sqrt(Math.pow(t,2)+Math.pow(n,2))}(this.options.fitRipple,s,l),m=this.calculateColor();r.css({left:e+"px",top:n+"px",background:"black",width:c+"px",height:c+"px",backgroundColor:i.rgbaToRgb(m),borderColor:i.rgbaToRgb(m)}),this.lastRipple=r,this.clearTimeout(),this.timeout=this.$timeout((function(){o.clearTimeout(),o.mousedown||o.fadeInComplete(r)}),157.5,!1),this.options.dimBackground&&this.container.css({backgroundColor:m}),this.container.append(r),this.ripples.push(r),r.addClass("md-ripple-placed"),this.$mdUtil.nextTick((function(){r.addClass("md-ripple-scaled md-ripple-active"),o.$timeout((function(){o.clearRipples()}),450,!1)}),!1)}},n.prototype.fadeInComplete=function(e){this.lastRipple===e&&(this.timeout||this.mousedown)||this.removeRipple(e)},n.prototype.removeRipple=function(e){var t=this;this.ripples.indexOf(e)<0||(this.ripples.splice(this.ripples.indexOf(e),1),e.removeClass("md-ripple-active"),e.addClass("md-ripple-remove"),0===this.ripples.length&&this.container.css({backgroundColor:""}),this.$timeout((function(){t.fadeOutComplete(e)}),450,!1))},n.prototype.fadeOutComplete=function(e){e.remove(),this.lastRipple=null}}(),function(){function e(e){return{attach:function(n,o,i){return e.attach(n,o,t.extend({center:!1,dimBackground:!0,outline:!1,rippleSize:"full"},i))}}}e.$inject=["$mdInkRipple"],t.module("material.core").factory("$mdTabInkRipple",e)}(),t.module("material.core.theming.palette",[]).constant("$mdColorPalette",{red:{50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000",contrastDefaultColor:"light",contrastDarkColors:"50 100 200 300 400 500 600 A100 A200 A400",contrastStrongLightColors:"700 800 900 A700"},pink:{50:"#fce4ec",100:"#f8bbd0",200:"#f48fb1",300:"#f06292",400:"#ec407a",500:"#e91e63",600:"#d81b60",700:"#c2185b",800:"#ad1457",900:"#880e4f",A100:"#ff80ab",A200:"#ff4081",A400:"#f50057",A700:"#c51162",contrastDefaultColor:"light",contrastDarkColors:"50 100 200 300 400 A100 A200 A400",contrastStrongLightColors:"500 600 700 800 900 A700"},purple:{50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",A100:"#ea80fc",A200:"#e040fb",A400:"#d500f9",A700:"#aa00ff",contrastDefaultColor:"light",contrastDarkColors:"50 100 200 300 A100 A200 A400",contrastStrongLightColors:"400 500 600 700 800 900 A700"},"deep-purple":{50:"#ede7f6",100:"#d1c4e9",200:"#b39ddb",300:"#9575cd",400:"#7e57c2",500:"#673ab7",600:"#5e35b1",700:"#512da8",800:"#4527a0",900:"#311b92",A100:"#b388ff",A200:"#7c4dff",A400:"#651fff",A700:"#6200ea",contrastDefaultColor:"light",contrastDarkColors:"50 100 200 300 A100",contrastStrongLightColors:"400 500 600 700 800 900 A200 A400 A700"},indigo:{50:"#e8eaf6",100:"#c5cae9",200:"#9fa8da",300:"#7986cb",400:"#5c6bc0",500:"#3f51b5",600:"#3949ab",700:"#303f9f",800:"#283593",900:"#1a237e",A100:"#8c9eff",A200:"#536dfe",A400:"#3d5afe",A700:"#304ffe",contrastDefaultColor:"light",contrastDarkColors:"50 100 200 300 A100 A200",contrastStrongLightColors:"400 500 600 700 800 900 A400 A700"},blue:{50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff",contrastDefaultColor:"light",contrastDarkColors:"50 100 200 300 400 500 600 A100 A200",contrastStrongLightColors:"700 800 900 A400 A700"},"light-blue":{50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",A100:"#80d8ff",A200:"#40c4ff",A400:"#00b0ff",A700:"#0091ea",contrastDefaultColor:"dark",contrastStrongLightColors:"800 900 A700"},cyan:{50:"#e0f7fa",100:"#b2ebf2",200:"#80deea",300:"#4dd0e1",400:"#26c6da",500:"#00bcd4",600:"#00acc1",700:"#0097a7",800:"#00838f",900:"#006064",A100:"#84ffff",A200:"#18ffff",A400:"#00e5ff",A700:"#00b8d4",contrastDefaultColor:"dark",contrastStrongLightColors:"800 900"},teal:{50:"#e0f2f1",100:"#b2dfdb",200:"#80cbc4",300:"#4db6ac",400:"#26a69a",500:"#009688",600:"#00897b",700:"#00796b",800:"#00695c",900:"#004d40",A100:"#a7ffeb",A200:"#64ffda",A400:"#1de9b6",A700:"#00bfa5",contrastDefaultColor:"dark",contrastStrongLightColors:"600 700 800 900"},green:{50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853",contrastDefaultColor:"dark",contrastStrongLightColors:"700 800 900"},"light-green":{50:"#f1f8e9",100:"#dcedc8",200:"#c5e1a5",300:"#aed581",400:"#9ccc65",500:"#8bc34a",600:"#7cb342",700:"#689f38",800:"#558b2f",900:"#33691e",A100:"#ccff90",A200:"#b2ff59",A400:"#76ff03",A700:"#64dd17",contrastDefaultColor:"dark",contrastStrongLightColors:"800 900"},lime:{50:"#f9fbe7",100:"#f0f4c3",200:"#e6ee9c",300:"#dce775",400:"#d4e157",500:"#cddc39",600:"#c0ca33",700:"#afb42b",800:"#9e9d24",900:"#827717",A100:"#f4ff81",A200:"#eeff41",A400:"#c6ff00",A700:"#aeea00",contrastDefaultColor:"dark",contrastStrongLightColors:"900"},yellow:{50:"#fffde7",100:"#fff9c4",200:"#fff59d",300:"#fff176",400:"#ffee58",500:"#ffeb3b",600:"#fdd835",700:"#fbc02d",800:"#f9a825",900:"#f57f17",A100:"#ffff8d",A200:"#ffff00",A400:"#ffea00",A700:"#ffd600",contrastDefaultColor:"dark"},amber:{50:"#fff8e1",100:"#ffecb3",200:"#ffe082",300:"#ffd54f",400:"#ffca28",500:"#ffc107",600:"#ffb300",700:"#ffa000",800:"#ff8f00",900:"#ff6f00",A100:"#ffe57f",A200:"#ffd740",A400:"#ffc400",A700:"#ffab00",contrastDefaultColor:"dark"},orange:{50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00",contrastDefaultColor:"dark",contrastStrongLightColors:"900"},"deep-orange":{50:"#fbe9e7",100:"#ffccbc",200:"#ffab91",300:"#ff8a65",400:"#ff7043",500:"#ff5722",600:"#f4511e",700:"#e64a19",800:"#d84315",900:"#bf360c",A100:"#ff9e80",A200:"#ff6e40",A400:"#ff3d00",A700:"#dd2c00",contrastDefaultColor:"dark",contrastStrongLightColors:"800 900 A400 A700"},brown:{50:"#efebe9",100:"#d7ccc8",200:"#bcaaa4",300:"#a1887f",400:"#8d6e63",500:"#795548",600:"#6d4c41",700:"#5d4037",800:"#4e342e",900:"#3e2723",A100:"#d7ccc8",A200:"#bcaaa4",A400:"#8d6e63",A700:"#5d4037",contrastDefaultColor:"light",contrastDarkColors:"50 100 200 300 A100 A200",contrastStrongLightColors:"400 500 600 700 800 900 A400 A700"},grey:{50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#ffffff",A200:"#000000",A400:"#303030",A700:"#616161",contrastDefaultColor:"dark",contrastLightColors:"700 800 900 A200 A400 A700",contrastStrongLightColors:"600"},"blue-grey":{50:"#eceff1",100:"#cfd8dc",200:"#b0bec5",300:"#90a4ae",400:"#78909c",500:"#607d8b",600:"#546e7a",700:"#455a64",800:"#37474f",900:"#263238",A100:"#cfd8dc",A200:"#b0bec5",A400:"#78909c",A700:"#455a64",contrastDefaultColor:"light",contrastDarkColors:"50 100 200 300 400 A100 A200 A400",contrastStrongLightColors:"500 600 700 800 900 A700"}}),function(e){function t(e){var t=!!document.querySelector("[md-themes-disabled]");e.disableTheming(t)}t.$inject=["$mdThemingProvider"],$.$inject=["$mdTheming","$interpolate","$parse","$mdUtil","$q","$log"],M.$inject=["$mdTheming"],v.$inject=["$mdColorPalette","$$mdMetaProvider"],T.$inject=["$injector","$mdTheming"],e.module("material.core.theming",["material.core.theming.palette","material.core.meta"]).directive("mdTheme",$).directive("mdThemable",M).directive("mdThemesDisabled",(function(){return E.disableTheming=!0,{restrict:"A",priority:"900"}})).provider("$mdTheming",v).config(t).run(T);var o,i={},r={name:"dark"},a={name:"light"},d="1px 1px 0px rgba(0,0,0,0.4), -1px -1px 0px rgba(0,0,0,0.4)",s=w("rgba(0,0,0,0.87)"),l=w("rgba(255,255,255,0.87)"),c=w("rgb(255,255,255)"),m=["primary","accent","warn","background"],u={accent:{default:"A200","hue-1":"A100","hue-2":"A400","hue-3":"A700"},background:{default:"50","hue-1":"A100","hue-2":"100","hue-3":"300"}},p={background:{default:"A400","hue-1":"800","hue-2":"900","hue-3":"A200"}},h={icon:.54,secondary:.54,disabled:.38,hint:.38,divider:.12},f={icon:.87,secondary:.7,disabled:.5,hint:.5,divider:.12},b={icon:1,secondary:.7,disabled:.5,hint:.5,divider:.12};m.forEach((function(e){var t={default:"500","hue-1":"300","hue-2":"800","hue-3":"A100"};u[e]||(u[e]=t),p[e]||(p[e]=t)}));var g=["50","100","200","300","400","500","600","700","800","900","A100","A200","A400","A700"],E={disableTheming:!1,generateOnDemand:!1,registeredStyles:[],nonce:null};function v(t,i){M.$inject=["$rootScope","$mdUtil","$q","$log"],o={};var s,l={},c=!1,h="default";e.extend(o,t);var f=function(t){var n=(t=e.isObject(t)?t:{}).theme||"default",r=t.hue||"800",a=o[t.palette]||o[l[n].colors[t.palette||"primary"].name],d=e.isObject(a[r])?a[r].hex:a[r];return"#"!==d.substr(0,1)&&(d="#"+d),function(e){var t=i.setMeta("theme-color",e),n=i.setMeta("msapplication-navbutton-color",e);return function(){t(),n()}}(d)};return s={definePalette:function(e,t){return t=t||{},o[e]=b(e,t),s},extendPalette:function(t,n){return b(t,e.extend({},o[t]||{},n))},theme:v,configuration:function(){return e.extend({},E,{defaultTheme:h,alwaysWatchTheme:c,registeredStyles:[].concat(E.registeredStyles)})},disableTheming:function(t){E.disableTheming=e.isUndefined(t)||!!t},registerStyles:function(e){E.registeredStyles.push(e)},setNonce:function(e){E.nonce=e},generateThemesOnDemand:function(e){E.generateOnDemand=e},setDefaultTheme:function(e){h=e},alwaysWatchTheme:function(e){c=e},enableBrowserColor:f,$get:M,_LIGHT_DEFAULT_HUES:u,_DARK_DEFAULT_HUES:p,_PALETTES:o,_THEMES:l,_parseRules:y,_rgba:_};function b(e,t){var n=g.filter((function(e){return!t[e]}));if(n.length)throw new Error("Missing colors %1 in palette %2!".replace("%1",n.join(", ")).replace("%2",e));return t}function v(t,n){if(l[t])return l[t];var o="string"==typeof(n=n||"default")?l[n]:n,i=new $(t);return o&&e.forEach(o.colors,(function(t,n){i.colors[n]={name:t.name,hues:e.extend({},t.hues)}})),l[t]=i,i}function $(t){var n=this;function o(t){if((t=0===arguments.length||!!t)!==n.isDark){n.isDark=t,n.foregroundPalette=n.isDark?a:r,n.foregroundShadow=n.isDark?d:"";var o=n.isDark?p:u,i=n.isDark?u:p;return e.forEach(o,(function(e,t){var o=n.colors[t],r=i[t];if(o)for(var a in o.hues)o.hues[a]===r[a]&&(o.hues[a]=e[a])})),n}}n.name=t,n.colors={},n.dark=o,o(!1),m.forEach((function(t){var o=(n.isDark?p:u)[t];n[t+"Palette"]=function(i,r){var a=n.colors[t]={name:i,hues:e.extend({},o,r)};return Object.keys(a.hues).forEach((function(e){if(!o[e])throw new Error("Invalid hue name '%1' in theme %2's %3 color %4. Available hue names: %4".replace("%1",e).replace("%2",n.name).replace("%3",i).replace("%4",Object.keys(o).join(", ")))})),Object.keys(a.hues).map((function(e){return a.hues[e]})).forEach((function(e){if(-1===g.indexOf(e))throw new Error("Invalid hue value '%1' in theme %2's %3 color %4. Available hue values: %5".replace("%1",e).replace("%2",n.name).replace("%3",t).replace("%4",i).replace("%5",g.join(", ")))})),n}}))}function M(t,i,r,a){var d=function(e,o){o===n&&(o=e,e=n),e===n&&(e=t),d.inherit(o,o)};return Object.defineProperty(d,"THEMES",{get:function(){return e.extend({},l)}}),Object.defineProperty(d,"PALETTES",{get:function(){return e.extend({},o)}}),Object.defineProperty(d,"ALWAYS_WATCH",{get:function(){return c}}),d.inherit=function(e,t){var o=t.controller("mdTheme")||e.data("$mdThemeController"),r=e.scope();if(u(o&&o.$mdTheme||("default"===h?"":h)),o){var d=c||o.$shouldWatch||i.parseAttributeBoolean(e.attr("md-theme-watch"));if(d||o.isAsyncTheme){var l=function(){m&&(m(),m=n)},m=o.registerChanges((function(e){u(e),d||l()}));r?r.$on("$destroy",l):e.on("$destroy",l)}}function u(t){if(t){s(t)||a.warn("Attempted to use unregistered theme '"+t+"'. Register it with $mdThemingProvider.theme().");var n=e.data("$mdThemeName");n&&e.removeClass("md-"+n+"-theme"),e.addClass("md-"+t+"-theme"),e.data("$mdThemeName",t),o&&e.data("$mdThemeController",o)}}},d.registered=s,d.defaultTheme=function(){return h},d.generateTheme=function(e){A(l[e],e,E.nonce)},d.defineTheme=function(e,t){t=t||{};var n=v(e);return t.primary&&n.primaryPalette(t.primary,t.primaryHues),t.accent&&n.accentPalette(t.accent,t.accentHues),t.warn&&n.warnPalette(t.warn,t.warnHues),t.background&&n.backgroundPalette(t.background,t.backgroundHues),t.dark&&n.dark(),this.generateTheme(e),r.resolve(e)},d.setBrowserColor=f,d;function s(e){return e===n||""===e||d.THEMES[e]!==n}}}function $(t,n,o,i,r,a){return{priority:101,link:{pre:function(d,s,l){var c=[],m=n.startSymbol(),u=n.endSymbol(),p=l.mdTheme.trim(),h=p.substr(0,m.length)===m&&p.lastIndexOf(u)===p.length-u.length,f="::"===l.mdTheme.split(m).join("").split(u).join("").trim().substr(0,"::".length),b=function(){var e=n(l.mdTheme)(d);return o(e)(d)||e},g={isAsyncTheme:e.isFunction(b())||e.isFunction(b().then),registerChanges:function(t,n){return n&&(t=e.bind(n,t)),c.push(t),function(){var e=c.indexOf(t);e>-1&&c.splice(e,1)}},$setTheme:function(e){t.registered(e)||a.warn("attempted to use unregistered theme '"+e+"'"),g.$mdTheme=e;for(var n=c.length;n--;)c[n](e)},$shouldWatch:i.parseAttributeBoolean(s.attr("md-theme-watch"))||t.ALWAYS_WATCH||h&&!f};s.data("$mdThemeController",g);var E=function(t){if("string"==typeof t)return g.$setTheme(t);r.when(e.isFunction(t)?t():t).then((function(e){g.$setTheme(e)}))};E(b());var v=d.$watch(b,(function(e){e&&(E(e),g.$shouldWatch||v())}))}}}}function M(e){return e}function y(t,n,i){!function(e,t){if(!o[(e.colors[t]||{}).name])throw new Error("You supplied an invalid color palette for theme %1's %2 palette. Available palettes: %3".replace("%1",e.name).replace("%2",t).replace("%3",Object.keys(o).join(", ")))}(t,n),i=i.replace(/THEME_NAME/g,t.name);var r=new RegExp("\\.md-"+t.name+"-theme","g"),a=new RegExp("(['\"])?{{\\s*([a-zA-Z]+)-?(color|default)?-?(contrast)?-?((?:\\d\\.?\\d*)|(?:[a-zA-Z]+))?\\s*}}([\"'])?","g"),d=t.colors.background.hues.default,s=o[t.colors.background.name][d].contrastType;i=i.replace(/'?"?{{\s*([a-zA-Z]+)-(A?\d+|hue-[0-3]|shadow|default)-?(contrast)?-?((?:\d\.?\d*)|(?:[a-zA-Z]+))?\s*}}'?"?/g,(function(e,n,i,r,a){var d=n;if("foreground"===n){if("shadow"===i)return t.foregroundShadow;if(t.foregroundPalette[i])return _(w(t.foregroundPalette[i]));if(t.foregroundPalette[1])return _(w(t.foregroundPalette[1]));if(n="background",r="contrast",!a&&i)switch(i){case"2":a="secondary";break;case"3":a="disabled";break;case"4":a="divider"}i="default"}0!==i.indexOf("hue")&&"default"!==i||(i=t.colors[n].hues[i]);var l=o[t.colors[n].name][i]||"";if("background"===n&&r&&"foreground"!==d&&l.contrastType===s)switch(a){case"secondary":case"icon":if(t.foregroundPalette[2])return _(w(t.foregroundPalette[2]));break;case"disabled":case"hint":if(t.foregroundPalette[3])return _(w(t.foregroundPalette[3]));break;case"divider":if(t.foregroundPalette[4])return _(w(t.foregroundPalette[4]));break;default:if(t.foregroundPalette[1])return _(w(t.foregroundPalette[1]))}return r&&a&&(a=l.opacity[a]||a),_(l[r?"contrast":"value"],a)}));var l=[];return e.forEach(["default","hue-1","hue-2","hue-3"],(function(e){var n=i.replace(a,(function(n,i,r,a,d,s){var l=t.colors[r],c=o[l.name],m=l.hues[e];return d&&s&&(s=c[m].opacity[s]||s),_(c[m]["color"===a?"value":"contrast"],s)}));"default"!==e&&(n=n.replace(r,".md-"+t.name+"-theme.md-"+e)),"default"===t.name&&(n=n.replace(/((?:\s|>|\.|\w|-|:|\(|\)|\[|]|"|'|=)*)\.md-default-theme((?:\s|>|\.|\w|-|:|\(|\)|\[|]|"|'|=)*)/g,(function(e,t,n){return e+", "+t+n}))),l.push(n)})),l}var C={};function T(t,n){var r=document.head,a=r?r.firstElementChild:null,d=!E.disableTheming&&t.has("$MD_THEME_CSS")?t.get("$MD_THEME_CSS"):"";if(d+=E.registeredStyles.join(""),a&&0!==d.length){e.forEach(o,(function(t){var n=t.contrastDefaultColor,o=t.contrastLightColors||[],i=t.contrastStrongLightColors||[],r=t.contrastDarkColors||[];function a(e){switch(e){default:case"strongLight":return c;case"light":return l;case"dark":return s}}function d(e){switch(e){default:case"strongLight":return b;case"light":return f;case"dark":return h}}"string"==typeof o&&(o=o.split(" ")),"string"==typeof i&&(i=i.split(" ")),"string"==typeof r&&(r=r.split(" ")),delete t.contrastDefaultColor,delete t.contrastLightColors,delete t.contrastStrongLightColors,delete t.contrastDarkColors,e.forEach(t,(function(s,l){if(!e.isObject(s)){var c=w(s);if(!c)throw new Error("Color %1, in palette %2's hue %3, is invalid. Hex or rgb(a) color expected.".replace("%1",s).replace("%2",t.name).replace("%3",l));var m=function(e){return("light"===n?-1!==r.indexOf(e):-1===o.indexOf(e)&&-1===i.indexOf(e))?"dark":-1!==i.indexOf(e)?"strongLight":"light"}(l);t[l]={hex:t[l],value:c,contrastType:m,contrast:a(m),opacity:d(m)}}}))}));var u=function(e){for(var t=[],n="",o=0,i=0,r=0;r-1)return C[t]+=e;for(n=0;t=m[n];n++)if(e.indexOf(t)>-1)return C[t]+=e;return C.primary+=e})),E.generateOnDemand||e.forEach(n.THEMES,(function(e){i[e.name]||"default"!==n.defaultTheme()&&"default"===e.name||A(e,e.name,E.nonce)}))}}function A(e,t,n){var o=document.head,r=o?o.firstElementChild:null;i[t]||(m.forEach((function(t){for(var i=y(e,t,C[t]);i.length;){var a=i.shift();if(a){var d=document.createElement("style");d.setAttribute("md-theme-style",""),n&&d.setAttribute("nonce",n),d.appendChild(document.createTextNode(a)),o.insertBefore(d,r)}}})),i[e.name]=!0)}function w(t){if(e.isArray(t)&&3===t.length)return t;if(/^rgb/.test(t))return t.replace(/(^\s*rgba?\(|\)\s*$)/g,"").split(",").map((function(e,t){return 3===t?parseFloat(e):parseInt(e,10)}));if("#"===t.charAt(0)&&(t=t.substring(1)),/^([a-fA-F0-9]{3}){1,2}$/g.test(t)){var n=t.length/3,o=t.substr(0,n),i=t.substr(n,n),r=t.substr(2*n);return 1===n&&(o+=o,i+=i,r+=r),[parseInt(o,16),parseInt(i,16),parseInt(r,16)]}}function _(t,n){return t?(4===t.length&&(t=e.copy(t),n?t.pop():n=t.pop()),n&&("number"==typeof n||"string"==typeof n&&n.length)?"rgba("+t.join(",")+","+n+")":"rgb("+t.join(",")+")"):"rgb('0,0,0')"}}(e.angular),t.module("material.components.autocomplete",["material.core","material.components.icon","material.components.virtualRepeat"]),function(){i.$inject=["$scope","$element","$mdUtil","$mdConstant","$mdTheming","$window","$animate","$rootElement","$attrs","$q","$log","$mdLiveAnnouncer"],t.module("material.components.autocomplete").controller("MdAutocompleteCtrl",i);var e="standard",o="virtual";function i(i,r,a,d,s,l,c,m,u,p,h,f){var b,g,E=this,v=i.itemsExpr.split(/ in /i),$=v[1],M=null,y={},C=!1,T=[],A=!1,w=0,_=null,k=null,x=a.debounce((function(){E.hidden||O()})),N=o;E.documentElement=t.element(document.documentElement),b=function(e,n){var o,i,r;M&&(o=t.element(M.scrollContainer)),!e&&n?(O(),re(!0,D|H),M&&(a.disableScrollAround(M.scrollContainer),i=M.wrap,(r=t.element(i)).on("wheel touchmove",R),_=function(){r.off("wheel touchmove",R)},a.isIos&&(E.documentElement.on("touchend",B),o&&o.on("touchstart touchmove touchend",F)),E.index=Y(),a.nextTick((function(){L(),ae()})))):e&&!n&&(a.isIos&&(E.documentElement.off("touchend",B),o&&o.off("touchstart touchmove touchend",F)),a.enableScrolling(),_&&(_(),_=null))},g=!0,Object.defineProperty(E,"hidden",{get:function(){return g},set:function(e){var t=g;g=e,b(e,t)}}),E.scope=i,E.parent=i.$parent,E.itemName=v[0],E.matches=[],E.loading=!1,E.hidden=!0,E.index=-1,E.activeOption=null,E.id=a.nextUid(),E.isDisabled=null,E.isRequired=null,E.isReadonly=null,E.hasNotFound=!1,E.selectedMessage=i.selectedMessage||"selected",E.noMatchMessage=i.noMatchMessage||"There are no matches available.",E.singleMatchMessage=i.singleMatchMessage||"There is 1 match available.",E.multipleMatchStartMessage=i.multipleMatchStartMessage||"There are ",E.multipleMatchEndMessage=i.multipleMatchEndMessage||" matches available.",E.defaultEscapeOptions="clear",E.keydown=function(e){switch(e.keyCode){case d.KEY_CODE.DOWN_ARROW:if(E.loading||J())return;e.stopPropagation(),e.preventDefault(),E.index=E.index+1>E.matches.length-1?0:Math.min(E.index+1,E.matches.length-1),a.nextTick(L),ae();break;case d.KEY_CODE.UP_ARROW:if(E.loading||J())return;e.stopPropagation(),e.preventDefault(),E.index=E.index-1<0?E.matches.length-1:Math.max(0,E.index-1),a.nextTick(L),ae();break;case d.KEY_CODE.TAB:if(U(),E.hidden||E.loading||E.index<0||E.matches.length<1)return;ne(E.index);break;case d.KEY_CODE.ENTER:if(E.hidden||E.loading||E.index<0||E.matches.length<1)return;if(J())return;e.stopImmediatePropagation(),e.preventDefault(),ne(E.index);break;case d.KEY_CODE.ESCAPE:if(e.preventDefault(),!(Z("blur")||!E.hidden||E.loading||Z("clear")&&i.searchText))return;e.stopPropagation(),oe(),i.searchText&&Z("clear")&&ie(),E.hidden=!0,Z("blur")&&z(!0)}},E.blur=function(e){A=!1,C?t.isObject(e)&&e.stopImmediatePropagation():(E.hidden=G(),me("ngBlur",{$event:e}))},E.focus=function(e){A=!0,X()&&te()&&le(),E.hidden=G(),me("ngFocus",{$event:e})},E.clear=function(e){e&&e.stopPropagation(),oe(),ie()},E.select=ne,E.listEnter=function(){C=!0},E.listLeave=U,E.focusInput=P,E.getCurrentDisplayValue=ee,E.registerSelectedItemWatcher=function(e){-1===T.indexOf(e)&&T.push(e)},E.unregisterSelectedItemWatcher=function(e){var t=T.indexOf(e);-1!==t&&T.splice(t,1)},E.notFoundVisible=se,E.loadingIsVisible=function(){return E.loading&&!J()},E.positionDropdown=O;var S,D=1,H=2;return a.initOptionalProperties(i,u,{searchText:"",selectedItem:null,clearButton:!1,disableVirtualRepeat:!1}),s(r),S=parseInt(i.delay,10)||0,u.$observe("disabled",(function(e){E.isDisabled=a.parseAttributeBoolean(e,!1)})),u.$observe("required",(function(e){E.isRequired=a.parseAttributeBoolean(e,!1)})),u.$observe("readonly",(function(e){E.isReadonly=a.parseAttributeBoolean(e,!1)})),i.$watch("searchText",S?a.debounce(j,S):j),i.$watch("selectedItem",(function(e,n){I(),e?V(e).then((function(t){i.searchText=t,function(e,t){T.forEach((function(n){n(e,t)}))}(e,n)})):n&&i.searchText&&V(n).then((function(e){t.isString(i.searchText)&&e.toString().toLowerCase()===i.searchText.toLowerCase()&&(i.searchText="")})),e!==n&&t.isFunction(i.itemChange)&&i.itemChange(W(i.selectedItem))})),t.element(l).on("resize",x),i.$on("$destroy",(function(){E.hidden||a.enableScrolling(),t.element(l).off("resize",x),M&&t.forEach(["ul","scroller","scrollContainer","input"],(function(e){M.$[e].remove()}))})),void a.nextTick((function(){var n;n=function(){var e,n;for(e=r;e.length&&(n=e.attr("md-autocomplete-snap"),!t.isDefined(n));e=e.parent());if(e.length)return{snap:e[0],wrap:"width"===n.toLowerCase()?e[0]:r.find("md-autocomplete-wrap")[0]};var o=r.find("md-autocomplete-wrap")[0];return{snap:o,wrap:o}}(),(M={main:r[0],scrollContainer:r[0].querySelector(".md-virtual-repeat-container, .md-standard-list-container"),scroller:r[0].querySelector(".md-virtual-repeat-scroller, .md-standard-list-scroller"),ul:r.find("ul")[0],input:r.find("input")[0],wrap:n.wrap,snap:n.snap,root:document.body}).li=M.ul.getElementsByTagName("li"),M.$=function(e){var n={};for(var o in e)e.hasOwnProperty(o)&&(n[o]=t.element(e[o]));return n}(M),N=M.scrollContainer.classList.contains("md-standard-list-container")?e:o,k=M.$.input.controller("ngModel"),M.$.root.length&&(s(M.$.scrollContainer),M.$.scrollContainer.detach(),M.$.root.append(M.$.scrollContainer),c.pin&&c.pin(M.$.scrollContainer,m)),r.on("touchstart",P),i.autofocus&&r.on("focus",P),i.inputAriaDescribedBy&&M.input.setAttribute("aria-describedby",i.inputAriaDescribedBy),i.floatingLabel||(i.inputAriaLabel?M.input.setAttribute("aria-label",i.inputAriaLabel):i.inputAriaLabelledBy?M.input.setAttribute("aria-labelledby",i.inputAriaLabelledBy):i.placeholder&&M.input.setAttribute("aria-label",i.placeholder))}));function I(){i.requireMatch&&k&&k.$setValidity("md-require-match",!!i.selectedItem||!i.searchText)}function O(){if(!M)return a.nextTick(O,!1,i);var e,t=48*(i.dropdownItems||5),n=M.wrap.getBoundingClientRect(),o=M.snap.getBoundingClientRect(),d=M.root.getBoundingClientRect(),s=o.bottom-d.top,l=d.bottom-o.top,c=n.left-d.left,m=n.width,p=function(){var e=0,t=r.find("md-input-container");if(t.length){var n=t.find("input");e=t.prop("offsetHeight"),e-=n.prop("offsetTop"),e-=n.prop("offsetHeight"),e+=t.prop("offsetTop")}return e}(),h=i.dropdownPosition,f=d.bottom-o.bottom-8+a.getViewportTop(),b=o.top-8;h||(h=f>t?"bottom":b>t||b>f?"top":"bottom"),u.mdFloatingLabel&&(c+=2,m-=4),e={left:c+"px",minWidth:m+"px",maxWidth:Math.max(n.right-d.left,d.right-n.left)-8+"px"},"top"===h?(e.top="auto",e.bottom=l+"px",e.maxHeight=Math.min(t,b)+"px"):(f=d.bottom-n.bottom-8+a.getViewportTop(),e.top=s-p+"px",e.bottom="auto",e.maxHeight=Math.min(t,f)+"px"),M.$.scrollContainer.css(e),a.nextTick((function(){var e=M.scrollContainer.getBoundingClientRect(),t={};e.right>d.right&&(t.left=n.right-e.width+"px"),M.$.scrollContainer.css(t)}),!1,i)}function P(){M.input.focus()}function L(){var e=M.scroller.querySelector(".selected");E.activeOption=e?e.id:null}function R(e){e.preventDefault()}function F(e){e.stopPropagation()}function B(e){E.hidden=!0,z(!0)}function U(){A||E.hidden||M.input.focus(),C=!1,E.hidden=G()}function j(e,n){E.index=Y(),e!==n&&(I(),V(i.selectedItem).then((function(o){e!==o&&(i.selectedItem=null,e!==n&&t.isFunction(i.textChange)&&i.textChange(),te()?le():(E.matches=[],K(!1),re(!0,D)))})))}function z(e){e&&(C=!1,A=!1),M.input.blur()}function q(){return t.isNumber(i.minLength)?i.minLength:1}function V(e){return p.when(function(e){return e&&i.itemText?i.itemText(W(e)):null}(e)||e).then((function(e){return e&&!t.isString(e)&&h.warn("md-autocomplete: Could not resolve display value to a string. Please check the `md-item-text` attribute."),e}))}function W(e){if(!e)return n;var t={};return E.itemName&&(t[E.itemName]=e),t}function Y(){return i.autoselect?0:-1}function K(e){E.loading!==e&&(E.loading=e),E.hidden=G()}function G(){return!(!E.isReadonly&&!!X()&&(te()&&Q()||se()))}function X(){return!(E.loading&&!Q()||J()||!A)}function Z(e){return t.isString(i.escapeOptions)?-1!==i.escapeOptions.toLowerCase().indexOf(e):-1!==E.defaultEscapeOptions.indexOf(e)}function Q(){return!!E.matches.length}function J(){return!!E.scope.selectedItem}function ee(){return V(E.matches[E.index])}function te(){return(i.searchText||"").length>=q()}function ne(e){a.nextTick((function(){V(E.matches[e]).then((function(e){var t=M.$.input.controller("ngModel");f.announce(e+" "+E.selectedMessage,"assertive"),t.$setViewValue(e),t.$render()})).finally((function(){i.selectedItem=E.matches[e],K(!1)}))}),!1)}function oe(){E.index=-1,a.nextTick(L),E.matches=[]}function ie(){K(!0),i.searchText="";var e=document.createEvent("CustomEvent");e.initCustomEvent("change",!0,!0,{value:""}),M.input.dispatchEvent(e),M.input.blur(),i.searchText="",M.input.focus()}function re(e,t){var n=e?"polite":"assertive",o=[];t&H&&-1!==E.index&&o.push(ee()),t&D&&o.push(p.resolve(function(){switch(E.matches.length){case 0:return E.noMatchMessage;case 1:return E.singleMatchMessage;default:return E.multipleMatchStartMessage+E.matches.length+E.multipleMatchEndMessage}}())),p.all(o).then((function(e){f.announce(e.join(" "),n)}))}function ae(){var t,n,o,i,r;M.li[0]&&(N===e?(t=M.li[Math.max(0,E.index)],n=M.scrollContainer.offsetHeight,i=(o=t&&t.offsetTop||0)+t.clientHeight,o<(r=M.scrollContainer.scrollTop)?de(o):i>r+n&&de(i-n)):function(){var e=M.li[0].offsetHeight,t=e*Math.max(0,E.index),n=t+e,o=M.scroller.clientHeight,i=M.scroller.scrollTop;ti+o&&de(n-o)}())}function de(t){N===e?M.scrollContainer.scrollTop=t:M.$.scrollContainer.controller("mdVirtualRepeatContainer").scrollTo(t)}function se(){var e=(E.scope.searchText||"").length;return E.hasNotFound&&!Q()&&(!E.loading||0!==w)&&e>=q()&&(A||C)&&!J()}function le(){var e=i.searchText||"",n=e.toLowerCase();!i.noCache&&y[n]?ce(y[n]):function(e){var n=i.$parent.$eval($),o=e.toLowerCase(),r=t.isArray(n),d=!!n.then;function s(t){y[o]=t,(e||"")===(i.searchText||"")&&ce(t)}r?s(n):d&&function(e){e&&(e=p.when(e),w++,K(!0),a.nextTick((function(){e.then(s).finally((function(){0==--w&&K(!1)}))}),!0,i))}(n)}(e),E.hidden=G()}function ce(e){var t,n,o;E.matches=e,E.hidden=G(),E.loading&&K(!1),i.selectOnMatch&&(t=i.searchText,o=(n=E.matches)[0],1===n.length&&V(o).then((function(e){var n=t===e;i.matchInsensitive&&!n&&(n=t.toLowerCase()===e.toLowerCase()),n&&ne(0)}))),O(),re(!0,D)}function me(e,t){u[e]&&i.$parent.$eval(u[e],t||{})}}}(),function(){function e(e){var n="virtual",o=["standard",n];function i(e){return e?(e=e.toLowerCase(),o.indexOf(e)>-1?e:n):n}return{controller:"MdAutocompleteCtrl",controllerAs:"$mdAutocompleteCtrl",scope:{inputName:"@mdInputName",inputMinlength:"@mdInputMinlength",inputMaxlength:"@mdInputMaxlength",searchText:"=?mdSearchText",selectedItem:"=?mdSelectedItem",itemsExpr:"@mdItems",itemText:"&mdItemText",placeholder:"@placeholder",inputAriaDescribedBy:"@?inputAriaDescribedby",inputAriaLabelledBy:"@?inputAriaLabelledby",inputAriaLabel:"@?inputAriaLabel",noCache:"=?mdNoCache",requireMatch:"=?mdRequireMatch",selectOnMatch:"=?mdSelectOnMatch",matchInsensitive:"=?mdMatchCaseInsensitive",itemChange:"&?mdSelectedItemChange",textChange:"&?mdSearchTextChange",minLength:"=?mdMinLength",delay:"=?mdDelay",autofocus:"=?mdAutofocus",floatingLabel:"@?mdFloatingLabel",autoselect:"=?mdAutoselect",menuClass:"@?mdMenuClass",menuContainerClass:"@?mdMenuContainerClass",inputClass:"@?mdInputClass",inputId:"@?mdInputId",escapeOptions:"@?mdEscapeOptions",dropdownItems:"=?mdDropdownItems",dropdownPosition:"@?mdDropdownPosition",clearButton:"=?mdClearButton",selectedMessage:"@?mdSelectedMessage",noMatchMessage:"@?mdNoMatchMessage",singleMatchMessage:"@?mdSingleMatchMessage",multipleMatchStartMessage:"@?mdMultipleMatchStartMessage",multipleMatchEndMessage:"@?mdMultipleMatchEndMessage",mdMode:"=?mdMode"},compile:function(e,n){var o=e.find("input");return["md-select-on-focus","md-no-asterisk","ng-trim","ng-pattern"].forEach((function(e){var t=n[n.$normalize(e)];null!==t&&o.attr(e,t)})),function(e,n,o,r){r.hasNotFound=!!n.attr("md-has-not-found"),t.isDefined(o.mdClearButton)||e.floatingLabel||(e.clearButton=!0),e.mdMode=i(o.mdMode),n.on("click touchstart touchend",(function(e){e.stopPropagation()}))}},template:function(t,o){var r,a,d,s,l=(a=(r=t.find("md-not-found").detach()).length?r.html():"")?'
  • '+a+"
  • ":"",c=function(){var e=t.find("md-item-template").detach(),n=e.length?e.html():t.html();return e.length||t.empty(),""+n+""}(),m=t.html(),u=o.tabindex;return l&&t.attr("md-has-not-found",!0),t.attr("tabindex","-1")," "+(o.mdFloatingLabel?'
    '+m+"
    ":' ')+' '+(d=o.mdMenuContainerClass,s=o.mdMode,d=d?" "+d:"",(p(s)?' ":""}(o.mdMode)+"
    ";function p(e){return i(e)!==n}}}}e.$inject=["$$mdSvgRegistry"],t.module("material.components.autocomplete").directive("mdAutocomplete",e)}(),function(){function e(e,t){return{restrict:"AE",compile:function(e,n,o){return function(e,n,i){var r,a,d=e.$mdAutocompleteCtrl,s=d.parent.$new(),l=d.itemName;function c(n,o){s[o]=e[n],e.$watch(n,(function(e){t.nextTick((function(){s[o]=e}))}))}c("$index","$index"),c("item",l),r=!1,a=!1,e.$watch((function(){a||r||(r=!0,e.$$postDigest((function(){a||s.$digest(),r=a=!1})))})),s.$watch((function(){a=!0})),o(s,(function(e){n.after(e)}))}},terminal:!0,transclude:"element"}}e.$inject=["$compile","$mdUtil"],t.module("material.components.autocomplete").directive("mdAutocompleteParentScope",e)}(),function(){function e(e,t,n,o){this.$scope=e,this.$element=t,this.$attrs=n,this.$mdUtil=o,this.regex=null}e.$inject=["$scope","$element","$attrs","$mdUtil"],t.module("material.components.autocomplete").controller("MdHighlightCtrl",e),e.prototype.init=function(e,t){this.flags=this.$attrs.mdHighlightFlags||"",this.unregisterFn=this.$scope.$watch(function(n){return{term:e(n),contentText:t(n)}}.bind(this),this.onRender.bind(this),!0),this.$element.on("$destroy",this.unregisterFn)},e.prototype.onRender=function(e,t){var n=e.contentText;null!==this.regex&&e.term===t.term||(this.regex=this.createRegex(e.term,this.flags)),e.term?this.applyRegex(n):this.$element.text(n)},e.prototype.applyRegex=function(e){var n=this.resolveTokens(e);this.$element.empty(),n.forEach(function(e){if(e.isMatch){var n=t.element('').text(e.text);this.$element.append(n)}else this.$element.append(document.createTextNode(e))}.bind(this))},e.prototype.resolveTokens=function(e){var t=[],n=0;return e.replace(this.regex,(function(e,i){o(n,i),t.push({text:e,isMatch:!0}),n=i+e.length})),o(n),t;function o(n,o){var i=e.slice(n,o);i&&t.push(i)}},e.prototype.createRegex=function(e,t){var n="",o="",i=this.$mdUtil.sanitize(e);return t.indexOf("^")>=0&&(n="^"),t.indexOf("$")>=0&&(o="$"),new RegExp(n+i+o,t.replace(/[$^]/g,""))}}(),function(){function e(e,t){return{terminal:!0,controller:"MdHighlightCtrl",compile:function(n,o){var i=t(o.mdHighlightText),r=e(n.html());return function(e,t,n,o){o.init(i,r)}}}}e.$inject=["$interpolate","$parse"],t.module("material.components.autocomplete").directive("mdHighlightText",e)}(),t.module("material.components.backdrop",["material.core"]).directive("mdBackdrop",["$mdTheming","$mdUtil","$animate","$rootElement","$window","$log","$$rAF","$document",function(e,n,o,i,r,a,d,s){return{restrict:"E",link:function(l,c,m){var u;function p(){var e=parseInt(u.height,10)+Math.abs(parseInt(u.top,10));c.css("height",e+"px")}o.pin&&o.pin(c,i),d((function(){if("fixed"===(u=r.getComputedStyle(s[0].body)).position){var o=n.debounce((function(){u=r.getComputedStyle(s[0].body),p()}),60,null,!1);p(),t.element(r).on("resize",o),l.$on("$destroy",(function(){t.element(r).off("resize",o)}))}var i=c.parent();i.length&&("BODY"===i[0].nodeName&&c.css("position","fixed"),"static"===r.getComputedStyle(i[0]).position&&a.warn(" may not work properly in a scrolled, static-positioned parent container."),e.inherit(c,i))}))}}}]),function(){function e(e){return{restrict:"E",link:function(t,n){n.addClass("_md"),t.$on("$destroy",(function(){e.destroy()}))}}}function n(e){return n.$inject=["$animate","$mdConstant","$mdUtil","$mdTheming","$mdBottomSheet","$rootElement","$mdGesture","$log"],e("$mdBottomSheet").setDefaults({methods:["disableParentScroll","escapeToClose","clickOutsideToClose"],options:n});function n(e,n,o,i,r,a,d,s){var l;return{themable:!0,onShow:function(c,m,u){return(m=o.extractElementByName(m,"md-bottom-sheet")).attr("tabindex","-1"),m.hasClass("ng-cloak")&&s.warn("$mdBottomSheet: using `` will affect the bottom-sheet opening animations.",m[0]),u.isLockedOpen?(u.clickOutsideToClose=!1,u.escapeToClose=!1):u.cleanupGestures=function(e,t){var i=d.register(t,"drag",{horizontal:!1});return t.on("$md.dragstart",a).on("$md.drag",s).on("$md.dragend",l),function(){i(),t.off("$md.dragstart",a),t.off("$md.drag",s),t.off("$md.dragend",l)};function a(){e.css(n.CSS.TRANSITION_DURATION,"0ms")}function s(t){var o=t.pointer.distanceY;o<5&&(o=Math.max(-80,o/2)),e.css(n.CSS.TRANSFORM,"translate3d(0,"+(80+o)+"px,0)")}function l(t){if(t.pointer.distanceY>0&&(t.pointer.distanceY>20||Math.abs(t.pointer.velocityY)>.5)){var i=e.prop("offsetHeight")-t.pointer.distanceY,a=Math.min(i/t.pointer.velocityY*.75,500);e.css(n.CSS.TRANSITION_DURATION,a+"ms"),o.nextTick(r.cancel,!0)}else e.css(n.CSS.TRANSITION_DURATION,""),e.css(n.CSS.TRANSFORM,"")}}(m,u.parent),u.disableBackdrop||((l=o.createBackdrop(c,"md-bottom-sheet-backdrop md-opaque"))[0].tabIndex=-1,u.clickOutsideToClose&&l.on("click",(function(){o.nextTick(r.cancel,!0)})),i.inherit(l,u.parent),e.enter(l,u.parent,null)),i.inherit(m,u.parent),u.disableParentScroll&&(u.restoreScroll=o.disableScrollAround(m,u.parent)),e.enter(m,u.parent,l).then((function(){var e=o.findFocusTarget(m)||t.element(m[0].querySelector("button")||m[0].querySelector("a")||m[0].querySelector(o.prefixer("ng-click",!0)))||l;u.escapeToClose&&(u.rootElementKeyupCallback=function(e){e.keyCode===n.KEY_CODE.ESCAPE&&o.nextTick(r.cancel,!0)},a.on("keyup",u.rootElementKeyupCallback),e&&e.focus())}))},onRemove:function(t,n,o){return o.disableBackdrop||e.leave(l),e.leave(n).then((function(){o.disableParentScroll&&(o.restoreScroll(),delete o.restoreScroll),o.cleanupGestures&&o.cleanupGestures()}))},disableBackdrop:!1,escapeToClose:!0,clickOutsideToClose:!0,disableParentScroll:!0,isLockedOpen:!1}}}e.$inject=["$mdBottomSheet"],n.$inject=["$$interimElementProvider"],t.module("material.components.bottomSheet",["material.core","material.components.backdrop"]).directive("mdBottomSheet",e).provider("$mdBottomSheet",n)}(),function(){function e(e){return{restrict:"E",link:function(t,n){e(n)}}}function n(e,n,o,i){return{restrict:"EA",replace:!0,transclude:!0,template:function(e,t){return r(t)?'':''},link:function(a,d,s){n(d),e.attach(a,d),o.expectWithoutText(d,"aria-label"),r(s)&&t.isDefined(s.ngDisabled)&&!d.hasClass("_md-nav-button")&&a.$watch(s.ngDisabled,(function(e){d.attr("tabindex",e?-1:0)})),d.on("click",(function(e){!0===s.disabled&&(e.preventDefault(),e.stopImmediatePropagation())})),d.hasClass("md-no-focus")||(d.on("focus",(function(){i.isUserInvoked()&&"keyboard"!==i.getLastInteractionType()||d.addClass("md-focused")})),d.on("blur",(function(){d.removeClass("md-focused")})))}};function r(e){return t.isDefined(e.href)||t.isDefined(e.ngHref)||t.isDefined(e.ngLink)||t.isDefined(e.uiSref)}}n.$inject=["$mdButtonInkRipple","$mdTheming","$mdAria","$mdInteraction"],e.$inject=["$mdTheming"],t.module("material.components.button",["material.core"]).directive("mdButton",n).directive("a",e)}(),function(){function e(e){return{restrict:"E",link:function(t,n,o){n.addClass("_md"),e(n)}}}e.$inject=["$mdTheming"],t.module("material.components.card",["material.core"]).directive("mdCard",e)}(),function(){function e(e,n,o,i,r,a){return e=e[0],{restrict:"E",transclude:!0,require:["^?mdInputContainer","?ngModel","?^form"],priority:o.BEFORE_NG_ARIA,template:'
    ',compile:function(d,s){return s.$set("tabindex",s.tabindex||"0"),s.$set("type","checkbox"),s.$set("role",s.type),d.addClass("md-auto-horizontal-margin"),{pre:function(e,t){t.on("click",(function(e){this.hasAttribute("disabled")&&e.stopImmediatePropagation()}))},post:function(d,s,l,c){var m,u,p,h,f=c[0],b=c[1]||r.fakeNgModel(),g=c[2],E=s.find("a").length>0;if(E){var v="label-"+r.nextUid();l.$set("aria-labelledby",v);var $=s.children()[1];t.element($).remove(),$.removeAttribute("ng-transclude"),$.className="md-checkbox-link-label",$.setAttribute("id",v),s.after($),s.next().on("click",y)}if(f){var M=f.isErrorGetter||function(){return b.$invalid&&(b.$touched||g&&g.$submitted)};f.input=s,d.$watch(M,f.setInvalid)}function y(e){s[0].hasAttribute("disabled")||d.skipToggle||"A"===e.target.tagName||d.$apply((function(){var t=l.ngChecked&&l.ngClick?l.checked:!b.$viewValue;b.$setViewValue(t,e&&e.type),b.$render()}))}function C(e){(m=!1!==e)&&s.attr("aria-checked","mixed"),s.toggleClass("md-indeterminate",m),b.$render()}i(s),s.children().on("focus",(function(){s.focus()})),r.parseAttributeBoolean(l.mdIndeterminate)&&(C(),d.$watch(l.mdIndeterminate,C)),l.ngChecked&&d.$watch(d.$eval.bind(d,l.ngChecked),(function(e){b.$setViewValue(e),b.$render()})),u="ngDisabled",p="tabindex",h={true:"-1",false:l.tabindex},l[u]&&d.$watch(l[u],(function(e){h[e]&&s.attr(p,h[e])})),E||n.expectWithText(s,"aria-label"),e.link.pre(d,{on:t.noop,0:{}},l,[b]),s.on("click",y).on("keypress",(function(e){var t,n,i=e.which||e.keyCode;switch(e.preventDefault(),i){case o.KEY_CODE.SPACE:s.addClass("md-focused"),y(e);break;case o.KEY_CODE.ENTER:(n=r.getClosest(e.target,"form"))&&(t=n.querySelector('button[type="submit"]:enabled, input[type="submit"]:enabled'))&&t.click()}})).on("focus",(function(){"keyboard"===a.getLastInteractionType()&&s.addClass("md-focused")})).on("blur",(function(){s.removeClass("md-focused")})),b.$render=function(){var e=!!b.$viewValue&&!m;s.toggleClass("md-checked",e),m||(e?s.attr("aria-checked","true"):s.attr("aria-checked","false"))}}}}}}e.$inject=["inputDirective","$mdAria","$mdConstant","$mdTheming","$mdUtil","$mdInteraction"],t.module("material.components.checkbox",["material.core"]).directive("mdCheckbox",e)}(),t.module("material.components.chips",["material.core","material.components.autocomplete"]),function(){function o(e,t,o,i,r){this.$scope=e,this.$element=t,this.$mdConstant=o,this.$timeout=i,this.$mdUtil=r,this.isEditing=!1,this.parentController=n,this.enableChipEdit=!1}o.$inject=["$scope","$element","$mdConstant","$timeout","$mdUtil"],t.module("material.components.chips").controller("MdChipCtrl",o),o.prototype.init=function(e){this.parentController=e,this.enableChipEdit=this.parentController.enableChipEdit,this.enableChipEdit&&(this.$element.on("keydown",this.chipKeyDown.bind(this)),this.$element.on("dblclick",this.chipMouseDoubleClick.bind(this)),this.getChipContent().addClass("_md-chip-content-edit-is-enabled"))},o.prototype.getChipContent=function(){var e=this.$element[0].getElementsByClassName("md-chip-content");return t.element(e[0])},o.prototype.getContentElement=function(){var e=t.element(this.getChipContent().children()[0]);return e&&0!==e.length||(e=t.element(this.getChipContent().contents()[0])),e},o.prototype.getChipIndex=function(){return parseInt(this.$element.attr("index"))},o.prototype.goOutOfEditMode=function(){if(this.isEditing){this.isEditing=!1,this.$element.removeClass("_md-chip-editing"),this.getChipContent()[0].contentEditable="false";var e=this.getChipIndex(),t=this.getContentElement().text();t?(this.parentController.updateChipContents(e,t),this.$mdUtil.nextTick(function(){this.parentController.selectedChip===e&&this.parentController.focusChip(e)}.bind(this))):this.parentController.removeChipAndFocusInput(e)}},o.prototype.selectNodeContents=function(t){var n,o;document.body.createTextRange?((n=document.body.createTextRange()).moveToElementText(t),n.select()):e.getSelection&&(o=e.getSelection(),(n=document.createRange()).selectNodeContents(t),o.removeAllRanges(),o.addRange(n))},o.prototype.goInEditMode=function(){this.isEditing=!0,this.$element.addClass("_md-chip-editing"),this.getChipContent()[0].contentEditable="true",this.getChipContent().on("blur",function(){this.goOutOfEditMode()}.bind(this)),this.selectNodeContents(this.getChipContent()[0])},o.prototype.chipKeyDown=function(e){this.isEditing||e.keyCode!==this.$mdConstant.KEY_CODE.ENTER&&e.keyCode!==this.$mdConstant.KEY_CODE.SPACE?this.isEditing&&e.keyCode===this.$mdConstant.KEY_CODE.ENTER&&(e.preventDefault(),this.goOutOfEditMode()):(e.preventDefault(),this.goInEditMode())},o.prototype.chipMouseDoubleClick=function(){this.enableChipEdit&&!this.isEditing&&this.goInEditMode()}}(),function(){function e(e,n,o,i){return{restrict:"E",require:["^?mdChips","mdChip"],link:function(n,o,r,a){var d=a.shift(),s=a.shift(),l=t.element(o[0].querySelector(".md-chip-content"));e(o),d&&(s.init(d),l.on("blur",(function(){d.resetSelectedChip(),d.$scope.$applyAsync()}))),i((function(){d&&d.shouldFocusLastChip&&d.focusLastChipThenInput()}))},controller:"MdChipCtrl"}}e.$inject=["$mdTheming","$mdUtil","$compile","$timeout"],t.module("material.components.chips").directive("mdChip",e)}(),function(){function e(e){return{restrict:"A",require:"^mdChips",scope:!1,link:function(t,n,o,i){n.on("click",(function(){t.$apply((function(){i.removeChip(t.$$replacedScope.$index)}))})),e((function(){n.attr({tabindex:"-1","aria-hidden":"true"}),n.find("button").attr("tabindex","-1")}))}}}e.$inject=["$timeout"],t.module("material.components.chips").directive("mdChipRemove",e)}(),function(){function e(e){return{restrict:"EA",terminal:!0,link:function(t,n,o){var i=t.$parent.$mdChipsCtrl,r=i.parent.$new(!1,i.parent);r.$$replacedScope=t,r.$chip=t.$chip,r.$index=t.$index,r.$mdChipsCtrl=i;var a=i.$scope.$eval(o.mdChipTransclude);n.html(a),e(n.contents())(r)},scope:!1}}e.$inject=["$compile"],t.module("material.components.chips").directive("mdChipTransclude",e)}(),function(){function e(e,t,n,o,i,r,a,d,s){this.$timeout=r,this.$mdConstant=n,this.$scope=e,this.parent=e.$parent,this.$mdUtil=a,this.$log=o,this.$mdLiveAnnouncer=d,this.$exceptionHandler=s,this.$element=i,this.$attrs=t,this.ngModelCtrl=null,this.userInputNgModelCtrl=null,this.autocompleteCtrl=null,this.userInputElement=null,this.items=[],this.selectedChip=-1,this.enableChipEdit=a.parseAttributeBoolean(t.mdEnableChipEdit),this.addOnBlur=a.parseAttributeBoolean(t.mdAddOnBlur),this.inputClass="",this.inputAriaLabel="Chips input.",this.containerHint="Chips container. Use arrow keys to select chips.",this.containerEmptyHint="Chips container. Enter the text area, then type text, and press enter to add a chip.",this.deleteHint="Press delete to remove this chip.",this.deleteButtonLabel="Remove",this.chipBuffer="",this.useTransformChip=!1,this.useOnAdd=!1,this.useOnRemove=!1,this.wrapperId="",this.contentIds=[],this.ariaTabIndex=null,this.chipAppendDelay=300,this.deRegister=[],this.addedMessage="added",this.removedMessage="removed",this.init()}e.$inject=["$scope","$attrs","$mdConstant","$log","$element","$timeout","$mdUtil","$mdLiveAnnouncer","$exceptionHandler"],t.module("material.components.chips").controller("MdChipsCtrl",e),e.prototype.init=function(){var e=this;this.wrapperId="_md-chips-wrapper-"+this.$mdUtil.nextUid(),this.$element.attr("ng-model")||this.setupStaticChips(),this.deRegister.push(this.$scope.$watchCollection("$mdChipsCtrl.items",(function(){e.setupInputAria(),e.setupWrapperAria()}))),this.deRegister.push(this.$attrs.$observe("mdChipAppendDelay",(function(t){e.chipAppendDelay=parseInt(t)||300})))},e.prototype.$onDestroy=function(){for(var e;e=this.deRegister.pop();)e.call(this)},e.prototype.setupInputAria=function(){var e=this.$element.find("input");e&&(e.attr("role","textbox"),e.attr("aria-multiline",!0),this.inputAriaDescribedBy&&e.attr("aria-describedby",this.inputAriaDescribedBy),this.inputAriaLabelledBy?(e.attr("aria-labelledby",this.inputAriaLabelledBy),e.removeAttr("aria-label")):e.attr("aria-label",this.inputAriaLabel))},e.prototype.setupWrapperAria=function(){var e=this,t=this.$element.find("md-chips-wrap");this.items&&this.items.length?(t.attr("role","listbox"),this.contentIds=this.items.map((function(){return e.wrapperId+"-chip-"+e.$mdUtil.nextUid()})),t.attr("aria-owns",this.contentIds.join(" ")),t.attr("aria-label",this.containerHint)):(t.removeAttr("role"),t.removeAttr("aria-owns"),t.attr("aria-label",this.containerEmptyHint))},e.prototype.setupStaticChips=function(){var e,t,n=this,o=this.$element.find("md-chips-wrap");this.$timeout((function(){for(o.attr("role","list"),t=o[0].children,e=0;e=0&&e0&&this.items.length>=this.maxChips},e.prototype.validateModel=function(){this.ngModelCtrl.$setValidity("md-max-chips",!this.hasMaxChipsReached()),this.ngModelCtrl.$validate()},e.prototype.updateNgModel=function(e){e||this.validateModel(),t.forEach(this.ngModelCtrl.$viewChangeListeners,(function(e){try{e()}catch(e){this.$exceptionHandler(e)}}))},e.prototype.removeChip=function(e,n){var o=this.items.splice(e,1);this.updateNgModel(),this.ngModelCtrl.$setDirty();var i=t.isObject(o[0])?"":o[0];this.$mdLiveAnnouncer.announce(i+" "+this.removedMessage,"assertive"),o&&o.length&&this.useOnRemove&&this.onRemove&&this.onRemove({$chip:o[0],$index:e,$event:n})},e.prototype.removeChipAndFocusInput=function(e,t){this.removeChip(e,t),this.autocompleteCtrl?(this.autocompleteCtrl.hidden=!0,this.$mdUtil.nextTick(this.onFocus.bind(this))):this.onFocus()},e.prototype.selectAndFocusChipSafe=function(e){if(!this.items.length||-1===e)return this.focusInput();if(e>=this.items.length){if(!this.readonly)return this.onFocus();e=0}e=Math.max(e,0),e=Math.min(e,this.items.length-1),this.selectChip(e),this.focusChip(e)},e.prototype.focusLastChipThenInput=function(){var e=this;e.shouldFocusLastChip=!1,e.focusChip(this.items.length-1),e.$timeout((function(){e.focusInput()}),e.chipAppendDelay)},e.prototype.focusInput=function(){this.selectChip(-1),this.onFocus()},e.prototype.selectChip=function(e){e>=-1&&e<=this.items.length?(this.selectedChip=e,this.useOnSelect&&this.onSelect&&this.onSelect({$chip:this.items[e]})):this.$log.warn("Selected Chip index out of bounds; ignoring.")},e.prototype.focusChip=function(e){var t=this.$element[0].querySelector('md-chip[index="'+e+'"] .md-chip-content');this.ariaTabIndex=e,t.focus()},e.prototype.configureNgModel=function(e){this.ngModelCtrl=e;var t=this;e.$isEmpty=function(e){return!e||0===e.length},e.$render=function(){t.items=t.ngModelCtrl.$viewValue}},e.prototype.onFocus=function(){var e=this.$element[0].querySelector("input");e&&e.focus(),this.resetSelectedChip()},e.prototype.onInputFocus=function(){this.inputHasFocus=!0,this.setupInputAria(),this.resetSelectedChip()},e.prototype.onInputBlur=function(){this.inputHasFocus=!1,this.shouldAddOnBlur()&&(this.appendChip(this.getChipBuffer().trim()),this.resetChipBuffer())},e.prototype.configureInput=function(e){var t=e.controller("ngModel"),n=this;t&&(this.deRegister.push(this.$scope.$watch((function(){return t.$touched}),(function(e){e&&n.ngModelCtrl.$setTouched()}))),this.deRegister.push(this.$scope.$watch((function(){return t.$dirty}),(function(e){e&&n.ngModelCtrl.$setDirty()}))))},e.prototype.configureUserInput=function(e){this.userInputElement=e;var n=e.controller("ngModel");n!==this.ngModelCtrl&&(this.userInputNgModelCtrl=n);var o=this.$scope,i=this,r=function(e,n){o.$evalAsync(t.bind(i,n,e))};e.attr({tabindex:0}).on("keydown",(function(e){r(e,i.inputKeydown)})).on("focus",(function(e){r(e,i.onInputFocus)})).on("blur",(function(e){r(e,i.onInputBlur)}))},e.prototype.configureAutocomplete=function(e){e&&(this.autocompleteCtrl=e,this.$element.attr("container-empty-hint")||(this.containerEmptyHint="Chips container with autocompletion. Enter the text area, type text to search, and then use the up and down arrow keys to select an option. Press enter to add the selected option as a chip.",this.setupWrapperAria()),e.registerSelectedItemWatcher(t.bind(this,(function(e){if(e){if(this.hasMaxChipsReached())return;this.appendChip(e),this.resetChipBuffer()}}))),this.$element.find("input").on("focus",t.bind(this,this.onInputFocus)).on("blur",t.bind(this,this.onInputBlur)))},e.prototype.shouldAddOnBlur=function(){this.validateModel();var e=this.getChipBuffer().trim(),t=this.ngModelCtrl.$isEmpty(this.ngModelCtrl.$modelValue)||this.ngModelCtrl.$valid,n=this.autocompleteCtrl&&!this.autocompleteCtrl.hidden;return this.userInputNgModelCtrl&&(t=t&&this.userInputNgModelCtrl.$valid),this.addOnBlur&&!this.requireMatch&&e&&t&&!n},e.prototype.hasFocus=function(){return this.inputHasFocus||this.selectedChip>=0},e.prototype.contentIdFor=function(e){return this.contentIds[e]}}(),function(){function e(e,t,n,o,i,r){var a={chips:t.processTemplate('
    '),input:t.processTemplate(' '),default:t.processTemplate(" {{$chip}}"),remove:t.processTemplate(' ')};return{template:function(e,t){return t.$mdUserTemplate=e.clone(),a.chips},require:["mdChips"],restrict:"E",controller:"MdChipsCtrl",controllerAs:"$mdChipsCtrl",bindToController:!0,compile:function(d,s){var l=s.$mdUserTemplate;s.$mdUserTemplate=null;var c=f("md-chips>md-chip-template"),m=f(t.prefixer().buildList("md-chip-remove").map((function(e){return"md-chips>*["+e+"]"})).join(","))||a.remove,u=c||a.default,p=f("md-chips>md-autocomplete")||f("md-chips>input")||a.input,h=l.find("md-chip");function f(e){if(s.ngModel){var t=l[0].querySelector(e);return t&&t.outerHTML}}return l[0].querySelector("md-chip-template>*[md-chip-remove]")&&o.warn("invalid placement of md-chip-remove within md-chip-template."),function(o,d,l,f){t.initOptionalProperties(o,s),e(d);var b=f[0];if(c&&(b.enableChipEdit=!1),b.chipContentsTemplate=u,b.chipRemoveTemplate=m,b.chipInputTemplate=p,b.mdCloseIcon=r.mdCancel,d.attr({tabindex:-1}).on("focus",(function(){b.onFocus()})).on("click",(function(){b.readonly||-1!==b.selectedChip||b.onFocus()})),s.ngModel&&(b.configureNgModel(d.controller("ngModel")),l.mdTransformChip&&b.useTransformChipExpression(),l.mdOnAdd&&b.useOnAddExpression(),l.mdOnRemove&&b.useOnRemoveExpression(),l.mdOnSelect&&b.useOnSelectExpression(),p!==a.input&&o.$watch("$mdChipsCtrl.readonly",(function(e){e||t.nextTick((function(){if(0===p.indexOf("0){var g=n(h.clone())(o.$parent);i((function(){d.find("md-chips-wrap").prepend(g)}))}}},scope:{readonly:"=?readonly",removable:"=?mdRemovable",placeholder:"@?",secondaryPlaceholder:"@?",maxChips:"@?mdMaxChips",transformChip:"&mdTransformChip",onAdd:"&?mdOnAdd",onRemove:"&?mdOnRemove",addedMessage:"@?mdAddedMessage",removedMessage:"@?mdRemovedMessage",onSelect:"&?mdOnSelect",inputClass:"@?mdInputClass",inputAriaDescribedBy:"@?inputAriaDescribedby",inputAriaLabelledBy:"@?inputAriaLabelledby",inputAriaLabel:"@?",containerHint:"@?",containerEmptyHint:"@?",deleteHint:"@?",deleteButtonLabel:"@?",separatorKeys:"=?mdSeparatorKeys",requireMatch:"=?mdRequireMatch",chipAppendDelayString:"@?mdChipAppendDelay",ngChange:"&?"}}}e.$inject=["$mdTheming","$mdUtil","$compile","$log","$timeout","$$mdSvgRegistry"],t.module("material.components.chips").directive("mdChips",e)}(),function(){function e(e,t,n){this.$element=t,this.$attrs=e,this.$timeout=n,this.selectedItem=null,this.searchText="",this.deRegister=[],this.init()}e.$inject=["$attrs","$element","$timeout"],t.module("material.components.chips").controller("MdContactChipsCtrl",e),e.prototype.init=function(){var e=this,t=this.deRegister,n=this.$element;this.$timeout((function(){t.push(n.find("md-chips").controller("mdChips").$scope.$watchCollection("$mdChipsCtrl.items",(function(){e.setupChipsAria(),e.setupAutocompleteAria()})))}))},e.prototype.setupChipsAria=function(){var e=this.$element.find("md-chips"),t=e.controller("mdChips");this.removedMessage&&(t.removedMessage=this.removedMessage),this.containerHint&&(t.containerHint=this.containerHint),this.containerEmptyHint&&(e.attr("container-empty-hint",this.containerEmptyHint),t.containerEmptyHint=this.containerEmptyHint),this.deleteHint&&(t.deleteHint=this.deleteHint),this.inputAriaLabel&&(t.inputAriaLabel=this.inputAriaLabel),this.inputClass&&(t.inputClass=this.inputClass)},e.prototype.setupAutocompleteAria=function(){var e=this.$element.find("md-chips-wrap").find("md-autocomplete").find("input");this.inputAriaDescribedBy&&e.attr("aria-describedby",this.inputAriaDescribedBy),this.inputAriaLabelledBy&&(e.removeAttr("aria-label"),e.attr("aria-labelledby",this.inputAriaLabelledBy))},e.prototype.queryContact=function(e){return this.contactQuery({$query:e})},e.prototype.inputKeydown=function(e){if(this.separatorKeys&&!(this.separatorKeys.indexOf(e.keyCode)<0)){e.stopPropagation(),e.preventDefault();var n=t.element(e.target).controller("mdAutocomplete");n.select(n.index)}},e.prototype.itemName=function(e){return e[this.contactName]},e.prototype.$onDestroy=function(){for(var e;e=this.deRegister.pop();)e.call(this)}}(),function(){function e(e,t){return{template:function(e,t){return'
    {{item[$mdContactChipsCtrl.contactName]}} {{item[$mdContactChipsCtrl.contactName]}} {{item[$mdContactChipsCtrl.contactEmail]}}
    {{$chip[$mdContactChipsCtrl.contactName]}}
    {{$chip[$mdContactChipsCtrl.contactName]}}
    '},restrict:"E",controller:"MdContactChipsCtrl",controllerAs:"$mdContactChipsCtrl",bindToController:!0,compile:function(n,o){return function(n,i,r,a){var d=a;t.initOptionalProperties(n,o),e(i),i.attr("tabindex","-1"),r.$observe("mdChipAppendDelay",(function(e){d.chipAppendDelay=e}))}},scope:{contactQuery:"&mdContacts",placeholder:"@?",secondaryPlaceholder:"@?",contactName:"@mdContactName",contactImage:"@mdContactImage",contactEmail:"@mdContactEmail",contacts:"=ngModel",ngChange:"&?",requireMatch:"=?mdRequireMatch",minLength:"=?mdMinLength",maxChips:"=?mdMaxChips",highlightFlags:"@?mdHighlightFlags",chipAppendDelay:"@?mdChipAppendDelay",separatorKeys:"=?mdSeparatorKeys",removedMessage:"@?mdRemovedMessage",inputClass:"@?mdInputClass",inputAriaDescribedBy:"@?inputAriaDescribedby",inputAriaLabelledBy:"@?inputAriaLabelledby",inputAriaLabel:"@?",containerHint:"@?",containerEmptyHint:"@?",deleteHint:"@?"}}}e.$inject=["$mdTheming","$mdUtil"],t.module("material.components.chips").directive("mdContactChips",e)}(),function(){i.$inject=["$mdColors","$mdUtil","$log","$parse"],o.$inject=["$mdTheming","$mdUtil","$log"];var e=/^{((\s|,)*?["'a-zA-Z-]+?\s*?:\s*?(['"])[a-zA-Z0-9-.]*(['"]))+\s*}$/,n=null;function o(e,o,i){return n=n||Object.keys(e.PALETTES),{applyThemeColors:function(e,n){try{n&&e.css((d={},s=(o=n).hasOwnProperty("color"),t.forEach(o,(function(e,t){var n=a(e),o=t.indexOf("background")>-1;d[t]=r(n),o&&!s&&(d.color=r(n,!0))})),d))}catch(e){i.error(e.message)}var o,d,s},getThemeColor:function(e){return r(a(e))},hasTheme:function(n){return t.isDefined(e.THEMES[n.split("-")[0]])}};function r(t,n){n=n||!1;var i=e.PALETTES[t.palette][t.hue];return i=n?i.contrast:i.value,o.supplant("rgba({0}, {1}, {2}, {3})",[i[0],i[1],i[2],i[3]||t.opacity])}function a(n){var o=n.split("-"),i=t.isDefined(e.THEMES[o[0]])?o.splice(0,1)[0]:e.defaultTheme();return{theme:i,palette:d(o,i),hue:s(o,i),opacity:o[2]||1}}function d(t,i){var r=t.length>1&&-1!==n.indexOf(t[1]),a=t[0].replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();if(r&&(a=t[0]+"-"+t.splice(1,1)),-1===n.indexOf(a)){var d=e.THEMES[i].colors[a];if(!d)throw new Error(o.supplant("mdColors: couldn't find '{palette}' in the palettes.",{palette:a}));a=d.name}return a}function s(t,n){var i=e.THEMES[n].colors;if("hue"===t[1]){var r=parseInt(t.splice(2,1)[0],10);if(r<1||r>3)throw new Error(o.supplant("mdColors: 'hue-{hueNumber}' is not a valid hue, can be only 'hue-1', 'hue-2' and 'hue-3'",{hueNumber:r}));if(t[1]="hue-"+r,!(t[0]in i))throw new Error(o.supplant("mdColors: 'hue-x' can only be used with [{availableThemes}], but was used with '{usedTheme}'",{availableThemes:Object.keys(i).join(", "),usedTheme:t[0]}));return i[t[0]].hues[t[1]]}return t[1]||i[t[0]in i?t[0]:"primary"].hues.default}}function i(n,o,i,r){return{restrict:"A",require:["^?mdTheme"],compile:function(a,d){var s=function(){var n=d.mdColors,i=n.indexOf("::")>-1,r=!!i||e.test(d.mdColors);d.mdColors=n.replace("::","");var a=t.isDefined(d.mdColorsWatch);return!i&&!r&&(!a||o.parseAttributeBoolean(d.mdColorsWatch))}();return function(e,o,a,d){var l=d[0],c={},m=function(t){"string"!=typeof t&&(t=""),a.mdColors||(a.mdColors="{}");var o=r(a.mdColors)(e);return l&&Object.keys(o).forEach((function(e){var i=o[e];n.hasTheme(i)||(o[e]=(t||l.$mdTheme)+"-"+i)})),u(o),o},u=function(e){if(!t.equals(e,c)){var n=Object.keys(c);c.background&&!n.color&&n.push("color"),n.forEach((function(e){o.css(e,"")}))}c=e},p=t.noop;l&&(p=l.registerChanges((function(e){n.applyThemeColors(o,m(e))}))),e.$on("$destroy",(function(){p()}));try{s?e.$watch(m,t.bind(this,n.applyThemeColors,o),!0):n.applyThemeColors(o,m())}catch(e){i.error(e.message)}}}}}t.module("material.components.colors",["material.core"]).directive("mdColors",i).service("$mdColors",o)}(),function(){function e(e){return{restrict:"E",controller:["$scope","$element",function(e,t){this.$scope=e,this.$element=t}],link:function(n,o){var i;o.addClass("_md"),e(o),n.$broadcast("$mdContentLoaded",o),i=o[0],t.element(i).on("$md.pressdown",(function(e){"t"===e.pointer.type&&(e.$materialScrollFixed||(e.$materialScrollFixed=!0,0===i.scrollTop?i.scrollTop=1:i.scrollHeight===i.scrollTop+i.offsetHeight&&(i.scrollTop-=1)))}))}}}e.$inject=["$mdTheming"],t.module("material.components.content",["material.core"]).directive("mdContent",e)}(),t.module("material.components.datepicker",["material.core","material.components.icon","material.components.virtualRepeat"]),function(){function e(e){return{template:function(e,t){return'
    '},scope:{minDate:"=mdMinDate",maxDate:"=mdMaxDate",dateFilter:"=mdDateFilter",monthFilter:"=mdMonthFilter",_mode:"@mdMode",_currentView:"@mdCurrentView"},require:["ngModel","mdCalendar"],controller:r,controllerAs:"calendarCtrl",bindToController:!0,link:function(t,n,o,i){var r=i[0];i[1].configureNgModel(r,e)}}}r.$inject=["$element","$scope","$$mdDateUtil","$mdUtil","$mdConstant","$mdTheming","$$rAF","$attrs","$mdDateLocale","$filter","$document"],e.$inject=["inputDirective"],t.module("material.components.datepicker").directive("mdCalendar",e);var o=0,i={day:"month",month:"year"};function r(e,i,r,a,d,s,l,c,m,u,p){s(e),this.$element=e,this.$scope=i,this.$attrs=c,this.dateUtil=r,this.$mdUtil=a,this.keyCode=d.KEY_CODE,this.$$rAF=l,this.$mdDateLocale=m,this.ngDateFilter=u("date"),this.today=this.dateUtil.createDateAtMidnight(),this.ngModelCtrl=n,this.SELECTED_DATE_CLASS="md-calendar-selected-date",this.TODAY_CLASS="md-calendar-date-today",this.FOCUSED_DATE_CLASS="md-focus",this.id=o++,this.displayDate=null,this.mode=null,this.selectedDate=null,this.firstRenderableDate=null,this.lastRenderableDate=null,this.isInitialized=!1,this.width=0,this.scrollbarWidth=0,this.standaloneMode=!1,c.tabindex||e.attr("tabindex","-1");var h,f=t.bind(this,this.handleKeyEvent);e.parent().hasClass("md-datepicker-calendar")?h=t.element(p[0].body):(this.standaloneMode=!0,h=e),h.on("keydown",f),i.$on("$destroy",(function(){h.off("keydown",f)})),1===t.version.major&&t.version.minor<=4&&this.$onInit()}r.prototype.$onInit=function(){this._mode&&i.hasOwnProperty(this._mode)?(this.currentView=i[this._mode],this.mode=this._mode):(this.currentView=this._currentView||"month",this.mode=null),this.minDate&&this.minDate>this.$mdDateLocale.firstRenderableDate?this.firstRenderableDate=this.minDate:this.firstRenderableDate=this.$mdDateLocale.firstRenderableDate,this.maxDate&&this.maxDate0?i():t.$$rAF((function(){var o=e.calendarScroller;t.scrollbarWidth=o.offsetWidth-o.clientWidth,t.width=n.querySelector("table").offsetWidth,i()}))},r.prototype.getDateId=function(e,t){if(!t)throw new Error("A namespace for the date id has to be specified.");return["md",this.id,t,e.getFullYear(),e.getMonth(),e.getDate()].join("-")},r.prototype.updateVirtualRepeat=function(){var e=this.$scope,t=e.$on("$md-resize-enable",(function(){e.$$phase||e.$apply(),t()}))}}(),function(){e.$inject=["$element","$scope","$animate","$q","$$mdDateUtil","$mdDateLocale"],t.module("material.components.datepicker").directive("mdCalendarMonth",(function(){return{template:'
    ',require:["^^mdCalendar","mdCalendarMonth"],controller:e,controllerAs:"monthCtrl",bindToController:!0,link:function(e,t,n,o){var i=o[0];o[1].initialize(i)}}}));function e(e,t,n,o,i,r){this.$element=e,this.$scope=t,this.$animate=n,this.$q=o,this.dateUtil=i,this.dateLocale=r,this.calendarScroller=e[0].querySelector(".md-virtual-repeat-scroller"),this.isInitialized=!1,this.isMonthTransitionInProgress=!1;var a=this;this.cellClickHandler=function(){var e=i.getTimestampFromNode(this);a.$scope.$apply((function(){a.calendarCtrl.setNgModelValue(new Date(e))}))},this.headerClickHandler=function(){a.calendarCtrl.setCurrentView("year",i.getTimestampFromNode(this))}}e.prototype.initialize=function(e){this.items={length:this.dateUtil.getMonthDistance(e.firstRenderableDate,e.lastRenderableDate)+2},this.calendarCtrl=e,this.attachScopeListeners(),e.updateVirtualRepeat(),e.ngModelCtrl&&e.ngModelCtrl.$render()},e.prototype.getSelectedMonthIndex=function(){var e=this.calendarCtrl;return this.dateUtil.getMonthDistance(e.firstRenderableDate,e.displayDate||e.selectedDate||e.today)},e.prototype.changeDisplayDate=function(e){if(!this.isInitialized)return this.buildWeekHeader(),this.calendarCtrl.hideVerticalScrollbar(this),this.isInitialized=!0,this.$q.when();if(!this.dateUtil.isValidDate(e)||this.isMonthTransitionInProgress)return this.$q.when();this.isMonthTransitionInProgress=!0;var t=this.animateDateChange(e);this.calendarCtrl.displayDate=e;var n=this;return t.then((function(){n.isMonthTransitionInProgress=!1})),t},e.prototype.animateDateChange=function(e){if(this.dateUtil.isValidDate(e)){var t=this.dateUtil.getMonthDistance(this.calendarCtrl.firstRenderableDate,e);this.calendarScroller.scrollTop=265*t}return this.$q.when()},e.prototype.buildWeekHeader=function(){for(var e=this.dateLocale.firstDayOfWeek,t=this.dateLocale.shortDays,n=document.createElement("tr"),o=0;o<7;o++){var i=document.createElement("th");i.textContent=t[(o+e)%7],n.appendChild(i)}this.$element.find("thead").append(n)},e.prototype.attachScopeListeners=function(){var e=this;e.$scope.$on("md-calendar-parent-changed",(function(t,n){e.calendarCtrl.changeSelectedDate(n),e.changeDisplayDate(n)})),e.$scope.$on("md-calendar-parent-action",t.bind(this,this.handleKeyEvent))},e.prototype.handleKeyEvent=function(e,t){var n=this.calendarCtrl,o=n.displayDate;if("select"===t)n.setNgModelValue(o);else{var i=null,r=this.dateUtil;switch(t){case"move-right":i=r.incrementDays(o,1);break;case"move-left":i=r.incrementDays(o,-1);break;case"move-page-down":i=r.incrementMonths(o,1);break;case"move-page-up":i=r.incrementMonths(o,-1);break;case"move-row-down":i=r.incrementDays(o,7);break;case"move-row-up":i=r.incrementDays(o,-7);break;case"start":i=r.getFirstDateOfMonth(o);break;case"end":i=r.getLastDateOfMonth(o)}i&&(i=this.dateUtil.clampDate(i,n.minDate,n.maxDate),this.changeDisplayDate(i).then((function(){n.focusDate(i)})))}}}(),function(){function e(e,o){var i=e('')({})[0];return{require:["^^mdCalendar","^^mdCalendarMonth","mdCalendarMonthBody"],scope:{offset:"=mdMonthOffset"},controller:n,controllerAs:"mdMonthBodyCtrl",bindToController:!0,link:function(e,n,o,r){var a=r[0],d=r[1],s=r[2];s.calendarCtrl=a,s.monthCtrl=d,s.arrowIcon=i.cloneNode(!0),e.$watch((function(){return s.offset}),(function(e){t.isNumber(e)&&s.generateContent()}))}}}function n(e,t,n){this.$element=e,this.dateUtil=t,this.dateLocale=n,this.monthCtrl=null,this.calendarCtrl=null,this.offset=null,this.focusAfterAppend=null}e.$inject=["$compile","$$mdSvgRegistry"],n.$inject=["$element","$$mdDateUtil","$mdDateLocale"],t.module("material.components.datepicker").directive("mdCalendarMonthBody",e),n.prototype.generateContent=function(){var e=this.dateUtil.incrementMonths(this.calendarCtrl.firstRenderableDate,this.offset);this.$element.empty().append(this.buildCalendarForMonth(e)),this.focusAfterAppend&&(this.focusAfterAppend.classList.add(this.calendarCtrl.FOCUSED_DATE_CLASS),this.focusAfterAppend=null)},n.prototype.buildDateCell=function(e){var t=this.monthCtrl,n=this.calendarCtrl,o=document.createElement("td");if(o.tabIndex=-1,o.classList.add("md-calendar-date"),o.setAttribute("role","gridcell"),e){o.setAttribute("tabindex","-1"),o.setAttribute("aria-label",this.dateLocale.longDateFormatter(e)),o.id=n.getDateId(e,"month"),o.setAttribute("data-timestamp",e.getTime()),this.dateUtil.isSameDay(e,n.today)&&o.classList.add(n.TODAY_CLASS),this.dateUtil.isValidDate(n.selectedDate)&&this.dateUtil.isSameDay(e,n.selectedDate)&&(o.classList.add(n.SELECTED_DATE_CLASS),o.setAttribute("aria-selected","true"));var i=this.dateLocale.dates[e.getDate()];if(this.isDateEnabled(e)){var r=document.createElement("span");r.classList.add("md-calendar-date-selection-indicator"),r.textContent=i,o.appendChild(r),o.addEventListener("click",t.cellClickHandler),n.displayDate&&this.dateUtil.isSameDay(e,n.displayDate)&&(this.focusAfterAppend=o)}else o.classList.add("md-calendar-date-disabled"),o.textContent=i}return o},n.prototype.isDateEnabled=function(e){return this.dateUtil.isDateWithinRange(e,this.calendarCtrl.minDate,this.calendarCtrl.maxDate)&&(!t.isFunction(this.calendarCtrl.dateFilter)||this.calendarCtrl.dateFilter(e))},n.prototype.buildDateRow=function(e){var t=document.createElement("tr");return t.setAttribute("role","row"),t.setAttribute("aria-label",this.dateLocale.weekNumberFormatter(e)),t},n.prototype.buildCalendarForMonth=function(e){var t=this.dateUtil.isValidDate(e)?e:new Date,n=this.dateUtil.getFirstDateOfMonth(t),o=this.getLocaleDay_(n),i=this.dateUtil.getNumberOfDaysInMonth(t),r=document.createDocumentFragment(),a=1,d=this.buildDateRow(a);r.appendChild(d);var s=this.offset===this.monthCtrl.items.length-1,l=0,c=document.createElement("td"),m=document.createElement("span"),u=this.calendarCtrl;if(m.textContent=this.dateLocale.monthHeaderFormatter(t),c.appendChild(m),c.classList.add("md-calendar-month-label"),u.maxDate&&n>u.maxDate?c.classList.add("md-calendar-month-label-disabled"):u.mode||(c.addEventListener("click",this.monthCtrl.headerClickHandler),c.setAttribute("data-timestamp",n.getTime()),c.setAttribute("aria-label",this.dateLocale.monthFormatter(t)),c.classList.add("md-calendar-label-clickable"),c.appendChild(this.arrowIcon.cloneNode(!0))),o<=2){c.setAttribute("colspan","7");var p=this.buildDateRow();if(p.appendChild(c),r.insertBefore(p,d),s)return r}else l=3,c.setAttribute("colspan","3"),d.appendChild(c);for(var h=l;h
    ',require:["^^mdCalendar","mdCalendarYear"],controller:e,controllerAs:"yearCtrl",bindToController:!0,link:function(e,t,n,o){var i=o[0];o[1].initialize(i)}}})),e.prototype.initialize=function(e){this.items={length:this.dateUtil.getYearDistance(e.firstRenderableDate,e.lastRenderableDate)+1},this.calendarCtrl=e,this.attachScopeListeners(),e.updateVirtualRepeat(),e.ngModelCtrl&&e.ngModelCtrl.$render()},e.prototype.getFocusedYearIndex=function(){var e=this.calendarCtrl;return this.dateUtil.getYearDistance(e.firstRenderableDate,e.displayDate||e.selectedDate||e.today)},e.prototype.changeDate=function(e){if(!this.isInitialized)return this.calendarCtrl.hideVerticalScrollbar(this),this.isInitialized=!0,this.$q.when();if(this.dateUtil.isValidDate(e)&&!this.isMonthTransitionInProgress){var t=this,n=this.animateDateChange(e);return t.isMonthTransitionInProgress=!0,t.calendarCtrl.displayDate=e,n.then((function(){t.isMonthTransitionInProgress=!1}))}},e.prototype.animateDateChange=function(e){if(this.dateUtil.isValidDate(e)){var t=this.dateUtil.getYearDistance(this.calendarCtrl.firstRenderableDate,e);this.calendarScroller.scrollTop=88*t}return this.$q.when()},e.prototype.handleKeyEvent=function(e,t){var n=this,o=n.calendarCtrl,i=o.displayDate;if("select"===t)n.changeDate(i).then((function(){n.onTimestampSelected(i)}));else{var r=null,a=n.dateUtil;switch(t){case"move-right":r=a.incrementMonths(i,1);break;case"move-left":r=a.incrementMonths(i,-1);break;case"move-row-down":r=a.incrementMonths(i,6);break;case"move-row-up":r=a.incrementMonths(i,-6)}if(r){var d=o.minDate?a.getFirstDateOfMonth(o.minDate):null,s=o.maxDate?a.getFirstDateOfMonth(o.maxDate):null;r=a.getFirstDateOfMonth(n.dateUtil.clampDate(r,d,s)),n.changeDate(r).then((function(){o.focusDate(r)}))}}},e.prototype.attachScopeListeners=function(){var e=this;e.$scope.$on("md-calendar-parent-changed",(function(t,n){e.calendarCtrl.changeSelectedDate(n?e.dateUtil.getFirstDateOfMonth(n):n),e.changeDate(n)})),e.$scope.$on("md-calendar-parent-action",t.bind(e,e.handleKeyEvent))},e.prototype.onTimestampSelected=function(e){var t=this.calendarCtrl;t.mode?this.$mdUtil.nextTick((function(){t.setNgModelValue(new Date(e))})):t.setCurrentView("month",e)}}(),function(){function e(e,t,n){this.$element=e,this.dateUtil=t,this.dateLocale=n,this.calendarCtrl=null,this.yearCtrl=null,this.offset=null,this.focusAfterAppend=null}e.$inject=["$element","$$mdDateUtil","$mdDateLocale"],t.module("material.components.datepicker").directive("mdCalendarYearBody",(function(){return{require:["^^mdCalendar","^^mdCalendarYear","mdCalendarYearBody"],scope:{offset:"=mdYearOffset"},controller:e,controllerAs:"mdYearBodyCtrl",bindToController:!0,link:function(e,n,o,i){var r=i[0],a=i[1],d=i[2];d.calendarCtrl=r,d.yearCtrl=a,e.$watch((function(){return d.offset}),(function(e){t.isNumber(e)&&d.generateContent()}))}}})),e.prototype.generateContent=function(){var e=this.dateUtil.incrementYears(this.calendarCtrl.firstRenderableDate,this.offset);this.$element.empty().append(this.buildCalendarForYear(e)),this.focusAfterAppend&&(this.focusAfterAppend.classList.add(this.calendarCtrl.FOCUSED_DATE_CLASS),this.focusAfterAppend=null)},e.prototype.buildMonthCell=function(e,n){var o=this.calendarCtrl,i=this.yearCtrl,r=this.buildBlankCell(),a=new Date(e,n,1);r.setAttribute("aria-label",this.dateLocale.monthFormatter(a)),r.id=o.getDateId(a,"year"),r.setAttribute("data-timestamp",String(a.getTime())),this.dateUtil.isSameMonthAndYear(a,o.today)&&r.classList.add(o.TODAY_CLASS),this.dateUtil.isValidDate(o.selectedDate)&&this.dateUtil.isSameMonthAndYear(a,o.selectedDate)&&(r.classList.add(o.SELECTED_DATE_CLASS),r.setAttribute("aria-selected","true"));var d=this.dateLocale.shortMonths[n];if(!this.dateUtil.isMonthWithinRange(a,o.minDate,o.maxDate)||t.isFunction(o.monthFilter)&&!o.monthFilter(a))r.classList.add("md-calendar-date-disabled"),r.textContent=d;else{var s=document.createElement("span");s.classList.add("md-calendar-date-selection-indicator"),s.textContent=d,r.appendChild(s),r.addEventListener("click",i.cellClickHandler),o.displayDate&&this.dateUtil.isSameMonthAndYear(a,o.displayDate)&&(this.focusAfterAppend=r)}return r},e.prototype.buildBlankCell=function(){var e=document.createElement("td");return e.tabIndex=-1,e.classList.add("md-calendar-date"),e.setAttribute("role","gridcell"),e.setAttribute("tabindex","-1"),e},e.prototype.buildCalendarForYear=function(e){var t,n=e.getFullYear(),o=document.createDocumentFragment(),i=document.createElement("tr"),r=document.createElement("td");for(r.className="md-calendar-month-label",r.textContent=String(n),i.appendChild(r),t=0;t<6;t++)i.appendChild(this.buildMonthCell(n,t));o.appendChild(i);var a=document.createElement("tr");for(a.appendChild(this.buildBlankCell()),t=6;t<12;t++)a.appendChild(this.buildMonthCell(n,t));return o.appendChild(a),o}}(),t.module("material.components.datepicker").config(["$provide",function(e){function t(){this.months=null,this.shortMonths=null,this.days=null,this.shortDays=null,this.dates=null,this.firstDayOfWeek=0,this.formatDate=null,this.parseDate=null,this.monthHeaderFormatter=null,this.weekNumberFormatter=null,this.longDateFormatter=null,this.isDateComplete=null,this.msgCalendar="",this.msgOpenCalendar=""}t.prototype.$get=function(e,t){for(var n=e.DATETIME_FORMATS.SHORTDAY.map((function(e){return e.substring(0,1)})),o=Array(32),i=1;i<=31;i++)o[i]=i;var r=new Date(1880,0,1),a=new Date(r.getFullYear()+250,0,1),d={months:this.months||e.DATETIME_FORMATS.MONTH,shortMonths:this.shortMonths||e.DATETIME_FORMATS.SHORTMONTH,days:this.days||e.DATETIME_FORMATS.DAY,shortDays:this.shortDays||n,dates:this.dates||o,firstDayOfWeek:this.firstDayOfWeek||0,formatDate:this.formatDate||function(e,n){if(!e)return"";var o=e.toLocaleTimeString(),i=e;return 0!==e.getHours()||-1===o.indexOf("11:")&&-1===o.indexOf("23:")||(i=new Date(e.getFullYear(),e.getMonth(),e.getDate(),1,0,0)),t("date")(i,"M/d/yyyy",n)},parseDate:this.parseDate||function(e){return new Date(e)},isDateComplete:this.isDateComplete||function(e){return e=e.trim(),/^(([a-zA-Z]{3,}|[0-9]{1,4})([ .,]+|[/-])){2}([a-zA-Z]{3,}|[0-9]{1,4})$/.test(e)},monthHeaderFormatter:this.monthHeaderFormatter||function(e){return d.shortMonths[e.getMonth()]+" "+e.getFullYear()},monthFormatter:this.monthFormatter||function(e){return d.months[e.getMonth()]+" "+e.getFullYear()},weekNumberFormatter:this.weekNumberFormatter||function(e){return"Week "+e},longDateFormatter:this.longDateFormatter||function(e){return[d.days[e.getDay()],d.months[e.getMonth()],d.dates[e.getDate()],e.getFullYear()].join(" ")},msgCalendar:this.msgCalendar||"Calendar",msgOpenCalendar:this.msgOpenCalendar||"Open calendar",firstRenderableDate:this.firstRenderableDate||r,lastRenderableDate:this.lastRenderableDate||a};return d},t.prototype.$get.$inject=["$locale","$filter"],e.provider("$mdDateLocale",new t)}]),t.module("material.components.datepicker").factory("$$mdDateUtil",["$mdDateLocale",function(e){return{getFirstDateOfMonth:n,getNumberOfDaysInMonth:o,getDateInNextMonth:i,getDateInPreviousMonth:r,isInNextMonth:function(e,t){return a(i(e),t)},isInPreviousMonth:function(e,t){return a(t,r(e))},getDateMidpoint:function(e,t){return c((e.getTime()+t.getTime())/2)},isSameMonthAndYear:a,getWeekOfMonth:function(e){var t=n(e);return Math.floor((t.getDay()+e.getDate()-1)/7)},incrementDays:function(e,t){return new Date(e.getFullYear(),e.getMonth(),e.getDate()+t)},incrementMonths:d,getLastDateOfMonth:function(e){return new Date(e.getFullYear(),e.getMonth(),o(e))},isSameDay:function(e,t){return e.getDate()==t.getDate()&&a(e,t)},getMonthDistance:function(e,t){return 12*(t.getFullYear()-e.getFullYear())+(t.getMonth()-e.getMonth())},isValidDate:s,setDateTimeToMidnight:l,createDateAtMidnight:c,isDateWithinRange:function(e,t,n){var o=c(e),i=s(t)?c(t):null,r=s(n)?c(n):null;return(!i||i<=o)&&(!r||r>=o)},incrementYears:function(e,t){return d(e,12*t)},getYearDistance:function(e,t){return t.getFullYear()-e.getFullYear()},clampDate:function(e,t,n){var o=e;return t&&en&&(o=new Date(n.getTime())),o},getTimestampFromNode:function(e){if(e&&e.hasAttribute("data-timestamp"))return Number(e.getAttribute("data-timestamp"))},isMonthWithinRange:function(e,t,n){var o=e.getMonth(),i=e.getFullYear();return(!t||t.getFullYear()i||n.getMonth()>=o)},removeLocalTzAndReparseDate:function(t){var n,o;return n=new Date(t.getTime()+6e4*t.getTimezoneOffset()),o=e.formatDate(n),e.parseDate(o)}};function n(e){return new Date(e.getFullYear(),e.getMonth(),1)}function o(e){return new Date(e.getFullYear(),e.getMonth()+1,0).getDate()}function i(e){return new Date(e.getFullYear(),e.getMonth()+1,1)}function r(e){return new Date(e.getFullYear(),e.getMonth()-1,1)}function a(e,t){return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()}function d(e,t){var n=new Date(e.getFullYear(),e.getMonth()+t,1),i=o(n);return i