diff --git a/dist/perfect-scrollbar.common.js b/dist/perfect-scrollbar.common.js index f60e7d0..2406df3 100644 --- a/dist/perfect-scrollbar.common.js +++ b/dist/perfect-scrollbar.common.js @@ -1,5 +1,5 @@ /*! - * perfect-scrollbar v1.5.2 + * perfect-scrollbar v1.5.3 * Copyright 2021 Hyunje Jun, MDBootstrap and Contributors * Licensed under MIT */ @@ -562,7 +562,9 @@ function bindMouseScrollHandler( updateGeometry(i); e.stopPropagation(); - e.preventDefault(); + if (e.type.startsWith('touch') && e.changedTouches.length > 1) { + e.preventDefault(); + } } function mouseUpHandler() { diff --git a/dist/perfect-scrollbar.common.js.map b/dist/perfect-scrollbar.common.js.map index 884e8c7..95cc707 100644 --- a/dist/perfect-scrollbar.common.js.map +++ b/dist/perfect-scrollbar.common.js.map @@ -1 +1 @@ -{"version":3,"file":"perfect-scrollbar.common.js","sources":["../src/lib/css.js","../src/lib/dom.js","../src/lib/class-names.js","../src/lib/event-manager.js","../src/process-scroll-diff.js","../src/lib/util.js","../src/update-geometry.js","../src/handlers/click-rail.js","../src/handlers/drag-thumb.js","../src/handlers/keyboard.js","../src/handlers/mouse-wheel.js","../src/handlers/touch.js","../src/index.js"],"sourcesContent":["export function get(element) {\r\n return getComputedStyle(element);\r\n}\r\n\r\nexport function set(element, obj) {\r\n for (const key in obj) {\r\n let val = obj[key];\r\n if (typeof val === 'number') {\r\n val = `${val}px`;\r\n }\r\n element.style[key] = val;\r\n }\r\n return element;\r\n}\r\n","export function div(className) {\r\n const div = document.createElement('div');\r\n div.className = className;\r\n return div;\r\n}\r\n\r\nconst elMatches =\r\n typeof Element !== 'undefined' &&\r\n (Element.prototype.matches ||\r\n Element.prototype.webkitMatchesSelector ||\r\n Element.prototype.mozMatchesSelector ||\r\n Element.prototype.msMatchesSelector);\r\n\r\nexport function matches(element, query) {\r\n if (!elMatches) {\r\n throw new Error('No element matching method supported');\r\n }\r\n\r\n return elMatches.call(element, query);\r\n}\r\n\r\nexport function remove(element) {\r\n if (element.remove) {\r\n element.remove();\r\n } else {\r\n if (element.parentNode) {\r\n element.parentNode.removeChild(element);\r\n }\r\n }\r\n}\r\n\r\nexport function queryChildren(element, selector) {\r\n return Array.prototype.filter.call(element.children, child =>\r\n matches(child, selector)\r\n );\r\n}\r\n","const cls = {\r\n main: 'ps',\r\n rtl: 'ps__rtl',\r\n element: {\r\n thumb: x => `ps__thumb-${x}`,\r\n rail: x => `ps__rail-${x}`,\r\n consuming: 'ps__child--consume',\r\n },\r\n state: {\r\n focus: 'ps--focus',\r\n clicking: 'ps--clicking',\r\n active: x => `ps--active-${x}`,\r\n scrolling: x => `ps--scrolling-${x}`,\r\n },\r\n};\r\n\r\nexport default cls;\r\n\r\n/*\r\n * Helper methods\r\n */\r\nconst scrollingClassTimeout = { x: null, y: null };\r\n\r\nexport function addScrollingClass(i, x) {\r\n const classList = i.element.classList;\r\n const className = cls.state.scrolling(x);\r\n\r\n if (classList.contains(className)) {\r\n clearTimeout(scrollingClassTimeout[x]);\r\n } else {\r\n classList.add(className);\r\n }\r\n}\r\n\r\nexport function removeScrollingClass(i, x) {\r\n scrollingClassTimeout[x] = setTimeout(\r\n () => i.isAlive && i.element.classList.remove(cls.state.scrolling(x)),\r\n i.settings.scrollingThreshold\r\n );\r\n}\r\n\r\nexport function setScrollingClassInstantly(i, x) {\r\n addScrollingClass(i, x);\r\n removeScrollingClass(i, x);\r\n}\r\n","class EventElement {\r\n constructor(element) {\r\n this.element = element;\r\n this.handlers = {};\r\n }\r\n\r\n bind(eventName, handler) {\r\n if (typeof this.handlers[eventName] === 'undefined') {\r\n this.handlers[eventName] = [];\r\n }\r\n this.handlers[eventName].push(handler);\r\n this.element.addEventListener(eventName, handler, false);\r\n }\r\n\r\n unbind(eventName, target) {\r\n this.handlers[eventName] = this.handlers[eventName].filter(handler => {\r\n if (target && handler !== target) {\r\n return true;\r\n }\r\n this.element.removeEventListener(eventName, handler, false);\r\n return false;\r\n });\r\n }\r\n\r\n unbindAll() {\r\n for (const name in this.handlers) {\r\n this.unbind(name);\r\n }\r\n }\r\n\r\n get isEmpty() {\r\n return Object.keys(this.handlers).every(\r\n key => this.handlers[key].length === 0\r\n );\r\n }\r\n}\r\n\r\nexport default class EventManager {\r\n constructor() {\r\n this.eventElements = [];\r\n }\r\n\r\n eventElement(element) {\r\n let ee = this.eventElements.filter(ee => ee.element === element)[0];\r\n if (!ee) {\r\n ee = new EventElement(element);\r\n this.eventElements.push(ee);\r\n }\r\n return ee;\r\n }\r\n\r\n bind(element, eventName, handler) {\r\n this.eventElement(element).bind(eventName, handler);\r\n }\r\n\r\n unbind(element, eventName, handler) {\r\n const ee = this.eventElement(element);\r\n ee.unbind(eventName, handler);\r\n\r\n if (ee.isEmpty) {\r\n // remove\r\n this.eventElements.splice(this.eventElements.indexOf(ee), 1);\r\n }\r\n }\r\n\r\n unbindAll() {\r\n this.eventElements.forEach(e => e.unbindAll());\r\n this.eventElements = [];\r\n }\r\n\r\n once(element, eventName, handler) {\r\n const ee = this.eventElement(element);\r\n const onceHandler = evt => {\r\n ee.unbind(eventName, onceHandler);\r\n handler(evt);\r\n };\r\n ee.bind(eventName, onceHandler);\r\n }\r\n}\r\n","import { setScrollingClassInstantly } from './lib/class-names';\r\n\r\nfunction createEvent(name) {\r\n if (typeof window.CustomEvent === 'function') {\r\n return new CustomEvent(name);\r\n } else {\r\n const evt = document.createEvent('CustomEvent');\r\n evt.initCustomEvent(name, false, false, undefined);\r\n return evt;\r\n }\r\n}\r\n\r\nexport default function(\r\n i,\r\n axis,\r\n diff,\r\n useScrollingClass = true,\r\n forceFireReachEvent = false\r\n) {\r\n let fields;\r\n if (axis === 'top') {\r\n fields = [\r\n 'contentHeight',\r\n 'containerHeight',\r\n 'scrollTop',\r\n 'y',\r\n 'up',\r\n 'down',\r\n ];\r\n } else if (axis === 'left') {\r\n fields = [\r\n 'contentWidth',\r\n 'containerWidth',\r\n 'scrollLeft',\r\n 'x',\r\n 'left',\r\n 'right',\r\n ];\r\n } else {\r\n throw new Error('A proper axis should be provided');\r\n }\r\n\r\n processScrollDiff(i, diff, fields, useScrollingClass, forceFireReachEvent);\r\n}\r\n\r\nfunction processScrollDiff(\r\n i,\r\n diff,\r\n [contentHeight, containerHeight, scrollTop, y, up, down],\r\n useScrollingClass = true,\r\n forceFireReachEvent = false\r\n) {\r\n const element = i.element;\r\n\r\n // reset reach\r\n i.reach[y] = null;\r\n\r\n // 1 for subpixel rounding\r\n if (element[scrollTop] < 1) {\r\n i.reach[y] = 'start';\r\n }\r\n\r\n // 1 for subpixel rounding\r\n if (element[scrollTop] > i[contentHeight] - i[containerHeight] - 1) {\r\n i.reach[y] = 'end';\r\n }\r\n\r\n if (diff) {\r\n element.dispatchEvent(createEvent(`ps-scroll-${y}`));\r\n\r\n if (diff < 0) {\r\n element.dispatchEvent(createEvent(`ps-scroll-${up}`));\r\n } else if (diff > 0) {\r\n element.dispatchEvent(createEvent(`ps-scroll-${down}`));\r\n }\r\n\r\n if (useScrollingClass) {\r\n setScrollingClassInstantly(i, y);\r\n }\r\n }\r\n\r\n if (i.reach[y] && (diff || forceFireReachEvent)) {\r\n element.dispatchEvent(createEvent(`ps-${y}-reach-${i.reach[y]}`));\r\n }\r\n}\r\n","import * as CSS from './css';\r\nimport * as DOM from './dom';\r\n\r\nexport function toInt(x) {\r\n return parseInt(x, 10) || 0;\r\n}\r\n\r\nexport function isEditable(el) {\r\n return (\r\n DOM.matches(el, 'input,[contenteditable]') ||\r\n DOM.matches(el, 'select,[contenteditable]') ||\r\n DOM.matches(el, 'textarea,[contenteditable]') ||\r\n DOM.matches(el, 'button,[contenteditable]')\r\n );\r\n}\r\n\r\nexport function outerWidth(element) {\r\n const styles = CSS.get(element);\r\n return (\r\n toInt(styles.width) +\r\n toInt(styles.paddingLeft) +\r\n toInt(styles.paddingRight) +\r\n toInt(styles.borderLeftWidth) +\r\n toInt(styles.borderRightWidth)\r\n );\r\n}\r\n\r\nexport const env = {\r\n isWebKit:\r\n typeof document !== 'undefined' &&\r\n 'WebkitAppearance' in document.documentElement.style,\r\n supportsTouch:\r\n typeof window !== 'undefined' &&\r\n ('ontouchstart' in window ||\r\n ('maxTouchPoints' in window.navigator &&\r\n window.navigator.maxTouchPoints > 0) ||\r\n (window.DocumentTouch && document instanceof window.DocumentTouch)),\r\n supportsIePointer:\r\n typeof navigator !== 'undefined' && navigator.msMaxTouchPoints,\r\n isChrome:\r\n typeof navigator !== 'undefined' &&\r\n /Chrome/i.test(navigator && navigator.userAgent),\r\n};\r\n","import * as CSS from './lib/css';\r\nimport * as DOM from './lib/dom';\r\nimport cls from './lib/class-names';\r\nimport { toInt } from './lib/util';\r\n\r\nexport default function(i) {\r\n const element = i.element;\r\n const roundedScrollTop = Math.floor(element.scrollTop);\r\n const rect = element.getBoundingClientRect();\r\n\r\n i.containerWidth = Math.round(rect.width);\r\n i.containerHeight = Math.round(rect.height);\r\n\r\n i.contentWidth = element.scrollWidth;\r\n i.contentHeight = element.scrollHeight;\r\n\r\n if (!element.contains(i.scrollbarXRail)) {\r\n // clean up and append\r\n DOM.queryChildren(element, cls.element.rail('x')).forEach(el =>\r\n DOM.remove(el)\r\n );\r\n element.appendChild(i.scrollbarXRail);\r\n }\r\n if (!element.contains(i.scrollbarYRail)) {\r\n // clean up and append\r\n DOM.queryChildren(element, cls.element.rail('y')).forEach(el =>\r\n DOM.remove(el)\r\n );\r\n element.appendChild(i.scrollbarYRail);\r\n }\r\n\r\n if (\r\n !i.settings.suppressScrollX &&\r\n i.containerWidth + i.settings.scrollXMarginOffset < i.contentWidth\r\n ) {\r\n i.scrollbarXActive = true;\r\n i.railXWidth = i.containerWidth - i.railXMarginWidth;\r\n i.railXRatio = i.containerWidth / i.railXWidth;\r\n i.scrollbarXWidth = getThumbSize(\r\n i,\r\n toInt((i.railXWidth * i.containerWidth) / i.contentWidth)\r\n );\r\n i.scrollbarXLeft = toInt(\r\n ((i.negativeScrollAdjustment + element.scrollLeft) *\r\n (i.railXWidth - i.scrollbarXWidth)) /\r\n (i.contentWidth - i.containerWidth)\r\n );\r\n } else {\r\n i.scrollbarXActive = false;\r\n }\r\n\r\n if (\r\n !i.settings.suppressScrollY &&\r\n i.containerHeight + i.settings.scrollYMarginOffset < i.contentHeight\r\n ) {\r\n i.scrollbarYActive = true;\r\n i.railYHeight = i.containerHeight - i.railYMarginHeight;\r\n i.railYRatio = i.containerHeight / i.railYHeight;\r\n i.scrollbarYHeight = getThumbSize(\r\n i,\r\n toInt((i.railYHeight * i.containerHeight) / i.contentHeight)\r\n );\r\n i.scrollbarYTop = toInt(\r\n (roundedScrollTop * (i.railYHeight - i.scrollbarYHeight)) /\r\n (i.contentHeight - i.containerHeight)\r\n );\r\n } else {\r\n i.scrollbarYActive = false;\r\n }\r\n\r\n if (i.scrollbarXLeft >= i.railXWidth - i.scrollbarXWidth) {\r\n i.scrollbarXLeft = i.railXWidth - i.scrollbarXWidth;\r\n }\r\n if (i.scrollbarYTop >= i.railYHeight - i.scrollbarYHeight) {\r\n i.scrollbarYTop = i.railYHeight - i.scrollbarYHeight;\r\n }\r\n\r\n updateCss(element, i);\r\n\r\n if (i.scrollbarXActive) {\r\n element.classList.add(cls.state.active('x'));\r\n } else {\r\n element.classList.remove(cls.state.active('x'));\r\n i.scrollbarXWidth = 0;\r\n i.scrollbarXLeft = 0;\r\n element.scrollLeft = i.isRtl === true ? i.contentWidth : 0;\r\n }\r\n if (i.scrollbarYActive) {\r\n element.classList.add(cls.state.active('y'));\r\n } else {\r\n element.classList.remove(cls.state.active('y'));\r\n i.scrollbarYHeight = 0;\r\n i.scrollbarYTop = 0;\r\n element.scrollTop = 0;\r\n }\r\n}\r\n\r\nfunction getThumbSize(i, thumbSize) {\r\n if (i.settings.minScrollbarLength) {\r\n thumbSize = Math.max(thumbSize, i.settings.minScrollbarLength);\r\n }\r\n if (i.settings.maxScrollbarLength) {\r\n thumbSize = Math.min(thumbSize, i.settings.maxScrollbarLength);\r\n }\r\n return thumbSize;\r\n}\r\n\r\nfunction updateCss(element, i) {\r\n const xRailOffset = { width: i.railXWidth };\r\n const roundedScrollTop = Math.floor(element.scrollTop);\r\n\r\n if (i.isRtl) {\r\n xRailOffset.left =\r\n i.negativeScrollAdjustment +\r\n element.scrollLeft +\r\n i.containerWidth -\r\n i.contentWidth;\r\n } else {\r\n xRailOffset.left = element.scrollLeft;\r\n }\r\n if (i.isScrollbarXUsingBottom) {\r\n xRailOffset.bottom = i.scrollbarXBottom - roundedScrollTop;\r\n } else {\r\n xRailOffset.top = i.scrollbarXTop + roundedScrollTop;\r\n }\r\n CSS.set(i.scrollbarXRail, xRailOffset);\r\n\r\n const yRailOffset = { top: roundedScrollTop, height: i.railYHeight };\r\n if (i.isScrollbarYUsingRight) {\r\n if (i.isRtl) {\r\n yRailOffset.right =\r\n i.contentWidth -\r\n (i.negativeScrollAdjustment + element.scrollLeft) -\r\n i.scrollbarYRight -\r\n i.scrollbarYOuterWidth -\r\n 9;\r\n } else {\r\n yRailOffset.right = i.scrollbarYRight - element.scrollLeft;\r\n }\r\n } else {\r\n if (i.isRtl) {\r\n yRailOffset.left =\r\n i.negativeScrollAdjustment +\r\n element.scrollLeft +\r\n i.containerWidth * 2 -\r\n i.contentWidth -\r\n i.scrollbarYLeft -\r\n i.scrollbarYOuterWidth;\r\n } else {\r\n yRailOffset.left = i.scrollbarYLeft + element.scrollLeft;\r\n }\r\n }\r\n CSS.set(i.scrollbarYRail, yRailOffset);\r\n\r\n CSS.set(i.scrollbarX, {\r\n left: i.scrollbarXLeft,\r\n width: i.scrollbarXWidth - i.railBorderXWidth,\r\n });\r\n CSS.set(i.scrollbarY, {\r\n top: i.scrollbarYTop,\r\n height: i.scrollbarYHeight - i.railBorderYWidth,\r\n });\r\n}\r\n","import updateGeometry from '../update-geometry';\r\n\r\nexport default function(i) {\r\n const element = i.element;\r\n\r\n i.event.bind(i.scrollbarY, 'mousedown', e => e.stopPropagation());\r\n i.event.bind(i.scrollbarYRail, 'mousedown', e => {\r\n const positionTop =\r\n e.pageY -\r\n window.pageYOffset -\r\n i.scrollbarYRail.getBoundingClientRect().top;\r\n const direction = positionTop > i.scrollbarYTop ? 1 : -1;\r\n\r\n i.element.scrollTop += direction * i.containerHeight;\r\n updateGeometry(i);\r\n\r\n e.stopPropagation();\r\n });\r\n\r\n i.event.bind(i.scrollbarX, 'mousedown', e => e.stopPropagation());\r\n i.event.bind(i.scrollbarXRail, 'mousedown', e => {\r\n const positionLeft =\r\n e.pageX -\r\n window.pageXOffset -\r\n i.scrollbarXRail.getBoundingClientRect().left;\r\n const direction = positionLeft > i.scrollbarXLeft ? 1 : -1;\r\n\r\n i.element.scrollLeft += direction * i.containerWidth;\r\n updateGeometry(i);\r\n\r\n e.stopPropagation();\r\n });\r\n}\r\n","import * as CSS from '../lib/css';\r\nimport * as DOM from '../lib/dom';\r\nimport cls, {\r\n addScrollingClass,\r\n removeScrollingClass,\r\n} from '../lib/class-names';\r\nimport updateGeometry from '../update-geometry';\r\nimport { toInt } from '../lib/util';\r\n\r\nexport default function(i) {\r\n bindMouseScrollHandler(i, [\r\n 'containerWidth',\r\n 'contentWidth',\r\n 'pageX',\r\n 'railXWidth',\r\n 'scrollbarX',\r\n 'scrollbarXWidth',\r\n 'scrollLeft',\r\n 'x',\r\n 'scrollbarXRail',\r\n ]);\r\n bindMouseScrollHandler(i, [\r\n 'containerHeight',\r\n 'contentHeight',\r\n 'pageY',\r\n 'railYHeight',\r\n 'scrollbarY',\r\n 'scrollbarYHeight',\r\n 'scrollTop',\r\n 'y',\r\n 'scrollbarYRail',\r\n ]);\r\n}\r\n\r\nfunction bindMouseScrollHandler(\r\n i,\r\n [\r\n containerHeight,\r\n contentHeight,\r\n pageY,\r\n railYHeight,\r\n scrollbarY,\r\n scrollbarYHeight,\r\n scrollTop,\r\n y,\r\n scrollbarYRail,\r\n ]\r\n) {\r\n const element = i.element;\r\n\r\n let startingScrollTop = null;\r\n let startingMousePageY = null;\r\n let scrollBy = null;\r\n\r\n function mouseMoveHandler(e) {\r\n if (e.touches && e.touches[0]) {\r\n e[pageY] = e.touches[0].pageY;\r\n }\r\n element[scrollTop] =\r\n startingScrollTop + scrollBy * (e[pageY] - startingMousePageY);\r\n addScrollingClass(i, y);\r\n updateGeometry(i);\r\n\r\n e.stopPropagation();\r\n e.preventDefault();\r\n }\r\n\r\n function mouseUpHandler() {\r\n removeScrollingClass(i, y);\r\n i[scrollbarYRail].classList.remove(cls.state.clicking);\r\n i.event.unbind(i.ownerDocument, 'mousemove', mouseMoveHandler);\r\n }\r\n\r\n function bindMoves(e, touchMode) {\r\n startingScrollTop = element[scrollTop];\r\n if (touchMode && e.touches) {\r\n e[pageY] = e.touches[0].pageY;\r\n }\r\n startingMousePageY = e[pageY];\r\n scrollBy =\r\n (i[contentHeight] - i[containerHeight]) /\r\n (i[railYHeight] - i[scrollbarYHeight]);\r\n if (!touchMode) {\r\n i.event.bind(i.ownerDocument, 'mousemove', mouseMoveHandler);\r\n i.event.once(i.ownerDocument, 'mouseup', mouseUpHandler);\r\n e.preventDefault();\r\n } else {\r\n i.event.bind(i.ownerDocument, 'touchmove', mouseMoveHandler);\r\n }\r\n\r\n i[scrollbarYRail].classList.add(cls.state.clicking);\r\n\r\n e.stopPropagation();\r\n }\r\n\r\n i.event.bind(i[scrollbarY], 'mousedown', e => {\r\n bindMoves(e);\r\n });\r\n i.event.bind(i[scrollbarY], 'touchstart', e => {\r\n bindMoves(e, true);\r\n });\r\n}\r\n","import * as DOM from '../lib/dom';\r\nimport updateGeometry from '../update-geometry';\r\nimport { isEditable } from '../lib/util';\r\n\r\nexport default function(i) {\r\n const element = i.element;\r\n\r\n const elementHovered = () => DOM.matches(element, ':hover');\r\n const scrollbarFocused = () =>\r\n DOM.matches(i.scrollbarX, ':focus') || DOM.matches(i.scrollbarY, ':focus');\r\n\r\n function shouldPreventDefault(deltaX, deltaY) {\r\n const scrollTop = Math.floor(element.scrollTop);\r\n if (deltaX === 0) {\r\n if (!i.scrollbarYActive) {\r\n return false;\r\n }\r\n if (\r\n (scrollTop === 0 && deltaY > 0) ||\r\n (scrollTop >= i.contentHeight - i.containerHeight && deltaY < 0)\r\n ) {\r\n return !i.settings.wheelPropagation;\r\n }\r\n }\r\n\r\n const scrollLeft = element.scrollLeft;\r\n if (deltaY === 0) {\r\n if (!i.scrollbarXActive) {\r\n return false;\r\n }\r\n if (\r\n (scrollLeft === 0 && deltaX < 0) ||\r\n (scrollLeft >= i.contentWidth - i.containerWidth && deltaX > 0)\r\n ) {\r\n return !i.settings.wheelPropagation;\r\n }\r\n }\r\n return true;\r\n }\r\n\r\n i.event.bind(i.ownerDocument, 'keydown', e => {\r\n if (\r\n (e.isDefaultPrevented && e.isDefaultPrevented()) ||\r\n e.defaultPrevented\r\n ) {\r\n return;\r\n }\r\n\r\n if (!elementHovered() && !scrollbarFocused()) {\r\n return;\r\n }\r\n\r\n let activeElement = document.activeElement\r\n ? document.activeElement\r\n : i.ownerDocument.activeElement;\r\n if (activeElement) {\r\n if (activeElement.tagName === 'IFRAME') {\r\n activeElement = activeElement.contentDocument.activeElement;\r\n } else {\r\n // go deeper if element is a webcomponent\r\n while (activeElement.shadowRoot) {\r\n activeElement = activeElement.shadowRoot.activeElement;\r\n }\r\n }\r\n if (isEditable(activeElement)) {\r\n return;\r\n }\r\n }\r\n\r\n let deltaX = 0;\r\n let deltaY = 0;\r\n\r\n switch (e.which) {\r\n case 37: // left\r\n if (e.metaKey) {\r\n deltaX = -i.contentWidth;\r\n } else if (e.altKey) {\r\n deltaX = -i.containerWidth;\r\n } else {\r\n deltaX = -30;\r\n }\r\n break;\r\n case 38: // up\r\n if (e.metaKey) {\r\n deltaY = i.contentHeight;\r\n } else if (e.altKey) {\r\n deltaY = i.containerHeight;\r\n } else {\r\n deltaY = 30;\r\n }\r\n break;\r\n case 39: // right\r\n if (e.metaKey) {\r\n deltaX = i.contentWidth;\r\n } else if (e.altKey) {\r\n deltaX = i.containerWidth;\r\n } else {\r\n deltaX = 30;\r\n }\r\n break;\r\n case 40: // down\r\n if (e.metaKey) {\r\n deltaY = -i.contentHeight;\r\n } else if (e.altKey) {\r\n deltaY = -i.containerHeight;\r\n } else {\r\n deltaY = -30;\r\n }\r\n break;\r\n case 32: // space bar\r\n if (e.shiftKey) {\r\n deltaY = i.containerHeight;\r\n } else {\r\n deltaY = -i.containerHeight;\r\n }\r\n break;\r\n case 33: // page up\r\n deltaY = i.containerHeight;\r\n break;\r\n case 34: // page down\r\n deltaY = -i.containerHeight;\r\n break;\r\n case 36: // home\r\n deltaY = i.contentHeight;\r\n break;\r\n case 35: // end\r\n deltaY = -i.contentHeight;\r\n break;\r\n default:\r\n return;\r\n }\r\n\r\n if (i.settings.suppressScrollX && deltaX !== 0) {\r\n return;\r\n }\r\n if (i.settings.suppressScrollY && deltaY !== 0) {\r\n return;\r\n }\r\n\r\n element.scrollTop -= deltaY;\r\n element.scrollLeft += deltaX;\r\n updateGeometry(i);\r\n\r\n if (shouldPreventDefault(deltaX, deltaY)) {\r\n e.preventDefault();\r\n }\r\n });\r\n}\r\n","import * as CSS from '../lib/css';\r\nimport cls from '../lib/class-names';\r\nimport updateGeometry from '../update-geometry';\r\nimport { env } from '../lib/util';\r\n\r\nexport default function(i) {\r\n const element = i.element;\r\n\r\n let shouldPrevent = false;\r\n\r\n function shouldPreventDefault(deltaX, deltaY) {\r\n const roundedScrollTop = Math.floor(element.scrollTop);\r\n const isTop = element.scrollTop === 0;\r\n const isBottom =\r\n roundedScrollTop + element.offsetHeight === element.scrollHeight;\r\n const isLeft = element.scrollLeft === 0;\r\n const isRight =\r\n element.scrollLeft + element.offsetWidth === element.scrollWidth;\r\n\r\n let hitsBound;\r\n\r\n // pick axis with primary direction\r\n if (Math.abs(deltaY) > Math.abs(deltaX)) {\r\n hitsBound = isTop || isBottom;\r\n } else {\r\n hitsBound = isLeft || isRight;\r\n }\r\n\r\n return hitsBound ? !i.settings.wheelPropagation : true;\r\n }\r\n\r\n function getDeltaFromEvent(e) {\r\n let deltaX = e.deltaX;\r\n let deltaY = -1 * e.deltaY;\r\n\r\n if (typeof deltaX === 'undefined' || typeof deltaY === 'undefined') {\r\n // OS X Safari\r\n deltaX = (-1 * e.wheelDeltaX) / 6;\r\n deltaY = e.wheelDeltaY / 6;\r\n }\r\n\r\n if (e.deltaMode && e.deltaMode === 1) {\r\n // Firefox in deltaMode 1: Line scrolling\r\n deltaX *= 10;\r\n deltaY *= 10;\r\n }\r\n\r\n if (deltaX !== deltaX && deltaY !== deltaY /* NaN checks */) {\r\n // IE in some mouse drivers\r\n deltaX = 0;\r\n deltaY = e.wheelDelta;\r\n }\r\n\r\n if (e.shiftKey) {\r\n // reverse axis with shift key\r\n return [-deltaY, -deltaX];\r\n }\r\n return [deltaX, deltaY];\r\n }\r\n\r\n function shouldBeConsumedByChild(target, deltaX, deltaY) {\r\n // FIXME: this is a workaround for issue in FF and IE #571\n if (!env.isWebKit && element.querySelector('select:focus')) {\n return true;\n }\n\n if (!element.contains(target)) {\n return false;\n }\n\n let cursor = target;\n\n while (cursor && cursor !== element) {\n if (cursor.classList.contains(cls.element.consuming)) {\n return true;\n }\n\n const style = CSS.get(cursor);\n\n // if deltaY && vertical scrollable\n if (deltaY && style.overflowY.match(/(scroll|auto)/)) {\n const maxScrollTop = cursor.scrollHeight - cursor.clientHeight;\n if (maxScrollTop > 0) {\n if (\n (cursor.scrollTop > 0 && deltaY < 0) ||\n (cursor.scrollTop < maxScrollTop && deltaY > 0)\n ) {\n return true;\n }\n }\n }\n // if deltaX && horizontal scrollable\n if (deltaX && style.overflowX.match(/(scroll|auto)/)) {\n const maxScrollLeft = cursor.scrollWidth - cursor.clientWidth;\n if (maxScrollLeft > 0) {\n if (\n (cursor.scrollLeft > 0 && deltaX < 0) ||\n (cursor.scrollLeft < maxScrollLeft && deltaX > 0)\n ) {\n return true;\n }\n }\n }\n\n cursor = cursor.parentNode;\n }\n\n return false;\n }\n\n function mousewheelHandler(e) {\n const [deltaX, deltaY] = getDeltaFromEvent(e);\n\n if (shouldBeConsumedByChild(e.target, deltaX, deltaY)) {\n return;\n }\n\n let shouldPrevent = false;\n if (!i.settings.useBothWheelAxes) {\n // deltaX will only be used for horizontal scrolling and deltaY will\n // only be used for vertical scrolling - this is the default\n element.scrollTop -= deltaY * i.settings.wheelSpeed;\n element.scrollLeft += deltaX * i.settings.wheelSpeed;\n } else if (i.scrollbarYActive && !i.scrollbarXActive) {\n // only vertical scrollbar is active and useBothWheelAxes option is\n // active, so let's scroll vertical bar using both mouse wheel axes\n if (deltaY) {\n element.scrollTop -= deltaY * i.settings.wheelSpeed;\n } else {\n element.scrollTop += deltaX * i.settings.wheelSpeed;\n }\n shouldPrevent = true;\n } else if (i.scrollbarXActive && !i.scrollbarYActive) {\n // useBothWheelAxes and only horizontal bar is active, so use both\n // wheel axes for horizontal bar\n if (deltaX) {\n element.scrollLeft += deltaX * i.settings.wheelSpeed;\n } else {\n element.scrollLeft -= deltaY * i.settings.wheelSpeed;\n }\n shouldPrevent = true;\n }\n\n updateGeometry(i);\n\n shouldPrevent = shouldPrevent || shouldPreventDefault(deltaX, deltaY);\n if (shouldPrevent && !e.ctrlKey) {\n e.stopPropagation();\n e.preventDefault();\n }\n }\n\n if (typeof window.onwheel !== 'undefined') {\n i.event.bind(element, 'wheel', mousewheelHandler);\n } else if (typeof window.onmousewheel !== 'undefined') {\n i.event.bind(element, 'mousewheel', mousewheelHandler);\n }\n}\n","import updateGeometry from '../update-geometry';\nimport cls from '../lib/class-names';\nimport * as CSS from '../lib/css';\nimport { env } from '../lib/util';\n\nexport default function(i) {\n if (!env.supportsTouch && !env.supportsIePointer) {\n return;\n }\n\n const element = i.element;\n\n function shouldPrevent(deltaX, deltaY) {\n const scrollTop = Math.floor(element.scrollTop);\n const scrollLeft = element.scrollLeft;\n const magnitudeX = Math.abs(deltaX);\n const magnitudeY = Math.abs(deltaY);\n\n if (magnitudeY > magnitudeX) {\n // user is perhaps trying to swipe up/down the page\n\n if (\n (deltaY < 0 && scrollTop === i.contentHeight - i.containerHeight) ||\n (deltaY > 0 && scrollTop === 0)\n ) {\n // set prevent for mobile Chrome refresh\n return window.scrollY === 0 && deltaY > 0 && env.isChrome;\n }\n } else if (magnitudeX > magnitudeY) {\n // user is perhaps trying to swipe left/right across the page\n\n if (\n (deltaX < 0 && scrollLeft === i.contentWidth - i.containerWidth) ||\n (deltaX > 0 && scrollLeft === 0)\n ) {\n return true;\n }\n }\n\n return true;\n }\n\n function applyTouchMove(differenceX, differenceY) {\n element.scrollTop -= differenceY;\n element.scrollLeft -= differenceX;\n\n updateGeometry(i);\n }\n\n let startOffset = {};\n let startTime = 0;\n let speed = {};\n let easingLoop = null;\n\n function getTouch(e) {\n if (e.targetTouches) {\n return e.targetTouches[0];\n } else {\n // Maybe IE pointer\n return e;\n }\n }\n\n function shouldHandle(e) {\n if (e.pointerType && e.pointerType === 'pen' && e.buttons === 0) {\n return false;\n }\n if (e.targetTouches && e.targetTouches.length === 1) {\n return true;\n }\n if (\n e.pointerType &&\n e.pointerType !== 'mouse' &&\n e.pointerType !== e.MSPOINTER_TYPE_MOUSE\n ) {\n return true;\n }\n return false;\n }\n\n function touchStart(e) {\n if (!shouldHandle(e)) {\n return;\n }\n\n const touch = getTouch(e);\n\n startOffset.pageX = touch.pageX;\n startOffset.pageY = touch.pageY;\n\n startTime = new Date().getTime();\n\n if (easingLoop !== null) {\n clearInterval(easingLoop);\n }\n }\n\n function shouldBeConsumedByChild(target, deltaX, deltaY) {\n if (!element.contains(target)) {\n return false;\n }\n\n let cursor = target;\n\n while (cursor && cursor !== element) {\n if (cursor.classList.contains(cls.element.consuming)) {\n return true;\n }\n\n const style = CSS.get(cursor);\n\n // if deltaY && vertical scrollable\n if (deltaY && style.overflowY.match(/(scroll|auto)/)) {\n const maxScrollTop = cursor.scrollHeight - cursor.clientHeight;\n if (maxScrollTop > 0) {\n if (\n (cursor.scrollTop > 0 && deltaY < 0) ||\n (cursor.scrollTop < maxScrollTop && deltaY > 0)\n ) {\n return true;\n }\n }\n }\n // if deltaX && horizontal scrollable\n if (deltaX && style.overflowX.match(/(scroll|auto)/)) {\n const maxScrollLeft = cursor.scrollWidth - cursor.clientWidth;\n if (maxScrollLeft > 0) {\n if (\n (cursor.scrollLeft > 0 && deltaX < 0) ||\n (cursor.scrollLeft < maxScrollLeft && deltaX > 0)\n ) {\n return true;\n }\n }\n }\n\n cursor = cursor.parentNode;\n }\n\n return false;\n }\n\n function touchMove(e) {\n if (shouldHandle(e)) {\n const touch = getTouch(e);\n\n const currentOffset = { pageX: touch.pageX, pageY: touch.pageY };\n\n const differenceX = currentOffset.pageX - startOffset.pageX;\n const differenceY = currentOffset.pageY - startOffset.pageY;\n\n if (shouldBeConsumedByChild(e.target, differenceX, differenceY)) {\n return;\n }\n\n applyTouchMove(differenceX, differenceY);\n startOffset = currentOffset;\n\n const currentTime = new Date().getTime();\n\n const timeGap = currentTime - startTime;\n if (timeGap > 0) {\n speed.x = differenceX / timeGap;\n speed.y = differenceY / timeGap;\n startTime = currentTime;\n }\n\n if (shouldPrevent(differenceX, differenceY)) {\n e.preventDefault();\n }\n }\n }\n function touchEnd() {\n if (i.settings.swipeEasing) {\n clearInterval(easingLoop);\n easingLoop = setInterval(function() {\n if (i.isInitialized) {\n clearInterval(easingLoop);\n return;\n }\n\n if (!speed.x && !speed.y) {\n clearInterval(easingLoop);\n return;\n }\n\n if (Math.abs(speed.x) < 0.01 && Math.abs(speed.y) < 0.01) {\n clearInterval(easingLoop);\n return;\n }\n\n if (!i.element) {\n clearInterval(easingLoop);\n return;\n }\n\n applyTouchMove(speed.x * 30, speed.y * 30);\n\n speed.x *= 0.8;\n speed.y *= 0.8;\n }, 10);\n }\n }\n\n if (env.supportsTouch) {\n i.event.bind(element, 'touchstart', touchStart);\n i.event.bind(element, 'touchmove', touchMove);\n i.event.bind(element, 'touchend', touchEnd);\n } else if (env.supportsIePointer) {\n if (window.PointerEvent) {\n i.event.bind(element, 'pointerdown', touchStart);\n i.event.bind(element, 'pointermove', touchMove);\n i.event.bind(element, 'pointerup', touchEnd);\n } else if (window.MSPointerEvent) {\n i.event.bind(element, 'MSPointerDown', touchStart);\n i.event.bind(element, 'MSPointerMove', touchMove);\n i.event.bind(element, 'MSPointerUp', touchEnd);\n }\n }\n}\n","import * as CSS from './lib/css';\nimport * as DOM from './lib/dom';\nimport cls from './lib/class-names';\nimport EventManager from './lib/event-manager';\nimport processScrollDiff from './process-scroll-diff';\nimport updateGeometry from './update-geometry';\nimport { toInt, outerWidth } from './lib/util';\n\nimport clickRail from './handlers/click-rail';\nimport dragThumb from './handlers/drag-thumb';\nimport keyboard from './handlers/keyboard';\nimport wheel from './handlers/mouse-wheel';\nimport touch from './handlers/touch';\n\nconst defaultSettings = () => ({\n handlers: ['click-rail', 'drag-thumb', 'keyboard', 'wheel', 'touch'],\n maxScrollbarLength: null,\n minScrollbarLength: null,\n scrollingThreshold: 1000,\n scrollXMarginOffset: 0,\n scrollYMarginOffset: 0,\n suppressScrollX: false,\n suppressScrollY: false,\n swipeEasing: true,\n useBothWheelAxes: false,\n wheelPropagation: true,\n wheelSpeed: 1,\n});\n\nconst handlers = {\n 'click-rail': clickRail,\n 'drag-thumb': dragThumb,\n keyboard,\n wheel,\n touch,\n};\n\nexport default class PerfectScrollbar {\n constructor(element, userSettings = {}) {\n if (typeof element === 'string') {\n element = document.querySelector(element);\n }\n\n if (!element || !element.nodeName) {\n throw new Error('no element is specified to initialize PerfectScrollbar');\n }\n\n this.element = element;\n\n element.classList.add(cls.main);\n\n this.settings = defaultSettings();\n for (const key in userSettings) {\n this.settings[key] = userSettings[key];\n }\n\n this.containerWidth = null;\n this.containerHeight = null;\n this.contentWidth = null;\n this.contentHeight = null;\n\n const focus = () => element.classList.add(cls.state.focus);\n const blur = () => element.classList.remove(cls.state.focus);\n\n this.isRtl = CSS.get(element).direction === 'rtl';\n if (this.isRtl === true) {\n element.classList.add(cls.rtl);\n }\n this.isNegativeScroll = (() => {\n const originalScrollLeft = element.scrollLeft;\n let result = null;\n element.scrollLeft = -1;\n result = element.scrollLeft < 0;\n element.scrollLeft = originalScrollLeft;\n return result;\n })();\n this.negativeScrollAdjustment = this.isNegativeScroll\n ? element.scrollWidth - element.clientWidth\n : 0;\n this.event = new EventManager();\n this.ownerDocument = element.ownerDocument || document;\n\n this.scrollbarXRail = DOM.div(cls.element.rail('x'));\n element.appendChild(this.scrollbarXRail);\n this.scrollbarX = DOM.div(cls.element.thumb('x'));\n this.scrollbarXRail.appendChild(this.scrollbarX);\n this.scrollbarX.setAttribute('tabindex', 0);\n this.event.bind(this.scrollbarX, 'focus', focus);\n this.event.bind(this.scrollbarX, 'blur', blur);\n this.scrollbarXActive = null;\n this.scrollbarXWidth = null;\n this.scrollbarXLeft = null;\n const railXStyle = CSS.get(this.scrollbarXRail);\n this.scrollbarXBottom = parseInt(railXStyle.bottom, 10);\n if (isNaN(this.scrollbarXBottom)) {\n this.isScrollbarXUsingBottom = false;\n this.scrollbarXTop = toInt(railXStyle.top);\n } else {\n this.isScrollbarXUsingBottom = true;\n }\n this.railBorderXWidth =\n toInt(railXStyle.borderLeftWidth) + toInt(railXStyle.borderRightWidth);\n // Set rail to display:block to calculate margins\n CSS.set(this.scrollbarXRail, { display: 'block' });\n this.railXMarginWidth =\n toInt(railXStyle.marginLeft) + toInt(railXStyle.marginRight);\n CSS.set(this.scrollbarXRail, { display: '' });\n this.railXWidth = null;\n this.railXRatio = null;\n\n this.scrollbarYRail = DOM.div(cls.element.rail('y'));\n element.appendChild(this.scrollbarYRail);\n this.scrollbarY = DOM.div(cls.element.thumb('y'));\n this.scrollbarYRail.appendChild(this.scrollbarY);\n this.scrollbarY.setAttribute('tabindex', 0);\n this.event.bind(this.scrollbarY, 'focus', focus);\n this.event.bind(this.scrollbarY, 'blur', blur);\n this.scrollbarYActive = null;\n this.scrollbarYHeight = null;\n this.scrollbarYTop = null;\n const railYStyle = CSS.get(this.scrollbarYRail);\n this.scrollbarYRight = parseInt(railYStyle.right, 10);\n if (isNaN(this.scrollbarYRight)) {\n this.isScrollbarYUsingRight = false;\n this.scrollbarYLeft = toInt(railYStyle.left);\n } else {\n this.isScrollbarYUsingRight = true;\n }\n this.scrollbarYOuterWidth = this.isRtl ? outerWidth(this.scrollbarY) : null;\n this.railBorderYWidth =\n toInt(railYStyle.borderTopWidth) + toInt(railYStyle.borderBottomWidth);\n CSS.set(this.scrollbarYRail, { display: 'block' });\n this.railYMarginHeight =\n toInt(railYStyle.marginTop) + toInt(railYStyle.marginBottom);\n CSS.set(this.scrollbarYRail, { display: '' });\n this.railYHeight = null;\n this.railYRatio = null;\n\n this.reach = {\n x:\n element.scrollLeft <= 0\n ? 'start'\n : element.scrollLeft >= this.contentWidth - this.containerWidth\n ? 'end'\n : null,\n y:\n element.scrollTop <= 0\n ? 'start'\n : element.scrollTop >= this.contentHeight - this.containerHeight\n ? 'end'\n : null,\n };\n\n this.isAlive = true;\n\n this.settings.handlers.forEach(handlerName => handlers[handlerName](this));\n\n this.lastScrollTop = Math.floor(element.scrollTop); // for onScroll only\n this.lastScrollLeft = element.scrollLeft; // for onScroll only\n this.event.bind(this.element, 'scroll', e => this.onScroll(e));\n updateGeometry(this);\n }\n\n update() {\n if (!this.isAlive) {\n return;\n }\n\n // Recalcuate negative scrollLeft adjustment\n this.negativeScrollAdjustment = this.isNegativeScroll\n ? this.element.scrollWidth - this.element.clientWidth\n : 0;\n\n // Recalculate rail margins\n CSS.set(this.scrollbarXRail, { display: 'block' });\n CSS.set(this.scrollbarYRail, { display: 'block' });\n this.railXMarginWidth =\n toInt(CSS.get(this.scrollbarXRail).marginLeft) +\n toInt(CSS.get(this.scrollbarXRail).marginRight);\n this.railYMarginHeight =\n toInt(CSS.get(this.scrollbarYRail).marginTop) +\n toInt(CSS.get(this.scrollbarYRail).marginBottom);\n\n // Hide scrollbars not to affect scrollWidth and scrollHeight\n CSS.set(this.scrollbarXRail, { display: 'none' });\n CSS.set(this.scrollbarYRail, { display: 'none' });\n\n updateGeometry(this);\n\n processScrollDiff(this, 'top', 0, false, true);\n processScrollDiff(this, 'left', 0, false, true);\n\n CSS.set(this.scrollbarXRail, { display: '' });\n CSS.set(this.scrollbarYRail, { display: '' });\n }\n\n onScroll(e) {\n if (!this.isAlive) {\n return;\n }\n\n updateGeometry(this);\n processScrollDiff(this, 'top', this.element.scrollTop - this.lastScrollTop);\n processScrollDiff(\n this,\n 'left',\n this.element.scrollLeft - this.lastScrollLeft\n );\n\n this.lastScrollTop = Math.floor(this.element.scrollTop);\n this.lastScrollLeft = this.element.scrollLeft;\n }\n\n destroy() {\n if (!this.isAlive) {\n return;\n }\n\n this.event.unbindAll();\n DOM.remove(this.scrollbarX);\n DOM.remove(this.scrollbarY);\n DOM.remove(this.scrollbarXRail);\n DOM.remove(this.scrollbarYRail);\n this.removePsClasses();\n\n // unset elements\n this.element = null;\n this.scrollbarX = null;\n this.scrollbarY = null;\n this.scrollbarXRail = null;\n this.scrollbarYRail = null;\n\n this.isAlive = false;\n }\n\n removePsClasses() {\n this.element.className = this.element.className\n .split(' ')\n .filter(name => !name.match(/^ps([-_].+|)$/))\n .join(' ');\n }\n}\n"],"names":["const","let","this","processScrollDiff","DOM.matches","CSS.get","DOM.queryChildren","DOM.remove","CSS.set","DOM.div"],"mappings":";;;;;;;;AAAO,SAAS,GAAG,CAAC,OAAO,EAAE;EAC3B,OAAO,gBAAgB,CAAC,OAAO,CAAC,CAAC;CAClC;;AAEM,SAAS,GAAG,CAAC,OAAO,EAAE,GAAG,EAAE;EAChC,KAAKA,IAAM,GAAG,IAAI,GAAG,EAAE;IACrBC,IAAI,GAAG,GAAG,GAAG,CAAC,GAAG,CAAC,CAAC;IACnB,IAAI,OAAO,GAAG,KAAK,QAAQ,EAAE;MAC3B,GAAG,GAAM,GAAG,OAAI,CAAC;KAClB;IACD,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC;GAC1B;EACD,OAAO,OAAO,CAAC;;;ACZV,SAAS,GAAG,CAAC,SAAS,EAAE;EAC7BD,IAAM,GAAG,GAAG,QAAQ,CAAC,aAAa,CAA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AAC,OAAO,CAAC,SAAS,CAAC,CAAC;EAC1D,IAAM,CAAC,cAAc,GAAG,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC;AAChD,EAAC;;AAEH,2BAAE,8BAAU;EACR,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE;IACjB,OAAO;GACR;;EAED,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE,CAAC;EACzBD,MAAY,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;EAC9BA,MAAY,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;EAC9BA,MAAY,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;EAClCA,MAAY,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;EAChC,IAAI,CAAC,eAAe,EAAE,CAAC;;;EAGvB,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;EACpB,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC;EACvB,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC;EACvB,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC;EAC3B,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC;;EAE3B,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;AACvB,EAAC;;AAEH,2BAAE,8CAAkB;EAClB,IAAM,CAAC,OAAO,CAAC,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,SAAS;KAC5C,KAAK,CAAC,GAAG,CAAC;KACV,MAAM,WAAC,MAAK,SAAG,CAAC,IAAI,CAAC,KAAK,CAAC,eAAe,IAAC,CAAC;KAC5C,IAAI,CAAC,GAAG,CAAC,CAAC;AACf,CAAC;;;;"} \ No newline at end of file diff --git a/dist/perfect-scrollbar.esm.js b/dist/perfect-scrollbar.esm.js index 4971423..4215b17 100644 --- a/dist/perfect-scrollbar.esm.js +++ b/dist/perfect-scrollbar.esm.js @@ -1,5 +1,5 @@ /*! - * perfect-scrollbar v1.5.2 + * perfect-scrollbar v1.5.3 * Copyright 2021 Hyunje Jun, MDBootstrap and Contributors * Licensed under MIT */ @@ -560,7 +560,9 @@ function bindMouseScrollHandler( updateGeometry(i); e.stopPropagation(); - e.preventDefault(); + if (e.type.startsWith('touch') && e.changedTouches.length > 1) { + e.preventDefault(); + } } function mouseUpHandler() { diff --git a/dist/perfect-scrollbar.esm.js.map b/dist/perfect-scrollbar.esm.js.map index 9c4a014..8a306e9 100644 --- a/dist/perfect-scrollbar.esm.js.map +++ b/dist/perfect-scrollbar.esm.js.map @@ -1 +1 @@ -{"version":3,"file":"perfect-scrollbar.esm.js","sources":["../src/lib/css.js","../src/lib/dom.js","../src/lib/class-names.js","../src/lib/event-manager.js","../src/process-scroll-diff.js","../src/lib/util.js","../src/update-geometry.js","../src/handlers/click-rail.js","../src/handlers/drag-thumb.js","../src/handlers/keyboard.js","../src/handlers/mouse-wheel.js","../src/handlers/touch.js","../src/index.js"],"sourcesContent":["export function get(element) {\r\n return getComputedStyle(element);\r\n}\r\n\r\nexport function set(element, obj) {\r\n for (const key in obj) {\r\n let val = obj[key];\r\n if (typeof val === 'number') {\r\n val = `${val}px`;\r\n }\r\n element.style[key] = val;\r\n }\r\n return element;\r\n}\r\n","export function div(className) {\r\n const div = document.createElement('div');\r\n div.className = className;\r\n return div;\r\n}\r\n\r\nconst elMatches =\r\n typeof Element !== 'undefined' &&\r\n (Element.prototype.matches ||\r\n Element.prototype.webkitMatchesSelector ||\r\n Element.prototype.mozMatchesSelector ||\r\n Element.prototype.msMatchesSelector);\r\n\r\nexport function matches(element, query) {\r\n if (!elMatches) {\r\n throw new Error('No element matching method supported');\r\n }\r\n\r\n return elMatches.call(element, query);\r\n}\r\n\r\nexport function remove(element) {\r\n if (element.remove) {\r\n element.remove();\r\n } else {\r\n if (element.parentNode) {\r\n element.parentNode.removeChild(element);\r\n }\r\n }\r\n}\r\n\r\nexport function queryChildren(element, selector) {\r\n return Array.prototype.filter.call(element.children, child =>\r\n matches(child, selector)\r\n );\r\n}\r\n","const cls = {\r\n main: 'ps',\r\n rtl: 'ps__rtl',\r\n element: {\r\n thumb: x => `ps__thumb-${x}`,\r\n rail: x => `ps__rail-${x}`,\r\n consuming: 'ps__child--consume',\r\n },\r\n state: {\r\n focus: 'ps--focus',\r\n clicking: 'ps--clicking',\r\n active: x => `ps--active-${x}`,\r\n scrolling: x => `ps--scrolling-${x}`,\r\n },\r\n};\r\n\r\nexport default cls;\r\n\r\n/*\r\n * Helper methods\r\n */\r\nconst scrollingClassTimeout = { x: null, y: null };\r\n\r\nexport function addScrollingClass(i, x) {\r\n const classList = i.element.classList;\r\n const className = cls.state.scrolling(x);\r\n\r\n if (classList.contains(className)) {\r\n clearTimeout(scrollingClassTimeout[x]);\r\n } else {\r\n classList.add(className);\r\n }\r\n}\r\n\r\nexport function removeScrollingClass(i, x) {\r\n scrollingClassTimeout[x] = setTimeout(\r\n () => i.isAlive && i.element.classList.remove(cls.state.scrolling(x)),\r\n i.settings.scrollingThreshold\r\n );\r\n}\r\n\r\nexport function setScrollingClassInstantly(i, x) {\r\n addScrollingClass(i, x);\r\n removeScrollingClass(i, x);\r\n}\r\n","class EventElement {\r\n constructor(element) {\r\n this.element = element;\r\n this.handlers = {};\r\n }\r\n\r\n bind(eventName, handler) {\r\n if (typeof this.handlers[eventName] === 'undefined') {\r\n this.handlers[eventName] = [];\r\n }\r\n this.handlers[eventName].push(handler);\r\n this.element.addEventListener(eventName, handler, false);\r\n }\r\n\r\n unbind(eventName, target) {\r\n this.handlers[eventName] = this.handlers[eventName].filter(handler => {\r\n if (target && handler !== target) {\r\n return true;\r\n }\r\n this.element.removeEventListener(eventName, handler, false);\r\n return false;\r\n });\r\n }\r\n\r\n unbindAll() {\r\n for (const name in this.handlers) {\r\n this.unbind(name);\r\n }\r\n }\r\n\r\n get isEmpty() {\r\n return Object.keys(this.handlers).every(\r\n key => this.handlers[key].length === 0\r\n );\r\n }\r\n}\r\n\r\nexport default class EventManager {\r\n constructor() {\r\n this.eventElements = [];\r\n }\r\n\r\n eventElement(element) {\r\n let ee = this.eventElements.filter(ee => ee.element === element)[0];\r\n if (!ee) {\r\n ee = new EventElement(element);\r\n this.eventElements.push(ee);\r\n }\r\n return ee;\r\n }\r\n\r\n bind(element, eventName, handler) {\r\n this.eventElement(element).bind(eventName, handler);\r\n }\r\n\r\n unbind(element, eventName, handler) {\r\n const ee = this.eventElement(element);\r\n ee.unbind(eventName, handler);\r\n\r\n if (ee.isEmpty) {\r\n // remove\r\n this.eventElements.splice(this.eventElements.indexOf(ee), 1);\r\n }\r\n }\r\n\r\n unbindAll() {\r\n this.eventElements.forEach(e => e.unbindAll());\r\n this.eventElements = [];\r\n }\r\n\r\n once(element, eventName, handler) {\r\n const ee = this.eventElement(element);\r\n const onceHandler = evt => {\r\n ee.unbind(eventName, onceHandler);\r\n handler(evt);\r\n };\r\n ee.bind(eventName, onceHandler);\r\n }\r\n}\r\n","import { setScrollingClassInstantly } from './lib/class-names';\r\n\r\nfunction createEvent(name) {\r\n if (typeof window.CustomEvent === 'function') {\r\n return new CustomEvent(name);\r\n } else {\r\n const evt = document.createEvent('CustomEvent');\r\n evt.initCustomEvent(name, false, false, undefined);\r\n return evt;\r\n }\r\n}\r\n\r\nexport default function(\r\n i,\r\n axis,\r\n diff,\r\n useScrollingClass = true,\r\n forceFireReachEvent = false\r\n) {\r\n let fields;\r\n if (axis === 'top') {\r\n fields = [\r\n 'contentHeight',\r\n 'containerHeight',\r\n 'scrollTop',\r\n 'y',\r\n 'up',\r\n 'down',\r\n ];\r\n } else if (axis === 'left') {\r\n fields = [\r\n 'contentWidth',\r\n 'containerWidth',\r\n 'scrollLeft',\r\n 'x',\r\n 'left',\r\n 'right',\r\n ];\r\n } else {\r\n throw new Error('A proper axis should be provided');\r\n }\r\n\r\n processScrollDiff(i, diff, fields, useScrollingClass, forceFireReachEvent);\r\n}\r\n\r\nfunction processScrollDiff(\r\n i,\r\n diff,\r\n [contentHeight, containerHeight, scrollTop, y, up, down],\r\n useScrollingClass = true,\r\n forceFireReachEvent = false\r\n) {\r\n const element = i.element;\r\n\r\n // reset reach\r\n i.reach[y] = null;\r\n\r\n // 1 for subpixel rounding\r\n if (element[scrollTop] < 1) {\r\n i.reach[y] = 'start';\r\n }\r\n\r\n // 1 for subpixel rounding\r\n if (element[scrollTop] > i[contentHeight] - i[containerHeight] - 1) {\r\n i.reach[y] = 'end';\r\n }\r\n\r\n if (diff) {\r\n element.dispatchEvent(createEvent(`ps-scroll-${y}`));\r\n\r\n if (diff < 0) {\r\n element.dispatchEvent(createEvent(`ps-scroll-${up}`));\r\n } else if (diff > 0) {\r\n element.dispatchEvent(createEvent(`ps-scroll-${down}`));\r\n }\r\n\r\n if (useScrollingClass) {\r\n setScrollingClassInstantly(i, y);\r\n }\r\n }\r\n\r\n if (i.reach[y] && (diff || forceFireReachEvent)) {\r\n element.dispatchEvent(createEvent(`ps-${y}-reach-${i.reach[y]}`));\r\n }\r\n}\r\n","import * as CSS from './css';\r\nimport * as DOM from './dom';\r\n\r\nexport function toInt(x) {\r\n return parseInt(x, 10) || 0;\r\n}\r\n\r\nexport function isEditable(el) {\r\n return (\r\n DOM.matches(el, 'input,[contenteditable]') ||\r\n DOM.matches(el, 'select,[contenteditable]') ||\r\n DOM.matches(el, 'textarea,[contenteditable]') ||\r\n DOM.matches(el, 'button,[contenteditable]')\r\n );\r\n}\r\n\r\nexport function outerWidth(element) {\r\n const styles = CSS.get(element);\r\n return (\r\n toInt(styles.width) +\r\n toInt(styles.paddingLeft) +\r\n toInt(styles.paddingRight) +\r\n toInt(styles.borderLeftWidth) +\r\n toInt(styles.borderRightWidth)\r\n );\r\n}\r\n\r\nexport const env = {\r\n isWebKit:\r\n typeof document !== 'undefined' &&\r\n 'WebkitAppearance' in document.documentElement.style,\r\n supportsTouch:\r\n typeof window !== 'undefined' &&\r\n ('ontouchstart' in window ||\r\n ('maxTouchPoints' in window.navigator &&\r\n window.navigator.maxTouchPoints > 0) ||\r\n (window.DocumentTouch && document instanceof window.DocumentTouch)),\r\n supportsIePointer:\r\n typeof navigator !== 'undefined' && navigator.msMaxTouchPoints,\r\n isChrome:\r\n typeof navigator !== 'undefined' &&\r\n /Chrome/i.test(navigator && navigator.userAgent),\r\n};\r\n","import * as CSS from './lib/css';\r\nimport * as DOM from './lib/dom';\r\nimport cls from './lib/class-names';\r\nimport { toInt } from './lib/util';\r\n\r\nexport default function(i) {\r\n const element = i.element;\r\n const roundedScrollTop = Math.floor(element.scrollTop);\r\n const rect = element.getBoundingClientRect();\r\n\r\n i.containerWidth = Math.round(rect.width);\r\n i.containerHeight = Math.round(rect.height);\r\n\r\n i.contentWidth = element.scrollWidth;\r\n i.contentHeight = element.scrollHeight;\r\n\r\n if (!element.contains(i.scrollbarXRail)) {\r\n // clean up and append\r\n DOM.queryChildren(element, cls.element.rail('x')).forEach(el =>\r\n DOM.remove(el)\r\n );\r\n element.appendChild(i.scrollbarXRail);\r\n }\r\n if (!element.contains(i.scrollbarYRail)) {\r\n // clean up and append\r\n DOM.queryChildren(element, cls.element.rail('y')).forEach(el =>\r\n DOM.remove(el)\r\n );\r\n element.appendChild(i.scrollbarYRail);\r\n }\r\n\r\n if (\r\n !i.settings.suppressScrollX &&\r\n i.containerWidth + i.settings.scrollXMarginOffset < i.contentWidth\r\n ) {\r\n i.scrollbarXActive = true;\r\n i.railXWidth = i.containerWidth - i.railXMarginWidth;\r\n i.railXRatio = i.containerWidth / i.railXWidth;\r\n i.scrollbarXWidth = getThumbSize(\r\n i,\r\n toInt((i.railXWidth * i.containerWidth) / i.contentWidth)\r\n );\r\n i.scrollbarXLeft = toInt(\r\n ((i.negativeScrollAdjustment + element.scrollLeft) *\r\n (i.railXWidth - i.scrollbarXWidth)) /\r\n (i.contentWidth - i.containerWidth)\r\n );\r\n } else {\r\n i.scrollbarXActive = false;\r\n }\r\n\r\n if (\r\n !i.settings.suppressScrollY &&\r\n i.containerHeight + i.settings.scrollYMarginOffset < i.contentHeight\r\n ) {\r\n i.scrollbarYActive = true;\r\n i.railYHeight = i.containerHeight - i.railYMarginHeight;\r\n i.railYRatio = i.containerHeight / i.railYHeight;\r\n i.scrollbarYHeight = getThumbSize(\r\n i,\r\n toInt((i.railYHeight * i.containerHeight) / i.contentHeight)\r\n );\r\n i.scrollbarYTop = toInt(\r\n (roundedScrollTop * (i.railYHeight - i.scrollbarYHeight)) /\r\n (i.contentHeight - i.containerHeight)\r\n );\r\n } else {\r\n i.scrollbarYActive = false;\r\n }\r\n\r\n if (i.scrollbarXLeft >= i.railXWidth - i.scrollbarXWidth) {\r\n i.scrollbarXLeft = i.railXWidth - i.scrollbarXWidth;\r\n }\r\n if (i.scrollbarYTop >= i.railYHeight - i.scrollbarYHeight) {\r\n i.scrollbarYTop = i.railYHeight - i.scrollbarYHeight;\r\n }\r\n\r\n updateCss(element, i);\r\n\r\n if (i.scrollbarXActive) {\r\n element.classList.add(cls.state.active('x'));\r\n } else {\r\n element.classList.remove(cls.state.active('x'));\r\n i.scrollbarXWidth = 0;\r\n i.scrollbarXLeft = 0;\r\n element.scrollLeft = i.isRtl === true ? i.contentWidth : 0;\r\n }\r\n if (i.scrollbarYActive) {\r\n element.classList.add(cls.state.active('y'));\r\n } else {\r\n element.classList.remove(cls.state.active('y'));\r\n i.scrollbarYHeight = 0;\r\n i.scrollbarYTop = 0;\r\n element.scrollTop = 0;\r\n }\r\n}\r\n\r\nfunction getThumbSize(i, thumbSize) {\r\n if (i.settings.minScrollbarLength) {\r\n thumbSize = Math.max(thumbSize, i.settings.minScrollbarLength);\r\n }\r\n if (i.settings.maxScrollbarLength) {\r\n thumbSize = Math.min(thumbSize, i.settings.maxScrollbarLength);\r\n }\r\n return thumbSize;\r\n}\r\n\r\nfunction updateCss(element, i) {\r\n const xRailOffset = { width: i.railXWidth };\r\n const roundedScrollTop = Math.floor(element.scrollTop);\r\n\r\n if (i.isRtl) {\r\n xRailOffset.left =\r\n i.negativeScrollAdjustment +\r\n element.scrollLeft +\r\n i.containerWidth -\r\n i.contentWidth;\r\n } else {\r\n xRailOffset.left = element.scrollLeft;\r\n }\r\n if (i.isScrollbarXUsingBottom) {\r\n xRailOffset.bottom = i.scrollbarXBottom - roundedScrollTop;\r\n } else {\r\n xRailOffset.top = i.scrollbarXTop + roundedScrollTop;\r\n }\r\n CSS.set(i.scrollbarXRail, xRailOffset);\r\n\r\n const yRailOffset = { top: roundedScrollTop, height: i.railYHeight };\r\n if (i.isScrollbarYUsingRight) {\r\n if (i.isRtl) {\r\n yRailOffset.right =\r\n i.contentWidth -\r\n (i.negativeScrollAdjustment + element.scrollLeft) -\r\n i.scrollbarYRight -\r\n i.scrollbarYOuterWidth -\r\n 9;\r\n } else {\r\n yRailOffset.right = i.scrollbarYRight - element.scrollLeft;\r\n }\r\n } else {\r\n if (i.isRtl) {\r\n yRailOffset.left =\r\n i.negativeScrollAdjustment +\r\n element.scrollLeft +\r\n i.containerWidth * 2 -\r\n i.contentWidth -\r\n i.scrollbarYLeft -\r\n i.scrollbarYOuterWidth;\r\n } else {\r\n yRailOffset.left = i.scrollbarYLeft + element.scrollLeft;\r\n }\r\n }\r\n CSS.set(i.scrollbarYRail, yRailOffset);\r\n\r\n CSS.set(i.scrollbarX, {\r\n left: i.scrollbarXLeft,\r\n width: i.scrollbarXWidth - i.railBorderXWidth,\r\n });\r\n CSS.set(i.scrollbarY, {\r\n top: i.scrollbarYTop,\r\n height: i.scrollbarYHeight - i.railBorderYWidth,\r\n });\r\n}\r\n","import updateGeometry from '../update-geometry';\r\n\r\nexport default function(i) {\r\n const element = i.element;\r\n\r\n i.event.bind(i.scrollbarY, 'mousedown', e => e.stopPropagation());\r\n i.event.bind(i.scrollbarYRail, 'mousedown', e => {\r\n const positionTop =\r\n e.pageY -\r\n window.pageYOffset -\r\n i.scrollbarYRail.getBoundingClientRect().top;\r\n const direction = positionTop > i.scrollbarYTop ? 1 : -1;\r\n\r\n i.element.scrollTop += direction * i.containerHeight;\r\n updateGeometry(i);\r\n\r\n e.stopPropagation();\r\n });\r\n\r\n i.event.bind(i.scrollbarX, 'mousedown', e => e.stopPropagation());\r\n i.event.bind(i.scrollbarXRail, 'mousedown', e => {\r\n const positionLeft =\r\n e.pageX -\r\n window.pageXOffset -\r\n i.scrollbarXRail.getBoundingClientRect().left;\r\n const direction = positionLeft > i.scrollbarXLeft ? 1 : -1;\r\n\r\n i.element.scrollLeft += direction * i.containerWidth;\r\n updateGeometry(i);\r\n\r\n e.stopPropagation();\r\n });\r\n}\r\n","import * as CSS from '../lib/css';\r\nimport * as DOM from '../lib/dom';\r\nimport cls, {\r\n addScrollingClass,\r\n removeScrollingClass,\r\n} from '../lib/class-names';\r\nimport updateGeometry from '../update-geometry';\r\nimport { toInt } from '../lib/util';\r\n\r\nexport default function(i) {\r\n bindMouseScrollHandler(i, [\r\n 'containerWidth',\r\n 'contentWidth',\r\n 'pageX',\r\n 'railXWidth',\r\n 'scrollbarX',\r\n 'scrollbarXWidth',\r\n 'scrollLeft',\r\n 'x',\r\n 'scrollbarXRail',\r\n ]);\r\n bindMouseScrollHandler(i, [\r\n 'containerHeight',\r\n 'contentHeight',\r\n 'pageY',\r\n 'railYHeight',\r\n 'scrollbarY',\r\n 'scrollbarYHeight',\r\n 'scrollTop',\r\n 'y',\r\n 'scrollbarYRail',\r\n ]);\r\n}\r\n\r\nfunction bindMouseScrollHandler(\r\n i,\r\n [\r\n containerHeight,\r\n contentHeight,\r\n pageY,\r\n railYHeight,\r\n scrollbarY,\r\n scrollbarYHeight,\r\n scrollTop,\r\n y,\r\n scrollbarYRail,\r\n ]\r\n) {\r\n const element = i.element;\r\n\r\n let startingScrollTop = null;\r\n let startingMousePageY = null;\r\n let scrollBy = null;\r\n\r\n function mouseMoveHandler(e) {\r\n if (e.touches && e.touches[0]) {\r\n e[pageY] = e.touches[0].pageY;\r\n }\r\n element[scrollTop] =\r\n startingScrollTop + scrollBy * (e[pageY] - startingMousePageY);\r\n addScrollingClass(i, y);\r\n updateGeometry(i);\r\n\r\n e.stopPropagation();\r\n e.preventDefault();\r\n }\r\n\r\n function mouseUpHandler() {\r\n removeScrollingClass(i, y);\r\n i[scrollbarYRail].classList.remove(cls.state.clicking);\r\n i.event.unbind(i.ownerDocument, 'mousemove', mouseMoveHandler);\r\n }\r\n\r\n function bindMoves(e, touchMode) {\r\n startingScrollTop = element[scrollTop];\r\n if (touchMode && e.touches) {\r\n e[pageY] = e.touches[0].pageY;\r\n }\r\n startingMousePageY = e[pageY];\r\n scrollBy =\r\n (i[contentHeight] - i[containerHeight]) /\r\n (i[railYHeight] - i[scrollbarYHeight]);\r\n if (!touchMode) {\r\n i.event.bind(i.ownerDocument, 'mousemove', mouseMoveHandler);\r\n i.event.once(i.ownerDocument, 'mouseup', mouseUpHandler);\r\n e.preventDefault();\r\n } else {\r\n i.event.bind(i.ownerDocument, 'touchmove', mouseMoveHandler);\r\n }\r\n\r\n i[scrollbarYRail].classList.add(cls.state.clicking);\r\n\r\n e.stopPropagation();\r\n }\r\n\r\n i.event.bind(i[scrollbarY], 'mousedown', e => {\r\n bindMoves(e);\r\n });\r\n i.event.bind(i[scrollbarY], 'touchstart', e => {\r\n bindMoves(e, true);\r\n });\r\n}\r\n","import * as DOM from '../lib/dom';\r\nimport updateGeometry from '../update-geometry';\r\nimport { isEditable } from '../lib/util';\r\n\r\nexport default function(i) {\r\n const element = i.element;\r\n\r\n const elementHovered = () => DOM.matches(element, ':hover');\r\n const scrollbarFocused = () =>\r\n DOM.matches(i.scrollbarX, ':focus') || DOM.matches(i.scrollbarY, ':focus');\r\n\r\n function shouldPreventDefault(deltaX, deltaY) {\r\n const scrollTop = Math.floor(element.scrollTop);\r\n if (deltaX === 0) {\r\n if (!i.scrollbarYActive) {\r\n return false;\r\n }\r\n if (\r\n (scrollTop === 0 && deltaY > 0) ||\r\n (scrollTop >= i.contentHeight - i.containerHeight && deltaY < 0)\r\n ) {\r\n return !i.settings.wheelPropagation;\r\n }\r\n }\r\n\r\n const scrollLeft = element.scrollLeft;\r\n if (deltaY === 0) {\r\n if (!i.scrollbarXActive) {\r\n return false;\r\n }\r\n if (\r\n (scrollLeft === 0 && deltaX < 0) ||\r\n (scrollLeft >= i.contentWidth - i.containerWidth && deltaX > 0)\r\n ) {\r\n return !i.settings.wheelPropagation;\r\n }\r\n }\r\n return true;\r\n }\r\n\r\n i.event.bind(i.ownerDocument, 'keydown', e => {\r\n if (\r\n (e.isDefaultPrevented && e.isDefaultPrevented()) ||\r\n e.defaultPrevented\r\n ) {\r\n return;\r\n }\r\n\r\n if (!elementHovered() && !scrollbarFocused()) {\r\n return;\r\n }\r\n\r\n let activeElement = document.activeElement\r\n ? document.activeElement\r\n : i.ownerDocument.activeElement;\r\n if (activeElement) {\r\n if (activeElement.tagName === 'IFRAME') {\r\n activeElement = activeElement.contentDocument.activeElement;\r\n } else {\r\n // go deeper if element is a webcomponent\r\n while (activeElement.shadowRoot) {\r\n activeElement = activeElement.shadowRoot.activeElement;\r\n }\r\n }\r\n if (isEditable(activeElement)) {\r\n return;\r\n }\r\n }\r\n\r\n let deltaX = 0;\r\n let deltaY = 0;\r\n\r\n switch (e.which) {\r\n case 37: // left\r\n if (e.metaKey) {\r\n deltaX = -i.contentWidth;\r\n } else if (e.altKey) {\r\n deltaX = -i.containerWidth;\r\n } else {\r\n deltaX = -30;\r\n }\r\n break;\r\n case 38: // up\r\n if (e.metaKey) {\r\n deltaY = i.contentHeight;\r\n } else if (e.altKey) {\r\n deltaY = i.containerHeight;\r\n } else {\r\n deltaY = 30;\r\n }\r\n break;\r\n case 39: // right\r\n if (e.metaKey) {\r\n deltaX = i.contentWidth;\r\n } else if (e.altKey) {\r\n deltaX = i.containerWidth;\r\n } else {\r\n deltaX = 30;\r\n }\r\n break;\r\n case 40: // down\r\n if (e.metaKey) {\r\n deltaY = -i.contentHeight;\r\n } else if (e.altKey) {\r\n deltaY = -i.containerHeight;\r\n } else {\r\n deltaY = -30;\r\n }\r\n break;\r\n case 32: // space bar\r\n if (e.shiftKey) {\r\n deltaY = i.containerHeight;\r\n } else {\r\n deltaY = -i.containerHeight;\r\n }\r\n break;\r\n case 33: // page up\r\n deltaY = i.containerHeight;\r\n break;\r\n case 34: // page down\r\n deltaY = -i.containerHeight;\r\n break;\r\n case 36: // home\r\n deltaY = i.contentHeight;\r\n break;\r\n case 35: // end\r\n deltaY = -i.contentHeight;\r\n break;\r\n default:\r\n return;\r\n }\r\n\r\n if (i.settings.suppressScrollX && deltaX !== 0) {\r\n return;\r\n }\r\n if (i.settings.suppressScrollY && deltaY !== 0) {\r\n return;\r\n }\r\n\r\n element.scrollTop -= deltaY;\r\n element.scrollLeft += deltaX;\r\n updateGeometry(i);\r\n\r\n if (shouldPreventDefault(deltaX, deltaY)) {\r\n e.preventDefault();\r\n }\r\n });\r\n}\r\n","import * as CSS from '../lib/css';\r\nimport cls from '../lib/class-names';\r\nimport updateGeometry from '../update-geometry';\r\nimport { env } from '../lib/util';\r\n\r\nexport default function(i) {\r\n const element = i.element;\r\n\r\n let shouldPrevent = false;\r\n\r\n function shouldPreventDefault(deltaX, deltaY) {\r\n const roundedScrollTop = Math.floor(element.scrollTop);\r\n const isTop = element.scrollTop === 0;\r\n const isBottom =\r\n roundedScrollTop + element.offsetHeight === element.scrollHeight;\r\n const isLeft = element.scrollLeft === 0;\r\n const isRight =\r\n element.scrollLeft + element.offsetWidth === element.scrollWidth;\r\n\r\n let hitsBound;\r\n\r\n // pick axis with primary direction\r\n if (Math.abs(deltaY) > Math.abs(deltaX)) {\r\n hitsBound = isTop || isBottom;\r\n } else {\r\n hitsBound = isLeft || isRight;\r\n }\r\n\r\n return hitsBound ? !i.settings.wheelPropagation : true;\r\n }\r\n\r\n function getDeltaFromEvent(e) {\r\n let deltaX = e.deltaX;\r\n let deltaY = -1 * e.deltaY;\r\n\r\n if (typeof deltaX === 'undefined' || typeof deltaY === 'undefined') {\r\n // OS X Safari\r\n deltaX = (-1 * e.wheelDeltaX) / 6;\r\n deltaY = e.wheelDeltaY / 6;\r\n }\r\n\r\n if (e.deltaMode && e.deltaMode === 1) {\r\n // Firefox in deltaMode 1: Line scrolling\r\n deltaX *= 10;\r\n deltaY *= 10;\r\n }\r\n\r\n if (deltaX !== deltaX && deltaY !== deltaY /* NaN checks */) {\r\n // IE in some mouse drivers\r\n deltaX = 0;\r\n deltaY = e.wheelDelta;\r\n }\r\n\r\n if (e.shiftKey) {\r\n // reverse axis with shift key\r\n return [-deltaY, -deltaX];\r\n }\r\n return [deltaX, deltaY];\r\n }\r\n\r\n function shouldBeConsumedByChild(target, deltaX, deltaY) {\r\n // FIXME: this is a workaround for issue in FF and IE #571\n if (!env.isWebKit && element.querySelector('select:focus')) {\n return true;\n }\n\n if (!element.contains(target)) {\n return false;\n }\n\n let cursor = target;\n\n while (cursor && cursor !== element) {\n if (cursor.classList.contains(cls.element.consuming)) {\n return true;\n }\n\n const style = CSS.get(cursor);\n\n // if deltaY && vertical scrollable\n if (deltaY && style.overflowY.match(/(scroll|auto)/)) {\n const maxScrollTop = cursor.scrollHeight - cursor.clientHeight;\n if (maxScrollTop > 0) {\n if (\n (cursor.scrollTop > 0 && deltaY < 0) ||\n (cursor.scrollTop < maxScrollTop && deltaY > 0)\n ) {\n return true;\n }\n }\n }\n // if deltaX && horizontal scrollable\n if (deltaX && style.overflowX.match(/(scroll|auto)/)) {\n const maxScrollLeft = cursor.scrollWidth - cursor.clientWidth;\n if (maxScrollLeft > 0) {\n if (\n (cursor.scrollLeft > 0 && deltaX < 0) ||\n (cursor.scrollLeft < maxScrollLeft && deltaX > 0)\n ) {\n return true;\n }\n }\n }\n\n cursor = cursor.parentNode;\n }\n\n return false;\n }\n\n function mousewheelHandler(e) {\n const [deltaX, deltaY] = getDeltaFromEvent(e);\n\n if (shouldBeConsumedByChild(e.target, deltaX, deltaY)) {\n return;\n }\n\n let shouldPrevent = false;\n if (!i.settings.useBothWheelAxes) {\n // deltaX will only be used for horizontal scrolling and deltaY will\n // only be used for vertical scrolling - this is the default\n element.scrollTop -= deltaY * i.settings.wheelSpeed;\n element.scrollLeft += deltaX * i.settings.wheelSpeed;\n } else if (i.scrollbarYActive && !i.scrollbarXActive) {\n // only vertical scrollbar is active and useBothWheelAxes option is\n // active, so let's scroll vertical bar using both mouse wheel axes\n if (deltaY) {\n element.scrollTop -= deltaY * i.settings.wheelSpeed;\n } else {\n element.scrollTop += deltaX * i.settings.wheelSpeed;\n }\n shouldPrevent = true;\n } else if (i.scrollbarXActive && !i.scrollbarYActive) {\n // useBothWheelAxes and only horizontal bar is active, so use both\n // wheel axes for horizontal bar\n if (deltaX) {\n element.scrollLeft += deltaX * i.settings.wheelSpeed;\n } else {\n element.scrollLeft -= deltaY * i.settings.wheelSpeed;\n }\n shouldPrevent = true;\n }\n\n updateGeometry(i);\n\n shouldPrevent = shouldPrevent || shouldPreventDefault(deltaX, deltaY);\n if (shouldPrevent && !e.ctrlKey) {\n e.stopPropagation();\n e.preventDefault();\n }\n }\n\n if (typeof window.onwheel !== 'undefined') {\n i.event.bind(element, 'wheel', mousewheelHandler);\n } else if (typeof window.onmousewheel !== 'undefined') {\n i.event.bind(element, 'mousewheel', mousewheelHandler);\n }\n}\n","import updateGeometry from '../update-geometry';\nimport cls from '../lib/class-names';\nimport * as CSS from '../lib/css';\nimport { env } from '../lib/util';\n\nexport default function(i) {\n if (!env.supportsTouch && !env.supportsIePointer) {\n return;\n }\n\n const element = i.element;\n\n function shouldPrevent(deltaX, deltaY) {\n const scrollTop = Math.floor(element.scrollTop);\n const scrollLeft = element.scrollLeft;\n const magnitudeX = Math.abs(deltaX);\n const magnitudeY = Math.abs(deltaY);\n\n if (magnitudeY > magnitudeX) {\n // user is perhaps trying to swipe up/down the page\n\n if (\n (deltaY < 0 && scrollTop === i.contentHeight - i.containerHeight) ||\n (deltaY > 0 && scrollTop === 0)\n ) {\n // set prevent for mobile Chrome refresh\n return window.scrollY === 0 && deltaY > 0 && env.isChrome;\n }\n } else if (magnitudeX > magnitudeY) {\n // user is perhaps trying to swipe left/right across the page\n\n if (\n (deltaX < 0 && scrollLeft === i.contentWidth - i.containerWidth) ||\n (deltaX > 0 && scrollLeft === 0)\n ) {\n return true;\n }\n }\n\n return true;\n }\n\n function applyTouchMove(differenceX, differenceY) {\n element.scrollTop -= differenceY;\n element.scrollLeft -= differenceX;\n\n updateGeometry(i);\n }\n\n let startOffset = {};\n let startTime = 0;\n let speed = {};\n let easingLoop = null;\n\n function getTouch(e) {\n if (e.targetTouches) {\n return e.targetTouches[0];\n } else {\n // Maybe IE pointer\n return e;\n }\n }\n\n function shouldHandle(e) {\n if (e.pointerType && e.pointerType === 'pen' && e.buttons === 0) {\n return false;\n }\n if (e.targetTouches && e.targetTouches.length === 1) {\n return true;\n }\n if (\n e.pointerType &&\n e.pointerType !== 'mouse' &&\n e.pointerType !== e.MSPOINTER_TYPE_MOUSE\n ) {\n return true;\n }\n return false;\n }\n\n function touchStart(e) {\n if (!shouldHandle(e)) {\n return;\n }\n\n const touch = getTouch(e);\n\n startOffset.pageX = touch.pageX;\n startOffset.pageY = touch.pageY;\n\n startTime = new Date().getTime();\n\n if (easingLoop !== null) {\n clearInterval(easingLoop);\n }\n }\n\n function shouldBeConsumedByChild(target, deltaX, deltaY) {\n if (!element.contains(target)) {\n return false;\n }\n\n let cursor = target;\n\n while (cursor && cursor !== element) {\n if (cursor.classList.contains(cls.element.consuming)) {\n return true;\n }\n\n const style = CSS.get(cursor);\n\n // if deltaY && vertical scrollable\n if (deltaY && style.overflowY.match(/(scroll|auto)/)) {\n const maxScrollTop = cursor.scrollHeight - cursor.clientHeight;\n if (maxScrollTop > 0) {\n if (\n (cursor.scrollTop > 0 && deltaY < 0) ||\n (cursor.scrollTop < maxScrollTop && deltaY > 0)\n ) {\n return true;\n }\n }\n }\n // if deltaX && horizontal scrollable\n if (deltaX && style.overflowX.match(/(scroll|auto)/)) {\n const maxScrollLeft = cursor.scrollWidth - cursor.clientWidth;\n if (maxScrollLeft > 0) {\n if (\n (cursor.scrollLeft > 0 && deltaX < 0) ||\n (cursor.scrollLeft < maxScrollLeft && deltaX > 0)\n ) {\n return true;\n }\n }\n }\n\n cursor = cursor.parentNode;\n }\n\n return false;\n }\n\n function touchMove(e) {\n if (shouldHandle(e)) {\n const touch = getTouch(e);\n\n const currentOffset = { pageX: touch.pageX, pageY: touch.pageY };\n\n const differenceX = currentOffset.pageX - startOffset.pageX;\n const differenceY = currentOffset.pageY - startOffset.pageY;\n\n if (shouldBeConsumedByChild(e.target, differenceX, differenceY)) {\n return;\n }\n\n applyTouchMove(differenceX, differenceY);\n startOffset = currentOffset;\n\n const currentTime = new Date().getTime();\n\n const timeGap = currentTime - startTime;\n if (timeGap > 0) {\n speed.x = differenceX / timeGap;\n speed.y = differenceY / timeGap;\n startTime = currentTime;\n }\n\n if (shouldPrevent(differenceX, differenceY)) {\n e.preventDefault();\n }\n }\n }\n function touchEnd() {\n if (i.settings.swipeEasing) {\n clearInterval(easingLoop);\n easingLoop = setInterval(function() {\n if (i.isInitialized) {\n clearInterval(easingLoop);\n return;\n }\n\n if (!speed.x && !speed.y) {\n clearInterval(easingLoop);\n return;\n }\n\n if (Math.abs(speed.x) < 0.01 && Math.abs(speed.y) < 0.01) {\n clearInterval(easingLoop);\n return;\n }\n\n if (!i.element) {\n clearInterval(easingLoop);\n return;\n }\n\n applyTouchMove(speed.x * 30, speed.y * 30);\n\n speed.x *= 0.8;\n speed.y *= 0.8;\n }, 10);\n }\n }\n\n if (env.supportsTouch) {\n i.event.bind(element, 'touchstart', touchStart);\n i.event.bind(element, 'touchmove', touchMove);\n i.event.bind(element, 'touchend', touchEnd);\n } else if (env.supportsIePointer) {\n if (window.PointerEvent) {\n i.event.bind(element, 'pointerdown', touchStart);\n i.event.bind(element, 'pointermove', touchMove);\n i.event.bind(element, 'pointerup', touchEnd);\n } else if (window.MSPointerEvent) {\n i.event.bind(element, 'MSPointerDown', touchStart);\n i.event.bind(element, 'MSPointerMove', touchMove);\n i.event.bind(element, 'MSPointerUp', touchEnd);\n }\n }\n}\n","import * as CSS from './lib/css';\nimport * as DOM from './lib/dom';\nimport cls from './lib/class-names';\nimport EventManager from './lib/event-manager';\nimport processScrollDiff from './process-scroll-diff';\nimport updateGeometry from './update-geometry';\nimport { toInt, outerWidth } from './lib/util';\n\nimport clickRail from './handlers/click-rail';\nimport dragThumb from './handlers/drag-thumb';\nimport keyboard from './handlers/keyboard';\nimport wheel from './handlers/mouse-wheel';\nimport touch from './handlers/touch';\n\nconst defaultSettings = () => ({\n handlers: ['click-rail', 'drag-thumb', 'keyboard', 'wheel', 'touch'],\n maxScrollbarLength: null,\n minScrollbarLength: null,\n scrollingThreshold: 1000,\n scrollXMarginOffset: 0,\n scrollYMarginOffset: 0,\n suppressScrollX: false,\n suppressScrollY: false,\n swipeEasing: true,\n useBothWheelAxes: false,\n wheelPropagation: true,\n wheelSpeed: 1,\n});\n\nconst handlers = {\n 'click-rail': clickRail,\n 'drag-thumb': dragThumb,\n keyboard,\n wheel,\n touch,\n};\n\nexport default class PerfectScrollbar {\n constructor(element, userSettings = {}) {\n if (typeof element === 'string') {\n element = document.querySelector(element);\n }\n\n if (!element || !element.nodeName) {\n throw new Error('no element is specified to initialize PerfectScrollbar');\n }\n\n this.element = element;\n\n element.classList.add(cls.main);\n\n this.settings = defaultSettings();\n for (const key in userSettings) {\n this.settings[key] = userSettings[key];\n }\n\n this.containerWidth = null;\n this.containerHeight = null;\n this.contentWidth = null;\n this.contentHeight = null;\n\n const focus = () => element.classList.add(cls.state.focus);\n const blur = () => element.classList.remove(cls.state.focus);\n\n this.isRtl = CSS.get(element).direction === 'rtl';\n if (this.isRtl === true) {\n element.classList.add(cls.rtl);\n }\n this.isNegativeScroll = (() => {\n const originalScrollLeft = element.scrollLeft;\n let result = null;\n element.scrollLeft = -1;\n result = element.scrollLeft < 0;\n element.scrollLeft = originalScrollLeft;\n return result;\n })();\n this.negativeScrollAdjustment = this.isNegativeScroll\n ? element.scrollWidth - element.clientWidth\n : 0;\n this.event = new EventManager();\n this.ownerDocument = element.ownerDocument || document;\n\n this.scrollbarXRail = DOM.div(cls.element.rail('x'));\n element.appendChild(this.scrollbarXRail);\n this.scrollbarX = DOM.div(cls.element.thumb('x'));\n this.scrollbarXRail.appendChild(this.scrollbarX);\n this.scrollbarX.setAttribute('tabindex', 0);\n this.event.bind(this.scrollbarX, 'focus', focus);\n this.event.bind(this.scrollbarX, 'blur', blur);\n this.scrollbarXActive = null;\n this.scrollbarXWidth = null;\n this.scrollbarXLeft = null;\n const railXStyle = CSS.get(this.scrollbarXRail);\n this.scrollbarXBottom = parseInt(railXStyle.bottom, 10);\n if (isNaN(this.scrollbarXBottom)) {\n this.isScrollbarXUsingBottom = false;\n this.scrollbarXTop = toInt(railXStyle.top);\n } else {\n this.isScrollbarXUsingBottom = true;\n }\n this.railBorderXWidth =\n toInt(railXStyle.borderLeftWidth) + toInt(railXStyle.borderRightWidth);\n // Set rail to display:block to calculate margins\n CSS.set(this.scrollbarXRail, { display: 'block' });\n this.railXMarginWidth =\n toInt(railXStyle.marginLeft) + toInt(railXStyle.marginRight);\n CSS.set(this.scrollbarXRail, { display: '' });\n this.railXWidth = null;\n this.railXRatio = null;\n\n this.scrollbarYRail = DOM.div(cls.element.rail('y'));\n element.appendChild(this.scrollbarYRail);\n this.scrollbarY = DOM.div(cls.element.thumb('y'));\n this.scrollbarYRail.appendChild(this.scrollbarY);\n this.scrollbarY.setAttribute('tabindex', 0);\n this.event.bind(this.scrollbarY, 'focus', focus);\n this.event.bind(this.scrollbarY, 'blur', blur);\n this.scrollbarYActive = null;\n this.scrollbarYHeight = null;\n this.scrollbarYTop = null;\n const railYStyle = CSS.get(this.scrollbarYRail);\n this.scrollbarYRight = parseInt(railYStyle.right, 10);\n if (isNaN(this.scrollbarYRight)) {\n this.isScrollbarYUsingRight = false;\n this.scrollbarYLeft = toInt(railYStyle.left);\n } else {\n this.isScrollbarYUsingRight = true;\n }\n this.scrollbarYOuterWidth = this.isRtl ? outerWidth(this.scrollbarY) : null;\n this.railBorderYWidth =\n toInt(railYStyle.borderTopWidth) + toInt(railYStyle.borderBottomWidth);\n CSS.set(this.scrollbarYRail, { display: 'block' });\n this.railYMarginHeight =\n toInt(railYStyle.marginTop) + toInt(railYStyle.marginBottom);\n CSS.set(this.scrollbarYRail, { display: '' });\n this.railYHeight = null;\n this.railYRatio = null;\n\n this.reach = {\n x:\n element.scrollLeft <= 0\n ? 'start'\n : element.scrollLeft >= this.contentWidth - this.containerWidth\n ? 'end'\n : null,\n y:\n element.scrollTop <= 0\n ? 'start'\n : element.scrollTop >= this.contentHeight - this.containerHeight\n ? 'end'\n : null,\n };\n\n this.isAlive = true;\n\n this.settings.handlers.forEach(handlerName => handlers[handlerName](this));\n\n this.lastScrollTop = Math.floor(element.scrollTop); // for onScroll only\n this.lastScrollLeft = element.scrollLeft; // for onScroll only\n this.event.bind(this.element, 'scroll', e => this.onScroll(e));\n updateGeometry(this);\n }\n\n update() {\n if (!this.isAlive) {\n return;\n }\n\n // Recalcuate negative scrollLeft adjustment\n this.negativeScrollAdjustment = this.isNegativeScroll\n ? this.element.scrollWidth - this.element.clientWidth\n : 0;\n\n // Recalculate rail margins\n CSS.set(this.scrollbarXRail, { display: 'block' });\n CSS.set(this.scrollbarYRail, { display: 'block' });\n this.railXMarginWidth =\n toInt(CSS.get(this.scrollbarXRail).marginLeft) +\n toInt(CSS.get(this.scrollbarXRail).marginRight);\n this.railYMarginHeight =\n toInt(CSS.get(this.scrollbarYRail).marginTop) +\n toInt(CSS.get(this.scrollbarYRail).marginBottom);\n\n // Hide scrollbars not to affect scrollWidth and scrollHeight\n CSS.set(this.scrollbarXRail, { display: 'none' });\n CSS.set(this.scrollbarYRail, { display: 'none' });\n\n updateGeometry(this);\n\n processScrollDiff(this, 'top', 0, false, true);\n processScrollDiff(this, 'left', 0, false, true);\n\n CSS.set(this.scrollbarXRail, { display: '' });\n CSS.set(this.scrollbarYRail, { display: '' });\n }\n\n onScroll(e) {\n if (!this.isAlive) {\n return;\n }\n\n updateGeometry(this);\n processScrollDiff(this, 'top', this.element.scrollTop - this.lastScrollTop);\n processScrollDiff(\n this,\n 'left',\n this.element.scrollLeft - this.lastScrollLeft\n );\n\n this.lastScrollTop = Math.floor(this.element.scrollTop);\n this.lastScrollLeft = this.element.scrollLeft;\n }\n\n destroy() {\n if (!this.isAlive) {\n return;\n }\n\n this.event.unbindAll();\n DOM.remove(this.scrollbarX);\n DOM.remove(this.scrollbarY);\n DOM.remove(this.scrollbarXRail);\n DOM.remove(this.scrollbarYRail);\n this.removePsClasses();\n\n // unset elements\n this.element = null;\n this.scrollbarX = null;\n this.scrollbarY = null;\n this.scrollbarXRail = null;\n this.scrollbarYRail = null;\n\n this.isAlive = false;\n }\n\n removePsClasses() {\n this.element.className = this.element.className\n .split(' ')\n .filter(name => !name.match(/^ps([-_].+|)$/))\n .join(' ');\n }\n}\n"],"names":["const","let","this","processScrollDiff","DOM.matches","CSS.get","DOM.queryChildren","DOM.remove","CSS.set","DOM.div"],"mappings":";;;;;;AAAO,SAAS,GAAG,CAAC,OAAO,EAAE;EAC3B,OAAO,gBAAgB,CAAC,OAAO,CAAC,CAAC;CAClC;;AAEM,SAAS,GAAG,CAAC,OAAO,EAAE,GAAG,EAAE;EAChC,KAAKA,IAAM,GAAG,IAAI,GAAG,EAAE;IACrBC,IAAI,GAAG,GAAG,GAAG,CAAC,GAAG,CAAC,CAAC;IACnB,IAAI,OAAO,GAAG,KAAK,QAAQ,EAAE;MAC3B,GAAG,GAAM,GAAG,OAAI,CAAC;KAClB;IACD,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC;GAC1B;EACD,OAAO,OAAO,CAAC;;;ACZV,SAAS,GAAG,CAAC,SAAS,EAAE;EAC7BD,IAAM,GAAG,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;EAC1C,GAAG,CAAC,SAAS,GAAG,SAAS,CAAC;EAC1B,OAAO,GAAG,CAAC;CACZ;;AAEDA,IAAM,SAAS;EACb,OAAO,OAAO,KAAK,WAAW;GAC7B,OAAO,CAAC,SAAS,CAAC,OAAO;IACxB,OAAO,CAAC,SAAS,C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AAC,KAAK,CAAC,SAAS,EAAE,CAAC;EACzBD,MAAY,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;EAC9BA,MAAY,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;EAC9BA,MAAY,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;EAClCA,MAAY,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;EAChC,IAAI,CAAC,eAAe,EAAE,CAAC;;;EAGvB,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;EACpB,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC;EACvB,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC;EACvB,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC;EAC3B,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC;;EAE3B,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;AACvB,EAAC;;AAEH,2BAAE,8CAAkB;EAClB,IAAM,CAAC,OAAO,CAAC,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,SAAS;KAC5C,KAAK,CAAC,GAAG,CAAC;KACV,MAAM,WAAC,MAAK,SAAG,CAAC,IAAI,CAAC,KAAK,CAAC,eAAe,IAAC,CAAC;KAC5C,IAAI,CAAC,GAAG,CAAC,CAAC;AACf,CAAC;;;;"} \ No newline at end of file diff --git a/dist/perfect-scrollbar.js b/dist/perfect-scrollbar.js index 9a8dcbf..966362d 100644 --- a/dist/perfect-scrollbar.js +++ b/dist/perfect-scrollbar.js @@ -1,5 +1,5 @@ /*! - * perfect-scrollbar v1.5.2 + * perfect-scrollbar v1.5.3 * Copyright 2021 Hyunje Jun, MDBootstrap and Contributors * Licensed under MIT */ @@ -566,7 +566,9 @@ updateGeometry(i); e.stopPropagation(); - e.preventDefault(); + if (e.type.startsWith('touch') && e.changedTouches.length > 1) { + e.preventDefault(); + } } function mouseUpHandler() { diff --git a/dist/perfect-scrollbar.js.map b/dist/perfect-scrollbar.js.map index d853cad..5d909e3 100644 --- a/dist/perfect-scrollbar.js.map +++ b/dist/perfect-scrollbar.js.map @@ -1 +1 @@ -{"version":3,"file":"perfect-scrollbar.js","sources":["../src/lib/css.js","../src/lib/dom.js","../src/lib/class-names.js","../src/lib/event-manager.js","../src/process-scroll-diff.js","../src/lib/util.js","../src/update-geometry.js","../src/handlers/click-rail.js","../src/handlers/drag-thumb.js","../src/handlers/keyboard.js","../src/handlers/mouse-wheel.js","../src/handlers/touch.js","../src/index.js"],"sourcesContent":["export function get(element) {\r\n return getComputedStyle(element);\r\n}\r\n\r\nexport function set(element, obj) {\r\n for (const key in obj) {\r\n let val = obj[key];\r\n if (typeof val === 'number') {\r\n val = `${val}px`;\r\n }\r\n element.style[key] = val;\r\n }\r\n return element;\r\n}\r\n","export function div(className) {\r\n const div = document.createElement('div');\r\n div.className = className;\r\n return div;\r\n}\r\n\r\nconst elMatches =\r\n typeof Element !== 'undefined' &&\r\n (Element.prototype.matches ||\r\n Element.prototype.webkitMatchesSelector ||\r\n Element.prototype.mozMatchesSelector ||\r\n Element.prototype.msMatchesSelector);\r\n\r\nexport function matches(element, query) {\r\n if (!elMatches) {\r\n throw new Error('No element matching method supported');\r\n }\r\n\r\n return elMatches.call(element, query);\r\n}\r\n\r\nexport function remove(element) {\r\n if (element.remove) {\r\n element.remove();\r\n } else {\r\n if (element.parentNode) {\r\n element.parentNode.removeChild(element);\r\n }\r\n }\r\n}\r\n\r\nexport function queryChildren(element, selector) {\r\n return Array.prototype.filter.call(element.children, child =>\r\n matches(child, selector)\r\n );\r\n}\r\n","const cls = {\r\n main: 'ps',\r\n rtl: 'ps__rtl',\r\n element: {\r\n thumb: x => `ps__thumb-${x}`,\r\n rail: x => `ps__rail-${x}`,\r\n consuming: 'ps__child--consume',\r\n },\r\n state: {\r\n focus: 'ps--focus',\r\n clicking: 'ps--clicking',\r\n active: x => `ps--active-${x}`,\r\n scrolling: x => `ps--scrolling-${x}`,\r\n },\r\n};\r\n\r\nexport default cls;\r\n\r\n/*\r\n * Helper methods\r\n */\r\nconst scrollingClassTimeout = { x: null, y: null };\r\n\r\nexport function addScrollingClass(i, x) {\r\n const classList = i.element.classList;\r\n const className = cls.state.scrolling(x);\r\n\r\n if (classList.contains(className)) {\r\n clearTimeout(scrollingClassTimeout[x]);\r\n } else {\r\n classList.add(className);\r\n }\r\n}\r\n\r\nexport function removeScrollingClass(i, x) {\r\n scrollingClassTimeout[x] = setTimeout(\r\n () => i.isAlive && i.element.classList.remove(cls.state.scrolling(x)),\r\n i.settings.scrollingThreshold\r\n );\r\n}\r\n\r\nexport function setScrollingClassInstantly(i, x) {\r\n addScrollingClass(i, x);\r\n removeScrollingClass(i, x);\r\n}\r\n","class EventElement {\r\n constructor(element) {\r\n this.element = element;\r\n this.handlers = {};\r\n }\r\n\r\n bind(eventName, handler) {\r\n if (typeof this.handlers[eventName] === 'undefined') {\r\n this.handlers[eventName] = [];\r\n }\r\n this.handlers[eventName].push(handler);\r\n this.element.addEventListener(eventName, handler, false);\r\n }\r\n\r\n unbind(eventName, target) {\r\n this.handlers[eventName] = this.handlers[eventName].filter(handler => {\r\n if (target && handler !== target) {\r\n return true;\r\n }\r\n this.element.removeEventListener(eventName, handler, false);\r\n return false;\r\n });\r\n }\r\n\r\n unbindAll() {\r\n for (const name in this.handlers) {\r\n this.unbind(name);\r\n }\r\n }\r\n\r\n get isEmpty() {\r\n return Object.keys(this.handlers).every(\r\n key => this.handlers[key].length === 0\r\n );\r\n }\r\n}\r\n\r\nexport default class EventManager {\r\n constructor() {\r\n this.eventElements = [];\r\n }\r\n\r\n eventElement(element) {\r\n let ee = this.eventElements.filter(ee => ee.element === element)[0];\r\n if (!ee) {\r\n ee = new EventElement(element);\r\n this.eventElements.push(ee);\r\n }\r\n return ee;\r\n }\r\n\r\n bind(element, eventName, handler) {\r\n this.eventElement(element).bind(eventName, handler);\r\n }\r\n\r\n unbind(element, eventName, handler) {\r\n const ee = this.eventElement(element);\r\n ee.unbind(eventName, handler);\r\n\r\n if (ee.isEmpty) {\r\n // remove\r\n this.eventElements.splice(this.eventElements.indexOf(ee), 1);\r\n }\r\n }\r\n\r\n unbindAll() {\r\n this.eventElements.forEach(e => e.unbindAll());\r\n this.eventElements = [];\r\n }\r\n\r\n once(element, eventName, handler) {\r\n const ee = this.eventElement(element);\r\n const onceHandler = evt => {\r\n ee.unbind(eventName, onceHandler);\r\n handler(evt);\r\n };\r\n ee.bind(eventName, onceHandler);\r\n }\r\n}\r\n","import { setScrollingClassInstantly } from './lib/class-names';\r\n\r\nfunction createEvent(name) {\r\n if (typeof window.CustomEvent === 'function') {\r\n return new CustomEvent(name);\r\n } else {\r\n const evt = document.createEvent('CustomEvent');\r\n evt.initCustomEvent(name, false, false, undefined);\r\n return evt;\r\n }\r\n}\r\n\r\nexport default function(\r\n i,\r\n axis,\r\n diff,\r\n useScrollingClass = true,\r\n forceFireReachEvent = false\r\n) {\r\n let fields;\r\n if (axis === 'top') {\r\n fields = [\r\n 'contentHeight',\r\n 'containerHeight',\r\n 'scrollTop',\r\n 'y',\r\n 'up',\r\n 'down',\r\n ];\r\n } else if (axis === 'left') {\r\n fields = [\r\n 'contentWidth',\r\n 'containerWidth',\r\n 'scrollLeft',\r\n 'x',\r\n 'left',\r\n 'right',\r\n ];\r\n } else {\r\n throw new Error('A proper axis should be provided');\r\n }\r\n\r\n processScrollDiff(i, diff, fields, useScrollingClass, forceFireReachEvent);\r\n}\r\n\r\nfunction processScrollDiff(\r\n i,\r\n diff,\r\n [contentHeight, containerHeight, scrollTop, y, up, down],\r\n useScrollingClass = true,\r\n forceFireReachEvent = false\r\n) {\r\n const element = i.element;\r\n\r\n // reset reach\r\n i.reach[y] = null;\r\n\r\n // 1 for subpixel rounding\r\n if (element[scrollTop] < 1) {\r\n i.reach[y] = 'start';\r\n }\r\n\r\n // 1 for subpixel rounding\r\n if (element[scrollTop] > i[contentHeight] - i[containerHeight] - 1) {\r\n i.reach[y] = 'end';\r\n }\r\n\r\n if (diff) {\r\n element.dispatchEvent(createEvent(`ps-scroll-${y}`));\r\n\r\n if (diff < 0) {\r\n element.dispatchEvent(createEvent(`ps-scroll-${up}`));\r\n } else if (diff > 0) {\r\n element.dispatchEvent(createEvent(`ps-scroll-${down}`));\r\n }\r\n\r\n if (useScrollingClass) {\r\n setScrollingClassInstantly(i, y);\r\n }\r\n }\r\n\r\n if (i.reach[y] && (diff || forceFireReachEvent)) {\r\n element.dispatchEvent(createEvent(`ps-${y}-reach-${i.reach[y]}`));\r\n }\r\n}\r\n","import * as CSS from './css';\r\nimport * as DOM from './dom';\r\n\r\nexport function toInt(x) {\r\n return parseInt(x, 10) || 0;\r\n}\r\n\r\nexport function isEditable(el) {\r\n return (\r\n DOM.matches(el, 'input,[contenteditable]') ||\r\n DOM.matches(el, 'select,[contenteditable]') ||\r\n DOM.matches(el, 'textarea,[contenteditable]') ||\r\n DOM.matches(el, 'button,[contenteditable]')\r\n );\r\n}\r\n\r\nexport function outerWidth(element) {\r\n const styles = CSS.get(element);\r\n return (\r\n toInt(styles.width) +\r\n toInt(styles.paddingLeft) +\r\n toInt(styles.paddingRight) +\r\n toInt(styles.borderLeftWidth) +\r\n toInt(styles.borderRightWidth)\r\n );\r\n}\r\n\r\nexport const env = {\r\n isWebKit:\r\n typeof document !== 'undefined' &&\r\n 'WebkitAppearance' in document.documentElement.style,\r\n supportsTouch:\r\n typeof window !== 'undefined' &&\r\n ('ontouchstart' in window ||\r\n ('maxTouchPoints' in window.navigator &&\r\n window.navigator.maxTouchPoints > 0) ||\r\n (window.DocumentTouch && document instanceof window.DocumentTouch)),\r\n supportsIePointer:\r\n typeof navigator !== 'undefined' && navigator.msMaxTouchPoints,\r\n isChrome:\r\n typeof navigator !== 'undefined' &&\r\n /Chrome/i.test(navigator && navigator.userAgent),\r\n};\r\n","import * as CSS from './lib/css';\r\nimport * as DOM from './lib/dom';\r\nimport cls from './lib/class-names';\r\nimport { toInt } from './lib/util';\r\n\r\nexport default function(i) {\r\n const element = i.element;\r\n const roundedScrollTop = Math.floor(element.scrollTop);\r\n const rect = element.getBoundingClientRect();\r\n\r\n i.containerWidth = Math.round(rect.width);\r\n i.containerHeight = Math.round(rect.height);\r\n\r\n i.contentWidth = element.scrollWidth;\r\n i.contentHeight = element.scrollHeight;\r\n\r\n if (!element.contains(i.scrollbarXRail)) {\r\n // clean up and append\r\n DOM.queryChildren(element, cls.element.rail('x')).forEach(el =>\r\n DOM.remove(el)\r\n );\r\n element.appendChild(i.scrollbarXRail);\r\n }\r\n if (!element.contains(i.scrollbarYRail)) {\r\n // clean up and append\r\n DOM.queryChildren(element, cls.element.rail('y')).forEach(el =>\r\n DOM.remove(el)\r\n );\r\n element.appendChild(i.scrollbarYRail);\r\n }\r\n\r\n if (\r\n !i.settings.suppressScrollX &&\r\n i.containerWidth + i.settings.scrollXMarginOffset < i.contentWidth\r\n ) {\r\n i.scrollbarXActive = true;\r\n i.railXWidth = i.containerWidth - i.railXMarginWidth;\r\n i.railXRatio = i.containerWidth / i.railXWidth;\r\n i.scrollbarXWidth = getThumbSize(\r\n i,\r\n toInt((i.railXWidth * i.containerWidth) / i.contentWidth)\r\n );\r\n i.scrollbarXLeft = toInt(\r\n ((i.negativeScrollAdjustment + element.scrollLeft) *\r\n (i.railXWidth - i.scrollbarXWidth)) /\r\n (i.contentWidth - i.containerWidth)\r\n );\r\n } else {\r\n i.scrollbarXActive = false;\r\n }\r\n\r\n if (\r\n !i.settings.suppressScrollY &&\r\n i.containerHeight + i.settings.scrollYMarginOffset < i.contentHeight\r\n ) {\r\n i.scrollbarYActive = true;\r\n i.railYHeight = i.containerHeight - i.railYMarginHeight;\r\n i.railYRatio = i.containerHeight / i.railYHeight;\r\n i.scrollbarYHeight = getThumbSize(\r\n i,\r\n toInt((i.railYHeight * i.containerHeight) / i.contentHeight)\r\n );\r\n i.scrollbarYTop = toInt(\r\n (roundedScrollTop * (i.railYHeight - i.scrollbarYHeight)) /\r\n (i.contentHeight - i.containerHeight)\r\n );\r\n } else {\r\n i.scrollbarYActive = false;\r\n }\r\n\r\n if (i.scrollbarXLeft >= i.railXWidth - i.scrollbarXWidth) {\r\n i.scrollbarXLeft = i.railXWidth - i.scrollbarXWidth;\r\n }\r\n if (i.scrollbarYTop >= i.railYHeight - i.scrollbarYHeight) {\r\n i.scrollbarYTop = i.railYHeight - i.scrollbarYHeight;\r\n }\r\n\r\n updateCss(element, i);\r\n\r\n if (i.scrollbarXActive) {\r\n element.classList.add(cls.state.active('x'));\r\n } else {\r\n element.classList.remove(cls.state.active('x'));\r\n i.scrollbarXWidth = 0;\r\n i.scrollbarXLeft = 0;\r\n element.scrollLeft = i.isRtl === true ? i.contentWidth : 0;\r\n }\r\n if (i.scrollbarYActive) {\r\n element.classList.add(cls.state.active('y'));\r\n } else {\r\n element.classList.remove(cls.state.active('y'));\r\n i.scrollbarYHeight = 0;\r\n i.scrollbarYTop = 0;\r\n element.scrollTop = 0;\r\n }\r\n}\r\n\r\nfunction getThumbSize(i, thumbSize) {\r\n if (i.settings.minScrollbarLength) {\r\n thumbSize = Math.max(thumbSize, i.settings.minScrollbarLength);\r\n }\r\n if (i.settings.maxScrollbarLength) {\r\n thumbSize = Math.min(thumbSize, i.settings.maxScrollbarLength);\r\n }\r\n return thumbSize;\r\n}\r\n\r\nfunction updateCss(element, i) {\r\n const xRailOffset = { width: i.railXWidth };\r\n const roundedScrollTop = Math.floor(element.scrollTop);\r\n\r\n if (i.isRtl) {\r\n xRailOffset.left =\r\n i.negativeScrollAdjustment +\r\n element.scrollLeft +\r\n i.containerWidth -\r\n i.contentWidth;\r\n } else {\r\n xRailOffset.left = element.scrollLeft;\r\n }\r\n if (i.isScrollbarXUsingBottom) {\r\n xRailOffset.bottom = i.scrollbarXBottom - roundedScrollTop;\r\n } else {\r\n xRailOffset.top = i.scrollbarXTop + roundedScrollTop;\r\n }\r\n CSS.set(i.scrollbarXRail, xRailOffset);\r\n\r\n const yRailOffset = { top: roundedScrollTop, height: i.railYHeight };\r\n if (i.isScrollbarYUsingRight) {\r\n if (i.isRtl) {\r\n yRailOffset.right =\r\n i.contentWidth -\r\n (i.negativeScrollAdjustment + element.scrollLeft) -\r\n i.scrollbarYRight -\r\n i.scrollbarYOuterWidth -\r\n 9;\r\n } else {\r\n yRailOffset.right = i.scrollbarYRight - element.scrollLeft;\r\n }\r\n } else {\r\n if (i.isRtl) {\r\n yRailOffset.left =\r\n i.negativeScrollAdjustment +\r\n element.scrollLeft +\r\n i.containerWidth * 2 -\r\n i.contentWidth -\r\n i.scrollbarYLeft -\r\n i.scrollbarYOuterWidth;\r\n } else {\r\n yRailOffset.left = i.scrollbarYLeft + element.scrollLeft;\r\n }\r\n }\r\n CSS.set(i.scrollbarYRail, yRailOffset);\r\n\r\n CSS.set(i.scrollbarX, {\r\n left: i.scrollbarXLeft,\r\n width: i.scrollbarXWidth - i.railBorderXWidth,\r\n });\r\n CSS.set(i.scrollbarY, {\r\n top: i.scrollbarYTop,\r\n height: i.scrollbarYHeight - i.railBorderYWidth,\r\n });\r\n}\r\n","import updateGeometry from '../update-geometry';\r\n\r\nexport default function(i) {\r\n const element = i.element;\r\n\r\n i.event.bind(i.scrollbarY, 'mousedown', e => e.stopPropagation());\r\n i.event.bind(i.scrollbarYRail, 'mousedown', e => {\r\n const positionTop =\r\n e.pageY -\r\n window.pageYOffset -\r\n i.scrollbarYRail.getBoundingClientRect().top;\r\n const direction = positionTop > i.scrollbarYTop ? 1 : -1;\r\n\r\n i.element.scrollTop += direction * i.containerHeight;\r\n updateGeometry(i);\r\n\r\n e.stopPropagation();\r\n });\r\n\r\n i.event.bind(i.scrollbarX, 'mousedown', e => e.stopPropagation());\r\n i.event.bind(i.scrollbarXRail, 'mousedown', e => {\r\n const positionLeft =\r\n e.pageX -\r\n window.pageXOffset -\r\n i.scrollbarXRail.getBoundingClientRect().left;\r\n const direction = positionLeft > i.scrollbarXLeft ? 1 : -1;\r\n\r\n i.element.scrollLeft += direction * i.containerWidth;\r\n updateGeometry(i);\r\n\r\n e.stopPropagation();\r\n });\r\n}\r\n","import * as CSS from '../lib/css';\r\nimport * as DOM from '../lib/dom';\r\nimport cls, {\r\n addScrollingClass,\r\n removeScrollingClass,\r\n} from '../lib/class-names';\r\nimport updateGeometry from '../update-geometry';\r\nimport { toInt } from '../lib/util';\r\n\r\nexport default function(i) {\r\n bindMouseScrollHandler(i, [\r\n 'containerWidth',\r\n 'contentWidth',\r\n 'pageX',\r\n 'railXWidth',\r\n 'scrollbarX',\r\n 'scrollbarXWidth',\r\n 'scrollLeft',\r\n 'x',\r\n 'scrollbarXRail',\r\n ]);\r\n bindMouseScrollHandler(i, [\r\n 'containerHeight',\r\n 'contentHeight',\r\n 'pageY',\r\n 'railYHeight',\r\n 'scrollbarY',\r\n 'scrollbarYHeight',\r\n 'scrollTop',\r\n 'y',\r\n 'scrollbarYRail',\r\n ]);\r\n}\r\n\r\nfunction bindMouseScrollHandler(\r\n i,\r\n [\r\n containerHeight,\r\n contentHeight,\r\n pageY,\r\n railYHeight,\r\n scrollbarY,\r\n scrollbarYHeight,\r\n scrollTop,\r\n y,\r\n scrollbarYRail,\r\n ]\r\n) {\r\n const element = i.element;\r\n\r\n let startingScrollTop = null;\r\n let startingMousePageY = null;\r\n let scrollBy = null;\r\n\r\n function mouseMoveHandler(e) {\r\n if (e.touches && e.touches[0]) {\r\n e[pageY] = e.touches[0].pageY;\r\n }\r\n element[scrollTop] =\r\n startingScrollTop + scrollBy * (e[pageY] - startingMousePageY);\r\n addScrollingClass(i, y);\r\n updateGeometry(i);\r\n\r\n e.stopPropagation();\r\n e.preventDefault();\r\n }\r\n\r\n function mouseUpHandler() {\r\n removeScrollingClass(i, y);\r\n i[scrollbarYRail].classList.remove(cls.state.clicking);\r\n i.event.unbind(i.ownerDocument, 'mousemove', mouseMoveHandler);\r\n }\r\n\r\n function bindMoves(e, touchMode) {\r\n startingScrollTop = element[scrollTop];\r\n if (touchMode && e.touches) {\r\n e[pageY] = e.touches[0].pageY;\r\n }\r\n startingMousePageY = e[pageY];\r\n scrollBy =\r\n (i[contentHeight] - i[containerHeight]) /\r\n (i[railYHeight] - i[scrollbarYHeight]);\r\n if (!touchMode) {\r\n i.event.bind(i.ownerDocument, 'mousemove', mouseMoveHandler);\r\n i.event.once(i.ownerDocument, 'mouseup', mouseUpHandler);\r\n e.preventDefault();\r\n } else {\r\n i.event.bind(i.ownerDocument, 'touchmove', mouseMoveHandler);\r\n }\r\n\r\n i[scrollbarYRail].classList.add(cls.state.clicking);\r\n\r\n e.stopPropagation();\r\n }\r\n\r\n i.event.bind(i[scrollbarY], 'mousedown', e => {\r\n bindMoves(e);\r\n });\r\n i.event.bind(i[scrollbarY], 'touchstart', e => {\r\n bindMoves(e, true);\r\n });\r\n}\r\n","import * as DOM from '../lib/dom';\r\nimport updateGeometry from '../update-geometry';\r\nimport { isEditable } from '../lib/util';\r\n\r\nexport default function(i) {\r\n const element = i.element;\r\n\r\n const elementHovered = () => DOM.matches(element, ':hover');\r\n const scrollbarFocused = () =>\r\n DOM.matches(i.scrollbarX, ':focus') || DOM.matches(i.scrollbarY, ':focus');\r\n\r\n function shouldPreventDefault(deltaX, deltaY) {\r\n const scrollTop = Math.floor(element.scrollTop);\r\n if (deltaX === 0) {\r\n if (!i.scrollbarYActive) {\r\n return false;\r\n }\r\n if (\r\n (scrollTop === 0 && deltaY > 0) ||\r\n (scrollTop >= i.contentHeight - i.containerHeight && deltaY < 0)\r\n ) {\r\n return !i.settings.wheelPropagation;\r\n }\r\n }\r\n\r\n const scrollLeft = element.scrollLeft;\r\n if (deltaY === 0) {\r\n if (!i.scrollbarXActive) {\r\n return false;\r\n }\r\n if (\r\n (scrollLeft === 0 && deltaX < 0) ||\r\n (scrollLeft >= i.contentWidth - i.containerWidth && deltaX > 0)\r\n ) {\r\n return !i.settings.wheelPropagation;\r\n }\r\n }\r\n return true;\r\n }\r\n\r\n i.event.bind(i.ownerDocument, 'keydown', e => {\r\n if (\r\n (e.isDefaultPrevented && e.isDefaultPrevented()) ||\r\n e.defaultPrevented\r\n ) {\r\n return;\r\n }\r\n\r\n if (!elementHovered() && !scrollbarFocused()) {\r\n return;\r\n }\r\n\r\n let activeElement = document.activeElement\r\n ? document.activeElement\r\n : i.ownerDocument.activeElement;\r\n if (activeElement) {\r\n if (activeElement.tagName === 'IFRAME') {\r\n activeElement = activeElement.contentDocument.activeElement;\r\n } else {\r\n // go deeper if element is a webcomponent\r\n while (activeElement.shadowRoot) {\r\n activeElement = activeElement.shadowRoot.activeElement;\r\n }\r\n }\r\n if (isEditable(activeElement)) {\r\n return;\r\n }\r\n }\r\n\r\n let deltaX = 0;\r\n let deltaY = 0;\r\n\r\n switch (e.which) {\r\n case 37: // left\r\n if (e.metaKey) {\r\n deltaX = -i.contentWidth;\r\n } else if (e.altKey) {\r\n deltaX = -i.containerWidth;\r\n } else {\r\n deltaX = -30;\r\n }\r\n break;\r\n case 38: // up\r\n if (e.metaKey) {\r\n deltaY = i.contentHeight;\r\n } else if (e.altKey) {\r\n deltaY = i.containerHeight;\r\n } else {\r\n deltaY = 30;\r\n }\r\n break;\r\n case 39: // right\r\n if (e.metaKey) {\r\n deltaX = i.contentWidth;\r\n } else if (e.altKey) {\r\n deltaX = i.containerWidth;\r\n } else {\r\n deltaX = 30;\r\n }\r\n break;\r\n case 40: // down\r\n if (e.metaKey) {\r\n deltaY = -i.contentHeight;\r\n } else if (e.altKey) {\r\n deltaY = -i.containerHeight;\r\n } else {\r\n deltaY = -30;\r\n }\r\n break;\r\n case 32: // space bar\r\n if (e.shiftKey) {\r\n deltaY = i.containerHeight;\r\n } else {\r\n deltaY = -i.containerHeight;\r\n }\r\n break;\r\n case 33: // page up\r\n deltaY = i.containerHeight;\r\n break;\r\n case 34: // page down\r\n deltaY = -i.containerHeight;\r\n break;\r\n case 36: // home\r\n deltaY = i.contentHeight;\r\n break;\r\n case 35: // end\r\n deltaY = -i.contentHeight;\r\n break;\r\n default:\r\n return;\r\n }\r\n\r\n if (i.settings.suppressScrollX && deltaX !== 0) {\r\n return;\r\n }\r\n if (i.settings.suppressScrollY && deltaY !== 0) {\r\n return;\r\n }\r\n\r\n element.scrollTop -= deltaY;\r\n element.scrollLeft += deltaX;\r\n updateGeometry(i);\r\n\r\n if (shouldPreventDefault(deltaX, deltaY)) {\r\n e.preventDefault();\r\n }\r\n });\r\n}\r\n","import * as CSS from '../lib/css';\r\nimport cls from '../lib/class-names';\r\nimport updateGeometry from '../update-geometry';\r\nimport { env } from '../lib/util';\r\n\r\nexport default function(i) {\r\n const element = i.element;\r\n\r\n let shouldPrevent = false;\r\n\r\n function shouldPreventDefault(deltaX, deltaY) {\r\n const roundedScrollTop = Math.floor(element.scrollTop);\r\n const isTop = element.scrollTop === 0;\r\n const isBottom =\r\n roundedScrollTop + element.offsetHeight === element.scrollHeight;\r\n const isLeft = element.scrollLeft === 0;\r\n const isRight =\r\n element.scrollLeft + element.offsetWidth === element.scrollWidth;\r\n\r\n let hitsBound;\r\n\r\n // pick axis with primary direction\r\n if (Math.abs(deltaY) > Math.abs(deltaX)) {\r\n hitsBound = isTop || isBottom;\r\n } else {\r\n hitsBound = isLeft || isRight;\r\n }\r\n\r\n return hitsBound ? !i.settings.wheelPropagation : true;\r\n }\r\n\r\n function getDeltaFromEvent(e) {\r\n let deltaX = e.deltaX;\r\n let deltaY = -1 * e.deltaY;\r\n\r\n if (typeof deltaX === 'undefined' || typeof deltaY === 'undefined') {\r\n // OS X Safari\r\n deltaX = (-1 * e.wheelDeltaX) / 6;\r\n deltaY = e.wheelDeltaY / 6;\r\n }\r\n\r\n if (e.deltaMode && e.deltaMode === 1) {\r\n // Firefox in deltaMode 1: Line scrolling\r\n deltaX *= 10;\r\n deltaY *= 10;\r\n }\r\n\r\n if (deltaX !== deltaX && deltaY !== deltaY /* NaN checks */) {\r\n // IE in some mouse drivers\r\n deltaX = 0;\r\n deltaY = e.wheelDelta;\r\n }\r\n\r\n if (e.shiftKey) {\r\n // reverse axis with shift key\r\n return [-deltaY, -deltaX];\r\n }\r\n return [deltaX, deltaY];\r\n }\r\n\r\n function shouldBeConsumedByChild(target, deltaX, deltaY) {\r\n // FIXME: this is a workaround for issue in FF and IE #571\n if (!env.isWebKit && element.querySelector('select:focus')) {\n return true;\n }\n\n if (!element.contains(target)) {\n return false;\n }\n\n let cursor = target;\n\n while (cursor && cursor !== element) {\n if (cursor.classList.contains(cls.element.consuming)) {\n return true;\n }\n\n const style = CSS.get(cursor);\n\n // if deltaY && vertical scrollable\n if (deltaY && style.overflowY.match(/(scroll|auto)/)) {\n const maxScrollTop = cursor.scrollHeight - cursor.clientHeight;\n if (maxScrollTop > 0) {\n if (\n (cursor.scrollTop > 0 && deltaY < 0) ||\n (cursor.scrollTop < maxScrollTop && deltaY > 0)\n ) {\n return true;\n }\n }\n }\n // if deltaX && horizontal scrollable\n if (deltaX && style.overflowX.match(/(scroll|auto)/)) {\n const maxScrollLeft = cursor.scrollWidth - cursor.clientWidth;\n if (maxScrollLeft > 0) {\n if (\n (cursor.scrollLeft > 0 && deltaX < 0) ||\n (cursor.scrollLeft < maxScrollLeft && deltaX > 0)\n ) {\n return true;\n }\n }\n }\n\n cursor = cursor.parentNode;\n }\n\n return false;\n }\n\n function mousewheelHandler(e) {\n const [deltaX, deltaY] = getDeltaFromEvent(e);\n\n if (shouldBeConsumedByChild(e.target, deltaX, deltaY)) {\n return;\n }\n\n let shouldPrevent = false;\n if (!i.settings.useBothWheelAxes) {\n // deltaX will only be used for horizontal scrolling and deltaY will\n // only be used for vertical scrolling - this is the default\n element.scrollTop -= deltaY * i.settings.wheelSpeed;\n element.scrollLeft += deltaX * i.settings.wheelSpeed;\n } else if (i.scrollbarYActive && !i.scrollbarXActive) {\n // only vertical scrollbar is active and useBothWheelAxes option is\n // active, so let's scroll vertical bar using both mouse wheel axes\n if (deltaY) {\n element.scrollTop -= deltaY * i.settings.wheelSpeed;\n } else {\n element.scrollTop += deltaX * i.settings.wheelSpeed;\n }\n shouldPrevent = true;\n } else if (i.scrollbarXActive && !i.scrollbarYActive) {\n // useBothWheelAxes and only horizontal bar is active, so use both\n // wheel axes for horizontal bar\n if (deltaX) {\n element.scrollLeft += deltaX * i.settings.wheelSpeed;\n } else {\n element.scrollLeft -= deltaY * i.settings.wheelSpeed;\n }\n shouldPrevent = true;\n }\n\n updateGeometry(i);\n\n shouldPrevent = shouldPrevent || shouldPreventDefault(deltaX, deltaY);\n if (shouldPrevent && !e.ctrlKey) {\n e.stopPropagation();\n e.preventDefault();\n }\n }\n\n if (typeof window.onwheel !== 'undefined') {\n i.event.bind(element, 'wheel', mousewheelHandler);\n } else if (typeof window.onmousewheel !== 'undefined') {\n i.event.bind(element, 'mousewheel', mousewheelHandler);\n }\n}\n","import updateGeometry from '../update-geometry';\nimport cls from '../lib/class-names';\nimport * as CSS from '../lib/css';\nimport { env } from '../lib/util';\n\nexport default function(i) {\n if (!env.supportsTouch && !env.supportsIePointer) {\n return;\n }\n\n const element = i.element;\n\n function shouldPrevent(deltaX, deltaY) {\n const scrollTop = Math.floor(element.scrollTop);\n const scrollLeft = element.scrollLeft;\n const magnitudeX = Math.abs(deltaX);\n const magnitudeY = Math.abs(deltaY);\n\n if (magnitudeY > magnitudeX) {\n // user is perhaps trying to swipe up/down the page\n\n if (\n (deltaY < 0 && scrollTop === i.contentHeight - i.containerHeight) ||\n (deltaY > 0 && scrollTop === 0)\n ) {\n // set prevent for mobile Chrome refresh\n return window.scrollY === 0 && deltaY > 0 && env.isChrome;\n }\n } else if (magnitudeX > magnitudeY) {\n // user is perhaps trying to swipe left/right across the page\n\n if (\n (deltaX < 0 && scrollLeft === i.contentWidth - i.containerWidth) ||\n (deltaX > 0 && scrollLeft === 0)\n ) {\n return true;\n }\n }\n\n return true;\n }\n\n function applyTouchMove(differenceX, differenceY) {\n element.scrollTop -= differenceY;\n element.scrollLeft -= differenceX;\n\n updateGeometry(i);\n }\n\n let startOffset = {};\n let startTime = 0;\n let speed = {};\n let easingLoop = null;\n\n function getTouch(e) {\n if (e.targetTouches) {\n return e.targetTouches[0];\n } else {\n // Maybe IE pointer\n return e;\n }\n }\n\n function shouldHandle(e) {\n if (e.pointerType && e.pointerType === 'pen' && e.buttons === 0) {\n return false;\n }\n if (e.targetTouches && e.targetTouches.length === 1) {\n return true;\n }\n if (\n e.pointerType &&\n e.pointerType !== 'mouse' &&\n e.pointerType !== e.MSPOINTER_TYPE_MOUSE\n ) {\n return true;\n }\n return false;\n }\n\n function touchStart(e) {\n if (!shouldHandle(e)) {\n return;\n }\n\n const touch = getTouch(e);\n\n startOffset.pageX = touch.pageX;\n startOffset.pageY = touch.pageY;\n\n startTime = new Date().getTime();\n\n if (easingLoop !== null) {\n clearInterval(easingLoop);\n }\n }\n\n function shouldBeConsumedByChild(target, deltaX, deltaY) {\n if (!element.contains(target)) {\n return false;\n }\n\n let cursor = target;\n\n while (cursor && cursor !== element) {\n if (cursor.classList.contains(cls.element.consuming)) {\n return true;\n }\n\n const style = CSS.get(cursor);\n\n // if deltaY && vertical scrollable\n if (deltaY && style.overflowY.match(/(scroll|auto)/)) {\n const maxScrollTop = cursor.scrollHeight - cursor.clientHeight;\n if (maxScrollTop > 0) {\n if (\n (cursor.scrollTop > 0 && deltaY < 0) ||\n (cursor.scrollTop < maxScrollTop && deltaY > 0)\n ) {\n return true;\n }\n }\n }\n // if deltaX && horizontal scrollable\n if (deltaX && style.overflowX.match(/(scroll|auto)/)) {\n const maxScrollLeft = cursor.scrollWidth - cursor.clientWidth;\n if (maxScrollLeft > 0) {\n if (\n (cursor.scrollLeft > 0 && deltaX < 0) ||\n (cursor.scrollLeft < maxScrollLeft && deltaX > 0)\n ) {\n return true;\n }\n }\n }\n\n cursor = cursor.parentNode;\n }\n\n return false;\n }\n\n function touchMove(e) {\n if (shouldHandle(e)) {\n const touch = getTouch(e);\n\n const currentOffset = { pageX: touch.pageX, pageY: touch.pageY };\n\n const differenceX = currentOffset.pageX - startOffset.pageX;\n const differenceY = currentOffset.pageY - startOffset.pageY;\n\n if (shouldBeConsumedByChild(e.target, differenceX, differenceY)) {\n return;\n }\n\n applyTouchMove(differenceX, differenceY);\n startOffset = currentOffset;\n\n const currentTime = new Date().getTime();\n\n const timeGap = currentTime - startTime;\n if (timeGap > 0) {\n speed.x = differenceX / timeGap;\n speed.y = differenceY / timeGap;\n startTime = currentTime;\n }\n\n if (shouldPrevent(differenceX, differenceY)) {\n e.preventDefault();\n }\n }\n }\n function touchEnd() {\n if (i.settings.swipeEasing) {\n clearInterval(easingLoop);\n easingLoop = setInterval(function() {\n if (i.isInitialized) {\n clearInterval(easingLoop);\n return;\n }\n\n if (!speed.x && !speed.y) {\n clearInterval(easingLoop);\n return;\n }\n\n if (Math.abs(speed.x) < 0.01 && Math.abs(speed.y) < 0.01) {\n clearInterval(easingLoop);\n return;\n }\n\n if (!i.element) {\n clearInterval(easingLoop);\n return;\n }\n\n applyTouchMove(speed.x * 30, speed.y * 30);\n\n speed.x *= 0.8;\n speed.y *= 0.8;\n }, 10);\n }\n }\n\n if (env.supportsTouch) {\n i.event.bind(element, 'touchstart', touchStart);\n i.event.bind(element, 'touchmove', touchMove);\n i.event.bind(element, 'touchend', touchEnd);\n } else if (env.supportsIePointer) {\n if (window.PointerEvent) {\n i.event.bind(element, 'pointerdown', touchStart);\n i.event.bind(element, 'pointermove', touchMove);\n i.event.bind(element, 'pointerup', touchEnd);\n } else if (window.MSPointerEvent) {\n i.event.bind(element, 'MSPointerDown', touchStart);\n i.event.bind(element, 'MSPointerMove', touchMove);\n i.event.bind(element, 'MSPointerUp', touchEnd);\n }\n }\n}\n","import * as CSS from './lib/css';\nimport * as DOM from './lib/dom';\nimport cls from './lib/class-names';\nimport EventManager from './lib/event-manager';\nimport processScrollDiff from './process-scroll-diff';\nimport updateGeometry from './update-geometry';\nimport { toInt, outerWidth } from './lib/util';\n\nimport clickRail from './handlers/click-rail';\nimport dragThumb from './handlers/drag-thumb';\nimport keyboard from './handlers/keyboard';\nimport wheel from './handlers/mouse-wheel';\nimport touch from './handlers/touch';\n\nconst defaultSettings = () => ({\n handlers: ['click-rail', 'drag-thumb', 'keyboard', 'wheel', 'touch'],\n maxScrollbarLength: null,\n minScrollbarLength: null,\n scrollingThreshold: 1000,\n scrollXMarginOffset: 0,\n scrollYMarginOffset: 0,\n suppressScrollX: false,\n suppressScrollY: false,\n swipeEasing: true,\n useBothWheelAxes: false,\n wheelPropagation: true,\n wheelSpeed: 1,\n});\n\nconst handlers = {\n 'click-rail': clickRail,\n 'drag-thumb': dragThumb,\n keyboard,\n wheel,\n touch,\n};\n\nexport default class PerfectScrollbar {\n constructor(element, userSettings = {}) {\n if (typeof element === 'string') {\n element = document.querySelector(element);\n }\n\n if (!element || !element.nodeName) {\n throw new Error('no element is specified to initialize PerfectScrollbar');\n }\n\n this.element = element;\n\n element.classList.add(cls.main);\n\n this.settings = defaultSettings();\n for (const key in userSettings) {\n this.settings[key] = userSettings[key];\n }\n\n this.containerWidth = null;\n this.containerHeight = null;\n this.contentWidth = null;\n this.contentHeight = null;\n\n const focus = () => element.classList.add(cls.state.focus);\n const blur = () => element.classList.remove(cls.state.focus);\n\n this.isRtl = CSS.get(element).direction === 'rtl';\n if (this.isRtl === true) {\n element.classList.add(cls.rtl);\n }\n this.isNegativeScroll = (() => {\n const originalScrollLeft = element.scrollLeft;\n let result = null;\n element.scrollLeft = -1;\n result = element.scrollLeft < 0;\n element.scrollLeft = originalScrollLeft;\n return result;\n })();\n this.negativeScrollAdjustment = this.isNegativeScroll\n ? element.scrollWidth - element.clientWidth\n : 0;\n this.event = new EventManager();\n this.ownerDocument = element.ownerDocument || document;\n\n this.scrollbarXRail = DOM.div(cls.element.rail('x'));\n element.appendChild(this.scrollbarXRail);\n this.scrollbarX = DOM.div(cls.element.thumb('x'));\n this.scrollbarXRail.appendChild(this.scrollbarX);\n this.scrollbarX.setAttribute('tabindex', 0);\n this.event.bind(this.scrollbarX, 'focus', focus);\n this.event.bind(this.scrollbarX, 'blur', blur);\n this.scrollbarXActive = null;\n this.scrollbarXWidth = null;\n this.scrollbarXLeft = null;\n const railXStyle = CSS.get(this.scrollbarXRail);\n this.scrollbarXBottom = parseInt(railXStyle.bottom, 10);\n if (isNaN(this.scrollbarXBottom)) {\n this.isScrollbarXUsingBottom = false;\n this.scrollbarXTop = toInt(railXStyle.top);\n } else {\n this.isScrollbarXUsingBottom = true;\n }\n this.railBorderXWidth =\n toInt(railXStyle.borderLeftWidth) + toInt(railXStyle.borderRightWidth);\n // Set rail to display:block to calculate margins\n CSS.set(this.scrollbarXRail, { display: 'block' });\n this.railXMarginWidth =\n toInt(railXStyle.marginLeft) + toInt(railXStyle.marginRight);\n CSS.set(this.scrollbarXRail, { display: '' });\n this.railXWidth = null;\n this.railXRatio = null;\n\n this.scrollbarYRail = DOM.div(cls.element.rail('y'));\n element.appendChild(this.scrollbarYRail);\n this.scrollbarY = DOM.div(cls.element.thumb('y'));\n this.scrollbarYRail.appendChild(this.scrollbarY);\n this.scrollbarY.setAttribute('tabindex', 0);\n this.event.bind(this.scrollbarY, 'focus', focus);\n this.event.bind(this.scrollbarY, 'blur', blur);\n this.scrollbarYActive = null;\n this.scrollbarYHeight = null;\n this.scrollbarYTop = null;\n const railYStyle = CSS.get(this.scrollbarYRail);\n this.scrollbarYRight = parseInt(railYStyle.right, 10);\n if (isNaN(this.scrollbarYRight)) {\n this.isScrollbarYUsingRight = false;\n this.scrollbarYLeft = toInt(railYStyle.left);\n } else {\n this.isScrollbarYUsingRight = true;\n }\n this.scrollbarYOuterWidth = this.isRtl ? outerWidth(this.scrollbarY) : null;\n this.railBorderYWidth =\n toInt(railYStyle.borderTopWidth) + toInt(railYStyle.borderBottomWidth);\n CSS.set(this.scrollbarYRail, { display: 'block' });\n this.railYMarginHeight =\n toInt(railYStyle.marginTop) + toInt(railYStyle.marginBottom);\n CSS.set(this.scrollbarYRail, { display: '' });\n this.railYHeight = null;\n this.railYRatio = null;\n\n this.reach = {\n x:\n element.scrollLeft <= 0\n ? 'start'\n : element.scrollLeft >= this.contentWidth - this.containerWidth\n ? 'end'\n : null,\n y:\n element.scrollTop <= 0\n ? 'start'\n : element.scrollTop >= this.contentHeight - this.containerHeight\n ? 'end'\n : null,\n };\n\n this.isAlive = true;\n\n this.settings.handlers.forEach(handlerName => handlers[handlerName](this));\n\n this.lastScrollTop = Math.floor(element.scrollTop); // for onScroll only\n this.lastScrollLeft = element.scrollLeft; // for onScroll only\n this.event.bind(this.element, 'scroll', e => this.onScroll(e));\n updateGeometry(this);\n }\n\n update() {\n if (!this.isAlive) {\n return;\n }\n\n // Recalcuate negative scrollLeft adjustment\n this.negativeScrollAdjustment = this.isNegativeScroll\n ? this.element.scrollWidth - this.element.clientWidth\n : 0;\n\n // Recalculate rail margins\n CSS.set(this.scrollbarXRail, { display: 'block' });\n CSS.set(this.scrollbarYRail, { display: 'block' });\n this.railXMarginWidth =\n toInt(CSS.get(this.scrollbarXRail).marginLeft) +\n toInt(CSS.get(this.scrollbarXRail).marginRight);\n this.railYMarginHeight =\n toInt(CSS.get(this.scrollbarYRail).marginTop) +\n toInt(CSS.get(this.scrollbarYRail).marginBottom);\n\n // Hide scrollbars not to affect scrollWidth and scrollHeight\n CSS.set(this.scrollbarXRail, { display: 'none' });\n CSS.set(this.scrollbarYRail, { display: 'none' });\n\n updateGeometry(this);\n\n processScrollDiff(this, 'top', 0, false, true);\n processScrollDiff(this, 'left', 0, false, true);\n\n CSS.set(this.scrollbarXRail, { display: '' });\n CSS.set(this.scrollbarYRail, { display: '' });\n }\n\n onScroll(e) {\n if (!this.isAlive) {\n return;\n }\n\n updateGeometry(this);\n processScrollDiff(this, 'top', this.element.scrollTop - this.lastScrollTop);\n processScrollDiff(\n this,\n 'left',\n this.element.scrollLeft - this.lastScrollLeft\n );\n\n this.lastScrollTop = Math.floor(this.element.scrollTop);\n this.lastScrollLeft = this.element.scrollLeft;\n }\n\n destroy() {\n if (!this.isAlive) {\n return;\n }\n\n this.event.unbindAll();\n DOM.remove(this.scrollbarX);\n DOM.remove(this.scrollbarY);\n DOM.remove(this.scrollbarXRail);\n DOM.remove(this.scrollbarYRail);\n this.removePsClasses();\n\n // unset elements\n this.element = null;\n this.scrollbarX = null;\n this.scrollbarY = null;\n this.scrollbarXRail = null;\n this.scrollbarYRail = null;\n\n this.isAlive = false;\n }\n\n removePsClasses() {\n this.element.className = this.element.className\n .split(' ')\n .filter(name => !name.match(/^ps([-_].+|)$/))\n .join(' ');\n }\n}\n"],"names":["const","let","this","processScrollDiff","DOM.matches","CSS.get","DOM.queryChildren","DOM.remove","CSS.set","DOM.div"],"mappings":";;;;;;;;;;;;EAAO,SAAS,GAAG,CAAC,OAAO,EAAE;IAC3B,OAAO,gBAAgB,CAAC,OAAO,CAAC,CAAC;GAClC;;EAEM,SAAS,GAAG,CAAC,OAAO,EAAE,GAAG,EAAE;IAChC,KAAKA,IAAM,GAAG,IAAI,GAAG,EAAE;MACrBC,IAAI,GAAG,GAAG,GAAG,CAAC,GAAG,CAAC,CAAC;MACnB,IAAI,OAAO,GAAG,KAAK,QAAQ,EAAE;QAC3B,GAAG,GAAM,GAAG,OAAI,CAAC;OAClB;MACD,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC;KAC1B;IACD,OAAO,OAAO,CAAC;;;ECZV,SAAS,GAAG,CAAC,SAAS,EAAE;IAC7BD,IAAM,GAAG,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IAC1C,GAAG,CAAC,SAAS,GAAG,SAAS,CAAC;IAC1B,OAAO,GAAG,CAAC;GACZ;;EAEDA,IAAM,SAAS;IACb,OAAO,OAAO,KAAK,WAAW;KAC7B,OAAO,CAAC,SAAS,CAAC,OAAO;MACxB,OAAO,CAAC,SAAS,CAAC,qBAAqB;MACvC,OAAO,CAAC,SAAS,CAAC,kBAAkB;MACpC,OAAO,CAAC,SAAS,CAAC,iBAAiB,CAAC,CAAC;;AAEzC,EAAO,SAAS,OAAO,CAAC,OAAO,EAAE,KAAK,EAAE;IACtC,IAAI,CAAC,SAAS,EAAE;MACd,MAAM,IAAI,KAAK,CAAC,sCAAsC,CAAC,CAAC;KACzD;;I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CAAC,eAAe,EAAE,CAAC;;;IAGvB,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;IACpB,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC;IACvB,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC;IACvB,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC;IAC3B,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC;;IAE3B,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;EACvB,EAAC;;EAEH,2BAAE,8CAAkB;IAClB,IAAM,CAAC,OAAO,CAAC,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,SAAS;OAC5C,KAAK,CAAC,GAAG,CAAC;OACV,MAAM,WAAC,MAAK,SAAG,CAAC,IAAI,CAAC,KAAK,CAAC,eAAe,IAAC,CAAC;OAC5C,IAAI,CAAC,GAAG,CAAC,CAAC;EACf,CAAC;;;;;;;;"} \ No newline at end of file diff --git a/dist/perfect-scrollbar.min.js b/dist/perfect-scrollbar.min.js index bc567e7..1b6359c 100644 --- a/dist/perfect-scrollbar.min.js +++ b/dist/perfect-scrollbar.min.js @@ -1,9 +1,9 @@ /*! - * perfect-scrollbar v1.5.2 + * perfect-scrollbar v1.5.3 * Copyright 2021 Hyunje Jun, MDBootstrap and Contributors * Licensed under MIT */(function(a,b){"object"==typeof exports&&"undefined"!=typeof module?module.exports=b():"function"==typeof define&&define.amd?define(b):(a=a||self,a.PerfectScrollbar=b())})(this,function(){'use strict';var u=Math.abs,v=Math.floor;function a(a){return getComputedStyle(a)}function b(a,b){for(var c in b){var d=b[c];"number"==typeof d&&(d+="px"),a.style[c]=d}return a}function c(a){var b=document.createElement("div");return b.className=a,b}function d(a,b){if(!w)throw new Error("No element matching method supported");return w.call(a,b)}function e(a){a.remove?a.remove():a.parentNode&&a.parentNode.removeChild(a)}function f(a,b){return Array.prototype.filter.call(a.children,function(a){return d(a,b)})}function g(a,b){var c=a.element.classList,d=z.state.scrolling(b);c.contains(d)?clearTimeout(A[b]):c.add(d)}function h(a,b){A[b]=setTimeout(function(){return a.isAlive&&a.element.classList.remove(z.state.scrolling(b))},a.settings.scrollingThreshold)}function j(a,b){g(a,b),h(a,b)}function k(a){if("function"==typeof window.CustomEvent)return new CustomEvent(a);var b=document.createEvent("CustomEvent");return b.initCustomEvent(a,!1,!1,void 0),b}function l(a,b,c,d,e){void 0===d&&(d=!0),void 0===e&&(e=!1);var f;if("top"===b)f=["contentHeight","containerHeight","scrollTop","y","up","down"];else if("left"===b)f=["contentWidth","containerWidth","scrollLeft","x","left","right"];else throw new Error("A proper axis should be provided");m(a,c,f,d,e)}function m(a,b,c,d,e){var f=c[0],g=c[1],h=c[2],i=c[3],l=c[4],m=c[5];void 0===d&&(d=!0),void 0===e&&(e=!1);var n=a.element;// reset reach -a.reach[i]=null,1>n[h]&&(a.reach[i]="start"),n[h]>a[f]-a[g]-1&&(a.reach[i]="end"),b&&(n.dispatchEvent(k("ps-scroll-"+i)),0>b?n.dispatchEvent(k("ps-scroll-"+l)):0=a.railXWidth-a.scrollbarXWidth&&(a.scrollbarXLeft=a.railXWidth-a.scrollbarXWidth),a.scrollbarYTop>=a.railYHeight-a.scrollbarYHeight&&(a.scrollbarYTop=a.railYHeight-a.scrollbarYHeight),s(c,a),a.scrollbarXActive?c.classList.add(z.state.active("x")):(c.classList.remove(z.state.active("x")),a.scrollbarXWidth=0,a.scrollbarXLeft=0,c.scrollLeft=!0===a.isRtl?a.contentWidth:0),a.scrollbarYActive?c.classList.add(z.state.active("y")):(c.classList.remove(z.state.active("y")),a.scrollbarYHeight=0,a.scrollbarYTop=0,c.scrollTop=0)}function r(a,b){var c=Math.min,d=Math.max;return a.settings.minScrollbarLength&&(b=d(b,a.settings.minScrollbarLength)),a.settings.maxScrollbarLength&&(b=c(b,a.settings.maxScrollbarLength)),b}function s(a,c){var d={width:c.railXWidth},e=v(a.scrollTop);d.left=c.isRtl?c.negativeScrollAdjustment+a.scrollLeft+c.containerWidth-c.contentWidth:a.scrollLeft,c.isScrollbarXUsingBottom?d.bottom=c.scrollbarXBottom-e:d.top=c.scrollbarXTop+e,b(c.scrollbarXRail,d);var f={top:e,height:c.railYHeight};c.isScrollbarYUsingRight?c.isRtl?f.right=c.contentWidth-(c.negativeScrollAdjustment+a.scrollLeft)-c.scrollbarYRight-c.scrollbarYOuterWidth-9:f.right=c.scrollbarYRight-a.scrollLeft:c.isRtl?f.left=c.negativeScrollAdjustment+a.scrollLeft+2*c.containerWidth-c.contentWidth-c.scrollbarYLeft-c.scrollbarYOuterWidth:f.left=c.scrollbarYLeft+a.scrollLeft,b(c.scrollbarYRail,f),b(c.scrollbarX,{left:c.scrollbarXLeft,width:c.scrollbarXWidth-c.railBorderXWidth}),b(c.scrollbarY,{top:c.scrollbarYTop,height:c.scrollbarYHeight-c.railBorderYWidth})}function t(a,b){function c(b){b.touches&&b.touches[0]&&(b[k]=b.touches[0].pageY),s[o]=t+v*(b[k]-u),g(a,p),q(a),b.stopPropagation(),b.preventDefault()}function d(){h(a,p),a[r].classList.remove(z.state.clicking),a.event.unbind(a.ownerDocument,"mousemove",c)}function f(b,e){t=s[o],e&&b.touches&&(b[k]=b.touches[0].pageY),u=b[k],v=(a[j]-a[i])/(a[l]-a[n]),e?a.event.bind(a.ownerDocument,"touchmove",c):(a.event.bind(a.ownerDocument,"mousemove",c),a.event.once(a.ownerDocument,"mouseup",d),b.preventDefault()),a[r].classList.add(z.state.clicking),b.stopPropagation()}var i=b[0],j=b[1],k=b[2],l=b[3],m=b[4],n=b[5],o=b[6],p=b[7],r=b[8],s=a.element,t=null,u=null,v=null;a.event.bind(a[m],"mousedown",function(a){f(a)}),a.event.bind(a[m],"touchstart",function(a){f(a,!0)})}var w="undefined"!=typeof Element&&(Element.prototype.matches||Element.prototype.webkitMatchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector),z={main:"ps",rtl:"ps__rtl",element:{thumb:function(a){return"ps__thumb-"+a},rail:function(a){return"ps__rail-"+a},consuming:"ps__child--consume"},state:{focus:"ps--focus",clicking:"ps--clicking",active:function(a){return"ps--active-"+a},scrolling:function(a){return"ps--scrolling-"+a}}},A={x:null,y:null},B=function(a){this.element=a,this.handlers={}},C={isEmpty:{configurable:!0}};B.prototype.bind=function(a,b){"undefined"==typeof this.handlers[a]&&(this.handlers[a]=[]),this.handlers[a].push(b),this.element.addEventListener(a,b,!1)},B.prototype.unbind=function(a,b){var c=this;this.handlers[a]=this.handlers[a].filter(function(d){return!!(b&&d!==b)||(c.element.removeEventListener(a,d,!1),!1)})},B.prototype.unbindAll=function(){for(var a in this.handlers)this.unbind(a)},C.isEmpty.get=function(){var a=this;return Object.keys(this.handlers).every(function(b){return 0===a.handlers[b].length})},Object.defineProperties(B.prototype,C);var D=function(){this.eventElements=[]};D.prototype.eventElement=function(a){var b=this.eventElements.filter(function(b){return b.element===a})[0];return b||(b=new B(a),this.eventElements.push(b)),b},D.prototype.bind=function(a,b,c){this.eventElement(a).bind(b,c)},D.prototype.unbind=function(a,b,c){var d=this.eventElement(a);d.unbind(b,c),d.isEmpty&&this.eventElements.splice(this.eventElements.indexOf(d),1)},D.prototype.unbindAll=function(){this.eventElements.forEach(function(a){return a.unbindAll()}),this.eventElements=[]},D.prototype.once=function(a,b,c){var d=this.eventElement(a),e=function(a){d.unbind(b,e),c(a)};d.bind(b,e)};var E={isWebKit:"undefined"!=typeof document&&"WebkitAppearance"in document.documentElement.style,supportsTouch:"undefined"!=typeof window&&("ontouchstart"in window||"maxTouchPoints"in window.navigator&&0a.scrollbarYTop?1:-1;a.element.scrollTop+=d*a.containerHeight,q(a),b.stopPropagation()}),a.event.bind(a.scrollbarX,"mousedown",function(a){return a.stopPropagation()}),a.event.bind(a.scrollbarXRail,"mousedown",function(b){var c=b.pageX-window.pageXOffset-a.scrollbarXRail.getBoundingClientRect().left,d=c>a.scrollbarXLeft?1:-1;a.element.scrollLeft+=d*a.containerWidth,q(a),b.stopPropagation()})},"drag-thumb":function(a){t(a,["containerWidth","contentWidth","pageX","railXWidth","scrollbarX","scrollbarXWidth","scrollLeft","x","scrollbarXRail"]),t(a,["containerHeight","contentHeight","pageY","railYHeight","scrollbarY","scrollbarYHeight","scrollTop","y","scrollbarYRail"])},keyboard:function(a){function b(b,d){var e=v(c.scrollTop);if(0===b){if(!a.scrollbarYActive)return!1;if(0===e&&0=a.contentHeight-a.containerHeight&&0>d)return!a.settings.wheelPropagation}var f=c.scrollLeft;if(0===d){if(!a.scrollbarXActive)return!1;if(0===f&&0>b||f>=a.contentWidth-a.containerWidth&&0n[h]&&(a.reach[i]="start"),n[h]>a[f]-a[g]-1&&(a.reach[i]="end"),b&&(n.dispatchEvent(k("ps-scroll-"+i)),0>b?n.dispatchEvent(k("ps-scroll-"+l)):0=a.railXWidth-a.scrollbarXWidth&&(a.scrollbarXLeft=a.railXWidth-a.scrollbarXWidth),a.scrollbarYTop>=a.railYHeight-a.scrollbarYHeight&&(a.scrollbarYTop=a.railYHeight-a.scrollbarYHeight),s(c,a),a.scrollbarXActive?c.classList.add(z.state.active("x")):(c.classList.remove(z.state.active("x")),a.scrollbarXWidth=0,a.scrollbarXLeft=0,c.scrollLeft=!0===a.isRtl?a.contentWidth:0),a.scrollbarYActive?c.classList.add(z.state.active("y")):(c.classList.remove(z.state.active("y")),a.scrollbarYHeight=0,a.scrollbarYTop=0,c.scrollTop=0)}function r(a,b){var c=Math.min,d=Math.max;return a.settings.minScrollbarLength&&(b=d(b,a.settings.minScrollbarLength)),a.settings.maxScrollbarLength&&(b=c(b,a.settings.maxScrollbarLength)),b}function s(a,c){var d={width:c.railXWidth},e=v(a.scrollTop);d.left=c.isRtl?c.negativeScrollAdjustment+a.scrollLeft+c.containerWidth-c.contentWidth:a.scrollLeft,c.isScrollbarXUsingBottom?d.bottom=c.scrollbarXBottom-e:d.top=c.scrollbarXTop+e,b(c.scrollbarXRail,d);var f={top:e,height:c.railYHeight};c.isScrollbarYUsingRight?c.isRtl?f.right=c.contentWidth-(c.negativeScrollAdjustment+a.scrollLeft)-c.scrollbarYRight-c.scrollbarYOuterWidth-9:f.right=c.scrollbarYRight-a.scrollLeft:c.isRtl?f.left=c.negativeScrollAdjustment+a.scrollLeft+2*c.containerWidth-c.contentWidth-c.scrollbarYLeft-c.scrollbarYOuterWidth:f.left=c.scrollbarYLeft+a.scrollLeft,b(c.scrollbarYRail,f),b(c.scrollbarX,{left:c.scrollbarXLeft,width:c.scrollbarXWidth-c.railBorderXWidth}),b(c.scrollbarY,{top:c.scrollbarYTop,height:c.scrollbarYHeight-c.railBorderYWidth})}function t(a,b){function c(b){b.touches&&b.touches[0]&&(b[k]=b.touches[0].pageY),s[o]=t+v*(b[k]-u),g(a,p),q(a),b.stopPropagation(),b.type.startsWith("touch")&&1a.scrollbarYTop?1:-1;a.element.scrollTop+=d*a.containerHeight,q(a),b.stopPropagation()}),a.event.bind(a.scrollbarX,"mousedown",function(a){return a.stopPropagation()}),a.event.bind(a.scrollbarXRail,"mousedown",function(b){var c=b.pageX-window.pageXOffset-a.scrollbarXRail.getBoundingClientRect().left,d=c>a.scrollbarXLeft?1:-1;a.element.scrollLeft+=d*a.containerWidth,q(a),b.stopPropagation()})},"drag-thumb":function(a){t(a,["containerWidth","contentWidth","pageX","railXWidth","scrollbarX","scrollbarXWidth","scrollLeft","x","scrollbarXRail"]),t(a,["containerHeight","contentHeight","pageY","railYHeight","scrollbarY","scrollbarYHeight","scrollTop","y","scrollbarYRail"])},keyboard:function(a){function b(b,d){var e=v(c.scrollTop);if(0===b){if(!a.scrollbarYActive)return!1;if(0===e&&0=a.contentHeight-a.containerHeight&&0>d)return!a.settings.wheelPropagation}var f=c.scrollLeft;if(0===d){if(!a.scrollbarXActive)return!1;if(0===f&&0>b||f>=a.contentWidth-a.containerWidth&&0u(a)?f||g:i||j,!d||!b.settings.wheelPropagation}function d(a){var b=a.deltaX,c=-1*a.deltaY;return("undefined"==typeof b||"undefined"==typeof c)&&(b=-1*a.wheelDeltaX/6,c=a.wheelDeltaY/6),a.deltaMode&&1===a.deltaMode&&(b*=10,c*=10),b!==b&&c!==c/* NaN checks */&&(b=0,c=a.wheelDelta),a.shiftKey?[-c,-b]:[b,c]}function f(b,c,d){// FIXME: this is a workaround for issue in FF and IE #571\r\n if (!env.isWebKit && element.querySelector('select:focus')) {\r\n return true;\r\n }\r\n\r\n if (!element.contains(target)) {\r\n return false;\r\n }\r\n\r\n let cursor = target;\r\n\r\n while (cursor && cursor !== element) {\r\n if (cursor.classList.contains(cls.element.consuming)) {\r\n return true;\r\n }\r\n\r\n const style = CSS.get(cursor);\r\n\r\n // if deltaY && vertical scrollable\r\n if (deltaY && style.overflowY.match(/(scroll|auto)/)) {\r\n const maxScrollTop = cursor.scrollHeight - cursor.clientHeight;\r\n if (maxScrollTop > 0) {\r\n if (\r\n (cursor.scrollTop > 0 && deltaY < 0) ||\r\n (cursor.scrollTop < maxScrollTop && deltaY > 0)\r\n ) {\r\n return true;\r\n }\r\n }\r\n }\r\n // if deltaX && horizontal scrollable\r\n if (deltaX && style.overflowX.match(/(scroll|auto)/)) {\r\n const maxScrollLeft = cursor.scrollWidth - cursor.clientWidth;\r\n if (maxScrollLeft > 0) {\r\n if (\r\n (cursor.scrollLeft > 0 && deltaX < 0) ||\r\n (cursor.scrollLeft < maxScrollLeft && deltaX > 0)\r\n ) {\r\n return true;\r\n }\r\n }\r\n }\r\n\r\n cursor = cursor.parentNode;\r\n }\r\n\r\n return false;\r\n }\r\n\r\n function mousewheelHandler(e) {\r\n const [deltaX, deltaY] = getDeltaFromEvent(e);\r\n\r\n if (shouldBeConsumedByChild(e.target, deltaX, deltaY)) {\r\n return;\r\n }\r\n\r\n let shouldPrevent = false;\r\n if (!i.settings.useBothWheelAxes) {\r\n // deltaX will only be used for horizontal scrolling and deltaY will\r\n // only be used for vertical scrolling - this is the default\r\n element.scrollTop -= deltaY * i.settings.wheelSpeed;\r\n element.scrollLeft += deltaX * i.settings.wheelSpeed;\r\n } else if (i.scrollbarYActive && !i.scrollbarXActive) {\r\n // only vertical scrollbar is active and useBothWheelAxes option is\r\n // active, so let's scroll vertical bar using both mouse wheel axes\r\n if (deltaY) {\r\n element.scrollTop -= deltaY * i.settings.wheelSpeed;\r\n } else {\r\n element.scrollTop += deltaX * i.settings.wheelSpeed;\r\n }\r\n shouldPrevent = true;\r\n } else if (i.scrollbarXActive && !i.scrollbarYActive) {\r\n // useBothWheelAxes and only horizontal bar is active, so use both\r\n // wheel axes for horizontal bar\r\n if (deltaX) {\r\n element.scrollLeft += deltaX * i.settings.wheelSpeed;\r\n } else {\r\n element.scrollLeft -= deltaY * i.settings.wheelSpeed;\r\n }\r\n shouldPrevent = true;\r\n }\r\n\r\n updateGeometry(i);\r\n\r\n shouldPrevent = shouldPrevent || shouldPreventDefault(deltaX, deltaY);\r\n if (shouldPrevent && !e.ctrlKey) {\r\n e.stopPropagation();\r\n e.preventDefault();\r\n }\r\n }\r\n\r\n if (typeof window.onwheel !== 'undefined') {\r\n i.event.bind(element, 'wheel', mousewheelHandler);\r\n } else if (typeof window.onmousewheel !== 'undefined') {\r\n i.event.bind(element, 'mousewheel', mousewheelHandler);\r\n }\r\n}\r\n","import * as CSS from './lib/css';\r\nimport * as DOM from './lib/dom';\r\nimport cls from './lib/class-names';\r\nimport { toInt } from './lib/util';\r\n\r\nexport default function(i) {\r\n const element = i.element;\r\n const roundedScrollTop = Math.floor(element.scrollTop);\r\n const rect = element.getBoundingClientRect();\r\n\r\n i.containerWidth = Math.round(rect.width);\r\n i.containerHeight = Math.round(rect.height);\r\n\r\n i.contentWidth = element.scrollWidth;\r\n i.contentHeight = element.scrollHeight;\r\n\r\n if (!element.contains(i.scrollbarXRail)) {\r\n // clean up and append\r\n DOM.queryChildren(element, cls.element.rail('x')).forEach(el =>\r\n DOM.remove(el)\r\n );\r\n element.appendChild(i.scrollbarXRail);\r\n }\r\n if (!element.contains(i.scrollbarYRail)) {\r\n // clean up and append\r\n DOM.queryChildren(element, cls.element.rail('y')).forEach(el =>\r\n DOM.remove(el)\r\n );\r\n element.appendChild(i.scrollbarYRail);\r\n }\r\n\r\n if (\r\n !i.settings.suppressScrollX &&\r\n i.containerWidth + i.settings.scrollXMarginOffset < i.contentWidth\r\n ) {\r\n i.scrollbarXActive = true;\r\n i.railXWidth = i.containerWidth - i.railXMarginWidth;\r\n i.railXRatio = i.containerWidth / i.railXWidth;\r\n i.scrollbarXWidth = getThumbSize(\r\n i,\r\n toInt((i.railXWidth * i.containerWidth) / i.contentWidth)\r\n );\r\n i.scrollbarXLeft = toInt(\r\n ((i.negativeScrollAdjustment + element.scrollLeft) *\r\n (i.railXWidth - i.scrollbarXWidth)) /\r\n (i.contentWidth - i.containerWidth)\r\n );\r\n } else {\r\n i.scrollbarXActive = false;\r\n }\r\n\r\n if (\r\n !i.settings.suppressScrollY &&\r\n i.containerHeight + i.settings.scrollYMarginOffset < i.contentHeight\r\n ) {\r\n i.scrollbarYActive = true;\r\n i.railYHeight = i.containerHeight - i.railYMarginHeight;\r\n i.railYRatio = i.containerHeight / i.railYHeight;\r\n i.scrollbarYHeight = getThumbSize(\r\n i,\r\n toInt((i.railYHeight * i.containerHeight) / i.contentHeight)\r\n );\r\n i.scrollbarYTop = toInt(\r\n (roundedScrollTop * (i.railYHeight - i.scrollbarYHeight)) /\r\n (i.contentHeight - i.containerHeight)\r\n );\r\n } else {\r\n i.scrollbarYActive = false;\r\n }\r\n\r\n if (i.scrollbarXLeft >= i.railXWidth - i.scrollbarXWidth) {\r\n i.scrollbarXLeft = i.railXWidth - i.scrollbarXWidth;\r\n }\r\n if (i.scrollbarYTop >= i.railYHeight - i.scrollbarYHeight) {\r\n i.scrollbarYTop = i.railYHeight - i.scrollbarYHeight;\r\n }\r\n\r\n updateCss(element, i);\r\n\r\n if (i.scrollbarXActive) {\r\n element.classList.add(cls.state.active('x'));\r\n } else {\r\n element.classList.remove(cls.state.active('x'));\r\n i.scrollbarXWidth = 0;\r\n i.scrollbarXLeft = 0;\r\n element.scrollLeft = i.isRtl === true ? i.contentWidth : 0;\r\n }\r\n if (i.scrollbarYActive) {\r\n element.classList.add(cls.state.active('y'));\r\n } else {\r\n element.classList.remove(cls.state.active('y'));\r\n i.scrollbarYHeight = 0;\r\n i.scrollbarYTop = 0;\r\n element.scrollTop = 0;\r\n }\r\n}\r\n\r\nfunction getThumbSize(i, thumbSize) {\r\n if (i.settings.minScrollbarLength) {\r\n thumbSize = Math.max(thumbSize, i.settings.minScrollbarLength);\r\n }\r\n if (i.settings.maxScrollbarLength) {\r\n thumbSize = Math.min(thumbSize, i.settings.maxScrollbarLength);\r\n }\r\n return thumbSize;\r\n}\r\n\r\nfunction updateCss(element, i) {\r\n const xRailOffset = { width: i.railXWidth };\r\n const roundedScrollTop = Math.floor(element.scrollTop);\r\n\r\n if (i.isRtl) {\r\n xRailOffset.left =\r\n i.negativeScrollAdjustment +\r\n element.scrollLeft +\r\n i.containerWidth -\r\n i.contentWidth;\r\n } else {\r\n xRailOffset.left = element.scrollLeft;\r\n }\r\n if (i.isScrollbarXUsingBottom) {\r\n xRailOffset.bottom = i.scrollbarXBottom - roundedScrollTop;\r\n } else {\r\n xRailOffset.top = i.scrollbarXTop + roundedScrollTop;\r\n }\r\n CSS.set(i.scrollbarXRail, xRailOffset);\r\n\r\n const yRailOffset = { top: roundedScrollTop, height: i.railYHeight };\r\n if (i.isScrollbarYUsingRight) {\r\n if (i.isRtl) {\r\n yRailOffset.right =\r\n i.contentWidth -\r\n (i.negativeScrollAdjustment + element.scrollLeft) -\r\n i.scrollbarYRight -\r\n i.scrollbarYOuterWidth -\r\n 9;\r\n } else {\r\n yRailOffset.right = i.scrollbarYRight - element.scrollLeft;\r\n }\r\n } else {\r\n if (i.isRtl) {\r\n yRailOffset.left =\r\n i.negativeScrollAdjustment +\r\n element.scrollLeft +\r\n i.containerWidth * 2 -\r\n i.contentWidth -\r\n i.scrollbarYLeft -\r\n i.scrollbarYOuterWidth;\r\n } else {\r\n yRailOffset.left = i.scrollbarYLeft + element.scrollLeft;\r\n }\r\n }\r\n CSS.set(i.scrollbarYRail, yRailOffset);\r\n\r\n CSS.set(i.scrollbarX, {\r\n left: i.scrollbarXLeft,\r\n width: i.scrollbarXWidth - i.railBorderXWidth,\r\n });\r\n CSS.set(i.scrollbarY, {\r\n top: i.scrollbarYTop,\r\n height: i.scrollbarYHeight - i.railBorderYWidth,\r\n });\r\n}\r\n","export function get(element) {\r\n return getComputedStyle(element);\r\n}\r\n\r\nexport function set(element, obj) {\r\n for (const key in obj) {\r\n let val = obj[key];\r\n if (typeof val === 'number') {\r\n val = `${val}px`;\r\n }\r\n element.style[key] = val;\r\n }\r\n return element;\r\n}\r\n","export function div(className) {\r\n const div = document.createElement('div');\r\n div.className = className;\r\n return div;\r\n}\r\n\r\nconst elMatches =\r\n typeof Element !== 'undefined' &&\r\n (Element.prototype.matches ||\r\n Element.prototype.webkitMatchesSelector ||\r\n Element.prototype.mozMatchesSelector ||\r\n Element.prototype.msMatchesSelector);\r\n\r\nexport function matches(element, query) {\r\n if (!elMatches) {\r\n throw new Error('No element matching method supported');\r\n }\r\n\r\n return elMatches.call(element, query);\r\n}\r\n\r\nexport function remove(element) {\r\n if (element.remove) {\r\n element.remove();\r\n } else {\r\n if (element.parentNode) {\r\n element.parentNode.removeChild(element);\r\n }\r\n }\r\n}\r\n\r\nexport function queryChildren(element, selector) {\r\n return Array.prototype.filter.call(element.children, child =>\r\n matches(child, selector)\r\n );\r\n}\r\n","const cls = {\r\n main: 'ps',\r\n rtl: 'ps__rtl',\r\n element: {\r\n thumb: x => `ps__thumb-${x}`,\r\n rail: x => `ps__rail-${x}`,\r\n consuming: 'ps__child--consume',\r\n },\r\n state: {\r\n focus: 'ps--focus',\r\n clicking: 'ps--clicking',\r\n active: x => `ps--active-${x}`,\r\n scrolling: x => `ps--scrolling-${x}`,\r\n },\r\n};\r\n\r\nexport default cls;\r\n\r\n/*\r\n * Helper methods\r\n */\r\nconst scrollingClassTimeout = { x: null, y: null };\r\n\r\nexport function addScrollingClass(i, x) {\r\n const classList = i.element.classList;\r\n const className = cls.state.scrolling(x);\r\n\r\n if (classList.contains(className)) {\r\n clearTimeout(scrollingClassTimeout[x]);\r\n } else {\r\n classList.add(className);\r\n }\r\n}\r\n\r\nexport function removeScrollingClass(i, x) {\r\n scrollingClassTimeout[x] = setTimeout(\r\n () => i.isAlive && i.element.classList.remove(cls.state.scrolling(x)),\r\n i.settings.scrollingThreshold\r\n );\r\n}\r\n\r\nexport function setScrollingClassInstantly(i, x) {\r\n addScrollingClass(i, x);\r\n removeScrollingClass(i, x);\r\n}\r\n","import { setScrollingClassInstantly } from './lib/class-names';\r\n\r\nfunction createEvent(name) {\r\n if (typeof window.CustomEvent === 'function') {\r\n return new CustomEvent(name);\r\n } else {\r\n const evt = document.createEvent('CustomEvent');\r\n evt.initCustomEvent(name, false, false, undefined);\r\n return evt;\r\n }\r\n}\r\n\r\nexport default function(\r\n i,\r\n axis,\r\n diff,\r\n useScrollingClass = true,\r\n forceFireReachEvent = false\r\n) {\r\n let fields;\r\n if (axis === 'top') {\r\n fields = [\r\n 'contentHeight',\r\n 'containerHeight',\r\n 'scrollTop',\r\n 'y',\r\n 'up',\r\n 'down',\r\n ];\r\n } else if (axis === 'left') {\r\n fields = [\r\n 'contentWidth',\r\n 'containerWidth',\r\n 'scrollLeft',\r\n 'x',\r\n 'left',\r\n 'right',\r\n ];\r\n } else {\r\n throw new Error('A proper axis should be provided');\r\n }\r\n\r\n processScrollDiff(i, diff, fields, useScrollingClass, forceFireReachEvent);\r\n}\r\n\r\nfunction processScrollDiff(\r\n i,\r\n diff,\r\n [contentHeight, containerHeight, scrollTop, y, up, down],\r\n useScrollingClass = true,\r\n forceFireReachEvent = false\r\n) {\r\n const element = i.element;\r\n\r\n // reset reach\r\n i.reach[y] = null;\r\n\r\n // 1 for subpixel rounding\r\n if (element[scrollTop] < 1) {\r\n i.reach[y] = 'start';\r\n }\r\n\r\n // 1 for subpixel rounding\r\n if (element[scrollTop] > i[contentHeight] - i[containerHeight] - 1) {\r\n i.reach[y] = 'end';\r\n }\r\n\r\n if (diff) {\r\n element.dispatchEvent(createEvent(`ps-scroll-${y}`));\r\n\r\n if (diff < 0) {\r\n element.dispatchEvent(createEvent(`ps-scroll-${up}`));\r\n } else if (diff > 0) {\r\n element.dispatchEvent(createEvent(`ps-scroll-${down}`));\r\n }\r\n\r\n if (useScrollingClass) {\r\n setScrollingClassInstantly(i, y);\r\n }\r\n }\r\n\r\n if (i.reach[y] && (diff || forceFireReachEvent)) {\r\n element.dispatchEvent(createEvent(`ps-${y}-reach-${i.reach[y]}`));\r\n }\r\n}\r\n","import * as CSS from './css';\r\nimport * as DOM from './dom';\r\n\r\nexport function toInt(x) {\r\n return parseInt(x, 10) || 0;\r\n}\r\n\r\nexport function isEditable(el) {\r\n return (\r\n DOM.matches(el, 'input,[contenteditable]') ||\r\n DOM.matches(el, 'select,[contenteditable]') ||\r\n DOM.matches(el, 'textarea,[contenteditable]') ||\r\n DOM.matches(el, 'button,[contenteditable]')\r\n );\r\n}\r\n\r\nexport function outerWidth(element) {\r\n const styles = CSS.get(element);\r\n return (\r\n toInt(styles.width) +\r\n toInt(styles.paddingLeft) +\r\n toInt(styles.paddingRight) +\r\n toInt(styles.borderLeftWidth) +\r\n toInt(styles.borderRightWidth)\r\n );\r\n}\r\n\r\nexport const env = {\r\n isWebKit:\r\n typeof document !== 'undefined' &&\r\n 'WebkitAppearance' in document.documentElement.style,\r\n supportsTouch:\r\n typeof window !== 'undefined' &&\r\n ('ontouchstart' in window ||\r\n ('maxTouchPoints' in window.navigator &&\r\n window.navigator.maxTouchPoints > 0) ||\r\n (window.DocumentTouch && document instanceof window.DocumentTouch)),\r\n supportsIePointer:\r\n typeof navigator !== 'undefined' && navigator.msMaxTouchPoints,\r\n isChrome:\r\n typeof navigator !== 'undefined' &&\r\n /Chrome/i.test(navigator && navigator.userAgent),\r\n};\r\n","import * as CSS from '../lib/css';\r\nimport * as DOM from '../lib/dom';\r\nimport cls, {\r\n addScrollingClass,\r\n removeScrollingClass,\r\n} from '../lib/class-names';\r\nimport updateGeometry from '../update-geometry';\r\nimport { toInt } from '../lib/util';\r\n\r\nexport default function(i) {\r\n bindMouseScrollHandler(i, [\r\n 'containerWidth',\r\n 'contentWidth',\r\n 'pageX',\r\n 'railXWidth',\r\n 'scrollbarX',\r\n 'scrollbarXWidth',\r\n 'scrollLeft',\r\n 'x',\r\n 'scrollbarXRail',\r\n ]);\r\n bindMouseScrollHandler(i, [\r\n 'containerHeight',\r\n 'contentHeight',\r\n 'pageY',\r\n 'railYHeight',\r\n 'scrollbarY',\r\n 'scrollbarYHeight',\r\n 'scrollTop',\r\n 'y',\r\n 'scrollbarYRail',\r\n ]);\r\n}\r\n\r\nfunction bindMouseScrollHandler(\r\n i,\r\n [\r\n containerHeight,\r\n contentHeight,\r\n pageY,\r\n railYHeight,\r\n scrollbarY,\r\n scrollbarYHeight,\r\n scrollTop,\r\n y,\r\n scrollbarYRail,\r\n ]\r\n) {\r\n const element = i.element;\r\n\r\n let startingScrollTop = null;\r\n let startingMousePageY = null;\r\n let scrollBy = null;\r\n\r\n function mouseMoveHandler(e) {\r\n if (e.touches && e.touches[0]) {\r\n e[pageY] = e.touches[0].pageY;\r\n }\r\n element[scrollTop] =\r\n startingScrollTop + scrollBy * (e[pageY] - startingMousePageY);\r\n addScrollingClass(i, y);\r\n updateGeometry(i);\r\n\r\n e.stopPropagation();\r\n e.preventDefault();\r\n }\r\n\r\n function mouseUpHandler() {\r\n removeScrollingClass(i, y);\r\n i[scrollbarYRail].classList.remove(cls.state.clicking);\r\n i.event.unbind(i.ownerDocument, 'mousemove', mouseMoveHandler);\r\n }\r\n\r\n function bindMoves(e, touchMode) {\r\n startingScrollTop = element[scrollTop];\r\n if (touchMode && e.touches) {\r\n e[pageY] = e.touches[0].pageY;\r\n }\r\n startingMousePageY = e[pageY];\r\n scrollBy =\r\n (i[contentHeight] - i[containerHeight]) /\r\n (i[railYHeight] - i[scrollbarYHeight]);\r\n if (!touchMode) {\r\n i.event.bind(i.ownerDocument, 'mousemove', mouseMoveHandler);\r\n i.event.once(i.ownerDocument, 'mouseup', mouseUpHandler);\r\n e.preventDefault();\r\n } else {\r\n i.event.bind(i.ownerDocument, 'touchmove', mouseMoveHandler);\r\n }\r\n\r\n i[scrollbarYRail].classList.add(cls.state.clicking);\r\n\r\n e.stopPropagation();\r\n }\r\n\r\n i.event.bind(i[scrollbarY], 'mousedown', e => {\r\n bindMoves(e);\r\n });\r\n i.event.bind(i[scrollbarY], 'touchstart', e => {\r\n bindMoves(e, true);\r\n });\r\n}\r\n","class EventElement {\r\n constructor(element) {\r\n this.element = element;\r\n this.handlers = {};\r\n }\r\n\r\n bind(eventName, handler) {\r\n if (typeof this.handlers[eventName] === 'undefined') {\r\n this.handlers[eventName] = [];\r\n }\r\n this.handlers[eventName].push(handler);\r\n this.element.addEventListener(eventName, handler, false);\r\n }\r\n\r\n unbind(eventName, target) {\r\n this.handlers[eventName] = this.handlers[eventName].filter(handler => {\r\n if (target && handler !== target) {\r\n return true;\r\n }\r\n this.element.removeEventListener(eventName, handler, false);\r\n return false;\r\n });\r\n }\r\n\r\n unbindAll() {\r\n for (const name in this.handlers) {\r\n this.unbind(name);\r\n }\r\n }\r\n\r\n get isEmpty() {\r\n return Object.keys(this.handlers).every(\r\n key => this.handlers[key].length === 0\r\n );\r\n }\r\n}\r\n\r\nexport default class EventManager {\r\n constructor() {\r\n this.eventElements = [];\r\n }\r\n\r\n eventElement(element) {\r\n let ee = this.eventElements.filter(ee => ee.element === element)[0];\r\n if (!ee) {\r\n ee = new EventElement(element);\r\n this.eventElements.push(ee);\r\n }\r\n return ee;\r\n }\r\n\r\n bind(element, eventName, handler) {\r\n this.eventElement(element).bind(eventName, handler);\r\n }\r\n\r\n unbind(element, eventName, handler) {\r\n const ee = this.eventElement(element);\r\n ee.unbind(eventName, handler);\r\n\r\n if (ee.isEmpty) {\r\n // remove\r\n this.eventElements.splice(this.eventElements.indexOf(ee), 1);\r\n }\r\n }\r\n\r\n unbindAll() {\r\n this.eventElements.forEach(e => e.unbindAll());\r\n this.eventElements = [];\r\n }\r\n\r\n once(element, eventName, handler) {\r\n const ee = this.eventElement(element);\r\n const onceHandler = evt => {\r\n ee.unbind(eventName, onceHandler);\r\n handler(evt);\r\n };\r\n ee.bind(eventName, onceHandler);\r\n }\r\n}\r\n","import * as CSS from './lib/css';\r\nimport * as DOM from './lib/dom';\r\nimport cls from './lib/class-names';\r\nimport EventManager from './lib/event-manager';\r\nimport processScrollDiff from './process-scroll-diff';\r\nimport updateGeometry from './update-geometry';\r\nimport { toInt, outerWidth } from './lib/util';\r\n\r\nimport clickRail from './handlers/click-rail';\r\nimport dragThumb from './handlers/drag-thumb';\r\nimport keyboard from './handlers/keyboard';\r\nimport wheel from './handlers/mouse-wheel';\r\nimport touch from './handlers/touch';\r\n\r\nconst defaultSettings = () => ({\r\n handlers: ['click-rail', 'drag-thumb', 'keyboard', 'wheel', 'touch'],\r\n maxScrollbarLength: null,\r\n minScrollbarLength: null,\r\n scrollingThreshold: 1000,\r\n scrollXMarginOffset: 0,\r\n scrollYMarginOffset: 0,\r\n suppressScrollX: false,\r\n suppressScrollY: false,\r\n swipeEasing: true,\r\n useBothWheelAxes: false,\r\n wheelPropagation: true,\r\n wheelSpeed: 1,\r\n});\r\n\r\nconst handlers = {\r\n 'click-rail': clickRail,\r\n 'drag-thumb': dragThumb,\r\n keyboard,\r\n wheel,\r\n touch,\r\n};\r\n\r\nexport default class PerfectScrollbar {\r\n constructor(element, userSettings = {}) {\r\n if (typeof element === 'string') {\r\n element = document.querySelector(element);\r\n }\r\n\r\n if (!element || !element.nodeName) {\r\n throw new Error('no element is specified to initialize PerfectScrollbar');\r\n }\r\n\r\n this.element = element;\r\n\r\n element.classList.add(cls.main);\r\n\r\n this.settings = defaultSettings();\r\n for (const key in userSettings) {\r\n this.settings[key] = userSettings[key];\r\n }\r\n\r\n this.containerWidth = null;\r\n this.containerHeight = null;\r\n this.contentWidth = null;\r\n this.contentHeight = null;\r\n\r\n const focus = () => element.classList.add(cls.state.focus);\r\n const blur = () => element.classList.remove(cls.state.focus);\r\n\r\n this.isRtl = CSS.get(element).direction === 'rtl';\r\n if (this.isRtl === true) {\r\n element.classList.add(cls.rtl);\r\n }\r\n this.isNegativeScroll = (() => {\r\n const originalScrollLeft = element.scrollLeft;\r\n let result = null;\r\n element.scrollLeft = -1;\r\n result = element.scrollLeft < 0;\r\n element.scrollLeft = originalScrollLeft;\r\n return result;\r\n })();\r\n this.negativeScrollAdjustment = this.isNegativeScroll\r\n ? element.scrollWidth - element.clientWidth\r\n : 0;\r\n this.event = new EventManager();\r\n this.ownerDocument = element.ownerDocument || document;\r\n\r\n this.scrollbarXRail = DOM.div(cls.element.rail('x'));\r\n element.appendChild(this.scrollbarXRail);\r\n this.scrollbarX = DOM.div(cls.element.thumb('x'));\r\n this.scrollbarXRail.appendChild(this.scrollbarX);\r\n this.scrollbarX.setAttribute('tabindex', 0);\r\n this.event.bind(this.scrollbarX, 'focus', focus);\r\n this.event.bind(this.scrollbarX, 'blur', blur);\r\n this.scrollbarXActive = null;\r\n this.scrollbarXWidth = null;\r\n this.scrollbarXLeft = null;\r\n const railXStyle = CSS.get(this.scrollbarXRail);\r\n this.scrollbarXBottom = parseInt(railXStyle.bottom, 10);\r\n if (isNaN(this.scrollbarXBottom)) {\r\n this.isScrollbarXUsingBottom = false;\r\n this.scrollbarXTop = toInt(railXStyle.top);\r\n } else {\r\n this.isScrollbarXUsingBottom = true;\r\n }\r\n this.railBorderXWidth =\r\n toInt(railXStyle.borderLeftWidth) + toInt(railXStyle.borderRightWidth);\r\n // Set rail to display:block to calculate margins\r\n CSS.set(this.scrollbarXRail, { display: 'block' });\r\n this.railXMarginWidth =\r\n toInt(railXStyle.marginLeft) + toInt(railXStyle.marginRight);\r\n CSS.set(this.scrollbarXRail, { display: '' });\r\n this.railXWidth = null;\r\n this.railXRatio = null;\r\n\r\n this.scrollbarYRail = DOM.div(cls.element.rail('y'));\r\n element.appendChild(this.scrollbarYRail);\r\n this.scrollbarY = DOM.div(cls.element.thumb('y'));\r\n this.scrollbarYRail.appendChild(this.scrollbarY);\r\n this.scrollbarY.setAttribute('tabindex', 0);\r\n this.event.bind(this.scrollbarY, 'focus', focus);\r\n this.event.bind(this.scrollbarY, 'blur', blur);\r\n this.scrollbarYActive = null;\r\n this.scrollbarYHeight = null;\r\n this.scrollbarYTop = null;\r\n const railYStyle = CSS.get(this.scrollbarYRail);\r\n this.scrollbarYRight = parseInt(railYStyle.right, 10);\r\n if (isNaN(this.scrollbarYRight)) {\r\n this.isScrollbarYUsingRight = false;\r\n this.scrollbarYLeft = toInt(railYStyle.left);\r\n } else {\r\n this.isScrollbarYUsingRight = true;\r\n }\r\n this.scrollbarYOuterWidth = this.isRtl ? outerWidth(this.scrollbarY) : null;\r\n this.railBorderYWidth =\r\n toInt(railYStyle.borderTopWidth) + toInt(railYStyle.borderBottomWidth);\r\n CSS.set(this.scrollbarYRail, { display: 'block' });\r\n this.railYMarginHeight =\r\n toInt(railYStyle.marginTop) + toInt(railYStyle.marginBottom);\r\n CSS.set(this.scrollbarYRail, { display: '' });\r\n this.railYHeight = null;\r\n this.railYRatio = null;\r\n\r\n this.reach = {\r\n x:\r\n element.scrollLeft <= 0\r\n ? 'start'\r\n : element.scrollLeft >= this.contentWidth - this.containerWidth\r\n ? 'end'\r\n : null,\r\n y:\r\n element.scrollTop <= 0\r\n ? 'start'\r\n : element.scrollTop >= this.contentHeight - this.containerHeight\r\n ? 'end'\r\n : null,\r\n };\r\n\r\n this.isAlive = true;\r\n\r\n this.settings.handlers.forEach(handlerName => handlers[handlerName](this));\r\n\r\n this.lastScrollTop = Math.floor(element.scrollTop); // for onScroll only\r\n this.lastScrollLeft = element.scrollLeft; // for onScroll only\r\n this.event.bind(this.element, 'scroll', e => this.onScroll(e));\r\n updateGeometry(this);\r\n }\r\n\r\n update() {\r\n if (!this.isAlive) {\r\n return;\r\n }\r\n\r\n // Recalcuate negative scrollLeft adjustment\r\n this.negativeScrollAdjustment = this.isNegativeScroll\r\n ? this.element.scrollWidth - this.element.clientWidth\r\n : 0;\r\n\r\n // Recalculate rail margins\r\n CSS.set(this.scrollbarXRail, { display: 'block' });\r\n CSS.set(this.scrollbarYRail, { display: 'block' });\r\n this.railXMarginWidth =\r\n toInt(CSS.get(this.scrollbarXRail).marginLeft) +\r\n toInt(CSS.get(this.scrollbarXRail).marginRight);\r\n this.railYMarginHeight =\r\n toInt(CSS.get(this.scrollbarYRail).marginTop) +\r\n toInt(CSS.get(this.scrollbarYRail).marginBottom);\r\n\r\n // Hide scrollbars not to affect scrollWidth and scrollHeight\r\n CSS.set(this.scrollbarXRail, { display: 'none' });\r\n CSS.set(this.scrollbarYRail, { display: 'none' });\r\n\r\n updateGeometry(this);\r\n\r\n processScrollDiff(this, 'top', 0, false, true);\r\n processScrollDiff(this, 'left', 0, false, true);\r\n\r\n CSS.set(this.scrollbarXRail, { display: '' });\r\n CSS.set(this.scrollbarYRail, { display: '' });\r\n }\r\n\r\n onScroll(e) {\r\n if (!this.isAlive) {\r\n return;\r\n }\r\n\r\n updateGeometry(this);\r\n processScrollDiff(this, 'top', this.element.scrollTop - this.lastScrollTop);\r\n processScrollDiff(\r\n this,\r\n 'left',\r\n this.element.scrollLeft - this.lastScrollLeft\r\n );\r\n\r\n this.lastScrollTop = Math.floor(this.element.scrollTop);\r\n this.lastScrollLeft = this.element.scrollLeft;\r\n }\r\n\r\n destroy() {\r\n if (!this.isAlive) {\r\n return;\r\n }\r\n\r\n this.event.unbindAll();\r\n DOM.remove(this.scrollbarX);\r\n DOM.remove(this.scrollbarY);\r\n DOM.remove(this.scrollbarXRail);\r\n DOM.remove(this.scrollbarYRail);\r\n this.removePsClasses();\r\n\r\n // unset elements\r\n this.element = null;\r\n this.scrollbarX = null;\r\n this.scrollbarY = null;\r\n this.scrollbarXRail = null;\r\n this.scrollbarYRail = null;\r\n\r\n this.isAlive = false;\r\n }\r\n\r\n removePsClasses() {\r\n this.element.className = this.element.className\r\n .split(' ')\r\n .filter(name => !name.match(/^ps([-_].+|)$/))\r\n .join(' ');\r\n }\r\n}\r\n","import updateGeometry from '../update-geometry';\r\n\r\nexport default function(i) {\r\n const element = i.element;\r\n\r\n i.event.bind(i.scrollbarY, 'mousedown', e => e.stopPropagation());\r\n i.event.bind(i.scrollbarYRail, 'mousedown', e => {\r\n const positionTop =\r\n e.pageY -\r\n window.pageYOffset -\r\n i.scrollbarYRail.getBoundingClientRect().top;\r\n const direction = positionTop > i.scrollbarYTop ? 1 : -1;\r\n\r\n i.element.scrollTop += direction * i.containerHeight;\r\n updateGeometry(i);\r\n\r\n e.stopPropagation();\r\n });\r\n\r\n i.event.bind(i.scrollbarX, 'mousedown', e => e.stopPropagation());\r\n i.event.bind(i.scrollbarXRail, 'mousedown', e => {\r\n const positionLeft =\r\n e.pageX -\r\n window.pageXOffset -\r\n i.scrollbarXRail.getBoundingClientRect().left;\r\n const direction = positionLeft > i.scrollbarXLeft ? 1 : -1;\r\n\r\n i.element.scrollLeft += direction * i.containerWidth;\r\n updateGeometry(i);\r\n\r\n e.stopPropagation();\r\n });\r\n}\r\n","import * as DOM from '../lib/dom';\r\nimport updateGeometry from '../update-geometry';\r\nimport { isEditable } from '../lib/util';\r\n\r\nexport default function(i) {\r\n const element = i.element;\r\n\r\n const elementHovered = () => DOM.matches(element, ':hover');\r\n const scrollbarFocused = () =>\r\n DOM.matches(i.scrollbarX, ':focus') || DOM.matches(i.scrollbarY, ':focus');\r\n\r\n function shouldPreventDefault(deltaX, deltaY) {\r\n const scrollTop = Math.floor(element.scrollTop);\r\n if (deltaX === 0) {\r\n if (!i.scrollbarYActive) {\r\n return false;\r\n }\r\n if (\r\n (scrollTop === 0 && deltaY > 0) ||\r\n (scrollTop >= i.contentHeight - i.containerHeight && deltaY < 0)\r\n ) {\r\n return !i.settings.wheelPropagation;\r\n }\r\n }\r\n\r\n const scrollLeft = element.scrollLeft;\r\n if (deltaY === 0) {\r\n if (!i.scrollbarXActive) {\r\n return false;\r\n }\r\n if (\r\n (scrollLeft === 0 && deltaX < 0) ||\r\n (scrollLeft >= i.contentWidth - i.containerWidth && deltaX > 0)\r\n ) {\r\n return !i.settings.wheelPropagation;\r\n }\r\n }\r\n return true;\r\n }\r\n\r\n i.event.bind(i.ownerDocument, 'keydown', e => {\r\n if (\r\n (e.isDefaultPrevented && e.isDefaultPrevented()) ||\r\n e.defaultPrevented\r\n ) {\r\n return;\r\n }\r\n\r\n if (!elementHovered() && !scrollbarFocused()) {\r\n return;\r\n }\r\n\r\n let activeElement = document.activeElement\r\n ? document.activeElement\r\n : i.ownerDocument.activeElement;\r\n if (activeElement) {\r\n if (activeElement.tagName === 'IFRAME') {\r\n activeElement = activeElement.contentDocument.activeElement;\r\n } else {\r\n // go deeper if element is a webcomponent\r\n while (activeElement.shadowRoot) {\r\n activeElement = activeElement.shadowRoot.activeElement;\r\n }\r\n }\r\n if (isEditable(activeElement)) {\r\n return;\r\n }\r\n }\r\n\r\n let deltaX = 0;\r\n let deltaY = 0;\r\n\r\n switch (e.which) {\r\n case 37: // left\r\n if (e.metaKey) {\r\n deltaX = -i.contentWidth;\r\n } else if (e.altKey) {\r\n deltaX = -i.containerWidth;\r\n } else {\r\n deltaX = -30;\r\n }\r\n break;\r\n case 38: // up\r\n if (e.metaKey) {\r\n deltaY = i.contentHeight;\r\n } else if (e.altKey) {\r\n deltaY = i.containerHeight;\r\n } else {\r\n deltaY = 30;\r\n }\r\n break;\r\n case 39: // right\r\n if (e.metaKey) {\r\n deltaX = i.contentWidth;\r\n } else if (e.altKey) {\r\n deltaX = i.containerWidth;\r\n } else {\r\n deltaX = 30;\r\n }\r\n break;\r\n case 40: // down\r\n if (e.metaKey) {\r\n deltaY = -i.contentHeight;\r\n } else if (e.altKey) {\r\n deltaY = -i.containerHeight;\r\n } else {\r\n deltaY = -30;\r\n }\r\n break;\r\n case 32: // space bar\r\n if (e.shiftKey) {\r\n deltaY = i.containerHeight;\r\n } else {\r\n deltaY = -i.containerHeight;\r\n }\r\n break;\r\n case 33: // page up\r\n deltaY = i.containerHeight;\r\n break;\r\n case 34: // page down\r\n deltaY = -i.containerHeight;\r\n break;\r\n case 36: // home\r\n deltaY = i.contentHeight;\r\n break;\r\n case 35: // end\r\n deltaY = -i.contentHeight;\r\n break;\r\n default:\r\n return;\r\n }\r\n\r\n if (i.settings.suppressScrollX && deltaX !== 0) {\r\n return;\r\n }\r\n if (i.settings.suppressScrollY && deltaY !== 0) {\r\n return;\r\n }\r\n\r\n element.scrollTop -= deltaY;\r\n element.scrollLeft += deltaX;\r\n updateGeometry(i);\r\n\r\n if (shouldPreventDefault(deltaX, deltaY)) {\r\n e.preventDefault();\r\n }\r\n });\r\n}\r\n","import updateGeometry from '../update-geometry';\r\nimport cls from '../lib/class-names';\r\nimport * as CSS from '../lib/css';\r\nimport { env } from '../lib/util';\r\n\r\nexport default function(i) {\r\n if (!env.supportsTouch && !env.supportsIePointer) {\r\n return;\r\n }\r\n\r\n const element = i.element;\r\n\r\n function shouldPrevent(deltaX, deltaY) {\r\n const scrollTop = Math.floor(element.scrollTop);\r\n const scrollLeft = element.scrollLeft;\r\n const magnitudeX = Math.abs(deltaX);\r\n const magnitudeY = Math.abs(deltaY);\r\n\r\n if (magnitudeY > magnitudeX) {\r\n // user is perhaps trying to swipe up/down the page\r\n\r\n if (\r\n (deltaY < 0 && scrollTop === i.contentHeight - i.containerHeight) ||\r\n (deltaY > 0 && scrollTop === 0)\r\n ) {\r\n // set prevent for mobile Chrome refresh\r\n return window.scrollY === 0 && deltaY > 0 && env.isChrome;\r\n }\r\n } else if (magnitudeX > magnitudeY) {\r\n // user is perhaps trying to swipe left/right across the page\r\n\r\n if (\r\n (deltaX < 0 && scrollLeft === i.contentWidth - i.containerWidth) ||\r\n (deltaX > 0 && scrollLeft === 0)\r\n ) {\r\n return true;\r\n }\r\n }\r\n\r\n return true;\r\n }\r\n\r\n function applyTouchMove(differenceX, differenceY) {\r\n element.scrollTop -= differenceY;\r\n element.scrollLeft -= differenceX;\r\n\r\n updateGeometry(i);\r\n }\r\n\r\n let startOffset = {};\r\n let startTime = 0;\r\n let speed = {};\r\n let easingLoop = null;\r\n\r\n function getTouch(e) {\r\n if (e.targetTouches) {\r\n return e.targetTouches[0];\r\n } else {\r\n // Maybe IE pointer\r\n return e;\r\n }\r\n }\r\n\r\n function shouldHandle(e) {\r\n if (e.pointerType && e.pointerType === 'pen' && e.buttons === 0) {\r\n return false;\r\n }\r\n if (e.targetTouches && e.targetTouches.length === 1) {\r\n return true;\r\n }\r\n if (\r\n e.pointerType &&\r\n e.pointerType !== 'mouse' &&\r\n e.pointerType !== e.MSPOINTER_TYPE_MOUSE\r\n ) {\r\n return true;\r\n }\r\n return false;\r\n }\r\n\r\n function touchStart(e) {\r\n if (!shouldHandle(e)) {\r\n return;\r\n }\r\n\r\n const touch = getTouch(e);\r\n\r\n startOffset.pageX = touch.pageX;\r\n startOffset.pageY = touch.pageY;\r\n\r\n startTime = new Date().getTime();\r\n\r\n if (easingLoop !== null) {\r\n clearInterval(easingLoop);\r\n }\r\n }\r\n\r\n function shouldBeConsumedByChild(target, deltaX, deltaY) {\r\n if (!element.contains(target)) {\r\n return false;\r\n }\r\n\r\n let cursor = target;\r\n\r\n while (cursor && cursor !== element) {\r\n if (cursor.classList.contains(cls.element.consuming)) {\r\n return true;\r\n }\r\n\r\n const style = CSS.get(cursor);\r\n\r\n // if deltaY && vertical scrollable\r\n if (deltaY && style.overflowY.match(/(scroll|auto)/)) {\r\n const maxScrollTop = cursor.scrollHeight - cursor.clientHeight;\r\n if (maxScrollTop > 0) {\r\n if (\r\n (cursor.scrollTop > 0 && deltaY < 0) ||\r\n (cursor.scrollTop < maxScrollTop && deltaY > 0)\r\n ) {\r\n return true;\r\n }\r\n }\r\n }\r\n // if deltaX && horizontal scrollable\r\n if (deltaX && style.overflowX.match(/(scroll|auto)/)) {\r\n const maxScrollLeft = cursor.scrollWidth - cursor.clientWidth;\r\n if (maxScrollLeft > 0) {\r\n if (\r\n (cursor.scrollLeft > 0 && deltaX < 0) ||\r\n (cursor.scrollLeft < maxScrollLeft && deltaX > 0)\r\n ) {\r\n return true;\r\n }\r\n }\r\n }\r\n\r\n cursor = cursor.parentNode;\r\n }\r\n\r\n return false;\r\n }\r\n\r\n function touchMove(e) {\r\n if (shouldHandle(e)) {\r\n const touch = getTouch(e);\r\n\r\n const currentOffset = { pageX: touch.pageX, pageY: touch.pageY };\r\n\r\n const differenceX = currentOffset.pageX - startOffset.pageX;\r\n const differenceY = currentOffset.pageY - startOffset.pageY;\r\n\r\n if (shouldBeConsumedByChild(e.target, differenceX, differenceY)) {\r\n return;\r\n }\r\n\r\n applyTouchMove(differenceX, differenceY);\r\n startOffset = currentOffset;\r\n\r\n const currentTime = new Date().getTime();\r\n\r\n const timeGap = currentTime - startTime;\r\n if (timeGap > 0) {\r\n speed.x = differenceX / timeGap;\r\n speed.y = differenceY / timeGap;\r\n startTime = currentTime;\r\n }\r\n\r\n if (shouldPrevent(differenceX, differenceY)) {\r\n e.preventDefault();\r\n }\r\n }\r\n }\r\n function touchEnd() {\r\n if (i.settings.swipeEasing) {\r\n clearInterval(easingLoop);\r\n easingLoop = setInterval(function() {\r\n if (i.isInitialized) {\r\n clearInterval(easingLoop);\r\n return;\r\n }\r\n\r\n if (!speed.x && !speed.y) {\r\n clearInterval(easingLoop);\r\n return;\r\n }\r\n\r\n if (Math.abs(speed.x) < 0.01 && Math.abs(speed.y) < 0.01) {\r\n clearInterval(easingLoop);\r\n return;\r\n }\r\n\r\n if (!i.element) {\r\n clearInterval(easingLoop);\r\n return;\r\n }\r\n\r\n applyTouchMove(speed.x * 30, speed.y * 30);\r\n\r\n speed.x *= 0.8;\r\n speed.y *= 0.8;\r\n }, 10);\r\n }\r\n }\r\n\r\n if (env.supportsTouch) {\r\n i.event.bind(element, 'touchstart', touchStart);\r\n i.event.bind(element, 'touchmove', touchMove);\r\n i.event.bind(element, 'touchend', touchEnd);\r\n } else if (env.supportsIePointer) {\r\n if (window.PointerEvent) {\r\n i.event.bind(element, 'pointerdown', touchStart);\r\n i.event.bind(element, 'pointermove', touchMove);\r\n i.event.bind(element, 'pointerup', touchEnd);\r\n } else if (window.MSPointerEvent) {\r\n i.event.bind(element, 'MSPointerDown', touchStart);\r\n i.event.bind(element, 'MSPointerMove', touchMove);\r\n i.event.bind(element, 'MSPointerUp', touchEnd);\r\n }\r\n }\r\n}\r\n"],"names":["Math","abs","floor","get","element","getComputedStyle","set","obj","const","key","let","val","style","div","className","document","createElement","matches","query","elMatches","Error","call","remove","parentNode","removeChild","queryChildren","selector","Array","prototype","filter","children","child","addScrollingClass","i","x","classList","cls","state","scrolling","contains","clearTimeout","scrollingClassTimeout","add","removeScrollingClass","setTimeout","isAlive","settings","scrollingThreshold","setScrollingClassInstantly","createEvent","name","window","CustomEvent","evt","initCustomEvent","axis","diff","useScrollingClass","forceFireReachEvent","fields","processScrollDiff","ref","reach","y","scrollTop","contentHeight","containerHeight","dispatchEvent","up","down","toInt","parseInt","isEditable","el","DOM.matches","outerWidth","styles","CSS.get","width","paddingLeft","paddingRight","borderLeftWidth","borderRightWidth","round","roundedScrollTop","rect","getBoundingClientRect","containerWidth","height","contentWidth","scrollWidth","scrollHeight","scrollbarXRail","DOM.queryChildren","rail","forEach","DOM.remove","appendChild","scrollbarYRail","suppressScrollX","scrollXMarginOffset","scrollbarXActive","railXWidth","railXMarginWidth","railXRatio","scrollbarXWidth","getThumbSize","scrollbarXLeft","negativeScrollAdjustment","scrollLeft","suppressScrollY","scrollYMarginOffset","scrollbarYActive","railYHeight","railYMarginHeight","railYRatio","scrollbarYHeight","scrollbarYTop","updateCss","active","isRtl","thumbSize","min","max","minScrollbarLength","maxScrollbarLength","xRailOffset","left","isScrollbarXUsingBottom","bottom","scrollbarXBottom","top","scrollbarXTop","CSS.set","yRailOffset","isScrollbarYUsingRight","right","scrollbarYRight","scrollbarYOuterWidth","scrollbarYLeft","scrollbarX","railBorderXWidth","scrollbarY","railBorderYWidth","bindMouseScrollHandler","mouseMoveHandler","e","touches","pageY","startingScrollTop","scrollBy","startingMousePageY","updateGeometry","stopPropagation","preventDefault","mouseUpHandler","clicking","event","unbind","ownerDocument","bindMoves","touchMode","bind","once","Element","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","main","rtl","thumb","consuming","focus","EventElement","handlers","eventName","handler","push","addEventListener","target","this","removeEventListener","unbindAll","prototypeAccessors","isEmpty","Object","keys","every","length","EventManager","eventElements","eventElement","ee","splice","indexOf","onceHandler","env","isWebKit","documentElement","supportsTouch","navigator","maxTouchPoints","DocumentTouch","supportsIePointer","msMaxTouchPoints","isChrome","test","userAgent","defaultSettings","swipeEasing","useBothWheelAxes","wheelPropagation","wheelSpeed","positionTop","pageYOffset","direction","positionLeft","pageX","pageXOffset","shouldPreventDefault","deltaX","deltaY","elementHovered","scrollbarFocused","isDefaultPrevented","defaultPrevented","activeElement","tagName","contentDocument","shadowRoot","which","metaKey","altKey","shiftKey","hitsBound","isTop","isBottom","offsetHeight","isLeft","isRight","offsetWidth","getDeltaFromEvent","wheelDeltaX","wheelDeltaY","deltaMode","wheelDelta","shouldBeConsumedByChild","querySelector","cursor","overflowY","match","maxScrollTop","clientHeight","overflowX","maxScrollLeft","clientWidth","mousewheelHandler","shouldPrevent","ctrlKey","onwheel","onmousewheel","magnitudeX","magnitudeY","scrollY","applyTouchMove","differenceX","differenceY","getTouch","targetTouches","shouldHandle","pointerType","buttons","MSPOINTER_TYPE_MOUSE","touchStart","touch","startOffset","startTime","Date","getTime","easingLoop","clearInterval","touchMove","currentOffset","currentTime","timeGap","speed","touchEnd","setInterval","isInitialized","PointerEvent","MSPointerEvent","PerfectScrollbar","userSettings","nodeName","blur","isNegativeScroll","originalScrollLeft","result","DOM.div","setAttribute","railXStyle","isNaN","display","marginLeft","marginRight","railYStyle","borderTopWidth","borderBottomWidth","marginTop","marginBottom","handlerName","lastScrollTop","lastScrollLeft","onScroll","update","destroy","removePsClasses","split","join"],"mappings":";;;;kNAsBQA,IAAI,CAACC,M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CANF,CAOV5C,CAAY,CAAC,KAAK8C,UAAN,CAPF,CAQV9C,CAAY,CAAC,KAAKJ,cAAN,CARF,CASVI,CAAY,CAAC,KAAKE,cAAN,CATF,CAUR,KAAK0N,eAAL,EAVQ,CAaR,KAAKxT,OAAL,CAAe,IAbP,CAcR,KAAKwI,UAAL,CAAkB,IAdV,CAeR,KAAKE,UAAL,CAAkB,IAfV,CAgBR,KAAKlD,cAAL,CAAsB,IAhBd,CAiBR,KAAKM,cAAL,CAAsB,IAjBd,CAmBR,KAAKrD,OAAL,GAnBQ,GAsBZsP,WAAA,CAAEyB,eAAF,WAAoB,CAClB,KAAOxT,OAAP,CAAeU,SAAf,CAA2B,KAAKV,OAAL,CAAaU,SAAb,CACtB+S,KADsB,CAChB,GADgB,EAEtBhS,MAFsB,UAEfqB,EAAK,OAAG,CAACA,CAAI,CAACwM,KAAL,CAAW,eAAX,CAA2B,CAFrB,EAGtBoE,IAHsB,CAGjB,GAHiB,CAI1B"} \ No newline at end of file +{"version":3,"file":"perfect-scrollbar.min.js","sources":["../src/handlers/mouse-wheel.js","../src/update-geometry.js","../src/lib/css.js","../src/lib/dom.js","../src/lib/class-names.js","../src/process-scroll-diff.js","../src/lib/util.js","../src/handlers/drag-thumb.js","../src/lib/event-manager.js","../src/index.js","../src/handlers/click-rail.js","../src/handlers/keyboard.js","../src/handlers/touch.js"],"sourcesContent":["import * as CSS from '../lib/css';\nimport cls from '../lib/class-names';\nimport updateGeometry from '../update-geometry';\nimport { env } from '../lib/util';\n\nexport default function(i) {\n const element = i.element;\n\n let shouldPrevent = false;\n\n function shouldPreventDefault(deltaX, deltaY) {\n const roundedScrollTop = Math.floor(element.scrollTop);\n const isTop = element.scrollTop === 0;\n const isBottom =\n roundedScrollTop + element.offsetHeight === element.scrollHeight;\n const isLeft = element.scrollLeft === 0;\n const isRight =\n element.scrollLeft + element.offsetWidth === element.scrollWidth;\n\n let hitsBound;\n\n // pick axis with primary direction\n if (Math.abs(deltaY) > Math.abs(deltaX)) {\n hitsBound = isTop || isBottom;\n } else {\n hitsBound = isLeft || isRight;\n }\n\n return hitsBound ? !i.settings.wheelPropagation : true;\n }\n\n function getDeltaFromEvent(e) {\n let deltaX = e.deltaX;\n let deltaY = -1 * e.deltaY;\n\n if (typeof deltaX === 'undefined' || typeof deltaY === 'undefined') {\n // OS X Safari\n deltaX = (-1 * e.wheelDeltaX) / 6;\n deltaY = e.wheelDeltaY / 6;\n }\n\n if (e.deltaMode && e.deltaMode === 1) {\n // Firefox in deltaMode 1: Line scrolling\n deltaX *= 10;\n deltaY *= 10;\n }\n\n if (deltaX !== deltaX && deltaY !== deltaY /* NaN checks */) {\n // IE in some mouse drivers\n deltaX = 0;\n deltaY = e.wheelDelta;\n }\n\n if (e.shiftKey) {\n // reverse axis with shift key\n return [-deltaY, -deltaX];\n }\n return [deltaX, deltaY];\n }\n\n function shouldBeConsumedByChild(target, deltaX, deltaY) {\n // FIXME: this is a workaround for issue in FF and IE #571 if(!E.isWebKit&&h.querySelector("select:focus"))return!0;if(!h.contains(b))return!1;for(var e=b;e&&e!==h;){if(e.classList.contains(z.element.consuming))return!0;var f=a(e);// if deltaY && vertical scrollable if(d&&f.overflowY.match(/(scroll|auto)/)){var g=e.scrollHeight-e.clientHeight;if(0d||e.scrollTopc&&d===b.contentHeight-b.containerHeight||0g&&(0>a&&e===b.contentWidth-b.containerWidth||0d||e.scrollTopc||e.scrollLeftu(o.x)&&.01>u(o.y)?void clearInterval(p):void(d(30*o.x,30*o.y),o.x*=.8,o.y*=.8):void clearInterval(p)},10))}if(E.supportsTouch||E.supportsIePointer){var l=b.element,m={},n=0,o={},p=null;E.supportsTouch?(b.event.bind(l,"touchstart",h),b.event.bind(l,"touchmove",j),b.event.bind(l,"touchend",k)):E.supportsIePointer&&(window.PointerEvent?(b.event.bind(l,"pointerdown",h),b.event.bind(l,"pointermove",j),b.event.bind(l,"pointerup",k)):window.MSPointerEvent&&(b.event.bind(l,"MSPointerDown",h),b.event.bind(l,"MSPointerMove",j),b.event.bind(l,"MSPointerUp",k)))}}},H=function(d,e){var f=this;if(void 0===e&&(e={}),"string"==typeof d&&(d=document.querySelector(d)),!d||!d.nodeName)throw new Error("no element is specified to initialize PerfectScrollbar");for(var g in this.element=d,d.classList.add(z.main),this.settings=F(),e)this.settings[g]=e[g];this.containerWidth=null,this.containerHeight=null,this.contentWidth=null,this.contentHeight=null;var h=function(){return d.classList.add(z.state.focus)},i=function(){return d.classList.remove(z.state.focus)};this.isRtl="rtl"===a(d).direction,!0===this.isRtl&&d.classList.add(z.rtl),this.isNegativeScroll=function(){var a=d.scrollLeft,b=null;return d.scrollLeft=-1,b=0>d.scrollLeft,d.scrollLeft=a,b}(),this.negativeScrollAdjustment=this.isNegativeScroll?d.scrollWidth-d.clientWidth:0,this.event=new D,this.ownerDocument=d.ownerDocument||document,this.scrollbarXRail=c(z.element.rail("x")),d.appendChild(this.scrollbarXRail),this.scrollbarX=c(z.element.thumb("x")),this.scrollbarXRail.appendChild(this.scrollbarX),this.scrollbarX.setAttribute("tabindex",0),this.event.bind(this.scrollbarX,"focus",h),this.event.bind(this.scrollbarX,"blur",i),this.scrollbarXActive=null,this.scrollbarXWidth=null,this.scrollbarXLeft=null;var j=a(this.scrollbarXRail);this.scrollbarXBottom=parseInt(j.bottom,10),isNaN(this.scrollbarXBottom)?(this.isScrollbarXUsingBottom=!1,this.scrollbarXTop=n(j.top)):this.isScrollbarXUsingBottom=!0,this.railBorderXWidth=n(j.borderLeftWidth)+n(j.borderRightWidth),b(this.scrollbarXRail,{display:"block"}),this.railXMarginWidth=n(j.marginLeft)+n(j.marginRight),b(this.scrollbarXRail,{display:""}),this.railXWidth=null,this.railXRatio=null,this.scrollbarYRail=c(z.element.rail("y")),d.appendChild(this.scrollbarYRail),this.scrollbarY=c(z.element.thumb("y")),this.scrollbarYRail.appendChild(this.scrollbarY),this.scrollbarY.setAttribute("tabindex",0),this.event.bind(this.scrollbarY,"focus",h),this.event.bind(this.scrollbarY,"blur",i),this.scrollbarYActive=null,this.scrollbarYHeight=null,this.scrollbarYTop=null;var k=a(this.scrollbarYRail);this.scrollbarYRight=parseInt(k.right,10),isNaN(this.scrollbarYRight)?(this.isScrollbarYUsingRight=!1,this.scrollbarYLeft=n(k.left)):this.isScrollbarYUsingRight=!0,this.scrollbarYOuterWidth=this.isRtl?p(this.scrollbarY):null,this.railBorderYWidth=n(k.borderTopWidth)+n(k.borderBottomWidth),b(this.scrollbarYRail,{display:"block"}),this.railYMarginHeight=n(k.marginTop)+n(k.marginBottom),b(this.scrollbarYRail,{display:""}),this.railYHeight=null,this.railYRatio=null,this.reach={x:0>=d.scrollLeft?"start":d.scrollLeft>=this.contentWidth-this.containerWidth?"end":null,y:0>=d.scrollTop?"start":d.scrollTop>=this.contentHeight-this.containerHeight?"end":null},this.isAlive=!0,this.settings.handlers.forEach(function(a){return G[a](f)}),this.lastScrollTop=v(d.scrollTop),this.lastScrollLeft=d.scrollLeft,this.event.bind(this.element,"scroll",function(a){return f.onScroll(a)}),q(this)};return H.prototype.update=function(){this.isAlive&&(// Recalcuate negative scrollLeft adjustment +if(c&&f.overflowX.match(/(scroll|auto)/)){var h=e.scrollWidth-e.clientWidth;if(0c||e.scrollLeftu(o.x)&&.01>u(o.y)?void clearInterval(p):b.element?void(d(30*o.x,30*o.y),o.x*=.8,o.y*=.8):void clearInterval(p):void clearInterval(p)},10))}if(E.supportsTouch||E.supportsIePointer){var l=b.element,m={},n=0,o={},p=null;E.supportsTouch?(b.event.bind(l,"touchstart",h),b.event.bind(l,"touchmove",j),b.event.bind(l,"touchend",k)):E.supportsIePointer&&(window.PointerEvent?(b.event.bind(l,"pointerdown",h),b.event.bind(l,"pointermove",j),b.event.bind(l,"pointerup",k)):window.MSPointerEvent&&(b.event.bind(l,"MSPointerDown",h),b.event.bind(l,"MSPointerMove",j),b.event.bind(l,"MSPointerUp",k)))}}},H=function(d,e){var f=this;if(void 0===e&&(e={}),"string"==typeof d&&(d=document.querySelector(d)),!d||!d.nodeName)throw new Error("no element is specified to initialize PerfectScrollbar");for(var g in this.element=d,d.classList.add(z.main),this.settings=F(),e)this.settings[g]=e[g];this.containerWidth=null,this.containerHeight=null,this.contentWidth=null,this.contentHeight=null;var h=function(){return d.classList.add(z.state.focus)},i=function(){return d.classList.remove(z.state.focus)};this.isRtl="rtl"===a(d).direction,!0===this.isRtl&&d.classList.add(z.rtl),this.isNegativeScroll=function(){var a=d.scrollLeft,b=null;return d.scrollLeft=-1,b=0>d.scrollLeft,d.scrollLeft=a,b}(),this.negativeScrollAdjustment=this.isNegativeScroll?d.scrollWidth-d.clientWidth:0,this.event=new D,this.ownerDocument=d.ownerDocument||document,this.scrollbarXRail=c(z.element.rail("x")),d.appendChild(this.scrollbarXRail),this.scrollbarX=c(z.element.thumb("x")),this.scrollbarXRail.appendChild(this.scrollbarX),this.scrollbarX.setAttribute("tabindex",0),this.event.bind(this.scrollbarX,"focus",h),this.event.bind(this.scrollbarX,"blur",i),this.scrollbarXActive=null,this.scrollbarXWidth=null,this.scrollbarXLeft=null;var j=a(this.scrollbarXRail);this.scrollbarXBottom=parseInt(j.bottom,10),isNaN(this.scrollbarXBottom)?(this.isScrollbarXUsingBottom=!1,this.scrollbarXTop=n(j.top)):this.isScrollbarXUsingBottom=!0,this.railBorderXWidth=n(j.borderLeftWidth)+n(j.borderRightWidth),b(this.scrollbarXRail,{display:"block"}),this.railXMarginWidth=n(j.marginLeft)+n(j.marginRight),b(this.scrollbarXRail,{display:""}),this.railXWidth=null,this.railXRatio=null,this.scrollbarYRail=c(z.element.rail("y")),d.appendChild(this.scrollbarYRail),this.scrollbarY=c(z.element.thumb("y")),this.scrollbarYRail.appendChild(this.scrollbarY),this.scrollbarY.setAttribute("tabindex",0),this.event.bind(this.scrollbarY,"focus",h),this.event.bind(this.scrollbarY,"blur",i),this.scrollbarYActive=null,this.scrollbarYHeight=null,this.scrollbarYTop=null;var k=a(this.scrollbarYRail);this.scrollbarYRight=parseInt(k.right,10),isNaN(this.scrollbarYRight)?(this.isScrollbarYUsingRight=!1,this.scrollbarYLeft=n(k.left)):this.isScrollbarYUsingRight=!0,this.scrollbarYOuterWidth=this.isRtl?p(this.scrollbarY):null,this.railBorderYWidth=n(k.borderTopWidth)+n(k.borderBottomWidth),b(this.scrollbarYRail,{display:"block"}),this.railYMarginHeight=n(k.marginTop)+n(k.marginBottom),b(this.scrollbarYRail,{display:""}),this.railYHeight=null,this.railYRatio=null,this.reach={x:0>=d.scrollLeft?"start":d.scrollLeft>=this.contentWidth-this.containerWidth?"end":null,y:0>=d.scrollTop?"start":d.scrollTop>=this.contentHeight-this.containerHeight?"end":null},this.isAlive=!0,this.settings.handlers.forEach(function(a){return G[a](f)}),this.lastScrollTop=v(d.scrollTop),this.lastScrollLeft=d.scrollLeft,this.event.bind(this.element,"scroll",function(a){return f.onScroll(a)}),q(this)};return H.prototype.update=function(){this.isAlive&&(// Recalcuate negative scrollLeft adjustment // Recalculate rail margins // Hide scrollbars not to affect scrollWidth and scrollHeight this.negativeScrollAdjustment=this.isNegativeScroll?this.element.scrollWidth-this.element.clientWidth:0,b(this.scrollbarXRail,{display:"block"}),b(this.scrollbarYRail,{display:"block"}),this.railXMarginWidth=n(a(this.scrollbarXRail).marginLeft)+n(a(this.scrollbarXRail).marginRight),this.railYMarginHeight=n(a(this.scrollbarYRail).marginTop)+n(a(this.scrollbarYRail).marginBottom),b(this.scrollbarXRail,{display:"none"}),b(this.scrollbarYRail,{display:"none"}),q(this),l(this,"top",0,!1,!0),l(this,"left",0,!1,!0),b(this.scrollbarXRail,{display:""}),b(this.scrollbarYRail,{display:""}))},H.prototype.onScroll=function(){this.isAlive&&(q(this),l(this,"top",this.element.scrollTop-this.lastScrollTop),l(this,"left",this.element.scrollLeft-this.lastScrollLeft),this.lastScrollTop=v(this.element.scrollTop),this.lastScrollLeft=this.element.scrollLeft)},H.prototype.destroy=function(){this.isAlive&&(// unset elements diff --git a/package-lock.json b/package-lock.json index 2ef9866..4f0d8da 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,8 +1,1355 @@ { "name": "perfect-scrollbar", - "version": "1.5.1", - "lockfileVersion": 1, + "version": "1.5.3", + "lockfileVersion": 2, "requires": true, + "packages": { + "": { + "version": "1.5.3", + "license": "MIT", + "devDependencies": { + "chokidar-cli": "^2.1.0", + "prettier": "^1.19.1", + "rollup": "^1.27.8", + "rollup-plugin-babel": "^4.3.3", + "rollup-plugin-babel-minify": "^9.1.1", + "rollup-plugin-buble": "^0.19.8" + } + }, + "node_modules/@babel/code-frame": { + "version": "7.5.5", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.5.5.tgz", + "integrity": "sha512-27d4lZoomVyo51VegxI20xZPuSHusqbQag/ztrBC7wegWoQ1nLREPVSKSW8byhTlzTKyNE4ifaTA6lCp7JjpFw==", + "dev": true, + "dependencies": { + "@babel/highlight": "^7.0.0" + } + }, + "node_modules/@babel/core": { + "version": "7.7.4", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.7.4.tgz", + "integrity": "sha512-+bYbx56j4nYBmpsWtnPUsKW3NdnYxbqyfrP2w9wILBuHzdfIKz9prieZK0DFPyIzkjYVUe4QkusGL07r5pXznQ==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.5.5", + "@babel/generator": "^7.7.4", + "@babel/helpers": "^7.7.4", + "@babel/parser": "^7.7.4", + "@babel/template": "^7.7.4", + "@babel/traverse": "^7.7.4", + "@babel/types": "^7.7.4", + "convert-source-map": "^1.7.0", + "debug": "^4.1.0", + "json5": "^2.1.0", + "lodash": "^4.17.13", + "resolve": "^1.3.2", + "semver": "^5.4.1", + "source-map": "^0.5.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/generator": { + "version": "7.7.4", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.7.4.tgz", + "integrity": "sha512-m5qo2WgdOJeyYngKImbkyQrnUN1mPceaG5BV+G0E3gWsa4l/jCSryWJdM2x8OuGAOyh+3d5pVYfZWCiNFtynxg==", + "dev": true, + "dependencies": { + "@babel/types": "^7.7.4", + "jsesc": "^2.5.1", + "lodash": "^4.17.13", + "source-map": "^0.5.0" + } + }, + "node_modules/@babel/helper-function-name": { + "version": "7.7.4", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.7.4.tgz", + "integrity": "sha512-AnkGIdiBhEuiwdoMnKm7jfPfqItZhgRaZfMg1XX3bS25INOnLPjPG1Ppnajh8eqgt5kPJnfqrRHqFqmjKDZLzQ==", + "dev": true, + "dependencies": { + "@babel/helper-get-function-arity": "^7.7.4", + "@babel/template": "^7.7.4", + "@babel/types": "^7.7.4" + } + }, + "node_modules/@babel/helper-get-function-arity": { + "version": "7.7.4", + "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.7.4.tgz", + "integrity": "sha512-QTGKEdCkjgzgfJ3bAyRwF4yyT3pg+vDgan8DSivq1eS0gwi+KGKE5x8kRcbeFTb/673mkO5SN1IZfmCfA5o+EA==", + "dev": true, + "dependencies": { + "@babel/types": "^7.7.4" + } + }, + "node_modules/@babel/helper-module-imports": { + "version": "7.7.4", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.7.4.tgz", + "integrity": "sha512-dGcrX6K9l8258WFjyDLJwuVKxR4XZfU0/vTUgOQYWEnRD8mgr+p4d6fCUMq/ys0h4CCt/S5JhbvtyErjWouAUQ==", + "dev": true, + "dependencies": { + "@babel/types": "^7.7.4" + } + }, + "node_modules/@babel/helper-plugin-utils": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.0.0.tgz", + "integrity": "sha512-CYAOUCARwExnEixLdB6sDm2dIJ/YgEAKDM1MOeMeZu9Ld/bDgVo8aiWrXwcY7OBh+1Ea2uUcVRcxKk0GJvW7QA==", + "dev": true + }, + "node_modules/@babel/helper-split-export-declaration": { + "version": "7.7.4", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.7.4.tgz", + "integrity": "sha512-guAg1SXFcVr04Guk9eq0S4/rWS++sbmyqosJzVs8+1fH5NI+ZcmkaSkc7dmtAFbHFva6yRJnjW3yAcGxjueDug==", + "dev": true, + "dependencies": { + "@babel/types": "^7.7.4" + } + }, + "node_modules/@babel/helpers": { + "version": "7.7.4", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.7.4.tgz", + "integrity": "sha512-ak5NGZGJ6LV85Q1Zc9gn2n+ayXOizryhjSUBTdu5ih1tlVCJeuQENzc4ItyCVhINVXvIT/ZQ4mheGIsfBkpskg==", + "dev": true, + "dependencies": { + "@babel/template": "^7.7.4", + "@babel/traverse": "^7.7.4", + "@babel/types": "^7.7.4" + } + }, + "node_modules/@babel/highlight": { + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.5.0.tgz", + "integrity": "sha512-7dV4eu9gBxoM0dAnj/BCFDW9LFU0zvTrkq0ugM7pnHEgguOEeOz1so2ZghEdzviYzQEED0r4EAgpsBChKy1TRQ==", + "dev": true, + "dependencies": { + "chalk": "^2.0.0", + "esutils": "^2.0.2", + "js-tokens": "^4.0.0" + } + }, + "node_modules/@babel/parser": { + "version": "7.7.4", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.7.4.tgz", + "integrity": "sha512-jIwvLO0zCL+O/LmEJQjWA75MQTWwx3c3u2JOTDK5D3/9egrWRRA0/0hk9XXywYnXZVVpzrBYeIQTmhwUaePI9g==", + "dev": true, + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/plugin-syntax-dynamic-import": { + "version": "7.7.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.7.4.tgz", + "integrity": "sha512-jHQW0vbRGvwQNgyVxwDh4yuXu4bH1f5/EICJLAhl1SblLs2CDhrsmCk+v5XLdE9wxtAFRyxx+P//Iw+a5L/tTg==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.0.0" + } + }, + "node_modules/@babel/template": { + "version": "7.7.4", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.7.4.tgz", + "integrity": "sha512-qUzihgVPguAzXCK7WXw8pqs6cEwi54s3E+HrejlkuWO6ivMKx9hZl3Y2fSXp9i5HgyWmj7RKP+ulaYnKM4yYxw==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.0.0", + "@babel/parser": "^7.7.4", + "@babel/types": "^7.7.4" + } + }, + "node_modules/@babel/traverse": { + "version": "7.7.4", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.7.4.tgz", + "integrity": "sha512-P1L58hQyupn8+ezVA2z5KBm4/Zr4lCC8dwKCMYzsa5jFMDMQAzaBNy9W5VjB+KAmBjb40U7a/H6ao+Xo+9saIw==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.5.5", + "@babel/generator": "^7.7.4", + "@babel/helper-function-name": "^7.7.4", + "@babel/helper-split-export-declaration": "^7.7.4", + "@babel/parser": "^7.7.4", + "@babel/types": "^7.7.4", + "debug": "^4.1.0", + "globals": "^11.1.0", + "lodash": "^4.17.13" + } + }, + "node_modules/@babel/types": { + "version": "7.7.4", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.7.4.tgz", + "integrity": "sha512-cz5Ji23KCi4T+YIE/BolWosrJuSmoZeN1EFnRtBwF+KKLi8GG/Z2c2hOJJeCXPk4mwk4QFvTmwIodJowXgttRA==", + "dev": true, + "dependencies": { + "esutils": "^2.0.2", + "lodash": "^4.17.13", + "to-fast-properties": "^2.0.0" + } + }, + "node_modules/@comandeer/babel-plugin-banner": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/@comandeer/babel-plugin-banner/-/babel-plugin-banner-5.0.0.tgz", + "integrity": "sha512-sR9Go0U6puXoXyW9UgIiIQhRcJ8jVOvGl4BptUiXAtheMs72WcakZ1udh6J0ZOivr3o8jAM+MTCHLP8FZMbVpQ==", + "dev": true, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/@types/estree": { + "version": "0.0.42", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.42.tgz", + "integrity": "sha512-K1DPVvnBCPxzD+G51/cxVIoc2X8uUVl1zpJeE6iKcgHMj4+tbat5Xu4TjV7v2QSDbIeAfLi2hIk+u2+s0MlpUQ==", + "dev": true + }, + "node_modules/@types/node": { + "version": "13.1.7", + "resolved": "https://registry.npmjs.org/@types/node/-/node-13.1.7.tgz", + "integrity": "sha512-HU0q9GXazqiKwviVxg9SI/+t/nAsGkvLDkIdxz+ObejG2nX6Si00TeLqHMoS+a/1tjH7a8YpKVQwtgHuMQsldg==", + "dev": true + }, + "node_modules/acorn": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.1.0.tgz", + "integrity": "sha512-kL5CuoXA/dgxlBbVrflsflzQ3PAas7RYZB52NOm/6839iVYJgKMJ3cQJD+t2i5+qFa8h3MDpEOJiS64E8JLnSQ==", + "dev": true, + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-dynamic-import": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/acorn-dynamic-import/-/acorn-dynamic-import-4.0.0.tgz", + "integrity": "sha512-d3OEjQV4ROpoflsnUA8HozoIR504TFxNivYEUi6uwz0IYhBkTDXGuWlNdMtybRt3nqVx/L6XqMt0FxkXuWKZhw==", + "dev": true + }, + "node_modules/acorn-jsx": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.1.0.tgz", + "integrity": "sha512-tMUqwBWfLFbJbizRmEcWSLw6HnFzfdJs2sOJEOwwtVPMoH/0Ay+E703oZz78VSXZiiDcZrQ5XKjPIUQixhmgVw==", + "dev": true + }, + "node_modules/ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/anymatch": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.1.tgz", + "integrity": "sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg==", + "dev": true, + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/babel-helper-evaluate-path": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/babel-helper-evaluate-path/-/babel-helper-evaluate-path-0.5.0.tgz", + "integrity": "sha512-mUh0UhS607bGh5wUMAQfOpt2JX2ThXMtppHRdRU1kL7ZLRWIXxoV2UIV1r2cAeeNeU1M5SB5/RSUgUxrK8yOkA==", + "dev": true + }, + "node_modules/babel-helper-flip-expressions": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/babel-helper-flip-expressions/-/babel-helper-flip-expressions-0.4.3.tgz", + "integrity": "sha1-NpZzahKKwYvCUlS19AoizrPB0/0=", + "dev": true + }, + "node_modules/babel-helper-is-nodes-equiv": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/babel-helper-is-nodes-equiv/-/babel-helper-is-nodes-equiv-0.0.1.tgz", + "integrity": "sha1-NOmzALFHnd2Y7HfqC76TQt/jloQ=", + "dev": true + }, + "node_modules/babel-helper-is-void-0": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/babel-helper-is-void-0/-/babel-helper-is-void-0-0.4.3.tgz", + "integrity": "sha1-fZwBtFYee5Xb2g9u7kj1tg5nMT4=", + "dev": true + }, + "node_modules/babel-helper-mark-eval-scopes": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/babel-helper-mark-eval-scopes/-/babel-helper-mark-eval-scopes-0.4.3.tgz", + "integrity": "sha1-0kSjvvmESHJgP/tG4izorN9VFWI=", + "dev": true + }, + "node_modules/babel-helper-remove-or-void": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/babel-helper-remove-or-void/-/babel-helper-remove-or-void-0.4.3.tgz", + "integrity": "sha1-pPA7QAd6D/6I5F0HAQ3uJB/1rmA=", + "dev": true + }, + "node_modules/babel-helper-to-multiple-sequence-expressions": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/babel-helper-to-multiple-sequence-expressions/-/babel-helper-to-multiple-sequence-expressions-0.5.0.tgz", + "integrity": "sha512-m2CvfDW4+1qfDdsrtf4dwOslQC3yhbgyBFptncp4wvtdrDHqueW7slsYv4gArie056phvQFhT2nRcGS4bnm6mA==", + "dev": true + }, + "node_modules/babel-plugin-minify-builtins": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/babel-plugin-minify-builtins/-/babel-plugin-minify-builtins-0.5.0.tgz", + "integrity": "sha512-wpqbN7Ov5hsNwGdzuzvFcjgRlzbIeVv1gMIlICbPj0xkexnfoIDe7q+AZHMkQmAE/F9R5jkrB6TLfTegImlXag==", + "dev": true + }, + "node_modules/babel-plugin-minify-constant-folding": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/babel-plugin-minify-constant-folding/-/babel-plugin-minify-constant-folding-0.5.0.tgz", + "integrity": "sha512-Vj97CTn/lE9hR1D+jKUeHfNy+m1baNiJ1wJvoGyOBUx7F7kJqDZxr9nCHjO/Ad+irbR3HzR6jABpSSA29QsrXQ==", + "dev": true, + "dependencies": { + "babel-helper-evaluate-path": "^0.5.0" + } + }, + "node_modules/babel-plugin-minify-dead-code-elimination": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/babel-plugin-minify-dead-code-elimination/-/babel-plugin-minify-dead-code-elimination-0.5.1.tgz", + "integrity": "sha512-x8OJOZIrRmQBcSqxBcLbMIK8uPmTvNWPXH2bh5MDCW1latEqYiRMuUkPImKcfpo59pTUB2FT7HfcgtG8ZlR5Qg==", + "dev": true, + "dependencies": { + "babel-helper-evaluate-path": "^0.5.0", + "babel-helper-mark-eval-scopes": "^0.4.3", + "babel-helper-remove-or-void": "^0.4.3", + "lodash": "^4.17.11" + } + }, + "node_modules/babel-plugin-minify-flip-comparisons": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/babel-plugin-minify-flip-comparisons/-/babel-plugin-minify-flip-comparisons-0.4.3.tgz", + "integrity": "sha1-AMqHDLjxO0XAOLPB68DyJyk8llo=", + "dev": true, + "dependencies": { + "babel-helper-is-void-0": "^0.4.3" + } + }, + "node_modules/babel-plugin-minify-guarded-expressions": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/babel-plugin-minify-guarded-expressions/-/babel-plugin-minify-guarded-expressions-0.4.4.tgz", + "integrity": "sha512-RMv0tM72YuPPfLT9QLr3ix9nwUIq+sHT6z8Iu3sLbqldzC1Dls8DPCywzUIzkTx9Zh1hWX4q/m9BPoPed9GOfA==", + "dev": true, + "dependencies": { + "babel-helper-evaluate-path": "^0.5.0", + "babel-helper-flip-expressions": "^0.4.3" + } + }, + "node_modules/babel-plugin-minify-infinity": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/babel-plugin-minify-infinity/-/babel-plugin-minify-infinity-0.4.3.tgz", + "integrity": "sha1-37h2obCKBldjhO8/kuZTumB7Oco=", + "dev": true + }, + "node_modules/babel-plugin-minify-mangle-names": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/babel-plugin-minify-mangle-names/-/babel-plugin-minify-mangle-names-0.5.0.tgz", + "integrity": "sha512-3jdNv6hCAw6fsX1p2wBGPfWuK69sfOjfd3zjUXkbq8McbohWy23tpXfy5RnToYWggvqzuMOwlId1PhyHOfgnGw==", + "dev": true, + "dependencies": { + "babel-helper-mark-eval-scopes": "^0.4.3" + } + }, + "node_modules/babel-plugin-minify-numeric-literals": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/babel-plugin-minify-numeric-literals/-/babel-plugin-minify-numeric-literals-0.4.3.tgz", + "integrity": "sha1-jk/VYcefeAEob/YOjF/Z3u6TwLw=", + "dev": true + }, + "node_modules/babel-plugin-minify-replace": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/babel-plugin-minify-replace/-/babel-plugin-minify-replace-0.5.0.tgz", + "integrity": "sha512-aXZiaqWDNUbyNNNpWs/8NyST+oU7QTpK7J9zFEFSA0eOmtUNMU3fczlTTTlnCxHmq/jYNFEmkkSG3DDBtW3Y4Q==", + "dev": true + }, + "node_modules/babel-plugin-minify-simplify": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/babel-plugin-minify-simplify/-/babel-plugin-minify-simplify-0.5.1.tgz", + "integrity": "sha512-OSYDSnoCxP2cYDMk9gxNAed6uJDiDz65zgL6h8d3tm8qXIagWGMLWhqysT6DY3Vs7Fgq7YUDcjOomhVUb+xX6A==", + "dev": true, + "dependencies": { + "babel-helper-evaluate-path": "^0.5.0", + "babel-helper-flip-expressions": "^0.4.3", + "babel-helper-is-nodes-equiv": "^0.0.1", + "babel-helper-to-multiple-sequence-expressions": "^0.5.0" + } + }, + "node_modules/babel-plugin-minify-type-constructors": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/babel-plugin-minify-type-constructors/-/babel-plugin-minify-type-constructors-0.4.3.tgz", + "integrity": "sha1-G8bxW4f3qxCF1CszC3F2V6IVZQA=", + "dev": true, + "dependencies": { + "babel-helper-is-void-0": "^0.4.3" + } + }, + "node_modules/babel-plugin-transform-inline-consecutive-adds": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-inline-consecutive-adds/-/babel-plugin-transform-inline-consecutive-adds-0.4.3.tgz", + "integrity": "sha1-Mj1Ho+pjqDp6w8gRro5pQfrysNE=", + "dev": true + }, + "node_modules/babel-plugin-transform-member-expression-literals": { + "version": "6.9.4", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-member-expression-literals/-/babel-plugin-transform-member-expression-literals-6.9.4.tgz", + "integrity": "sha1-NwOcmgwzE6OUlfqsL/OmtbnQOL8=", + "dev": true + }, + "node_modules/babel-plugin-transform-merge-sibling-variables": { + "version": "6.9.4", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-merge-sibling-variables/-/babel-plugin-transform-merge-sibling-variables-6.9.4.tgz", + "integrity": "sha1-hbQi/DN3tEnJ0c3kQIcgNTJAHa4=", + "dev": true + }, + "node_modules/babel-plugin-transform-minify-booleans": { + "version": "6.9.4", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-minify-booleans/-/babel-plugin-transform-minify-booleans-6.9.4.tgz", + "integrity": "sha1-rLs+VqNVXdI5KOS1gtKFFi3SsZg=", + "dev": true + }, + "node_modules/babel-plugin-transform-property-literals": { + "version": "6.9.4", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-property-literals/-/babel-plugin-transform-property-literals-6.9.4.tgz", + "integrity": "sha1-mMHSHiVXNlc/k+zlRFn2ziSYXTk=", + "dev": true, + "dependencies": { + "esutils": "^2.0.2" + } + }, + "node_modules/babel-plugin-transform-regexp-constructors": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-regexp-constructors/-/babel-plugin-transform-regexp-constructors-0.4.3.tgz", + "integrity": "sha1-WLd3W2OvzzMyj66aX4j71PsLSWU=", + "dev": true + }, + "node_modules/babel-plugin-transform-remove-console": { + "version": "6.9.4", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-remove-console/-/babel-plugin-transform-remove-console-6.9.4.tgz", + "integrity": "sha1-uYA2DAZzhOJLNXpYjYB9PINSd4A=", + "dev": true + }, + "node_modules/babel-plugin-transform-remove-debugger": { + "version": "6.9.4", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-remove-debugger/-/babel-plugin-transform-remove-debugger-6.9.4.tgz", + "integrity": "sha1-QrcnYxyXl44estGZp67IShgznvI=", + "dev": true + }, + "node_modules/babel-plugin-transform-remove-undefined": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-remove-undefined/-/babel-plugin-transform-remove-undefined-0.5.0.tgz", + "integrity": "sha512-+M7fJYFaEE/M9CXa0/IRkDbiV3wRELzA1kKQFCJ4ifhrzLKn/9VCCgj9OFmYWwBd8IB48YdgPkHYtbYq+4vtHQ==", + "dev": true, + "dependencies": { + "babel-helper-evaluate-path": "^0.5.0" + } + }, + "node_modules/babel-plugin-transform-simplify-comparison-operators": { + "version": "6.9.4", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-simplify-comparison-operators/-/babel-plugin-transform-simplify-comparison-operators-6.9.4.tgz", + "integrity": "sha1-9ir+CWyrDh9ootdT/fKDiIRxzrk=", + "dev": true + }, + "node_modules/babel-plugin-transform-undefined-to-void": { + "version": "6.9.4", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-undefined-to-void/-/babel-plugin-transform-undefined-to-void-6.9.4.tgz", + "integrity": "sha1-viQcqBQEAwZ4t0hxcyK4nQyP4oA=", + "dev": true + }, + "node_modules/babel-preset-minify": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/babel-preset-minify/-/babel-preset-minify-0.5.1.tgz", + "integrity": "sha512-1IajDumYOAPYImkHbrKeiN5AKKP9iOmRoO2IPbIuVp0j2iuCcj0n7P260z38siKMZZ+85d3mJZdtW8IgOv+Tzg==", + "dev": true, + "dependencies": { + "babel-plugin-minify-builtins": "^0.5.0", + "babel-plugin-minify-constant-folding": "^0.5.0", + "babel-plugin-minify-dead-code-elimination": "^0.5.1", + "babel-plugin-minify-flip-comparisons": "^0.4.3", + "babel-plugin-minify-guarded-expressions": "^0.4.4", + "babel-plugin-minify-infinity": "^0.4.3", + "babel-plugin-minify-mangle-names": "^0.5.0", + "babel-plugin-minify-numeric-literals": "^0.4.3", + "babel-plugin-minify-replace": "^0.5.0", + "babel-plugin-minify-simplify": "^0.5.1", + "babel-plugin-minify-type-constructors": "^0.4.3", + "babel-plugin-transform-inline-consecutive-adds": "^0.4.3", + "babel-plugin-transform-member-expression-literals": "^6.9.4", + "babel-plugin-transform-merge-sibling-variables": "^6.9.4", + "babel-plugin-transform-minify-booleans": "^6.9.4", + "babel-plugin-transform-property-literals": "^6.9.4", + "babel-plugin-transform-regexp-constructors": "^0.4.3", + "babel-plugin-transform-remove-console": "^6.9.4", + "babel-plugin-transform-remove-debugger": "^6.9.4", + "babel-plugin-transform-remove-undefined": "^0.5.0", + "babel-plugin-transform-simplify-comparison-operators": "^6.9.4", + "babel-plugin-transform-undefined-to-void": "^6.9.4", + "lodash": "^4.17.11" + } + }, + "node_modules/binary-extensions": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.0.0.tgz", + "integrity": "sha512-Phlt0plgpIIBOGTT/ehfFnbNlfsDEiqmzE2KRXoX1bLIlir4X/MR+zSyBEkL05ffWgnRSf/DXv+WrUAVr93/ow==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dev": true, + "dependencies": { + "fill-range": "^7.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/buble": { + "version": "0.19.8", + "resolved": "https://registry.npmjs.org/buble/-/buble-0.19.8.tgz", + "integrity": "sha512-IoGZzrUTY5fKXVkgGHw3QeXFMUNBFv+9l8a4QJKG1JhG3nCMHTdEX1DCOg8568E2Q9qvAQIiSokv6Jsgx8p2cA==", + "dev": true, + "dependencies": { + "acorn": "^6.1.1", + "acorn-dynamic-import": "^4.0.0", + "acorn-jsx": "^5.0.1", + "chalk": "^2.4.2", + "magic-string": "^0.25.3", + "minimist": "^1.2.0", + "os-homedir": "^2.0.0", + "regexpu-core": "^4.5.4" + }, + "bin": { + "buble": "bin/buble" + } + }, + "node_modules/buble/node_modules/acorn": { + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.4.0.tgz", + "integrity": "sha512-gac8OEcQ2Li1dxIEWGZzsp2BitJxwkwcOm0zHAJLcPJaVvm58FRnk6RkuLRpU1EujipU2ZFODv2P9DLMfnV8mw==", + "dev": true, + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/chokidar": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.3.0.tgz", + "integrity": "sha512-dGmKLDdT3Gdl7fBUe8XK+gAtGmzy5Fn0XkkWQuYxGIgWVPPse2CxFA5mtrlD0TOHaHjEUqkWNyP1XdHoJES/4A==", + "dev": true, + "dependencies": { + "anymatch": "~3.1.1", + "braces": "~3.0.2", + "fsevents": "~2.1.1", + "glob-parent": "~5.1.0", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.2.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "optionalDependencies": { + "fsevents": "~2.1.1" + } + }, + "node_modules/chokidar-cli": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/chokidar-cli/-/chokidar-cli-2.1.0.tgz", + "integrity": "sha512-6n21AVpW6ywuEPoxJcLXMA2p4T+SLjWsXKny/9yTWFz0kKxESI3eUylpeV97LylING/27T/RVTY0f2/0QaWq9Q==", + "dev": true, + "dependencies": { + "chokidar": "^3.2.3", + "lodash.debounce": "^4.0.8", + "lodash.throttle": "^4.1.1", + "yargs": "^13.3.0" + }, + "bin": { + "chokidar": "index.js" + }, + "engines": { + "node": ">= 8.10.0" + } + }, + "node_modules/cliui": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", + "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", + "dev": true, + "dependencies": { + "string-width": "^3.1.0", + "strip-ansi": "^5.2.0", + "wrap-ansi": "^5.1.0" + } + }, + "node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "node_modules/convert-source-map": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.7.0.tgz", + "integrity": "sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA==", + "dev": true, + "dependencies": { + "safe-buffer": "~5.1.1" + } + }, + "node_modules/debug": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "dev": true, + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/emoji-regex": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", + "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", + "dev": true + }, + "node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/estree-walker": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-0.6.1.tgz", + "integrity": "sha512-SqmZANLWS0mnatqbSfRP5g8OXZC12Fgg1IwNtLsyHDzJizORW4khDfjPqJZsemPWBB2uqykUah5YpQ6epsqC/w==", + "dev": true + }, + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dev": true, + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "dev": true, + "dependencies": { + "locate-path": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/fsevents": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.1.2.tgz", + "integrity": "sha512-R4wDiBwZ0KzpgOWetKDug1FZcYhqYnUYKtfZYt4mD5SBz76q0KR4Q9o7GIPamsVPGmW3EYPPJ0dOOjvx32ldZA==", + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true, + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, + "node_modules/glob-parent": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.0.tgz", + "integrity": "sha512-qjtRgnIVmOfnKUE3NJAQEdk+lKrxfw8t5ke7SXtfMTHcjsBfOfWXCQfdb30zfDoZQ2IRSIiidmjtbHZPZ++Ihw==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dev": true, + "dependencies": { + "binary-extensions": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/is-glob": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", + "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", + "dev": true, + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true + }, + "node_modules/jsesc": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", + "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", + "dev": true, + "bin": { + "jsesc": "bin/jsesc" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/json5": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.1.1.tgz", + "integrity": "sha512-l+3HXD0GEI3huGq1njuqtzYK8OYJyXMkOLtQ53pjWh89tvWS2h6l+1zMkYWqlb57+SiQodKZyvMEFb2X+KrFhQ==", + "dev": true, + "dependencies": { + "minimist": "^1.2.0" + }, + "bin": { + "json5": "lib/cli.js" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "dev": true, + "dependencies": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/lodash": { + "version": "4.17.15", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", + "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==", + "dev": true + }, + "node_modules/lodash.debounce": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", + "integrity": "sha1-gteb/zCmfEAF/9XiUVMArZyk168=", + "dev": true + }, + "node_modules/lodash.throttle": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/lodash.throttle/-/lodash.throttle-4.1.1.tgz", + "integrity": "sha1-wj6RtxAkKscMN/HhzaknTMOb8vQ=", + "dev": true + }, + "node_modules/magic-string": { + "version": "0.25.4", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.4.tgz", + "integrity": "sha512-oycWO9nEVAP2RVPbIoDoA4Y7LFIJ3xRYov93gAyJhZkET1tNuB0u7uWkZS2LpBWTJUWnmau/To8ECWRC+jKNfw==", + "dev": true, + "dependencies": { + "sourcemap-codec": "^1.4.4" + } + }, + "node_modules/minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "dev": true + }, + "node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/os-homedir": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-2.0.0.tgz", + "integrity": "sha512-saRNz0DSC5C/I++gFIaJTXoFJMRwiP5zHar5vV3xQ2TkgEw6hDCcU5F272JjUylpiVgBrZNQHnfjkLabTfb92Q==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/p-limit": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.1.tgz", + "integrity": "sha512-85Tk+90UCVWvbDavCLKPOLC9vvY8OwEX/RtKF+/1OADJMVlFfEHOiMTPVyxg7mk/dKa+ipdHm0OUkTvCpMTuwg==", + "dev": true, + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "dev": true, + "dependencies": { + "p-limit": "^2.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/path-parse": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", + "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", + "dev": true + }, + "node_modules/picomatch": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.1.1.tgz", + "integrity": "sha512-OYMyqkKzK7blWO/+XZYP6w8hH0LDvkBvdvKukti+7kqYFCiEAk+gI3DWnryapc0Dau05ugGTy0foQ6mqn4AHYA==", + "dev": true, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/prettier": { + "version": "1.19.1", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.19.1.tgz", + "integrity": "sha512-s7PoyDv/II1ObgQunCbB9PdLmUcBZcnWOcxDh7O0N/UwDEsHyqkW+Qh28jW+mVuCdx7gLB0BotYI1Y6uI9iyew==", + "dev": true, + "bin": { + "prettier": "bin-prettier.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/readdirp": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.2.0.tgz", + "integrity": "sha512-crk4Qu3pmXwgxdSgGhgA/eXiJAPQiX4GMOZZMXnqKxHX7TaoL+3gQVo/WeuAiogr07DpnfjIMpXXa+PAIvwPGQ==", + "dev": true, + "dependencies": { + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/regenerate": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.0.tgz", + "integrity": "sha512-1G6jJVDWrt0rK99kBjvEtziZNCICAuvIPkSiUFIQxVP06RCVpq3dmDo2oi6ABpYaDYaTRr67BEhL8r1wgEZZKg==", + "dev": true + }, + "node_modules/regenerate-unicode-properties": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-8.1.0.tgz", + "integrity": "sha512-LGZzkgtLY79GeXLm8Dp0BVLdQlWICzBnJz/ipWUgo59qBaZ+BHtq51P2q1uVZlppMuUAT37SDk39qUbjTWB7bA==", + "dev": true, + "dependencies": { + "regenerate": "^1.4.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/regexpu-core": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-4.6.0.tgz", + "integrity": "sha512-YlVaefl8P5BnFYOITTNzDvan1ulLOiXJzCNZxduTIosN17b87h3bvG9yHMoHaRuo88H4mQ06Aodj5VtYGGGiTg==", + "dev": true, + "dependencies": { + "regenerate": "^1.4.0", + "regenerate-unicode-properties": "^8.1.0", + "regjsgen": "^0.5.0", + "regjsparser": "^0.6.0", + "unicode-match-property-ecmascript": "^1.0.4", + "unicode-match-property-value-ecmascript": "^1.1.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/regjsgen": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.5.1.tgz", + "integrity": "sha512-5qxzGZjDs9w4tzT3TPhCJqWdCc3RLYwy9J2NB0nm5Lz+S273lvWcpjaTGHsT1dc6Hhfq41uSEOw8wBmxrKOuyg==", + "dev": true + }, + "node_modules/regjsparser": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.6.0.tgz", + "integrity": "sha512-RQ7YyokLiQBomUJuUG8iGVvkgOLxwyZM8k6d3q5SAXpg4r5TZJZigKFvC6PpD+qQ98bCDC5YelPeA3EucDoNeQ==", + "dev": true, + "dependencies": { + "jsesc": "~0.5.0" + }, + "bin": { + "regjsparser": "bin/parser" + } + }, + "node_modules/regjsparser/node_modules/jsesc": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", + "integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=", + "dev": true, + "bin": { + "jsesc": "bin/jsesc" + } + }, + "node_modules/require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/require-main-filename": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", + "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", + "dev": true + }, + "node_modules/resolve": { + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.13.1.tgz", + "integrity": "sha512-CxqObCX8K8YtAhOBRg+lrcdn+LK+WYOS8tSjqSFbjtrI5PnS63QPhZl4+yKfrU9tdsbMu9Anr/amegT87M9Z6w==", + "dev": true, + "dependencies": { + "path-parse": "^1.0.6" + } + }, + "node_modules/rollup": { + "version": "1.29.0", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-1.29.0.tgz", + "integrity": "sha512-V63Iz0dSdI5qPPN5HmCN6OBRzBFhMqNWcvwgq863JtSCTU6Vdvqq6S2fYle/dSCyoPrBkIP3EIr1RVs3HTRqqg==", + "dev": true, + "dependencies": { + "@types/estree": "*", + "@types/node": "*", + "acorn": "^7.1.0" + }, + "bin": { + "rollup": "dist/bin/rollup" + } + }, + "node_modules/rollup-plugin-babel": { + "version": "4.3.3", + "resolved": "https://registry.npmjs.org/rollup-plugin-babel/-/rollup-plugin-babel-4.3.3.tgz", + "integrity": "sha512-tKzWOCmIJD/6aKNz0H1GMM+lW1q9KyFubbWzGiOG540zxPPifnEAHTZwjo0g991Y+DyOZcLqBgqOdqazYE5fkw==", + "dev": true, + "dependencies": { + "@babel/helper-module-imports": "^7.0.0", + "rollup-pluginutils": "^2.8.1" + } + }, + "node_modules/rollup-plugin-babel-minify": { + "version": "9.1.1", + "resolved": "https://registry.npmjs.org/rollup-plugin-babel-minify/-/rollup-plugin-babel-minify-9.1.1.tgz", + "integrity": "sha512-/Jph4PungzuB4h8uPSNKJQ16GjxVTfaRT6f4EwZW5NfD7RU7niFSEMMCZAlM6ezf11MBo1ttQcei+FisyCxicg==", + "dev": true, + "dependencies": { + "@babel/core": "^7.7.2", + "@babel/plugin-syntax-dynamic-import": "^7.2.0", + "@comandeer/babel-plugin-banner": "^5.0.0", + "babel-preset-minify": "^0.5.1", + "sourcemap-codec": "^1.4.6" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/rollup-plugin-buble": { + "version": "0.19.8", + "resolved": "https://registry.npmjs.org/rollup-plugin-buble/-/rollup-plugin-buble-0.19.8.tgz", + "integrity": "sha512-8J4zPk2DQdk3rxeZvxgzhHh/rm5nJkjwgcsUYisCQg1QbT5yagW+hehYEW7ZNns/NVbDCTv4JQ7h4fC8qKGOKw==", + "dev": true, + "dependencies": { + "buble": "^0.19.8", + "rollup-pluginutils": "^2.3.3" + } + }, + "node_modules/rollup-pluginutils": { + "version": "2.8.2", + "resolved": "https://registry.npmjs.org/rollup-pluginutils/-/rollup-pluginutils-2.8.2.tgz", + "integrity": "sha512-EEp9NhnUkwY8aif6bxgovPHMoMoNr2FulJziTndpt5H9RdwC47GSGuII9XxpSdzVGM0GWrNPHV6ie1LTNJPaLQ==", + "dev": true, + "dependencies": { + "estree-walker": "^0.6.1" + } + }, + "node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "node_modules/semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true, + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", + "dev": true + }, + "node_modules/source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/sourcemap-codec": { + "version": "1.4.6", + "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.6.tgz", + "integrity": "sha512-1ZooVLYFxC448piVLBbtOxFcXwnymH9oUF8nRd3CuYDVvkRBxRl6pB4Mtas5a4drtL+E8LDgFkQNcgIw6tc8Hg==", + "dev": true + }, + "node_modules/string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dev": true, + "dependencies": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "dependencies": { + "ansi-regex": "^4.1.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/to-fast-properties": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", + "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/unicode-canonical-property-names-ecmascript": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-1.0.4.tgz", + "integrity": "sha512-jDrNnXWHd4oHiTZnx/ZG7gtUTVp+gCcTTKr8L0HjlwphROEW3+Him+IpvC+xcJEFegapiMZyZe02CyuOnRmbnQ==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/unicode-match-property-ecmascript": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-1.0.4.tgz", + "integrity": "sha512-L4Qoh15vTfntsn4P1zqnHulG0LdXgjSO035fEpdtp6YxXhMT51Q6vgM5lYdG/5X3MjS+k/Y9Xw4SFCY9IkR0rg==", + "dev": true, + "dependencies": { + "unicode-canonical-property-names-ecmascript": "^1.0.4", + "unicode-property-aliases-ecmascript": "^1.0.4" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/unicode-match-property-value-ecmascript": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-1.1.0.tgz", + "integrity": "sha512-hDTHvaBk3RmFzvSl0UVrUmC3PuW9wKVnpoUDYH0JDkSIovzw+J5viQmeYHxVSBptubnr7PbH2e0fnpDRQnQl5g==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/unicode-property-aliases-ecmascript": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-1.0.5.tgz", + "integrity": "sha512-L5RAqCfXqAwR3RriF8pM0lU0w4Ryf/GgzONwi6KnL1taJQa7x1TCxdJnILX59WIGOwR57IVxn7Nej0fz1Ny6fw==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/which-module": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", + "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", + "dev": true + }, + "node_modules/wrap-ansi": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", + "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", + "dev": true, + "dependencies": { + "ansi-styles": "^3.2.0", + "string-width": "^3.0.0", + "strip-ansi": "^5.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/y18n": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", + "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==", + "dev": true + }, + "node_modules/yargs": { + "version": "13.3.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.0.tgz", + "integrity": "sha512-2eehun/8ALW8TLoIl7MVaRUrg+yCnenu8B4kBlRxj3GJGDKU1Og7sMXPNm1BYyM1DOJmTZ4YeN/Nwxv+8XJsUA==", + "dev": true, + "dependencies": { + "cliui": "^5.0.0", + "find-up": "^3.0.0", + "get-caller-file": "^2.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^3.0.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^13.1.1" + } + }, + "node_modules/yargs-parser": { + "version": "13.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.1.tgz", + "integrity": "sha512-oVAVsHz6uFrg3XQheFII8ESO2ssAf9luWuAd6Wexsu4F3OtIW0o8IribPXYrD4WC24LWtPrJlGy87y5udK+dxQ==", + "dev": true, + "dependencies": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + } + } + }, "dependencies": { "@babel/code-frame": { "version": "7.5.5", diff --git a/package.json b/package.json index 6484973..328c268 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "perfect-scrollbar", - "version": "1.5.2", + "version": "1.5.3", "description": "Minimalistic but perfect custom scrollbar plugin", "author": "Hyunje Jun ", "keywords": [ @@ -41,7 +41,7 @@ "test": "npm run format:lint && npm run build", "rollup": "rollup --config rollup.config.js --sourcemap", "build": "npm run clean && npm run rollup", - "clean": "rmdir /s /q dist", + "clean": "rm -r dist", "watch": "npm run build && SHELL=/bin/bash chokidar 'src/**/*.js' -c 'npm run format && npm run build'", "format": "prettier --write --single-quote --trailing-comma es5 'src/**/*.js'", "format:lint": "prettier -l --single-quote --trailing-comma es5 'src/**/*.js'", diff --git a/src/handlers/drag-thumb.js b/src/handlers/drag-thumb.js index ed0a90d..24c1542 100644 --- a/src/handlers/drag-thumb.js +++ b/src/handlers/drag-thumb.js @@ -62,7 +62,9 @@ function bindMouseScrollHandler( updateGeometry(i); e.stopPropagation(); - e.preventDefault(); + if (e.type.startsWith('touch') && e.changedTouches.length > 1) { + e.preventDefault(); + } } function mouseUpHandler() {