{"size": 5991, "ext": "js", "max_stars_repo_path": "dist/scroll-to-legacy.js", "max_stars_repo_name": "simon300000/navscroll-js", "max_stars_repo_stars_event_min_datetime": "2017-11-14T02:31:46.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-02T04:51:59.000Z", "max_issues_repo_path": "dist/scroll-to-legacy.js", "max_issues_repo_name": "simon300000/navscroll-js", "max_issues_repo_issues_event_min_datetime": "2017-11-24T15:07:36.000Z", "max_issues_repo_issues_event_max_datetime": "2020-01-17T02:14:22.000Z", "max_forks_repo_path": "dist/scroll-to-legacy.js", "max_forks_repo_name": "simon300000/navscroll-js", "max_forks_repo_forks_event_min_datetime": "2017-11-14T21:44:51.000Z", "max_forks_repo_forks_event_max_datetime": "2022-03-08T05:46:09.000Z"}
{"max_stars_count": 65, "max_issues_count": 7, "max_forks_count": 9, "avg_line_length": 5991.0, "max_line_length": 5991, "alphanum_fraction": 0.6808546153}
!function(o,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("NavScrollTo",[],e):"object"==typeof exports?exports.NavScrollTo=e():o.NavScrollTo=e()}(this,function(){return function(o){function e(t){if(n[t])return n[t].exports;var r=n[t]={i:t,l:!1,exports:{}};return o[t].call(r.exports,r,r.exports,e),r.l=!0,r.exports}var n={};return e.m=o,e.c=n,e.d=function(o,n,t){e.o(o,n)||Object.defineProperty(o,n,{configurable:!1,enumerable:!0,get:t})},e.n=function(o){var n=o&&o.__esModule?function(){return o.default}:function(){return o};return e.d(n,"a",n),n},e.o=function(o,e){return Object.prototype.hasOwnProperty.call(o,e)},e.p="/",e(e.s=0)}([function(o,e,n){"use strict";function t(o){o&&(window.history.pushState?window.history.pushState(null,null,o):window.location.hash=o)}Object.defineProperty(e,"__esModule",{value:!0}),e.setLocationHash=t;var r=n(1),i=n.n(r),a=n(2),c=n(4),l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},u=["mousedown","wheel","DOMMouseScroll","mousewheel","keyup","touchmove"],s=function(){function o(o){var e=o.scrollTop;return"body"===o.tagName.toLowerCase()&&(e=e||document.documentElement.scrollTop),e}function e(o){var e=o.scrollLeft;return"body"===o.tagName.toLowerCase()&&(e=e||document.documentElement.scrollLeft),e}function n(o){if(D)return r();Y||(Y=o),_=o-Y,z=Math.min(_/m,1),z=X(z),s(v,E+M*z,x+I*z),_<m?window.AFRequestID=window.requestAnimationFrame(n):r()}function r(){D||s(v,N,C),Y=!1,k&&t(A),O&&!j&&f(L,F),D&&b&&b(P),w&&w(),a.a.off(v,u,q),setTimeout(function(){a.a.on(v,"scroll",j,{passive:!0})},100)}function s(o,e,n){S&&(o.scrollTop=e),g&&(o.scrollLeft=n),"body"===o.tagName.toLowerCase()&&(S&&(document.documentElement.scrollTop=e),g&&(document.documentElement.scrollLeft=n))}function f(o,e){e.forEach(function(o){o.classList.remove(T)}),o&&o.classList.add(T)}var d=void 0,v=void 0,m=void 0,p=void 0,y=void 0,h=void 0,w=void 0,b=void 0,g=void 0,S=void 0,T=void 0,L=void 0,A=void 0,k=void 0,F=void 0,O=void 0,j=void 0,x=void 0,C=void 0,E=void 0,N=void 0,I=void 0,M=void 0,D=void 0,P=void 0,q=function(o){h&&(P=o,D=!0)},X=void 0,Y=void 0,_=void 0,z=void 0;return function(t,r){var s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if("object"===(void 0===r?"undefined":l(r))?s=r:"number"==typeof r&&(s.duration=r),!(d=a.a.$(t)))return console.warn('[navscroll-js]: Trying to scroll to element "'+t+'" that is not on the page. Make sure it is set in the DOM.');var Y=Object(c.a)();if(!(v=a.a.$(s.container||Y.container)))return console.warn('[navscroll-js]: Scrolling container "'+(s.container||Y.container)+'" is not present on the page.');m=s.duration||Y.duration,p=s.easing||Y.easing,y=s.offset||Y.offset,h="cancelable"in s?!1!==s.cancelable:Y.cancelable,w=s.onDone||Y.onDone,b=s.onCancel||Y.onCancel,g=void 0===s.scrollX?Y.scrollX:s.scrollX,S=void 0===s.scrollY?Y.scrollY:s.scrollY,T=void 0===s.activeClass?Y.activeClass:s.activeClass,L=s.clickedNavItem||Y.clickedNavItem,A=L?L.hash||L.dataset.href:s.hash||Y.hash,k=void 0===s.anchor?Y.anchor:s.anchor,F=s.navItems||Y.navItems,O=void 0===s.alwaysTrack?Y.alwaysTrack:s.alwaysTrack,j="function"==typeof s.trackingFn?s.trackingFn:Y.trackingFn;var _=a.a.cumulativeOffset(d);return E=o(v),N=_.top-v.offsetTop-y,x=e(v),C=_.left-v.offsetLeft-y,D=!1,M=N-E,I=C-x,p=a.a.cubicBezierArrayFrom(p),X=i.a.apply(i.a,p),M||I?(O||(a.a.off(v,"scroll",j),window.cancelAnimationFrame(window.AFRequestID),f(L,F)),a.a.on(v,u,q,{passive:!0}),window.requestAnimationFrame(n),function(){P=null,D=!0}):void 0}}();e.default=s},function(o,e){function n(o,e){return 1-3*e+3*o}function t(o,e){return 3*e-6*o}function r(o){return 3*o}function i(o,e,i){return((n(e,i)*o+t(e,i))*o+r(e))*o}function a(o,e,i){return 3*n(e,i)*o*o+2*t(e,i)*o+r(e)}function c(o,e,n,t,r){var a,c,l=0;do{(a=i(c=e+(n-e)/2,t,r)-o)>0?n=c:e=c}while(Math.abs(a)>f&&++l<d);return c}function l(o,e,n,t){for(var r=0;r<u;++r){var c=a(e,n,t);if(0===c)return e;e-=(i(e,n,t)-o)/c}return e}var u=4,s=.001,f=1e-7,d=10,v=11,m=1/(v-1),p="function"==typeof Float32Array;o.exports=function(o,e,n,t){function r(e){for(var t=0,r=1,i=v-1;r!==i&&u[r]<=e;++r)t+=m;var f=t+(e-u[--r])/(u[r+1]-u[r])*m,d=a(f,o,n);return d>=s?l(e,f,o,n):0===d?f:c(e,t,t+m,o,n)}if(!(0<=o&&o<=1&&0<=n&&n<=1))throw new Error("bezier x values must be in [0, 1] range");var u=p?new Float32Array(v):new Array(v);if(o!==e||n!==t)for(var f=0;f<v;++f)u[f]=i(f*m,o,n);return function(a){return o===e&&n===t?a:0===a?0:1===a?1:i(r(a),e,t)}}},function(o,e,n){"use strict";var t=n(3),r=!1,i=Object.defineProperty({},"passive",{get:function(){r=!0}});try{window.addEventListener("test",null,i)}catch(o){}e.a={$:function(o){return"string"!=typeof o?o:document.querySelector(o)},on:function(o,e,n){var t=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{passive:!1};e instanceof Array||(e=[e]);for(var i=0;i<e.length;i++)o.addEventListener(e[i],n,!!r&&t)},off:function(o,e,n){e instanceof Array||(e=[e]);for(var t=0;t<e.length;t++)o.removeEventListener(e[t],n)},cumulativeOffset:function(o){var e=0,n=0;do{e+=o.offsetTop||0,n+=o.offsetLeft||0,o=o.offsetParent}while(o);return{top:e,left:n}},cubicBezierArrayFrom:function(o){return Array.isArray(o)?o:"string"==typeof o?t.a[o]?t.a[o]:o.split(",").map(function(o){return+o}):t.a.ease}}},function(o,e,n){"use strict";e.a={ease:[.25,.1,.25,1],linear:[0,0,1,1],"ease-in":[.42,0,1,1],"ease-out":[0,0,.58,1],"ease-in-out":[.42,0,.58,1]}},function(o,e,n){"use strict";e.a=function(o){return t};var t={container:"body",itemSelector:".scroll-item",activeClass:"active",el:null,duration:600,easing:"ease",scrollX:!1,scrollY:!0,offset:0,onScrollOffsetX:void 0,onScrollOffsetY:void 0,alwaysTrack:!1,cancelable:!0,stopPropagation:!0,onDone:null,onCancel:null,anchor:!0,hash:null,clickToScroll:!0,clickedNavItem:null,navItems:[]}}]).default});