@sykoramaros/marosh-components 0.0.7 → 0.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +23 -0
- package/dist/index.js +12 -12
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1709 -1042
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ClassProp } from 'class-variance-authority/types';
|
|
2
2
|
import { ClassValue } from 'clsx';
|
|
3
3
|
import { JSX } from 'react/jsx-runtime';
|
|
4
|
+
import { Link } from '@tanstack/react-router';
|
|
4
5
|
import { LucideIcon } from 'lucide-react';
|
|
5
6
|
import { VariantProps } from 'class-variance-authority';
|
|
6
7
|
|
|
@@ -18,6 +19,28 @@ export declare interface CustomButtonProps extends React.ComponentPropsWithoutRe
|
|
|
18
19
|
className?: string;
|
|
19
20
|
}
|
|
20
21
|
|
|
22
|
+
export declare const Footer: ({ links, copyright, socialProfiles, className, ...props }: FooterProps) => JSX.Element;
|
|
23
|
+
|
|
24
|
+
export declare interface FooterLinks {
|
|
25
|
+
title: string;
|
|
26
|
+
url: string;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export declare interface FooterProps extends React.ComponentPropsWithoutRef<"footer"> {
|
|
30
|
+
links: FooterLinks[];
|
|
31
|
+
copyright?: string;
|
|
32
|
+
socialProfiles: FooterSocial[];
|
|
33
|
+
className?: string;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export declare interface FooterSocial {
|
|
37
|
+
title: string;
|
|
38
|
+
url: string;
|
|
39
|
+
icon?: LucideIcon | React.ComponentType;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export { Link }
|
|
43
|
+
|
|
21
44
|
export declare const MainNav: ({ navItems, LinkComponent, className, ...props }: MainNavProps) => JSX.Element;
|
|
22
45
|
|
|
23
46
|
export declare interface MainNavProps extends React.ComponentPropsWithoutRef<"header"> {
|
package/dist/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const qt=require("clsx"),Xt=require("tailwind-merge"),u=require("react/jsx-runtime"),X=require("@radix-ui/react-slot"),Je=require("class-variance-authority"),L=require("react"),Ne=require("react-dom"),et=require("lucide-react");function tt(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const i=tt(L),Zt=tt(Ne);function A(...e){return Xt.twMerge(qt.clsx(e))}const Qt=Je.cva("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9","icon-sm":"size-8","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}});function nt({className:e,variant:t="default",size:n="default",asChild:r=!1,...o}){const a=r?X.Slot:"button";return u.jsx(a,{"data-slot":"button","data-variant":t,"data-size":n,className:A(Qt({variant:t,size:n,className:e})),...o})}const Jt=({children:e,className:t,variant:n,size:r,...o})=>u.jsx(u.Fragment,{children:u.jsx(nt,{className:A(t),variant:n,size:r,...o,children:e})});function en(e,t){const n=i.createContext(t),r=a=>{const{children:c,...s}=a,f=i.useMemo(()=>s,Object.values(s));return u.jsx(n.Provider,{value:f,children:c})};r.displayName=e+"Provider";function o(a){const c=i.useContext(n);if(c)return c;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[r,o]}function Re(e,t=[]){let n=[];function r(a,c){const s=i.createContext(c),f=n.length;n=[...n,c];const v=m=>{const{scope:p,children:y,...w}=m,d=p?.[e]?.[f]||s,g=i.useMemo(()=>w,Object.values(w));return u.jsx(d.Provider,{value:g,children:y})};v.displayName=a+"Provider";function l(m,p){const y=p?.[e]?.[f]||s,w=i.useContext(y);if(w)return w;if(c!==void 0)return c;throw new Error(`\`${m}\` must be used within \`${a}\``)}return[v,l]}const o=()=>{const a=n.map(c=>i.createContext(c));return function(s){const f=s?.[e]||a;return i.useMemo(()=>({[`__scope${e}`]:{...s,[e]:f}}),[s,f])}};return o.scopeName=e,[r,tn(o,...t)]}function tn(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(a){const c=r.reduce((s,{useScope:f,scopeName:v})=>{const m=f(a)[`__scope${v}`];return{...s,...m}},{});return i.useMemo(()=>({[`__scope${t.scopeName}`]:c}),[c])}};return n.scopeName=t.scopeName,n}function M(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e?.(o),n===!1||!o.defaultPrevented)return t?.(o)}}var nn=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],P=nn.reduce((e,t)=>{const n=X.createSlot(`Primitive.${t}`),r=i.forwardRef((o,a)=>{const{asChild:c,...s}=o,f=c?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),u.jsx(f,{...s,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function pe(e,t){e&&Zt.flushSync(()=>e.dispatchEvent(t))}var V=globalThis?.document?i.useLayoutEffect:()=>{},rn=i[" useInsertionEffect ".trim().toString()]||V;function Se({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,a,c]=on({defaultProp:t,onChange:n}),s=e!==void 0,f=s?e:o;{const l=i.useRef(e!==void 0);i.useEffect(()=>{const m=l.current;m!==s&&console.warn(`${r} is changing from ${m?"controlled":"uncontrolled"} to ${s?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),l.current=s},[s,r])}const v=i.useCallback(l=>{if(s){const m=an(l)?l(e):l;m!==e&&c.current?.(m)}else a(l)},[s,e,a,c]);return[f,v]}function on({defaultProp:e,onChange:t}){const[n,r]=i.useState(e),o=i.useRef(n),a=i.useRef(t);return rn(()=>{a.current=t},[t]),i.useEffect(()=>{o.current!==n&&(a.current?.(n),o.current=n)},[n,o]),[n,r,a]}function an(e){return typeof e=="function"}function Fe(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function rt(...e){return t=>{let n=!1;const r=e.map(o=>{const a=Fe(o,t);return!n&&typeof a=="function"&&(n=!0),a});if(n)return()=>{for(let o=0;o<r.length;o++){const a=r[o];typeof a=="function"?a():Fe(e[o],null)}}}}function O(...e){return i.useCallback(rt(...e),e)}var sn=i.createContext(void 0);function cn(e){const t=i.useContext(sn);return e||t||"ltr"}function un(e,t){return i.useReducer((n,r)=>t[n][r]??n,e)}var K=e=>{const{present:t,children:n}=e,r=ln(t),o=typeof n=="function"?n({present:r.isPresent}):i.Children.only(n),a=O(r.ref,dn(o));return typeof n=="function"||r.isPresent?i.cloneElement(o,{ref:a}):null};K.displayName="Presence";function ln(e){const[t,n]=i.useState(),r=i.useRef(null),o=i.useRef(e),a=i.useRef("none"),c=e?"mounted":"unmounted",[s,f]=un(c,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return i.useEffect(()=>{const v=Z(r.current);a.current=s==="mounted"?v:"none"},[s]),V(()=>{const v=r.current,l=o.current;if(l!==e){const p=a.current,y=Z(v);e?f("MOUNT"):y==="none"||v?.display==="none"?f("UNMOUNT"):f(l&&p!==y?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,f]),V(()=>{if(t){let v;const l=t.ownerDocument.defaultView??window,m=y=>{const d=Z(r.current).includes(CSS.escape(y.animationName));if(y.target===t&&d&&(f("ANIMATION_END"),!o.current)){const g=t.style.animationFillMode;t.style.animationFillMode="forwards",v=l.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=g)})}},p=y=>{y.target===t&&(a.current=Z(r.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",m),t.addEventListener("animationend",m),()=>{l.clearTimeout(v),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",m),t.removeEventListener("animationend",m)}}else f("ANIMATION_END")},[t,f]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:i.useCallback(v=>{r.current=v?getComputedStyle(v):null,n(v)},[])}}function Z(e){return e?.animationName||"none"}function dn(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var fn=i[" useId ".trim().toString()]||(()=>{}),vn=0;function q(e){const[t,n]=i.useState(fn());return V(()=>{n(r=>r??String(vn++))},[e]),t?`radix-${t}`:""}function ot(e){const t=e+"CollectionProvider",[n,r]=Re(t),[o,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),c=d=>{const{scope:g,children:E}=d,C=L.useRef(null),h=L.useRef(new Map).current;return u.jsx(o,{scope:g,itemMap:h,collectionRef:C,children:E})};c.displayName=t;const s=e+"CollectionSlot",f=X.createSlot(s),v=L.forwardRef((d,g)=>{const{scope:E,children:C}=d,h=a(s,E),b=O(g,h.collectionRef);return u.jsx(f,{ref:b,children:C})});v.displayName=s;const l=e+"CollectionItemSlot",m="data-radix-collection-item",p=X.createSlot(l),y=L.forwardRef((d,g)=>{const{scope:E,children:C,...h}=d,b=L.useRef(null),x=O(g,b),N=a(l,E);return L.useEffect(()=>(N.itemMap.set(b,{ref:b,...h}),()=>{N.itemMap.delete(b)})),u.jsx(p,{[m]:"",ref:x,children:C})});y.displayName=l;function w(d){const g=a(e+"CollectionConsumer",d);return L.useCallback(()=>{const C=g.collectionRef.current;if(!C)return[];const h=Array.from(C.querySelectorAll(`[${m}]`));return Array.from(g.itemMap.values()).sort((N,R)=>h.indexOf(N.ref.current)-h.indexOf(R.ref.current))},[g.collectionRef,g.itemMap])}return[{Provider:c,Slot:v,ItemSlot:y},w,r]}function D(e){const t=i.useRef(e);return i.useEffect(()=>{t.current=e}),i.useMemo(()=>(...n)=>t.current?.(...n),[])}function mn(e,t=globalThis?.document){const n=D(e);i.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var gn="DismissableLayer",he="dismissableLayer.update",pn="dismissableLayer.pointerDownOutside",hn="dismissableLayer.focusOutside",We,at=i.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Me=i.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:c,onDismiss:s,...f}=e,v=i.useContext(at),[l,m]=i.useState(null),p=l?.ownerDocument??globalThis?.document,[,y]=i.useState({}),w=O(t,R=>m(R)),d=Array.from(v.layers),[g]=[...v.layersWithOutsidePointerEventsDisabled].slice(-1),E=d.indexOf(g),C=l?d.indexOf(l):-1,h=v.layersWithOutsidePointerEventsDisabled.size>0,b=C>=E,x=En(R=>{const T=R.target,S=[...v.branches].some(I=>I.contains(T));!b||S||(o?.(R),c?.(R),R.defaultPrevented||s?.())},p),N=xn(R=>{const T=R.target;[...v.branches].some(I=>I.contains(T))||(a?.(R),c?.(R),R.defaultPrevented||s?.())},p);return mn(R=>{C===v.layers.size-1&&(r?.(R),!R.defaultPrevented&&s&&(R.preventDefault(),s()))},p),i.useEffect(()=>{if(l)return n&&(v.layersWithOutsidePointerEventsDisabled.size===0&&(We=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),v.layersWithOutsidePointerEventsDisabled.add(l)),v.layers.add(l),Ve(),()=>{n&&v.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=We)}},[l,p,n,v]),i.useEffect(()=>()=>{l&&(v.layers.delete(l),v.layersWithOutsidePointerEventsDisabled.delete(l),Ve())},[l,v]),i.useEffect(()=>{const R=()=>y({});return document.addEventListener(he,R),()=>document.removeEventListener(he,R)},[]),u.jsx(P.div,{...f,ref:w,style:{pointerEvents:h?b?"auto":"none":void 0,...e.style},onFocusCapture:M(e.onFocusCapture,N.onFocusCapture),onBlurCapture:M(e.onBlurCapture,N.onBlurCapture),onPointerDownCapture:M(e.onPointerDownCapture,x.onPointerDownCapture)})});Me.displayName=gn;var yn="DismissableLayerBranch",bn=i.forwardRef((e,t)=>{const n=i.useContext(at),r=i.useRef(null),o=O(t,r);return i.useEffect(()=>{const a=r.current;if(a)return n.branches.add(a),()=>{n.branches.delete(a)}},[n.branches]),u.jsx(P.div,{...e,ref:o})});bn.displayName=yn;function En(e,t=globalThis?.document){const n=D(e),r=i.useRef(!1),o=i.useRef(()=>{});return i.useEffect(()=>{const a=s=>{if(s.target&&!r.current){let f=function(){it(pn,n,v,{discrete:!0})};const v={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=f,t.addEventListener("click",o.current,{once:!0})):f()}else t.removeEventListener("click",o.current);r.current=!1},c=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(c),t.removeEventListener("pointerdown",a),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function xn(e,t=globalThis?.document){const n=D(e),r=i.useRef(!1);return i.useEffect(()=>{const o=a=>{a.target&&!r.current&&it(hn,n,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Ve(){const e=new CustomEvent(he);document.dispatchEvent(e)}function it(e,t,n,{discrete:r}){const o=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?pe(o,a):o.dispatchEvent(a)}function wn(e){const t=i.useRef({value:e,previous:e});return i.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Cn=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),Nn="VisuallyHidden",st=i.forwardRef((e,t)=>u.jsx(P.span,{...e,ref:t,style:{...Cn,...e.style}}));st.displayName=Nn;var Rn=st,U="NavigationMenu",[Pe,ct,Sn]=ot(U),[ye,Mn,Pn]=ot(U),[Te]=Re(U,[Sn,Pn]),[Tn,_]=Te(U),[In,On]=Te(U),ut=i.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,value:r,onValueChange:o,defaultValue:a,delayDuration:c=200,skipDelayDuration:s=300,orientation:f="horizontal",dir:v,...l}=e,[m,p]=i.useState(null),y=O(t,S=>p(S)),w=cn(v),d=i.useRef(0),g=i.useRef(0),E=i.useRef(0),[C,h]=i.useState(!0),[b,x]=Se({prop:r,onChange:S=>{const I=S!=="",F=s>0;I?(window.clearTimeout(E.current),F&&h(!1)):(window.clearTimeout(E.current),E.current=window.setTimeout(()=>h(!0),s)),o?.(S)},defaultProp:a??"",caller:U}),N=i.useCallback(()=>{window.clearTimeout(g.current),g.current=window.setTimeout(()=>x(""),150)},[x]),R=i.useCallback(S=>{window.clearTimeout(g.current),x(S)},[x]),T=i.useCallback(S=>{b===S?window.clearTimeout(g.current):d.current=window.setTimeout(()=>{window.clearTimeout(g.current),x(S)},c)},[b,x,c]);return i.useEffect(()=>()=>{window.clearTimeout(d.current),window.clearTimeout(g.current),window.clearTimeout(E.current)},[]),u.jsx(lt,{scope:n,isRootMenu:!0,value:b,dir:w,orientation:f,rootNavigationMenu:m,onTriggerEnter:S=>{window.clearTimeout(d.current),C?T(S):R(S)},onTriggerLeave:()=>{window.clearTimeout(d.current),N()},onContentEnter:()=>window.clearTimeout(g.current),onContentLeave:N,onItemSelect:S=>{x(I=>I===S?"":S)},onItemDismiss:()=>x(""),children:u.jsx(P.nav,{"aria-label":"Main","data-orientation":f,dir:w,...l,ref:y})})});ut.displayName=U;var be="NavigationMenuSub",Dn=i.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,value:r,onValueChange:o,defaultValue:a,orientation:c="horizontal",...s}=e,f=_(be,n),[v,l]=Se({prop:r,onChange:o,defaultProp:a??"",caller:be});return u.jsx(lt,{scope:n,isRootMenu:!1,value:v,dir:f.dir,orientation:c,rootNavigationMenu:f.rootNavigationMenu,onTriggerEnter:m=>l(m),onItemSelect:m=>l(m),onItemDismiss:()=>l(""),children:u.jsx(P.div,{"data-orientation":c,...s,ref:t})})});Dn.displayName=be;var lt=e=>{const{scope:t,isRootMenu:n,rootNavigationMenu:r,dir:o,orientation:a,children:c,value:s,onItemSelect:f,onItemDismiss:v,onTriggerEnter:l,onTriggerLeave:m,onContentEnter:p,onContentLeave:y}=e,[w,d]=i.useState(null),[g,E]=i.useState(new Map),[C,h]=i.useState(null);return u.jsx(Tn,{scope:t,isRootMenu:n,rootNavigationMenu:r,value:s,previousValue:wn(s),baseId:q(),dir:o,orientation:a,viewport:w,onViewportChange:d,indicatorTrack:C,onIndicatorTrackChange:h,onTriggerEnter:D(l),onTriggerLeave:D(m),onContentEnter:D(p),onContentLeave:D(y),onItemSelect:D(f),onItemDismiss:D(v),onViewportContentChange:i.useCallback((b,x)=>{E(N=>(N.set(b,x),new Map(N)))},[]),onViewportContentRemove:i.useCallback(b=>{E(x=>x.has(b)?(x.delete(b),new Map(x)):x)},[]),children:u.jsx(Pe.Provider,{scope:t,children:u.jsx(In,{scope:t,items:g,children:c})})})},dt="NavigationMenuList",ft=i.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,...r}=e,o=_(dt,n),a=u.jsx(P.ul,{"data-orientation":o.orientation,...r,ref:t});return u.jsx(P.div,{style:{position:"relative"},ref:o.onIndicatorTrackChange,children:u.jsx(Pe.Slot,{scope:n,children:o.isRootMenu?u.jsx(bt,{asChild:!0,children:a}):a})})});ft.displayName=dt;var vt="NavigationMenuItem",[An,mt]=Te(vt),gt=i.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,value:r,...o}=e,a=q(),c=r||a||"LEGACY_REACT_AUTO_VALUE",s=i.useRef(null),f=i.useRef(null),v=i.useRef(null),l=i.useRef(()=>{}),m=i.useRef(!1),p=i.useCallback((w="start")=>{if(s.current){l.current();const d=xe(s.current);d.length&&De(w==="start"?d:d.reverse())}},[]),y=i.useCallback(()=>{if(s.current){const w=xe(s.current);w.length&&(l.current=Un(w))}},[]);return u.jsx(An,{scope:n,value:c,triggerRef:f,contentRef:s,focusProxyRef:v,wasEscapeCloseRef:m,onEntryKeyDown:p,onFocusProxyEnter:p,onRootContentClose:y,onContentFocusOutside:y,children:u.jsx(P.li,{...o,ref:t})})});gt.displayName=vt;var Ee="NavigationMenuTrigger",_n=i.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,disabled:r,...o}=e,a=_(Ee,e.__scopeNavigationMenu),c=mt(Ee,e.__scopeNavigationMenu),s=i.useRef(null),f=O(s,c.triggerRef,t),v=xt(a.baseId,c.value),l=wt(a.baseId,c.value),m=i.useRef(!1),p=i.useRef(!1),y=c.value===a.value;return u.jsxs(u.Fragment,{children:[u.jsx(Pe.ItemSlot,{scope:n,value:c.value,children:u.jsx(Et,{asChild:!0,children:u.jsx(P.button,{id:v,disabled:r,"data-disabled":r?"":void 0,"data-state":Ae(y),"aria-expanded":y,"aria-controls":l,...o,ref:f,onPointerEnter:M(e.onPointerEnter,()=>{p.current=!1,c.wasEscapeCloseRef.current=!1}),onPointerMove:M(e.onPointerMove,ae(()=>{r||p.current||c.wasEscapeCloseRef.current||m.current||(a.onTriggerEnter(c.value),m.current=!0)})),onPointerLeave:M(e.onPointerLeave,ae(()=>{r||(a.onTriggerLeave(),m.current=!1)})),onClick:M(e.onClick,()=>{a.onItemSelect(c.value),p.current=y}),onKeyDown:M(e.onKeyDown,w=>{const g={horizontal:"ArrowDown",vertical:a.dir==="rtl"?"ArrowLeft":"ArrowRight"}[a.orientation];y&&w.key===g&&(c.onEntryKeyDown(),w.preventDefault())})})})}),y&&u.jsxs(u.Fragment,{children:[u.jsx(Rn,{"aria-hidden":!0,tabIndex:0,ref:c.focusProxyRef,onFocus:w=>{const d=c.contentRef.current,g=w.relatedTarget,E=g===s.current,C=d?.contains(g);(E||!C)&&c.onFocusProxyEnter(E?"start":"end")}}),a.viewport&&u.jsx("span",{"aria-owns":l})]})]})});_n.displayName=Ee;var jn="NavigationMenuLink",Ke="navigationMenu.linkSelect",pt=i.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,active:r,onSelect:o,...a}=e;return u.jsx(Et,{asChild:!0,children:u.jsx(P.a,{"data-active":r?"":void 0,"aria-current":r?"page":void 0,...a,ref:t,onClick:M(e.onClick,c=>{const s=c.target,f=new CustomEvent(Ke,{bubbles:!0,cancelable:!0});if(s.addEventListener(Ke,v=>o?.(v),{once:!0}),pe(s,f),!f.defaultPrevented&&!c.metaKey){const v=new CustomEvent(ne,{bubbles:!0,cancelable:!0});pe(s,v)}},{checkForDefaultPrevented:!1})})})});pt.displayName=jn;var Ie="NavigationMenuIndicator",kn=i.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=_(Ie,e.__scopeNavigationMenu),a=!!o.value;return o.indicatorTrack?Ne.createPortal(u.jsx(K,{present:n||a,children:u.jsx(Ln,{...r,ref:t})}),o.indicatorTrack):null});kn.displayName=Ie;var Ln=i.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,...r}=e,o=_(Ie,n),a=ct(n),[c,s]=i.useState(null),[f,v]=i.useState(null),l=o.orientation==="horizontal",m=!!o.value;i.useEffect(()=>{const w=a().find(d=>d.value===o.value)?.ref.current;w&&s(w)},[a,o.value]);const p=()=>{c&&v({size:l?c.offsetWidth:c.offsetHeight,offset:l?c.offsetLeft:c.offsetTop})};return we(c,p),we(o.indicatorTrack,p),f?u.jsx(P.div,{"aria-hidden":!0,"data-state":m?"visible":"hidden","data-orientation":o.orientation,...r,ref:t,style:{position:"absolute",...l?{left:0,width:f.size+"px",transform:`translateX(${f.offset}px)`}:{top:0,height:f.size+"px",transform:`translateY(${f.offset}px)`},...r.style}}):null}),Y="NavigationMenuContent",Fn=i.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=_(Y,e.__scopeNavigationMenu),a=mt(Y,e.__scopeNavigationMenu),c=O(a.contentRef,t),s=a.value===o.value,f={value:a.value,triggerRef:a.triggerRef,focusProxyRef:a.focusProxyRef,wasEscapeCloseRef:a.wasEscapeCloseRef,onContentFocusOutside:a.onContentFocusOutside,onRootContentClose:a.onRootContentClose,...r};return o.viewport?u.jsx(Wn,{forceMount:n,...f,ref:c}):u.jsx(K,{present:n||s,children:u.jsx(ht,{"data-state":Ae(s),...f,ref:c,onPointerEnter:M(e.onPointerEnter,o.onContentEnter),onPointerLeave:M(e.onPointerLeave,ae(o.onContentLeave)),style:{pointerEvents:!s&&o.isRootMenu?"none":void 0,...f.style}})})});Fn.displayName=Y;var Wn=i.forwardRef((e,t)=>{const n=_(Y,e.__scopeNavigationMenu),{onViewportContentChange:r,onViewportContentRemove:o}=n;return V(()=>{r(e.value,{ref:t,...e})},[e,t,r]),V(()=>()=>o(e.value),[e.value,o]),null}),ne="navigationMenu.rootContentDismiss",ht=i.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,value:r,triggerRef:o,focusProxyRef:a,wasEscapeCloseRef:c,onRootContentClose:s,onContentFocusOutside:f,...v}=e,l=_(Y,n),m=i.useRef(null),p=O(m,t),y=xt(l.baseId,r),w=wt(l.baseId,r),d=ct(n),g=i.useRef(null),{onItemDismiss:E}=l;i.useEffect(()=>{const h=m.current;if(l.isRootMenu&&h){const b=()=>{E(),s(),h.contains(document.activeElement)&&o.current?.focus()};return h.addEventListener(ne,b),()=>h.removeEventListener(ne,b)}},[l.isRootMenu,e.value,o,E,s]);const C=i.useMemo(()=>{const b=d().map(I=>I.value);l.dir==="rtl"&&b.reverse();const x=b.indexOf(l.value),N=b.indexOf(l.previousValue),R=r===l.value,T=N===b.indexOf(r);if(!R&&!T)return g.current;const S=(()=>{if(x!==N){if(R&&N!==-1)return x>N?"from-end":"from-start";if(T&&x!==-1)return x>N?"to-start":"to-end"}return null})();return g.current=S,S},[l.previousValue,l.value,l.dir,d,r]);return u.jsx(bt,{asChild:!0,children:u.jsx(Me,{id:w,"aria-labelledby":y,"data-motion":C,"data-orientation":l.orientation,...v,ref:p,disableOutsidePointerEvents:!1,onDismiss:()=>{const h=new Event(ne,{bubbles:!0,cancelable:!0});m.current?.dispatchEvent(h)},onFocusOutside:M(e.onFocusOutside,h=>{f();const b=h.target;l.rootNavigationMenu?.contains(b)&&h.preventDefault()}),onPointerDownOutside:M(e.onPointerDownOutside,h=>{const b=h.target,x=d().some(R=>R.ref.current?.contains(b)),N=l.isRootMenu&&l.viewport?.contains(b);(x||N||!l.isRootMenu)&&h.preventDefault()}),onKeyDown:M(e.onKeyDown,h=>{const b=h.altKey||h.ctrlKey||h.metaKey;if(h.key==="Tab"&&!b){const N=xe(h.currentTarget),R=document.activeElement,T=N.findIndex(F=>F===R),I=h.shiftKey?N.slice(0,T).reverse():N.slice(T+1,N.length);De(I)?h.preventDefault():a.current?.focus()}}),onEscapeKeyDown:M(e.onEscapeKeyDown,h=>{c.current=!0})})})}),Oe="NavigationMenuViewport",yt=i.forwardRef((e,t)=>{const{forceMount:n,...r}=e,a=!!_(Oe,e.__scopeNavigationMenu).value;return u.jsx(K,{present:n||a,children:u.jsx(Vn,{...r,ref:t})})});yt.displayName=Oe;var Vn=i.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,children:r,...o}=e,a=_(Oe,n),c=O(t,a.onViewportChange),s=On(Y,e.__scopeNavigationMenu),[f,v]=i.useState(null),[l,m]=i.useState(null),p=f?f?.width+"px":void 0,y=f?f?.height+"px":void 0,w=!!a.value,d=w?a.value:a.previousValue;return we(l,()=>{l&&v({width:l.offsetWidth,height:l.offsetHeight})}),u.jsx(P.div,{"data-state":Ae(w),"data-orientation":a.orientation,...o,ref:c,style:{pointerEvents:!w&&a.isRootMenu?"none":void 0,"--radix-navigation-menu-viewport-width":p,"--radix-navigation-menu-viewport-height":y,...o.style},onPointerEnter:M(e.onPointerEnter,a.onContentEnter),onPointerLeave:M(e.onPointerLeave,ae(a.onContentLeave)),children:Array.from(s.items).map(([E,{ref:C,forceMount:h,...b}])=>{const x=d===E;return u.jsx(K,{present:h||x,children:u.jsx(ht,{...b,ref:rt(C,N=>{x&&N&&m(N)})})},E)})})}),Kn="FocusGroup",bt=i.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,...r}=e,o=_(Kn,n);return u.jsx(ye.Provider,{scope:n,children:u.jsx(ye.Slot,{scope:n,children:u.jsx(P.div,{dir:o.dir,...r,ref:t})})})}),Be=["ArrowRight","ArrowLeft","ArrowUp","ArrowDown"],Bn="FocusGroupItem",Et=i.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,...r}=e,o=Mn(n),a=_(Bn,n);return u.jsx(ye.ItemSlot,{scope:n,children:u.jsx(P.button,{...r,ref:t,onKeyDown:M(e.onKeyDown,c=>{if(["Home","End",...Be].includes(c.key)){let f=o().map(m=>m.ref.current);if([a.dir==="rtl"?"ArrowRight":"ArrowLeft","ArrowUp","End"].includes(c.key)&&f.reverse(),Be.includes(c.key)){const m=f.indexOf(c.currentTarget);f=f.slice(m+1)}setTimeout(()=>De(f)),c.preventDefault()}})})})});function xe(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function De(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}function Un(e){return e.forEach(t=>{t.dataset.tabindex=t.getAttribute("tabindex")||"",t.setAttribute("tabindex","-1")}),()=>{e.forEach(t=>{const n=t.dataset.tabindex;t.setAttribute("tabindex",n)})}}function we(e,t){const n=D(t);V(()=>{let r=0;if(e){const o=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return o.observe(e),()=>{window.cancelAnimationFrame(r),o.unobserve(e)}}},[e,n])}function Ae(e){return e?"open":"closed"}function xt(e,t){return`${e}-trigger-${t}`}function wt(e,t){return`${e}-content-${t}`}function ae(e){return t=>t.pointerType==="mouse"?e(t):void 0}var zn=ut,$n=ft,Hn=gt,Gn=pt,Yn=yt;function qn({className:e,children:t,viewport:n=!0,...r}){return u.jsxs(zn,{"data-slot":"navigation-menu","data-viewport":n,className:A("group/navigation-menu relative flex max-w-max flex-1 items-center justify-center",e),...r,children:[t,n&&u.jsx(Jn,{})]})}function Xn({className:e,...t}){return u.jsx($n,{"data-slot":"navigation-menu-list",className:A("group flex flex-1 list-none items-center justify-center gap-1",e),...t})}function Zn({className:e,...t}){return u.jsx(Hn,{"data-slot":"navigation-menu-item",className:A("relative",e),...t})}const Qn=Je.cva("group inline-flex h-9 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=open]:hover:bg-accent data-[state=open]:text-accent-foreground data-[state=open]:focus:bg-accent data-[state=open]:bg-accent/50 focus-visible:ring-ring/50 outline-none transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1");function Jn({className:e,...t}){return u.jsx("div",{className:A("absolute top-full left-0 isolate z-50 flex justify-center"),children:u.jsx(Yn,{"data-slot":"navigation-menu-viewport",className:A("origin-top-center bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-md border shadow md:w-[var(--radix-navigation-menu-viewport-width)]",e),...t})})}function er({className:e,...t}){return u.jsx(Gn,{"data-slot":"navigation-menu-link",className:A("data-[active=true]:focus:bg-accent data-[active=true]:hover:bg-accent data-[active=true]:bg-accent/50 data-[active=true]:text-accent-foreground hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus-visible:ring-ring/50 [&_svg:not([class*='text-'])]:text-muted-foreground flex flex-col gap-1 rounded-sm p-2 text-sm transition-all outline-none focus-visible:ring-[3px] focus-visible:outline-1 [&_svg:not([class*='size-'])]:size-4",e),...t})}var ue="focusScope.autoFocusOnMount",le="focusScope.autoFocusOnUnmount",Ue={bubbles:!1,cancelable:!0},tr="FocusScope",Ct=i.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:a,...c}=e,[s,f]=i.useState(null),v=D(o),l=D(a),m=i.useRef(null),p=O(t,d=>f(d)),y=i.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;i.useEffect(()=>{if(r){let d=function(h){if(y.paused||!s)return;const b=h.target;s.contains(b)?m.current=b:W(m.current,{select:!0})},g=function(h){if(y.paused||!s)return;const b=h.relatedTarget;b!==null&&(s.contains(b)||W(m.current,{select:!0}))},E=function(h){if(document.activeElement===document.body)for(const x of h)x.removedNodes.length>0&&W(s)};document.addEventListener("focusin",d),document.addEventListener("focusout",g);const C=new MutationObserver(E);return s&&C.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",d),document.removeEventListener("focusout",g),C.disconnect()}}},[r,s,y.paused]),i.useEffect(()=>{if(s){$e.add(y);const d=document.activeElement;if(!s.contains(d)){const E=new CustomEvent(ue,Ue);s.addEventListener(ue,v),s.dispatchEvent(E),E.defaultPrevented||(nr(sr(Nt(s)),{select:!0}),document.activeElement===d&&W(s))}return()=>{s.removeEventListener(ue,v),setTimeout(()=>{const E=new CustomEvent(le,Ue);s.addEventListener(le,l),s.dispatchEvent(E),E.defaultPrevented||W(d??document.body,{select:!0}),s.removeEventListener(le,l),$e.remove(y)},0)}}},[s,v,l,y]);const w=i.useCallback(d=>{if(!n&&!r||y.paused)return;const g=d.key==="Tab"&&!d.altKey&&!d.ctrlKey&&!d.metaKey,E=document.activeElement;if(g&&E){const C=d.currentTarget,[h,b]=rr(C);h&&b?!d.shiftKey&&E===b?(d.preventDefault(),n&&W(h,{select:!0})):d.shiftKey&&E===h&&(d.preventDefault(),n&&W(b,{select:!0})):E===C&&d.preventDefault()}},[n,r,y.paused]);return u.jsx(P.div,{tabIndex:-1,...c,ref:p,onKeyDown:w})});Ct.displayName=tr;function nr(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(W(r,{select:t}),document.activeElement!==n)return}function rr(e){const t=Nt(e),n=ze(t,e),r=ze(t.reverse(),e);return[n,r]}function Nt(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function ze(e,t){for(const n of e)if(!or(n,{upTo:t}))return n}function or(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function ar(e){return e instanceof HTMLInputElement&&"select"in e}function W(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&ar(e)&&t&&e.select()}}var $e=ir();function ir(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=He(e,t),e.unshift(t)},remove(t){e=He(e,t),e[0]?.resume()}}}function He(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function sr(e){return e.filter(t=>t.tagName!=="A")}var cr="Portal",Rt=i.forwardRef((e,t)=>{const{container:n,...r}=e,[o,a]=i.useState(!1);V(()=>a(!0),[]);const c=n||o&&globalThis?.document?.body;return c?Ne.createPortal(u.jsx(P.div,{...r,ref:t}),c):null});Rt.displayName=cr;var de=0;function ur(){i.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Ge()),document.body.insertAdjacentElement("beforeend",e[1]??Ge()),de++,()=>{de===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),de--}},[])}function Ge(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var k=function(){return k=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},k.apply(this,arguments)};function St(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function lr(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,a;r<o;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var re="right-scroll-bar-position",oe="width-before-scroll-bar",dr="with-scroll-bars-hidden",fr="--removed-body-scroll-bar-size";function fe(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function vr(e,t){var n=L.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var mr=typeof window<"u"?i.useLayoutEffect:i.useEffect,Ye=new WeakMap;function gr(e,t){var n=vr(null,function(r){return e.forEach(function(o){return fe(o,r)})});return mr(function(){var r=Ye.get(n);if(r){var o=new Set(r),a=new Set(e),c=n.current;o.forEach(function(s){a.has(s)||fe(s,null)}),a.forEach(function(s){o.has(s)||fe(s,c)})}Ye.set(n,e)},[e]),n}function pr(e){return e}function hr(e,t){t===void 0&&(t=pr);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(a){var c=t(a,r);return n.push(c),function(){n=n.filter(function(s){return s!==c})}},assignSyncMedium:function(a){for(r=!0;n.length;){var c=n;n=[],c.forEach(a)}n={push:function(s){return a(s)},filter:function(){return n}}},assignMedium:function(a){r=!0;var c=[];if(n.length){var s=n;n=[],s.forEach(a),c=n}var f=function(){var l=c;c=[],l.forEach(a)},v=function(){return Promise.resolve().then(f)};v(),n={push:function(l){c.push(l),v()},filter:function(l){return c=c.filter(l),n}}}};return o}function yr(e){e===void 0&&(e={});var t=hr(null);return t.options=k({async:!0,ssr:!1},e),t}var Mt=function(e){var t=e.sideCar,n=St(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return i.createElement(r,k({},n))};Mt.isSideCarExport=!0;function br(e,t){return e.useMedium(t),Mt}var Pt=yr(),ve=function(){},se=i.forwardRef(function(e,t){var n=i.useRef(null),r=i.useState({onScrollCapture:ve,onWheelCapture:ve,onTouchMoveCapture:ve}),o=r[0],a=r[1],c=e.forwardProps,s=e.children,f=e.className,v=e.removeScrollBar,l=e.enabled,m=e.shards,p=e.sideCar,y=e.noRelative,w=e.noIsolation,d=e.inert,g=e.allowPinchZoom,E=e.as,C=E===void 0?"div":E,h=e.gapMode,b=St(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),x=p,N=gr([n,t]),R=k(k({},b),o);return i.createElement(i.Fragment,null,l&&i.createElement(x,{sideCar:Pt,removeScrollBar:v,shards:m,noRelative:y,noIsolation:w,inert:d,setCallbacks:a,allowPinchZoom:!!g,lockRef:n,gapMode:h}),c?i.cloneElement(i.Children.only(s),k(k({},R),{ref:N})):i.createElement(C,k({},R,{className:f,ref:N}),s))});se.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};se.classNames={fullWidth:oe,zeroRight:re};var Er=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function xr(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Er();return t&&e.setAttribute("nonce",t),e}function wr(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Cr(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Nr=function(){var e=0,t=null;return{add:function(n){e==0&&(t=xr())&&(wr(t,n),Cr(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Rr=function(){var e=Nr();return function(t,n){i.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Tt=function(){var e=Rr(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},Sr={left:0,top:0,right:0,gap:0},me=function(e){return parseInt(e||"",10)||0},Mr=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[me(n),me(r),me(o)]},Pr=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Sr;var t=Mr(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Tr=Tt(),G="data-scroll-locked",Ir=function(e,t,n,r){var o=e.left,a=e.top,c=e.right,s=e.gap;return n===void 0&&(n="margin"),`
|
|
2
|
-
.`.concat(
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Yn=require("clsx"),Xn=require("tailwind-merge"),d=require("react/jsx-runtime"),ae=require("@radix-ui/react-slot"),$t=require("class-variance-authority"),D=require("react"),_e=require("react-dom"),Bt=require("lucide-react");function Gt(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const i=Gt(D),Zn=Gt(_e);function L(...e){return Xn.twMerge(Yn.clsx(e))}function Qn(e){return typeof e=="function"}function ht(e,t){return Qn(e)?e(t):e}const Jn=Object.prototype.hasOwnProperty;function Ht(e,t){if(e===t)return e;const n=t,r=bt(e)&&bt(n);if(!r&&!(xe(e)&&xe(n)))return n;const o=r?e:yt(e);if(!o)return n;const a=r?n:yt(n);if(!a)return n;const c=o.length,s=a.length,m=r?new Array(s):{};let v=0;for(let l=0;l<s;l++){const f=r?l:a[l],g=e[f],p=n[f];if(g===p){m[f]=g,(r?l<c:Jn.call(e,f))&&v++;continue}if(g===null||p===null||typeof g!="object"||typeof p!="object"){m[f]=p;continue}const y=Ht(g,p);m[f]=y,y===g&&v++}return c===s&&v===c?e:m}function yt(e){const t=[],n=Object.getOwnPropertyNames(e);for(const o of n){if(!Object.prototype.propertyIsEnumerable.call(e,o))return!1;t.push(o)}const r=Object.getOwnPropertySymbols(e);for(const o of r){if(!Object.prototype.propertyIsEnumerable.call(e,o))return!1;t.push(o)}return t}function xe(e){if(!Et(e))return!1;const t=e.constructor;if(typeof t>"u")return!0;const n=t.prototype;return!(!Et(n)||!n.hasOwnProperty("isPrototypeOf"))}function Et(e){return Object.prototype.toString.call(e)==="[object Object]"}function bt(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function ye(e,t,n){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let r=0,o=e.length;r<o;r++)if(!ye(e[r],t[r],n))return!1;return!0}if(xe(e)&&xe(t)){const r=n?.ignoreUndefined??!0;if(n?.partial){for(const c in t)if((!r||t[c]!==void 0)&&!ye(e[c],t[c],n))return!1;return!0}let o=0;if(!r)o=Object.keys(e).length;else for(const c in e)e[c]!==void 0&&o++;let a=0;for(const c in t)if((!r||t[c]!==void 0)&&(a++,a>o||!ye(e[c],t[c],n)))return!1;return o===a}return!1}function Se(e,t){return e?.endsWith("/")&&e!=="/"&&e!==`${t}/`?e.slice(0,-1):e}function er(e,t,n){return Se(e,n)===Se(t,n)}const tr="Error preloading route! ☝️";var nr=process.env.NODE_ENV==="production";function rr(e,t){if(!nr){if(e)return;var n="Warning: "+t;typeof console<"u"&&console.warn(n);try{throw Error(n)}catch{}}}var de={exports:{}},Pe={},fe={exports:{}},Ie={};var wt;function or(){if(wt)return Ie;wt=1;var e=D;function t(f,g){return f===g&&(f!==0||1/f===1/g)||f!==f&&g!==g}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,o=e.useEffect,a=e.useLayoutEffect,c=e.useDebugValue;function s(f,g){var p=g(),y=r({inst:{value:p,getSnapshot:g}}),u=y[0].inst,h=y[1];return a(function(){u.value=p,u.getSnapshot=g,m(u)&&h({inst:u})},[f,p,g]),o(function(){return m(u)&&h({inst:u}),f(function(){m(u)&&h({inst:u})})},[f]),c(p),p}function m(f){var g=f.getSnapshot;f=f.value;try{var p=g();return!n(f,p)}catch{return!0}}function v(f,g){return g()}var l=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?v:s;return Ie.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:l,Ie}var De={};var xt;function ar(){return xt||(xt=1,process.env.NODE_ENV!=="production"&&(function(){function e(p,y){return p===y&&(p!==0||1/p===1/y)||p!==p&&y!==y}function t(p,y){l||o.startTransition===void 0||(l=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var u=y();if(!f){var h=y();a(u,h)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),f=!0)}h=c({inst:{value:u,getSnapshot:y}});var w=h[0].inst,C=h[1];return m(function(){w.value=u,w.getSnapshot=y,n(w)&&C({inst:w})},[p,u,y]),s(function(){return n(w)&&C({inst:w}),p(function(){n(w)&&C({inst:w})})},[p]),v(u),u}function n(p){var y=p.getSnapshot;p=p.value;try{var u=y();return!a(p,u)}catch{return!0}}function r(p,y){return y()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var o=D,a=typeof Object.is=="function"?Object.is:e,c=o.useState,s=o.useEffect,m=o.useLayoutEffect,v=o.useDebugValue,l=!1,f=!1,g=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?r:t;De.useSyncExternalStore=o.useSyncExternalStore!==void 0?o.useSyncExternalStore:g,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),De}var St;function qt(){return St||(St=1,process.env.NODE_ENV==="production"?fe.exports=or():fe.exports=ar()),fe.exports}var Ct;function ir(){if(Ct)return Pe;Ct=1;var e=D,t=qt();function n(v,l){return v===l&&(v!==0||1/v===1/l)||v!==v&&l!==l}var r=typeof Object.is=="function"?Object.is:n,o=t.useSyncExternalStore,a=e.useRef,c=e.useEffect,s=e.useMemo,m=e.useDebugValue;return Pe.useSyncExternalStoreWithSelector=function(v,l,f,g,p){var y=a(null);if(y.current===null){var u={hasValue:!1,value:null};y.current=u}else u=y.current;y=s(function(){function w(x){if(!C){if(C=!0,b=x,x=g(x),p!==void 0&&u.hasValue){var R=u.value;if(p(R,x))return E=R}return E=x}if(R=E,r(b,x))return R;var N=g(x);return p!==void 0&&p(R,N)?(b=x,R):(b=x,E=N)}var C=!1,b,E,S=f===void 0?null:f;return[function(){return w(l())},S===null?void 0:function(){return w(S())}]},[l,f,g,p]);var h=o(v,y[0],y[1]);return c(function(){u.hasValue=!0,u.value=h},[h]),m(h),h},Pe}var Ae={};var Rt;function sr(){return Rt||(Rt=1,process.env.NODE_ENV!=="production"&&(function(){function e(v,l){return v===l&&(v!==0||1/v===1/l)||v!==v&&l!==l}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var t=D,n=qt(),r=typeof Object.is=="function"?Object.is:e,o=n.useSyncExternalStore,a=t.useRef,c=t.useEffect,s=t.useMemo,m=t.useDebugValue;Ae.useSyncExternalStoreWithSelector=function(v,l,f,g,p){var y=a(null);if(y.current===null){var u={hasValue:!1,value:null};y.current=u}else u=y.current;y=s(function(){function w(x){if(!C){if(C=!0,b=x,x=g(x),p!==void 0&&u.hasValue){var R=u.value;if(p(R,x))return E=R}return E=x}if(R=E,r(b,x))return R;var N=g(x);return p!==void 0&&p(R,N)?(b=x,R):(b=x,E=N)}var C=!1,b,E,S=f===void 0?null:f;return[function(){return w(l())},S===null?void 0:function(){return w(S())}]},[l,f,g,p]);var h=o(v,y[0],y[1]);return c(function(){u.hasValue=!0,u.value=h},[h]),m(h),h},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),Ae}var _t;function cr(){return _t||(_t=1,process.env.NODE_ENV==="production"?de.exports=ir():de.exports=sr()),de.exports}var ur=cr();function lr(e,t=r=>r,n={}){const r=n.equal??dr;return ur.useSyncExternalStoreWithSelector(e.subscribe,()=>e.state,()=>e.state,t,r)}function dr(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[r,o]of e)if(!t.has(r)||!Object.is(o,t.get(r)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const r of e)if(!t.has(r))return!1;return!0}if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();const n=Ot(e);if(n.length!==Ot(t).length)return!1;for(let r=0;r<n.length;r++)if(!Object.prototype.hasOwnProperty.call(t,n[r])||!Object.is(e[n[r]],t[n[r]]))return!1;return!0}function Ot(e){return Object.keys(e).concat(Object.getOwnPropertySymbols(e))}const Le=i.createContext(null);function fr(){return typeof document>"u"?Le:window.__TSR_ROUTER_CONTEXT__?window.__TSR_ROUTER_CONTEXT__:(window.__TSR_ROUTER_CONTEXT__=Le,Le)}function Yt(e){const t=i.useContext(fr());return rr(!((e?.warn??!0)&&!t),"useRouter must be used inside a <RouterProvider> component!"),t}function Nt(e){const t=Yt({warn:e?.router===void 0}),n=e?.router||t,r=D.useRef(void 0);return lr(n.__store,o=>{if(e?.select){if(e.structuralSharing??n.options.defaultStructuralSharing){const a=Ht(r.current,e.select(o));return r.current=a,a}return e.select(o)}return o})}function vr(e,t,n={},r={}){i.useEffect(()=>{if(!e.current||r.disabled||typeof IntersectionObserver!="function")return;const o=new IntersectionObserver(([a])=>{t(a)},n);return o.observe(e.current),()=>{o.disconnect()}},[t,n,r.disabled,e])}function mr(e){const t=i.useRef(null);return i.useImperativeHandle(e,()=>t.current,[]),t}function pr(e,t){const n=Yt(),[r,o]=i.useState(!1),a=i.useRef(!1),c=mr(t),{activeProps:s,inactiveProps:m,activeOptions:v,to:l,preload:f,preloadDelay:g,hashScrollIntoView:p,replace:y,startTransition:u,resetScroll:h,viewTransition:w,children:C,target:b,disabled:E,style:S,className:x,onClick:R,onFocus:N,onMouseEnter:_,onMouseLeave:P,onTouchStart:j,ignoreBlocker:ie,params:Ba,search:Ga,hash:Ha,state:qa,mask:Ya,reloadDocument:Xa,unsafeRelative:Za,from:Qa,_fromLocation:Ja,...dt}=e,zn=Nt({select:O=>O.location.search,structuralSharing:!0}),ft=e.from,te=i.useMemo(()=>({...e,from:ft}),[n,zn,ft,e._fromLocation,e.hash,e.to,e.search,e.params,e.state,e.mask,e.unsafeRelative]),U=i.useMemo(()=>n.buildLocation({...te}),[n,te]),se=i.useMemo(()=>{if(E)return;let O=U.maskedLocation?U.maskedLocation.url.href:U.url.href,I=!1;return n.origin&&(O.startsWith(n.origin)?O=n.history.createHref(O.replace(n.origin,""))||"/":I=!0),{href:O,external:I}},[E,U.maskedLocation,U.url,n.origin,n.history]),ce=i.useMemo(()=>{if(se?.external)return se.href;try{return new URL(l),l}catch{}},[l,se]),Y=e.reloadDocument||ce?!1:f??n.options.defaultPreload,Te=g??n.options.defaultPreloadDelay??0,Me=Nt({select:O=>{if(ce)return!1;if(v?.exact){if(!er(O.location.pathname,U.pathname,n.basepath))return!1}else{const I=Se(O.location.pathname,n.basepath),V=Se(U.pathname,n.basepath);if(!(I.startsWith(V)&&(I.length===V.length||I[V.length]==="/")))return!1}return(v?.includeSearch??!0)&&!ye(O.location.search,U.search,{partial:!v?.exact,ignoreUndefined:!v?.explicitUndefined})?!1:v?.includeHash?O.location.hash===U.hash:!0}}),G=i.useCallback(()=>{n.preloadRoute({...te}).catch(O=>{console.warn(O),console.warn(tr)})},[n,te]),$n=i.useCallback(O=>{O?.isIntersecting&&G()},[G]);vr(c,$n,br,{disabled:!!E||Y!=="viewport"}),i.useEffect(()=>{a.current||!E&&Y==="render"&&(G(),a.current=!0)},[E,G,Y]);const Bn=O=>{const I=O.currentTarget.getAttribute("target"),V=b!==void 0?b:I;if(!E&&!xr(O)&&!O.defaultPrevented&&(!V||V==="_self")&&O.button===0){O.preventDefault(),_e.flushSync(()=>{o(!0)});const gt=n.subscribe("onResolved",()=>{gt(),o(!1)});n.navigate({...te,replace:y,resetScroll:h,hashScrollIntoView:p,startTransition:u,viewTransition:w,ignoreBlocker:ie})}};if(ce)return{...dt,ref:c,href:ce,...C&&{children:C},...b&&{target:b},...E&&{disabled:E},...S&&{style:S},...x&&{className:x},...R&&{onClick:R},...N&&{onFocus:N},..._&&{onMouseEnter:_},...P&&{onMouseLeave:P},...j&&{onTouchStart:j}};const vt=O=>{E||Y&&G()},Gn=vt,Hn=O=>{if(!(E||!Y))if(!Te)G();else{const I=O.target;if(ne.has(I))return;const V=setTimeout(()=>{ne.delete(I),G()},Te);ne.set(I,V)}},qn=O=>{if(E||!Y||!Te)return;const I=O.target,V=ne.get(I);V&&(clearTimeout(V),ne.delete(I))},ue=Me?ht(s,{})??gr:je,le=Me?je:ht(m,{})??je,mt=[x,ue.className,le.className].filter(Boolean).join(" "),pt=(S||ue.style||le.style)&&{...S,...ue.style,...le.style};return{...dt,...ue,...le,href:se?.href,ref:c,onClick:re([R,Bn]),onFocus:re([N,vt]),onMouseEnter:re([_,Hn]),onMouseLeave:re([P,qn]),onTouchStart:re([j,Gn]),disabled:!!E,target:b,...pt&&{style:pt},...mt&&{className:mt},...E&&hr,...Me&&yr,...r&&Er}}const je={},gr={className:"active"},hr={role:"link","aria-disabled":!0},yr={"data-status":"active","aria-current":"page"},Er={"data-transitioning":"transitioning"},ne=new WeakMap,br={rootMargin:"100px"},re=e=>t=>{for(const n of e)if(n){if(t.defaultPrevented)return;n(t)}},wr=i.forwardRef((e,t)=>{const{_asChild:n,...r}=e,{type:o,ref:a,...c}=pr(r,t),s=typeof r.children=="function"?r.children({isActive:c["data-status"]==="active"}):r.children;return n===void 0&&delete c.disabled,i.createElement(n||"a",{...c,ref:a},s)});function xr(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}const Sr=$t.cva("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9","icon-sm":"size-8","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}});function Qe({className:e,variant:t="default",size:n="default",asChild:r=!1,...o}){const a=r?ae.Slot:"button";return d.jsx(a,{"data-slot":"button","data-variant":t,"data-size":n,className:L(Sr({variant:t,size:n,className:e})),...o})}const Cr=({children:e,className:t,variant:n,size:r,...o})=>d.jsx(d.Fragment,{children:d.jsx(Qe,{className:L(t),variant:n,size:r,...o,children:e})});function Rr(e,t){const n=i.createContext(t),r=a=>{const{children:c,...s}=a,m=i.useMemo(()=>s,Object.values(s));return d.jsx(n.Provider,{value:m,children:c})};r.displayName=e+"Provider";function o(a){const c=i.useContext(n);if(c)return c;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[r,o]}function Je(e,t=[]){let n=[];function r(a,c){const s=i.createContext(c),m=n.length;n=[...n,c];const v=f=>{const{scope:g,children:p,...y}=f,u=g?.[e]?.[m]||s,h=i.useMemo(()=>y,Object.values(y));return d.jsx(u.Provider,{value:h,children:p})};v.displayName=a+"Provider";function l(f,g){const p=g?.[e]?.[m]||s,y=i.useContext(p);if(y)return y;if(c!==void 0)return c;throw new Error(`\`${f}\` must be used within \`${a}\``)}return[v,l]}const o=()=>{const a=n.map(c=>i.createContext(c));return function(s){const m=s?.[e]||a;return i.useMemo(()=>({[`__scope${e}`]:{...s,[e]:m}}),[s,m])}};return o.scopeName=e,[r,_r(o,...t)]}function _r(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(a){const c=r.reduce((s,{useScope:m,scopeName:v})=>{const f=m(a)[`__scope${v}`];return{...s,...f}},{});return i.useMemo(()=>({[`__scope${t.scopeName}`]:c}),[c])}};return n.scopeName=t.scopeName,n}function T(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e?.(o),n===!1||!o.defaultPrevented)return t?.(o)}}var Or=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],M=Or.reduce((e,t)=>{const n=ae.createSlot(`Primitive.${t}`),r=i.forwardRef((o,a)=>{const{asChild:c,...s}=o,m=c?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),d.jsx(m,{...s,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function $e(e,t){e&&Zn.flushSync(()=>e.dispatchEvent(t))}var $=globalThis?.document?i.useLayoutEffect:()=>{},Nr=i[" useInsertionEffect ".trim().toString()]||$;function et({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,a,c]=Tr({defaultProp:t,onChange:n}),s=e!==void 0,m=s?e:o;{const l=i.useRef(e!==void 0);i.useEffect(()=>{const f=l.current;f!==s&&console.warn(`${r} is changing from ${f?"controlled":"uncontrolled"} to ${s?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),l.current=s},[s,r])}const v=i.useCallback(l=>{if(s){const f=Mr(l)?l(e):l;f!==e&&c.current?.(f)}else a(l)},[s,e,a,c]);return[m,v]}function Tr({defaultProp:e,onChange:t}){const[n,r]=i.useState(e),o=i.useRef(n),a=i.useRef(t);return Nr(()=>{a.current=t},[t]),i.useEffect(()=>{o.current!==n&&(a.current?.(n),o.current=n)},[n,o]),[n,r,a]}function Mr(e){return typeof e=="function"}function Tt(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Xt(...e){return t=>{let n=!1;const r=e.map(o=>{const a=Tt(o,t);return!n&&typeof a=="function"&&(n=!0),a});if(n)return()=>{for(let o=0;o<r.length;o++){const a=r[o];typeof a=="function"?a():Tt(e[o],null)}}}}function A(...e){return i.useCallback(Xt(...e),e)}var Pr=i.createContext(void 0);function Ir(e){const t=i.useContext(Pr);return e||t||"ltr"}function Dr(e,t){return i.useReducer((n,r)=>t[n][r]??n,e)}var B=e=>{const{present:t,children:n}=e,r=Ar(t),o=typeof n=="function"?n({present:r.isPresent}):i.Children.only(n),a=A(r.ref,Lr(o));return typeof n=="function"||r.isPresent?i.cloneElement(o,{ref:a}):null};B.displayName="Presence";function Ar(e){const[t,n]=i.useState(),r=i.useRef(null),o=i.useRef(e),a=i.useRef("none"),c=e?"mounted":"unmounted",[s,m]=Dr(c,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return i.useEffect(()=>{const v=ve(r.current);a.current=s==="mounted"?v:"none"},[s]),$(()=>{const v=r.current,l=o.current;if(l!==e){const g=a.current,p=ve(v);e?m("MOUNT"):p==="none"||v?.display==="none"?m("UNMOUNT"):m(l&&g!==p?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,m]),$(()=>{if(t){let v;const l=t.ownerDocument.defaultView??window,f=p=>{const u=ve(r.current).includes(CSS.escape(p.animationName));if(p.target===t&&u&&(m("ANIMATION_END"),!o.current)){const h=t.style.animationFillMode;t.style.animationFillMode="forwards",v=l.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=h)})}},g=p=>{p.target===t&&(a.current=ve(r.current))};return t.addEventListener("animationstart",g),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{l.clearTimeout(v),t.removeEventListener("animationstart",g),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else m("ANIMATION_END")},[t,m]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:i.useCallback(v=>{r.current=v?getComputedStyle(v):null,n(v)},[])}}function ve(e){return e?.animationName||"none"}function Lr(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var jr=i[" useId ".trim().toString()]||(()=>{}),kr=0;function oe(e){const[t,n]=i.useState(jr());return $(()=>{n(r=>r??String(kr++))},[e]),t?`radix-${t}`:""}function Zt(e){const t=e+"CollectionProvider",[n,r]=Je(t),[o,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),c=u=>{const{scope:h,children:w}=u,C=D.useRef(null),b=D.useRef(new Map).current;return d.jsx(o,{scope:h,itemMap:b,collectionRef:C,children:w})};c.displayName=t;const s=e+"CollectionSlot",m=ae.createSlot(s),v=D.forwardRef((u,h)=>{const{scope:w,children:C}=u,b=a(s,w),E=A(h,b.collectionRef);return d.jsx(m,{ref:E,children:C})});v.displayName=s;const l=e+"CollectionItemSlot",f="data-radix-collection-item",g=ae.createSlot(l),p=D.forwardRef((u,h)=>{const{scope:w,children:C,...b}=u,E=D.useRef(null),S=A(h,E),x=a(l,w);return D.useEffect(()=>(x.itemMap.set(E,{ref:E,...b}),()=>{x.itemMap.delete(E)})),d.jsx(g,{[f]:"",ref:S,children:C})});p.displayName=l;function y(u){const h=a(e+"CollectionConsumer",u);return D.useCallback(()=>{const C=h.collectionRef.current;if(!C)return[];const b=Array.from(C.querySelectorAll(`[${f}]`));return Array.from(h.itemMap.values()).sort((x,R)=>b.indexOf(x.ref.current)-b.indexOf(R.ref.current))},[h.collectionRef,h.itemMap])}return[{Provider:c,Slot:v,ItemSlot:p},y,r]}function k(e){const t=i.useRef(e);return i.useEffect(()=>{t.current=e}),i.useMemo(()=>(...n)=>t.current?.(...n),[])}function Fr(e,t=globalThis?.document){const n=k(e);i.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var Vr="DismissableLayer",Be="dismissableLayer.update",Wr="dismissableLayer.pointerDownOutside",Kr="dismissableLayer.focusOutside",Mt,Qt=i.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),tt=i.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:c,onDismiss:s,...m}=e,v=i.useContext(Qt),[l,f]=i.useState(null),g=l?.ownerDocument??globalThis?.document,[,p]=i.useState({}),y=A(t,R=>f(R)),u=Array.from(v.layers),[h]=[...v.layersWithOutsidePointerEventsDisabled].slice(-1),w=u.indexOf(h),C=l?u.indexOf(l):-1,b=v.layersWithOutsidePointerEventsDisabled.size>0,E=C>=w,S=$r(R=>{const N=R.target,_=[...v.branches].some(P=>P.contains(N));!E||_||(o?.(R),c?.(R),R.defaultPrevented||s?.())},g),x=Br(R=>{const N=R.target;[...v.branches].some(P=>P.contains(N))||(a?.(R),c?.(R),R.defaultPrevented||s?.())},g);return Fr(R=>{C===v.layers.size-1&&(r?.(R),!R.defaultPrevented&&s&&(R.preventDefault(),s()))},g),i.useEffect(()=>{if(l)return n&&(v.layersWithOutsidePointerEventsDisabled.size===0&&(Mt=g.body.style.pointerEvents,g.body.style.pointerEvents="none"),v.layersWithOutsidePointerEventsDisabled.add(l)),v.layers.add(l),Pt(),()=>{n&&v.layersWithOutsidePointerEventsDisabled.size===1&&(g.body.style.pointerEvents=Mt)}},[l,g,n,v]),i.useEffect(()=>()=>{l&&(v.layers.delete(l),v.layersWithOutsidePointerEventsDisabled.delete(l),Pt())},[l,v]),i.useEffect(()=>{const R=()=>p({});return document.addEventListener(Be,R),()=>document.removeEventListener(Be,R)},[]),d.jsx(M.div,{...m,ref:y,style:{pointerEvents:b?E?"auto":"none":void 0,...e.style},onFocusCapture:T(e.onFocusCapture,x.onFocusCapture),onBlurCapture:T(e.onBlurCapture,x.onBlurCapture),onPointerDownCapture:T(e.onPointerDownCapture,S.onPointerDownCapture)})});tt.displayName=Vr;var Ur="DismissableLayerBranch",zr=i.forwardRef((e,t)=>{const n=i.useContext(Qt),r=i.useRef(null),o=A(t,r);return i.useEffect(()=>{const a=r.current;if(a)return n.branches.add(a),()=>{n.branches.delete(a)}},[n.branches]),d.jsx(M.div,{...e,ref:o})});zr.displayName=Ur;function $r(e,t=globalThis?.document){const n=k(e),r=i.useRef(!1),o=i.useRef(()=>{});return i.useEffect(()=>{const a=s=>{if(s.target&&!r.current){let m=function(){Jt(Wr,n,v,{discrete:!0})};const v={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=m,t.addEventListener("click",o.current,{once:!0})):m()}else t.removeEventListener("click",o.current);r.current=!1},c=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(c),t.removeEventListener("pointerdown",a),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Br(e,t=globalThis?.document){const n=k(e),r=i.useRef(!1);return i.useEffect(()=>{const o=a=>{a.target&&!r.current&&Jt(Kr,n,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Pt(){const e=new CustomEvent(Be);document.dispatchEvent(e)}function Jt(e,t,n,{discrete:r}){const o=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?$e(o,a):o.dispatchEvent(a)}function Gr(e){const t=i.useRef({value:e,previous:e});return i.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Hr=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),qr="VisuallyHidden",en=i.forwardRef((e,t)=>d.jsx(M.span,{...e,ref:t,style:{...Hr,...e.style}}));en.displayName=qr;var Yr=en,q="NavigationMenu",[nt,tn,Xr]=Zt(q),[Ge,Zr,Qr]=Zt(q),[rt]=Je(q,[Xr,Qr]),[Jr,F]=rt(q),[eo,to]=rt(q),nn=i.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,value:r,onValueChange:o,defaultValue:a,delayDuration:c=200,skipDelayDuration:s=300,orientation:m="horizontal",dir:v,...l}=e,[f,g]=i.useState(null),p=A(t,_=>g(_)),y=Ir(v),u=i.useRef(0),h=i.useRef(0),w=i.useRef(0),[C,b]=i.useState(!0),[E,S]=et({prop:r,onChange:_=>{const P=_!=="",j=s>0;P?(window.clearTimeout(w.current),j&&b(!1)):(window.clearTimeout(w.current),w.current=window.setTimeout(()=>b(!0),s)),o?.(_)},defaultProp:a??"",caller:q}),x=i.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>S(""),150)},[S]),R=i.useCallback(_=>{window.clearTimeout(h.current),S(_)},[S]),N=i.useCallback(_=>{E===_?window.clearTimeout(h.current):u.current=window.setTimeout(()=>{window.clearTimeout(h.current),S(_)},c)},[E,S,c]);return i.useEffect(()=>()=>{window.clearTimeout(u.current),window.clearTimeout(h.current),window.clearTimeout(w.current)},[]),d.jsx(rn,{scope:n,isRootMenu:!0,value:E,dir:y,orientation:m,rootNavigationMenu:f,onTriggerEnter:_=>{window.clearTimeout(u.current),C?N(_):R(_)},onTriggerLeave:()=>{window.clearTimeout(u.current),x()},onContentEnter:()=>window.clearTimeout(h.current),onContentLeave:x,onItemSelect:_=>{S(P=>P===_?"":_)},onItemDismiss:()=>S(""),children:d.jsx(M.nav,{"aria-label":"Main","data-orientation":m,dir:y,...l,ref:p})})});nn.displayName=q;var He="NavigationMenuSub",no=i.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,value:r,onValueChange:o,defaultValue:a,orientation:c="horizontal",...s}=e,m=F(He,n),[v,l]=et({prop:r,onChange:o,defaultProp:a??"",caller:He});return d.jsx(rn,{scope:n,isRootMenu:!1,value:v,dir:m.dir,orientation:c,rootNavigationMenu:m.rootNavigationMenu,onTriggerEnter:f=>l(f),onItemSelect:f=>l(f),onItemDismiss:()=>l(""),children:d.jsx(M.div,{"data-orientation":c,...s,ref:t})})});no.displayName=He;var rn=e=>{const{scope:t,isRootMenu:n,rootNavigationMenu:r,dir:o,orientation:a,children:c,value:s,onItemSelect:m,onItemDismiss:v,onTriggerEnter:l,onTriggerLeave:f,onContentEnter:g,onContentLeave:p}=e,[y,u]=i.useState(null),[h,w]=i.useState(new Map),[C,b]=i.useState(null);return d.jsx(Jr,{scope:t,isRootMenu:n,rootNavigationMenu:r,value:s,previousValue:Gr(s),baseId:oe(),dir:o,orientation:a,viewport:y,onViewportChange:u,indicatorTrack:C,onIndicatorTrackChange:b,onTriggerEnter:k(l),onTriggerLeave:k(f),onContentEnter:k(g),onContentLeave:k(p),onItemSelect:k(m),onItemDismiss:k(v),onViewportContentChange:i.useCallback((E,S)=>{w(x=>(x.set(E,S),new Map(x)))},[]),onViewportContentRemove:i.useCallback(E=>{w(S=>S.has(E)?(S.delete(E),new Map(S)):S)},[]),children:d.jsx(nt.Provider,{scope:t,children:d.jsx(eo,{scope:t,items:h,children:c})})})},on="NavigationMenuList",an=i.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,...r}=e,o=F(on,n),a=d.jsx(M.ul,{"data-orientation":o.orientation,...r,ref:t});return d.jsx(M.div,{style:{position:"relative"},ref:o.onIndicatorTrackChange,children:d.jsx(nt.Slot,{scope:n,children:o.isRootMenu?d.jsx(vn,{asChild:!0,children:a}):a})})});an.displayName=on;var sn="NavigationMenuItem",[ro,cn]=rt(sn),un=i.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,value:r,...o}=e,a=oe(),c=r||a||"LEGACY_REACT_AUTO_VALUE",s=i.useRef(null),m=i.useRef(null),v=i.useRef(null),l=i.useRef(()=>{}),f=i.useRef(!1),g=i.useCallback((y="start")=>{if(s.current){l.current();const u=Ye(s.current);u.length&&it(y==="start"?u:u.reverse())}},[]),p=i.useCallback(()=>{if(s.current){const y=Ye(s.current);y.length&&(l.current=mo(y))}},[]);return d.jsx(ro,{scope:n,value:c,triggerRef:m,contentRef:s,focusProxyRef:v,wasEscapeCloseRef:f,onEntryKeyDown:g,onFocusProxyEnter:g,onRootContentClose:p,onContentFocusOutside:p,children:d.jsx(M.li,{...o,ref:t})})});un.displayName=sn;var qe="NavigationMenuTrigger",oo=i.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,disabled:r,...o}=e,a=F(qe,e.__scopeNavigationMenu),c=cn(qe,e.__scopeNavigationMenu),s=i.useRef(null),m=A(s,c.triggerRef,t),v=pn(a.baseId,c.value),l=gn(a.baseId,c.value),f=i.useRef(!1),g=i.useRef(!1),p=c.value===a.value;return d.jsxs(d.Fragment,{children:[d.jsx(nt.ItemSlot,{scope:n,value:c.value,children:d.jsx(mn,{asChild:!0,children:d.jsx(M.button,{id:v,disabled:r,"data-disabled":r?"":void 0,"data-state":st(p),"aria-expanded":p,"aria-controls":l,...o,ref:m,onPointerEnter:T(e.onPointerEnter,()=>{g.current=!1,c.wasEscapeCloseRef.current=!1}),onPointerMove:T(e.onPointerMove,Ce(()=>{r||g.current||c.wasEscapeCloseRef.current||f.current||(a.onTriggerEnter(c.value),f.current=!0)})),onPointerLeave:T(e.onPointerLeave,Ce(()=>{r||(a.onTriggerLeave(),f.current=!1)})),onClick:T(e.onClick,()=>{a.onItemSelect(c.value),g.current=p}),onKeyDown:T(e.onKeyDown,y=>{const h={horizontal:"ArrowDown",vertical:a.dir==="rtl"?"ArrowLeft":"ArrowRight"}[a.orientation];p&&y.key===h&&(c.onEntryKeyDown(),y.preventDefault())})})})}),p&&d.jsxs(d.Fragment,{children:[d.jsx(Yr,{"aria-hidden":!0,tabIndex:0,ref:c.focusProxyRef,onFocus:y=>{const u=c.contentRef.current,h=y.relatedTarget,w=h===s.current,C=u?.contains(h);(w||!C)&&c.onFocusProxyEnter(w?"start":"end")}}),a.viewport&&d.jsx("span",{"aria-owns":l})]})]})});oo.displayName=qe;var ao="NavigationMenuLink",It="navigationMenu.linkSelect",ln=i.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,active:r,onSelect:o,...a}=e;return d.jsx(mn,{asChild:!0,children:d.jsx(M.a,{"data-active":r?"":void 0,"aria-current":r?"page":void 0,...a,ref:t,onClick:T(e.onClick,c=>{const s=c.target,m=new CustomEvent(It,{bubbles:!0,cancelable:!0});if(s.addEventListener(It,v=>o?.(v),{once:!0}),$e(s,m),!m.defaultPrevented&&!c.metaKey){const v=new CustomEvent(Ee,{bubbles:!0,cancelable:!0});$e(s,v)}},{checkForDefaultPrevented:!1})})})});ln.displayName=ao;var ot="NavigationMenuIndicator",io=i.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=F(ot,e.__scopeNavigationMenu),a=!!o.value;return o.indicatorTrack?_e.createPortal(d.jsx(B,{present:n||a,children:d.jsx(so,{...r,ref:t})}),o.indicatorTrack):null});io.displayName=ot;var so=i.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,...r}=e,o=F(ot,n),a=tn(n),[c,s]=i.useState(null),[m,v]=i.useState(null),l=o.orientation==="horizontal",f=!!o.value;i.useEffect(()=>{const y=a().find(u=>u.value===o.value)?.ref.current;y&&s(y)},[a,o.value]);const g=()=>{c&&v({size:l?c.offsetWidth:c.offsetHeight,offset:l?c.offsetLeft:c.offsetTop})};return Xe(c,g),Xe(o.indicatorTrack,g),m?d.jsx(M.div,{"aria-hidden":!0,"data-state":f?"visible":"hidden","data-orientation":o.orientation,...r,ref:t,style:{position:"absolute",...l?{left:0,width:m.size+"px",transform:`translateX(${m.offset}px)`}:{top:0,height:m.size+"px",transform:`translateY(${m.offset}px)`},...r.style}}):null}),ee="NavigationMenuContent",co=i.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=F(ee,e.__scopeNavigationMenu),a=cn(ee,e.__scopeNavigationMenu),c=A(a.contentRef,t),s=a.value===o.value,m={value:a.value,triggerRef:a.triggerRef,focusProxyRef:a.focusProxyRef,wasEscapeCloseRef:a.wasEscapeCloseRef,onContentFocusOutside:a.onContentFocusOutside,onRootContentClose:a.onRootContentClose,...r};return o.viewport?d.jsx(uo,{forceMount:n,...m,ref:c}):d.jsx(B,{present:n||s,children:d.jsx(dn,{"data-state":st(s),...m,ref:c,onPointerEnter:T(e.onPointerEnter,o.onContentEnter),onPointerLeave:T(e.onPointerLeave,Ce(o.onContentLeave)),style:{pointerEvents:!s&&o.isRootMenu?"none":void 0,...m.style}})})});co.displayName=ee;var uo=i.forwardRef((e,t)=>{const n=F(ee,e.__scopeNavigationMenu),{onViewportContentChange:r,onViewportContentRemove:o}=n;return $(()=>{r(e.value,{ref:t,...e})},[e,t,r]),$(()=>()=>o(e.value),[e.value,o]),null}),Ee="navigationMenu.rootContentDismiss",dn=i.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,value:r,triggerRef:o,focusProxyRef:a,wasEscapeCloseRef:c,onRootContentClose:s,onContentFocusOutside:m,...v}=e,l=F(ee,n),f=i.useRef(null),g=A(f,t),p=pn(l.baseId,r),y=gn(l.baseId,r),u=tn(n),h=i.useRef(null),{onItemDismiss:w}=l;i.useEffect(()=>{const b=f.current;if(l.isRootMenu&&b){const E=()=>{w(),s(),b.contains(document.activeElement)&&o.current?.focus()};return b.addEventListener(Ee,E),()=>b.removeEventListener(Ee,E)}},[l.isRootMenu,e.value,o,w,s]);const C=i.useMemo(()=>{const E=u().map(P=>P.value);l.dir==="rtl"&&E.reverse();const S=E.indexOf(l.value),x=E.indexOf(l.previousValue),R=r===l.value,N=x===E.indexOf(r);if(!R&&!N)return h.current;const _=(()=>{if(S!==x){if(R&&x!==-1)return S>x?"from-end":"from-start";if(N&&S!==-1)return S>x?"to-start":"to-end"}return null})();return h.current=_,_},[l.previousValue,l.value,l.dir,u,r]);return d.jsx(vn,{asChild:!0,children:d.jsx(tt,{id:y,"aria-labelledby":p,"data-motion":C,"data-orientation":l.orientation,...v,ref:g,disableOutsidePointerEvents:!1,onDismiss:()=>{const b=new Event(Ee,{bubbles:!0,cancelable:!0});f.current?.dispatchEvent(b)},onFocusOutside:T(e.onFocusOutside,b=>{m();const E=b.target;l.rootNavigationMenu?.contains(E)&&b.preventDefault()}),onPointerDownOutside:T(e.onPointerDownOutside,b=>{const E=b.target,S=u().some(R=>R.ref.current?.contains(E)),x=l.isRootMenu&&l.viewport?.contains(E);(S||x||!l.isRootMenu)&&b.preventDefault()}),onKeyDown:T(e.onKeyDown,b=>{const E=b.altKey||b.ctrlKey||b.metaKey;if(b.key==="Tab"&&!E){const x=Ye(b.currentTarget),R=document.activeElement,N=x.findIndex(j=>j===R),P=b.shiftKey?x.slice(0,N).reverse():x.slice(N+1,x.length);it(P)?b.preventDefault():a.current?.focus()}}),onEscapeKeyDown:T(e.onEscapeKeyDown,b=>{c.current=!0})})})}),at="NavigationMenuViewport",fn=i.forwardRef((e,t)=>{const{forceMount:n,...r}=e,a=!!F(at,e.__scopeNavigationMenu).value;return d.jsx(B,{present:n||a,children:d.jsx(lo,{...r,ref:t})})});fn.displayName=at;var lo=i.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,children:r,...o}=e,a=F(at,n),c=A(t,a.onViewportChange),s=to(ee,e.__scopeNavigationMenu),[m,v]=i.useState(null),[l,f]=i.useState(null),g=m?m?.width+"px":void 0,p=m?m?.height+"px":void 0,y=!!a.value,u=y?a.value:a.previousValue;return Xe(l,()=>{l&&v({width:l.offsetWidth,height:l.offsetHeight})}),d.jsx(M.div,{"data-state":st(y),"data-orientation":a.orientation,...o,ref:c,style:{pointerEvents:!y&&a.isRootMenu?"none":void 0,"--radix-navigation-menu-viewport-width":g,"--radix-navigation-menu-viewport-height":p,...o.style},onPointerEnter:T(e.onPointerEnter,a.onContentEnter),onPointerLeave:T(e.onPointerLeave,Ce(a.onContentLeave)),children:Array.from(s.items).map(([w,{ref:C,forceMount:b,...E}])=>{const S=u===w;return d.jsx(B,{present:b||S,children:d.jsx(dn,{...E,ref:Xt(C,x=>{S&&x&&f(x)})})},w)})})}),fo="FocusGroup",vn=i.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,...r}=e,o=F(fo,n);return d.jsx(Ge.Provider,{scope:n,children:d.jsx(Ge.Slot,{scope:n,children:d.jsx(M.div,{dir:o.dir,...r,ref:t})})})}),Dt=["ArrowRight","ArrowLeft","ArrowUp","ArrowDown"],vo="FocusGroupItem",mn=i.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,...r}=e,o=Zr(n),a=F(vo,n);return d.jsx(Ge.ItemSlot,{scope:n,children:d.jsx(M.button,{...r,ref:t,onKeyDown:T(e.onKeyDown,c=>{if(["Home","End",...Dt].includes(c.key)){let m=o().map(f=>f.ref.current);if([a.dir==="rtl"?"ArrowRight":"ArrowLeft","ArrowUp","End"].includes(c.key)&&m.reverse(),Dt.includes(c.key)){const f=m.indexOf(c.currentTarget);m=m.slice(f+1)}setTimeout(()=>it(m)),c.preventDefault()}})})})});function Ye(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function it(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}function mo(e){return e.forEach(t=>{t.dataset.tabindex=t.getAttribute("tabindex")||"",t.setAttribute("tabindex","-1")}),()=>{e.forEach(t=>{const n=t.dataset.tabindex;t.setAttribute("tabindex",n)})}}function Xe(e,t){const n=k(t);$(()=>{let r=0;if(e){const o=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return o.observe(e),()=>{window.cancelAnimationFrame(r),o.unobserve(e)}}},[e,n])}function st(e){return e?"open":"closed"}function pn(e,t){return`${e}-trigger-${t}`}function gn(e,t){return`${e}-content-${t}`}function Ce(e){return t=>t.pointerType==="mouse"?e(t):void 0}var po=nn,go=an,ho=un,yo=ln,Eo=fn;function bo({className:e,children:t,viewport:n=!0,...r}){return d.jsxs(po,{"data-slot":"navigation-menu","data-viewport":n,className:L("group/navigation-menu relative flex max-w-max flex-1 items-center justify-center",e),...r,children:[t,n&&d.jsx(Co,{})]})}function wo({className:e,...t}){return d.jsx(go,{"data-slot":"navigation-menu-list",className:L("group flex flex-1 list-none items-center justify-center gap-1",e),...t})}function xo({className:e,...t}){return d.jsx(ho,{"data-slot":"navigation-menu-item",className:L("relative",e),...t})}const So=$t.cva("group inline-flex h-9 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=open]:hover:bg-accent data-[state=open]:text-accent-foreground data-[state=open]:focus:bg-accent data-[state=open]:bg-accent/50 focus-visible:ring-ring/50 outline-none transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1");function Co({className:e,...t}){return d.jsx("div",{className:L("absolute top-full left-0 isolate z-50 flex justify-center"),children:d.jsx(Eo,{"data-slot":"navigation-menu-viewport",className:L("origin-top-center bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-md border shadow md:w-[var(--radix-navigation-menu-viewport-width)]",e),...t})})}function Ro({className:e,...t}){return d.jsx(yo,{"data-slot":"navigation-menu-link",className:L("data-[active=true]:focus:bg-accent data-[active=true]:hover:bg-accent data-[active=true]:bg-accent/50 data-[active=true]:text-accent-foreground hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus-visible:ring-ring/50 [&_svg:not([class*='text-'])]:text-muted-foreground flex flex-col gap-1 rounded-sm p-2 text-sm transition-all outline-none focus-visible:ring-[3px] focus-visible:outline-1 [&_svg:not([class*='size-'])]:size-4",e),...t})}var ke="focusScope.autoFocusOnMount",Fe="focusScope.autoFocusOnUnmount",At={bubbles:!1,cancelable:!0},_o="FocusScope",hn=i.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:a,...c}=e,[s,m]=i.useState(null),v=k(o),l=k(a),f=i.useRef(null),g=A(t,u=>m(u)),p=i.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;i.useEffect(()=>{if(r){let u=function(b){if(p.paused||!s)return;const E=b.target;s.contains(E)?f.current=E:z(f.current,{select:!0})},h=function(b){if(p.paused||!s)return;const E=b.relatedTarget;E!==null&&(s.contains(E)||z(f.current,{select:!0}))},w=function(b){if(document.activeElement===document.body)for(const S of b)S.removedNodes.length>0&&z(s)};document.addEventListener("focusin",u),document.addEventListener("focusout",h);const C=new MutationObserver(w);return s&&C.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",u),document.removeEventListener("focusout",h),C.disconnect()}}},[r,s,p.paused]),i.useEffect(()=>{if(s){jt.add(p);const u=document.activeElement;if(!s.contains(u)){const w=new CustomEvent(ke,At);s.addEventListener(ke,v),s.dispatchEvent(w),w.defaultPrevented||(Oo(Io(yn(s)),{select:!0}),document.activeElement===u&&z(s))}return()=>{s.removeEventListener(ke,v),setTimeout(()=>{const w=new CustomEvent(Fe,At);s.addEventListener(Fe,l),s.dispatchEvent(w),w.defaultPrevented||z(u??document.body,{select:!0}),s.removeEventListener(Fe,l),jt.remove(p)},0)}}},[s,v,l,p]);const y=i.useCallback(u=>{if(!n&&!r||p.paused)return;const h=u.key==="Tab"&&!u.altKey&&!u.ctrlKey&&!u.metaKey,w=document.activeElement;if(h&&w){const C=u.currentTarget,[b,E]=No(C);b&&E?!u.shiftKey&&w===E?(u.preventDefault(),n&&z(b,{select:!0})):u.shiftKey&&w===b&&(u.preventDefault(),n&&z(E,{select:!0})):w===C&&u.preventDefault()}},[n,r,p.paused]);return d.jsx(M.div,{tabIndex:-1,...c,ref:g,onKeyDown:y})});hn.displayName=_o;function Oo(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(z(r,{select:t}),document.activeElement!==n)return}function No(e){const t=yn(e),n=Lt(t,e),r=Lt(t.reverse(),e);return[n,r]}function yn(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Lt(e,t){for(const n of e)if(!To(n,{upTo:t}))return n}function To(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Mo(e){return e instanceof HTMLInputElement&&"select"in e}function z(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Mo(e)&&t&&e.select()}}var jt=Po();function Po(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=kt(e,t),e.unshift(t)},remove(t){e=kt(e,t),e[0]?.resume()}}}function kt(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Io(e){return e.filter(t=>t.tagName!=="A")}var Do="Portal",En=i.forwardRef((e,t)=>{const{container:n,...r}=e,[o,a]=i.useState(!1);$(()=>a(!0),[]);const c=n||o&&globalThis?.document?.body;return c?_e.createPortal(d.jsx(M.div,{...r,ref:t}),c):null});En.displayName=Do;var Ve=0;function Ao(){i.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Ft()),document.body.insertAdjacentElement("beforeend",e[1]??Ft()),Ve++,()=>{Ve===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Ve--}},[])}function Ft(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var K=function(){return K=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},K.apply(this,arguments)};function bn(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function Lo(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,a;r<o;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var be="right-scroll-bar-position",we="width-before-scroll-bar",jo="with-scroll-bars-hidden",ko="--removed-body-scroll-bar-size";function We(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Fo(e,t){var n=D.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var Vo=typeof window<"u"?i.useLayoutEffect:i.useEffect,Vt=new WeakMap;function Wo(e,t){var n=Fo(null,function(r){return e.forEach(function(o){return We(o,r)})});return Vo(function(){var r=Vt.get(n);if(r){var o=new Set(r),a=new Set(e),c=n.current;o.forEach(function(s){a.has(s)||We(s,null)}),a.forEach(function(s){o.has(s)||We(s,c)})}Vt.set(n,e)},[e]),n}function Ko(e){return e}function Uo(e,t){t===void 0&&(t=Ko);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(a){var c=t(a,r);return n.push(c),function(){n=n.filter(function(s){return s!==c})}},assignSyncMedium:function(a){for(r=!0;n.length;){var c=n;n=[],c.forEach(a)}n={push:function(s){return a(s)},filter:function(){return n}}},assignMedium:function(a){r=!0;var c=[];if(n.length){var s=n;n=[],s.forEach(a),c=n}var m=function(){var l=c;c=[],l.forEach(a)},v=function(){return Promise.resolve().then(m)};v(),n={push:function(l){c.push(l),v()},filter:function(l){return c=c.filter(l),n}}}};return o}function zo(e){e===void 0&&(e={});var t=Uo(null);return t.options=K({async:!0,ssr:!1},e),t}var wn=function(e){var t=e.sideCar,n=bn(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return i.createElement(r,K({},n))};wn.isSideCarExport=!0;function $o(e,t){return e.useMedium(t),wn}var xn=zo(),Ke=function(){},Oe=i.forwardRef(function(e,t){var n=i.useRef(null),r=i.useState({onScrollCapture:Ke,onWheelCapture:Ke,onTouchMoveCapture:Ke}),o=r[0],a=r[1],c=e.forwardProps,s=e.children,m=e.className,v=e.removeScrollBar,l=e.enabled,f=e.shards,g=e.sideCar,p=e.noRelative,y=e.noIsolation,u=e.inert,h=e.allowPinchZoom,w=e.as,C=w===void 0?"div":w,b=e.gapMode,E=bn(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),S=g,x=Wo([n,t]),R=K(K({},E),o);return i.createElement(i.Fragment,null,l&&i.createElement(S,{sideCar:xn,removeScrollBar:v,shards:f,noRelative:p,noIsolation:y,inert:u,setCallbacks:a,allowPinchZoom:!!h,lockRef:n,gapMode:b}),c?i.cloneElement(i.Children.only(s),K(K({},R),{ref:x})):i.createElement(C,K({},R,{className:m,ref:x}),s))});Oe.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Oe.classNames={fullWidth:we,zeroRight:be};var Bo=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Go(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Bo();return t&&e.setAttribute("nonce",t),e}function Ho(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function qo(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Yo=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Go())&&(Ho(t,n),qo(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Xo=function(){var e=Yo();return function(t,n){i.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Sn=function(){var e=Xo(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},Zo={left:0,top:0,right:0,gap:0},Ue=function(e){return parseInt(e||"",10)||0},Qo=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[Ue(n),Ue(r),Ue(o)]},Jo=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Zo;var t=Qo(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},ea=Sn(),J="data-scroll-locked",ta=function(e,t,n,r){var o=e.left,a=e.top,c=e.right,s=e.gap;return n===void 0&&(n="margin"),`
|
|
2
|
+
.`.concat(jo,` {
|
|
3
3
|
overflow: hidden `).concat(r,`;
|
|
4
4
|
padding-right: `).concat(s,"px ").concat(r,`;
|
|
5
5
|
}
|
|
6
|
-
body[`).concat(
|
|
6
|
+
body[`).concat(J,`] {
|
|
7
7
|
overflow: hidden `).concat(r,`;
|
|
8
8
|
overscroll-behavior: contain;
|
|
9
9
|
`).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
|
|
@@ -16,31 +16,31 @@
|
|
|
16
16
|
`),n==="padding"&&"padding-right: ".concat(s,"px ").concat(r,";")].filter(Boolean).join(""),`
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
.`).concat(
|
|
19
|
+
.`).concat(be,` {
|
|
20
20
|
right: `).concat(s,"px ").concat(r,`;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
.`).concat(
|
|
23
|
+
.`).concat(we,` {
|
|
24
24
|
margin-right: `).concat(s,"px ").concat(r,`;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
.`).concat(
|
|
27
|
+
.`).concat(be," .").concat(be,` {
|
|
28
28
|
right: 0 `).concat(r,`;
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
.`).concat(
|
|
31
|
+
.`).concat(we," .").concat(we,` {
|
|
32
32
|
margin-right: 0 `).concat(r,`;
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
body[`).concat(
|
|
36
|
-
`).concat(
|
|
35
|
+
body[`).concat(J,`] {
|
|
36
|
+
`).concat(ko,": ").concat(s,`px;
|
|
37
37
|
}
|
|
38
|
-
`)},
|
|
38
|
+
`)},Wt=function(){var e=parseInt(document.body.getAttribute(J)||"0",10);return isFinite(e)?e:0},na=function(){i.useEffect(function(){return document.body.setAttribute(J,(Wt()+1).toString()),function(){var e=Wt()-1;e<=0?document.body.removeAttribute(J):document.body.setAttribute(J,e.toString())}},[])},ra=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;na();var a=i.useMemo(function(){return Jo(o)},[o]);return i.createElement(ea,{styles:ta(a,!t,o,n?"":"!important")})},Ze=!1;if(typeof window<"u")try{var me=Object.defineProperty({},"passive",{get:function(){return Ze=!0,!0}});window.addEventListener("test",me,me),window.removeEventListener("test",me,me)}catch{Ze=!1}var X=Ze?{passive:!1}:!1,oa=function(e){return e.tagName==="TEXTAREA"},Cn=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!oa(e)&&n[t]==="visible")},aa=function(e){return Cn(e,"overflowY")},ia=function(e){return Cn(e,"overflowX")},Kt=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=Rn(e,r);if(o){var a=_n(e,r),c=a[1],s=a[2];if(c>s)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},sa=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},ca=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},Rn=function(e,t){return e==="v"?aa(t):ia(t)},_n=function(e,t){return e==="v"?sa(t):ca(t)},ua=function(e,t){return e==="h"&&t==="rtl"?-1:1},la=function(e,t,n,r,o){var a=ua(e,window.getComputedStyle(t).direction),c=a*r,s=n.target,m=t.contains(s),v=!1,l=c>0,f=0,g=0;do{if(!s)break;var p=_n(e,s),y=p[0],u=p[1],h=p[2],w=u-h-a*y;(y||w)&&Rn(e,s)&&(f+=w,g+=y);var C=s.parentNode;s=C&&C.nodeType===Node.DOCUMENT_FRAGMENT_NODE?C.host:C}while(!m&&s!==document.body||m&&(t.contains(s)||t===s));return(l&&Math.abs(f)<1||!l&&Math.abs(g)<1)&&(v=!0),v},pe=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Ut=function(e){return[e.deltaX,e.deltaY]},zt=function(e){return e&&"current"in e?e.current:e},da=function(e,t){return e[0]===t[0]&&e[1]===t[1]},fa=function(e){return`
|
|
39
39
|
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
40
40
|
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
41
|
-
`)},
|
|
41
|
+
`)},va=0,Z=[];function ma(e){var t=i.useRef([]),n=i.useRef([0,0]),r=i.useRef(),o=i.useState(va++)[0],a=i.useState(Sn)[0],c=i.useRef(e);i.useEffect(function(){c.current=e},[e]),i.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var u=Lo([e.lockRef.current],(e.shards||[]).map(zt),!0).filter(Boolean);return u.forEach(function(h){return h.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),u.forEach(function(h){return h.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var s=i.useCallback(function(u,h){if("touches"in u&&u.touches.length===2||u.type==="wheel"&&u.ctrlKey)return!c.current.allowPinchZoom;var w=pe(u),C=n.current,b="deltaX"in u?u.deltaX:C[0]-w[0],E="deltaY"in u?u.deltaY:C[1]-w[1],S,x=u.target,R=Math.abs(b)>Math.abs(E)?"h":"v";if("touches"in u&&R==="h"&&x.type==="range")return!1;var N=window.getSelection(),_=N&&N.anchorNode,P=_?_===x||_.contains(x):!1;if(P)return!1;var j=Kt(R,x);if(!j)return!0;if(j?S=R:(S=R==="v"?"h":"v",j=Kt(R,x)),!j)return!1;if(!r.current&&"changedTouches"in u&&(b||E)&&(r.current=S),!S)return!0;var ie=r.current||S;return la(ie,h,u,ie==="h"?b:E)},[]),m=i.useCallback(function(u){var h=u;if(!(!Z.length||Z[Z.length-1]!==a)){var w="deltaY"in h?Ut(h):pe(h),C=t.current.filter(function(S){return S.name===h.type&&(S.target===h.target||h.target===S.shadowParent)&&da(S.delta,w)})[0];if(C&&C.should){h.cancelable&&h.preventDefault();return}if(!C){var b=(c.current.shards||[]).map(zt).filter(Boolean).filter(function(S){return S.contains(h.target)}),E=b.length>0?s(h,b[0]):!c.current.noIsolation;E&&h.cancelable&&h.preventDefault()}}},[]),v=i.useCallback(function(u,h,w,C){var b={name:u,delta:h,target:w,should:C,shadowParent:pa(w)};t.current.push(b),setTimeout(function(){t.current=t.current.filter(function(E){return E!==b})},1)},[]),l=i.useCallback(function(u){n.current=pe(u),r.current=void 0},[]),f=i.useCallback(function(u){v(u.type,Ut(u),u.target,s(u,e.lockRef.current))},[]),g=i.useCallback(function(u){v(u.type,pe(u),u.target,s(u,e.lockRef.current))},[]);i.useEffect(function(){return Z.push(a),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:g}),document.addEventListener("wheel",m,X),document.addEventListener("touchmove",m,X),document.addEventListener("touchstart",l,X),function(){Z=Z.filter(function(u){return u!==a}),document.removeEventListener("wheel",m,X),document.removeEventListener("touchmove",m,X),document.removeEventListener("touchstart",l,X)}},[]);var p=e.removeScrollBar,y=e.inert;return i.createElement(i.Fragment,null,y?i.createElement(a,{styles:fa(o)}):null,p?i.createElement(ra,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function pa(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const ga=$o(xn,ma);var On=i.forwardRef(function(e,t){return i.createElement(Oe,K({},e,{ref:t,sideCar:ga}))});On.classNames=Oe.classNames;var ha=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Q=new WeakMap,ge=new WeakMap,he={},ze=0,Nn=function(e){return e&&(e.host||Nn(e.parentNode))},ya=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=Nn(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},Ea=function(e,t,n,r){var o=ya(t,Array.isArray(e)?e:[e]);he[n]||(he[n]=new WeakMap);var a=he[n],c=[],s=new Set,m=new Set(o),v=function(f){!f||s.has(f)||(s.add(f),v(f.parentNode))};o.forEach(v);var l=function(f){!f||m.has(f)||Array.prototype.forEach.call(f.children,function(g){if(s.has(g))l(g);else try{var p=g.getAttribute(r),y=p!==null&&p!=="false",u=(Q.get(g)||0)+1,h=(a.get(g)||0)+1;Q.set(g,u),a.set(g,h),c.push(g),u===1&&y&&ge.set(g,!0),h===1&&g.setAttribute(n,"true"),y||g.setAttribute(r,"true")}catch(w){console.error("aria-hidden: cannot operate on ",g,w)}})};return l(t),s.clear(),ze++,function(){c.forEach(function(f){var g=Q.get(f)-1,p=a.get(f)-1;Q.set(f,g),a.set(f,p),g||(ge.has(f)||f.removeAttribute(r),ge.delete(f)),p||f.removeAttribute(n)}),ze--,ze||(Q=new WeakMap,Q=new WeakMap,ge=new WeakMap,he={})}},ba=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=ha(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),Ea(r,o,n,"aria-hidden")):function(){return null}},Ne="Dialog",[Tn]=Je(Ne),[wa,W]=Tn(Ne),Mn=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:a,modal:c=!0}=e,s=i.useRef(null),m=i.useRef(null),[v,l]=et({prop:r,defaultProp:o??!1,onChange:a,caller:Ne});return d.jsx(wa,{scope:t,triggerRef:s,contentRef:m,contentId:oe(),titleId:oe(),descriptionId:oe(),open:v,onOpenChange:l,onOpenToggle:i.useCallback(()=>l(f=>!f),[l]),modal:c,children:n})};Mn.displayName=Ne;var Pn="DialogTrigger",In=i.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=W(Pn,n),a=A(t,o.triggerRef);return d.jsx(M.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":lt(o.open),...r,ref:a,onClick:T(e.onClick,o.onOpenToggle)})});In.displayName=Pn;var ct="DialogPortal",[xa,Dn]=Tn(ct,{forceMount:void 0}),An=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,a=W(ct,t);return d.jsx(xa,{scope:t,forceMount:n,children:i.Children.map(r,c=>d.jsx(B,{present:n||a.open,children:d.jsx(En,{asChild:!0,container:o,children:c})}))})};An.displayName=ct;var Re="DialogOverlay",Ln=i.forwardRef((e,t)=>{const n=Dn(Re,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=W(Re,e.__scopeDialog);return a.modal?d.jsx(B,{present:r||a.open,children:d.jsx(Ca,{...o,ref:t})}):null});Ln.displayName=Re;var Sa=ae.createSlot("DialogOverlay.RemoveScroll"),Ca=i.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=W(Re,n);return d.jsx(On,{as:Sa,allowPinchZoom:!0,shards:[o.contentRef],children:d.jsx(M.div,{"data-state":lt(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),H="DialogContent",jn=i.forwardRef((e,t)=>{const n=Dn(H,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=W(H,e.__scopeDialog);return d.jsx(B,{present:r||a.open,children:a.modal?d.jsx(Ra,{...o,ref:t}):d.jsx(_a,{...o,ref:t})})});jn.displayName=H;var Ra=i.forwardRef((e,t)=>{const n=W(H,e.__scopeDialog),r=i.useRef(null),o=A(t,n.contentRef,r);return i.useEffect(()=>{const a=r.current;if(a)return ba(a)},[]),d.jsx(kn,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:T(e.onCloseAutoFocus,a=>{a.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:T(e.onPointerDownOutside,a=>{const c=a.detail.originalEvent,s=c.button===0&&c.ctrlKey===!0;(c.button===2||s)&&a.preventDefault()}),onFocusOutside:T(e.onFocusOutside,a=>a.preventDefault())})}),_a=i.forwardRef((e,t)=>{const n=W(H,e.__scopeDialog),r=i.useRef(!1),o=i.useRef(!1);return d.jsx(kn,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{e.onCloseAutoFocus?.(a),a.defaultPrevented||(r.current||n.triggerRef.current?.focus(),a.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:a=>{e.onInteractOutside?.(a),a.defaultPrevented||(r.current=!0,a.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const c=a.target;n.triggerRef.current?.contains(c)&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&o.current&&a.preventDefault()}})}),kn=i.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:a,...c}=e,s=W(H,n),m=i.useRef(null),v=A(t,m);return Ao(),d.jsxs(d.Fragment,{children:[d.jsx(hn,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:a,children:d.jsx(tt,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":lt(s.open),...c,ref:v,onDismiss:()=>s.onOpenChange(!1)})}),d.jsxs(d.Fragment,{children:[d.jsx(Ta,{titleId:s.titleId}),d.jsx(Pa,{contentRef:m,descriptionId:s.descriptionId})]})]})}),ut="DialogTitle",Oa=i.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=W(ut,n);return d.jsx(M.h2,{id:o.titleId,...r,ref:t})});Oa.displayName=ut;var Fn="DialogDescription",Na=i.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=W(Fn,n);return d.jsx(M.p,{id:o.descriptionId,...r,ref:t})});Na.displayName=Fn;var Vn="DialogClose",Wn=i.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=W(Vn,n);return d.jsx(M.button,{type:"button",...r,ref:t,onClick:T(e.onClick,()=>o.onOpenChange(!1))})});Wn.displayName=Vn;function lt(e){return e?"open":"closed"}var Kn="DialogTitleWarning",[ei,Un]=Rr(Kn,{contentName:H,titleName:ut,docsSlug:"dialog"}),Ta=({titleId:e})=>{const t=Un(Kn),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
42
42
|
|
|
43
43
|
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
44
44
|
|
|
45
|
-
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return i.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},
|
|
45
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return i.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},Ma="DialogDescriptionWarning",Pa=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Un(Ma).contentName}}.`;return i.useEffect(()=>{const o=e.current?.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},Ia=Mn,Da=In,Aa=An,La=Ln,ja=jn,ka=Wn;function Fa({...e}){return d.jsx(Ia,{"data-slot":"sheet",...e})}function Va({...e}){return d.jsx(Da,{"data-slot":"sheet-trigger",...e})}function Wa({...e}){return d.jsx(Aa,{"data-slot":"sheet-portal",...e})}function Ka({className:e,...t}){return d.jsx(La,{"data-slot":"sheet-overlay",className:L("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",e),...t})}function Ua({className:e,children:t,side:n="right",...r}){return d.jsxs(Wa,{children:[d.jsx(Ka,{}),d.jsxs(ja,{"data-slot":"sheet-content",className:L("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500",n==="right"&&"data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",n==="left"&&"data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",n==="top"&&"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",n==="bottom"&&"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t",e),...r,children:[t,d.jsxs(ka,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none",children:[d.jsx(Bt.XIcon,{className:"size-4"}),d.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}const za=({navItems:e,LinkComponent:t="a",className:n,...r})=>d.jsxs("header",{className:L(n),...r,children:[d.jsx("nav",{className:"hidden sm:flex sticky top-0 z-10 items-center px-4 h-14",children:d.jsx(bo,{children:d.jsx(wo,{children:e.map(o=>d.jsx(xo,{children:d.jsx(Ro,{asChild:!0,className:So(),children:d.jsxs(t,{to:o.url,className:"flex items-center",children:[o.icon&&d.jsx(o.icon,{}),d.jsx("span",{children:o.title})]})})},o.title))})})}),d.jsx("nav",{className:"flex sm:hidden",children:d.jsxs(Fa,{children:[d.jsx(Va,{asChild:!0,children:d.jsx(Qe,{variant:"ghost",size:"icon",children:d.jsx(Bt.Menu,{})})}),d.jsx(Ua,{side:"top",className:"p-8",children:d.jsx("div",{className:"flex flex-col gap-4",children:e.map(o=>d.jsxs(t,{to:o.url,className:"flex items-center gap-2",children:[o.icon&&d.jsx(o.icon,{}),d.jsx("span",{className:"text-base font-medium",children:o.title})]},o.title))})})]})})]}),$a=({links:e,copyright:t,socialProfiles:n,className:r,...o})=>d.jsx("footer",{className:L(r),...o,children:d.jsxs("div",{className:"flex flex-col items-center justify-center gap-5 bg-background py-8 border-t",children:[d.jsx("div",{className:"flex justify-center gap-5 sm:gap-8 xl:gap-13",children:n.map(a=>d.jsx(Qe,{variant:"secondary",size:"icon",className:"rounded-xl",children:d.jsx("a",{href:a.url,children:a.icon&&d.jsx(a.icon,{})})},a.title))}),d.jsx("div",{className:"flex justify-center gap-5 sm:gap-8 xl:gap-13",children:e.map(a=>{const c=a.url;return d.jsx("a",{href:c,children:a.title},a.title)})}),d.jsxs("div",{className:"text-muted",children:[t," ",new Date().getFullYear()]})]})});exports.CustomButton=Cr;exports.Footer=$a;exports.Link=wr;exports.MainNav=za;exports.cn=L;
|
|
46
46
|
//# sourceMappingURL=index.js.map
|