PageSourceSearch

https://pseudo-lab.com/assets/Seasons-DJz-CDLI.js

js pseudo-lab.com collected 2026-10-05 09:45:09 UTC 15,825 bytes, 1 lines download raw bytes

1import{b as P,s as B,af as L,r as y,j as e,O,n as v,ag as T,a9 as V,ah as d,L as j,A as H,g as F,h as U,ai as q,aj as N}from"./index-CiYo4D0k.js";import{B as G}from"./badge-CR4CfwFZ.js";import{S as M}from"./SEO-C9hZmuls.js";const W=new Set(["draft","pending","cancelled"]),J=(t,r)=>!!t&&(t.match(/\d+/g)||[]).some(a=>a===r);function K(t){return P({queryKey:["season-credits",t],queryFn:async()=>{const r=B,{data:a,error:n}=await r.from("projects").select("id, title, image_url, research_group, status, cohort, created_by").or(`cohort.eq.${t},cohort.ilike.%Season ${t}%,cohort.ilike.%${t}기%`);if(n)throw n;const s=(a||[]).filter(i=>J(i.cohort,t)&&!W.has(i.status)),l=s.map(i=>i.id);if(l.length===0)return{projects:[],builderCount:0,runnerCount:0,sessionsHeld:0,blogCount:0,highlightCount:0};const o=new Date().toISOString().slice(0,10),[x,p,b,u,A]=await Promise.all([r.from("project_members").select("project_id, user_id, role, profile:profiles(id, name, profile_image)").in("project_id",l).or("status.eq.active,status.is.null").limit(1e4),r.from("project_view_counts").select("project_id, view_count").in("project_id",l),r.from("blogs").select("related_project_id").in("related_project_id",l).limit(1e4),r.from("project_sessions").select("project_id").in("project_id",l).lte("session_date",o).limit(1e4),r.from("highlights").select("id",{count:"exact",head:!0}).eq("season",t)]),_=(i,h)=>{const g={};return(i||[]).forEach(f=>{f[h]&&(g[f[h]]=(g[f[h]]||0)+1)}),g},D=_(b.data,"related_project_id"),$=_(u.data,"project_id"),S={};(p.data||[]).forEach(i=>{S[i.project_id]=i.view_count||0});const k=new Set,C=new Set;return{projects:s.map(i=>{const h=(x.data||[]).filter(c=>{var R;return c.project_id===i.id&&((R=c.profile)==null?void 0:R.name)}),g=c=>({id:c.user_id,name:c.profile.name,profile_image:c.profile.profile_image}),f=h.filter(c=>c.role==="builder"||c.user_id===i.created_by).map(g),E=h.filter(c=>c.role!=="builder"&&c.user_id!==i.created_by).map(g);return f.forEach(c=>
1k.add(c.id)),E.forEach(c=>C.add(c.id)),{id:i.id,title:i.title,image_url:i.image_url,research_group:i.research_group&&i.research_group!=="none"?i.research_group:null,status:i.status,builders:f,runners:E,views:S[i.id]||0,blogCount:D[i.id]||0,sessionCount:$[i.id]||0}}),builderCount:k.size,runnerCount:C.size,sessionsHeld:(u.data||[]).length,blogCount:(b.data||[]).length,highlightCount:A.count||0}}})}const I=(t,r)=>t.is_current?"current":r&&Number(t.season)>Number(r.season)?"planning":"done";function Q(t){const r=new Date().toISOString().slice(0,10),a=q(t);return[{label:"Builder Recruitment",date:t.builder_recruit_start??t.builder_recruit_end,end:t.builder_recruit_start?t.builder_recruit_end:null},{label:"Builder Announcement",date:t.announcement_date},{label:"Builder Onboarding",date:t.onboarding_start,end:t.onboarding_end},{label:"Runner Recruitment",date:t.runner_recruit_start,end:t.runner_recruit_end},{label:"Season Start",date:t.week1_start},...t.extra_milestones.map(s=>({label:s.label,date:s.date,end:s.end})),{label:"Season Wrap-up",date:a}].filter(s=>!!s.date).sort((s,l)=>s.date.localeCompare(l.date)).map(s=>{const o=(s.end||s.date)<r?"completed":s.date<=r?"active":"upcoming";return{...s,status:o}})}const Y=t=>t.end&&t.end!==t.date?`${N(t.date)} - ${N(t.end).slice(5)}`:N(t.date),X=({seasons:t,current:r,active:a,onChange:n})=>e.jsx("div",{className:"fixed top-16 left-1/2 -translate-x-1/2 md:ml-[130px] z-[70] flex items-center gap-2 bg-black/30 backdrop-blur-xl px-2 py-2 rounded-full border border-white/5 shadow-2xl transition-all duration-300 max-w-[calc(100vw-2rem)] overflow-x-auto",children:t.map(s=>{const l=I(s,r);return e.jsxs("button",{onClick:()=>n(s.season),className:v("px-6 py-2 rounded-full text-xs font-black transition-all duration-500 whitespace-nowrap flex items-center gap-2",a===s.season?"bg-indigo-600 text-white shadow-[0_0_20px_rgba(79,70,229,0.4)] scale-105":"text-gray-400 hover:text-white hover:bg-white/5"),children:[e.jsxs("span",{children:["SEASON ",s.season]}),l==="planning"&&e.jsx("span",{className:"text-[10px] opacity-70 border border-current px-1.5 py-0.5 rounded-sm leading-none",children:"PLANNING"}),l==="done"&&e.jsx("span",{className:"text-[10px] opacity-70 border border-current px-1.5 py-0.5 rounded-sm leading-none",children:"DONE"})]},s.season)})}),Z=({season:t,phase:r})=>{const a=Q(t),n=T(t),s=a.reduce((o,x,p)=>x.status!=="upcoming"?p:o,-1),l=a.length>1&&s>=0?s/(a.length-1)*100:0;return e.jsxs("section",{className:"min-h-screen snap-center flex flex-col items-center justify-start relative bg-sidebar overflow-hidden w-full pt-40 md:pt-48",children:[e.jsx("div",{className:"absolute inset-0 bg-[radial-gradient(ellipse_at_center,_var(--tw-gradient-stops))] from-indigo-900/10 via-sidebar to-sidebar z-0"}),e.jsxs("div",{className:"z-10 text-center w-full max-w-7xl px-4 animate-fade-in-up flex flex-col items-center",children:[e.jsx(G,{variant:"outline",className:v("mb-4 animate-pulse uppercase tracking-[0.2em] px-3 py-1",r==="current"?"border-indigo-500 text-indigo-400 font-bold":r==="planning"?"border-purple-500 text-purple-400 font-bold":"border-gray-500 text-gray-400"),children:r==="current"?n>0&&t.total_weeks&&n<=t.total_weeks?`Now · Week ${n} / ${t.total_weeks}`:"Current Season":r==="planning"?"Coming Soon":"Past Legacy"}),e.jsx("h1",{className:"text-4xl md:text-8xl font-black mb-8 font-display tracking-tight text-transparent bg-clip-text bg-gradient-to-br from-indigo-200 via-white to-purple-200 uppercase",children:t.title}),t.description&&e.jsx("p",{className:"text-base md:text-xl text-muted-foreground/80 mb-16 max-w-2xl mx-auto leading-relaxed px-4 font-light",children:t.description}),a.length>0&&e.jsxs("div",{className:"relative w-full mt-12 md:mt-24",children:[e.jsx("div",{className:"absolute top-1/2 left-0 w-full h-[1px] bg-white/5 -translate-y-1/2"}),e.jsx("div",{className:"absolute top-1/2 left-0 h-0.5 bg-indigo-500 -translate-y-1/2 transition-all duration-1000",style:{width:`${l}%`}}),e.jsx("div",{className:"flex justify-between relative z-10 w-full px-12 md:px-20",children:a.map((o,x)=>{const p=x%2===0;return e.jsxs("div",{className:"flex flex-col items-center group relative h-48 md:h-64 justify-center",children:[e.jsx("div",{className:v("absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-4 h-4 rounded-full border-2 transition-all duration-300 z-20 bg-sidebar",o.status==="completed"?"bg-indigo-500 border-indigo-500":o.status==="active"?"border-indigo-500 shadow-[0_0_15px_rgba(99,102,241,0.5)] scale-125":"border-muted-foreground
1/30")}),e.jsxs("div",{className:v("absolute flex flex-col items-center transition-all duration-300 w-24 md:w-40 text-center",p?"bottom-0":"top-0",o.status==="active"?"opacity-100 translate-y-0":"opacity-50 group-hover:opacity-100"),children:[e.jsx("span",{className:v("text-[10px] md:text-xs font-bold mb-1 uppercase tracking-wider",o.status==="active"?"text-indigo-400":"text-gray-300"),children:o.label}),e.jsx("span",{className:"text-[10px] text-gray-400 font-mono",children:Y(o)})]})]},x)})})]})]}),e.jsxs("div",{onClick:()=>{var o;return(o=document.getElementById("credits-summary"))==null?void 0:o.scrollIntoView({behavior:"smooth"})},className:"absolute bottom-8 left-1/2 -translate-x-1/2 z-20 flex flex-col items-center gap-2 animate-bounce cursor-pointer opacity-80 hover:opacity-100 transition-opacity",children:[e.jsx("span",{className:"text-[10px] font-mono tracking-[0.2em] text-indigo-300/80 uppercase",children:"Scroll"}),e.jsx(V,{className:"w-6 h-6 text-indigo-400"})]})]})},w={hidden:{opacity:0},visible:{opacity:1,transition:{staggerChildren:.2,when:"beforeChildren"}}},z={hidden:{width:"0%"},visible:{width:"100%",transition:{duration:1.5,ease:[.42,0,.58,1]}}},m={hidden:{opacity:0,y:30},visible:{opacity:1,y:0,transition:{duration:.8,ease:[0,0,.2,1]}}},ee=({credits:t,phase:r})=>{const a=[{role:"PROJECTS",value:t.projects.length},{role:"BUILDERS",value:t.builderCount},{role:"RUNNERS",value:t.runnerCount}],n=[{label:"Sessions Held",value:t.sessionsHeld},{label:"Blog Posts",value:t.blogCount},{label:"Highlights",value:t.highlightCount}];return e.jsx(d.section,{id:"credits-summary",className:"h-screen snap-center flex flex-col items-center justify-center bg-black text-white text-center p-4 md:p-8 w-full overflow-hidden",initial:"hidden",whileInView:"visible",viewport:{once:!1,amount:.5},variants:w,children:e.jsxs("div",{className:"space-y-16 w-full max-w-4xl flex flex-col items-center",children:[e.jsx("div",{className:"grid grid-cols-3 gap-6 md:gap-16 w-full",children:a.map(s=>e.jsxs(d.div,{className:"flex flex-col items-center gap-4",variants:m,children:[e.jsx(d.div,{className:"h-[1px] bg-white/20 mb-2 w-full",variants:z}),e.jsx("span",{className:"text-xs md:text-sm font-bold tracking-[0.3em] text-gray-400 uppercase",children:s.role}),e.jsx("span",{className:"text-5xl md:text-7xl font-serif",children:s.value})]},s.role))}),e.jsxs(d.div,{variants:m,className:"flex flex-col items-center gap-6 w-full",children:[e.jsx("span",{className:"text-sm font-bold tracking-[0.3em] text-gray-400 uppercase",children:r==="planning"?"Coming Soon":"Achievements"}),e.jsx("div",{className:"flex flex-wrap justify-center gap-x-12 gap-y-4",children:n.map(s=>e.jsxs("div",{className:"flex flex-col items-center",children:[e.jsx("span",{className:"text-3xl md:text-4xl font-serif text-indigo-300",children:s.value}),e.jsx("span",{className:"text-[11px] tracking-[0.2em] text-gray-500 uppercase mt-1",children:s.label})]},s.label))})]})]})})},te=["MOST VIEWED","RUNNER UP","THIRD PLACE"],se=({projects:t})=>{const r=[...t].sort((a,n)=>n.views-a.views||n.runners.length-a.runners.length).slice(0,3);return e.jsxs(d.section,{className:"h-screen snap-center flex flex-col items-center justify-center bg-zinc-950 text-white p-4 relative overflow-hidden w-full",initial:"hidden",whileInView:"visible",viewport:{once:!1,amount:.3},variants:w,children:[e.jsx(d.h2,{variants:m,className:"text-2xl font-bold tracking-widest text-indigo-400 mb-12 uppercase z-10",children:"Featured Projects"}),e.jsx("div",{className:"flex flex-col md:flex-row gap-6 z-10 w-full max-w-7xl justify-center items-center",children:r.length>0?r.map((a,n)=>e.jsxs(d.div,{variants:m,className:"flex flex-col items-center group relative w-full md:w-1/3",children:[e.jsxs(j,{to:`/projects/${a.id}`,className:"relative aspect-video w-full overflow-hidden rounded-lg mb-6 shadow-2xl border border-white/10 block",children:[e.jsx("img",{src:a.image_url||"/images/project-cover.png",alt:a.title,className:"w-full h-full object-cover grayscale group-hover:grayscale-0 transition-all duration-700 transform group-hover:scale-105"}),e.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-black via-trans
1parent to-transparent opacity-80"}),e.jsx("div",{className:"absolute bottom-4 left-4",children:e.jsxs("span",{className:"text-xs font-bold bg-white/20 backdrop-blur px-2 py-1 rounded text-white",children:[te[n]," · ",a.views.toLocaleString()," views"]})})]}),e.jsx("h3",{className:"text-2xl font-serif italic mb-2 text-center",children:a.title}),e.jsxs("div",{className:"text-center",children:[e.jsx("p",{className:"text-xs text-gray-400 mb-1 tracking-widest",children:"STARRING"}),e.jsx("p",{className:"text-base font-bold text-white mb-1",children:a.builders.map(s=>s.name).join(", ")||"-"}),a.runners.length>0&&e.jsxs("p",{className:"text-xs text-gray-500",children:["WITH ",a.runners.slice(0,5).map(s=>s.name).join(", "),a.runners.length>5?` +${a.runners.length-5}`:""]})]})]},a.id)):e.jsx("div",{className:"text-gray-500 italic",children:"No projects to display yet."})})]})},ae=({projects:t})=>{const r=y.useMemo(()=>{const a=new Map;return t.forEach(n=>{n.research_group&&a.set(n.research_group,[...a.get(n.research_group)||[],n])}),[...a.entries()].sort((n,s)=>s[1].length-n[1].length)},[t]);return r.length===0?null:e.jsxs(d.section,{className:"h-screen snap-center flex flex-col items-center justify-center bg-black text-white p-8",initial:"hidden",whileInView:"visible",viewport:{once:!1,amount:.5},variants:w,children:[e.jsx(d.h2,{variants:m,className:"text-xl font-bold tracking-[0.5em] text-gray-400 mb-20 uppercase",children:"Research Groups"}),e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 gap-x-8 gap-y-12 md:gap-x-12 md:gap-y-16 text-center w-full max-w-6xl px-4",children:r.map(([a,n])=>e.jsxs(d.div,{variants:m,className:"flex flex-col gap-4",children:[e.jsx(d.div,{className:"h-[1px] bg-indigo-500/30 w-full mx-auto",variants:z}),e.jsx("h3",{className:"text-lg font-bold text-indigo-300",children:a}),e.jsx("ul",{className:"space-y-1.5",children:n.map(s=>e.jsx("li",{className:"text-sm text-gray-400",children:e.jsx(j,{to:`/projects/${s.id}`,className:"hover:text-white transition-colors",children:s.title})},s.id))})]},a))})]})},re=({season:t,projects:r})=>{const a=r.filter(n=>n.builders.length+n.runners.length>0);return a.length===0?null:e.jsxs(d.section,{className:"h-screen snap-center flex flex-col items-center justify-center bg-black text-white p-8 relative overflow-hidden",initial:"hidden",whileInView:"visible",viewport:{once:!1,amount:.1},variants:w,children:[e.jsx("div",{className:"absolute inset-0 bg-[radial-gradient(circle_at_center,_var(--tw-gradient-stops))] from-zinc-900 via-black to-black opacity-50"}),e.jsxs(d.h2,{variants:m,className:"text-3xl font-serif italic text-white/90 mb-12 z-10",children:["The Cast of Season ",t]}),e.jsx("div",{className:"w-full max-w-5xl h-[70vh] overflow-y-auto pr-4 z-10 scrollbar-thin scrollbar-thumb-white/10 scrollbar-track-transparent",children:e.jsx("div",{className:"space-y-6",children:a.map(n=>e.jsxs(d.div,{variants:m,className:"flex flex-col md:flex-row md:items-baseline gap-2 md:gap-8 border-b border-white/5 pb-4 last:border-0",children:[e.jsxs("div",{className:"flex flex-col md:items-end min-w-[180px] md:text-right",children:[n.builders.map(s=>e.jsxs(j,{to:`/profile/${s.id}`,className:"text-lg font-bold text-indigo-400 hover:text-indigo-300 transition-colors whitespace-nowrap flex items-center gap-2 md:justify-end",children:[e.jsxs(H,{
1className:"h-5 w-5",children:[e.jsx(F,{src:s.profile_image||void 0}),e.jsx(U,{className:"text-[9px]",children:s.name[0]})]}),s.name]},s.id)),e.jsx(j,{to:`/projects/${n.id}`,className:"text-[11px] text-gray-500 hover:text-gray-300 truncate max-w-[240px]",children:n.title})]}),e.jsx("div",{className:"flex flex-wrap gap-2 text-sm text-gray-400",children:n.runners.map((s,l)=>e.jsxs(j,{to:`/profile/${s.id}`,className:"hover:text-white transition-colors",children:[s.name,l<n.runners.length-1?",":""]},s.id))})]},n.id))})}),e.jsxs(d.div,{variants:m,className:"mt-8 text-xs text-gray-600 font-mono z-10",children:["© ",new Date().getFullYear()," PSEUDO LAB. ALL RIGHTS RESERVED."]})]})};function ce(){var b;const{seasons:t}=L(),r=t.find(u=>u.is_current),[a,n]=y.useState(null),s=a??(r==null?void 0:r.season)??((b=t[0])==null?void 0:b.season),l=t.find(u=>u.season===s)??t[0],o=I(l,r),{data:x,isLoading:p}=K(l.season);return y.useEffect(()=>{const u=document.querySelector(".snap-y");u&&(u.scrollTop=0)},[s]),e.jsxs(e.Fragment,{children:[e.jsx(M,{title:`시즌 ${l.season} 크레딧`,description:"가짜연구소 시즌별 타임라인과 참여 빌더, 프로젝트 크레딧을 확인하세요."}),e.jsx(X,{seasons:t,current:r,active:l.season,onChange:n}),e.jsxs("div",{className:"h-screen overflow-y-scroll snap-y snap-mandatory scroll-smooth bg-black text-sidebar-foreground",children:[e.jsx(Z,{season:l,phase:o}),p||!x?e.jsx("section",{className:"h-screen snap-center flex items-center justify-center bg-black",children:e.jsx(O,{size:32})}):e.jsxs(e.Fragment,{children:[e.jsx(ee,{credits:x,phase:o}),e.jsx(se,{projects:x.projects}),e.jsx(ae,{projects:x.projects}),e.jsx(re,{season:l.season,projects:x.projects})]})]})]})}export{ce as default};

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.