(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3712,1836],{36808:function(e,t,n){var r,i,o;void 0!==(i="function"==typeof(r=o=function(){function extend(){for(var e=0,t={};e=e});e.trackVisibility&&void 0===t.isVisible&&(t.isVisible=i),null==(n=a.get(t.target))||n.forEach(function(e){e(i,t)})})},e);r=u.thresholds||(Array.isArray(e.threshold)?e.threshold:[e.threshold||0]),n={id:t,observer:u,elements:a},i.set(t,n)}return n}(n),l=c.id,p=c.observer,d=c.elements,f=d.get(e)||[];return d.has(e)||d.set(e,f),f.push(t),p.observe(e),function(){f.splice(f.indexOf(t),1),0===f.length&&(d.delete(e),p.unobserve(e)),0===d.size&&(p.disconnect(),i.delete(l))}}var u=["children","as","triggerOnce","threshold","root","rootMargin","onChange","skip","trackVisibility","delay","initialInView","fallbackInView"];function isPlainChildren(e){return"function"!=typeof e.children}var c=function(e){function InView(t){var n;return(n=e.call(this,t)||this).node=null,n._unobserveCb=null,n.handleNode=function(e){!n.node||(n.unobserve(),e||n.props.triggerOnce||n.props.skip||n.setState({inView:!!n.props.initialInView,entry:void 0})),n.node=e||null,n.observeNode()},n.handleChange=function(e,t){e&&n.props.triggerOnce&&n.unobserve(),isPlainChildren(n.props)||n.setState({inView:e,entry:t}),n.props.onChange&&n.props.onChange(e,t)},n.state={inView:!!t.initialInView,entry:void 0},n}InView.prototype=Object.create(e.prototype),InView.prototype.constructor=InView,_setPrototypeOf(InView,e);var t=InView.prototype;return t.componentDidUpdate=function(e){(e.rootMargin!==this.props.rootMargin||e.root!==this.props.root||e.threshold!==this.props.threshold||e.skip!==this.props.skip||e.trackVisibility!==this.props.trackVisibility||e.delay!==this.props.delay)&&(this.unobserve(),this.observeNode())},t.componentWillUnmount=function(){this.unobserve(),this.node=null},t.observeNode=function(){if(this.node&&!this.props.skip){var e=this.props,t=e.threshold,n=e.root,r=e.rootMargin,i=e.trackVisibility,o=e.delay,s=e.fallbackInView;this._unobserveCb=observe(this.node,this.handleChange,{threshold:t,root:n,rootMargin:r,trackVisibility:i,delay:o},s)}},t.unobserve=function(){this._unobserveCb&&(this._unobserveCb(),this._unobserveCb=null)},t.render=function(){if(!isPlainChildren(this.props)){var e=this.state,t=e.inView,n=e.entry;return this.props.children({inView:t,entry:n,ref:this.handleNode})}var i=this.props,o=i.children,s=i.as,a=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r=0||(i[n]=e[n]);return i}(i,u);return r.createElement(s||"div",_extends({ref:this.handleNode},a),o)},InView}(r.Component);function useInView(e){var t=void 0===e?{}:e,n=t.threshold,i=t.delay,o=t.trackVisibility,s=t.rootMargin,a=t.root,u=t.triggerOnce,c=t.skip,l=t.initialInView,p=t.fallbackInView,d=r.useRef(),f=r.useState({inView:!!l}),h=f[0],v=f[1],b=r.useCallback(function(e){void 0!==d.current&&(d.current(),d.current=void 0),!c&&e&&(d.current=observe(e,function(e,t){v({inView:e,entry:t}),t.isIntersecting&&u&&d.current&&(d.current(),d.current=void 0)},{root:a,rootMargin:s,threshold:n,trackVisibility:o,delay:i},p))},[Array.isArray(n)?n.toString():n,a,s,u,c,o,p,i]);(0,r.useEffect)(function(){d.current||!h.entry||u||c||v({inView:!!l})});var y=[b,h.inView,h.entry];return y.ref=y[0],y.inView=y[1],y.entry=y[2],y}c.displayName="InView",c.defaultProps={threshold:0,triggerOnce:!1,initialInView:!1}}}]);