"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[85],{3145:function(e,t,n){n.d(t,{default:function(){return o.a}});var r=n(8461),o=n.n(r)},7648:function(e,t,n){n.d(t,{default:function(){return o.a}});var r=n(2972),o=n.n(r)},8461:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{default:function(){return s},getImageProps:function(){return a}});let r=n(7043),o=n(5346),i=n(5878),u=r._(n(3632));function a(e){let{props:t}=(0,o.getImgProps)(e,{defaultLoader:u.default,imgConf:{deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[16,32,48,64,96,128,256,384],path:"/_next/image/",loader:"custom",dangerouslyAllowSVG:!1,unoptimized:!0}});for(let[e,n]of Object.entries(t))void 0===n&&delete t[e];return{props:t}}let s=i.Image},7388:function(e,t,n){let r;n.d(t,{R:function(){return o}});var o=((r=o||{}).Space=" ",r.Enter="Enter",r.Escape="Escape",r.Backspace="Backspace",r.Delete="Delete",r.ArrowLeft="ArrowLeft",r.ArrowUp="ArrowUp",r.ArrowRight="ArrowRight",r.ArrowDown="ArrowDown",r.Home="Home",r.End="End",r.PageUp="PageUp",r.PageDown="PageDown",r.Tab="Tab",r)},6750:function(e,t,n){n.d(t,{x:function(){return a}});var r=n(2265),o=n(293),i=n(945),u=n(8036);function a(){let{disabled:e=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=(0,r.useRef)(null),[n,a]=(0,r.useState)(!1),s=(0,i.G)(),l=(0,u.z)(()=>{t.current=null,a(!1),s.dispose()}),c=(0,u.z)(e=>{if(s.dispose(),null===t.current){t.current=e.currentTarget,a(!0);{let n=(0,o.r)(e.currentTarget);s.addEventListener(n,"pointerup",l,!1),s.addEventListener(n,"pointermove",e=>{if(t.current){var n,r;let o,i;a((o=e.width/2,i=e.height/2,n={top:e.clientY-i,right:e.clientX+o,bottom:e.clientY+i,left:e.clientX-o},r=t.current.getBoundingClientRect(),!(!n||!r||n.right<r.left||n.left>r.right||n.bottom<r.top||n.top>r.bottom)))}},!1),s.addEventListener(n,"pointercancel",l,!1)}}});return{pressed:n,pressProps:e?{}:{onPointerDown:c,onPointerUp:l,onClick:l}}}},945:function(e,t,n){n.d(t,{G:function(){return i}});var r=n(2265),o=n(5473);function i(){let[e]=(0,r.useState)(o.k);return(0,r.useEffect)(()=>()=>e.dispose(),[e]),e}},8036:function(e,t,n){n.d(t,{z:function(){return i}});var r=n(2265),o=n(1948);let i=function(e){let t=(0,o.E)(e);return r.useCallback(function(){for(var e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];return t.current(...n)},[t])}},4518:function(e,t,n){n.d(t,{e:function(){return i}});var r=n(2265),o=n(1424);let i=(e,t)=>{o.O.isServer?(0,r.useEffect)(e,t):(0,r.useLayoutEffect)(e,t)}},1948:function(e,t,n){n.d(t,{E:function(){return i}});var r=n(2265),o=n(4518);function i(e){let t=(0,r.useRef)(e);return(0,o.e)(()=>{t.current=e},[e]),t}},4:function(e,t,n){n.d(t,{f:function(){return u}});var r=n(2265),o=n(4518);function i(e){var t;if(e.type)return e.type;let n=null!=(t=e.as)?t:"button";if("string"==typeof n&&"button"===n.toLowerCase())return"button"}function u(e,t){let[n,u]=(0,r.useState)(()=>i(e));return(0,o.e)(()=>{u(i(e))},[e.type,e.as]),(0,o.e)(()=>{n||t.current&&t.current instanceof HTMLButtonElement&&!t.current.hasAttribute("type")&&u("button")},[n,t]),n}},3689:function(e,t,n){n.d(t,{T:function(){return a},h:function(){return u}});var r=n(2265),o=n(8036);let i=Symbol();function u(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1];return Object.assign(e,{[i]:t})}function a(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];let u=(0,r.useRef)(t);(0,r.useEffect)(()=>{u.current=t},[t]);let a=(0,o.z)(e=>{for(let t of u.current)null!=t&&("function"==typeof t?t(e):t.current=e)});return t.every(e=>null==e||(null==e?void 0:e[i]))?void 0:a}},7634:function(e,t,n){function r(e){let t=e.parentElement,n=null;for(;t&&!(t instanceof HTMLFieldSetElement);)t instanceof HTMLLegendElement&&(n=t),t=t.parentElement;let r=(null==t?void 0:t.getAttribute("disabled"))==="";return!(r&&function(e){if(!e)return!1;let t=e.previousElementSibling;for(;null!==t;){if(t instanceof HTMLLegendElement)return!1;t=t.previousElementSibling}return!0}(n))&&r}n.d(t,{P:function(){return r}})},2120:function(e,t,n){n.d(t,{A:function(){return r}});function r(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return Array.from(new Set(t.flatMap(e=>"string"==typeof e?e.split(" "):[]))).filter(Boolean).join(" ")}},5473:function(e,t,n){n.d(t,{k:function(){return function e(){let t=[],n={addEventListener:(e,t,r,o)=>(e.addEventListener(t,r,o),n.add(()=>e.removeEventListener(t,r,o))),requestAnimationFrame(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];let o=requestAnimationFrame(...t);return n.add(()=>cancelAnimationFrame(o))},nextFrame(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return n.requestAnimationFrame(()=>n.requestAnimationFrame(...t))},setTimeout(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];let o=setTimeout(...t);return n.add(()=>clearTimeout(o))},microTask(){for(var e=arguments.length,t=Array(e),o=0;o<e;o++)t[o]=arguments[o];let i={current:!0};return(0,r.Y)(()=>{i.current&&t[0]()}),n.add(()=>{i.current=!1})},style(e,t,n){let r=e.style.getPropertyValue(t);return Object.assign(e.style,{[t]:n}),this.add(()=>{Object.assign(e.style,{[t]:r})})},group(t){let n=e();return t(n),this.add(()=>n.dispose())},add:e=>(t.includes(e)||t.push(e),()=>{let n=t.indexOf(e);if(n>=0)for(let e of t.splice(n,1))e()}),dispose(){for(let e of t.splice(0))e()}};return n}}});var r=n(6822)},1424:function(e,t,n){n.d(t,{O:function(){return a}});var r=Object.defineProperty,o=(e,t,n)=>t in e?r(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,i=(e,t,n)=>(o(e,"symbol"!=typeof t?t+"":t,n),n);class u{set(e){this.current!==e&&(this.handoffState="pending",this.currentId=0,this.current=e)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return"server"===this.current}get isClient(){return"client"===this.current}detect(){return"undefined"==typeof window||"undefined"==typeof document?"server":"client"}handoff(){"pending"===this.handoffState&&(this.handoffState="complete")}get isHandoffComplete(){return"complete"===this.handoffState}constructor(){i(this,"current",this.detect()),i(this,"handoffState","pending"),i(this,"currentId",0)}}let a=new u},4536:function(e,t,n){n.d(t,{E:function(){return r}});function r(e,t){for(var n=arguments.length,o=Array(n>2?n-2:0),i=2;i<n;i++)o[i-2]=arguments[i];if(e in t){let n=t[e];return"function"==typeof n?n(...o):n}let u=Error('Tried to handle "'.concat(e,'" but there is no handler defined. Only defined handlers are: ').concat(Object.keys(t).map(e=>'"'.concat(e,'"')).join(", "),"."));throw Error.captureStackTrace&&Error.captureStackTrace(u,r),u}},6822:function(e,t,n){n.d(t,{Y:function(){return r}});function r(e){"function"==typeof queueMicrotask?queueMicrotask(e):Promise.resolve().then(e).catch(e=>setTimeout(()=>{throw e}))}},293:function(e,t,n){n.d(t,{r:function(){return o}});var r=n(1424);function o(e){return r.O.isServer?null:e instanceof Node?e.ownerDocument:null!=e&&e.hasOwnProperty("current")&&e.current instanceof Node?e.current.ownerDocument:document}},7847:function(e,t,n){let r,o;n.d(t,{VN:function(){return s},Y2:function(){return f},dG:function(){return g},l4:function(){return l},oA:function(){return h},sY:function(){return c},yV:function(){return m}});var i=n(2265),u=n(2120),a=n(4536),s=((r=s||{})[r.None=0]="None",r[r.RenderStrategy=1]="RenderStrategy",r[r.Static=2]="Static",r),l=((o=l||{})[o.Unmount=0]="Unmount",o[o.Hidden=1]="Hidden",o);function c(e){let{ourProps:t,theirProps:n,slot:r,defaultTag:o,features:i,visible:u=!0,name:s,mergeRefs:l}=e;l=null!=l?l:v;let c=p(n,t);if(u)return d(c,r,o,s,l);let f=null!=i?i:0;if(2&f){let{static:e=!1,...t}=c;if(e)return d(t,r,o,s,l)}if(1&f){let{unmount:e=!0,...t}=c;return(0,a.E)(e?0:1,{0:()=>null,1:()=>d({...t,hidden:!0,style:{display:"none"}},r,o,s,l)})}return d(c,r,o,s,l)}function d(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0,{as:a=n,children:s,refName:l="ref",...c}=y(e,["unmount","static"]),d=void 0!==e.ref?{[l]:e.ref}:{},f="function"==typeof s?s(t):s;"className"in c&&c.className&&"function"==typeof c.className&&(c.className=c.className(t)),c["aria-labelledby"]&&c["aria-labelledby"]===c.id&&(c["aria-labelledby"]=void 0);let v={};if(t){let e=!1,n=[];for(let[r,o]of Object.entries(t))"boolean"==typeof o&&(e=!0),!0===o&&n.push(r.replace(/([A-Z])/g,e=>"-".concat(e.toLowerCase())));if(e)for(let e of(v["data-headlessui-state"]=n.join(" "),n))v["data-".concat(e)]=""}if(a===i.Fragment&&(Object.keys(h(c)).length>0||Object.keys(h(v)).length>0)){if(!(0,i.isValidElement)(f)||Array.isArray(f)&&f.length>1){if(Object.keys(h(c)).length>0)throw Error(['Passing props on "Fragment"!',"","The current component <".concat(r,' /> is rendering a "Fragment".'),"However we need to passthrough the following props:",Object.keys(h(c)).concat(Object.keys(h(v))).map(e=>"  - ".concat(e)).join("\n"),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map(e=>"  - ".concat(e)).join("\n")].join("\n"))}else{let e=f.props,t=null==e?void 0:e.className,n="function"==typeof t?function(){for(var e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];return(0,u.A)(t(...n),c.className)}:(0,u.A)(t,c.className),r=p(f.props,h(y(c,["ref"])));for(let e in v)e in r&&delete v[e];return(0,i.cloneElement)(f,Object.assign({},r,v,d,{ref:o(f.ref,d.ref)},n?{className:n}:{}))}}return(0,i.createElement)(a,Object.assign({},y(c,["ref"]),a!==i.Fragment&&d,a!==i.Fragment&&v),f)}function f(){let e=(0,i.useRef)([]),t=(0,i.useCallback)(t=>{for(let n of e.current)null!=n&&("function"==typeof n?n(t):n.current=t)},[]);return function(){for(var n=arguments.length,r=Array(n),o=0;o<n;o++)r[o]=arguments[o];if(!r.every(e=>null==e))return e.current=r,t}}function v(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.every(e=>null==e)?void 0:e=>{for(let n of t)null!=n&&("function"==typeof n?n(e):n.current=e)}}function p(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];if(0===t.length)return{};if(1===t.length)return t[0];let r={},o={};for(let e of t)for(let t in e)t.startsWith("on")&&"function"==typeof e[t]?(null!=o[t]||(o[t]=[]),o[t].push(e[t])):r[t]=e[t];if(r.disabled||r["aria-disabled"])for(let e in o)/^(on(?:Click|Pointer|Mouse|Key)(?:Down|Up|Press)?)$/.test(e)&&(o[e]=[e=>{var t;return null==(t=null==e?void 0:e.preventDefault)?void 0:t.call(e)}]);for(let e in o)Object.assign(r,{[e](t){for(var n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];for(let n of o[e]){if((t instanceof Event||(null==t?void 0:t.nativeEvent)instanceof Event)&&t.defaultPrevented)return;n(t,...r)}}});return r}function g(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];if(0===t.length)return{};if(1===t.length)return t[0];let r={},o={};for(let e of t)for(let t in e)t.startsWith("on")&&"function"==typeof e[t]?(null!=o[t]||(o[t]=[]),o[t].push(e[t])):r[t]=e[t];for(let e in o)Object.assign(r,{[e](){for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];for(let t of o[e])null==t||t(...n)}});return r}function m(e){var t;return Object.assign((0,i.forwardRef)(e),{displayName:null!=(t=e.displayName)?t:e.name})}function h(e){let t=Object.assign({},e);for(let e in t)void 0===t[e]&&delete t[e];return t}function y(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=Object.assign({},e);for(let e of t)e in n&&delete n[e];return n}},2664:function(e,t,n){n.d(t,{F:function(){return A}});let r=e=>{var t;return null!==(t=null==e?void 0:e.ownerDocument)&&void 0!==t?t:document},o=e=>e&&"window"in e&&e.window===e?e:r(e).defaultView||window;var i=n(2265);let u=null,a=new Set,s=new Map,l=!1,c=!1,d={Tab:!0,Escape:!0};function f(e,t){for(let n of a)n(e,t)}function v(e){var t,n;l=!0,e.metaKey||(t=/^Mac/i,!("undefined"!=typeof window&&null!=window.navigator&&t.test((null===(n=window.navigator.userAgentData)||void 0===n?void 0:n.platform)||window.navigator.platform))&&e.altKey)||e.ctrlKey||"Control"===e.key||"Shift"===e.key||"Meta"===e.key||(u="keyboard",f("keyboard",e))}function p(e){u="pointer",("mousedown"===e.type||"pointerdown"===e.type)&&(l=!0,f("pointer",e))}function g(e){var t,n;(0===e.mozInputSource&&e.isTrusted?0:(t=/Android/i,"undefined"!=typeof window&&null!=window.navigator&&((null===(n=window.navigator.userAgentData)||void 0===n?void 0:n.brands.some(e=>t.test(e.brand)))||t.test(window.navigator.userAgent))&&e.pointerType)?"click"!==e.type||1!==e.buttons:0!==e.detail||e.pointerType)||(l=!0,u="virtual")}function m(e){e.target!==window&&e.target!==document&&(l||c||(u="virtual",f("virtual",e)),l=!1,c=!1)}function h(){l=!1,c=!0}function y(e){if("undefined"==typeof window||s.get(o(e)))return;let t=o(e),n=r(e),i=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){l=!0,i.apply(this,arguments)},n.addEventListener("keydown",v,!0),n.addEventListener("keyup",v,!0),n.addEventListener("click",g,!0),t.addEventListener("focus",m,!0),t.addEventListener("blur",h,!1),"undefined"!=typeof PointerEvent?(n.addEventListener("pointerdown",p,!0),n.addEventListener("pointermove",p,!0),n.addEventListener("pointerup",p,!0)):(n.addEventListener("mousedown",p,!0),n.addEventListener("mousemove",p,!0),n.addEventListener("mouseup",p,!0)),t.addEventListener("beforeunload",()=>{b(e)},{once:!0}),s.set(t,{focus:i})}let b=(e,t)=>{let n=o(e),i=r(e);t&&i.removeEventListener("DOMContentLoaded",t),s.has(n)&&(n.HTMLElement.prototype.focus=s.get(n).focus,i.removeEventListener("keydown",v,!0),i.removeEventListener("keyup",v,!0),i.removeEventListener("click",g,!0),n.removeEventListener("focus",m,!0),n.removeEventListener("blur",h,!1),"undefined"!=typeof PointerEvent?(i.removeEventListener("pointerdown",p,!0),i.removeEventListener("pointermove",p,!0),i.removeEventListener("pointerup",p,!0)):(i.removeEventListener("mousedown",p,!0),i.removeEventListener("mousemove",p,!0),i.removeEventListener("mouseup",p,!0)),s.delete(n))};function E(){return"pointer"!==u}"undefined"!=typeof document&&function(e){let t;let n=r(void 0);"loading"!==n.readyState?y(void 0):(t=()=>{y(void 0)},n.addEventListener("DOMContentLoaded",t)),()=>b(e,t)}();let w=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]),T="undefined"!=typeof document?i.useLayoutEffect:()=>{};class L{isDefaultPrevented(){return this.nativeEvent.defaultPrevented}preventDefault(){this.defaultPrevented=!0,this.nativeEvent.preventDefault()}stopPropagation(){this.nativeEvent.stopPropagation(),this.isPropagationStopped=()=>!0}isPropagationStopped(){return!1}persist(){}constructor(e,t){this.nativeEvent=t,this.target=t.target,this.currentTarget=t.currentTarget,this.relatedTarget=t.relatedTarget,this.bubbles=t.bubbles,this.cancelable=t.cancelable,this.defaultPrevented=t.defaultPrevented,this.eventPhase=t.eventPhase,this.isTrusted=t.isTrusted,this.timeStamp=t.timeStamp,this.type=e}}function P(e){let t=(0,i.useRef)({isFocused:!1,observer:null});T(()=>{let e=t.current;return()=>{e.observer&&(e.observer.disconnect(),e.observer=null)}},[]);let n=function(e){let t=(0,i.useRef)(null);return T(()=>{t.current=e},[e]),(0,i.useCallback)((...e)=>{let n=t.current;return null==n?void 0:n(...e)},[])}(t=>{null==e||e(t)});return(0,i.useCallback)(e=>{if(e.target instanceof HTMLButtonElement||e.target instanceof HTMLInputElement||e.target instanceof HTMLTextAreaElement||e.target instanceof HTMLSelectElement){t.current.isFocused=!0;let r=e.target;r.addEventListener("focusout",e=>{t.current.isFocused=!1,r.disabled&&n(new L("blur",e)),t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)},{once:!0}),t.current.observer=new MutationObserver(()=>{if(t.current.isFocused&&r.disabled){var e;null===(e=t.current.observer)||void 0===e||e.disconnect();let n=r===document.activeElement?null:document.activeElement;r.dispatchEvent(new FocusEvent("blur",{relatedTarget:n})),r.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:n}))}}),t.current.observer.observe(r,{attributes:!0,attributeFilter:["disabled"]})}},[n])}function A(e={}){var t,n,u;let{autoFocus:s=!1,isTextInput:l,within:c}=e,f=(0,i.useRef)({isFocused:!1,isFocusVisible:s||E()}),[v,p]=(0,i.useState)(!1),[g,m]=(0,i.useState)(()=>f.current.isFocused&&f.current.isFocusVisible),h=(0,i.useCallback)(()=>m(f.current.isFocused&&f.current.isFocusVisible),[]),b=(0,i.useCallback)(e=>{f.current.isFocused=e,p(e),h()},[h]);t=e=>{f.current.isFocusVisible=e,h()},n=[],u={isTextInput:l},y(),(0,i.useEffect)(()=>{let e=(e,n)=>{(function(e,t,n){var r;let i="undefined"!=typeof window?o(null==n?void 0:n.target).HTMLInputElement:HTMLInputElement,u="undefined"!=typeof window?o(null==n?void 0:n.target).HTMLTextAreaElement:HTMLTextAreaElement,a="undefined"!=typeof window?o(null==n?void 0:n.target).HTMLElement:HTMLElement,s="undefined"!=typeof window?o(null==n?void 0:n.target).KeyboardEvent:KeyboardEvent;return!((e=e||(null==n?void 0:n.target)instanceof i&&!w.has(null==n?void 0:null===(r=n.target)||void 0===r?void 0:r.type)||(null==n?void 0:n.target)instanceof u||(null==n?void 0:n.target)instanceof a&&(null==n?void 0:n.target.isContentEditable))&&"keyboard"===t&&n instanceof s&&!d[n.key])})(!!(null==u?void 0:u.isTextInput),e,n)&&t(E())};return a.add(e),()=>{a.delete(e)}},n);let{focusProps:T}=function(e){let{isDisabled:t,onFocus:n,onBlur:o,onFocusChange:u}=e,a=(0,i.useCallback)(e=>{if(e.target===e.currentTarget)return o&&o(e),u&&u(!1),!0},[o,u]),s=P(a),l=(0,i.useCallback)(e=>{let t=r(e.target);e.target===e.currentTarget&&t.activeElement===e.target&&(n&&n(e),u&&u(!0),s(e))},[u,n,s]);return{focusProps:{onFocus:!t&&(n||u||o)?l:void 0,onBlur:!t&&(o||u)?a:void 0}}}({isDisabled:c,onFocusChange:b}),{focusWithinProps:L}=function(e){let{isDisabled:t,onBlurWithin:n,onFocusWithin:r,onFocusWithinChange:o}=e,u=(0,i.useRef)({isFocusWithin:!1}),a=(0,i.useCallback)(e=>{u.current.isFocusWithin&&!e.currentTarget.contains(e.relatedTarget)&&(u.current.isFocusWithin=!1,n&&n(e),o&&o(!1))},[n,o,u]),s=P(a),l=(0,i.useCallback)(e=>{u.current.isFocusWithin||document.activeElement!==e.target||(r&&r(e),o&&o(!0),u.current.isFocusWithin=!0,s(e))},[r,o,s]);return t?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:l,onBlur:a}}}({isDisabled:!c,onFocusWithinChange:b});return{isFocused:v,isFocusVisible:g,focusProps:c?L:T}}},1323:function(e,t,n){n.d(t,{X:function(){return l}});var r=n(2265);let o=!1,i=0;function u(){o=!0,setTimeout(()=>{o=!1},50)}function a(e){"touch"===e.pointerType&&u()}function s(){if("undefined"!=typeof document)return"undefined"!=typeof PointerEvent?document.addEventListener("pointerup",a):document.addEventListener("touchend",u),i++,()=>{--i>0||("undefined"!=typeof PointerEvent?document.removeEventListener("pointerup",a):document.removeEventListener("touchend",u))}}function l(e){let{onHoverStart:t,onHoverChange:n,onHoverEnd:i,isDisabled:u}=e,[a,l]=(0,r.useState)(!1),c=(0,r.useRef)({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;(0,r.useEffect)(s,[]);let{hoverProps:d,triggerHoverEnd:f}=(0,r.useMemo)(()=>{let e=(e,r)=>{if(c.pointerType=r,u||"touch"===r||c.isHovered||!e.currentTarget.contains(e.target))return;c.isHovered=!0;let o=e.currentTarget;c.target=o,t&&t({type:"hoverstart",target:o,pointerType:r}),n&&n(!0),l(!0)},r=(e,t)=>{if(c.pointerType="",c.target=null,"touch"===t||!c.isHovered)return;c.isHovered=!1;let r=e.currentTarget;i&&i({type:"hoverend",target:r,pointerType:t}),n&&n(!1),l(!1)},a={};return"undefined"!=typeof PointerEvent?(a.onPointerEnter=t=>{o&&"mouse"===t.pointerType||e(t,t.pointerType)},a.onPointerLeave=e=>{!u&&e.currentTarget.contains(e.target)&&r(e,e.pointerType)}):(a.onTouchStart=()=>{c.ignoreEmulatedMouseEvents=!0},a.onMouseEnter=t=>{c.ignoreEmulatedMouseEvents||o||e(t,"mouse"),c.ignoreEmulatedMouseEvents=!1},a.onMouseLeave=e=>{!u&&e.currentTarget.contains(e.target)&&r(e,"mouse")}),{hoverProps:a,triggerHoverEnd:r}},[t,n,i,u,c]);return(0,r.useEffect)(()=>{u&&f({currentTarget:c.target},c.pointerType)},[u]),{hoverProps:d,isHovered:a}}}}]);