forked from cgwyllie/angular-velocity
-
Notifications
You must be signed in to change notification settings - Fork 0
/
angular-velocity.min.js
2 lines (2 loc) · 2.7 KB
/
angular-velocity.min.js
1
2
!function(){"use strict";function e(e){return e.replace(".","-")}function n(n){return"velocity-"+e(n)}function t(n){return"velocity-opposites-"+e(n)}function r(n){return"velocity-enter-"+e(n)}function i(n){return"velocity-leave-"+e(n)}function o(e,n,t){var r,i=n.attr("data-velocity-opts"),o=n.scope(),u={complete:t};return i&&(r=e(i)(o),angular.extend(u,r),r.begin&&(u.begin=function(){var e=Array.prototype.slice.call(arguments,0);o.$apply(function(){r.begin.apply(e[0],e)})}),r.complete&&(u.complete=function(){var e=Array.prototype.slice.call(arguments,0);o.$apply(function(){r.complete.apply(e[0],e)}),o=null,t()})),u}function u(e){var n={enter:[],leave:[]};return function(t,r,i,o){var u=n[t];return u.push({element:r,done:i}),u.timer&&e.cancel(u.timer),u.timer=e(function(){var e,r=[],i=[];angular.forEach(u,function(e){e&&r.push(e.element),i.push(e.done)}),e=function(){angular.forEach(i,function(e){e()})},o(r,e),n[t]=[]},10,!1),function(){n[t]=[]}}}function a(e){return function(n){n&&y(e,"stop")}}function c(e,n){return function(t,r){var i=o(n,t,r);return y(t,e,i),a(t)}}function l(e,n,t,r){return function(i,u,c){var l,f=n;return"ng-hide"===u?(f=e===g?t:f,l=o(r,i,c),y(i,f,l),a(i)):void 0}}function f(e,n,t,r){return function(i,u){var a;return"enter"===n&&i.css("opacity",0),a=t(n,i[0],u,function(n,t){var u=o(r,i,t);y(n,e,u)}),function(e){e&&a()}}}function s(e){return["$timeout","$parse",function(n,t){var r=u(n);return{enter:f(e,"enter",r,t),leave:f(e,"leave",r,t),move:c(e,t),addClass:l(g,e,e,t),removeClass:l(m,e,e,t)}}]}function p(e){return["$timeout","$parse",function(n,t){var r=u(n);return{enter:f(e,"enter",r,t),removeClass:l(m,e,e,t)}}]}function v(e){return["$timeout","$parse",function(n,t){var r=u(n);return{leave:f(e,"leave",r,t),addClass:l(g,e,e,t)}}]}function d(e){return["$timeout","$parse",function(n,t){var r=u(n),i=e.replace("In","Out");return i.indexOf("Down")>-1?i=i.replace("Down","Up"):i.indexOf("Up")>-1?i=i.replace("Up","Down"):i.indexOf("Left")>-1?i=i.replace("Left","Right"):i.indexOf("Right")>-1&&(i=i.replace("Right","Left")),{enter:f(e,"enter",r,t),leave:f(i,"leave",r,t),move:c(e,t),addClass:l(g,e,i,t),removeClass:l(m,e,i,t)}}]}var g=0,m=1,y=window.Velocity||window.jQuery&&jQuery.Velocity;if(!y||!y.RegisterEffect)throw"Velocity and Velocity UI Pack plugin required, please include the relevant JS files. Get Velocity with: bower install velocity";angular.module("angular-velocity",["ngAnimate"]).config(["$animateProvider",function(e){angular.forEach(y.Redirects,function(o,u){var a,c,l="In",f="Out",g="."+n(u),m="."+t(u);e.register(g,s(u)),u.substr(-2)===l?(a="."+r(u),e.register(m,d(u)),e.register(a,p(u))):u.substr(-3)===f&&(c="."+i(u),e.register(c,v(u)))})}])}();
//# sourceMappingURL=angular-velocity.min.map