var mod=angular.module("infinite-scroll",[]);mod.directive("infiniteScroll",["$rootScope","$window","$timeout",function(f,a,i){return{link:function(n,e,t){var l,o,r,c;return a=angular.element(a),r=0,null!=t.infiniteScrollDistance&&n.$watch(t.infiniteScrollDistance,function(i){return r=parseInt(i,10)}),l=!(c=!0),null!=t.infiniteScrollDisabled&&n.$watch(t.infiniteScrollDisabled,function(i){if((c=!i)&&l)return l=!1,o()}),o=function(){var i=a.height()+a.scrollTop(),i=e.offset().top+e.height()-i<=a.height()*r;return i&&c?f.$$phase?n.$eval(t.infiniteScroll):n.$apply(t.infiniteScroll):i?l=!0:void 0},a.on("scroll",o),n.$on("$destroy",function(){return a.off("scroll",o)}),i(function(){return!t.infiniteScrollImmediateCheck||n.$eval(t.infiniteScrollImmediateCheck)?o():void 0},0)}}}]);