"use strict";(globalThis.__LOADABLE_LOADED_CHUNKS__=globalThis.__LOADABLE_LOADED_CHUNKS__||[]).push([[70131],{70131:(e,t,r)=>{r.r(t),r.d(t,{InView:()=>h,default:()=>d,useInView:()=>p});var n=r(75418);function i(){return i=Object.assign||function(e){for(var t=1;t=e}));e.trackVisibility&&void 0===t.isVisible&&(t.isVisible=o),null==(r=i.get(t.target))||r.forEach((function(e){e(o,t)}))}))}),e);n=s.thresholds||(Array.isArray(e.threshold)?e.threshold:[e.threshold||0]),r={id:t,observer:s,elements:i},o.set(t,r)}return r}(r),i=n.id,s=n.observer,a=n.elements,l=a.get(e)||[];return a.has(e)||a.set(e,l),l.push(t),s.observe(e),function(){l.splice(l.indexOf(t),1),0===l.length&&(a.delete(e),s.unobserve(e)),0===a.size&&(s.disconnect(),o.delete(i))}}function c(e){return"function"!=typeof e.children}var h=function(e){var t,r;function o(t){var r;return(r=e.call(this,t)||this).node=null,r._unobserveCb=null,r.handleNode=function(e){r.node&&(r.unobserve(),e||r.props.triggerOnce||r.props.skip||r.setState({inView:!!r.props.initialInView,entry:void 0})),r.node=e||null,r.observeNode()},r.handleChange=function(e,t){e&&r.props.triggerOnce&&r.unobserve(),c(r.props)||r.setState({inView:e,entry:t}),r.props.onChange&&r.props.onChange(e,t)},r.state={inView:!!t.initialInView,entry:void 0},r}r=e,(t=o).prototype=Object.create(r.prototype),t.prototype.constructor=t,t.__proto__=r;var s=o.prototype;return s.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())},s.componentWillUnmount=function(){this.unobserve(),this.node=null},s.observeNode=function(){if(this.node&&!this.props.skip){var e=this.props,t=e.threshold,r=e.root,n=e.rootMargin,i=e.trackVisibility,o=e.delay;this._unobserveCb=l(this.node,this.handleChange,{threshold:t,root:r,rootMargin:n,trackVisibility:i,delay:o})}},s.unobserve=function(){this._unobserveCb&&(this._unobserveCb(),this._unobserveCb=null)},s.render=function(){if(!c(this.props)){var e=this.state,t=e.inView,r=e.entry;return this.props.children({inView:t,entry:r,ref:this.handleNode})}var o=this.props,s=o.children,a=o.as,u=o.tag,l=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n=0||(i[r]=e[r]);return i}(o,["children","as","tag","triggerOnce","threshold","root","rootMargin","onChange","skip","trackVisibility","delay","initialInView"]);return(0,n.createElement)(a||u||"div",i({ref:this.handleNode},l),s)},o}(n.Component);function p(e){var t=void 0===e?{}:e,r=t.threshold,i=t.delay,o=t.trackVisibility,s=t.rootMargin,a=t.root,u=t.triggerOnce,c=t.skip,h=t.initialInView,p=(0,n.useRef)(),d=(0,n.useState)({inView:!!h}),f=d[0],v=d[1],b=(0,n.useCallback)((function(e){void 0!==p.current&&(p.current(),p.current=void 0),c||e&&(p.current=l(e,(function(e,t){v({inView:e,entry:t}),t.isIntersecting&&u&&p.current&&(p.current(),p.current=void 0)}),{root:a,rootMargin:s,threshold:r,trackVisibility:o,delay:i}))}),[Array.isArray(r)?r.toString():r,a,s,u,c,o,i]);(0,n.useEffect)((function(){p.current||!f.entry||u||c||v({inView:!!h})}));var g=[b,f.inView,f.entry];return g.ref=g[0],g.inView=g[1],g.entry=g[2],g}h.displayName="InView",h.defaultProps={threshold:0,triggerOnce:!1,initialInView:!1};const d=h}}]);