"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5042],{25042:function(e,t,n){n.d(t,{VY:function(){return q},h_:function(){return $},zt:function(){return H},fC:function(){return X},xz:function(){return V}});var r=n(7653);function o(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),!1===n||!r.defaultPrevented)return t?.(r)}}function i(...e){return r.useCallback(function(...e){return t=>e.forEach(e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)})}(...e),e)}var l=n(20379),a=n(36449),u=n(52608),s=n(45230),c=n(53425),d=n(90222);n(3458);var p=n(29602),f=n(27573),h=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce((e,t)=>{let n=r.forwardRef((e,n)=>{let{asChild:r,...o}=e,i=r?p.g7:t;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,f.jsx)(i,{...o,ref:n})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),x=n(65192),v=n(16167),[g,y]=(0,l.b)("Tooltip",[s.D7]),b=(0,s.D7)(),w="TooltipProvider",m="tooltip.open",[C,T]=g(w),E=e=>{let{__scopeTooltip:t,delayDuration:n=700,skipDelayDuration:o=300,disableHoverableContent:i=!1,children:l}=e,[a,u]=r.useState(!0),s=r.useRef(!1),c=r.useRef(0);return r.useEffect(()=>{let e=c.current;return()=>window.clearTimeout(e)},[]),(0,f.jsx)(C,{scope:t,isOpenDelayed:a,delayDuration:n,onOpen:r.useCallback(()=>{window.clearTimeout(c.current),u(!1)},[]),onClose:r.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>u(!0),o)},[o]),isPointerInTransitRef:s,onPointerInTransitChange:r.useCallback(e=>{s.current=e},[]),disableHoverableContent:i,children:l})};E.displayName=w;var k="Tooltip",[j,R]=g(k),L=e=>{let{__scopeTooltip:t,children:n,open:o,defaultOpen:i=!1,onOpenChange:l,disableHoverableContent:a,delayDuration:c}=e,d=T(k,e.__scopeTooltip),p=b(t),[h,v]=r.useState(null),g=(0,u.M)(),y=r.useRef(0),w=null!=a?a:d.disableHoverableContent,C=null!=c?c:d.delayDuration,E=r.useRef(!1),[R=!1,L]=(0,x.T)({prop:o,defaultProp:i,onChange:e=>{e?(d.onOpen(),document.dispatchEvent(new CustomEvent(m))):d.onClose(),null==l||l(e)}}),_=r.useMemo(()=>R?E.current?"delayed-open":"instant-open":"closed",[R]),P=r.useCallback(()=>{window.clearTimeout(y.current),E.current=!1,L(!0)},[L]),M=r.useCallback(()=>{window.clearTimeout(y.current),L(!1)},[L]),D=r.useCallback(()=>{window.clearTimeout(y.current),y.current=window.setTimeout(()=>{E.current=!0,L(!0)},C)},[C,L]);return r.useEffect(()=>()=>window.clearTimeout(y.current),[]),(0,f.jsx)(s.fC,{...p,children:(0,f.jsx)(j,{scope:t,contentId:g,open:R,stateAttribute:_,trigger:h,onTriggerChange:v,onTriggerEnter:r.useCallback(()=>{d.isOpenDelayed?D():P()},[d.isOpenDelayed,D,P]),onTriggerLeave:r.useCallback(()=>{w?M():window.clearTimeout(y.current)},[M,w]),onOpen:P,onClose:M,disableHoverableContent:w,children:n})})};L.displayName=k;var _="TooltipTrigger",P=r.forwardRef((e,t)=>{let{__scopeTooltip:n,...l}=e,a=R(_,n),u=T(_,n),c=b(n),d=i(t,r.useRef(null),a.onTriggerChange),p=r.useRef(!1),x=r.useRef(!1),v=r.useCallback(()=>p.current=!1,[]);return r.useEffect(()=>()=>document.removeEventListener("pointerup",v),[v]),(0,f.jsx)(s.ee,{asChild:!0,...c,children:(0,f.jsx)(h.button,{"aria-describedby":a.open?a.contentId:void 0,"data-state":a.stateAttribute,...l,ref:d,onPointerMove:o(e.onPointerMove,e=>{"touch"===e.pointerType||x.current||u.isPointerInTransitRef.current||(a.onTriggerEnter(),x.current=!0)}),onPointerLeave:o(e.onPointerLeave,()=>{a.onTriggerLeave(),x.current=!1}),onPointerDown:o(e.onPointerDown,()=>{p.current=!0,document.addEventListener("pointerup",v,{once:!0})}),onFocus:o(e.onFocus,()=>{p.current||a.onOpen()}),onBlur:o(e.onBlur,a.onClose),onClick:o(e.onClick,a.onClose)})})});P.displayName=_;var M="TooltipPortal",[D,N]=g(M,{forceMount:void 0}),O=e=>{let{__scopeTooltip:t,forceMount:n,children:r,container:o}=e,i=R(M,t);return(0,f.jsx)(D,{scope:t,forceMount:n,children:(0,f.jsx)(d.z,{present:n||i.open,children:(0,f.jsx)(c.h,{asChild:!0,container:o,children:r})})})};O.displayName=M;var I="TooltipContent",B=r.forwardRef((e,t)=>{let n=N(I,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...i}=e,l=R(I,e.__scopeTooltip);return(0,f.jsx)(d.z,{present:r||l.open,children:l.disableHoverableContent?(0,f.jsx)(Y,{side:o,...i,ref:t}):(0,f.jsx)(z,{side:o,...i,ref:t})})}),z=r.forwardRef((e,t)=>{let n=R(I,e.__scopeTooltip),o=T(I,e.__scopeTooltip),l=r.useRef(null),a=i(t,l),[u,s]=r.useState(null),{trigger:c,onClose:d}=n,p=l.current,{onPointerInTransitChange:h}=o,x=r.useCallback(()=>{s(null),h(!1)},[h]),v=r.useCallback((e,t)=>{let n=e.currentTarget,r={x:e.clientX,y:e.clientY},o=function(e,t){let n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(n,r,o,i)){case i:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw Error("unreachable")}}(r,n.getBoundingClientRect());s(function(e){let t=e.slice();return t.sort((e,t)=>e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:e.y>t.y?1:0),function(e){if(e.length<=1)return e.slice();let t=[];for(let n=0;n<e.length;n++){let r=e[n];for(;t.length>=2;){let e=t[t.length-1],n=t[t.length-2];if((e.x-n.x)*(r.y-n.y)>=(e.y-n.y)*(r.x-n.x))t.pop();else break}t.push(r)}t.pop();let n=[];for(let t=e.length-1;t>=0;t--){let r=e[t];for(;n.length>=2;){let e=n[n.length-1],t=n[n.length-2];if((e.x-t.x)*(r.y-t.y)>=(e.y-t.y)*(r.x-t.x))n.pop();else break}n.push(r)}return(n.pop(),1===t.length&&1===n.length&&t[0].x===n[0].x&&t[0].y===n[0].y)?t:t.concat(n)}(t)}([...function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:5,r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n})}return r}(r,o),...function(e){let{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}(t.getBoundingClientRect())])),h(!0)},[h]);return r.useEffect(()=>()=>x(),[x]),r.useEffect(()=>{if(c&&p){let e=e=>v(e,p),t=e=>v(e,c);return c.addEventListener("pointerleave",e),p.addEventListener("pointerleave",t),()=>{c.removeEventListener("pointerleave",e),p.removeEventListener("pointerleave",t)}}},[c,p,v,x]),r.useEffect(()=>{if(u){let e=e=>{let t=e.target,n={x:e.clientX,y:e.clientY},r=(null==c?void 0:c.contains(t))||(null==p?void 0:p.contains(t)),o=!function(e,t){let{x:n,y:r}=e,o=!1;for(let e=0,i=t.length-1;e<t.length;i=e++){let l=t[e].x,a=t[e].y,u=t[i].x,s=t[i].y;a>r!=s>r&&n<(u-l)*(r-a)/(s-a)+l&&(o=!o)}return o}(n,u);r?x():o&&(x(),d())};return document.addEventListener("pointermove",e),()=>document.removeEventListener("pointermove",e)}},[c,p,u,d,x]),(0,f.jsx)(Y,{...e,ref:a})}),[A,S]=g(k,{isInside:!1}),Y=r.forwardRef((e,t)=>{let{__scopeTooltip:n,children:o,"aria-label":i,onEscapeKeyDown:l,onPointerDownOutside:u,...c}=e,d=R(I,n),h=b(n),{onClose:x}=d;return r.useEffect(()=>(document.addEventListener(m,x),()=>document.removeEventListener(m,x)),[x]),r.useEffect(()=>{if(d.trigger){let e=e=>{let t=e.target;(null==t?void 0:t.contains(d.trigger))&&x()};return window.addEventListener("scroll",e,{capture:!0}),()=>window.removeEventListener("scroll",e,{capture:!0})}},[d.trigger,x]),(0,f.jsx)(a.XB,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:e=>e.preventDefault(),onDismiss:x,children:(0,f.jsxs)(s.VY,{"data-state":d.stateAttribute,...h,...c,ref:t,style:{...c.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[(0,f.jsx)(p.A4,{children:o}),(0,f.jsx)(A,{scope:n,isInside:!0,children:(0,f.jsx)(v.f,{id:d.contentId,role:"tooltip",children:i||o})})]})})});B.displayName=I;var F="TooltipArrow";r.forwardRef((e,t)=>{let{__scopeTooltip:n,...r}=e,o=b(n);return S(F,n).isInside?null:(0,f.jsx)(s.Eh,{...o,...r,ref:t})}).displayName=F;var H=E,X=L,V=P,$=O,q=B}}]);