diff --git a/css/OverlayScrollbars.css b/css/OverlayScrollbars.css index 49ddb39..4c9e0f2 100644 --- a/css/OverlayScrollbars.css +++ b/css/OverlayScrollbars.css @@ -2,13 +2,13 @@ * OverlayScrollbars * https://github.com/KingSora/OverlayScrollbars * - * Version: 1.4.0 + * Version: 1.4.1 * * Copyright KingSora. * https://github.com/KingSora * * Released under the MIT license. - * Date: 02.03.2018 + * Date: 22.03.2018 */ /* diff --git a/css/OverlayScrollbars.min.css b/css/OverlayScrollbars.min.css index 186e8d1..50feff2 100644 --- a/css/OverlayScrollbars.min.css +++ b/css/OverlayScrollbars.min.css @@ -2,13 +2,12 @@ * OverlayScrollbars * https://github.com/KingSora/OverlayScrollbars * - * Version: 1.4.0 + * Version: 1.4.1 * * Copyright KingSora. * https://github.com/KingSora * * Released under the MIT license. - * Date: 02.03.2018 + * Date: 22.03.2018 */ - html.os-html,html.os-html > .os-host{display:block;overflow:hidden;box-sizing:border-box;height:100%!important;width:100%!important;min-width:100%!important;min-height:100%!important;margin:0!important;position:absolute!important}html.os-html > .os-host > .os-padding{position:absolute}body.os-dragging,body.os-dragging *{cursor:default}.os-host,.os-host-textarea{position:relative;overflow:visible!important}#hs-dummy-scrollbar-size{position:fixed;opacity:0;-ms-filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=0);visibility:hidden;overflow:scroll;height:500px;width:500px}#hs-dummy-scrollbar-size,.os-viewport{-ms-overflow-style:scrollbar!important}.os-viewport-native-scrollbars-invisible#hs-dummy-scrollbar-size::-webkit-scrollbar,.os-viewport-native-scrollbars-invisible.os-viewport::-webkit-scrollbar,.os-viewport-native-scrollbars-invisible#hs-dummy-scrollbar-size::-webkit-scrollbar-corner,.os-viewport-native-scrollbars-invisible.os-viewport::-webkit-scrollbar-corner{display:none!important;width:0!important;height:0!important;visibility:hidden!important;background:transparent!important}.os-content-glue{max-height:100%;max-width:100%;width:100%;pointer-events:none}.os-padding{direction:inherit;position:absolute;overflow:visible;padding:0;margin:0;left:0;top:0;bottom:0;right:0;width:auto!important;height:auto!important;z-index:1}.os-host-overflow > .os-padding{overflow:hidden}.os-viewport{direction:inherit!important;box-sizing:inherit!important;resize:none!important;position:absolute;overflow:hidden;top:0;left:0;bottom:0;right:0;padding:0;margin:0;-webkit-overflow-scrolling:touch}.os-content-arrange{position:absolute;z-index:-1;min-height:1px;min-width:1px;pointer-events:none}.os-content{direction:inherit;box-sizing:border-box!important;position:relative;display:block;height:100%;width:100%;height:100%;width:100%;visibility:visible}.os-host-textarea > .os-padding > .os-content{overflow:hidden!important}.os-content > .os-textarea{direction:inherit!important;float:none!important;margin:0!important;max-height:none!important;max-width:none!important;border:none!important;border-radius:0!important;background:transparent!important;outline:0 none transparent!important;overflow:hidden!important;resize:none!important;position:absolute!important;top:0!important;left:0!important;z-index:1;padding:0}.os-host-rtl > .os-padding > .os-viewport > .os-content > .os-textarea{right:0!important}.os-content > .os-textarea-cover{z-index:-1;pointer-events:none}.os-content > .os-textarea[wrap='off']{white-space:pre!important;margin:0!important}.os-text-inherit{font-family:inherit;font-size:inherit;font-weight:inherit;font-style:inherit;font-variant:inherit;text-transform:inherit;text-decoration:inherit;text-indent:inherit;text-align:inherit;text-shadow:inherit;text-overflow:inherit;letter-spacing:inherit;word-spacing:inherit;line-height:inherit;unicode-bidi:inherit;direction:inherit;color:inherit;cursor:text}.os-resize-observer,.os-resize-observer-host{box-sizing:inherit;display:block;opacity:0;position:absolute;top:0;left:0;height:100%;width:100%;overflow:hidden;pointer-events:none;z-index:-1}.os-resize-observer-host{padding:inherit;border:inherit;border-color:transparent;border-style:solid;box-sizing:border-box}.os-resize-observer-host:after{content:''}.os-resize-observer-host > .os-resize-observer,.os-resize-observer-host:after{height:200%;width:200%;padding:inherit;border:inherit;margin:0;display:block;box-sizing:content-box}.os-resize-observer.observed,object.os-resize-observer{box-sizing:border-box!important}.os-size-auto-observer{box-sizing:inherit!important;height:100%;width:inherit;max-width:1px;position:relative;float:left;max-height:1px;overflow:hidden;z-index:-1;padding:0;margin:0;pointer-events:none}.os-size-auto-observer > .os-resize-observer{width:1000%;height:1000%;min-height:1px;min-width:1px}.os-resize-observer-item{position:absolute;top:0;right:0;bottom:0;left:0;overflow:hidden;z-index:-1;opacity:0;direction:ltr!important;-webkit-box-flex:0!important;-ms-flex:none!important;flex:none!important}.os-resize-observer-item-final{position:absolute;left:0;top:0;-webkit-transition:none!important;transition:none!important;-webkit-box-flex:0!important;-ms-flex:none!important;flex:none!important}.os-resize-observer{-webkit-animation-duration:.001s;animation-duration:.001s;-webkit-animation-name:hs-resize-observer-dummy-animation;animation-name:hs-resize-observer-dummy-animation}.os-host-transition > .os-scrollbar,.os-host-transition > .os-scrollbar-corner{-webkit-transition:opacity 0.3s,visibility 0.3s,top 0.3s,right 0.3s,bottom 0.3s,left .3s;transition:opacity 0.3s,visibility 0.3s,top 0.3s,right 0.3s,bottom 0.3s,left .3s}html.os-html > .os-host > .os-scrollbar{position:absolute;z-index:999999}.os-scrollbar,.os-scrollbar-corner{position:absolute;opacity:1;-ms-filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=100);z-index:1}.os-scrollbar-corner{bottom:0;right:0}.os-scrollbar{pointer-events:none}.os-scrollbar-track{pointer-events:auto;position:relative;height:100%;width:100%;padding:0!important;border:none!important}.os-scrollbar-handle{pointer-events:auto;position:absolute;width:100%;height:100%}.os-scrollbar-handle-off,.os-scrollbar-track-off{pointer-events:none}.os-scrollbar.os-scrollbar-unusable,.os-scrollbar.os-scrollbar-unusable *{pointer-events:none!important}.os-scrollbar.os-scrollbar-unusable .os-scrollbar-handle{opacity:0!important}.os-scrollbar-horizontal{bottom:0;left:0}.os-scrollbar-vertical{top:0;right:0}.os-host-rtl > .os-scrollbar-horizontal{right:0}.os-host-rtl > .os-scrollbar-vertical{right:auto;left:0}.os-host-rtl > .os-scrollbar-corner{right:auto;left:0}.os-scrollbar-auto-hidden,.os-padding + .os-scrollbar-corner,.os-host-resize-disabled.os-host-scrollbar-horizontal-hidden > .os-scrollbar-corner,.os-host-scrollbar-horizontal-hidden > .os-scrollbar-horizontal,.os-host-resize-disabled.os-host-scrollbar-vertical-hidden > .os-scrollbar-corner,.os-host-scrollbar-vertical-hidden > .os-scrollbar-vertical,.os-scrollbar-horizontal.os-scrollbar-auto-hidden + .os-scrollbar-vertical + .os-scrollbar-corner,.os-scrollbar-horizontal + .os-scrollbar-vertical.os-scrollbar-auto-hidden + .os-scrollbar-corner,.os-scrollbar-horizontal.os-scrollbar-auto-hidden + .os-scrollbar-vertical.os-scrollbar-auto-hidden + .os-scrollbar-corner{opacity:0;visibility:hidden;pointer-events:none}.os-scrollbar-corner-resize-both{cursor:nwse-resize}.os-host-rtl > .os-scrollbar-corner-resize-both{cursor:nesw-resize}.os-scrollbar-corner-resize-horizontal{cursor:ew-resize}.os-scrollbar-corner-resize-vertical{cursor:ns-resize}.os-dragging .os-scrollbar-corner.os-scrollbar-corner-resize{cursor:default}.os-host-resize-disabled.os-host-scrollbar-horizontal-hidden > .os-scrollbar-vertical{top:0;bottom:0}.os-host-resize-disabled.os-host-scrollbar-vertical-hidden > .os-scrollbar-horizontal{right:0;left:0}.os-scrollbar:hover,.os-scrollbar-corner.os-scrollbar-corner-resize{opacity:1!important;visibility:visible!important}.os-scrollbar-corner.os-scrollbar-corner-resize{background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PHN2ZyAgIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyIgICB4bWxuczpjYz0iaHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbnMjIiAgIHhtbG5zOnJkZj0iaHR0cDovL3d3dy53My5vcmcvMTk5OS8wMi8yMi1yZGYtc3ludGF4LW5zIyIgICB4bWxuczpzdmc9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9y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zNSAwLjcyMzU3OTMsMCAxLjMxMDE1NjIsLTAuNTg2NTc3IDEuMzEwMTU2MiwtMS4zMTAxNTYzIDAsLTAuNDI0NTcwOCAtMC4yMDU1MTc1LC0wLjc5Nzc5NjYgLTAuNTE4NjAzNSwtMS4wMzcyMDcgeiBtIDMuMDg0MzI2MiwwIGMgMC4xNDEyNjY3LDAuMjA5MTAyNCAwLjIxODM1OTQsMC40NjU2MjA2IDAuMjE4MzU5NCwwLjczNjk2MjkgMCwwLjcyMzU3OTMgLTAuNTg2NTc3LDEuMzEwMTU2MyAtMS4zMTAxNTYzLDEuMzEwMTU2MyAtMC4yNzEzNDIzLDAgLTAuNTI3ODYwNSwtMC4wNzcwOTMgLTAuNzM2OTYyOSwtMC4yMTgzNTk0IDAuMjM5NDEwNCwwLjMxMzA4NTkgMC42MTI2MzYyLDAuNTE4NjAzNSAxLjAzNzIwNywwLjUxODYwMzUgMC43MjM1NzkzLDAgMS4zMTAxNTYzLC0wLjU4NjU3NyAxLjMxMDE1NjMsLTEuMzEwMTU2MyAwLC0wLjQyNDU3MDggLTAuMjA1NTE3NiwtMC43OTc3OTY2IC0wLjUxODYwMzUsLTEuMDM3MjA3IHoiIC8+ICA8L2c+PC9zdmc+);background-repeat:no-repeat;background-position:100% 100%;pointer-events:auto!important}.os-host-rtl > .os-scrollbar-corner.os-scrollbar-corner-resize{-webkit-transform:scale(-1,1);transform:scale(-1,1)}.os-host-overflow{overflow:hidden!important}@-webkit-keyframes hs-resize-observer-dummy-animation{from{z-index:0}to{z-index:-1}}@keyframes hs-resize-observer-dummy-animation{from{z-index:0}to{z-index:-1}}.os-theme-none > .os-scrollbar-horizontal,.os-theme-none > .os-scrollbar-vertical,.os-theme-none > .os-scrollbar-corner{display:none!important}.os-theme-none > .os-scrollbar-corner-resize{display:block!important;min-width:10px;min-height:10px}.os-theme-dark > .os-scrollbar-horizontal,.os-theme-light > .os-scrollbar-horizontal{right:10px;height:10px}.os-theme-dark > .os-scrollbar-vertical,.os-theme-light > .os-scrollbar-vertical{bottom:10px;width:10px}.os-theme-dark.os-host-rtl > .os-scrollbar-horizontal,.os-theme-light.os-host-rtl > .os-scrollbar-horizontal{left:10px;right:0}.os-theme-dark > .os-scrollbar-corner,.os-theme-light > .os-scrollbar-corner{height:10px;width:10px;background-color:transparent}.os-theme-dark > .os-scrollbar,.os-theme-light > .os-scrollbar{padding:2px;box-sizing:border-box;background:transparent}.os-theme-dark > .os-scrollbar.os-scrollbar-unusable,.os-theme-light > .os-scrollbar.os-scrollbar-unusable{background:transparent}.os-theme-dark > .os-scrollbar > .os-scrollbar-track,.os-theme-light > .os-scrollbar > .os-scrollbar-track{background:transparent}.os-theme-dark > .os-scrollbar-horizontal > .os-scrollbar-track > .os-scrollbar-handle,.os-theme-light > .os-scrollbar-horizontal > .os-scrollbar-track > .os-scrollbar-handle{min-width:30px}.os-theme-dark > .os-scrollbar-vertical > .os-scrollbar-track > .os-scrollbar-handle,.os-theme-light > .os-scrollbar-vertical > .os-scrollbar-track > .os-scrollbar-handle{min-height:30px}.os-theme-dark > .os-scrollbar > .os-scrollbar-track > .os-scrollbar-handle,.os-theme-light > .os-scrollbar > .os-scrollbar-track > .os-scrollbar-handle{border-radius:11px;opacity:.4}.os-theme-dark > .os-scrollbar > .os-scrollbar-track > .os-scrollbar-handle{background:#000}.os-theme-light > .os-scrollbar > .os-scrollbar-track > .os-scrollbar-handle{background:#fff}.os-theme-dark.os-host-transition > .os-scrollbar > .os-scrollbar-track > .os-scrollbar-handle,.os-theme-light.os-host-transition > .os-scrollbar > .os-scrollbar-track > .os-scrollbar-handle{-webkit-transition:opacity .3s;transition:opacity .3s}.os-theme-dark > .os-scrollbar:hover > .os-scrollbar-track > .os-scrollbar-handle,.os-theme-light > .os-scrollbar:hover > .os-scrollbar-track > .os-scrollbar-handle{opacity:.55}.os-theme-dark > .os-scrollbar > .os-scrollbar-track > .os-scrollbar-handle.active,.os-theme-light > .os-scrollbar > .os-scrollbar-track > .os-scrollbar-handle.active{opacity:.7}.os-theme-dark > .os-scrollbar-horizontal .os-scrollbar-handle:before,.os-theme-dark > .os-scrollbar-vertical .os-scrollbar-handle:before,.os-theme-light > .os-scrollbar-horizontal .os-scrollbar-handle:before,.os-theme-light > .os-scrollbar-vertical .os-scrollbar-handle:before{content:'';position:absolute;left:0;right:0;top:0;bottom:0;display:block}.os-theme-dark.os-host-scrollbar-horizontal-hidden > .os-scrollbar-horizontal .os-scrollbar-handle:before,.os-theme-dark.os-host-scrollbar-vertical-hidden > .os-scrollbar-vertical .os-scrollbar-handle:before,.os-theme-light.os-host-scrollbar-horizontal-hidden > .os-scrollbar-horizontal .os-scrollbar-handle:before,.os-theme-light.os-host-scrollbar-vertical-hidden > .os-scrollbar-vertical .os-scrollbar-handle:before{display:none}.os-theme-dark > .os-scrollbar-horizontal .os-scrollbar-handle:before,.os-theme-light > .os-scrollbar-horizontal .os-scrollbar-handle:before{top:-6px;bottom:-2px}.os-theme-dark > .os-scrollbar-vertical .os-scrollbar-handle:before,.os-theme-light > .os-scrollbar-vertical .os-scrollbar-handle:before{left:-6px;right:-2px}.os-host-rtl.os-theme-dark > .os-scrollbar-vertical .os-scrollbar-handle:before,.os-host-rtl.os-theme-light > .os-scrollbar-vertical .os-scrollbar-handle:before{right:-6px;left:-2px} \ No newline at end of file diff --git a/js/OverlayScrollbars.js b/js/OverlayScrollbars.js index f16a7dc..a73fbdf 100644 --- a/js/OverlayScrollbars.js +++ b/js/OverlayScrollbars.js @@ -2,13 +2,13 @@ * OverlayScrollbars * https://github.com/KingSora/OverlayScrollbars * - * Version: 1.4.0 + * Version: 1.4.1 * * Copyright KingSora. * https://github.com/KingSora * * Released under the MIT license. - * Date: 02.03.2018 + * Date: 22.03.2018 */ (function (global, factory) { @@ -902,7 +902,7 @@ for (i = 0; i < eventName.length; i++) el.addEventListener(eventName[i], handler); } - else { + else if(el.detachEvent) { for (i = 0; i < eventName.length; i++) el.attachEvent('on' + eventName[i], handler); } @@ -915,12 +915,12 @@ var i; var el; return this.each(function() { - var el = this; + el = this; if (el.removeEventListener) { for (i = 0; i < eventName.length; i++) el.removeEventListener(eventName[i], handler); } - else { + else if(el.detachEvent) { for (i = 0; i < eventName.length; i++) el.detachEvent('on' + eventName[i], handler); } @@ -1909,6 +1909,7 @@ var _swallowedUpdateParams = { }; var _swallowedUpdateTimeout; var _swallowUpdateLag = 33; + var _imgs = [ ]; //DOM elements: var _windowElement; @@ -2054,10 +2055,9 @@ * @param listener The listener method which shall be called. */ function addPassiveEventListener(element, eventNames, listener) { - element = element[0]; var events = eventNames.split(_strSpace); for (var i = 0; i < events.length; i++) - element.addEventListener(events[i], listener, {passive: true}); + element[0].addEventListener(events[i], listener, {passive: true}); } /** @@ -2067,10 +2067,9 @@ * @param listener The listener method which shall be removed. */ function removePassiveEventListener(element, eventNames, listener) { - element = element[0]; var events = eventNames.split(_strSpace); for (var i = 0; i < events.length; i++) - element.removeEventListener(events[i], listener, {passive: true}); + element[0].removeEventListener(events[i], listener); } /** @@ -2460,9 +2459,9 @@ _resizeDragStartSize.w = _hostElement[0][WORDING.oW] - (!_isBorderBox ? _paddingX : 0); _resizeDragStartSize.h = _hostElement[0][WORDING.oH] - (!_isBorderBox ? _paddingY : 0); - _documentElement.on(_strSelectStartEvent, onSelectStart); - _documentElement.on(_strMouseTouchMoveEvent, scrollbarCornerOnResize); - _documentElement.on(_strMouseTouchUpEvent, scrollbarCornerOnResized); + _documentElement.on(_strSelectStartEvent, onSelectStart) + .on(_strMouseTouchMoveEvent, scrollbarCornerOnResize) + .on(_strMouseTouchUpEvent, scrollbarCornerOnResized); _bodyElement.addClass(_classNameDragging); if (_scrollbarCornerElement.setCapture) @@ -2496,9 +2495,9 @@ function scrollbarCornerOnResized(event) { var eventIsTrusted = event !== undefined; - _documentElement.off(_strSelectStartEvent, onSelectStart); - _documentElement.off(_strMouseTouchMoveEvent, scrollbarCornerOnResize); - _documentElement.off(_strMouseTouchUpEvent, scrollbarCornerOnResized); + _documentElement.off(_strSelectStartEvent, onSelectStart) + .off(_strMouseTouchMoveEvent, scrollbarCornerOnResize) + .off(_strMouseTouchUpEvent, scrollbarCornerOnResized); _bodyElement.removeClass(_classNameDragging); if (_scrollbarCornerElement.releaseCapture) @@ -2713,6 +2712,13 @@ return false; } + /** + * A callback which will be called after a img element has downloaded its src asynchronous. + */ + function onImgLoad() { + update(); + } + /** * Determines whether native overlay scrollbars are active. * @returns {boolean} True if native overlay scrollbars are active, false otherwise. @@ -2959,15 +2965,15 @@ removePassiveEventListener(_documentElement, _strMouseTouchUpEvent, documentMouseTouchUp); removePassiveEventListener(_documentElement, _strKeyDownEvent, documentKeyDown); removePassiveEventListener(_documentElement, _strKeyUpEvent, documentKeyUp); - removePassiveEventListener(_documentElement, _strSelectStartEvent, onSelectStart); } else { - _documentElement.off(_strMouseTouchMoveEvent, handleDragMove); - _documentElement.off(_strMouseTouchUpEvent, documentMouseTouchUp); - _documentElement.off(_strKeyDownEvent, documentKeyDown); - _documentElement.off(_strKeyUpEvent, documentKeyUp); - _documentElement.off(_strSelectStartEvent, onSelectStart); + _documentElement.off(_strMouseTouchMoveEvent, handleDragMove) + .off(_strMouseTouchUpEvent, documentMouseTouchUp) + .off(_strKeyDownEvent, documentKeyDown) + .off(_strKeyUpEvent, documentKeyUp); } + _documentElement.off(_strSelectStartEvent, onSelectStart); + decreaseTrackScrollAmount(); mouseDownScroll = undefined; mouseDownOffset = undefined; @@ -3015,15 +3021,14 @@ scrollbarVars.s.addClass(strActive); if (_supportPassiveEvents) { - addPassiveEventListener(_documentElement, _strSelectStartEvent, onSelectStart); addPassiveEventListener(_documentElement, _strMouseTouchMoveEvent, handleDragMove); addPassiveEventListener(_documentElement, _strMouseTouchUpEvent, documentMouseTouchUp); } else { - _documentElement.on(_strSelectStartEvent, onSelectStart); - _documentElement.on(_strMouseTouchMoveEvent, handleDragMove); - _documentElement.on(_strMouseTouchUpEvent, documentMouseTouchUp); + _documentElement.on(_strMouseTouchMoveEvent, handleDragMove) + .on(_strMouseTouchUpEvent, documentMouseTouchUp); } + _documentElement.on(_strSelectStartEvent, onSelectStart); compatibility.prvD(event); } }); @@ -3089,17 +3094,16 @@ scrollbarVars.s.addClass(strActive); if (_supportPassiveEvents) { - addPassiveEventListener(_documentElement, _strSelectStartEvent, onSelectStart); addPassiveEventListener(_documentElement, _strMouseTouchUpEvent, documentMouseTouchUp); addPassiveEventListener(_documentElement, _strKeyDownEvent, documentKeyDown); addPassiveEventListener(_documentElement, _strKeyUpEvent, documentKeyUp); } else { - _documentElement.on(_strSelectStartEvent, onSelectStart); - _documentElement.on(_strMouseTouchUpEvent, documentMouseTouchUp); - _documentElement.on(_strKeyDownEvent, documentKeyDown); - _documentElement.on(_strKeyUpEvent, documentKeyUp); + _documentElement.on(_strMouseTouchUpEvent, documentMouseTouchUp) + .on(_strKeyDownEvent, documentKeyDown) + .on(_strKeyUpEvent, documentKeyUp); } + _documentElement.on(_strSelectStartEvent, onSelectStart); scrollAction(); compatibility.prvD(event); @@ -3159,7 +3163,7 @@ } /** - * The mouse leave event of the host element. This event is only needed for the autoHide feature. + * The mouse move event of the host element. This event is only needed for the autoHide "move" feature. */ function hostOnMouseMove() { if (_scrollbarsAutoHideMove) { @@ -3700,7 +3704,7 @@ * @param value The value which shall be parsed. */ function parseIntToZeroOrNumber(value) { - var num = parseInt(value); + var num = window.parseInt(value); return isNaN(num) ? 0 : num; } @@ -4146,8 +4150,8 @@ margin.c = checkCacheTRBL(margin, _cssMarginCache); //set info for css max value - cssMaxValue.ih = parseInt(cssMaxValue.h); //ih = integer height - cssMaxValue.iw = parseInt(cssMaxValue.w); //iw = integer width + cssMaxValue.ih = parseIntToZeroOrNumber(cssMaxValue.h); //ih = integer height + cssMaxValue.iw = parseIntToZeroOrNumber(cssMaxValue.w); //iw = integer width cssMaxValue.ch = cssMaxValue.h.indexOf('px') > -1; //ch = correct height cssMaxValue.cw = cssMaxValue.w.indexOf('px') > -1; //cw = correct width cssMaxValue.c = checkCacheDouble(cssMaxValue, _cssMaxValueCache, force); @@ -4257,10 +4261,10 @@ var strVisible = 'visible'; //decide whether the content overflow must get hidden for correct overflow measuring, it MUST be always hidden if the height is auto var hideOverflow4CorrectMeasuring = _restrictedMeasuring ? - (_nativeScrollbarIsOverlaid.x || _nativeScrollbarIsOverlaid.y) || //it must be hidden if native scrollbars are overlaid - (_viewportSize.w < _nativeScrollbarMinSize.y || _viewportSize.h < _nativeScrollbarMinSize.x) || //it must be hidden if host-element is too small - heightAuto //it must be hidden if height is auto - : heightAuto; //if there is not the restricted Measuring bug, it must be hidden if the height is auto + (_nativeScrollbarIsOverlaid.x || _nativeScrollbarIsOverlaid.y) || //it must be hidden if native scrollbars are overlaid + (_viewportSize.w < _nativeScrollbarMinSize.y || _viewportSize.h < _nativeScrollbarMinSize.x) || //it must be hidden if host-element is too small + heightAuto //it must be hidden if height is auto + : heightAuto; //if there is not the restricted Measuring bug, it must be hidden if the height is auto //Reset the viewport (very important for natively overlaid scrollbars and zoom change var viewportElementResetCSS = {}; @@ -4414,8 +4418,8 @@ * }; */ var overflowAmount = { - x: Math.max(0, contentScrollSize.w - hostSize.w + (paddingAbsolute ? _paddingX : 0)), - y: Math.max(0, contentScrollSize.h - hostSize.h + (paddingAbsolute ? _paddingY : 0)) + x: Math.max(0, Math.round((contentScrollSize.w - hostSize.w + (paddingAbsolute ? _paddingX : 0)) * 100) / 100), + y: Math.max(0, Math.round((contentScrollSize.h - hostSize.h + (paddingAbsolute ? _paddingY : 0)) * 100) / 100) }; var hideOverflowForceTextarea = _isTextarea && (_viewportSize.w === 0 || _viewportSize.h === 0); if (hideOverflowForceTextarea) { @@ -4733,8 +4737,8 @@ if(move) _hostElement.on(_strMouseTouchMoveEvent, hostOnMouseMove); else { - _hostElement.on(_strMouseTouchEnter, hostOnMouseEnter); - _hostElement.on(_strMouseTouchLeave, hostOnMouseLeave); + _hostElement.on(_strMouseTouchEnter, hostOnMouseEnter) + .on(_strMouseTouchLeave, hostOnMouseLeave); } } }; @@ -4745,9 +4749,9 @@ removePassiveEventListener(_hostElement, _strMouseTouchLeave, hostOnMouseLeave); } else { - _hostElement.off(_strMouseTouchMoveEvent, hostOnMouseMove); - _hostElement.off(_strMouseTouchEnter, hostOnMouseEnter); - _hostElement.off(_strMouseTouchLeave, hostOnMouseLeave); + _hostElement.off(_strMouseTouchMoveEvent, hostOnMouseMove) + .off(_strMouseTouchEnter, hostOnMouseEnter) + .off(_strMouseTouchLeave, hostOnMouseLeave); } }; if (_scrollbarsAutoHideLeave || _scrollbarsAutoHideMove) { @@ -4905,13 +4909,18 @@ * if this is the case then before a real update the content size and host element attributes gets checked, and if they changed only then the update method will be called. */ _base.update = function (force) { + var attrsChanged; + var contentSizeC; + var isZoom = force === 'zoom'; + var imgElementSelector = 'img'; + var imgElementLoadEvent = 'load'; if (force === _strAuto) { - var attrsChanged = meaningfulAttrsChanged(); - var contentSizeC = updateAutoContentSizeChanged(); + attrsChanged = meaningfulAttrsChanged(); + contentSizeC = updateAutoContentSizeChanged(); if (attrsChanged || contentSizeC) update(false, contentSizeC); } - else if (force === 'zoom') { + else if (isZoom) { update(true, true); } else { @@ -4919,6 +4928,15 @@ _isSleeping = false; update(false, false, force); } + if(!_isTextarea && !isZoom) { + _contentElement.find(imgElementSelector).each(function(i, el) { + var index = helper.inArray(el, _imgs); + if (index === -1) { + el = helper(el); + el.off(imgElementLoadEvent, onImgLoad).on(imgElementLoadEvent, onImgLoad); + } + }); + } }; /** @@ -4976,9 +4994,9 @@ removePassiveEventListener(_hostElement, _strMouseTouchLeave, hostOnMouseLeave); } else { - _hostElement.off(_strMouseTouchMoveEvent, hostOnMouseMove); - _hostElement.off(_strMouseTouchEnter, hostOnMouseEnter); - _hostElement.off(_strMouseTouchLeave, hostOnMouseLeave); + _hostElement.off(_strMouseTouchMoveEvent, hostOnMouseMove) + .off(_strMouseTouchEnter, hostOnMouseEnter) + .off(_strMouseTouchLeave, hostOnMouseLeave); } _scrollbarHorizontalElement.remove(); @@ -4988,28 +5006,31 @@ if (!_resizeNone) scrollbarCornerOnResized(); - _contentElement.contents().unwrap().unwrap().unwrap(); + _contentElement.contents() + .unwrap() + .unwrap() + .unwrap(); if (_isBody) _htmlElement.removeClass(_classNameHTMLElement); if (_isTextarea) { - _targetElement.off(_strScroll, textareaOnScroll); - _targetElement.off('drop', textareaOnDrop); - _targetElement.off('focus', textareaOnFocus); - _targetElement.off('focusout', textareaOnFocusOut); - if (_msieVersion > 9 || !_autoUpdateRecommended) { + _targetElement.off(_strScroll, textareaOnScroll) + .off('drop', textareaOnDrop) + .off('focus', textareaOnFocus) + .off('focusout', textareaOnFocusOut); + if (_msieVersion > 9 || !_autoUpdateRecommended) _targetElement.off('input', textareaOnInput); - } else { - _targetElement.off(_strKeyDownEvent, textareaOnKeyDown); - _targetElement.off(_strKeyUpEvent, textareaOnKeyUp); + _targetElement.off(_strKeyDownEvent, textareaOnKeyDown) + .off(_strKeyUpEvent, textareaOnKeyUp); } + _textareaCoverElement.remove(); _targetElement.removeClass(_classNameTextareaElement) - .removeClass(_classNameTextInherit); - _targetElement.unwrap() + .removeClass(_classNameTextInherit) + .unwrap() .removeAttr(WORDING.s); _hostElement.remove(); } @@ -5028,7 +5049,11 @@ .removeClass(_classNameThemeNone) .removeClass(_classNameCache); } - + + for(var i = 0; i < _imgs.length; i++) + helper(_imgs[i]).off('load', onImgLoad); + _imgs = undefined; + instances.rem(pluginTargetElement); var onDestroyed = _currentPreparedOptions.callbacks.onDestroyed; @@ -5088,6 +5113,8 @@ * Possible block settings are: * 'begin' Both axis shall be docked to the "begin" edge. - The element will be docked to the top and left edge of the viewport. * 'end' Both axis shall be docked to the "end" edge. - The element will be docked to the bottom and right edge of the viewport. (If direction is RTL to the bottom and left edge.) + * 'center' Both axis shall be docked to "center". - The element will be centered in the viewport. + * 'nearest' The element will be docked to the nearest edges. * [ string, string ] Specify Begin or End for each axis individually. * * Possible margin settings are: -- The actual margin of the element wont be affect, this option affects only the final scroll offset. @@ -5100,12 +5127,11 @@ * @param duration The duration of the scroll animation, OR a jQuery animation configuration object. * @param easing The animation easing. * @param complete The animation complete callback. - * @returns { - * { - * x: {position: *, ratio: (number|*), max: (number|*), handleOffset: (number|*), handleLength: *, handleLengthRatio: (number|*), trackLength: *, isRTL: *, isRTLNormalized: *}, - * y: {position: *, ratio: (number|*), max: (number|*), handleOffset: (number|*), handleLength: *, handleLengthRatio: (number|*), trackLength: *} - * } - * } + * @returns + * { + * x: {position: *, ratio: (number|*), max: (number|*), handleOffset: (number|*), handleLength: *, handleLengthRatio: (number|*), trackLength: *, isRTL: *, isRTLNormalized: *}, + * y: {position: *, ratio: (number|*), max: (number|*), handleOffset: (number|*), handleLength: *, handleLengthRatio: (number|*), trackLength: *} + * } */ _base.scroll = function (coordinates, duration, easing, complete) { if (arguments.length === 0 || coordinates === undefined) { @@ -5152,16 +5178,18 @@ var durationIsObject = helper.type(duration) === TYPES.o; var strEnd = 'end'; var strBegin = 'begin'; + var strCenter = 'center'; + var strNearest = 'nearest'; var elementObjSettings = { axis: 'xy', block: [strBegin, strBegin], margin: [0, 0, 0, 0] }; var elementObjSettingsAxisValues = [_strX, _strY, 'xy', 'yx']; - var elementObjSettingsBlockValues = [strBegin, strEnd]; + var elementObjSettingsBlockValues = [strBegin, strEnd, strCenter, strNearest]; var coordinatesIsElementObj = coordinates.hasOwnProperty('el'); var possibleElement = coordinatesIsElementObj ? coordinates.el : coordinates; - var possibleElementIsJQuery = possibleElement instanceof helper; + var possibleElementIsJQuery = possibleElement instanceof helper || possibleElement instanceof window.jQuery; var possibleElementIsHTMLElement = possibleElementIsJQuery ? false : isHTMLElement(possibleElement); var checkSettingsStringValue = function (currValue, allowedValues) { for (i = 0; i < allowedValues.length; i++) { @@ -5236,7 +5264,7 @@ rawScroll = rawScroll.replace(/%/g, mult + (maxScroll * (isRTLisX && _rtlScrollBehavior.n ? -1 : 1) / 100.0)); rawScroll = rawScroll.replace(/vw/g, mult + _viewportSize.w); rawScroll = rawScroll.replace(/vh/g, mult + _viewportSize.h); - amount = window.parseInt(window.parseFloat(window.eval(rawScroll)).toFixed()); + amount = parseIntToZeroOrNumber(window.parseFloat(window.eval(rawScroll)).toFixed()); } else if (helper.type(rawScroll) === TYPES.n) { amount = rawScroll; @@ -5300,7 +5328,7 @@ var marginType = helper.type(margin); var marginLength; - //block can be [string, or array of two strings] + //block can be [ string, or array of two strings ] if (blockType === TYPES.s) block = [block, block]; else if (blockType === TYPES.a) { @@ -5371,7 +5399,6 @@ //get coordinates var elementOffset = finalElement.offset(); var viewportOffset = _paddingElement.offset(); // use padding element instead of viewport element because padding element has never padding, margin or position applied. - var viewportSize = _viewportSize; var viewportScroll = { l: _scrollHorizontalInfo.cs, t: _scrollVerticalInfo.cs @@ -5379,9 +5406,20 @@ var settingsAxis = elementObjSettings.axis; var settingsBlock = elementObjSettings.block; var settingsMargin = elementObjSettings.margin; - var blockXIsEnd = settingsBlock[0] === (_isRTL ? strBegin : strEnd); - var blockYIsEnd = settingsBlock[1] === strEnd; - var measuringForBlockIsRequired = blockXIsEnd || blockYIsEnd; + var blockIsEnd = { + x : settingsBlock[0] === (_isRTL ? strBegin : strEnd), + y : settingsBlock[1] === strEnd + }; + var blockIsCenter = { + x : settingsBlock[0] === strCenter, + y : settingsBlock[1] === strCenter + }; + var blockIsNearest = { + x : settingsBlock[0] === strNearest, + y : settingsBlock[1] === strNearest + }; + var doNothing = { }; + var measuringForBlockIsRequired = blockIsEnd.x || blockIsEnd.y || blockIsCenter.x || blockIsCenter.y || blockIsNearest.x || blockIsNearest.y; elementOffset.top -= settingsMargin[0]; elementOffset.left -= settingsMargin[3]; var elementScrollCoordinates = { @@ -5417,15 +5455,28 @@ w: rawElementSize.w + settingsMargin[3] + settingsMargin[1], h: rawElementSize.h + settingsMargin[0] + settingsMargin[2] }; - if (blockXIsEnd) - elementScrollCoordinates.x -= (viewportSize.w - elementSize.w) * (_isRTL && _normalizeRTLCache ? -1 : 1); - if (blockYIsEnd) - elementScrollCoordinates.y -= viewportSize.h - elementSize.h; + var finalizeBlock = function(isX) { + var scrollbarVars = getScrollbarVars(isX); + var divide = blockIsCenter[scrollbarVars.xy] ? 2 : 1; + var elementCenterOffset = elementOffset[scrollbarVars.lt] + (elementSize[scrollbarVars._wh] / 2); + var viewportCenterOffset = viewportOffset[scrollbarVars.lt] + (_viewportSize[scrollbarVars._wh] / 2); + + if(blockIsNearest[scrollbarVars.xy]) { + //if element is completely in view don't scroll on this axis + doNothing[scrollbarVars.xy] = elementSize[scrollbarVars._wh] <= _viewportSize[scrollbarVars._wh] && elementOffset[scrollbarVars.lt] >= viewportOffset[scrollbarVars.lt] && elementOffset[scrollbarVars.lt] + elementSize[scrollbarVars._wh] <= viewportOffset[scrollbarVars.lt] + _viewportSize[scrollbarVars._wh]; + blockIsEnd[scrollbarVars.xy] = elementSize[scrollbarVars._wh] < _viewportSize[scrollbarVars._wh] ? elementCenterOffset > viewportCenterOffset : elementCenterOffset < viewportCenterOffset; + } + + if (blockIsEnd[scrollbarVars.xy] || blockIsCenter[scrollbarVars.xy]) + elementScrollCoordinates[scrollbarVars.xy] -= ((_viewportSize[scrollbarVars._wh] / divide) - (elementSize[scrollbarVars._wh] / divide)) * (isX && _isRTL && _normalizeRTLCache ? -1 : 1); + }; + finalizeBlock(true); + finalizeBlock(false); } - if (settingsAxis === _strX) + if (settingsAxis === _strX || doNothing.y) delete elementScrollCoordinates.y; - if (settingsAxis === _strY) + if (settingsAxis === _strY || doNothing.x) delete elementScrollCoordinates.x; coordinates = elementScrollCoordinates; @@ -5595,7 +5646,8 @@ //build Hide-scrollbars DOM if (_isTextarea) { _targetElement.wrap(_strDivBegin + _classNameHostTextareaElement + _strDivEnd); - _targetElement.addClass(_classNameTextareaElement).addClass(_classNameTextInherit); + _targetElement.addClass(_classNameTextareaElement) + .addClass(_classNameTextInherit); _hostElement = _targetElement.parent(); var hostElementCSS = {}; @@ -5603,9 +5655,8 @@ hostElementCSS[_strWidth] = _targetElement.css(_strWidth); hostElementCSS[_strHeight] = _targetElement.css(_strHeight); } - _hostElement.css(hostElementCSS); - - _hostElement.wrapInner(_strDivBegin + _classNameContentElement + _strSpace + _classNameTextInherit + _strDivEnd) + _hostElement.css(hostElementCSS) + .wrapInner(_strDivBegin + _classNameContentElement + _strSpace + _classNameTextInherit + _strDivEnd) .wrapInner(_strDivBegin + _classNameViewportElement + _strSpace + _classNameTextInherit + _strDivEnd) .wrapInner(_strDivBegin + _classNamePaddingElement + _strSpace + _classNameTextInherit + _strDivEnd); _contentElement = _hostElement.find(_strDot + _classNameContentElement).first(); @@ -5614,17 +5665,16 @@ _textareaCoverElement = helper(_strDivBegin + _classNameTextareaCoverElement + _strDivEnd); _contentElement.prepend(_textareaCoverElement); - _targetElement.on(_strScroll, textareaOnScroll); - _targetElement.on('drop', textareaOnDrop); - _targetElement.on('focus', textareaOnFocus); - ; - _targetElement.on('focusout', textareaOnFocusOut); + _targetElement.on(_strScroll, textareaOnScroll) + .on('drop', textareaOnDrop) + .on('focus', textareaOnFocus) + .on('focusout', textareaOnFocusOut); if (_msieVersion > 9 || !_autoUpdateRecommended) { _targetElement.on('input', textareaOnInput); } else { - _targetElement.on(_strKeyDownEvent, textareaOnKeyDown); - _targetElement.on(_strKeyUpEvent, textareaOnKeyUp); + _targetElement.on(_strKeyDownEvent, textareaOnKeyDown) + .on(_strKeyUpEvent, textareaOnKeyUp); } } else { _targetElement.addClass(_classNameHostElement); @@ -5862,4 +5912,4 @@ } return window[PLUGINNAME]; -}))); \ No newline at end of file +}))); diff --git a/js/OverlayScrollbars.min.js b/js/OverlayScrollbars.min.js index 3874e0b..1f7a658 100644 --- a/js/OverlayScrollbars.min.js +++ b/js/OverlayScrollbars.min.js @@ -2,13 +2,12 @@ * OverlayScrollbars * https://github.com/KingSora/OverlayScrollbars * - * Version: 1.4.0 + * Version: 1.4.1 * * Copyright KingSora. * https://github.com/KingSora * * Released under the MIT license. - * Date: 02.03.2018 + * Date: 22.03.2018 */ - -!function(e,t){"function"==typeof define&&define.amd?define(function(){return t(e,e.document,undefined)}):"object"==typeof exports?module.exports=t(e,e.document,undefined):t(e,e.document,undefined)}("undefined"!=typeof window?window:this,function(e,t,n){"use-strict";var r="OverlayScrollbars",i={o:"object",f:"function",a:"array",s:"string",n:"number",u:"undefined"},o={c:"class",s:"style",i:"id",oH:"offsetHeight",cH:"clientHeight",sH:"scrollHeight",oW:"offsetWidth",cW:"clientWidth",sW:"scrollWidth"},a={wW:function(){return e.innerWidth||t.documentElement[o.cW]||t.body[o.cW]},wH:function(){return e.innerHeight||t.documentElement[o.cH]||t.body[o.cH]},mO:function(){return e.MutationObserver||e.WebKitMutationObserver||e.WebkitMutationObserver||e.MozMutationObserver||n},rO:function(){return e.ResizeObserver||e.WebKitResizeObserver||e.WebkitResizeObserver||e.MozResizeObserver||n},rAF:function(){return e.requestAnimationFrame||e.webkitRequestAnimationFrame||e.mozRequestAnimationFrame||e.oRequestAnimationFrame||e.msRequestAnimationFrame||function(t){return e.setTimeout(t,1e3/60)}},cAF:function(){return e.cancelAnimationFrame||e.webkitCancelAnimationFrame||e.mozCancelAnimationFrame||e.oCancelAnimationFrame||e.msCancelAnimationFrame||function(t){return e.clearTimeout(t)}},now:function(){return Date.now()||(new Date).getTime()},stpP:function(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0},prvD:function(e){e.preventDefault?e.preventDefault():e.returnValue=!1},page:function(e){var r="page",i="client",o="X",a="Y",s=((e=e.originalEvent||e).target||e.srcElement||t).ownerDocument||t,l=s.documentElement,c=s.body;if(e.touches!==n){var u=e.touches[0];return{x:u[r+o],y:u[r+a]}}return!e[r+o]&&e[i+o]&&null!=e[i+o]?{x:e[i+o]+(l&&l.scrollLeft||c&&c.scrollLeft||0)-(l&&l.clientLeft||c&&c.clientLeft||0),y:e[i+a]+(l&&l.scrollTop||c&&c.scrollTop||0)-(l&&l.clientTop||c&&c.clientTop||0)}:{x:e[r+o],y:e[r+a]}},mBtn:function(e){return e.which||e.button===n?e.which:1&e.button?1:2&e.button?3:4&e.button?2:0},bind:function(e,t){if(typeof e!==i.f)throw"Can't bind function!";var n=Array.prototype.slice.call(arguments,2),r=function(){},o=function(){return e.apply(this instanceof r?this:t,n.concat(Array.prototype.slice.call(arguments)))};return e.prototype&&(r.prototype=e.prototype),o.prototype=new r,o}},s=function(r){var o=/[^\x20\t\r\n\f]+/g,a=Object.prototype.toString,s=" ",l="",c=[],u={animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},f={swing:function(e,t,n,r,i){return.5-Math.cos(e*Math.PI)/2},linear:function(e,t,n,r,i){return e},easeInQuad:function(e,t,n,r,i){return r*(t/=i)*t+n},easeOutQuad:function(e,t,n,r,i){return-r*(t/=i)*(t-2)+n},easeInOutQuad:function(e,t,n,r,i){return(t/=i/2)<1?r/2*t*t+n:-r/2*(--t*(t-2)-1)+n},easeInCubic:function(e,t,n,r,i){return r*(t/=i)*t*t+n},easeOutCubic:function(e,t,n,r,i){return r*((t=t/i-1)*t*t+1)+n},easeInOutCubic:function(e,t,n,r,i){return(t/=i/2)<1?r/2*t*t*t+n:r/2*((t-=2)*t*t+2)+n},easeInQuart:function(e,t,n,r,i){return r*(t/=i)*t*t*t+n},easeOutQuart:function(e,t,n,r,i){return-r*((t=t/i-1)*t*t*t-1)+n},easeInOutQuart:function(e,t,n,r,i){return(t/=i/2)<1?r/2*t*t*t*t+n:-r/2*((t-=2)*t*t*t-2)+n},easeInQuint:function(e,t,n,r,i){return r*(t/=i)*t*t*t*t+n},easeOutQuint:function(e,t,n,r,i){return r*((t=t/i-1)*t*t*t*t+1)+n},easeInOutQuint:function(e,t,n,r,i){return(t/=i/2)<1?r/2*t*t*t*t*t+n:r/2*((t-=2)*t*t*t*t+2)+n},easeInSine:function(e,t,n,r,i){return-r*Math.cos(t/i*(Math.PI/2))+r+n},easeOutSine:function(e,t,n,r,i){return r*Math.sin(t/i*(Math.PI/2))+n},easeInOutSine:function(e,t,n,r,i){return-r/2*(Math.cos(Math.PI*t/i)-1)+n},easeInExpo:function(e,t,n,r,i){return 0==t?n:r*Math.pow(2,10*(t/i-1))+n},easeOutExpo:function(e,t,n,r,i){return t==i?n+r:r*(1-Math.pow(2,-10*t/i))+n},easeInOutExpo:function(e,t,n,r,i){return 0==t?n:t==i?n+r:(t/=i/2)<1?r/2*Math.pow(2,10*(t-1))+n:r/2*(2-Math.pow(2,-10*--t))+n},easeInCirc:function(e,t,n,r,i){return-r*(Math.sqrt(1-(t/=i)*t)-1)+n},easeOutCirc:function(e,t,n,r,i){return r*Math.sqrt(1-(t=t/i-1)*t)+n},easeInOutCirc:function(e,t,n,r,i){return(t/=i/2)<1?-r/2*(Math.sqrt(1-t*t)-1)+n:r/2*(Math.sqrt(1-(t-=2)*t)+1)+n},easeInElastic:function(e,t,n,r,i){var o=1.70158,a=0,s=r;if(0==t)return n;if(1==(t/=i))return n+r;if(a||(a=.3*i),s0&&t-1 in e)}function m(e){return(e.match(o)||[]).join(s)}function g(e,n){for(var r=(e.parentNode||t).querySelectorAll(n)||[],i=r.length;i--;)if(r[i]==e)return!0;return!1}function w(e,t,n){h.type(n)===i.s?e.insertAdjacentHTML(t,n):n.nodeType?e.insertAdjacentElement(t,n):e.insertAdjacentElement(t,n[0])}function b(e,t,r){try{e.style[t]!==n&&(e.style[t]=x(t,r))}catch(i){}}function x(e,t){return u[e.toLowerCase()]||h.type(t)!==i.n||(t=t+="px"),t}function C(e,t){var n,r;!1!==t&&e.q.splice(0,1),e.q.length>0?(r=e.q[0],M(e.el,r.props,r.duration,r.easing,r.complete,!0)):(n=h.inArray(e,c))>-1&&c.splice(n,1)}function O(e,t,n){"scrollLeft"===t?e[t]=n:"scrollTop"===t?e[t]=n:b(e,t,n)}function M(e,t,n,i,o,a){var s,l,u,v,p,y,m={},g={},w=0,b=h.isPlainObject(n);for(b?(i=n.easing,n.start,u=n.progress,v=n.step,p=n.specialEasing,o=n.complete,y=n.duration):y=n,p=p||{},y=y||400,i=i||"swing",a=a||!1;w0)E=r.now(),k=function(){for(s in x=r.now(),I=x-E,M=L.stop||I>=y,S=1-(Math.max(0,E+y-x)/y||0),g)T=m[s],z=g[s],H=(z-T)*f[p[s]||i](S,S*y,0,1,y)+T,O(e,s,H),d(v)&&v(H,{elem:e,prop:s,start:T,now:H,end:z,pos:S,options:{easing:i,speacialEasing:p,duration:y,complete:o,step:v},startTime:E});d(u)&&u({},S,Math.max(0,y-I)),M?(C(l),d(o)&&o()):L.frame=r.rAF()(k)},L.frame=r.rAF()(k);else{for(s in g)O(e,s,g[s]);C(l)}}}function S(e,t,n){for(var i,o,a,s=0;s0){if((o=i.q[0]).stop=!0,r.cAF()(o.frame),i.q.splice(0,1),n)for(a in o.props)O(e,a,o.props[a]);t?i.q=[]:C(i,!1)}break}}function A(e){var t=this;h.type(e)===i.s||e.length||(e=[e]);for(var n=0;n-1)return!0;return!1},addClass:function(e){var t,r,i,a,l,c,u=null,f=0,h=0;if(e)for(t=e.match(o)||[];r=this[f++];)if(u===n&&(u=r.classList!==n),u)for(;l=t[h++];)r.classList.add(l);else if(a=r.className,i=1===r.nodeType&&s+m(a)+s){for(;l=t[h++];)i.indexOf(s+l+s)<0&&(i+=l+s);a!==(c=m(i))&&(r.className=c)}return this},removeClass:function(e){var t,r,i,a,l,c,u=null,f=0,h=0;if(e)for(t=e.match(o)||[];r=this[f++];)if(u===n&&(u=r.classList!==n),u)for(;l=t[h++];)r.classList.remove(l);else if(a=r.className,i=1===r.nodeType&&s+m(a)+s){for(;l=t[h++];)for(;i.indexOf(s+l+s)>-1;)i=i.replace(s+l+s,s);a!==(c=m(i))&&(r.className=c)}return this},remove:function(){return this.each(function(){var e=this;null!=e.parentNode&&e.parentNode.removeChild(e)})},offset:function(){var n=this[0].getBoundingClientRect(),r=e.pageXOffset||t.documentElement.scrollLeft,i=e.pageYOffset||t.documentElement.scrollTop;return{top:n.top+i,left:n.left+r}},css:function(t,r){var o,a;return h.type(t)===i.s?r===n?(o=this[0],e.getComputedStyle?e.getComputedStyle(o,null).getPropertyValue(t):o.currentStyle[t]):this.each(function(){b(this,t,r)}):this.each(function(){for(a in t)b(this,a,t[a])})},unwrap:function(){var e,t,n,r=[];for(this.each(function(){n=this.parentNode,-1===h.inArray(n,r)&&r.push(n)}),e=0;e0;)i=i.childNodes[0];for(t=0;n.length-t;i.firstChild===n[0]&&t++)i.appendChild(n[t]);var s=a?a.nextSibling:o.firstChild;return o.insertBefore(r,s),this},wrapInner:function(e){return this.each(function(){var t=new A(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){return this.each(function(){new h(this).wrapAll(e)})},contents:function(){var e,t,n=[];return this.each(function(){for(e=this.childNodes,t=0;t-1&&(delete n[r],t.splice(i,1))}function a(e){return s(e)!==n}function s(e){for(var n=0;n
'),f=function(){a.append(u);var e,t="overflow",n="hidden",r=u[0],s=c(u.children("div").first());return 0===r[o.oH]&&u.hide().show(),e={x:r[o.oH]-r[o.cH],y:r[o.oW]-r[o.cW]},i.restrictedMeasuring=function(){u.css(t,n);var e={w:r[o.sW],h:r[o.sH]};u.css(t,"visible");var i={w:r[o.sW],h:r[o.sH]};return e.w-i.w!=0||e.h-i.h!=0}(),i.nativeScrollbarStyling=(u.addClass("os-viewport-native-scrollbars-invisible"),u.css(t,n).hide().css(t,"scroll").show(),r[o.oH]-r[o.cH]==0&&r[o.oW]-r[o.cW]==0),i.rtlScrollBehavior=function(){u.css({"overflow-y":n,direction:"rtl"}).scrollLeft(0);var e=u.offset(),t=s.offset();u.scrollLeft(999);var r=s.offset();return{i:e.left===t.left,n:t.left-r.left==0}}(),u.removeAttr(o.s).remove(),e}(),h={x:0===f.x,y:0===f.y};function v(e){var r=!1,i="Webkit Moz ms O".split(" "),o=t.createElement("div"),a=null;if(e=e.toLowerCase(),o.style[e]!==n&&(r=!0),!1===r){a=e.charAt(0).toUpperCase()+e.substr(1);for(var s=0;s0)return parseInt(t.substring(n+5,t.indexOf(".",n)),10);if(t.indexOf("Trident/")>0){var r=t.indexOf("rv:");return parseInt(t.substring(r+3,t.indexOf(".",r)),10)}var i=t.indexOf("Edge/");return i>0&&parseInt(t.substring(i+5,t.indexOf(".",i)),10)}(),i.cssCalc=function(){for(var e=t.createElement("div"),n=["calc","-webkit-calc","-moz-calc","-o-calc"],r=0;r0){var e=s.wW(),h=s.wH(),d=e-t,p=h-n;if(0===d&&0===p)return;var y=Math.round(e/(t/100)),m=Math.round(h/(n/100)),g=Math.abs(d),w=Math.abs(p),b=Math.abs(y),x=Math.abs(m),C=v(),O=g>2&&w>2,M=!f(b,x);if(!!(O&&M&&(C!==r&&r>0))){a.append(u);var S=u[0];i.nativeScrollbarSize={x:S[o.oH]-S[o.cH],y:S[o.oW]-S[o.cW]},u.remove(),c.each(l.all(),function(){l.has(this)&&l.get(this).update("zoom")})}t=e,n=h,r=C}})}function f(e,t){var n=Math.abs(e),r=Math.abs(t);return!(n===r||n+1===r||n-1===r)}function v(){var t=e.screen.deviceXDPI||0,n=e.screen.logicalXDPI||1;return e.devicePixelRatio||t/n}}()}function y(e){var t,r=this,i="autoUpdate",o=i+"Interval",a=[],l=[],u=!1,f=33,h=f,v=s.now(),d=function(){if(a.length>0&&u){t=s.rAF()(function(){d()});var e=s.now(),r=e-v;if(r>h){v=e-r%h;for(var c=f,p=0;pw&&(y.update("auto"),l[p]=new Date(b+=w)),c=Math.max(1,Math.min(c,w))}}h=c}}else h=f};r.add=function(t){-1===c.inArray(t,a)&&(a.push(t),l.push(s.now()),a.length>0&&!u&&(u=!0,e.autoUpdateLoop=u,d()))},r.remove=function(r){var i=c.inArray(r,a);i>-1&&(l.splice(i,1),a.splice(i,1),0===a.length&&u&&(u=!1,e.autoUpdateLoop=u,t!==n&&(s.cAF()(t),t=-1)))}}function m(t,f,h,v){if(ti(t)){if(l.has(t)){var d=l.get(t);return d.options(f),d}var p,y,m,g,w,b,x,C,O,M,S,A,T,z,H,E,k,I,W,L,P,F,N,D,R,B,j,q,U,_,Q,V,X,Y,J,K,$,G,Z,ee,te,ne,re,ie,oe,ae,se,le,ce,ue,fe,he,ve,de,pe,ye,me,ge,we,be,xe,Ce,Oe,Me,Se,Ae,Te,ze,He,Ee,ke,Ie,We,Le,Pe,Fe,Ne,De,Re,Be,je,qe,Ue,_e,Qe,Ve,Xe,Ye,Je,Ke,$e,Ge,Ze,et,tt,nt,rt,it,ot,at,st,lt,ct,ut,ft,ht,vt,dt,pt,yt,mt,gt,wt,bt,xt=new e[r],Ct=!1,Ot=!1,Mt=!1,St=!1,At=!1,Tt={w:0,h:0},zt={},Ht={},Et={},kt=175,It="-hidden",Wt="margin-",Lt="padding-",Pt="border-",Ft="top",Nt="right",Dt="bottom",Rt="left",Bt="min-",jt="max-",qt="width",Ut="height",_t="float",Qt="",Vt="auto",Xt="scroll",Yt="100%",Jt="x",Kt="y",$t='
',Zt=".",en=" ",tn="scrollbar",nn="-horizontal",rn="-vertical",on=Xt+"Left",an=Xt+"Top",sn="mousedown touchstart",ln="mouseup touchend",cn="mousemove touchmove",un="mouseenter",fn="mouseleave",hn="keydown",vn="keyup",dn="selectstart",pn="transitionend webkitTransitionEnd oTransitionEnd",yn="__overlayScrollbarsRO__",mn="os-",gn=mn+"html",wn=mn+"host",bn=wn+"-textarea",xn=wn+"-"+tn+nn+It,Cn=wn+"-"+tn+rn+It,On=wn+"-transition",Mn=wn+"-rtl",Sn=wn+"-resize-disabled",An=wn+"-scrolling",Tn=wn+"-overflow",zn=Tn+"-x",Hn=Tn+"-y",En=mn+"textarea",kn=En+"-cover",In=mn+"padding",Wn=mn+"viewport",Ln=Wn+"-native-scrollbars-invisible",Pn=Wn+"-native-scrollbars-overlaid",Fn=mn+"content",Nn=mn+"content-arrange",Dn=mn+"content-glue",Rn=mn+"size-auto-observer",Bn=mn+"resize-observer",jn=mn+"resize-observer-item",qn=jn+"-final",Un=mn+"text-inherit",_n=mn+tn,Qn=_n+"-track",Vn=Qn+"-off",Xn=_n+"-handle",Yn=Xn+"-off",Jn=_n+"-unusable",Kn=_n+"-"+Vt+It,$n=_n+"-corner",Gn=$n+"-resize",Zn=Gn+"-both",er=Gn+nn,tr=Gn+rn,nr=_n+nn,rr=_n+rn,ir=mn+"dragging",or=mn+"theme-none",ar={},sr=33,lr=11,cr=[112,113,114,115,116,117,118,119,120,121,123,33,34,37,38,39,40,16,17,18,19,20,144],ur=[],fr={x:0,y:0},hr={w:0,h:0};if(xt.sleep=function(){N=!0},xt.update=function(e){if(e===Vt){var t=ui(),n=ci();(t||n)&&di(!1,n)}else"zoom"===e?di(!0,!0):(e=N||e,N=!1,di(!1,!1,e))},xt.options=function(e,t){if(c.isEmptyObject(e)||!c.isPlainObject(e)){if(c.type(e)===i.s){if(arguments.length>=2){var n={};return u.set(n,e,t,!0),li(n),void di()}return u.get(B,e)}return B}li(e);var r=N||!1;N=!1,di(),N=r},xt.destroy=function(){Ot=!0,v.remove(xt),Ar(),wr($),At&&wr(K),$.remove(),G!==n&&G.remove(),te!==n&&te.remove(),At&&K.remove(),A?(pr(J,cn,Gr),pr(J,un,Kr),pr(J,fn,$r)):(J.off(cn,Gr),J.off(un,Kr),J.off(fn,$r)),oe.remove(),le.remove(),ie&&ie.remove(),mt||Hr(),ne.contents().unwrap().unwrap().unwrap(),St&&V.removeClass(gn),Mt?(Y.off(Xt,Rr),Y.off("drop",Fr),Y.off("focus",Nr),Y.off("focusout",Dr),m>9||!y?Y.off("input",Wr):(Y.off(hn,Lr),Y.off(vn,Pr)),re.remove(),Y.removeClass(En).removeClass(Un),Y.unwrap().removeAttr(o.s),J.remove()):(Y.removeClass(wn),J.removeClass(wn).removeClass(Sn).removeClass(Mn).removeClass(xn).removeClass(Cn).removeClass(On).removeClass(An).removeClass(Tn).removeClass(zn).removeClass(Hn).removeClass(or).removeClass(Ke)),l.rem(t);var e=j.callbacks.onDestroyed;for(var r in c.isFunction(e)&&Or(e),xt)delete xt[r];xt=n},xt.scroll=function(t,r,a,s){if(0===arguments.length||t===n){var l=zt,u=Ht,f=Je&&F&&p.i,h=Je&&F&&p.n,v=l.cs,d=l.csr,y=l.ms;return v=f?y-v:v,{x:{position:v*=h?-1:1,ratio:d=f?1-d:d,max:y*=h?-1:1,handleOffset:l.ho,handleLength:l.hl,handleLengthRatio:l.hlr,trackLength:l.tl,isRTL:F,isRTLNormalized:Je},y:{position:u.cs,ratio:u.csr,max:u.ms,handleOffset:u.ho,handleLength:u.hl,handleLengthRatio:u.hlr,trackLength:u.tl}}}var m,g=[Jt,Rt,"l"],w=[Kt,Ft,"t"],b=["+=","-=","*=","/="],x={},C=c.type(r)===i.o,O="end",M="begin",A={axis:"xy",block:[M,M],margin:[0,0,0,0]},T=[Jt,Kt,"xy","yx"],z=[M,O],H=t.hasOwnProperty("el"),E=H?t.el:t,k=E instanceof c,I=!k&&ti(E),W=function(e,t){for(m=0;m0)t.x=e[0],t.y=e[1];else if(c.type(e)===i.s||c.type(e)===i.n)t.x=e,t.y=e;else if(c.type(e)===i.o){for(var n in e=c.extend({},e),m=0,e)e.hasOwnProperty(n)&&(m>2&&delete e[n],m++);var r=function(t){var n=t?g:w;for(m=0;m2){var y=r.substr(0,2);for(m=0;m/g,(d?"-":Qt)+Yt)).replace(/px/g,Qt)).replace(/%/g,h+f*(v&&p.n?-1:1)/100)).replace(/vw/g,h+Et.w)).replace(/vh/g,h+Et.h),a=e.parseInt(e.parseFloat(e.eval(r)).toFixed())}else c.type(r)===i.n&&(a=r);if(!isNaN(a)&&a!==n&&c.type(a)===i.n){var g=Je&&v,w=u*(g&&p.n?-1:1),x=g&&p.i,C=g&&p.n;switch(w=x?f-w:w,o){case"+=":s=w+a;break;case"-=":s=w-a;break;case"*=":s=w*a;break;case"/=":s=w/a;break;default:s=a}x&&(s=f-s),C&&(s*=-1),v&&p.n?(s=Math.max(f,s),s=Math.min(0,s)):(s=Math.min(f,s),s=Math.max(0,s)),s===u&&(s=n)}return s};if(k||I){var N=k?E:c(E);if(0===N.length)return;if(H){var D,R,B,j=t.axis,q=t.block,U=c.type(q),_=t.margin,Q=c.type(_);if(U===i.s)q=[q,q];else if(U===i.a)if((R=q.length)>2||R<1)q=n;else{for(D=!0,1===R&&(q[1]=M),m=0;m0||C){var fe={};if(ce&&(fe[on]=x.x),ue&&(fe[an]=x.y),C)ee.animate(fe,r);else{var he={duration:r,complete:s};if(c.type(a)===i.a){var ve={};ve[on]=a[0],ve[an]=a[1],he.specialEasing=ve}else he.easing=a;ee.animate(fe,he)}}else ce&&ee[on](x.x),ue&&ee[an](x.y)},xt.scrollStop=function(e,t,n){ee.stop(e,t,n)},xt.getElements=function(){return{target:Y[0],host:J[0],padding:Z[0],viewport:ee[0],content:ne[0],scrollbarHorizontal:{scrollbar:oe[0],track:ae[0],handle:se[0]},scrollbarVertical:{scrollbar:le[0],track:ce[0],handle:ue[0]},scrollbarCorner:ie}},xt.getState=function(e){var t=function(e){if(!c.isPlainObject(e))return e;var t=c.extend(!0,{},e);u.del(t,"c");var n=function(e,n){t.hasOwnProperty(e)&&(t[n]=t[e],delete t[e])};return n("w",qt),n("h",Ut),t},n={sleeping:t(N)||!1,autoUpdate:t(!rt),widthAuto:t(ye),heightAuto:t(me),padding:t(be),overflowAmount:t(He),hideOverflow:t(pe),hasOverflow:t(de),contentScrollSize:t(he),viewportSize:t(Et),hostSize:t(fe)};return c.type(e)===i.s?u.get(n,e):n},pi(t,f))return l.add(t,xt),xt;xt=n}function vr(){if(!N){var e=$[0],t={w:e[o.sW],h:e[o.sH]};if(Ct){var n=xr(t,Ue);Ue=t,n&&di(!0,!1)}else Ue=t}}function dr(e,t,n){e=e[0];for(var r=t.split(en),i=0;i9||!y){var f='">',v="",d="childNodes",g=$t+Bn+f;g+=$t+jn+'" dir="ltr'+f,g+=$t+jn+f,g+=$t+qn+Gt,g+=v,g+=$t+jn+f,g+=$t+qn+'" style="width: 200%; height: 200%'+Gt,g+=v,g+=v,g+=v,e.prepend(g);var w,b,x,C,O=(e=e[0])[d][0][d][0],M=c(O[d][1]),S=c(O[d][0]),A=c(S[0][d][0]),z=O[o.oW],H=O[o.oH],E=2,k=h.nativeScrollbarSize,I=function(){S[on](n)[an](n),M[on](n)[an](n)},W=function(){b=0,w&&(z=x,H=C,r())},L=function(e){return x=O[o.oW],C=O[o.oH],w=x!=z||C!=H,e&&w&&!b?(s.cAF()(b),b=s.rAF()(W)):e||W(),I(),e&&(s.prvD(e),s.stpP(e)),!1},P={};P[Ft]=-(k.y+1)*E,P[Nt]=k.x*-E,P[Dt]=k.y*-E,P[Rt]=-(k.x+1)*E,c(O).css(P),S.on(Xt,L),M.on(Xt,L),c(e).on(u,function(){L(!1)});var N={};N[qt]=n,N[Ut]=n,A.css(N),I()}else{var D=Q[0],R=e;e=e[0];var B=D.attachEvent,j=typeof navigator===i.u||(navigator.userAgent.match(/Trident/)||navigator.userAgent.match(/Edge/));if(B)R.prepend($t+Bn+Gt),R.find(Zt+Bn).first()[0].attachEvent("onresize",r);else{var q=D.createElement(i.o);q.setAttribute("tabindex","-1"),q.setAttribute(o.c,Bn),q.onload=function(){var e=this.contentDocument.defaultView;e.addEventListener("resize",r),e.document.documentElement.style.display="none"},q.type="text/html",j&&R.prepend(q),q.data="about:blank",j||R.prepend(q),R.on(u,r)}}}if((e=c(e))[0]===$[0]){var U=function(){var t=J.css("direction");if(t!==Me){var r={},i=0;return"ltr"===t?(r[Rt]=0,r[Nt]=Vt,i=n):(r[Rt]=Vt,r[Nt]=0,i=p.n?-n:p.i?0:n),$.children().first().css(r),e.scrollLeft(i),e.scrollTop(n),Me=t,!0}return!1};U(),e.on(Xt,function(e){return U()&&di(),s.prvD(e),s.stpP(e),!1})}}function wr(e){if(T){var t=e.contents()[0];t[yn].disconnect(),delete t[yn]}else e.children(Zt+Bn).first().remove()}function br(e,t,r){return!0===r?r:t===n||e!==t}function xr(e,t,r,i,o){if(!0===o)return o;if(i===n&&o===n){if(!0===r)return r;r=n}return r=r===n?"w":r,i=i===n?"h":i,t===n||(e[r]!==t[r]||e[i]!==t[i])}function Cr(e,t){return t===n||(e.t!==t.t||e.r!==t.r||e.b!==t.b||e.l!==t.l)}function Or(e,t){Ct&&e.call(xt,t)}function Mr(e,t,r){r===n&&(r=[Qt,Qt,Qt,Qt]),e[t+Ft]=r[0],e[t+Nt]=r[1],e[t+Dt]=r[2],e[t+Rt]=r[3]}function Sr(){it&&!rt&&(tt.observe(J[0],{attributes:!0,attributeOldValue:!0,attributeFilter:[o.i,o.c,o.s]}),nt.observe(Mt?Y[0]:ne[0],{attributes:!0,attributeOldValue:!0,subtree:!Mt,childList:!Mt,characterData:!Mt,attributeFilter:Mt?["wrap","cols","rows"]:[o.i,o.c,o.s]}),rt=!0)}function Ar(){it&&rt&&(tt.disconnect(),nt.disconnect(),rt=!1)}function Tr(e){if(!N){var t=(e.originalEvent||e).touches!==n;(1===s.mBtn(e)||t)&&(rt&&(yt=!0,Ar()),fr=s.page(e),hr.w=J[0][o.oW]-(H?0:E),hr.h=J[0][o.oH]-(H?0:k),Q.on(dn,Br),Q.on(cn,zr),Q.on(ln,Hr),X.addClass(ir),ie.setCapture&&ie.setCapture(),s.prvD(e),s.stpP(e))}}function zr(e){e.originalEvent;var t=s.page(e),n={};(wt||gt)&&(n[qt]=hr.w+t.x-fr.x),(bt||gt)&&(n[Ut]=hr.h+t.y-fr.y),J.css(n),s.stpP(e)}function Hr(e){var t=e!==n;Q.off(dn,Br),Q.off(cn,zr),Q.off(ln,Hr),X.removeClass(ir),ie.releaseCapture&&ie.releaseCapture(),t&&(yt&&Sr(),xt.update(Vt)),yt=!1}function Er(){if(!N){var e=!We,t=Et.w-(H||Se||!ye?0:k+W),n=Et.h-(H||Se||!me?0:k+W),r={},i=ye||e,a=Y[0];r[Bt+qt]=Qt,r[Bt+Ut]=Qt,r[qt]=Vt,Y.css(r);var s=a[o.oW],l=i?Math.max(s,a[o.sW]-1):1;l+=ye?L+(H?0:e?0:E+I):0,r[qt]=ye?l:Yt,r[Ut]=Vt,Y.css(r);var c=a[o.oH],u=Math.max(c,a[o.sH]-1);return r[qt]=l,r[Ut]=u,re.css(r),r[Bt+qt]=t+(!H&&ye?E+I:0),r[Bt+Ut]=n+(!H&&me?k+W:0),Y.css(r),{ow:s,oh:c,dw:l,dh:u}}}function kr(){var e=Y.prop("selectionStart");if(e!==n){for(var t=Y.val(),r=t.length,i=t.split("\n"),o=i.length,a=t.substr(0,e).split("\n"),s=0,l=0,c=a.length,u=a[a.length-1].length,f=0;fl&&(s=f+1,l=h)}return{cursorRow:c,cursorCol:u,rows:o,cols:l,wRow:s,pos:e,max:r}}}function Ir(e){for(var t=0;t-1&&ur.splice(n,1),0===ur.length&&(Er(),xt.update(Vt),clearInterval(ot))}}function Fr(){setTimeout(function(){Er(),xt.update(Vt)},50)}function Nr(){at=!0}function Dr(){at=!1,clearInterval(ot),ur=[],Er(),xt.update(Vt)}function Rr(e){return Y[on](p.i&&Je?9999999:0),Y[an](0),s.prvD(e),s.stpP(e),!1}function Br(e){return s.prvD(e),!1}function jr(){return Ee&&C.x&&C.y}function qr(e,t,n){var r=e?xn:Cn,i=e?oe:le;t?J.removeClass(r):J.addClass(r),n?i.removeClass(Jn):i.addClass(Jn)}function Ur(e,t){if(clearTimeout(st),e)oe.removeClass(Kn),le.removeClass(Kn);else{var n="active",r=function(){if(!pt){var e=se.hasClass(n)||ue.hasClass(n);!e&&(ft||ht||vt)&&oe.addClass(Kn),!e&&(ft||ht||vt)&&le.addClass(Kn)}};ct>0&&!0!==t?st=setTimeout(r,ct):r()}}function _r(e){var t={},n=Jr(e),r=Math.min(1,(fe[n._wh]-(Se?e?E:k:0))/he[n._wh]);t[n.wh]=Math.floor(100*r*1e5)/1e5+"%",jr()||n.h.css(t),n.i.hl=n.h[0]["offset"+n.WH],n.i.hlr=r}function Qr(e,t){var n=F&&e,r={},i=Jr(e),o=ee[0][Xt+i.WH]-ee[0]["client"+i.WH];p.n&&n&&(o*=-1);var a=t/o;a=isNaN(a)?0:Math.min(1,a),i.i.ms=o,i.i.cs=t,i.i.csr=a;var s=i.i.hl,l=i.t[0]["offset"+i.WH],c=(l-s)*a;if(c=isNaN(c)?0:c,n&&(p.n||!p.n&&!p.i)&&(c=l-s-c),c=Math.max(0,c),S){var u;n&&(c=-(l-s-c));var f="translate(",h="transform";u=e?f+c+"px, 0px)":f+"0px, "+c+"px)",r["-webkit-"+h]=u,r["-moz-"+h]=u,r["-ms-"+h]=u,r["-o-"+h]=u,r[h]=u}else r[i.lt]=c;jr()||i.h.css(r),i.i.ho=c,i.i.tl=l}function Vr(e,t){var n=t?"removeClass":"addClass",r=e?ce:ue,i=e?Vn:Yn;(e?ae:se)[n](i),r[n](i)}function Xr(){oe=c($t+_n+en+nr+Gt),ae=c($t+Qn+Gt),se=c($t+Xn+Gt),le=c($t+_n+en+rr+Gt),ce=c($t+Qn+Gt),ue=c($t+Xn+Gt),oe.append(ae),ae.append(se),le.append(ce),ce.append(ue),Z.after(le),Z.after(oe),M&&(oe.on(pn,function(e){e.target===oe[0]&&(_r(!0),Qr(!0,ee[on]()))}),le.on(pn,function(e){e.target===le[0]&&(_r(!1),Qr(!1,ee[an]()))})),Yr(!0),Yr(!1),ie=c($t+en+$n+Gt),J.append(ie)}function Yr(e){var t,r,i,o=Jr(e),a=o.xy,l=Xt+o.LT,c="active",u=1,f=function(){u=.5},h=function(){u=1},v=function(n){n.originalEvent;var i=o.i.tl,c=o.i.hl,u=o.i.ms*((c/2+s.page(n)[a]-r-c/2)/(i-c));u=isFinite(u)?u:0,F&&e&&(p.n||!p.n&&!p.i)&&(u*=-1),ee[l](t+u),A||s.prvD(n)},d=function(e){e=e||e.originalEvent,X.removeClass(ir),o.h.removeClass(c),o.t.removeClass(c),o.s.removeClass(c),A?(pr(Q,cn,v),pr(Q,ln,d),pr(Q,hn,y),pr(Q,vn,m),pr(Q,dn,Br)):(Q.off(cn,v),Q.off(ln,d),Q.off(hn,y),Q.off(vn,m),Q.off(dn,Br)),h(),t=n,r=n,i!==n&&(xt.scrollStop(),clearTimeout(i),i=n);var a=J[0].getBoundingClientRect();e.clientX>=a.left&&e.clientX<=a.right&&e.clientY>=a.top&&e.clientY<=a.bottom||$r(),(ft||ht)&&Ur(!1)},y=function(e){16==e.keyCode&&f()},m=function(e){16==e.keyCode&&h()};o.h.on(sn,function(i){if(!N){var u=(i.originalEvent||i).touches!==n;jr()||!Xe||u&&!dt||(1===s.mBtn(i)||u)&&(t=(t=ee[l]())===n?0:t,(F&&e&&!p.n||!F)&&(t=t<0?0:t),r=s.page(i)[a],X.addClass(ir),o.h.addClass(c),o.s.addClass(c),A?(dr(Q,dn,Br),dr(Q,cn,v),dr(Q,ln,d)):(Q.on(dn,Br),Q.on(cn,v),Q.on(ln,d)),s.prvD(i))}}),o.t.on(sn,function(t){if(!N){var l=(t.originalEvent||t).touches!==n;if(!jr()&&Ve&&(!l||dt)&&(1===s.mBtn(t)||l)){var h,v=Et[o._wh],g=o.t.offset()[o.lt],w=!0;t.shiftKey&&f();var b=function(){var t=o.i.ho,a=o.i.hl,s=r-g,l=200*u,c=w?Math.max(333,l):l,f={},d=F&&e&&(!p.i&&!p.n||Je),y=t>s;d&&(y=t=s;d&&(m=h?t+a>=s:t<=s),m?(clearTimeout(i),xt.scrollStop(),i=n):i=setTimeout(b,c),w=!1};r=s.page(t)[a],X.addClass(ir),o.t.addClass(c),o.s.addClass(c),A?(dr(Q,dn,Br),dr(Q,ln,d),dr(Q,hn,y),dr(Q,vn,m)):(Q.on(dn,Br),Q.on(ln,d),Q.on(hn,y),Q.on(vn,m)),b(),s.prvD(t)}}}).hover(function(){(ft||ht)&&(pt=!0,Ur(!0))},function(){(ft||ht)&&(pt=!1,Ur(!1))}),o.s.on(sn,function(e){s.stpP(e)})}function Jr(e){return{wh:e?qt:Ut,WH:e?"Width":"Height",lt:e?Rt:Ft,LT:e?"Left":"Top",xy:e?Jt:Kt,XY:e?"X":"Y",_wh:e?"w":"h",_lt:e?"l":"t",t:e?ae:ce,h:e?se:ue,s:e?oe:le,i:e?zt:Ht}}function Kr(){vt&&Ur(!0)}function $r(){vt&&!X.hasClass(ir)&&Ur(!1)}function Gr(){ht&&(Ur(!0),clearTimeout(lt),lt=setTimeout(function(){ht&&Ur(!1)},100))}function Zr(e){if(!N){var t=j.callbacks,r=t.onScrollStart,i=t.onScroll,o=t.onScrollStop;D!==n?clearTimeout(D):((ft||ht)&&Ur(!0),jr()||J.addClass(An),c.isFunction(r)&&Or(r,e)),Qr(!0,ee[on]()),Qr(!1,ee[an]()),c.isFunction(i)&&Or(i,e),D=setTimeout(function(){ei(e),c.isFunction(o)&&Or(o,e)},kt)}}function ei(){clearTimeout(D),D=n,(ft||ht)&&Ur(!1),jr()||J.removeClass(An)}function ti(e){return typeof HTMLElement===i.o?e instanceof HTMLElement:e&&typeof e===i.o&&null!==e&&1===e.nodeType&&typeof e.nodeName===i.s}function ni(e,t,r,o){var a,s,l,f,h,v={n:t,s:!1,v:n,p:n},d=i.u,p=u.has(e,t),y=u.get(e,t),m=!1,g=!0!==p,w="*",b=!1;for(c.type(r)!==i.a&&(r=[r]),h=r.length,s=0;s1){var C=0;for(f=0;f1)break}1===C&&(b=!0)}else b=!0;x===n&&(m=!0)}if(g&&!1===p&&m&&(g=!1),!g){a=y,d=c.type(a);var M=function(e){var t=c.type(e);return t===d&&(t!==i.s||(!!b||a===e))&&(v.s=!0,v.v=a,v.p=a,!0)};for(s=0;s-1&&o.splice(u,1);for(var f=0;f0&&Ct&&i-q0?J.addClass(ce):J.addClass(or)),ot&&(!0===it?(Ar(),v.add(xt)):null===it&&y?(Ar(),v.add(xt)):(v.remove(xt),Sr())),Ue)if(qe)if(G===n&&(G=c($t+Dn+Gt),Z.before(G)),At)K.show();else{K=c($t+Rn+Gt),G.before(K);var Ht={w:-1,h:-1};gr(K,function(){var e={w:K[0][o.oW],h:K[0][o.oH]};xr(e,Ht)&&(Ct&&me&&e.h>0||ye&&e.w>0?di():(Ct&&!me&&0===e.h||!ye&&0===e.w)&&di()),Ht=e}),At=!0,null!==w&&K.css(Ut,w+"(100% + 1px)")}else At&&K.hide();r&&($.find("*").trigger(Xt),At&&K.find("*").trigger(Xt));var kt,It=J.css("direction"),Zt=br(It,Oe,r),en=J.css("box-sizing"),tn=br(en,we,r),nn={c:r,t:fi(J.css(Lt+Ft)),r:fi(J.css(Lt+Nt)),b:fi(J.css(Lt+Dt)),l:fi(J.css(Lt+Rt))};try{kt=At?K[0].getBoundingClientRect():null}catch(Di){return}H="border-box"===en;var rn=(F="rtl"===It)?Rt:Nt,ln=F?Nt:Rt,hn=J[0],vn=Z[0],dn=!1,pn=!(!At||"none"===J.css(_t))&&(0===Math.round(kt.right-kt.left)&&(!!De||hn[o.cW]-E>0));if(qe&&!pn){var yn=hn[o.oW],mn=G.css(qt);G.css(qt,Vt);var gn=hn[o.oW];G.css(qt,mn),(dn=yn!==gn)||(G.css(qt,yn+1),gn=hn[o.oW],G.css(qt,mn),dn=yn!==gn)}var wn=(pn||dn)&&qe,bn=br(wn,ye,r),xn=!wn&&ye,Cn=!!At&&0===Math.round(kt.bottom-kt.top),On=br(Cn,me,r),En=!Cn&&me,kn="-"+qt,In=wn&&H||!H,Wn=Cn&&H||!H,Ln={c:r,t:Wn?fi(J.css(Pt+Ft+kn)):0,r:In?fi(J.css(Pt+Nt+kn)):0,b:Wn?fi(J.css(Pt+Dt+kn)):0,l:In?fi(J.css(Pt+Rt+kn)):0},Pn={c:r,t:fi(J.css(Wt+Ft)),r:fi(J.css(Wt+Nt)),b:fi(J.css(Wt+Dt)),l:fi(J.css(Wt+Rt))},Fn={h:String(J.css(jt+Ut)),w:String(J.css(jt+qt))},Bn={},jn={};if(E=nn.l+nn.r,k=nn.t+nn.b,nn.c=Cr(nn,be),I=Ln.l+Ln.r,W=Ln.t+Ln.b,Ln.c=Cr(Ln,xe),L=Pn.l+Pn.r,P=Pn.t+Pn.b,Pn.c=Cr(Pn,Ce),Fn.ih=parseInt(Fn.h),Fn.iw=parseInt(Fn.w),Fn.ch=Fn.h.indexOf("px")>-1,Fn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Ut]=Math.max(1,jn[Ut])),Mt&&re.css(Hr),G.css(jn)}wn&&(Bn[qt]=Yt),!wn||H||rt||(Bn[_t]="none"),ne.css(Bn),Bn={};var Ir=ir.getBoundingClientRect(),Wr={w:Math.max(ir[o.sW],lr[o.sW]),h:Math.max(ir[o.sH],lr[o.sH])};if(Kn&&ne.css(Qn,Qt),Ir.width!==n){var Lr=Ir.width,Pr=Ir.height,Fr=.001;Wr.w+=fi(Lr+Fr)-Lr,Wr.h+=fi(Pr+Fr)-Pr}Wr.c=t=xr(Wr,he,r),he=Wr,e=xr(hr={w:hn[o.cW],h:hn[o.cH]},fe),fe=hr,Et={w:vn[o.oW],h:vn[o.oH]};var Nr={x:"v-s"===st.x,y:"v-s"===st.y},Dr={x:"v-h"===st.x,y:"v-h"===st.y},Rr={x:"s"===st.x,y:"s"===st.y},Br={x:Math.max(0,Wr.w-hr.w+(De?E:0)),y:Math.max(0,Wr.h-hr.h+(De?k:0))},jr=Mt&&(0===Et.w||0===Et.h);jr&&(Br.x=0,Br.y=0);var Xr={x:Br.x>0,y:Br.y>0},Yr={x:Xr.x,y:Xr.y};(Nr.x||Dr.x)&&(Yr.x=Xr.y&&!Nr.y&&!Dr.y),(Nr.y||Dr.y)&&(Yr.y=Xr.x&&!Nr.x&&!Dr.x),Yr.xs=!!Yr.x&&(Rr.x||Nr.x),Yr.ys=!!Yr.y&&(Rr.y||Nr.y);var Jr={x:Xr.x&&Yr.xs,y:Xr.y&&Yr.ys},Zr=He;if(Br.c=xr(Br,He,Jt,Kt,r),He=Br,Xr.c=xr(Xr,de,Jt,Kt,r),de=Xr,Yr.c=xr(Yr,pe,Jt,Kt,r),pe=Yr,C.x||C.y){var ei=r,ti={};if((Xr.x||Xr.y)&&(ti.w=C.y&&Xr.y?Wr.w+O.y:Qt,ti.h=C.x&&Xr.x?Wr.h+O.x:Qt,ei=br(ti,ve,r),ve=ti),Xr.c||Yr.c||Wr.c||Zt||bn||On||wn||Cn||nt){var ni="px solid transparent";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yScrollable:Yr.ys,clipped:Yr.x||Yr.y}),Br.c&&c.isFunction(T)&&Or(T,{x:Br.x,y:Br.y})}St&&(Xr.c||et.c)&&(et.f||ri(),C.y&&Xr.x&&ne.css(Bt+qt,et.w+O.y),C.x&&Xr.y&&ne.css(Bt+Ut,et.h+O.x),et.c=!1),mr($),mr(K),c.isFunction(M)&&Or(M,{forced:r})}}function pi(e,t){R=h.defaultOptions,g=h.nativeScrollbarStyling,b=c.extend(!0,{},h.nativeScrollbarSize),C=c.extend(!0,{},h.nativeScrollbarIsOverlaid),O=c.extend(!0,{},h.overlayScrollbarDummySize),p=c.extend(!0,{},h.rtlScrollBehavior),li(c.extend(!0,{},R,t));var n,r=j.callbacks;if(C.x&&C.x&&!j.nativeScrollbarsOverlaid.initialize){var i=r.onInitializationWithdrawn;return c.isFunction(i)&&Or(i),!1}if(w=h.cssCalc,m=h.msie,y=h.autoUpdateRecommended,M=h.supportTransition,S=h.supportTransform,A=h.supportPassiveEvents,T=h.supportResizeObserver,it=h.supportMutationObserver,z=h.restrictedMeasuring,Q=c(e.ownerDocument),_=c(Q[0].defaultView||Q[0].parentWindow),V=Q.find("html").first(),X=V.find("body").first(),Y=c(e),Mt=Y.is("textarea"),(St=Y.is("body"))&&((n={}).l=Math.max(Y[on](),V[on](),_[on]()),n.t=Math.max(Y[an](),V[an](),_[an]())),Mt){Y.wrap($t+bn+Gt),Y.addClass(En).addClass(Un),J=Y.parent();var a={};j.sizeAutoCapable||(a[qt]=Y.css(qt),a[Ut]=Y.css(Ut)),J.css(a),J.wrapInner($t+Fn+en+Un+Gt).wrapInner($t+Wn+en+Un+Gt).wrapInner($t+In+en+Un+Gt),ne=J.find(Zt+Fn).first(),ee=J.find(Zt+Wn).first(),Z=J.find(Zt+In).first(),re=c($t+kn+Gt),ne.prepend(re),Y.on(Xt,Rr),Y.on("drop",Fr),Y.on("focus",Nr),Y.on("focusout",Dr),m>9||!y?Y.on("input",Wr):(Y.on(hn,Lr),Y.on(vn,Pr))}else Y.addClass(wn),(J=Y).wrapInner($t+Fn+Gt).wrapInner($t+Wn+Gt).wrapInner($t+In+Gt),ne=J.find(Zt+Fn).first(),ee=J.find(Zt+Wn).first(),Z=J.find(Zt+In).first(),ne.on(pn,function(e){!0!==ke&&hi((e=e.originalEvent||e).propertyName)&&di(Vt)});if(Xr(),A?dr(ee,Xt,Zr):ee.on(Xt,Zr),g&&(C.x&&C.y?ee.addClass(Pn):ee.addClass(Ln)),it){var l,u=s.mO(),f=s.now();tt=new u(function(e){if(Ct&&!N){var t=!1;c.each(e,function(){var e=this,n=this.target,r=e.attributeName;if(t=r===o.c?ai(e.oldValue,n.className):r!==o.s||e.oldValue!==n.style.cssText)return!1}),t&&xt.update(Vt)}}),nt=new u(function(e){if(Ct&&!N){for(var t=!1,n=0;nlr||!i?o():l=setTimeout(o,lr)}}})}St&&(V.addClass(gn),ee[on](n.l),ee[an](n.t)),$=c($t+"os-resize-observer-host"+Gt),J.prepend($),gr($,vr),vr(),xt.update(Vt),setTimeout(function(){M&&!Ot&&J.addClass(On)},333),Ct=!0;var v=r.onInitialized;return c.isFunction(v)&&Or(v),Ct}}e[r]=function(e,t){if(0===arguments.length)return this;d();var r,i=[];return c.isPlainObject(t)?e&&e.length?e.length>1?(c.each(e,function(){(r=this)!==n&&i.push(m(r,t,f,h))}),i):m(e[0],t,f,h):m(e,t,f,h):e?e.length&&e.length>0?e.length>1?(c.each(e,function(){r=l.get(this),"!"===t?r!==n&&i.push(r):i.push(r)}),i):l.get(e[0]):l.get(e):void 0},e[r].globals=function(){d();var e=c.extend(!0,{},f);return delete e.msie,e},e[r].defaultOptions=function(e){d();var t=f.defaultOptions;if(e===n)return c.extend(!0,{},t);f.defaultOptions=c.extend(!0,{},t,e)}}(a,l,s,c),e.jQuery);return u&&u.fn&&(u.fn.overlayScrollbars=function(t){var n=this;return u.isPlainObject(t)?(u.each(n,function(){e[r](this,t)}),n):e[r](n,t)}),e[r]}); \ No newline at end of file +!function(e,t){"function"==typeof define&&define.amd?define(function(){return t(e,e.document,undefined)}):"object"==typeof exports?module.exports=t(e,e.document,undefined):t(e,e.document,undefined)}("undefined"!=typeof window?window:this,function(e,t,n){"use-strict";var r="OverlayScrollbars",i={o:"object",f:"function",a:"array",s:"string",n:"number",u:"undefined"},o={c:"class",s:"style",i:"id",oH:"offsetHeight",cH:"clientHeight",sH:"scrollHeight",oW:"offsetWidth",cW:"clientWidth",sW:"scrollWidth"},a={wW:function(){return e.innerWidth||t.documentElement[o.cW]||t.body[o.cW]},wH:function(){return e.innerHeight||t.documentElement[o.cH]||t.body[o.cH]},mO:function(){return e.MutationObserver||e.WebKitMutationObserver||e.WebkitMutationObserver||e.MozMutationObserver||n},rO:function(){return e.ResizeObserver||e.WebKitResizeObserver||e.WebkitResizeObserver||e.MozResizeObserver||n},rAF:function(){return e.requestAnimationFrame||e.webkitRequestAnimationFrame||e.mozRequestAnimationFrame||e.oRequestAnimationFrame||e.msRequestAnimationFrame||function(t){return e.setTimeout(t,1e3/60)}},cAF:function(){return e.cancelAnimationFrame||e.webkitCancelAnimationFrame||e.mozCancelAnimationFrame||e.oCancelAnimationFrame||e.msCancelAnimationFrame||function(t){return e.clearTimeout(t)}},now:function(){return Date.now()||(new Date).getTime()},stpP:function(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0},prvD:function(e){e.preventDefault?e.preventDefault():e.returnValue=!1},page:function(e){var r="page",i="client",o="X",a="Y",s=((e=e.originalEvent||e).target||e.srcElement||t).ownerDocument||t,l=s.documentElement,c=s.body;if(e.touches!==n){var u=e.touches[0];return{x:u[r+o],y:u[r+a]}}return!e[r+o]&&e[i+o]&&null!=e[i+o]?{x:e[i+o]+(l&&l.scrollLeft||c&&c.scrollLeft||0)-(l&&l.clientLeft||c&&c.clientLeft||0),y:e[i+a]+(l&&l.scrollTop||c&&c.scrollTop||0)-(l&&l.clientTop||c&&c.clientTop||0)}:{x:e[r+o],y:e[r+a]}},mBtn:function(e){return e.which||e.button===n?e.which:1&e.button?1:2&e.button?3:4&e.button?2:0},bind:function(e,t){if(typeof e!==i.f)throw"Can't bind function!";var n=Array.prototype.slice.call(arguments,2),r=function(){},o=function(){return e.apply(this instanceof r?this:t,n.concat(Array.prototype.slice.call(arguments)))};return e.prototype&&(r.prototype=e.prototype),o.prototype=new r,o}},s=function(r){var o=/[^\x20\t\r\n\f]+/g,a=Object.prototype.toString,s=" ",l="",c=[],u={animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},f={swing:function(e,t,n,r,i){return.5-Math.cos(e*Math.PI)/2},linear:function(e,t,n,r,i){return e},easeInQuad:function(e,t,n,r,i){return r*(t/=i)*t+n},easeOutQuad:function(e,t,n,r,i){return-r*(t/=i)*(t-2)+n},easeInOutQuad:function(e,t,n,r,i){return(t/=i/2)<1?r/2*t*t+n:-r/2*(--t*(t-2)-1)+n},easeInCubic:function(e,t,n,r,i){return r*(t/=i)*t*t+n},easeOutCubic:function(e,t,n,r,i){return r*((t=t/i-1)*t*t+1)+n},easeInOutCubic:function(e,t,n,r,i){return(t/=i/2)<1?r/2*t*t*t+n:r/2*((t-=2)*t*t+2)+n},easeInQuart:function(e,t,n,r,i){return r*(t/=i)*t*t*t+n},easeOutQuart:function(e,t,n,r,i){return-r*((t=t/i-1)*t*t*t-1)+n},easeInOutQuart:function(e,t,n,r,i){return(t/=i/2)<1?r/2*t*t*t*t+n:-r/2*((t-=2)*t*t*t-2)+n},easeInQuint:function(e,t,n,r,i){return r*(t/=i)*t*t*t*t+n},easeOutQuint:function(e,t,n,r,i){return r*((t=t/i-1)*t*t*t*t+1)+n},easeInOutQuint:function(e,t,n,r,i){return(t/=i/2)<1?r/2*t*t*t*t*t+n:r/2*((t-=2)*t*t*t*t+2)+n},easeInSine:function(e,t,n,r,i){return-r*Math.cos(t/i*(Math.PI/2))+r+n},easeOutSine:function(e,t,n,r,i){return r*Math.sin(t/i*(Math.PI/2))+n},easeInOutSine:function(e,t,n,r,i){return-r/2*(Math.cos(Math.PI*t/i)-1)+n},easeInExpo:function(e,t,n,r,i){return 0==t?n:r*Math.pow(2,10*(t/i-1))+n},easeOutExpo:function(e,t,n,r,i){return t==i?n+r:r*(1-Math.pow(2,-10*t/i))+n},easeInOutExpo:function(e,t,n,r,i){return 0==t?n:t==i?n+r:(t/=i/2)<1?r/2*Math.pow(2,10*(t-1))+n:r/2*(2-Math.pow(2,-10*--t))+n},easeInCirc:function(e,t,n,r,i){return-r*(Math.sqrt(1-(t/=i)*t)-1)+n},easeOutCirc:function(e,t,n,r,i){return r*Math.sqrt(1-(t=t/i-1)*t)+n},easeInOutCirc:function(e,t,n,r,i){return(t/=i/2)<1?-r/2*(Math.sqrt(1-t*t)-1)+n:r/2*(Math.sqrt(1-(t-=2)*t)+1)+n},easeInElastic:function(e,t,n,r,i){var o=1.70158,a=0,s=r;if(0==t)return n;if(1==(t/=i))return n+r;if(a||(a=.3*i),s0&&t-1 in e)}function m(e){return(e.match(o)||[]).join(s)}function g(e,n){for(var r=(e.parentNode||t).querySelectorAll(n)||[],i=r.length;i--;)if(r[i]==e)return!0;return!1}function w(e,t,n){h.type(n)===i.s?e.insertAdjacentHTML(t,n):n.nodeType?e.insertAdjacentElement(t,n):e.insertAdjacentElement(t,n[0])}function x(e,t,r){try{e.style[t]!==n&&(e.style[t]=b(t,r))}catch(i){}}function b(e,t){return u[e.toLowerCase()]||h.type(t)!==i.n||(t=t+="px"),t}function C(e,t){var n,r;!1!==t&&e.q.splice(0,1),e.q.length>0?(r=e.q[0],M(e.el,r.props,r.duration,r.easing,r.complete,!0)):(n=h.inArray(e,c))>-1&&c.splice(n,1)}function O(e,t,n){"scrollLeft"===t?e[t]=n:"scrollTop"===t?e[t]=n:x(e,t,n)}function M(e,t,n,i,o,a){var s,l,u,v,p,y,m={},g={},w=0,x=h.isPlainObject(n);for(x?(i=n.easing,n.start,u=n.progress,v=n.step,p=n.specialEasing,o=n.complete,y=n.duration):y=n,p=p||{},y=y||400,i=i||"swing",a=a||!1;w0)H=r.now(),k=function(){for(s in b=r.now(),I=b-H,M=L.stop||I>=y,S=1-(Math.max(0,H+y-b)/y||0),g)T=m[s],z=g[s],E=(z-T)*f[p[s]||i](S,S*y,0,1,y)+T,O(e,s,E),d(v)&&v(E,{elem:e,prop:s,start:T,now:E,end:z,pos:S,options:{easing:i,speacialEasing:p,duration:y,complete:o,step:v},startTime:H});d(u)&&u({},S,Math.max(0,y-I)),M?(C(l),d(o)&&o()):L.frame=r.rAF()(k)},L.frame=r.rAF()(k);else{for(s in g)O(e,s,g[s]);C(l)}}}function S(e,t,n){for(var i,o,a,s=0;s0){if((o=i.q[0]).stop=!0,r.cAF()(o.frame),i.q.splice(0,1),n)for(a in o.props)O(e,a,o.props[a]);t?i.q=[]:C(i,!1)}break}}function A(e){var t=this;h.type(e)===i.s||e.length||(e=[e]);for(var n=0;n-1)return!0;return!1},addClass:function(e){var t,r,i,a,l,c,u=null,f=0,h=0;if(e)for(t=e.match(o)||[];r=this[f++];)if(u===n&&(u=r.classList!==n),u)for(;l=t[h++];)r.classList.add(l);else if(a=r.className,i=1===r.nodeType&&s+m(a)+s){for(;l=t[h++];)i.indexOf(s+l+s)<0&&(i+=l+s);a!==(c=m(i))&&(r.className=c)}return this},removeClass:function(e){var t,r,i,a,l,c,u=null,f=0,h=0;if(e)for(t=e.match(o)||[];r=this[f++];)if(u===n&&(u=r.classList!==n),u)for(;l=t[h++];)r.classList.remove(l);else if(a=r.className,i=1===r.nodeType&&s+m(a)+s){for(;l=t[h++];)for(;i.indexOf(s+l+s)>-1;)i=i.replace(s+l+s,s);a!==(c=m(i))&&(r.className=c)}return this},remove:function(){return this.each(function(){var e=this;null!=e.parentNode&&e.parentNode.removeChild(e)})},offset:function(){var n=this[0].getBoundingClientRect(),r=e.pageXOffset||t.documentElement.scrollLeft,i=e.pageYOffset||t.documentElement.scrollTop;return{top:n.top+i,left:n.left+r}},css:function(t,r){var o,a;return h.type(t)===i.s?r===n?(o=this[0],e.getComputedStyle?e.getComputedStyle(o,null).getPropertyValue(t):o.currentStyle[t]):this.each(function(){x(this,t,r)}):this.each(function(){for(a in t)x(this,a,t[a])})},unwrap:function(){var e,t,n,r=[];for(this.each(function(){n=this.parentNode,-1===h.inArray(n,r)&&r.push(n)}),e=0;e0;)i=i.childNodes[0];for(t=0;n.length-t;i.firstChild===n[0]&&t++)i.appendChild(n[t]);var s=a?a.nextSibling:o.firstChild;return o.insertBefore(r,s),this},wrapInner:function(e){return this.each(function(){var t=new A(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){return this.each(function(){new h(this).wrapAll(e)})},contents:function(){var e,t,n=[];return this.each(function(){for(e=this.childNodes,t=0;t-1&&(delete n[r],t.splice(i,1))}function a(e){return s(e)!==n}function s(e){for(var n=0;n
'),f=function(){a.append(u);var e,t="overflow",n="hidden",r=u[0],s=c(u.children("div").first());return 0===r[o.oH]&&u.hide().show(),e={x:r[o.oH]-r[o.cH],y:r[o.oW]-r[o.cW]},i.restrictedMeasuring=function(){u.css(t,n);var e={w:r[o.sW],h:r[o.sH]};u.css(t,"visible");var i={w:r[o.sW],h:r[o.sH]};return e.w-i.w!=0||e.h-i.h!=0}(),i.nativeScrollbarStyling=(u.addClass("os-viewport-native-scrollbars-invisible"),u.css(t,n).hide().css(t,"scroll").show(),r[o.oH]-r[o.cH]==0&&r[o.oW]-r[o.cW]==0),i.rtlScrollBehavior=function(){u.css({"overflow-y":n,direction:"rtl"}).scrollLeft(0);var e=u.offset(),t=s.offset();u.scrollLeft(999);var r=s.offset();return{i:e.left===t.left,n:t.left-r.left==0}}(),u.removeAttr(o.s).remove(),e}(),h={x:0===f.x,y:0===f.y};function v(e){var r=!1,i="Webkit Moz ms O".split(" "),o=t.createElement("div"),a=null;if(e=e.toLowerCase(),o.style[e]!==n&&(r=!0),!1===r){a=e.charAt(0).toUpperCase()+e.substr(1);for(var s=0;s0)return parseInt(t.substring(n+5,t.indexOf(".",n)),10);if(t.indexOf("Trident/")>0){var r=t.indexOf("rv:");return parseInt(t.substring(r+3,t.indexOf(".",r)),10)}var i=t.indexOf("Edge/");return i>0&&parseInt(t.substring(i+5,t.indexOf(".",i)),10)}(),i.cssCalc=function(){for(var e=t.createElement("div"),n=["calc","-webkit-calc","-moz-calc","-o-calc"],r=0;r0){var e=s.wW(),h=s.wH(),d=e-t,p=h-n;if(0===d&&0===p)return;var y=Math.round(e/(t/100)),m=Math.round(h/(n/100)),g=Math.abs(d),w=Math.abs(p),x=Math.abs(y),b=Math.abs(m),C=v(),O=g>2&&w>2,M=!f(x,b);if(!!(O&&M&&(C!==r&&r>0))){a.append(u);var S=u[0];i.nativeScrollbarSize={x:S[o.oH]-S[o.cH],y:S[o.oW]-S[o.cW]},u.remove(),c.each(l.all(),function(){l.has(this)&&l.get(this).update("zoom")})}t=e,n=h,r=C}})}function f(e,t){var n=Math.abs(e),r=Math.abs(t);return!(n===r||n+1===r||n-1===r)}function v(){var t=e.screen.deviceXDPI||0,n=e.screen.logicalXDPI||1;return e.devicePixelRatio||t/n}}()}function y(e){var t,r=this,i="autoUpdate",o=i+"Interval",a=[],l=[],u=!1,f=33,h=f,v=s.now(),d=function(){if(a.length>0&&u){t=s.rAF()(function(){d()});var e=s.now(),r=e-v;if(r>h){v=e-r%h;for(var c=f,p=0;pw&&(y.update("auto"),l[p]=new Date(x+=w)),c=Math.max(1,Math.min(c,w))}}h=c}}else h=f};r.add=function(t){-1===c.inArray(t,a)&&(a.push(t),l.push(s.now()),a.length>0&&!u&&(u=!0,e.autoUpdateLoop=u,d()))},r.remove=function(r){var i=c.inArray(r,a);i>-1&&(l.splice(i,1),a.splice(i,1),0===a.length&&u&&(u=!1,e.autoUpdateLoop=u,t!==n&&(s.cAF()(t),t=-1)))}}function m(t,f,h,v){if(ri(t)){if(l.has(t)){var d=l.get(t);return d.options(f),d}var p,y,m,g,w,x,b,C,O,M,S,A,T,z,E,H,k,I,W,L,P,F,N,D,R,B,j,q,_,U,Q,V,X,Y,J,K,$,G,Z,ee,te,ne,re,ie,oe,ae,se,le,ce,ue,fe,he,ve,de,pe,ye,me,ge,we,xe,be,Ce,Oe,Me,Se,Ae,Te,ze,Ee,He,ke,Ie,We,Le,Pe,Fe,Ne,De,Re,Be,je,qe,_e,Ue,Qe,Ve,Xe,Ye,Je,Ke,$e,Ge,Ze,et,tt,nt,rt,it,ot,at,st,lt,ct,ut,ft,ht,vt,dt,pt,yt,mt,gt,wt,xt,bt=new e[r],Ct=!1,Ot=!1,Mt=!1,St=!1,At=!1,Tt={w:0,h:0},zt={},Et={},Ht={},kt=175,It="-hidden",Wt="margin-",Lt="padding-",Pt="border-",Ft="top",Nt="right",Dt="bottom",Rt="left",Bt="min-",jt="max-",qt="width",_t="height",Ut="float",Qt="",Vt="auto",Xt="scroll",Yt="100%",Jt="x",Kt="y",$t='
',Zt=".",en=" ",tn="scrollbar",nn="-horizontal",rn="-vertical",on=Xt+"Left",an=Xt+"Top",sn="mousedown touchstart",ln="mouseup touchend",cn="mousemove touchmove",un="mouseenter",fn="mouseleave",hn="keydown",vn="keyup",dn="selectstart",pn="transitionend webkitTransitionEnd oTransitionEnd",yn="__overlayScrollbarsRO__",mn="os-",gn=mn+"html",wn=mn+"host",xn=wn+"-textarea",bn=wn+"-"+tn+nn+It,Cn=wn+"-"+tn+rn+It,On=wn+"-transition",Mn=wn+"-rtl",Sn=wn+"-resize-disabled",An=wn+"-scrolling",Tn=wn+"-overflow",zn=Tn+"-x",En=Tn+"-y",Hn=mn+"textarea",kn=Hn+"-cover",In=mn+"padding",Wn=mn+"viewport",Ln=Wn+"-native-scrollbars-invisible",Pn=Wn+"-native-scrollbars-overlaid",Fn=mn+"content",Nn=mn+"content-arrange",Dn=mn+"content-glue",Rn=mn+"size-auto-observer",Bn=mn+"resize-observer",jn=mn+"resize-observer-item",qn=jn+"-final",_n=mn+"text-inherit",Un=mn+tn,Qn=Un+"-track",Vn=Qn+"-off",Xn=Un+"-handle",Yn=Xn+"-off",Jn=Un+"-unusable",Kn=Un+"-"+Vt+It,$n=Un+"-corner",Gn=$n+"-resize",Zn=Gn+"-both",er=Gn+nn,tr=Gn+rn,nr=Un+nn,rr=Un+rn,ir=mn+"dragging",or=mn+"theme-none",ar={},sr=33,lr=[],cr=11,ur=[112,113,114,115,116,117,118,119,120,121,123,33,34,37,38,39,40,16,17,18,19,20,144],fr=[],hr={x:0,y:0},vr={w:0,h:0};if(bt.sleep=function(){N=!0},bt.update=function(e){var t,n,r="zoom"===e,i="img",o="load";e===Vt?(t=hi(),n=fi(),(t||n)&&yi(!1,n)):r?yi(!0,!0):(e=N||e,N=!1,yi(!1,!1,e)),Mt||r||ne.find(i).each(function(e,t){-1===c.inArray(t,lr)&&(t=c(t)).off(o,qr).on(o,qr)})},bt.options=function(e,t){if(c.isEmptyObject(e)||!c.isPlainObject(e)){if(c.type(e)===i.s){if(arguments.length>=2){var n={};return u.set(n,e,t,!0),ui(n),void yi()}return u.get(B,e)}return B}ui(e);var r=N||!1;N=!1,yi(),N=r},bt.destroy=function(){Ot=!0,v.remove(bt),Tr(),xr($),At&&xr(K),$.remove(),G!==n&&G.remove(),te!==n&&te.remove(),At&&K.remove(),A?(yr(J,cn,ei),yr(J,un,Gr),yr(J,fn,Zr)):J.off(cn,ei).off(un,Gr).off(fn,Zr),oe.remove(),le.remove(),ie&&ie.remove(),mt||Hr(),ne.contents().unwrap().unwrap().unwrap(),St&&V.removeClass(gn),Mt?(Y.off(Xt,Br).off("drop",Nr).off("focus",Dr).off("focusout",Rr),m>9||!y?Y.off("input",Lr):Y.off(hn,Pr).off(vn,Fr),re.remove(),Y.removeClass(Hn).removeClass(_n).unwrap().removeAttr(o.s),J.remove()):(Y.removeClass(wn),J.removeClass(wn).removeClass(Sn).removeClass(Mn).removeClass(bn).removeClass(Cn).removeClass(On).removeClass(An).removeClass(Tn).removeClass(zn).removeClass(En).removeClass(or).removeClass(Ke));for(var e=0;e0)t.x=e[0],t.y=e[1];else if(c.type(e)===i.s||c.type(e)===i.n)t.x=e,t.y=e;else if(c.type(e)===i.o){for(var n in e=c.extend({},e),m=0,e)e.hasOwnProperty(n)&&(m>2&&delete e[n],m++);var r=function(t){var n=t?g:w;for(m=0;m2){var y=r.substr(0,2);for(m=0;m/g,(d?"-":Qt)+Yt)).replace(/px/g,Qt)).replace(/%/g,h+f*(v&&p.n?-1:1)/100)).replace(/vw/g,h+Ht.w)).replace(/vh/g,h+Ht.h),a=vi(e.parseFloat(e.eval(r)).toFixed())}else c.type(r)===i.n&&(a=r);if(!isNaN(a)&&a!==n&&c.type(a)===i.n){var g=Je&&v,w=u*(g&&p.n?-1:1),b=g&&p.i,C=g&&p.n;switch(w=b?f-w:w,o){case"+=":s=w+a;break;case"-=":s=w-a;break;case"*=":s=w*a;break;case"/=":s=w/a;break;default:s=a}b&&(s=f-s),C&&(s*=-1),v&&p.n?(s=Math.max(f,s),s=Math.min(0,s)):(s=Math.min(f,s),s=Math.max(0,s)),s===u&&(s=n)}return s};if(W||L){var R=W?I:c(I);if(0===R.length)return;if(k){var B,j,q,_=t.axis,U=t.block,Q=c.type(U),V=t.margin,X=c.type(V);if(Q===i.s)U=[U,U];else if(Q===i.a)if((j=U.length)>2||j<1)U=n;else{for(B=!0,1===j&&(U[1]=M),m=0;m=K[t.lt]&&J[t.lt]+fe[t._wh]<=K[t.lt]+Ht[t._wh],re[t.xy]=fe[t._wh]i:r0||C){var pe={};if(ve&&(pe[on]=b.x),de&&(pe[an]=b.y),C)ee.animate(pe,r);else{var ye={duration:r,complete:s};if(c.type(a)===i.a){var me={};me[on]=a[0],me[an]=a[1],ye.specialEasing=me}else ye.easing=a;ee.animate(pe,ye)}}else ve&&ee[on](b.x),de&&ee[an](b.y)},bt.scrollStop=function(e,t,n){ee.stop(e,t,n)},bt.getElements=function(){return{target:Y[0],host:J[0],padding:Z[0],viewport:ee[0],content:ne[0],scrollbarHorizontal:{scrollbar:oe[0],track:ae[0],handle:se[0]},scrollbarVertical:{scrollbar:le[0],track:ce[0],handle:ue[0]},scrollbarCorner:ie}},bt.getState=function(e){var t=function(e){if(!c.isPlainObject(e))return e;var t=c.extend(!0,{},e);u.del(t,"c");var n=function(e,n){t.hasOwnProperty(e)&&(t[n]=t[e],delete t[e])};return n("w",qt),n("h",_t),t},n={sleeping:t(N)||!1,autoUpdate:t(!rt),widthAuto:t(ye),heightAuto:t(me),padding:t(xe),overflowAmount:t(Ee),hideOverflow:t(pe),hasOverflow:t(de),contentScrollSize:t(he),viewportSize:t(Ht),hostSize:t(fe)};return c.type(e)===i.s?u.get(n,e):n},mi(t,f))return l.add(t,bt),bt;bt=n}function dr(){if(!N){var e=$[0],t={w:e[o.sW],h:e[o.sH]};if(Ct){var n=Cr(t,_e);_e=t,n&&yi(!0,!1)}else _e=t}}function pr(e,t,n){for(var r=t.split(en),i=0;i9||!y){var f='">',v="",d="childNodes",g=$t+Bn+f;g+=$t+jn+'" dir="ltr'+f,g+=$t+jn+f,g+=$t+qn+Gt,g+=v,g+=$t+jn+f,g+=$t+qn+'" style="width: 200%; height: 200%'+Gt,g+=v,g+=v,g+=v,e.prepend(g);var w,x,b,C,O=(e=e[0])[d][0][d][0],M=c(O[d][1]),S=c(O[d][0]),A=c(S[0][d][0]),z=O[o.oW],E=O[o.oH],H=2,k=h.nativeScrollbarSize,I=function(){S[on](n)[an](n),M[on](n)[an](n)},W=function(){x=0,w&&(z=b,E=C,r())},L=function(e){return b=O[o.oW],C=O[o.oH],w=b!=z||C!=E,e&&w&&!x?(s.cAF()(x),x=s.rAF()(W)):e||W(),I(),e&&(s.prvD(e),s.stpP(e)),!1},P={};P[Ft]=-(k.y+1)*H,P[Nt]=k.x*-H,P[Dt]=k.y*-H,P[Rt]=-(k.x+1)*H,c(O).css(P),S.on(Xt,L),M.on(Xt,L),c(e).on(u,function(){L(!1)});var N={};N[qt]=n,N[_t]=n,A.css(N),I()}else{var D=Q[0],R=e;e=e[0];var B=D.attachEvent,j=typeof navigator===i.u||(navigator.userAgent.match(/Trident/)||navigator.userAgent.match(/Edge/));if(B)R.prepend($t+Bn+Gt),R.find(Zt+Bn).first()[0].attachEvent("onresize",r);else{var q=D.createElement(i.o);q.setAttribute("tabindex","-1"),q.setAttribute(o.c,Bn),q.onload=function(){var e=this.contentDocument.defaultView;e.addEventListener("resize",r),e.document.documentElement.style.display="none"},q.type="text/html",j&&R.prepend(q),q.data="about:blank",j||R.prepend(q),R.on(u,r)}}}if((e=c(e))[0]===$[0]){var _=function(){var t=J.css("direction");if(t!==Me){var r={},i=0;return"ltr"===t?(r[Rt]=0,r[Nt]=Vt,i=n):(r[Rt]=Vt,r[Nt]=0,i=p.n?-n:p.i?0:n),$.children().first().css(r),e.scrollLeft(i),e.scrollTop(n),Me=t,!0}return!1};_(),e.on(Xt,function(e){return _()&&yi(),s.prvD(e),s.stpP(e),!1})}}function xr(e){if(T){var t=e.contents()[0];t[yn].disconnect(),delete t[yn]}else e.children(Zt+Bn).first().remove()}function br(e,t,r){return!0===r?r:t===n||e!==t}function Cr(e,t,r,i,o){if(!0===o)return o;if(i===n&&o===n){if(!0===r)return r;r=n}return r=r===n?"w":r,i=i===n?"h":i,t===n||(e[r]!==t[r]||e[i]!==t[i])}function Or(e,t){return t===n||(e.t!==t.t||e.r!==t.r||e.b!==t.b||e.l!==t.l)}function Mr(e,t){Ct&&e.call(bt,t)}function Sr(e,t,r){r===n&&(r=[Qt,Qt,Qt,Qt]),e[t+Ft]=r[0],e[t+Nt]=r[1],e[t+Dt]=r[2],e[t+Rt]=r[3]}function Ar(){it&&!rt&&(tt.observe(J[0],{attributes:!0,attributeOldValue:!0,attributeFilter:[o.i,o.c,o.s]}),nt.observe(Mt?Y[0]:ne[0],{attributes:!0,attributeOldValue:!0,subtree:!Mt,childList:!Mt,characterData:!Mt,attributeFilter:Mt?["wrap","cols","rows"]:[o.i,o.c,o.s]}),rt=!0)}function Tr(){it&&rt&&(tt.disconnect(),nt.disconnect(),rt=!1)}function zr(e){if(!N){var t=(e.originalEvent||e).touches!==n;(1===s.mBtn(e)||t)&&(rt&&(yt=!0,Tr()),hr=s.page(e),vr.w=J[0][o.oW]-(E?0:H),vr.h=J[0][o.oH]-(E?0:k),Q.on(dn,jr).on(cn,Er).on(ln,Hr),X.addClass(ir),ie.setCapture&&ie.setCapture(),s.prvD(e),s.stpP(e))}}function Er(e){e.originalEvent;var t=s.page(e),n={};(wt||gt)&&(n[qt]=vr.w+t.x-hr.x),(xt||gt)&&(n[_t]=vr.h+t.y-hr.y),J.css(n),s.stpP(e)}function Hr(e){var t=e!==n;Q.off(dn,jr).off(cn,Er).off(ln,Hr),X.removeClass(ir),ie.releaseCapture&&ie.releaseCapture(),t&&(yt&&Ar(),bt.update(Vt)),yt=!1}function kr(){if(!N){var e=!We,t=Ht.w-(E||Se||!ye?0:k+W),n=Ht.h-(E||Se||!me?0:k+W),r={},i=ye||e,a=Y[0];r[Bt+qt]=Qt,r[Bt+_t]=Qt,r[qt]=Vt,Y.css(r);var s=a[o.oW],l=i?Math.max(s,a[o.sW]-1):1;l+=ye?L+(E?0:e?0:H+I):0,r[qt]=ye?l:Yt,r[_t]=Vt,Y.css(r);var c=a[o.oH],u=Math.max(c,a[o.sH]-1);return r[qt]=l,r[_t]=u,re.css(r),r[Bt+qt]=t+(!E&&ye?H+I:0),r[Bt+_t]=n+(!E&&me?k+W:0),Y.css(r),{ow:s,oh:c,dw:l,dh:u}}}function Ir(){var e=Y.prop("selectionStart");if(e!==n){for(var t=Y.val(),r=t.length,i=t.split("\n"),o=i.length,a=t.substr(0,e).split("\n"),s=0,l=0,c=a.length,u=a[a.length-1].length,f=0;fl&&(s=f+1,l=h)}return{cursorRow:c,cursorCol:u,rows:o,cols:l,wRow:s,pos:e,max:r}}}function Wr(e){for(var t=0;t-1&&fr.splice(n,1),0===fr.length&&(kr(),bt.update(Vt),clearInterval(ot))}}function Nr(){setTimeout(function(){kr(),bt.update(Vt)},50)}function Dr(){at=!0}function Rr(){at=!1,clearInterval(ot),fr=[],kr(),bt.update(Vt)}function Br(e){return Y[on](p.i&&Je?9999999:0),Y[an](0),s.prvD(e),s.stpP(e),!1}function jr(e){return s.prvD(e),!1}function qr(){yi()}function _r(){return He&&C.x&&C.y}function Ur(e,t,n){var r=e?bn:Cn,i=e?oe:le;t?J.removeClass(r):J.addClass(r),n?i.removeClass(Jn):i.addClass(Jn)}function Qr(e,t){if(clearTimeout(st),e)oe.removeClass(Kn),le.removeClass(Kn);else{var n="active",r=function(){if(!pt){var e=se.hasClass(n)||ue.hasClass(n);!e&&(ft||ht||vt)&&oe.addClass(Kn),!e&&(ft||ht||vt)&&le.addClass(Kn)}};ct>0&&!0!==t?st=setTimeout(r,ct):r()}}function Vr(e){var t={},n=$r(e),r=Math.min(1,(fe[n._wh]-(Se?e?H:k:0))/he[n._wh]);t[n.wh]=Math.floor(100*r*1e5)/1e5+"%",_r()||n.h.css(t),n.i.hl=n.h[0]["offset"+n.WH],n.i.hlr=r}function Xr(e,t){var n=F&&e,r={},i=$r(e),o=ee[0][Xt+i.WH]-ee[0]["client"+i.WH];p.n&&n&&(o*=-1);var a=t/o;a=isNaN(a)?0:Math.min(1,a),i.i.ms=o,i.i.cs=t,i.i.csr=a;var s=i.i.hl,l=i.t[0]["offset"+i.WH],c=(l-s)*a;if(c=isNaN(c)?0:c,n&&(p.n||!p.n&&!p.i)&&(c=l-s-c),c=Math.max(0,c),S){var u;n&&(c=-(l-s-c));var f="translate(",h="transform";u=e?f+c+"px, 0px)":f+"0px, "+c+"px)",r["-webkit-"+h]=u,r["-moz-"+h]=u,r["-ms-"+h]=u,r["-o-"+h]=u,r[h]=u}else r[i.lt]=c;_r()||i.h.css(r),i.i.ho=c,i.i.tl=l}function Yr(e,t){var n=t?"removeClass":"addClass",r=e?ce:ue,i=e?Vn:Yn;(e?ae:se)[n](i),r[n](i)}function Jr(){oe=c($t+Un+en+nr+Gt),ae=c($t+Qn+Gt),se=c($t+Xn+Gt),le=c($t+Un+en+rr+Gt),ce=c($t+Qn+Gt),ue=c($t+Xn+Gt),oe.append(ae),ae.append(se),le.append(ce),ce.append(ue),Z.after(le),Z.after(oe),M&&(oe.on(pn,function(e){e.target===oe[0]&&(Vr(!0),Xr(!0,ee[on]()))}),le.on(pn,function(e){e.target===le[0]&&(Vr(!1),Xr(!1,ee[an]()))})),Kr(!0),Kr(!1),ie=c($t+en+$n+Gt),J.append(ie)}function Kr(e){var t,r,i,o=$r(e),a=o.xy,l=Xt+o.LT,c="active",u=1,f=function(){u=.5},h=function(){u=1},v=function(n){n.originalEvent;var i=o.i.tl,c=o.i.hl,u=o.i.ms*((c/2+s.page(n)[a]-r-c/2)/(i-c));u=isFinite(u)?u:0,F&&e&&(p.n||!p.n&&!p.i)&&(u*=-1),ee[l](t+u),A||s.prvD(n)},d=function(e){e=e||e.originalEvent,X.removeClass(ir),o.h.removeClass(c),o.t.removeClass(c),o.s.removeClass(c),A?(yr(Q,cn,v),yr(Q,ln,d),yr(Q,hn,y),yr(Q,vn,m)):Q.off(cn,v).off(ln,d).off(hn,y).off(vn,m),Q.off(dn,jr),h(),t=n,r=n,i!==n&&(bt.scrollStop(),clearTimeout(i),i=n);var a=J[0].getBoundingClientRect();e.clientX>=a.left&&e.clientX<=a.right&&e.clientY>=a.top&&e.clientY<=a.bottom||Zr(),(ft||ht)&&Qr(!1)},y=function(e){16==e.keyCode&&f()},m=function(e){16==e.keyCode&&h()};o.h.on(sn,function(i){if(!N){var u=(i.originalEvent||i).touches!==n;_r()||!Xe||u&&!dt||(1===s.mBtn(i)||u)&&(t=(t=ee[l]())===n?0:t,(F&&e&&!p.n||!F)&&(t=t<0?0:t),r=s.page(i)[a],X.addClass(ir),o.h.addClass(c),o.s.addClass(c),A?(pr(Q,cn,v),pr(Q,ln,d)):Q.on(cn,v).on(ln,d),Q.on(dn,jr),s.prvD(i))}}),o.t.on(sn,function(t){if(!N){var l=(t.originalEvent||t).touches!==n;if(!_r()&&Ve&&(!l||dt)&&(1===s.mBtn(t)||l)){var h,v=Ht[o._wh],g=o.t.offset()[o.lt],w=!0;t.shiftKey&&f();var x=function(){var t=o.i.ho,a=o.i.hl,s=r-g,l=200*u,c=w?Math.max(333,l):l,f={},d=F&&e&&(!p.i&&!p.n||Je),y=t>s;d&&(y=t=s;d&&(m=h?t+a>=s:t<=s),m?(clearTimeout(i),bt.scrollStop(),i=n):i=setTimeout(x,c),w=!1};r=s.page(t)[a],X.addClass(ir),o.t.addClass(c),o.s.addClass(c),A?(pr(Q,ln,d),pr(Q,hn,y),pr(Q,vn,m)):Q.on(ln,d).on(hn,y).on(vn,m),Q.on(dn,jr),x(),s.prvD(t)}}}).hover(function(){(ft||ht)&&(pt=!0,Qr(!0))},function(){(ft||ht)&&(pt=!1,Qr(!1))}),o.s.on(sn,function(e){s.stpP(e)})}function $r(e){return{wh:e?qt:_t,WH:e?"Width":"Height",lt:e?Rt:Ft,LT:e?"Left":"Top",xy:e?Jt:Kt,XY:e?"X":"Y",_wh:e?"w":"h",_lt:e?"l":"t",t:e?ae:ce,h:e?se:ue,s:e?oe:le,i:e?zt:Et}}function Gr(){vt&&Qr(!0)}function Zr(){vt&&!X.hasClass(ir)&&Qr(!1)}function ei(){ht&&(Qr(!0),clearTimeout(lt),lt=setTimeout(function(){ht&&Qr(!1)},100))}function ti(e){if(!N){var t=j.callbacks,r=t.onScrollStart,i=t.onScroll,o=t.onScrollStop;D!==n?clearTimeout(D):((ft||ht)&&Qr(!0),_r()||J.addClass(An),c.isFunction(r)&&Mr(r,e)),Xr(!0,ee[on]()),Xr(!1,ee[an]()),c.isFunction(i)&&Mr(i,e),D=setTimeout(function(){ni(e),c.isFunction(o)&&Mr(o,e)},kt)}}function ni(){clearTimeout(D),D=n,(ft||ht)&&Qr(!1),_r()||J.removeClass(An)}function ri(e){return typeof HTMLElement===i.o?e instanceof HTMLElement:e&&typeof e===i.o&&null!==e&&1===e.nodeType&&typeof e.nodeName===i.s}function ii(e,t,r,o){var a,s,l,f,h,v={n:t,s:!1,v:n,p:n},d=i.u,p=u.has(e,t),y=u.get(e,t),m=!1,g=!0!==p,w="*",x=!1;for(c.type(r)!==i.a&&(r=[r]),h=r.length,s=0;s1){var C=0;for(f=0;f1)break}1===C&&(x=!0)}else x=!0;b===n&&(m=!0)}if(g&&!1===p&&m&&(g=!1),!g){a=y,d=c.type(a);var M=function(e){var t=c.type(e);return t===d&&(t!==i.s||(!!x||a===e))&&(v.s=!0,v.v=a,v.p=a,!0)};for(s=0;s-1&&o.splice(u,1);for(var f=0;f0&&Ct&&i-q0?J.addClass(ce):J.addClass(or)),ot&&(!0===it?(Tr(),v.add(bt)):null===it&&y?(Tr(),v.add(bt)):(v.remove(bt),Ar())),_e)if(qe)if(G===n&&(G=c($t+Dn+Gt),Z.before(G)),At)K.show();else{K=c($t+Rn+Gt),G.before(K);var Et={w:-1,h:-1};wr(K,function(){var e={w:K[0][o.oW],h:K[0][o.oH]};Cr(e,Et)&&(Ct&&me&&e.h>0||ye&&e.w>0?yi():(Ct&&!me&&0===e.h||!ye&&0===e.w)&&yi()),Et=e}),At=!0,null!==w&&K.css(_t,w+"(100% + 1px)")}else At&&K.hide();r&&($.find("*").trigger(Xt),At&&K.find("*").trigger(Xt));var kt,It=J.css("direction"),Zt=br(It,Oe,r),en=J.css("box-sizing"),tn=br(en,we,r),nn={c:r,t:vi(J.css(Lt+Ft)),r:vi(J.css(Lt+Nt)),b:vi(J.css(Lt+Dt)),l:vi(J.css(Lt+Rt))};try{kt=At?K[0].getBoundingClientRect():null}catch(Di){return}E="border-box"===en;var rn=(F="rtl"===It)?Rt:Nt,ln=F?Nt:Rt,hn=J[0],vn=Z[0],dn=!1,pn=!(!At||"none"===J.css(Ut))&&(0===Math.round(kt.right-kt.left)&&(!!De||hn[o.cW]-H>0));if(qe&&!pn){var yn=hn[o.oW],mn=G.css(qt);G.css(qt,Vt);var gn=hn[o.oW];G.css(qt,mn),(dn=yn!==gn)||(G.css(qt,yn+1),gn=hn[o.oW],G.css(qt,m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Qt,Bn[_t]=Yt),wn&&(xn||Re||tn||Fn.c||nn.c||Ln.c||Zt)?(Fn.cw&&(Bn[jt+qt]=Fn.cw?Fn.iw-(De?H:0)+(E?-I:H)+(C.y?O.y:0):Qt),Bn[qt]=Vt,jn[jt+qt]=Yt):(xn||Re)&&(Bn[jt+qt]=Qt,Bn[qt]=Yt,Bn[Ut]=Qt,jn[jt+qt]=Qt),wn&&(Fn.cw||(Bn[jt+qt]=Qt),jn[qt]=Mt&&pt?Un.dw:Vt,Bn[qt]=Vt,Bn[Ut]=ln),Cn&&(Fn.ch||(Bn[jt+_t]=Qt),jn[_t]=Mt?Ot?Un.dh:Vt:ne[0][o.cH]),qe&&G.css(jn),ne.css(Bn),Bn={},jn={},de=de||{x:!1,y:!1},e||t||Zt||tn||Re||xn||wn||On||Cn||Fn.c||nt||lt||je||Pe||Q||yt||zt||Ne||Re||yt||zt||r){var Qn="overflow",Vn=Qn+"-x",Xn=Qn+"-y",Yn="hidden",Jn="visible",Kn=z&&(C.x||C.y||Ht.w0&&(jn[qt]=Math.max(1,jn[qt]),jn[_t]=Math.max(1,jn[_t])),Mt&&re.css(Er),G.css(jn)}wn&&(Bn[qt]=Yt),!wn||E||rt||(Bn[Ut]="none"),ne.css(Bn),Bn={};var Hr=ir.getBoundingClientRect(),Wr={w:Math.max(ir[o.sW],lr[o.sW]),h:Math.max(ir[o.sH],lr[o.sH])};if(Kn&&ne.css(Qn,Qt),Hr.width!==n){var Lr=Hr.width,Pr=Hr.height,Fr=.001;Wr.w+=vi(Lr+Fr)-Lr,Wr.h+=vi(Pr+Fr)-Pr}Wr.c=t=Cr(Wr,he,r),he=Wr,e=Cr(hr={w:hn[o.cW],h:hn[o.cH]},fe),fe=hr,Ht={w:vn[o.oW],h:vn[o.oH]};var Nr={x:"v-s"===st.x,y:"v-s"===st.y},Dr={x:"v-h"===st.x,y:"v-h"===st.y},Rr={x:"s"===st.x,y:"s"===st.y},Br={x:Math.max(0,Math.round(100*(Wr.w-hr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ii[ln]=Qt;var ai=function(){ii[Dt]=Qt,Tt.h=0},si=function(){ii[rn]=Qt,Tt.w=0};if(qr.x&&_r.xs?(ii[Vn]=Xt,tt?ai():(ii[Dt]=-(C.x?O.x:x.x),Tt.h=C.x?O.y:0)):(ii[Vn]=Qt,ai()),qr.y&&_r.ys?(ii[Xn]=Xt,tt?si():(ii[rn]=-(C.y?O.y:x.y),Tt.w=C.y?O.x:0)):(ii[Xn]=Qt,si()),(Ht.h-1,Ni=Pi.y>-1;(Fi||Ni)&&(Ni&&ee[an](Pi.y),Fi&&(F&&Je&&p.i?ee[on](0):ee[on](Pi.x)))}Le=Ai}else Mt||(F&&p.i&&C.y&&qr.x&&Je&&(u.l+=Tt.w),ee[on](u.l),ee[an](u.t));Zt&&c.isFunction(D)&&Mr(D,{isRTL:F,dir:It}),e&&c.isFunction(B)&&Mr(B,{width:fe.w,height:fe.h}),t&&c.isFunction(R)&&Mr(R,{width:he.w,height:he.h}),(qr.c||_r.c)&&c.isFunction(S)&&Mr(S,{x:qr.x,y:qr.y,xScrollable:_r.xs,yScrollable:_r.ys,clipped:_r.x||_r.y}),Br.c&&c.isFunction(T)&&Mr(T,{x:Br.x,y:Br.y})}St&&(qr.c||et.c)&&(et.f||oi(),C.y&&qr.x&&ne.css(Bt+qt,et.w+O.y),C.x&&qr.y&&ne.css(Bt+_t,et.h+O.x),et.c=!1),gr($),gr(K),c.isFunction(M)&&Mr(M,{forced:r})}}function mi(e,t){R=h.defaultOptions,g=h.nativeScrollbarStyling,x=c.extend(!0,{},h.nativeScrollbarSize),C=c.extend(!0,{},h.nativeScrollbarIsOverlaid),O=c.extend(!0,{},h.overlayScrollbarDummySize),p=c.extend(!0,{},h.rtlScrollBehavior),ui(c.extend(!0,{},R,t));var n,r=j.callbacks;if(C.x&&C.x&&!j.nativeScrollbarsOverlaid.initialize){var i=r.onInitializationWithdrawn;return c.isFunction(i)&&Mr(i),!1}if(w=h.cssCalc,m=h.msie,y=h.autoUpdateRecommended,M=h.supportTransition,S=h.supportTransform,A=h.supportPassiveEvents,T=h.supportResizeObserver,it=h.supportMutationObserver,z=h.restrictedMeasuring,Q=c(e.ownerDocument),U=c(Q[0].defaultView||Q[0].parentWindow),V=Q.find("html").first(),X=V.find("body").first(),Y=c(e),Mt=Y.is("textarea"),(St=Y.is("body"))&&((n={}).l=Math.max(Y[on](),V[on](),U[on]()),n.t=Math.max(Y[an](),V[an](),U[an]())),Mt){Y.wrap($t+xn+Gt),Y.addClass(Hn).addClass(_n),J=Y.parent();var a={};j.sizeAutoCapable||(a[qt]=Y.css(qt),a[_t]=Y.css(_t)),J.css(a).wrapInner($t+Fn+en+_n+Gt).wrapInner($t+Wn+en+_n+Gt).wrapInner($t+In+en+_n+Gt),ne=J.find(Zt+Fn).first(),ee=J.find(Zt+Wn).first(),Z=J.find(Zt+In).first(),re=c($t+kn+Gt),ne.prepend(re),Y.on(Xt,Br).on("drop",Nr).on("focus",Dr).on("focusout",Rr),m>9||!y?Y.on("input",Lr):Y.on(hn,Pr).on(vn,Fr)}else Y.addClass(wn),(J=Y).wrapInner($t+Fn+Gt).wrapInner($t+Wn+Gt).wrapInner($t+In+Gt),ne=J.find(Zt+Fn).first(),ee=J.find(Zt+Wn).first(),Z=J.find(Zt+In).first(),ne.on(pn,function(e){!0!==ke&&di((e=e.originalEvent||e).propertyName)&&yi(Vt)});if(Jr(),A?pr(ee,Xt,ti):ee.on(Xt,ti),g&&(C.x&&C.y?ee.addClass(Pn):ee.addClass(Ln)),it){var l,u=s.mO(),f=s.now();tt=new u(function(e){if(Ct&&!N){var t=!1;c.each(e,function(){var e=this,n=this.target,r=e.attributeName;if(t=r===o.c?li(e.oldValue,n.className):r!==o.s||e.oldValue!==n.style.cssText)return!1}),t&&bt.update(Vt)}}),nt=new u(function(e){if(Ct&&!N){for(var t=!1,n=0;ncr||!i?o():l=setTimeout(o,cr)}}})}St&&(V.addClass(gn),ee[on](n.l),ee[an](n.t)),$=c($t+"os-resize-observer-host"+Gt),J.prepend($),wr($,dr),dr(),bt.update(Vt),setTimeout(function(){M&&!Ot&&J.addClass(On)},333),Ct=!0;var v=r.onInitialized;return c.isFunction(v)&&Mr(v),Ct}}e[r]=function(e,t){if(0===arguments.length)return this;d();var r,i=[];return c.isPlainObject(t)?e&&e.length?e.length>1?(c.each(e,function(){(r=this)!==n&&i.push(m(r,t,f,h))}),i):m(e[0],t,f,h):m(e,t,f,h):e?e.length&&e.length>0?e.length>1?(c.each(e,function(){r=l.get(this),"!"===t?r!==n&&i.push(r):i.push(r)}),i):l.get(e[0]):l.get(e):void 0},e[r].globals=function(){d();var e=c.extend(!0,{},f);return delete e.msie,e},e[r].defaultOptions=function(e){d();var t=f.defaultOptions;if(e===n)return c.extend(!0,{},t);f.defaultOptions=c.extend(!0,{},t,e)}}(a,l,s,c),e.jQuery);return u&&u.fn&&(u.fn.overlayScrollbars=function(t){var n=this;return u.isPlainObject(t)?(u.each(n,function(){e[r](this,t)}),n):e[r](n,t)}),e[r]}); \ No newline at end of file diff --git a/js/jquery.overlayScrollbars.js b/js/jquery.overlayScrollbars.js index 3dbcc95..5b26a2c 100644 --- a/js/jquery.overlayScrollbars.js +++ b/js/jquery.overlayScrollbars.js @@ -2,13 +2,13 @@ * OverlayScrollbars * https://github.com/KingSora/OverlayScrollbars * - * Version: 1.4.0 + * Version: 1.4.1 * * Copyright KingSora. * https://github.com/KingSora * * Released under the MIT license. - * Date: 02.03.2018 + * Date: 22.03.2018 */ (function (global, factory) { @@ -104,7 +104,7 @@ /** * Stops the propagation of the given event. - * @param e The event of which the propagation shall be stoped. + * @param e The event of which the propagation shall be stopped. */ stpP: function(e) { if(e.stopPropagation) @@ -170,7 +170,7 @@ /** * Gets the clicked mouse button of the given mouse event. - * @param e The mouse event of which the clicked button shal be got. + * @param e The mouse event of which the clicked button shall be got. * @returns {number} The number of the clicked mouse button. (1 : leftButton | 2 : middleButton | 3 : rightButton) */ mBtn: function(e) { @@ -938,6 +938,7 @@ var _swallowedUpdateParams = { }; var _swallowedUpdateTimeout; var _swallowUpdateLag = 33; + var _imgs = [ ]; //DOM elements: var _windowElement; @@ -1083,10 +1084,9 @@ * @param listener The listener method which shall be called. */ function addPassiveEventListener(element, eventNames, listener) { - element = element[0]; var events = eventNames.split(_strSpace); for (var i = 0; i < events.length; i++) - element.addEventListener(events[i], listener, {passive: true}); + element[0].addEventListener(events[i], listener, {passive: true}); } /** @@ -1096,10 +1096,9 @@ * @param listener The listener method which shall be removed. */ function removePassiveEventListener(element, eventNames, listener) { - element = element[0]; var events = eventNames.split(_strSpace); for (var i = 0; i < events.length; i++) - element.removeEventListener(events[i], listener, {passive: true}); + element[0].removeEventListener(events[i], listener); } /** @@ -1489,9 +1488,9 @@ _resizeDragStartSize.w = _hostElement[0][WORDING.oW] - (!_isBorderBox ? _paddingX : 0); _resizeDragStartSize.h = _hostElement[0][WORDING.oH] - (!_isBorderBox ? _paddingY : 0); - _documentElement.on(_strSelectStartEvent, onSelectStart); - _documentElement.on(_strMouseTouchMoveEvent, scrollbarCornerOnResize); - _documentElement.on(_strMouseTouchUpEvent, scrollbarCornerOnResized); + _documentElement.on(_strSelectStartEvent, onSelectStart) + .on(_strMouseTouchMoveEvent, scrollbarCornerOnResize) + .on(_strMouseTouchUpEvent, scrollbarCornerOnResized); _bodyElement.addClass(_classNameDragging); if (_scrollbarCornerElement.setCapture) @@ -1525,9 +1524,9 @@ function scrollbarCornerOnResized(event) { var eventIsTrusted = event !== undefined; - _documentElement.off(_strSelectStartEvent, onSelectStart); - _documentElement.off(_strMouseTouchMoveEvent, scrollbarCornerOnResize); - _documentElement.off(_strMouseTouchUpEvent, scrollbarCornerOnResized); + _documentElement.off(_strSelectStartEvent, onSelectStart) + .off(_strMouseTouchMoveEvent, scrollbarCornerOnResize) + .off(_strMouseTouchUpEvent, scrollbarCornerOnResized); _bodyElement.removeClass(_classNameDragging); if (_scrollbarCornerElement.releaseCapture) @@ -1742,6 +1741,13 @@ return false; } + /** + * A callback which will be called after a img element has downloaded its src asynchronous. + */ + function onImgLoad() { + update(); + } + /** * Determines whether native overlay scrollbars are active. * @returns {boolean} True if native overlay scrollbars are active, false otherwise. @@ -1988,15 +1994,15 @@ removePassiveEventListener(_documentElement, _strMouseTouchUpEvent, documentMouseTouchUp); removePassiveEventListener(_documentElement, _strKeyDownEvent, documentKeyDown); removePassiveEventListener(_documentElement, _strKeyUpEvent, documentKeyUp); - removePassiveEventListener(_documentElement, _strSelectStartEvent, onSelectStart); } else { - _documentElement.off(_strMouseTouchMoveEvent, handleDragMove); - _documentElement.off(_strMouseTouchUpEvent, documentMouseTouchUp); - _documentElement.off(_strKeyDownEvent, documentKeyDown); - _documentElement.off(_strKeyUpEvent, documentKeyUp); - _documentElement.off(_strSelectStartEvent, onSelectStart); + _documentElement.off(_strMouseTouchMoveEvent, handleDragMove) + .off(_strMouseTouchUpEvent, documentMouseTouchUp) + .off(_strKeyDownEvent, documentKeyDown) + .off(_strKeyUpEvent, documentKeyUp); } + _documentElement.off(_strSelectStartEvent, onSelectStart); + decreaseTrackScrollAmount(); mouseDownScroll = undefined; mouseDownOffset = undefined; @@ -2044,15 +2050,14 @@ scrollbarVars.s.addClass(strActive); if (_supportPassiveEvents) { - addPassiveEventListener(_documentElement, _strSelectStartEvent, onSelectStart); addPassiveEventListener(_documentElement, _strMouseTouchMoveEvent, handleDragMove); addPassiveEventListener(_documentElement, _strMouseTouchUpEvent, documentMouseTouchUp); } else { - _documentElement.on(_strSelectStartEvent, onSelectStart); - _documentElement.on(_strMouseTouchMoveEvent, handleDragMove); - _documentElement.on(_strMouseTouchUpEvent, documentMouseTouchUp); + _documentElement.on(_strMouseTouchMoveEvent, handleDragMove) + .on(_strMouseTouchUpEvent, documentMouseTouchUp); } + _documentElement.on(_strSelectStartEvent, onSelectStart); compatibility.prvD(event); } }); @@ -2118,17 +2123,16 @@ scrollbarVars.s.addClass(strActive); if (_supportPassiveEvents) { - addPassiveEventListener(_documentElement, _strSelectStartEvent, onSelectStart); addPassiveEventListener(_documentElement, _strMouseTouchUpEvent, documentMouseTouchUp); addPassiveEventListener(_documentElement, _strKeyDownEvent, documentKeyDown); addPassiveEventListener(_documentElement, _strKeyUpEvent, documentKeyUp); } else { - _documentElement.on(_strSelectStartEvent, onSelectStart); - _documentElement.on(_strMouseTouchUpEvent, documentMouseTouchUp); - _documentElement.on(_strKeyDownEvent, documentKeyDown); - _documentElement.on(_strKeyUpEvent, documentKeyUp); + _documentElement.on(_strMouseTouchUpEvent, documentMouseTouchUp) + .on(_strKeyDownEvent, documentKeyDown) + .on(_strKeyUpEvent, documentKeyUp); } + _documentElement.on(_strSelectStartEvent, onSelectStart); scrollAction(); compatibility.prvD(event); @@ -2188,7 +2192,7 @@ } /** - * The mouse leave event of the host element. This event is only needed for the autoHide feature. + * The mouse move event of the host element. This event is only needed for the autoHide "move" feature. */ function hostOnMouseMove() { if (_scrollbarsAutoHideMove) { @@ -2729,7 +2733,7 @@ * @param value The value which shall be parsed. */ function parseIntToZeroOrNumber(value) { - var num = parseInt(value); + var num = window.parseInt(value); return isNaN(num) ? 0 : num; } @@ -3175,8 +3179,8 @@ margin.c = checkCacheTRBL(margin, _cssMarginCache); //set info for css max value - cssMaxValue.ih = parseInt(cssMaxValue.h); //ih = integer height - cssMaxValue.iw = parseInt(cssMaxValue.w); //iw = integer width + cssMaxValue.ih = parseIntToZeroOrNumber(cssMaxValue.h); //ih = integer height + cssMaxValue.iw = parseIntToZeroOrNumber(cssMaxValue.w); //iw = integer width cssMaxValue.ch = cssMaxValue.h.indexOf('px') > -1; //ch = correct height cssMaxValue.cw = cssMaxValue.w.indexOf('px') > -1; //cw = correct width cssMaxValue.c = checkCacheDouble(cssMaxValue, _cssMaxValueCache, force); @@ -3443,8 +3447,8 @@ * }; */ var overflowAmount = { - x: Math.max(0, contentScrollSize.w - hostSize.w + (paddingAbsolute ? _paddingX : 0)), - y: Math.max(0, contentScrollSize.h - hostSize.h + (paddingAbsolute ? _paddingY : 0)) + x: Math.max(0, Math.round((contentScrollSize.w - hostSize.w + (paddingAbsolute ? _paddingX : 0)) * 100) / 100), + y: Math.max(0, Math.round((contentScrollSize.h - hostSize.h + (paddingAbsolute ? _paddingY : 0)) * 100) / 100) }; var hideOverflowForceTextarea = _isTextarea && (_viewportSize.w === 0 || _viewportSize.h === 0); if (hideOverflowForceTextarea) { @@ -3762,8 +3766,8 @@ if(move) _hostElement.on(_strMouseTouchMoveEvent, hostOnMouseMove); else { - _hostElement.on(_strMouseTouchEnter, hostOnMouseEnter); - _hostElement.on(_strMouseTouchLeave, hostOnMouseLeave); + _hostElement.on(_strMouseTouchEnter, hostOnMouseEnter) + .on(_strMouseTouchLeave, hostOnMouseLeave); } } }; @@ -3774,9 +3778,9 @@ removePassiveEventListener(_hostElement, _strMouseTouchLeave, hostOnMouseLeave); } else { - _hostElement.off(_strMouseTouchMoveEvent, hostOnMouseMove); - _hostElement.off(_strMouseTouchEnter, hostOnMouseEnter); - _hostElement.off(_strMouseTouchLeave, hostOnMouseLeave); + _hostElement.off(_strMouseTouchMoveEvent, hostOnMouseMove) + .off(_strMouseTouchEnter, hostOnMouseEnter) + .off(_strMouseTouchLeave, hostOnMouseLeave); } }; if (_scrollbarsAutoHideLeave || _scrollbarsAutoHideMove) { @@ -3934,13 +3938,18 @@ * if this is the case then before a real update the content size and host element attributes gets checked, and if they changed only then the update method will be called. */ _base.update = function (force) { + var attrsChanged; + var contentSizeC; + var isZoom = force === 'zoom'; + var imgElementSelector = 'img'; + var imgElementLoadEvent = 'load'; if (force === _strAuto) { - var attrsChanged = meaningfulAttrsChanged(); - var contentSizeC = updateAutoContentSizeChanged(); + attrsChanged = meaningfulAttrsChanged(); + contentSizeC = updateAutoContentSizeChanged(); if (attrsChanged || contentSizeC) update(false, contentSizeC); } - else if (force === 'zoom') { + else if (isZoom) { update(true, true); } else { @@ -3948,6 +3957,15 @@ _isSleeping = false; update(false, false, force); } + if(!_isTextarea && !isZoom) { + _contentElement.find(imgElementSelector).each(function(i, el) { + var index = helper.inArray(el, _imgs); + if (index === -1) { + el = helper(el); + el.off(imgElementLoadEvent, onImgLoad).on(imgElementLoadEvent, onImgLoad); + } + }); + } }; /** @@ -4005,9 +4023,9 @@ removePassiveEventListener(_hostElement, _strMouseTouchLeave, hostOnMouseLeave); } else { - _hostElement.off(_strMouseTouchMoveEvent, hostOnMouseMove); - _hostElement.off(_strMouseTouchEnter, hostOnMouseEnter); - _hostElement.off(_strMouseTouchLeave, hostOnMouseLeave); + _hostElement.off(_strMouseTouchMoveEvent, hostOnMouseMove) + .off(_strMouseTouchEnter, hostOnMouseEnter) + .off(_strMouseTouchLeave, hostOnMouseLeave); } _scrollbarHorizontalElement.remove(); @@ -4017,28 +4035,31 @@ if (!_resizeNone) scrollbarCornerOnResized(); - _contentElement.contents().unwrap().unwrap().unwrap(); + _contentElement.contents() + .unwrap() + .unwrap() + .unwrap(); if (_isBody) _htmlElement.removeClass(_classNameHTMLElement); if (_isTextarea) { - _targetElement.off(_strScroll, textareaOnScroll); - _targetElement.off('drop', textareaOnDrop); - _targetElement.off('focus', textareaOnFocus); - _targetElement.off('focusout', textareaOnFocusOut); - if (_msieVersion > 9 || !_autoUpdateRecommended) { + _targetElement.off(_strScroll, textareaOnScroll) + .off('drop', textareaOnDrop) + .off('focus', textareaOnFocus) + .off('focusout', textareaOnFocusOut); + if (_msieVersion > 9 || !_autoUpdateRecommended) _targetElement.off('input', textareaOnInput); - } else { - _targetElement.off(_strKeyDownEvent, textareaOnKeyDown); - _targetElement.off(_strKeyUpEvent, textareaOnKeyUp); + _targetElement.off(_strKeyDownEvent, textareaOnKeyDown) + .off(_strKeyUpEvent, textareaOnKeyUp); } + _textareaCoverElement.remove(); _targetElement.removeClass(_classNameTextareaElement) - .removeClass(_classNameTextInherit); - _targetElement.unwrap() + .removeClass(_classNameTextInherit) + .unwrap() .removeAttr(WORDING.s); _hostElement.remove(); } @@ -4057,7 +4078,11 @@ .removeClass(_classNameThemeNone) .removeClass(_classNameCache); } - + + for(var i = 0; i < _imgs.length; i++) + helper(_imgs[i]).off('load', onImgLoad); + _imgs = undefined; + instances.rem(pluginTargetElement); var onDestroyed = _currentPreparedOptions.callbacks.onDestroyed; @@ -4117,6 +4142,8 @@ * Possible block settings are: * 'begin' Both axis shall be docked to the "begin" edge. - The element will be docked to the top and left edge of the viewport. * 'end' Both axis shall be docked to the "end" edge. - The element will be docked to the bottom and right edge of the viewport. (If direction is RTL to the bottom and left edge.) + * 'center' Both axis shall be docked to "center". - The element will be centered in the viewport. + * 'nearest' The element will be docked to the nearest edges. * [ string, string ] Specify Begin or End for each axis individually. * * Possible margin settings are: -- The actual margin of the element wont be affect, this option affects only the final scroll offset. @@ -4129,12 +4156,11 @@ * @param duration The duration of the scroll animation, OR a jQuery animation configuration object. * @param easing The animation easing. * @param complete The animation complete callback. - * @returns { - * { - * x: {position: *, ratio: (number|*), max: (number|*), handleOffset: (number|*), handleLength: *, handleLengthRatio: (number|*), trackLength: *, isRTL: *, isRTLNormalized: *}, - * y: {position: *, ratio: (number|*), max: (number|*), handleOffset: (number|*), handleLength: *, handleLengthRatio: (number|*), trackLength: *} - * } - * } + * @returns + * { + * x: {position: *, ratio: (number|*), max: (number|*), handleOffset: (number|*), handleLength: *, handleLengthRatio: (number|*), trackLength: *, isRTL: *, isRTLNormalized: *}, + * y: {position: *, ratio: (number|*), max: (number|*), handleOffset: (number|*), handleLength: *, handleLengthRatio: (number|*), trackLength: *} + * } */ _base.scroll = function (coordinates, duration, easing, complete) { if (arguments.length === 0 || coordinates === undefined) { @@ -4181,16 +4207,18 @@ var durationIsObject = helper.type(duration) === TYPES.o; var strEnd = 'end'; var strBegin = 'begin'; + var strCenter = 'center'; + var strNearest = 'nearest'; var elementObjSettings = { axis: 'xy', block: [strBegin, strBegin], margin: [0, 0, 0, 0] }; var elementObjSettingsAxisValues = [_strX, _strY, 'xy', 'yx']; - var elementObjSettingsBlockValues = [strBegin, strEnd]; + var elementObjSettingsBlockValues = [strBegin, strEnd, strCenter, strNearest]; var coordinatesIsElementObj = coordinates.hasOwnProperty('el'); var possibleElement = coordinatesIsElementObj ? coordinates.el : coordinates; - var possibleElementIsJQuery = possibleElement instanceof helper; + var possibleElementIsJQuery = possibleElement instanceof helper || possibleElement instanceof window.jQuery; var possibleElementIsHTMLElement = possibleElementIsJQuery ? false : isHTMLElement(possibleElement); var checkSettingsStringValue = function (currValue, allowedValues) { for (i = 0; i < allowedValues.length; i++) { @@ -4265,7 +4293,7 @@ rawScroll = rawScroll.replace(/%/g, mult + (maxScroll * (isRTLisX && _rtlScrollBehavior.n ? -1 : 1) / 100.0)); rawScroll = rawScroll.replace(/vw/g, mult + _viewportSize.w); rawScroll = rawScroll.replace(/vh/g, mult + _viewportSize.h); - amount = window.parseInt(window.parseFloat(window.eval(rawScroll)).toFixed()); + amount = parseIntToZeroOrNumber(window.parseFloat(window.eval(rawScroll)).toFixed()); } else if (helper.type(rawScroll) === TYPES.n) { amount = rawScroll; @@ -4329,7 +4357,7 @@ var marginType = helper.type(margin); var marginLength; - //block can be [string, or array of two strings] + //block can be [ string, or array of two strings ] if (blockType === TYPES.s) block = [block, block]; else if (blockType === TYPES.a) { @@ -4400,7 +4428,6 @@ //get coordinates var elementOffset = finalElement.offset(); var viewportOffset = _paddingElement.offset(); // use padding element instead of viewport element because padding element has never padding, margin or position applied. - var viewportSize = _viewportSize; var viewportScroll = { l: _scrollHorizontalInfo.cs, t: _scrollVerticalInfo.cs @@ -4408,9 +4435,20 @@ var settingsAxis = elementObjSettings.axis; var settingsBlock = elementObjSettings.block; var settingsMargin = elementObjSettings.margin; - var blockXIsEnd = settingsBlock[0] === (_isRTL ? strBegin : strEnd); - var blockYIsEnd = settingsBlock[1] === strEnd; - var measuringForBlockIsRequired = blockXIsEnd || blockYIsEnd; + var blockIsEnd = { + x : settingsBlock[0] === (_isRTL ? strBegin : strEnd), + y : settingsBlock[1] === strEnd + }; + var blockIsCenter = { + x : settingsBlock[0] === strCenter, + y : settingsBlock[1] === strCenter + }; + var blockIsNearest = { + x : settingsBlock[0] === strNearest, + y : settingsBlock[1] === strNearest + }; + var doNothing = { }; + var measuringForBlockIsRequired = blockIsEnd.x || blockIsEnd.y || blockIsCenter.x || blockIsCenter.y || blockIsNearest.x || blockIsNearest.y; elementOffset.top -= settingsMargin[0]; elementOffset.left -= settingsMargin[3]; var elementScrollCoordinates = { @@ -4446,15 +4484,28 @@ w: rawElementSize.w + settingsMargin[3] + settingsMargin[1], h: rawElementSize.h + settingsMargin[0] + settingsMargin[2] }; - if (blockXIsEnd) - elementScrollCoordinates.x -= (viewportSize.w - elementSize.w) * (_isRTL && _normalizeRTLCache ? -1 : 1); - if (blockYIsEnd) - elementScrollCoordinates.y -= viewportSize.h - elementSize.h; + var finalizeBlock = function(isX) { + var scrollbarVars = getScrollbarVars(isX); + var divide = blockIsCenter[scrollbarVars.xy] ? 2 : 1; + var elementCenterOffset = elementOffset[scrollbarVars.lt] + (elementSize[scrollbarVars._wh] / 2); + var viewportCenterOffset = viewportOffset[scrollbarVars.lt] + (_viewportSize[scrollbarVars._wh] / 2); + + if(blockIsNearest[scrollbarVars.xy]) { + //if element is completely in view don't scroll on this axis + doNothing[scrollbarVars.xy] = elementSize[scrollbarVars._wh] <= _viewportSize[scrollbarVars._wh] && elementOffset[scrollbarVars.lt] >= viewportOffset[scrollbarVars.lt] && elementOffset[scrollbarVars.lt] + elementSize[scrollbarVars._wh] <= viewportOffset[scrollbarVars.lt] + _viewportSize[scrollbarVars._wh]; + blockIsEnd[scrollbarVars.xy] = elementSize[scrollbarVars._wh] < _viewportSize[scrollbarVars._wh] ? elementCenterOffset > viewportCenterOffset : elementCenterOffset < viewportCenterOffset; + } + + if (blockIsEnd[scrollbarVars.xy] || blockIsCenter[scrollbarVars.xy]) + elementScrollCoordinates[scrollbarVars.xy] -= ((_viewportSize[scrollbarVars._wh] / divide) - (elementSize[scrollbarVars._wh] / divide)) * (isX && _isRTL && _normalizeRTLCache ? -1 : 1); + }; + finalizeBlock(true); + finalizeBlock(false); } - if (settingsAxis === _strX) + if (settingsAxis === _strX || doNothing.y) delete elementScrollCoordinates.y; - if (settingsAxis === _strY) + if (settingsAxis === _strY || doNothing.x) delete elementScrollCoordinates.x; coordinates = elementScrollCoordinates; @@ -4624,7 +4675,8 @@ //build Hide-scrollbars DOM if (_isTextarea) { _targetElement.wrap(_strDivBegin + _classNameHostTextareaElement + _strDivEnd); - _targetElement.addClass(_classNameTextareaElement).addClass(_classNameTextInherit); + _targetElement.addClass(_classNameTextareaElement) + .addClass(_classNameTextInherit); _hostElement = _targetElement.parent(); var hostElementCSS = {}; @@ -4632,9 +4684,8 @@ hostElementCSS[_strWidth] = _targetElement.css(_strWidth); hostElementCSS[_strHeight] = _targetElement.css(_strHeight); } - _hostElement.css(hostElementCSS); - - _hostElement.wrapInner(_strDivBegin + _classNameContentElement + _strSpace + _classNameTextInherit + _strDivEnd) + _hostElement.css(hostElementCSS) + .wrapInner(_strDivBegin + _classNameContentElement + _strSpace + _classNameTextInherit + _strDivEnd) .wrapInner(_strDivBegin + _classNameViewportElement + _strSpace + _classNameTextInherit + _strDivEnd) .wrapInner(_strDivBegin + _classNamePaddingElement + _strSpace + _classNameTextInherit + _strDivEnd); _contentElement = _hostElement.find(_strDot + _classNameContentElement).first(); @@ -4643,17 +4694,16 @@ _textareaCoverElement = helper(_strDivBegin + _classNameTextareaCoverElement + _strDivEnd); _contentElement.prepend(_textareaCoverElement); - _targetElement.on(_strScroll, textareaOnScroll); - _targetElement.on('drop', textareaOnDrop); - _targetElement.on('focus', textareaOnFocus); - ; - _targetElement.on('focusout', textareaOnFocusOut); + _targetElement.on(_strScroll, textareaOnScroll) + .on('drop', textareaOnDrop) + .on('focus', textareaOnFocus) + .on('focusout', textareaOnFocusOut); if (_msieVersion > 9 || !_autoUpdateRecommended) { _targetElement.on('input', textareaOnInput); } else { - _targetElement.on(_strKeyDownEvent, textareaOnKeyDown); - _targetElement.on(_strKeyUpEvent, textareaOnKeyUp); + _targetElement.on(_strKeyDownEvent, textareaOnKeyDown) + .on(_strKeyUpEvent, textareaOnKeyUp); } } else { _targetElement.addClass(_classNameHostElement); @@ -4873,4 +4923,4 @@ })(COMPATIBILITY, INSTANCES, HELPER, BYPROPERTYPATH); return window[PLUGINNAME]; -}))); \ No newline at end of file +}))); diff --git a/js/jquery.overlayScrollbars.min.js b/js/jquery.overlayScrollbars.min.js index bce9ad2..038df08 100644 --- a/js/jquery.overlayScrollbars.min.js +++ b/js/jquery.overlayScrollbars.min.js @@ -2,13 +2,12 @@ * OverlayScrollbars * https://github.com/KingSora/OverlayScrollbars * - * Version: 1.4.0 + * Version: 1.4.1 * * Copyright KingSora. * https://github.com/KingSora * * Released under the MIT license. - * Date: 02.03.2018 + * Date: 22.03.2018 */ - -!function(e,t){"function"==typeof define&&define.amd?define(["jquery"],function(n){return t(e,e.document,undefined,n)}):"object"==typeof exports?module.exports=t(e,e.document,undefined,require("jquery")):t(e,e.document,undefined,e.jQuery)}("undefined"!=typeof window?window:this,function(e,t,n,r){"use-strict";var o="OverlayScrollbars",i={o:"object",f:"function",a:"array",s:"string",n:"number",u:"undefined"},a={c:"class",s:"style",i:"id",oH:"offsetHeight",cH:"clientHeight",sH:"scrollHeight",oW:"offsetWidth",cW:"clientWidth",sW:"scrollWidth"},s={wW:function(){return e.innerWidth||t.documentElement[a.cW]||t.body[a.cW]},wH:function(){return e.innerHeight||t.documentElement[a.cH]||t.body[a.cH]},mO:function(){return e.MutationObserver||e.WebKitMutationObserver||e.WebkitMutationObserver||e.MozMutationObserver||n},rO:function(){return e.ResizeObserver||e.WebKitResizeObserver||e.WebkitResizeObserver||e.MozResizeObserver||n},rAF:function(){return e.requestAnimationFrame||e.webkitRequestAnimationFrame||e.mozRequestAnimationFrame||e.oRequestAnimationFrame||e.msRequestAnimationFrame||function(t){return e.setTimeout(t,1e3/60)}},cAF:function(){return e.cancelAnimationFrame||e.webkitCancelAnimationFrame||e.mozCancelAnimationFrame||e.oCancelAnimationFrame||e.msCancelAnimationFrame||function(t){return e.clearTimeout(t)}},now:function(){return Date.now()||(new Date).getTime()},stpP:function(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0},prvD:function(e){e.preventDefault?e.preventDefault():e.returnValue=!1},page:function(e){var r="page",o="client",i="X",a="Y",s=((e=e.originalEvent||e).target||e.srcElement||t).ownerDocument||t,l=s.documentElement,c=s.body;if(e.touches!==n){var f=e.touches[0];return{x:f[r+i],y:f[r+a]}}return!e[r+i]&&e[o+i]&&null!=e[o+i]?{x:e[o+i]+(l&&l.scrollLeft||c&&c.scrollLeft||0)-(l&&l.clientLeft||c&&c.clientLeft||0),y:e[o+a]+(l&&l.scrollTop||c&&c.scrollTop||0)-(l&&l.clientTop||c&&c.clientTop||0)}:{x:e[r+i],y:e[r+a]}},mBtn:function(e){return e.which||e.button===n?e.which:1&e.button?1:2&e.button?3:4&e.button?2:0},bind:function(e,t){if(typeof e!==i.f)throw"Can't bind function!";var n=Array.prototype.slice.call(arguments,2),r=function(){},o=function(){return e.apply(this instanceof r?this:t,n.concat(Array.prototype.slice.call(arguments)))};return e.prototype&&(r.prototype=e.prototype),o.prototype=new r,o}},l=function(t){return t.fn.overlayScrollbars=function(n){var r=this;return t.isPlainObject(n)?(t.each(r,function(){e[o](this,n)}),r):e[o](r,n)},t}(r),c=function(e){var t=[],r="__overlayScrollbars__";function o(e,n){e[r]=n,t.push(e)}function i(n){var o=e.inArray(n,t);o>-1&&(delete n[r],t.splice(o,1))}function a(e){return s(e)!==n}function s(e){for(var n=0;n
'),u=function(){s.append(f);var e,t="overflow",n="hidden",r=f[0],o=c(f.children("div").first());return 0===r[a.oH]&&f.hide().show(),e={x:r[a.oH]-r[a.cH],y:r[a.oW]-r[a.cW]},i.restrictedMeasuring=function(){f.css(t,n);var e={w:r[a.sW],h:r[a.sH]};f.css(t,"visible");var o={w:r[a.sW],h:r[a.sH]};return e.w-o.w!=0||e.h-o.h!=0}(),i.nativeScrollbarStyling=(f.addClass("os-viewport-native-scrollbars-invisible"),f.css(t,n).hide().css(t,"scroll").show(),r[a.oH]-r[a.cH]==0&&r[a.oW]-r[a.cW]==0),i.rtlScrollBehavior=function(){f.css({"overflow-y":n,direction:"rtl"}).scrollLeft(0);var e=f.offset(),t=o.offset();f.scrollLeft(999);var r=o.offset();return{i:e.left===t.left,n:t.left-r.left==0}}(),f.removeAttr(a.s).remove(),e}(),v={x:0===u.x,y:0===u.y};function d(e){var r=!1,o="Webkit Moz ms O".split(" "),i=t.createElement("div"),a=null;if(e=e.toLowerCase(),i.style[e]!==n&&(r=!0),!1===r){a=e.charAt(0).toUpperCase()+e.substr(1);for(var s=0;s0)return parseInt(t.substring(n+5,t.indexOf(".",n)),10);if(t.indexOf("Trident/")>0){var r=t.indexOf("rv:");return parseInt(t.substring(r+3,t.indexOf(".",r)),10)}var o=t.indexOf("Edge/");return o>0&&parseInt(t.substring(o+5,t.indexOf(".",o)),10)}(),i.cssCalc=function(){for(var e=t.createElement("div"),n=["calc","-webkit-calc","-moz-calc","-o-calc"],r=0;r0){var e=r.wW(),v=r.wH(),h=e-t,p=v-n;if(0===h&&0===p)return;var y=Math.round(e/(t/100)),m=Math.round(v/(n/100)),x=Math.abs(h),w=Math.abs(p),g=Math.abs(y),b=Math.abs(m),C=d(),S=x>2&&w>2,O=!u(g,b);if(!!(S&&O&&(C!==o&&o>0))){s.append(f);var z=f[0];i.nativeScrollbarSize={x:z[a.oH]-z[a.cH],y:z[a.oW]-z[a.cW]},f.remove(),c.each(l.all(),function(){l.has(this)&&l.get(this).update("zoom")})}t=e,n=v,o=C}})}function u(e,t){var n=Math.abs(e),r=Math.abs(t);return!(n===r||n+1===r||n-1===r)}function d(){var t=e.screen.deviceXDPI||0,n=e.screen.logicalXDPI||1;return e.devicePixelRatio||t/n}}()}function y(e){var t,o=this,i="autoUpdate",a=i+"Interval",s=[],l=[],f=!1,u=33,v=u,d=r.now(),h=function(){if(s.length>0&&f){t=r.rAF()(function(){h()});var e=r.now(),o=e-d;if(o>v){d=e-o%v;for(var c=u,p=0;pw&&(y.update("auto"),l[p]=new Date(g+=w)),c=Math.max(1,Math.min(c,w))}}v=c}}else v=u};o.add=function(t){-1===c.inArray(t,s)&&(s.push(t),l.push(r.now()),s.length>0&&!f&&(f=!0,e.autoUpdateLoop=f,h()))},o.remove=function(o){var i=c.inArray(o,s);i>-1&&(l.splice(i,1),s.splice(i,1),0===s.length&&f&&(f=!1,e.autoUpdateLoop=f,t!==n&&(r.cAF()(t),t=-1)))}}function m(t,u,v,d){if(to(t)){if(l.has(t)){var h=l.get(t);return h.options(u),h}var p,y,m,x,w,g,b,C,S,O,z,H,W,k,M,T,A,E,L,F,D,I,R,P,N,U,B,j,_,V,q,X,Y,J,K,Q,G,Z,$,ee,te,ne,re,oe,ie,ae,se,le,ce,fe,ue,ve,de,he,pe,ye,me,xe,we,ge,be,Ce,Se,Oe,ze,He,We,ke,Me,Te,Ae,Ee,Le,Fe,De,Ie,Re,Pe,Ne,Ue,Be,je,_e,Ve,qe,Xe,Ye,Je,Ke,Qe,Ge,Ze,$e,et,tt,nt,rt,ot,it,at,st,lt,ct,ft,ut,vt,dt,ht,pt,yt,mt,xt,wt,gt,bt=new e[o],Ct=!1,St=!1,Ot=!1,zt=!1,Ht=!1,Wt={w:0,h:0},kt={},Mt={},Tt={},At=175,Et="-hidden",Lt="margin-",Ft="padding-",Dt="border-",It="top",Rt="right",Pt="bottom",Nt="left",Ut="min-",Bt="max-",jt="width",_t="height",Vt="float",qt="",Xt="auto",Yt="scroll",Jt="100%",Kt="x",Qt="y",Gt='
',$t=".",en=" ",tn="scrollbar",nn="-horizontal",rn="-vertical",on=Yt+"Left",an=Yt+"Top",sn="mousedown touchstart",ln="mouseup touchend",cn="mousemove touchmove",fn="mouseenter",un="mouseleave",vn="keydown",dn="keyup",hn="selectstart",pn="transitionend webkitTransitionEnd oTransitionEnd",yn="__overlayScrollbarsRO__",mn="os-",xn=mn+"html",wn=mn+"host",gn=wn+"-textarea",bn=wn+"-"+tn+nn+Et,Cn=wn+"-"+tn+rn+Et,Sn=wn+"-transition",On=wn+"-rtl",zn=wn+"-resize-disabled",Hn=wn+"-scrolling",Wn=wn+"-overflow",kn=Wn+"-x",Mn=Wn+"-y",Tn=mn+"textarea",An=Tn+"-cover",En=mn+"padding",Ln=mn+"viewport",Fn=Ln+"-native-scrollbars-invisible",Dn=Ln+"-native-scrollbars-overlaid",In=mn+"content",Rn=mn+"content-arrange",Pn=mn+"content-glue",Nn=mn+"size-auto-observer",Un=mn+"resize-observer",Bn=mn+"resize-observer-item",jn=Bn+"-final",_n=mn+"text-inherit",Vn=mn+tn,qn=Vn+"-track",Xn=qn+"-off",Yn=Vn+"-handle",Jn=Yn+"-off",Kn=Vn+"-unusable",Qn=Vn+"-"+Xt+Et,Gn=Vn+"-corner",Zn=Gn+"-resize",$n=Zn+"-both",er=Zn+nn,tr=Zn+rn,nr=Vn+nn,rr=Vn+rn,or=mn+"dragging",ir=mn+"theme-none",ar={},sr=33,lr=11,cr=[112,113,114,115,116,117,118,119,120,121,123,33,34,37,38,39,40,16,17,18,19,20,144],fr=[],ur={x:0,y:0},vr={w:0,h:0};if(bt.sleep=function(){R=!0},bt.update=function(e){if(e===Xt){var t=fo(),n=co();(t||n)&&po(!1,n)}else"zoom"===e?po(!0,!0):(e=R||e,R=!1,po(!1,!1,e))},bt.options=function(e,t){if(c.isEmptyObject(e)||!c.isPlainObject(e)){if(c.type(e)===i.s){if(arguments.length>=2){var n={};return f.set(n,e,t,!0),lo(n),void po()}return f.get(U,e)}return U}lo(e);var r=R||!1;R=!1,po(),R=r},bt.destroy=function(){St=!0,d.remove(bt),Hr(),wr(G),Ht&&wr(Q),G.remove(),Z!==n&&Z.remove(),te!==n&&te.remove(),Ht&&Q.remove(),H?(pr(K,cn,Zr),pr(K,fn,Qr),pr(K,un,Gr)):(K.off(cn,Zr),K.off(fn,Qr),K.off(un,Gr)),ie.remove(),le.remove(),oe&&oe.remove(),mt||Mr(),ne.contents().unwrap().unwrap().unwrap(),zt&&X.removeClass(xn),Ot?(J.off(Yt,Nr),J.off("drop",Ir),J.off("focus",Rr),J.off("focusout",Pr),m>9||!y?J.off("input",Lr):(J.off(vn,Fr),J.off(dn,Dr)),re.remove(),J.removeClass(Tn).removeClass(_n),J.unwrap().removeAttr(a.s),K.remove()):(J.removeClass(wn),K.removeClass(wn).removeClass(zn).removeClass(On).removeClass(bn).removeClass(Cn).removeClass(Sn).removeClass(Hn).removeClass(Wn).removeClass(kn).removeClass(Mn).removeClass(ir).removeClass(Qe)),l.rem(t);var e=B.callbacks.onDestroyed;for(var r in c.isFunction(e)&&Sr(e),bt)delete bt[r];bt=n},bt.scroll=function(t,r,o,s){if(0===arguments.length||t===n){var l=kt,f=Mt,u=Ke&&I&&p.i,v=Ke&&I&&p.n,d=l.cs,h=l.csr,y=l.ms;return d=u?y-d:d,{x:{position:d*=v?-1:1,ratio:h=u?1-h:h,max:y*=v?-1:1,handleOffset:l.ho,handleLength:l.hl,handleLengthRatio:l.hlr,trackLength:l.tl,isRTL:I,isRTLNormalized:Ke},y:{position:f.cs,ratio:f.csr,max:f.ms,handleOffset:f.ho,handleLength:f.hl,handleLengthRatio:f.hlr,trackLength:f.tl}}}var m,x=[Kt,Nt,"l"],w=[Qt,It,"t"],g=["+=","-=","*=","/="],b={},C=c.type(r)===i.o,S="end",O="begin",H={axis:"xy",block:[O,O],margin:[0,0,0,0]},W=[Kt,Qt,"xy","yx"],k=[O,S],M=t.hasOwnProperty("el"),T=M?t.el:t,A=T instanceof c,E=!A&&to(T),L=function(e,t){for(m=0;m0)t.x=e[0],t.y=e[1];else if(c.type(e)===i.s||c.type(e)===i.n)t.x=e,t.y=e;else if(c.type(e)===i.o){for(var n in e=c.extend({},e),m=0,e)e.hasOwnProperty(n)&&(m>2&&delete e[n],m++);var r=function(t){var n=t?x:w;for(m=0;m2){var y=r.substr(0,2);for(m=0;m/g,(h?"-":qt)+Jt)).replace(/px/g,qt)).replace(/%/g,v+u*(d&&p.n?-1:1)/100)).replace(/vw/g,v+Tt.w)).replace(/vh/g,v+Tt.h),a=e.parseInt(e.parseFloat(e.eval(r)).toFixed())}else c.type(r)===i.n&&(a=r);if(!isNaN(a)&&a!==n&&c.type(a)===i.n){var x=Ke&&d,w=f*(x&&p.n?-1:1),b=x&&p.i,C=x&&p.n;switch(w=b?u-w:w,o){case"+=":s=w+a;break;case"-=":s=w-a;break;case"*=":s=w*a;break;case"/=":s=w/a;break;default:s=a}b&&(s=u-s),C&&(s*=-1),d&&p.n?(s=Math.max(u,s),s=Math.min(0,s)):(s=Math.min(u,s),s=Math.max(0,s)),s===f&&(s=n)}return s};if(A||E){var R=A?T:c(T);if(0===R.length)return;if(M){var P,N,U,B=t.axis,j=t.block,_=c.type(j),V=t.margin,q=c.type(V);if(_===i.s)j=[j,j];else if(_===i.a)if((N=j.length)>2||N<1)j=n;else{for(P=!0,1===N&&(j[1]=O),m=0;m0||C){var ue={};if(ce&&(ue[on]=b.x),fe&&(ue[an]=b.y),C)ee.animate(ue,r);else{var ve={duration:r,complete:s};if(c.type(o)===i.a){var de={};de[on]=o[0],de[an]=o[1],ve.specialEasing=de}else ve.easing=o;ee.animate(ue,ve)}}else ce&&ee[on](b.x),fe&&ee[an](b.y)},bt.scrollStop=function(e,t,n){ee.stop(e,t,n)},bt.getElements=function(){return{target:J[0],host:K[0],padding:$[0],viewport:ee[0],content:ne[0],scrollbarHorizontal:{scrollbar:ie[0],track:ae[0],handle:se[0]},scrollbarVertical:{scrollbar:le[0],track:ce[0],handle:fe[0]},scrollbarCorner:oe}},bt.getState=function(e){var t=function(e){if(!c.isPlainObject(e))return e;var t=c.extend(!0,{},e);f.del(t,"c");var n=function(e,n){t.hasOwnProperty(e)&&(t[n]=t[e],delete t[e])};return n("w",jt),n("h",_t),t},n={sleeping:t(R)||!1,autoUpdate:t(!rt),widthAuto:t(ye),heightAuto:t(me),padding:t(ge),overflowAmount:t(Me),hideOverflow:t(pe),hasOverflow:t(he),contentScrollSize:t(ve),viewportSize:t(Tt),hostSize:t(ue)};return c.type(e)===i.s?f.get(n,e):n},yo(t,u))return l.add(t,bt),bt;bt=n}function dr(){if(!R){var e=G[0],t={w:e[a.sW],h:e[a.sH]};if(Ct){var n=br(t,_e);_e=t,n&&po(!0,!1)}else _e=t}}function hr(e,t,n){e=e[0];for(var r=t.split(en),o=0;o9||!y){var u='">',d="",h="childNodes",x=Gt+Un+u;x+=Gt+Bn+'" dir="ltr'+u,x+=Gt+Bn+u,x+=Gt+jn+Zt,x+=d,x+=Gt+Bn+u,x+=Gt+jn+'" style="width: 200%; height: 200%'+Zt,x+=d,x+=d,x+=d,e.prepend(x);var w,g,b,C,S=(e=e[0])[h][0][h][0],O=c(S[h][1]),z=c(S[h][0]),H=c(z[0][h][0]),k=S[a.oW],M=S[a.oH],T=2,A=v.nativeScrollbarSize,E=function(){z[on](n)[an](n),O[on](n)[an](n)},L=function(){g=0,w&&(k=b,M=C,o())},F=function(e){return b=S[a.oW],C=S[a.oH],w=b!=k||C!=M,e&&w&&!g?(r.cAF()(g),g=r.rAF()(L)):e||L(),E(),e&&(r.prvD(e),r.stpP(e)),!1},D={};D[It]=-(A.y+1)*T,D[Rt]=A.x*-T,D[Pt]=A.y*-T,D[Nt]=-(A.x+1)*T,c(S).css(D),z.on(Yt,F),O.on(Yt,F),c(e).on(f,function(){F(!1)});var R={};R[jt]=n,R[_t]=n,H.css(R),E()}else{var P=q[0],N=e;e=e[0];var U=P.attachEvent,B=typeof navigator===i.u||(navigator.userAgent.match(/Trident/)||navigator.userAgent.match(/Edge/));if(U)N.prepend(Gt+Un+Zt),N.find($t+Un).first()[0].attachEvent("onresize",o);else{var j=P.createElement(i.o);j.setAttribute("tabindex","-1"),j.setAttribute(a.c,Un),j.onload=function(){var e=this.contentDocument.defaultView;e.addEventListener("resize",o),e.document.documentElement.style.display="none"},j.type="text/html",B&&N.prepend(j),j.data="about:blank",B||N.prepend(j),N.on(f,o)}}}if((e=c(e))[0]===G[0]){var _=function(){var t=K.css("direction");if(t!==Oe){var r={},o=0;return"ltr"===t?(r[Nt]=0,r[Rt]=Xt,o=n):(r[Nt]=Xt,r[Rt]=0,o=p.n?-n:p.i?0:n),G.children().first().css(r),e.scrollLeft(o),e.scrollTop(n),Oe=t,!0}return!1};_(),e.on(Yt,function(e){return _()&&po(),r.prvD(e),r.stpP(e),!1})}}function wr(e){if(W){var t=e.contents()[0];t[yn].disconnect(),delete t[yn]}else e.children($t+Un).first().remove()}function gr(e,t,r){return!0===r?r:t===n||e!==t}function br(e,t,r,o,i){if(!0===i)return i;if(o===n&&i===n){if(!0===r)return r;r=n}return r=r===n?"w":r,o=o===n?"h":o,t===n||(e[r]!==t[r]||e[o]!==t[o])}function Cr(e,t){return t===n||(e.t!==t.t||e.r!==t.r||e.b!==t.b||e.l!==t.l)}function Sr(e,t){Ct&&e.call(bt,t)}function Or(e,t,r){r===n&&(r=[qt,qt,qt,qt]),e[t+It]=r[0],e[t+Rt]=r[1],e[t+Pt]=r[2],e[t+Nt]=r[3]}function zr(){ot&&!rt&&(tt.observe(K[0],{attributes:!0,attributeOldValue:!0,attributeFilter:[a.i,a.c,a.s]}),nt.observe(Ot?J[0]:ne[0],{attributes:!0,attributeOldValue:!0,subtree:!Ot,childList:!Ot,characterData:!Ot,attributeFilter:Ot?["wrap","cols","rows"]:[a.i,a.c,a.s]}),rt=!0)}function Hr(){ot&&rt&&(tt.disconnect(),nt.disconnect(),rt=!1)}function Wr(e){if(!R){var t=(e.originalEvent||e).touches!==n;(1===r.mBtn(e)||t)&&(rt&&(yt=!0,Hr()),ur=r.page(e),vr.w=K[0][a.oW]-(M?0:T),vr.h=K[0][a.oH]-(M?0:A),q.on(hn,Ur),q.on(cn,kr),q.on(ln,Mr),Y.addClass(or),oe.setCapture&&oe.setCapture(),r.prvD(e),r.stpP(e))}}function kr(e){e.originalEvent;var t=r.page(e),n={};(wt||xt)&&(n[jt]=vr.w+t.x-ur.x),(gt||xt)&&(n[_t]=vr.h+t.y-ur.y),K.css(n),r.stpP(e)}function Mr(e){var t=e!==n;q.off(hn,Ur),q.off(cn,kr),q.off(ln,Mr),Y.removeClass(or),oe.releaseCapture&&oe.releaseCapture(),t&&(yt&&zr(),bt.update(Xt)),yt=!1}function Tr(){if(!R){var e=!Le,t=Tt.w-(M||ze||!ye?0:A+L),n=Tt.h-(M||ze||!me?0:A+L),r={},o=ye||e,i=J[0];r[Ut+jt]=qt,r[Ut+_t]=qt,r[jt]=Xt,J.css(r);var s=i[a.oW],l=o?Math.max(s,i[a.sW]-1):1;l+=ye?F+(M?0:e?0:T+E):0,r[jt]=ye?l:Jt,r[_t]=Xt,J.css(r);var c=i[a.oH],f=Math.max(c,i[a.sH]-1);return r[jt]=l,r[_t]=f,re.css(r),r[Ut+jt]=t+(!M&&ye?T+E:0),r[Ut+_t]=n+(!M&&me?A+L:0),J.css(r),{ow:s,oh:c,dw:l,dh:f}}}function Ar(){var e=J.prop("selectionStart");if(e!==n){for(var t=J.val(),r=t.length,o=t.split("\n"),i=o.length,a=t.substr(0,e).split("\n"),s=0,l=0,c=a.length,f=a[a.length-1].length,u=0;ul&&(s=u+1,l=v)}return{cursorRow:c,cursorCol:f,rows:i,cols:l,wRow:s,pos:e,max:r}}}function Er(e){for(var t=0;t-1&&fr.splice(n,1),0===fr.length&&(Tr(),bt.update(Xt),clearInterval(it))}}function Ir(){setTimeout(function(){Tr(),bt.update(Xt)},50)}function Rr(){at=!0}function Pr(){at=!1,clearInterval(it),fr=[],Tr(),bt.update(Xt)}function Nr(e){return J[on](p.i&&Ke?9999999:0),J[an](0),r.prvD(e),r.stpP(e),!1}function Ur(e){return r.prvD(e),!1}function Br(){return Te&&C.x&&C.y}function jr(e,t,n){var r=e?bn:Cn,o=e?ie:le;t?K.removeClass(r):K.addClass(r),n?o.removeClass(Kn):o.addClass(Kn)}function _r(e,t){if(clearTimeout(st),e)ie.removeClass(Qn),le.removeClass(Qn);else{var n="active",r=function(){if(!pt){var e=se.hasClass(n)||fe.hasClass(n);!e&&(ut||vt||dt)&&ie.addClass(Qn),!e&&(ut||vt||dt)&&le.addClass(Qn)}};ct>0&&!0!==t?st=setTimeout(r,ct):r()}}function Vr(e){var t={},n=Kr(e),r=Math.min(1,(ue[n._wh]-(ze?e?T:A:0))/ve[n._wh]);t[n.wh]=Math.floor(100*r*1e5)/1e5+"%",Br()||n.h.css(t),n.i.hl=n.h[0]["offset"+n.WH],n.i.hlr=r}function qr(e,t){var n=I&&e,r={},o=Kr(e),i=ee[0][Yt+o.WH]-ee[0]["client"+o.WH];p.n&&n&&(i*=-1);var a=t/i;a=isNaN(a)?0:Math.min(1,a),o.i.ms=i,o.i.cs=t,o.i.csr=a;var s=o.i.hl,l=o.t[0]["offset"+o.WH],c=(l-s)*a;if(c=isNaN(c)?0:c,n&&(p.n||!p.n&&!p.i)&&(c=l-s-c),c=Math.max(0,c),z){var f;n&&(c=-(l-s-c));var u="translate(",v="transform";f=e?u+c+"px, 0px)":u+"0px, "+c+"px)",r["-webkit-"+v]=f,r["-moz-"+v]=f,r["-ms-"+v]=f,r["-o-"+v]=f,r[v]=f}else r[o.lt]=c;Br()||o.h.css(r),o.i.ho=c,o.i.tl=l}function Xr(e,t){var n=t?"removeClass":"addClass",r=e?ce:fe,o=e?Xn:Jn;(e?ae:se)[n](o),r[n](o)}function Yr(){ie=c(Gt+Vn+en+nr+Zt),ae=c(Gt+qn+Zt),se=c(Gt+Yn+Zt),le=c(Gt+Vn+en+rr+Zt),ce=c(Gt+qn+Zt),fe=c(Gt+Yn+Zt),ie.append(ae),ae.append(se),le.append(ce),ce.append(fe),$.after(le),$.after(ie),O&&(ie.on(pn,function(e){e.target===ie[0]&&(Vr(!0),qr(!0,ee[on]()))}),le.on(pn,function(e){e.target===le[0]&&(Vr(!1),qr(!1,ee[an]()))})),Jr(!0),Jr(!1),oe=c(Gt+en+Gn+Zt),K.append(oe)}function Jr(e){var t,o,i,a=Kr(e),s=a.xy,l=Yt+a.LT,c="active",f=1,u=function(){f=.5},v=function(){f=1},d=function(n){n.originalEvent;var i=a.i.tl,c=a.i.hl,f=a.i.ms*((c/2+r.page(n)[s]-o-c/2)/(i-c));f=isFinite(f)?f:0,I&&e&&(p.n||!p.n&&!p.i)&&(f*=-1),ee[l](t+f),H||r.prvD(n)},h=function(e){e=e||e.originalEvent,Y.removeClass(or),a.h.removeClass(c),a.t.removeClass(c),a.s.removeClass(c),H?(pr(q,cn,d),pr(q,ln,h),pr(q,vn,y),pr(q,dn,m),pr(q,hn,Ur)):(q.off(cn,d),q.off(ln,h),q.off(vn,y),q.off(dn,m),q.off(hn,Ur)),v(),t=n,o=n,i!==n&&(bt.scrollStop(),clearTimeout(i),i=n);var r=K[0].getBoundingClientRect();e.clientX>=r.left&&e.clientX<=r.right&&e.clientY>=r.top&&e.clientY<=r.bottom||Gr(),(ut||vt)&&_r(!1)},y=function(e){16==e.keyCode&&u()},m=function(e){16==e.keyCode&&v()};a.h.on(sn,function(i){if(!R){var f=(i.originalEvent||i).touches!==n;Br()||!Ye||f&&!ht||(1===r.mBtn(i)||f)&&(t=(t=ee[l]())===n?0:t,(I&&e&&!p.n||!I)&&(t=t<0?0:t),o=r.page(i)[s],Y.addClass(or),a.h.addClass(c),a.s.addClass(c),H?(hr(q,hn,Ur),hr(q,cn,d),hr(q,ln,h)):(q.on(hn,Ur),q.on(cn,d),q.on(ln,h)),r.prvD(i))}}),a.t.on(sn,function(t){if(!R){var l=(t.originalEvent||t).touches!==n;if(!Br()&&Xe&&(!l||ht)&&(1===r.mBtn(t)||l)){var v,d=Tt[a._wh],x=a.t.offset()[a.lt],w=!0;t.shiftKey&&u();var g=function(){var t=a.i.ho,r=a.i.hl,s=o-x,l=200*f,c=w?Math.max(333,l):l,u={},h=I&&e&&(!p.i&&!p.n||Ke),y=t>s;h&&(y=t=s;h&&(m=v?t+r>=s:t<=s),m?(clearTimeout(i),bt.scrollStop(),i=n):i=setTimeout(g,c),w=!1};o=r.page(t)[s],Y.addClass(or),a.t.addClass(c),a.s.addClass(c),H?(hr(q,hn,Ur),hr(q,ln,h),hr(q,vn,y),hr(q,dn,m)):(q.on(hn,Ur),q.on(ln,h),q.on(vn,y),q.on(dn,m)),g(),r.prvD(t)}}}).hover(function(){(ut||vt)&&(pt=!0,_r(!0))},function(){(ut||vt)&&(pt=!1,_r(!1))}),a.s.on(sn,function(e){r.stpP(e)})}function Kr(e){return{wh:e?jt:_t,WH:e?"Width":"Height",lt:e?Nt:It,LT:e?"Left":"Top",xy:e?Kt:Qt,XY:e?"X":"Y",_wh:e?"w":"h",_lt:e?"l":"t",t:e?ae:ce,h:e?se:fe,s:e?ie:le,i:e?kt:Mt}}function Qr(){dt&&_r(!0)}function Gr(){dt&&!Y.hasClass(or)&&_r(!1)}function Zr(){vt&&(_r(!0),clearTimeout(lt),lt=setTimeout(function(){vt&&_r(!1)},100))}function $r(e){if(!R){var t=B.callbacks,r=t.onScrollStart,o=t.onScroll,i=t.onScrollStop;P!==n?clearTimeout(P):((ut||vt)&&_r(!0),Br()||K.addClass(Hn),c.isFunction(r)&&Sr(r,e)),qr(!0,ee[on]()),qr(!1,ee[an]()),c.isFunction(o)&&Sr(o,e),P=setTimeout(function(){eo(e),c.isFunction(i)&&Sr(i,e)},At)}}function eo(){clearTimeout(P),P=n,(ut||vt)&&_r(!1),Br()||K.removeClass(Hn)}function to(e){return typeof HTMLElement===i.o?e instanceof HTMLElement:e&&typeof e===i.o&&null!==e&&1===e.nodeType&&typeof e.nodeName===i.s}function no(e,t,r,o){var a,s,l,u,v,d={n:t,s:!1,v:n,p:n},h=i.u,p=f.has(e,t),y=f.get(e,t),m=!1,x=!0!==p,w="*",g=!1;for(c.type(r)!==i.a&&(r=[r]),v=r.length,s=0;s1){var C=0;for(u=0;u1)break}1===C&&(g=!0)}else g=!0;b===n&&(m=!0)}if(x&&!1===p&&m&&(x=!1),!x){a=y,h=c.type(a);var O=function(e){var t=c.type(e);return t===h&&(t!==i.s||(!!g||a===e))&&(d.s=!0,d.v=a,d.p=a,!0)};for(s=0;s-1&&i.splice(f,1);for(var u=0;u0&&Ct&&i-j0?K.addClass(ce):K.addClass(ir)),it&&(!0===ot?(Hr(),d.add(bt)):null===ot&&y?(Hr(),d.add(bt)):(d.remove(bt),zr())),_e)if(je)if(Z===n&&(Z=c(Gt+Pn+Zt),$.before(Z)),Ht)Q.show();else{Q=c(Gt+Nn+Zt),Z.before(Q);var Mt={w:-1,h:-1};xr(Q,function(){var e={w:Q[0][a.oW],h:Q[0][a.oH]};br(e,Mt)&&(Ct&&me&&e.h>0||ye&&e.w>0?po():(Ct&&!me&&0===e.h||!ye&&0===e.w)&&po()),Mt=e}),Ht=!0,null!==w&&Q.css(_t,w+"(100% + 1px)")}else Ht&&Q.hide();o&&(G.find("*").trigger(Yt),Ht&&Q.find("*").trigger(Yt));var At,Et=K.css("direction"),$t=gr(Et,Se,o),en=K.css("box-sizing"),tn=gr(en,we,o),nn={c:o,t:uo(K.css(Ft+It)),r:uo(K.css(Ft+Rt)),b:uo(K.css(Ft+Pt)),l:uo(K.css(Ft+Nt))};try{At=Ht?Q[0].getBoundingClientRect():null}catch(No){return}M="border-box"===en;var rn=(I="rtl"===Et)?Nt:Rt,ln=I?Rt:Nt,vn=K[0],dn=$[0],hn=!1,pn=!(!Ht||"none"===K.css(Vt))&&(0===Math.round(At.right-At.left)&&(!!Pe||vn[a.cW]-T>0));if(je&&!pn){var yn=vn[a.oW],mn=Z.css(jt);Z.css(jt,Xt);var xn=vn[a.oW];Z.css(jt,mn),(hn=yn!==xn)||(Z.css(jt,yn+1),xn=vn[a.oW],Z.css(jt,mn),hn=yn!==xn)}var wn=(pn||hn)&&je,gn=gr(wn,ye,o),bn=!wn&&ye,Cn=!!Ht&&0===Math.round(At.bottom-At.top),Sn=gr(Cn,me,o),Tn=!Cn&&me,An="-"+jt,En=wn&&M||!M,Ln=Cn&&M||!M,Fn={c:o,t:Ln?uo(K.css(Dt+It+An)):0,r:En?uo(K.css(Dt+Rt+An)):0,b:Ln?uo(K.css(Dt+Pt+An)):0,l:En?uo(K.css(D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un[Vt]=ln),Cn&&(In.ch||(Un[Bt+_t]=qt),Bn[_t]=Ot?St?Vn.dh:Xt:ne[0][a.cH]),je&&Z.css(Bn),ne.css(Un),Un={},Bn={},he=he||{x:!1,y:!1},e||t||$t||tn||Ne||gn||wn||Sn||Cn||In.c||nt||lt||Be||De||q||yt||kt||Re||Ne||yt||kt||o){var qn="overflow",Xn=qn+"-x",Yn=qn+"-y",Jn="hidden",Kn="visible",Qn=k&&(C.x||C.y||Tt.w0&&(Bn[jt]=Math.max(1,Bn[jt]),Bn[_t]=Math.max(1,Bn[_t])),Ot&&re.css(Mr),Z.css(Bn)}wn&&(Un[jt]=Jt),!wn||M||rt||(Un[Vt]="none"),ne.css(Un),Un={};var Er=or.getBoundingClientRect(),Lr={w:Math.max(or[a.sW],lr[a.sW]),h:Math.max(or[a.sH],lr[a.sH])};if(Qn&&ne.css(qn,qt),Er.width!==n){var Fr=Er.width,Dr=Er.height,Ir=.001;Lr.w+=uo(Fr+Ir)-Fr,Lr.h+=uo(Dr+Ir)-Dr}Lr.c=t=br(Lr,ve,o),ve=Lr,e=br(vr={w:vn[a.cW],h:vn[a.cH]},ue),ue=vr,Tt={w:dn[a.oW],h:dn[a.oH]};var Rr={x:"v-s"===st.x,y:"v-s"===st.y},Pr={x:"v-h"===st.x,y:"v-h"===st.y},Nr={x:"s"===st.x,y:"s"===st.y},Ur={x:Math.max(0,Lr.w-vr.w+(Pe?T:0)),y:Math.max(0,Lr.h-vr.h+(Pe?A:0))},Br=Ot&&(0===Tt.w||0===Tt.h);Br&&(Ur.x=0,Ur.y=0);var Yr={x:Ur.x>0,y:Ur.y>0},Jr={x:Yr.x,y:Yr.y};(Rr.x||Pr.x)&&(Jr.x=Yr.y&&!Rr.y&&!Pr.y),(Rr.y||Pr.y)&&(Jr.y=Yr.x&&!Rr.x&&!Pr.x),Jr.xs=!!Jr.x&&(Nr.x||Rr.x),Jr.ys=!!Jr.y&&(Nr.y||Rr.y);var Kr={x:Yr.x&&Jr.x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else Ot||(I&&p.i&&C.y&&Yr.x&&Ke&&(f.l+=Wt.w),ee[on](f.l),ee[an](f.t));$t&&c.isFunction(P)&&Sr(P,{isRTL:I,dir:Et}),e&&c.isFunction(U)&&Sr(U,{width:ue.w,height:ue.h}),t&&c.isFunction(N)&&Sr(N,{width:ve.w,height:ve.h}),(Yr.c||Jr.c)&&c.isFunction(z)&&Sr(z,{x:Yr.x,y:Yr.y,xScrollable:Jr.xs,yScrollable:Jr.ys,clipped:Jr.x||Jr.y}),Ur.c&&c.isFunction(W)&&Sr(W,{x:Ur.x,y:Ur.y})}zt&&(Yr.c||et.c)&&(et.f||ro(),C.y&&Yr.x&&ne.css(Ut+jt,et.w+S.y),C.x&&Yr.y&&ne.css(Ut+_t,et.h+S.x),et.c=!1),mr(G),mr(Q),c.isFunction(O)&&Sr(O,{forced:o})}}function yo(e,t){N=v.defaultOptions,x=v.nativeScrollbarStyling,g=c.extend(!0,{},v.nativeScrollbarSize),C=c.extend(!0,{},v.nativeScrollbarIsOverlaid),S=c.extend(!0,{},v.overlayScrollbarDummySize),p=c.extend(!0,{},v.rtlScrollBehavior),lo(c.extend(!0,{},N,t));var n,o=B.callbacks;if(C.x&&C.x&&!B.nativeScrollbarsOverlaid.initialize){var i=o.onInitializationWithdrawn;return c.isFunction(i)&&Sr(i),!1}if(w=v.cssCalc,m=v.msie,y=v.autoUpdateRecommended,O=v.supportTransition,z=v.supportTransform,H=v.supportPassiveEvents,W=v.supportResizeObserver,ot=v.supportMutationObserver,k=v.restrictedMeasuring,q=c(e.ownerDocument),V=c(q[0].defaultView||q[0].parentWindow),X=q.find("html").first(),Y=X.find("body").first(),J=c(e),Ot=J.is("textarea"),(zt=J.is("body"))&&((n={}).l=Math.max(J[on](),X[on](),V[on]()),n.t=Math.max(J[an](),X[an](),V[an]())),Ot){J.wrap(Gt+gn+Zt),J.addClass(Tn).addClass(_n),K=J.parent();var s={};B.sizeAutoCapable||(s[jt]=J.css(jt),s[_t]=J.css(_t)),K.css(s),K.wrapInner(Gt+In+en+_n+Zt).wrapInner(Gt+Ln+en+_n+Zt).wrapInner(Gt+En+en+_n+Zt),ne=K.find($t+In).first(),ee=K.find($t+Ln).first(),$=K.find($t+En).first(),re=c(Gt+An+Zt),ne.prepend(re),J.on(Yt,Nr),J.on("drop",Ir),J.on("focus",Rr),J.on("focusout",Pr),m>9||!y?J.on("input",Lr):(J.on(vn,Fr),J.on(dn,Dr))}else J.addClass(wn),(K=J).wrapInner(Gt+In+Zt).wrapInner(Gt+Ln+Zt).wrapInner(Gt+En+Zt),ne=K.find($t+In).first(),ee=K.find($t+Ln).first(),$=K.find($t+En).first(),ne.on(pn,function(e){!0!==Ae&&vo((e=e.originalEvent||e).propertyName)&&po(Xt)});if(Yr(),H?hr(ee,Yt,$r):ee.on(Yt,$r),x&&(C.x&&C.y?ee.addClass(Dn):ee.addClass(Fn)),ot){var l,f=r.mO(),u=r.now();tt=new f(function(e){if(Ct&&!R){var t=!1;c.each(e,function(){var e=this,n=this.target,r=e.attributeName;if(t=r===a.c?ao(e.oldValue,n.className):r!==a.s||e.oldValue!==n.style.cssText)return!1}),t&&bt.update(Xt)}}),nt=new f(function(e){if(Ct&&!R){for(var t=!1,n=0;nlr||!i?a():l=setTimeout(a,lr)}}})}zt&&(X.addClass(xn),ee[on](n.l),ee[an](n.t)),G=c(Gt+"os-resize-observer-host"+Zt),K.prepend(G),xr(G,dr),dr(),bt.update(Xt),setTimeout(function(){O&&!St&&K.addClass(Sn)},333),Ct=!0;var d=o.onInitialized;return c.isFunction(d)&&Sr(d),Ct}}e[o]=function(e,t){if(0===arguments.length)return this;h();var r,o=[];return c.isPlainObject(t)?e&&e.length?e.length>1?(c.each(e,function(){(r=this)!==n&&o.push(m(r,t,u,v))}),o):m(e[0],t,u,v):m(e,t,u,v):e?e.length&&e.length>0?e.length>1?(c.each(e,function(){r=l.get(this),"!"===t?r!==n&&o.push(r):o.push(r)}),o):l.get(e[0]):l.get(e):void 0},e[o].globals=function(){h();var e=c.extend(!0,{},u);return delete e.msie,e},e[o].defaultOptions=function(e){h();var t=u.defaultOptions;if(e===n)return c.extend(!0,{},t);u.defaultOptions=c.extend(!0,{},t,e)}}(s,c,l,f);return e[o]}); \ No newline at end of file +!function(e,t){"function"==typeof define&&define.amd?define(["jquery"],function(n){return t(e,e.document,undefined,n)}):"object"==typeof exports?module.exports=t(e,e.document,undefined,require("jquery")):t(e,e.document,undefined,e.jQuery)}("undefined"!=typeof window?window:this,function(e,t,n,r){"use-strict";var o="OverlayScrollbars",i={o:"object",f:"function",a:"array",s:"string",n:"number",u:"undefined"},a={c:"class",s:"style",i:"id",oH:"offsetHeight",cH:"clientHeight",sH:"scrollHeight",oW:"offsetWidth",cW:"clientWidth",sW:"scrollWidth"},s={wW:function(){return e.innerWidth||t.documentElement[a.cW]||t.body[a.cW]},wH:function(){return e.innerHeight||t.documentElement[a.cH]||t.body[a.cH]},mO:function(){return e.MutationObserver||e.WebKitMutationObserver||e.WebkitMutationObserver||e.MozMutationObserver||n},rO:function(){return e.ResizeObserver||e.WebKitResizeObserver||e.WebkitResizeObserver||e.MozResizeObserver||n},rAF:function(){return e.requestAnimationFrame||e.webkitRequestAnimationFrame||e.mozRequestAnimationFrame||e.oRequestAnimationFrame||e.msRequestAnimationFrame||function(t){return e.setTimeout(t,1e3/60)}},cAF:function(){return e.cancelAnimationFrame||e.webkitCancelAnimationFrame||e.mozCancelAnimationFrame||e.oCancelAnimationFrame||e.msCancelAnimationFrame||function(t){return e.clearTimeout(t)}},now:function(){return Date.now()||(new Date).getTime()},stpP:function(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0},prvD:function(e){e.preventDefault?e.preventDefault():e.returnValue=!1},page:function(e){var r="page",o="client",i="X",a="Y",s=((e=e.originalEvent||e).target||e.srcElement||t).ownerDocument||t,l=s.documentElement,c=s.body;if(e.touches!==n){var f=e.touches[0];return{x:f[r+i],y:f[r+a]}}return!e[r+i]&&e[o+i]&&null!=e[o+i]?{x:e[o+i]+(l&&l.scrollLeft||c&&c.scrollLeft||0)-(l&&l.clientLeft||c&&c.clientLeft||0),y:e[o+a]+(l&&l.scrollTop||c&&c.scrollTop||0)-(l&&l.clientTop||c&&c.clientTop||0)}:{x:e[r+i],y:e[r+a]}},mBtn:function(e){return e.which||e.button===n?e.which:1&e.button?1:2&e.button?3:4&e.button?2:0},bind:function(e,t){if(typeof e!==i.f)throw"Can't bind function!";var n=Array.prototype.slice.call(arguments,2),r=function(){},o=function(){return e.apply(this instanceof r?this:t,n.concat(Array.prototype.slice.call(arguments)))};return e.prototype&&(r.prototype=e.prototype),o.prototype=new r,o}},l=function(t){return t.fn.overlayScrollbars=function(n){var r=this;return t.isPlainObject(n)?(t.each(r,function(){e[o](this,n)}),r):e[o](r,n)},t}(r),c=function(e){var t=[],r="__overlayScrollbars__";function o(e,n){e[r]=n,t.push(e)}function i(n){var o=e.inArray(n,t);o>-1&&(delete n[r],t.splice(o,1))}function a(e){return s(e)!==n}function s(e){for(var n=0;n
'),u=function(){s.append(f);var e,t="overflow",n="hidden",r=f[0],o=c(f.children("div").first());return 0===r[a.oH]&&f.hide().show(),e={x:r[a.oH]-r[a.cH],y:r[a.oW]-r[a.cW]},i.restrictedMeasuring=function(){f.css(t,n);var e={w:r[a.sW],h:r[a.sH]};f.css(t,"visible");var o={w:r[a.sW],h:r[a.sH]};return e.w-o.w!=0||e.h-o.h!=0}(),i.nativeScrollbarStyling=(f.addClass("os-viewport-native-scrollbars-invisible"),f.css(t,n).hide().css(t,"scroll").show(),r[a.oH]-r[a.cH]==0&&r[a.oW]-r[a.cW]==0),i.rtlScrollBehavior=function(){f.css({"overflow-y":n,direction:"rtl"}).scrollLeft(0);var e=f.offset(),t=o.offset();f.scrollLeft(999);var r=o.offset();return{i:e.left===t.left,n:t.left-r.left==0}}(),f.removeAttr(a.s).remove(),e}(),v={x:0===u.x,y:0===u.y};function d(e){var r=!1,o="Webkit Moz ms O".split(" "),i=t.createElement("div"),a=null;if(e=e.toLowerCase(),i.style[e]!==n&&(r=!0),!1===r){a=e.charAt(0).toUpperCase()+e.substr(1);for(var s=0;s0)return parseInt(t.substring(n+5,t.indexOf(".",n)),10);if(t.indexOf("Trident/")>0){var r=t.indexOf("rv:");return parseInt(t.substring(r+3,t.indexOf(".",r)),10)}var o=t.indexOf("Edge/");return o>0&&parseInt(t.substring(o+5,t.indexOf(".",o)),10)}(),i.cssCalc=function(){for(var e=t.createElement("div"),n=["calc","-webkit-calc","-moz-calc","-o-calc"],r=0;r0){var e=r.wW(),v=r.wH(),h=e-t,p=v-n;if(0===h&&0===p)return;var y=Math.round(e/(t/100)),m=Math.round(v/(n/100)),x=Math.abs(h),w=Math.abs(p),g=Math.abs(y),b=Math.abs(m),C=d(),S=x>2&&w>2,O=!u(g,b);if(!!(S&&O&&(C!==o&&o>0))){s.append(f);var z=f[0];i.nativeScrollbarSize={x:z[a.oH]-z[a.cH],y:z[a.oW]-z[a.cW]},f.remove(),c.each(l.all(),function(){l.has(this)&&l.get(this).update("zoom")})}t=e,n=v,o=C}})}function u(e,t){var n=Math.abs(e),r=Math.abs(t);return!(n===r||n+1===r||n-1===r)}function d(){var t=e.screen.deviceXDPI||0,n=e.screen.logicalXDPI||1;return e.devicePixelRatio||t/n}}()}function y(e){var t,o=this,i="autoUpdate",a=i+"Interval",s=[],l=[],f=!1,u=33,v=u,d=r.now(),h=function(){if(s.length>0&&f){t=r.rAF()(function(){h()});var e=r.now(),o=e-d;if(o>v){d=e-o%v;for(var c=u,p=0;pw&&(y.update("auto"),l[p]=new Date(g+=w)),c=Math.max(1,Math.min(c,w))}}v=c}}else v=u};o.add=function(t){-1===c.inArray(t,s)&&(s.push(t),l.push(r.now()),s.length>0&&!f&&(f=!0,e.autoUpdateLoop=f,h()))},o.remove=function(o){var i=c.inArray(o,s);i>-1&&(l.splice(i,1),s.splice(i,1),0===s.length&&f&&(f=!1,e.autoUpdateLoop=f,t!==n&&(r.cAF()(t),t=-1)))}}function m(t,u,v,d){if(ro(t)){if(l.has(t)){var h=l.get(t);return h.options(u),h}var p,y,m,x,w,g,b,C,S,O,z,H,W,M,k,T,A,E,L,F,D,R,I,P,_,N,U,j,B,V,q,X,Y,J,K,Q,G,Z,$,ee,te,ne,re,oe,ie,ae,se,le,ce,fe,ue,ve,de,he,pe,ye,me,xe,we,ge,be,Ce,Se,Oe,ze,He,We,Me,ke,Te,Ae,Ee,Le,Fe,De,Re,Ie,Pe,_e,Ne,Ue,je,Be,Ve,qe,Xe,Ye,Je,Ke,Qe,Ge,Ze,$e,et,tt,nt,rt,ot,it,at,st,lt,ct,ft,ut,vt,dt,ht,pt,yt,mt,xt,wt,gt,bt=new e[o],Ct=!1,St=!1,Ot=!1,zt=!1,Ht=!1,Wt={w:0,h:0},Mt={},kt={},Tt={},At=175,Et="-hidden",Lt="margin-",Ft="padding-",Dt="border-",Rt="top",It="right",Pt="bottom",_t="left",Nt="min-",Ut="max-",jt="width",Bt="height",Vt="float",qt="",Xt="auto",Yt="scroll",Jt="100%",Kt="x",Qt="y",Gt='
',$t=".",en=" ",tn="scrollbar",nn="-horizontal",rn="-vertical",on=Yt+"Left",an=Yt+"Top",sn="mousedown touchstart",ln="mouseup touchend",cn="mousemove touchmove",fn="mouseenter",un="mouseleave",vn="keydown",dn="keyup",hn="selectstart",pn="transitionend webkitTransitionEnd oTransitionEnd",yn="__overlayScrollbarsRO__",mn="os-",xn=mn+"html",wn=mn+"host",gn=wn+"-textarea",bn=wn+"-"+tn+nn+Et,Cn=wn+"-"+tn+rn+Et,Sn=wn+"-transition",On=wn+"-rtl",zn=wn+"-resize-disabled",Hn=wn+"-scrolling",Wn=wn+"-overflow",Mn=Wn+"-x",kn=Wn+"-y",Tn=mn+"textarea",An=Tn+"-cover",En=mn+"padding",Ln=mn+"viewport",Fn=Ln+"-native-scrollbars-invisible",Dn=Ln+"-native-scrollbars-overlaid",Rn=mn+"content",In=mn+"content-arrange",Pn=mn+"content-glue",_n=mn+"size-auto-observer",Nn=mn+"resize-observer",Un=mn+"resize-observer-item",jn=Un+"-final",Bn=mn+"text-inherit",Vn=mn+tn,qn=Vn+"-track",Xn=qn+"-off",Yn=Vn+"-handle",Jn=Yn+"-off",Kn=Vn+"-unusable",Qn=Vn+"-"+Xt+Et,Gn=Vn+"-corner",Zn=Gn+"-resize",$n=Zn+"-both",er=Zn+nn,tr=Zn+rn,nr=Vn+nn,rr=Vn+rn,or=mn+"dragging",ir=mn+"theme-none",ar={},sr=33,lr=[],cr=11,fr=[112,113,114,115,116,117,118,119,120,121,123,33,34,37,38,39,40,16,17,18,19,20,144],ur=[],vr={x:0,y:0},dr={w:0,h:0};if(bt.sleep=function(){I=!0},bt.update=function(e){var t,n,r="zoom"===e,o="img",i="load";e===Xt?(t=vo(),n=uo(),(t||n)&&mo(!1,n)):r?mo(!0,!0):(e=I||e,I=!1,mo(!1,!1,e)),Ot||r||ne.find(o).each(function(e,t){-1===c.inArray(t,lr)&&(t=c(t)).off(i,jr).on(i,jr)})},bt.options=function(e,t){if(c.isEmptyObject(e)||!c.isPlainObject(e)){if(c.type(e)===i.s){if(arguments.length>=2){var n={};return f.set(n,e,t,!0),fo(n),void mo()}return f.get(N,e)}return N}fo(e);var r=I||!1;I=!1,mo(),I=r},bt.destroy=function(){St=!0,d.remove(bt),Wr(),gr(G),Ht&&gr(Q),G.remove(),Z!==n&&Z.remove(),te!==n&&te.remove(),Ht&&Q.remove(),H?(yr(K,cn,eo),yr(K,fn,Zr),yr(K,un,$r)):K.off(cn,eo).off(fn,Zr).off(un,$r),ie.remove(),le.remove(),oe&&oe.remove(),mt||Tr(),ne.contents().unwrap().unwrap().unwrap(),zt&&X.removeClass(xn),Ot?(J.off(Yt,Nr).off("drop",Ir).off("focus",Pr).off("focusout",_r),m>9||!y?J.off("input",Fr):J.off(vn,Dr).off(dn,Rr),re.remove(),J.removeClass(Tn).removeClass(Bn).unwrap().removeAttr(a.s),K.remove()):(J.removeClass(wn),K.removeClass(wn).removeClass(zn).removeClass(On).removeClass(bn).removeClass(Cn).removeClass(Sn).removeClass(Hn).removeClass(Wn).removeClass(Mn).removeClass(kn).removeClass(ir).removeClass(Qe));for(var e=0;e0)t.x=e[0],t.y=e[1];else if(c.type(e)===i.s||c.type(e)===i.n)t.x=e,t.y=e;else if(c.type(e)===i.o){for(var n in e=c.extend({},e),m=0,e)e.hasOwnProperty(n)&&(m>2&&delete e[n],m++);var r=function(t){var n=t?x:w;for(m=0;m2){var y=r.substr(0,2);for(m=0;m/g,(h?"-":qt)+Jt)).replace(/px/g,qt)).replace(/%/g,v+u*(d&&p.n?-1:1)/100)).replace(/vw/g,v+Tt.w)).replace(/vh/g,v+Tt.h),a=ho(e.parseFloat(e.eval(r)).toFixed())}else c.type(r)===i.n&&(a=r);if(!isNaN(a)&&a!==n&&c.type(a)===i.n){var x=Ke&&d,w=f*(x&&p.n?-1:1),b=x&&p.i,C=x&&p.n;switch(w=b?u-w:w,o){case"+=":s=w+a;break;case"-=":s=w-a;break;case"*=":s=w*a;break;case"/=":s=w/a;break;default:s=a}b&&(s=u-s),C&&(s*=-1),d&&p.n?(s=Math.max(u,s),s=Math.min(0,s)):(s=Math.min(u,s),s=Math.max(0,s)),s===f&&(s=n)}return s};if(L||F){var _=L?E:c(E);if(0===_.length)return;if(A){var N,U,j,B=t.axis,V=t.block,q=c.type(V),X=t.margin,Y=c.type(X);if(q===i.s)V=[V,V];else if(q===i.a)if((U=V.length)>2||U<1)V=n;else{for(N=!0,1===U&&(V[1]=O),m=0;m=Q[t.lt]&&K[t.lt]+ue[t._wh]<=Q[t.lt]+Tt[t._wh],re[t.xy]=ue[t._wh]o:r0||C){var pe={};if(de&&(pe[on]=b.x),he&&(pe[an]=b.y),C)ee.animate(pe,r);else{var ye={duration:r,complete:s};if(c.type(o)===i.a){var me={};me[on]=o[0],me[an]=o[1],ye.specialEasing=me}else ye.easing=o;ee.animate(pe,ye)}}else de&&ee[on](b.x),he&&ee[an](b.y)},bt.scrollStop=function(e,t,n){ee.stop(e,t,n)},bt.getElements=function(){return{target:J[0],host:K[0],padding:$[0],viewport:ee[0],content:ne[0],scrollbarHorizontal:{scrollbar:ie[0],track:ae[0],handle:se[0]},scrollbarVertical:{scrollbar:le[0],track:ce[0],handle:fe[0]},scrollbarCorner:oe}},bt.getState=function(e){var t=function(e){if(!c.isPlainObject(e))return e;var t=c.extend(!0,{},e);f.del(t,"c");var n=function(e,n){t.hasOwnProperty(e)&&(t[n]=t[e],delete t[e])};return n("w",jt),n("h",Bt),t},n={sleeping:t(I)||!1,autoUpdate:t(!rt),widthAuto:t(ye),heightAuto:t(me),padding:t(ge),overflowAmount:t(ke),hideOverflow:t(pe),hasOverflow:t(he),contentScrollSize:t(ve),viewportSize:t(Tt),hostSize:t(ue)};return c.type(e)===i.s?f.get(n,e):n},xo(t,u))return l.add(t,bt),bt;bt=n}function hr(){if(!I){var e=G[0],t={w:e[a.sW],h:e[a.sH]};if(Ct){var n=Cr(t,Be);Be=t,n&&mo(!0,!1)}else Be=t}}function pr(e,t,n){for(var r=t.split(en),o=0;o9||!y){var u='">',d="",h="childNodes",x=Gt+Nn+u;x+=Gt+Un+'" dir="ltr'+u,x+=Gt+Un+u,x+=Gt+jn+Zt,x+=d,x+=Gt+Un+u,x+=Gt+jn+'" style="width: 200%; height: 200%'+Zt,x+=d,x+=d,x+=d,e.prepend(x);var w,g,b,C,S=(e=e[0])[h][0][h][0],O=c(S[h][1]),z=c(S[h][0]),H=c(z[0][h][0]),M=S[a.oW],k=S[a.oH],T=2,A=v.nativeScrollbarSize,E=function(){z[on](n)[an](n),O[on](n)[an](n)},L=function(){g=0,w&&(M=b,k=C,o())},F=function(e){return b=S[a.oW],C=S[a.oH],w=b!=M||C!=k,e&&w&&!g?(r.cAF()(g),g=r.rAF()(L)):e||L(),E(),e&&(r.prvD(e),r.stpP(e)),!1},D={};D[Rt]=-(A.y+1)*T,D[It]=A.x*-T,D[Pt]=A.y*-T,D[_t]=-(A.x+1)*T,c(S).css(D),z.on(Yt,F),O.on(Yt,F),c(e).on(f,function(){F(!1)});var I={};I[jt]=n,I[Bt]=n,H.css(I),E()}else{var P=q[0],_=e;e=e[0];var N=P.attachEvent,U=typeof navigator===i.u||(navigator.userAgent.match(/Trident/)||navigator.userAgent.match(/Edge/));if(N)_.prepend(Gt+Nn+Zt),_.find($t+Nn).first()[0].attachEvent("onresize",o);else{var j=P.createElement(i.o);j.setAttribute("tabindex","-1"),j.setAttribute(a.c,Nn),j.onload=function(){var e=this.contentDocument.defaultView;e.addEventListener("resize",o),e.document.documentElement.style.display="none"},j.type="text/html",U&&_.prepend(j),j.data="about:blank",U||_.prepend(j),_.on(f,o)}}}if((e=c(e))[0]===G[0]){var B=function(){var t=K.css("direction");if(t!==Oe){var r={},o=0;return"ltr"===t?(r[_t]=0,r[It]=Xt,o=n):(r[_t]=Xt,r[It]=0,o=p.n?-n:p.i?0:n),G.children().first().css(r),e.scrollLeft(o),e.scrollTop(n),Oe=t,!0}return!1};B(),e.on(Yt,function(e){return B()&&mo(),r.prvD(e),r.stpP(e),!1})}}function gr(e){if(W){var t=e.contents()[0];t[yn].disconnect(),delete t[yn]}else e.children($t+Nn).first().remove()}function br(e,t,r){return!0===r?r:t===n||e!==t}function Cr(e,t,r,o,i){if(!0===i)return i;if(o===n&&i===n){if(!0===r)return r;r=n}return r=r===n?"w":r,o=o===n?"h":o,t===n||(e[r]!==t[r]||e[o]!==t[o])}function Sr(e,t){return t===n||(e.t!==t.t||e.r!==t.r||e.b!==t.b||e.l!==t.l)}function Or(e,t){Ct&&e.call(bt,t)}function zr(e,t,r){r===n&&(r=[qt,qt,qt,qt]),e[t+Rt]=r[0],e[t+It]=r[1],e[t+Pt]=r[2],e[t+_t]=r[3]}function Hr(){ot&&!rt&&(tt.observe(K[0],{attributes:!0,attributeOldValue:!0,attributeFilter:[a.i,a.c,a.s]}),nt.observe(Ot?J[0]:ne[0],{attributes:!0,attributeOldValue:!0,subtree:!Ot,childList:!Ot,characterData:!Ot,attributeFilter:Ot?["wrap","cols","rows"]:[a.i,a.c,a.s]}),rt=!0)}function Wr(){ot&&rt&&(tt.disconnect(),nt.disconnect(),rt=!1)}function Mr(e){if(!I){var t=(e.originalEvent||e).touches!==n;(1===r.mBtn(e)||t)&&(rt&&(yt=!0,Wr()),vr=r.page(e),dr.w=K[0][a.oW]-(k?0:T),dr.h=K[0][a.oH]-(k?0:A),q.on(hn,Ur).on(cn,kr).on(ln,Tr),Y.addClass(or),oe.setCapture&&oe.setCapture(),r.prvD(e),r.stpP(e))}}function kr(e){e.originalEvent;var t=r.page(e),n={};(wt||xt)&&(n[jt]=dr.w+t.x-vr.x),(gt||xt)&&(n[Bt]=dr.h+t.y-vr.y),K.css(n),r.stpP(e)}function Tr(e){var t=e!==n;q.off(hn,Ur).off(cn,kr).off(ln,Tr),Y.removeClass(or),oe.releaseCapture&&oe.releaseCapture(),t&&(yt&&Hr(),bt.update(Xt)),yt=!1}function Ar(){if(!I){var e=!Le,t=Tt.w-(k||ze||!ye?0:A+L),n=Tt.h-(k||ze||!me?0:A+L),r={},o=ye||e,i=J[0];r[Nt+jt]=qt,r[Nt+Bt]=qt,r[jt]=Xt,J.css(r);var s=i[a.oW],l=o?Math.max(s,i[a.sW]-1):1;l+=ye?F+(k?0:e?0:T+E):0,r[jt]=ye?l:Jt,r[Bt]=Xt,J.css(r);var c=i[a.oH],f=Math.max(c,i[a.sH]-1);return r[jt]=l,r[Bt]=f,re.css(r),r[Nt+jt]=t+(!k&&ye?T+E:0),r[Nt+Bt]=n+(!k&&me?A+L:0),J.css(r),{ow:s,oh:c,dw:l,dh:f}}}function Er(){var e=J.prop("selectionStart");if(e!==n){for(var t=J.val(),r=t.length,o=t.split("\n"),i=o.length,a=t.substr(0,e).split("\n"),s=0,l=0,c=a.length,f=a[a.length-1].length,u=0;ul&&(s=u+1,l=v)}return{cursorRow:c,cursorCol:f,rows:i,cols:l,wRow:s,pos:e,max:r}}}function Lr(e){for(var t=0;t-1&&ur.splice(n,1),0===ur.length&&(Ar(),bt.update(Xt),clearInterval(it))}}function Ir(){setTimeout(function(){Ar(),bt.update(Xt)},50)}function Pr(){at=!0}function _r(){at=!1,clearInterval(it),ur=[],Ar(),bt.update(Xt)}function Nr(e){return J[on](p.i&&Ke?9999999:0),J[an](0),r.prvD(e),r.stpP(e),!1}function Ur(e){return r.prvD(e),!1}function jr(){mo()}function Br(){return Te&&C.x&&C.y}function Vr(e,t,n){var r=e?bn:Cn,o=e?ie:le;t?K.removeClass(r):K.addClass(r),n?o.removeClass(Kn):o.addClass(Kn)}function qr(e,t){if(clearTimeout(st),e)ie.removeClass(Qn),le.removeClass(Qn);else{var n="active",r=function(){if(!pt){var e=se.hasClass(n)||fe.hasClass(n);!e&&(ut||vt||dt)&&ie.addClass(Qn),!e&&(ut||vt||dt)&&le.addClass(Qn)}};ct>0&&!0!==t?st=setTimeout(r,ct):r()}}function Xr(e){var t={},n=Gr(e),r=Math.min(1,(ue[n._wh]-(ze?e?T:A:0))/ve[n._wh]);t[n.wh]=Math.floor(100*r*1e5)/1e5+"%",Br()||n.h.css(t),n.i.hl=n.h[0]["offset"+n.WH],n.i.hlr=r}function Yr(e,t){var n=R&&e,r={},o=Gr(e),i=ee[0][Yt+o.WH]-ee[0]["client"+o.WH];p.n&&n&&(i*=-1);var a=t/i;a=isNaN(a)?0:Math.min(1,a),o.i.ms=i,o.i.cs=t,o.i.csr=a;var s=o.i.hl,l=o.t[0]["offset"+o.WH],c=(l-s)*a;if(c=isNaN(c)?0:c,n&&(p.n||!p.n&&!p.i)&&(c=l-s-c),c=Math.max(0,c),z){var f;n&&(c=-(l-s-c));var u="translate(",v="transform";f=e?u+c+"px, 0px)":u+"0px, "+c+"px)",r["-webkit-"+v]=f,r["-moz-"+v]=f,r["-ms-"+v]=f,r["-o-"+v]=f,r[v]=f}else r[o.lt]=c;Br()||o.h.css(r),o.i.ho=c,o.i.tl=l}function Jr(e,t){var n=t?"removeClass":"addClass",r=e?ce:fe,o=e?Xn:Jn;(e?ae:se)[n](o),r[n](o)}function Kr(){ie=c(Gt+Vn+en+nr+Zt),ae=c(Gt+qn+Zt),se=c(Gt+Yn+Zt),le=c(Gt+Vn+en+rr+Zt),ce=c(Gt+qn+Zt),fe=c(Gt+Yn+Zt),ie.append(ae),ae.append(se),le.append(ce),ce.append(fe),$.after(le),$.after(ie),O&&(ie.on(pn,function(e){e.target===ie[0]&&(Xr(!0),Yr(!0,ee[on]()))}),le.on(pn,function(e){e.target===le[0]&&(Xr(!1),Yr(!1,ee[an]()))})),Qr(!0),Qr(!1),oe=c(Gt+en+Gn+Zt),K.append(oe)}function Qr(e){var t,o,i,a=Gr(e),s=a.xy,l=Yt+a.LT,c="active",f=1,u=function(){f=.5},v=function(){f=1},d=function(n){n.originalEvent;var i=a.i.tl,c=a.i.hl,f=a.i.ms*((c/2+r.page(n)[s]-o-c/2)/(i-c));f=isFinite(f)?f:0,R&&e&&(p.n||!p.n&&!p.i)&&(f*=-1),ee[l](t+f),H||r.prvD(n)},h=function(e){e=e||e.originalEvent,Y.removeClass(or),a.h.removeClass(c),a.t.removeClass(c),a.s.removeClass(c),H?(yr(q,cn,d),yr(q,ln,h),yr(q,vn,y),yr(q,dn,m)):q.off(cn,d).off(ln,h).off(vn,y).off(dn,m),q.off(hn,Ur),v(),t=n,o=n,i!==n&&(bt.scrollStop(),clearTimeout(i),i=n);var r=K[0].getBoundingClientRect();e.clientX>=r.left&&e.clientX<=r.right&&e.clientY>=r.top&&e.clientY<=r.bottom||$r(),(ut||vt)&&qr(!1)},y=function(e){16==e.keyCode&&u()},m=function(e){16==e.keyCode&&v()};a.h.on(sn,function(i){if(!I){var f=(i.originalEvent||i).touches!==n;Br()||!Ye||f&&!ht||(1===r.mBtn(i)||f)&&(t=(t=ee[l]())===n?0:t,(R&&e&&!p.n||!R)&&(t=t<0?0:t),o=r.page(i)[s],Y.addClass(or),a.h.addClass(c),a.s.addClass(c),H?(pr(q,cn,d),pr(q,ln,h)):q.on(cn,d).on(ln,h),q.on(hn,Ur),r.prvD(i))}}),a.t.on(sn,function(t){if(!I){var l=(t.originalEvent||t).touches!==n;if(!Br()&&Xe&&(!l||ht)&&(1===r.mBtn(t)||l)){var v,d=Tt[a._wh],x=a.t.offset()[a.lt],w=!0;t.shiftKey&&u();var g=function(){var t=a.i.ho,r=a.i.hl,s=o-x,l=200*f,c=w?Math.max(333,l):l,u={},h=R&&e&&(!p.i&&!p.n||Ke),y=t>s;h&&(y=t=s;h&&(m=v?t+r>=s:t<=s),m?(clearTimeout(i),bt.scrollStop(),i=n):i=setTimeout(g,c),w=!1};o=r.page(t)[s],Y.addClass(or),a.t.addClass(c),a.s.addClass(c),H?(pr(q,ln,h),pr(q,vn,y),pr(q,dn,m)):q.on(ln,h).on(vn,y).on(dn,m),q.on(hn,Ur),g(),r.prvD(t)}}}).hover(function(){(ut||vt)&&(pt=!0,qr(!0))},function(){(ut||vt)&&(pt=!1,qr(!1))}),a.s.on(sn,function(e){r.stpP(e)})}function Gr(e){return{wh:e?jt:Bt,WH:e?"Width":"Height",lt:e?_t:Rt,LT:e?"Left":"Top",xy:e?Kt:Qt,XY:e?"X":"Y",_wh:e?"w":"h",_lt:e?"l":"t",t:e?ae:ce,h:e?se:fe,s:e?ie:le,i:e?Mt:kt}}function Zr(){dt&&qr(!0)}function $r(){dt&&!Y.hasClass(or)&&qr(!1)}function eo(){vt&&(qr(!0),clearTimeout(lt),lt=setTimeout(function(){vt&&qr(!1)},100))}function to(e){if(!I){var t=U.callbacks,r=t.onScrollStart,o=t.onScroll,i=t.onScrollStop;P!==n?clearTimeout(P):((ut||vt)&&qr(!0),Br()||K.addClass(Hn),c.isFunction(r)&&Or(r,e)),Yr(!0,ee[on]()),Yr(!1,ee[an]()),c.isFunction(o)&&Or(o,e),P=setTimeout(function(){no(e),c.isFunction(i)&&Or(i,e)},At)}}function no(){clearTimeout(P),P=n,(ut||vt)&&qr(!1),Br()||K.removeClass(Hn)}function ro(e){return typeof HTMLElement===i.o?e instanceof HTMLElement:e&&typeof e===i.o&&null!==e&&1===e.nodeType&&typeof e.nodeName===i.s}function oo(e,t,r,o){var a,s,l,u,v,d={n:t,s:!1,v:n,p:n},h=i.u,p=f.has(e,t),y=f.get(e,t),m=!1,x=!0!==p,w="*",g=!1;for(c.type(r)!==i.a&&(r=[r]),v=r.length,s=0;s1){var C=0;for(u=0;u1)break}1===C&&(g=!0)}else g=!0;b===n&&(m=!0)}if(x&&!1===p&&m&&(x=!1),!x){a=y,h=c.type(a);var O=function(e){var t=c.type(e);return t===h&&(t!==i.s||(!!g||a===e))&&(d.s=!0,d.v=a,d.p=a,!0)};for(s=0;s-1&&i.splice(f,1);for(var u=0;u0&&Ct&&i-j0?K.addClass(ce):K.addClass(ir)),it&&(!0===ot?(Wr(),d.add(bt)):null===ot&&y?(Wr(),d.add(bt)):(d.remove(bt),Hr())),Be)if(je)if(Z===n&&(Z=c(Gt+Pn+Zt),$.before(Z)),Ht)Q.show();else{Q=c(Gt+_n+Zt),Z.before(Q);var kt={w:-1,h:-1};wr(Q,function(){var e={w:Q[0][a.oW],h:Q[0][a.oH]};Cr(e,kt)&&(Ct&&me&&e.h>0||ye&&e.w>0?mo():(Ct&&!me&&0===e.h||!ye&&0===e.w)&&mo()),kt=e}),Ht=!0,null!==w&&Q.css(Bt,w+"(100% + 1px)")}else Ht&&Q.hide();o&&(G.find("*").trigger(Yt),Ht&&Q.find("*").trigger(Yt));var At,Et=K.css("direction"),$t=br(Et,Se,o),en=K.css("box-sizing"),tn=br(en,we,o),nn={c:o,t:ho(K.css(Ft+Rt)),r:ho(K.css(Ft+It)),b:ho(K.css(Ft+Pt)),l:ho(K.css(Ft+_t))};try{At=Ht?Q[0].getBoundingClientRect():null}catch(_o){return}k="border-box"===en;var rn=(R="rtl"===Et)?_t:It,ln=R?It:_t,vn=K[0],dn=$[0],hn=!1,pn=!(!Ht||"none"===K.css(Vt))&&(0===Math.round(At.right-At.left)&&(!!Pe||vn[a.cW]-T>0));if(je&&!pn){var yn=vn[a.oW],mn=Z.css(jt);Z.css(jt,X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.css(ro)}ne.css(Nn)}var oo={};jn={};if(e||jr.c||Br.c||Lr.c||lt||tn||nt||$t||Ue||Sn){oo[ln]=qt;var ao=function(){oo[Pt]=qt,Wt.h=0},so=function(){oo[rn]=qt,Wt.w=0};if(jr.x&&Br.xs?(oo[Xn]=Yt,tt?ao():(oo[Pt]=-(C.x?S.x:g.x),Wt.h=C.x?S.y:0)):(oo[Xn]=qt,ao()),jr.y&&Br.ys?(oo[Yn]=Yt,tt?so():(oo[rn]=-(C.y?S.y:g.y),Wt.w=C.y?S.x:0)):(oo[Yn]=qt,so()),(Tt.h-1,Po=Ro.y>-1;(Io||Po)&&(Po&&ee[an](Ro.y),Io&&(R&&Ke&&p.i?ee[on](0):ee[on](Ro.x)))}Fe=Wo}else Ot||(R&&p.i&&C.y&&jr.x&&Ke&&(f.l+=Wt.w),ee[on](f.l),ee[an](f.t));$t&&c.isFunction(P)&&Or(P,{isRTL:R,dir:Et}),e&&c.isFunction(N)&&Or(N,{width:ue.w,height:ue.h}),t&&c.isFunction(_)&&Or(_,{width:ve.w,height:ve.h}),(jr.c||Br.c)&&c.isFunction(z)&&Or(z,{x:jr.x,y:jr.y,xScrollable:Br.xs,yScrollable:Br.ys,clipped:Br.x||Br.y}),Nr.c&&c.isFunction(W)&&Or(W,{x:Nr.x,y:Nr.y})}zt&&(jr.c||et.c)&&(et.f||io(),C.y&&jr.x&&ne.css(Nt+jt,et.w+S.y),C.x&&jr.y&&ne.css(Nt+Bt,et.h+S.x),et.c=!1),xr(G),xr(Q),c.isFunction(O)&&Or(O,{forced:o})}}function xo(e,t){_=v.defaultOptions,x=v.nativeScrollbarStyling,g=c.extend(!0,{},v.nativeScrollbarSize),C=c.extend(!0,{},v.nativeScrollbarIsOverlaid),S=c.extend(!0,{},v.overlayScrollbarDummySize),p=c.extend(!0,{},v.rtlScrollBehavior),fo(c.extend(!0,{},_,t));var n,o=U.callbacks;if(C.x&&C.x&&!U.nativeScrollbarsOverlaid.initialize){var i=o.onInitializationWithdrawn;return c.isFunction(i)&&Or(i),!1}if(w=v.cssCalc,m=v.msie,y=v.autoUpdateRecommended,O=v.supportTransition,z=v.supportTransform,H=v.supportPassiveEvents,W=v.supportResizeObserver,ot=v.supportMutationObserver,M=v.restrictedMeasuring,q=c(e.ownerDocument),V=c(q[0].defaultView||q[0].parentWindow),X=q.find("html").first(),Y=X.find("body").first(),J=c(e),Ot=J.is("textarea"),(zt=J.is("body"))&&((n={}).l=Math.max(J[on](),X[on](),V[on]()),n.t=Math.max(J[an](),X[an](),V[an]())),Ot){J.wrap(Gt+gn+Zt),J.addClass(Tn).addClass(Bn),K=J.parent();var s={};U.sizeAutoCapable||(s[jt]=J.css(jt),s[Bt]=J.css(Bt)),K.css(s).wrapInner(Gt+Rn+en+Bn+Zt).wrapInner(Gt+Ln+en+Bn+Zt).wrapInner(Gt+En+en+Bn+Zt),ne=K.find($t+Rn).first(),ee=K.find($t+Ln).first(),$=K.find($t+En).first(),re=c(Gt+An+Zt),ne.prepend(re),J.on(Yt,Nr).on("drop",Ir).on("focus",Pr).on("focusout",_r),m>9||!y?J.on("input",Fr):J.on(vn,Dr).on(dn,Rr)}else J.addClass(wn),(K=J).wrapInner(Gt+Rn+Zt).wrapInner(Gt+Ln+Zt).wrapInner(Gt+En+Zt),ne=K.find($t+Rn).first(),ee=K.find($t+Ln).first(),$=K.find($t+En).first(),ne.on(pn,function(e){!0!==Ae&&po((e=e.originalEvent||e).propertyName)&&mo(Xt)});if(Kr(),H?pr(ee,Yt,to):ee.on(Yt,to),x&&(C.x&&C.y?ee.addClass(Dn):ee.addClass(Fn)),ot){var l,f=r.mO(),u=r.now();tt=new f(function(e){if(Ct&&!I){var t=!1;c.each(e,function(){var e=this,n=this.target,r=e.attributeName;if(t=r===a.c?lo(e.oldValue,n.className):r!==a.s||e.oldValue!==n.style.cssText)return!1}),t&&bt.update(Xt)}}),nt=new f(function(e){if(Ct&&!I){for(var t=!1,n=0;ncr||!i?a():l=setTimeout(a,cr)}}})}zt&&(X.addClass(xn),ee[on](n.l),ee[an](n.t)),G=c(Gt+"os-resize-observer-host"+Zt),K.prepend(G),wr(G,hr),hr(),bt.update(Xt),setTimeout(function(){O&&!St&&K.addClass(Sn)},333),Ct=!0;var d=o.onInitialized;return c.isFunction(d)&&Or(d),Ct}}e[o]=function(e,t){if(0===arguments.length)return this;h();var r,o=[];return c.isPlainObject(t)?e&&e.length?e.length>1?(c.each(e,function(){(r=this)!==n&&o.push(m(r,t,u,v))}),o):m(e[0],t,u,v):m(e,t,u,v):e?e.length&&e.length>0?e.length>1?(c.each(e,function(){r=l.get(this),"!"===t?r!==n&&o.push(r):o.push(r)}),o):l.get(e[0]):l.get(e):void 0},e[o].globals=function(){h();var e=c.extend(!0,{},u);return delete e.msie,e},e[o].defaultOptions=function(e){h();var t=u.defaultOptions;if(e===n)return c.extend(!0,{},t);u.defaultOptions=c.extend(!0,{},t,e)}}(s,c,l,f);return e[o]}); \ No newline at end of file diff --git a/package.json b/package.json index 533326e..ab4be59 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "overlayscrollbars", - "version": "1.4.0", + "version": "1.4.1", "description": "A javascript scrollbar plugin which hides the native scrollbars and provides custom styleable overlay scrollbars, but keeps the native functionality and feeling.", "keywords" : [ "overlayscrollbars",