PageSourceSearch

https://anidl.org/_next/static/chunks/18_pxwnz9ntsy.js

js anidl.org collected 2026-10-09 04:24:28 UTC 87,146 bytes, 13 lines download raw bytes

1;!function(){try { var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&((e._debugIds|| (e._debugIds={}))[n]="45069faf-42ce-abef-b104-23e647572536")}catch(e){}}();
2(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,909231,e=>{"use strict";var t=e.i(305910),r=e.i(200003),a=e.i(282371),n=e.i(1905),s=e.i(671428),i=e.i(965949),l=e.i(513438);let c=async()=>{try{let e=await fetch("/api/public/menu",{method:"GET",headers:{Accept:"application/json"},cache:"no-store"});if(!e.ok)throw Error(`HTTP ${e.status}: ${e.statusText}`);return await e.json()}catch(e){return console.error("Failed to fetch public menu items:",e),{items:[],tree:[],header:[],footer:[],sidebar:[]}}};e.s(["ClientFooter",0,function({menuTree:e,socialLinks:o=[]}){let[d,u]=(0,r.useState)(!1),[m,p]=(0,r.useState)(null);return((0,r.useEffect)(()=>{u(!0),p(window.location.hostname.trim()||null)},[]),d)?(0,t.jsx)(function(){let{data:r,isLoading:d}=(0,a.useQuery)({queryKey:["publicMenu"],queryFn:c,staleTime:0,gcTime:3e5,retry:1,refetchOnWindowFocus:!0,refetchOnReconnect:!0,enabled:!e}),u=e??r?.footer??[],p=m?`This site ${m}`:"This site";return(0,t.jsx)("footer",{className:"bg-background/90 supports-[backdrop-filter]:bg-background/70 dark:bg-background/60 dark:supports-[backdrop-filter]:bg-background/40 backdrop-blur-md backdrop-saturate-150 backdrop-contrast-125 shadow-sm pt-12 pb-32 md:py-12",children:(0,t.jsxs)("div",{className:"container mx-auto px-4",children:[(0,t.jsx)("div",{className:"flex justify-center mb-8",children:(0,t.jsx)(l.BannerSlot,{placement:"footer_banner",className:"w-full flex justify-center"})}),!e&&d?(0,t.jsx)("div",{className:"flex justify-center",children:(0,t.jsx)("div",{className:"grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 gap-8 max-w-5xl",children:Array.from({length:4}).map((e,r)=>(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(s.Skeleton,{className:"h-4 w-24"}),(0,t.jsx)(s.Skeleton,{className:"h-4 w-20"}),(0,t.jsx)(s.Skeleton,{className:"h-4 w-20"}),(0,t.jsx)(s.Skeleton,{className:"h-4 w-20"})]},r))})}):(0,t.jsx)("div",{className:"flex justify-center",children:(0,t.jsx)("div",{className:"grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 gap-8 max-w-5xl",children:u.map(e=>(0,t.jsx)("div",{className:"group",children:e.children&&e.children.length>0?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("h4",{className:"text-sm font-semibold mb-3 flex items-center gap-1 text-foreground/80 group-hover:text-foreground transition-colors duration-300",children:[e.icon&&(0,t.jsx)(i.DynamicIcon,{icon:e.icon,pack:e.pack,className:"h-4 w-4 mr-1"}),e.title]}),(0,t.jsx)("ul",{className:"space-y-2",children:e.children.map(e=>(0,t.jsx)("li",{children:e.href.startsWith("http")?(0,t.jsxs)("a",{href:e.href,target:e.target||"_self",rel:"_blank"===e.target?"noopener noreferrer":void 0,className:"text-sm text-foreground/80 hover:text-foreground transition-colors duration-300 flex items-center gap-1",children:[e.icon&&(0,t.jsx)(i.DynamicIcon,{icon:e.icon,pack:e.pack,className:"h-4 w-4 mr-1"}),e.title,e.description&&(0,t.jsx)("span",{className:"block text-xs text-muted-foreground",children:e.description})]}):(0,t.jsxs)(n.default,{href:e.href,className:"text-sm text-foreground/80 hover:text-foreground transition-colors duration-300 flex items-center gap-1",children:[e.icon&&(0,t.jsx)(i.DynamicIcon,{icon:e.icon,pack:e.pack,className:"h-4 w-4 mr-1"}),e.title,e.description&&(0,t.jsx)("span",{className:"block text-xs text-muted-foreground",children:e.description})]})},e.id))})]}):(0,t.jsxs)("a",{href:e.href,target:e.target||"_self",rel:"_blank"===e.target?"noopener noreferrer":void 0,className:"text-sm text-foreground/80 hover:text-foreground transition-colors duration-300 flex items-center gap-1",children:[e.icon&&(0,t.jsx)(i.DynamicIcon,{icon:e.icon,pack:e.pack,className:"h-4 w-4 mr-1"}),e.title,e.description&&(0,t.jsx)("span",{className:"block text-xs text-muted-foreground ml-1",children:e.description})]})},e.id))})}),(0,t.jsxs)("div",{className:"mt-12 text-center text-xs text-foreground
2/70",children:[(0,t.jsxs)("div",{className:"mb-2",children:["© ",new Date().getFullYear()," All rights reserved."]}),(0,t.jsxs)("div",{className:"max-w-2xl mx-auto space-y-1",children:[(0,t.jsxs)("p",{children:[(0,t.jsx)("strong",{children:"Disclaimer:"})," ",p," does not host any files on its servers. All files and content are hosted on non-affiliated third-party websites."]}),(0,t.jsxs)("p",{children:[p," does not accept responsibility for content hosted on third-party websites. We only index links that are already available on the internet."]})]})]}),o.length>0&&(0,t.jsx)("div",{className:"mt-6 flex justify-center gap-6",children:o.map(e=>(0,t.jsx)("a",{href:e.url,target:e.openInNewTab?"_blank":"_self",rel:e.openInNewTab?"noopener noreferrer":void 0,"aria-label":e.label,title:e.label,className:"text-foreground/80 hover:text-foreground transition-colors duration-300 transform hover:scale-110",children:(0,t.jsx)(i.DynamicIcon,{icon:e.iconName,pack:e.iconPack,className:"h-5 w-5"})},e.id))})]})})},{}):null}])},966716,e=>{"use strict";var t=e.i(305910),r=e.i(438641),a=e.i(200003),n=e.i(1905),s=e.i(422687),i=e.i(407197),l=e.i(30593),c=e.i(260258),o=e.i(543826),d=e.i(81234);let u={path:null,lastUpdated:null},m=(0,o.create)()((0,d.persist)((e,t)=>({banner:{...u},ensureBanner:r=>{let a=t().banner,n=Date.now();if(!r.length){null!==a.path&&e({banner:{...u}});return}let s=null!==a.path&&r.includes(a.path),i=!a.lastUpdated||n-a.lastUpdated>864e5;if(!s||i){let t=Math.floor(Math.random()*r.length);e({banner:{path:r[t],lastUpdated:n}})}}}),{name:"banner-storage",version:2,partialize:({banner:e})=>({banner:e}),migrate:()=>({banner:{...u}})}));var p=e.i(965949),h=e.i(518071);function x(){let e,n,s,i,l,c,o=(0,r.c)(14),{theme:d,setTheme:u}=(0,h.useTheme)(),[m,x]=(0,a.useState)(!1);o[0]===Symbol.for("react.memo_cache_sentinel")?(e=()=>{x(!0)},n=[],o[0]=e,o[1]=n):(e=o[0],n=o[1]),(0,a.useEffect)(e,n),o[2]!==u||o[3]!==d?(s=()=>{u("dark"===d?"light":"dark")},o[2]=u,o[3]=d,o[4]=s):s=o[4];let f=s;if(!m){let e;return o[5]===Symbol.for("react.memo_cache_sentinel")?(e=(0,t.jsx)("button",{className:"w-10 h-10 rounded-full flex items-center justify-center bg-gray-100 dark:bg-gray-800","aria-label":"Toggle theme",children:(0,t.jsx)("div",{className:"w-5 h-5"})}),o[5]=e):e=o[5],e}o[6]!==d?(i="dark"===d?(0,t.jsx)(p.DynamicIcon,{icon:"LuMoon",className:"h-5 w-5 text-indigo-400"}):(0,t.jsx)(p.DynamicIcon,{icon:"LuSun",className:"h-5 w-5 text-amber-500"}),o[6]=d,o[7]=i):i=o[7];let b="dark"===d?"Switch to light mode":"Switch to dark mode";return o[8]!==b?(l=(0,t.jsx)("span",{className:"sr-only",children:b}),o[8]=b,o[9]=l):l=o[9],o[10]!==i||o[11]!==l||o[12]!==f?(c=(0,t.jsxs)("button",{onClick:f,className:"relative w-10 h-10 rounded-full flex items-center justify-center bg-gray-100 hover:bg-gray-200 dark:bg-gray-800 dark:hover:bg-gray-700 transition-colors duration-200 cursor-pointer","aria-label":"Toggle theme",children:[i,l]}),o[10]=i,o[11]=l,o[12]=f,o[13]=c):c=o[13],c}var f=e.i(167881),b=e.i(463415),g=e.i(63270),j=e.i(852917),v=e.i(647163),y=e.i(71344);function w(e,t){let r=t.getBoundingClientRect(),a=e.touches[0].clientX-r.left,n=e.touches[0].clientY-r.top,s=document.createElement("span");s.style.cssText=`
3    position:absolute;
4    border-radius:50%;
5    background:color-mix(in srgb, var(--public-accent), transparent 78%);
6    width:40px;height:40px;
7    left:${a}px;top:${n}px;
8    margin:-20px 0 0 -20px;
9    pointer-events:none;
10    animation:glazeRipple 0.45s ease-out forwards;
11  `,t.appendChild(s),setTimeout(()=>s.remove(),450)}function N({open:e,onOpenChange:n,activeFolderId:i,setActiveFolderId:l,isTablet:c,showHeaderSearch:o,showMobileSocialLinks:d,mobileSocialLinks:u,onOpenSearch:m,onNavigate:x,unifiedMenuTree:b,isLoggedIn:g,profileHref:w,onSignOut:k,settings:D}){var C,T;let I,M,L,A,E,O,R,P,U,$,H,F,{theme:z,setTheme:B}=(0,h.useTheme)(),{titleDisplayMode:q,setTitleDisplayMode:K}=(0,y.useTitleDisplayStore)(),{sheetRef:Y,onTouchStart:Q,onTouchMove:V,onTouchEnd:X}=(C=()=>n(!1),T=!c,E=(0,r.c)(11),O=(0,a.useRef)(null),R=(0,a.useRef)(null),P=(0,a.useRef)(!1),U=(0,a.useRef)(null),E[0]!==T?(I=e=>{T&&(O.current=e.touches[0].clientY,R.current=e.touches[0].clientX,P.current=!1)},E[0]=T,E[1]=I):I=E[1],$=I,E[2]!==T?(M=e=>{if(!T||null===O.current||null===R.current)return;let t=e.touches[0].clientY-O.current;if(Math.abs(e.touches[0].clientX-R.current)>10&&!P.current){O.current=null;return}if(t>8&&(P.current=!0,U.current)){let e=Math.min(t,180);U.current.style.transform=`translateY(${e}px)`,U.current.style.transition="none",U.current.style.opacity=`${1-e/300}`}},E[2]=T,E[3]=M):M=E[3],H=M,E[4]!==T||E[5]!==C?(L=e=>{if(!T||null===O.current)return;let t=e.changedTouches[0].clientY-O.current;U.current&&(U.current.style.transition="transform 0.3s cubic-bezier(0.32,0.72,0,1), opacity 0.3s ease",t>80?(U.current.style.transform="translateY(100%)",U.current.style.opacity="0",setTimeout(C,280)):(U.current.style.transform="translateY(0)",U.current.style.opacity="1")),O.current=null,P.current=!1},E[4]=T,E[5]=C,E[6]=L):L=E[6],F=L,E[7]!==F||E[8]!==H||E[9]!==$?(A={sheetRef:U,onTouchStart:$,onTouchMove:H,onTouchEnd:F},E[7]=F,E[8]=H,E[9]=$,E[10]=A):A=E[10],A),G=(0,a.useMemo)(()=>
11{if(!i)return null;let e=(t,r)=>{for(let a of t){if(a.id===r)return a;if(a.children&&a.children.length>0){let t=e(a.children,r);if(t)return t}}return null};return e(b,i)},[i,b]),W=(0,a.useMemo)(()=>(G?G.children||[]:b).filter(e=>-1!==e.id&&!e.isPinned&&(c?!1!==e.showOnTablet:!1!==e.showOnMobile)),[G,b,c]),J=(0,a.useMemo)(()=>W.reduce((e,t)=>{let r=t.category||"Explore";return e[r]||(e[r]=[]),e[r].push(t),e},{}),[W]),Z=(0,a.useMemo)(()=>Object.keys(J).sort((e,t)=>"Explore"===e?1:"Explore"===t?-1:e.localeCompare(t)),[J]);return(0,t.jsxs)(j.Sheet,{open:e,onOpenChange:n,children:[c&&(0,t.jsx)(j.SheetTrigger,{asChild:!0,children:(0,t.jsx)(f.Button,{variant:"ghost",size:"icon","aria-label":"Toggle menu",className:"h-10 w-10 rounded-full",children:e?(0,t.jsx)(p.DynamicIcon,{icon:"LuX",className:"h-5 w-5"}):(0,t.jsx)(p.DynamicIcon,{icon:"LuMenu",className:"h-5 w-5"})})}),(0,t.jsxs)(j.SheetContent,{side:c?"right":"bottom",className:(0,v.cn)("p-0 flex flex-col overflow-hidden border-0",c?"w-[85vw] sm:w-[340px] z-[100] bg-public-surface/95 backdrop-blur-3xl saturate-150 border-l border-public-border/60 shadow-2xl":"w-full h-auto max-h-[75vh] fixed bottom-0 left-0 right-0 z-[100] rounded-t-[28px] bg-public-surface/95 backdrop-blur-3xl saturate-150 border-t border-public-border/60 shadow-2xl"),children:[(0,t.jsx)(j.SheetTitle,{className:"sr-only",children:G?G.title:c?"Navigation":"Menu"}),(0,t.jsxs)("div",{ref:Y,className:"flex flex-col h-full overflow-hidden",onTouchStart:Q,onTouchMove:V,onTouchEnd:X,children:[!c&&(0,t.jsx)("div",{className:"w-9 h-1 bg-public-border/70 rounded-full mx-auto mt-2.5 mb-1.5 shrink-0 cursor-grab"}),G?(0,t.jsxs)("div",{className:"flex items-center gap-3 px-5 pt-2.5 pb-2 animate-in slide-in-from-left-4 duration-300",children:[(0,t.jsx)("button",{className:"h-9 w-9 flex items-center justify-center shrink-0 rounded-full bg-public-surface-muted/80 border border-public-border shadow-md active:scale-90 active:bg-public-surface-raised transition-all duration-150 touch-manipulation tap-highlight-transparent",onClick:()=>{let e=G?.parentId??null;null===e&&G?.isPinned?(n(!1),setTimeout(()=>l(null),300)):l(e)},children:(0,t.jsx)(p.DynamicIcon,{icon:"LuChevronLeft",className:"h-4 w-4 text-public-muted"})}),(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"text-[18px] font-extrabold tracking-tight text-public-foreground leading-tight",children:G.title}),(0,t.jsx)("div",{className:"text-[9px] font-bold tracking-[0.14em] uppercase text-public-accent mt-0.5",children:"Navigation Folder"})]})]}):c?(0,t.jsxs)("div",{className:"flex items-center gap-3 px-4 py-2.5 border-b border-public-border/60",children:[(0,t.jsx)(s.default,{src:"/icons.png",alt:"Logo",width:36,height:36,className:"rounded-xl"}),(0,t.jsx)("span",{className:"text-[17px] font-extrabold tracking-tight text-public-foreground",children:D?.siteName||"AniDL"})]}):null,(0,t.jsxs)("div",{className:"flex-1 overflow-y-auto overscroll-contain px-4 pt-3 space-y-5 pb-[max(24px,env(safe-area-inset-bottom))] [scrollbar-width:thin] [scrollbar-color:var(--public-border)_transparent] [-webkit-overflow-scrolling:touch]",onTouchStart:e=>e.stopPropagation(),onTouchMove:e=>e.stopPropagation(),onTouchEnd:e=>e.stopPropagation(),children:[!G&&(0,t.jsxs)("div",{className:"space-y-2.5",children:[(0,t.jsx)("p",{className:"text-[9.5px] font-bold tracking-[0.13em] uppercase text-public-muted pl-1",children:"Menus"}),(0,t.jsxs)("div",{className:"grid grid-cols-4 sm:grid-cols-5 gap-x-2 gap-y-3",children:[(0,t.jsx)(_,{href:"/",label:"Home",onClick:x,children:(0,t.jsx)(p.DynamicIcon,{icon:"LuHouse",className:"h-5 w-5 text-public-foreground/75"})}),o&&(0,t.jsx)(_,{label:"Search",onClick:()=>{n(!1),m()},children:(0,t.jsx)(p.DynamicIcon,{icon:"LuSearch",className:"h-5 w-5 text-public-foreground/75"})}),(0,t.jsx)(_,{label:"english"===q?"EN":"JP",active:!0,onClick:()=>K("english"===q?"romaji":"english"),children:(0,t.jsx)(p.DynamicIcon,{icon:"LuLanguages",className:"h-5 w-5 text-public-foreground/75"})}),(0,t.jsx)(_,{label:"dark"===z?"Dark":"Light",onClick:()=>B("dark"===z?"light":"dark"),children:"dark"===z?(0,t.jsx)(p.DynamicIcon,{icon:"LuMoon",className:"h-5 w-5 text-public-foreground
11/75"}):(0,t.jsx)(p.DynamicIcon,{icon:"LuSun",className:"h-5 w-5 text-public-foreground/75"})}),w&&(0,t.jsx)(_,{href:w,label:"Profile",onClick:x,children:(0,t.jsx)(p.DynamicIcon,{icon:"LuCircleUserRound",className:"h-5 w-5 text-public-foreground/75"})}),g?(0,t.jsx)(_,{label:"Logout",onClick:k,danger:!0,children:(0,t.jsx)(p.DynamicIcon,{icon:"LuLogOut",className:"h-5 w-5 text-public-danger"})}):(0,t.jsx)(_,{href:"/sign-in",label:"Login",onClick:x,children:(0,t.jsx)(p.DynamicIcon,{icon:"LuLogIn",className:"h-5 w-5 text-public-foreground/75"})})]})]}),!G&&d&&u.length>0&&(0,t.jsxs)("div",{className:"space-y-2.5",children:[(0,t.jsx)("p",{className:"text-[9.5px] font-bold tracking-[0.13em] uppercase text-public-muted pl-1",children:"Follow Us"}),(0,t.jsx)("div",{className:"grid grid-cols-4 sm:grid-cols-5 gap-x-2 gap-y-3",children:u.map(e=>(0,t.jsx)(_,{href:e.url,openInNewTab:e.openInNewTab,label:e.label,onClick:()=>n(!1),children:(0,t.jsx)(p.DynamicIcon,{icon:e.iconName,pack:e.iconPack||void 0,className:"h-5 w-5 text-public-foreground/75"})},`mobile-social-${e.id}`))})]}),!G&&Z.length>0&&(0,t.jsx)("div",{className:"h-px mx-2 bg-gradient-to-r from-transparent via-public-border/60 to-transparent"}),Z.map((e,r)=>(0,t.jsxs)("div",{className:"space-y-2.5",children:[r>0&&(0,t.jsx)("div",{className:"h-px mx-2 bg-gradient-to-r from-transparent via-public-border/60 to-transparent"}),(0,t.jsx)("p",{className:"text-[9.5px] font-bold tracking-[0.13em] uppercase text-public-muted pl-1",children:e}),(0,t.jsx)("div",{className:"grid grid-cols-4 sm:grid-cols-5 gap-x-2 gap-y-3",children:J[e].map(e=>(0,t.jsx)(S,{item:e,onNavigate:x,onOpenFolder:l},e.id))})]},e))]})]})]})]})}let k="p-3 flex items-center justify-center rounded-[18px] bg-public-surface-muted/70 border border-public-border/70 shadow-md transition-all duration-150 hover:bg-public-surface-raised hover:border-public-accent/50 hover:shadow-lg active:scale-[0.88] active:bg-public-surface-raised active:border-public-accent/70 relative overflow-hidden touch-manipulation [&.touch-active]:scale-[0.88] [&.touch-active]:bg-public-surface-raised";function _(e){let s,i,l,c,o,d,u,m,p=(0,r.c)(25),{href:h,openInNewTab:x,label:f,onClick:b,danger:g,active:j,children:y}=e,N=(0,a.useRef)(null);p[0]===Symbol.for("react.memo_cache_sentinel")?(s=e=>{N.current&&(N.current.classList.add("touch-active"),w(e,N.current))},p[0]=s):s=p[0];let _=s;p[1]===Symbol.for("react.memo_cache_sentinel")?(i=()=>{setTimeout(()=>N.current?.classList.remove("touch-active"),150)},p[1]=i):i=p[1];let S=i,D=g?"p-3 flex items-center justify-center rounded-[18px] bg-public-surface-muted/70 border border-public-border/70 shadow-md transition-all duration-150 hover:bg-public-danger/10 hover:border-public-danger/40 active:scale-[0.88] active:bg-public-danger/20 active:border-public-danger/50 relative overflow-hidden touch-manipulation":k,C=j&&!g&&"bg-[color-mix(in_srgb,var(--public-accent),transparent_80%)] border-public-accent/50 shadow-lg";p[2]!==D||p[3]!==C?(l=(0,v.cn)(D,C),p[2]=D,p[3]=C,p[4]=l):l=p[4],p[5]!==y||p[6]!==l?(c=(0,t.jsx)("div",{ref:N,className:l,onTouchStart:_,onTouchEnd:S,children:y}),p[5]=y,p[6]=l,p[7]=c):c=p[7];let T=g?"text-public-danger":j?"text-public-accent":"text-public-muted";p[8]!==T?(o=(0,v.cn)("text-[9.5px] font-semibold text-center leading-snug truncate w-full px-0.5",T),p[8]=T,p[9]=o):o=p[9],p[10]!==f||p[11]!==o?(d=(0,t.jsx)("span",{className:o,children:f}),p[10]=f,p[11]=o,p[12]=d):d=p[12],p[13]!==c||p[14]!==d?(u=(0,t.jsxs)(t.Fragment,{children:[c,d]}),p[13]=c,p[14]=d,p[15]=u):u=p[15];let I=u;if(h){let e,r=x?"_blank":void 0,a=x?"noopener noreferrer":void 0;return p[16]!==h||p[17]!==I||p[18]!==b||p[19]!==r||p[20]!==a?(e=(0,t.jsx)(n.default,{href:h,onClick:b,target:r,rel:a,className:"relative flex flex-col items-center gap-1.5 p-1 touch-manipulation [-webkit-tap-highlight-color:transparent] before:absolute before:inset-[-8px] before:rounded-3xl",children:I}),p[16]=h,p[17]=I,p[18]=b,p[19]=r,p[20]=a,p[21]=e):e=p[21],e}return p[22]!==I||p[23]!==b?(m=(0,t.jsx)("button",{onClick:b,className:"relative flex flex-col items-center gap-1.5 p-1 touch-manipulation [-webkit-tap-highlight-color:transparent] before:absolute before:inset-[-8px] before:rounded-3xl",children:I}),p[22]=I,p[23]=b,p[24]=m):m=p[24],m}function S(e){let s,i,l,c,o,d,u,m,h=(0,r.c)(26),{item:x,onNavigate:f,onOpenFolder:b}=e,g=x.children&&x.children.length>0,j=(0,a.useRef)(null);h[0]===Symbol.for("react.memo_cache_sentinel")?(s=e=>{j.current&&(j.current.classList.add("touch-active"),w(e,j.current))},h[0]=s):s=h[0];let v=s;h[1]===Symbol.for("react.memo_cache_sentinel")?(i=()=>{setTimeout(()=>j.current?.classList.remove("touch-active"),150)},h[1]=i):i=h[1];let y=i,N=x.pack||void 0;h[2]!==x.icon||h[3]!==N?(l=(0,t.jsx)(p.DynamicIcon,{icon:x.icon,pack:N,className:"h-5 w-5 text-public-foreground
11/75"}),h[2]=x.icon,h[3]=N,h[4]=l):l=h[4],h[5]!==g?(c=g&&(0,t.jsx)("span",{className:"absolute top-1.5 right-1.5 h-1.5 w-1.5 rounded-full bg-public-accent border border-public-surface shadow-sm"}),h[5]=g,h[6]=c):c=h[6],h[7]!==l||h[8]!==c?(o=(0,t.jsxs)("div",{ref:j,className:k,onTouchStart:v,onTouchEnd:y,children:[l,c]}),h[7]=l,h[8]=c,h[9]=o):o=h[9];let _=o;if(!g){let e,r;return h[10]!==x.title?(e=(0,t.jsx)("span",{className:"text-[9.5px] font-semibold text-center leading-snug truncate w-full px-0.5 text-public-muted",children:x.title}),h[10]=x.title,h[11]=e):e=h[11],h[12]!==_||h[13]!==x.href||h[14]!==f||h[15]!==e?(r=(0,t.jsxs)(n.default,{href:x.href,onClick:f,className:"relative flex flex-col items-center gap-1.5 p-1 touch-manipulation [-webkit-tap-highlight-color:transparent] before:absolute before:inset-[-8px] before:rounded-3xl",children:[_,e]}),h[12]=_,h[13]=x.href,h[14]=f,h[15]=e,h[16]=r):r=h[16],r}return h[17]!==x.id||h[18]!==b?(d=()=>b(x.id),h[17]=x.id,h[18]=b,h[19]=d):d=h[19],h[20]!==x.title?(u=(0,t.jsx)("span",{className:"text-[9.5px] font-semibold text-center leading-snug truncate w-full px-0.5 text-public-muted",children:x.title}),h[20]=x.title,h[21]=u):u=h[21],h[22]!==_||h[23]!==d||h[24]!==u?(m=(0,t.jsxs)("button",{onClick:d,className:"relative flex flex-col items-center gap-1.5 p-1 touch-manipulation [-webkit-tap-highlight-color:transparent] before:absolute before:inset-[-8px] before:rounded-3xl",children:[_,u]}),h[22]=_,h[23]=d,h[24]=u,h[25]=m):m=h[25],m}function D(e){let a,s,l,c,o,d,u,m,h,x,f,b,g,j,y,w,N=(0,r.c)(53),{items:k,onOpenSearch:_,onOpenMore:S,activeFolderId:D,isSearchOpen:T,isMoreOpen:I,showHeaderSearch:M}=e,L=(0,i.usePathname)(),A=M?4:5;if(N[0]!==D||N[1]!==I||N[2]!==k||N[3]!==A||N[4]!==S||N[5]!==L){let e,r=k.filter(C).slice(0,A);c="fixed bottom-0 left-0 right-0 z-50 pb-safe",l="bg-background/95 backdrop-blur-lg border-t border-border/40 shadow-[0_-4px_24px_rgba(0,0,0,0.1)] dark:shadow-[0_-5px_30px_rgba(0,0,0,0.4)] transition-all duration-300",a="flex items-center justify-around w-full h-16 px-1",N[10]!==D||N[11]!==I||N[12]!==S||N[13]!==L?(e=e=>{let r=e.children&&e.children.length>0,a=I?D===e.id:L===e.href||L.startsWith(e.href+"/"),s=(0,t.jsxs)("div",{className:(0,v.cn)("relative flex flex-col items-center justify-center rounded-2xl w-full h-[52px] transition-all duration-300",a?"bg-primary/10 text-primary dark:bg-primary/20":"text-muted-foreground hover:bg-muted/40 hover:text-foreground"),children:[(0,t.jsx)(p.DynamicIcon,{icon:e.icon,pack:e.pack||void 0,className:(0,v.cn)("h-5 w-5 mb-1 transition-all",a?"scale-110 drop-shadow-[0_2px_8px_color-mix(in_srgb,var(--primary),transparent_50%)]":"scale-100 opacity-80")}),(0,t.jsx)("span",{className:(0,v.cn)("text-[10px] font-semibold tracking-wide transition-all",a?"opacity-100":"opacity-70 font-medium"),children:e.title}),r&&!a&&(0,t.jsx)("div",{className:"absolute top-2 right-2 h-1 w-1 rounded-full bg-primary/40 shrink-0"})]});return r?(0,t.jsx)("button",{onClick:()=>S(e.id),className:"flex-1 flex flex-col items-center justify-center p-1 group h-full",children:s},e.id):(0,t.jsx)(n.default,{href:e.href,className:"flex-1 flex flex-col items-center justify-center p-1 group h-full",children:s},e.id)},N[10]=D,N[11]=I,N[12]=S,N[13]=L,N[14]=e):e=N[14],s=r.map(e),N[0]=D,N[1]=I,N[2]=k,N[3]=A,N[4]=S,N[5]=L,N[6]=a,N[7]=s,N[8]=l,N[9]=c}else a=N[6],s=N[7],l=N[8],c=N[9];N[15]!==T||N[16]!==_||N[17]!==M?(o=M&&(0,t.jsx)("button",{onClick:_,className:"flex-1 flex flex-col items-center justify-center p-1 group h-full",children:(0,t.jsxs)("div",{className:(0,v.cn)("flex flex-col items-center justify-center rounded-2xl w-full h-[52px] transition-all duration-300",T?"bg-primary/10 text-primary dark:bg-primary/20":"text-muted-foreground hover:bg-muted/40 hover:text-foreground"),children:[(0,t.jsx)(p.DynamicIcon,{icon:"LuSearch",className:(0,v.cn)("h-5 w-5 mb-1 transition-all",T?"scale-110 drop-shadow-[0_2px_8px_color-mix(in_srgb,var(--primary),transparent_50%)]":"scale-100 opacity-80")}),(0,t.jsx)("span",{className:(0,v.cn)("text-[10px] font-semibold tracking-wide transition-all",T?"opacity-100":"opacity-70 font-medium"),children:"Search"})]})}),N[15]=T,N[16]=_,N[17]=M,N[18]=o):o=N[18],N[19]!==S?(d=()=>S(),N[19]=S,N[20]=d):d=N[20];let E=I&&null===D?"bg-primary/20 text-primary dark:bg-primary/30":"text-muted-foreground hover:bg-muted/40 hover:text-foreground";N[21]!==E?(u=(0,v.cn)("relative flex flex-col items-center justify-center rounded-2xl w-full h-[52px] transition-all duration-300 overflow-hidden",E),N[21]=E,N[22]=u):u=N[22],N[23]!==D||N[24]!==I?(m=I&&null===D?(0,t.jsx)(p.DynamicIcon,{icon:"LuX",className:"h-6 w-6 mb-1 scale-110 animate-in fade-in zoom-in duration-300 drop-shadow-[0_0_8px_color-mix(in_srgb,var(--primary),transparent_40%)]"}):(0,t.jsx)(p.DynamicIcon,{icon:"LuGrid2X2",className:"h-5 w-5 mb-1 scale-100 opacity-80 group-hover:opacity-100 transition-all duration-300"}),N[23]=D,N[24]=I,N[25]=m):m=N[25];
11let O=I&&null===D?"opacity-100 scale-105":"opacity-70 font-semibold";N[26]!==O?(h=(0,v.cn)("text-[10px] font-bold tracking-tight transition-all",O),N[26]=O,N[27]=h):h=N[27];let R=I&&null===D?"Close":"More";return N[28]!==h||N[29]!==R?(x=(0,t.jsx)("span",{className:h,children:R}),N[28]=h,N[29]=R,N[30]=x):x=N[30],N[31]!==D||N[32]!==I?(f=I&&null===D&&(0,t.jsx)("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 w-8 h-1 bg-primary rounded-b-full shadow-[0_2px_8px_color-mix(in_srgb,var(--primary),transparent_60%)]"}),N[31]=D,N[32]=I,N[33]=f):f=N[33],N[34]!==x||N[35]!==f||N[36]!==u||N[37]!==m?(b=(0,t.jsxs)("div",{className:u,children:[m,x,f]}),N[34]=x,N[35]=f,N[36]=u,N[37]=m,N[38]=b):b=N[38],N[39]!==b||N[40]!==d?(g=(0,t.jsx)("button",{onClick:d,className:"flex-1 flex flex-col items-center justify-center p-1 group h-full",children:b}),N[39]=b,N[40]=d,N[41]=g):g=N[41],N[42]!==a||N[43]!==g||N[44]!==s||N[45]!==o?(j=(0,t.jsxs)("div",{className:a,children:[s,o,g]}),N[42]=a,N[43]=g,N[44]=s,N[45]=o,N[46]=j):j=N[46],N[47]!==j||N[48]!==l?(y=(0,t.jsx)("div",{className:l,children:j}),N[47]=j,N[48]=l,N[49]=y):y=N[49],N[50]!==y||N[51]!==c?(w=(0,t.jsx)("div",{className:c,children:y}),N[50]=y,N[51]=c,N[52]=w):w=N[52],w}function C(e){return -1!==e.id&&e.isPinned&&!1!==e.showOnMobile}let T=(e,r="h-4 w-4 mr-3 flex-shrink-0")=>e.icon?(0,t.jsx)(p.DynamicIcon,{icon:e.icon,pack:e.pack,className:r,fallback:(0,t.jsx)("span",{className:"text-[10px] font-bold opacity-50 mr-2 uppercase",children:e.title?.[0]||"•"})}):null;function I(e){let t,n,s,i,l,c=(0,r.c)(8),o=void 0===e?150:e,[d,u]=(0,a.useState)(!1),m=(0,a.useRef)(null);c[0]===Symbol.for("react.memo_cache_sentinel")?(t=()=>{m.current&&(clearTimeout(m.current),m.current=null),u(!0)},c[0]=t):t=c[0];let p=t;c[1]!==o?(n=()=>{m.current&&clearTimeout(m.current),m.current=setTimeout(()=>{u(!1)},o)},c[1]=o,c[2]=n):n=c[2];let h=n;return c[3]===Symbol.for("react.memo_cache_sentinel")?(s=()=>()=>{m.current&&clearTimeout(m.current)},i=[],c[3]=s,c[4]=i):(s=c[3],i=c[4]),(0,a.useEffect)(s,i),c[5]!==h||c[6]!==d?(l={isOpen:d,handleMouseEnter:p,handleMouseLeave:h},c[5]=h,c[6]=d,c[7]=l):l=c[7],l}function M(e){let a,s,i,l=(0,r.c)(27),{item:c}=e,{isOpen:o,handleMouseEnter:d,handleMouseLeave:u}=I(),m=c.children&&c.children.length>0,h=!1!==c.showAsDropdown&&m,x=c.href&&"#"!==c.href;if(!h){let e,r,a,s,i,o=c.href,d=c.target||"_self";return l[0]!==c?(e=T(c),l[0]=c,l[1]=e):e=l[1],l[2]!==c.title?(r=(0,t.jsx)("span",{className:"font-medium text-sm",children:c.title}),l[2]=c.title,l[3]=r):r=l[3],l[4]!==c.description?(a=c.description&&(0,t.jsx)("span",{className:"text-xs text-muted-foreground mt-0.5 line-clamp-1",children:c.description}),l[4]=c.description,l[5]=a):a=l[5],l[6]!==r||l[7]!==a?(s=(0,t.jsxs)("div",{className:"flex flex-col",children:[r,a]}),l[6]=r,l[7]=a,l[8]=s):s=l[8],l[9]!==c.href||l[10]!==d||l[11]!==e||l[12]!==s?(i=(0,t.jsx)("div",{className:"px-3 py-2 hover:bg-[color-mix(in_srgb,var(--public-interaction-highlight,var(--accent)),transparent_60%)] rounded-md cursor-pointer",children:(0,t.jsxs)(n.default,{href:o,target:d,className:"flex items-center w-full",children:[e,s]})}),l[9]=c.href,l[10]=d,l[11]=e,l[12]=s,l[13]=i):i=l[13],i}return l[14]!==x||l[15]!==c?(a=x?(0,t.jsx)("div",{className:"px-3 py-2 hover:bg-[color-mix(in_srgb,var(--public-interaction-highlight,var(--accent)),transparent_60%)] rounded-md cursor-pointer",children:(0,t.jsxs)(n.default,{href:c.href,target:c.target||"_self",className:"flex items-center w-full",children:[T(c),(0,t.jsxs)("div",{className:"flex flex-col flex-1",children:[(0,t.jsx)("span",{className:"font-medium text-sm",children:c.title}),c.description&&(0,t.jsx)("span",{className:"text-xs text-muted-foreground mt-0.5 line-clamp-1",children:c.description})]}),(0,t.jsx)("span",{className:"ml-auto text-muted-foreground",children:"›"})]})}):(0,t.jsxs)("div",{className:"px-3 py-2 hover:bg-[color-mix(in_srgb,var(--public-interaction-highlight,var(--accent)),transparent_60%)] rounded-md cursor-pointer flex items-center",children:[T(c),(0,t.jsxs)("div",{className:"flex flex-col flex-1",children:[(0,t.jsx)("span",{className:"font-medium text-sm",children:c.title}),c.description&&(0,t.jsx)("span",{className:"text-xs text-muted-foreground mt-0.5 line-clamp-1",children:c.description})]}),(0,t.jsx)(p.DynamicIcon,{icon:"LuChevronDown",className:"h-4 w-4 ml-auto text-muted-foreground"})]}),l[14]=x,l[15]=c,l[16]=a):a=l[16],l[17]!==d||l[18]!==u||l[19]!==o||l[20]!==c.children?(s=o&&(0,t.jsx)("div",{className:"absolute left-full top-0 ml-1 w-72 bg-popover border rounded-md shadow-lg z-50 p-2",onMouseEnter:d,onMouseLeave:u,children:c.children.map(L)}),l[17]=d,l[18]=u,l[19]=o,l[20]=c.children,l[21]=s):s=l[21],l[22]!==d||l[23]!==u||l[24]!==a||l[25]!==s?(i=(0,t.jsxs)("div",{className:"relative",onMouseEnter:d,onMouseLeave:u,children:[a,s]}),l[22]=d,l[23]=u,l[24]=a,l[25]=s,l[26]=i):i=l[26],i}function L(e){return(0,t.jsx)(M,{item:e},e.id)}function A(e){let a,s,i,l,c,o,d,u=(0,r.c)(49),{item:m,className:h}=e,x=m.children&&m.children.length>0,g=!1!==m.showAsDropdown&&x,j=m.href&&"#"!==m.href,{isOpen:v,handleMouseEnter:y,handleMouseLeave:w}=I();if(!g){let e,r,a,s,i=`flex items-center gap-2 px-4 py-2 rounded-lg hover:bg-[color-mix(in_srgb,var(--public-interaction-highlight,var(--accent)),transparent_50%)] hover:!text-public-foreground transition-colors ${h}`,l=m.href,c=m.target||"_self";return u[0]!==m?(e=T(m,"h-4 w-4"),u[0]=m,u[1]=e):e=u[1],u[2]!==m.title?(r=(0,t.jsx)("span",{className:"font-medium",children:m.title}),u[2]=m.title,u[3]=r):r=u[3],u[4]!==m.href||u[5]!==c||u[6]!==e||u[7]!==r?(a=(0,t.jsxs)(n.default,{href:l,target:c,children:[e,r]}),u[4]=m.href,u[5]=c,u[6]=e,u[7]=r,u[8]=a):a=u[8],u[9]!==i||u[10]!==a?(s=(0,t.jsx)(f.Button,{variant:"ghost",asChild:!0,className:i,children:a}),u[9]=i,u[10]=a,u[11]=s):s=u[11],s}if(j){let e,r,a,s,i,l,c=`relative ${h}`,o=m.href,d=m.target||"_self";return u[12]!==m?(e=T(m,"h-4 w-4"),u[12]=m,u[13]=e):e=u[13],u[14]!==m.title?(r=(0,t.jsx)("span",{className:"font-medium",children:m.title}),u[14]=m.title,u[15]=r):r=u[15],u[16]===Symbol.for("react.memo_cache_sentinel")?(a=(0,t.jsx)(p.DynamicIcon,{icon:"LuChevronDown",className:"h-4 w-4 ml-1"}),u[16]=a):a=u[16],u[17]!==m.href||u[18]!==d||u[19]!==e||u[20]!==r?(s=(0,t.jsx)(f.Button,{variant:"ghost",asChild:!0,className:"flex items-center gap-2 px-4 py-2 rounded-lg hover:bg-[color-mix(in_srgb,var(--public-interaction-highlight,var(--accent)),transparent_50%)] hover:!text-public-foreground transition-colors",children:(0,t.jsxs)(n.default,{href:o,target:d,children:[e,r,a]})}),u[17]=m.href,u[18]=d,u[19]=e,u[20]=r,u[21]=s):s=u[21],u[22]!==y||u[23]!==w||u[24]!==v||u[25]!==m.children?(i=v&&(0,t.jsx)("div",{className:"absolute left-0 top-full mt-2 w-72 bg-popover border rounded-md shadow-lg z-50 p-2",onMouseEnter:y,onMouseLeave:w,children:m.children.map(O)}),u[22]=y,u[23]=w,u[24]=v,u[25]=m.children,u[26]=i):i=u[26],u[27]!==y||u[28]!==w||u[29]!==c||u[30]!==s||u[31]!==i?(l=(0,t.jsxs)("div",{className:c,onMouseEnter:y,onMouseLeave:w,children:[s,i]}),u[27]=y,u[28]=w,u[29]=c,u[30]=s,u[31]=i,u[32]=l):l=u[32],l}let N=`flex items-center gap-2 px-4 py-2 rounded-lg hover:bg-[color-mix(in_srgb,var(--public-interaction-highlight,var(--accent)),transparent_50%)] hover:!text-public-foreground transition-colors ${h}`;return u[33]!==m?(a=T(m,"h-4 w-4"),u[33]=m,u[34]=a):a=u[34],u[35]!==m.title?(s=(0,t.jsx)("span",{className:"font-medium",children:m.title}),u[35]=m.title,u[36]=s):s=u[36],u[37]===Symbol.for("react.memo_cache_sentinel")?(i=(0,t.jsx)(p.DynamicIcon,{icon:"LuChevronDown",className:"h-4 w-4 ml-1"}),u[37]=i):i=u[37],u[38]!==N||u[39]!==a||u[40]!==s?(l=(0,t.jsx)(b.DropdownMenuTrigger,{asChild:!0,children:(0,t.jsxs)(f.Button,{variant:"ghost",className:N,children:[a,s,i]})}),u[38]=N,u[39]=a,u[40]=s,u[41]=l):l=u[41],u[42]!==m.children?(c=m.children.map(E),u[42]=m.children,u[43]=c):c=u[43],u[44]!==c?(o=(0,t.jsx)(b.DropdownMenuContent,{className:"w-72 p-2",align:"start",children:c}),u[44]=c,u[45]=o):o=u[45],u[46]!==l||u[47]!==o?(d=(0,t.jsxs)(b.DropdownMenu,{modal:!1,children:[l,o]}),u[46]=l,u[47]=o,u[48]=d):d=u[48],d}function E(e){return e.children&&e.children.length>0&&!1!==e.showAsDropdown?(0,t.jsx)(M,{item:e},e.id):(0,t.jsx)(b.DropdownMenuItem,{asChild:!0,className:"cursor-pointer p-0",children:(0,t.jsxs)(n.default,{href:e.href,target:e.target||"_self",className:"flex items-center w-full px-3 py-2 rounded-md",children:[T(e),(0,t.jsxs)("div",{className:"flex flex-col",children:[(0,t.jsx)("span",{className:"font-medium text-sm",children:e.title}),e.description&&(0,t.jsx)("span",{className:"text-xs text-muted-foreground mt-0.5 line-clamp-1",children:e.description})]})]})},e.id)}function O(e){return(0,t.jsx)(M,{item:e},e.id)}var R=e.i(443178),P=e.i(282371),U=e.i(378369),$=e.i(59377),H=e.i(471435),F=e.i(728231);let z={COMMENT_REPLY:{icon:"LuMessageSquareReply",color:"text-blue-500",dot:"bg-blue-500"},COMMENT_MENTION:{icon:"LuAtSign",color:"text-violet-500",dot:"bg-violet-500"},SYSTEM:{icon:"LuBell",color:"text-muted-foreground",dot:"bg-muted-foreground"}};function B(e){let a,s,i,l,c,o,d,u,m,h,x,f,b,g,j=(0,r.c)(42),{notification:y,nowMs:w,onMarkRead:N}=e,k=z[y.type]??z.SYSTEM,_=!y.readAt;j[0]!==k.color?(a=(0,v.cn)("mt-0.5 flex h-8 w-8 flex-shrink-0 items-center justify-center rounded-full border border-public-accent/20 bg-public-accent/10",k.color),j[0]=k.color,j[1]=a):a=j[1],j[2]!==k.icon?(s=(0,t.jsx)(p.DynamicIcon,{icon:k.icon,className:"h-4 w-4"}),j[2]=k.icon,j[3]=s):s=j[3],j[4]!==a||j[5]!==s?(i=(0,t.jsx)("div",{className:a,children:s}),j[4]=a,j[5]=s,j[6]=i):i=j[6],j[7]!==y.title?(l=(0,t.jsx)("p",{className:"min-w-0 flex-1 text-sm font-medium text-public-foreground transition-colors group-hover:text-public-accent",children:y.title}),j[7]=y.title,j[8]=l):l=j[8],j[9]!==k.dot||j[10]!==_?(c=_&&(0,t.jsx)("span",{className:(0,v.cn)("mt-1 h-2 w-2 flex-shrink-0 rounded-full",k.dot)}),j[9]=k.dot,j[10]=_,j[11]=c):c=j[11],j[12]!==l||j[13]!==c?(o=(0,t.jsxs)("div",{className:"flex items-start gap-2",children:[l,c]}),j[12]=l,j[13]=c,j[14]=o):o=j[14],j[15]!==y.message?(d=(0,t.jsx)("p",{className:"line-clamp-2 text-xs text-muted-foreground",children:y.message}),j[15]=y.message,j[16]=d):d=j[16],j[17]!==o||j[18]!==d?(u=(0,t.jsxs)("div",{className:"min-w-0 flex-1 space-y-1",children:[o,d]}),j[17]=o,j[18]=d,j[19]=u):u=j[19],j[20]!==y.createdAt||j[21]!==w?(m=function(e,t){let r=t-("string"==typeof e?new Date(e):e).getTime();if(Number.isNaN(r)||r<0)return"just now";let a=Math.floor(r/6e4);if(a<1)return"just now";if(a<60)return`${a}m ago`;let n=Math.floor(a/60);return n<24?`${n}h ago`:`${Math.floor(n/24)}d ago`}(y.createdAt,w),j[20]=y.createdAt,j[21]=w,j[22]=m):m=j[22],j[23]!==m?(h=(0,t.jsx)("div",{className:"flex flex-col items-end justify-between flex-shrink-0",children:(0,t.jsx)("span",{className:"text-xs text-muted-foreground whitespace-nowrap",children:m})}),j[23]=m,j[24]=h):h=j[24],j[25]!==h||j[26]!==i||j[27]!==u?(x=(0,t.jsxs)(t.Fragment,{children:[i,u,h]}),j[25]=h,j[26]=i,j[27]=u,j[28]=x):x=j[28];let S=x,D=_&&"border-public-accent/20 bg-public-accent/5";j[29]!==D?(f=(0,v.cn)("group flex gap-3 rounded-lg border border-transparent p-2 transition-colors hover:border-public-accent/25 hover:bg-public-accent/10",D),j[29]=D,j[30]=f):f=j[30];let C=f;if(!y.href){let e;return j[31]!==C||j[32]!==S?(e=(0,t.jsx)("div",{className:C,children:S}),j[31]=C,j[32]=S,j[33]=e):e=j[33],e}return j[34]!==y.id||j[35]!==N?(b=()=>N([y.id]),j[34]=y.id,j[35]=N,j[36]=b):b=j[36],j[37]!==C||j[38]!==S||j[39]!==y.href||j[40]!==b?(g=(0,t.jsx)(n.default,{href:y.href,onClick:b,className:C,children:S}),j[37]=C,j[38]=S,j[39]=y.href,j[40]=b,j[41]=g):g=j[41],g}function q(){let e,n,s,i,l,c,o,d,u,m,h,x,b,g,j,v,y,w,N,k,_,S,D,C,T,I=(0,r.c)(55),[M,L]=(0,a.useState)(!1),A=(0,U.useQueryClient)(),[E,O]=(0,a.useState)(X);I[0]!==M?(e=()=>{if(!M)return;O(Date.now());let e=setInterval(()=>
11O(Date.now()),3e4);return()=>clearInterval(e)},n=[M],I[0]=M,I[1]=e,I[2]=n):(e=I[1],n=I[2]),(0,a.useEffect)(e,n),I[3]===Symbol.for("react.memo_cache_sentinel")?(s=["user-notifications"],I[3]=s):s=I[3];let z=!!M&&3e4;I[4]!==z?(i={queryKey:s,queryFn:V,staleTime:3e4,refetchOnWindowFocus:!1,refetchInterval:z},I[4]=z,I[5]=i):i=I[5];let{data:q,isFetching:G}=(0,P.useQuery)(i);I[6]!==A?(l={mutationFn:Q,onMutate:async e=>{await A.cancelQueries({queryKey:["user-notifications"]});let t=A.getQueryData(["user-notifications"]);return A.setQueryData(["user-notifications"],t=>{if(!t)return t;let r=new Set(e);return{...t,unreadCount:Math.max(0,t.unreadCount-t.data.filter(e=>r.has(e.id)&&!e.readAt).length),data:t.data.map(e=>r.has(e.id)?{...e,readAt:e.readAt??new Date().toISOString()}:e)}}),{previous:t}},onError:(e,t,r)=>{r?.previous&&A.setQueryData(["user-notifications"],r.previous)},onSettled:()=>{A.invalidateQueries({queryKey:["user-notifications"]})}},I[6]=A,I[7]=l):l=I[7];let{mutate:W,isPending:J}=(0,R.useMutation)(l);I[8]!==q?.data?(c=q?.data??[],I[8]=q?.data,I[9]=c):c=I[9];let Z=c,ee=q?.unreadCount??0,et=ee>99?"99+":String(ee);I[10]!==W||I[11]!==Z?(o=()=>{0!==Z.length&&W(Z.filter(Y).map(K))},I[10]=W,I[11]=Z,I[12]=o):o=I[12];let er=o;I[13]===Symbol.for("react.memo_cache_sentinel")?(d=(0,t.jsx)(p.DynamicIcon,{icon:"LuBell",className:"h-5 w-5 flex-shrink-0"}),I[13]=d):d=I[13],I[14]!==et||I[15]!==ee?(u=ee>0&&(0,t.jsx)("span",{className:"absolute -top-1.5 -right-1.5 flex h-4 min-w-[1rem] items-center justify-center rounded-full bg-red-500 px-0.5 text-[10px] font-bold leading-none text-white",children:et}),I[14]=et,I[15]=ee,I[16]=u):u=I[16],I[17]!==u?(m=(0,t.jsxs)("div",{className:"relative inline-flex",children:[d,u]}),I[17]=u,I[18]=m):m=I[18];let ea=m;I[19]!==ea?(h=(0,t.jsx)(F.TooltipTrigger,{asChild:!0,children:(0,t.jsx)($.PopoverTrigger,{asChild:!0,children:(0,t.jsx)(f.Button,{variant:"ghost",size:"icon",className:"relative h-9 w-9 rounded-full border border-public-border/50 bg-public-surface-muted/30 text-public-foreground transition-colors hover:border-public-accent/40 hover:bg-public-accent/10 hover:text-public-accent",children:ea})})}),I[19]=ea,I[20]=h):h=I[20],I[21]===Symbol.for("react.memo_cache_sentinel")?(x=(0,t.jsx)(F.TooltipContent,{side:"bottom",children:"Notifications"}),I[21]=x):x=I[21],I[22]!==h?(b=(0,t.jsxs)(F.Tooltip,{children:[h,x]}),I[22]=h,I[23]=b):b=I[23],I[24]===Symbol.for("react.memo_cache_sentinel")?(g=(0,t.jsx)(p.DynamicIcon,{icon:"LuBell",className:"h-4 w-4 text-public-accent"}),j=(0,t.jsx)("h3",{className:"text-sm font-semibold",children:"Notifications"}),I[24]=g,I[25]=j):(g=I[24],j=I[25]),I[26]!==ee?(v=ee>0&&(0,t.jsx)("span",{className:"rounded-full bg-public-accent/10 px-2 py-0.5 text-[11px] font-medium text-public-accent",children:ee}),I[26]=ee,I[27]=v):v=I[27],I[28]!==v?(y=(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[g,j,v]}),I[28]=v,I[29]=y):y=I[29];let en=J||0===ee;return I[30]!==J?(w=J?(0,t.jsx)(p.DynamicIcon,{icon:"LuLoader",className:"h-3.5 w-3.5 animate-spin"}):(0,t.jsx)(p.DynamicIcon,{icon:"LuCheckCheck",className:"h-3.5 w-3.5"}),I[30]=J,I[31]=w):w=I[31],I[32]!==er||I[33]!==en||I[34]!==w?(N=(0,t.jsxs)(f.Button,{type:"button",variant:"ghost",size:"sm",className:"h-8 gap-1.5 px-2 text-xs text-public-muted hover:bg-public-accent/10 hover:text-public-accent",onClick:er,disabled:en,children:[w,"Mark all read"]}),I[32]=er,I[33]=en,I[34]=w,I[35]=N):N=I[35],I[36]!==y||I[37]!==N?(k=(0,t.jsxs)("div",{className:"flex items-center justify-between border-b border-public-border/60 px-4 py-3",children:[y,N]}),I[36]=y,I[37]=N,I[38]=k):k=I[38],I[39]!==W||I[40]!==Z||I[41]!==E?(_=0===Z.length?(0,t.jsxs)("div",{className:"flex h-full flex-col items-center justify-center gap-2 py-10 text-public-muted",children:[(0,t.jsx)(p.DynamicIcon,{icon:"LuBell",className:"h-8 w-8 opacity-30"}),(0,t.jsx)("p",{className:"text-sm",children:"No notifications yet"})]}):(0,t.jsx)("div",{className:"space-y-1 p-2 pr-4",children:Z.map(e=>(0,t.jsx)(B,{notification:e,nowMs:E,onMarkRead:W},e.id))}
11),I[39]=W,I[40]=Z,I[41]=E,I[42]=_):_=I[42],I[43]!==G?(S=G&&(0,t.jsxs)("div",{className:"flex items-center justify-center border-t border-public-border/60 px-4 py-3 text-xs text-public-muted",children:[(0,t.jsx)(p.DynamicIcon,{icon:"LuLoader",className:"mr-2 h-3.5 w-3.5 animate-spin"}),"Updating notifications"]}),I[43]=G,I[44]=S):S=I[44],I[45]!==_||I[46]!==S?(D=(0,t.jsxs)(H.ScrollArea,{className:"h-[420px] overflow-hidden",children:[_,S]}),I[45]=_,I[46]=S,I[47]=D):D=I[47],I[48]!==k||I[49]!==D?(C=(0,t.jsxs)($.PopoverContent,{side:"bottom",align:"end",sideOffset:10,className:"w-96 border-public-border/60 bg-public-surface-raised text-public-foreground p-0 shadow-lg",children:[k,D]}),I[48]=k,I[49]=D,I[50]=C):C=I[50],I[51]!==M||I[52]!==b||I[53]!==C?(T=(0,t.jsx)(F.TooltipProvider,{delayDuration:150,children:(0,t.jsxs)($.Popover,{open:M,onOpenChange:L,children:[b,C]})}),I[51]=M,I[52]=b,I[53]=C,I[54]=T):T=I[54],T}function K(e){return e.id}function Y(e){return!e.readAt}async function Q(e){let t=await fetch("/api/notifications",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",keepalive:!0,body:JSON.stringify({ids:e})});if(!t.ok)throw Error("Failed to update notifications");return t.json()}async function V(){let e=await fetch("/api/notifications",{credentials:"include"});if(!e.ok)throw Error("Failed to fetch notifications");return e.json()}function X(){return Date.now()}let G=new Set(["/banners/svg/default.svg","/banners/svg/devil.svg","/banners/svg/lady-2.svg","/banners/svg/lady-3.svg","/banners/svg/lady-5.svg","/banners/svg/zoro.svg"]);function W(e){let n,s,i,l,c,o,d,u,m,p,h,x,f,b,g,j,v,y,w,N,k=(0,r.c)(37),{src:_,alt:S,className:D}=e,C=(0,a.useId)();k[0]!==C?(n=C.replaceAll(":",""),k[0]=C,k[1]=n):n=k[1];let T=n,I=`${T}-neutral`,M=`${T}-accent`,L=`${T}-title`;if(!G.has(_))return null;let A=`header-banner-logo ${D??""}`;k[2]!==S||k[3]!==L?(s=(0,t.jsx)("title",{id:L,children:S}),k[2]=S,k[3]=L,k[4]=s):s=k[4],k[5]===Symbol.for("react.memo_cache_sentinel")?(l=(0,t.jsx)("stop",{offset:"0%",stopColor:"var(--header-banner-neutral-0)"}),c=(0,t.jsx)("stop",{offset:"20%",stopColor:"var(--header-banner-neutral-1)"}),o=(0,t.jsx)("stop",{offset:"40%",stopColor:"var(--header-banner-neutral-2)"}),d=(0,t.jsx)("stop",{offset:"60%",stopColor:"var(--header-banner-neutral-3)"}),u=(0,t.jsx)("stop",{offset:"80%",stopColor:"var(--header-banner-neutral-4)"}),i=(0,t.jsx)("stop",{offset:"100%",stopColor:"var(--header-banner-neutral-5)"}),k[5]=i,k[6]=l,k[7]=c,k[8]=o,k[9]=d,k[10]=u):(i=k[5],l=k[6],c=k[7],o=k[8],d=k[9],u=k[10]),k[11]!==I?(m=(0,t.jsxs)("linearGradient",{id:I,x1:"0",y1:"0",x2:"0",y2:"1",children:[l,c,o,d,u,i]}),k[11]=I,k[12]=m):m=k[12],k[13]===Symbol.for("react.memo_cache_sentinel")?(p=(0,t.jsx)("stop",{offset:"0%",stopColor:"var(--header-banner-accent-0)"}),h=(0,t.jsx)("stop",{offset:"20%",stopColor:"var(--header-banner-accent-1)"}),x=(0,t.jsx)("stop",{offset:"40%",stopColor:"var(--header-banner-accent-2)"}),f=(0,t.jsx)("stop",{offset:"60%",stopColor:"var(--header-banner-accent-3)"}),b=(0,t.jsx)("stop",{offset:"80%",stopColor:"var(--header-banner-accent-4)"}),g=(0,t.jsx)("stop",{offset:"100%",stopColor:"var(--header-banner-accent-5)"}),k[13]=p,k[14]=h,k[15]=x,k[16]=f,k[17]=b,k[18]=g):(p=k[13],h=k[14],x=k[15],f=k[16],b=k[17],g=k[18]),k[19]!==M?(j=(0,t.jsxs)("linearGradient",{id:M,x1:"0",y1:"0",x2:"0",y2:"1",children:[p,h,x,f,b,g]}),k[19]=M,k[20]=j):j=k[20],k[21]!==m||k[22]!==j?(v=(0,t.jsxs)("defs",{children:[m,j]}),k[21]=m,k[22]=j,k[23]=v):v=k[23];let E=`${_}#neutral`,O=`url(#${I})`;k[24]!==E||k[25]!==O?(y=(0,t.jsx)("use",{href:E,fill:O}),k[24]=E,k[25]=O,k[26]=y):y=k[26];let R=`${_}#violet`,P=`url(#${M})`;return k[27]!==R||k[28]!==P?(w=(0,t.jsx)("use",{href:R,fill:P}),k[27]=R,k[28]=P,k[29]=w):w=k[29],k[30]!==v||k[31]!==y||k[32]!==w||k[33]!==A||k[34]!==s||k[35]!==L?(N=(0,t.jsxs)("svg",{viewBox:"0 0 1983 793",role:"img","aria-labelledby":L,preserveAspectRatio:"xMidYMid meet",className:A,children:[s,v,y,w]}),k[30]=v,k[31]=y,k[32]=w,k[33]=A,k[34]=s,k[35]=L,k[36]=N):N=k[36],N}var J=e.i(999525),Z=e.i(630374),ee=e.i(629441),et=e.i(307261),er=e.i(573251),ea=e.i(108090),en=e.i(535578),es=e.i(871250);let ei=["Search 'Solo Leveling'...","Search 'Frieren'...","Search 'One Piece'...","Search 'Demon Slayer'...","Search 'Jujutsu Kaisen'...","Search 'Attack on Titan'...","Search 'Oshi no Ko'...","Search 'Spy x Family'..."];function el(e){let l,c,o,d,u,m,h,x,f,b,g,j,v,w,N,k,_,S,D=(0,r.c)(47),{isOpen:C,onClose:T,onSearch:I}=e,M=(0,i.useRouter)(),[L,A]=(0,a.useState)(""),[E,O]=(0,a.useState)(!1),[R,P]=(0,a.useState)(0),[U,$]=(0,a.useState)(""),[H,F]=(0,a.useState)(!1),z=(0,ee.useDebounce)(L,300);D[0]!==z||D[1]!==C?(l=C&&""!==z.trim(),D[0]=z,D[1]=C,D[2]=l):l=D[2],D[3]!==l?(c={enabled:l},D[3]=l,D[4]=c):c=D[4];let{data:B,isLoading:q}=(0,et.useAnimeSearch)(z,void 0,c),K=B?.pages.flatMap(ed)||[],Y=B?.pages[0]?.total||0,{history:Q,addToHistory:V,removeFromHistory:X}=(0,er.useSearchHistory)(),{titleDisplayMode:G}=(0,y.useTitleDisplayStore)(),W=(0,a.useRef)(null),el=(0,a.useRef)(null);D[5]!==U||D[6]!==H||D[7]!==C||D[8]!==R?(o=()=>{let e;if(!C)return;let t=ei[R],r=()=>{let a=!H&&U===t,n=H&&""===U;a?e=setTimeout(()=>F(!0),2e3):n?(F(!1),P(eo)):($(H?U.slice(0,-1):t.slice(0,U.length+1)),e=setTimeout(r,H?50:100))};return e=setTimeout(r,100),()=>clearTimeout(e)},d=[C,U,H,R],D[5]=U,D[6]=H,D[7]=C,D[8]=R,D[9]=o,D[10]=d):(o=D[9],d=D[10]),(0,a.useEffect)(o,d),D[11]!==C?(u=()=>{C&&O(!1)},m=[C],D[11]=C,D[12]=u,D[13]=m):(u=D[12],m=D[13]),(0,a.useEffect)(u,m),D[14]!==V||D[15]!==L?(h=()=>(el.current&&clearTimeout(el.current),L.trim()&&L.trim().length>2&&(el.current=setTimeout(()=>{V(L.trim())},3e3)),()=>{el.current&&clearTimeout(el.current)}),x=[L,V],D[14]=V,D[15]=L,D[16]=h,D[17]=x):(h=D[16],x=D[17]),(0,a.useEffect)(h,x),D[18]!==T?(f=e=>{e||(A(""),el.current&&clearTimeout(el.current),T())},D[18]=T,D[19]=f):f=D[19];let eu=f;D[20]===Symbol.for("react.memo_cache_sentinel")?(b=()=>{A(""),el.current&&clearTimeout(el.current),setTimeout(()=>{W.current?.focus()},10)},D[20]=b):b=D[20];let em=b;D[21]!==V||D[22]!==T||D[23]!==I||D[24]!==M?(g=(e,t)=>
11{let r=void 0===t||t,a=e.trim();a&&(el.current&&clearTimeout(el.current),V(a),A(a),I?I(a,!r):M.push(`/browse?q=${encodeURIComponent(a)}`),r&&T())},D[21]=V,D[22]=T,D[23]=I,D[24]=M,D[25]=g):g=D[25];let ep=g,eh=e=>{el.current&&clearTimeout(el.current),V(e.title),I&&I(e.title,!1);let t=e.href?e.href:e.post_ids&&e.post_ids.length>0?`/view/${e.post_ids[0]}`:null;O(!0),setTimeout(()=>{if(t)M.push(t);else{let t=`/browse?q=${encodeURIComponent(e.title)}`;M.push(t)}},75)};D[26]!==V?(j=e=>{A(e),V(e)},D[26]=V,D[27]=j):j=D[27];let ex=j;D[28]!==X?(v=e=>{X(e)},D[28]=X,D[29]=v):v=D[29];let ef=v;D[30]!==T||D[31]!==M||D[32]!==L?(w=()=>{if(L.trim()){O(!0);let e=`/browse?q=${encodeURIComponent(L.trim())}`;setTimeout(()=>{M.push(e),T()},75)}},D[30]=T,D[31]=M,D[32]=L,D[33]=w):w=D[33];let eb=w;D[34]!==T||D[35]!==M?(N=()=>{O(!0),setTimeout(()=>{M.push("/browse"),T()},75)},D[34]=T,D[35]=M,D[36]=N):N=D[36];let eg=N;D[37]!==L?(k=L.trim(),D[37]=L,D[38]=k):k=D[38];let ej=""!==k,ev=!ej&&Q.length>0,ey=ej&&!q&&0===K.length,ew=!ej&&0===Q.length,eN=Z.Dialog,ek=es.AnimatePresence,e_=C&&(0,t.jsx)(Z.DialogContent,{className:"p-0 max-w-[95vw] sm:max-w-[700px] rounded-[2rem] bg-public-surface-raised/95 text-public-foreground shadow-xl border border-public-border overflow-hidden backdrop-blur-3xl [&>button]:hidden focus:outline-none",onClick:ec,"aria-describedby":"anime-search-dialog-description",children:(0,t.jsxs)(en.motion.div,{initial:{opacity:0,scale:.95,y:10},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.95,y:10},transition:{type:"spring",duration:.4,bounce:.2},className:"relative",children:[(0,t.jsx)(Z.DialogTitle,{className:"sr-only",children:"Search Anime"}),(0,t.jsx)(Z.DialogDescription,{className:"sr-only",children:"Anime Search."}),(0,t.jsxs)("div",{className:"flex items-center justify-between pt-8 px-10 pb-4",children:[(0,t.jsx)("h2",{className:"text-2xl font-bold tracking-tight text-public-foreground",children:"Search Anime"}),(0,t.jsx)("button",{onClick:T,className:"p-2 rounded-full text-public-muted hover:text-public-accent hover:bg-public-accent/10 transition-all outline-none",children:(0,t.jsx)(p.DynamicIcon,{icon:"HiXMark",className:"h-5 w-5"})})]}),(0,t.jsxs)(J.Command,{className:"rounded-lg bg-transparent",shouldFilter:!1,children:[(0,t.jsxs)("div",{className:"px-10 pb-6",children:[(0,t.jsxs)("div",{className:"relative group",children:[(0,t.jsx)("div",{className:"absolute -inset-[1px] bg-public-accent/40 rounded-2xl blur-md opacity-0 group-focus-within:opacity-100 transition-opacity duration-500 pointer-events-none"}),(0,t.jsxs)("div",{className:"relative flex items-center bg-public-surface-muted/50 rounded-2xl border border-public-border/60 group-focus-within:border-public-accent/50 transition-all duration-300",children:[(0,t.jsx)("input",{id:"search-input",ref:W,value:L,onChange:e=>A(e.target.value),placeholder:`Search "${ei[R].replace("Search '","").replace("'...","")}"`,className:"w-full pl-6 pr-12 py-4 bg-transparent outline-none text-public-foreground text-lg font-medium placeholder:text-public-muted transition-all",onKeyDown:e=>{"Enter"===e.key?(e.preventDefault(),ep(L,!0)):"Escape"===e.key&&ej&&(e.preventDefault(),em())},autoFocus:!0}),(0,t.jsxs)("div",{className:"absolute right-4 flex items-center gap-2",children:[(0,t.jsx)(es.AnimatePresence,{children:L&&(0,t.jsx)(en.motion.button,{initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},transition:{duration:.2},onClick:em,className:"p-1.5 rounded-full text-public-muted hover:text-public-foreground hover:bg-public-accent/10 transition-all",children:(0,t.jsx)(p.DynamicIcon,{icon:"HiXCircle",className:"h-4.5 w-4.5"})})}),(0,t.jsx)("button",{onClick:eg,className:"p-1 text-public-muted hover:text-public-accent transition-colors focus:outline-none",title:"Advanced Filters",children:(0,t.jsx)(p.DynamicIcon,{icon:"LuSlidersHorizontal",className:"h-5 w-5 text-public-muted group-focus-within:text-public-accent/70 transition-colors"})})]})]})]}),(0,t.jsxs)("div",{className:"mt-3 flex items-center gap-5 px-1",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 text-[10px] font-black uppercase tracking-tighter text-public-muted",children:[(0,t.jsx)("span",{className:"text-public-accent/70",children:"ENTER"}),(0,t.jsx)("span",{children:"SEARCH"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2 text-[10px] font-black uppercase tracking-tighter text-public-muted",children:[(0,t.jsx)("span",{className:"text-public-accent/70",children:"ESC"}),(0,t.jsx)("span",{children:"CLEAR"})]})]})]}),(0,t.jsx)(J.Command.List,{className:"max-h-[60vh] overflow-y-auto px-6 pb-6 scrollbar-hide",children:E?(0,t.jsx)("div",{className:"py-20 text-center",children:(0,t.jsxs)(en.motion.div,{initial:{opacity:0}
11,animate:{opacity:1},className:"inline-flex flex-col items-center gap-4",children:[(0,t.jsx)("div",{className:"w-8 h-8 border-2 border-public-accent/20 border-t-public-accent rounded-full animate-spin"}),(0,t.jsx)("span",{className:"text-sm font-medium text-public-muted tracking-widest uppercase",children:"loading..."})]})}):q||ej&&L!==z?(0,t.jsx)("div",{className:"py-20 text-center",children:(0,t.jsxs)("div",{className:"inline-flex flex-col items-center gap-4",children:[(0,t.jsx)("div",{className:"w-8 h-8 border-2 border-public-accent/20 border-t-public-accent rounded-full animate-spin"}),(0,t.jsx)("span",{className:"text-sm font-medium text-public-muted tracking-widest uppercase",children:"Searching..."})]})}):ey?(0,t.jsx)(J.Command.Empty,{className:"py-20 text-center",children:(0,t.jsxs)(en.motion.div,{initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},className:"flex flex-col items-center",children:[(0,t.jsx)("div",{className:"w-16 h-16 rounded-3xl bg-public-accent/10 flex items-center justify-center mb-6",children:(0,t.jsx)(p.DynamicIcon,{icon:"HiMagnifyingGlass",className:"h-6 w-6 text-public-accent/60"})}),(0,t.jsx)("h3",{className:"text-xl font-bold text-public-foreground mb-2",children:"No results found"}),(0,t.jsx)("p",{className:"text-public-muted text-sm mb-8",children:"Try adjusting your keywords."}),(0,t.jsx)("button",{onClick:eg,className:"px-6 py-3 bg-public-accent/10 hover:bg-public-accent/20 text-public-accent rounded-2xl transition-all font-bold text-xs uppercase tracking-widest",children:"Advanced Search"})]})}):ev?(0,t.jsxs)("div",{className:"space-y-6 pt-2",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between px-4",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 text-public-muted uppercase text-[10px] font-black tracking-widest",children:[(0,t.jsx)(p.DynamicIcon,{icon:"HiClock",className:"h-3 w-3"}),(0,t.jsx)("span",{children:"Recent Searches"})]}),(0,t.jsx)("button",{onClick:eg,className:"text-[10px] font-black uppercase tracking-widest text-public-accent/60 hover:text-public-accent transition-colors",children:"Advanced Search"})]}),(0,t.jsx)("div",{className:"space-y-1",children:Q.map((e,r)=>(0,t.jsx)(J.Command.Item,{value:e,onSelect:()=>ex(e),className:"flex items-center gap-4 p-4 rounded-[1.25rem] hover:bg-public-accent/10 cursor-pointer transition-all group",children:(0,t.jsxs)(en.motion.div,{initial:{opacity:0,x:-10},animate:{opacity:1,x:0},transition:{delay:.03*r},className:"flex items-center gap-4 w-full",children:[(0,t.jsx)(p.DynamicIcon,{icon:"HiClock",className:"h-4 w-4 text-public-muted group-hover:text-public-accent/60 transition-colors"}),(0,t.jsx)("span",{className:"flex-1 font-medium text-public-foreground/80 group-hover:text-public-accent transition-colors",children:e}),(0,t.jsx)("button",{onClick:t=>{t.stopPropagation(),t.preventDefault(),ef(e)},className:"p-2 rounded-xl text-slate-300 dark:text-white/20 hover:text-destructive hover:bg-destructive/10 transition-all opacity-0 group-hover:opacity-100",children:(0,t.jsx)(p.DynamicIcon,{icon:"HiOutlineTrash",className:"h-4 w-4"})})]})},r))})]}):ew?(0,t.jsx)(J.Command.Empty,{className:"py-24 text-center",children:(0,t.jsxs)(en.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:"flex flex-col items-center",children:[(0,t.jsx)("div",{className:"w-16 h-16 rounded-[2rem] bg-public-accent/10 flex items-center justify-center mb-6",children:(0,t.jsx)(p.DynamicIcon,{icon:"HiSparkles",className:"h-8 w-8 text-public-accent"})}),(0,t.jsx)("h3",{className:"text-2xl font-bold text-public-foreground mb-3 tracking-tight",children:"Discover Anime"}),(0,t.jsx)("p",{className:"text-public-muted text-sm max-w-[280px] leading-relaxed mb-8",children:"Enter a title, genre, or studio to begin your journey."})]})}):(0,t.jsxs)("div",{className:"space-y-6 pt-2",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between px-4",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 text-public-muted uppercase text-[10px] font-black tracking-widest",children:[(0,t.jsx)(p.DynamicIcon,{icon:"HiArrowTrendingUp",pack:"hi2",className:"h-3 w-3"}),(0,t.jsx)("span",{children:"Results"})]}),(0,t.jsx)("button",{onClick:eg,className:"text-[10px] font-black uppercase tracking-widest text-public-accent/60 hover:text-public-accent transition-colors",children:"Advanced Search"})]}),(0,t.jsx)(J.Command.Group,{className:"space-y-1",children:K.slice(0,5).map((e,r)=>{let a=(0,ea.getPreferredPostTitle)({title:e.title,title_english:e.title_english},G),i=e.href?e.href:e.post_ids&&e.post_ids.length>0?`/view/${e.post_ids[0]}`:`/browse?q=${encodeURIComponent(e.title)}`;return(0,t.jsx)(J.Command.Item,{value:e.title,onSelect:()=>eh(e),className:"p-0 rounded-[1.5rem] hover:bg-public-accent/10 transition-all group",children:(0,t.jsx)(en.motion.div,{initial:{opacity:0,x:-10}
11,animate:{opacity:1,x:0},transition:{delay:.05*r},children:(0,t.jsxs)(n.default,{href:i,className:"flex items-center gap-5 p-4 w-full no-underline",onClick:t=>{0!==t.button||t.metaKey||t.ctrlKey||(t.preventDefault(),eh(e))},children:[(0,t.jsx)("div",{className:"relative w-16 h-20 flex-shrink-0 rounded-xl overflow-hidden shadow-2xl border border-slate-200 dark:border-white/5",children:(0,t.jsx)(s.default,{src:e.anime_image||"/placeholder.jpg",alt:a,fill:!0,className:"object-cover group-hover:scale-110 transition-transform duration-700",sizes:"64px"})}),(0,t.jsxs)("div",{className:"flex-1 min-w-0 flex flex-col justify-center",children:[(0,t.jsxs)("h4",{className:"font-bold text-lg text-public-foreground group-hover:text-public-accent transition-colors line-clamp-1 mb-1",children:[(0,t.jsxs)("span",{className:"text-slate-300 dark:text-white/20 mr-2 tabular-nums",children:[r+1,"."]}),a]}),(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-1",children:[(0,t.jsxs)("div",{className:"flex items-center gap-0.5 text-xs font-semibold text-slate-500 dark:text-white/30 bg-slate-100 dark:bg-white/5 px-2 py-0.5 rounded-md",children:[Array.from({length:5}).map((r,a)=>(0,t.jsx)(p.DynamicIcon,{icon:a<Math.floor((e.score||0)/2)?"HiStar":"HiOutlineStar",className:`h-2.5 w-2.5 ${a<Math.floor((e.score||0)/2)?"text-yellow-500":"text-slate-200 dark:text-white/10"}`},a)),(0,t.jsxs)("span",{className:"ml-1.5 text-[10px] font-bold",children:[e.score?e.score.toFixed(1):"0.0","/10"]})]}),(0,t.jsx)("div",{className:"flex items-center gap-1 text-[10px] font-bold text-slate-400 dark:text-white/20 uppercase tracking-tighter",children:e.genres?.slice(0,2).join(", ")||e.type||"Anime"})]})]}),(0,t.jsx)("div",{className:"opacity-0 group-hover:opacity-100 transition-all translate-x-2 group-hover:translate-x-0",children:(0,t.jsx)(p.DynamicIcon,{icon:"HiArrowTopRightOnSquare",pack:"hi2",className:"h-4 w-4 text-public-accent"})})]})})},e.id)})}),K.length>5&&(0,t.jsx)(en.motion.div,{initial:{opacity:0}
11,animate:{opacity:1},className:"pt-4 border-t border-slate-100 dark:border-white/5",children:(0,t.jsxs)("button",{onClick:eb,className:"w-full flex items-center justify-center gap-3 p-4 rounded-[1.25rem] bg-public-accent/5 hover:bg-public-accent/10 text-public-accent font-bold text-xs uppercase tracking-[0.2em] transition-all group",children:[(0,t.jsxs)("span",{children:["Explore all ",Y," titles"]}),(0,t.jsx)(p.DynamicIcon,{icon:"HiArrowTrendingUp",pack:"hi2",className:"h-4 w-4 group-hover:translate-x-1 transition-transform"})]})})]})})]}),(0,t.jsxs)("div",{className:"px-10 py-6 border-t border-public-border/60 bg-public-surface-muted/30 flex items-center justify-between",children:[(0,t.jsxs)("div",{className:"flex items-center gap-6",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 text-[10px] font-bold text-slate-400 dark:text-white/20",children:[(0,t.jsx)("span",{className:"px-1.5 py-0.5 rounded-md bg-white dark:bg-white/5 border border-slate-200 dark:border-white/10 text-slate-500 dark:text-white/40",children:"Enter"}),(0,t.jsx)("span",{className:"uppercase tracking-tighter",children:"to search"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2 text-[10px] font-bold text-slate-400 dark:text-white/20",children:[(0,t.jsx)("span",{className:"px-1.5 py-0.5 rounded-md bg-white dark:bg-white/5 border border-slate-200 dark:border-white/10 text-slate-500 dark:text-white/40",children:"Esc"}),(0,t.jsx)("span",{className:"uppercase tracking-tighter",children:"to close"})]}),(0,t.jsx)("div",{className:"hidden sm:flex items-center gap-2 text-[10px] font-bold text-slate-400 dark:text-white/20",children:(0,t.jsx)("span",{className:"uppercase tracking-tighter",children:"Right-click for new tab"})})]}),(0,t.jsx)("button",{onClick:T,className:"text-xs font-black uppercase tracking-widest text-public-muted hover:text-public-accent transition-colors",children:"Cancel"})]})]})});return D[39]!==ek||D[40]!==e_?(_=(0,t.jsx)(ek,{mode:"wait",children:e_}),D[39]=ek,D[40]=e_,D[41]=_):_=D[41],D[42]!==eN||D[43]!==eu||D[44]!==C||D[45]!==_?(S=(0,t.jsx)(eN,{modal:!1,open:C,onOpenChange:eu,children:_}),D[42]=eN,D[43]=eu,D[44]=C,D[45]=_,D[46]=S):S=D[46],S}function ec(e){return e.stopPropagation()}function eo(e){return(e+1)%ei.length}function ed(e){return e.results}var eu=e.i(506099),em=e.i(71829);function ep(e){return(0,t.jsx)(b.DropdownMenuItem,{asChild:!0,children:(0,t.jsxs)(n.default,{href:e.href,className:"flex w-full items-center cursor-pointer py-2 px-3",children:[(0,t.jsx)(p.DynamicIcon,{icon:e.icon,className:"h-4 w-4 mr-2"}),(0,t.jsx)("span",{children:e.title})]})},e.href)}function eh(e){return(0,t.jsx)(b.DropdownMenuItem,{asChild:!0,children:(0,t.jsxs)(n.default,{href:e.url,target:e.openInNewTab?"_blank":"_self",rel:e.openInNewTab?"noopener noreferrer":void 0,className:"flex items-center gap-2",children:[(0,t.jsx)(p.DynamicIcon,{icon:e.iconName,pack:e.iconPack||void 0,className:"h-4 w-4"}),(0,t.jsx)("span",{children:e.label})]})},`header-social-menu-${e.id}`)}function ex(e){return!e}function ef(e){return("header"===e.menuType||!e.menuType)&&!1!==e.showOnDesktop}function eb(e,t){return e.order-t.order}function eg(e,t){return e.position-t.position}function ej(e,t){return e.position-t.position}e.s(["ClientHeader",0,function(e){let o,d,u,h,j,v,w,k,_,S,C,T,I,M,L,E,O,R,P,U,$,H,F,z,B,K,Y,Q,V,X,J,Z,ee,et,er,ea,en,es,ei,ec=(0,r.c)(143),{settings:eo,headerSocialLinks:ed,mobileSocialLinks:ev,fullMenuTree:ey,availableBanners:ew,authState:eN}=e,[ek,e_]=(0,a.useState)(!1),[eS,eD]=(0,a.useState)(null),[eC,eT]=(0,a.useState)(!1),[eI,eM]=(0,a.useState)(!1),eL=(0,l.useIsMobile)(),eA=(0,l.useIsTablet)(),eE=eL??!1,eO=eA??!1,{signOut:eR}=(0,c.useSignOut)(),{banner:eP,ensureBanner:eU}=m(),{titleDisplayMode:e$,setTitleDisplayMode:eH}=(0,y.useTitleDisplayStore)(),eF=(0,i.useRouter)(),ez=(0,i.usePathname)(),eB=eo?.headerSearchEnabled??!0,eq=eo?.headerSocialLinksEnabled??!1,eK=eo?.mobileMenuSocialLinksEnabled??!1,eY=eo?.desktopHeaderStickyEnabled??!0,eQ=eo?.headerSearchPosition;ec[0]!==eQ?(o=(0,em.normalizeHeaderSearchPosition)(eQ),ec[0]=eQ,ec[1]=o):o=ec[1];let eV=o,{isLoggedIn:eX,isAdmin:eG,user:eW,dashboardMenuItems:eJ}=eN,eZ=eW?.username&&!eW.username.startsWith(em.USERNAME_RANDOM_PREFIX)?`/user/${eW.username}`:null;ec[2]!==ed?(d=[...ed].sort(ej),ec[2]=ed,ec[3]=d):d=ec[3];let e0=d;ec[4]!==ev?(u=[...ev].sort(eg),ec[4]=ev,ec[5]=u):u=ec[5];let e1=u;if(ec[6]===Symbol.for("react.memo_cache_sentinel")?(h=[],ec[6]=h):h=ec[6],ec[7]===Symbol.for("react.memo_cache_sentinel")?(j={id:-2,title:"Home",href:"/",description:"Go to homepage",order:-100,parentId:null,children:h,level:0,menuType:"header",isActive:!0,icon:"HiHome",pack:"hi",showAsDropdown:!1,createdAt:new Date(0),updatedAt:new Date(0),isVirtual:!0,showOnMobile:!0,showOnTablet:!0,showOnDesktop:!1,isPinned:!0},ec[7]=j):j=ec[7],ec[8]!==eV||ec[9]!==eB){if(v=[j],eB){let e,t,r,a;ec[11]===Symbol.for("react.memo_cache_sentinel")?(e=[],ec[11]=e):e=ec[11],ec[12]===Symbol.for("react.memo_cache_sentinel")?(t=new Date(0),r=new Date(0),ec[
1112]=t,ec[13]=r):(t=ec[12],r=ec[13]),ec[14]!==eV?(a={id:-1,title:"Search",href:"#",description:"Header search dialog",order:eV,parentId:null,children:e,level:0,menuType:"header",isActive:!0,icon:"LuSearch",pack:"lu",showAsDropdown:!1,createdAt:t,updatedAt:r,isVirtual:!0,showOnMobile:!0,showOnTablet:!0,showOnDesktop:!0,isPinned:!1},ec[14]=eV,ec[15]=a):a=ec[15],v.push(a)}ec[8]=eV,ec[9]=eB,ec[10]=v}else v=ec[10];let e2=v;ec[16]!==ey||ec[17]!==e2?(w=[...e2,...ey].sort(eb),ec[16]=ey,ec[17]=e2,ec[18]=w):w=ec[18];let e3=w;ec[19]!==e3?(k=e3.filter(ef),ec[19]=e3,ec[20]=k):k=ec[20];let e5=k;ec[21]!==ew||ec[22]!==eP.path?(_=eP.path&&ew.includes(eP.path)?eP.path:null,ec[21]=ew,ec[22]=eP.path,ec[23]=_):_=ec[23];let e4=_;ec[24]!==ew||ec[25]!==eU?(S=()=>{eU(ew),eM(!0)},C=[ew,eU],ec[24]=ew,ec[25]=eU,ec[26]=S,ec[27]=C):(S=ec[26],C=ec[27]),(0,a.useEffect)(S,C);let e6=ew.length>0&&(!eI||!e4),e8=!!eo?.siteName&&0===ew.length;ec[28]===Symbol.for("react.memo_cache_sentinel")?(T=()=>{e_(!1),eD(null)},ec[28]=T):T=ec[28];let e7=T;ec[29]!==eS||ec[30]!==ek?(I=e=>{let t=(void 0===e?null:e)??null;ek?eS===t?(e_(!1),eD(null)):eD(t):(eD(t),e_(!0))},ec[29]=eS,ec[30]=ek,ec[31]=I):I=ec[31];let e9=I;ec[32]!==eR?(M=async()=>{try{await eR(),e_(!1)}catch(e){console.error("Signout failed:",e)}},ec[32]=eR,ec[33]=M):M=ec[33];let te=M;ec[34]!==eE||ec[35]!==eO||ec[36]!==ez||ec[37]!==eF?(L=()=>{(eE||eO)&&"/browse"!==ez&&"/browse/"!==ez?(e_(!1),eF.push("/browse")):eT(!0)},ec[34]=eE,ec[35]=eO,ec[36]=ez,ec[37]=eF,ec[38]=L):L=ec[38];let tt=L;ec[39]===Symbol.for("react.memo_cache_sentinel")?(E=()=>{eT(!1)},ec[39]=E):E=ec[39];let tr=E;ec[40]!==eC||ec[41]!==eB?(O=()=>{!eB&&eC&&eT(!1)},R=[eB,eC],ec[40]=eC,ec[41]=eB,ec[42]=O,ec[43]=R):(O=ec[42],R=ec[43]),(0,a.useEffect)(O,R),ec[44]!==eB?(P=()=>{let e=e=>{"k"===e.key&&(e.metaKey||e.ctrlKey)&&eB&&(e.preventDefault(),eT(ex))};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},ec[44]=eB,ec[45]=P):P=ec[45],ec[46]!==ez||ec[47]!==eB?(U=[eB,ez],ec[46]=ez,ec[47]=eB,ec[48]=U):U=ec[48],(0,a.useEffect)(P,U),ec[49]!==tt||ec[50]!==eH||ec[51]!==e$?($=()=>(0,t.jsxs)("div",{className:"flex w-full items-center gap-2",children:[(0,t.jsxs)("button",{onClick:tt,className:"flex flex-1 items-center gap-2 px-3 h-10 rounded-full bg-muted/30 dark:bg-white/5 border border-border/50 dark:border-white/10 text-muted-foreground shadow-sm dark:shadow-[inset_0_1px_0_rgba(255,255,255,0.06)] backdrop-blur-md hover:bg-muted/40 dark:hover:bg-white/9 hover:border-primary/30 dark:hover:border-white/20 hover:shadow-md dark:hover:shadow-[0_10px_24px_rgba(0,0,0,0.35)] transition-all duration-200 group relative overflow-hidden",children:[(0,t.jsx)(p.DynamicIcon,{icon:"LuSearch",className:"h-4 w-4 group-hover:text-primary transition-colors"}),(0,t.jsx)("span",{className:"text-sm font-medium flex-1 text-left truncate",children:"Search anime..."}),(0,t.jsxs)("div",{className:"hidden sm:flex items-center gap-1 px-1.5 py-0.5 rounded border border-border/50 dark:border-white/10 bg-muted/40 dark:bg-white/5 text-[10px] font-semibold text-muted-foreground dark:text-white/70",children:[(0,t.jsx)("span",{className:"opacity-50 text-[9px]",children:"CTRL"}),(0,t.jsx)("span",{children:"K"})]})]}),(0,t.jsxs)("div",{className:"inline-flex h-10 items-center rounded-full border border-border/50 bg-muted/30 p-1 dark:border-white/10 dark:bg-white/5 backdrop-blur-md",children:[(0,t.jsx)("button",{type:"button",onClick:()=>eH("english"),className:`min-w-9 rounded-full px-2 py-1 text-[11px] font-semibold transition-colors ${"english"===e$?"bg-primary text-primary-foreground shadow-sm":"text-muted-foreground hover:text-foreground"}`,children:"EN"}),(0,t.jsx)("button",{type:"button",onClick:()=>eH("romaji"),className:`min-w-9 rounded-full px-2 py-1 text-[11px] font-semibold transition-colors ${"romaji"===e$?"bg-primary text-primary-foreground shadow-sm":"text-muted-foreground hover:text-foreground"}`,children:"JP"})]})]}),ec[49]=tt,ec[50]=eH,ec[51]=e$,ec[52]=$):$=ec[52];let ta=$,tn=`${eY?"sticky top-0":"sticky top-0 lg:static"} z-50 w-full border-b border-border/40 bg-background/80 backdrop-blur supports-[backdrop-filter]:bg-background/70 shadow-[0_4px_20px_rgba(0,0,0,0.08)] dark:shadow-[0_10px_30px_rgba(0,0,0,0.45)] transition-colors duration-300`;if(ec[53]!==e4||ec[54]!==e6||ec[55]!==eo||ec[56]!==e8)H=(0,t.jsx)("div",{className:"flex items-center flex-shrink-0 gap-3",children:(0,t.jsx)(n.default,{href:"/",className:"flex items-center gap-3 group",children:e6?(0,t.jsx)("span",{"aria-hidden":"true",className:"block h-[90px] w-[225px] lg:h-[120px] lg:w-[280px]"}):e4?G.has(e4)?(0,t.jsx)(W,{src:e4,alt:eo?.siteName||"Site Logo",className:"h-[90px] lg:h-[120px] w-auto max-w-[280px] transition-transform duration-300 group-hover:scale-105"}):(0,t.jsx)(s.default,{src:e4,alt:eo?.siteName||"Site Logo",width:1168,height:784,priority:!0,className:"h-[90px] lg:h-[120px] w-auto max-w-[280px] object-contain transition-transform duration-300 group-hover:scale-105"}):e8?(0,t.jsx)("span",{className:"flex h-[90px] lg:h-[120px] max-w-[280px] items-center truncate bg-gradient-to-r from-primary via-primary to-primary/50 bg-clip-text text-3xl font-extrabold tracking-tight text-transparent transition-transform duration-300 group-hover:scale-105 lg:text-4xl",children:eo.siteName}):eo?.useHeaderImage&&eo?.headerImageUrl?(0,t.jsx)(s.default,{src:eo.headerImageUrl,alt:eo.siteName||"Site Logo",width:1168,height:784,priority:!0,className:"h-[90px] lg:h-[120px] w-auto max-w-[280px] object-contain transition-transform duration-300 group-hover:scale-105"}):(0,t.jsx)("div",{className:"h-10 w-10 lg:h-12 lg:w-12 rounded-md bg-gradient-to-br from-primary/15 to-primary/5 dark:from-primary/25 dark:to-primary/10 flex items-center justify-center border border-primary/20 dark:border-primary/25",children:(0,t.jsx)(s.default,{src:"/placeholder.svg",alt:"Logo",width:24,height:24,className:"h-6 w-6 text-primary"})})})}),ec[53]=e4,ec[54]=e6,ec[55]=eo,ec[56]=e8,ec[57]=H;else H=ec[57];if(ec[58]!==eV||ec[59]!==ta||ec[60]!==eB?(F=eB&&0===eV&&(0,t.jsx)("div",{className:"hidden lg:flex flex-1 max-w-[320px] ml-4",children:ta()}),ec[58]=eV,ec[59]=ta,ec[60]=eB,ec[61]=F):F=ec[61],ec[62]!==e5||ec[63]!==eV||ec[64]!==ta||ec[65]!==eB){let e;ec[67]!==eV||ec[68]!==ta||ec[69]!==eB?(e=e=>-1===e.id?eB&&1===eV?(0,t.jsx)("div",{className:"flex-1 max-w-[420px]",children:ta()},"header-search"):null:(0,t.jsx)(A,{item:e}
11,e.id),ec[67]=eV,ec[68]=ta,ec[69]=eB,ec[70]=e):e=ec[70],z=e5.map(e),ec[62]=e5,ec[63]=eV,ec[64]=ta,ec[65]=eB,ec[66]=z}else z=ec[66];return ec[71]!==z?(B=(0,t.jsx)("div",{className:"hidden lg:flex flex-1 items-center justify-center gap-6 px-4",children:z}),ec[71]=z,ec[72]=B):B=ec[72],ec[73]!==eV||ec[74]!==ta||ec[75]!==eB?(K=eB&&2===eV&&(0,t.jsx)("div",{className:"hidden lg:flex flex-1 max-w-[320px] mr-4",children:ta()}),ec[73]=eV,ec[74]=ta,ec[75]=eB,ec[76]=K):K=ec[76],ec[77]!==eq||ec[78]!==e0?(Y=eq&&e0.length>0&&(0,t.jsx)("div",{className:"flex items-center gap-1.5",children:(0,t.jsxs)(b.DropdownMenu,{modal:!1,children:[(0,t.jsx)(b.DropdownMenuTrigger,{asChild:!0,children:(0,t.jsx)(f.Button,{variant:"outline",size:"icon",className:"h-8 w-8 rounded-full border-border/60 bg-muted/35 text-muted-foreground hover:bg-muted/60 hover:text-foreground","aria-label":"Open social links",title:"Social links",children:(0,t.jsx)(p.DynamicIcon,{icon:"RiShareLine",className:"h-4 w-4"})})}),(0,t.jsxs)(b.DropdownMenuContent,{align:"end",className:"w-56",children:[(0,t.jsx)(b.DropdownMenuLabel,{children:"Follow Us"}),(0,t.jsx)(b.DropdownMenuSeparator,{}),e0.map(eh)]})]})}),ec[77]=eq,ec[78]=e0,ec[79]=Y):Y=ec[79],ec[80]!==eX?(Q=eX&&(0,t.jsx)(q,{}),ec[80]=eX,ec[81]=Q):Q=ec[81],ec[82]===Symbol.for("react.memo_cache_sentinel")?(V=(0,t.jsx)("div",{className:"hidden lg:block",children:(0,t.jsx)(x,{})}),ec[82]=V):V=ec[82],ec[83]!==Y||ec[84]!==Q?(X=(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[Y,Q,V]}),ec[83]=Y,ec[84]=Q,ec[85]=X):X=ec[85],ec[86]!==eJ||ec[87]!==te||ec[88]!==eG||ec[89]!==eX||ec[90]!==eZ||ec[91]!==eo?.fallbackAvatarUrl||ec[92]!==eW?.email||ec[93]!==eW?.image||ec[94]!==eW?.name||ec[95]!==eW?.role?(J=eX?(0,t.jsxs)(b.DropdownMenu,{modal:!1,children:[(0,t.jsx)(b.DropdownMenuTrigger,{asChild:!0,children:(0,t.jsx)(f.Button,{variant:"ghost",className:"relative h-10 w-10 rounded-full p-0 ring-offset-background transition-all hover:ring-2 hover:ring-primary/20 focus-visible:ring-2 focus-visible:ring-primary",children:(0,t.jsxs)(g.Avatar,{className:"h-10 w-10 border shadow-sm",children:[(0,t.jsx)(g.AvatarImage,{src:eW?.image||eo?.fallbackAvatarUrl||"/avatar.jpg",alt:"User"}),(0,t.jsx)(g.AvatarFallback,{className:"bg-gradient-to-br from-primary to-primary-foreground/20 text-foreground font-semibold",children:eW?.name?.[0]||"U"})]})})}),(0,t.jsxs)(b.DropdownMenuContent,{className:"w-64 mt-2",align:"end",forceMount:!0,children:[(0,t.jsx)(b.DropdownMenuLabel,{className:"font-normal",children:(0,t.jsxs)("div",{className:"flex flex-col space-y-2 py-1",children:[eZ?(0,t.jsx)(n.default,{href:eZ,className:"text-sm font-semibold leading-none hover:text-primary hover:underline",children:eW?.name||"User"}):(0,t.jsx)("p",{className:"text-sm font-semibold leading-none",children:eW?.name||"User"}),(0,t.jsx)("p",{className:"text-xs leading-none text-muted-foreground truncate",children:eW?.email||""}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"flex h-2 w-2 rounded-full bg-green-500"}),(0,t.jsx)("span",{className:"text-xs text-muted-foreground",children:(0,eu.getRoleDisplayName)(eW?.role)})]})]})}),(0,t.jsx)(b.DropdownMenuSeparator,{}),eZ&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(b.DropdownMenuItem,{asChild:!0,children:(0,t.jsxs)(n.default,{href:eZ,className:"flex w-full cursor-pointer py-2",children:[(0,t.jsx)(p.DynamicIcon,{icon:"LuCircleUserRound",className:"mr-2 h-4 w-4"}),(0,t.jsx)("span",{children:"Profile"})]})}),(0,t.jsx)(b.DropdownMenuSeparator,{})]}),eJ.length>0&&(0,t.jsxs)(t.Fragment,{children:[eG&&(0,t.jsx)(b.DropdownMenuLabel,{className:"text-xs font-bold uppercase text-muted-foreground/50 tracking-wider pt-2",children:"Admin Tools"}),eJ.map(ep),(0,t.jsx)(b.DropdownMenuSeparator,{})]}),(0,t.jsx)(b.DropdownMenuItem,{asChild:!0,children:(0,t.jsxs)(n.default,{href:"/settings/account",className:"flex w-full cursor-pointer py-2",children:[(0,t.jsx)(p.DynamicIcon,{icon:"LuUserPen",className:"mr-2 h-4 w-4"}),(0,t.jsx)("span",{children:"Account Settings"})]})}),(0,t.jsx)(b.DropdownMenuSeparator,{}),(0,t.jsxs)(b.DropdownMenuItem,{onClick:te,className:"cursor-pointer text-red-600 focus:text-red-700 focus:bg-red-50 dark:focus:bg-red-950/30 py-2",children:[(0,t.jsx)(p.DynamicIcon,{icon:"LuLogOut",className:"mr-2 h-4 w-4"}),(0,t.jsx)("span",{children:"Sign Out"})]})]})]}):(0,t.jsx)(f.Button,{variant:"default",asChild:!0,className:"gap-2 rounded-full shadow-lg shadow-primary/20 hover:shadow-xl hover:shadow-
11primary/30 transition-all active:scale-95",children:(0,t.jsxs)(n.default,{href:"/sign-in",children:[(0,t.jsx)(p.DynamicIcon,{icon:"LuLogIn",className:"h-4 w-4"}),(0,t.jsx)("span",{className:"font-medium",children:"Login"})]})}),ec[86]=eJ,ec[87]=te,ec[88]=eG,ec[89]=eX,ec[90]=eZ,ec[91]=eo?.fallbackAvatarUrl,ec[92]=eW?.email,ec[93]=eW?.image,ec[94]=eW?.name,ec[95]=eW?.role,ec[96]=J):J=ec[96],ec[97]!==eA?(Z=void 0===eA&&(0,t.jsx)("div",{"aria-hidden":"true",className:"hidden h-10 w-10 shrink-0 md:max-lg:block"}),ec[97]=eA,ec[98]=Z):Z=ec[98],ec[99]!==eS||ec[100]!==te||ec[101]!==eX||ec[102]!==eE||ec[103]!==eO||ec[104]!==ek||ec[105]!==tt||ec[106]!==eZ||ec[107]!==eo||ec[108]!==eB||ec[109]!==eK||ec[110]!==e1||ec[111]!==e3?(ee=(eE||eO)&&(0,t.jsx)(N,{open:ek,onOpenChange:e=>{e_(e),e||setTimeout(()=>eD(null),300)},activeFolderId:eS,setActiveFolderId:eD,isTablet:eO,showHeaderSearch:eB,showMobileSocialLinks:eK,mobileSocialLinks:e1,onOpenSearch:tt,onNavigate:e7,unifiedMenuTree:e3,isLoggedIn:eX,profileHref:eZ,onSignOut:te,settings:eo}),ec[99]=eS,ec[100]=te,ec[101]=eX,ec[102]=eE,ec[103]=eO,ec[104]=ek,ec[105]=tt,ec[106]=eZ,ec[107]=eo,ec[108]=eB,ec[109]=eK,ec[110]=e1,ec[111]=e3,ec[112]=ee):ee=ec[112],ec[113]!==X||ec[114]!==J||ec[115]!==Z||ec[116]!==ee?(et=(0,t.jsxs)("div",{className:"flex items-center gap-2 sm:gap-4 flex-shrink-0",children:[X,J,Z,ee]}),ec[113]=X,ec[114]=J,ec[115]=Z,ec[116]=ee,ec[117]=et):et=ec[117],ec[118]!==H||ec[119]!==F||ec[120]!==B||ec[121]!==K||ec[122]!==et?(er=(0,t.jsx)("div",{className:"container mx-auto px-4 lg:px-8",children:(0,t.jsxs)("div",{className:"flex h-[var(--public-header-height)] items-center justify-between gap-4",children:[H,F,B,K,et]})}),ec[118]=H,ec[119]=F,ec[120]=B,ec[121]=K,ec[122]=et,ec[123]=er):er=ec[123],ec[124]!==tn||ec[125]!==er?(ea=(0,t.jsx)("header",{className:tn,children:er}),ec[124]=tn,ec[125]=er,ec[126]=ea):ea=ec[126],ec[127]!==eC||ec[128]!==eB?(en=eB&&(0,t.jsx)(el,{isOpen:eC,onClose:tr}),ec[127]=eC,ec[128]=eB,ec[129]=en):en=ec[129],ec[130]!==eS||ec[131]!==e9||ec[132]!==eE||ec[133]!==eC||ec[134]!==ek||ec[135]!==tt||ec[136]!==eB||ec[137]!==e3?(es=eE&&(0,t.jsx)(D,{items:e3,onOpenSearch:tt,onOpenMore:e9,activeFolderId:eS,isSearchOpen:eC,isMoreOpen:ek,showHeaderSearch:eB}),ec[130]=eS,ec[131]=e9,ec[132]=eE,ec[133]=eC,ec[134]=ek,ec[135]=tt,ec[136]=eB,ec[137]=e3,ec[138]=es):es=ec[138],ec[139]!==ea||ec[140]!==en||ec[141]!==es?(ei=(0,t.jsxs)(t.Fragment,{children:[ea,en,es]}),ec[139]=ea,ec[140]=en,ec[141]=es,ec[142]=ei):ei=ec[142],ei}],966716)},802645,e=>{"use strict";var t=e.i(305910),r=e.i(438641),a=e.i(200003),n=e.i(1905),s=e.i(407197),i=e.i(647163),l=e.i(965949),c=e.i(543826),o=e.i(81234);let d=(0,c.create)()((0,o.persist)(e=>({isVisible:!0,isAutoMode:!0,toggleVisible:()=>e(e=>({isVisible:!e.isVisible})),setVisible:t=>e({isVisible:t}),toggleAutoMode:()=>e(e=>({isAutoMode:!e.isAutoMode})),setAutoMode:t=>e({isAutoMode:t})}),{name:"site-client-sidebar-storage",storage:(0,o.createJSONStorage)(()=>localStorage)}));function u(e,t){let r=t.category||"";return e[r]||(e[r]=[]),e[r].push(t),e}e.s(["ClientSidebar",0,function(e){let c,o,m,p,h,x,f,b,g,j,v,y,w,N,k,_,S,D,C,T,I,M,L,A,E,O,R,P=(0,r.c)(71),{items:U}=e,$=(0,s.usePathname)(),{isVisible:H,isAutoMode:F,toggleVisible:z,toggleAutoMode:B,setVisible:q}=d(),[K,Y]=(0,a.useState)(null),Q=(0,a.useRef)(null),V=(0,a.useRef)(0),X=(0,a.useRef)(!1);P[0]===Symbol.for("react.memo_cache_sentinel")?(c=()=>{let e=e=>{Q.current&&!Q.current.contains(e.target)&&Y(null)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},o=[],P[0]=c,P[1]=o):(c=P[0],o=P[1]),(0,a.useEffect)(c,o),P[2]!==q?(m=()=>{let e=window.matchMedia("(min-width: 1024px) and (max-width: 1279px)"),t=e=>{X.current=e.matches,e.matches?q(!1):q(!0)};return t(e),e.addEventListener("change",t),()=>e.removeEventListener("change",t)},p=[q],P[2]=q,P[3]=m,P[4]=p):(m=P[3],p=P[4]),(0,a.useEffect)(m,p),P[5]===Symbol.for("react.memo_cache_sentinel")?(h=()=>{Y(null)},P[5]=h):h=P[5],P[6]!==$?(x=[$],P[6]=$,P[7]=x):x=P[7],(0,a.useEffect)(h,x),P[8]!==F||P[9]!==q?(f=()=>{if(!F)return;let e=()=>{if(X.current)return;let e=window.scrollY,t=e-V.current;if(e<=24){q(!0),V.current=e;return}12>Math.abs(t)||(t>0?q(!1):q(!0),V.current=e)};return V.current=window.scrollY,window.addEventListener("scroll",e,{passive:!0}),()=>window.removeEventListener("scroll",e)},b=[F,q],P[8]=F,P[9]=q,P[10]=f,P[11]=b):(f=P[10],b=P[11]),(0,a.useEffect)(f,b),P[12]===Symbol.for("react.memo_cache_sentinel")?(j=()=>{let e=e=>{"Escape"===e.key&&Y(null)};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},g=[],P[12]=g,P[13]=j):(g=P[12],j=P[13]),(0,a.useEffect)(j,g),P[14]===Symbol.for("react.memo_cache_sentinel")?(v=e=>{Y(t=>t===e?null:e)},P[14]=v):v=P[14];let G=v;if(!U||0===U.length)return null;if(P[15]!==H||P[16]!==U||P[17]!==K||P[18]!==$){let e,r=null!==K?U.find(e=>e.id===K):null;S="fixed left-0 top-1/2 -translate-y-1/2 z-40 hidden lg:flex items-center",k=Q;let a=H?"opacity-100 translate-x-0 ml-3":"opacity-0 -translate-x-full w-0 overflow-hidden pointer-events-none";P[25]!==a?(_=(0,i.cn)("transition-all duration-300 ease-out",a),P[25]=a,P[26]=_):_=P[26];let s=r?"rounded-2xl":"rounded-[30px]";if(P[27]!==s?(y=(0,i.cn)("flex items-stretch transition-all duration-200",s,"bg-public-surface/95","border border-public-border/60","
11shadow-[0_8px_40px_rgba(0,0,0,0.15),0_1px_4px_rgba(0,0,0,0.1)]","dark:shadow-[0_8px_40px_rgba(0,0,0,0.7),0_0_0_1px_rgba(255,255,255,0.06)]","backdrop-blur-3xl"),P[27]=s,P[28]=y):y=P[28],P[29]!==U||P[30]!==K||P[31]!==$){let r;P[33]!==K||P[34]!==$?(r=e=>{let r=$===e.href,a=e.children&&e.children.length>0,s=!1!==e.showAsDropdown&&a,c=K===e.id,o=(0,i.cn)("h-[20px] w-[20px] shrink-0 transition-colors duration-200",c||r?"text-public-accent-foreground":"text-public-muted group-hover:text-public-foreground");return s?(0,t.jsxs)("button",{onClick:()=>G(e.id),className:(0,i.cn)("group relative flex h-[42px] w-[42px] items-center justify-center rounded-full transition-all duration-200",c?"bg-public-accent text-public-accent-foreground shadow-[0_4px_20px_color-mix(in_srgb,var(--public-accent),transparent_50%)] scale-110":r?"bg-public-accent/15 text-public-accent":"bg-public-surface-muted/70 text-public-muted hover:bg-public-surface-muted hover:text-public-foreground hover:scale-110"),title:e.title,children:[r&&!c&&(0,t.jsx)("span",{className:"absolute -left-[13px] top-1/2 -translate-y-1/2 h-[8px] w-[8px] rounded-full bg-primary shadow-[0_0_10px_rgba(99,102,241,0.8)]"}),(0,t.jsx)(l.DynamicIcon,{icon:e.icon||"LuHome",pack:e.pack||void 0,className:o})]},e.id):(0,t.jsxs)(n.default,{href:e.href,className:(0,i.cn)("group relative flex h-[42px] w-[42px] items-center justify-center rounded-full transition-all duration-200",r?"bg-public-accent/15 text-public-accent":"bg-public-surface-muted/70 text-public-muted hover:bg-public-surface-muted hover:text-public-foreground hover:scale-110"),title:e.title,children:[r&&(0,t.jsx)("span",{className:"absolute -left-[13px] top-1/2 -translate-y-1/2 h-[8px] w-[8px] rounded-full bg-primary shadow-[0_0_10px_rgba(99,102,241,0.8)]"}),(0,t.jsx)(l.DynamicIcon,{icon:e.icon||"LuHome",pack:e.pack||void 0,className:o,fallback:(0,t.jsx)("span",{className:"text-[12px] font-extrabold uppercase transition-colors",children:e.title?.[0]||"•"})}),(0,t.jsx)("span",{className:"sr-only",children:e.title})]},e.id)},P[33]=K,P[34]=$,P[35]=r):r=P[35],e=U.map(r),P[29]=U,P[30]=K,P[31]=$,P[32]=e}else e=P[32];P[36]!==e?(w=(0,t.jsx)("div",{className:"flex flex-col items-center gap-1.5 px-[10px] py-3 w-[60px] shrink-0",children:e}),P[36]=e,P[37]=w):w=P[37],N=r&&(0,t.jsx)("div",{className:"border-l border-public-border/60 w-[290px] py-3 pr-3 animate-in fade-in animate-slide-in-left duration-200",children:(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between px-3",children:[(0,t.jsx)("h3",{className:"text-[12px] font-black text-public-muted uppercase tracking-[0.2em]",children:r.title}),r.href&&"#"!==r.href&&(0,t.jsxs)(n.default,{href:r.href,onClick:()=>Y(null),className:"text-[11px] font-bold text-public-accent hover:text-public-accent-hover transition-colors flex items-center gap-0.5",children:["View All",(0,t.jsx)(l.DynamicIcon,{icon:"LuChevronRight",className:"h-3.5 w-3.5"})]})]}),(0,t.jsx)("div",{className:"space-y-4 px-1",children:Object.entries(r.children?.reduce(u,{})||{}).map((e,r)=>{let[a,s]=e;return(0,t.jsxs)("div",{className:"space-y-2.5",children:[a&&(0,t.jsx)("h4",{className:"text-[10px] font-black text-public-muted uppercase tracking-[0.18em] ml-2 opacity-80",children:a}),(0,t.jsx)("div",{className:"grid grid-cols-3 gap-1.5",children:s.map(e=>(0,t.jsxs)(n.default,{href:e.href,onClick:()=>Y(null),className:"group/child flex flex-col items-center justify-center gap-2 p-2.5 rounded-2xl transition-all duration-200 hover:bg-public-accent/10 active:scale-95 shadow-sm hover:shadow-md",children:[(0,t.jsxs)("div",{className:(0,i.cn)("relative flex items-center justify-center w-11 h-11 rounded-3xl transition-transform duration-300 lg:group-hover/child:scale-110","bg-public-surface-muted/70","group-hover/child:bg-public-accent/20"),children:[(0,t.jsx)(l.DynamicIcon,{icon:e.icon,pack:e.pack,className:"h-[20px] w-[20px] text-public-muted group-hover/child:text-public-accent transition-colors"}),!e.isActive&&(0,t.jsx)("span",{className:"absolute -top-0.5 -right-0.5 w-2 h-2 rounded-full bg-red-600 shadow-sm"})]}),(0,t.jsx)("span",{className:"text-[10px] font-bold text-public-muted group-hover/child:text-public-foreground text-center leading-tight transition-colors",children:e.title})]},e.id))})]},a||`cat-${r}`)})})]})}),P[15]=H,P[16]=U,P[17]=K,P[18]=$,P[19]=y,P[20]=w,P[21]=N,P[22]=k,P[23]=_,P[24]=S}else y=P[19],w=P[20],N=P[21],k=P[22],_=P[23],S=P[24];P[38]!==y||P[39]!==w||P[40]!==N?(D=(0,t.jsxs)("div",{className:y,children:[w,N]}),P[38]=y,P[39]=w,P[40]=N,P[41]=D):D=P[41],P[42]!==k||P[43]!==_||P[44]!==D?(C=(0,t.jsx)("div",{ref:k,className:_,children:D}),P[42]=k,P[43]=_,P[44]=D,P[45]=C):C=P[45];let W=!H&&"opacity-60 hover:opacity-100 scale-110";P[46]!==W?(T=(0,i.cn)("flex items-center justify-center h-[32px] w-[16px] transition-all duration-300","rounded-r-lg shadow-sm hover:shadow-md","bg-public-surface/95","border border-l-0 border-public-border/60","backdrop-blur-2xl","text-public-muted hover:text-public-foreground","hover:bg-public-surface-raised hover:w-[20px]","opacity-80 hover:opacity-100",W),P[46]=W,P[47]=T):T=P[47];let J=H?"Hide sidebar":"Show sidebar",Z=H?"LuChevronLeft":"LuChevronRight";P[48]!==Z?(I=(0,t.jsx)(l.DynamicIcon,{icon:Z,className:"h-4 w-4"}),P[48]=Z,P[49]=I):I=P[49],P[50]!==T||P[51]!==J||P[52]!==I||P[53]!==z?(M=(0,t.jsx)("button",{onClick:z,className:T,title:J,children:I}),P[50]=T,P[51]=J,P[52]=I,P[53]=z,P[54]=M):M=P[54];let ee=F?"ring-1 ring-public-accent/50 text-public-accent":"ring-1 ring-public-border/70";P[55]!==ee?(L=(0,i.cn)("flex items-center justify-center h-[30px] w-[20px] transition-all duration-300","rounded-r-lg shadow-sm hover:shadow-md","bg-public-surface","border border-l-0 border-public-border/60","backdrop-blur-2xl","text-public-muted hover:text-public-foreground",ee),P[55]=ee,P[56]=L):L=P[56];let et=F?"Auto mode enabled (click to lock manual mode)":"Manual mode locked (click to enable auto mode)";return P[57]!==F?(A=F?(0,t.jsx)(l.DynamicIcon,{icon:"LuLockOpen",className:"h-3.5 w-3.5"}):(0,t.jsx)(l.DynamicIcon,{icon:"LuLock",className:"h-3.5 w-3.5"}),P[57]=F,P[58]=A):A=P[58],P[59]!==L||P[60]!==et||P[61]!==A||P[62]!==B?(E=(0,t.jsx)("button",{onClick:B,className:L,title:et,children:A}),P[59]=L,P[60]=et,P[61]=A,P[62]=B,P[63]=E):E=P[63],P[64]!==M||P[65]!==E?(O=(0,t.jsxs)("div",{className:"flex flex-col gap-1.5",children:[M,E]}),P[64]=M,P[65]=E,P[66]=O):O=P[66],P[67]!==S||P[68]!==C||P[69]!==O?(R=(0,t.jsxs)("div",{className:S,children:[C,O]}),P[67]=S,P[68]=C,P[69]=O,P[70]=R):R=P[70],R}],802645)},649195,e=>{"use strict";var t=e.i(378369),r=e.i(200003),a=e.i(581971);function n(e,t,r){let n=e.getMutationCache(),s=e.getQueryCache(),i=r?.defaultOptions?.deserializeData??e.getDefaultOptions().hydrate?.deserializeData;t.mutations?.forEach(({state:t,...a})=>{n.build(e,{...e.getDefaultOptions().hydrate?.mutations,...r?.defaultOptions?.mutations,...a},t)}),t.queries?.forEach(({queryKey:t,state:n,queryHash:l,meta:c,promise:o,dehydratedAt:d,queryType:u})=>{let m=o?function(e){let t;if(e.then(e=>(t=e,e),a.noop)?.catch?.(a.noop),void 0!==t)return{data:t}}(o):void 0,p=void 0===n.data?m?.data:n.data,h=void 0===p?p:i?i(p):p,x=s.get(l),f=x?.state.status==="pending",b=x?.state.fetchStatus==="fetching";if(x){let e=m&&d>x.state.dataUpdatedAt;if(n.dataUpdatedAt>x.state.dataUpdatedAt||e){let{fetchStatus:e,...t}=n;x.setState({...t,data:h,..."pending"===n.status&&void 0!==h&&{status:"success",dataUpdatedAt:d,...!b&&{fetchStatus:"idle"}}})}}else x=s.build(e,{...e.getDefaultOptions().hydrate?.queries,...r?.defaultOptions?.queries,queryKey:t,queryHash:l,meta:c,_type:u},{...n,data:h,fetchStatus:"idle",status:"pending"===n.status&&void 0!==h?"success":n.status,..."pending"===n.status&&void 0!==h&&{dataUpdatedAt:d}});!o||m||f||b||!(d>x.state.dataUpdatedAt)||x.fetch(void 0,{initialPromise:Promise.resolve(o).then(i)}).catch(a.noop)})}e.s(["HydrationBoundary",0,({children:e,options:a={},state:s,queryClient:i})=>{let l=(0,t.useQueryClient)(i),c=r.useRef(a);r.useEffect(()=>{c.current=a});let o=r.useMemo(()=>
11{if(s){if("object"!=typeof s)return;let e=l.getQueryCache(),t=s.queries||[],r=[],a=[];for(let n of t){let t=e.get(n.queryHash);t?(n.state.dataUpdatedAt>t.state.dataUpdatedAt||n.promise&&"pending"!==t.state.status&&"fetching"!==t.state.fetchStatus&&n.dehydratedAt>t.state.dataUpdatedAt)&&a.push(n):r.push(n)}if(r.length>0&&n(l,{queries:r},c.current),a.length>0)return a}},[l,s]);return r.useEffect(()=>{o&&n(l,{queries:o},c.current)},[l,o]),e}],649195)}]);
12
13//# debugId=45069faf-42ce-abef-b104-23e647572536

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.