!function(t,o,l){"use strict";function e(){function e(t,o){this.scrollLeft=t,this.scrollTop=o}function r(t){return.5*(1-Math.cos(Math.PI*t))}function s(t){if("object"!=typeof t||null===t||t.behavior===l||"auto"===t.behavior||"instant"===t.behavior)return!0;if("object"==typeof t&&"smooth"===t.behavior)return!1;throw new TypeError("behavior not valid")}function n(l){var e,r,s;do l=l.parentNode,e=l===o.body,r=l.clientHeight<l.scrollHeight||l.clientWidth<l.scrollWidth,s="visible"===t.getComputedStyle(l,null).overflow;while(!e&&(!r||s));return e=r=s=null,l}function c(o){var l,e,s,n=p(),i=(n-o.startTime)/u;i=i>1?1:i,l=r(i),e=o.startX+(o.x-o.startX)*l,s=o.startY+(o.y-o.startY)*l,o.method.call(o.scrollable,e,s),(e!==o.x||s!==o.y)&&t.requestAnimationFrame(c.bind(t,o))}function i(l,r,s){var n,i,a,u,m=p();l===o.body?(n=t,i=t.scrollX||t.pageXOffset,a=t.scrollY||t.pageYOffset,u=f.scroll):(n=l,i=l.scrollLeft,a=l.scrollTop,u=e),c({scrollable:n,method:u,startTime:m,startX:i,startY:a,x:r,y:s})}if(!("scrollBehavior"in o.documentElement.style)){var a=t.HTMLElement||t.Element,u=468,f={scroll:t.scroll||t.scrollTo,scrollBy:t.scrollBy,elScroll:a.prototype.scroll||e,scrollIntoView:a.prototype.scrollIntoView},p=t.performance&&t.performance.now?t.performance.now.bind(t.performance):Date.now;t.scroll=t.scrollTo=function(){return s(arguments[0])?void f.scroll.call(t,arguments[0].left||arguments[0],arguments[0].top||arguments[1]):void i.call(t,o.body,~~arguments[0].left,~~arguments[0].top)},t.scrollBy=function(){return s(arguments[0])?void f.scrollBy.call(t,arguments[0].left||arguments[0],arguments[0].top||arguments[1]):void i.call(t,o.body,~~arguments[0].left+(t.scrollX||t.pageXOffset),~~arguments[0].top+(t.scrollY||t.pageYOffset))},a.prototype.scroll=a.prototype.scrollTo=function(){if(s(arguments[0]))return void f.elScroll.call(this,arguments[0].left||arguments[0],arguments[0].top||arguments[1]);var t=arguments[0].left,o=arguments[0].top;i.call(this,this,"number"==typeof t?t:this.scrollLeft,"number"==typeof o?o:this.scrollTop)},a.prototype.scrollBy=function(){var t=arguments[0];"object"==typeof t?this.scroll({left:t.left+this.scrollLeft,top:t.top+this.scrollTop,behavior:t.behavior}):this.scroll(this.scrollLeft+t,this.scrollTop+arguments[1])},a.prototype.scrollIntoView=function(){if(s(arguments[0]))return void f.scrollIntoView.call(this,arguments[0]===l?!0:arguments[0]);var e=n(this),r=e.getBoundingClientRect(),c=this.getBoundingClientRect();e!==o.body?(i.call(this,e,e.scrollLeft+c.left-r.left,e.scrollTop+c.top-r.top),t.scrollBy({left:r.left,top:r.top,behavior:"smooth"})):t.scrollBy({left:c.left,top:c.top,behavior:"smooth"})}}}"object"==typeof exports?module.exports={polyfill:e}:e()}(window,document);