(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1247],{1247:function(e,t,n){"use strict";n.d(t,{Z:function(){return h}});var o=n(93196),r=n.n(o),i=n(67294),s=(n(45697),n(91033)),a=null;"undefined"!==typeof CSS&&CSS.supports&&(CSS.supports("position","sticky")?a="sticky":CSS.supports("position","-webkit-sticky")&&(a="-webkit-sticky"));var c=!1;try{var l=Object.defineProperty({},"passive",{get:function(){c={passive:!0}}});window.addEventListener("testPassive",null,l),window.removeEventListener("testPassive",null,l)}catch(f){}var h=function(e){function t(t){var n=e.call(this,t)||this;return n.registerContainerRef=function(e){a&&(n.node=e,e?(n.scrollPane=function(e){for(var t=e;t=t.parentElement;){var n=getComputedStyle(t,null).getPropertyValue("overflow-y");if(t===document.body)return window;if("auto"===n||"scroll"===n)return t}return window}(n.node),n.latestScrollY=n.scrollPane===window?window.scrollY:n.scrollPane.scrollTop,n.scrollPane.addEventListener("scroll",n.handleScroll,c),n.scrollPane.addEventListener("mousewheel",n.handleScroll,c),n.scrollPane===window?(window.addEventListener("resize",n.handleWindowResize),n.handleWindowResize()):(n.rosp=new s.default(n.handleScrollPaneResize),n.rosp.observe(n.scrollPane),n.handleScrollPaneResize()),n.ropn=new s.default(n.handleParentNodeResize),n.ropn.observe(n.node.parentNode),n.handleParentNodeResize(),n.ron=new s.default(n.handleNodeResize),n.ron.observe(n.node),n.handleNodeResize({initial:!0}),n.initial()):(n.scrollPane.removeEventListener("mousewheel",n.handleScroll,c),n.scrollPane.removeEventListener("scroll",n.handleScroll,c),n.scrollPane===window?window.removeEventListener("resize",n.getMeasurements):n.rosp.disconnect(),n.ropn.disconnect(),n.ron.disconnect(),n.scrollPane=null))},n.getCurrentOffset=function(){if("relative"===n.mode)return n.offset;var e=n.props,t=e.offsetTop,o=e.offsetBottom;return"stickyTop"===n.mode?Math.max(0,n.scrollPaneOffset+n.latestScrollY-n.naturalTop+t):"stickyBottom"===n.mode?Math.max(0,n.scrollPaneOffset+n.latestScrollY+n.viewPortHeight-(n.naturalTop+n.nodeHeight+o)):void 0},n.handleWindowResize=function(){n.viewPortHeight=window.innerHeight,n.scrollPaneOffset=0},n.handleScrollPaneResize=function(){n.viewPortHeight=n.scrollPane.offsetHeight,n.scrollPane.firstChild.offsetParent===n.scrollPane?n.scrollPaneOffset=n.scrollPane.getBoundingClientRect().top:n.scrollPaneOffset=0},n.handleParentNodeResize=function(){var e=n.node.parentNode,t=getComputedStyle(e,null),o=parseInt(t.getPropertyValue("padding-top"),10),r=parseInt(t.getPropertyValue("padding-bottom"),10);n.naturalTop=function(e,t){var n=e,o=0;t.firstChild&&t.firstChild.offsetParent!==t&&(o+=e.offsetTop-t.offsetTop,t=e.offsetParent,o+=-e.offsetTop);do{o+=n.offsetTop,n=n.offsetParent}while(n&&n!==t);return o}(e,n.scrollPane)+o+n.scrollPaneOffset;var i=n.parentHeight;n.parentHeight=e.getBoundingClientRect().height-(o+r),"relative"===n.mode&&i>n.parentHeight&&n.changeToStickyBottomIfBoxTooLow(n.latestScrollY),i!==n.parentHeight&&"relative"===n.mode&&(n.latestScrollY=Number.POSITIVE_INFINITY,n.handleScroll())},n.handleNodeResize=function(e){var t=(void 0===e?{}:e).initial,o=n.nodeHeight;if(n.nodeHeight=n.node.getBoundingClientRect().height,!t&&o!==n.nodeHeight){var r=n.props,i=r.offsetTop,s=r.offsetBottom;if(n.nodeHeight+i+s<=n.viewPortHeight)n.mode=void 0,n.initial();else{var a=n.parentHeight-n.nodeHeight;n.offset=Math.max(0,Math.min(a,n.getCurrentOffset())),n.changeMode("relative")}}},n.handleScroll=function(){var e=n.props,t=e.offsetTop,o=e.offsetBottom,r=n.scrollPane===window?window.scrollY:n.scrollPane.scrollTop;if(r!==n.latestScrollY){if(n.nodeHeight+t+o<=n.viewPortHeight)return n.initial(),void(n.latestScrollY=r);var i=r-n.latestScrollY;n.offset=n.getCurrentOffset(),i>0?"stickyTop"===n.mode?r+n.scrollPaneOffset+t>n.naturalTop&&(r+n.scrollPaneOffset+n.viewPortHeight<=n.naturalTop+n.nodeHeight+n.offset+o?n.changeMode("relative"):n.changeMode("stickyBottom")):"relative"===n.mode&&n.changeToStickyBottomIfBoxTooLow(r):"stickyBottom"===n.mode?n.scrollPaneOffset+r+n.viewPortHeight=n.naturalTop+n.offset?n.changeMode("relative"):n.changeMode("stickyTop")):"relative"===n.mode&&n.scrollPaneOffset+r+t=this.naturalTop+this.nodeHeight+this.offset+t&&this.changeMode("stickyBottom")},n.render=function(){var e=this.props,t=e.children,n=e.className,o=e.style;return i.createElement("div",{className:n,style:o,ref:this.registerContainerRef},t)},t}(i.Component);h.defaultProps={onChangeMode:function(){},offsetTop:0,offsetBottom:0}},93196:function(e){e.exports=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}},91033:function(e,t,n){"use strict";n.r(t);var o=function(){if("undefined"!==typeof Map)return Map;function e(e,t){var n=-1;return e.some((function(e,o){return e[0]===t&&(n=o,!0)})),n}return function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(t){var n=e(this.__entries__,t),o=this.__entries__[n];return o&&o[1]},t.prototype.set=function(t,n){var o=e(this.__entries__,t);~o?this.__entries__[o][1]=n:this.__entries__.push([t,n])},t.prototype.delete=function(t){var n=this.__entries__,o=e(n,t);~o&&n.splice(o,1)},t.prototype.has=function(t){return!!~e(this.__entries__,t)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(e,t){void 0===t&&(t=null);for(var n=0,o=this.__entries__;n0},e.prototype.connect_=function(){r&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),c?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){r&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(e){var t=e.propertyName,n=void 0===t?"":t;a.some((function(e){return!!~n.indexOf(e)}))&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),h=function(e,t){for(var n=0,o=Object.keys(t);n0},e}(),P="undefined"!==typeof WeakMap?new WeakMap:new o,O=function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=l.getInstance(),o=new b(t,n,this);P.set(this,o)};["observe","unobserve","disconnect"].forEach((function(e){O.prototype[e]=function(){var t;return(t=P.get(this))[e].apply(t,arguments)}}));var E="undefined"!==typeof i.ResizeObserver?i.ResizeObserver:O;t.default=E}}]); //# sourceMappingURL=1247-d555090fc7792ba1.js.map