@sykoramaros/marosh-components 0.1.4 → 0.1.6
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/README.md +2 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.js +19 -19
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4164 -1437
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/App.tsx +3 -3
- package/src/components/basicComponents/MainSidebarLayout.tsx +107 -0
- package/src/index.ts +7 -3
- /package/src/components/{CustomButton.tsx → basicComponents/CustomButton.tsx} +0 -0
- /package/src/components/{Footer.tsx → basicComponents/Footer.tsx} +0 -0
- /package/src/components/{MainNav.tsx → basicComponents/MainNav.tsx} +0 -0
package/README.md
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -52,6 +52,19 @@ export declare interface MainNavProps extends React.ComponentPropsWithoutRef<"he
|
|
|
52
52
|
}>;
|
|
53
53
|
}
|
|
54
54
|
|
|
55
|
+
export declare const MainSidebarLayout: ({ useSidebar, useMainNav, useFooter, appName, navItems, footerProps, sidebarDefaultOpen, }: MainSidebarLayoutProps) => JSX.Element;
|
|
56
|
+
|
|
57
|
+
export declare interface MainSidebarLayoutProps {
|
|
58
|
+
useSidebar?: boolean;
|
|
59
|
+
useMainNav?: boolean;
|
|
60
|
+
useFooter?: boolean;
|
|
61
|
+
appName?: string;
|
|
62
|
+
navItems?: NavItem[];
|
|
63
|
+
footerProps?: FooterProps;
|
|
64
|
+
sidebarDefaultOpen?: boolean;
|
|
65
|
+
children?: React.ReactNode;
|
|
66
|
+
}
|
|
67
|
+
|
|
55
68
|
export declare interface NavItem {
|
|
56
69
|
title: string;
|
|
57
70
|
url: string;
|
package/dist/index.js
CHANGED
|
@@ -1,46 +1,46 @@
|
|
|
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(
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const xi=require("clsx"),yi=require("tailwind-merge"),u=require("react/jsx-runtime"),me=require("@radix-ui/react-slot"),vn=require("class-variance-authority"),W=require("react"),wt=require("react-dom"),gn=require("lucide-react");function Pr(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 c=Pr(W),Nr=Pr(wt);function A(...e){return yi.twMerge(xi.clsx(e))}function wi(e){return typeof e=="function"}function Zt(e,t){return wi(e)?e(t):e}const bi=Object.prototype.hasOwnProperty;function Ar(e,t){if(e===t)return e;const n=t,r=Gn(e)&&Gn(n);if(!r&&!(ut(e)&&ut(n)))return n;const o=r?e:Kn(e);if(!o)return n;const i=r?n:Kn(n);if(!i)return n;const s=o.length,a=i.length,f=r?new Array(a):{};let d=0;for(let l=0;l<a;l++){const p=r?l:i[l],v=e[p],h=n[p];if(v===h){f[p]=v,(r?l<s:bi.call(e,p))&&d++;continue}if(v===null||h===null||typeof v!="object"||typeof h!="object"){f[p]=h;continue}const g=Ar(v,h);f[p]=g,g===v&&d++}return s===a&&d===s?e:f}function Kn(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 ut(e){if(!Un(e))return!1;const t=e.constructor;if(typeof t>"u")return!0;const n=t.prototype;return!(!Un(n)||!n.hasOwnProperty("isPrototypeOf"))}function Un(e){return Object.prototype.toString.call(e)==="[object Object]"}function Gn(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function it(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(!it(e[r],t[r],n))return!1;return!0}if(ut(e)&&ut(t)){const r=n?.ignoreUndefined??!0;if(n?.partial){for(const s in t)if((!r||t[s]!==void 0)&&!it(e[s],t[s],n))return!1;return!0}let o=0;if(!r)o=Object.keys(e).length;else for(const s in e)e[s]!==void 0&&o++;let i=0;for(const s in t)if((!r||t[s]!==void 0)&&(i++,i>o||!it(e[s],t[s],n)))return!1;return o===i}return!1}function Ci(e){let t,n;const r=new Promise((o,i)=>{t=o,n=i});return r.status="pending",r.resolve=o=>{r.status="resolved",r.value=o,t(o)},r.reject=o=>{r.status="rejected",n(o)},r}var Ei=process.env.NODE_ENV==="production",It="Invariant failed";function dt(e,t){if(!e){if(Ei)throw new Error(It);var n=typeof t=="function"?t():t,r=n?"".concat(It,": ").concat(n):It;throw new Error(r)}}function ft(e,t){return e?.endsWith("/")&&e!=="/"&&e!==`${t}/`?e.slice(0,-1):e}function Si(e,t,n){return ft(e,n)===ft(t,n)}function pt(e){return!!e?.isNotFound}function Ri(){try{if(typeof window<"u"&&typeof window.sessionStorage=="object")return window.sessionStorage}catch{}}const Jt="tsr-scroll-restoration-v1_3";function Oi(){const e=Ri();if(!e)return null;const t=e.getItem(Jt);let n=t?JSON.parse(t):{};return{state:n,set:r=>{n=Zt(r,n)||n;try{e.setItem(Jt,JSON.stringify(n))}catch{console.warn("[ts-router] Could not persist scroll restoration state to sessionStorage.")}}}}Oi();const Yn=e=>e.state.__TSR_key||e.href;function _i({storageKey:e,key:t,behavior:n,shouldScrollRestoration:r,scrollToTopSelectors:o,location:i}){let s;try{s=JSON.parse(sessionStorage.getItem(e)||"{}")}catch(d){console.error(d);return}const a=t||window.history.state?.__TSR_key,f=s[a];e:{if(r&&f&&Object.keys(f).length>0){for(const p in f){const v=f[p];if(p==="window")window.scrollTo({top:v.scrollY,left:v.scrollX,behavior:n});else if(p){const h=document.querySelector(p);h&&(h.scrollLeft=v.scrollX,h.scrollTop=v.scrollY)}}break e}const d=(i??window.location).hash.split("#",2)[1];if(d){const p=window.history.state?.__hashScrollIntoViewOptions??!0;if(p){const v=document.getElementById(d);v&&v.scrollIntoView(p)}break e}const l={top:0,left:0,behavior:n};if(window.scrollTo(l),o)for(const p of o){if(p==="window")continue;const v=typeof p=="function"?p():document.querySelector(p);v&&v.scrollTo(l)}}}const Mr="__root__";function Ti(e){return e instanceof Response&&!!e.options}function Pi(e){const t=e.resolvedLocation,n=e.location,r=t?.pathname!==n.pathname,o=t?.href!==n.href,i=t?.hash!==n.hash;return{fromLocation:t,toLocation:n,pathChanged:r,hrefChanged:o,hashChanged:i}}const Ni="Error preloading route! ☝️";function Dr(e){const t=e.errorComponent??xn;return u.jsx(Ai,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:n,reset:r})=>n?c.createElement(t,{error:n,reset:r}):e.children})}class Ai extends c.Component{constructor(){super(...arguments),this.state={error:null}}static getDerivedStateFromProps(t){return{resetKey:t.getResetKey()}}static getDerivedStateFromError(t){return{error:t}}reset(){this.setState({error:null})}componentDidUpdate(t,n){n.error&&n.resetKey!==this.state.resetKey&&this.reset()}componentDidCatch(t,n){this.props.onCatch&&this.props.onCatch(t,n)}render(){return this.props.children({error:this.state.resetKey!==this.props.getResetKey()?null:this.state.error,reset:()=>{this.reset()}})}}function xn({error:e}){const[t,n]=c.useState(process.env.NODE_ENV!=="production");return u.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[u.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[u.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),u.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>n(r=>!r),children:t?"Hide Error":"Show Error"})]}),u.jsx("div",{style:{height:".25rem"}}),t?u.jsx("div",{children:u.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:e.message?u.jsx("code",{children:e.message}):null})}):null]})}function Mi({children:e,fallback:t=null}){return Di()?u.jsx(W.Fragment,{children:e}):u.jsx(W.Fragment,{children:t})}function Di(){return W.useSyncExternalStore(Ii,()=>!0,()=>!1)}function Ii(){return()=>{}}var ji=process.env.NODE_ENV==="production";function yn(e,t){if(!ji){if(e)return;var n="Warning: "+t;typeof console<"u"&&console.warn(n);try{throw Error(n)}catch{}}}var Ze={exports:{}},jt={},Je={exports:{}},Lt={};var qn;function Li(){if(qn)return Lt;qn=1;var e=W;function t(p,v){return p===v&&(p!==0||1/p===1/v)||p!==p&&v!==v}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,o=e.useEffect,i=e.useLayoutEffect,s=e.useDebugValue;function a(p,v){var h=v(),g=r({inst:{value:h,getSnapshot:v}}),m=g[0].inst,y=g[1];return i(function(){m.value=h,m.getSnapshot=v,f(m)&&y({inst:m})},[p,h,v]),o(function(){return f(m)&&y({inst:m}),p(function(){f(m)&&y({inst:m})})},[p]),s(h),h}function f(p){var v=p.getSnapshot;p=p.value;try{var h=v();return!n(p,h)}catch{return!0}}function d(p,v){return v()}var l=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?d:a;return Lt.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:l,Lt}var kt={};var Xn;function ki(){return Xn||(Xn=1,process.env.NODE_ENV!=="production"&&(function(){function e(h,g){return h===g&&(h!==0||1/h===1/g)||h!==h&&g!==g}function t(h,g){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 m=g();if(!p){var y=g();i(m,y)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),p=!0)}y=s({inst:{value:m,getSnapshot:g}});var x=y[0].inst,C=y[1];return f(function(){x.value=m,x.getSnapshot=g,n(x)&&C({inst:x})},[h,m,g]),a(function(){return n(x)&&C({inst:x}),h(function(){n(x)&&C({inst:x})})},[h]),d(m),m}function n(h){var g=h.getSnapshot;h=h.value;try{var m=g();return!i(h,m)}catch{return!0}}function r(h,g){return g()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var o=W,i=typeof Object.is=="function"?Object.is:e,s=o.useState,a=o.useEffect,f=o.useLayoutEffect,d=o.useDebugValue,l=!1,p=!1,v=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?r:t;kt.useSyncExternalStore=o.useSyncExternalStore!==void 0?o.useSyncExternalStore:v,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),kt}var Zn;function Ir(){return Zn||(Zn=1,process.env.NODE_ENV==="production"?Je.exports=Li():Je.exports=ki()),Je.exports}var Jn;function Fi(){if(Jn)return jt;Jn=1;var e=W,t=Ir();function n(d,l){return d===l&&(d!==0||1/d===1/l)||d!==d&&l!==l}var r=typeof Object.is=="function"?Object.is:n,o=t.useSyncExternalStore,i=e.useRef,s=e.useEffect,a=e.useMemo,f=e.useDebugValue;return jt.useSyncExternalStoreWithSelector=function(d,l,p,v,h){var g=i(null);if(g.current===null){var m={hasValue:!1,value:null};g.current=m}else m=g.current;g=a(function(){function x(S){if(!C){if(C=!0,w=S,S=v(S),h!==void 0&&m.hasValue){var R=m.value;if(h(R,S))return b=R}return b=S}if(R=b,r(w,S))return R;var _=v(S);return h!==void 0&&h(R,_)?(w=S,R):(w=S,b=_)}var C=!1,w,b,E=p===void 0?null:p;return[function(){return x(l())},E===null?void 0:function(){return x(E())}]},[l,p,v,h]);var y=o(d,g[0],g[1]);return s(function(){m.hasValue=!0,m.value=y},[y]),f(y),y},jt}var Ft={};var Qn;function $i(){return Qn||(Qn=1,process.env.NODE_ENV!=="production"&&(function(){function e(d,l){return d===l&&(d!==0||1/d===1/l)||d!==d&&l!==l}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var t=W,n=Ir(),r=typeof Object.is=="function"?Object.is:e,o=n.useSyncExternalStore,i=t.useRef,s=t.useEffect,a=t.useMemo,f=t.useDebugValue;Ft.useSyncExternalStoreWithSelector=function(d,l,p,v,h){var g=i(null);if(g.current===null){var m={hasValue:!1,value:null};g.current=m}else m=g.current;g=a(function(){function x(S){if(!C){if(C=!0,w=S,S=v(S),h!==void 0&&m.hasValue){var R=m.value;if(h(R,S))return b=R}return b=S}if(R=b,r(w,S))return R;var _=v(S);return h!==void 0&&h(R,_)?(w=S,R):(w=S,b=_)}var C=!1,w,b,E=p===void 0?null:p;return[function(){return x(l())},E===null?void 0:function(){return x(E())}]},[l,p,v,h]);var y=o(d,g[0],g[1]);return s(function(){m.hasValue=!0,m.value=y},[y]),f(y),y},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),Ft}var er;function Wi(){return er||(er=1,process.env.NODE_ENV==="production"?Ze.exports=Fi():Ze.exports=$i()),Ze.exports}var Vi=Wi();function zi(e,t=r=>r,n={}){const r=n.equal??Bi;return Vi.useSyncExternalStoreWithSelector(e.subscribe,()=>e.state,()=>e.state,t,r)}function Bi(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=tr(e);if(n.length!==tr(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 tr(e){return Object.keys(e).concat(Object.getOwnPropertySymbols(e))}const $t=c.createContext(null);function Hi(){return typeof document>"u"?$t:window.__TSR_ROUTER_CONTEXT__?window.__TSR_ROUTER_CONTEXT__:(window.__TSR_ROUTER_CONTEXT__=$t,$t)}function xe(e){const t=c.useContext(Hi());return yn(!((e?.warn??!0)&&!t),"useRouter must be used inside a <RouterProvider> component!"),t}function ie(e){const t=xe({warn:e?.router===void 0}),n=e?.router||t,r=W.useRef(void 0);return zi(n.__store,o=>{if(e?.select){if(e.structuralSharing??n.options.defaultStructuralSharing){const i=Ar(r.current,e.select(o));return r.current=i,i}return e.select(o)}return o})}const jr=c.createContext(void 0);c.createContext(void 0);function Ki(e,t,n={},r={}){c.useEffect(()=>{if(!e.current||r.disabled||typeof IntersectionObserver!="function")return;const o=new IntersectionObserver(([i])=>{t(i)},n);return o.observe(e.current),()=>{o.disconnect()}},[t,n,r.disabled,e])}function Ui(e){const t=c.useRef(null);return c.useImperativeHandle(e,()=>t.current,[]),t}function Gi(e,t){const n=xe(),[r,o]=c.useState(!1),i=c.useRef(!1),s=Ui(t),{activeProps:a,inactiveProps:f,activeOptions:d,to:l,preload:p,preloadDelay:v,hashScrollIntoView:h,replace:g,startTransition:m,resetScroll:y,viewTransition:x,children:C,target:w,disabled:b,style:E,className:S,onClick:R,onFocus:_,onMouseEnter:O,onMouseLeave:T,onTouchStart:M,ignoreBlocker:L,params:k,search:j,hash:H,state:F,mask:$,reloadDocument:P,unsafeRelative:z,from:q,_fromLocation:Mt,...Ge}=e,Dt=ie({select:D=>D.location.search,structuralSharing:!0}),Ye=e.from,ye=c.useMemo(()=>({...e,from:Ye}),[n,Dt,Ye,e._fromLocation,e.hash,e.to,e.search,e.params,e.state,e.mask,e.unsafeRelative]),X=c.useMemo(()=>n.buildLocation({...ye}),[n,ye]),ne=c.useMemo(()=>{if(b)return;let D=X.maskedLocation?X.maskedLocation.url.href:X.url.href,B=!1;return n.origin&&(D.startsWith(n.origin)?D=n.history.createHref(D.replace(n.origin,""))||"/":B=!0),{href:D,external:B}},[b,X.maskedLocation,X.url,n.origin,n.history]),we=c.useMemo(()=>{if(ne?.external)return ne.href;try{return new URL(l),l}catch{}},[l,ne]),pe=e.reloadDocument||we?!1:p??n.options.defaultPreload,Le=v??n.options.defaultPreloadDelay??0,ke=ie({select:D=>{if(we)return!1;if(d?.exact){if(!Si(D.location.pathname,X.pathname,n.basepath))return!1}else{const B=ft(D.location.pathname,n.basepath),Z=ft(X.pathname,n.basepath);if(!(B.startsWith(Z)&&(B.length===Z.length||B[Z.length]==="/")))return!1}return(d?.includeSearch??!0)&&!it(D.location.search,X.search,{partial:!d?.exact,ignoreUndefined:!d?.explicitUndefined})?!1:d?.includeHash?D.location.hash===X.hash:!0}}),ue=c.useCallback(()=>{n.preloadRoute({...ye}).catch(D=>{console.warn(D),console.warn(Ni)})},[n,ye]),Se=c.useCallback(D=>{D?.isIntersecting&&ue()},[ue]);Ki(s,Se,Ji,{disabled:!!b||pe!=="viewport"}),c.useEffect(()=>{i.current||!b&&pe==="render"&&(ue(),i.current=!0)},[b,ue,pe]);const hi=D=>{const B=D.currentTarget.getAttribute("target"),Z=w!==void 0?w:B;if(!b&&!Qi(D)&&!D.defaultPrevented&&(!Z||Z==="_self")&&D.button===0){D.preventDefault(),wt.flushSync(()=>{o(!0)});const Hn=n.subscribe("onResolved",()=>{Hn(),o(!1)});n.navigate({...ye,replace:g,resetScroll:y,hashScrollIntoView:h,startTransition:m,viewTransition:x,ignoreBlocker:L})}};if(we)return{...Ge,ref:s,href:we,...C&&{children:C},...w&&{target:w},...b&&{disabled:b},...E&&{style:E},...S&&{className:S},...R&&{onClick:R},..._&&{onFocus:_},...O&&{onMouseEnter:O},...T&&{onMouseLeave:T},...M&&{onTouchStart:M}};const Vn=D=>{b||pe&&ue()},mi=Vn,vi=D=>{if(!(b||!pe))if(!Le)ue();else{const B=D.target;if(Fe.has(B))return;const Z=setTimeout(()=>{Fe.delete(B),ue()},Le);Fe.set(B,Z)}},gi=D=>{if(b||!pe||!Le)return;const B=D.target,Z=Fe.get(B);Z&&(clearTimeout(Z),Fe.delete(B))},qe=ke?Zt(a,{})??Yi:Wt,Xe=ke?Wt:Zt(f,{})??Wt,zn=[S,qe.className,Xe.className].filter(Boolean).join(" "),Bn=(E||qe.style||Xe.style)&&{...E,...qe.style,...Xe.style};return{...Ge,...qe,...Xe,href:ne?.href,ref:s,onClick:$e([R,hi]),onFocus:$e([_,Vn]),onMouseEnter:$e([O,vi]),onMouseLeave:$e([T,gi]),onTouchStart:$e([M,mi]),disabled:!!b,target:w,...Bn&&{style:Bn},...zn&&{className:zn},...b&&qi,...ke&&Xi,...r&&Zi}}const Wt={},Yi={className:"active"},qi={role:"link","aria-disabled":!0},Xi={"data-status":"active","aria-current":"page"},Zi={"data-transitioning":"transitioning"},Fe=new WeakMap,Ji={rootMargin:"100px"},$e=e=>t=>{for(const n of e)if(n){if(t.defaultPrevented)return;n(t)}},Lr=c.forwardRef((e,t)=>{const{_asChild:n,...r}=e,{type:o,ref:i,...s}=Gi(r,t),a=typeof r.children=="function"?r.children({isActive:s["data-status"]==="active"}):r.children;return n===void 0&&delete s.disabled,c.createElement(n||"a",{...s,ref:i},a)});function Qi(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function es(e){const t=ie({select:n=>`not-found-${n.location.pathname}-${n.status}`});return u.jsx(Dr,{getResetKey:()=>t,onCatch:(n,r)=>{if(pt(n))e.onCatch?.(n,r);else throw n},errorComponent:({error:n})=>{if(pt(n))return e.fallback?.(n);throw n},children:e.children})}function ts(){return u.jsx("p",{children:"Not Found"})}function We(e){return u.jsx(u.Fragment,{children:e.children})}function kr(e,t,n){return t.options.notFoundComponent?u.jsx(t.options.notFoundComponent,{...n}):e.options.defaultNotFoundComponent?u.jsx(e.options.defaultNotFoundComponent,{...n}):(process.env.NODE_ENV==="development"&&yn(t.options.notFoundComponent,`A notFoundError was encountered on the route with ID "${t.id}", but a notFoundComponent option was not configured, nor was a router level defaultNotFoundComponent configured. Consider configuring at least one of these to avoid TanStack Router's overly generic defaultNotFoundComponent (<p>Not Found</p>)`),u.jsx(ts,{}))}function ns({children:e}){const t=xe();return t.isServer?u.jsx("script",{nonce:t.options.ssr?.nonce,dangerouslySetInnerHTML:{__html:e+";document.currentScript.remove()"}}):null}function rs(){const e=xe();if(!e.isScrollRestoring||!e.isServer||typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation}))return null;const n=(e.options.getScrollRestorationKey||Yn)(e.latestLocation),r=n!==Yn(e.latestLocation)?n:void 0,o={storageKey:Jt,shouldScrollRestoration:!0};return r&&(o.key=r),u.jsx(ns,{children:`(${_i.toString()})(${JSON.stringify(o)})`})}const os=c.memo(function({matchId:t}){const n=xe(),r=ie({select:x=>{const C=x.matches.find(w=>w.id===t);return dt(C,`Could not find match for matchId "${t}". Please file an issue!`),{routeId:C.routeId,ssr:C.ssr,_displayPending:C._displayPending}},structuralSharing:!0}),o=n.routesById[r.routeId],i=o.options.pendingComponent??n.options.defaultPendingComponent,s=i?u.jsx(i,{}):null,a=o.options.errorComponent??n.options.defaultErrorComponent,f=o.options.onCatch??n.options.defaultOnCatch,d=o.isRoot?o.options.notFoundComponent??n.options.notFoundRoute?.options.component:o.options.notFoundComponent,l=r.ssr===!1||r.ssr==="data-only",p=(!o.isRoot||o.options.wrapInSuspense||l)&&(o.options.wrapInSuspense??i??(o.options.errorComponent?.preload||l))?c.Suspense:We,v=a?Dr:We,h=d?es:We,g=ie({select:x=>x.loadedAt}),m=ie({select:x=>{const C=x.matches.findIndex(w=>w.id===t);return x.matches[C-1]?.routeId}}),y=o.isRoot?o.options.shellComponent??We:We;return u.jsxs(y,{children:[u.jsx(jr.Provider,{value:t,children:u.jsx(p,{fallback:s,children:u.jsx(v,{getResetKey:()=>g,errorComponent:a||xn,onCatch:(x,C)=>{if(pt(x))throw x;yn(!1,`Error in route match: ${t}`),f?.(x,C)},children:u.jsx(h,{fallback:x=>{if(!d||x.routeId&&x.routeId!==r.routeId||!x.routeId&&!o.isRoot)throw x;return c.createElement(d,x)},children:l||r._displayPending?u.jsx(Mi,{fallback:s,children:u.jsx(nr,{matchId:t})}):u.jsx(nr,{matchId:t})})})})}),m===Mr&&n.options.scrollRestoration?u.jsxs(u.Fragment,{children:[u.jsx(is,{}),u.jsx(rs,{})]}):null]})});function is(){const e=xe(),t=c.useRef(void 0);return u.jsx("script",{suppressHydrationWarning:!0,ref:n=>{n&&(t.current===void 0||t.current.href!==e.latestLocation.href)&&(e.emit({type:"onRendered",...Pi(e.state)}),t.current=e.latestLocation)}},e.latestLocation.state.__TSR_key)}const nr=c.memo(function({matchId:t}){const n=xe(),{match:r,key:o,routeId:i}=ie({select:f=>{const d=f.matches.find(g=>g.id===t),l=d.routeId,v=(n.routesById[l].options.remountDeps??n.options.defaultRemountDeps)?.({routeId:l,loaderDeps:d.loaderDeps,params:d._strictParams,search:d._strictSearch});return{key:v?JSON.stringify(v):void 0,routeId:l,match:{id:d.id,status:d.status,error:d.error,invalid:d.invalid,_forcePending:d._forcePending,_displayPending:d._displayPending}}},structuralSharing:!0}),s=n.routesById[i],a=c.useMemo(()=>{const f=s.options.component??n.options.defaultComponent;return f?u.jsx(f,{},o):u.jsx(Qt,{})},[o,s.options.component,n.options.defaultComponent]);if(r._displayPending)throw n.getMatch(r.id)?._nonReactive.displayPendingPromise;if(r._forcePending)throw n.getMatch(r.id)?._nonReactive.minPendingPromise;if(r.status==="pending"){const f=s.options.pendingMinMs??n.options.defaultPendingMinMs;if(f){const d=n.getMatch(r.id);if(d&&!d._nonReactive.minPendingPromise&&!n.isServer){const l=Ci();d._nonReactive.minPendingPromise=l,setTimeout(()=>{l.resolve(),d._nonReactive.minPendingPromise=void 0},f)}}throw n.getMatch(r.id)?._nonReactive.loadPromise}if(r.status==="notFound")return dt(pt(r.error),"Expected a notFound error"),kr(n,s,r.error);if(r.status==="redirected")throw dt(Ti(r.error),"Expected a redirect error"),n.getMatch(r.id)?._nonReactive.loadPromise;if(r.status==="error"){if(n.isServer){const f=(s.options.errorComponent??n.options.defaultErrorComponent)||xn;return u.jsx(f,{error:r.error,reset:void 0,info:{componentStack:""}})}throw r.error}return a}),Qt=c.memo(function(){const t=xe(),n=c.useContext(jr),r=ie({select:d=>d.matches.find(l=>l.id===n)?.routeId}),o=t.routesById[r],i=ie({select:d=>{const p=d.matches.find(v=>v.id===n);return dt(p,`Could not find parent match for matchId "${n}"`),p.globalNotFound}}),s=ie({select:d=>{const l=d.matches,p=l.findIndex(v=>v.id===n);return l[p+1]?.id}}),a=t.options.defaultPendingComponent?u.jsx(t.options.defaultPendingComponent,{}):null;if(i)return kr(t,o,void 0);if(!s)return null;const f=u.jsx(os,{matchId:s});return r===Mr?u.jsx(c.Suspense,{fallback:a,children:f}):f}),ss=vn.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 bt({className:e,variant:t="default",size:n="default",asChild:r=!1,...o}){const i=r?me.Slot:"button";return u.jsx(i,{"data-slot":"button","data-variant":t,"data-size":n,className:A(ss({variant:t,size:n,className:e})),...o})}const as=({children:e,className:t,variant:n,size:r,...o})=>u.jsx(u.Fragment,{children:u.jsx(bt,{className:A(t),variant:n,size:r,...o,children:e})});function cs(e,t){const n=c.createContext(t),r=i=>{const{children:s,...a}=i,f=c.useMemo(()=>a,Object.values(a));return u.jsx(n.Provider,{value:f,children:s})};r.displayName=e+"Provider";function o(i){const s=c.useContext(n);if(s)return s;if(t!==void 0)return t;throw new Error(`\`${i}\` must be used within \`${e}\``)}return[r,o]}function He(e,t=[]){let n=[];function r(i,s){const a=c.createContext(s),f=n.length;n=[...n,s];const d=p=>{const{scope:v,children:h,...g}=p,m=v?.[e]?.[f]||a,y=c.useMemo(()=>g,Object.values(g));return u.jsx(m.Provider,{value:y,children:h})};d.displayName=i+"Provider";function l(p,v){const h=v?.[e]?.[f]||a,g=c.useContext(h);if(g)return g;if(s!==void 0)return s;throw new Error(`\`${p}\` must be used within \`${i}\``)}return[d,l]}const o=()=>{const i=n.map(s=>c.createContext(s));return function(a){const f=a?.[e]||i;return c.useMemo(()=>({[`__scope${e}`]:{...a,[e]:f}}),[a,f])}};return o.scopeName=e,[r,ls(o,...t)]}function ls(...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(i){const s=r.reduce((a,{useScope:f,scopeName:d})=>{const p=f(i)[`__scope${d}`];return{...a,...p}},{});return c.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}function N(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e?.(o),n===!1||!o.defaultPrevented)return t?.(o)}}var us=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],I=us.reduce((e,t)=>{const n=me.createSlot(`Primitive.${t}`),r=c.forwardRef((o,i)=>{const{asChild:s,...a}=o,f=s?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),u.jsx(f,{...a,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function en(e,t){e&&Nr.flushSync(()=>e.dispatchEvent(t))}var J=globalThis?.document?c.useLayoutEffect:()=>{},ds=c[" useInsertionEffect ".trim().toString()]||J;function Ct({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,i,s]=fs({defaultProp:t,onChange:n}),a=e!==void 0,f=a?e:o;{const l=c.useRef(e!==void 0);c.useEffect(()=>{const p=l.current;p!==a&&console.warn(`${r} is changing from ${p?"controlled":"uncontrolled"} to ${a?"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=a},[a,r])}const d=c.useCallback(l=>{if(a){const p=ps(l)?l(e):l;p!==e&&s.current?.(p)}else i(l)},[a,e,i,s]);return[f,d]}function fs({defaultProp:e,onChange:t}){const[n,r]=c.useState(e),o=c.useRef(n),i=c.useRef(t);return ds(()=>{i.current=t},[t]),c.useEffect(()=>{o.current!==n&&(i.current?.(n),o.current=n)},[n,o]),[n,r,i]}function ps(e){return typeof e=="function"}function rr(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Fr(...e){return t=>{let n=!1;const r=e.map(o=>{const i=rr(o,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let o=0;o<r.length;o++){const i=r[o];typeof i=="function"?i():rr(e[o],null)}}}}function V(...e){return c.useCallback(Fr(...e),e)}var hs=c.createContext(void 0);function ms(e){const t=c.useContext(hs);return e||t||"ltr"}function vs(e,t){return c.useReducer((n,r)=>t[n][r]??n,e)}var ce=e=>{const{present:t,children:n}=e,r=gs(t),o=typeof n=="function"?n({present:r.isPresent}):c.Children.only(n),i=V(r.ref,xs(o));return typeof n=="function"||r.isPresent?c.cloneElement(o,{ref:i}):null};ce.displayName="Presence";function gs(e){const[t,n]=c.useState(),r=c.useRef(null),o=c.useRef(e),i=c.useRef("none"),s=e?"mounted":"unmounted",[a,f]=vs(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return c.useEffect(()=>{const d=Qe(r.current);i.current=a==="mounted"?d:"none"},[a]),J(()=>{const d=r.current,l=o.current;if(l!==e){const v=i.current,h=Qe(d);e?f("MOUNT"):h==="none"||d?.display==="none"?f("UNMOUNT"):f(l&&v!==h?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,f]),J(()=>{if(t){let d;const l=t.ownerDocument.defaultView??window,p=h=>{const m=Qe(r.current).includes(CSS.escape(h.animationName));if(h.target===t&&m&&(f("ANIMATION_END"),!o.current)){const y=t.style.animationFillMode;t.style.animationFillMode="forwards",d=l.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=y)})}},v=h=>{h.target===t&&(i.current=Qe(r.current))};return t.addEventListener("animationstart",v),t.addEventListener("animationcancel",p),t.addEventListener("animationend",p),()=>{l.clearTimeout(d),t.removeEventListener("animationstart",v),t.removeEventListener("animationcancel",p),t.removeEventListener("animationend",p)}}else f("ANIMATION_END")},[t,f]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:c.useCallback(d=>{r.current=d?getComputedStyle(d):null,n(d)},[])}}function Qe(e){return e?.animationName||"none"}function xs(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 ys=c[" useId ".trim().toString()]||(()=>{}),ws=0;function Te(e){const[t,n]=c.useState(ys());return J(()=>{n(r=>r??String(ws++))},[e]),t?`radix-${t}`:""}function $r(e){const t=e+"CollectionProvider",[n,r]=He(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),s=m=>{const{scope:y,children:x}=m,C=W.useRef(null),w=W.useRef(new Map).current;return u.jsx(o,{scope:y,itemMap:w,collectionRef:C,children:x})};s.displayName=t;const a=e+"CollectionSlot",f=me.createSlot(a),d=W.forwardRef((m,y)=>{const{scope:x,children:C}=m,w=i(a,x),b=V(y,w.collectionRef);return u.jsx(f,{ref:b,children:C})});d.displayName=a;const l=e+"CollectionItemSlot",p="data-radix-collection-item",v=me.createSlot(l),h=W.forwardRef((m,y)=>{const{scope:x,children:C,...w}=m,b=W.useRef(null),E=V(y,b),S=i(l,x);return W.useEffect(()=>(S.itemMap.set(b,{ref:b,...w}),()=>{S.itemMap.delete(b)})),u.jsx(v,{[p]:"",ref:E,children:C})});h.displayName=l;function g(m){const y=i(e+"CollectionConsumer",m);return W.useCallback(()=>{const C=y.collectionRef.current;if(!C)return[];const w=Array.from(C.querySelectorAll(`[${p}]`));return Array.from(y.itemMap.values()).sort((S,R)=>w.indexOf(S.ref.current)-w.indexOf(R.ref.current))},[y.collectionRef,y.itemMap])}return[{Provider:s,Slot:d,ItemSlot:h},g,r]}function K(e){const t=c.useRef(e);return c.useEffect(()=>{t.current=e}),c.useMemo(()=>(...n)=>t.current?.(...n),[])}function bs(e,t=globalThis?.document){const n=K(e);c.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 Cs="DismissableLayer",tn="dismissableLayer.update",Es="dismissableLayer.pointerDownOutside",Ss="dismissableLayer.focusOutside",or,Wr=c.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Et=c.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:s,onDismiss:a,...f}=e,d=c.useContext(Wr),[l,p]=c.useState(null),v=l?.ownerDocument??globalThis?.document,[,h]=c.useState({}),g=V(t,R=>p(R)),m=Array.from(d.layers),[y]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),x=m.indexOf(y),C=l?m.indexOf(l):-1,w=d.layersWithOutsidePointerEventsDisabled.size>0,b=C>=x,E=_s(R=>{const _=R.target,O=[...d.branches].some(T=>T.contains(_));!b||O||(o?.(R),s?.(R),R.defaultPrevented||a?.())},v),S=Ts(R=>{const _=R.target;[...d.branches].some(T=>T.contains(_))||(i?.(R),s?.(R),R.defaultPrevented||a?.())},v);return bs(R=>{C===d.layers.size-1&&(r?.(R),!R.defaultPrevented&&a&&(R.preventDefault(),a()))},v),c.useEffect(()=>{if(l)return n&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(or=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(l)),d.layers.add(l),ir(),()=>{n&&d.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=or)}},[l,v,n,d]),c.useEffect(()=>()=>{l&&(d.layers.delete(l),d.layersWithOutsidePointerEventsDisabled.delete(l),ir())},[l,d]),c.useEffect(()=>{const R=()=>h({});return document.addEventListener(tn,R),()=>document.removeEventListener(tn,R)},[]),u.jsx(I.div,{...f,ref:g,style:{pointerEvents:w?b?"auto":"none":void 0,...e.style},onFocusCapture:N(e.onFocusCapture,S.onFocusCapture),onBlurCapture:N(e.onBlurCapture,S.onBlurCapture),onPointerDownCapture:N(e.onPointerDownCapture,E.onPointerDownCapture)})});Et.displayName=Cs;var Rs="DismissableLayerBranch",Os=c.forwardRef((e,t)=>{const n=c.useContext(Wr),r=c.useRef(null),o=V(t,r);return c.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),u.jsx(I.div,{...e,ref:o})});Os.displayName=Rs;function _s(e,t=globalThis?.document){const n=K(e),r=c.useRef(!1),o=c.useRef(()=>{});return c.useEffect(()=>{const i=a=>{if(a.target&&!r.current){let f=function(){Vr(Es,n,d,{discrete:!0})};const d={originalEvent:a};a.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},s=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Ts(e,t=globalThis?.document){const n=K(e),r=c.useRef(!1);return c.useEffect(()=>{const o=i=>{i.target&&!r.current&&Vr(Ss,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function ir(){const e=new CustomEvent(tn);document.dispatchEvent(e)}function Vr(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?en(o,i):o.dispatchEvent(i)}function Ps(e){const t=c.useRef({value:e,previous:e});return c.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Ns=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"}),As="VisuallyHidden",zr=c.forwardRef((e,t)=>u.jsx(I.span,{...e,ref:t,style:{...Ns,...e.style}}));zr.displayName=As;var Br=zr,Ee="NavigationMenu",[wn,Hr,Ms]=$r(Ee),[nn,Ds,Is]=$r(Ee),[bn]=He(Ee,[Ms,Is]),[js,Y]=bn(Ee),[Ls,ks]=bn(Ee),Kr=c.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,value:r,onValueChange:o,defaultValue:i,delayDuration:s=200,skipDelayDuration:a=300,orientation:f="horizontal",dir:d,...l}=e,[p,v]=c.useState(null),h=V(t,O=>v(O)),g=ms(d),m=c.useRef(0),y=c.useRef(0),x=c.useRef(0),[C,w]=c.useState(!0),[b,E]=Ct({prop:r,onChange:O=>{const T=O!=="",M=a>0;T?(window.clearTimeout(x.current),M&&w(!1)):(window.clearTimeout(x.current),x.current=window.setTimeout(()=>w(!0),a)),o?.(O)},defaultProp:i??"",caller:Ee}),S=c.useCallback(()=>{window.clearTimeout(y.current),y.current=window.setTimeout(()=>E(""),150)},[E]),R=c.useCallback(O=>{window.clearTimeout(y.current),E(O)},[E]),_=c.useCallback(O=>{b===O?window.clearTimeout(y.current):m.current=window.setTimeout(()=>{window.clearTimeout(y.current),E(O)},s)},[b,E,s]);return c.useEffect(()=>()=>{window.clearTimeout(m.current),window.clearTimeout(y.current),window.clearTimeout(x.current)},[]),u.jsx(Ur,{scope:n,isRootMenu:!0,value:b,dir:g,orientation:f,rootNavigationMenu:p,onTriggerEnter:O=>{window.clearTimeout(m.current),C?_(O):R(O)},onTriggerLeave:()=>{window.clearTimeout(m.current),S()},onContentEnter:()=>window.clearTimeout(y.current),onContentLeave:S,onItemSelect:O=>{E(T=>T===O?"":O)},onItemDismiss:()=>E(""),children:u.jsx(I.nav,{"aria-label":"Main","data-orientation":f,dir:g,...l,ref:h})})});Kr.displayName=Ee;var rn="NavigationMenuSub",Fs=c.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,value:r,onValueChange:o,defaultValue:i,orientation:s="horizontal",...a}=e,f=Y(rn,n),[d,l]=Ct({prop:r,onChange:o,defaultProp:i??"",caller:rn});return u.jsx(Ur,{scope:n,isRootMenu:!1,value:d,dir:f.dir,orientation:s,rootNavigationMenu:f.rootNavigationMenu,onTriggerEnter:p=>l(p),onItemSelect:p=>l(p),onItemDismiss:()=>l(""),children:u.jsx(I.div,{"data-orientation":s,...a,ref:t})})});Fs.displayName=rn;var Ur=e=>{const{scope:t,isRootMenu:n,rootNavigationMenu:r,dir:o,orientation:i,children:s,value:a,onItemSelect:f,onItemDismiss:d,onTriggerEnter:l,onTriggerLeave:p,onContentEnter:v,onContentLeave:h}=e,[g,m]=c.useState(null),[y,x]=c.useState(new Map),[C,w]=c.useState(null);return u.jsx(js,{scope:t,isRootMenu:n,rootNavigationMenu:r,value:a,previousValue:Ps(a),baseId:Te(),dir:o,orientation:i,viewport:g,onViewportChange:m,indicatorTrack:C,onIndicatorTrackChange:w,onTriggerEnter:K(l),onTriggerLeave:K(p),onContentEnter:K(v),onContentLeave:K(h),onItemSelect:K(f),onItemDismiss:K(d),onViewportContentChange:c.useCallback((b,E)=>{x(S=>(S.set(b,E),new Map(S)))},[]),onViewportContentRemove:c.useCallback(b=>{x(E=>E.has(b)?(E.delete(b),new Map(E)):E)},[]),children:u.jsx(wn.Provider,{scope:t,children:u.jsx(Ls,{scope:t,items:y,children:s})})})},Gr="NavigationMenuList",Yr=c.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,...r}=e,o=Y(Gr,n),i=u.jsx(I.ul,{"data-orientation":o.orientation,...r,ref:t});return u.jsx(I.div,{style:{position:"relative"},ref:o.onIndicatorTrackChange,children:u.jsx(wn.Slot,{scope:n,children:o.isRootMenu?u.jsx(to,{asChild:!0,children:i}):i})})});Yr.displayName=Gr;var qr="NavigationMenuItem",[$s,Xr]=bn(qr),Zr=c.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,value:r,...o}=e,i=Te(),s=r||i||"LEGACY_REACT_AUTO_VALUE",a=c.useRef(null),f=c.useRef(null),d=c.useRef(null),l=c.useRef(()=>{}),p=c.useRef(!1),v=c.useCallback((g="start")=>{if(a.current){l.current();const m=sn(a.current);m.length&&Sn(g==="start"?m:m.reverse())}},[]),h=c.useCallback(()=>{if(a.current){const g=sn(a.current);g.length&&(l.current=qs(g))}},[]);return u.jsx($s,{scope:n,value:s,triggerRef:f,contentRef:a,focusProxyRef:d,wasEscapeCloseRef:p,onEntryKeyDown:v,onFocusProxyEnter:v,onRootContentClose:h,onContentFocusOutside:h,children:u.jsx(I.li,{...o,ref:t})})});Zr.displayName=qr;var on="NavigationMenuTrigger",Ws=c.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,disabled:r,...o}=e,i=Y(on,e.__scopeNavigationMenu),s=Xr(on,e.__scopeNavigationMenu),a=c.useRef(null),f=V(a,s.triggerRef,t),d=ro(i.baseId,s.value),l=oo(i.baseId,s.value),p=c.useRef(!1),v=c.useRef(!1),h=s.value===i.value;return u.jsxs(u.Fragment,{children:[u.jsx(wn.ItemSlot,{scope:n,value:s.value,children:u.jsx(no,{asChild:!0,children:u.jsx(I.button,{id:d,disabled:r,"data-disabled":r?"":void 0,"data-state":Rn(h),"aria-expanded":h,"aria-controls":l,...o,ref:f,onPointerEnter:N(e.onPointerEnter,()=>{v.current=!1,s.wasEscapeCloseRef.current=!1}),onPointerMove:N(e.onPointerMove,ht(()=>{r||v.current||s.wasEscapeCloseRef.current||p.current||(i.onTriggerEnter(s.value),p.current=!0)})),onPointerLeave:N(e.onPointerLeave,ht(()=>{r||(i.onTriggerLeave(),p.current=!1)})),onClick:N(e.onClick,()=>{i.onItemSelect(s.value),v.current=h}),onKeyDown:N(e.onKeyDown,g=>{const y={horizontal:"ArrowDown",vertical:i.dir==="rtl"?"ArrowLeft":"ArrowRight"}[i.orientation];h&&g.key===y&&(s.onEntryKeyDown(),g.preventDefault())})})})}),h&&u.jsxs(u.Fragment,{children:[u.jsx(Br,{"aria-hidden":!0,tabIndex:0,ref:s.focusProxyRef,onFocus:g=>{const m=s.contentRef.current,y=g.relatedTarget,x=y===a.current,C=m?.contains(y);(x||!C)&&s.onFocusProxyEnter(x?"start":"end")}}),i.viewport&&u.jsx("span",{"aria-owns":l})]})]})});Ws.displayName=on;var Vs="NavigationMenuLink",sr="navigationMenu.linkSelect",Jr=c.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,active:r,onSelect:o,...i}=e;return u.jsx(no,{asChild:!0,children:u.jsx(I.a,{"data-active":r?"":void 0,"aria-current":r?"page":void 0,...i,ref:t,onClick:N(e.onClick,s=>{const a=s.target,f=new CustomEvent(sr,{bubbles:!0,cancelable:!0});if(a.addEventListener(sr,d=>o?.(d),{once:!0}),en(a,f),!f.defaultPrevented&&!s.metaKey){const d=new CustomEvent(st,{bubbles:!0,cancelable:!0});en(a,d)}},{checkForDefaultPrevented:!1})})})});Jr.displayName=Vs;var Cn="NavigationMenuIndicator",zs=c.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=Y(Cn,e.__scopeNavigationMenu),i=!!o.value;return o.indicatorTrack?wt.createPortal(u.jsx(ce,{present:n||i,children:u.jsx(Bs,{...r,ref:t})}),o.indicatorTrack):null});zs.displayName=Cn;var Bs=c.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,...r}=e,o=Y(Cn,n),i=Hr(n),[s,a]=c.useState(null),[f,d]=c.useState(null),l=o.orientation==="horizontal",p=!!o.value;c.useEffect(()=>{const g=i().find(m=>m.value===o.value)?.ref.current;g&&a(g)},[i,o.value]);const v=()=>{s&&d({size:l?s.offsetWidth:s.offsetHeight,offset:l?s.offsetLeft:s.offsetTop})};return an(s,v),an(o.indicatorTrack,v),f?u.jsx(I.div,{"aria-hidden":!0,"data-state":p?"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}),Ae="NavigationMenuContent",Hs=c.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=Y(Ae,e.__scopeNavigationMenu),i=Xr(Ae,e.__scopeNavigationMenu),s=V(i.contentRef,t),a=i.value===o.value,f={value:i.value,triggerRef:i.triggerRef,focusProxyRef:i.focusProxyRef,wasEscapeCloseRef:i.wasEscapeCloseRef,onContentFocusOutside:i.onContentFocusOutside,onRootContentClose:i.onRootContentClose,...r};return o.viewport?u.jsx(Ks,{forceMount:n,...f,ref:s}):u.jsx(ce,{present:n||a,children:u.jsx(Qr,{"data-state":Rn(a),...f,ref:s,onPointerEnter:N(e.onPointerEnter,o.onContentEnter),onPointerLeave:N(e.onPointerLeave,ht(o.onContentLeave)),style:{pointerEvents:!a&&o.isRootMenu?"none":void 0,...f.style}})})});Hs.displayName=Ae;var Ks=c.forwardRef((e,t)=>{const n=Y(Ae,e.__scopeNavigationMenu),{onViewportContentChange:r,onViewportContentRemove:o}=n;return J(()=>{r(e.value,{ref:t,...e})},[e,t,r]),J(()=>()=>o(e.value),[e.value,o]),null}),st="navigationMenu.rootContentDismiss",Qr=c.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,value:r,triggerRef:o,focusProxyRef:i,wasEscapeCloseRef:s,onRootContentClose:a,onContentFocusOutside:f,...d}=e,l=Y(Ae,n),p=c.useRef(null),v=V(p,t),h=ro(l.baseId,r),g=oo(l.baseId,r),m=Hr(n),y=c.useRef(null),{onItemDismiss:x}=l;c.useEffect(()=>{const w=p.current;if(l.isRootMenu&&w){const b=()=>{x(),a(),w.contains(document.activeElement)&&o.current?.focus()};return w.addEventListener(st,b),()=>w.removeEventListener(st,b)}},[l.isRootMenu,e.value,o,x,a]);const C=c.useMemo(()=>{const b=m().map(T=>T.value);l.dir==="rtl"&&b.reverse();const E=b.indexOf(l.value),S=b.indexOf(l.previousValue),R=r===l.value,_=S===b.indexOf(r);if(!R&&!_)return y.current;const O=(()=>{if(E!==S){if(R&&S!==-1)return E>S?"from-end":"from-start";if(_&&E!==-1)return E>S?"to-start":"to-end"}return null})();return y.current=O,O},[l.previousValue,l.value,l.dir,m,r]);return u.jsx(to,{asChild:!0,children:u.jsx(Et,{id:g,"aria-labelledby":h,"data-motion":C,"data-orientation":l.orientation,...d,ref:v,disableOutsidePointerEvents:!1,onDismiss:()=>{const w=new Event(st,{bubbles:!0,cancelable:!0});p.current?.dispatchEvent(w)},onFocusOutside:N(e.onFocusOutside,w=>{f();const b=w.target;l.rootNavigationMenu?.contains(b)&&w.preventDefault()}),onPointerDownOutside:N(e.onPointerDownOutside,w=>{const b=w.target,E=m().some(R=>R.ref.current?.contains(b)),S=l.isRootMenu&&l.viewport?.contains(b);(E||S||!l.isRootMenu)&&w.preventDefault()}),onKeyDown:N(e.onKeyDown,w=>{const b=w.altKey||w.ctrlKey||w.metaKey;if(w.key==="Tab"&&!b){const S=sn(w.currentTarget),R=document.activeElement,_=S.findIndex(M=>M===R),T=w.shiftKey?S.slice(0,_).reverse():S.slice(_+1,S.length);Sn(T)?w.preventDefault():i.current?.focus()}}),onEscapeKeyDown:N(e.onEscapeKeyDown,w=>{s.current=!0})})})}),En="NavigationMenuViewport",eo=c.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=!!Y(En,e.__scopeNavigationMenu).value;return u.jsx(ce,{present:n||i,children:u.jsx(Us,{...r,ref:t})})});eo.displayName=En;var Us=c.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,children:r,...o}=e,i=Y(En,n),s=V(t,i.onViewportChange),a=ks(Ae,e.__scopeNavigationMenu),[f,d]=c.useState(null),[l,p]=c.useState(null),v=f?f?.width+"px":void 0,h=f?f?.height+"px":void 0,g=!!i.value,m=g?i.value:i.previousValue;return an(l,()=>{l&&d({width:l.offsetWidth,height:l.offsetHeight})}),u.jsx(I.div,{"data-state":Rn(g),"data-orientation":i.orientation,...o,ref:s,style:{pointerEvents:!g&&i.isRootMenu?"none":void 0,"--radix-navigation-menu-viewport-width":v,"--radix-navigation-menu-viewport-height":h,...o.style},onPointerEnter:N(e.onPointerEnter,i.onContentEnter),onPointerLeave:N(e.onPointerLeave,ht(i.onContentLeave)),children:Array.from(a.items).map(([x,{ref:C,forceMount:w,...b}])=>{const E=m===x;return u.jsx(ce,{present:w||E,children:u.jsx(Qr,{...b,ref:Fr(C,S=>{E&&S&&p(S)})})},x)})})}),Gs="FocusGroup",to=c.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,...r}=e,o=Y(Gs,n);return u.jsx(nn.Provider,{scope:n,children:u.jsx(nn.Slot,{scope:n,children:u.jsx(I.div,{dir:o.dir,...r,ref:t})})})}),ar=["ArrowRight","ArrowLeft","ArrowUp","ArrowDown"],Ys="FocusGroupItem",no=c.forwardRef((e,t)=>{const{__scopeNavigationMenu:n,...r}=e,o=Ds(n),i=Y(Ys,n);return u.jsx(nn.ItemSlot,{scope:n,children:u.jsx(I.button,{...r,ref:t,onKeyDown:N(e.onKeyDown,s=>{if(["Home","End",...ar].includes(s.key)){let f=o().map(p=>p.ref.current);if([i.dir==="rtl"?"ArrowRight":"ArrowLeft","ArrowUp","End"].includes(s.key)&&f.reverse(),ar.includes(s.key)){const p=f.indexOf(s.currentTarget);f=f.slice(p+1)}setTimeout(()=>Sn(f)),s.preventDefault()}})})})});function sn(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 Sn(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}function qs(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 an(e,t){const n=K(t);J(()=>{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 Rn(e){return e?"open":"closed"}function ro(e,t){return`${e}-trigger-${t}`}function oo(e,t){return`${e}-content-${t}`}function ht(e){return t=>t.pointerType==="mouse"?e(t):void 0}var Xs=Kr,Zs=Yr,Js=Zr,Qs=Jr,ea=eo;function ta({className:e,children:t,viewport:n=!0,...r}){return u.jsxs(Xs,{"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(ia,{})]})}function na({className:e,...t}){return u.jsx(Zs,{"data-slot":"navigation-menu-list",className:A("group flex flex-1 list-none items-center justify-center gap-1",e),...t})}function ra({className:e,...t}){return u.jsx(Js,{"data-slot":"navigation-menu-item",className:A("relative",e),...t})}const oa=vn.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 ia({className:e,...t}){return u.jsx("div",{className:A("absolute top-full left-0 isolate z-50 flex justify-center"),children:u.jsx(ea,{"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 sa({className:e,...t}){return u.jsx(Qs,{"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 Vt="focusScope.autoFocusOnMount",zt="focusScope.autoFocusOnUnmount",cr={bubbles:!1,cancelable:!0},aa="FocusScope",io=c.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...s}=e,[a,f]=c.useState(null),d=K(o),l=K(i),p=c.useRef(null),v=V(t,m=>f(m)),h=c.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;c.useEffect(()=>{if(r){let m=function(w){if(h.paused||!a)return;const b=w.target;a.contains(b)?p.current=b:he(p.current,{select:!0})},y=function(w){if(h.paused||!a)return;const b=w.relatedTarget;b!==null&&(a.contains(b)||he(p.current,{select:!0}))},x=function(w){if(document.activeElement===document.body)for(const E of w)E.removedNodes.length>0&&he(a)};document.addEventListener("focusin",m),document.addEventListener("focusout",y);const C=new MutationObserver(x);return a&&C.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",y),C.disconnect()}}},[r,a,h.paused]),c.useEffect(()=>{if(a){ur.add(h);const m=document.activeElement;if(!a.contains(m)){const x=new CustomEvent(Vt,cr);a.addEventListener(Vt,d),a.dispatchEvent(x),x.defaultPrevented||(ca(pa(so(a)),{select:!0}),document.activeElement===m&&he(a))}return()=>{a.removeEventListener(Vt,d),setTimeout(()=>{const x=new CustomEvent(zt,cr);a.addEventListener(zt,l),a.dispatchEvent(x),x.defaultPrevented||he(m??document.body,{select:!0}),a.removeEventListener(zt,l),ur.remove(h)},0)}}},[a,d,l,h]);const g=c.useCallback(m=>{if(!n&&!r||h.paused)return;const y=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,x=document.activeElement;if(y&&x){const C=m.currentTarget,[w,b]=la(C);w&&b?!m.shiftKey&&x===b?(m.preventDefault(),n&&he(w,{select:!0})):m.shiftKey&&x===w&&(m.preventDefault(),n&&he(b,{select:!0})):x===C&&m.preventDefault()}},[n,r,h.paused]);return u.jsx(I.div,{tabIndex:-1,...s,ref:v,onKeyDown:g})});io.displayName=aa;function ca(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(he(r,{select:t}),document.activeElement!==n)return}function la(e){const t=so(e),n=lr(t,e),r=lr(t.reverse(),e);return[n,r]}function so(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 lr(e,t){for(const n of e)if(!ua(n,{upTo:t}))return n}function ua(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 da(e){return e instanceof HTMLInputElement&&"select"in e}function he(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&da(e)&&t&&e.select()}}var ur=fa();function fa(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=dr(e,t),e.unshift(t)},remove(t){e=dr(e,t),e[0]?.resume()}}}function dr(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function pa(e){return e.filter(t=>t.tagName!=="A")}var ha="Portal",On=c.forwardRef((e,t)=>{const{container:n,...r}=e,[o,i]=c.useState(!1);J(()=>i(!0),[]);const s=n||o&&globalThis?.document?.body;return s?wt.createPortal(u.jsx(I.div,{...r,ref:t}),s):null});On.displayName=ha;var Bt=0;function ma(){c.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??fr()),document.body.insertAdjacentElement("beforeend",e[1]??fr()),Bt++,()=>{Bt===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Bt--}},[])}function fr(){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 re=function(){return re=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},re.apply(this,arguments)};function ao(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 va(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,i;r<o;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}var at="right-scroll-bar-position",ct="width-before-scroll-bar",ga="with-scroll-bars-hidden",xa="--removed-body-scroll-bar-size";function Ht(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function ya(e,t){var n=W.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 wa=typeof window<"u"?c.useLayoutEffect:c.useEffect,pr=new WeakMap;function ba(e,t){var n=ya(null,function(r){return e.forEach(function(o){return Ht(o,r)})});return wa(function(){var r=pr.get(n);if(r){var o=new Set(r),i=new Set(e),s=n.current;o.forEach(function(a){i.has(a)||Ht(a,null)}),i.forEach(function(a){o.has(a)||Ht(a,s)})}pr.set(n,e)},[e]),n}function Ca(e){return e}function Ea(e,t){t===void 0&&(t=Ca);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(i){var s=t(i,r);return n.push(s),function(){n=n.filter(function(a){return a!==s})}},assignSyncMedium:function(i){for(r=!0;n.length;){var s=n;n=[],s.forEach(i)}n={push:function(a){return i(a)},filter:function(){return n}}},assignMedium:function(i){r=!0;var s=[];if(n.length){var a=n;n=[],a.forEach(i),s=n}var f=function(){var l=s;s=[],l.forEach(i)},d=function(){return Promise.resolve().then(f)};d(),n={push:function(l){s.push(l),d()},filter:function(l){return s=s.filter(l),n}}}};return o}function Sa(e){e===void 0&&(e={});var t=Ea(null);return t.options=re({async:!0,ssr:!1},e),t}var co=function(e){var t=e.sideCar,n=ao(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 c.createElement(r,re({},n))};co.isSideCarExport=!0;function Ra(e,t){return e.useMedium(t),co}var lo=Sa(),Kt=function(){},St=c.forwardRef(function(e,t){var n=c.useRef(null),r=c.useState({onScrollCapture:Kt,onWheelCapture:Kt,onTouchMoveCapture:Kt}),o=r[0],i=r[1],s=e.forwardProps,a=e.children,f=e.className,d=e.removeScrollBar,l=e.enabled,p=e.shards,v=e.sideCar,h=e.noRelative,g=e.noIsolation,m=e.inert,y=e.allowPinchZoom,x=e.as,C=x===void 0?"div":x,w=e.gapMode,b=ao(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),E=v,S=ba([n,t]),R=re(re({},b),o);return c.createElement(c.Fragment,null,l&&c.createElement(E,{sideCar:lo,removeScrollBar:d,shards:p,noRelative:h,noIsolation:g,inert:m,setCallbacks:i,allowPinchZoom:!!y,lockRef:n,gapMode:w}),s?c.cloneElement(c.Children.only(a),re(re({},R),{ref:S})):c.createElement(C,re({},R,{className:f,ref:S}),a))});St.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};St.classNames={fullWidth:ct,zeroRight:at};var Oa=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function _a(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Oa();return t&&e.setAttribute("nonce",t),e}function Ta(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Pa(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Na=function(){var e=0,t=null;return{add:function(n){e==0&&(t=_a())&&(Ta(t,n),Pa(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Aa=function(){var e=Na();return function(t,n){c.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},uo=function(){var e=Aa(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},Ma={left:0,top:0,right:0,gap:0},Ut=function(e){return parseInt(e||"",10)||0},Da=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[Ut(n),Ut(r),Ut(o)]},Ia=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Ma;var t=Da(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])}},ja=uo(),Pe="data-scroll-locked",La=function(e,t,n,r){var o=e.left,i=e.top,s=e.right,a=e.gap;return n===void 0&&(n="margin"),`
|
|
2
|
+
.`.concat(ga,` {
|
|
3
3
|
overflow: hidden `).concat(r,`;
|
|
4
|
-
padding-right: `).concat(
|
|
4
|
+
padding-right: `).concat(a,"px ").concat(r,`;
|
|
5
5
|
}
|
|
6
|
-
body[`).concat(
|
|
6
|
+
body[`).concat(Pe,`] {
|
|
7
7
|
overflow: hidden `).concat(r,`;
|
|
8
8
|
overscroll-behavior: contain;
|
|
9
9
|
`).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
|
|
10
10
|
padding-left: `.concat(o,`px;
|
|
11
|
-
padding-top: `).concat(
|
|
12
|
-
padding-right: `).concat(
|
|
11
|
+
padding-top: `).concat(i,`px;
|
|
12
|
+
padding-right: `).concat(s,`px;
|
|
13
13
|
margin-left:0;
|
|
14
14
|
margin-top:0;
|
|
15
|
-
margin-right: `).concat(
|
|
16
|
-
`),n==="padding"&&"padding-right: ".concat(
|
|
15
|
+
margin-right: `).concat(a,"px ").concat(r,`;
|
|
16
|
+
`),n==="padding"&&"padding-right: ".concat(a,"px ").concat(r,";")].filter(Boolean).join(""),`
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
.`).concat(
|
|
20
|
-
right: `).concat(
|
|
19
|
+
.`).concat(at,` {
|
|
20
|
+
right: `).concat(a,"px ").concat(r,`;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
.`).concat(
|
|
24
|
-
margin-right: `).concat(
|
|
23
|
+
.`).concat(ct,` {
|
|
24
|
+
margin-right: `).concat(a,"px ").concat(r,`;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
.`).concat(
|
|
27
|
+
.`).concat(at," .").concat(at,` {
|
|
28
28
|
right: 0 `).concat(r,`;
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
.`).concat(
|
|
31
|
+
.`).concat(ct," .").concat(ct,` {
|
|
32
32
|
margin-right: 0 `).concat(r,`;
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
body[`).concat(
|
|
36
|
-
`).concat(
|
|
35
|
+
body[`).concat(Pe,`] {
|
|
36
|
+
`).concat(xa,": ").concat(a,`px;
|
|
37
37
|
}
|
|
38
|
-
`)},
|
|
38
|
+
`)},hr=function(){var e=parseInt(document.body.getAttribute(Pe)||"0",10);return isFinite(e)?e:0},ka=function(){c.useEffect(function(){return document.body.setAttribute(Pe,(hr()+1).toString()),function(){var e=hr()-1;e<=0?document.body.removeAttribute(Pe):document.body.setAttribute(Pe,e.toString())}},[])},Fa=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;ka();var i=c.useMemo(function(){return Ia(o)},[o]);return c.createElement(ja,{styles:La(i,!t,o,n?"":"!important")})},cn=!1;if(typeof window<"u")try{var et=Object.defineProperty({},"passive",{get:function(){return cn=!0,!0}});window.addEventListener("test",et,et),window.removeEventListener("test",et,et)}catch{cn=!1}var Re=cn?{passive:!1}:!1,$a=function(e){return e.tagName==="TEXTAREA"},fo=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!$a(e)&&n[t]==="visible")},Wa=function(e){return fo(e,"overflowY")},Va=function(e){return fo(e,"overflowX")},mr=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=po(e,r);if(o){var i=ho(e,r),s=i[1],a=i[2];if(s>a)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},za=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},Ba=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},po=function(e,t){return e==="v"?Wa(t):Va(t)},ho=function(e,t){return e==="v"?za(t):Ba(t)},Ha=function(e,t){return e==="h"&&t==="rtl"?-1:1},Ka=function(e,t,n,r,o){var i=Ha(e,window.getComputedStyle(t).direction),s=i*r,a=n.target,f=t.contains(a),d=!1,l=s>0,p=0,v=0;do{if(!a)break;var h=ho(e,a),g=h[0],m=h[1],y=h[2],x=m-y-i*g;(g||x)&&po(e,a)&&(p+=x,v+=g);var C=a.parentNode;a=C&&C.nodeType===Node.DOCUMENT_FRAGMENT_NODE?C.host:C}while(!f&&a!==document.body||f&&(t.contains(a)||t===a));return(l&&Math.abs(p)<1||!l&&Math.abs(v)<1)&&(d=!0),d},tt=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},vr=function(e){return[e.deltaX,e.deltaY]},gr=function(e){return e&&"current"in e?e.current:e},Ua=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Ga=function(e){return`
|
|
39
39
|
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
40
40
|
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
41
|
-
`)},
|
|
41
|
+
`)},Ya=0,Oe=[];function qa(e){var t=c.useRef([]),n=c.useRef([0,0]),r=c.useRef(),o=c.useState(Ya++)[0],i=c.useState(uo)[0],s=c.useRef(e);c.useEffect(function(){s.current=e},[e]),c.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var m=va([e.lockRef.current],(e.shards||[]).map(gr),!0).filter(Boolean);return m.forEach(function(y){return y.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),m.forEach(function(y){return y.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var a=c.useCallback(function(m,y){if("touches"in m&&m.touches.length===2||m.type==="wheel"&&m.ctrlKey)return!s.current.allowPinchZoom;var x=tt(m),C=n.current,w="deltaX"in m?m.deltaX:C[0]-x[0],b="deltaY"in m?m.deltaY:C[1]-x[1],E,S=m.target,R=Math.abs(w)>Math.abs(b)?"h":"v";if("touches"in m&&R==="h"&&S.type==="range")return!1;var _=window.getSelection(),O=_&&_.anchorNode,T=O?O===S||O.contains(S):!1;if(T)return!1;var M=mr(R,S);if(!M)return!0;if(M?E=R:(E=R==="v"?"h":"v",M=mr(R,S)),!M)return!1;if(!r.current&&"changedTouches"in m&&(w||b)&&(r.current=E),!E)return!0;var L=r.current||E;return Ka(L,y,m,L==="h"?w:b)},[]),f=c.useCallback(function(m){var y=m;if(!(!Oe.length||Oe[Oe.length-1]!==i)){var x="deltaY"in y?vr(y):tt(y),C=t.current.filter(function(E){return E.name===y.type&&(E.target===y.target||y.target===E.shadowParent)&&Ua(E.delta,x)})[0];if(C&&C.should){y.cancelable&&y.preventDefault();return}if(!C){var w=(s.current.shards||[]).map(gr).filter(Boolean).filter(function(E){return E.contains(y.target)}),b=w.length>0?a(y,w[0]):!s.current.noIsolation;b&&y.cancelable&&y.preventDefault()}}},[]),d=c.useCallback(function(m,y,x,C){var w={name:m,delta:y,target:x,should:C,shadowParent:Xa(x)};t.current.push(w),setTimeout(function(){t.current=t.current.filter(function(b){return b!==w})},1)},[]),l=c.useCallback(function(m){n.current=tt(m),r.current=void 0},[]),p=c.useCallback(function(m){d(m.type,vr(m),m.target,a(m,e.lockRef.current))},[]),v=c.useCallback(function(m){d(m.type,tt(m),m.target,a(m,e.lockRef.current))},[]);c.useEffect(function(){return Oe.push(i),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:v}),document.addEventListener("wheel",f,Re),document.addEventListener("touchmove",f,Re),document.addEventListener("touchstart",l,Re),function(){Oe=Oe.filter(function(m){return m!==i}),document.removeEventListener("wheel",f,Re),document.removeEventListener("touchmove",f,Re),document.removeEventListener("touchstart",l,Re)}},[]);var h=e.removeScrollBar,g=e.inert;return c.createElement(c.Fragment,null,g?c.createElement(i,{styles:Ga(o)}):null,h?c.createElement(Fa,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Xa(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Za=Ra(lo,qa);var mo=c.forwardRef(function(e,t){return c.createElement(St,re({},e,{ref:t,sideCar:Za}))});mo.classNames=St.classNames;var Ja=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},_e=new WeakMap,nt=new WeakMap,rt={},Gt=0,vo=function(e){return e&&(e.host||vo(e.parentNode))},Qa=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=vo(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})},ec=function(e,t,n,r){var o=Qa(t,Array.isArray(e)?e:[e]);rt[n]||(rt[n]=new WeakMap);var i=rt[n],s=[],a=new Set,f=new Set(o),d=function(p){!p||a.has(p)||(a.add(p),d(p.parentNode))};o.forEach(d);var l=function(p){!p||f.has(p)||Array.prototype.forEach.call(p.children,function(v){if(a.has(v))l(v);else try{var h=v.getAttribute(r),g=h!==null&&h!=="false",m=(_e.get(v)||0)+1,y=(i.get(v)||0)+1;_e.set(v,m),i.set(v,y),s.push(v),m===1&&g&&nt.set(v,!0),y===1&&v.setAttribute(n,"true"),g||v.setAttribute(r,"true")}catch(x){console.error("aria-hidden: cannot operate on ",v,x)}})};return l(t),a.clear(),Gt++,function(){s.forEach(function(p){var v=_e.get(p)-1,h=i.get(p)-1;_e.set(p,v),i.set(p,h),v||(nt.has(p)||p.removeAttribute(r),nt.delete(p)),h||p.removeAttribute(n)}),Gt--,Gt||(_e=new WeakMap,_e=new WeakMap,nt=new WeakMap,rt={})}},tc=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=Ja(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),ec(r,o,n,"aria-hidden")):function(){return null}},Rt="Dialog",[go]=He(Rt),[nc,te]=go(Rt),xo=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:i,modal:s=!0}=e,a=c.useRef(null),f=c.useRef(null),[d,l]=Ct({prop:r,defaultProp:o??!1,onChange:i,caller:Rt});return u.jsx(nc,{scope:t,triggerRef:a,contentRef:f,contentId:Te(),titleId:Te(),descriptionId:Te(),open:d,onOpenChange:l,onOpenToggle:c.useCallback(()=>l(p=>!p),[l]),modal:s,children:n})};xo.displayName=Rt;var yo="DialogTrigger",wo=c.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=te(yo,n),i=V(t,o.triggerRef);return u.jsx(I.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Pn(o.open),...r,ref:i,onClick:N(e.onClick,o.onOpenToggle)})});wo.displayName=yo;var _n="DialogPortal",[rc,bo]=go(_n,{forceMount:void 0}),Co=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,i=te(_n,t);return u.jsx(rc,{scope:t,forceMount:n,children:c.Children.map(r,s=>u.jsx(ce,{present:n||i.open,children:u.jsx(On,{asChild:!0,container:o,children:s})}))})};Co.displayName=_n;var mt="DialogOverlay",Eo=c.forwardRef((e,t)=>{const n=bo(mt,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=te(mt,e.__scopeDialog);return i.modal?u.jsx(ce,{present:r||i.open,children:u.jsx(ic,{...o,ref:t})}):null});Eo.displayName=mt;var oc=me.createSlot("DialogOverlay.RemoveScroll"),ic=c.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=te(mt,n);return u.jsx(mo,{as:oc,allowPinchZoom:!0,shards:[o.contentRef],children:u.jsx(I.div,{"data-state":Pn(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),be="DialogContent",So=c.forwardRef((e,t)=>{const n=bo(be,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=te(be,e.__scopeDialog);return u.jsx(ce,{present:r||i.open,children:i.modal?u.jsx(sc,{...o,ref:t}):u.jsx(ac,{...o,ref:t})})});So.displayName=be;var sc=c.forwardRef((e,t)=>{const n=te(be,e.__scopeDialog),r=c.useRef(null),o=V(t,n.contentRef,r);return c.useEffect(()=>{const i=r.current;if(i)return tc(i)},[]),u.jsx(Ro,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:N(e.onCloseAutoFocus,i=>{i.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:N(e.onPointerDownOutside,i=>{const s=i.detail.originalEvent,a=s.button===0&&s.ctrlKey===!0;(s.button===2||a)&&i.preventDefault()}),onFocusOutside:N(e.onFocusOutside,i=>i.preventDefault())})}),ac=c.forwardRef((e,t)=>{const n=te(be,e.__scopeDialog),r=c.useRef(!1),o=c.useRef(!1);return u.jsx(Ro,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{e.onCloseAutoFocus?.(i),i.defaultPrevented||(r.current||n.triggerRef.current?.focus(),i.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:i=>{e.onInteractOutside?.(i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const s=i.target;n.triggerRef.current?.contains(s)&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&o.current&&i.preventDefault()}})}),Ro=c.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:i,...s}=e,a=te(be,n),f=c.useRef(null),d=V(t,f);return ma(),u.jsxs(u.Fragment,{children:[u.jsx(io,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i,children:u.jsx(Et,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":Pn(a.open),...s,ref:d,onDismiss:()=>a.onOpenChange(!1)})}),u.jsxs(u.Fragment,{children:[u.jsx(cc,{titleId:a.titleId}),u.jsx(uc,{contentRef:f,descriptionId:a.descriptionId})]})]})}),Tn="DialogTitle",Oo=c.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=te(Tn,n);return u.jsx(I.h2,{id:o.titleId,...r,ref:t})});Oo.displayName=Tn;var _o="DialogDescription",To=c.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=te(_o,n);return u.jsx(I.p,{id:o.descriptionId,...r,ref:t})});To.displayName=_o;var Po="DialogClose",No=c.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=te(Po,n);return u.jsx(I.button,{type:"button",...r,ref:t,onClick:N(e.onClick,()=>o.onOpenChange(!1))})});No.displayName=Po;function Pn(e){return e?"open":"closed"}var Ao="DialogTitleWarning",[ku,Mo]=cs(Ao,{contentName:be,titleName:Tn,docsSlug:"dialog"}),cc=({titleId:e})=>{const t=Mo(Ao),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},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.jsx("div",{className:"text-muted",children:t})]})});exports.CustomButton=Cr;exports.Footer=$a;exports.Link=wr;exports.MainNav=za;exports.cn=L;
|
|
45
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return c.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},lc="DialogDescriptionWarning",uc=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Mo(lc).contentName}}.`;return c.useEffect(()=>{const o=e.current?.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},dc=xo,fc=wo,pc=Co,hc=Eo,mc=So,vc=Oo,gc=To,xc=No;function Do({...e}){return u.jsx(dc,{"data-slot":"sheet",...e})}function yc({...e}){return u.jsx(fc,{"data-slot":"sheet-trigger",...e})}function wc({...e}){return u.jsx(pc,{"data-slot":"sheet-portal",...e})}function bc({className:e,...t}){return u.jsx(hc,{"data-slot":"sheet-overlay",className:A("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 Io({className:e,children:t,side:n="right",...r}){return u.jsxs(wc,{children:[u.jsx(bc,{}),u.jsxs(mc,{"data-slot":"sheet-content",className:A("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,u.jsxs(xc,{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:[u.jsx(gn.XIcon,{className:"size-4"}),u.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function Cc({className:e,...t}){return u.jsx("div",{"data-slot":"sheet-header",className:A("flex flex-col gap-1.5 p-4",e),...t})}function Ec({className:e,...t}){return u.jsx(vc,{"data-slot":"sheet-title",className:A("text-foreground font-semibold",e),...t})}function Sc({className:e,...t}){return u.jsx(gc,{"data-slot":"sheet-description",className:A("text-muted-foreground text-sm",e),...t})}const ln=({navItems:e,LinkComponent:t="a",className:n,...r})=>u.jsxs("header",{className:A(n),...r,children:[u.jsx("nav",{className:"hidden sm:flex sticky top-0 z-10 items-center px-4 h-14",children:u.jsx(ta,{children:u.jsx(na,{children:e.map(o=>u.jsx(ra,{children:u.jsx(sa,{asChild:!0,className:oa(),children:u.jsxs(t,{to:o.url,className:"flex items-center",children:[o.icon&&u.jsx(o.icon,{}),u.jsx("span",{children:o.title})]})})},o.title))})})}),u.jsx("nav",{className:"flex sm:hidden",children:u.jsxs(Do,{children:[u.jsx(yc,{asChild:!0,children:u.jsx(bt,{variant:"ghost",size:"icon",children:u.jsx(gn.Menu,{})})}),u.jsx(Io,{side:"top",className:"p-8",children:u.jsx("div",{className:"flex flex-col gap-4",children:e.map(o=>u.jsxs(t,{to:o.url,className:"flex items-center gap-2",children:[o.icon&&u.jsx(o.icon,{}),u.jsx("span",{className:"text-base font-medium",children:o.title})]},o.title))})})]})})]}),un=({links:e,copyright:t,socialProfiles:n,className:r,...o})=>u.jsx("footer",{className:A(r),...o,children:u.jsxs("div",{className:"flex flex-col items-center justify-center gap-5 bg-background py-8 border-t",children:[u.jsx("div",{className:"flex justify-center gap-5 sm:gap-8 xl:gap-13",children:n.map(i=>u.jsx(bt,{variant:"secondary",size:"icon",className:"rounded-xl",children:u.jsx("a",{href:i.url,children:i.icon&&u.jsx(i.icon,{})})},i.title))}),u.jsx("div",{className:"flex justify-center gap-5 sm:gap-8 xl:gap-13",children:e.map(i=>{const s=i.url;return u.jsx("a",{href:s,children:i.title},i.title)})}),u.jsx("div",{className:"text-muted",children:t})]})}),Yt=768;function Rc(){const[e,t]=c.useState(void 0);return c.useEffect(()=>{const n=window.matchMedia(`(max-width: ${Yt-1}px)`),r=()=>{t(window.innerWidth<Yt)};return n.addEventListener("change",r),t(window.innerWidth<Yt),()=>n.removeEventListener("change",r)},[]),!!e}const Oc=["top","right","bottom","left"],ve=Math.min,U=Math.max,vt=Math.round,ot=Math.floor,se=e=>({x:e,y:e}),_c={left:"right",right:"left",bottom:"top",top:"bottom"},Tc={start:"end",end:"start"};function dn(e,t,n){return U(e,ve(t,n))}function de(e,t){return typeof e=="function"?e(t):e}function fe(e){return e.split("-")[0]}function Ie(e){return e.split("-")[1]}function Nn(e){return e==="x"?"y":"x"}function An(e){return e==="y"?"height":"width"}const Pc=new Set(["top","bottom"]);function oe(e){return Pc.has(fe(e))?"y":"x"}function Mn(e){return Nn(oe(e))}function Nc(e,t,n){n===void 0&&(n=!1);const r=Ie(e),o=Mn(e),i=An(o);let s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=gt(s)),[s,gt(s)]}function Ac(e){const t=gt(e);return[fn(e),t,fn(t)]}function fn(e){return e.replace(/start|end/g,t=>Tc[t])}const xr=["left","right"],yr=["right","left"],Mc=["top","bottom"],Dc=["bottom","top"];function Ic(e,t,n){switch(e){case"top":case"bottom":return n?t?yr:xr:t?xr:yr;case"left":case"right":return t?Mc:Dc;default:return[]}}function jc(e,t,n,r){const o=Ie(e);let i=Ic(fe(e),n==="start",r);return o&&(i=i.map(s=>s+"-"+o),t&&(i=i.concat(i.map(fn)))),i}function gt(e){return e.replace(/left|right|bottom|top/g,t=>_c[t])}function Lc(e){return{top:0,right:0,bottom:0,left:0,...e}}function jo(e){return typeof e!="number"?Lc(e):{top:e,right:e,bottom:e,left:e}}function xt(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function wr(e,t,n){let{reference:r,floating:o}=e;const i=oe(t),s=Mn(t),a=An(s),f=fe(t),d=i==="y",l=r.x+r.width/2-o.width/2,p=r.y+r.height/2-o.height/2,v=r[a]/2-o[a]/2;let h;switch(f){case"top":h={x:l,y:r.y-o.height};break;case"bottom":h={x:l,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:p};break;case"left":h={x:r.x-o.width,y:p};break;default:h={x:r.x,y:r.y}}switch(Ie(t)){case"start":h[s]-=v*(n&&d?-1:1);break;case"end":h[s]+=v*(n&&d?-1:1);break}return h}const kc=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,a=i.filter(Boolean),f=await(s.isRTL==null?void 0:s.isRTL(t));let d=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:l,y:p}=wr(d,r,f),v=r,h={},g=0;for(let m=0;m<a.length;m++){const{name:y,fn:x}=a[m],{x:C,y:w,data:b,reset:E}=await x({x:l,y:p,initialPlacement:r,placement:v,strategy:o,middlewareData:h,rects:d,platform:s,elements:{reference:e,floating:t}});l=C??l,p=w??p,h={...h,[y]:{...h[y],...b}},E&&g<=50&&(g++,typeof E=="object"&&(E.placement&&(v=E.placement),E.rects&&(d=E.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):E.rects),{x:l,y:p}=wr(d,v,f)),m=-1)}return{x:l,y:p,placement:v,strategy:o,middlewareData:h}};async function Ve(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:s,elements:a,strategy:f}=e,{boundary:d="clippingAncestors",rootBoundary:l="viewport",elementContext:p="floating",altBoundary:v=!1,padding:h=0}=de(t,e),g=jo(h),y=a[v?p==="floating"?"reference":"floating":p],x=xt(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(y)))==null||n?y:y.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:d,rootBoundary:l,strategy:f})),C=p==="floating"?{x:r,y:o,width:s.floating.width,height:s.floating.height}:s.reference,w=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),b=await(i.isElement==null?void 0:i.isElement(w))?await(i.getScale==null?void 0:i.getScale(w))||{x:1,y:1}:{x:1,y:1},E=xt(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:C,offsetParent:w,strategy:f}):C);return{top:(x.top-E.top+g.top)/b.y,bottom:(E.bottom-x.bottom+g.bottom)/b.y,left:(x.left-E.left+g.left)/b.x,right:(E.right-x.right+g.right)/b.x}}const Fc=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:s,elements:a,middlewareData:f}=t,{element:d,padding:l=0}=de(e,t)||{};if(d==null)return{};const p=jo(l),v={x:n,y:r},h=Mn(o),g=An(h),m=await s.getDimensions(d),y=h==="y",x=y?"top":"left",C=y?"bottom":"right",w=y?"clientHeight":"clientWidth",b=i.reference[g]+i.reference[h]-v[h]-i.floating[g],E=v[h]-i.reference[h],S=await(s.getOffsetParent==null?void 0:s.getOffsetParent(d));let R=S?S[w]:0;(!R||!await(s.isElement==null?void 0:s.isElement(S)))&&(R=a.floating[w]||i.floating[g]);const _=b/2-E/2,O=R/2-m[g]/2-1,T=ve(p[x],O),M=ve(p[C],O),L=T,k=R-m[g]-M,j=R/2-m[g]/2+_,H=dn(L,j,k),F=!f.arrow&&Ie(o)!=null&&j!==H&&i.reference[g]/2-(j<L?T:M)-m[g]/2<0,$=F?j<L?j-L:j-k:0;return{[h]:v[h]+$,data:{[h]:H,centerOffset:j-H-$,...F&&{alignmentOffset:$}},reset:F}}}),$c=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:s,initialPlacement:a,platform:f,elements:d}=t,{mainAxis:l=!0,crossAxis:p=!0,fallbackPlacements:v,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:m=!0,...y}=de(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const x=fe(o),C=oe(a),w=fe(a)===a,b=await(f.isRTL==null?void 0:f.isRTL(d.floating)),E=v||(w||!m?[gt(a)]:Ac(a)),S=g!=="none";!v&&S&&E.push(...jc(a,m,g,b));const R=[a,...E],_=await Ve(t,y),O=[];let T=((r=i.flip)==null?void 0:r.overflows)||[];if(l&&O.push(_[x]),p){const j=Nc(o,s,b);O.push(_[j[0]],_[j[1]])}if(T=[...T,{placement:o,overflows:O}],!O.every(j=>j<=0)){var M,L;const j=(((M=i.flip)==null?void 0:M.index)||0)+1,H=R[j];if(H&&(!(p==="alignment"?C!==oe(H):!1)||T.every(P=>oe(P.placement)===C?P.overflows[0]>0:!0)))return{data:{index:j,overflows:T},reset:{placement:H}};let F=(L=T.filter($=>$.overflows[0]<=0).sort(($,P)=>$.overflows[1]-P.overflows[1])[0])==null?void 0:L.placement;if(!F)switch(h){case"bestFit":{var k;const $=(k=T.filter(P=>{if(S){const z=oe(P.placement);return z===C||z==="y"}return!0}).map(P=>[P.placement,P.overflows.filter(z=>z>0).reduce((z,q)=>z+q,0)]).sort((P,z)=>P[1]-z[1])[0])==null?void 0:k[0];$&&(F=$);break}case"initialPlacement":F=a;break}if(o!==F)return{reset:{placement:F}}}return{}}}};function br(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Cr(e){return Oc.some(t=>e[t]>=0)}const Wc=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=de(e,t);switch(r){case"referenceHidden":{const i=await Ve(t,{...o,elementContext:"reference"}),s=br(i,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:Cr(s)}}}case"escaped":{const i=await Ve(t,{...o,altBoundary:!0}),s=br(i,n.floating);return{data:{escapedOffsets:s,escaped:Cr(s)}}}default:return{}}}}},Lo=new Set(["left","top"]);async function Vc(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=fe(n),a=Ie(n),f=oe(n)==="y",d=Lo.has(s)?-1:1,l=i&&f?-1:1,p=de(t,e);let{mainAxis:v,crossAxis:h,alignmentAxis:g}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return a&&typeof g=="number"&&(h=a==="end"?g*-1:g),f?{x:h*l,y:v*d}:{x:v*d,y:h*l}}const zc=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:s,middlewareData:a}=t,f=await Vc(t,e);return s===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+f.x,y:i+f.y,data:{...f,placement:s}}}}},Bc=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:s=!1,limiter:a={fn:y=>{let{x,y:C}=y;return{x,y:C}}},...f}=de(e,t),d={x:n,y:r},l=await Ve(t,f),p=oe(fe(o)),v=Nn(p);let h=d[v],g=d[p];if(i){const y=v==="y"?"top":"left",x=v==="y"?"bottom":"right",C=h+l[y],w=h-l[x];h=dn(C,h,w)}if(s){const y=p==="y"?"top":"left",x=p==="y"?"bottom":"right",C=g+l[y],w=g-l[x];g=dn(C,g,w)}const m=a.fn({...t,[v]:h,[p]:g});return{...m,data:{x:m.x-n,y:m.y-r,enabled:{[v]:i,[p]:s}}}}}},Hc=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:s}=t,{offset:a=0,mainAxis:f=!0,crossAxis:d=!0}=de(e,t),l={x:n,y:r},p=oe(o),v=Nn(p);let h=l[v],g=l[p];const m=de(a,t),y=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(f){const w=v==="y"?"height":"width",b=i.reference[v]-i.floating[w]+y.mainAxis,E=i.reference[v]+i.reference[w]-y.mainAxis;h<b?h=b:h>E&&(h=E)}if(d){var x,C;const w=v==="y"?"width":"height",b=Lo.has(fe(o)),E=i.reference[p]-i.floating[w]+(b&&((x=s.offset)==null?void 0:x[p])||0)+(b?0:y.crossAxis),S=i.reference[p]+i.reference[w]+(b?0:((C=s.offset)==null?void 0:C[p])||0)-(b?y.crossAxis:0);g<E?g=E:g>S&&(g=S)}return{[v]:h,[p]:g}}}},Kc=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:s,elements:a}=t,{apply:f=()=>{},...d}=de(e,t),l=await Ve(t,d),p=fe(o),v=Ie(o),h=oe(o)==="y",{width:g,height:m}=i.floating;let y,x;p==="top"||p==="bottom"?(y=p,x=v===(await(s.isRTL==null?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(x=p,y=v==="end"?"top":"bottom");const C=m-l.top-l.bottom,w=g-l.left-l.right,b=ve(m-l[y],C),E=ve(g-l[x],w),S=!t.middlewareData.shift;let R=b,_=E;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(_=w),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(R=C),S&&!v){const T=U(l.left,0),M=U(l.right,0),L=U(l.top,0),k=U(l.bottom,0);h?_=g-2*(T!==0||M!==0?T+M:U(l.left,l.right)):R=m-2*(L!==0||k!==0?L+k:U(l.top,l.bottom))}await f({...t,availableWidth:_,availableHeight:R});const O=await s.getDimensions(a.floating);return g!==O.width||m!==O.height?{reset:{rects:!0}}:{}}}};function Ot(){return typeof window<"u"}function je(e){return ko(e)?(e.nodeName||"").toLowerCase():"#document"}function G(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function le(e){var t;return(t=(ko(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function ko(e){return Ot()?e instanceof Node||e instanceof G(e).Node:!1}function Q(e){return Ot()?e instanceof Element||e instanceof G(e).Element:!1}function ae(e){return Ot()?e instanceof HTMLElement||e instanceof G(e).HTMLElement:!1}function Er(e){return!Ot()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof G(e).ShadowRoot}const Uc=new Set(["inline","contents"]);function Ke(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=ee(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!Uc.has(o)}const Gc=new Set(["table","td","th"]);function Yc(e){return Gc.has(je(e))}const qc=[":popover-open",":modal"];function _t(e){return qc.some(t=>{try{return e.matches(t)}catch{return!1}})}const Xc=["transform","translate","scale","rotate","perspective"],Zc=["transform","translate","scale","rotate","perspective","filter"],Jc=["paint","layout","strict","content"];function Dn(e){const t=In(),n=Q(e)?ee(e):e;return Xc.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||Zc.some(r=>(n.willChange||"").includes(r))||Jc.some(r=>(n.contain||"").includes(r))}function Qc(e){let t=ge(e);for(;ae(t)&&!Me(t);){if(Dn(t))return t;if(_t(t))return null;t=ge(t)}return null}function In(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const el=new Set(["html","body","#document"]);function Me(e){return el.has(je(e))}function ee(e){return G(e).getComputedStyle(e)}function Tt(e){return Q(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ge(e){if(je(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Er(e)&&e.host||le(e);return Er(t)?t.host:t}function Fo(e){const t=ge(e);return Me(t)?e.ownerDocument?e.ownerDocument.body:e.body:ae(t)&&Ke(t)?t:Fo(t)}function ze(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Fo(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),s=G(o);if(i){const a=pn(s);return t.concat(s,s.visualViewport||[],Ke(o)?o:[],a&&n?ze(a):[])}return t.concat(o,ze(o,[],n))}function pn(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function $o(e){const t=ee(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=ae(e),i=o?e.offsetWidth:n,s=o?e.offsetHeight:r,a=vt(n)!==i||vt(r)!==s;return a&&(n=i,r=s),{width:n,height:r,$:a}}function jn(e){return Q(e)?e:e.contextElement}function Ne(e){const t=jn(e);if(!ae(t))return se(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=$o(t);let s=(i?vt(n.width):n.width)/r,a=(i?vt(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const tl=se(0);function Wo(e){const t=G(e);return!In()||!t.visualViewport?tl:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function nl(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==G(e)?!1:t}function Ce(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=jn(e);let s=se(1);t&&(r?Q(r)&&(s=Ne(r)):s=Ne(e));const a=nl(i,n,r)?Wo(i):se(0);let f=(o.left+a.x)/s.x,d=(o.top+a.y)/s.y,l=o.width/s.x,p=o.height/s.y;if(i){const v=G(i),h=r&&Q(r)?G(r):r;let g=v,m=pn(g);for(;m&&r&&h!==g;){const y=Ne(m),x=m.getBoundingClientRect(),C=ee(m),w=x.left+(m.clientLeft+parseFloat(C.paddingLeft))*y.x,b=x.top+(m.clientTop+parseFloat(C.paddingTop))*y.y;f*=y.x,d*=y.y,l*=y.x,p*=y.y,f+=w,d+=b,g=G(m),m=pn(g)}}return xt({width:l,height:p,x:f,y:d})}function Pt(e,t){const n=Tt(e).scrollLeft;return t?t.left+n:Ce(le(e)).left+n}function Vo(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Pt(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function rl(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",s=le(r),a=t?_t(t.floating):!1;if(r===s||a&&i)return n;let f={scrollLeft:0,scrollTop:0},d=se(1);const l=se(0),p=ae(r);if((p||!p&&!i)&&((je(r)!=="body"||Ke(s))&&(f=Tt(r)),ae(r))){const h=Ce(r);d=Ne(r),l.x=h.x+r.clientLeft,l.y=h.y+r.clientTop}const v=s&&!p&&!i?Vo(s,f):se(0);return{width:n.width*d.x,height:n.height*d.y,x:n.x*d.x-f.scrollLeft*d.x+l.x+v.x,y:n.y*d.y-f.scrollTop*d.y+l.y+v.y}}function ol(e){return Array.from(e.getClientRects())}function il(e){const t=le(e),n=Tt(e),r=e.ownerDocument.body,o=U(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=U(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+Pt(e);const a=-n.scrollTop;return ee(r).direction==="rtl"&&(s+=U(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:s,y:a}}const Sr=25;function sl(e,t){const n=G(e),r=le(e),o=n.visualViewport;let i=r.clientWidth,s=r.clientHeight,a=0,f=0;if(o){i=o.width,s=o.height;const l=In();(!l||l&&t==="fixed")&&(a=o.offsetLeft,f=o.offsetTop)}const d=Pt(r);if(d<=0){const l=r.ownerDocument,p=l.body,v=getComputedStyle(p),h=l.compatMode==="CSS1Compat"&&parseFloat(v.marginLeft)+parseFloat(v.marginRight)||0,g=Math.abs(r.clientWidth-p.clientWidth-h);g<=Sr&&(i-=g)}else d<=Sr&&(i+=d);return{width:i,height:s,x:a,y:f}}const al=new Set(["absolute","fixed"]);function cl(e,t){const n=Ce(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=ae(e)?Ne(e):se(1),s=e.clientWidth*i.x,a=e.clientHeight*i.y,f=o*i.x,d=r*i.y;return{width:s,height:a,x:f,y:d}}function Rr(e,t,n){let r;if(t==="viewport")r=sl(e,n);else if(t==="document")r=il(le(e));else if(Q(t))r=cl(t,n);else{const o=Wo(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return xt(r)}function zo(e,t){const n=ge(e);return n===t||!Q(n)||Me(n)?!1:ee(n).position==="fixed"||zo(n,t)}function ll(e,t){const n=t.get(e);if(n)return n;let r=ze(e,[],!1).filter(a=>Q(a)&&je(a)!=="body"),o=null;const i=ee(e).position==="fixed";let s=i?ge(e):e;for(;Q(s)&&!Me(s);){const a=ee(s),f=Dn(s);!f&&a.position==="fixed"&&(o=null),(i?!f&&!o:!f&&a.position==="static"&&!!o&&al.has(o.position)||Ke(s)&&!f&&zo(e,s))?r=r.filter(l=>l!==s):o=a,s=ge(s)}return t.set(e,r),r}function ul(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const s=[...n==="clippingAncestors"?_t(t)?[]:ll(t,this._c):[].concat(n),r],a=s[0],f=s.reduce((d,l)=>{const p=Rr(t,l,o);return d.top=U(p.top,d.top),d.right=ve(p.right,d.right),d.bottom=ve(p.bottom,d.bottom),d.left=U(p.left,d.left),d},Rr(t,a,o));return{width:f.right-f.left,height:f.bottom-f.top,x:f.left,y:f.top}}function dl(e){const{width:t,height:n}=$o(e);return{width:t,height:n}}function fl(e,t,n){const r=ae(t),o=le(t),i=n==="fixed",s=Ce(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const f=se(0);function d(){f.x=Pt(o)}if(r||!r&&!i)if((je(t)!=="body"||Ke(o))&&(a=Tt(t)),r){const h=Ce(t,!0,i,t);f.x=h.x+t.clientLeft,f.y=h.y+t.clientTop}else o&&d();i&&!r&&o&&d();const l=o&&!r&&!i?Vo(o,a):se(0),p=s.left+a.scrollLeft-f.x-l.x,v=s.top+a.scrollTop-f.y-l.y;return{x:p,y:v,width:s.width,height:s.height}}function qt(e){return ee(e).position==="static"}function Or(e,t){if(!ae(e)||ee(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return le(e)===n&&(n=n.ownerDocument.body),n}function Bo(e,t){const n=G(e);if(_t(e))return n;if(!ae(e)){let o=ge(e);for(;o&&!Me(o);){if(Q(o)&&!qt(o))return o;o=ge(o)}return n}let r=Or(e,t);for(;r&&Yc(r)&&qt(r);)r=Or(r,t);return r&&Me(r)&&qt(r)&&!Dn(r)?n:r||Qc(e)||n}const pl=async function(e){const t=this.getOffsetParent||Bo,n=this.getDimensions,r=await n(e.floating);return{reference:fl(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function hl(e){return ee(e).direction==="rtl"}const ml={convertOffsetParentRelativeRectToViewportRelativeRect:rl,getDocumentElement:le,getClippingRect:ul,getOffsetParent:Bo,getElementRects:pl,getClientRects:ol,getDimensions:dl,getScale:Ne,isElement:Q,isRTL:hl};function Ho(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function vl(e,t){let n=null,r;const o=le(e);function i(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function s(a,f){a===void 0&&(a=!1),f===void 0&&(f=1),i();const d=e.getBoundingClientRect(),{left:l,top:p,width:v,height:h}=d;if(a||t(),!v||!h)return;const g=ot(p),m=ot(o.clientWidth-(l+v)),y=ot(o.clientHeight-(p+h)),x=ot(l),w={rootMargin:-g+"px "+-m+"px "+-y+"px "+-x+"px",threshold:U(0,ve(1,f))||1};let b=!0;function E(S){const R=S[0].intersectionRatio;if(R!==f){if(!b)return s();R?s(!1,R):r=setTimeout(()=>{s(!1,1e-7)},1e3)}R===1&&!Ho(d,e.getBoundingClientRect())&&s(),b=!1}try{n=new IntersectionObserver(E,{...w,root:o.ownerDocument})}catch{n=new IntersectionObserver(E,w)}n.observe(e)}return s(!0),i}function gl(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:f=!1}=r,d=jn(e),l=o||i?[...d?ze(d):[],...ze(t)]:[];l.forEach(x=>{o&&x.addEventListener("scroll",n,{passive:!0}),i&&x.addEventListener("resize",n)});const p=d&&a?vl(d,n):null;let v=-1,h=null;s&&(h=new ResizeObserver(x=>{let[C]=x;C&&C.target===d&&h&&(h.unobserve(t),cancelAnimationFrame(v),v=requestAnimationFrame(()=>{var w;(w=h)==null||w.observe(t)})),n()}),d&&!f&&h.observe(d),h.observe(t));let g,m=f?Ce(e):null;f&&y();function y(){const x=Ce(e);m&&!Ho(m,x)&&n(),m=x,g=requestAnimationFrame(y)}return n(),()=>{var x;l.forEach(C=>{o&&C.removeEventListener("scroll",n),i&&C.removeEventListener("resize",n)}),p?.(),(x=h)==null||x.disconnect(),h=null,f&&cancelAnimationFrame(g)}}const xl=zc,yl=Bc,wl=$c,bl=Kc,Cl=Wc,_r=Fc,El=Hc,Sl=(e,t,n)=>{const r=new Map,o={platform:ml,...n},i={...o.platform,_c:r};return kc(e,t,{...o,platform:i})};var Rl=typeof document<"u",Ol=function(){},lt=Rl?W.useLayoutEffect:Ol;function yt(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!yt(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!yt(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function Ko(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Tr(e,t){const n=Ko(e);return Math.round(t*n)/n}function Xt(e){const t=c.useRef(e);return lt(()=>{t.current=e}),t}function _l(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:s}={},transform:a=!0,whileElementsMounted:f,open:d}=e,[l,p]=c.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[v,h]=c.useState(r);yt(v,r)||h(r);const[g,m]=c.useState(null),[y,x]=c.useState(null),C=c.useCallback(P=>{P!==S.current&&(S.current=P,m(P))},[]),w=c.useCallback(P=>{P!==R.current&&(R.current=P,x(P))},[]),b=i||g,E=s||y,S=c.useRef(null),R=c.useRef(null),_=c.useRef(l),O=f!=null,T=Xt(f),M=Xt(o),L=Xt(d),k=c.useCallback(()=>{if(!S.current||!R.current)return;const P={placement:t,strategy:n,middleware:v};M.current&&(P.platform=M.current),Sl(S.current,R.current,P).then(z=>{const q={...z,isPositioned:L.current!==!1};j.current&&!yt(_.current,q)&&(_.current=q,Nr.flushSync(()=>{p(q)}))})},[v,t,n,M,L]);lt(()=>{d===!1&&_.current.isPositioned&&(_.current.isPositioned=!1,p(P=>({...P,isPositioned:!1})))},[d]);const j=c.useRef(!1);lt(()=>(j.current=!0,()=>{j.current=!1}),[]),lt(()=>{if(b&&(S.current=b),E&&(R.current=E),b&&E){if(T.current)return T.current(b,E,k);k()}},[b,E,k,T,O]);const H=c.useMemo(()=>({reference:S,floating:R,setReference:C,setFloating:w}),[C,w]),F=c.useMemo(()=>({reference:b,floating:E}),[b,E]),$=c.useMemo(()=>{const P={position:n,left:0,top:0};if(!F.floating)return P;const z=Tr(F.floating,l.x),q=Tr(F.floating,l.y);return a?{...P,transform:"translate("+z+"px, "+q+"px)",...Ko(F.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:z,top:q}},[n,a,F.floating,l.x,l.y]);return c.useMemo(()=>({...l,update:k,refs:H,elements:F,floatingStyles:$}),[l,k,H,F,$])}const Tl=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?_r({element:r.current,padding:o}).fn(n):{}:r?_r({element:r,padding:o}).fn(n):{}}}},Pl=(e,t)=>({...xl(e),options:[e,t]}),Nl=(e,t)=>({...yl(e),options:[e,t]}),Al=(e,t)=>({...El(e),options:[e,t]}),Ml=(e,t)=>({...wl(e),options:[e,t]}),Dl=(e,t)=>({...bl(e),options:[e,t]}),Il=(e,t)=>({...Cl(e),options:[e,t]}),jl=(e,t)=>({...Tl(e),options:[e,t]});var Ll="Arrow",Uo=c.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...i}=e;return u.jsx(I.svg,{...i,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:u.jsx("polygon",{points:"0,0 30,0 15,10"})})});Uo.displayName=Ll;var kl=Uo;function Fl(e){const[t,n]=c.useState(void 0);return J(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const i=o[0];let s,a;if("borderBoxSize"in i){const f=i.borderBoxSize,d=Array.isArray(f)?f[0]:f;s=d.inlineSize,a=d.blockSize}else s=e.offsetWidth,a=e.offsetHeight;n({width:s,height:a})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var Ln="Popper",[Go,Yo]=He(Ln),[$l,qo]=Go(Ln),Xo=e=>{const{__scopePopper:t,children:n}=e,[r,o]=c.useState(null);return u.jsx($l,{scope:t,anchor:r,onAnchorChange:o,children:n})};Xo.displayName=Ln;var Zo="PopperAnchor",Jo=c.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,i=qo(Zo,n),s=c.useRef(null),a=V(t,s),f=c.useRef(null);return c.useEffect(()=>{const d=f.current;f.current=r?.current||s.current,d!==f.current&&i.onAnchorChange(f.current)}),r?null:u.jsx(I.div,{...o,ref:a})});Jo.displayName=Zo;var kn="PopperContent",[Wl,Vl]=Go(kn),Qo=c.forwardRef((e,t)=>{const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:i="center",alignOffset:s=0,arrowPadding:a=0,avoidCollisions:f=!0,collisionBoundary:d=[],collisionPadding:l=0,sticky:p="partial",hideWhenDetached:v=!1,updatePositionStrategy:h="optimized",onPlaced:g,...m}=e,y=qo(kn,n),[x,C]=c.useState(null),w=V(t,ne=>C(ne)),[b,E]=c.useState(null),S=Fl(b),R=S?.width??0,_=S?.height??0,O=r+(i!=="center"?"-"+i:""),T=typeof l=="number"?l:{top:0,right:0,bottom:0,left:0,...l},M=Array.isArray(d)?d:[d],L=M.length>0,k={padding:T,boundary:M.filter(Bl),altBoundary:L},{refs:j,floatingStyles:H,placement:F,isPositioned:$,middlewareData:P}=_l({strategy:"fixed",placement:O,whileElementsMounted:(...ne)=>gl(...ne,{animationFrame:h==="always"}),elements:{reference:y.anchor},middleware:[Pl({mainAxis:o+_,alignmentAxis:s}),f&&Nl({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?Al():void 0,...k}),f&&Ml({...k}),Dl({...k,apply:({elements:ne,rects:we,availableWidth:pe,availableHeight:Le})=>{const{width:ke,height:ue}=we.reference,Se=ne.floating.style;Se.setProperty("--radix-popper-available-width",`${pe}px`),Se.setProperty("--radix-popper-available-height",`${Le}px`),Se.setProperty("--radix-popper-anchor-width",`${ke}px`),Se.setProperty("--radix-popper-anchor-height",`${ue}px`)}}),b&&jl({element:b,padding:a}),Hl({arrowWidth:R,arrowHeight:_}),v&&Il({strategy:"referenceHidden",...k})]}),[z,q]=ni(F),Mt=K(g);J(()=>{$&&Mt?.()},[$,Mt]);const Ge=P.arrow?.x,Dt=P.arrow?.y,Ye=P.arrow?.centerOffset!==0,[ye,X]=c.useState();return J(()=>{x&&X(window.getComputedStyle(x).zIndex)},[x]),u.jsx("div",{ref:j.setFloating,"data-radix-popper-content-wrapper":"",style:{...H,transform:$?H.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ye,"--radix-popper-transform-origin":[P.transformOrigin?.x,P.transformOrigin?.y].join(" "),...P.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:u.jsx(Wl,{scope:n,placedSide:z,onArrowChange:E,arrowX:Ge,arrowY:Dt,shouldHideArrow:Ye,children:u.jsx(I.div,{"data-side":z,"data-align":q,...m,ref:w,style:{...m.style,animation:$?void 0:"none"}})})})});Qo.displayName=kn;var ei="PopperArrow",zl={top:"bottom",right:"left",bottom:"top",left:"right"},ti=c.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,i=Vl(ei,r),s=zl[i.placedSide];return u.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:u.jsx(kl,{...o,ref:n,style:{...o.style,display:"block"}})})});ti.displayName=ei;function Bl(e){return e!==null}var Hl=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:o}=t,s=o.arrow?.centerOffset!==0,a=s?0:e.arrowWidth,f=s?0:e.arrowHeight,[d,l]=ni(n),p={start:"0%",center:"50%",end:"100%"}[l],v=(o.arrow?.x??0)+a/2,h=(o.arrow?.y??0)+f/2;let g="",m="";return d==="bottom"?(g=s?p:`${v}px`,m=`${-f}px`):d==="top"?(g=s?p:`${v}px`,m=`${r.floating.height+f}px`):d==="right"?(g=`${-f}px`,m=s?p:`${h}px`):d==="left"&&(g=`${r.floating.width+f}px`,m=s?p:`${h}px`),{data:{x:g,y:m}}}});function ni(e){const[t,n="center"]=e.split("-");return[t,n]}var Kl=Xo,Ul=Jo,Gl=Qo,Yl=ti,[Nt]=He("Tooltip",[Yo]),At=Yo(),ri="TooltipProvider",ql=700,hn="tooltip.open",[Xl,Fn]=Nt(ri),oi=e=>{const{__scopeTooltip:t,delayDuration:n=ql,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:i}=e,s=c.useRef(!0),a=c.useRef(!1),f=c.useRef(0);return c.useEffect(()=>{const d=f.current;return()=>window.clearTimeout(d)},[]),u.jsx(Xl,{scope:t,isOpenDelayedRef:s,delayDuration:n,onOpen:c.useCallback(()=>{window.clearTimeout(f.current),s.current=!1},[]),onClose:c.useCallback(()=>{window.clearTimeout(f.current),f.current=window.setTimeout(()=>s.current=!0,r)},[r]),isPointerInTransitRef:a,onPointerInTransitChange:c.useCallback(d=>{a.current=d},[]),disableHoverableContent:o,children:i})};oi.displayName=ri;var Be="Tooltip",[Zl,Ue]=Nt(Be),ii=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o,onOpenChange:i,disableHoverableContent:s,delayDuration:a}=e,f=Fn(Be,e.__scopeTooltip),d=At(t),[l,p]=c.useState(null),v=Te(),h=c.useRef(0),g=s??f.disableHoverableContent,m=a??f.delayDuration,y=c.useRef(!1),[x,C]=Ct({prop:r,defaultProp:o??!1,onChange:R=>{R?(f.onOpen(),document.dispatchEvent(new CustomEvent(hn))):f.onClose(),i?.(R)},caller:Be}),w=c.useMemo(()=>x?y.current?"delayed-open":"instant-open":"closed",[x]),b=c.useCallback(()=>{window.clearTimeout(h.current),h.current=0,y.current=!1,C(!0)},[C]),E=c.useCallback(()=>{window.clearTimeout(h.current),h.current=0,C(!1)},[C]),S=c.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>{y.current=!0,C(!0),h.current=0},m)},[m,C]);return c.useEffect(()=>()=>{h.current&&(window.clearTimeout(h.current),h.current=0)},[]),u.jsx(Kl,{...d,children:u.jsx(Zl,{scope:t,contentId:v,open:x,stateAttribute:w,trigger:l,onTriggerChange:p,onTriggerEnter:c.useCallback(()=>{f.isOpenDelayedRef.current?S():b()},[f.isOpenDelayedRef,S,b]),onTriggerLeave:c.useCallback(()=>{g?E():(window.clearTimeout(h.current),h.current=0)},[E,g]),onOpen:b,onClose:E,disableHoverableContent:g,children:n})})};ii.displayName=Be;var mn="TooltipTrigger",si=c.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Ue(mn,n),i=Fn(mn,n),s=At(n),a=c.useRef(null),f=V(t,a,o.onTriggerChange),d=c.useRef(!1),l=c.useRef(!1),p=c.useCallback(()=>d.current=!1,[]);return c.useEffect(()=>()=>document.removeEventListener("pointerup",p),[p]),u.jsx(Ul,{asChild:!0,...s,children:u.jsx(I.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:f,onPointerMove:N(e.onPointerMove,v=>{v.pointerType!=="touch"&&!l.current&&!i.isPointerInTransitRef.current&&(o.onTriggerEnter(),l.current=!0)}),onPointerLeave:N(e.onPointerLeave,()=>{o.onTriggerLeave(),l.current=!1}),onPointerDown:N(e.onPointerDown,()=>{o.open&&o.onClose(),d.current=!0,document.addEventListener("pointerup",p,{once:!0})}),onFocus:N(e.onFocus,()=>{d.current||o.onOpen()}),onBlur:N(e.onBlur,o.onClose),onClick:N(e.onClick,o.onClose)})})});si.displayName=mn;var $n="TooltipPortal",[Jl,Ql]=Nt($n,{forceMount:void 0}),ai=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:o}=e,i=Ue($n,t);return u.jsx(Jl,{scope:t,forceMount:n,children:u.jsx(ce,{present:n||i.open,children:u.jsx(On,{asChild:!0,container:o,children:r})})})};ai.displayName=$n;var De="TooltipContent",ci=c.forwardRef((e,t)=>{const n=Ql(De,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...i}=e,s=Ue(De,e.__scopeTooltip);return u.jsx(ce,{present:r||s.open,children:s.disableHoverableContent?u.jsx(li,{side:o,...i,ref:t}):u.jsx(eu,{side:o,...i,ref:t})})}),eu=c.forwardRef((e,t)=>{const n=Ue(De,e.__scopeTooltip),r=Fn(De,e.__scopeTooltip),o=c.useRef(null),i=V(t,o),[s,a]=c.useState(null),{trigger:f,onClose:d}=n,l=o.current,{onPointerInTransitChange:p}=r,v=c.useCallback(()=>{a(null),p(!1)},[p]),h=c.useCallback((g,m)=>{const y=g.currentTarget,x={x:g.clientX,y:g.clientY},C=ou(x,y.getBoundingClientRect()),w=iu(x,C),b=su(m.getBoundingClientRect()),E=cu([...w,...b]);a(E),p(!0)},[p]);return c.useEffect(()=>()=>v(),[v]),c.useEffect(()=>{if(f&&l){const g=y=>h(y,l),m=y=>h(y,f);return f.addEventListener("pointerleave",g),l.addEventListener("pointerleave",m),()=>{f.removeEventListener("pointerleave",g),l.removeEventListener("pointerleave",m)}}},[f,l,h,v]),c.useEffect(()=>{if(s){const g=m=>{const y=m.target,x={x:m.clientX,y:m.clientY},C=f?.contains(y)||l?.contains(y),w=!au(x,s);C?v():w&&(v(),d())};return document.addEventListener("pointermove",g),()=>document.removeEventListener("pointermove",g)}},[f,l,s,d,v]),u.jsx(li,{...e,ref:i})}),[tu,nu]=Nt(Be,{isInside:!1}),ru=me.createSlottable("TooltipContent"),li=c.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:i,onPointerDownOutside:s,...a}=e,f=Ue(De,n),d=At(n),{onClose:l}=f;return c.useEffect(()=>(document.addEventListener(hn,l),()=>document.removeEventListener(hn,l)),[l]),c.useEffect(()=>{if(f.trigger){const p=v=>{v.target?.contains(f.trigger)&&l()};return window.addEventListener("scroll",p,{capture:!0}),()=>window.removeEventListener("scroll",p,{capture:!0})}},[f.trigger,l]),u.jsx(Et,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:p=>p.preventDefault(),onDismiss:l,children:u.jsxs(Gl,{"data-state":f.stateAttribute,...d,...a,ref:t,style:{...a.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[u.jsx(ru,{children:r}),u.jsx(tu,{scope:n,isInside:!0,children:u.jsx(Br,{id:f.contentId,role:"tooltip",children:o||r})})]})})});ci.displayName=De;var ui="TooltipArrow",di=c.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=At(n);return nu(ui,n).isInside?null:u.jsx(Yl,{...o,...r,ref:t})});di.displayName=ui;function ou(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(n,r,o,i)){case i:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function iu(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function su(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function au(e,t){const{x:n,y:r}=e;let o=!1;for(let i=0,s=t.length-1;i<t.length;s=i++){const a=t[i],f=t[s],d=a.x,l=a.y,p=f.x,v=f.y;l>r!=v>r&&n<(p-d)*(r-l)/(v-l)+d&&(o=!o)}return o}function cu(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),lu(t)}function lu(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const o=e[r];for(;t.length>=2;){const i=t[t.length-1],s=t[t.length-2];if((i.x-s.x)*(o.y-s.y)>=(i.y-s.y)*(o.x-s.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const i=n[n.length-1],s=n[n.length-2];if((i.x-s.x)*(o.y-s.y)>=(i.y-s.y)*(o.x-s.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var uu=oi,du=ii,fu=si,pu=ai,hu=ci,mu=di;function fi({delayDuration:e=0,...t}){return u.jsx(uu,{"data-slot":"tooltip-provider",delayDuration:e,...t})}function vu({...e}){return u.jsx(fi,{children:u.jsx(du,{"data-slot":"tooltip",...e})})}function gu({...e}){return u.jsx(fu,{"data-slot":"tooltip-trigger",...e})}function xu({className:e,sideOffset:t=0,children:n,...r}){return u.jsx(pu,{children:u.jsxs(hu,{"data-slot":"tooltip-content",sideOffset:t,className:A("bg-foreground text-background animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",e),...r,children:[n,u.jsx(mu,{className:"bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"})]})})}const yu="sidebar_state",wu=3600*24*7,bu="16rem",Cu="18rem",Eu="3rem",Su="b",pi=c.createContext(null);function Wn(){const e=c.useContext(pi);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}function Ru({defaultOpen:e=!0,open:t,onOpenChange:n,className:r,style:o,children:i,...s}){const a=Rc(),[f,d]=c.useState(!1),[l,p]=c.useState(e),v=t??l,h=c.useCallback(x=>{const C=typeof x=="function"?x(v):x;n?n(C):p(C),document.cookie=`${yu}=${C}; path=/; max-age=${wu}`},[n,v]),g=c.useCallback(()=>a?d(x=>!x):h(x=>!x),[a,h,d]);c.useEffect(()=>{const x=C=>{C.key===Su&&(C.metaKey||C.ctrlKey)&&(C.preventDefault(),g())};return window.addEventListener("keydown",x),()=>window.removeEventListener("keydown",x)},[g]);const m=v?"expanded":"collapsed",y=c.useMemo(()=>({state:m,open:v,setOpen:h,isMobile:a,openMobile:f,setOpenMobile:d,toggleSidebar:g}),[m,v,h,a,f,d,g]);return u.jsx(pi.Provider,{value:y,children:u.jsx(fi,{delayDuration:0,children:u.jsx("div",{"data-slot":"sidebar-wrapper",style:{"--sidebar-width":bu,"--sidebar-width-icon":Eu,...o},className:A("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex min-h-svh w-full",r),...s,children:i})})})}function Ou({side:e="left",variant:t="sidebar",collapsible:n="offcanvas",className:r,children:o,...i}){const{isMobile:s,state:a,openMobile:f,setOpenMobile:d}=Wn();return n==="none"?u.jsx("div",{"data-slot":"sidebar",className:A("bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col",r),...i,children:o}):s?u.jsx(Do,{open:f,onOpenChange:d,...i,children:u.jsxs(Io,{"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",style:{"--sidebar-width":Cu},side:e,children:[u.jsxs(Cc,{className:"sr-only",children:[u.jsx(Ec,{children:"Sidebar"}),u.jsx(Sc,{children:"Displays the mobile sidebar."})]}),u.jsx("div",{className:"flex h-full w-full flex-col",children:o})]})}):u.jsxs("div",{className:"group peer text-sidebar-foreground hidden md:block","data-state":a,"data-collapsible":a==="collapsed"?n:"","data-variant":t,"data-side":e,"data-slot":"sidebar",children:[u.jsx("div",{"data-slot":"sidebar-gap",className:A("relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",t==="floating"||t==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)")}),u.jsx("div",{"data-slot":"sidebar-container",className:A("fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex",e==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",t==="floating"||t==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l",r),...i,children:u.jsx("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"bg-sidebar group-data-[variant=floating]:border-sidebar-border flex h-full w-full flex-col group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:shadow-sm",children:o})})]})}function _u({className:e,onClick:t,...n}){const{toggleSidebar:r}=Wn();return u.jsxs(bt,{"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon",className:A("size-7",e),onClick:o=>{t?.(o),r()},...n,children:[u.jsx(gn.PanelLeftIcon,{}),u.jsx("span",{className:"sr-only",children:"Toggle Sidebar"})]})}function Tu({className:e,...t}){return u.jsx("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:A("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...t})}function Pu({className:e,...t}){return u.jsx("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:A("relative flex w-full min-w-0 flex-col p-2",e),...t})}function Nu({className:e,asChild:t=!1,...n}){const r=t?me.Slot:"div";return u.jsx(r,{"data-slot":"sidebar-group-label","data-sidebar":"group-label",className:A("text-sidebar-foreground/70 ring-sidebar-ring flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium outline-hidden transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",e),...n})}function Au({className:e,...t}){return u.jsx("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:A("w-full text-sm",e),...t})}function Mu({className:e,...t}){return u.jsx("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:A("flex w-full min-w-0 flex-col gap-1",e),...t})}function Du({className:e,...t}){return u.jsx("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:A("group/menu-item relative",e),...t})}const Iu=vn.cva("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-hidden ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:p-0!"}},defaultVariants:{variant:"default",size:"default"}});function ju({asChild:e=!1,isActive:t=!1,variant:n="default",size:r="default",tooltip:o,className:i,...s}){const a=e?me.Slot:"button",{isMobile:f,state:d}=Wn(),l=u.jsx(a,{"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":r,"data-active":t,className:A(Iu({variant:n,size:r}),i),...s});return o?(typeof o=="string"&&(o={children:o}),u.jsxs(vu,{children:[u.jsx(gu,{asChild:!0,children:l}),u.jsx(xu,{side:"right",align:"center",hidden:d!=="collapsed"||f,...o})]})):l}const Lu=({useSidebar:e=!1,useMainNav:t=!1,useFooter:n=!1,appName:r="App",navItems:o=[],footerProps:i,sidebarDefaultOpen:s=!0})=>e?u.jsx(Ru,{defaultOpen:s,children:u.jsxs("div",{className:"flex min-h-screen w-full",children:[u.jsx(Ou,{children:u.jsx(Tu,{children:u.jsxs(Pu,{children:[u.jsx(Nu,{className:"h-14",children:u.jsx("span",{className:"text-md font-medium",children:r})}),u.jsx(Au,{children:u.jsx(Mu,{children:o.map(a=>u.jsx(Du,{children:u.jsx(ju,{asChild:!0,children:u.jsxs(Lr,{to:a.url,children:[a.icon&&u.jsx("span",{className:"inline-flex h-5 w-5 shrink-0 items-center",children:u.jsx(a.icon,{className:"h-full w-full"})}),u.jsx("span",{className:"text-base font-medium",children:a.title})]})})},a.title))})})]})})}),u.jsxs("div",{className:"flex-1 flex flex-col",children:[u.jsxs("header",{className:"sticky top-0 z-10 flex items-center border-b bg-background px-4 h-14 gap-2",children:[u.jsx(_u,{}),t&&u.jsx(ln,{navItems:o})]}),u.jsx("main",{className:"flex-1 p-6",children:u.jsx(Qt,{})}),n&&i&&u.jsx("footer",{children:u.jsx(un,{...i})})]})]})}):u.jsxs("div",{className:"flex-1 flex min-h-screen flex-col",children:[t&&u.jsx(ln,{navItems:o}),u.jsx("main",{className:"flex-1 p-5",children:u.jsx(Qt,{})}),n&&i&&u.jsx("footer",{children:u.jsx(un,{...i})})]});exports.CustomButton=as;exports.Footer=un;exports.Link=Lr;exports.MainNav=ln;exports.MainSidebarLayout=Lu;exports.cn=A;
|
|
46
46
|
//# sourceMappingURL=index.js.map
|