1import{t as ee,f as P,u as _,m as te}from"./chunk-3TAVD5Y3-JLEfvKNw.js";import{c as w}from"./chunk-6BQDBGF4-B566eCa_.js";import{d as g}from"./chunk-MCFSCOSB--WO4Tv9A.js";import{c as I,x as ae,g as re,f as ne,l as se}from"./import-0kiaZdOS.js";import{r as x,j as i}from"./app-belrbPXN.js";import{R as oe}from"./Combination-asPpbgkX.js";import{$ as le}from"./import-CF4r66r5.js";import{A as ie,u as ce}from"./index-Cg9dHLmZ.js";import{m as L}from"./use-force-update-VB-OXXUy.js";import{a as V}from"./chunk-WUWNKKWR-zu7Kmz1i.js";import{d as ue}from"./chunk-XHQUSKIE-9yTKuk0T.js";import{a as de}from"./import-_-a0l05m.js";import{p as fe}from"./chunk-VMAPMSPF-sN-l8vC5.js";import{c as pe}from"./chunk-3XT5V4LF-zg9JoeIL.js";import{$ as me}from"./import-FK7Wx42j.js";var z=ee({slots:{base:["flex","z-40","w-full","h-auto","items-center","justify-center","data-[menu-open=true]:border-none"],wrapper:["z-40","flex","px-6","gap-4","w-full","flex-row","relative","flex-nowrap","items-center","justify-between","h-[var(--navbar-height)]"],toggle:["group","flex","items-center","justify-center","w-6","h-full","outline-none","rounded-small","tap-highlight-transparent",...ue],srOnly:["sr-only"],toggleIcon:["w-full","h-full","pointer-events-none","flex","flex-col","items-center","justify-center","text-inherit","group-data-[pressed=true]:opacity-70","transition-opacity","before:content-['']","before:block","before:h-px","before:w-6","before:bg-current","before:transition-transform","before:duration-150","before:-translate-y-1","before:rotate-0","group-data-[open=true]:before:translate-y-px","group-data-[open=true]:before:rotate-45","after:content-['']","after:block","after:h-px","after:w-6","after:bg-current","after:transition-transform","after:duration-150","after:translate-y-1","after:rotate-0","group-data-[open=true]:after:translate-y-0","group-data-[open=true]:after:-rotate-45"],brand:["flex","basis-0","flex-row","flex-grow","flex-nowrap","justify-start","bg-transparent","items-center","no-underline","text-medium","whitespace-nowrap","box-border"],content:["flex","gap-4","h-full","flex-row","flex-nowrap","items-center","data-[justify=start]:justify-start","data-[justify=start]:flex-grow","data-[justify=start]:basis-0","data-[justify=center]:justify-center","data-[justify=end]:justify-end","data-[justify=end]:flex-grow","data-[justify=end]:basis-0"],item:["text-medium","whitespace-nowrap","box-border","list-none","data-[active=true]:font-semibold"],menu:["z-30","px-6","pt-2","fixed","flex","max-w-full","top-[var(--navbar-height)]","inset-x-0","bottom-0","w-screen","flex-col","gap-2","overflow-y-auto"],menuItem:["text-large","data-[active=true]:font-semibold"]},variants:{position:{static:{base:"static"},sticky:{base:"sticky top-0 inset-x-0"}},maxWidth:{sm:{wrapper:"max-w-[640px]"},md:{wrapper:"max-w-[768px]"},lg:{wrapper:"max-w-[1024px]"},xl:{wrapper:"max-w-[1280px]"},"2xl":{wrapper:"max-w-[1536px]"},full:{wrapper:"max-w-full"}},hideOnScroll:{true:{base:["sticky","top-0","inset-x-0"]}},isBordered:{true:{base:["border-b","border-divider"]}},isBlurred:{false:{base:"bg-background",menu:"bg-background"},true:{base:["backdrop-blur-lg","data-[menu-open=true]:backdrop-blur-xl","backdrop-saturate-150","bg-background/70"],menu:["backdrop-blur-xl","backdrop-saturate-150","bg-background/70"]}},disableAnimation:{true:{menu:["hidden","h-[calc(100dvh_-_var(--navbar-height)_-_1px)]","data-[open=true]:flex"]}}},defaultVariants:{maxWidth:"lg",position:"sticky",isBlurred:!0}}),[be,M]=pe({name:"NavbarContext",strict:!0,errorMessage:"useNavbarContext: `context` is undefined. Seems you forgot to wrap component within <Navbar />"}),ve={enter:{height:"calc(100vh - var(--navbar-height) - 1px)",transition:{duration:.3,easings:"easeOut"}},exit:{height:0,transition:{duration:.25,easings:"easeIn"}}},D=P((r,t)=>{var n,o;const{className:e,children:l,portalContainer:c,motionProps:u,style:a,...d}=r,m=_(t),{slots:f,isMenuOpen:p,height:b,disableAnimation:h,classNames:j}=M(),y=w(j==null?void 0:j.menu,e),N=x.useCallback(({children:v})=>
1i.jsx(oe,{forwardProps:!0,enabled:p,removeScrollBar:!1,children:v}),[p]),$=h?i.jsx(N,{children:i.jsx("ul",{ref:m,className:(n=f.menu)==null?void 0:n.call(f,{class:y}),"data-open":g(p),style:{"--navbar-height":b},...d,children:l})}):i.jsx(ie,{mode:"wait",children:p?i.jsx(N,{children:i.jsx(L.ul,{ref:m,layoutScroll:!0,animate:"enter",className:(o=f.menu)==null?void 0:o.call(f,{class:y}),"data-open":g(p),exit:"exit",initial:"exit",style:{"--navbar-height":b,...a},variants:ve,...I(u,d),children:l})}):null});return i.jsx(le,{portalContainer:c,children:$})});D.displayName="NextUI.NavbarMenu";var xe=D,he={visible:{y:0,transition:{ease:V.easeOut}},hidden:{y:"-100%",transition:{ease:V.easeIn}}},ge=typeof window<"u";function F(r){return ge?r?{x:r.scrollLeft,y:r.scrollTop}:{x:window.scrollX,y:window.scrollY}:{x:0,y:0}}var ye=r=>{const{elementRef:t,delay:n=30,callback:o,isEnabled:e}=r,l=x.useRef(e?F(t==null?void 0:t.current):{x:0,y:0});let c=null;const u=()=>{const a=F(t==null?void 0:t.current);typeof o=="function"&&o({prevPos:l.current,currPos:a}),l.current=a,c=null};return x.useEffect(()=>{if(!e)return;const a=()=>{n?c===null&&(c=setTimeout(u,n)):u()},d=(t==null?void 0:t.current)||window;return d.addEventListener("scroll",a),()=>d.removeEventListener("scroll",a)},[t==null?void 0:t.current,n,e]),l.current};function Ne(r){var t;const[n,o]=te(r,z.variantKeys),{ref:e,as:l,parentRef:c,height:u="4rem",shouldHideOnScroll:a=!1,disableScrollHandler:d=!1,onScrollPositionChange:m,isMenuOpen:f,isMenuDefaultOpen:p,onMenuOpenChange:b=()=>{},motionProps:h,className:j,classNames:y,...N}=n,$=l||"nav",v=_(e),C=x.useRef(0),k=x.useRef(0),[R,W]=x.useState(!1),T=x.useCallback(s=>{b(s||!1)},[b]),[O,A]=de(f,p,T),S=()=>
1{if(v.current){const s=v.current.offsetWidth;s!==C.current&&(C.current=s)}};ae({ref:v,onResize:()=>{var s;((s=v.current)==null?void 0:s.offsetWidth)!==C.current&&(S(),A(!1))}}),x.useEffect(()=>{var s;S(),k.current=((s=v.current)==null?void 0:s.offsetHeight)||0},[]);const E=x.useMemo(()=>z({...o,hideOnScroll:a}),[...Object.values(o),a]),J=w(y==null?void 0:y.base,j);ye({elementRef:c,isEnabled:a||!d,callback:({prevPos:s,currPos:B})=>{m==null||m(B.y),a&&W(H=>{const U=B.y>s.y&&B.y>k.current;return U!==H?U:H})}});const Q=(s={})=>({...I(N,s),"data-hidden":g(R),"data-menu-open":g(O),ref:v,className:E.base({class:w(J,s==null?void 0:s.className)}),style:{"--navbar-height":u,...N==null?void 0:N.style,...s==null?void 0:s.style}}),Z=(s={})=>({...s,"data-menu-open":g(O),className:E.wrapper({class:w(y==null?void 0:y.wrapper,s==null?void 0:s.className)})});return{Component:$,slots:E,domRef:v,height:u,isHidden:R,disableAnimation:(t=r.disableAnimation)!=null?t:!1,shouldHideOnScroll:a,isMenuOpen:O,classNames:y,setIsMenuOpen:A,motionProps:h,getBaseProps:Q,getWrapperProps:Z}}var G=P((r,t)=>{const{children:n,...o}=r,e=Ne({...o,ref:t}),l=e.Component,[c,u]=fe(n,xe),a=i.jsxs(i.Fragment,{children:[i.jsx("header",{...e.getWrapperProps(),children:c}),u]});return i.jsx(be,{value:e,children:e.shouldHideOnScroll?i.jsx(L.nav,{animate:e.isHidden?"hidden":"visible",initial:!1,variants:he,...I(e.getBaseProps(),e.motionProps),children:a}):i.jsx(l,{...e.getBaseProps(),children:a})})});G.displayName="NextUI.Navbar";var Ee=G,K=P((r,t)=>{var n;const{as:o,className:e,children:l,...c}=r,u=o||"div",a=_(t),{slots:d,classNames:m}=M(),f=w(m==null?void 0:m.brand,e);return i.jsx(u,{ref:a,className:(n=d.brand)==null?void 0:n.call(d,{class:f}),...c,children:l})});K.displayName="NextUI.NavbarBrand";var He=K,X=P((r,t)=>{var n;const{as:o,className:e,children:l,justify:c="start",...u}=r,a=o||"ul",d=_(t),{slots:m,classNames:f}=M(),p=w(f==null?void 0:f.content,e);return i.jsx(a,{ref:d,className:(n=m.content)==null?void 0:n.call(m,{class:p}),"data-justify":c,...u,children:l})});X.displayName="NextUI.NavbarContent";var Ue=X,Y=P((r,t)=>{var n;const{as:o,className:e,children:l,isActive:c,...u}=r,a=o||"li",d=_(t),{slots:m,classNames:f}=M(),p=w(f==null?void 0:f.item,e);return i.jsx(a,{ref:d,className:(n=m.item)==null?void 0:n.call(m,{class:p}),"data-active":g(c),...u,children:l})});Y.displayName="NextUI.NavbarItem";var Ve=Y;function we(r,t,n){const{isSelected:o}=t,{isPressed:e,buttonProps:l}=ce({...r,onPress:re(t.toggle,r.onPress)},n);return{isPressed:e,buttonProps:I(l,{"aria-pressed":o})}}var q=P((r,t)=>{var n;const{as:o,icon:e,className:l,onChange:c,autoFocus:u,srOnlyText:a,...d}=r,m=o||"button",f=_(t),{slots:p,classNames:b,isMenuOpen:h,setIsMenuOpen:j}=M(),N=me({...d,isSelected:h,onChange:S=>{c==null||c(S),j(S)}}),{buttonProps:$,isPressed:v}=we(r,N,f),{isFocusVisible:C,focusProps:k}=ne({autoFocus:u}),{isHovered:R,hoverProps:W}=se({}),T=w(b==null?void 0:b.toggle,l),O=x.useMemo(()=>typeof e=="function"?e(h??!1):e||i.jsx("span",{className:p.toggleIcon({class:b==null?void 0:b.toggleIcon})}),[e,h,p.toggleIcon,b==null?void 0:b.toggleIcon]),A=x.useMemo(()=>a||(N.isSelected?"close navigation menu":"open navigation menu"),[a,h]);return i.jsxs(m,{ref:f,className:(n=p.toggle)==null?void 0:n.call(p,{class:T}),"data-focus-visible":g(C),"data-hover":g(R),"data-open":g(h),"data-pressed":g(v),...I($,k,W,d),children:[i.jsx("span",{className:p.srOnly(),children:A}),O]})});q.displayName="NextUI.NavbarMenuToggle";var ze=q;export{Ue as a,ze as b,He as c,Ve as d,xe as e,Ee as n,M as u};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.