13 lines
52 KiB
JavaScript
13 lines
52 KiB
JavaScript
|
/*!
|
||
|
* OverlayScrollbars
|
||
|
* https://github.com/KingSora/OverlayScrollbars
|
||
|
*
|
||
|
* Version: 1.10.0
|
||
|
*
|
||
|
* Copyright KingSora | Rene Haas.
|
||
|
* https://github.com/KingSora
|
||
|
*
|
||
|
* Released under the MIT license.
|
||
|
* Date: 11.10.2019
|
||
|
*/
|
||
|
!function(n,t){"function"==typeof define&&define.amd?define(function(){return t(n,n.document,undefined)}):"object"==typeof module&&"object"==typeof module.exports?module.exports=t(n,n.document,undefined):t(n,n.document,undefined)}("undefined"!=typeof window?window:this,function(bt,gt,yi){"use strict";var o,a,c,u,mt="object",wt="function",yt="array",xt="string",_t="boolean",Ot="number",f="undefined",n="null",St="class",xi="style",zt="id",_i="length",kt="prototype",Oi="offsetHeight",Si="clientHeight",zi="scrollHeight",ki="offsetWidth",Ci="clientWidth",Ii="scrollWidth",Ct="hasOwnProperty",Ti="getBoundingClientRect",It=(o={},a={},{e:c=["-webkit-","-moz-","-o-","-ms-"],u:u=["WebKit","Moz","O","MS"],v:function(n){var t=a[n];if(a[Ct](n))return t;for(var r,e,i,o=s(n),u=gt.createElement("div")[xi],f=0;f<c.length;f++)for(i=c[f].replace(/-/g,""),r=[n,c[f]+n,i+o,s(i)+o],e=0;e<r[_i];e++)if(u[r[e]]!==yi){t=r[e];break}return a[n]=t},d:function(n,t,r){var e=0,i=o[n];if(!o[Ct](n)){for(i=bt[n];e<u[_i];e++)i=i||bt[(t?u[e]:u[e].toLowerCase())+s(n)];o[n]=i}return i||r}});function s(n){return n.charAt(0).toUpperCase()+n.slice(1)}var Ai={wW:r(t,0,!0),wH:r(t,0),mO:r(It.d,0,"MutationObserver",!0),rO:r(It.d,0,"ResizeObserver",!0),rAF:r(It.d,0,"requestAnimationFrame",!1,function(n){return bt.setTimeout(n,1e3/60)}),cAF:r(It.d,0,"cancelAnimationFrame",!1,function(n){return bt.clearTimeout(n)}),now:function(){return Date.now&&Date.now()||(new Date).getTime()},stpP:function(n){n.stopPropagation?n.stopPropagation():n.cancelBubble=!0},prvD:function(n){n.preventDefault&&n.cancelable?n.preventDefault():n.returnValue=!1},page:function(n){var t="page",r="client",e="X",i=((n=n.originalEvent||n).target||n.srcElement||gt).ownerDocument||gt,o=i.documentElement,u=i.body;if(n.touches===yi)return!n[t+e]&&n[r+e]&&null!=n[r+e]?{x:n[r+e]+(o&&o.scrollLeft||u&&u.scrollLeft||0)-(o&&o.clientLeft||u&&u.clientLeft||0),y:n[r+"Y"]+(o&&o.scrollTop||u&&u.scrollTop||0)-(o&&o.clientTop||u&&u.clientTop||0)}:{x:n[t+e],y:n.pageY};var f=n.touches[0];return{x:f[t+e],y:f.pageY}},mBtn:function(n){var t=n.button;return n.which||t===yi?n.which:1&t?1:2&t?3:4&t?2:0},inA:function(n,t){for(var r=0;r<t[_i];r++)try{if(t[r]===n)return r}catch(e){}return-1},isA:function(n){var t=Array.isArray;return t?t(n):this.type(n)==yt},type:function(n){return n===yi?n+"":null===n?n+"":Object[kt].toString.call(n).replace(/^\[object (.+)\]$/,"$1").toLowerCase()},bind:r};function t(n){return n?bt.innerWidth||gt.documentElement[Ci]||gt.body[Ci]:bt.innerHeight||gt.documentElement[Si]||gt.body[Si]}function r(n,t){if(typeof n!=wt)throw"Can't bind function!";function r(){}function e(){return n.apply(this instanceof r?this:t,o.concat(Array[i].slice.call(arguments)))}var i=kt,o=Array[i].slice.call(arguments,2);return n[i]&&(r[i]=n[i]),e[i]=new r,e}var l,v,h,C,I,T,d,p,Ei=Math,Hi=bt.jQuery,A=(l={p:Ei.PI,c:Ei.cos,s:Ei.sin,w:Ei.pow,t:Ei.sqrt,n:Ei.asin,a:Ei.abs,o:1.70158},{swing:function(n,t,r,e,i){return.5-l.c(n*l.p)/2},linear:function(n,t,r,e,i){return n},easeInQuad:function(n,t,r,e,i){return e*(t/=i)*t+r},easeOutQuad:function(n,t,r,e,i){return-e*(t/=i)*(t-2)+r},easeInOutQuad:function(n,t,r,e,i){return(t/=i/2)<1?e/2*t*t+r:-e/2*(--t*(t-2)-1)+r},easeInCubic:function(n,t,r,e,i){return e*(t/=i)*t*t+r},easeOutCubic:function(n,t,r,e,i){return e*((t=t/i-1)*t*t+1)+r},easeInOutCubic:function(n,t,r,e,i){return(t/=i/2)<1?e/2*t*t*t+r:e/2*((t-=2)*t*t+2)+r},easeInQuart:function(n,t,r,e,i){return e*(t/=i)*t*t*t+r},easeOutQuart:function(n,t,r,e,i){return-e*((t=t/i-1)*t*t*t-1)+r},easeInOutQuart:function(n,t,r,e,i){return(t/=i/2)<1?e/2*t*t*t*t+r:-e/2*((t-=2)*t*t*t-2)+r},easeInQuint:function(n,t,r,e,i){return e*(t/=i)*t*t*t*t+r},easeOutQuint:function(n,t,r,e,i){return e*((t=t/i-1)*t*t*t*t+1)+r},easeInOutQuint:function(n,t,r,e,i){return(t/=i/2)<1?e/2*t*t*t*t*t+r:e/2*((t-=2)*t*t*t*t+2)+r},easeInSine:function(n,t,r,e,i){return-e*l.c(t/i*(l.p/2))+e+r},easeOutSine:function(n,t,r,e,i){return e*l.s(t/i*(l.p/2))+r},easeInOutSine:function(n,t,r,e,i){return-e/2*(l.c(l.p*t/i)-1)+r},easeInExpo:function(n,t,r,e,i){return 0==t?r:e*l.w(2,10*(t/i-1))+r}
|