"use strict"; !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="b637b995-11be-591e-80f0-ef6d80c12094")}catch(e){}}(); (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[375],{84514:(e,t)=>{t.r=function(e){if(!e)return!0;if(Array.isArray(e)&&e.length>1)return!1;var t=function(e,t){void 0===t&&(t=2);for(var n=[],r=e;r;)try{if(n.length>t)return[];var o=decodeURIComponent(r);if(o.startsWith("//"))throw Error("Relative URL can't start with double slashes");if(o.includes("\\"))throw Error("URL can't contain backslashes");var i=void 0;i=o.startsWith("/")?new URL(o,"https://vercel.com"):new URL(o),n.push(i),r=i.searchParams.get("next")}catch(e){return[]}return n}((Array.isArray(e)?e[0]:e).replace(/\s/g,""));if(!t.length)return!1;for(var i=0;i{function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,t){return(o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function i(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function a(e){return(a=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var s=n(72303),u=n(81003),l=n(86829).createFocusTrap,c=n(98386).isFocusable,d=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&o(e,t)}(l,e);var t,n,u=(t=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,n=a(l);return e=t?Reflect.construct(n,arguments,a(this).constructor):n.apply(this,arguments),function(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");return i(e)}(this,e)});function l(e){!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,l),t=i(o=u.call(this,e)),n="getNodeForOption",r=function(e){var t,n,r=null!==(t=this.internalOptions[e])&&void 0!==t?t:this.originalOptions[e];if("function"==typeof r){for(var o=arguments.length,i=Array(o>1?o-1:0),a=1;a element.");return s.cloneElement(t,{ref:function(n){var r=e.props.containerElements;t&&("function"==typeof t.ref?t.ref(n):t.ref&&(t.ref.current=n)),e.focusTrapElements=r||[n]}})}return null}}],function(e,t){for(var n=0;n{n.d(t,{A:()=>r});let r=function(e){return function(t){e.forEach(function(e){"function"==typeof e?e(t):null!=e&&(e.current=t)})}}},96093:(e,t,n)=>{n.d(t,{A:()=>u});var r=n(72303),o=n(4560);function i({debounce:e,scroll:t,polyfill:n}={debounce:0,scroll:!1}){var a;let u=n||("undefined"==typeof window?class{}:window.ResizeObserver);if(!u)throw Error("This browser does not support ResizeObserver out of the box. See: https://github.com/react-spring/react-use-measure/#resize-observer-polyfills");let[l,c]=(0,r.useState)({left:0,top:0,width:0,height:0,bottom:0,right:0,x:0,y:0}),d=(0,r.useRef)({element:null,scrollContainers:null,resizeObserver:null,lastBounds:l}),f=e?"number"==typeof e?e:e.scroll:null,p=e?"number"==typeof e?e:e.resize:null,[v,h]=(0,r.useMemo)(()=>{let e=()=>{if(!d.current.element)return;let{left:e,top:t,width:n,height:r,bottom:o,right:i,x:a,y:u}=d.current.element.getBoundingClientRect(),l={left:e,top:t,width:n,height:r,bottom:o,right:i,x:a,y:u};Object.freeze(l),s(d.current.lastBounds,l)||c(d.current.lastBounds=l)};return[p?(0,o.debounce)(e,p):e,f?(0,o.debounce)(e,f):e]},[c,f,p]);function m(){d.current.scrollContainers&&(d.current.scrollContainers.forEach(e=>{e.removeEventListener("scroll",h,!0)}),d.current.scrollContainers=null),d.current.resizeObserver&&(d.current.resizeObserver.disconnect(),d.current.resizeObserver=null)}function y(){d.current.element&&(d.current.resizeObserver=new u(h),d.current.resizeObserver.observe(d.current.element),t&&d.current.scrollContainers&&d.current.scrollContainers.forEach(e=>{e.addEventListener("scroll",h,{capture:!0,passive:!0})}))}return a=!!t,(0,r.useEffect)(()=>{if(a)return window.addEventListener("scroll",h,{capture:!0,passive:!0}),()=>window.removeEventListener("scroll",h,!0)},[h,a]),(0,r.useEffect)(()=>(window.addEventListener("resize",v),()=>{window.removeEventListener("resize",v)}),[v]),(0,r.useEffect)(()=>{m(),y()},[t,h,v]),(0,r.useEffect)(()=>m,[]),[e=>{e&&e!==d.current.element&&(m(),d.current.element=e,d.current.scrollContainers=function e(t){let n=[];if(!t||t===document.body)return n;let{overflow:r,overflowX:o,overflowY:i}=window.getComputedStyle(t);return[r,o,i].some(e=>"auto"===e||"scroll"===e)&&n.push(t),[...n,...e(t.parentElement)]}(e),y())},l]}e=n.hmd(e);let a=["x","y","top","bottom","left","right","width","height"],s=(e,t)=>a.every(n=>e[n]===t[n]);Object.getOwnPropertyDescriptor&&Object.getOwnPropertyDescriptor(e,"exports").writable&&(e.exports=i);let u=i},98386:(e,t,n)=>{n.r(t),n.d(t,{focusable:()=>O,isFocusable:()=>D,isTabbable:()=>T,tabbable:()=>C});var r=["input","select","textarea","a[href]","button","[tabindex]:not(slot)","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])',"details>summary:first-of-type","details"],o=r.join(","),i="undefined"==typeof Element,a=i?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,s=!i&&Element.prototype.getRootNode?function(e){return e.getRootNode()}:function(e){return e.ownerDocument},u=function(e,t,n){var r=Array.prototype.slice.apply(e.querySelectorAll(o));return t&&a.call(e,o)&&r.unshift(e),r=r.filter(n)},l=function e(t,n,r){for(var i=[],s=Array.from(t);s.length;){var u=s.shift();if("SLOT"===u.tagName){var l=u.assignedElements(),c=e(l.length?l:u.children,!0,r);r.flatten?i.push.apply(i,c):i.push({scope:u,candidates:c})}else{a.call(u,o)&&r.filter(u)&&(n||!t.includes(u))&&i.push(u);var d=u.shadowRoot||"function"==typeof r.getShadowRoot&&r.getShadowRoot(u),f=!r.shadowRootFilter||r.shadowRootFilter(u);if(d&&f){var p=e(!0===d?u.children:d.children,!0,r);r.flatten?i.push.apply(i,p):i.push({scope:u,candidates:p})}else s.unshift.apply(s,u.children)}}return i},c=function(e,t){return e.tabIndex<0&&(t||/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||e.isContentEditable)&&isNaN(parseInt(e.getAttribute("tabindex"),10))?0:e.tabIndex},d=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},f=function(e){return"INPUT"===e.tagName},p=function(e,t){for(var n=0;nsummary:first-of-type")?e.parentElement:e;if(a.call(o,"details:not([open]) *"))return!0;if(n&&"full"!==n&&"legacy-full"!==n){if("non-zero-area"===n)return m(e)}else{if("function"==typeof r){for(var i=e;e;){var u=e.parentElement,l=s(e);if(u&&!u.shadowRoot&&!0===r(u))return m(e);e=e.assignedSlot?e.assignedSlot:u||l===e.ownerDocument?u:l.host}e=i}if(h(e))return!e.getClientRects().length;if("legacy-full"!==n)return!0}return!1},w=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if("FIELDSET"===t.tagName&&t.disabled){for(var n=0;nc(t))&&!!g(e,t)},E=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!isNaN(t)||t>=0},R=function e(t){var n=[],r=[];return t.forEach(function(t,o){var i=!!t.scope,a=i?t.scope:t,s=c(a,i),u=i?e(t.candidates):a;0===s?i?n.push.apply(n,u):n.push(a):r.push({documentOrder:o,tabIndex:s,item:t,isScope:i,content:u})}),r.sort(d).reduce(function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e},[]).concat(n)},C=function(e,t){return R((t=t||{}).getShadowRoot?l([e],t.includeContainer,{filter:b.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:E}):u(e,t.includeContainer,b.bind(null,t)))},O=function(e,t){return(t=t||{}).getShadowRoot?l([e],t.includeContainer,{filter:g.bind(null,t),flatten:!0,getShadowRoot:t.getShadowRoot}):u(e,t.includeContainer,g.bind(null,t))},T=function(e,t){if(t=t||{},!e)throw Error("No node provided");return!1!==a.call(e,o)&&b(t,e)},x=r.concat("iframe").join(","),D=function(e,t){if(t=t||{},!e)throw Error("No node provided");return!1!==a.call(e,x)&&g(t,e)}},17678:(e,t,n)=>{n.d(t,{N:()=>u});var r=n(72303),o=n(3539),i=n(4571),a=n(11759),s=n(9479);function u(e){let t=e+"CollectionProvider",[n,u]=(0,o.A)(t),[l,c]=n(t,{collectionRef:{current:null},itemMap:new Map}),d=e=>{let{scope:t,children:n}=e,o=r.useRef(null),i=r.useRef(new Map).current;return(0,s.jsx)(l,{scope:t,itemMap:i,collectionRef:o,children:n})};d.displayName=t;let f=e+"CollectionSlot",p=r.forwardRef((e,t)=>{let{scope:n,children:r}=e,o=c(f,n),u=(0,i.s)(t,o.collectionRef);return(0,s.jsx)(a.DX,{ref:u,children:r})});p.displayName=f;let v=e+"CollectionItemSlot",h="data-radix-collection-item",m=r.forwardRef((e,t)=>{let{scope:n,children:o,...u}=e,l=r.useRef(null),d=(0,i.s)(t,l),f=c(v,n);return r.useEffect(()=>(f.itemMap.set(l,{ref:l,...u}),()=>void f.itemMap.delete(l))),(0,s.jsx)(a.DX,{[h]:"",ref:d,children:o})});return m.displayName=v,[{Provider:d,Slot:p,ItemSlot:m},function(t){let n=c(e+"CollectionConsumer",t);return r.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll("[".concat(h,"]")));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])},u]}},54411:(e,t,n)=>{n.d(t,{jH:()=>i});var r=n(72303);n(9479);var o=r.createContext(void 0);function i(e){let t=r.useContext(o);return e||t||"ltr"}},95796:(e,t,n)=>{n.d(t,{UC:()=>eg,C1:()=>ew,q7:()=>eh,N_:()=>ey,B8:()=>ev,bL:()=>ep,l9:()=>em,LM:()=>eb});var r=n(72303),o=n(71966),i=n(3539),a=n(46854),s=n(95542),u=n(98275),l=n(4571),c=n(54411),d=n(95164),f=n(9923),p=n(17678),v=n(34400),h=n(32235),m=n(3401),y=n(4099),w=n(9479),g=r.forwardRef((e,t)=>(0,w.jsx)(s.sG.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));g.displayName="VisuallyHidden";var b="NavigationMenu",[E,R,C]=(0,p.N)(b),[O,T,x]=(0,p.N)(b),[D,k]=(0,i.A)(b,[C,x]),[N,S]=D(b),[j,P]=D(b),F=r.forwardRef((e,t)=>{let{__scopeNavigationMenu:n,value:o,onValueChange:i,defaultValue:a,delayDuration:d=200,skipDelayDuration:f=300,orientation:p="horizontal",dir:v,...h}=e,[m,y]=r.useState(null),g=(0,l.s)(t,e=>y(e)),b=(0,c.jH)(v),E=r.useRef(0),R=r.useRef(0),C=r.useRef(0),[O,T]=r.useState(!0),[x="",D]=(0,u.i)({prop:o,onChange:e=>{let t=f>0;""!==e?(window.clearTimeout(C.current),t&&T(!1)):(window.clearTimeout(C.current),C.current=window.setTimeout(()=>T(!0),f)),null==i||i(e)},defaultProp:a}),k=r.useCallback(()=>{window.clearTimeout(R.current),R.current=window.setTimeout(()=>D(""),150)},[D]),N=r.useCallback(e=>{window.clearTimeout(R.current),D(e)},[D]),S=r.useCallback(e=>{x===e?window.clearTimeout(R.current):E.current=window.setTimeout(()=>{window.clearTimeout(R.current),D(e)},d)},[x,D,d]);return r.useEffect(()=>()=>{window.clearTimeout(E.current),window.clearTimeout(R.current),window.clearTimeout(C.current)},[]),(0,w.jsx)(A,{scope:n,isRootMenu:!0,value:x,dir:b,orientation:p,rootNavigationMenu:m,onTriggerEnter:e=>{window.clearTimeout(E.current),O?S(e):N(e)},onTriggerLeave:()=>{window.clearTimeout(E.current),k()},onContentEnter:()=>window.clearTimeout(R.current),onContentLeave:k,onItemSelect:e=>{D(t=>t===e?"":e)},onItemDismiss:()=>D(""),children:(0,w.jsx)(s.sG.nav,{"aria-label":"Main","data-orientation":p,dir:b,...h,ref:g})})});F.displayName=b;var M="NavigationMenuSub";r.forwardRef((e,t)=>{let{__scopeNavigationMenu:n,value:r,onValueChange:o,defaultValue:i,orientation:a="horizontal",...l}=e,c=S(M,n),[d="",f]=(0,u.i)({prop:r,onChange:o,defaultProp:i});return(0,w.jsx)(A,{scope:n,isRootMenu:!1,value:d,dir:c.dir,orientation:a,rootNavigationMenu:c.rootNavigationMenu,onTriggerEnter:e=>f(e),onItemSelect:e=>f(e),onItemDismiss:()=>f(""),children:(0,w.jsx)(s.sG.div,{"data-orientation":a,...l,ref:t})})}).displayName=M;var A=e=>{let{scope:t,isRootMenu:n,rootNavigationMenu:o,dir:i,orientation:a,children:s,value:u,onItemSelect:l,onItemDismiss:c,onTriggerEnter:d,onTriggerLeave:p,onContentEnter:v,onContentLeave:m}=e,[g,b]=r.useState(null),[R,C]=r.useState(new Map),[O,T]=r.useState(null);return(0,w.jsx)(N,{scope:t,isRootMenu:n,rootNavigationMenu:o,value:u,previousValue:(0,h.Z)(u),baseId:(0,f.B)(),dir:i,orientation:a,viewport:g,onViewportChange:b,indicatorTrack:O,onIndicatorTrackChange:T,onTriggerEnter:(0,y.c)(d),onTriggerLeave:(0,y.c)(p),onContentEnter:(0,y.c)(v),onContentLeave:(0,y.c)(m),onItemSelect:(0,y.c)(l),onItemDismiss:(0,y.c)(c),onViewportContentChange:r.useCallback((e,t)=>{C(n=>(n.set(e,t),new Map(n)))},[]),onViewportContentRemove:r.useCallback(e=>{C(t=>t.has(e)?(t.delete(e),new Map(t)):t)},[]),children:(0,w.jsx)(E.Provider,{scope:t,children:(0,w.jsx)(j,{scope:t,items:R,children:s})})})},I="NavigationMenuList",L=r.forwardRef((e,t)=>{let{__scopeNavigationMenu:n,...r}=e,o=S(I,n),i=(0,w.jsx)(s.sG.ul,{"data-orientation":o.orientation,...r,ref:t});return(0,w.jsx)(s.sG.div,{style:{position:"relative"},ref:o.onIndicatorTrackChange,children:(0,w.jsx)(E.Slot,{scope:n,children:o.isRootMenu?(0,w.jsx)(er,{asChild:!0,children:i}):i})})});L.displayName=I;var _="NavigationMenuItem",[z,$]=D(_),U=r.forwardRef((e,t)=>{let{__scopeNavigationMenu:n,value:o,...i}=e,a=(0,f.B)(),u=r.useRef(null),l=r.useRef(null),c=r.useRef(null),d=r.useRef(()=>{}),p=r.useRef(!1),v=r.useCallback(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"start";if(u.current){d.current();let t=ea(u.current);t.length&&es("start"===e?t:t.reverse())}},[]),h=r.useCallback(()=>{if(u.current){let e=ea(u.current);e.length&&(d.current=function(e){return e.forEach(e=>{e.dataset.tabindex=e.getAttribute("tabindex")||"",e.setAttribute("tabindex","-1")}),()=>{e.forEach(e=>{let t=e.dataset.tabindex;e.setAttribute("tabindex",t)})}}(e))}},[]);return(0,w.jsx)(z,{scope:n,value:o||a||"LEGACY_REACT_AUTO_VALUE",triggerRef:l,contentRef:u,focusProxyRef:c,wasEscapeCloseRef:p,onEntryKeyDown:v,onFocusProxyEnter:v,onRootContentClose:h,onContentFocusOutside:h,children:(0,w.jsx)(s.sG.li,{...i,ref:t})})});U.displayName=_;var K="NavigationMenuTrigger",G=r.forwardRef((e,t)=>{let{__scopeNavigationMenu:n,disabled:o,...i}=e,u=S(K,e.__scopeNavigationMenu),c=$(K,e.__scopeNavigationMenu),d=r.useRef(null),f=(0,l.s)(d,c.triggerRef,t),p=ec(u.baseId,c.value),v=ed(u.baseId,c.value),h=r.useRef(!1),m=r.useRef(!1),y=c.value===u.value;return(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(E.ItemSlot,{scope:n,value:c.value,children:(0,w.jsx)(ei,{asChild:!0,children:(0,w.jsx)(s.sG.button,{id:p,disabled:o,"data-disabled":o?"":void 0,"data-state":el(y),"aria-expanded":y,"aria-controls":v,...i,ref:f,onPointerEnter:(0,a.m)(e.onPointerEnter,()=>{m.current=!1,c.wasEscapeCloseRef.current=!1}),onPointerMove:(0,a.m)(e.onPointerMove,ef(()=>{o||m.current||c.wasEscapeCloseRef.current||h.current||(u.onTriggerEnter(c.value),h.current=!0)})),onPointerLeave:(0,a.m)(e.onPointerLeave,ef(()=>{o||(u.onTriggerLeave(),h.current=!1)})),onClick:(0,a.m)(e.onClick,()=>{u.onItemSelect(c.value),m.current=y}),onKeyDown:(0,a.m)(e.onKeyDown,e=>{let t={horizontal:"ArrowDown",vertical:"rtl"===u.dir?"ArrowLeft":"ArrowRight"}[u.orientation];y&&e.key===t&&(c.onEntryKeyDown(),e.preventDefault())})})})}),y&&(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(g,{"aria-hidden":!0,tabIndex:0,ref:c.focusProxyRef,onFocus:e=>{let t=c.contentRef.current,n=e.relatedTarget,r=n===d.current,o=null==t?void 0:t.contains(n);(r||!o)&&c.onFocusProxyEnter(r?"start":"end")}}),u.viewport&&(0,w.jsx)("span",{"aria-owns":v})]})]})});G.displayName=K;var B="navigationMenu.linkSelect",V=r.forwardRef((e,t)=>{let{__scopeNavigationMenu:n,active:r,onSelect:o,...i}=e;return(0,w.jsx)(ei,{asChild:!0,children:(0,w.jsx)(s.sG.a,{"data-active":r?"":void 0,"aria-current":r?"page":void 0,...i,ref:t,onClick:(0,a.m)(e.onClick,e=>{let t=e.target,n=new CustomEvent(B,{bubbles:!0,cancelable:!0});if(t.addEventListener(B,e=>null==o?void 0:o(e),{once:!0}),(0,s.hO)(t,n),!n.defaultPrevented&&!e.metaKey){let e=new CustomEvent(J,{bubbles:!0,cancelable:!0});(0,s.hO)(t,e)}},{checkForDefaultPrevented:!1})})})});V.displayName="NavigationMenuLink";var W="NavigationMenuIndicator",q=r.forwardRef((e,t)=>{let{forceMount:n,...r}=e,i=S(W,e.__scopeNavigationMenu),a=!!i.value;return i.indicatorTrack?o.createPortal((0,w.jsx)(d.C,{present:n||a,children:(0,w.jsx)(H,{...r,ref:t})}),i.indicatorTrack):null});q.displayName=W;var H=r.forwardRef((e,t)=>{let{__scopeNavigationMenu:n,...o}=e,i=S(W,n),a=R(n),[u,l]=r.useState(null),[c,d]=r.useState(null),f="horizontal"===i.orientation,p=!!i.value;r.useEffect(()=>{var e;let t=null===(e=a().find(e=>e.value===i.value))||void 0===e?void 0:e.ref.current;t&&l(t)},[a,i.value]);let v=()=>{u&&d({size:f?u.offsetWidth:u.offsetHeight,offset:f?u.offsetLeft:u.offsetTop})};return eu(u,v),eu(i.indicatorTrack,v),c?(0,w.jsx)(s.sG.div,{"aria-hidden":!0,"data-state":p?"visible":"hidden","data-orientation":i.orientation,...o,ref:t,style:{position:"absolute",...f?{left:0,width:c.size+"px",transform:"translateX(".concat(c.offset,"px)")}:{top:0,height:c.size+"px",transform:"translateY(".concat(c.offset,"px)")},...o.style}}):null}),X="NavigationMenuContent",Y=r.forwardRef((e,t)=>{let{forceMount:n,...r}=e,o=S(X,e.__scopeNavigationMenu),i=$(X,e.__scopeNavigationMenu),s=(0,l.s)(i.contentRef,t),u=i.value===o.value,c={value:i.value,triggerRef:i.triggerRef,focusProxyRef:i.focusProxyRef,wasEscapeCloseRef:i.wasEscapeCloseRef,onContentFocusOutside:i.onContentFocusOutside,onRootContentClose:i.onRootContentClose,...r};return o.viewport?(0,w.jsx)(Z,{forceMount:n,...c,ref:s}):(0,w.jsx)(d.C,{present:n||u,children:(0,w.jsx)(Q,{"data-state":el(u),...c,ref:s,onPointerEnter:(0,a.m)(e.onPointerEnter,o.onContentEnter),onPointerLeave:(0,a.m)(e.onPointerLeave,ef(o.onContentLeave)),style:{pointerEvents:!u&&o.isRootMenu?"none":void 0,...c.style}})})});Y.displayName=X;var Z=r.forwardRef((e,t)=>{let{onViewportContentChange:n,onViewportContentRemove:r}=S(X,e.__scopeNavigationMenu);return(0,m.N)(()=>{n(e.value,{ref:t,...e})},[e,t,n]),(0,m.N)(()=>()=>r(e.value),[e.value,r]),null}),J="navigationMenu.rootContentDismiss",Q=r.forwardRef((e,t)=>{let{__scopeNavigationMenu:n,value:o,triggerRef:i,focusProxyRef:s,wasEscapeCloseRef:u,onRootContentClose:c,onContentFocusOutside:d,...f}=e,p=S(X,n),h=r.useRef(null),m=(0,l.s)(h,t),y=ec(p.baseId,o),g=ed(p.baseId,o),b=R(n),E=r.useRef(null),{onItemDismiss:C}=p;r.useEffect(()=>{let e=h.current;if(p.isRootMenu&&e){let t=()=>{var t;C(),c(),e.contains(document.activeElement)&&(null===(t=i.current)||void 0===t||t.focus())};return e.addEventListener(J,t),()=>e.removeEventListener(J,t)}},[p.isRootMenu,e.value,i,C,c]);let O=r.useMemo(()=>{let e=b().map(e=>e.value);"rtl"===p.dir&&e.reverse();let t=e.indexOf(p.value),n=e.indexOf(p.previousValue),r=o===p.value,i=n===e.indexOf(o);if(!r&&!i)return E.current;let a=(()=>{if(t!==n){if(r&&-1!==n)return t>n?"from-end":"from-start";if(i&&-1!==t)return t>n?"to-start":"to-end"}return null})();return E.current=a,a},[p.previousValue,p.value,p.dir,b,o]);return(0,w.jsx)(er,{asChild:!0,children:(0,w.jsx)(v.qW,{id:g,"aria-labelledby":y,"data-motion":O,"data-orientation":p.orientation,...f,ref:m,disableOutsidePointerEvents:!1,onDismiss:()=>{var e;let t=new Event(J,{bubbles:!0,cancelable:!0});null===(e=h.current)||void 0===e||e.dispatchEvent(t)},onFocusOutside:(0,a.m)(e.onFocusOutside,e=>{var t;d();let n=e.target;(null===(t=p.rootNavigationMenu)||void 0===t?void 0:t.contains(n))&&e.preventDefault()}),onPointerDownOutside:(0,a.m)(e.onPointerDownOutside,e=>{var t;let n=e.target,r=b().some(e=>{var t;return null===(t=e.ref.current)||void 0===t?void 0:t.contains(n)}),o=p.isRootMenu&&(null===(t=p.viewport)||void 0===t?void 0:t.contains(n));(r||o||!p.isRootMenu)&&e.preventDefault()}),onKeyDown:(0,a.m)(e.onKeyDown,e=>{let t=e.altKey||e.ctrlKey||e.metaKey;if("Tab"===e.key&&!t){let t=ea(e.currentTarget),r=document.activeElement,o=t.findIndex(e=>e===r);if(es(e.shiftKey?t.slice(0,o).reverse():t.slice(o+1,t.length)))e.preventDefault();else{var n;null===(n=s.current)||void 0===n||n.focus()}}}),onEscapeKeyDown:(0,a.m)(e.onEscapeKeyDown,e=>{u.current=!0})})})}),ee="NavigationMenuViewport",et=r.forwardRef((e,t)=>{let{forceMount:n,...r}=e,o=!!S(ee,e.__scopeNavigationMenu).value;return(0,w.jsx)(d.C,{present:n||o,children:(0,w.jsx)(en,{...r,ref:t})})});et.displayName=ee;var en=r.forwardRef((e,t)=>{let{__scopeNavigationMenu:n,children:o,...i}=e,u=S(ee,n),c=(0,l.s)(t,u.onViewportChange),f=P(X,e.__scopeNavigationMenu),[p,v]=r.useState(null),[h,m]=r.useState(null),y=p?(null==p?void 0:p.width)+"px":void 0,g=p?(null==p?void 0:p.height)+"px":void 0,b=!!u.value,E=b?u.value:u.previousValue;return eu(h,()=>{h&&v({width:h.offsetWidth,height:h.offsetHeight})}),(0,w.jsx)(s.sG.div,{"data-state":el(b),"data-orientation":u.orientation,...i,ref:c,style:{pointerEvents:!b&&u.isRootMenu?"none":void 0,"--radix-navigation-menu-viewport-width":y,"--radix-navigation-menu-viewport-height":g,...i.style},onPointerEnter:(0,a.m)(e.onPointerEnter,u.onContentEnter),onPointerLeave:(0,a.m)(e.onPointerLeave,ef(u.onContentLeave)),children:Array.from(f.items).map(e=>{let[t,{ref:n,forceMount:r,...o}]=e,i=E===t;return(0,w.jsx)(d.C,{present:r||i,children:(0,w.jsx)(Q,{...o,ref:(0,l.t)(n,e=>{i&&e&&m(e)})})},t)})})}),er=r.forwardRef((e,t)=>{let{__scopeNavigationMenu:n,...r}=e,o=S("FocusGroup",n);return(0,w.jsx)(O.Provider,{scope:n,children:(0,w.jsx)(O.Slot,{scope:n,children:(0,w.jsx)(s.sG.div,{dir:o.dir,...r,ref:t})})})}),eo=["ArrowRight","ArrowLeft","ArrowUp","ArrowDown"],ei=r.forwardRef((e,t)=>{let{__scopeNavigationMenu:n,...r}=e,o=T(n),i=S("FocusGroupItem",n);return(0,w.jsx)(O.ItemSlot,{scope:n,children:(0,w.jsx)(s.sG.button,{...r,ref:t,onKeyDown:(0,a.m)(e.onKeyDown,e=>{if(["Home","End",...eo].includes(e.key)){let t=o().map(e=>e.ref.current);if(["rtl"===i.dir?"ArrowRight":"ArrowLeft","ArrowUp","End"].includes(e.key)&&t.reverse(),eo.includes(e.key)){let n=t.indexOf(e.currentTarget);t=t.slice(n+1)}setTimeout(()=>es(t)),e.preventDefault()}})})})});function ea(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function es(e){let t=document.activeElement;return e.some(e=>e===t||(e.focus(),document.activeElement!==t))}function eu(e,t){let n=(0,y.c)(t);(0,m.N)(()=>{let t=0;if(e){let r=new ResizeObserver(()=>{cancelAnimationFrame(t),t=window.requestAnimationFrame(n)});return r.observe(e),()=>{window.cancelAnimationFrame(t),r.unobserve(e)}}},[e,n])}function el(e){return e?"open":"closed"}function ec(e,t){return"".concat(e,"-trigger-").concat(t)}function ed(e,t){return"".concat(e,"-content-").concat(t)}function ef(e){return t=>"mouse"===t.pointerType?e(t):void 0}var ep=F,ev=L,eh=U,em=G,ey=V,ew=q,eg=Y,eb=et},32235:(e,t,n)=>{n.d(t,{Z:()=>o});var r=n(72303);function o(e){let t=r.useRef({value:e,previous:e});return r.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}}}]); //# debugId=b637b995-11be-591e-80f0-ef6d80c12094