You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
2 lines
32 KiB
2 lines
32 KiB
1 year ago
|
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("vue")):"function"==typeof define&&define.amd?define(["vue"],e):t.vuescroll=e(t.Vue)}(this,function(t){"use strict";t=t&&t.hasOwnProperty("default")?t.default:t;var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},e=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},o=function(){function i(t,e){for(var o=0;o<e.length;o++){var i=e[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(t,e,o){return e&&i(t.prototype,e),o&&i(t,o),t}}(),b=function(t,e,o){return e in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t},d=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var o=arguments[e];for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(t[i]=o[i])}return t},p=function(t){if(Array.isArray(t)){for(var e=0,o=Array(t.length);e<t.length;e++)o[e]=t[e];return o}return Array.from(t)};function s(){if(l())return!1;var t=navigator.userAgent.toLowerCase();return-1!==t.indexOf("msie")||-1!==t.indexOf("trident")||-1!==t.indexOf(" edge/")}var a=function(){return!l()&&!!navigator.userAgent.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/)},l=function(){return t.prototype.$isServer},g=function(){function t(){e(this,t)}return o(t,[{key:"getEventObject",value:function(t){return this.touchObject?this.isTouch?t.touches:[t]:null}},{key:"getTouchObject",value:function(){if(l())return null;this.isTouch=!1;var t=navigator.userAgent,e=navigator.platform,o={};switch(o.touch=!!("ontouchstart"in window&&!window.opera||"msmaxtouchpoints"in window.navigator||"maxtouchpoints"in window.navigator||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints),o.nonDeskTouch=o.touch&&!/win32/i.test(e)||o.touch&&/win32/i.test(e)&&/mobile/i.test(t),o.eventType="onmousedown"in window&&!o.nonDeskTouch?"mouse":"ontouchstart"in window?"touch":"msmaxtouchpoints"in window.navigator||0<navigator.msMaxTouchPoints?"mstouchpoints":"maxtouchpoints"in window.navigator||0<navigator.maxTouchPoints?"touchpoints":"mouse",o.eventType){case"mouse":o.touchstart="mousedown",o.touchend="mouseup",o.touchmove="mousemove",o.touchenter="mouseenter",o.touchmove="mousemove",o.touchleave="mouseleave";break;case"touch":o.touchstart="touchstart",o.touchend="touchend",o.touchmove="touchmove",o.touchcancel="touchcancel",o.touchenter="touchstart",o.touchmove="touchmove",o.touchleave="touchend",this.isTouch=!0;break;case"mstouchpoints":o.touchstart="MSPointerDown",o.touchend="MSPointerUp",o.touchmove="MSPointerMove",o.touchcancel="MSPointerCancel",o.touchenter="MSPointerDown",o.touchmove="MSPointerMove",o.touchleave="MSPointerUp";break;case"touchpoints":o.touchstart="pointerdown",o.touchend="pointerup",o.touchmove="pointermove",o.touchcancel="pointercancel",o.touchenter="pointerdown",o.touchmove="pointermove",o.touchleave="pointerup"}return this.touchObject=o}}]),t}();function c(t,o,e){if(e&&E(o))return t;if(B(t))o=[],t.forEach(function(t,e){o[e]=c(t,o[e])});else if(t){if(!O(t))return t;for(var i in o={},t)o[i]="object"===n(t[i])?c(t[i],o[i]):t[i]}return o}function f(t,o,i,r){if(r&&E(o))return t;if(o=o||{},B(t))!B(o)&&i&&(o=[]),B(o)&&t.forEach(function(t,e){o[e]=f(t,o[e],i,r)});else if(t)if(O(t))for(var e in t)"object"===n(t[e])?E(o[e])?o[e]=c(t[e],o[e],r):f(t[e],o[e],i,r):(E(o[e])||i)&&(o[e]=t[e]);else i&&(o=t);return o}var u=void 0;function y(t,e,o){var i=3<arguments.length&&void 0!==arguments[3]&&arguments[3];"on"==(4<arguments.length&&void 0!==arguments[4]?arguments[4]:"on")?t.addEventListener(e,o,i):t.removeEventListener(e,o,i)}var w=function(t){console.warn("[vuescroll] "+t)};function v(t,e){var o=!1;if(!t||!e)return o;for(;t.parentNode!==e&&9!==t.parentNode.nodeType&&!t.parentNode._isVuescroll;)t=t.parentNode;return t.parentNode==e&&(o=!0),o}function h(t,e){if(l())return!1;var o,i,r,n=
|