/*! * Angular Material Design * https://github.com/angular/material * @license MIT * v1.1.0-master-2b98560 */ !function(e,t,n){"use strict";function i(e,t){function n(t){var n=t[0].querySelector(o),i=t[0].querySelector(a);return n&&t.addClass("md-icon-left"),i&&t.addClass("md-icon-right"),function(t,n){e(n)}}function i(e,n,i,r){var o=this;o.isErrorGetter=i.mdIsError&&t(i.mdIsError),o.delegateClick=function(){o.input.focus()},o.element=n,o.setFocused=function(e){n.toggleClass("md-input-focused",!!e)},o.setHasValue=function(e){n.toggleClass("md-input-has-value",!!e)},o.setHasPlaceholder=function(e){n.toggleClass("md-input-has-placeholder",!!e)},o.setInvalid=function(e){e?r.addClass(n,"md-input-invalid"):r.removeClass(n,"md-input-invalid")},e.$watch(function(){return o.label&&o.input},function(e){e&&!o.label.attr("for")&&o.label.attr("for",o.input.attr("id"))})}i.$inject=["$scope","$element","$attrs","$animate"];var r=["INPUT","TEXTAREA","SELECT","MD-SELECT"],o=r.reduce(function(e,t){return e.concat(["md-icon ~ "+t,".md-icon ~ "+t])},[]).join(","),a=r.reduce(function(e,t){return e.concat([t+" ~ md-icon",t+" ~ .md-icon"])},[]).join(",");return{restrict:"E",compile:n,controller:i}}function r(){return{restrict:"E",require:"^?mdInputContainer",link:function(e,t,n,i){!i||n.mdNoFloat||t.hasClass("md-container-ignore")||(i.label=t,e.$on("$destroy",function(){i.label=null}))}}}function o(e,n,i,r,o){function a(a,s,u,l){function c(e){return p.setHasValue(!v.$isEmpty(e)),e}function d(){p.label&&u.$observe("required",function(e){p.label.toggleClass("md-required",e&&!C)})}function m(){p.setHasValue(s.val().length>0||(s[0].validity||{}).badInput)}function f(){function i(){s.attr("rows",1).css("height","auto").addClass("md-no-flex");var e=l();if(!w){var t=s[0].style.padding||"";w=s.css("padding",0).prop("offsetHeight"),s[0].style.padding=t}if(h&&w&&(e=Math.max(e,w*h)),$&&w){var n=w*$;n-1&&v.$formatters.splice(e,1)}}function m(){function n(e){e.preventDefault(),m=!0,f=e.clientY,g=parseFloat(s.css("height"))||s.prop("offsetHeight")}function i(e){m&&(e.preventDefault(),d(),v.addClass("md-input-resized"))}function r(t){m&&s.css("height",g+(t.pointer.y-f)-e.scrollTop()+"px")}function l(e){m&&(m=!1,v.removeClass("md-input-resized"))}if(!u.hasOwnProperty("mdNoResize")){var c=t.element('
'),m=!1,f=null,g=0,v=p.element,h=o.register(c,"drag",{horizontal:!1});s.wrap('
').after(c),c.on("mousedown",n),v.on("$md.dragstart",i).on("$md.drag",r).on("$md.dragend",l),a.$on("$destroy",function(){c.off("mousedown",n).remove(),v.off("$md.dragstart",i).off("$md.drag",r).off("$md.dragend",l),h(),c=null,v=null,h=null})}}var f=!u.hasOwnProperty("mdNoAutogrow");if(m(),f){var h=u.hasOwnProperty("rows")?parseInt(u.rows):NaN,$=u.hasOwnProperty("maxRows")?parseInt(u.maxRows):NaN,C=a.$on("md-resize-textarea",i),w=null,y=s[0];if(r(function(){e.nextTick(i)},10,!1),s.on("input",i),g&&v.$formatters.push(c),h||s.attr("rows",1),t.element(n).on("resize",i),a.$on("$destroy",d),u.hasOwnProperty("mdDetectHidden")){var x=function(){var e=!1;return function(){var t=0===y.offsetHeight;t===!1&&e===!0&&i(),e=t}}();a.$watch(function(){return e.nextTick(x,!1),!0})}}}var p=l[0],g=!!l[1],v=l[1]||e.fakeNgModel(),h=l[2],$=t.isDefined(u.readonly),C=e.parseAttributeBoolean(u.mdNoAsterisk),w=s[0].tagName.toLowerCase();if(p){if("hidden"===u.type)return void s.attr("aria-hidden","true");if(p.input){if(p.input[0].contains(s[0]))return;throw new Error(" can only have *one* ,