diff options
Diffstat (limited to 'ecomp-portal-FE/client/bower_components/angular-material/modules/js/slider/slider.min.js')
-rw-r--r-- | ecomp-portal-FE/client/bower_components/angular-material/modules/js/slider/slider.min.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/ecomp-portal-FE/client/bower_components/angular-material/modules/js/slider/slider.min.js b/ecomp-portal-FE/client/bower_components/angular-material/modules/js/slider/slider.min.js new file mode 100644 index 00000000..9ffc1568 --- /dev/null +++ b/ecomp-portal-FE/client/bower_components/angular-material/modules/js/slider/slider.min.js @@ -0,0 +1,7 @@ +/*! + * Angular Material Design + * https://github.com/angular/material + * @license MIT + * v0.9.8 + */ +!function(e,t,i){"use strict";function n(e,i,n,a,r,o,s,d){function l(e,t){return e.attr({tabIndex:0,role:"slider"}),n.expect(e,"aria-label"),u}function u(n,l,u,c){function m(){g(),x(),h()}function f(e){H=parseFloat(e),l.attr("aria-valuemin",e),m()}function v(e){U=parseFloat(e),l.attr("aria-valuemax",e),m()}function p(e){J=parseFloat(e),h()}function $(e){l.attr("aria-disabled",!!e)}function h(){if(t.isDefined(u.mdDiscrete)){var e=Math.floor((U-H)/J);if(!Q){var n=i.getComputedStyle(W[0]);Q=t.element('<canvas style="position:absolute;">'),X=Q[0].getContext("2d"),X.fillStyle=n.backgroundColor||"black",W.append(Q)}var a=w();Q[0].width=a.width,Q[0].height=a.height;for(var r,o=0;e>=o;o++)r=Math.floor(a.width*(o/e)),X.fillRect(r-1,0,2,a.height)}}function g(){Z=G[0].getBoundingClientRect()}function w(){return Y(),Z}function b(e){if(!l[0].hasAttribute("disabled")){var t;e.keyCode===r.KEY_CODE.LEFT_ARROW?t=-J:e.keyCode===r.KEY_CODE.RIGHT_ARROW&&(t=J),t&&((e.metaKey||e.ctrlKey||e.altKey)&&(t*=4),e.preventDefault(),e.stopPropagation(),n.$evalAsync(function(){y(c.$viewValue+t)}))}}function y(e){c.$setViewValue(C(k(e)))}function x(){isNaN(c.$viewValue)&&(c.$viewValue=c.$modelValue);var e=(c.$viewValue-H)/(U-H);n.modelValue=c.$viewValue,l.attr("aria-valuenow",c.$viewValue),D(e),_.text(c.$viewValue)}function C(e){return t.isNumber(e)?Math.max(H,Math.min(U,e)):void 0}function k(e){if(t.isNumber(e)){var i=Math.round(e/J)*J;return Math.round(1e3*i)/1e3}}function D(e){I.css("width",100*e+"%"),z.css("left",100*e+"%"),l.toggleClass("md-min",0===e)}function V(e){if(!P()){l.addClass("active"),l[0].focus(),g();var t=L(K(e.pointer.x)),i=C(k(t));n.$apply(function(){y(i),D(N(i))})}}function M(e){if(!P()){l.removeClass("dragging active");var t=L(K(e.pointer.x)),i=C(k(t));n.$apply(function(){y(i),x()})}}function S(e){P()||(ee=!0,e.stopPropagation(),l.addClass("dragging"),q(e))}function A(e){ee&&(e.stopPropagation(),q(e))}function R(e){ee&&(e.stopPropagation(),ee=!1)}function q(e){te?F(e.pointer.x):E(e.pointer.x)}function E(e){n.$evalAsync(function(){y(L(K(e)))})}function F(e){var t=L(K(e)),i=C(k(t));D(K(e)),_.text(i)}function K(e){return Math.max(0,Math.min(1,(e-Z.left)/Z.width))}function L(e){return H+e*(U-H)}function N(e){return(e-H)/(U-H)}o(l),c=c||{$setViewValue:function(e){this.$viewValue=e,this.$viewChangeListeners.forEach(function(e){e()})},$parsers:[],$formatters:[],$viewChangeListeners:[]};var O=u.ngDisabled&&d(u.ngDisabled),P=O?function(){return O(n.$parent)}:t.noop,T=t.element(l[0].querySelector(".md-thumb")),_=t.element(l[0].querySelector(".md-thumb-text")),z=T.parent(),G=t.element(l[0].querySelector(".md-track-container")),I=t.element(l[0].querySelector(".md-track-fill")),W=t.element(l[0].querySelector(".md-track-ticks")),Y=a.throttle(g,5e3);t.isDefined(u.min)?u.$observe("min",f):f(0),t.isDefined(u.max)?u.$observe("max",v):v(100),t.isDefined(u.step)?u.$observe("step",p):p(1);var j=t.noop;u.ngDisabled&&(j=n.$parent.$watch(u.ngDisabled,$)),s.register(l,"drag"),l.on("keydown",b).on("$md.pressdown",V).on("$md.pressup",M).on("$md.dragstart",S).on("$md.drag",A).on("$md.dragend",R),setTimeout(m);var B=e.throttle(m);t.element(i).on("resize",B),n.$on("$destroy",function(){t.element(i).off("resize",B),j()}),c.$render=x,c.$viewChangeListeners.push(x),c.$formatters.push(C),c.$formatters.push(k);var H,U,J,Q,X,Z={};g();var ee=!1,te=t.isDefined(u.mdDiscrete)}return{scope:{},require:"?ngModel",template:'<div class="md-slider-wrapper"> <div class="md-track-container"> <div class="md-track"></div> <div class="md-track md-track-fill"></div> <div class="md-track-ticks"></div> </div> <div class="md-thumb-container"> <div class="md-thumb"></div> <div class="md-focus-thumb"></div> <div class="md-focus-ring"></div> <div class="md-sign"> <span class="md-thumb-text"></span> </div> <div class="md-disabled-thumb"></div> </div> </div>',compile:l}}t.module("material.components.slider",["material.core"]).directive("mdSlider",n),n.$inject=["$$rAF","$window","$mdAria","$mdUtil","$mdConstant","$mdTheming","$mdGesture","$parse"]}(window,window.angular);
\ No newline at end of file |