{"size": 3563, "ext": "js", "max_stars_repo_path": "dist/scrl.min.js", "max_stars_repo_name": "gmrchk/scrl", "max_stars_repo_stars_event_min_datetime": "2019-02-26T08:21:28.000Z", "max_stars_repo_stars_event_max_datetime": "2019-11-29T15:37:20.000Z", "max_issues_repo_path": "dist/scrl.min.js", "max_issues_repo_name": "gmrchk/scrl", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "dist/scrl.min.js", "max_forks_repo_name": "gmrchk/scrl", "max_forks_repo_forks_event_min_datetime": "2020-03-10T05:03:19.000Z", "max_forks_repo_forks_event_max_datetime": "2020-03-10T05:03:19.000Z"}
{"max_stars_count": 3, "max_issues_count": null, "max_forks_count": 1, "avg_line_length": 3563.0, "max_line_length": 3563, "alphanum_fraction": 0.7504911591}
(function t(e,o){if(typeof exports==="object"&&typeof module==="object")module.exports=o();else if(typeof define==="function"&&define.amd)define([],o);else if(typeof exports==="object")exports["Scrl"]=o();else e["Scrl"]=o()})(window,function(){return function(t){var e={};function o(n){if(e[n]){return e[n].exports}var i=e[n]={i:n,l:false,exports:{}};t[n].call(i.exports,i,i.exports,o);i.l=true;return i.exports}o.m=t;o.c=e;o.d=function(t,e,n){if(!o.o(t,e)){Object.defineProperty(t,e,{enumerable:true,get:n})}};o.r=function(t){if(typeof Symbol!=="undefined"&&Symbol.toStringTag){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"})}Object.defineProperty(t,"__esModule",{value:true})};o.t=function(t,e){if(e&1)t=o(t);if(e&8)return t;if(e&4&&typeof t==="object"&&t&&t.__esModule)return t;var n=Object.create(null);o.r(n);Object.defineProperty(n,"default",{enumerable:true,value:t});if(e&2&&typeof t!="string")for(var i in t)o.d(n,i,function(e){return t[e]}.bind(null,i));return n};o.n=function(t){var e=t&&t.__esModule?function e(){return t["default"]}:function e(){return t};o.d(e,"a",e);return e};o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)};o.p="";return o(o.s=0)}([function(t,e,o){"use strict";var n=o(1);var i=r(n);function r(t){return t&&t.__esModule?t:{default:t}}t.exports=i.default},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:true});var n=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var o=arguments[e];for(var n in o){if(Object.prototype.hasOwnProperty.call(o,n)){t[n]=o[n]}}}return t};function i(t,e){if(!(t instanceof e)){throw new TypeError("Cannot call a class as a function")}}var r=function t(e){var o=this;i(this,t);this._raf=null;this._positionY=0;this._velocityY=0;this._targetPositionY=0;this._targetPositionYWithOffset=0;this._direction=0;this.scrollTo=function(t){if(t&&t.nodeType){o._targetPositionY=Math.round(t.getBoundingClientRect().top+window.pageYOffset)}else if(parseInt(o._targetPositionY)===o._targetPositionY){o._targetPositionY=Math.round(t)}else{console.error("Argument must be a number or an element.");return}if(o._targetPositionY>document.documentElement.scrollHeight-window.innerHeight){o._targetPositionY=document.documentElement.scrollHeight-window.innerHeight}o._positionY=document.body.scrollTop||document.documentElement.scrollTop;o._direction=o._positionY>o._targetPositionY?-1:1;o._targetPositionYWithOffset=o._targetPositionY+o._direction;o._velocityY=0;if(o._positionY!==o._targetPositionY){o.options.onStart();o._animate()}else{o.options.onAlreadyAtPositions()}};this._animate=function(){var t=o._update();o._render();if(o._direction===1&&o._targetPositionY>o._positionY||o._direction===-1&&o._targetPositionY<o._positionY){o._raf=requestAnimationFrame(o._animate);o.options.onTick()}else{o._positionY=o._targetPositionY;o._render();o._raf=null;o.options.onTick();o.options.onEnd()}};this._update=function(){var t=o._targetPositionYWithOffset-o._positionY;var e=t*o.options.acceleration;o._velocityY+=e;o._velocityY*=o.options.friction;o._positionY+=o._velocityY;return Math.abs(t)};this._render=function(){window.scrollTo(0,o._positionY)};var r={onAlreadyAtPositions:function t(){},onCancel:function t(){},onEnd:function t(){},onStart:function t(){},onTick:function t(){},friction:.7,acceleration:.04};this.options=n({},r,e);if(e&&e.friction){this.options.friction=1-e.friction}window.addEventListener("mousewheel",function(t){if(o._raf){o.options.onCancel();cancelAnimationFrame(o._raf);o._raf=null}},{passive:true})};e.default=r}])});