/*
 * Copyright (c) 2020 aureliancnx
 *
 * MIT LICENSE
 *
 * This project is part of aureliancnx.
 * See https://github.com/aureliancnx/Bubulle-Norminette for further info.
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all
 * copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE. */
!function l(i,s,a){function c(n,t){if(!s[n]){if(!i[n]){var e="function"==typeof require&&require;if(!t&&e)return e(n,!0);if(u)return u(n,!0);var r=new Error("Cannot find module '"+n+"'");throw r.code="MODULE_NOT_FOUND",r}var o=s[n]={exports:{}};i[n][0].call(o.exports,function(t){var e=i[n][1][t];return c(e||t)},o,o.exports,l,i,s,a)}return s[n].exports}for(var u="function"==typeof require&&require,t=0;t<a.length;t++)c(a[t]);return c}({1:[function(t,e,n){"use strict";var r=t("../main");"function"==typeof define&&define.amd?define(r):(window.PerfectScrollbar=r,void 0===window.Ps&&(window.Ps=r))},{"../main":6}],2:[function(t,e,n){"use strict";var r={};r.create=function(t,e){var n=document.createElement(t);return n.className=e,n},r.appendTo=function(t,e){return e.appendChild(t),t},r.css=function(t,e,n){return"object"==typeof e?function(t,e){for(var n in e){var r=e[n];"number"==typeof r&&(r=r.toString()+"px"),t.style[n]=r}return t}(t,e):void 0===n?(i=t,s=e,window.getComputedStyle(i)[s]):(r=t,o=e,"number"==typeof(l=n)&&(l=l.toString()+"px"),r.style[o]=l,r);var r,o,l,i,s},r.matches=function(t,e){return void 0!==t.matches?t.matches(e):t.msMatchesSelector(e)},r.remove=function(t){void 0!==t.remove?t.remove():t.parentNode&&t.parentNode.removeChild(t)},r.queryChildren=function(t,e){return Array.prototype.filter.call(t.childNodes,function(t){return r.matches(t,e)})},e.exports=r},{}],3:[function(t,e,n){"use strict";function r(t){this.element=t,this.events={}}r.prototype.bind=function(t,e){void 0===this.events[t]&&(this.events[t]=[]),this.events[t].push(e),this.element.addEventListener(t,e,!1)},r.prototype.unbind=function(e,n){var r=void 0!==n;this.events[e]=this.events[e].filter(function(t){return r&&t!==n||(this.element.removeEventListener(e,t,!1),!1)},this)},r.prototype.unbindAll=function(){for(var t in this.events)this.unbind(t)};function o(){this.eventElements=[]}o.prototype.eventElement=function(e){var t=this.eventElements.filter(function(t){return t.element===e})[0];return void 0===t&&(t=new r(e),this.eventElements.push(t)),t},o.prototype.bind=function(t,e,n){this.eventElement(t).bind(e,n)},o.prototype.unbind=function(t,e,n){this.eventElement(t).unbind(e,n)},o.prototype.unbindAll=function(){for(var t=0;t<this.eventElements.length;t++)this.eventElements[t].unbindAll()},o.prototype.once=function(t,e,n){var r=this.eventElement(t),o=function(t){r.unbind(e,o),n(t)};r.bind(e,o)},e.exports=o},{}],4:[function(t,e,n){"use strict";function r(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}e.exports=function(){return r()+r()+"-"+r()+"-"+r()+"-"+r()+"-"+r()+r()+r()}},{}],5:[function(t,e,n){"use strict";var r=t("./dom"),o=n.toInt=function(t){return parseInt(t,10)||0};function l(t){var e=void 0===t?["ps--x","ps--y"]:["ps--"+t];return["ps--in-scrolling"].concat(e)}n.isEditable=function(t){return r.matches(t,"input,[contenteditable]")||r.matches(t,"select,[contenteditable]")||r.matches(t,"textarea,[contenteditable]")||r.matches(t,"button,[contenteditable]")},n.removePsClasses=function(t){for(var e=0;e<t.classList.length;e++){var n=t.classList[e];0===n.indexOf("ps-")&&t.classList.remove(n)}},n.outerWidth=function(t){return o(r.css(t,"width"))+o(r.css(t,"paddingLeft"))+o(r.css(t,"paddingRight"))+o(r.css(t,"borderLeftWidth"))+o(r.css(t,"borderRightWidth"))},n.startScrolling=function(t,e){for(var n=l(e),r=0;r<n.length;r++)t.classList.add(n[r])},n.stopScrolling=function(t,e){for(var n=l(e),r=0;r<n.length;r++)t.classList.remove(n[r])},n.env={isWebKit:"undefined"!=typeof document&&"WebkitAppearance"in document.documentElement.style,supportsTouch:"undefined"!=typeof window&&("ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch),supportsIePointer:"undefined"!=typeof window&&null!==window.navigator.msMaxTouchPoints}},{"./dom":2}],6:[function(t,e,n){"use strict";var r=t("./plugin/destroy"),o=t("./plugin/initialize"),l=t("./plugin/update");e.exports={initialize:o,update:l,destroy:r}},{"./plugin/destroy":8,"./plugin/initialize":16,"./plugin/update":20}],7:[function(t,e,n){"use strict";e.exports=function(){return{handlers:["click-rail","drag-scrollbar","keyboard","wheel","touch"],maxScrollbarLength:null,minScrollbarLength:null,scrollXMarginOffset:0,scrollYMarginOffset:0,suppressScrollX:!1,suppressScrollY:!1,swipePropagation:!0,swipeEasing:!0,useBothWheelAxes:!1,wheelPropagation:!1,wheelSpeed:1,theme:"default"}}},{}],8:[function(t,e,n){"use strict";var r=t("../lib/helper"),o=t("../lib/dom"),l=t("./instances");e.exports=function(t){var e=l.get(t);e&&(e.event.unbindAll(),o.remove(e.scrollbarX),o.remove(e.scrollbarY),o.remove(e.scrollbarXRail),o.remove(e.scrollbarYRail),r.removePsClasses(t),l.remove(t))}},{"../lib/dom":2,"../lib/helper":5,"./instances":17}],9:[function(t,e,n){"use strict";var r=t("../instances"),l=t("../update-geometry"),i=t("../update-scroll");function o(n,r){function o(t){return t.getBoundingClientRect()}function t(t){t.stopPropagation()}r.event.bind(r.scrollbarY,"click",t),r.event.bind(r.scrollbarYRail,"click",function(t){var e=t.pageY-window.pageYOffset-o(r.scrollbarYRail).top>r.scrollbarYTop?1:-1;i(n,"top",n.scrollTop+e*r.containerHeight),l(n),t.stopPropagation()}),r.event.bind(r.scrollbarX,"click",t),r.event.bind(r.scrollbarXRail,"click",function(t){var e=t.pageX-window.pageXOffset-o(r.scrollbarXRail).left>r.scrollbarXLeft?1:-1;i(n,"left",n.scrollLeft+e*r.containerWidth),l(n),t.stopPropagation()})}e.exports=function(t){o(t,r.get(t))}},{"../instances":17,"../update-geometry":18,"../update-scroll":19}],10:[function(t,e,n){"use strict";var s=t("../../lib/helper"),a=t("../../lib/dom"),r=t("../instances"),c=t("../update-geometry"),u=t("../update-scroll");function o(o,l){var i=null,e=null;function n(t){!function(t){var e=i+t*l.railXRatio,n=Math.max(0,l.scrollbarXRail.getBoundingClientRect().left)+l.railXRatio*(l.railXWidth-l.scrollbarXWidth);l.scrollbarXLeft=e<0?0:n<e?n:e;var r=s.toInt(l.scrollbarXLeft*(l.contentWidth-l.containerWidth)/(l.containerWidth-l.railXRatio*l.scrollbarXWidth))-l.negativeScrollAdjustment;u(o,"left",r)}(t.pageX-e),c(o),t.stopPropagation(),t.preventDefault()}function r(){s.stopScrolling(o,"x"),l.event.unbind(l.ownerDocument,"mousemove",n)}l.event.bind(l.scrollbarX,"mousedown",function(t){e=t.pageX,i=s.toInt(a.css(l.scrollbarX,"left"))*l.railXRatio,s.startScrolling(o,"x"),l.event.bind(l.ownerDocument,"mousemove",n),l.event.once(l.ownerDocument,"mouseup",r),t.stopPropagation(),t.preventDefault()})}function l(o,l){var i=null,e=null;function n(t){!function(t){var e=i+t*l.railYRatio,n=Math.max(0,l.scrollbarYRail.getBoundingClientRect().top)+l.railYRatio*(l.railYHeight-l.scrollbarYHeight);l.scrollbarYTop=e<0?0:n<e?n:e;var r=s.toInt(l.scrollbarYTop*(l.contentHeight-l.containerHeight)/(l.containerHeight-l.railYRatio*l.scrollbarYHeight));u(o,"top",r)}(t.pageY-e),c(o),t.stopPropagation(),t.preventDefault()}function r(){s.stopScrolling(o,"y"),l.event.unbind(l.ownerDocument,"mousemove",n)}l.event.bind(l.scrollbarY,"mousedown",function(t){e=t.pageY,i=s.toInt(a.css(l.scrollbarY,"top"))*l.railYRatio,s.startScrolling(o,"y"),l.event.bind(l.ownerDocument,"mousemove",n),l.event.once(l.ownerDocument,"mouseup",r),t.stopPropagation(),t.preventDefault()})}e.exports=function(t){var e=r.get(t);o(t,e),l(t,e)}},{"../../lib/dom":2,"../../lib/helper":5,"../instances":17,"../update-geometry":18,"../update-scroll":19}],11:[function(t,e,n){"use strict";var a=t("../../lib/helper"),c=t("../../lib/dom"),r=t("../instances"),u=t("../update-geometry"),d=t("../update-scroll");function o(l,i){var s=!1;i.event.bind(l,"mouseenter",function(){s=!0}),i.event.bind(l,"mouseleave",function(){s=!1});i.event.bind(i.ownerDocument,"keydown",function(t){if(!(t.isDefaultPrevented&&t.isDefaultPrevented()||t.defaultPrevented)){var e=c.matches(i.scrollbarX,":focus")||c.matches(i.scrollbarY,":focus");if(s||e){var n=document.activeElement?document.activeElement:i.ownerDocument.activeElement;if(n){if("IFRAME"===n.tagName)n=n.contentDocument.activeElement;else for(;n.shadowRoot;)n=n.shadowRoot.activeElement;if(a.isEditable(n))return}var r=0,o=0;switch(t.which){case 37:r=t.metaKey?-i.contentWidth:t.altKey?-i.containerWidth:-30;break;case 38:o=t.metaKey?i.contentHeight:t.altKey?i.containerHeight:30;break;case 39:r=t.metaKey?i.contentWidth:t.altKey?i.containerWidth:30;break;case 40:o=t.metaKey?-i.contentHeight:t.altKey?-i.containerHeight:-30;break;case 33:o=90;break;case 32:o=t.shiftKey?90:-90;break;case 34:o=-90;break;case 35:o=t.ctrlKey?-i.contentHeight:-i.containerHeight;break;case 36:o=t.ctrlKey?l.scrollTop:i.containerHeight;break;default:return}d(l,"top",l.scrollTop-o),d(l,"left",l.scrollLeft+r),u(l),function(t,e){var n=l.scrollTop;if(0===t){if(!i.scrollbarYActive)return!1;if(0===n&&0<e||n>=i.contentHeight-i.containerHeight&&e<0)return!i.settings.wheelPropagation}var r=l.scrollLeft;if(0===e){if(!i.scrollbarXActive)return!1;if(0===r&&t<0||r>=i.contentWidth-i.containerWidth&&0<t)return!i.settings.wheelPropagation}return!0}(r,o)&&t.preventDefault()}}})}e.exports=function(t){o(t,r.get(t))}},{"../../lib/dom":2,"../../lib/helper":5,"../instances":17,"../update-geometry":18,"../update-scroll":19}],12:[function(t,e,n){"use strict";var r=t("../instances"),u=t("../update-geometry"),d=t("../update-scroll");function o(s,a){var c=!1;function t(t){var e,n,r,o=(n=(e=t).deltaX,r=-1*e.deltaY,void 0!==n&&void 0!==r||(n=-1*e.wheelDeltaX/6,r=e.wheelDeltaY/6),e.deltaMode&&1===e.deltaMode&&(n*=10,r*=10),n!=n&&r!=r&&(n=0,r=e.wheelDelta),e.shiftKey?[-r,-n]:[n,r]),l=o[0],i=o[1];!function(t,e){var n=s.querySelector("textarea:hover, select[multiple]:hover, .ps-child:hover");if(n){var r=window.getComputedStyle(n);if(![r.overflow,r.overflowX,r.overflowY].join("").match(/(scroll|auto)/))return;var o=n.scrollHeight-n.clientHeight;if(0<o&&!(0===n.scrollTop&&0<e||n.scrollTop===o&&e<0))return 1;var l=n.scrollLeft-n.clientWidth;if(0<l&&!(0===n.scrollLeft&&t<0||n.scrollLeft===l&&0<t))return 1}}(l,i)&&(c=!1,a.settings.useBothWheelAxes?a.scrollbarYActive&&!a.scrollbarXActive?(d(s,"top",i?s.scrollTop-i*a.settings.wheelSpeed:s.scrollTop+l*a.settings.wheelSpeed),c=!0):a.scrollbarXActive&&!a.scrollbarYActive&&(d(s,"left",l?s.scrollLeft+l*a.settings.wheelSpeed:s.scrollLeft-i*a.settings.wheelSpeed),c=!0):(d(s,"top",s.scrollTop-i*a.settings.wheelSpeed),d(s,"left",s.scrollLeft+l*a.settings.wheelSpeed)),u(s),(c=c||function(t,e){var n=s.scrollTop;if(0===t){if(!a.scrollbarYActive)return!1;if(0===n&&0<e||n>=a.contentHeight-a.containerHeight&&e<0)return!a.settings.wheelPropagation}var r=s.scrollLeft;if(0===e){if(!a.scrollbarXActive)return!1;if(0===r&&t<0||r>=a.contentWidth-a.containerWidth&&0<t)return!a.settings.wheelPropagation}return!0}(l,i))&&(t.stopPropagation(),t.preventDefault()))}void 0!==window.onwheel?a.event.bind(s,"wheel",t):void 0!==window.onmousewheel&&a.event.bind(s,"mousewheel",t)}e.exports=function(t){o(t,r.get(t))}},{"../instances":17,"../update-geometry":18,"../update-scroll":19}],13:[function(t,e,n){"use strict";var r=t("../instances"),o=t("../update-geometry");e.exports=function(t){var e,n=r.get(t);e=t,n.event.bind(e,"scroll",function(){o(e)})}},{"../instances":17,"../update-geometry":18}],14:[function(t,e,n){"use strict";var p=t("../../lib/helper"),h=t("../instances"),f=t("../update-geometry"),b=t("../update-scroll");function r(s,t){var a=null,c={top:0,left:0};function u(){a&&(clearInterval(a),a=null),p.stopScrolling(s)}var d=!1;t.event.bind(t.ownerDocument,"selectionchange",function(){var t;s.contains(0===(t=window.getSelection?window.getSelection():document.getSelection?document.getSelection():"").toString().length?null:t.getRangeAt(0).commonAncestorContainer)?d=!0:(d=!1,u())}),t.event.bind(window,"mouseup",function(){d&&(d=!1,u())}),t.event.bind(window,"keyup",function(){d&&(d=!1,u())}),t.event.bind(window,"mousemove",function(t){var e,n,r,o,l,i;d&&(e=t.pageX,n=t.pageY,r=s.offsetLeft,o=s.offsetLeft+s.offsetWidth,l=s.offsetTop,i=s.offsetTop+s.offsetHeight,e<r+3?(c.left=-5,p.startScrolling(s,"x")):o-3<e?(c.left=5,p.startScrolling(s,"x")):c.left=0,n<l+3?(c.top=l+3-n<5?-5:-20,p.startScrolling(s,"y")):i-3<n?(c.top=n-i+3<5?5:20,p.startScrolling(s,"y")):c.top=0,0===c.top&&0===c.left?u():a=a||setInterval(function(){h.get(s)?(b(s,"top",s.scrollTop+c.top),b(s,"left",s.scrollLeft+c.left),f(s)):clearInterval(a)},50))})}e.exports=function(t){r(t,h.get(t))}},{"../../lib/helper":5,"../instances":17,"../update-geometry":18,"../update-scroll":19}],15:[function(t,e,n){"use strict";var r=t("../../lib/helper"),m=t("../instances"),w=t("../update-geometry"),Y=t("../update-scroll");function o(s,a,t,e){function c(t,e){Y(s,"top",s.scrollTop-e),Y(s,"left",s.scrollLeft-t),w(s)}var u={},d=0,p={},n=null,h=!1,f=!1;function r(){h=!0}function o(){h=!1}function b(t){return t.targetTouches?t.targetTouches[0]:t}function g(t){return(!t.pointerType||"pen"!==t.pointerType||0!==t.buttons)&&(t.targetTouches&&1===t.targetTouches.length||!(!t.pointerType||"mouse"===t.pointerType||t.pointerType===t.MSPOINTER_TYPE_MOUSE))}function v(t){var e;g(t)&&(f=!0,e=b(t),u.pageX=e.pageX,u.pageY=e.pageY,d=(new Date).getTime(),null!==n&&clearInterval(n),t.stopPropagation())}function l(t){var e,n,r,o,l,i;!f&&a.settings.swipePropagation&&v(t),!h&&f&&g(t)&&(c(r=(n={pageX:(e=b(t)).pageX,pageY:e.pageY}).pageX-u.pageX,o=n.pageY-u.pageY),u=n,0<(i=(l=(new Date).getTime())-d)&&(p.x=r/i,p.y=o/i,d=l),function(t,e){var n=s.scrollTop,r=s.scrollLeft,o=Math.abs(t),l=Math.abs(e);if(o<l){if(e<0&&n===a.contentHeight-a.containerHeight||0<e&&0===n)return!a.settings.swipePropagation}else if(l<o&&(t<0&&r===a.contentWidth-a.containerWidth||0<t&&0===r))return!a.settings.swipePropagation;return 1}(r,o)&&(t.stopPropagation(),t.preventDefault()))}function i(){!h&&f&&(f=!1,a.settings.swipeEasing&&(clearInterval(n),n=setInterval(function(){!m.get(s)||!p.x&&!p.y||Math.abs(p.x)<.01&&Math.abs(p.y)<.01?clearInterval(n):(c(30*p.x,30*p.y),p.x*=.8,p.y*=.8)},10)))}t?(a.event.bind(window,"touchstart",r),a.event.bind(window,"touchend",o),a.event.bind(s,"touchstart",v),a.event.bind(s,"touchmove",l),a.event.bind(s,"touchend",i)):e&&(window.PointerEvent?(a.event.bind(window,"pointerdown",r),a.event.bind(window,"pointerup",o),a.event.bind(s,"pointerdown",v),a.event.bind(s,"pointermove",l),a.event.bind(s,"pointerup",i)):window.MSPointerEvent&&(a.event.bind(window,"MSPointerDown",r),a.event.bind(window,"MSPointerUp",o),a.event.bind(s,"MSPointerDown",v),a.event.bind(s,"MSPointerMove",l),a.event.bind(s,"MSPointerUp",i)))}e.exports=function(t){(r.env.supportsTouch||r.env.supportsIePointer)&&o(t,m.get(t),r.env.supportsTouch,r.env.supportsIePointer)}},{"../../lib/helper":5,"../instances":17,"../update-geometry":18,"../update-scroll":19}],16:[function(t,e,n){"use strict";var r=t("./instances"),o=t("./update-geometry"),l={"click-rail":t("./handler/click-rail"),"drag-scrollbar":t("./handler/drag-scrollbar"),keyboard:t("./handler/keyboard"),wheel:t("./handler/mouse-wheel"),touch:t("./handler/touch"),selection:t("./handler/selection")},i=t("./handler/native-scroll");e.exports=function(e,t){e.classList.add("ps");var n=r.add(e,"object"==typeof t?t:{});e.classList.add("ps--theme_"+n.settings.theme),n.settings.handlers.forEach(function(t){l[t](e)}),i(e),o(e)}},{"./handler/click-rail":9,"./handler/drag-scrollbar":10,"./handler/keyboard":11,"./handler/mouse-wheel":12,"./handler/native-scroll":13,"./handler/selection":14,"./handler/touch":15,"./instances":17,"./update-geometry":18}],17:[function(t,e,n){"use strict";var a=t("../lib/helper"),c=t("./default-setting"),u=t("../lib/dom"),d=t("../lib/event-manager"),o=t("../lib/guid"),l={};function i(t,e){var n,r,o=this;for(var l in o.settings=c(),e)o.settings[l]=e[l];function i(){t.classList.add("ps--focus")}function s(){t.classList.remove("ps--focus")}o.containerWidth=null,o.containerHeight=null,o.contentWidth=null,o.contentHeight=null,o.isRtl="rtl"===u.css(t,"direction"),o.isNegativeScroll=(r=t.scrollLeft,t.scrollLeft=-1,n=t.scrollLeft<0,t.scrollLeft=r,n),o.negativeScrollAdjustment=o.isNegativeScroll?t.scrollWidth-t.clientWidth:0,o.event=new d,o.ownerDocument=t.ownerDocument||document,o.scrollbarXRail=u.appendTo(u.create("div","ps__scrollbar-x-rail"),t),o.scrollbarX=u.appendTo(u.create("div","ps__scrollbar-x"),o.scrollbarXRail),o.scrollbarX.setAttribute("tabindex",0),o.event.bind(o.scrollbarX,"focus",i),o.event.bind(o.scrollbarX,"blur",s),o.scrollbarXActive=null,o.scrollbarXWidth=null,o.scrollbarXLeft=null,o.scrollbarXBottom=a.toInt(u.css(o.scrollbarXRail,"bottom")),o.isScrollbarXUsingBottom=o.scrollbarXBottom==o.scrollbarXBottom,o.scrollbarXTop=o.isScrollbarXUsingBottom?null:a.toInt(u.css(o.scrollbarXRail,"top")),o.railBorderXWidth=a.toInt(u.css(o.scrollbarXRail,"borderLeftWidth"))+a.toInt(u.css(o.scrollbarXRail,"borderRightWidth")),u.css(o.scrollbarXRail,"display","block"),o.railXMarginWidth=a.toInt(u.css(o.scrollbarXRail,"marginLeft"))+a.toInt(u.css(o.scrollbarXRail,"marginRight")),u.css(o.scrollbarXRail,"display",""),o.railXWidth=null,o.railXRatio=null,o.scrollbarYRail=u.appendTo(u.create("div","ps__scrollbar-y-rail"),t),o.scrollbarY=u.appendTo(u.create("div","ps__scrollbar-y"),o.scrollbarYRail),o.scrollbarY.setAttribute("tabindex",0),o.event.bind(o.scrollbarY,"focus",i),o.event.bind(o.scrollbarY,"blur",s),o.scrollbarYActive=null,o.scrollbarYHeight=null,o.scrollbarYTop=null,o.scrollbarYRight=a.toInt(u.css(o.scrollbarYRail,"right")),o.isScrollbarYUsingRight=o.scrollbarYRight==o.scrollbarYRight,o.scrollbarYLeft=o.isScrollbarYUsingRight?null:a.toInt(u.css(o.scrollbarYRail,"left")),o.scrollbarYOuterWidth=o.isRtl?a.outerWidth(o.scrollbarY):null,o.railBorderYWidth=a.toInt(u.css(o.scrollbarYRail,"borderTopWidth"))+a.toInt(u.css(o.scrollbarYRail,"borderBottomWidth")),u.css(o.scrollbarYRail,"display","block"),o.railYMarginHeight=a.toInt(u.css(o.scrollbarYRail,"marginTop"))+a.toInt(u.css(o.scrollbarYRail,"marginBottom")),u.css(o.scrollbarYRail,"display",""),o.railYHeight=null,o.railYRatio=null}function r(t){return t.getAttribute("data-ps-id")}n.add=function(t,e){var n,r=o();return n=r,t.setAttribute("data-ps-id",n),l[r]=new i(t,e),l[r]},n.remove=function(t){delete l[r(t)],t.removeAttribute("data-ps-id")},n.get=function(t){return l[r(t)]}},{"../lib/dom":2,"../lib/event-manager":3,"../lib/guid":4,"../lib/helper":5,"./default-setting":7}],18:[function(t,e,n){"use strict";var r=t("../lib/helper"),o=t("../lib/dom"),l=t("./instances"),i=t("./update-scroll");function s(t,e){return t.settings.minScrollbarLength&&(e=Math.max(e,t.settings.minScrollbarLength)),t.settings.maxScrollbarLength&&(e=Math.min(e,t.settings.maxScrollbarLength)),e}e.exports=function(t){var e,n=l.get(t);n.containerWidth=t.clientWidth,n.containerHeight=t.clientHeight,n.contentWidth=t.scrollWidth,n.contentHeight=t.scrollHeight,t.contains(n.scrollbarXRail)||(0<(e=o.queryChildren(t,".ps__scrollbar-x-rail")).length&&e.forEach(function(t){o.remove(t)}),o.appendTo(n.scrollbarXRail,t)),t.contains(n.scrollbarYRail)||(0<(e=o.queryChildren(t,".ps__scrollbar-y-rail")).length&&e.forEach(function(t){o.remove(t)}),o.appendTo(n.scrollbarYRail,t)),!n.settings.suppressScrollX&&n.containerWidth+n.settings.scrollXMarginOffset<n.contentWidth?(n.scrollbarXActive=!0,n.railXWidth=n.containerWidth-n.railXMarginWidth,n.railXRatio=n.containerWidth/n.railXWidth,n.scrollbarXWidth=s(n,r.toInt(n.railXWidth*n.containerWidth/n.contentWidth)),n.scrollbarXLeft=r.toInt((n.negativeScrollAdjustment+t.scrollLeft)*(n.railXWidth-n.scrollbarXWidth)/(n.contentWidth-n.containerWidth))):n.scrollbarXActive=!1,!n.settings.suppressScrollY&&n.containerHeight+n.settings.scrollYMarginOffset<n.contentHeight?(n.scrollbarYActive=!0,n.railYHeight=n.containerHeight-n.railYMarginHeight,n.railYRatio=n.containerHeight/n.railYHeight,n.scrollbarYHeight=s(n,r.toInt(n.railYHeight*n.containerHeight/n.contentHeight)),n.scrollbarYTop=r.toInt(t.scrollTop*(n.railYHeight-n.scrollbarYHeight)/(n.contentHeight-n.containerHeight))):n.scrollbarYActive=!1,n.scrollbarXLeft>=n.railXWidth-n.scrollbarXWidth&&(n.scrollbarXLeft=n.railXWidth-n.scrollbarXWidth),n.scrollbarYTop>=n.railYHeight-n.scrollbarYHeight&&(n.scrollbarYTop=n.railYHeight-n.scrollbarYHeight),function(t,e){var n={width:e.railXWidth};e.isRtl?n.left=e.negativeScrollAdjustment+t.scrollLeft+e.containerWidth-e.contentWidth:n.left=t.scrollLeft,e.isScrollbarXUsingBottom?n.bottom=e.scrollbarXBottom-t.scrollTop:n.top=e.scrollbarXTop+t.scrollTop,o.css(e.scrollbarXRail,n);var r={top:t.scrollTop,height:e.railYHeight};e.isScrollbarYUsingRight?e.isRtl?r.right=e.contentWidth-(e.negativeScrollAdjustment+t.scrollLeft)-e.scrollbarYRight-e.scrollbarYOuterWidth:r.right=e.scrollbarYRight-t.scrollLeft:e.isRtl?r.left=e.negativeScrollAdjustment+t.scrollLeft+2*e.containerWidth-e.contentWidth-e.scrollbarYLeft-e.scrollbarYOuterWidth:r.left=e.scrollbarYLeft+t.scrollLeft,o.css(e.scrollbarYRail,r),o.css(e.scrollbarX,{left:e.scrollbarXLeft,width:e.scrollbarXWidth-e.railBorderXWidth}),o.css(e.scrollbarY,{top:e.scrollbarYTop,height:e.scrollbarYHeight-e.railBorderYWidth})}(t,n),n.scrollbarXActive?t.classList.add("ps--active-x"):(t.classList.remove("ps--active-x"),n.scrollbarXWidth=0,n.scrollbarXLeft=0,i(t,"left",0)),n.scrollbarYActive?t.classList.add("ps--active-y"):(t.classList.remove("ps--active-y"),n.scrollbarYHeight=0,n.scrollbarYTop=0,i(t,"top",0))}},{"../lib/dom":2,"../lib/helper":5,"./instances":17,"./update-scroll":19}],19:[function(t,e,n){"use strict";function o(t){var e=document.createEvent("Event");return e.initEvent(t,!0,!0),e}var l=t("./instances");e.exports=function(t,e,n){if(void 0===t)throw"You must provide an element to the update-scroll function";if(void 0===e)throw"You must provide an axis to the update-scroll function";if(void 0===n)throw"You must provide a value to the update-scroll function";"top"===e&&n<=0&&(t.scrollTop=n=0,t.dispatchEvent(o("ps-y-reach-start"))),"left"===e&&n<=0&&(t.scrollLeft=n=0,t.dispatchEvent(o("ps-x-reach-start")));var r=l.get(t);"top"===e&&n>=r.contentHeight-r.containerHeight&&((n=r.contentHeight-r.containerHeight)-t.scrollTop<=2?n=t.scrollTop:t.scrollTop=n,t.dispatchEvent(o("ps-y-reach-end"))),"left"===e&&n>=r.contentWidth-r.containerWidth&&((n=r.contentWidth-r.containerWidth)-t.scrollLeft<=2?n=t.scrollLeft:t.scrollLeft=n,t.dispatchEvent(o("ps-x-reach-end"))),void 0===r.lastTop&&(r.lastTop=t.scrollTop),void 0===r.lastLeft&&(r.lastLeft=t.scrollLeft),"top"===e&&n<r.lastTop&&t.dispatchEvent(o("ps-scroll-up")),"top"===e&&n>r.lastTop&&t.dispatchEvent(o("ps-scroll-down")),"left"===e&&n<r.lastLeft&&t.dispatchEvent(o("ps-scroll-left")),"left"===e&&n>r.lastLeft&&t.dispatchEvent(o("ps-scroll-right")),"top"===e&&n!==r.lastTop&&(t.scrollTop=r.lastTop=n,t.dispatchEvent(o("ps-scroll-y"))),"left"===e&&n!==r.lastLeft&&(t.scrollLeft=r.lastLeft=n,t.dispatchEvent(o("ps-scroll-x")))}},{"./instances":17}],20:[function(t,e,n){"use strict";var r=t("../lib/helper"),o=t("../lib/dom"),l=t("./instances"),i=t("./update-geometry"),s=t("./update-scroll");e.exports=function(t){var e=l.get(t);e&&(e.negativeScrollAdjustment=e.isNegativeScroll?t.scrollWidth-t.clientWidth:0,o.css(e.scrollbarXRail,"display","block"),o.css(e.scrollbarYRail,"display","block"),e.railXMarginWidth=r.toInt(o.css(e.scrollbarXRail,"marginLeft"))+r.toInt(o.css(e.scrollbarXRail,"marginRight")),e.railYMarginHeight=r.toInt(o.css(e.scrollbarYRail,"marginTop"))+r.toInt(o.css(e.scrollbarYRail,"marginBottom")),o.css(e.scrollbarXRail,"display","none"),o.css(e.scrollbarYRail,"display","none"),i(t),s(t,"top",t.scrollTop),s(t,"left",t.scrollLeft),o.css(e.scrollbarXRail,"display",""),o.css(e.scrollbarYRail,"display",""))}},{"../lib/dom":2,"../lib/helper":5,"./instances":17,"./update-geometry":18,"./update-scroll":19}]},{},[1]);