SakuraPanel/assets/panel/plugins/overlayScrollbars/js/OverlayScrollbars.min.js

13 lines
52 KiB
PHP
Raw Normal View History

2020-01-18 05:51:45 +08:00
/*!
* OverlayScrollbars
* https://github.com/KingSora/OverlayScrollbars
*
* Version: 1.9.1
*
* Copyright KingSora | Rene Haas.
* https://github.com/KingSora
*
* Released under the MIT license.
* Date: 03.08.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(lt,vt,zi){"use strict";var a,l,v,T,k,I,s,o,h,A,E,H,L,N,ht="object",dt="function",pt="array",bt="string",mt="boolean",gt="number",u="undefined",n="null",wt="class",Ci="style",yt="id",Ti="length",xt="prototype",ki="offsetHeight",Ii="clientHeight",Ai="scrollHeight",Ei="offsetWidth",Hi="clientWidth",Li="scrollWidth",_t="hasOwnProperty",Ot={e:{},u:{},v:["-webkit-","-moz-","-o-","-ms-"],d:["WebKit","Moz","O","MS"],m:function(n){var t=this.u;if(t[n])return t[n];for(var r,e,i=this.v,o=this.g(n),u=vt.createElement("div")[Ci],f=0,a=0;f<i.length;f++)for(e=i[f].replace(/-/g,""),r=[n,i[f]+n,e+o,this.g(e)+o],a=0;a<r[Ti];a++)if(u[r[a]]!==zi)return t[n]=r[a],r[a];return null},_:function(n,t,r){var e=this.d,i=this.e,o=0,u=i[n];if(!u){for(u=lt[n];o<e[Ti];o++)u=u||lt[(t?e[o]:e[o].toLowerCase())+this.g(n)];i[n]=u}return u||r},g:function(n){return n.charAt(0).toUpperCase()+n.slice(1)}},Ni={wW:function(){return lt.innerWidth||vt.documentElement[Hi]||vt.body[Hi]},wH:function(){return lt.innerHeight||vt.documentElement[Ii]||vt.body[Ii]},mO:function(){return Ot._("MutationObserver",!0)},rO:function(){return Ot._("ResizeObserver",!0)},rAF:function(){return Ot._("requestAnimationFrame",!1,function(n){return lt.setTimeout(n,1e3/60)})},cAF:function(){return Ot._("cancelAnimationFrame",!1,function(n){return lt.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||vt).ownerDocument||vt,o=i.documentElement,u=i.body;if(n.touches===zi)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===zi?n.which:1&t?1:2&t?3:4&t?2:0},inA:function(n,t){for(var r=0;r<t[Ti];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)==pt},type:function(n){return n===zi?n+"":null===n?n+"":Object[xt].toString.call(n).replace(/^\[object (.+)\]$/,"$1").toLowerCase()},bind:function(n,t){if(typeof n!=dt)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=xt,o=Array[i].slice.call(arguments,2);return n[i]&&(r[i]=n[i]),e[i]=new r,e}},Ri=Math,St=lt.jQuery,R=(a={p:Ri.PI,c:Ri.cos,s:Ri.sin,w:Ri.pow,t:Ri.sqrt,n:Ri.asin,a:Ri.abs,o:1.70158},{swing:function(n,t,r,e,i){return.5-a.c(n*a.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*a.c(t/i*(a.p/2))+e+r},easeOutSine:function(n,t,r,e,i){return e*a.s(t/i*(a.p/2))+r},easeInOutSine:function(n,t,r,e,i){return-e/2*(a.c(a.p*t/i)-1)+r},ease