nielsr HF Staff commited on
Commit
ad2d5ac
·
verified ·
1 Parent(s): 0bca2c7

Sync paperswithcode.co frontend

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. assets/{AiDeadlinesView-BSWsDRmK.js → AiDeadlinesView-BpiR-CMK.js} +1 -1
  2. assets/{ApiDocsView-CsxVCUki.js → ApiDocsView-lZRC5CmS.js} +1 -1
  3. assets/{ArtifactWorkspace-DKr_vDVE.js → ArtifactWorkspace-B7lf_s0k.js} +0 -0
  4. assets/AstraForRoboticsView-824Ekipn.js +0 -1
  5. assets/AstraForRoboticsView-DCAUVCFd.js +1 -0
  6. assets/{AuthorDetailView-Oihl6zjT.js → AuthorDetailView-C_IUEkMW.js} +1 -1
  7. assets/{AuthorizePaperEditView-Dz3qJ1uD.js → AuthorizePaperEditView-DWKZVmW5.js} +1 -1
  8. assets/{AutonomousOperations-oGNbl_XB.js → AutonomousOperations-o7cpRdYi.js} +1 -1
  9. assets/{BenchmarkDetailView-1UB0-Ovs.js → BenchmarkDetailView-ZIQHZYt6.js} +2 -2
  10. assets/{BenchmarkTrendSparkline-BoXdeV6Z.js → BenchmarkTrendSparkline-pMSWvnek.js} +1 -1
  11. assets/{ChatView-BpLTEg-e.js → ChatView-Cb4CdzFN.js} +0 -0
  12. assets/ConferenceDetailView-DD9ghAwd.js +1 -0
  13. assets/ConferenceDetailView-bCN1GRtD.js +0 -1
  14. assets/ConferenceTaskView-DJwrrg0s.js +1 -0
  15. assets/ConferenceTaskView-Duh9rAYL.js +0 -1
  16. assets/{ConferencesIndexView-DKJZtkM5.js → ConferencesIndexView-D7asrqn9.js} +1 -1
  17. assets/{CronDashboard-B62cooEW.js → CronDashboard-CP9b6Xpq.js} +1 -1
  18. assets/{ExternalSourceEvalBadge-BJe3a3TH.js → ExternalSourceEvalBadge-EZz5hzfp.js} +1 -1
  19. assets/FeedView-BrBUKcjm.js +1 -0
  20. assets/FeedView-Bzfxs45a.js +0 -1
  21. assets/FrameworksIndexView-DZvX4Al4.js +0 -1
  22. assets/FrameworksIndexView-DexMmVPV.js +1 -0
  23. assets/LatexTitle-C3kQa1rr.js +0 -1
  24. assets/LatexTitle-Cd92uzqM.js +2 -0
  25. assets/{MarkdownText-B1RI0BDb.js → MarkdownText-OPahlM9D.js} +1 -1
  26. assets/{McpView-DBHMIVVB.js → McpView-CU89Lxff.js} +1 -1
  27. assets/MethodDetailView-B36ncCT5.js +0 -1
  28. assets/MethodDetailView-B9lNVgdr.js +1 -0
  29. assets/{MethodsIndexView-BDhB-5-e.js → MethodsIndexView-yUwvWQMH.js} +1 -1
  30. assets/{NotFound-BIkKS5G_.js → NotFound-B_m3ewwi.js} +1 -1
  31. assets/{OrganizationContributionGraph-79vg2bLM.js → OrganizationContributionGraph-BCf6UI-1.js} +1 -1
  32. assets/OrganizationDetailView-DQ01_2sv.js +1 -0
  33. assets/OrganizationDetailView-QywY5Dw8.js +0 -1
  34. assets/{OrganizationPaperFeed-vDOTWCNa.js → OrganizationPaperFeed-DKywRtt2.js} +1 -1
  35. assets/OrganizationTaskView-CMEbfWkO.js +0 -1
  36. assets/OrganizationTaskView-Cm6_HluA.js +1 -0
  37. assets/{OrganizationsIndexView-UI3J0rqs.js → OrganizationsIndexView-Bnj1k6WC.js} +1 -1
  38. assets/{PaperDateFilter-GmvHJTjc.js → PaperDateFilter-CwWio6o1.js} +1 -1
  39. assets/{PaperDetailView-BrV1MkbN.js → PaperDetailView-7XF100Ab.js} +0 -0
  40. assets/{PaperPreviewLink-D5_ka8a2.js → PaperPreviewLink-BaxpCHGH.js} +1 -1
  41. assets/PaperReaderView-C9PdgbAR.js +0 -1
  42. assets/PaperReaderView-DqaAd3re.js +1 -0
  43. assets/PapersListView-DNBWUF1o.js +0 -1
  44. assets/PapersListView-Dnf8Enmr.js +1 -0
  45. assets/{PrivacyView-DH9UoMhd.js → PrivacyView-D0_TASOw.js} +1 -1
  46. assets/{RateLimitsView-DypxuNTs.js → RateLimitsView-CGA-3Q_X.js} +1 -1
  47. assets/SavedPapersView-CAy7RQFY.js +1 -0
  48. assets/SavedPapersView-OFhLntHy.js +0 -1
  49. assets/SearchOverlay-DPjF08Vt.js +0 -1
  50. assets/SearchOverlay-DdIBp4Kv.js +1 -0
assets/{AiDeadlinesView-BSWsDRmK.js → AiDeadlinesView-BpiR-CMK.js} RENAMED
@@ -1,3 +1,3 @@
1
- import{r as x,j as t}from"./index-D1SFE8tx.js";import{u as A}from"./useQuery-8sGgldYe.js";import{c as B}from"./catalog-BIqvVz-s.js";import{S as U}from"./switch-B1HRZ8EN.js";import{S as W}from"./skeleton-D5wy8oMn.js";import{A as O,a as V}from"./alert-D8tgAf4z.js";import{s as z}from"./safeExternalHref-CkBrsh84.js";import{D as P,a as G,b as Y,c as H,d as K}from"./dialog-PZJPRYO-.js";import"./index-BSnsepdJ.js";const b=1e3*60*60*24,S={urgent:"#c0392b",soon:"#b9770e",normal:"#3f7d3f",passed:"var(--ink-faint)"},k=e=>e.split("-").map(a=>a.charAt(0).toUpperCase()+a.slice(1)).join(" "),q=new Set(["machine-learning","computer-vision","natural-language-processing","data-mining","robotics","computer-graphics","human-computer-interaction","web-search","signal-processing","representation-learning","reinforcement-learning","optimization-methods","large-language-models","information-retrieval","speech","mathematics"]),Q=e=>e.trim().toLowerCase().replace(/\s+/g,"-"),D=e=>Array.from(new Set((e.tags??[]).map(Q).filter(a=>q.has(a)))),F=e=>new Date(e).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}),I=(e,a)=>{if(!e)return null;const n=new Date(`${e}T00:00:00`),r=a?new Date(`${a}T00:00:00`):null,o=s=>s.toLocaleDateString("en-US",{month:"long",day:"numeric"}),i=n.getFullYear();return r&&r.getTime()!==n.getTime()?n.getMonth()===r.getMonth()?`${o(n).replace(/\d+$/,"").trim()} ${n.getDate()}–${r.getDate()}, ${i}`:`${o(n)} – ${o(r)}, ${i}`:`${o(n)}, ${i}`},M=e=>[...e.deadlines??[]].sort((a,n)=>new Date(a.deadline_at).getTime()-new Date(n.deadline_at).getTime()),T=(e,a)=>M(e).find(n=>new Date(n.deadline_at).getTime()>a)??null,L=e=>{const a=M(e);return a.length?a[a.length-1]:null},J=(e,a)=>{const n=e-a;if(n<=0)return"Deadline passed";const r=Math.floor(n/b);if(r>=1){const s=Math.floor((n-r*b)/36e5);return`in ${r}d ${s}h`}const o=Math.floor(n/(1e3*60*60));return o>=1?`in ${o}h`:`in ${Math.max(1,Math.floor(n/(1e3*60)))}m`},X=(e,a)=>{const n=e-a;if(n<=0)return"Deadline passed";const r=Math.floor(n/b),o=Math.floor(n%b/(1e3*60*60)),i=Math.floor(n%(1e3*60*60)/(1e3*60)),s=Math.floor(n%(1e3*60)/1e3);return`${r}d ${o}h ${i}m ${s}s`},_=(e,a)=>{if(e==null)return S.passed;const n=(e-a)/b;return n<=0?S.passed:n<=7?S.urgent:n<=30?S.soon:S.normal},$={fontFamily:"var(--mono)",fontSize:10,letterSpacing:"0.12em",textTransform:"uppercase",color:"var(--ink-faint)"},Z=(e,a)=>{const n=Math.ceil((e-a)/b);return n<=0?"passed":`${n} ${n===1?"day":"days"}`},R=(e,a)=>{const n=I(e.start_date,e.end_date),r=e.venue||[e.city,e.country].filter(Boolean).join(", ");return[`${a.label||a.type||"Deadline"} for ${e.name}`,n?`Dates: ${n}`:null,r?`Location: ${r}`:null,e.url?`Website: ${e.url}`:null].filter(Boolean).join(`
2
  `)},C=e=>e.toISOString().replace(/[-:]/g,"").replace(/\.\d{3}/,""),ee=(e,a)=>{const n=new Date(a.deadline_at),r=new Date(n.getTime()+60*60*1e3),o=`${e.short_name||e.name} ${a.label||a.type||"deadline"}`,i=e.venue||[e.city,e.country].filter(Boolean).join(", "),s=`https://calendar.google.com/calendar/render?action=TEMPLATE&text=${encodeURIComponent(o)}&dates=${C(n)}/${C(r)}&details=${encodeURIComponent(R(e,a))}&location=${encodeURIComponent(i)}`,m=z(s);m&&window.open(m,"_blank","noopener,noreferrer")},te=(e,a)=>{const n=new Date(a.deadline_at),r=new Date(n.getTime()+60*60*1e3),o=`${e.short_name||e.name} ${a.label||a.type||"deadline"}`,i=e.venue||[e.city,e.country].filter(Boolean).join(", "),s=["BEGIN:VCALENDAR","VERSION:2.0","BEGIN:VEVENT",e.url?`URL:${e.url}`:null,`DTSTART:${C(n)}`,`DTEND:${C(r)}`,`SUMMARY:${o}`,`DESCRIPTION:${R(e,a).replace(/\n/g,"\\n")}`,i?`LOCATION:${i}`:null,"END:VEVENT","END:VCALENDAR"].filter(Boolean).join(`
3
  `),m=new Blob([s],{type:"text/calendar;charset=utf-8"}),c=document.createElement("a");c.href=URL.createObjectURL(m),c.download=`${(e.short_name||e.name).toLowerCase().replace(/\s+/g,"-")}-deadline.ics`,document.body.appendChild(c),c.click(),document.body.removeChild(c),URL.revokeObjectURL(c.href)},ne=({conf:e,open:a,onOpenChange:n})=>{const[r,o]=x.useState(()=>Date.now());x.useEffect(()=>{if(!a)return;o(Date.now());const d=setInterval(()=>o(Date.now()),1e3);return()=>clearInterval(d)},[a]);const i=x.useMemo(()=>e?M(e):[],[e]),s=x.useMemo(()=>e?T(e,r):null,[e,r]),m=e?I(e.start_date,e.end_date):null,c=e?e.venue||[e.city,e.country].filter(Boolean).join(", ")||e.location:null,u=s?new Date(s.deadline_at).getTime():null;return t.jsx(P,{open:a,onOpenChange:n,children:t.jsx(G,{className:"max-w-xl",style:{background:"var(--bg-elevated)",maxHeight:"85vh",overflowY:"auto"},children:e&&t.jsxs(t.Fragment,{children:[t.jsxs(Y,{children:[t.jsx(H,{asChild:!0,children:t.jsx("h2",{style:{fontFamily:"var(--serif)",fontSize:26,fontWeight:500,letterSpacing:"-0.01em",margin:0},children:e.short_name?`${e.short_name} ${e.year??""}`.trim():e.name})}),e.short_name&&e.name||e.description?t.jsx(K,{asChild:!0,children:t.jsx("span",{style:{fontFamily:"var(--serif)",fontSize:14,color:"var(--ink-soft)"},children:e.short_name?e.name:e.description})}):null]}),t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:20,marginTop:4},children:[t.jsxs("div",{style:{display:"flex",flexWrap:"wrap",gap:24},children:[m&&t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:4},children:[t.jsx("span",{style:$,children:"Dates"}),t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:13,color:"var(--ink-soft)"},children:m})]}),c&&t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:4},children:[t.jsx("span",{style:$,children:"Venue"}),t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:13,color:"var(--ink-soft)"},children:c})]})]}),u!=null&&t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:4,padding:"12px 14px",borderRadius:8,background:"var(--bg-subtle)",border:"1px solid var(--hairline)"},children:[t.jsx("span",{style:$,children:"Next deadline in"}),t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:22,fontWeight:600,color:_(u,r)},children:X(u,r)})]}),t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:8},children:[t.jsx("span",{style:$,children:"Important deadlines"}),i.length===0?t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:13,color:"var(--ink-faint)"},children:"No deadlines listed"}):i.map((d,p)=>{const y=new Date(d.deadline_at).getTime(),l=s!=null&&d.deadline_at===s.deadline_at&&d.type===s.type,h=y<=r;return t.jsxs("div",{style:{display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:12,padding:"8px 12px",borderRadius:6,background:l?"var(--accent-soft)":"transparent",border:l?"1px solid var(--hairline-strong)":"1px solid var(--hairline)",opacity:h&&!l?.55:1},children:[t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:2},children:[t.jsxs("span",{style:{fontFamily:"var(--mono)",fontSize:13,color:"var(--ink)",fontWeight:l?600:400},children:[d.label||k(d.type||"deadline"),l&&t.jsx("span",{style:{...$,marginLeft:8},children:"Next"})]}),t.jsxs("span",{style:{fontFamily:"var(--mono)",fontSize:12,color:"var(--ink-faint)"},children:[F(d.deadline_at),d.timezone?` · ${d.timezone}`:""]})]}),t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:12,fontWeight:600,whiteSpace:"nowrap",color:_(h?null:y,r)},children:Z(y,r)})]},`${d.type??"deadline"}-${p}`)})]}),D(e).length>0&&t.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:6},children:D(e).map(d=>t.jsx("span",{className:"tag-chip",style:{background:"var(--bg-subtle)",color:"var(--ink-soft)"},children:k(d)},d))}),t.jsxs("div",{style:{display:"flex",flexWrap:"wrap",alignItems:"center",gap:16,paddingTop:12,borderTop:"1px solid var(--hairline)"},children:[e.url&&t.jsx("a",{href:z(e.url)??void 0,target:"_blank",rel:"noopener noreferrer",style:{fontFamily:"var(--mono)",fontSize:12,color:"var(--accent-text)"},children:"Visit website ↗"}),s&&t.jsxs("div",{style:{display:"flex",gap:12,marginLeft:"auto"},children:[t.jsx("button",{type:"button",className:"tag-chip",onClick:()=>ee(e,s),style:{background:"var(--bg-subtle)",color:"var(--ink-soft)"},children:"+ Google Calendar"}),t.jsx("button",{type:"button",className:"tag-chip",onClick:()=>te(e,s),style:{background:"var(--bg-subtle)",color:"var(--ink-soft)"},children:"+ Apple / .ics"})]})]})]})]})})})},E=({id:e,label:a,checked:n,onChange:r})=>t.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,fontFamily:"var(--mono)",fontSize:12,color:"var(--ink-soft)"},children:[t.jsx(U,{id:e,checked:n,onCheckedChange:r}),t.jsx("label",{htmlFor:e,style:{cursor:"pointer"},children:a})]}),ae=({conf:e,now:a,selectedDomains:n,onToggleDomain:r,onOpen:o})=>{const i=T(e,a),s=i??L(e),m=s?new Date(s.deadline_at).getTime():null,c=_(i?m:null,a),u=I(e.start_date,e.end_date),d=[e.city??null,e.country??null].filter(Boolean).join(", ");return t.jsxs("div",{role:"button",tabIndex:0,onClick:()=>o(e),onKeyDown:p=>{(p.key==="Enter"||p.key===" ")&&(p.preventDefault(),o(e))},style:{border:"1px solid var(--hairline)",borderRadius:8,padding:20,background:"var(--bg-elevated)",display:"flex",flexDirection:"column",gap:12,cursor:"pointer"},children:[t.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"baseline",gap:12},children:[t.jsx("h3",{style:{fontFamily:"var(--serif)",fontSize:20,fontWeight:500,letterSpacing:"-0.01em",margin:0},children:e.short_name?`${e.short_name} ${e.year??""}`.trim():e.name}),e.url&&t.jsx("a",{href:z(e.url)??void 0,target:"_blank",rel:"noopener noreferrer",onClick:p=>p.stopPropagation(),style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--accent-text)",whiteSpace:"nowrap"},children:"website ↗"})]}),t.jsxs("div",{style:{display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:12,paddingBottom:12,borderBottom:"1px solid var(--hairline)"},children:[t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:2},children:[t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)"},children:(s==null?void 0:s.label)||(s==null?void 0:s.type)||"Deadline"}),t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:12,color:"var(--ink-soft)"},children:s?`${F(s.deadline_at)}${s.timezone?` · ${s.timezone}`:""}`:"TBD"})]}),t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:14,fontWeight:600,color:c,whiteSpace:"nowrap"},children:m!=null?J(m,a):"TBD"})]}),t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:4,fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)"},children:[u&&t.jsx("span",{children:u}),d&&t.jsx("span",{children:d})]}),D(e).length>0&&t.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:6},children:D(e).map(p=>{const y=n.has(p);return t.jsx("button",{className:"tag-chip",onClick:l=>{l.stopPropagation(),r(p)},style:{background:y?"var(--ink)":"var(--bg-subtle)",color:y?"var(--bg)":"var(--ink-soft)"},children:k(p)},p)})})]})},ue=()=>{const[e,a]=x.useState(!0),[n,r]=x.useState(!1),[o,i]=x.useState(new Set),[s,m]=x.useState(null),c=x.useMemo(()=>Date.now(),[]),u=A({queryKey:["conference-deadlines"],queryFn:()=>B.conferenceDeadlines(),staleTime:10*60*1e3}),d=l=>{i(h=>{const g=new Set(h);return g.has(l)?g.delete(l):g.add(l),g})},p=x.useMemo(()=>{var h;const l=new Map;return(h=u.data)==null||h.results.forEach(g=>{D(g).forEach(j=>l.set(j,(l.get(j)??0)+1))}),Array.from(l.entries()).sort((g,j)=>j[1]-g[1]).map(([g])=>g)},[u.data]),y=x.useMemo(()=>{var j;const h=(((j=u.data)==null?void 0:j.results)??[]).filter(f=>!(e&&f.tier!=="a"||o.size>0&&!D(f).some(v=>o.has(v))||!n&&!T(f,c))),g=f=>{const w=T(f,c);if(w)return{group:0,time:new Date(w.deadline_at).getTime()};const v=L(f);return{group:1,time:-(v?new Date(v.deadline_at).getTime():0)}};return[...h].sort((f,w)=>{const v=g(f),N=g(w);return v.group!==N.group?v.group-N.group:v.time-N.time})},[u.data,e,n,o,c]);return u.error?t.jsx("div",{className:"page",children:t.jsx(O,{variant:"destructive",children:t.jsx(V,{children:"Failed to load conference deadlines. Please try again."})})}):t.jsxs("div",{className:"page",children:[t.jsx("div",{className:"feed-header",children:t.jsxs("div",{children:[t.jsxs("h1",{className:"feed-title",children:["AI Conference ",t.jsx("em",{children:"Deadlines"})]}),t.jsx("div",{className:"feed-subtitle",children:"Upcoming submission deadlines for major AI conferences, counting down."})]})}),t.jsxs("div",{style:{display:"flex",flexWrap:"wrap",alignItems:"center",gap:20,padding:"16px 0",borderBottom:"1px solid var(--hairline)",marginBottom:24},children:[t.jsx(E,{id:"top-tier-only",label:"Top tier only",checked:e,onChange:a}),t.jsx(E,{id:"show-past",label:"Show past conferences",checked:n,onChange:r})]}),p.length>0&&t.jsxs("div",{style:{display:"flex",flexWrap:"wrap",gap:6,marginBottom:24},children:[p.map(l=>{const h=o.has(l);return t.jsx("button",{className:"tag-chip",onClick:()=>d(l),style:{background:h?"var(--ink)":"var(--bg-subtle)",color:h?"var(--bg)":"var(--ink-soft)"},children:k(l)},l)}),o.size>0&&t.jsx("button",{className:"tag-chip",onClick:()=>i(new Set),style:{background:"transparent",color:"var(--ink-faint)"},children:"Clear ✕"})]}),t.jsx("div",{className:"sort-bar",children:t.jsx("div",{className:"results-count",children:u.isLoading?"…":`${y.length} conferences`})}),u.isLoading?t.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(320px, 1fr))",gap:16},children:Array.from({length:6}).map((l,h)=>t.jsx(W,{className:"h-44"},h))}):y.length===0?t.jsxs("div",{className:"no-results",children:["No conferences match these filters",n?".":" — try enabling “Show past conferences”."]}):t.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(320px, 1fr))",gap:16},children:y.map(l=>t.jsx(ae,{conf:l,now:c,selectedDomains:o,onToggleDomain:d,onOpen:m},l.id))}),t.jsx(ne,{conf:s,open:s!==null,onOpenChange:l=>{l||m(null)}})]})};export{ue as default};
 
1
+ import{r as x,j as t}from"./index-D6NpXxup.js";import{u as A}from"./useQuery-BSzsAAZV.js";import{c as B}from"./catalog-BkXnDjBr.js";import{S as U}from"./switch-olpoIwHJ.js";import{S as W}from"./skeleton-BZlAxqUu.js";import{A as O,a as V}from"./alert-CEE7Xf4h.js";import{s as z}from"./safeExternalHref-CkBrsh84.js";import{D as P,a as G,b as Y,c as H,d as K}from"./dialog-DSbe7eWD.js";import"./index-B_aDrAP7.js";const b=1e3*60*60*24,S={urgent:"#c0392b",soon:"#b9770e",normal:"#3f7d3f",passed:"var(--ink-faint)"},k=e=>e.split("-").map(a=>a.charAt(0).toUpperCase()+a.slice(1)).join(" "),q=new Set(["machine-learning","computer-vision","natural-language-processing","data-mining","robotics","computer-graphics","human-computer-interaction","web-search","signal-processing","representation-learning","reinforcement-learning","optimization-methods","large-language-models","information-retrieval","speech","mathematics"]),Q=e=>e.trim().toLowerCase().replace(/\s+/g,"-"),D=e=>Array.from(new Set((e.tags??[]).map(Q).filter(a=>q.has(a)))),F=e=>new Date(e).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}),I=(e,a)=>{if(!e)return null;const n=new Date(`${e}T00:00:00`),r=a?new Date(`${a}T00:00:00`):null,o=s=>s.toLocaleDateString("en-US",{month:"long",day:"numeric"}),i=n.getFullYear();return r&&r.getTime()!==n.getTime()?n.getMonth()===r.getMonth()?`${o(n).replace(/\d+$/,"").trim()} ${n.getDate()}–${r.getDate()}, ${i}`:`${o(n)} – ${o(r)}, ${i}`:`${o(n)}, ${i}`},M=e=>[...e.deadlines??[]].sort((a,n)=>new Date(a.deadline_at).getTime()-new Date(n.deadline_at).getTime()),T=(e,a)=>M(e).find(n=>new Date(n.deadline_at).getTime()>a)??null,L=e=>{const a=M(e);return a.length?a[a.length-1]:null},J=(e,a)=>{const n=e-a;if(n<=0)return"Deadline passed";const r=Math.floor(n/b);if(r>=1){const s=Math.floor((n-r*b)/36e5);return`in ${r}d ${s}h`}const o=Math.floor(n/(1e3*60*60));return o>=1?`in ${o}h`:`in ${Math.max(1,Math.floor(n/(1e3*60)))}m`},X=(e,a)=>{const n=e-a;if(n<=0)return"Deadline passed";const r=Math.floor(n/b),o=Math.floor(n%b/(1e3*60*60)),i=Math.floor(n%(1e3*60*60)/(1e3*60)),s=Math.floor(n%(1e3*60)/1e3);return`${r}d ${o}h ${i}m ${s}s`},_=(e,a)=>{if(e==null)return S.passed;const n=(e-a)/b;return n<=0?S.passed:n<=7?S.urgent:n<=30?S.soon:S.normal},$={fontFamily:"var(--mono)",fontSize:10,letterSpacing:"0.12em",textTransform:"uppercase",color:"var(--ink-faint)"},Z=(e,a)=>{const n=Math.ceil((e-a)/b);return n<=0?"passed":`${n} ${n===1?"day":"days"}`},R=(e,a)=>{const n=I(e.start_date,e.end_date),r=e.venue||[e.city,e.country].filter(Boolean).join(", ");return[`${a.label||a.type||"Deadline"} for ${e.name}`,n?`Dates: ${n}`:null,r?`Location: ${r}`:null,e.url?`Website: ${e.url}`:null].filter(Boolean).join(`
2
  `)},C=e=>e.toISOString().replace(/[-:]/g,"").replace(/\.\d{3}/,""),ee=(e,a)=>{const n=new Date(a.deadline_at),r=new Date(n.getTime()+60*60*1e3),o=`${e.short_name||e.name} ${a.label||a.type||"deadline"}`,i=e.venue||[e.city,e.country].filter(Boolean).join(", "),s=`https://calendar.google.com/calendar/render?action=TEMPLATE&text=${encodeURIComponent(o)}&dates=${C(n)}/${C(r)}&details=${encodeURIComponent(R(e,a))}&location=${encodeURIComponent(i)}`,m=z(s);m&&window.open(m,"_blank","noopener,noreferrer")},te=(e,a)=>{const n=new Date(a.deadline_at),r=new Date(n.getTime()+60*60*1e3),o=`${e.short_name||e.name} ${a.label||a.type||"deadline"}`,i=e.venue||[e.city,e.country].filter(Boolean).join(", "),s=["BEGIN:VCALENDAR","VERSION:2.0","BEGIN:VEVENT",e.url?`URL:${e.url}`:null,`DTSTART:${C(n)}`,`DTEND:${C(r)}`,`SUMMARY:${o}`,`DESCRIPTION:${R(e,a).replace(/\n/g,"\\n")}`,i?`LOCATION:${i}`:null,"END:VEVENT","END:VCALENDAR"].filter(Boolean).join(`
3
  `),m=new Blob([s],{type:"text/calendar;charset=utf-8"}),c=document.createElement("a");c.href=URL.createObjectURL(m),c.download=`${(e.short_name||e.name).toLowerCase().replace(/\s+/g,"-")}-deadline.ics`,document.body.appendChild(c),c.click(),document.body.removeChild(c),URL.revokeObjectURL(c.href)},ne=({conf:e,open:a,onOpenChange:n})=>{const[r,o]=x.useState(()=>Date.now());x.useEffect(()=>{if(!a)return;o(Date.now());const d=setInterval(()=>o(Date.now()),1e3);return()=>clearInterval(d)},[a]);const i=x.useMemo(()=>e?M(e):[],[e]),s=x.useMemo(()=>e?T(e,r):null,[e,r]),m=e?I(e.start_date,e.end_date):null,c=e?e.venue||[e.city,e.country].filter(Boolean).join(", ")||e.location:null,u=s?new Date(s.deadline_at).getTime():null;return t.jsx(P,{open:a,onOpenChange:n,children:t.jsx(G,{className:"max-w-xl",style:{background:"var(--bg-elevated)",maxHeight:"85vh",overflowY:"auto"},children:e&&t.jsxs(t.Fragment,{children:[t.jsxs(Y,{children:[t.jsx(H,{asChild:!0,children:t.jsx("h2",{style:{fontFamily:"var(--serif)",fontSize:26,fontWeight:500,letterSpacing:"-0.01em",margin:0},children:e.short_name?`${e.short_name} ${e.year??""}`.trim():e.name})}),e.short_name&&e.name||e.description?t.jsx(K,{asChild:!0,children:t.jsx("span",{style:{fontFamily:"var(--serif)",fontSize:14,color:"var(--ink-soft)"},children:e.short_name?e.name:e.description})}):null]}),t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:20,marginTop:4},children:[t.jsxs("div",{style:{display:"flex",flexWrap:"wrap",gap:24},children:[m&&t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:4},children:[t.jsx("span",{style:$,children:"Dates"}),t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:13,color:"var(--ink-soft)"},children:m})]}),c&&t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:4},children:[t.jsx("span",{style:$,children:"Venue"}),t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:13,color:"var(--ink-soft)"},children:c})]})]}),u!=null&&t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:4,padding:"12px 14px",borderRadius:8,background:"var(--bg-subtle)",border:"1px solid var(--hairline)"},children:[t.jsx("span",{style:$,children:"Next deadline in"}),t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:22,fontWeight:600,color:_(u,r)},children:X(u,r)})]}),t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:8},children:[t.jsx("span",{style:$,children:"Important deadlines"}),i.length===0?t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:13,color:"var(--ink-faint)"},children:"No deadlines listed"}):i.map((d,p)=>{const y=new Date(d.deadline_at).getTime(),l=s!=null&&d.deadline_at===s.deadline_at&&d.type===s.type,h=y<=r;return t.jsxs("div",{style:{display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:12,padding:"8px 12px",borderRadius:6,background:l?"var(--accent-soft)":"transparent",border:l?"1px solid var(--hairline-strong)":"1px solid var(--hairline)",opacity:h&&!l?.55:1},children:[t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:2},children:[t.jsxs("span",{style:{fontFamily:"var(--mono)",fontSize:13,color:"var(--ink)",fontWeight:l?600:400},children:[d.label||k(d.type||"deadline"),l&&t.jsx("span",{style:{...$,marginLeft:8},children:"Next"})]}),t.jsxs("span",{style:{fontFamily:"var(--mono)",fontSize:12,color:"var(--ink-faint)"},children:[F(d.deadline_at),d.timezone?` · ${d.timezone}`:""]})]}),t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:12,fontWeight:600,whiteSpace:"nowrap",color:_(h?null:y,r)},children:Z(y,r)})]},`${d.type??"deadline"}-${p}`)})]}),D(e).length>0&&t.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:6},children:D(e).map(d=>t.jsx("span",{className:"tag-chip",style:{background:"var(--bg-subtle)",color:"var(--ink-soft)"},children:k(d)},d))}),t.jsxs("div",{style:{display:"flex",flexWrap:"wrap",alignItems:"center",gap:16,paddingTop:12,borderTop:"1px solid var(--hairline)"},children:[e.url&&t.jsx("a",{href:z(e.url)??void 0,target:"_blank",rel:"noopener noreferrer",style:{fontFamily:"var(--mono)",fontSize:12,color:"var(--accent-text)"},children:"Visit website ↗"}),s&&t.jsxs("div",{style:{display:"flex",gap:12,marginLeft:"auto"},children:[t.jsx("button",{type:"button",className:"tag-chip",onClick:()=>ee(e,s),style:{background:"var(--bg-subtle)",color:"var(--ink-soft)"},children:"+ Google Calendar"}),t.jsx("button",{type:"button",className:"tag-chip",onClick:()=>te(e,s),style:{background:"var(--bg-subtle)",color:"var(--ink-soft)"},children:"+ Apple / .ics"})]})]})]})]})})})},E=({id:e,label:a,checked:n,onChange:r})=>t.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,fontFamily:"var(--mono)",fontSize:12,color:"var(--ink-soft)"},children:[t.jsx(U,{id:e,checked:n,onCheckedChange:r}),t.jsx("label",{htmlFor:e,style:{cursor:"pointer"},children:a})]}),ae=({conf:e,now:a,selectedDomains:n,onToggleDomain:r,onOpen:o})=>{const i=T(e,a),s=i??L(e),m=s?new Date(s.deadline_at).getTime():null,c=_(i?m:null,a),u=I(e.start_date,e.end_date),d=[e.city??null,e.country??null].filter(Boolean).join(", ");return t.jsxs("div",{role:"button",tabIndex:0,onClick:()=>o(e),onKeyDown:p=>{(p.key==="Enter"||p.key===" ")&&(p.preventDefault(),o(e))},style:{border:"1px solid var(--hairline)",borderRadius:8,padding:20,background:"var(--bg-elevated)",display:"flex",flexDirection:"column",gap:12,cursor:"pointer"},children:[t.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"baseline",gap:12},children:[t.jsx("h3",{style:{fontFamily:"var(--serif)",fontSize:20,fontWeight:500,letterSpacing:"-0.01em",margin:0},children:e.short_name?`${e.short_name} ${e.year??""}`.trim():e.name}),e.url&&t.jsx("a",{href:z(e.url)??void 0,target:"_blank",rel:"noopener noreferrer",onClick:p=>p.stopPropagation(),style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--accent-text)",whiteSpace:"nowrap"},children:"website ↗"})]}),t.jsxs("div",{style:{display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:12,paddingBottom:12,borderBottom:"1px solid var(--hairline)"},children:[t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:2},children:[t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)"},children:(s==null?void 0:s.label)||(s==null?void 0:s.type)||"Deadline"}),t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:12,color:"var(--ink-soft)"},children:s?`${F(s.deadline_at)}${s.timezone?` · ${s.timezone}`:""}`:"TBD"})]}),t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:14,fontWeight:600,color:c,whiteSpace:"nowrap"},children:m!=null?J(m,a):"TBD"})]}),t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:4,fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)"},children:[u&&t.jsx("span",{children:u}),d&&t.jsx("span",{children:d})]}),D(e).length>0&&t.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:6},children:D(e).map(p=>{const y=n.has(p);return t.jsx("button",{className:"tag-chip",onClick:l=>{l.stopPropagation(),r(p)},style:{background:y?"var(--ink)":"var(--bg-subtle)",color:y?"var(--bg)":"var(--ink-soft)"},children:k(p)},p)})})]})},ue=()=>{const[e,a]=x.useState(!0),[n,r]=x.useState(!1),[o,i]=x.useState(new Set),[s,m]=x.useState(null),c=x.useMemo(()=>Date.now(),[]),u=A({queryKey:["conference-deadlines"],queryFn:()=>B.conferenceDeadlines(),staleTime:10*60*1e3}),d=l=>{i(h=>{const g=new Set(h);return g.has(l)?g.delete(l):g.add(l),g})},p=x.useMemo(()=>{var h;const l=new Map;return(h=u.data)==null||h.results.forEach(g=>{D(g).forEach(j=>l.set(j,(l.get(j)??0)+1))}),Array.from(l.entries()).sort((g,j)=>j[1]-g[1]).map(([g])=>g)},[u.data]),y=x.useMemo(()=>{var j;const h=(((j=u.data)==null?void 0:j.results)??[]).filter(f=>!(e&&f.tier!=="a"||o.size>0&&!D(f).some(v=>o.has(v))||!n&&!T(f,c))),g=f=>{const w=T(f,c);if(w)return{group:0,time:new Date(w.deadline_at).getTime()};const v=L(f);return{group:1,time:-(v?new Date(v.deadline_at).getTime():0)}};return[...h].sort((f,w)=>{const v=g(f),N=g(w);return v.group!==N.group?v.group-N.group:v.time-N.time})},[u.data,e,n,o,c]);return u.error?t.jsx("div",{className:"page",children:t.jsx(O,{variant:"destructive",children:t.jsx(V,{children:"Failed to load conference deadlines. Please try again."})})}):t.jsxs("div",{className:"page",children:[t.jsx("div",{className:"feed-header",children:t.jsxs("div",{children:[t.jsxs("h1",{className:"feed-title",children:["AI Conference ",t.jsx("em",{children:"Deadlines"})]}),t.jsx("div",{className:"feed-subtitle",children:"Upcoming submission deadlines for major AI conferences, counting down."})]})}),t.jsxs("div",{style:{display:"flex",flexWrap:"wrap",alignItems:"center",gap:20,padding:"16px 0",borderBottom:"1px solid var(--hairline)",marginBottom:24},children:[t.jsx(E,{id:"top-tier-only",label:"Top tier only",checked:e,onChange:a}),t.jsx(E,{id:"show-past",label:"Show past conferences",checked:n,onChange:r})]}),p.length>0&&t.jsxs("div",{style:{display:"flex",flexWrap:"wrap",gap:6,marginBottom:24},children:[p.map(l=>{const h=o.has(l);return t.jsx("button",{className:"tag-chip",onClick:()=>d(l),style:{background:h?"var(--ink)":"var(--bg-subtle)",color:h?"var(--bg)":"var(--ink-soft)"},children:k(l)},l)}),o.size>0&&t.jsx("button",{className:"tag-chip",onClick:()=>i(new Set),style:{background:"transparent",color:"var(--ink-faint)"},children:"Clear ✕"})]}),t.jsx("div",{className:"sort-bar",children:t.jsx("div",{className:"results-count",children:u.isLoading?"…":`${y.length} conferences`})}),u.isLoading?t.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(320px, 1fr))",gap:16},children:Array.from({length:6}).map((l,h)=>t.jsx(W,{className:"h-44"},h))}):y.length===0?t.jsxs("div",{className:"no-results",children:["No conferences match these filters",n?".":" — try enabling “Show past conferences”."]}):t.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(320px, 1fr))",gap:16},children:y.map(l=>t.jsx(ae,{conf:l,now:c,selectedDomains:o,onToggleDomain:d,onOpen:m},l.id))}),t.jsx(ne,{conf:s,open:s!==null,onOpenChange:l=>{l||m(null)}})]})};export{ue as default};
assets/{ApiDocsView-CsxVCUki.js → ApiDocsView-lZRC5CmS.js} RENAMED
@@ -1,4 +1,4 @@
1
- import{a1 as m,r as o,j as e}from"./index-D1SFE8tx.js";import{u as f}from"./useQuery-8sGgldYe.js";import{M as g}from"./index-CZU6xdjr.js";const y={queryKey:["public-api-schema"],queryFn:()=>m("/openapi.json",{credentials:"omit"}),staleTime:5*60*1e3};function b(s,r){const n=new URLSearchParams;for(const[a,t]of Object.entries(r["x-example-parameters"]))s.includes(`{${a}}`)?s=s.replace(`{${a}}`,encodeURIComponent(String(t))):n.append(a,String(t));return`https://paperswithcode.co${s}${n.size?`?${n}`:""}`}function w(s,r){return r==="Python"?`import requests
2
 
3
  response = requests.get(${JSON.stringify(s)}, timeout=30)
4
  response.raise_for_status()
 
1
+ import{a1 as m,r as o,j as e}from"./index-D6NpXxup.js";import{u as f}from"./useQuery-BSzsAAZV.js";import{M as g}from"./index-BiPn19VT.js";const y={queryKey:["public-api-schema"],queryFn:()=>m("/openapi.json",{credentials:"omit"}),staleTime:5*60*1e3};function b(s,r){const n=new URLSearchParams;for(const[a,t]of Object.entries(r["x-example-parameters"]))s.includes(`{${a}}`)?s=s.replace(`{${a}}`,encodeURIComponent(String(t))):n.append(a,String(t));return`https://paperswithcode.co${s}${n.size?`?${n}`:""}`}function w(s,r){return r==="Python"?`import requests
2
 
3
  response = requests.get(${JSON.stringify(s)}, timeout=30)
4
  response.raise_for_status()
assets/{ArtifactWorkspace-DKr_vDVE.js → ArtifactWorkspace-B7lf_s0k.js} RENAMED
The diff for this file is too large to render. See raw diff
 
assets/AstraForRoboticsView-824Ekipn.js DELETED
@@ -1 +0,0 @@
1
- import{c as v,r as h,j as a,L as n}from"./index-D1SFE8tx.js";import{P as N}from"./components-BAR1mYoW.js";import{u as P,P as k}from"./useIntersectionObserver-BPOzk2Hc.js";import{A,a as w}from"./alert-D8tgAf4z.js";import{S}from"./skeleton-D5wy8oMn.js";import{u as R}from"./usePapers-jBjTfCJU.js";import{f as L,D as T}from"./latexPlainText-DI8YEXVe.js";import{t as F}from"./transform-BmaYjIy4.js";import"./paperQueryKeys-CcqbH5YG.js";import"./LatexTitle-C3kQa1rr.js";import"./katex.min-BSBacQyE.js";import"./papers-Cv1LxXF4.js";import"./safeExternalHref-CkBrsh84.js";import"./useQuery-8sGgldYe.js";import"./useInfiniteQuery-rPEO6e6c.js";const f="robotics",b="gpt-6-astra",I="https://x.com/YuXiang_IRVL/status/2100395131924840570",C=[["trending","trending"],["date_published","newest"],["citation_count","most cited"]],O=[{handle:"Frame_Robotics",author:"Frame Robotics",summary:"Real-arm control that fixes grip angle and carry height on the next try after a miss.",url:"https://x.com/Frame_Robotics/status/2099900836273090614"},{handle:"qineng_wang",author:"Qineng Wang",summary:"Dual-ALOHA spatial-constraint puzzles: unlocking interlocked parts and threading a rope through three rings.",url:"https://x.com/qineng_wang/status/2099893504658866561"},{handle:"__Rhodium__",author:"Lucas",summary:"In-context learning of the controls and the workspace, reaching the task goal in three tries.",url:"https://x.com/__Rhodium__/status/2099521054678925534"},{handle:"SuveenE",author:"Suveen Ellawela",summary:"Picking up a pipette and fitting a 5 mm tip on a MolmoAct2 real-world eval, using the free hand for a better view.",url:"https://x.com/SuveenE/status/2099448450341605672"},{handle:"cdngdev",author:"thijs",summary:"A robot arm with a paintbrush painting the Golden Gate Bridge, improving across attempts from camera feedback.",url:"https://x.com/cdngdev/status/2097339677128982873"},{handle:"IsaacSin12",author:"Isaac Sin",summary:"Zero-shot sorting of irregularly shaped blocks into cups by color.",url:"https://x.com/IsaacSin12/status/2096715382166098302"},{handle:"chooi_jeq",author:"Jay Chooi",summary:"Robocurve's robot-control comparison: 95% task completion versus 40% for Fable 5.1 at lower cost.",url:"https://x.com/chooi_jeq/status/2096064315115839904"}],G=[{handle:"Lingjun_Mao",author:"Lingjun Mao",summary:"Adapting to a new embodiment to put a cake into an air fryer through CuRobo motion-planning tool APIs.",url:"https://x.com/Lingjun_Mao/status/2100294902672462176"},{handle:"walterzhu8",author:"Wentao Zhu",summary:"A day-and-a-half autonomous run that builds and trains pen spinning on a Sharpa hand in Isaac Lab.",url:"https://x.com/walterzhu8/status/2100212420840989112"},{handle:"mishig25",author:"Mishig",summary:"Painting the Eiffel Tower in MuJoCo with an SO-101 and a brush, with the full experiment shared on Hugging Face.",url:"https://x.com/mishig25/status/2099611674793668676"},{handle:"RunpeiDong",author:"Runpei Dong",summary:"Getting a humanoid into a Tesla in MuJoCo: learning from feedback, then reusing that experience with egocentric perception.",url:"https://x.com/RunpeiDong/status/2099604536327614717"},{handle:"frankzydou",author:"Zhiyang (Frank) Dou",summary:"A LeRobot SO-101 real-world pickup from a third-person RGB camera, where the arm has to bend back to reach the pen.",url:"https://x.com/frankzydou/status/2099338127915512297"},{handle:"Parvkpr",author:"Parv Kapoor",summary:"Real-to-sim: building an interactive simulation environment from a single image or video.",url:"https://x.com/Parvkpr/status/2098847963867238597"},{handle:"z_code68632",author:"code_z",summary:"One demo per task: unscrewing a bottle cap, inserting a plug, clearing obstacles, and imitating a dance on a real robot.",url:"https://x.com/z_code68632/status/2098397364725895387"}],j=({posts:s,label:i})=>a.jsxs("div",{className:"astra-posts",children:[a.jsx("div",{className:"astra-posts-label",children:i}),a.jsx("ul",{children:s.map(o=>a.jsxs("li",{children:[a.jsxs("a",{href:o.url,target:"_blank",rel:"noreferrer",children:["@",o.handle]}),a.jsxs("span",{className:"astra-post-author",children:[" ",o.author]}),a.jsxs("span",{className:"astra-post-summary",children:[" — ",o.summary]})]},o.url))})]}),E=s=>s==="date_published"||s==="citation_count"?s:"trending",W=()=>{var g,x;const[s,i]=v(),o=E(s.get("order_by")),d=s.get("has_code")==="true",m=s.get("has_hf_artifacts")==="true",t=R({task:f,method:b,page_size:12,order_by:o,order_dir:"desc",include_resources:!0,has_code:d,has_hf_artifacts:m}),{targetRef:_,isIntersecting:u}=P({rootMargin:"200px"});h.useEffect(()=>(document.title=L("GPT-6 Astra for Robotics"),()=>{document.title=T}),[]),h.useEffect(()=>{u&&t.hasNextPage&&!t.isFetchingNextPage&&t.fetchNextPage()},[u,t.hasNextPage,t.isFetchingNextPage]);const p=h.useMemo(()=>{var e;return(((e=t.data)==null?void 0:e.pages)??[]).flatMap(r=>r.results.map(F))},[t.data]),y=((x=(g=t.data)==null?void 0:g.pages[0])==null?void 0:x.count)??0,c=(e,r)=>{const l=new URLSearchParams(s);r===null?l.delete(e):l.set(e,r),i(l)};return a.jsxs("div",{className:"page",children:[a.jsxs("nav",{className:"breadcrumb","aria-label":"Breadcrumb",children:[a.jsx(n,{to:"/",children:"Home"}),a.jsx("span",{children:" / "}),a.jsx("span",{children:"GPT-6 Astra for Robotics"})]}),a.jsx("header",{className:"feed-header",children:a.jsxs("div",{children:[a.jsx("div",{className:"astra-eyebrow",children:"Collection"}),a.jsxs("h1",{className:"feed-title",children:["GPT-6 Astra ",a.jsx("em",{children:"for Robotics"})]}),a.jsx("div",{className:"feed-subtitle",children:"Papers, technical reports, and evaluations that put OpenAI’s frontier model in control of real and simulated robots."}),a.jsxs("p",{className:"astra-lede",children:["The GPT-6 Astra launch never mentioned robots, yet within days the model was driving arms, hands, and humanoids. As"," ",a.jsx("a",{href:I,target:"_blank",rel:"noreferrer",children:"Yu Xiang"})," ","framed it, the work splits into two families: Astra acting as the robot policy itself, and Astra acting as an agent that orchestrates everything else."]})]})}),a.jsxs("section",{className:"astra-approaches","aria-label":"How GPT-6 Astra is used for robots",children:[a.jsxs("article",{className:"astra-approach",children:[a.jsx("div",{className:"astra-approach-num",children:"01 / Robot policy"}),a.jsx("h2",{children:"Astra as the policy, like a VLA"}),a.jsx("p",{children:"The model looks at camera frames and robot state and directly emits actions: end-effector poses, joint targets, or gripper commands, closing the control loop step by step with no task-specific training."}),a.jsx(j,{posts:O,label:"Seen on X"})]}),a.jsxs("article",{className:"astra-approach",children:[a.jsx("div",{className:"astra-approach-num",children:"02 / Agent"}),a.jsx("h2",{children:"Astra as the agent"}),a.jsx("p",{children:"The model reasons about the scene, writes and runs code, calls planners and tools, or delegates low-level motion to pretrained policies such as VLAs, and keeps the robot on task over long horizons."}),a.jsx(j,{posts:G,label:"Seen on X"})]})]}),a.jsxs("p",{className:"astra-note",children:["Listing is automatic: any paper tagged with both the"," ",a.jsx(n,{to:`/tasks/${f}`,children:"Robotics"})," task and the"," ",a.jsx(n,{to:`/methods/${b}`,children:"GPT-6 Astra"})," method appears here. Missing a report or preprint?"," ",a.jsx(n,{to:"/submit",children:"Submit it"}),"."]}),a.jsxs("div",{className:"task-section-head",style:{marginTop:36},children:[a.jsx("div",{className:"task-section-eyebrow",children:"Top trending · sort below"}),a.jsxs("div",{className:"task-section-title",children:["Papers ",a.jsxs("span",{className:"meta",children:["[",y.toLocaleString(),"]"]})]})]}),a.jsx("div",{className:"sort-bar",children:a.jsxs("div",{className:"paper-feed-toolbar-controls",children:[a.jsx("div",{className:"sort-options",children:C.map(([e,r])=>a.jsx("button",{type:"button",className:`sort-btn ${o===e?"active":""}`,onClick:()=>c("order_by",e==="trending"?null:e),children:r},e))}),a.jsx(k,{hasCode:d,hasHfArtifacts:m,onHasCodeChange:e=>c("has_code",e?"true":null),onHasHfArtifactsChange:e=>c("has_hf_artifacts",e?"true":null)})]})}),t.error?a.jsx(A,{variant:"destructive",children:a.jsx(w,{children:"Failed to load the collection. Please try again."})}):t.isLoading?a.jsx("div",{className:"paper-list",children:Array.from({length:3}).map((e,r)=>a.jsx(S,{className:"h-40 w-full"},r))}):p.length===0?a.jsx("div",{className:"no-results",children:"No papers match this selection yet."}):a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"paper-list",children:p.map((e,r)=>a.jsx(N,{paper:e,rank:r+1},e.id))}),a.jsx("div",{ref:_,style:{height:1}}),t.isFetchingNextPage&&a.jsx("div",{style:{padding:"20px 0",textAlign:"center",color:"var(--ink-faint)"},children:"Loading more…"})]})]})};export{W as default};
 
 
assets/AstraForRoboticsView-DCAUVCFd.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import{c as v,r as h,j as a,L as n}from"./index-D6NpXxup.js";import{P as N}from"./components-C-Wk0LlL.js";import{u as P,P as k}from"./useIntersectionObserver-C8GlpU4F.js";import{A,a as w}from"./alert-CEE7Xf4h.js";import{S}from"./skeleton-BZlAxqUu.js";import{u as R}from"./usePapers-D7q7tNxt.js";import{f as L,D as T}from"./latexPlainText-DI8YEXVe.js";import{t as F}from"./transform-dsZcnzEu.js";import"./paperQueryKeys-CcqbH5YG.js";import"./LatexTitle-Cd92uzqM.js";import"./papers-CJuRKhYV.js";import"./safeExternalHref-CkBrsh84.js";import"./useQuery-BSzsAAZV.js";import"./useInfiniteQuery-BA3fe-wV.js";const f="robotics",b="gpt-6-astra",I="https://x.com/YuXiang_IRVL/status/2100395131924840570",C=[["trending","trending"],["date_published","newest"],["citation_count","most cited"]],O=[{handle:"Frame_Robotics",author:"Frame Robotics",summary:"Real-arm control that fixes grip angle and carry height on the next try after a miss.",url:"https://x.com/Frame_Robotics/status/2099900836273090614"},{handle:"qineng_wang",author:"Qineng Wang",summary:"Dual-ALOHA spatial-constraint puzzles: unlocking interlocked parts and threading a rope through three rings.",url:"https://x.com/qineng_wang/status/2099893504658866561"},{handle:"__Rhodium__",author:"Lucas",summary:"In-context learning of the controls and the workspace, reaching the task goal in three tries.",url:"https://x.com/__Rhodium__/status/2099521054678925534"},{handle:"SuveenE",author:"Suveen Ellawela",summary:"Picking up a pipette and fitting a 5 mm tip on a MolmoAct2 real-world eval, using the free hand for a better view.",url:"https://x.com/SuveenE/status/2099448450341605672"},{handle:"cdngdev",author:"thijs",summary:"A robot arm with a paintbrush painting the Golden Gate Bridge, improving across attempts from camera feedback.",url:"https://x.com/cdngdev/status/2097339677128982873"},{handle:"IsaacSin12",author:"Isaac Sin",summary:"Zero-shot sorting of irregularly shaped blocks into cups by color.",url:"https://x.com/IsaacSin12/status/2096715382166098302"},{handle:"chooi_jeq",author:"Jay Chooi",summary:"Robocurve's robot-control comparison: 95% task completion versus 40% for Fable 5.1 at lower cost.",url:"https://x.com/chooi_jeq/status/2096064315115839904"}],G=[{handle:"Lingjun_Mao",author:"Lingjun Mao",summary:"Adapting to a new embodiment to put a cake into an air fryer through CuRobo motion-planning tool APIs.",url:"https://x.com/Lingjun_Mao/status/2100294902672462176"},{handle:"walterzhu8",author:"Wentao Zhu",summary:"A day-and-a-half autonomous run that builds and trains pen spinning on a Sharpa hand in Isaac Lab.",url:"https://x.com/walterzhu8/status/2100212420840989112"},{handle:"mishig25",author:"Mishig",summary:"Painting the Eiffel Tower in MuJoCo with an SO-101 and a brush, with the full experiment shared on Hugging Face.",url:"https://x.com/mishig25/status/2099611674793668676"},{handle:"RunpeiDong",author:"Runpei Dong",summary:"Getting a humanoid into a Tesla in MuJoCo: learning from feedback, then reusing that experience with egocentric perception.",url:"https://x.com/RunpeiDong/status/2099604536327614717"},{handle:"frankzydou",author:"Zhiyang (Frank) Dou",summary:"A LeRobot SO-101 real-world pickup from a third-person RGB camera, where the arm has to bend back to reach the pen.",url:"https://x.com/frankzydou/status/2099338127915512297"},{handle:"Parvkpr",author:"Parv Kapoor",summary:"Real-to-sim: building an interactive simulation environment from a single image or video.",url:"https://x.com/Parvkpr/status/2098847963867238597"},{handle:"z_code68632",author:"code_z",summary:"One demo per task: unscrewing a bottle cap, inserting a plug, clearing obstacles, and imitating a dance on a real robot.",url:"https://x.com/z_code68632/status/2098397364725895387"}],j=({posts:s,label:i})=>a.jsxs("div",{className:"astra-posts",children:[a.jsx("div",{className:"astra-posts-label",children:i}),a.jsx("ul",{children:s.map(o=>a.jsxs("li",{children:[a.jsxs("a",{href:o.url,target:"_blank",rel:"noreferrer",children:["@",o.handle]}),a.jsxs("span",{className:"astra-post-author",children:[" ",o.author]}),a.jsxs("span",{className:"astra-post-summary",children:[" — ",o.summary]})]},o.url))})]}),E=s=>s==="date_published"||s==="citation_count"?s:"trending",Q=()=>{var g,x;const[s,i]=v(),o=E(s.get("order_by")),d=s.get("has_code")==="true",m=s.get("has_hf_artifacts")==="true",t=R({task:f,method:b,page_size:12,order_by:o,order_dir:"desc",include_resources:!0,has_code:d,has_hf_artifacts:m}),{targetRef:_,isIntersecting:u}=P({rootMargin:"200px"});h.useEffect(()=>(document.title=L("GPT-6 Astra for Robotics"),()=>{document.title=T}),[]),h.useEffect(()=>{u&&t.hasNextPage&&!t.isFetchingNextPage&&t.fetchNextPage()},[u,t.hasNextPage,t.isFetchingNextPage]);const p=h.useMemo(()=>{var e;return(((e=t.data)==null?void 0:e.pages)??[]).flatMap(r=>r.results.map(F))},[t.data]),y=((x=(g=t.data)==null?void 0:g.pages[0])==null?void 0:x.count)??0,c=(e,r)=>{const l=new URLSearchParams(s);r===null?l.delete(e):l.set(e,r),i(l)};return a.jsxs("div",{className:"page",children:[a.jsxs("nav",{className:"breadcrumb","aria-label":"Breadcrumb",children:[a.jsx(n,{to:"/",children:"Home"}),a.jsx("span",{children:" / "}),a.jsx("span",{children:"GPT-6 Astra for Robotics"})]}),a.jsx("header",{className:"feed-header",children:a.jsxs("div",{children:[a.jsx("div",{className:"astra-eyebrow",children:"Collection"}),a.jsxs("h1",{className:"feed-title",children:["GPT-6 Astra ",a.jsx("em",{children:"for Robotics"})]}),a.jsx("div",{className:"feed-subtitle",children:"Papers, technical reports, and evaluations that put OpenAI’s frontier model in control of real and simulated robots."}),a.jsxs("p",{className:"astra-lede",children:["The GPT-6 Astra launch never mentioned robots, yet within days the model was driving arms, hands, and humanoids. As"," ",a.jsx("a",{href:I,target:"_blank",rel:"noreferrer",children:"Yu Xiang"})," ","framed it, the work splits into two families: Astra acting as the robot policy itself, and Astra acting as an agent that orchestrates everything else."]})]})}),a.jsxs("section",{className:"astra-approaches","aria-label":"How GPT-6 Astra is used for robots",children:[a.jsxs("article",{className:"astra-approach",children:[a.jsx("div",{className:"astra-approach-num",children:"01 / Robot policy"}),a.jsx("h2",{children:"Astra as the policy, like a VLA"}),a.jsx("p",{children:"The model looks at camera frames and robot state and directly emits actions: end-effector poses, joint targets, or gripper commands, closing the control loop step by step with no task-specific training."}),a.jsx(j,{posts:O,label:"Seen on X"})]}),a.jsxs("article",{className:"astra-approach",children:[a.jsx("div",{className:"astra-approach-num",children:"02 / Agent"}),a.jsx("h2",{children:"Astra as the agent"}),a.jsx("p",{children:"The model reasons about the scene, writes and runs code, calls planners and tools, or delegates low-level motion to pretrained policies such as VLAs, and keeps the robot on task over long horizons."}),a.jsx(j,{posts:G,label:"Seen on X"})]})]}),a.jsxs("p",{className:"astra-note",children:["Listing is automatic: any paper tagged with both the"," ",a.jsx(n,{to:`/tasks/${f}`,children:"Robotics"})," task and the"," ",a.jsx(n,{to:`/methods/${b}`,children:"GPT-6 Astra"})," method appears here. Missing a report or preprint?"," ",a.jsx(n,{to:"/submit",children:"Submit it"}),"."]}),a.jsxs("div",{className:"task-section-head",style:{marginTop:36},children:[a.jsx("div",{className:"task-section-eyebrow",children:"Top trending · sort below"}),a.jsxs("div",{className:"task-section-title",children:["Papers ",a.jsxs("span",{className:"meta",children:["[",y.toLocaleString(),"]"]})]})]}),a.jsx("div",{className:"sort-bar",children:a.jsxs("div",{className:"paper-feed-toolbar-controls",children:[a.jsx("div",{className:"sort-options",children:C.map(([e,r])=>a.jsx("button",{type:"button",className:`sort-btn ${o===e?"active":""}`,onClick:()=>c("order_by",e==="trending"?null:e),children:r},e))}),a.jsx(k,{hasCode:d,hasHfArtifacts:m,onHasCodeChange:e=>c("has_code",e?"true":null),onHasHfArtifactsChange:e=>c("has_hf_artifacts",e?"true":null)})]})}),t.error?a.jsx(A,{variant:"destructive",children:a.jsx(w,{children:"Failed to load the collection. Please try again."})}):t.isLoading?a.jsx("div",{className:"paper-list",children:Array.from({length:3}).map((e,r)=>a.jsx(S,{className:"h-40 w-full"},r))}):p.length===0?a.jsx("div",{className:"no-results",children:"No papers match this selection yet."}):a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"paper-list",children:p.map((e,r)=>a.jsx(N,{paper:e,rank:r+1},e.id))}),a.jsx("div",{ref:_,style:{height:1}}),t.isFetchingNextPage&&a.jsx("div",{style:{padding:"20px 0",textAlign:"center",color:"var(--ink-faint)"},children:"Loading more…"})]})]})};export{Q as default};
assets/{AuthorDetailView-Oihl6zjT.js → AuthorDetailView-C_IUEkMW.js} RENAMED
@@ -1 +1 @@
1
- import{u as m,j as e,L as f}from"./index-D1SFE8tx.js";import{p as x}from"./paperQueryKeys-CcqbH5YG.js";import{u as d}from"./useQuery-8sGgldYe.js";import{p as h}from"./papers-Cv1LxXF4.js";import{S as p}from"./skeleton-D5wy8oMn.js";import g from"./NotFound-BIkKS5G_.js";const q=()=>{var i,l,n,o,u;const{authorId:a}=m(),r=d({queryKey:["author",a],queryFn:()=>h.getAuthor(a),enabled:!!a}),t=d({queryKey:[...x.feeds.author,a],queryFn:()=>h.authorPapers(a,{page:1,page_size:20}),enabled:!!a});return((i=r.error)==null?void 0:i.status)===404?e.jsx(g,{}):e.jsxs("div",{className:"page",children:[e.jsx("p",{className:"sidebar-label",children:"Author"}),e.jsx("h1",{className:"feed-title",children:((l=r.data)==null?void 0:l.full_name)??e.jsx(p,{className:"h-10 w-64 inline-block"})}),((n=r.data)==null?void 0:n.hf_username)&&e.jsxs("a",{href:`https://huggingface.co/${r.data.hf_username}`,target:"_blank",rel:"noopener noreferrer",children:["@",r.data.hf_username," on Hugging Face"]}),e.jsxs("section",{style:{marginTop:40},"aria-labelledby":"author-papers-heading",children:[e.jsx("h2",{id:"author-papers-heading",children:"Research papers"}),t.isLoading&&e.jsx(p,{className:"h-24 w-full mt-4"}),((o=t.data)==null?void 0:o.results.length)===0&&e.jsx("p",{children:"No public papers are available."}),e.jsx("ol",{className:"paper-list",children:(u=t.data)==null?void 0:u.results.map(s=>{const c=s.source==="external"?String(s.id):s.arxiv_id;return e.jsx("li",{children:e.jsx(f,{to:`/paper/${c}`,children:s.title})},s.id)})})]})]})};export{q as default};
 
1
+ import{u as m,j as e,L as f}from"./index-D6NpXxup.js";import{p as x}from"./paperQueryKeys-CcqbH5YG.js";import{u as d}from"./useQuery-BSzsAAZV.js";import{p as h}from"./papers-CJuRKhYV.js";import{S as p}from"./skeleton-BZlAxqUu.js";import g from"./NotFound-B_m3ewwi.js";const q=()=>{var i,l,n,o,u;const{authorId:a}=m(),r=d({queryKey:["author",a],queryFn:()=>h.getAuthor(a),enabled:!!a}),t=d({queryKey:[...x.feeds.author,a],queryFn:()=>h.authorPapers(a,{page:1,page_size:20}),enabled:!!a});return((i=r.error)==null?void 0:i.status)===404?e.jsx(g,{}):e.jsxs("div",{className:"page",children:[e.jsx("p",{className:"sidebar-label",children:"Author"}),e.jsx("h1",{className:"feed-title",children:((l=r.data)==null?void 0:l.full_name)??e.jsx(p,{className:"h-10 w-64 inline-block"})}),((n=r.data)==null?void 0:n.hf_username)&&e.jsxs("a",{href:`https://huggingface.co/${r.data.hf_username}`,target:"_blank",rel:"noopener noreferrer",children:["@",r.data.hf_username," on Hugging Face"]}),e.jsxs("section",{style:{marginTop:40},"aria-labelledby":"author-papers-heading",children:[e.jsx("h2",{id:"author-papers-heading",children:"Research papers"}),t.isLoading&&e.jsx(p,{className:"h-24 w-full mt-4"}),((o=t.data)==null?void 0:o.results.length)===0&&e.jsx("p",{children:"No public papers are available."}),e.jsx("ol",{className:"paper-list",children:(u=t.data)==null?void 0:u.results.map(s=>{const c=s.source==="external"?String(s.id):s.arxiv_id;return e.jsx("li",{children:e.jsx(f,{to:`/paper/${c}`,children:s.title})},s.id)})})]})]})};export{q as default};
assets/{AuthorizePaperEditView-Dz3qJ1uD.js → AuthorizePaperEditView-DWKZVmW5.js} RENAMED
@@ -1 +1 @@
1
- import{u,a as d,j as e,L as l,H as p}from"./index-D1SFE8tx.js";import{u as c}from"./useQuery-8sGgldYe.js";import{u as h}from"./useMutation-BOPUR0a5.js";import{B as m}from"./button-4gNpQKIh.js";import{p as n}from"./paperEdits-2cEMeEQo.js";function b(){const{authorizationId:t=""}=u(),{user:s,isLoading:o}=d(),i=c({queryKey:["paper-edit-authorization",t],queryFn:()=>n.authorization(t),retry:!1}),r=h({mutationFn:()=>n.approve(t)}),a=i.data;return e.jsxs("main",{className:"mx-auto max-w-xl space-y-5 px-6 py-12",children:[e.jsx("h1",{className:"text-2xl font-semibold",children:"Authorize your agent to edit a paper"}),(i.isLoading||o)&&e.jsx("p",{children:"Loading authorization…"}),i.error&&e.jsx("p",{role:"alert",children:i.error.message}),a&&e.jsxs(e.Fragment,{children:[e.jsx(l,{className:"underline",to:`/paper/${a.paper_id}`,children:a.title}),e.jsxs("p",{children:["Check that your CLI shows this code: ",e.jsx("strong",{className:"font-mono",children:a.user_code})]}),e.jsx("p",{children:"Only approve a request you started. Your agent will be able to publish changes to this paper’s links, tags, and evaluation results for one hour, without further approval."}),e.jsx("p",{children:"Edits appear publicly under your Hugging Face username. You can edit up to 20 distinct papers per UTC day. Evaluation deletion and changes to shared benchmark definitions require an administrator."}),r.isSuccess||a.approved?e.jsx("p",{role:"status",children:"Access approved. Return to your CLI to continue."}):s?e.jsxs(e.Fragment,{children:[e.jsxs("p",{children:["Signed in as ",e.jsxs("strong",{children:["@",s.username]})]}),e.jsx(m,{disabled:r.isPending||!s.can_directly_edit_catalog,onClick:()=>r.mutate(),children:r.isPending?"Authorizing…":"Authorize for one hour"}),!s.can_directly_edit_catalog&&e.jsx("p",{children:"Direct editing is unavailable for this session."})]}):e.jsx(p,{returnTo:`/authorize-paper-edit/${t}`,label:"Sign in with Hugging Face"}),r.error&&e.jsx("p",{role:"alert",children:r.error.message})]})]})}export{b as default};
 
1
+ import{u,a as d,j as e,L as l,H as p}from"./index-D6NpXxup.js";import{u as c}from"./useQuery-BSzsAAZV.js";import{u as h}from"./useMutation-DI9QqXsO.js";import{B as m}from"./button-B8eVvd3T.js";import{p as n}from"./paperEdits-B5_mABJZ.js";function b(){const{authorizationId:t=""}=u(),{user:s,isLoading:o}=d(),i=c({queryKey:["paper-edit-authorization",t],queryFn:()=>n.authorization(t),retry:!1}),r=h({mutationFn:()=>n.approve(t)}),a=i.data;return e.jsxs("main",{className:"mx-auto max-w-xl space-y-5 px-6 py-12",children:[e.jsx("h1",{className:"text-2xl font-semibold",children:"Authorize your agent to edit a paper"}),(i.isLoading||o)&&e.jsx("p",{children:"Loading authorization…"}),i.error&&e.jsx("p",{role:"alert",children:i.error.message}),a&&e.jsxs(e.Fragment,{children:[e.jsx(l,{className:"underline",to:`/paper/${a.paper_id}`,children:a.title}),e.jsxs("p",{children:["Check that your CLI shows this code: ",e.jsx("strong",{className:"font-mono",children:a.user_code})]}),e.jsx("p",{children:"Only approve a request you started. Your agent will be able to publish changes to this paper’s links, tags, and evaluation results for one hour, without further approval."}),e.jsx("p",{children:"Edits appear publicly under your Hugging Face username. You can edit up to 20 distinct papers per UTC day. Evaluation deletion and changes to shared benchmark definitions require an administrator."}),r.isSuccess||a.approved?e.jsx("p",{role:"status",children:"Access approved. Return to your CLI to continue."}):s?e.jsxs(e.Fragment,{children:[e.jsxs("p",{children:["Signed in as ",e.jsxs("strong",{children:["@",s.username]})]}),e.jsx(m,{disabled:r.isPending||!s.can_directly_edit_catalog,onClick:()=>r.mutate(),children:r.isPending?"Authorizing…":"Authorize for one hour"}),!s.can_directly_edit_catalog&&e.jsx("p",{children:"Direct editing is unavailable for this session."})]}):e.jsx(p,{returnTo:`/authorize-paper-edit/${t}`,label:"Sign in with Hugging Face"}),r.error&&e.jsx("p",{role:"alert",children:r.error.message})]})]})}export{b as default};
assets/{AutonomousOperations-oGNbl_XB.js → AutonomousOperations-o7cpRdYi.js} RENAMED
@@ -1,4 +1,4 @@
1
- import{e as R,a as B,h as q,r as m,j as e,L as H}from"./index-D1SFE8tx.js";import{u as I}from"./useQuery-8sGgldYe.js";import{u as Q}from"./useMutation-BOPUR0a5.js";import{B as P}from"./badge-tu_TeCcV.js";import{B as x}from"./button-4gNpQKIh.js";import{A as D,C as n,d as i,a as t,b as r,f as h,o as u}from"./operations-DS9G9l-m.js";import{I as j}from"./input-BKhwSyKU.js";import{S as $}from"./shield-alert-DY8uHwNM.js";/**
2
  * @license lucide-react v0.462.0 - ISC
3
  *
4
  * This source code is licensed under the ISC license.
 
1
+ import{e as R,a as B,h as q,r as m,j as e,L as H}from"./index-D6NpXxup.js";import{u as I}from"./useQuery-BSzsAAZV.js";import{u as Q}from"./useMutation-DI9QqXsO.js";import{B as P}from"./badge-C28FT33P.js";import{B as x}from"./button-B8eVvd3T.js";import{A as D,C as n,d as i,a as t,b as r,f as h,o as u}from"./operations-cWF0kuRA.js";import{I as j}from"./input-ezGnYvUD.js";import{S as $}from"./shield-alert-07ifIjqY.js";/**
2
  * @license lucide-react v0.462.0 - ISC
3
  *
4
  * This source code is licensed under the ISC license.
assets/{BenchmarkDetailView-1UB0-Ovs.js → BenchmarkDetailView-ZIQHZYt6.js} RENAMED
@@ -1,2 +1,2 @@
1
- import{r as L,j as a,v as se,L as re,b as nt,f as it,u as lt,c as ct,g as ot}from"./index-D1SFE8tx.js";import{u as J}from"./useQuery-8sGgldYe.js";import{c as Z}from"./catalog-BIqvVz-s.js";import{C as dt,E as ut,e as mt}from"./ExternalSourceEvalBadge-BJe3a3TH.js";import{L as ie}from"./LatexTitle-C3kQa1rr.js";import{S as ze}from"./switch-B1HRZ8EN.js";import{I as ht}from"./components-BAR1mYoW.js";import{S as ce}from"./skeleton-D5wy8oMn.js";import{A as ft,a as pt}from"./alert-D8tgAf4z.js";import{B as gt}from"./BenchmarkTrendSparkline-BoXdeV6Z.js";import{s as xt}from"./safeExternalHref-CkBrsh84.js";import{s as bt}from"./slug-BpH-Nkvz.js";import"./papers-Cv1LxXF4.js";import"./hover-card-BtW3iC4Z.js";import"./katex.min-BSBacQyE.js";import"./index-BSnsepdJ.js";import"./paperQueryKeys-CcqbH5YG.js";import"./transform-BmaYjIy4.js";function yt(e,t,r){const s=t?(e??[]).filter(l=>l.task_id===t):e??[],i=s.filter(l=>l.is_open===!1),n=i.reduce((l,o)=>l?(o.best_rank??Number.POSITIVE_INFINITY)<(l.best_rank??Number.POSITIVE_INFINITY)?o:l:o,null);return{visible:r?s.filter(l=>l.is_open!==!1):s,hiddenClosed:i,topHiddenClosed:n}}function ae(e){if(e==null)return null;if(typeof e=="number")return Number.isFinite(e)?e:null;const t=e.includes("±")?e.split("±")[0].trim():e.trim(),r=parseFloat(t);return Number.isFinite(r)?r:null}const Ke=[{label:"All",maxParametersExclusive:void 0},{label:"<10M",maxParametersExclusive:1e7},{label:"<100M",maxParametersExclusive:1e8},{label:"<1B",maxParametersExclusive:1e9},{label:"<3B",maxParametersExclusive:3e9},{label:"<6B",maxParametersExclusive:6e9},{label:"<12B",maxParametersExclusive:12e9},{label:"<32B",maxParametersExclusive:32e9},{label:"<128B",maxParametersExclusive:128e9},{label:"<500B",maxParametersExclusive:5e11}];function vt(e){const t=e===null?void 0:Number(e);return Ke.some(r=>r.maxParametersExclusive===t)?t:void 0}function wt(e){return new Intl.NumberFormat("en",{notation:"compact",maximumSignificantDigits:3}).format(e)}function jt(e){return[e.paper_id,e.task_id,e.dataset_id,e.model_name,e.harness??""].join("|")}function _t(e){const t=new Map;for(const r of e){const s=jt(r),i=t.get(s);if(!i){t.set(s,{...r,metrics:{...r.metrics||{}},sourceEvaluationIds:[r.id],ranksByMetric:r.best_metric&&r.best_rank!=null?{[r.best_metric]:r.best_rank}:{},parameterCount:r.num_parameters??null,hasParameterConflict:!1});continue}i.metrics={...i.metrics,...r.metrics||{}},i.sourceEvaluationIds.push(r.id),r.best_metric&&r.best_rank!=null&&(i.ranksByMetric[r.best_metric]=r.best_rank),r.num_parameters!=null&&!i.hasParameterConflict&&(i.parameterCount===null?i.parameterCount=r.num_parameters:i.parameterCount!==r.num_parameters&&(i.parameterCount=null,i.hasParameterConflict=!0))}return Array.from(t.values())}function Me(e,t){return t===void 0?e:e.filter(r=>r.parameterCount!==null&&r.parameterCount<t)}function St(e,t){return t?e.id===t||e.sourceEvaluationIds.includes(t):!1}function Le(e,t){return e.ranksByMetric[t]??e.best_rank??9999}function kt(e,t,r){if(e.length===0)return{points:[],sota:0,sotaModel:""};const s=e.map(d=>{var A;const f=ae((A=d.metrics)==null?void 0:A[t]),g=d.paper_published_date||"";return{eval:d,value:f,date:g}}).filter(d=>d.value!==null&&!!d.date).sort((d,f)=>d.date.localeCompare(f.date)),i=[];let n=null;for(const d of s){const f=n==null?!0:r==="↓"?d.value<n:d.value>n;f&&(n=d.value),i.push({value:d.value,date:d.date,dateLabel:d.date.slice(0,7),modelName:d.eval.model_name||"",paperTitle:d.eval.paper_title||"",paperRouteId:d.eval.paper_arxiv_id||d.eval.paper_id||null,isSota:f})}const o=e.map(d=>{var f;return{eval:d,value:ae((f=d.metrics)==null?void 0:f[t])}}).filter(d=>d.value!==null).sort((d,f)=>r==="↓"?d.value-f.value:f.value-d.value)[0],u=(o==null?void 0:o.value)??0,h=(o==null?void 0:o.eval.model_name)||(o==null?void 0:o.eval.paper_title)||"";return{points:i,sota:u,sotaModel:h}}function Ge(e,t,r,s){const i=t.find(n=>n.id===s);if(e.length===0)return null;if(i!=null&&i.task_id&&e.some(n=>n.id===i.task_id))return i.task_id;if(r){const n=e.find(l=>l.slug===r);if(n)return n.id}if(e.length===1)return e[0].id;if(t.length>0){const n=new Map;for(const u of t)n.set(u.task_id,(n.get(u.task_id)||0)+1);let l=null,o=-1;for(const u of e){const h=n.get(u.id)||0;h>o&&(o=h,l=u.id)}if(l)return l}return e[0].id}function Ct(e){var K,G,O;const{evaluations:t,tasks:r,taskSlug:s,highlightEvalId:i,parameterBound:n,showMoreMetrics:l}=e,o=Ge(r,t,s,i),u=r.find(p=>p.id===o)||r[0]||null,h=t.find(p=>p.id===i),d=yt(t,o,e.hideClosed),f=_t(d.visible),g=Me(f,n),A=e.configuredMetrics.map(p=>p.metric_name),F=Array.from(new Set(f.flatMap(p=>[...p.best_metric?[p.best_metric]:[],...Object.keys(p.metrics||{})]))),x=A.length?A:F,S=new Map;for(const p of f){const c=p.best_metric;!c||ae(p.metrics[c])===null||A.length&&!x.includes(c)||S.set(c,(S.get(c)||0)+1)}const V=((K=[...S].sort((p,c)=>c[1]-p[1])[0])==null?void 0:K[0])||x[0]||"",b=x.find(p=>{var c;return p.toLocaleLowerCase()===((c=e.metric)==null?void 0:c.trim().toLocaleLowerCase())})||(h==null?void 0:h.best_metric)||V,W=((G=e.directions)==null?void 0:G.directions[b])==="lower_is_better"?"↓":"↑",R=b&&x.includes(b)?[b,...x.filter(p=>p!==b)]:x,q=R.length?l?R:R.slice(0,1):b?[b]:[],w=g.slice().sort((p,c)=>{const m=ae(p.metrics[b]),_=ae(c.metrics[b]);return m!==null&&_!==null?W==="↓"?m-_:_-m:m!==null?-1:_!==null?1:Le(p,b)-Le(c,b)});let N=null,z=0;const U=w.map((p,c)=>{const m=ae(p.metrics[b]);return m!==null&&m!==N&&(N=m,z=c+1),{evaluation:p,rank:m===null?null:z,isHighlighted:St(p,i)}}),{points:ne,sota:X,sotaModel:Y}=kt(g,b,W),k=n===void 0?e.initialSummary:void 0,H=e.ready.evaluations&&e.ready.tasks&&e.ready.directions&&(!o||e.ready.metrics),C={parameter_coverage_known:f.filter(p=>p.parameterCount!==null).length,parameter_coverage_total:f.length};return{currentTaskId:o,primaryTask:u,activeMetric:b,arrow:W,allowedMetrics:x,orderedMetrics:R,visibleMetrics:q,rows:U,chartPoints:ne,highlightedEval:((O=U.find(p=>p.isHighlighted))==null?void 0:O.evaluation)||null,hiddenClosedEvals:d.hiddenClosed,hiddenClosedTopEval:d.topHiddenClosed,parameterBound:n,parameterCoverage:C,hasParameterMetadata:C.parameter_coverage_known>0,parameterFilters:Ke.map(p=>({...p,selected:n===p.maxParametersExclusive,disabled:n!==p.maxParametersExclusive&&Me(f,p.maxParametersExclusive).length===0})),displayedMetric:H?b:k==null?void 0:k.metric,displayedSota:H?X:k==null?void 0:k.value,displayedSotaModel:H?Y:k==null?void 0:k.model_name,isSummaryLoading:!H&&!k,isInitialFilteredViewLoading:n!==void 0&&!H}}function Ie(e,t){return e?a.jsx(ie,{title:e}):t||"—"}function Et({model:e,showHarness:t,setMetric:r,highlightRowRef:s}){const{rows:i,visibleMetrics:n,activeMetric:l,arrow:o}=e,[u,h]=L.useState(null);return L.useEffect(()=>{if(!u)return;const d=()=>{u.classList.toggle("has-horizontal-overflow",u.scrollWidth>u.clientWidth)},f=new ResizeObserver(d);return f.observe(u),u.firstElementChild&&f.observe(u.firstElementChild),d(),()=>f.disconnect()},[u]),a.jsx("div",{ref:h,className:"bm-table-scroll",role:"region","aria-label":"Leaderboard metrics",tabIndex:0,children:a.jsxs("table",{id:"benchmark-leaderboard",className:"bm-table",style:{"--bm-metric-count":n.length,"--bm-harness-count":t?1:0},children:[a.jsxs("colgroup",{children:[a.jsx("col",{className:"bm-width-rank"}),a.jsx("col",{className:"bm-width-model"}),a.jsx("col",{className:"bm-width-parameters"}),t&&a.jsx("col",{className:"bm-width-harness"}),n.map(d=>a.jsx("col",{className:"bm-width-metric"},d)),a.jsx("col",{}),a.jsx("col",{className:"bm-width-year"})]}),a.jsx("thead",{children:a.jsxs("tr",{children:[a.jsx("th",{className:"col-rank",children:"Rank"}),a.jsx("th",{className:"col-model",children:"Model"}),a.jsx("th",{className:"col-parameters",children:"Parameters"}),t&&a.jsx("th",{className:"col-harness",children:"Harness"}),n.map(d=>{const f=d===l;return a.jsx("th",{className:`col-value ${f?"is-active":""}`,"aria-sort":f?o==="↓"?"ascending":"descending":"none",children:a.jsxs("button",{type:"button",className:"bm-metric-header",onClick:()=>r(d),"aria-pressed":f,title:`Sort by ${d}`,children:[d,f?` ${o}`:""]})},d)}),a.jsx("th",{className:"col-paper",children:"Paper"}),a.jsx("th",{className:"col-year",children:"Year"})]})}),a.jsx("tbody",{children:i.map(({evaluation:d,rank:f,isHighlighted:g})=>{var x;const A=d.paper_arxiv_id||d.paper_id,F=d.paper_title||(d.paper_arxiv_id?`arXiv:${d.paper_arxiv_id}`:null);return a.jsxs("tr",{ref:g?s:void 0,className:g?"is-highlighted":void 0,children:[a.jsx("td",{className:"col-rank",children:f??"—"}),a.jsxs("td",{className:"col-model",children:[g&&a.jsx("span",{className:"bm-row-marker","aria-hidden":"true"}),d.hf_model_url?a.jsx("a",{href:d.hf_model_url,target:"_blank",rel:"noopener noreferrer",className:"bm-model-link",title:`Open ${d.model_name||"model"} on Hugging Face`,children:d.model_name||"—"}):d.model_name||"—",d.is_open===!1&&a.jsx(dt,{}),(d.external??d.is_external)&&a.jsx(ut,{sourceUrl:d.source_url||d.external_source_url||d.result_url})]}),a.jsx("td",{className:"col-parameters",title:d.parameterCount===null?void 0:d.parameterCount.toLocaleString("en-US"),"aria-label":d.parameterCount===null?"Parameters unknown":`${d.parameterCount.toLocaleString("en-US")} parameters`,children:d.parameterCount===null?"—":wt(d.parameterCount)}),t&&a.jsx("td",{className:"col-harness",children:d.harness||"—"}),n.map(S=>{var b;const V=S===l,B=(b=d.metrics)==null?void 0:b[S];return a.jsx("td",{className:`col-value${V?" is-active":""}${V&&f===1?" is-best":""}`,children:B!=null&&B!==""?se(B):"—"},S)}),a.jsx("td",{className:"col-paper",children:A?a.jsx(re,{to:`/paper/${A}`,title:d.paper_title||F||void 0,children:Ie(d.paper_title,F)}):Ie(d.paper_title,F)}),a.jsx("td",{className:"col-year",children:((x=d.evaluated_on||d.paper_published_date)==null?void 0:x.slice(0,4))||"—"})]},d.id)})})]})})}function Ae(e){const t=e.length===7?`${e}-01`:e,r=new Date(t).getTime();return Number.isFinite(r)?r:0}const me=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function he(e){const t=new Date(e);return{year:t.getFullYear(),month:t.getMonth()}}function Nt(e,t){if(e===t){const{year:u,month:h}=he(e);return[{timestamp:new Date(u,h,1).getTime(),key:`${u}-${h}`,label:`${me[h]} ${u}`}]}const r=he(e),s=he(t);if(r.year===s.year){const u=s.month-r.month+1;let h=1;const d=12;u>d&&(h=Math.ceil(u/d));const f=[];for(let g=r.month;g<=s.month;g+=h)f.push({timestamp:new Date(r.year,g,1).getTime(),key:`${r.year}-${g}`,label:u<=3?`${me[g]} ${r.year}`:me[g]});return f}const i=s.year-r.year+1;let n=1;const l=12;i>l&&(n=Math.ceil(i/l));const o=[];for(let u=r.year;u<=s.year;u+=n)o.push({timestamp:new Date(u,0,1).getTime(),key:String(u),label:String(u)});return o}const Rt=({points:e,metric:t})=>{const r=nt(),[s,i]=L.useState(null),n=880,l=320,o=60,u=30,h=40,d=50,f=e.map(c=>c.value),g=Math.min(...f),F=Math.max(...f)-g||1,x=n-o-u,S=l-h-d,V=e.map(c=>Ae(c.date)),B=Math.min(...V),b=Math.max(...V),W=b-B||1,R=c=>B===b?o+x/2:o+(c-B)/W*x,q=e.map((c,m)=>{const _=R(Ae(c.date)),j=(c.value-g)/F,y=h+S*(1-j);return{x:_,y,data:c,idx:m}}),w=q.filter(c=>c.data.isSota);let N="";if(w.length>=2){N=`M${w[0].x},${w[0].y}`;for(let c=1;c<w.length;c++){const m=w[c-1],_=w[c],j=(m.x+_.x)/2;N+=` C${j},${m.y} ${j},${_.y} ${_.x},${_.y}`}}const z=5.4,U=8,ne=9,X=c=>{const m=c.data.modelName||c.data.paperTitle||"";if(!m)return null;const _=m.length>22?m.slice(0,21)+"…":m,j=_.length*z;let y=c.x-j/2,E=c.x+j/2,$="middle";return y<o?(y=o,E=o+j,$="start"):E>n-u&&(E=n-u,y=E-j,$="end"),{x:$==="start"?o:$==="end"?n-u:c.x,y:c.y-ne,text:_,anchor:$,left:y,right:E}},Y=[],k=w.length>0?X(w[w.length-1]):null;let H=-1/0;for(let c=0;c<w.length-1;c++){const m=X(w[c]);m&&(m.left<H+U||k&&m.right>k.left-U||(H=m.right,Y.push({x:m.x,y:m.y,text:m.text,anchor:m.anchor})))}k&&Y.push({x:k.x,y:k.y,text:k.text,anchor:k.anchor});const C=Nt(B,b),K=5,G=c=>i(m=>m===c?null:m),O=c=>{c&&r(`/paper/${c}`)},p=(c,m)=>{const j=`${c.data.modelName||c.data.paperTitle||"Unknown model"}: ${se(c.data.value)} on ${c.data.dateLabel}`,y=!!c.data.paperRouteId;return a.jsxs("g",{children:[m,a.jsx("circle",{cx:c.x,cy:c.y,r:"10",fill:"transparent",style:{cursor:y?"pointer":"default",outline:"none"},tabIndex:0,role:y?"link":"img","aria-label":j,onMouseEnter:()=>i(c.idx),onMouseLeave:()=>G(c.idx),onFocus:()=>i(c.idx),onBlur:()=>G(c.idx),onClick:()=>O(c.data.paperRouteId),onKeyDown:E=>{y&&(E.key==="Enter"||E.key===" ")&&(E.preventDefault(),O(c.data.paperRouteId))},children:a.jsx("title",{children:j})})]},c.idx)};return a.jsxs("svg",{width:"100%",viewBox:`0 0 ${n} ${l}`,style:{display:"block"},children:[a.jsx("text",{x:o-38,y:h+S/2,fontSize:"11",fontFamily:"var(--mono)",fill:"var(--ink-faint)",textAnchor:"middle",transform:`rotate(-90 ${o-38} ${h+S/2})`,children:t}),Array.from({length:K}).map((c,m)=>{const _=m/(K-1),j=h+S*(1-_),y=g+F*_;return a.jsxs("g",{children:[a.jsx("line",{x1:o,y1:j,x2:n-u,y2:j,stroke:"var(--hairline)",strokeWidth:"1"}),a.jsx("text",{x:o-10,y:j+4,fontSize:"11",fontFamily:"var(--mono)",fill:"var(--ink-faint)",textAnchor:"end",children:se(y)})]},m)}),C.map(c=>{const m=R(c.timestamp);return a.jsx("text",{x:m,y:l-d+18,fontSize:"11",fontFamily:"var(--mono)",fill:"var(--ink-soft)",textAnchor:"middle",children:c.label},c.key)}),q.filter(c=>!c.data.isSota).map(c=>{const m=s===c.idx;return p(c,a.jsx("circle",{cx:c.x,cy:c.y,r:m?3:2,fill:"var(--ink-faint)",opacity:m?1:.45,style:{transition:"r 0.12s ease, opacity 0.12s ease"}}))}),N&&a.jsx("path",{d:N,stroke:"var(--accent)",strokeWidth:"2",fill:"none",strokeLinejoin:"round",strokeLinecap:"round"}),w.map(c=>{const m=s===c.idx;return p(c,a.jsx("circle",{cx:c.x,cy:c.y,r:m?4.5:3,fill:m?"var(--accent)":"var(--bg-elevated)",stroke:"var(--accent)",strokeWidth:"1.5",style:{transition:"r 0.12s ease, fill 0.12s ease"}}))}),Y.map((c,m)=>a.jsx("text",{x:c.x,y:c.y,fontSize:"9.5",fontFamily:"var(--mono)",fill:"var(--ink-soft)",textAnchor:c.anchor,pointerEvents:"none",style:{paintOrder:"stroke",stroke:"var(--bg-elevated)",strokeWidth:3,strokeLinejoin:"round"},children:c.text},`label-${m}`)),s!==null&&q[s]&&(()=>{const c=q[s],m=c.data.modelName||c.data.paperTitle||"Unknown model",j=`${m.length>40?m.slice(0,39)+"…":m}: ${se(c.data.value)}`,E=Math.max(120,Math.min(340,j.length*6.6+24)),$=30;let M=c.x-E/2;M<o&&(M=o),M+E>n-u&&(M=n-u-E);const le=c.y-$-14>=h?c.y-$-12:c.y+12;return a.jsxs("g",{pointerEvents:"none",children:[a.jsx("rect",{x:M,y:le,width:E,height:$,rx:"6",ry:"6",fill:"var(--bg-elevated)",stroke:"var(--hairline-strong)",strokeWidth:"1",style:{filter:"drop-shadow(0 2px 6px rgba(0,0,0,0.08))"}}),a.jsx("text",{x:M+12,y:le+19,fontSize:"12",fontFamily:"var(--sans)",fill:"var(--ink)",fontWeight:500,children:j})]})})()]})};function $t(e,t){if(e.match(/^[a-z]+:\/\//i))return e;if(e.match(/^\/\//))return window.location.protocol+e;if(e.match(/^[a-z]+:/i))return e;const r=document.implementation.createHTMLDocument(),s=r.createElement("base"),i=r.createElement("a");return r.head.appendChild(s),r.body.appendChild(i),t&&(s.href=t),i.href=e,i.href}const Pt=(()=>{let e=0;const t=()=>`0000${(Math.random()*36**4<<0).toString(36)}`.slice(-4);return()=>(e+=1,`u${t()}${e}`)})();function Q(e){const t=[];for(let r=0,s=e.length;r<s;r++)t.push(e[r]);return t}let ee=null;function Qe(e={}){return ee||(e.includeStyleProperties?(ee=e.includeStyleProperties,ee):(ee=Q(window.getComputedStyle(document.documentElement)),ee))}function oe(e,t){const s=(e.ownerDocument.defaultView||window).getComputedStyle(e).getPropertyValue(t);return s?parseFloat(s.replace("px","")):0}function Tt(e){const t=oe(e,"border-left-width"),r=oe(e,"border-right-width");return e.clientWidth+t+r}function Ft(e){const t=oe(e,"border-top-width"),r=oe(e,"border-bottom-width");return e.clientHeight+t+r}function Xe(e,t={}){const r=t.width||Tt(e),s=t.height||Ft(e);return{width:r,height:s}}function Mt(){let e,t;try{t=process}catch{}const r=t&&t.env?t.env.devicePixelRatio:null;return r&&(e=parseInt(r,10),Number.isNaN(e)&&(e=1)),e||window.devicePixelRatio||1}const D=16384;function Lt(e){(e.width>D||e.height>D)&&(e.width>D&&e.height>D?e.width>e.height?(e.height*=D/e.width,e.width=D):(e.width*=D/e.height,e.height=D):e.width>D?(e.height*=D/e.width,e.width=D):(e.width*=D/e.height,e.height=D))}function It(e,t={}){return e.toBlob?new Promise(r=>{e.toBlob(r,t.type?t.type:"image/png",t.quality?t.quality:1)}):new Promise(r=>{const s=window.atob(e.toDataURL(t.type?t.type:void 0,t.quality?t.quality:void 0).split(",")[1]),i=s.length,n=new Uint8Array(i);for(let l=0;l<i;l+=1)n[l]=s.charCodeAt(l);r(new Blob([n],{type:t.type?t.type:"image/png"}))})}function de(e){return new Promise((t,r)=>{const s=new Image;s.onload=()=>{s.decode().then(()=>{requestAnimationFrame(()=>t(s))})},s.onerror=r,s.crossOrigin="anonymous",s.decoding="async",s.src=e})}async function At(e){return Promise.resolve().then(()=>new XMLSerializer().serializeToString(e)).then(encodeURIComponent).then(t=>`data:image/svg+xml;charset=utf-8,${t}`)}async function Bt(e,t,r){const s="http://www.w3.org/2000/svg",i=document.createElementNS(s,"svg"),n=document.createElementNS(s,"foreignObject");return i.setAttribute("width",`${t}`),i.setAttribute("height",`${r}`),i.setAttribute("viewBox",`0 0 ${t} ${r}`),n.setAttribute("width","100%"),n.setAttribute("height","100%"),n.setAttribute("x","0"),n.setAttribute("y","0"),n.setAttribute("externalResourcesRequired","true"),i.appendChild(n),n.appendChild(e),At(i)}const I=(e,t)=>{if(e instanceof t)return!0;const r=Object.getPrototypeOf(e);return r===null?!1:r.constructor.name===t.name||I(r,t)};function Dt(e){const t=e.getPropertyValue("content");return`${e.cssText} content: '${t.replace(/'|"/g,"")}';`}function Ht(e,t){return Qe(t).map(r=>{const s=e.getPropertyValue(r),i=e.getPropertyPriority(r);return`${r}: ${s}${i?" !important":""};`}).join(" ")}function Vt(e,t,r,s){const i=`.${e}:${t}`,n=r.cssText?Dt(r):Ht(r,s);return document.createTextNode(`${i}{${n}}`)}function Be(e,t,r,s){const i=window.getComputedStyle(e,r),n=i.getPropertyValue("content");if(n===""||n==="none")return;const l=Pt();try{t.className=`${t.className} ${l}`}catch{return}const o=document.createElement("style");o.appendChild(Vt(l,r,i,s)),t.appendChild(o)}function Ut(e,t,r){Be(e,t,":before",r),Be(e,t,":after",r)}const De="application/font-woff",He="image/jpeg",qt={woff:De,woff2:De,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:He,jpeg:He,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml",webp:"image/webp"};function Ot(e){const t=/\.([^./]*?)$/g.exec(e);return t?t[1]:""}function xe(e){const t=Ot(e).toLowerCase();return qt[t]||""}function Wt(e){return e.split(/,/)[1]}function pe(e){return e.search(/^(data:)/)!==-1}function zt(e,t){return`data:${t};base64,${e}`}async function Ye(e,t,r){const s=await fetch(e,t);if(s.status===404)throw new Error(`Resource "${s.url}" not found`);const i=await s.blob();return new Promise((n,l)=>{const o=new FileReader;o.onerror=l,o.onloadend=()=>{try{n(r({res:s,result:o.result}))}catch(u){l(u)}},o.readAsDataURL(i)})}const fe={};function Kt(e,t,r){let s=e.replace(/\?.*/,"");return r&&(s=e),/ttf|otf|eot|woff2?/i.test(s)&&(s=s.replace(/.*\//,"")),t?`[${t}]${s}`:s}async function be(e,t,r){const s=Kt(e,t,r.includeQueryParams);if(fe[s]!=null)return fe[s];r.cacheBust&&(e+=(/\?/.test(e)?"&":"?")+new Date().getTime());let i;try{const n=await Ye(e,r.fetchRequestInit,({res:l,result:o})=>(t||(t=l.headers.get("Content-Type")||""),Wt(o)));i=zt(n,t)}catch(n){i=r.imagePlaceholder||"";let l=`Failed to fetch resource: ${e}`;n&&(l=typeof n=="string"?n:n.message),l&&console.warn(l)}return fe[s]=i,i}async function Gt(e){const t=e.toDataURL();return t==="data:,"?e.cloneNode(!1):de(t)}async function Qt(e,t){if(e.currentSrc){const n=document.createElement("canvas"),l=n.getContext("2d");n.width=e.clientWidth,n.height=e.clientHeight,l==null||l.drawImage(e,0,0,n.width,n.height);const o=n.toDataURL();return de(o)}const r=e.poster,s=xe(r),i=await be(r,s,t);return de(i)}async function Xt(e,t){var r;try{if(!((r=e==null?void 0:e.contentDocument)===null||r===void 0)&&r.body)return await ue(e.contentDocument.body,t,!0)}catch{}return e.cloneNode(!1)}async function Yt(e,t){return I(e,HTMLCanvasElement)?Gt(e):I(e,HTMLVideoElement)?Qt(e,t):I(e,HTMLIFrameElement)?Xt(e,t):e.cloneNode(Je(e))}const Jt=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SLOT",Je=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SVG";async function Zt(e,t,r){var s,i;if(Je(t))return t;let n=[];return Jt(e)&&e.assignedNodes?n=Q(e.assignedNodes()):I(e,HTMLIFrameElement)&&(!((s=e.contentDocument)===null||s===void 0)&&s.body)?n=Q(e.contentDocument.body.childNodes):n=Q(((i=e.shadowRoot)!==null&&i!==void 0?i:e).childNodes),n.length===0||I(e,HTMLVideoElement)||await n.reduce((l,o)=>l.then(()=>ue(o,r)).then(u=>{u&&t.appendChild(u)}),Promise.resolve()),t}function er(e,t,r){const s=t.style;if(!s)return;const i=window.getComputedStyle(e);i.cssText?(s.cssText=i.cssText,s.transformOrigin=i.transformOrigin):Qe(r).forEach(n=>{let l=i.getPropertyValue(n);n==="font-size"&&l.endsWith("px")&&(l=`${Math.floor(parseFloat(l.substring(0,l.length-2)))-.1}px`),I(e,HTMLIFrameElement)&&n==="display"&&l==="inline"&&(l="block"),n==="d"&&t.getAttribute("d")&&(l=`path(${t.getAttribute("d")})`),s.setProperty(n,l,i.getPropertyPriority(n))})}function tr(e,t){I(e,HTMLTextAreaElement)&&(t.innerHTML=e.value),I(e,HTMLInputElement)&&t.setAttribute("value",e.value)}function rr(e,t){if(I(e,HTMLSelectElement)){const r=t,s=Array.from(r.children).find(i=>e.value===i.getAttribute("value"));s&&s.setAttribute("selected","")}}function ar(e,t,r){return I(t,Element)&&(er(e,t,r),Ut(e,t,r),tr(e,t),rr(e,t)),t}async function sr(e,t){const r=e.querySelectorAll?e.querySelectorAll("use"):[];if(r.length===0)return e;const s={};for(let n=0;n<r.length;n++){const o=r[n].getAttribute("xlink:href");if(o){const u=e.querySelector(o),h=document.querySelector(o);!u&&h&&!s[o]&&(s[o]=await ue(h,t,!0))}}const i=Object.values(s);if(i.length){const n="http://www.w3.org/1999/xhtml",l=document.createElementNS(n,"svg");l.setAttribute("xmlns",n),l.style.position="absolute",l.style.width="0",l.style.height="0",l.style.overflow="hidden",l.style.display="none";const o=document.createElementNS(n,"defs");l.appendChild(o);for(let u=0;u<i.length;u++)o.appendChild(i[u]);e.appendChild(l)}return e}async function ue(e,t,r){return!r&&t.filter&&!t.filter(e)?null:Promise.resolve(e).then(s=>Yt(s,t)).then(s=>Zt(e,s,t)).then(s=>ar(e,s,t)).then(s=>sr(s,t))}const Ze=/url\((['"]?)([^'"]+?)\1\)/g,nr=/url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g,ir=/src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;function lr(e){const t=e.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1");return new RegExp(`(url\\(['"]?)(${t})(['"]?\\))`,"g")}function cr(e){const t=[];return e.replace(Ze,(r,s,i)=>(t.push(i),r)),t.filter(r=>!pe(r))}async function or(e,t,r,s,i){try{const n=r?$t(t,r):t,l=xe(t);let o;return i||(o=await be(n,l,s)),e.replace(lr(t),`$1${o}$3`)}catch{}return e}function dr(e,{preferredFontFormat:t}){return t?e.replace(ir,r=>{for(;;){const[s,,i]=nr.exec(r)||[];if(!i)return"";if(i===t)return`src: ${s};`}}):e}function et(e){return e.search(Ze)!==-1}async function tt(e,t,r){if(!et(e))return e;const s=dr(e,r);return cr(s).reduce((n,l)=>n.then(o=>or(o,l,t,r)),Promise.resolve(s))}async function te(e,t,r){var s;const i=(s=t.style)===null||s===void 0?void 0:s.getPropertyValue(e);if(i){const n=await tt(i,null,r);return t.style.setProperty(e,n,t.style.getPropertyPriority(e)),!0}return!1}async function ur(e,t){await te("background",e,t)||await te("background-image",e,t),await te("mask",e,t)||await te("-webkit-mask",e,t)||await te("mask-image",e,t)||await te("-webkit-mask-image",e,t)}async function mr(e,t){const r=I(e,HTMLImageElement);if(!(r&&!pe(e.src))&&!(I(e,SVGImageElement)&&!pe(e.href.baseVal)))return;const s=r?e.src:e.href.baseVal,i=await be(s,xe(s),t);await new Promise((n,l)=>{e.onload=n,e.onerror=t.onImageErrorHandler?(...u)=>{try{n(t.onImageErrorHandler(...u))}catch(h){l(h)}}:l;const o=e;o.decode&&(o.decode=n),o.loading==="lazy"&&(o.loading="eager"),r?(e.srcset="",e.src=i):e.href.baseVal=i})}async function hr(e,t){const s=Q(e.childNodes).map(i=>rt(i,t));await Promise.all(s).then(()=>e)}async function rt(e,t){I(e,Element)&&(await ur(e,t),await mr(e,t),await hr(e,t))}function fr(e,t){const{style:r}=e;t.backgroundColor&&(r.backgroundColor=t.backgroundColor),t.width&&(r.width=`${t.width}px`),t.height&&(r.height=`${t.height}px`);const s=t.style;return s!=null&&Object.keys(s).forEach(i=>{r[i]=s[i]}),e}const Ve={};async function Ue(e){let t=Ve[e];if(t!=null)return t;const s=await(await fetch(e)).text();return t={url:e,cssText:s},Ve[e]=t,t}async function qe(e,t){let r=e.cssText;const s=/url\(["']?([^"')]+)["']?\)/g,n=(r.match(/url\([^)]+\)/g)||[]).map(async l=>{let o=l.replace(s,"$1");return o.startsWith("https://")||(o=new URL(o,e.url).href),Ye(o,t.fetchRequestInit,({result:u})=>(r=r.replace(l,`url(${u})`),[l,u]))});return Promise.all(n).then(()=>r)}function Oe(e){if(e==null)return[];const t=[],r=/(\/\*[\s\S]*?\*\/)/gi;let s=e.replace(r,"");const i=new RegExp("((@.*?keyframes [\\s\\S]*?){([\\s\\S]*?}\\s*?)})","gi");for(;;){const u=i.exec(s);if(u===null)break;t.push(u[0])}s=s.replace(i,"");const n=/@import[\s\S]*?url\([^)]*\)[\s\S]*?;/gi,l="((\\s*?(?:\\/\\*[\\s\\S]*?\\*\\/)?\\s*?@media[\\s\\S]*?){([\\s\\S]*?)}\\s*?})|(([\\s\\S]*?){([\\s\\S]*?)})",o=new RegExp(l,"gi");for(;;){let u=n.exec(s);if(u===null){if(u=o.exec(s),u===null)break;n.lastIndex=o.lastIndex}else o.lastIndex=n.lastIndex;t.push(u[0])}return t}async function pr(e,t){const r=[],s=[];return e.forEach(i=>{if("cssRules"in i)try{Q(i.cssRules||[]).forEach((n,l)=>{if(n.type===CSSRule.IMPORT_RULE){let o=l+1;const u=n.href,h=Ue(u).then(d=>qe(d,t)).then(d=>Oe(d).forEach(f=>{try{i.insertRule(f,f.startsWith("@import")?o+=1:i.cssRules.length)}catch(g){console.error("Error inserting rule from remote css",{rule:f,error:g})}})).catch(d=>{console.error("Error loading remote css",d.toString())});s.push(h)}})}catch(n){const l=e.find(o=>o.href==null)||document.styleSheets[0];i.href!=null&&s.push(Ue(i.href).then(o=>qe(o,t)).then(o=>Oe(o).forEach(u=>{l.insertRule(u,l.cssRules.length)})).catch(o=>{console.error("Error loading remote stylesheet",o)})),console.error("Error inlining remote css file",n)}}),Promise.all(s).then(()=>(e.forEach(i=>{if("cssRules"in i)try{Q(i.cssRules||[]).forEach(n=>{r.push(n)})}catch(n){console.error(`Error while reading CSS rules from ${i.href}`,n)}}),r))}function gr(e){return e.filter(t=>t.type===CSSRule.FONT_FACE_RULE).filter(t=>et(t.style.getPropertyValue("src")))}async function xr(e,t){if(e.ownerDocument==null)throw new Error("Provided element is not within a Document");const r=Q(e.ownerDocument.styleSheets),s=await pr(r,t);return gr(s)}function at(e){return e.trim().replace(/["']/g,"")}function br(e){const t=new Set;function r(s){(s.style.fontFamily||getComputedStyle(s).fontFamily).split(",").forEach(n=>{t.add(at(n))}),Array.from(s.children).forEach(n=>{n instanceof HTMLElement&&r(n)})}return r(e),t}async function yr(e,t){const r=await xr(e,t),s=br(e);return(await Promise.all(r.filter(n=>s.has(at(n.style.fontFamily))).map(n=>{const l=n.parentStyleSheet?n.parentStyleSheet.href:null;return tt(n.cssText,l,t)}))).join(`
2
- `)}async function vr(e,t){const r=t.fontEmbedCSS!=null?t.fontEmbedCSS:t.skipFonts?null:await yr(e,t);if(r){const s=document.createElement("style"),i=document.createTextNode(r);s.appendChild(i),e.firstChild?e.insertBefore(s,e.firstChild):e.appendChild(s)}}async function wr(e,t={}){const{width:r,height:s}=Xe(e,t),i=await ue(e,t,!0);return await vr(i,t),await rt(i,t),fr(i,t),await Bt(i,r,s)}async function jr(e,t={}){const{width:r,height:s}=Xe(e,t),i=await wr(e,t),n=await de(i),l=document.createElement("canvas"),o=l.getContext("2d"),u=t.pixelRatio||Mt(),h=t.canvasWidth||r,d=t.canvasHeight||s;return l.width=h*u,l.height=d*u,t.skipAutoScale||Lt(l),l.style.width=`${h}`,l.style.height=`${d}`,t.backgroundColor&&(o.fillStyle=t.backgroundColor,o.fillRect(0,0,l.width,l.height)),o.drawImage(n,0,0,l.width,l.height),l}async function _r(e,t={}){const r=await jr(e,t);return await It(r)}const ge="#ffffff";function Sr(){return typeof window>"u"?ge:window.getComputedStyle(document.documentElement).getPropertyValue("--bg-elevated").trim()||ge}function kr(e){if(typeof window>"u")return ge;const t=window.getComputedStyle(e).backgroundColor;return!t||t==="rgba(0, 0, 0, 0)"||t==="transparent"?Sr():t}async function Cr(e){var r,s;if(typeof window>"u"||!((s=(r=window.navigator)==null?void 0:r.clipboard)!=null&&s.write))throw new Error("Clipboard image copy is not supported in this browser.");if(typeof window.ClipboardItem>"u")throw new Error("Clipboard image copy is not supported in this browser.");const t=await _r(e,{pixelRatio:2,cacheBust:!0,backgroundColor:kr(e)});if(!t)throw new Error("Failed to render screenshot.");await window.navigator.clipboard.write([new window.ClipboardItem({"image/png":t})])}const st=({targetRef:e,label:t})=>{const{toast:r}=it(),[s,i]=L.useState("idle"),n=L.useRef(null);L.useEffect(()=>()=>{n.current!==null&&window.clearTimeout(n.current)},[]);const l=L.useCallback(async()=>{const u=e.current;if(u){i("copying"),u.classList.add("is-capturing"),u.offsetHeight,await new Promise(h=>window.requestAnimationFrame(()=>h()));try{await Cr(u),i("copied"),r({title:"Screenshot copied",description:`Image of the ${t} copied to your clipboard.`}),n.current!==null&&window.clearTimeout(n.current),n.current=window.setTimeout(()=>i("idle"),1500)}catch(h){i("idle"),r({title:"Copy failed",description:h instanceof Error&&h.message?h.message:"Could not copy the screenshot to your clipboard.",variant:"destructive"})}finally{u.classList.remove("is-capturing")}}},[e,t,r]),o=s==="copied"?"Copied":s==="copying"?"Copying…":"Copy image";return a.jsxs("button",{type:"button",className:"bm-copy-btn",onClick:l,disabled:s==="copying","aria-label":`Copy ${t} screenshot to clipboard`,title:`Copy ${t} screenshot to clipboard`,children:[a.jsx(ht,{name:"copy",size:11}),o]})};function Er({model:e,datasetName:t,hideClosed:r,setHideClosed:s,setMetric:i}){const n=L.useRef(null),{isInitialFilteredViewLoading:l,chartPoints:o,activeMetric:u,allowedMetrics:h,orderedMetrics:d,parameterBound:f}=e;return l||o.length===0?null:a.jsxs("div",{className:"bm-card",ref:n,children:[a.jsxs("div",{className:"bm-card-screenshot-header","aria-hidden":"true",children:[a.jsxs("div",{className:"bm-card-screenshot-title",children:[a.jsx("span",{className:"bm-card-screenshot-eyebrow",children:"Benchmark"}),a.jsx("span",{className:"bm-card-screenshot-name",children:t})]}),a.jsxs("div",{className:"bm-card-screenshot-brand",children:[a.jsxs("span",{className:"brand",children:[a.jsx("span",{className:"brand-mark"}),a.jsxs("span",{className:"brand-name",children:["Papers ",a.jsx("em",{children:"With Code"})]})]}),a.jsx("span",{className:"bm-card-screenshot-url",children:"paperswithcode.co"})]})]}),a.jsxs("div",{className:"bm-card-head",children:[a.jsx("div",{className:"bm-card-title",children:"SOTA progression"}),a.jsxs("div",{className:"bm-card-actions",children:[h.length>1&&a.jsxs("label",{className:"bm-view-select",children:[a.jsx("span",{className:"bm-view-select-label",children:"View"}),a.jsx("select",{value:u,onChange:g=>i(g.target.value),children:d.map(g=>a.jsx("option",{value:g,children:g},g))})]}),a.jsxs("label",{className:"bm-closed-toggle",title:"Show or hide evaluations of closed-source models",children:[a.jsx(ze,{className:"bm-closed-toggle-switch",checked:!r,onCheckedChange:g=>{s(!g)},"aria-label":"Show closed-source models"}),a.jsx("span",{className:"bm-closed-toggle-label",children:"Closed-source"})]}),a.jsx(st,{targetRef:n,label:"SOTA chart"})]})]}),a.jsx("div",{className:"bm-chart-wrap",children:a.jsx(Rt,{points:o,metric:u})}),a.jsxs("div",{className:"bm-chart-foot",children:[a.jsx("span",{className:"legend-dot"}),f===void 0?"All models":"Filtered models"," over time · highlighted dots track the running best · hover for the model · click to open the paper"]})]})}function Nr(e){if(!e)return null;const t=e.trim(),r=t.match(/^https?:\/\/(?:www\.)?arxiv\.org\/(?:abs|pdf)\/([^/?#]+)/i);if(r!=null&&r[1])return r[1].replace(/\.pdf$/i,"");const s=t.match(/^(?:https?:\/\/(?:www\.)?paperswithcode\.co)?\/paper\/([^/?#]+)/i);return(s==null?void 0:s[1])??null}function We(e,t){return e?a.jsx(ie,{title:e}):t||"—"}const Kr=()=>{var ve,we,je,_e,Se,ke,Ce,Ee,Ne,Re,$e;const{datasetSlug:e}=lt(),[t,r]=ct(),s=t.get("task")||void 0,i=t.get("eval")||void 0,n=vt(t.get("max_parameters_exclusive")),{preferences:l,setHideClosedSourceEvals:o}=ot(),u=L.useRef(null),h=L.useRef(!1),d=L.useRef(null),[f,g]=L.useState(null),A=`${e}:${s||""}`,F=f===A,x=J({queryKey:["dataset",e,"with-paper",s,l.hide_closed_source_evals?"open":"all"],queryFn:()=>Z.getDatasetBySlug(e,{include_paper:!0,task:s,is_open:l.hide_closed_source_evals?!0:void 0}),enabled:!!e,staleTime:10*60*1e3}),S=J({queryKey:["dataset-evals",(ve=x.data)==null?void 0:ve.id],queryFn:()=>mt.byDataset(x.data.id),enabled:!!((we=x.data)!=null&&we.id),staleTime:5*60*1e3}),V=J({queryKey:["dataset-tasks",(je=x.data)==null?void 0:je.id],queryFn:()=>Z.datasetTasks(x.data.id),enabled:!!((_e=x.data)!=null&&_e.id),staleTime:10*60*1e3}),B=J({queryKey:["metric-directions"],queryFn:()=>Z.metricDirections(),staleTime:60*60*1e3}),b=Ge(V.data||[],S.data||[],s,i),W=J({queryKey:["task-benchmark-trends",b,l.hide_closed_source_evals?!0:void 0],queryFn:()=>Z.trendingBenchmarks(b,{limit:100,min_recent_papers:0,is_open:l.hide_closed_source_evals?!0:void 0}),enabled:!!b&&!!((Se=x.data)!=null&&Se.id),staleTime:10*60*1e3}),R=L.useMemo(()=>{var v;return(((v=W.data)==null?void 0:v.results)||[]).find(P=>{var T;return P.id===((T=x.data)==null?void 0:T.id)})||null},[W.data,(ke=x.data)==null?void 0:ke.id]),q=J({queryKey:["leaderboard-metrics",(Ce=x.data)==null?void 0:Ce.id,b],queryFn:()=>Z.leaderboardMetrics(x.data.id,b),enabled:!!((Ee=x.data)!=null&&Ee.id)&&!!b,staleTime:10*60*1e3}),w=Ct({evaluations:S.data||[],tasks:V.data||[],configuredMetrics:q.data||[],directions:B.data,initialSummary:(Ne=x.data)==null?void 0:Ne.leaderboard_summary,taskSlug:s,highlightEvalId:i,metric:t.get("metric")||void 0,hideClosed:l.hide_closed_source_evals,parameterBound:n,showMoreMetrics:F,ready:{evaluations:S.isSuccess,tasks:V.isSuccess,directions:B.isSuccess,metrics:q.isSuccess}}),{primaryTask:N,hiddenClosedEvals:z,hiddenClosedTopEval:U,isSummaryLoading:ne,displayedMetric:X,displayedSota:Y,displayedSotaModel:k,isInitialFilteredViewLoading:H,highlightedEval:C,hasParameterMetadata:K,parameterCoverage:G,orderedMetrics:O}=w;L.useEffect(()=>{if(h.current||!i||!S.data||S.data.length===0)return;const v=u.current;v&&(h.current=!0,v.scrollIntoView({behavior:"smooth",block:"start"}))},[i,S.data]);const p=J({queryKey:["area",N==null?void 0:N.area_id],queryFn:()=>Z.getArea(N.area_id),enabled:!!(N!=null&&N.area_id),staleTime:10*60*1e3});if(x.isLoading)return a.jsxs("div",{className:"page",children:[a.jsx(ce,{className:"h-12 w-1/2 mb-6"}),a.jsx(ce,{className:"h-64 w-full"})]});if(x.error||!x.data)return a.jsx("div",{className:"page",children:a.jsx(ft,{variant:"destructive",children:a.jsx(pt,{children:"Benchmark not found."})})});const c=x.data,m=!!c.supports_harness,_=v=>{r(P=>{const T=new URLSearchParams(P);return v===void 0?T.delete("max_parameters_exclusive"):T.set("max_parameters_exclusive",String(v)),T})},j=v=>{r(P=>{const T=new URLSearchParams(P);return T.set("metric",v),T})},y=c.introducing_paper??void 0,E=(y==null?void 0:y.arxiv_id)||(y==null?void 0:y.id)||Nr(c.paper_url),$=(y==null?void 0:y.title)||c.introducing_paper_title||null,M=((Re=y==null?void 0:y.published)==null?void 0:Re.slice(0,4))||c.introduced_year||null,ye=!!E||!!c.paper_url||!!$,le=y!=null&&y.arxiv_id||($e=c.paper_url)!=null&&$e.match(/^https?:\/\/(?:www\.)?arxiv\.org\//i)?`arXiv:${E}`:`Paper ${E}`;return a.jsx("div",{className:"page",children:a.jsxs("div",{className:"bm-page",children:[a.jsxs("div",{className:"breadcrumb",children:[a.jsx(re,{to:"/tasks",children:"Tasks"}),p.data&&a.jsxs(a.Fragment,{children:[a.jsx("span",{className:"sep",children:"/"}),a.jsx(re,{to:`/tasks#area-${bt(p.data.name)}`,children:p.data.name})]}),N&&a.jsxs(a.Fragment,{children:[a.jsx("span",{className:"sep",children:"/"}),a.jsx(re,{to:`/tasks/${N.slug||N.id}`,children:N.name})]}),a.jsx("span",{className:"sep",children:"/"}),a.jsx("span",{style:{color:"var(--accent-text)"},children:c.name})]}),a.jsxs("div",{className:"bm-title-row",children:[a.jsx("h1",{className:"bm-title",children:c.name}),R&&a.jsxs("div",{className:"bm-title-trend","aria-label":`${c.name} reporting trend`,children:[a.jsx(gt,{history:R.history,benchmarkName:R.name}),a.jsxs("span",{className:"bm-title-trend-summary",children:[a.jsx("strong",{children:R.recent_paper_count})," ",R.recent_paper_count===1?"paper":"papers",R.rate_change==null?R.recent_paper_count>0&&a.jsx("span",{className:"benchmark-trend-change is-new",children:"new"}):a.jsxs("span",{className:`benchmark-trend-change ${R.rate_change>=1?"is-up":"is-down"}`,children:[R.rate_change>=1?"↑":"↓"," ",R.rate_change.toFixed(1),"×"]})]})]})]}),a.jsxs("div",{className:"bm-subtitle",children:[ne?a.jsx(ce,{className:"h-5 w-64 bm-summary-skeleton","aria-label":"Loading benchmark summary"}):a.jsxs("span",{children:[X&&a.jsxs(a.Fragment,{children:[a.jsx("span",{className:"metric-tag",children:X}),a.jsx("span",{style:{color:"var(--hairline-strong)",margin:"0 8px"},children:"·"})]}),k?a.jsxs("span",{children:["Best: ",a.jsx("span",{className:"best-name",children:se(Y)})," by ",a.jsx("span",{className:"best-name",style:{fontStyle:"normal"},children:k})]}):a.jsxs("span",{children:[w.rows.length," evaluations"]})]}),c.hf_url&&a.jsxs("a",{className:"bm-action-btn",href:c.hf_url,target:"_blank",rel:"noopener noreferrer",children:[a.jsx("span",{"aria-hidden":"true",children:"🤗"})," View on Hugging Face"]})]}),c.description&&a.jsx("p",{className:"bm-description",children:c.description}),l.hide_closed_source_evals&&z.length>0&&a.jsxs("div",{className:"bm-hidden-closed-notice",children:[a.jsxs("span",{children:[z.length," closed-source ",z.length===1?"row is":"rows are"," hidden",U!=null&&U.model_name?a.jsxs(a.Fragment,{children:[", including ",a.jsx("strong",{children:U.model_name})]}):null,"."]}),a.jsx("button",{type:"button",className:"bm-hidden-closed-action",onClick:()=>{o(!1)},children:"Show closed-source"})]}),ye&&a.jsxs("div",{className:"method-source",style:{marginTop:0,marginBottom:18},children:[a.jsx("span",{className:"method-source-label",children:"Source"}),E?a.jsxs(re,{to:`/paper/${E}`,target:"_blank",rel:"noopener noreferrer",className:"method-source-link",children:[a.jsx("span",{className:"method-source-title",children:$?a.jsx(ie,{title:$}):le}),M&&a.jsx("span",{className:"method-source-meta",children:M})]}):c.paper_url?a.jsxs("a",{href:xt(c.paper_url)??void 0,target:"_blank",rel:"noopener noreferrer",className:"method-source-link",children:[a.jsx("span",{className:"method-source-title",children:$?a.jsx(ie,{title:$}):c.paper_url}),M&&a.jsx("span",{className:"method-source-meta",children:M})]}):a.jsxs("div",{className:"method-source-link is-static",children:[a.jsx("span",{className:"method-source-title",children:$?a.jsx(ie,{title:$}):null}),M&&a.jsx("span",{className:"method-source-meta",children:M})]})]}),a.jsx(Er,{model:w,datasetName:c.name,hideClosed:l.hide_closed_source_evals,setHideClosed:o,setMetric:j}),C&&(()=>{var Te,Fe;const v=C.paper_arxiv_id||C.paper_id,P=C.paper_title||(C.paper_arxiv_id?`arXiv:${C.paper_arxiv_id}`:null),T=C.best_metric&&((Te=C.metrics)==null?void 0:Te[C.best_metric])!==void 0?C.best_metric:w.activeMetric,Pe=(Fe=C.metrics)==null?void 0:Fe[T];return a.jsxs("div",{className:"bm-highlight-banner",role:"status",children:[a.jsx("span",{className:"bm-highlight-dot","aria-hidden":"true"}),a.jsxs("div",{className:"bm-highlight-text",children:[a.jsx("span",{className:"bm-highlight-label",children:"Comparing result"}),a.jsxs("span",{className:"bm-highlight-paper",children:[C.model_name||P||"—",C.harness?` · ${C.harness}`:""]}),a.jsxs("span",{className:"bm-highlight-meta",children:[Pe!==void 0&&T?a.jsxs(a.Fragment,{children:[T,": ",se(Pe),P?" · ":""]}):null,v?a.jsx(re,{to:`/paper/${v}`,children:We(C.paper_title,P)}):We(C.paper_title,P)]})]})]})})(),a.jsxs("div",{className:"bm-card",ref:d,children:[a.jsxs("div",{className:"bm-card-screenshot-header","aria-hidden":"true",children:[a.jsxs("div",{className:"bm-card-screenshot-title",children:[a.jsx("span",{className:"bm-card-screenshot-eyebrow",children:"Benchmark"}),a.jsx("span",{className:"bm-card-screenshot-name",children:c.name})]}),a.jsxs("div",{className:"bm-card-screenshot-brand",children:[a.jsxs("span",{className:"brand",children:[a.jsx("span",{className:"brand-mark"}),a.jsxs("span",{className:"brand-name",children:["Papers ",a.jsx("em",{children:"With Code"})]})]}),a.jsx("span",{className:"bm-card-screenshot-url",children:"paperswithcode.co"})]})]}),a.jsxs("div",{className:"bm-card-head",children:[a.jsx("div",{className:"bm-card-title",children:"Leaderboard"}),a.jsxs("div",{className:"bm-card-actions",children:[w.allowedMetrics.length>1&&a.jsxs("label",{className:"bm-view-select",children:[a.jsx("span",{className:"bm-view-select-label",children:"View"}),a.jsx("select",{value:w.activeMetric,onChange:v=>j(v.target.value),children:O.map(v=>a.jsx("option",{value:v,children:v},v))})]}),a.jsxs("label",{className:"bm-closed-toggle",title:"Show or hide evaluations of closed-source models",children:[a.jsx(ze,{className:"bm-closed-toggle-switch",checked:!l.hide_closed_source_evals,onCheckedChange:v=>{o(!v)},"aria-label":"Show closed-source models"}),a.jsx("span",{className:"bm-closed-toggle-label",children:"Closed-source"})]}),!H&&!K&&S.isSuccess?a.jsx("span",{className:"bm-parameter-unavailable",children:"Parameter metadata unavailable"}):null,a.jsx(st,{targetRef:d,label:"leaderboard"})]})]}),!H&&K&&a.jsxs("div",{className:"bm-parameter-filter-bar",children:[a.jsx("span",{className:"bm-parameter-filter-label",children:"Parameters Size"}),a.jsx("div",{className:"bm-parameter-filter-options",role:"group","aria-label":"Filter leaderboard by parameter size",children:w.parameterFilters.map(v=>{const{selected:P,disabled:T}=v;return a.jsx("button",{type:"button",className:`bm-parameter-filter-option${P?" is-active":""}`,"aria-pressed":P,disabled:T,onClick:()=>_(v.maxParametersExclusive),children:v.label},v.label)})}),a.jsxs("span",{className:"bm-parameter-coverage",children:["Parameters known for ",G.parameter_coverage_known," of ",G.parameter_coverage_total," entries"]})]}),S.isLoading||H?a.jsx("div",{style:{padding:16},children:Array.from({length:5}).map((v,P)=>a.jsx(ce,{className:"h-10 w-full mb-2"},P))}):w.rows.length===0?n?a.jsxs("div",{className:"no-results",children:["No known parameter counts match this filter. "," ",a.jsx("button",{type:"button",className:"bm-empty-filter-action",onClick:()=>_(void 0),children:"Show all"})]}):a.jsx("div",{className:"no-results",children:"No evaluations submitted yet."}):a.jsxs(a.Fragment,{children:[O.length>1&&a.jsxs("div",{className:"bm-metric-columns-control",children:[a.jsx("button",{type:"button",className:"bm-metric-columns-toggle","aria-expanded":F,"aria-controls":"benchmark-leaderboard",onClick:()=>g(F?null:A),children:F?"Show selected metric only":`Show more metrics (${O.length-1})`}),F&&a.jsx("span",{children:"Scroll metrics horizontally; model and paper details stay visible."})]}),a.jsx(Et,{model:w,showHarness:m,setMetric:j,highlightRowRef:u})]})]})]})})};export{Kr as default};
 
1
+ import{r as L,j as a,v as se,L as re,b as nt,f as it,u as lt,c as ct,g as ot}from"./index-D6NpXxup.js";import{u as J}from"./useQuery-BSzsAAZV.js";import{c as Z}from"./catalog-BkXnDjBr.js";import{C as dt,E as ut,e as mt}from"./ExternalSourceEvalBadge-EZz5hzfp.js";import{L as ie}from"./LatexTitle-Cd92uzqM.js";import{S as ze}from"./switch-olpoIwHJ.js";import{I as ht}from"./components-C-Wk0LlL.js";import{S as ce}from"./skeleton-BZlAxqUu.js";import{A as ft,a as pt}from"./alert-CEE7Xf4h.js";import{B as gt}from"./BenchmarkTrendSparkline-pMSWvnek.js";import{s as xt}from"./safeExternalHref-CkBrsh84.js";import{s as bt}from"./slug-BpH-Nkvz.js";import"./papers-CJuRKhYV.js";import"./hover-card-C5GFpPJ1.js";import"./index-B_aDrAP7.js";import"./paperQueryKeys-CcqbH5YG.js";import"./transform-dsZcnzEu.js";function yt(e,t,r){const s=t?(e??[]).filter(l=>l.task_id===t):e??[],i=s.filter(l=>l.is_open===!1),n=i.reduce((l,o)=>l?(o.best_rank??Number.POSITIVE_INFINITY)<(l.best_rank??Number.POSITIVE_INFINITY)?o:l:o,null);return{visible:r?s.filter(l=>l.is_open!==!1):s,hiddenClosed:i,topHiddenClosed:n}}function ae(e){if(e==null)return null;if(typeof e=="number")return Number.isFinite(e)?e:null;const t=e.includes("±")?e.split("±")[0].trim():e.trim(),r=parseFloat(t);return Number.isFinite(r)?r:null}const Ke=[{label:"All",maxParametersExclusive:void 0},{label:"<10M",maxParametersExclusive:1e7},{label:"<100M",maxParametersExclusive:1e8},{label:"<1B",maxParametersExclusive:1e9},{label:"<3B",maxParametersExclusive:3e9},{label:"<6B",maxParametersExclusive:6e9},{label:"<12B",maxParametersExclusive:12e9},{label:"<32B",maxParametersExclusive:32e9},{label:"<128B",maxParametersExclusive:128e9},{label:"<500B",maxParametersExclusive:5e11}];function vt(e){const t=e===null?void 0:Number(e);return Ke.some(r=>r.maxParametersExclusive===t)?t:void 0}function wt(e){return new Intl.NumberFormat("en",{notation:"compact",maximumSignificantDigits:3}).format(e)}function jt(e){return[e.paper_id,e.task_id,e.dataset_id,e.model_name,e.harness??""].join("|")}function _t(e){const t=new Map;for(const r of e){const s=jt(r),i=t.get(s);if(!i){t.set(s,{...r,metrics:{...r.metrics||{}},sourceEvaluationIds:[r.id],ranksByMetric:r.best_metric&&r.best_rank!=null?{[r.best_metric]:r.best_rank}:{},parameterCount:r.num_parameters??null,hasParameterConflict:!1});continue}i.metrics={...i.metrics,...r.metrics||{}},i.sourceEvaluationIds.push(r.id),r.best_metric&&r.best_rank!=null&&(i.ranksByMetric[r.best_metric]=r.best_rank),r.num_parameters!=null&&!i.hasParameterConflict&&(i.parameterCount===null?i.parameterCount=r.num_parameters:i.parameterCount!==r.num_parameters&&(i.parameterCount=null,i.hasParameterConflict=!0))}return Array.from(t.values())}function Me(e,t){return t===void 0?e:e.filter(r=>r.parameterCount!==null&&r.parameterCount<t)}function St(e,t){return t?e.id===t||e.sourceEvaluationIds.includes(t):!1}function Le(e,t){return e.ranksByMetric[t]??e.best_rank??9999}function kt(e,t,r){if(e.length===0)return{points:[],sota:0,sotaModel:""};const s=e.map(d=>{var A;const f=ae((A=d.metrics)==null?void 0:A[t]),g=d.paper_published_date||"";return{eval:d,value:f,date:g}}).filter(d=>d.value!==null&&!!d.date).sort((d,f)=>d.date.localeCompare(f.date)),i=[];let n=null;for(const d of s){const f=n==null?!0:r==="↓"?d.value<n:d.value>n;f&&(n=d.value),i.push({value:d.value,date:d.date,dateLabel:d.date.slice(0,7),modelName:d.eval.model_name||"",paperTitle:d.eval.paper_title||"",paperRouteId:d.eval.paper_arxiv_id||d.eval.paper_id||null,isSota:f})}const o=e.map(d=>{var f;return{eval:d,value:ae((f=d.metrics)==null?void 0:f[t])}}).filter(d=>d.value!==null).sort((d,f)=>r==="↓"?d.value-f.value:f.value-d.value)[0],u=(o==null?void 0:o.value)??0,h=(o==null?void 0:o.eval.model_name)||(o==null?void 0:o.eval.paper_title)||"";return{points:i,sota:u,sotaModel:h}}function Ge(e,t,r,s){const i=t.find(n=>n.id===s);if(e.length===0)return null;if(i!=null&&i.task_id&&e.some(n=>n.id===i.task_id))return i.task_id;if(r){const n=e.find(l=>l.slug===r);if(n)return n.id}if(e.length===1)return e[0].id;if(t.length>0){const n=new Map;for(const u of t)n.set(u.task_id,(n.get(u.task_id)||0)+1);let l=null,o=-1;for(const u of e){const h=n.get(u.id)||0;h>o&&(o=h,l=u.id)}if(l)return l}return e[0].id}function Ct(e){var K,G,O;const{evaluations:t,tasks:r,taskSlug:s,highlightEvalId:i,parameterBound:n,showMoreMetrics:l}=e,o=Ge(r,t,s,i),u=r.find(p=>p.id===o)||r[0]||null,h=t.find(p=>p.id===i),d=yt(t,o,e.hideClosed),f=_t(d.visible),g=Me(f,n),A=e.configuredMetrics.map(p=>p.metric_name),F=Array.from(new Set(f.flatMap(p=>[...p.best_metric?[p.best_metric]:[],...Object.keys(p.metrics||{})]))),x=A.length?A:F,S=new Map;for(const p of f){const c=p.best_metric;!c||ae(p.metrics[c])===null||A.length&&!x.includes(c)||S.set(c,(S.get(c)||0)+1)}const V=((K=[...S].sort((p,c)=>c[1]-p[1])[0])==null?void 0:K[0])||x[0]||"",b=x.find(p=>{var c;return p.toLocaleLowerCase()===((c=e.metric)==null?void 0:c.trim().toLocaleLowerCase())})||(h==null?void 0:h.best_metric)||V,W=((G=e.directions)==null?void 0:G.directions[b])==="lower_is_better"?"↓":"↑",R=b&&x.includes(b)?[b,...x.filter(p=>p!==b)]:x,q=R.length?l?R:R.slice(0,1):b?[b]:[],w=g.slice().sort((p,c)=>{const m=ae(p.metrics[b]),_=ae(c.metrics[b]);return m!==null&&_!==null?W==="↓"?m-_:_-m:m!==null?-1:_!==null?1:Le(p,b)-Le(c,b)});let N=null,z=0;const U=w.map((p,c)=>{const m=ae(p.metrics[b]);return m!==null&&m!==N&&(N=m,z=c+1),{evaluation:p,rank:m===null?null:z,isHighlighted:St(p,i)}}),{points:ne,sota:X,sotaModel:Y}=kt(g,b,W),k=n===void 0?e.initialSummary:void 0,H=e.ready.evaluations&&e.ready.tasks&&e.ready.directions&&(!o||e.ready.metrics),C={parameter_coverage_known:f.filter(p=>p.parameterCount!==null).length,parameter_coverage_total:f.length};return{currentTaskId:o,primaryTask:u,activeMetric:b,arrow:W,allowedMetrics:x,orderedMetrics:R,visibleMetrics:q,rows:U,chartPoints:ne,highlightedEval:((O=U.find(p=>p.isHighlighted))==null?void 0:O.evaluation)||null,hiddenClosedEvals:d.hiddenClosed,hiddenClosedTopEval:d.topHiddenClosed,parameterBound:n,parameterCoverage:C,hasParameterMetadata:C.parameter_coverage_known>0,parameterFilters:Ke.map(p=>({...p,selected:n===p.maxParametersExclusive,disabled:n!==p.maxParametersExclusive&&Me(f,p.maxParametersExclusive).length===0})),displayedMetric:H?b:k==null?void 0:k.metric,displayedSota:H?X:k==null?void 0:k.value,displayedSotaModel:H?Y:k==null?void 0:k.model_name,isSummaryLoading:!H&&!k,isInitialFilteredViewLoading:n!==void 0&&!H}}function Ie(e,t){return e?a.jsx(ie,{title:e}):t||"—"}function Et({model:e,showHarness:t,setMetric:r,highlightRowRef:s}){const{rows:i,visibleMetrics:n,activeMetric:l,arrow:o}=e,[u,h]=L.useState(null);return L.useEffect(()=>{if(!u)return;const d=()=>{u.classList.toggle("has-horizontal-overflow",u.scrollWidth>u.clientWidth)},f=new ResizeObserver(d);return f.observe(u),u.firstElementChild&&f.observe(u.firstElementChild),d(),()=>f.disconnect()},[u]),a.jsx("div",{ref:h,className:"bm-table-scroll",role:"region","aria-label":"Leaderboard metrics",tabIndex:0,children:a.jsxs("table",{id:"benchmark-leaderboard",className:"bm-table",style:{"--bm-metric-count":n.length,"--bm-harness-count":t?1:0},children:[a.jsxs("colgroup",{children:[a.jsx("col",{className:"bm-width-rank"}),a.jsx("col",{className:"bm-width-model"}),a.jsx("col",{className:"bm-width-parameters"}),t&&a.jsx("col",{className:"bm-width-harness"}),n.map(d=>a.jsx("col",{className:"bm-width-metric"},d)),a.jsx("col",{}),a.jsx("col",{className:"bm-width-year"})]}),a.jsx("thead",{children:a.jsxs("tr",{children:[a.jsx("th",{className:"col-rank",children:"Rank"}),a.jsx("th",{className:"col-model",children:"Model"}),a.jsx("th",{className:"col-parameters",children:"Parameters"}),t&&a.jsx("th",{className:"col-harness",children:"Harness"}),n.map(d=>{const f=d===l;return a.jsx("th",{className:`col-value ${f?"is-active":""}`,"aria-sort":f?o==="↓"?"ascending":"descending":"none",children:a.jsxs("button",{type:"button",className:"bm-metric-header",onClick:()=>r(d),"aria-pressed":f,title:`Sort by ${d}`,children:[d,f?` ${o}`:""]})},d)}),a.jsx("th",{className:"col-paper",children:"Paper"}),a.jsx("th",{className:"col-year",children:"Year"})]})}),a.jsx("tbody",{children:i.map(({evaluation:d,rank:f,isHighlighted:g})=>{var x;const A=d.paper_arxiv_id||d.paper_id,F=d.paper_title||(d.paper_arxiv_id?`arXiv:${d.paper_arxiv_id}`:null);return a.jsxs("tr",{ref:g?s:void 0,className:g?"is-highlighted":void 0,children:[a.jsx("td",{className:"col-rank",children:f??"—"}),a.jsxs("td",{className:"col-model",children:[g&&a.jsx("span",{className:"bm-row-marker","aria-hidden":"true"}),d.hf_model_url?a.jsx("a",{href:d.hf_model_url,target:"_blank",rel:"noopener noreferrer",className:"bm-model-link",title:`Open ${d.model_name||"model"} on Hugging Face`,children:d.model_name||"—"}):d.model_name||"—",d.is_open===!1&&a.jsx(dt,{}),(d.external??d.is_external)&&a.jsx(ut,{sourceUrl:d.source_url||d.external_source_url||d.result_url})]}),a.jsx("td",{className:"col-parameters",title:d.parameterCount===null?void 0:d.parameterCount.toLocaleString("en-US"),"aria-label":d.parameterCount===null?"Parameters unknown":`${d.parameterCount.toLocaleString("en-US")} parameters`,children:d.parameterCount===null?"—":wt(d.parameterCount)}),t&&a.jsx("td",{className:"col-harness",children:d.harness||"—"}),n.map(S=>{var b;const V=S===l,B=(b=d.metrics)==null?void 0:b[S];return a.jsx("td",{className:`col-value${V?" is-active":""}${V&&f===1?" is-best":""}`,children:B!=null&&B!==""?se(B):"—"},S)}),a.jsx("td",{className:"col-paper",children:A?a.jsx(re,{to:`/paper/${A}`,title:d.paper_title||F||void 0,children:Ie(d.paper_title,F)}):Ie(d.paper_title,F)}),a.jsx("td",{className:"col-year",children:((x=d.evaluated_on||d.paper_published_date)==null?void 0:x.slice(0,4))||"—"})]},d.id)})})]})})}function Ae(e){const t=e.length===7?`${e}-01`:e,r=new Date(t).getTime();return Number.isFinite(r)?r:0}const me=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function he(e){const t=new Date(e);return{year:t.getFullYear(),month:t.getMonth()}}function Nt(e,t){if(e===t){const{year:u,month:h}=he(e);return[{timestamp:new Date(u,h,1).getTime(),key:`${u}-${h}`,label:`${me[h]} ${u}`}]}const r=he(e),s=he(t);if(r.year===s.year){const u=s.month-r.month+1;let h=1;const d=12;u>d&&(h=Math.ceil(u/d));const f=[];for(let g=r.month;g<=s.month;g+=h)f.push({timestamp:new Date(r.year,g,1).getTime(),key:`${r.year}-${g}`,label:u<=3?`${me[g]} ${r.year}`:me[g]});return f}const i=s.year-r.year+1;let n=1;const l=12;i>l&&(n=Math.ceil(i/l));const o=[];for(let u=r.year;u<=s.year;u+=n)o.push({timestamp:new Date(u,0,1).getTime(),key:String(u),label:String(u)});return o}const Rt=({points:e,metric:t})=>{const r=nt(),[s,i]=L.useState(null),n=880,l=320,o=60,u=30,h=40,d=50,f=e.map(c=>c.value),g=Math.min(...f),F=Math.max(...f)-g||1,x=n-o-u,S=l-h-d,V=e.map(c=>Ae(c.date)),B=Math.min(...V),b=Math.max(...V),W=b-B||1,R=c=>B===b?o+x/2:o+(c-B)/W*x,q=e.map((c,m)=>{const _=R(Ae(c.date)),j=(c.value-g)/F,y=h+S*(1-j);return{x:_,y,data:c,idx:m}}),w=q.filter(c=>c.data.isSota);let N="";if(w.length>=2){N=`M${w[0].x},${w[0].y}`;for(let c=1;c<w.length;c++){const m=w[c-1],_=w[c],j=(m.x+_.x)/2;N+=` C${j},${m.y} ${j},${_.y} ${_.x},${_.y}`}}const z=5.4,U=8,ne=9,X=c=>{const m=c.data.modelName||c.data.paperTitle||"";if(!m)return null;const _=m.length>22?m.slice(0,21)+"…":m,j=_.length*z;let y=c.x-j/2,E=c.x+j/2,$="middle";return y<o?(y=o,E=o+j,$="start"):E>n-u&&(E=n-u,y=E-j,$="end"),{x:$==="start"?o:$==="end"?n-u:c.x,y:c.y-ne,text:_,anchor:$,left:y,right:E}},Y=[],k=w.length>0?X(w[w.length-1]):null;let H=-1/0;for(let c=0;c<w.length-1;c++){const m=X(w[c]);m&&(m.left<H+U||k&&m.right>k.left-U||(H=m.right,Y.push({x:m.x,y:m.y,text:m.text,anchor:m.anchor})))}k&&Y.push({x:k.x,y:k.y,text:k.text,anchor:k.anchor});const C=Nt(B,b),K=5,G=c=>i(m=>m===c?null:m),O=c=>{c&&r(`/paper/${c}`)},p=(c,m)=>{const j=`${c.data.modelName||c.data.paperTitle||"Unknown model"}: ${se(c.data.value)} on ${c.data.dateLabel}`,y=!!c.data.paperRouteId;return a.jsxs("g",{children:[m,a.jsx("circle",{cx:c.x,cy:c.y,r:"10",fill:"transparent",style:{cursor:y?"pointer":"default",outline:"none"},tabIndex:0,role:y?"link":"img","aria-label":j,onMouseEnter:()=>i(c.idx),onMouseLeave:()=>G(c.idx),onFocus:()=>i(c.idx),onBlur:()=>G(c.idx),onClick:()=>O(c.data.paperRouteId),onKeyDown:E=>{y&&(E.key==="Enter"||E.key===" ")&&(E.preventDefault(),O(c.data.paperRouteId))},children:a.jsx("title",{children:j})})]},c.idx)};return a.jsxs("svg",{width:"100%",viewBox:`0 0 ${n} ${l}`,style:{display:"block"},children:[a.jsx("text",{x:o-38,y:h+S/2,fontSize:"11",fontFamily:"var(--mono)",fill:"var(--ink-faint)",textAnchor:"middle",transform:`rotate(-90 ${o-38} ${h+S/2})`,children:t}),Array.from({length:K}).map((c,m)=>{const _=m/(K-1),j=h+S*(1-_),y=g+F*_;return a.jsxs("g",{children:[a.jsx("line",{x1:o,y1:j,x2:n-u,y2:j,stroke:"var(--hairline)",strokeWidth:"1"}),a.jsx("text",{x:o-10,y:j+4,fontSize:"11",fontFamily:"var(--mono)",fill:"var(--ink-faint)",textAnchor:"end",children:se(y)})]},m)}),C.map(c=>{const m=R(c.timestamp);return a.jsx("text",{x:m,y:l-d+18,fontSize:"11",fontFamily:"var(--mono)",fill:"var(--ink-soft)",textAnchor:"middle",children:c.label},c.key)}),q.filter(c=>!c.data.isSota).map(c=>{const m=s===c.idx;return p(c,a.jsx("circle",{cx:c.x,cy:c.y,r:m?3:2,fill:"var(--ink-faint)",opacity:m?1:.45,style:{transition:"r 0.12s ease, opacity 0.12s ease"}}))}),N&&a.jsx("path",{d:N,stroke:"var(--accent)",strokeWidth:"2",fill:"none",strokeLinejoin:"round",strokeLinecap:"round"}),w.map(c=>{const m=s===c.idx;return p(c,a.jsx("circle",{cx:c.x,cy:c.y,r:m?4.5:3,fill:m?"var(--accent)":"var(--bg-elevated)",stroke:"var(--accent)",strokeWidth:"1.5",style:{transition:"r 0.12s ease, fill 0.12s ease"}}))}),Y.map((c,m)=>a.jsx("text",{x:c.x,y:c.y,fontSize:"9.5",fontFamily:"var(--mono)",fill:"var(--ink-soft)",textAnchor:c.anchor,pointerEvents:"none",style:{paintOrder:"stroke",stroke:"var(--bg-elevated)",strokeWidth:3,strokeLinejoin:"round"},children:c.text},`label-${m}`)),s!==null&&q[s]&&(()=>{const c=q[s],m=c.data.modelName||c.data.paperTitle||"Unknown model",j=`${m.length>40?m.slice(0,39)+"…":m}: ${se(c.data.value)}`,E=Math.max(120,Math.min(340,j.length*6.6+24)),$=30;let M=c.x-E/2;M<o&&(M=o),M+E>n-u&&(M=n-u-E);const le=c.y-$-14>=h?c.y-$-12:c.y+12;return a.jsxs("g",{pointerEvents:"none",children:[a.jsx("rect",{x:M,y:le,width:E,height:$,rx:"6",ry:"6",fill:"var(--bg-elevated)",stroke:"var(--hairline-strong)",strokeWidth:"1",style:{filter:"drop-shadow(0 2px 6px rgba(0,0,0,0.08))"}}),a.jsx("text",{x:M+12,y:le+19,fontSize:"12",fontFamily:"var(--sans)",fill:"var(--ink)",fontWeight:500,children:j})]})})()]})};function $t(e,t){if(e.match(/^[a-z]+:\/\//i))return e;if(e.match(/^\/\//))return window.location.protocol+e;if(e.match(/^[a-z]+:/i))return e;const r=document.implementation.createHTMLDocument(),s=r.createElement("base"),i=r.createElement("a");return r.head.appendChild(s),r.body.appendChild(i),t&&(s.href=t),i.href=e,i.href}const Pt=(()=>{let e=0;const t=()=>`0000${(Math.random()*36**4<<0).toString(36)}`.slice(-4);return()=>(e+=1,`u${t()}${e}`)})();function Q(e){const t=[];for(let r=0,s=e.length;r<s;r++)t.push(e[r]);return t}let ee=null;function Qe(e={}){return ee||(e.includeStyleProperties?(ee=e.includeStyleProperties,ee):(ee=Q(window.getComputedStyle(document.documentElement)),ee))}function oe(e,t){const s=(e.ownerDocument.defaultView||window).getComputedStyle(e).getPropertyValue(t);return s?parseFloat(s.replace("px","")):0}function Tt(e){const t=oe(e,"border-left-width"),r=oe(e,"border-right-width");return e.clientWidth+t+r}function Ft(e){const t=oe(e,"border-top-width"),r=oe(e,"border-bottom-width");return e.clientHeight+t+r}function Xe(e,t={}){const r=t.width||Tt(e),s=t.height||Ft(e);return{width:r,height:s}}function Mt(){let e,t;try{t=process}catch{}const r=t&&t.env?t.env.devicePixelRatio:null;return r&&(e=parseInt(r,10),Number.isNaN(e)&&(e=1)),e||window.devicePixelRatio||1}const D=16384;function Lt(e){(e.width>D||e.height>D)&&(e.width>D&&e.height>D?e.width>e.height?(e.height*=D/e.width,e.width=D):(e.width*=D/e.height,e.height=D):e.width>D?(e.height*=D/e.width,e.width=D):(e.width*=D/e.height,e.height=D))}function It(e,t={}){return e.toBlob?new Promise(r=>{e.toBlob(r,t.type?t.type:"image/png",t.quality?t.quality:1)}):new Promise(r=>{const s=window.atob(e.toDataURL(t.type?t.type:void 0,t.quality?t.quality:void 0).split(",")[1]),i=s.length,n=new Uint8Array(i);for(let l=0;l<i;l+=1)n[l]=s.charCodeAt(l);r(new Blob([n],{type:t.type?t.type:"image/png"}))})}function de(e){return new Promise((t,r)=>{const s=new Image;s.onload=()=>{s.decode().then(()=>{requestAnimationFrame(()=>t(s))})},s.onerror=r,s.crossOrigin="anonymous",s.decoding="async",s.src=e})}async function At(e){return Promise.resolve().then(()=>new XMLSerializer().serializeToString(e)).then(encodeURIComponent).then(t=>`data:image/svg+xml;charset=utf-8,${t}`)}async function Bt(e,t,r){const s="http://www.w3.org/2000/svg",i=document.createElementNS(s,"svg"),n=document.createElementNS(s,"foreignObject");return i.setAttribute("width",`${t}`),i.setAttribute("height",`${r}`),i.setAttribute("viewBox",`0 0 ${t} ${r}`),n.setAttribute("width","100%"),n.setAttribute("height","100%"),n.setAttribute("x","0"),n.setAttribute("y","0"),n.setAttribute("externalResourcesRequired","true"),i.appendChild(n),n.appendChild(e),At(i)}const I=(e,t)=>{if(e instanceof t)return!0;const r=Object.getPrototypeOf(e);return r===null?!1:r.constructor.name===t.name||I(r,t)};function Dt(e){const t=e.getPropertyValue("content");return`${e.cssText} content: '${t.replace(/'|"/g,"")}';`}function Ht(e,t){return Qe(t).map(r=>{const s=e.getPropertyValue(r),i=e.getPropertyPriority(r);return`${r}: ${s}${i?" !important":""};`}).join(" ")}function Vt(e,t,r,s){const i=`.${e}:${t}`,n=r.cssText?Dt(r):Ht(r,s);return document.createTextNode(`${i}{${n}}`)}function Be(e,t,r,s){const i=window.getComputedStyle(e,r),n=i.getPropertyValue("content");if(n===""||n==="none")return;const l=Pt();try{t.className=`${t.className} ${l}`}catch{return}const o=document.createElement("style");o.appendChild(Vt(l,r,i,s)),t.appendChild(o)}function Ut(e,t,r){Be(e,t,":before",r),Be(e,t,":after",r)}const De="application/font-woff",He="image/jpeg",qt={woff:De,woff2:De,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:He,jpeg:He,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml",webp:"image/webp"};function Ot(e){const t=/\.([^./]*?)$/g.exec(e);return t?t[1]:""}function xe(e){const t=Ot(e).toLowerCase();return qt[t]||""}function Wt(e){return e.split(/,/)[1]}function pe(e){return e.search(/^(data:)/)!==-1}function zt(e,t){return`data:${t};base64,${e}`}async function Ye(e,t,r){const s=await fetch(e,t);if(s.status===404)throw new Error(`Resource "${s.url}" not found`);const i=await s.blob();return new Promise((n,l)=>{const o=new FileReader;o.onerror=l,o.onloadend=()=>{try{n(r({res:s,result:o.result}))}catch(u){l(u)}},o.readAsDataURL(i)})}const fe={};function Kt(e,t,r){let s=e.replace(/\?.*/,"");return r&&(s=e),/ttf|otf|eot|woff2?/i.test(s)&&(s=s.replace(/.*\//,"")),t?`[${t}]${s}`:s}async function be(e,t,r){const s=Kt(e,t,r.includeQueryParams);if(fe[s]!=null)return fe[s];r.cacheBust&&(e+=(/\?/.test(e)?"&":"?")+new Date().getTime());let i;try{const n=await Ye(e,r.fetchRequestInit,({res:l,result:o})=>(t||(t=l.headers.get("Content-Type")||""),Wt(o)));i=zt(n,t)}catch(n){i=r.imagePlaceholder||"";let l=`Failed to fetch resource: ${e}`;n&&(l=typeof n=="string"?n:n.message),l&&console.warn(l)}return fe[s]=i,i}async function Gt(e){const t=e.toDataURL();return t==="data:,"?e.cloneNode(!1):de(t)}async function Qt(e,t){if(e.currentSrc){const n=document.createElement("canvas"),l=n.getContext("2d");n.width=e.clientWidth,n.height=e.clientHeight,l==null||l.drawImage(e,0,0,n.width,n.height);const o=n.toDataURL();return de(o)}const r=e.poster,s=xe(r),i=await be(r,s,t);return de(i)}async function Xt(e,t){var r;try{if(!((r=e==null?void 0:e.contentDocument)===null||r===void 0)&&r.body)return await ue(e.contentDocument.body,t,!0)}catch{}return e.cloneNode(!1)}async function Yt(e,t){return I(e,HTMLCanvasElement)?Gt(e):I(e,HTMLVideoElement)?Qt(e,t):I(e,HTMLIFrameElement)?Xt(e,t):e.cloneNode(Je(e))}const Jt=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SLOT",Je=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SVG";async function Zt(e,t,r){var s,i;if(Je(t))return t;let n=[];return Jt(e)&&e.assignedNodes?n=Q(e.assignedNodes()):I(e,HTMLIFrameElement)&&(!((s=e.contentDocument)===null||s===void 0)&&s.body)?n=Q(e.contentDocument.body.childNodes):n=Q(((i=e.shadowRoot)!==null&&i!==void 0?i:e).childNodes),n.length===0||I(e,HTMLVideoElement)||await n.reduce((l,o)=>l.then(()=>ue(o,r)).then(u=>{u&&t.appendChild(u)}),Promise.resolve()),t}function er(e,t,r){const s=t.style;if(!s)return;const i=window.getComputedStyle(e);i.cssText?(s.cssText=i.cssText,s.transformOrigin=i.transformOrigin):Qe(r).forEach(n=>{let l=i.getPropertyValue(n);n==="font-size"&&l.endsWith("px")&&(l=`${Math.floor(parseFloat(l.substring(0,l.length-2)))-.1}px`),I(e,HTMLIFrameElement)&&n==="display"&&l==="inline"&&(l="block"),n==="d"&&t.getAttribute("d")&&(l=`path(${t.getAttribute("d")})`),s.setProperty(n,l,i.getPropertyPriority(n))})}function tr(e,t){I(e,HTMLTextAreaElement)&&(t.innerHTML=e.value),I(e,HTMLInputElement)&&t.setAttribute("value",e.value)}function rr(e,t){if(I(e,HTMLSelectElement)){const r=t,s=Array.from(r.children).find(i=>e.value===i.getAttribute("value"));s&&s.setAttribute("selected","")}}function ar(e,t,r){return I(t,Element)&&(er(e,t,r),Ut(e,t,r),tr(e,t),rr(e,t)),t}async function sr(e,t){const r=e.querySelectorAll?e.querySelectorAll("use"):[];if(r.length===0)return e;const s={};for(let n=0;n<r.length;n++){const o=r[n].getAttribute("xlink:href");if(o){const u=e.querySelector(o),h=document.querySelector(o);!u&&h&&!s[o]&&(s[o]=await ue(h,t,!0))}}const i=Object.values(s);if(i.length){const n="http://www.w3.org/1999/xhtml",l=document.createElementNS(n,"svg");l.setAttribute("xmlns",n),l.style.position="absolute",l.style.width="0",l.style.height="0",l.style.overflow="hidden",l.style.display="none";const o=document.createElementNS(n,"defs");l.appendChild(o);for(let u=0;u<i.length;u++)o.appendChild(i[u]);e.appendChild(l)}return e}async function ue(e,t,r){return!r&&t.filter&&!t.filter(e)?null:Promise.resolve(e).then(s=>Yt(s,t)).then(s=>Zt(e,s,t)).then(s=>ar(e,s,t)).then(s=>sr(s,t))}const Ze=/url\((['"]?)([^'"]+?)\1\)/g,nr=/url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g,ir=/src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;function lr(e){const t=e.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1");return new RegExp(`(url\\(['"]?)(${t})(['"]?\\))`,"g")}function cr(e){const t=[];return e.replace(Ze,(r,s,i)=>(t.push(i),r)),t.filter(r=>!pe(r))}async function or(e,t,r,s,i){try{const n=r?$t(t,r):t,l=xe(t);let o;return i||(o=await be(n,l,s)),e.replace(lr(t),`$1${o}$3`)}catch{}return e}function dr(e,{preferredFontFormat:t}){return t?e.replace(ir,r=>{for(;;){const[s,,i]=nr.exec(r)||[];if(!i)return"";if(i===t)return`src: ${s};`}}):e}function et(e){return e.search(Ze)!==-1}async function tt(e,t,r){if(!et(e))return e;const s=dr(e,r);return cr(s).reduce((n,l)=>n.then(o=>or(o,l,t,r)),Promise.resolve(s))}async function te(e,t,r){var s;const i=(s=t.style)===null||s===void 0?void 0:s.getPropertyValue(e);if(i){const n=await tt(i,null,r);return t.style.setProperty(e,n,t.style.getPropertyPriority(e)),!0}return!1}async function ur(e,t){await te("background",e,t)||await te("background-image",e,t),await te("mask",e,t)||await te("-webkit-mask",e,t)||await te("mask-image",e,t)||await te("-webkit-mask-image",e,t)}async function mr(e,t){const r=I(e,HTMLImageElement);if(!(r&&!pe(e.src))&&!(I(e,SVGImageElement)&&!pe(e.href.baseVal)))return;const s=r?e.src:e.href.baseVal,i=await be(s,xe(s),t);await new Promise((n,l)=>{e.onload=n,e.onerror=t.onImageErrorHandler?(...u)=>{try{n(t.onImageErrorHandler(...u))}catch(h){l(h)}}:l;const o=e;o.decode&&(o.decode=n),o.loading==="lazy"&&(o.loading="eager"),r?(e.srcset="",e.src=i):e.href.baseVal=i})}async function hr(e,t){const s=Q(e.childNodes).map(i=>rt(i,t));await Promise.all(s).then(()=>e)}async function rt(e,t){I(e,Element)&&(await ur(e,t),await mr(e,t),await hr(e,t))}function fr(e,t){const{style:r}=e;t.backgroundColor&&(r.backgroundColor=t.backgroundColor),t.width&&(r.width=`${t.width}px`),t.height&&(r.height=`${t.height}px`);const s=t.style;return s!=null&&Object.keys(s).forEach(i=>{r[i]=s[i]}),e}const Ve={};async function Ue(e){let t=Ve[e];if(t!=null)return t;const s=await(await fetch(e)).text();return t={url:e,cssText:s},Ve[e]=t,t}async function qe(e,t){let r=e.cssText;const s=/url\(["']?([^"')]+)["']?\)/g,n=(r.match(/url\([^)]+\)/g)||[]).map(async l=>{let o=l.replace(s,"$1");return o.startsWith("https://")||(o=new URL(o,e.url).href),Ye(o,t.fetchRequestInit,({result:u})=>(r=r.replace(l,`url(${u})`),[l,u]))});return Promise.all(n).then(()=>r)}function Oe(e){if(e==null)return[];const t=[],r=/(\/\*[\s\S]*?\*\/)/gi;let s=e.replace(r,"");const i=new RegExp("((@.*?keyframes [\\s\\S]*?){([\\s\\S]*?}\\s*?)})","gi");for(;;){const u=i.exec(s);if(u===null)break;t.push(u[0])}s=s.replace(i,"");const n=/@import[\s\S]*?url\([^)]*\)[\s\S]*?;/gi,l="((\\s*?(?:\\/\\*[\\s\\S]*?\\*\\/)?\\s*?@media[\\s\\S]*?){([\\s\\S]*?)}\\s*?})|(([\\s\\S]*?){([\\s\\S]*?)})",o=new RegExp(l,"gi");for(;;){let u=n.exec(s);if(u===null){if(u=o.exec(s),u===null)break;n.lastIndex=o.lastIndex}else o.lastIndex=n.lastIndex;t.push(u[0])}return t}async function pr(e,t){const r=[],s=[];return e.forEach(i=>{if("cssRules"in i)try{Q(i.cssRules||[]).forEach((n,l)=>{if(n.type===CSSRule.IMPORT_RULE){let o=l+1;const u=n.href,h=Ue(u).then(d=>qe(d,t)).then(d=>Oe(d).forEach(f=>{try{i.insertRule(f,f.startsWith("@import")?o+=1:i.cssRules.length)}catch(g){console.error("Error inserting rule from remote css",{rule:f,error:g})}})).catch(d=>{console.error("Error loading remote css",d.toString())});s.push(h)}})}catch(n){const l=e.find(o=>o.href==null)||document.styleSheets[0];i.href!=null&&s.push(Ue(i.href).then(o=>qe(o,t)).then(o=>Oe(o).forEach(u=>{l.insertRule(u,l.cssRules.length)})).catch(o=>{console.error("Error loading remote stylesheet",o)})),console.error("Error inlining remote css file",n)}}),Promise.all(s).then(()=>(e.forEach(i=>{if("cssRules"in i)try{Q(i.cssRules||[]).forEach(n=>{r.push(n)})}catch(n){console.error(`Error while reading CSS rules from ${i.href}`,n)}}),r))}function gr(e){return e.filter(t=>t.type===CSSRule.FONT_FACE_RULE).filter(t=>et(t.style.getPropertyValue("src")))}async function xr(e,t){if(e.ownerDocument==null)throw new Error("Provided element is not within a Document");const r=Q(e.ownerDocument.styleSheets),s=await pr(r,t);return gr(s)}function at(e){return e.trim().replace(/["']/g,"")}function br(e){const t=new Set;function r(s){(s.style.fontFamily||getComputedStyle(s).fontFamily).split(",").forEach(n=>{t.add(at(n))}),Array.from(s.children).forEach(n=>{n instanceof HTMLElement&&r(n)})}return r(e),t}async function yr(e,t){const r=await xr(e,t),s=br(e);return(await Promise.all(r.filter(n=>s.has(at(n.style.fontFamily))).map(n=>{const l=n.parentStyleSheet?n.parentStyleSheet.href:null;return tt(n.cssText,l,t)}))).join(`
2
+ `)}async function vr(e,t){const r=t.fontEmbedCSS!=null?t.fontEmbedCSS:t.skipFonts?null:await yr(e,t);if(r){const s=document.createElement("style"),i=document.createTextNode(r);s.appendChild(i),e.firstChild?e.insertBefore(s,e.firstChild):e.appendChild(s)}}async function wr(e,t={}){const{width:r,height:s}=Xe(e,t),i=await ue(e,t,!0);return await vr(i,t),await rt(i,t),fr(i,t),await Bt(i,r,s)}async function jr(e,t={}){const{width:r,height:s}=Xe(e,t),i=await wr(e,t),n=await de(i),l=document.createElement("canvas"),o=l.getContext("2d"),u=t.pixelRatio||Mt(),h=t.canvasWidth||r,d=t.canvasHeight||s;return l.width=h*u,l.height=d*u,t.skipAutoScale||Lt(l),l.style.width=`${h}`,l.style.height=`${d}`,t.backgroundColor&&(o.fillStyle=t.backgroundColor,o.fillRect(0,0,l.width,l.height)),o.drawImage(n,0,0,l.width,l.height),l}async function _r(e,t={}){const r=await jr(e,t);return await It(r)}const ge="#ffffff";function Sr(){return typeof window>"u"?ge:window.getComputedStyle(document.documentElement).getPropertyValue("--bg-elevated").trim()||ge}function kr(e){if(typeof window>"u")return ge;const t=window.getComputedStyle(e).backgroundColor;return!t||t==="rgba(0, 0, 0, 0)"||t==="transparent"?Sr():t}async function Cr(e){var r,s;if(typeof window>"u"||!((s=(r=window.navigator)==null?void 0:r.clipboard)!=null&&s.write))throw new Error("Clipboard image copy is not supported in this browser.");if(typeof window.ClipboardItem>"u")throw new Error("Clipboard image copy is not supported in this browser.");const t=await _r(e,{pixelRatio:2,cacheBust:!0,backgroundColor:kr(e)});if(!t)throw new Error("Failed to render screenshot.");await window.navigator.clipboard.write([new window.ClipboardItem({"image/png":t})])}const st=({targetRef:e,label:t})=>{const{toast:r}=it(),[s,i]=L.useState("idle"),n=L.useRef(null);L.useEffect(()=>()=>{n.current!==null&&window.clearTimeout(n.current)},[]);const l=L.useCallback(async()=>{const u=e.current;if(u){i("copying"),u.classList.add("is-capturing"),u.offsetHeight,await new Promise(h=>window.requestAnimationFrame(()=>h()));try{await Cr(u),i("copied"),r({title:"Screenshot copied",description:`Image of the ${t} copied to your clipboard.`}),n.current!==null&&window.clearTimeout(n.current),n.current=window.setTimeout(()=>i("idle"),1500)}catch(h){i("idle"),r({title:"Copy failed",description:h instanceof Error&&h.message?h.message:"Could not copy the screenshot to your clipboard.",variant:"destructive"})}finally{u.classList.remove("is-capturing")}}},[e,t,r]),o=s==="copied"?"Copied":s==="copying"?"Copying…":"Copy image";return a.jsxs("button",{type:"button",className:"bm-copy-btn",onClick:l,disabled:s==="copying","aria-label":`Copy ${t} screenshot to clipboard`,title:`Copy ${t} screenshot to clipboard`,children:[a.jsx(ht,{name:"copy",size:11}),o]})};function Er({model:e,datasetName:t,hideClosed:r,setHideClosed:s,setMetric:i}){const n=L.useRef(null),{isInitialFilteredViewLoading:l,chartPoints:o,activeMetric:u,allowedMetrics:h,orderedMetrics:d,parameterBound:f}=e;return l||o.length===0?null:a.jsxs("div",{className:"bm-card",ref:n,children:[a.jsxs("div",{className:"bm-card-screenshot-header","aria-hidden":"true",children:[a.jsxs("div",{className:"bm-card-screenshot-title",children:[a.jsx("span",{className:"bm-card-screenshot-eyebrow",children:"Benchmark"}),a.jsx("span",{className:"bm-card-screenshot-name",children:t})]}),a.jsxs("div",{className:"bm-card-screenshot-brand",children:[a.jsxs("span",{className:"brand",children:[a.jsx("span",{className:"brand-mark"}),a.jsxs("span",{className:"brand-name",children:["Papers ",a.jsx("em",{children:"With Code"})]})]}),a.jsx("span",{className:"bm-card-screenshot-url",children:"paperswithcode.co"})]})]}),a.jsxs("div",{className:"bm-card-head",children:[a.jsx("div",{className:"bm-card-title",children:"SOTA progression"}),a.jsxs("div",{className:"bm-card-actions",children:[h.length>1&&a.jsxs("label",{className:"bm-view-select",children:[a.jsx("span",{className:"bm-view-select-label",children:"View"}),a.jsx("select",{value:u,onChange:g=>i(g.target.value),children:d.map(g=>a.jsx("option",{value:g,children:g},g))})]}),a.jsxs("label",{className:"bm-closed-toggle",title:"Show or hide evaluations of closed-source models",children:[a.jsx(ze,{className:"bm-closed-toggle-switch",checked:!r,onCheckedChange:g=>{s(!g)},"aria-label":"Show closed-source models"}),a.jsx("span",{className:"bm-closed-toggle-label",children:"Closed-source"})]}),a.jsx(st,{targetRef:n,label:"SOTA chart"})]})]}),a.jsx("div",{className:"bm-chart-wrap",children:a.jsx(Rt,{points:o,metric:u})}),a.jsxs("div",{className:"bm-chart-foot",children:[a.jsx("span",{className:"legend-dot"}),f===void 0?"All models":"Filtered models"," over time · highlighted dots track the running best · hover for the model · click to open the paper"]})]})}function Nr(e){if(!e)return null;const t=e.trim(),r=t.match(/^https?:\/\/(?:www\.)?arxiv\.org\/(?:abs|pdf)\/([^/?#]+)/i);if(r!=null&&r[1])return r[1].replace(/\.pdf$/i,"");const s=t.match(/^(?:https?:\/\/(?:www\.)?paperswithcode\.co)?\/paper\/([^/?#]+)/i);return(s==null?void 0:s[1])??null}function We(e,t){return e?a.jsx(ie,{title:e}):t||"—"}const zr=()=>{var ve,we,je,_e,Se,ke,Ce,Ee,Ne,Re,$e;const{datasetSlug:e}=lt(),[t,r]=ct(),s=t.get("task")||void 0,i=t.get("eval")||void 0,n=vt(t.get("max_parameters_exclusive")),{preferences:l,setHideClosedSourceEvals:o}=ot(),u=L.useRef(null),h=L.useRef(!1),d=L.useRef(null),[f,g]=L.useState(null),A=`${e}:${s||""}`,F=f===A,x=J({queryKey:["dataset",e,"with-paper",s,l.hide_closed_source_evals?"open":"all"],queryFn:()=>Z.getDatasetBySlug(e,{include_paper:!0,task:s,is_open:l.hide_closed_source_evals?!0:void 0}),enabled:!!e,staleTime:10*60*1e3}),S=J({queryKey:["dataset-evals",(ve=x.data)==null?void 0:ve.id],queryFn:()=>mt.byDataset(x.data.id),enabled:!!((we=x.data)!=null&&we.id),staleTime:5*60*1e3}),V=J({queryKey:["dataset-tasks",(je=x.data)==null?void 0:je.id],queryFn:()=>Z.datasetTasks(x.data.id),enabled:!!((_e=x.data)!=null&&_e.id),staleTime:10*60*1e3}),B=J({queryKey:["metric-directions"],queryFn:()=>Z.metricDirections(),staleTime:60*60*1e3}),b=Ge(V.data||[],S.data||[],s,i),W=J({queryKey:["task-benchmark-trends",b,l.hide_closed_source_evals?!0:void 0],queryFn:()=>Z.trendingBenchmarks(b,{limit:100,min_recent_papers:0,is_open:l.hide_closed_source_evals?!0:void 0}),enabled:!!b&&!!((Se=x.data)!=null&&Se.id),staleTime:10*60*1e3}),R=L.useMemo(()=>{var v;return(((v=W.data)==null?void 0:v.results)||[]).find(P=>{var T;return P.id===((T=x.data)==null?void 0:T.id)})||null},[W.data,(ke=x.data)==null?void 0:ke.id]),q=J({queryKey:["leaderboard-metrics",(Ce=x.data)==null?void 0:Ce.id,b],queryFn:()=>Z.leaderboardMetrics(x.data.id,b),enabled:!!((Ee=x.data)!=null&&Ee.id)&&!!b,staleTime:10*60*1e3}),w=Ct({evaluations:S.data||[],tasks:V.data||[],configuredMetrics:q.data||[],directions:B.data,initialSummary:(Ne=x.data)==null?void 0:Ne.leaderboard_summary,taskSlug:s,highlightEvalId:i,metric:t.get("metric")||void 0,hideClosed:l.hide_closed_source_evals,parameterBound:n,showMoreMetrics:F,ready:{evaluations:S.isSuccess,tasks:V.isSuccess,directions:B.isSuccess,metrics:q.isSuccess}}),{primaryTask:N,hiddenClosedEvals:z,hiddenClosedTopEval:U,isSummaryLoading:ne,displayedMetric:X,displayedSota:Y,displayedSotaModel:k,isInitialFilteredViewLoading:H,highlightedEval:C,hasParameterMetadata:K,parameterCoverage:G,orderedMetrics:O}=w;L.useEffect(()=>{if(h.current||!i||!S.data||S.data.length===0)return;const v=u.current;v&&(h.current=!0,v.scrollIntoView({behavior:"smooth",block:"start"}))},[i,S.data]);const p=J({queryKey:["area",N==null?void 0:N.area_id],queryFn:()=>Z.getArea(N.area_id),enabled:!!(N!=null&&N.area_id),staleTime:10*60*1e3});if(x.isLoading)return a.jsxs("div",{className:"page",children:[a.jsx(ce,{className:"h-12 w-1/2 mb-6"}),a.jsx(ce,{className:"h-64 w-full"})]});if(x.error||!x.data)return a.jsx("div",{className:"page",children:a.jsx(ft,{variant:"destructive",children:a.jsx(pt,{children:"Benchmark not found."})})});const c=x.data,m=!!c.supports_harness,_=v=>{r(P=>{const T=new URLSearchParams(P);return v===void 0?T.delete("max_parameters_exclusive"):T.set("max_parameters_exclusive",String(v)),T})},j=v=>{r(P=>{const T=new URLSearchParams(P);return T.set("metric",v),T})},y=c.introducing_paper??void 0,E=(y==null?void 0:y.arxiv_id)||(y==null?void 0:y.id)||Nr(c.paper_url),$=(y==null?void 0:y.title)||c.introducing_paper_title||null,M=((Re=y==null?void 0:y.published)==null?void 0:Re.slice(0,4))||c.introduced_year||null,ye=!!E||!!c.paper_url||!!$,le=y!=null&&y.arxiv_id||($e=c.paper_url)!=null&&$e.match(/^https?:\/\/(?:www\.)?arxiv\.org\//i)?`arXiv:${E}`:`Paper ${E}`;return a.jsx("div",{className:"page",children:a.jsxs("div",{className:"bm-page",children:[a.jsxs("div",{className:"breadcrumb",children:[a.jsx(re,{to:"/tasks",children:"Tasks"}),p.data&&a.jsxs(a.Fragment,{children:[a.jsx("span",{className:"sep",children:"/"}),a.jsx(re,{to:`/tasks#area-${bt(p.data.name)}`,children:p.data.name})]}),N&&a.jsxs(a.Fragment,{children:[a.jsx("span",{className:"sep",children:"/"}),a.jsx(re,{to:`/tasks/${N.slug||N.id}`,children:N.name})]}),a.jsx("span",{className:"sep",children:"/"}),a.jsx("span",{style:{color:"var(--accent-text)"},children:c.name})]}),a.jsxs("div",{className:"bm-title-row",children:[a.jsx("h1",{className:"bm-title",children:c.name}),R&&a.jsxs("div",{className:"bm-title-trend","aria-label":`${c.name} reporting trend`,children:[a.jsx(gt,{history:R.history,benchmarkName:R.name}),a.jsxs("span",{className:"bm-title-trend-summary",children:[a.jsx("strong",{children:R.recent_paper_count})," ",R.recent_paper_count===1?"paper":"papers",R.rate_change==null?R.recent_paper_count>0&&a.jsx("span",{className:"benchmark-trend-change is-new",children:"new"}):a.jsxs("span",{className:`benchmark-trend-change ${R.rate_change>=1?"is-up":"is-down"}`,children:[R.rate_change>=1?"↑":"↓"," ",R.rate_change.toFixed(1),"×"]})]})]})]}),a.jsxs("div",{className:"bm-subtitle",children:[ne?a.jsx(ce,{className:"h-5 w-64 bm-summary-skeleton","aria-label":"Loading benchmark summary"}):a.jsxs("span",{children:[X&&a.jsxs(a.Fragment,{children:[a.jsx("span",{className:"metric-tag",children:X}),a.jsx("span",{style:{color:"var(--hairline-strong)",margin:"0 8px"},children:"·"})]}),k?a.jsxs("span",{children:["Best: ",a.jsx("span",{className:"best-name",children:se(Y)})," by ",a.jsx("span",{className:"best-name",style:{fontStyle:"normal"},children:k})]}):a.jsxs("span",{children:[w.rows.length," evaluations"]})]}),c.hf_url&&a.jsxs("a",{className:"bm-action-btn",href:c.hf_url,target:"_blank",rel:"noopener noreferrer",children:[a.jsx("span",{"aria-hidden":"true",children:"🤗"})," View on Hugging Face"]})]}),c.description&&a.jsx("p",{className:"bm-description",children:c.description}),l.hide_closed_source_evals&&z.length>0&&a.jsxs("div",{className:"bm-hidden-closed-notice",children:[a.jsxs("span",{children:[z.length," closed-source ",z.length===1?"row is":"rows are"," hidden",U!=null&&U.model_name?a.jsxs(a.Fragment,{children:[", including ",a.jsx("strong",{children:U.model_name})]}):null,"."]}),a.jsx("button",{type:"button",className:"bm-hidden-closed-action",onClick:()=>{o(!1)},children:"Show closed-source"})]}),ye&&a.jsxs("div",{className:"method-source",style:{marginTop:0,marginBottom:18},children:[a.jsx("span",{className:"method-source-label",children:"Source"}),E?a.jsxs(re,{to:`/paper/${E}`,target:"_blank",rel:"noopener noreferrer",className:"method-source-link",children:[a.jsx("span",{className:"method-source-title",children:$?a.jsx(ie,{title:$}):le}),M&&a.jsx("span",{className:"method-source-meta",children:M})]}):c.paper_url?a.jsxs("a",{href:xt(c.paper_url)??void 0,target:"_blank",rel:"noopener noreferrer",className:"method-source-link",children:[a.jsx("span",{className:"method-source-title",children:$?a.jsx(ie,{title:$}):c.paper_url}),M&&a.jsx("span",{className:"method-source-meta",children:M})]}):a.jsxs("div",{className:"method-source-link is-static",children:[a.jsx("span",{className:"method-source-title",children:$?a.jsx(ie,{title:$}):null}),M&&a.jsx("span",{className:"method-source-meta",children:M})]})]}),a.jsx(Er,{model:w,datasetName:c.name,hideClosed:l.hide_closed_source_evals,setHideClosed:o,setMetric:j}),C&&(()=>{var Te,Fe;const v=C.paper_arxiv_id||C.paper_id,P=C.paper_title||(C.paper_arxiv_id?`arXiv:${C.paper_arxiv_id}`:null),T=C.best_metric&&((Te=C.metrics)==null?void 0:Te[C.best_metric])!==void 0?C.best_metric:w.activeMetric,Pe=(Fe=C.metrics)==null?void 0:Fe[T];return a.jsxs("div",{className:"bm-highlight-banner",role:"status",children:[a.jsx("span",{className:"bm-highlight-dot","aria-hidden":"true"}),a.jsxs("div",{className:"bm-highlight-text",children:[a.jsx("span",{className:"bm-highlight-label",children:"Comparing result"}),a.jsxs("span",{className:"bm-highlight-paper",children:[C.model_name||P||"—",C.harness?` · ${C.harness}`:""]}),a.jsxs("span",{className:"bm-highlight-meta",children:[Pe!==void 0&&T?a.jsxs(a.Fragment,{children:[T,": ",se(Pe),P?" · ":""]}):null,v?a.jsx(re,{to:`/paper/${v}`,children:We(C.paper_title,P)}):We(C.paper_title,P)]})]})]})})(),a.jsxs("div",{className:"bm-card",ref:d,children:[a.jsxs("div",{className:"bm-card-screenshot-header","aria-hidden":"true",children:[a.jsxs("div",{className:"bm-card-screenshot-title",children:[a.jsx("span",{className:"bm-card-screenshot-eyebrow",children:"Benchmark"}),a.jsx("span",{className:"bm-card-screenshot-name",children:c.name})]}),a.jsxs("div",{className:"bm-card-screenshot-brand",children:[a.jsxs("span",{className:"brand",children:[a.jsx("span",{className:"brand-mark"}),a.jsxs("span",{className:"brand-name",children:["Papers ",a.jsx("em",{children:"With Code"})]})]}),a.jsx("span",{className:"bm-card-screenshot-url",children:"paperswithcode.co"})]})]}),a.jsxs("div",{className:"bm-card-head",children:[a.jsx("div",{className:"bm-card-title",children:"Leaderboard"}),a.jsxs("div",{className:"bm-card-actions",children:[w.allowedMetrics.length>1&&a.jsxs("label",{className:"bm-view-select",children:[a.jsx("span",{className:"bm-view-select-label",children:"View"}),a.jsx("select",{value:w.activeMetric,onChange:v=>j(v.target.value),children:O.map(v=>a.jsx("option",{value:v,children:v},v))})]}),a.jsxs("label",{className:"bm-closed-toggle",title:"Show or hide evaluations of closed-source models",children:[a.jsx(ze,{className:"bm-closed-toggle-switch",checked:!l.hide_closed_source_evals,onCheckedChange:v=>{o(!v)},"aria-label":"Show closed-source models"}),a.jsx("span",{className:"bm-closed-toggle-label",children:"Closed-source"})]}),!H&&!K&&S.isSuccess?a.jsx("span",{className:"bm-parameter-unavailable",children:"Parameter metadata unavailable"}):null,a.jsx(st,{targetRef:d,label:"leaderboard"})]})]}),!H&&K&&a.jsxs("div",{className:"bm-parameter-filter-bar",children:[a.jsx("span",{className:"bm-parameter-filter-label",children:"Parameters Size"}),a.jsx("div",{className:"bm-parameter-filter-options",role:"group","aria-label":"Filter leaderboard by parameter size",children:w.parameterFilters.map(v=>{const{selected:P,disabled:T}=v;return a.jsx("button",{type:"button",className:`bm-parameter-filter-option${P?" is-active":""}`,"aria-pressed":P,disabled:T,onClick:()=>_(v.maxParametersExclusive),children:v.label},v.label)})}),a.jsxs("span",{className:"bm-parameter-coverage",children:["Parameters known for ",G.parameter_coverage_known," of ",G.parameter_coverage_total," entries"]})]}),S.isLoading||H?a.jsx("div",{style:{padding:16},children:Array.from({length:5}).map((v,P)=>a.jsx(ce,{className:"h-10 w-full mb-2"},P))}):w.rows.length===0?n?a.jsxs("div",{className:"no-results",children:["No known parameter counts match this filter. "," ",a.jsx("button",{type:"button",className:"bm-empty-filter-action",onClick:()=>_(void 0),children:"Show all"})]}):a.jsx("div",{className:"no-results",children:"No evaluations submitted yet."}):a.jsxs(a.Fragment,{children:[O.length>1&&a.jsxs("div",{className:"bm-metric-columns-control",children:[a.jsx("button",{type:"button",className:"bm-metric-columns-toggle","aria-expanded":F,"aria-controls":"benchmark-leaderboard",onClick:()=>g(F?null:A),children:F?"Show selected metric only":`Show more metrics (${O.length-1})`}),F&&a.jsx("span",{children:"Scroll metrics horizontally; model and paper details stay visible."})]}),a.jsx(Et,{model:w,showHarness:m,setMetric:j,highlightRowRef:u})]})]})]})})};export{zr as default};
assets/{BenchmarkTrendSparkline-BoXdeV6Z.js → BenchmarkTrendSparkline-pMSWvnek.js} RENAMED
@@ -1 +1 @@
1
- import{r as C,j as t}from"./index-D1SFE8tx.js";const g=112,p=42,o=5,m=5,b=new Intl.DateTimeFormat("en",{month:"short",timeZone:"UTC"}),y=(e,d)=>{const r=new Date(`${e}T00:00:00Z`),n=new Date(`${d}T00:00:00Z`);return r.getUTCMonth()===n.getUTCMonth()?`${b.format(r)} ${r.getUTCDate()}–${n.getUTCDate()}`:`${b.format(r)} ${r.getUTCDate()}–${b.format(n)} ${n.getUTCDate()}`},I=({history:e,benchmarkName:d,interactive:r=!1})=>{const[n,x]=C.useState(null),h=e.map(s=>s.paper_count),M=Math.max(1,...h),f=g-o*2,T=p-m*2,v=h.length>1?f/(h.length-1):0,a=h.map((s,c)=>({x:o+v*c,y:m+T-s/M*T})),$=a.map(({x:s,y:c})=>`${s},${c}`).join(" "),_=a.length?`${o},${p-m} ${$} ${a[a.length-1].x},${p-m}`:"",D=h.reduce((s,c)=>s+c,0),u=49,N=14,i=n==null?null:a[n],j=i?Math.min(g-o-u,Math.max(o,i.x-u/2)):0,k=i?i.y>p/2?i.y-N-3:i.y+3:0;return t.jsxs("svg",{className:`benchmark-trend-sparkline${r?" is-interactive":""}`,viewBox:`0 0 ${g} ${p}`,role:r?"group":"img","aria-label":`${d}: ${D} reporting papers across the displayed trend history`,children:[t.jsxs("title",{children:[d,": ",D," reporting papers across the displayed trend history"]}),t.jsx("line",{className:"benchmark-trend-axis",x1:o,y1:p-m,x2:g-o,y2:p-m}),t.jsx("line",{className:"benchmark-trend-axis",x1:o,y1:m,x2:o,y2:p-m}),_&&t.jsx("polygon",{className:"benchmark-trend-area",points:_}),$&&t.jsx("polyline",{className:"benchmark-trend-line",points:$}),r?a.map(({x:s,y:c},l)=>t.jsxs("g",{className:"benchmark-trend-point",tabIndex:0,role:"img","aria-label":`${y(e[l].start_date,e[l].end_date)}: ${e[l].paper_count} ${e[l].paper_count===1?"paper":"papers"}`,onMouseEnter:()=>x(l),onMouseLeave:()=>x(null),onFocus:()=>x(l),onBlur:()=>x(null),children:[t.jsx("circle",{className:"benchmark-trend-point-hit",cx:s,cy:c,r:"5"}),t.jsx("circle",{className:"benchmark-trend-point-mark",cx:s,cy:c,r:"1.8"})]},`${e[l].start_date}-${e[l].end_date}`)):a.length>0&&t.jsx("circle",{className:"benchmark-trend-dot",cx:a[a.length-1].x,cy:a[a.length-1].y,r:"2.6"}),i&&n!=null&&t.jsxs("g",{className:"benchmark-trend-tooltip",pointerEvents:"none",children:[t.jsx("rect",{x:j,y:k,width:u,height:N,rx:"2"}),t.jsx("text",{x:j+3,y:k+5.4,children:y(e[n].start_date,e[n].end_date)}),t.jsxs("text",{className:"benchmark-trend-tooltip-value",x:j+3,y:k+11,children:[e[n].paper_count," ",e[n].paper_count===1?"paper":"papers"]})]})]})};export{I as B};
 
1
+ import{r as C,j as t}from"./index-D6NpXxup.js";const g=112,p=42,o=5,m=5,b=new Intl.DateTimeFormat("en",{month:"short",timeZone:"UTC"}),y=(e,d)=>{const r=new Date(`${e}T00:00:00Z`),n=new Date(`${d}T00:00:00Z`);return r.getUTCMonth()===n.getUTCMonth()?`${b.format(r)} ${r.getUTCDate()}–${n.getUTCDate()}`:`${b.format(r)} ${r.getUTCDate()}–${b.format(n)} ${n.getUTCDate()}`},I=({history:e,benchmarkName:d,interactive:r=!1})=>{const[n,x]=C.useState(null),h=e.map(s=>s.paper_count),M=Math.max(1,...h),f=g-o*2,T=p-m*2,v=h.length>1?f/(h.length-1):0,a=h.map((s,c)=>({x:o+v*c,y:m+T-s/M*T})),$=a.map(({x:s,y:c})=>`${s},${c}`).join(" "),_=a.length?`${o},${p-m} ${$} ${a[a.length-1].x},${p-m}`:"",D=h.reduce((s,c)=>s+c,0),u=49,N=14,i=n==null?null:a[n],j=i?Math.min(g-o-u,Math.max(o,i.x-u/2)):0,k=i?i.y>p/2?i.y-N-3:i.y+3:0;return t.jsxs("svg",{className:`benchmark-trend-sparkline${r?" is-interactive":""}`,viewBox:`0 0 ${g} ${p}`,role:r?"group":"img","aria-label":`${d}: ${D} reporting papers across the displayed trend history`,children:[t.jsxs("title",{children:[d,": ",D," reporting papers across the displayed trend history"]}),t.jsx("line",{className:"benchmark-trend-axis",x1:o,y1:p-m,x2:g-o,y2:p-m}),t.jsx("line",{className:"benchmark-trend-axis",x1:o,y1:m,x2:o,y2:p-m}),_&&t.jsx("polygon",{className:"benchmark-trend-area",points:_}),$&&t.jsx("polyline",{className:"benchmark-trend-line",points:$}),r?a.map(({x:s,y:c},l)=>t.jsxs("g",{className:"benchmark-trend-point",tabIndex:0,role:"img","aria-label":`${y(e[l].start_date,e[l].end_date)}: ${e[l].paper_count} ${e[l].paper_count===1?"paper":"papers"}`,onMouseEnter:()=>x(l),onMouseLeave:()=>x(null),onFocus:()=>x(l),onBlur:()=>x(null),children:[t.jsx("circle",{className:"benchmark-trend-point-hit",cx:s,cy:c,r:"5"}),t.jsx("circle",{className:"benchmark-trend-point-mark",cx:s,cy:c,r:"1.8"})]},`${e[l].start_date}-${e[l].end_date}`)):a.length>0&&t.jsx("circle",{className:"benchmark-trend-dot",cx:a[a.length-1].x,cy:a[a.length-1].y,r:"2.6"}),i&&n!=null&&t.jsxs("g",{className:"benchmark-trend-tooltip",pointerEvents:"none",children:[t.jsx("rect",{x:j,y:k,width:u,height:N,rx:"2"}),t.jsx("text",{x:j+3,y:k+5.4,children:y(e[n].start_date,e[n].end_date)}),t.jsxs("text",{className:"benchmark-trend-tooltip-value",x:j+3,y:k+11,children:[e[n].paper_count," ",e[n].paper_count===1?"paper":"papers"]})]})]})};export{I as B};
assets/{ChatView-BpLTEg-e.js → ChatView-Cb4CdzFN.js} RENAMED
The diff for this file is too large to render. See raw diff
 
assets/ConferenceDetailView-DD9ghAwd.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import{u as L,r as D,j as e,L as p}from"./index-D6NpXxup.js";import{u as T}from"./useQuery-BSzsAAZV.js";import{M as F}from"./MarkdownText-OPahlM9D.js";import{c as A}from"./catalog-BkXnDjBr.js";import{c as B,h as C,d as E}from"./transform-dsZcnzEu.js";import{S as f}from"./skeleton-BZlAxqUu.js";import{A as P,a as z}from"./alert-CEE7Xf4h.js";import{s as M}from"./safeExternalHref-CkBrsh84.js";/* empty css */import"./PaperPreviewLink-BaxpCHGH.js";import"./index-BiPn19VT.js";import"./index-PW6rRKKS.js";import"./katex-DkKDou_j.js";import"./hover-card-C5GFpPJ1.js";import"./paperQueryKeys-CcqbH5YG.js";import"./papers-CJuRKhYV.js";import"./useMutation-DI9QqXsO.js";const R=a=>(a==null?void 0:a.trim().toLowerCase().replace(/[\s_]+/g,"-"))??"",O=(a,t)=>{if(!a)return null;const i=new Date(`${a}T00:00:00`),s=t?new Date(`${t}T00:00:00`):null,c=g=>g.toLocaleDateString("en-US",{month:"long",day:"numeric"}),m=i.getFullYear();return s&&s.getTime()!==i.getTime()?i.getMonth()===s.getMonth()?`${c(i).replace(/\d+$/,"").trim()} ${i.getDate()}–${s.getDate()}, ${m}`:`${c(i)} – ${c(s)}, ${m}`:`${c(i)}, ${m}`},re=()=>{var k,S,b,_,$,w;const{confSlug:a}=L(),t=T({queryKey:["conference-areas-with-tasks",a],queryFn:()=>A.conferenceAreasWithTasks(a),enabled:!!a,staleTime:10*60*1e3}),i=D.useMemo(()=>{if(!t.data)return[];const n={general:0,vision:1,video:2,language:3,audio:4,other:5},r=o=>n[R(o)]??999;return[...t.data.results].sort((o,l)=>{const d=r(o.name),x=r(l.name);return d!==x?d-x:o.name.localeCompare(l.name)})},[t.data]),s=(k=t.data)==null?void 0:k.conference,c=((S=t.data)==null?void 0:S.total_paper_count)??0,m=((b=t.data)==null?void 0:b.oral_paper_count)??0,g=((_=t.data)==null?void 0:_.spotlight_paper_count)??0,u=(($=t.data)==null?void 0:$.outstanding_paper_count)??0,j=((w=t.data)==null?void 0:w.best_paper_finalist_paper_count)??0,v=i.reduce((n,r)=>n+r.tasks.length,0);if(t.error)return e.jsx("div",{className:"page",children:e.jsx(P,{variant:"destructive",children:e.jsx(z,{children:"Failed to load conference. Please try again."})})});const y=s?O(s.start_date,s.end_date):null,N=s?[s.venue,s.location].filter(Boolean).join(", "):null,h=s==null?void 0:s.name;return e.jsxs("div",{className:"page",children:[e.jsxs("div",{className:s!=null&&s.image_url?"task-hero-grid":void 0,children:[e.jsxs("div",{children:[e.jsx("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--accent-text)",letterSpacing:"0.1em",marginBottom:8},children:"CONFERENCE"}),e.jsx("h1",{className:"feed-title",children:h??e.jsx(f,{className:"h-10 w-64 inline-block"})}),e.jsxs("div",{className:"feed-subtitle",style:{display:"flex",flexDirection:"column",gap:4},children:[y&&e.jsx("span",{children:y}),N&&e.jsx("span",{children:N}),(s==null?void 0:s.url)&&e.jsx("a",{href:M(s.url)??void 0,target:"_blank",rel:"noopener noreferrer",style:{color:"var(--accent-text)"},children:s.url.replace(/^https?:\/\//,"")}),(s==null?void 0:s.hf_url)&&e.jsxs("a",{className:"bm-action-btn",href:s.hf_url,target:"_blank",rel:"noopener noreferrer",style:{alignSelf:"flex-start",marginTop:4},children:[e.jsx("span",{"aria-hidden":"true",children:"🤗"})," View on Hugging Face"]})]}),(s==null?void 0:s.description)&&e.jsx(F,{className:"method-description",text:s.description})]}),(s==null?void 0:s.image_url)&&e.jsxs("figure",{className:"task-figure-card",children:[e.jsx("div",{className:"task-figure-img-wrap",children:e.jsx("img",{className:"task-figure-img",src:s.image_url,alt:h?`${h} visual`:"Conference visual",onError:n=>{var r,o;(o=(r=n.currentTarget.parentElement)==null?void 0:r.parentElement)==null||o.style.setProperty("display","none")}})}),e.jsxs("figcaption",{children:["Figure · ",h??"Conference",s.image_credit&&e.jsxs(e.Fragment,{children:[e.jsx("br",{}),e.jsx(F,{className:"task-image-credit",text:s.image_credit})]})]})]})]}),!t.isLoading&&c>0&&e.jsxs("section",{style:{marginTop:48,marginBottom:48},children:[e.jsxs("div",{style:{display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:24,paddingBottom:12,borderBottom:"1px solid var(--hairline-strong)"},children:[e.jsxs("div",{children:[e.jsx("h2",{style:{fontFamily:"var(--serif)",fontSize:26,fontWeight:500,letterSpacing:"-0.02em",marginBottom:4},children:"Browse papers"}),e.jsx("div",{style:{fontFamily:"var(--serif)",fontStyle:"italic",fontSize:13,color:"var(--ink-soft)"},children:"All accepted papers, plus oral, spotlight, outstanding, and best paper finalists."})]}),e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",whiteSpace:"nowrap"},children:[c.toLocaleString()," papers"]})]}),e.jsxs("div",{className:"tag-grid",children:[e.jsxs(p,{to:`/conferences/${a}/all`,className:"tag-cell",children:[e.jsxs("div",{className:"name",children:[e.jsx("span",{className:"dot",style:{background:"var(--accent)"}}),"All papers"]}),e.jsx("div",{className:"meta",children:e.jsxs("span",{children:[c.toLocaleString()," papers"]})})]}),m>0&&e.jsxs(p,{to:`/conferences/${a}/oral`,className:"tag-cell",children:[e.jsxs("div",{className:"name",children:[e.jsx("span",{className:"dot",style:{background:"#fdbb02"}}),"Oral papers"]}),e.jsx("div",{className:"meta",children:e.jsxs("span",{children:[m.toLocaleString()," papers"]})})]}),g>0&&e.jsxs(p,{to:`/conferences/${a}/spotlight`,className:"tag-cell",children:[e.jsxs("div",{className:"name",children:[e.jsx("span",{className:"dot",style:{background:"#fdbb02"}}),"Spotlight papers"]}),e.jsx("div",{className:"meta",children:e.jsxs("span",{children:[g.toLocaleString()," papers"]})})]}),u>0&&e.jsxs(p,{to:`/conferences/${a}/outstanding`,className:"tag-cell",children:[e.jsxs("div",{className:"name",children:[e.jsx("span",{className:"dot",style:{background:"#c45c26"}}),"Outstanding papers"]}),e.jsx("div",{className:"meta",children:e.jsxs("span",{children:[u.toLocaleString()," papers"]})})]}),j>0&&e.jsxs(p,{to:`/conferences/${a}/best-paper-finalists`,className:"tag-cell",children:[e.jsxs("div",{className:"name",children:[e.jsx("span",{className:"dot",style:{background:"#c9a227"}}),"Best paper finalists"]}),e.jsx("div",{className:"meta",children:e.jsxs("span",{children:[j.toLocaleString()," papers"]})})]})]})]}),t.isLoading?e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:32},children:Array.from({length:4}).map((n,r)=>e.jsxs("div",{children:[e.jsx(f,{className:"h-8 w-1/3 mb-4"}),e.jsx("div",{className:"tag-grid",children:Array.from({length:6}).map((o,l)=>e.jsx(f,{className:"h-24"},l))})]},r))}):i.map(n=>{const r=n.tasks;if(r.length===0)return null;const o=r.reduce((l,d)=>l+(d.paper_count||0),0);return e.jsxs("section",{style:{marginBottom:48},children:[e.jsxs("div",{style:{display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:24,paddingBottom:12,borderBottom:"1px solid var(--hairline-strong)"},children:[e.jsxs("div",{children:[e.jsx("h2",{style:{fontFamily:"var(--serif)",fontSize:26,fontWeight:500,letterSpacing:"-0.02em",marginBottom:4},children:n.name}),n.description&&e.jsx("div",{style:{fontFamily:"var(--serif)",fontStyle:"italic",fontSize:13,color:"var(--ink-soft)"},children:n.description})]}),e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",whiteSpace:"nowrap"},children:[r.length," ",r.length===1?"task":"tasks"," · ",o.toLocaleString()," papers"]})]}),e.jsx("div",{className:"tag-grid",children:r.map(l=>{const d=l.slug||"",x=B(C(d));return e.jsxs(p,{to:`/conferences/${a}/${d}`,className:"tag-cell",children:[e.jsxs("div",{className:"name",children:[e.jsx("span",{className:"dot",style:{background:x.dot}}),E(l.name,d)]}),e.jsx("div",{className:"meta",children:e.jsxs("span",{children:[(l.paper_count??0).toLocaleString()," papers"]})})]},l.id)})})]},n.id)}),v>0&&e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",marginTop:24},children:[v," tasks across ",i.filter(n=>n.tasks.length>0).length," areas."]})]})};export{re as default};
assets/ConferenceDetailView-bCN1GRtD.js DELETED
@@ -1 +0,0 @@
1
- import{u as L,r as D,j as e,L as p}from"./index-D1SFE8tx.js";import{u as T}from"./useQuery-8sGgldYe.js";import{M as F}from"./MarkdownText-B1RI0BDb.js";import{c as A}from"./catalog-BIqvVz-s.js";import{c as B,h as C,d as E}from"./transform-BmaYjIy4.js";import{S as f}from"./skeleton-D5wy8oMn.js";import{A as P,a as z}from"./alert-D8tgAf4z.js";import{s as M}from"./safeExternalHref-CkBrsh84.js";import"./katex.min-BSBacQyE.js";import"./PaperPreviewLink-D5_ka8a2.js";import"./index-CZU6xdjr.js";import"./index-DJRFtxnI.js";import"./hover-card-BtW3iC4Z.js";import"./paperQueryKeys-CcqbH5YG.js";import"./papers-Cv1LxXF4.js";import"./useMutation-BOPUR0a5.js";const R=a=>(a==null?void 0:a.trim().toLowerCase().replace(/[\s_]+/g,"-"))??"",O=(a,t)=>{if(!a)return null;const i=new Date(`${a}T00:00:00`),s=t?new Date(`${t}T00:00:00`):null,c=g=>g.toLocaleDateString("en-US",{month:"long",day:"numeric"}),m=i.getFullYear();return s&&s.getTime()!==i.getTime()?i.getMonth()===s.getMonth()?`${c(i).replace(/\d+$/,"").trim()} ${i.getDate()}–${s.getDate()}, ${m}`:`${c(i)} – ${c(s)}, ${m}`:`${c(i)}, ${m}`},te=()=>{var k,S,b,_,$,w;const{confSlug:a}=L(),t=T({queryKey:["conference-areas-with-tasks",a],queryFn:()=>A.conferenceAreasWithTasks(a),enabled:!!a,staleTime:10*60*1e3}),i=D.useMemo(()=>{if(!t.data)return[];const n={general:0,vision:1,video:2,language:3,audio:4,other:5},r=o=>n[R(o)]??999;return[...t.data.results].sort((o,l)=>{const d=r(o.name),x=r(l.name);return d!==x?d-x:o.name.localeCompare(l.name)})},[t.data]),s=(k=t.data)==null?void 0:k.conference,c=((S=t.data)==null?void 0:S.total_paper_count)??0,m=((b=t.data)==null?void 0:b.oral_paper_count)??0,g=((_=t.data)==null?void 0:_.spotlight_paper_count)??0,u=(($=t.data)==null?void 0:$.outstanding_paper_count)??0,j=((w=t.data)==null?void 0:w.best_paper_finalist_paper_count)??0,v=i.reduce((n,r)=>n+r.tasks.length,0);if(t.error)return e.jsx("div",{className:"page",children:e.jsx(P,{variant:"destructive",children:e.jsx(z,{children:"Failed to load conference. Please try again."})})});const y=s?O(s.start_date,s.end_date):null,N=s?[s.venue,s.location].filter(Boolean).join(", "):null,h=s==null?void 0:s.name;return e.jsxs("div",{className:"page",children:[e.jsxs("div",{className:s!=null&&s.image_url?"task-hero-grid":void 0,children:[e.jsxs("div",{children:[e.jsx("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--accent-text)",letterSpacing:"0.1em",marginBottom:8},children:"CONFERENCE"}),e.jsx("h1",{className:"feed-title",children:h??e.jsx(f,{className:"h-10 w-64 inline-block"})}),e.jsxs("div",{className:"feed-subtitle",style:{display:"flex",flexDirection:"column",gap:4},children:[y&&e.jsx("span",{children:y}),N&&e.jsx("span",{children:N}),(s==null?void 0:s.url)&&e.jsx("a",{href:M(s.url)??void 0,target:"_blank",rel:"noopener noreferrer",style:{color:"var(--accent-text)"},children:s.url.replace(/^https?:\/\//,"")}),(s==null?void 0:s.hf_url)&&e.jsxs("a",{className:"bm-action-btn",href:s.hf_url,target:"_blank",rel:"noopener noreferrer",style:{alignSelf:"flex-start",marginTop:4},children:[e.jsx("span",{"aria-hidden":"true",children:"🤗"})," View on Hugging Face"]})]}),(s==null?void 0:s.description)&&e.jsx(F,{className:"method-description",text:s.description})]}),(s==null?void 0:s.image_url)&&e.jsxs("figure",{className:"task-figure-card",children:[e.jsx("div",{className:"task-figure-img-wrap",children:e.jsx("img",{className:"task-figure-img",src:s.image_url,alt:h?`${h} visual`:"Conference visual",onError:n=>{var r,o;(o=(r=n.currentTarget.parentElement)==null?void 0:r.parentElement)==null||o.style.setProperty("display","none")}})}),e.jsxs("figcaption",{children:["Figure · ",h??"Conference",s.image_credit&&e.jsxs(e.Fragment,{children:[e.jsx("br",{}),e.jsx(F,{className:"task-image-credit",text:s.image_credit})]})]})]})]}),!t.isLoading&&c>0&&e.jsxs("section",{style:{marginTop:48,marginBottom:48},children:[e.jsxs("div",{style:{display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:24,paddingBottom:12,borderBottom:"1px solid var(--hairline-strong)"},children:[e.jsxs("div",{children:[e.jsx("h2",{style:{fontFamily:"var(--serif)",fontSize:26,fontWeight:500,letterSpacing:"-0.02em",marginBottom:4},children:"Browse papers"}),e.jsx("div",{style:{fontFamily:"var(--serif)",fontStyle:"italic",fontSize:13,color:"var(--ink-soft)"},children:"All accepted papers, plus oral, spotlight, outstanding, and best paper finalists."})]}),e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",whiteSpace:"nowrap"},children:[c.toLocaleString()," papers"]})]}),e.jsxs("div",{className:"tag-grid",children:[e.jsxs(p,{to:`/conferences/${a}/all`,className:"tag-cell",children:[e.jsxs("div",{className:"name",children:[e.jsx("span",{className:"dot",style:{background:"var(--accent)"}}),"All papers"]}),e.jsx("div",{className:"meta",children:e.jsxs("span",{children:[c.toLocaleString()," papers"]})})]}),m>0&&e.jsxs(p,{to:`/conferences/${a}/oral`,className:"tag-cell",children:[e.jsxs("div",{className:"name",children:[e.jsx("span",{className:"dot",style:{background:"#fdbb02"}}),"Oral papers"]}),e.jsx("div",{className:"meta",children:e.jsxs("span",{children:[m.toLocaleString()," papers"]})})]}),g>0&&e.jsxs(p,{to:`/conferences/${a}/spotlight`,className:"tag-cell",children:[e.jsxs("div",{className:"name",children:[e.jsx("span",{className:"dot",style:{background:"#fdbb02"}}),"Spotlight papers"]}),e.jsx("div",{className:"meta",children:e.jsxs("span",{children:[g.toLocaleString()," papers"]})})]}),u>0&&e.jsxs(p,{to:`/conferences/${a}/outstanding`,className:"tag-cell",children:[e.jsxs("div",{className:"name",children:[e.jsx("span",{className:"dot",style:{background:"#c45c26"}}),"Outstanding papers"]}),e.jsx("div",{className:"meta",children:e.jsxs("span",{children:[u.toLocaleString()," papers"]})})]}),j>0&&e.jsxs(p,{to:`/conferences/${a}/best-paper-finalists`,className:"tag-cell",children:[e.jsxs("div",{className:"name",children:[e.jsx("span",{className:"dot",style:{background:"#c9a227"}}),"Best paper finalists"]}),e.jsx("div",{className:"meta",children:e.jsxs("span",{children:[j.toLocaleString()," papers"]})})]})]})]}),t.isLoading?e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:32},children:Array.from({length:4}).map((n,r)=>e.jsxs("div",{children:[e.jsx(f,{className:"h-8 w-1/3 mb-4"}),e.jsx("div",{className:"tag-grid",children:Array.from({length:6}).map((o,l)=>e.jsx(f,{className:"h-24"},l))})]},r))}):i.map(n=>{const r=n.tasks;if(r.length===0)return null;const o=r.reduce((l,d)=>l+(d.paper_count||0),0);return e.jsxs("section",{style:{marginBottom:48},children:[e.jsxs("div",{style:{display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:24,paddingBottom:12,borderBottom:"1px solid var(--hairline-strong)"},children:[e.jsxs("div",{children:[e.jsx("h2",{style:{fontFamily:"var(--serif)",fontSize:26,fontWeight:500,letterSpacing:"-0.02em",marginBottom:4},children:n.name}),n.description&&e.jsx("div",{style:{fontFamily:"var(--serif)",fontStyle:"italic",fontSize:13,color:"var(--ink-soft)"},children:n.description})]}),e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",whiteSpace:"nowrap"},children:[r.length," ",r.length===1?"task":"tasks"," · ",o.toLocaleString()," papers"]})]}),e.jsx("div",{className:"tag-grid",children:r.map(l=>{const d=l.slug||"",x=B(C(d));return e.jsxs(p,{to:`/conferences/${a}/${d}`,className:"tag-cell",children:[e.jsxs("div",{className:"name",children:[e.jsx("span",{className:"dot",style:{background:x.dot}}),E(l.name,d)]}),e.jsx("div",{className:"meta",children:e.jsxs("span",{children:[(l.paper_count??0).toLocaleString()," papers"]})})]},l.id)})})]},n.id)}),v>0&&e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",marginTop:24},children:[v," tasks across ",i.filter(n=>n.tasks.length>0).length," areas."]})]})};export{te as default};
 
 
assets/ConferenceTaskView-DJwrrg0s.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import{u as $,c as W,r as P,j as e,L as y,B as G}from"./index-D6NpXxup.js";import{u as M}from"./useQuery-BSzsAAZV.js";import{P as J}from"./components-C-Wk0LlL.js";import{u as X,P as Y}from"./useIntersectionObserver-C8GlpU4F.js";import{a as Z,P as ee,b as se}from"./PaperDateFilter-CwWio6o1.js";import{M as h}from"./MarkdownText-OPahlM9D.js";import{c as z}from"./catalog-BkXnDjBr.js";import{t as ae,d as te}from"./transform-dsZcnzEu.js";import{d as re}from"./usePapers-D7q7tNxt.js";import{S as ne}from"./skeleton-BZlAxqUu.js";import{A as ie,a as oe}from"./alert-CEE7Xf4h.js";import"./paperQueryKeys-CcqbH5YG.js";import"./LatexTitle-Cd92uzqM.js";import"./papers-CJuRKhYV.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-VFNGJa2a.js";/* empty css */import"./PaperPreviewLink-BaxpCHGH.js";import"./index-BiPn19VT.js";import"./index-PW6rRKKS.js";import"./katex-DkKDou_j.js";import"./hover-card-C5GFpPJ1.js";import"./useMutation-DI9QqXsO.js";import"./useInfiniteQuery-BA3fe-wV.js";const ce=[["trending","trending"],["date_published","newest"],["citation_count","most cited"]],le=t=>t==="trending"||t==="date_published"||t==="citation_count"?t:"trending",Oe=()=>{var A,B,L,O,T,D;const{confSlug:t,taskSlug:n}=$(),[o,u]=W(),w=le(o.get("order_by")),S=o.get("has_code")==="true",k=o.get("has_hf_artifacts")==="true",x=Z(o),I=a=>{const s=new URLSearchParams(o);s.set("order_by",a),u(s)},q=a=>{const s=new URLSearchParams(o);a?s.set("has_code","true"):s.delete("has_code"),u(s)},Q=a=>{const s=new URLSearchParams(o);a?s.set("has_hf_artifacts","true"):s.delete("has_hf_artifacts"),u(s)},R=n==="all",N=n==="oral",_=n==="spotlight",l=n==="outstanding",d=n==="best-paper-finalists",f=l||d,p=R||N||_||l||d,K=p?void 0:n,U=N?"oral":_?"spotlight":l?"outstanding":d?"best_paper_finalist":void 0,m=M({queryKey:["conference",t],queryFn:()=>z.getConference(t),enabled:!!t,staleTime:10*60*1e3}),j=M({queryKey:["task",n],queryFn:()=>z.getTask(n),enabled:!!n&&!p,staleTime:10*60*1e3}),i=re({conferenceSlug:t||"",taskSlug:K,presentation:U,page_size:12,order_by:w,order_dir:"desc",include_resources:!0,has_code:S,has_hf_artifacts:k,start_date:x.startDate,end_date:x.endDate,enabled:!!t}),{targetRef:V,isIntersecting:C}=X({rootMargin:"200px"});P.useEffect(()=>{C&&i.hasNextPage&&!i.isFetchingNextPage&&i.fetchNextPage()},[C,i.hasNextPage,i.isFetchingNextPage]),P.useEffect(()=>{window.scrollTo(0,0)},[t,n]);const v=P.useMemo(()=>{var s;return(((s=i.data)==null?void 0:s.pages)??[]).flatMap(c=>c.results)},[i.data]),b=P.useMemo(()=>v.map(ae),[v]),g=R?"All papers":N?"Oral papers":_?"Spotlight papers":l?"Outstanding papers":d?"Best paper finalists":te(((A=j.data)==null?void 0:A.name)||n||"",((B=j.data)==null?void 0:B.slug)||n),F=((O=(L=i.data)==null?void 0:L.pages[0])==null?void 0:O.count)??((T=m.data)==null?void 0:T.paper_count)??0,r=j.data;return m.error||j.error||i.error?e.jsx("div",{className:"page",children:e.jsx(ie,{variant:"destructive",children:e.jsx(oe,{children:"Failed to load conference papers. Please try again."})})}):e.jsxs("div",{className:"page",children:[e.jsxs("nav",{className:"breadcrumb","aria-label":"Breadcrumb",children:[e.jsx(y,{to:"/",children:"Home"}),e.jsx("span",{children:" / "}),e.jsx(y,{to:"/conferences",children:"Conferences"}),e.jsx("span",{children:" / "}),e.jsx(y,{to:`/conferences/${t}`,children:((D=m.data)==null?void 0:D.name)??t}),e.jsx("span",{children:" / "}),e.jsx("span",{children:g})]}),e.jsxs("div",{className:!p&&(r!=null&&r.image_url)?"task-hero-grid":void 0,style:{marginTop:16,marginBottom:28},children:[e.jsxs("div",{children:[e.jsx("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--accent-text)",letterSpacing:"0.1em",marginBottom:8},children:p?"BROWSE PAPERS":"TASK"}),e.jsx("h1",{className:"domain-mega-title",children:g}),l&&t==="iclr-2026"&&e.jsx(h,{className:"task-explainer",text:"ICLR 2026 recognized two Outstanding Papers and one Honorable Mention. [Read the announcement](https://blog.iclr.cc/2026/04/23/announcing-the-iclr-2026-outstanding-papers/)."}),l&&t==="icml-2026"&&e.jsx(h,{className:"task-explainer",text:"ICML 2026 recognized two Outstanding Papers and five Honorable Mentions. [Read the announcement](https://blog.icml.cc/2026/07/05/announcing-the-icml-2026-awards/)."}),d&&t==="cvpr-2026"&&e.jsx(h,{className:"task-explainer",text:"CVPR 2026 recognized fifteen Best Paper Award finalists, including the winners. [Read the announcement](https://x.com/CVPR/status/2062912519522717978)."}),!p&&(r==null?void 0:r.description)&&e.jsx(h,{className:"task-explainer",text:r.description}),m.data&&e.jsxs("div",{className:"task-quickstats",style:{marginTop:12},children:[e.jsxs("span",{children:[e.jsx("span",{className:"num",children:F.toLocaleString()}),"PAPERS"]}),e.jsx("span",{children:m.data.name})]})]}),!p&&(r==null?void 0:r.image_url)&&e.jsxs("figure",{className:"task-figure-card",children:[e.jsx("div",{className:"task-figure-img-wrap",children:e.jsx("img",{className:"task-figure-img",src:r.image_url,alt:`${g} schematic`,onError:a=>{var s,c;(c=(s=a.currentTarget.parentElement)==null?void 0:s.parentElement)==null||c.style.setProperty("display","none")}})}),e.jsxs("figcaption",{children:["Figure · ",g,r.image_credit&&e.jsxs(e.Fragment,{children:[e.jsx("br",{}),e.jsx(h,{className:"task-image-credit",text:r.image_credit})]})]})]})]}),e.jsxs("div",{className:"task-section-head",children:[e.jsx("div",{className:"task-section-eyebrow",children:f?"Award papers":"Conference papers · sort below"}),e.jsxs("div",{className:"task-section-title",children:["Papers ",e.jsxs("span",{className:"meta",children:["[",F.toLocaleString(),"]"]})]})]}),e.jsxs("div",{className:"sort-bar",children:[e.jsxs("div",{className:"paper-feed-toolbar-controls",children:[!f&&e.jsx("div",{className:"sort-options",children:ce.map(([a,s])=>e.jsx("button",{className:`sort-btn ${w===a?"active":""}`,onClick:()=>I(a),children:s},a))}),e.jsx(Y,{hasCode:S,hasHfArtifacts:k,onHasCodeChange:q,onHasHfArtifactsChange:Q,showDivider:!f})]}),e.jsx(ee,{startDate:x.startDate,endDate:x.endDate,onChange:a=>u(se(o,a))}),!f&&e.jsxs("div",{className:"results-count",children:[b.length," loaded in ",e.jsx("span",{children:g})]})]}),i.isLoading?e.jsx("div",{className:"paper-list",children:Array.from({length:4}).map((a,s)=>e.jsx(ne,{className:"h-40 w-full"},s))}):b.length===0?e.jsx("div",{className:"no-results",children:"No papers found for this selection."}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"paper-list",children:b.map((a,s)=>{var E;const c=(E=v[s])==null?void 0:E.conference_award,H=c==="outstanding"?"Outstanding Paper":c==="honorable_mention"?"Honorable Mention":c==="best_paper_finalist"&&!d?"Best Paper Finalist":null;return e.jsxs(G.Fragment,{children:[H&&e.jsx("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--accent-text)",letterSpacing:"0.08em",marginBottom:8},children:H}),e.jsx(J,{paper:a,rank:s+1})]},a.id)})}),e.jsx("div",{ref:V,style:{height:1}}),i.isFetchingNextPage&&e.jsx("div",{style:{padding:"20px 0",textAlign:"center",color:"var(--ink-faint)"},children:"Loading more…"})]})]})};export{Oe as default};
assets/ConferenceTaskView-Duh9rAYL.js DELETED
@@ -1 +0,0 @@
1
- import{u as $,c as W,r as P,j as e,L as y,B as G}from"./index-D1SFE8tx.js";import{u as M}from"./useQuery-8sGgldYe.js";import{P as J}from"./components-BAR1mYoW.js";import{u as X,P as Y}from"./useIntersectionObserver-BPOzk2Hc.js";import{a as Z,P as ee,b as se}from"./PaperDateFilter-GmvHJTjc.js";import{M as h}from"./MarkdownText-B1RI0BDb.js";import{c as z}from"./catalog-BIqvVz-s.js";import{t as ae,d as te}from"./transform-BmaYjIy4.js";import{d as re}from"./usePapers-jBjTfCJU.js";import{S as ne}from"./skeleton-D5wy8oMn.js";import{A as ie,a as oe}from"./alert-D8tgAf4z.js";import"./paperQueryKeys-CcqbH5YG.js";import"./LatexTitle-C3kQa1rr.js";import"./katex.min-BSBacQyE.js";import"./papers-Cv1LxXF4.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-BbVqI79y.js";import"./PaperPreviewLink-D5_ka8a2.js";import"./index-CZU6xdjr.js";import"./index-DJRFtxnI.js";import"./hover-card-BtW3iC4Z.js";import"./useMutation-BOPUR0a5.js";import"./useInfiniteQuery-rPEO6e6c.js";const ce=[["trending","trending"],["date_published","newest"],["citation_count","most cited"]],le=t=>t==="trending"||t==="date_published"||t==="citation_count"?t:"trending",Le=()=>{var A,B,L,O,T,D;const{confSlug:t,taskSlug:n}=$(),[o,u]=W(),w=le(o.get("order_by")),S=o.get("has_code")==="true",k=o.get("has_hf_artifacts")==="true",x=Z(o),I=a=>{const s=new URLSearchParams(o);s.set("order_by",a),u(s)},q=a=>{const s=new URLSearchParams(o);a?s.set("has_code","true"):s.delete("has_code"),u(s)},Q=a=>{const s=new URLSearchParams(o);a?s.set("has_hf_artifacts","true"):s.delete("has_hf_artifacts"),u(s)},R=n==="all",N=n==="oral",_=n==="spotlight",l=n==="outstanding",d=n==="best-paper-finalists",f=l||d,p=R||N||_||l||d,K=p?void 0:n,U=N?"oral":_?"spotlight":l?"outstanding":d?"best_paper_finalist":void 0,m=M({queryKey:["conference",t],queryFn:()=>z.getConference(t),enabled:!!t,staleTime:10*60*1e3}),j=M({queryKey:["task",n],queryFn:()=>z.getTask(n),enabled:!!n&&!p,staleTime:10*60*1e3}),i=re({conferenceSlug:t||"",taskSlug:K,presentation:U,page_size:12,order_by:w,order_dir:"desc",include_resources:!0,has_code:S,has_hf_artifacts:k,start_date:x.startDate,end_date:x.endDate,enabled:!!t}),{targetRef:V,isIntersecting:C}=X({rootMargin:"200px"});P.useEffect(()=>{C&&i.hasNextPage&&!i.isFetchingNextPage&&i.fetchNextPage()},[C,i.hasNextPage,i.isFetchingNextPage]),P.useEffect(()=>{window.scrollTo(0,0)},[t,n]);const v=P.useMemo(()=>{var s;return(((s=i.data)==null?void 0:s.pages)??[]).flatMap(c=>c.results)},[i.data]),b=P.useMemo(()=>v.map(ae),[v]),g=R?"All papers":N?"Oral papers":_?"Spotlight papers":l?"Outstanding papers":d?"Best paper finalists":te(((A=j.data)==null?void 0:A.name)||n||"",((B=j.data)==null?void 0:B.slug)||n),F=((O=(L=i.data)==null?void 0:L.pages[0])==null?void 0:O.count)??((T=m.data)==null?void 0:T.paper_count)??0,r=j.data;return m.error||j.error||i.error?e.jsx("div",{className:"page",children:e.jsx(ie,{variant:"destructive",children:e.jsx(oe,{children:"Failed to load conference papers. Please try again."})})}):e.jsxs("div",{className:"page",children:[e.jsxs("nav",{className:"breadcrumb","aria-label":"Breadcrumb",children:[e.jsx(y,{to:"/",children:"Home"}),e.jsx("span",{children:" / "}),e.jsx(y,{to:"/conferences",children:"Conferences"}),e.jsx("span",{children:" / "}),e.jsx(y,{to:`/conferences/${t}`,children:((D=m.data)==null?void 0:D.name)??t}),e.jsx("span",{children:" / "}),e.jsx("span",{children:g})]}),e.jsxs("div",{className:!p&&(r!=null&&r.image_url)?"task-hero-grid":void 0,style:{marginTop:16,marginBottom:28},children:[e.jsxs("div",{children:[e.jsx("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--accent-text)",letterSpacing:"0.1em",marginBottom:8},children:p?"BROWSE PAPERS":"TASK"}),e.jsx("h1",{className:"domain-mega-title",children:g}),l&&t==="iclr-2026"&&e.jsx(h,{className:"task-explainer",text:"ICLR 2026 recognized two Outstanding Papers and one Honorable Mention. [Read the announcement](https://blog.iclr.cc/2026/04/23/announcing-the-iclr-2026-outstanding-papers/)."}),l&&t==="icml-2026"&&e.jsx(h,{className:"task-explainer",text:"ICML 2026 recognized two Outstanding Papers and five Honorable Mentions. [Read the announcement](https://blog.icml.cc/2026/07/05/announcing-the-icml-2026-awards/)."}),d&&t==="cvpr-2026"&&e.jsx(h,{className:"task-explainer",text:"CVPR 2026 recognized fifteen Best Paper Award finalists, including the winners. [Read the announcement](https://x.com/CVPR/status/2062912519522717978)."}),!p&&(r==null?void 0:r.description)&&e.jsx(h,{className:"task-explainer",text:r.description}),m.data&&e.jsxs("div",{className:"task-quickstats",style:{marginTop:12},children:[e.jsxs("span",{children:[e.jsx("span",{className:"num",children:F.toLocaleString()}),"PAPERS"]}),e.jsx("span",{children:m.data.name})]})]}),!p&&(r==null?void 0:r.image_url)&&e.jsxs("figure",{className:"task-figure-card",children:[e.jsx("div",{className:"task-figure-img-wrap",children:e.jsx("img",{className:"task-figure-img",src:r.image_url,alt:`${g} schematic`,onError:a=>{var s,c;(c=(s=a.currentTarget.parentElement)==null?void 0:s.parentElement)==null||c.style.setProperty("display","none")}})}),e.jsxs("figcaption",{children:["Figure · ",g,r.image_credit&&e.jsxs(e.Fragment,{children:[e.jsx("br",{}),e.jsx(h,{className:"task-image-credit",text:r.image_credit})]})]})]})]}),e.jsxs("div",{className:"task-section-head",children:[e.jsx("div",{className:"task-section-eyebrow",children:f?"Award papers":"Conference papers · sort below"}),e.jsxs("div",{className:"task-section-title",children:["Papers ",e.jsxs("span",{className:"meta",children:["[",F.toLocaleString(),"]"]})]})]}),e.jsxs("div",{className:"sort-bar",children:[e.jsxs("div",{className:"paper-feed-toolbar-controls",children:[!f&&e.jsx("div",{className:"sort-options",children:ce.map(([a,s])=>e.jsx("button",{className:`sort-btn ${w===a?"active":""}`,onClick:()=>I(a),children:s},a))}),e.jsx(Y,{hasCode:S,hasHfArtifacts:k,onHasCodeChange:q,onHasHfArtifactsChange:Q,showDivider:!f})]}),e.jsx(ee,{startDate:x.startDate,endDate:x.endDate,onChange:a=>u(se(o,a))}),!f&&e.jsxs("div",{className:"results-count",children:[b.length," loaded in ",e.jsx("span",{children:g})]})]}),i.isLoading?e.jsx("div",{className:"paper-list",children:Array.from({length:4}).map((a,s)=>e.jsx(ne,{className:"h-40 w-full"},s))}):b.length===0?e.jsx("div",{className:"no-results",children:"No papers found for this selection."}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"paper-list",children:b.map((a,s)=>{var E;const c=(E=v[s])==null?void 0:E.conference_award,H=c==="outstanding"?"Outstanding Paper":c==="honorable_mention"?"Honorable Mention":c==="best_paper_finalist"&&!d?"Best Paper Finalist":null;return e.jsxs(G.Fragment,{children:[H&&e.jsx("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--accent-text)",letterSpacing:"0.08em",marginBottom:8},children:H}),e.jsx(J,{paper:a,rank:s+1})]},a.id)})}),e.jsx("div",{ref:V,style:{height:1}}),i.isFetchingNextPage&&e.jsx("div",{style:{padding:"20px 0",textAlign:"center",color:"var(--ink-faint)"},children:"Loading more…"})]})]})};export{Le as default};
 
 
assets/{ConferencesIndexView-DKJZtkM5.js → ConferencesIndexView-D7asrqn9.js} RENAMED
@@ -1 +1 @@
1
- import{r as p,j as e,L as d}from"./index-D1SFE8tx.js";import{u}from"./useQuery-8sGgldYe.js";import{c as f}from"./catalog-BIqvVz-s.js";import{S as m}from"./skeleton-D5wy8oMn.js";import{A as h,a as g}from"./alert-D8tgAf4z.js";import{T as x}from"./TaxonomySuggestionTile-B9tj8y3C.js";import"./SignInToEditDialog-CL9l_TG2.js";import"./button-4gNpQKIh.js";import"./input-BKhwSyKU.js";import"./textarea-C0BVR_Sv.js";import"./searchable-select-DMfq7SRz.js";import"./popover-BbVqI79y.js";import"./dialog-PZJPRYO-.js";import"./loader-circle-BHlWsJ7C.js";import"./useMutation-BOPUR0a5.js";import"./submissions--BNtF3h2.js";const j=(r,a)=>{if(!r)return null;const t=new Date(`${r}T00:00:00`),s=a?new Date(`${a}T00:00:00`):null,n=o=>o.toLocaleDateString("en-US",{month:"long",day:"numeric"}),i=t.getFullYear();return s&&s.getTime()!==t.getTime()?t.getMonth()===s.getMonth()?`${n(t).replace(/\d+$/,"").trim()} ${t.getDate()}–${s.getDate()}, ${i}`:`${n(t)} – ${n(s)}, ${i}`:`${n(t)}, ${i}`},v=r=>{var t;if(r.year!=null)return r.year;if(r.start_date)return Number(r.start_date.slice(0,4));const a=(t=r.slug.match(/-(\d{4})$/))==null?void 0:t[1];return a?Number(a):0},y=(r,a)=>{if(r.start_date&&a.start_date){const t=r.start_date.localeCompare(a.start_date);if(t!==0)return t}else{if(r.start_date)return-1;if(a.start_date)return 1}return r.name.localeCompare(a.name)},N={display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:24,paddingBottom:12,borderBottom:"1px solid var(--hairline-strong)"},q=()=>{const r=u({queryKey:["conferences"],queryFn:()=>f.conferences(),staleTime:6e5}),a=p.useMemo(()=>{var s;if(!((s=r.data)!=null&&s.results))return null;const t={};return r.data.results.forEach(n=>{const i=v(n);(t[i]||(t[i]=[])).push(n)}),Object.values(t).forEach(n=>n.sort(y)),Object.keys(t).map(Number).sort((n,i)=>i-n).map(n=>({year:n,conferences:t[n]}))},[r.data]);return r.error?e.jsx("div",{className:"page",children:e.jsx(h,{variant:"destructive",children:e.jsx(g,{children:"Failed to load conferences. Please try again."})})}):e.jsxs("div",{className:"page",children:[e.jsx("div",{className:"feed-header",children:e.jsxs("div",{children:[e.jsxs("h1",{className:"feed-title",children:["All ",e.jsx("em",{children:"Conferences"})]}),e.jsx("div",{className:"feed-subtitle",children:"Browse accepted papers from major AI conferences, grouped by research area and task."}),e.jsxs("div",{className:"conference-deadlines-link",children:["Find deadlines for upcoming conferences"," ",e.jsx(d,{to:"/ai-deadlines",className:"underline underline-offset-2 hover:text-foreground",children:"here"}),". Conference information is based on"," ",e.jsx("a",{href:"https://huggingface.co/ai-conferences",target:"_blank",rel:"noreferrer",className:"underline underline-offset-2 hover:text-foreground",children:"Hugging Face AI Conferences"}),"."]})]})}),r.isLoading?e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:32},children:Array.from({length:2}).map((t,s)=>e.jsxs("div",{children:[e.jsx(m,{className:"h-8 w-24 mb-4"}),e.jsx("div",{className:"tag-grid",children:Array.from({length:3}).map((n,i)=>e.jsx(m,{className:"h-32"},i))})]},s))}):a==null?void 0:a.map(({year:t,conferences:s})=>{const n=s.reduce((o,l)=>o+(l.paper_count??0),0),i=t>0?String(t):"Unknown year";return e.jsxs("section",{style:{marginBottom:48},children:[e.jsxs("div",{style:N,children:[e.jsx("div",{children:e.jsx("h2",{style:{fontFamily:"var(--serif)",fontSize:26,fontWeight:500,letterSpacing:"-0.02em",marginBottom:4},children:i})}),e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",whiteSpace:"nowrap"},children:[s.length," ",s.length===1?"conference":"conferences"," ·"," ",n.toLocaleString()," papers"]})]}),e.jsxs("div",{className:"tag-grid",children:[s.map(o=>{const l=j(o.start_date,o.end_date),c=[o.venue,o.location].filter(Boolean).join(", ");return e.jsxs(d,{to:`/conferences/${o.slug}`,className:"tag-cell",children:[e.jsx("div",{className:"name",children:o.name}),e.jsxs("div",{className:"meta",style:{display:"flex",flexDirection:"column",gap:4},children:[l&&e.jsx("span",{children:l}),c&&e.jsx("span",{children:c}),e.jsxs("span",{children:[(o.paper_count??0).toLocaleString()," papers"]})]})]},o.id)}),e.jsx(x,{kind:"conference"})]})]},t)})]})};export{q as default};
 
1
+ import{r as p,j as e,L as d}from"./index-D6NpXxup.js";import{u}from"./useQuery-BSzsAAZV.js";import{c as f}from"./catalog-BkXnDjBr.js";import{S as m}from"./skeleton-BZlAxqUu.js";import{A as h,a as g}from"./alert-CEE7Xf4h.js";import{T as x}from"./TaxonomySuggestionTile-R7BmY9a5.js";import"./SignInToEditDialog-CpDcwAtr.js";import"./button-B8eVvd3T.js";import"./input-ezGnYvUD.js";import"./textarea-CDG-0EaF.js";import"./searchable-select-t_3YAgwN.js";import"./popover-VFNGJa2a.js";import"./dialog-DSbe7eWD.js";import"./loader-circle-JPWzaaPU.js";import"./useMutation-DI9QqXsO.js";import"./submissions-KVVzXrHP.js";const j=(r,a)=>{if(!r)return null;const t=new Date(`${r}T00:00:00`),s=a?new Date(`${a}T00:00:00`):null,n=o=>o.toLocaleDateString("en-US",{month:"long",day:"numeric"}),i=t.getFullYear();return s&&s.getTime()!==t.getTime()?t.getMonth()===s.getMonth()?`${n(t).replace(/\d+$/,"").trim()} ${t.getDate()}–${s.getDate()}, ${i}`:`${n(t)} – ${n(s)}, ${i}`:`${n(t)}, ${i}`},v=r=>{var t;if(r.year!=null)return r.year;if(r.start_date)return Number(r.start_date.slice(0,4));const a=(t=r.slug.match(/-(\d{4})$/))==null?void 0:t[1];return a?Number(a):0},y=(r,a)=>{if(r.start_date&&a.start_date){const t=r.start_date.localeCompare(a.start_date);if(t!==0)return t}else{if(r.start_date)return-1;if(a.start_date)return 1}return r.name.localeCompare(a.name)},N={display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:24,paddingBottom:12,borderBottom:"1px solid var(--hairline-strong)"},q=()=>{const r=u({queryKey:["conferences"],queryFn:()=>f.conferences(),staleTime:6e5}),a=p.useMemo(()=>{var s;if(!((s=r.data)!=null&&s.results))return null;const t={};return r.data.results.forEach(n=>{const i=v(n);(t[i]||(t[i]=[])).push(n)}),Object.values(t).forEach(n=>n.sort(y)),Object.keys(t).map(Number).sort((n,i)=>i-n).map(n=>({year:n,conferences:t[n]}))},[r.data]);return r.error?e.jsx("div",{className:"page",children:e.jsx(h,{variant:"destructive",children:e.jsx(g,{children:"Failed to load conferences. Please try again."})})}):e.jsxs("div",{className:"page",children:[e.jsx("div",{className:"feed-header",children:e.jsxs("div",{children:[e.jsxs("h1",{className:"feed-title",children:["All ",e.jsx("em",{children:"Conferences"})]}),e.jsx("div",{className:"feed-subtitle",children:"Browse accepted papers from major AI conferences, grouped by research area and task."}),e.jsxs("div",{className:"conference-deadlines-link",children:["Find deadlines for upcoming conferences"," ",e.jsx(d,{to:"/ai-deadlines",className:"underline underline-offset-2 hover:text-foreground",children:"here"}),". Conference information is based on"," ",e.jsx("a",{href:"https://huggingface.co/ai-conferences",target:"_blank",rel:"noreferrer",className:"underline underline-offset-2 hover:text-foreground",children:"Hugging Face AI Conferences"}),"."]})]})}),r.isLoading?e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:32},children:Array.from({length:2}).map((t,s)=>e.jsxs("div",{children:[e.jsx(m,{className:"h-8 w-24 mb-4"}),e.jsx("div",{className:"tag-grid",children:Array.from({length:3}).map((n,i)=>e.jsx(m,{className:"h-32"},i))})]},s))}):a==null?void 0:a.map(({year:t,conferences:s})=>{const n=s.reduce((o,l)=>o+(l.paper_count??0),0),i=t>0?String(t):"Unknown year";return e.jsxs("section",{style:{marginBottom:48},children:[e.jsxs("div",{style:N,children:[e.jsx("div",{children:e.jsx("h2",{style:{fontFamily:"var(--serif)",fontSize:26,fontWeight:500,letterSpacing:"-0.02em",marginBottom:4},children:i})}),e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",whiteSpace:"nowrap"},children:[s.length," ",s.length===1?"conference":"conferences"," ·"," ",n.toLocaleString()," papers"]})]}),e.jsxs("div",{className:"tag-grid",children:[s.map(o=>{const l=j(o.start_date,o.end_date),c=[o.venue,o.location].filter(Boolean).join(", ");return e.jsxs(d,{to:`/conferences/${o.slug}`,className:"tag-cell",children:[e.jsx("div",{className:"name",children:o.name}),e.jsxs("div",{className:"meta",style:{display:"flex",flexDirection:"column",gap:4},children:[l&&e.jsx("span",{children:l}),c&&e.jsx("span",{children:c}),e.jsxs("span",{children:[(o.paper_count??0).toLocaleString()," papers"]})]})]},o.id)}),e.jsx(x,{kind:"conference"})]})]},t)})]})};export{q as default};
assets/{CronDashboard-B62cooEW.js → CronDashboard-CP9b6Xpq.js} RENAMED
@@ -1,4 +1,4 @@
1
- import{e as q,r as h,w as ss,m as as,j as e,l as ce,Z as rs,R as ns,I as ts,p as me,P as is,s as cs,x as Pe,t as F,h as Re,L as xe,a as ls,d as ds}from"./index-D1SFE8tx.js";import{u as V}from"./useQuery-8sGgldYe.js";import{f as _,A as te,C as v,a as b,b as y,c as E,d as f,o as ve}from"./operations-DS9G9l-m.js";import{B as C}from"./badge-tu_TeCcV.js";import{B as S}from"./button-4gNpQKIh.js";import{C as os}from"./chevron-down-BlzggtLy.js";import{D as fe,r as ms,f as us,h as hs,j as xs,p as ps,k as js}from"./codexAddEvals-DszkCVjj.js";import{F as _e}from"./file-text-Bsi3wgDE.js";import{S as Fe}from"./shield-alert-DY8uHwNM.js";import{E as ee}from"./external-link-CbOEnNr7.js";import{C as se,R as Ne}from"./refresh-cw-DdIEgq6F.js";import{L as M}from"./loader-circle-BHlWsJ7C.js";import{C as pe}from"./circle-check-BYxTAa4s.js";import{u as U}from"./useMutation-BOPUR0a5.js";import{u as gs}from"./useInfiniteQuery-rPEO6e6c.js";import{p as Te}from"./paperEdits-2cEMeEQo.js";import{c as ue}from"./catalog-BIqvVz-s.js";import{c as be}from"./chat-CaGUU5iT.js";/**
2
  * @license lucide-react v0.462.0 - ISC
3
  *
4
  * This source code is licensed under the ISC license.
 
1
+ import{e as q,r as h,w as ss,m as as,j as e,l as ce,Z as rs,R as ns,I as ts,p as me,P as is,s as cs,x as Pe,t as F,h as Re,L as xe,a as ls,d as ds}from"./index-D6NpXxup.js";import{u as V}from"./useQuery-BSzsAAZV.js";import{f as _,A as te,C as v,a as b,b as y,c as E,d as f,o as ve}from"./operations-cWF0kuRA.js";import{B as C}from"./badge-C28FT33P.js";import{B as S}from"./button-B8eVvd3T.js";import{C as os}from"./chevron-down-BkB1bFLS.js";import{D as fe,r as ms,f as us,h as hs,j as xs,p as ps,k as js}from"./codexAddEvals-dWH5XP_x.js";import{F as _e}from"./file-text-ltUPoEqb.js";import{S as Fe}from"./shield-alert-07ifIjqY.js";import{E as ee}from"./external-link-CCoWzQWa.js";import{C as se,R as Ne}from"./refresh-cw-4GTKCvG5.js";import{L as M}from"./loader-circle-JPWzaaPU.js";import{C as pe}from"./circle-check-CvrEtDzL.js";import{u as U}from"./useMutation-DI9QqXsO.js";import{u as gs}from"./useInfiniteQuery-BA3fe-wV.js";import{p as Te}from"./paperEdits-B5_mABJZ.js";import{c as ue}from"./catalog-BkXnDjBr.js";import{c as be}from"./chat-CtW0GA2A.js";/**
2
  * @license lucide-react v0.462.0 - ISC
3
  *
4
  * This source code is licensed under the ISC license.
assets/{ExternalSourceEvalBadge-BJe3a3TH.js → ExternalSourceEvalBadge-EZz5hzfp.js} RENAMED
@@ -1 +1 @@
1
- import{a as o}from"./papers-Cv1LxXF4.js";import{a1 as g,j as a,L as l}from"./index-D1SFE8tx.js";import{H as u,a as c,b as d}from"./hover-card-BtW3iC4Z.js";import{s as m}from"./safeExternalHref-CkBrsh84.js";class b{constructor(e){this.request=e}list(e={}){const t=new URLSearchParams(Object.entries(e).filter(r=>r[1]!==void 0).map(([r,n])=>[r,String(n)])).toString();return this.request(`/evaluations/${t?`?${t}`:""}`,{cache:"no-store"})}get(e){return this.request(`/evaluations/${e}`)}async byPaper(e){return this.allPages({paper_id:Number(e),ordering:"-benchmark_popularity"})}async byDataset(e,t){return this.allPages({dataset_id:Number(e),best_metric:t,ordering:"best_rank"})}async byLeaderboard(e,t,r={}){return this.allPages({dataset_id:Number(e),task_id:Number(t),ordering:"best_rank",...r})}create(e){return this.request("/evaluations/",{method:"POST",body:JSON.stringify(e)})}update(e,t){return this.request(`/evaluations/${e}`,{method:"PUT",body:JSON.stringify(t)})}delete(e){return this.request(`/evaluations/${e}`,{method:"DELETE"})}primeCurationState(e,t=!1){return o.primeEvaluations(e,t)}batch(e,t){return o.mutateEvaluations(e,t,"/evaluations/batch",{method:"POST",body:JSON.stringify({paper_id:e,operations:t})})}async allPages(e){const r=await this.list({...e,page_size:100});if(!r.next_page)return r.results;const n=Math.ceil(r.count/100),p=await Promise.all(Array.from({length:n-1},(i,h)=>this.list({...e,page:h+2,page_size:100})));return[r,...p].flatMap(i=>i.results)}}const w=new b(g),j=()=>a.jsxs(u,{openDelay:120,closeDelay:120,children:[a.jsx(c,{asChild:!0,children:a.jsx("button",{type:"button",className:"bm-closed-source-tag","aria-label":"Closed-source model",children:"closed"})}),a.jsxs(d,{side:"top",align:"start",className:"w-auto max-w-[260px] p-3 text-sm leading-snug",children:["This is an evaluation of a closed-source model. You can disable viewing these in your"," ",a.jsx(l,{to:"/settings",className:"closed-eval-tooltip-link",children:"settings"}),"."]})]});function x(s){if(!s)return"Evaluation sourced outside this paper";const e=s.toLowerCase();if(e.includes("open-asr-leaderboard"))return"Open ASR Leaderboard";if(e.includes("arcprize.org"))return"ARC Prize Leaderboard";if(e.includes("frontierswe.com"))return"FrontierSWE";if(e.includes("deepswe.datacurve.ai"))return"DeepSWE";try{const t=new URL(s,"https://paperswithcode.co");return t.pathname.startsWith("/paper/")?"Source paper":t.hostname.replace(/^www\./,"")}catch{return s}}const E=({sourceUrl:s})=>{const e=m(s),t=typeof s=="string"&&s.startsWith("/paper/")?s:null,r=x(s);return a.jsxs(u,{openDelay:120,closeDelay:120,children:[a.jsx(c,{asChild:!0,children:a.jsx("button",{type:"button",className:"bm-external-source-tag","aria-label":`Externally sourced evaluation: ${r}`,children:"External"})}),a.jsxs(d,{side:"top",align:"start",className:"w-auto max-w-[280px] p-3 text-sm leading-snug",children:["This score was sourced outside this paper.",t?a.jsxs(a.Fragment,{children:[" ",a.jsx(l,{to:t,target:"_blank",rel:"noopener noreferrer",className:"external-eval-tooltip-link",children:r}),"."]}):e?a.jsxs(a.Fragment,{children:[" ",a.jsx("a",{href:e,target:"_blank",rel:"noopener noreferrer",className:"external-eval-tooltip-link",children:r}),"."]}):a.jsxs(a.Fragment,{children:[" ",r,"."]})]})]})};export{j as C,E,w as e};
 
1
+ import{a as o}from"./papers-CJuRKhYV.js";import{a1 as g,j as a,L as l}from"./index-D6NpXxup.js";import{H as u,a as c,b as d}from"./hover-card-C5GFpPJ1.js";import{s as m}from"./safeExternalHref-CkBrsh84.js";class b{constructor(e){this.request=e}list(e={}){const t=new URLSearchParams(Object.entries(e).filter(r=>r[1]!==void 0).map(([r,n])=>[r,String(n)])).toString();return this.request(`/evaluations/${t?`?${t}`:""}`,{cache:"no-store"})}get(e){return this.request(`/evaluations/${e}`)}async byPaper(e){return this.allPages({paper_id:Number(e),ordering:"-benchmark_popularity"})}async byDataset(e,t){return this.allPages({dataset_id:Number(e),best_metric:t,ordering:"best_rank"})}async byLeaderboard(e,t,r={}){return this.allPages({dataset_id:Number(e),task_id:Number(t),ordering:"best_rank",...r})}create(e){return this.request("/evaluations/",{method:"POST",body:JSON.stringify(e)})}update(e,t){return this.request(`/evaluations/${e}`,{method:"PUT",body:JSON.stringify(t)})}delete(e){return this.request(`/evaluations/${e}`,{method:"DELETE"})}primeCurationState(e,t=!1){return o.primeEvaluations(e,t)}batch(e,t){return o.mutateEvaluations(e,t,"/evaluations/batch",{method:"POST",body:JSON.stringify({paper_id:e,operations:t})})}async allPages(e){const r=await this.list({...e,page_size:100});if(!r.next_page)return r.results;const n=Math.ceil(r.count/100),p=await Promise.all(Array.from({length:n-1},(i,h)=>this.list({...e,page:h+2,page_size:100})));return[r,...p].flatMap(i=>i.results)}}const w=new b(g),j=()=>a.jsxs(u,{openDelay:120,closeDelay:120,children:[a.jsx(c,{asChild:!0,children:a.jsx("button",{type:"button",className:"bm-closed-source-tag","aria-label":"Closed-source model",children:"closed"})}),a.jsxs(d,{side:"top",align:"start",className:"w-auto max-w-[260px] p-3 text-sm leading-snug",children:["This is an evaluation of a closed-source model. You can disable viewing these in your"," ",a.jsx(l,{to:"/settings",className:"closed-eval-tooltip-link",children:"settings"}),"."]})]});function x(s){if(!s)return"Evaluation sourced outside this paper";const e=s.toLowerCase();if(e.includes("open-asr-leaderboard"))return"Open ASR Leaderboard";if(e.includes("arcprize.org"))return"ARC Prize Leaderboard";if(e.includes("frontierswe.com"))return"FrontierSWE";if(e.includes("deepswe.datacurve.ai"))return"DeepSWE";try{const t=new URL(s,"https://paperswithcode.co");return t.pathname.startsWith("/paper/")?"Source paper":t.hostname.replace(/^www\./,"")}catch{return s}}const E=({sourceUrl:s})=>{const e=m(s),t=typeof s=="string"&&s.startsWith("/paper/")?s:null,r=x(s);return a.jsxs(u,{openDelay:120,closeDelay:120,children:[a.jsx(c,{asChild:!0,children:a.jsx("button",{type:"button",className:"bm-external-source-tag","aria-label":`Externally sourced evaluation: ${r}`,children:"External"})}),a.jsxs(d,{side:"top",align:"start",className:"w-auto max-w-[280px] p-3 text-sm leading-snug",children:["This score was sourced outside this paper.",t?a.jsxs(a.Fragment,{children:[" ",a.jsx(l,{to:t,target:"_blank",rel:"noopener noreferrer",className:"external-eval-tooltip-link",children:r}),"."]}):e?a.jsxs(a.Fragment,{children:[" ",a.jsx("a",{href:e,target:"_blank",rel:"noopener noreferrer",className:"external-eval-tooltip-link",children:r}),"."]}):a.jsxs(a.Fragment,{children:[" ",r,"."]})]})]})};export{j as C,E,w as e};
assets/FeedView-BrBUKcjm.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import{b as q,r as c,i as k,j as e,c as $,L as C,d as B}from"./index-D6NpXxup.js";import{P as K}from"./components-C-Wk0LlL.js";import{u as U,P as z}from"./useIntersectionObserver-C8GlpU4F.js";import{r as G,P as W,w as Q}from"./PaperDateFilter-CwWio6o1.js";import{D as V,u as X,P as Y,M as J,S as Z,a as ee,R as se,W as ae,A as te,b as re,q as ie,c as ne}from"./chatLaunch-KGz9i5Uq.js";import{c as oe}from"./chat-CtW0GA2A.js";import{c as M}from"./catalog-BkXnDjBr.js";import{S as _}from"./chatPrompts-CDY3UGU1.js";import{t as le,d as H}from"./transform-dsZcnzEu.js";import{u as ce}from"./usePapers-D7q7tNxt.js";import{S as y}from"./skeleton-BZlAxqUu.js";import{A as de,a as me}from"./alert-CEE7Xf4h.js";import{u as D}from"./useQuery-BSzsAAZV.js";import"./paperQueryKeys-CcqbH5YG.js";import"./LatexTitle-Cd92uzqM.js";import"./papers-CJuRKhYV.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-VFNGJa2a.js";import"./chevron-down-BkB1bFLS.js";import"./useInfiniteQuery-BA3fe-wV.js";const he=[["trending","trending"],["date_published","newest"],["citation_count","most cited"]],R=45,pe=1800,ue=25,ge=350,xe=i=>{const[g,l]=c.useState(_[0].slice(0,1));return c.useEffect(()=>{var v,f;if(!i)return;if((f=(v=window.matchMedia)==null?void 0:v.call(window,"(prefers-reduced-motion: reduce)"))!=null&&f.matches){l(_[0]);return}let m=0,n=1,x=!1,h;l(_[0].slice(0,n));const d=()=>{const p=_[m];if(!x){if(n+=1,l(p.slice(0,n)),n===p.length){x=!0,h=window.setTimeout(d,pe);return}h=window.setTimeout(d,R);return}if(n-=1,l(p.slice(0,n)),n===0){x=!1,m=(m+1)%_.length,h=window.setTimeout(d,ge);return}h=window.setTimeout(d,ue)};return h=window.setTimeout(d,R),()=>window.clearTimeout(h)},[i]),g},fe=i=>i==="trending"||i==="date_published"||i==="citation_count"?i:"trending",be=()=>{var s,r;const i=q(),g=B()?Z:ee,[l,m]=c.useState({text:"",paperMentions:[]}),n=l.text,[x,h]=c.useState(0),[d,v]=c.useState(V),[f,p]=c.useState(!1),[o,A]=c.useState("low"),[b,E]=c.useState(!1),L=xe(!n),w=c.useRef(null),P=D({queryKey:["chatAvailability"],queryFn:()=>oe.getAvailability(),retry:!1,enabled:k()}),S=!!((s=P.data)!=null&&s.web_search_available),j=k()&&((r=P.data)==null?void 0:r.paper_mentions_enabled)!==!1,t=X({draft:l,onChange:m,enabled:j,textareaRef:w});c.useLayoutEffect(()=>{const a=w.current;if(!a)return;const u=()=>{if(a.style.height="auto",n){a.style.height=`${Math.min(a.scrollHeight,160)}px`;return}const N=a.placeholder,F=_.reduce((I,O)=>(a.placeholder=O,Math.max(I,a.scrollHeight)),0);a.placeholder=N,a.style.height=`${Math.min(F,160)}px`};return u(),window.addEventListener("resize",u),()=>window.removeEventListener("resize",u)},[n]);const T=async(a=l)=>{if(!(!a.text.trim()||b)){E(!0),ie(a,d,{webSearchEnabled:S&&f,reasoningEffort:o});try{const N=await ne(d,o);i(`/chat/${N.id}`)}catch{i("/chat")}}};return e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"ask-home-new",children:"Hint: type @ to bring papers into context"}),e.jsxs("div",{className:"ask-home",children:[e.jsxs("div",{className:"ask-home-textarea-wrap",children:[e.jsx(Y,{text:l.text,mentions:l.paperMentions,scrollTop:x,variant:"home"}),e.jsx("textarea",{ref:w,rows:1,value:n,placeholder:L,"aria-label":"Ask the assistant",disabled:b,onChange:a=>t.updateText(a.target.value,a.target.selectionStart),onSelect:a=>t.refresh(a.currentTarget.selectionStart),onClick:a=>t.refresh(a.currentTarget.selectionStart),onScroll:a=>h(a.currentTarget.scrollTop),onBlur:a=>{var u,N;(N=(u=a.relatedTarget)==null?void 0:u.closest)!=null&&N.call(u,".chat-paper-picker")||window.setTimeout(t.close,0)},onKeyDown:a=>{t.keyDown(a)||a.key==="Enter"&&!a.shiftKey&&(a.preventDefault(),T())},role:j?"combobox":void 0,"aria-expanded":j?t.open:void 0,"aria-controls":t.open?t.pickerId:void 0,"aria-activedescendant":t.open&&t.results.length?`${t.optionIdPrefix}-${t.activeIndex}`:void 0,"aria-autocomplete":j?"list":void 0,"aria-describedby":t.message?"ask-home-paper-mention-message":void 0})]}),t.message&&e.jsx("div",{id:"ask-home-paper-mention-message",className:"chat-paper-mention-message",role:"alert",children:t.message}),e.jsxs("div",{className:"ask-home-foot",children:[e.jsxs("div",{className:"ask-home-provider-tools",children:[e.jsx(J,{models:g,selectedModel:d,onModelChange:v}),e.jsx(se,{value:o,onChange:A,disabled:b}),S&&e.jsx(ae,{enabled:f,onChange:p,disabled:b})]}),e.jsx("button",{type:"button",className:`chat-send${n.trim()?" chat-send-on":""}`,onClick:()=>void T(),disabled:!n.trim()||b,"aria-label":"Ask the assistant",children:e.jsx(te,{})})]}),e.jsx(re,{open:t.open,query:t.query,results:t.results,activeIndex:t.activeIndex,loading:t.loading,error:t.error,onSelect:t.select,id:t.pickerId,optionIdPrefix:t.optionIdPrefix})]})]})},Oe=()=>{var P,S,j,t,T;const[i,g]=$(),l=fe(i.get("order_by")),m=G(i),n=i.get("has_code")==="true",x=i.get("has_hf_artifacts")==="true",h=s=>{const r=new URLSearchParams(i);r.set("order_by",s),g(r)},d=s=>{const r=new URLSearchParams(i);s?r.set("has_code","true"):r.delete("has_code"),g(r)},v=s=>{const r=new URLSearchParams(i);s?r.set("has_hf_artifacts","true"):r.delete("has_hf_artifacts"),g(r)},f=D({queryKey:["top-tasks-sidebar"],queryFn:()=>M.topTasks(8),staleTime:10*60*1e3}),p=D({queryKey:["trending-tasks-sidebar"],queryFn:()=>M.trendingTasks({limit:8,level:0}),staleTime:10*60*1e3}),o=ce({page_size:30,order_by:l,order_dir:"desc",start_date:m.startDate,end_date:m.endDate,include_resources:!0,has_code:n,has_hf_artifacts:x}),A=c.useMemo(()=>{var r;return(((r=o.data)==null?void 0:r.pages.flatMap(a=>a.results))||[]).map(le)},[o.data]),{targetRef:b,isIntersecting:E}=U({rootMargin:"400px"});c.useEffect(()=>{E&&o.hasNextPage&&!o.isFetchingNextPage&&o.fetchNextPage()},[E,o.hasNextPage,o.isFetchingNextPage]);const L=o.isLoading,w=o.error;return e.jsxs("div",{className:"page",children:[e.jsx("div",{className:"feed-header",children:e.jsxs("div",{children:[e.jsxs("h1",{className:"feed-title",children:["Trending ",e.jsx("em",{children:"Research"})]}),e.jsx("div",{className:"feed-subtitle",children:"Curated daily from arXiv and Hugging Face"})]})}),e.jsxs("div",{className:"layout-with-sidebar",children:[e.jsxs("aside",{className:"sidebar",children:[e.jsxs("div",{className:"sidebar-section sidebar-section-top-domains",children:[e.jsx("div",{className:"sidebar-label",children:"Top Domains"}),f.isLoading&&e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:Array.from({length:6}).map((s,r)=>e.jsx(y,{className:"h-5 w-full"},r))}),(P=f.data)==null?void 0:P.map(s=>e.jsxs(C,{to:`/tasks/${s.slug}`,className:"sidebar-link",children:[H(s.name,s.slug),s.paper_count!=null&&e.jsx("span",{className:"count",children:s.paper_count})]},s.id)),e.jsx(C,{to:"/tasks",className:"sidebar-link",style:{marginTop:8,fontStyle:"italic"},children:"all domains →"})]}),e.jsxs("div",{className:"sidebar-section sidebar-section-trending-domains",children:[e.jsx("div",{className:"sidebar-label",children:"Trending Domains"}),p.isLoading&&e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:Array.from({length:6}).map((s,r)=>e.jsx(y,{className:"h-5 w-full"},r))}),((j=(S=p.data)==null?void 0:S.results)==null?void 0:j.length)===0&&!p.isLoading&&e.jsx("div",{style:{fontSize:12,color:"var(--ink-faint)"},children:"No domains gaining momentum right now."}),(T=(t=p.data)==null?void 0:t.results)==null?void 0:T.map(s=>e.jsxs(C,{to:`/tasks/${s.slug}`,className:"sidebar-link",children:[H(s.name,s.slug),e.jsxs("span",{className:"count",children:[s.share_lift.toFixed(1),"x"]})]},s.id))]})]}),e.jsxs("div",{className:"feed-main",children:[k()&&e.jsx("div",{className:"feed-chat",children:e.jsx(be,{})}),e.jsxs("div",{className:"feed-content",children:[e.jsxs("div",{className:"sort-bar home-feed-sort-bar",children:[e.jsxs("div",{className:"paper-feed-toolbar-controls",children:[e.jsx("div",{className:"sort-options",children:he.map(([s,r])=>e.jsx("button",{className:`sort-btn ${l===s?"active":""}`,onClick:()=>h(s),children:r},s))}),e.jsx(z,{hasCode:n,hasHfArtifacts:x,onHasCodeChange:d,onHasHfArtifactsChange:v})]}),e.jsx(W,{startDate:m.startDate,endDate:m.endDate,onChange:s=>g(Q(i,s))})]}),w&&e.jsx(de,{variant:"destructive",className:"mb-4",children:e.jsx(me,{children:"Failed to load papers. Please try again."})}),L?e.jsx("div",{className:"paper-list",children:Array.from({length:6}).map((s,r)=>e.jsxs("div",{className:"paper-card",children:[e.jsx("div",{className:"paper-thumb-wrap",children:e.jsx(y,{className:"paper-thumb-skeleton"})}),e.jsxs("div",{className:"paper-body",style:{flex:1,gap:12},children:[e.jsx(y,{className:"h-6 w-3/4"}),e.jsx(y,{className:"h-4 w-1/2"}),e.jsx(y,{className:"h-12 w-full"})]})]},r))}):A.length===0?e.jsx("div",{className:"no-results",children:"No papers in this window."}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"paper-list",children:A.map((s,r)=>e.jsx(K,{paper:s,rank:r+1},s.id))}),e.jsx("div",{ref:b,style:{height:1}}),o.isFetchingNextPage&&e.jsx("div",{style:{padding:"20px 0",textAlign:"center",color:"var(--ink-faint)"},children:"Loading more…"})]})]})]})]})]})};export{be as AskAssistant,Oe as default};
assets/FeedView-Bzfxs45a.js DELETED
@@ -1 +0,0 @@
1
- import{b as q,r as c,i as k,j as e,c as $,L as C,d as B}from"./index-D1SFE8tx.js";import{P as K}from"./components-BAR1mYoW.js";import{u as U,P as z}from"./useIntersectionObserver-BPOzk2Hc.js";import{r as G,P as W,w as Q}from"./PaperDateFilter-GmvHJTjc.js";import{D as V,u as X,P as Y,M as J,S as Z,a as ee,R as se,W as ae,A as te,b as re,q as ie,c as ne}from"./chatLaunch-DE6TPfMe.js";import{c as oe}from"./chat-CaGUU5iT.js";import{c as M}from"./catalog-BIqvVz-s.js";import{S as _}from"./chatPrompts-CDY3UGU1.js";import{t as le,d as H}from"./transform-BmaYjIy4.js";import{u as ce}from"./usePapers-jBjTfCJU.js";import{S as y}from"./skeleton-D5wy8oMn.js";import{A as de,a as me}from"./alert-D8tgAf4z.js";import{u as D}from"./useQuery-8sGgldYe.js";import"./paperQueryKeys-CcqbH5YG.js";import"./LatexTitle-C3kQa1rr.js";import"./katex.min-BSBacQyE.js";import"./papers-Cv1LxXF4.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-BbVqI79y.js";import"./chevron-down-BlzggtLy.js";import"./useInfiniteQuery-rPEO6e6c.js";const he=[["trending","trending"],["date_published","newest"],["citation_count","most cited"]],R=45,pe=1800,ue=25,ge=350,xe=i=>{const[g,l]=c.useState(_[0].slice(0,1));return c.useEffect(()=>{var v,f;if(!i)return;if((f=(v=window.matchMedia)==null?void 0:v.call(window,"(prefers-reduced-motion: reduce)"))!=null&&f.matches){l(_[0]);return}let m=0,n=1,x=!1,h;l(_[0].slice(0,n));const d=()=>{const p=_[m];if(!x){if(n+=1,l(p.slice(0,n)),n===p.length){x=!0,h=window.setTimeout(d,pe);return}h=window.setTimeout(d,R);return}if(n-=1,l(p.slice(0,n)),n===0){x=!1,m=(m+1)%_.length,h=window.setTimeout(d,ge);return}h=window.setTimeout(d,ue)};return h=window.setTimeout(d,R),()=>window.clearTimeout(h)},[i]),g},fe=i=>i==="trending"||i==="date_published"||i==="citation_count"?i:"trending",be=()=>{var s,r;const i=q(),g=B()?Z:ee,[l,m]=c.useState({text:"",paperMentions:[]}),n=l.text,[x,h]=c.useState(0),[d,v]=c.useState(V),[f,p]=c.useState(!1),[o,A]=c.useState("low"),[b,E]=c.useState(!1),L=xe(!n),w=c.useRef(null),P=D({queryKey:["chatAvailability"],queryFn:()=>oe.getAvailability(),retry:!1,enabled:k()}),S=!!((s=P.data)!=null&&s.web_search_available),j=k()&&((r=P.data)==null?void 0:r.paper_mentions_enabled)!==!1,t=X({draft:l,onChange:m,enabled:j,textareaRef:w});c.useLayoutEffect(()=>{const a=w.current;if(!a)return;const u=()=>{if(a.style.height="auto",n){a.style.height=`${Math.min(a.scrollHeight,160)}px`;return}const N=a.placeholder,F=_.reduce((I,O)=>(a.placeholder=O,Math.max(I,a.scrollHeight)),0);a.placeholder=N,a.style.height=`${Math.min(F,160)}px`};return u(),window.addEventListener("resize",u),()=>window.removeEventListener("resize",u)},[n]);const T=async(a=l)=>{if(!(!a.text.trim()||b)){E(!0),ie(a,d,{webSearchEnabled:S&&f,reasoningEffort:o});try{const N=await ne(d,o);i(`/chat/${N.id}`)}catch{i("/chat")}}};return e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"ask-home-new",children:"Hint: type @ to bring papers into context"}),e.jsxs("div",{className:"ask-home",children:[e.jsxs("div",{className:"ask-home-textarea-wrap",children:[e.jsx(Y,{text:l.text,mentions:l.paperMentions,scrollTop:x,variant:"home"}),e.jsx("textarea",{ref:w,rows:1,value:n,placeholder:L,"aria-label":"Ask the assistant",disabled:b,onChange:a=>t.updateText(a.target.value,a.target.selectionStart),onSelect:a=>t.refresh(a.currentTarget.selectionStart),onClick:a=>t.refresh(a.currentTarget.selectionStart),onScroll:a=>h(a.currentTarget.scrollTop),onBlur:a=>{var u,N;(N=(u=a.relatedTarget)==null?void 0:u.closest)!=null&&N.call(u,".chat-paper-picker")||window.setTimeout(t.close,0)},onKeyDown:a=>{t.keyDown(a)||a.key==="Enter"&&!a.shiftKey&&(a.preventDefault(),T())},role:j?"combobox":void 0,"aria-expanded":j?t.open:void 0,"aria-controls":t.open?t.pickerId:void 0,"aria-activedescendant":t.open&&t.results.length?`${t.optionIdPrefix}-${t.activeIndex}`:void 0,"aria-autocomplete":j?"list":void 0,"aria-describedby":t.message?"ask-home-paper-mention-message":void 0})]}),t.message&&e.jsx("div",{id:"ask-home-paper-mention-message",className:"chat-paper-mention-message",role:"alert",children:t.message}),e.jsxs("div",{className:"ask-home-foot",children:[e.jsxs("div",{className:"ask-home-provider-tools",children:[e.jsx(J,{models:g,selectedModel:d,onModelChange:v}),e.jsx(se,{value:o,onChange:A,disabled:b}),S&&e.jsx(ae,{enabled:f,onChange:p,disabled:b})]}),e.jsx("button",{type:"button",className:`chat-send${n.trim()?" chat-send-on":""}`,onClick:()=>void T(),disabled:!n.trim()||b,"aria-label":"Ask the assistant",children:e.jsx(te,{})})]}),e.jsx(re,{open:t.open,query:t.query,results:t.results,activeIndex:t.activeIndex,loading:t.loading,error:t.error,onSelect:t.select,id:t.pickerId,optionIdPrefix:t.optionIdPrefix})]})]})},qe=()=>{var P,S,j,t,T;const[i,g]=$(),l=fe(i.get("order_by")),m=G(i),n=i.get("has_code")==="true",x=i.get("has_hf_artifacts")==="true",h=s=>{const r=new URLSearchParams(i);r.set("order_by",s),g(r)},d=s=>{const r=new URLSearchParams(i);s?r.set("has_code","true"):r.delete("has_code"),g(r)},v=s=>{const r=new URLSearchParams(i);s?r.set("has_hf_artifacts","true"):r.delete("has_hf_artifacts"),g(r)},f=D({queryKey:["top-tasks-sidebar"],queryFn:()=>M.topTasks(8),staleTime:10*60*1e3}),p=D({queryKey:["trending-tasks-sidebar"],queryFn:()=>M.trendingTasks({limit:8,level:0}),staleTime:10*60*1e3}),o=ce({page_size:30,order_by:l,order_dir:"desc",start_date:m.startDate,end_date:m.endDate,include_resources:!0,has_code:n,has_hf_artifacts:x}),A=c.useMemo(()=>{var r;return(((r=o.data)==null?void 0:r.pages.flatMap(a=>a.results))||[]).map(le)},[o.data]),{targetRef:b,isIntersecting:E}=U({rootMargin:"400px"});c.useEffect(()=>{E&&o.hasNextPage&&!o.isFetchingNextPage&&o.fetchNextPage()},[E,o.hasNextPage,o.isFetchingNextPage]);const L=o.isLoading,w=o.error;return e.jsxs("div",{className:"page",children:[e.jsx("div",{className:"feed-header",children:e.jsxs("div",{children:[e.jsxs("h1",{className:"feed-title",children:["Trending ",e.jsx("em",{children:"Research"})]}),e.jsx("div",{className:"feed-subtitle",children:"Curated daily from arXiv and Hugging Face"})]})}),e.jsxs("div",{className:"layout-with-sidebar",children:[e.jsxs("aside",{className:"sidebar",children:[e.jsxs("div",{className:"sidebar-section sidebar-section-top-domains",children:[e.jsx("div",{className:"sidebar-label",children:"Top Domains"}),f.isLoading&&e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:Array.from({length:6}).map((s,r)=>e.jsx(y,{className:"h-5 w-full"},r))}),(P=f.data)==null?void 0:P.map(s=>e.jsxs(C,{to:`/tasks/${s.slug}`,className:"sidebar-link",children:[H(s.name,s.slug),s.paper_count!=null&&e.jsx("span",{className:"count",children:s.paper_count})]},s.id)),e.jsx(C,{to:"/tasks",className:"sidebar-link",style:{marginTop:8,fontStyle:"italic"},children:"all domains →"})]}),e.jsxs("div",{className:"sidebar-section sidebar-section-trending-domains",children:[e.jsx("div",{className:"sidebar-label",children:"Trending Domains"}),p.isLoading&&e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:Array.from({length:6}).map((s,r)=>e.jsx(y,{className:"h-5 w-full"},r))}),((j=(S=p.data)==null?void 0:S.results)==null?void 0:j.length)===0&&!p.isLoading&&e.jsx("div",{style:{fontSize:12,color:"var(--ink-faint)"},children:"No domains gaining momentum right now."}),(T=(t=p.data)==null?void 0:t.results)==null?void 0:T.map(s=>e.jsxs(C,{to:`/tasks/${s.slug}`,className:"sidebar-link",children:[H(s.name,s.slug),e.jsxs("span",{className:"count",children:[s.share_lift.toFixed(1),"x"]})]},s.id))]})]}),e.jsxs("div",{className:"feed-main",children:[k()&&e.jsx("div",{className:"feed-chat",children:e.jsx(be,{})}),e.jsxs("div",{className:"feed-content",children:[e.jsxs("div",{className:"sort-bar home-feed-sort-bar",children:[e.jsxs("div",{className:"paper-feed-toolbar-controls",children:[e.jsx("div",{className:"sort-options",children:he.map(([s,r])=>e.jsx("button",{className:`sort-btn ${l===s?"active":""}`,onClick:()=>h(s),children:r},s))}),e.jsx(z,{hasCode:n,hasHfArtifacts:x,onHasCodeChange:d,onHasHfArtifactsChange:v})]}),e.jsx(W,{startDate:m.startDate,endDate:m.endDate,onChange:s=>g(Q(i,s))})]}),w&&e.jsx(de,{variant:"destructive",className:"mb-4",children:e.jsx(me,{children:"Failed to load papers. Please try again."})}),L?e.jsx("div",{className:"paper-list",children:Array.from({length:6}).map((s,r)=>e.jsxs("div",{className:"paper-card",children:[e.jsx("div",{className:"paper-thumb-wrap",children:e.jsx(y,{className:"paper-thumb-skeleton"})}),e.jsxs("div",{className:"paper-body",style:{flex:1,gap:12},children:[e.jsx(y,{className:"h-6 w-3/4"}),e.jsx(y,{className:"h-4 w-1/2"}),e.jsx(y,{className:"h-12 w-full"})]})]},r))}):A.length===0?e.jsx("div",{className:"no-results",children:"No papers in this window."}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"paper-list",children:A.map((s,r)=>e.jsx(K,{paper:s,rank:r+1},s.id))}),e.jsx("div",{ref:b,style:{height:1}}),o.isFetchingNextPage&&e.jsx("div",{style:{padding:"20px 0",textAlign:"center",color:"var(--ink-faint)"},children:"Loading more…"})]})]})]})]})]})};export{be as AskAssistant,qe as default};
 
 
assets/FrameworksIndexView-DZvX4Al4.js DELETED
@@ -1 +0,0 @@
1
- import{b as d,j as e,L as o,B as m}from"./index-D1SFE8tx.js";import{u as p}from"./useQuery-8sGgldYe.js";import{I as h}from"./components-BAR1mYoW.js";import{c as u}from"./catalog-BIqvVz-s.js";import{c as g,h as f}from"./transform-BmaYjIy4.js";import"./paperQueryKeys-CcqbH5YG.js";import"./LatexTitle-C3kQa1rr.js";import"./katex.min-BSBacQyE.js";import"./papers-Cv1LxXF4.js";import"./safeExternalHref-CkBrsh84.js";const x={gpu:"GPU",cpu:"CPU",apple:"Apple silicon"},j={display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:24,paddingBottom:12,borderBottom:"1px solid var(--hairline-strong)"},k={fontFamily:"var(--serif)",fontSize:26,fontWeight:500,letterSpacing:"-0.02em",marginBottom:4},_={fontFamily:"var(--serif)",fontStyle:"italic",fontSize:13,color:"var(--ink-soft)"},v={fontFamily:"var(--mono)",fontSize:13,fontWeight:600,letterSpacing:"0.04em",textTransform:"uppercase",color:"var(--ink)",marginBottom:6},b=({platform:r})=>{const n=g(f(r));return e.jsx("span",{className:"framework-platform-chip",style:{background:n.bg,color:n.text},children:x[r]})},w=({framework:r})=>{const n=d(),l=`/papers?framework=${encodeURIComponent(r.slug)}`;return e.jsxs("article",{id:`framework-${r.slug}`,className:"framework-card framework-card-clickable",role:"link",tabIndex:0,"aria-label":`View papers implemented by ${r.name}`,onClick:a=>{a.target.closest("a, button")||n(l)},onKeyDown:a=>{a.target===a.currentTarget&&(a.key==="Enter"||a.key===" ")&&(a.preventDefault(),n(l))},children:[e.jsxs("div",{className:"framework-card-head",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"framework-card-name",children:r.name}),r.organization_name&&e.jsx("div",{className:"framework-card-org",children:r.organization_name})]}),r.platforms&&r.platforms.length>0&&e.jsx("div",{className:"framework-platform-row",children:r.platforms.map(a=>e.jsx(b,{platform:a},a))})]}),e.jsx("p",{className:"framework-card-desc",children:r.description}),r.when_to_use&&e.jsxs("div",{className:"framework-card-when",children:[e.jsx("span",{className:"framework-card-when-label",children:"When to use"}),r.when_to_use]}),(r.github_url||r.docs_url||r.introducing_paper_arxiv_id)&&e.jsxs("div",{className:"framework-card-links",children:[r.introducing_paper_arxiv_id&&e.jsx(o,{to:`/paper/${r.introducing_paper_arxiv_id}`,className:"framework-link",children:"Introducing paper"}),r.github_url&&r.paper_count>0&&e.jsxs(o,{to:l,className:"framework-link",children:["Implements ",r.paper_count," ",r.paper_count===1?"paper":"papers"]}),r.github_url&&r.paper_count===0&&e.jsx("span",{className:"framework-link framework-link-disabled","aria-disabled":"true",children:"Implements 0 papers"}),r.github_url&&e.jsxs("a",{href:r.github_url,target:"_blank",rel:"noopener noreferrer",className:"framework-link",children:[e.jsx(h,{name:"github",size:13}),"GitHub"]}),r.docs_url&&r.docs_url!==r.github_url&&e.jsx("a",{href:r.docs_url,target:"_blank",rel:"noopener noreferrer",className:"framework-link",children:"Docs"})]})]})},T=()=>{var a;const r=p({queryKey:["framework-catalog"],queryFn:()=>u.frameworkCatalog()}),n=((a=r.data)==null?void 0:a.domains)??[],l=n.reduce((i,s)=>i+s.categories.reduce((t,c)=>t+c.frameworks.length,0),0);return m.useEffect(()=>{var s;const i=window.location.hash.slice(1);i&&((s=document.getElementById(i))==null||s.scrollIntoView())},[r.data]),e.jsxs("div",{className:"page",children:[e.jsx("div",{className:"feed-header",children:e.jsxs("div",{children:[e.jsxs("h1",{className:"feed-title",children:["AI ",e.jsx("em",{children:"Frameworks"})]}),e.jsx("div",{className:"feed-subtitle",children:"Curated libraries and tools to run, serve, and train models — pick the right stack for your hardware and workload."})]})}),r.isLoading&&e.jsx("div",{className:"empty",children:"Loading frameworks…"}),r.isError&&e.jsx("div",{className:"empty",children:"Could not load frameworks."}),n.map(i=>e.jsxs("section",{style:{marginBottom:56},children:[e.jsxs("div",{style:j,children:[e.jsxs("div",{children:[e.jsx("h2",{style:k,children:i.name}),e.jsx("div",{style:_,children:i.description})]}),e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",whiteSpace:"nowrap"},children:[i.categories.length," ",i.categories.length===1?"category":"categories"," ·"," ",i.categories.reduce((s,t)=>s+t.frameworks.length,0)," frameworks"]})]}),i.categories.map(s=>e.jsxs("div",{className:"framework-category",children:[e.jsxs("div",{className:"framework-category-head",children:[e.jsxs("div",{children:[e.jsx("h3",{style:v,children:s.name}),s.description&&e.jsx("p",{className:"framework-category-blurb",children:s.description}),s.guide_url&&e.jsxs("a",{href:s.guide_url,target:"_blank",rel:"noopener noreferrer",className:"framework-guide-link",children:[s.guide_label??"Read guide"," →"]})]}),e.jsxs("div",{className:"framework-category-meta",children:[s.frameworks.length," ",s.frameworks.length===1?"framework":"frameworks"]})]}),e.jsx("div",{className:"framework-grid",children:s.frameworks.map(t=>e.jsx(w,{framework:t},t.slug))})]},s.slug))]},i.slug)),e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",marginTop:8},children:[l," frameworks across ",n.length," ",n.length===1?"domain":"domains",". More areas coming soon."]})]})};export{w as FrameworkCard,T as default};
 
 
assets/FrameworksIndexView-DexMmVPV.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import{b as d,j as e,L as o,B as m}from"./index-D6NpXxup.js";import{u as p}from"./useQuery-BSzsAAZV.js";import{I as h}from"./components-C-Wk0LlL.js";import{c as u}from"./catalog-BkXnDjBr.js";import{c as g,h as f}from"./transform-dsZcnzEu.js";import"./paperQueryKeys-CcqbH5YG.js";import"./LatexTitle-Cd92uzqM.js";import"./papers-CJuRKhYV.js";import"./safeExternalHref-CkBrsh84.js";const x={gpu:"GPU",cpu:"CPU",apple:"Apple silicon"},j={display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:24,paddingBottom:12,borderBottom:"1px solid var(--hairline-strong)"},k={fontFamily:"var(--serif)",fontSize:26,fontWeight:500,letterSpacing:"-0.02em",marginBottom:4},_={fontFamily:"var(--serif)",fontStyle:"italic",fontSize:13,color:"var(--ink-soft)"},v={fontFamily:"var(--mono)",fontSize:13,fontWeight:600,letterSpacing:"0.04em",textTransform:"uppercase",color:"var(--ink)",marginBottom:6},b=({platform:r})=>{const n=g(f(r));return e.jsx("span",{className:"framework-platform-chip",style:{background:n.bg,color:n.text},children:x[r]})},w=({framework:r})=>{const n=d(),l=`/papers?framework=${encodeURIComponent(r.slug)}`;return e.jsxs("article",{id:`framework-${r.slug}`,className:"framework-card framework-card-clickable",role:"link",tabIndex:0,"aria-label":`View papers implemented by ${r.name}`,onClick:a=>{a.target.closest("a, button")||n(l)},onKeyDown:a=>{a.target===a.currentTarget&&(a.key==="Enter"||a.key===" ")&&(a.preventDefault(),n(l))},children:[e.jsxs("div",{className:"framework-card-head",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"framework-card-name",children:r.name}),r.organization_name&&e.jsx("div",{className:"framework-card-org",children:r.organization_name})]}),r.platforms&&r.platforms.length>0&&e.jsx("div",{className:"framework-platform-row",children:r.platforms.map(a=>e.jsx(b,{platform:a},a))})]}),e.jsx("p",{className:"framework-card-desc",children:r.description}),r.when_to_use&&e.jsxs("div",{className:"framework-card-when",children:[e.jsx("span",{className:"framework-card-when-label",children:"When to use"}),r.when_to_use]}),(r.github_url||r.docs_url||r.introducing_paper_arxiv_id)&&e.jsxs("div",{className:"framework-card-links",children:[r.introducing_paper_arxiv_id&&e.jsx(o,{to:`/paper/${r.introducing_paper_arxiv_id}`,className:"framework-link",children:"Introducing paper"}),r.github_url&&r.paper_count>0&&e.jsxs(o,{to:l,className:"framework-link",children:["Implements ",r.paper_count," ",r.paper_count===1?"paper":"papers"]}),r.github_url&&r.paper_count===0&&e.jsx("span",{className:"framework-link framework-link-disabled","aria-disabled":"true",children:"Implements 0 papers"}),r.github_url&&e.jsxs("a",{href:r.github_url,target:"_blank",rel:"noopener noreferrer",className:"framework-link",children:[e.jsx(h,{name:"github",size:13}),"GitHub"]}),r.docs_url&&r.docs_url!==r.github_url&&e.jsx("a",{href:r.docs_url,target:"_blank",rel:"noopener noreferrer",className:"framework-link",children:"Docs"})]})]})},E=()=>{var a;const r=p({queryKey:["framework-catalog"],queryFn:()=>u.frameworkCatalog()}),n=((a=r.data)==null?void 0:a.domains)??[],l=n.reduce((i,s)=>i+s.categories.reduce((t,c)=>t+c.frameworks.length,0),0);return m.useEffect(()=>{var s;const i=window.location.hash.slice(1);i&&((s=document.getElementById(i))==null||s.scrollIntoView())},[r.data]),e.jsxs("div",{className:"page",children:[e.jsx("div",{className:"feed-header",children:e.jsxs("div",{children:[e.jsxs("h1",{className:"feed-title",children:["AI ",e.jsx("em",{children:"Frameworks"})]}),e.jsx("div",{className:"feed-subtitle",children:"Curated libraries and tools to run, serve, and train models — pick the right stack for your hardware and workload."})]})}),r.isLoading&&e.jsx("div",{className:"empty",children:"Loading frameworks…"}),r.isError&&e.jsx("div",{className:"empty",children:"Could not load frameworks."}),n.map(i=>e.jsxs("section",{style:{marginBottom:56},children:[e.jsxs("div",{style:j,children:[e.jsxs("div",{children:[e.jsx("h2",{style:k,children:i.name}),e.jsx("div",{style:_,children:i.description})]}),e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",whiteSpace:"nowrap"},children:[i.categories.length," ",i.categories.length===1?"category":"categories"," ·"," ",i.categories.reduce((s,t)=>s+t.frameworks.length,0)," frameworks"]})]}),i.categories.map(s=>e.jsxs("div",{className:"framework-category",children:[e.jsxs("div",{className:"framework-category-head",children:[e.jsxs("div",{children:[e.jsx("h3",{style:v,children:s.name}),s.description&&e.jsx("p",{className:"framework-category-blurb",children:s.description}),s.guide_url&&e.jsxs("a",{href:s.guide_url,target:"_blank",rel:"noopener noreferrer",className:"framework-guide-link",children:[s.guide_label??"Read guide"," →"]})]}),e.jsxs("div",{className:"framework-category-meta",children:[s.frameworks.length," ",s.frameworks.length===1?"framework":"frameworks"]})]}),e.jsx("div",{className:"framework-grid",children:s.frameworks.map(t=>e.jsx(w,{framework:t},t.slug))})]},s.slug))]},i.slug)),e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",marginTop:8},children:[l," frameworks across ",n.length," ",n.length===1?"domain":"domains",". More areas coming soon."]})]})};export{w as FrameworkCard,E as default};
assets/LatexTitle-C3kQa1rr.js DELETED
@@ -1 +0,0 @@
1
- import{j as u,r as E}from"./index-D1SFE8tx.js";import{k as j}from"./katex.min-BSBacQyE.js";const C=new Set([",",";",":","!"," ","quad","qquad","enspace","thinspace"]),M={a:"á",e:"é",i:"í",o:"ó",u:"ú",y:"ý",A:"Á",E:"É",I:"Í",O:"Ó",U:"Ú",Y:"Ý"},_={a:"à",e:"è",i:"ì",o:"ò",u:"ù",A:"À",E:"È",I:"Ì",O:"Ò",U:"Ù"},b={a:"â",e:"ê",i:"î",o:"ô",u:"û",A:"Â",E:"Ê",I:"Î",O:"Ô",U:"Û"},w={a:"ä",e:"ë",i:"ï",o:"ö",u:"ü",y:"ÿ",A:"Ä",E:"Ë",I:"Ï",O:"Ö",U:"Ü",Y:"Ÿ"},O={"'":M,"`":_,"^":b,'"':w,"~":{n:"ñ",N:"Ñ"}},$={ss:"ß",ae:"æ",AE:"Æ",oe:"œ",OE:"Œ",o:"ø",O:"Ø",l:"ł",L:"Ł"};function S(n,s){var e;return((e=O[n])==null?void 0:e[s])??null}function N(n){const s=[];let e=0,r="";const t=()=>{r&&(s.push({type:"text",content:r}),r="")};for(;e<n.length;){if(n[e]==="$"&&n[e+1]==="$"){t();const o=n.indexOf("$$",e+2);if(o===-1){r+=n.slice(e);break}s.push({type:"display",content:n.slice(e+2,o)}),e=o+2;continue}if(n[e]==="$"){t();const o=n.indexOf("$",e+1);if(o===-1){r+=n.slice(e);break}s.push({type:"inline",content:n.slice(e+1,o)}),e=o+1;continue}r+=n[e],e+=1}return t(),s}function d(n,s){if(n[s]!=="{")return null;let e=0;for(let r=s;r<n.length;r+=1)if(n[r]==="{")e+=1;else if(n[r]==="}"&&(e-=1,e===0))return{content:n.slice(s+1,r),end:r+1};return null}function y(n,s){let e=s+1;if(e>=n.length)return{name:"",end:e};if(!/[a-zA-Z]/.test(n[e]))return{name:n[e],end:e+1};const r=e;for(;e<n.length&&/[a-zA-Z]/.test(n[e]);)e+=1;return{name:n.slice(r,e),end:e}}function k(n,s){const e=n[s];if(e!=="^"&&e!=="_"||s+1>=n.length)return null;if(n[s+1]==="{"){const r=d(n,s+1);return r?{end:r.end}:null}return/[A-Za-z0-9+\-=.]/.test(n[s+1])?{end:s+2}:null}function L(n,s){let e=s;if(n[e]==="\\"){const{name:o,end:i}=y(n,e);if(!o)return null;if(e=i,n[e]==="{"){const a=d(n,e);a&&(e=a.end)}}else if(/[A-Za-z0-9]/.test(n[e])){let o=e+1;for(;o<n.length&&/[A-Za-z0-9]/.test(n[o]);)o+=1;if(n[o]!=="^"&&n[o]!=="_")return null;e=o}else return null;const r=s;let t=0;for(;e<n.length;){const o=k(n,e);if(!o)break;t+=1,e=o.end}return t===0?null:{latex:n.slice(r,e),end:e}}function U(n){return Array.from(new Set((n||"").trim().split(/\s+/).filter(Boolean))).sort((s,e)=>e.length-s.length)}function z(n,s,e){const r=U(s);if(!r.length)return[n];const t=r.map(i=>i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")),o=new RegExp(`(${t.join("|")})`,"gi");return n.split(o).filter(Boolean).map((i,a)=>r.some(p=>p.toLocaleLowerCase()===i.toLocaleLowerCase())?u.jsx("mark",{children:i},`${e}-mark-${a}`):i)}function m(n,s,e){const r=[];let t=0,o=0;const i=()=>`${s}-${o++}`,a=(p,f)=>p==="strong"?u.jsx("strong",{children:f},i()):u.jsx("em",{children:f},i());for(;t<n.length;){if(n[t]==="\\"){const{name:l,end:T}=y(n,t);if(t=T,$[l]){r.push($[l]);continue}if(l.length===1&&t<n.length&&/[A-Za-z]/.test(n[t])){const c=S(l,n[t]);if(c){r.push(c),t+=1;continue}}if(l==="c"){const c=d(n,t);if((c==null?void 0:c.content.length)===1){const h={c:"ç",C:"Ç"}[c.content];if(h){r.push(h),t=c.end;continue}}}if(l==="textbf"||l==="mathbf"){const c=d(n,t);if(c){t=c.end,r.push(a("strong",m(c.content,i(),e)));continue}}if(l==="emph"||l==="textit"||l==="textsl"||l==="texttt"){const c=d(n,t);if(c){t=c.end,r.push(a("em",m(c.content,i(),e)));continue}}if(l==="color"||l==="textcolor"){const c=d(n,t);if(c){t=c.end;const h=d(n,t);h&&(t=h.end,r.push(...m(h.content,i(),e)));continue}}if(C.has(l)){r.push(" ");continue}if(l==="~"){r.push(" ");continue}const A=d(n,t);if(A){t=A.end,r.push(...m(A.content,i(),e));continue}r.push(`\\${l}`);continue}if(n[t]==="~"){r.push(" "),t+=1;continue}const p=L(n,t);if(p){r.push(u.jsx(g,{latex:p.latex,display:!1},i())),t=p.end;continue}let f=t;for(;f<n.length&&n[f]!=="\\"&&n[f]!=="~"&&!L(n,f);)f+=1;f>t&&r.push(...z(n.slice(t,f),e,i())),t=f}return r}function g({latex:n,display:s}){const e=E.useMemo(()=>{try{return j.renderToString(n.trim(),{displayMode:s,throwOnError:!1})}catch{return null}},[n,s]);return e?u.jsx("span",{className:s?"katex-display":void 0,dangerouslySetInnerHTML:{__html:e}}):u.jsx(u.Fragment,{children:s?`$$${n}$$`:`$${n}$`})}function I(n,s){const e=N(n),r=[];return e.forEach((t,o)=>{const i=`latex-${o}`;if(t.type==="text"){const a=m(t.content,i,s);a.length===1?r.push(a[0]):a.length>1&&r.push(u.jsx(E.Fragment,{children:a},i));return}if(t.type==="display"){r.push(u.jsx(g,{latex:t.content,display:!0},i));return}r.push(u.jsx(g,{latex:t.content,display:!1},i))}),r.length===1?r[0]:u.jsx(u.Fragment,{children:r})}const X=({text:n,className:s="",highlight:e})=>{const r=E.useMemo(()=>I(n,e),[n,e]);return u.jsx("span",{className:s,children:r})},D=({title:n,className:s="",highlight:e})=>u.jsx(X,{text:n,className:s,highlight:e});export{D as L,X as a};
 
 
assets/LatexTitle-Cd92uzqM.js ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/katex-wklAmtGL.css"])))=>i.map(i=>d[i]);
2
+ import{j as u,r as A,_ as L}from"./index-D6NpXxup.js";let g=null,$=null;function M(){return $??($=Promise.all([L(()=>import("./katex-DkKDou_j.js"),[]),L(()=>Promise.resolve({}),__vite__mapDeps([0]))]).then(([n])=>(g=n.default,g))),$}const O=new Set([",",";",":","!"," ","quad","qquad","enspace","thinspace"]),S={a:"á",e:"é",i:"í",o:"ó",u:"ú",y:"ý",A:"Á",E:"É",I:"Í",O:"Ó",U:"Ú",Y:"Ý"},b={a:"à",e:"è",i:"ì",o:"ò",u:"ù",A:"À",E:"È",I:"Ì",O:"Ò",U:"Ù"},w={a:"â",e:"ê",i:"î",o:"ô",u:"û",A:"Â",E:"Ê",I:"Î",O:"Ô",U:"Û"},k={a:"ä",e:"ë",i:"ï",o:"ö",u:"ü",y:"ÿ",A:"Ä",E:"Ë",I:"Ï",O:"Ö",U:"Ü",Y:"Ÿ"},N={"'":S,"`":b,"^":w,'"':k,"~":{n:"ñ",N:"Ñ"}},T={ss:"ß",ae:"æ",AE:"Æ",oe:"œ",OE:"Œ",o:"ø",O:"Ø",l:"ł",L:"Ł"};function I(n,i){var e;return((e=N[n])==null?void 0:e[i])??null}function v(n){const i=[];let e=0,t="";const r=()=>{t&&(i.push({type:"text",content:t}),t="")};for(;e<n.length;){if(n[e]==="$"&&n[e+1]==="$"){r();const o=n.indexOf("$$",e+2);if(o===-1){t+=n.slice(e);break}i.push({type:"display",content:n.slice(e+2,o)}),e=o+2;continue}if(n[e]==="$"){r();const o=n.indexOf("$",e+1);if(o===-1){t+=n.slice(e);break}i.push({type:"inline",content:n.slice(e+1,o)}),e=o+1;continue}t+=n[e],e+=1}return r(),i}function d(n,i){if(n[i]!=="{")return null;let e=0;for(let t=i;t<n.length;t+=1)if(n[t]==="{")e+=1;else if(n[t]==="}"&&(e-=1,e===0))return{content:n.slice(i+1,t),end:t+1};return null}function j(n,i){let e=i+1;if(e>=n.length)return{name:"",end:e};if(!/[a-zA-Z]/.test(n[e]))return{name:n[e],end:e+1};const t=e;for(;e<n.length&&/[a-zA-Z]/.test(n[e]);)e+=1;return{name:n.slice(t,e),end:e}}function U(n,i){const e=n[i];if(e!=="^"&&e!=="_"||i+1>=n.length)return null;if(n[i+1]==="{"){const t=d(n,i+1);return t?{end:t.end}:null}return/[A-Za-z0-9+\-=.]/.test(n[i+1])?{end:i+2}:null}function y(n,i){let e=i;if(n[e]==="\\"){const{name:o,end:s}=j(n,e);if(!o)return null;if(e=s,n[e]==="{"){const a=d(n,e);a&&(e=a.end)}}else if(/[A-Za-z0-9]/.test(n[e])){let o=e+1;for(;o<n.length&&/[A-Za-z0-9]/.test(n[o]);)o+=1;if(n[o]!=="^"&&n[o]!=="_")return null;e=o}else return null;const t=i;let r=0;for(;e<n.length;){const o=U(n,e);if(!o)break;r+=1,e=o.end}return r===0?null:{latex:n.slice(t,e),end:e}}function z(n){return Array.from(new Set((n||"").trim().split(/\s+/).filter(Boolean))).sort((i,e)=>e.length-i.length)}function X(n,i,e){const t=z(i);if(!t.length)return[n];const r=t.map(s=>s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")),o=new RegExp(`(${r.join("|")})`,"gi");return n.split(o).filter(Boolean).map((s,a)=>t.some(p=>p.toLocaleLowerCase()===s.toLocaleLowerCase())?u.jsx("mark",{children:s},`${e}-mark-${a}`):s)}function m(n,i,e){const t=[];let r=0,o=0;const s=()=>`${i}-${o++}`,a=(p,f)=>p==="strong"?u.jsx("strong",{children:f},s()):u.jsx("em",{children:f},s());for(;r<n.length;){if(n[r]==="\\"){const{name:l,end:C}=j(n,r);if(r=C,T[l]){t.push(T[l]);continue}if(l.length===1&&r<n.length&&/[A-Za-z]/.test(n[r])){const c=I(l,n[r]);if(c){t.push(c),r+=1;continue}}if(l==="c"){const c=d(n,r);if((c==null?void 0:c.content.length)===1){const h={c:"ç",C:"Ç"}[c.content];if(h){t.push(h),r=c.end;continue}}}if(l==="textbf"||l==="mathbf"){const c=d(n,r);if(c){r=c.end,t.push(a("strong",m(c.content,s(),e)));continue}}if(l==="emph"||l==="textit"||l==="textsl"||l==="texttt"){const c=d(n,r);if(c){r=c.end,t.push(a("em",m(c.content,s(),e)));continue}}if(l==="color"||l==="textcolor"){const c=d(n,r);if(c){r=c.end;const h=d(n,r);h&&(r=h.end,t.push(...m(h.content,s(),e)));continue}}if(O.has(l)){t.push(" ");continue}if(l==="~"){t.push(" ");continue}const E=d(n,r);if(E){r=E.end,t.push(...m(E.content,s(),e));continue}t.push(`\\${l}`);continue}if(n[r]==="~"){t.push(" "),r+=1;continue}const p=y(n,r);if(p){t.push(u.jsx(_,{latex:p.latex,display:!1},s())),r=p.end;continue}let f=r;for(;f<n.length&&n[f]!=="\\"&&n[f]!=="~"&&!y(n,f);)f+=1;f>r&&t.push(...X(n.slice(r,f),e,s())),r=f}return t}function _({latex:n,display:i}){const[e,t]=A.useState(g);A.useEffect(()=>{if(e)return;let o=!0;return M().then(s=>{o&&t(()=>s)}),()=>{o=!1}},[e]);const r=A.useMemo(()=>{if(e)try{return e.renderToString(n.trim(),{displayMode:i,throwOnError:!1})}catch{return null}},[e,n,i]);return r===void 0?u.jsx(u.Fragment,{children:n}):r?u.jsx("span",{className:i?"katex-display":void 0,dangerouslySetInnerHTML:{__html:r}}):u.jsx(u.Fragment,{children:i?`$$${n}$$`:`$${n}$`})}function D(n,i){const e=v(n),t=[];return e.forEach((r,o)=>{const s=`latex-${o}`;if(r.type==="text"){const a=m(r.content,s,i);a.length===1?t.push(a[0]):a.length>1&&t.push(u.jsx(A.Fragment,{children:a},s));return}if(r.type==="display"){t.push(u.jsx(_,{latex:r.content,display:!0},s));return}t.push(u.jsx(_,{latex:r.content,display:!1},s))}),t.length===1?t[0]:u.jsx(u.Fragment,{children:t})}const P=({text:n,className:i="",highlight:e})=>{const t=A.useMemo(()=>D(n,e),[n,e]);return u.jsx("span",{className:i,children:t})},Z=({title:n,className:i="",highlight:e})=>u.jsx(P,{text:n,className:i,highlight:e});export{Z as L,P as a};
assets/{MarkdownText-B1RI0BDb.js → MarkdownText-OPahlM9D.js} RENAMED
@@ -1 +1 @@
1
- import{n as l,j as s,L as u}from"./index-D1SFE8tx.js";import"./katex.min-BSBacQyE.js";import{r as p,a as m,P as h}from"./PaperPreviewLink-D5_ka8a2.js";import{M as d}from"./index-CZU6xdjr.js";import{r as w}from"./index-DJRFtxnI.js";const x=new Set(["paperswithcode.co","www.paperswithcode.co","localhost","127.0.0.1","167.235.148.241"]),P=["/methods","/paper","/papers","/tasks","/benchmark","/conferences"];function f(n,o=window.location.origin){if(!n)return null;let t;if(n.startsWith("/"))t=n;else try{const e=new URL(n,o);if(!x.has(e.hostname))return null;t=`${e.pathname}${e.search}${e.hash}`}catch{return null}const r=t.split(/[?#]/,1)[0];return P.some(e=>r===e||r.startsWith(`${e}/`))?t:null}function k(n){const t=n.split(/[?#]/,1)[0].match(/^\/papers?\/([^/]+)$/);if(!t||t[1].includes("%"))return null;const r=t[1],e=/^\d{4}[.-]\d{4,5}(?:v\d+)?$/.test(r),a=/^[1-9]\d*$/.test(r);return!e&&!a?null:l(r)}const L=({text:n,className:o=""})=>s.jsx("div",{className:o,children:s.jsx(d,{remarkPlugins:[w,m],rehypePlugins:[p],components:{a:({href:t,children:r,node:e,...a})=>{const i=f(t);if(i){const c=k(i);return c?s.jsx(h,{routeId:c,to:i,...a,children:r}):s.jsx(u,{to:i,...a,children:r})}return s.jsx("a",{href:t,target:"_blank",rel:"noopener noreferrer",...a,children:r})}},children:n})});export{L as M,f as r};
 
1
+ import{n as l,j as s,L as u}from"./index-D6NpXxup.js";/* empty css */import{r as p,a as m,P as h}from"./PaperPreviewLink-BaxpCHGH.js";import{M as d}from"./index-BiPn19VT.js";import{r as w}from"./index-PW6rRKKS.js";const x=new Set(["paperswithcode.co","www.paperswithcode.co","localhost","127.0.0.1","167.235.148.241"]),P=["/methods","/paper","/papers","/tasks","/benchmark","/conferences"];function f(n,o=window.location.origin){if(!n)return null;let t;if(n.startsWith("/"))t=n;else try{const e=new URL(n,o);if(!x.has(e.hostname))return null;t=`${e.pathname}${e.search}${e.hash}`}catch{return null}const r=t.split(/[?#]/,1)[0];return P.some(e=>r===e||r.startsWith(`${e}/`))?t:null}function k(n){const t=n.split(/[?#]/,1)[0].match(/^\/papers?\/([^/]+)$/);if(!t||t[1].includes("%"))return null;const r=t[1],e=/^\d{4}[.-]\d{4,5}(?:v\d+)?$/.test(r),a=/^[1-9]\d*$/.test(r);return!e&&!a?null:l(r)}const L=({text:n,className:o=""})=>s.jsx("div",{className:o,children:s.jsx(d,{remarkPlugins:[w,m],rehypePlugins:[p],components:{a:({href:t,children:r,node:e,...a})=>{const i=f(t);if(i){const c=k(i);return c?s.jsx(h,{routeId:c,to:i,...a,children:r}):s.jsx(u,{to:i,...a,children:r})}return s.jsx("a",{href:t,target:"_blank",rel:"noopener noreferrer",...a,children:r})}},children:n})});export{L as M,f as r};
assets/{McpView-DBHMIVVB.js → McpView-CU89Lxff.js} RENAMED
@@ -1 +1 @@
1
- import{B as m,j as e,C as b}from"./index-D1SFE8tx.js";import{u as x}from"./useQuery-8sGgldYe.js";import{f as j,D as f}from"./latexPlainText-DI8YEXVe.js";import{q as y}from"./queryOptions-C9woPjwX.js";import{E as i}from"./external-link-CbOEnNr7.js";import{C as g}from"./copy-Dn7dfg-f.js";const h="https://paperswithcode.co/mcp",v="https://staging.paperswithcode.co/mcp";function u(s){const a=typeof window>"u"?void 0:window.location;return a?a.hostname==="staging.paperswithcode.co"?v:a.hostname==="paperswithcode.co"||a.hostname==="www.paperswithcode.co"?h:`${a.origin.replace(/\/$/,"")}/mcp`:h}function w(s){if(!s||typeof s!="object"||s.status!=="ok"||s.service!=="pwc-mcp"||typeof s.version!="string"||typeof s.protocol!="string")throw new Error("MCP health response is invalid");return s}async function k(s){const a=new AbortController,c=()=>a.abort();s==null||s.addEventListener("abort",c,{once:!0});const o=window.setTimeout(c,5e3);try{const t=await fetch(`${u()}/health`,{headers:{Accept:"application/json"},signal:a.signal,credentials:"omit"});if(!t.ok)throw new Error("MCP service is unavailable");return w(await t.json())}finally{window.clearTimeout(o),s==null||s.removeEventListener("abort",c)}}const C=()=>y({queryKey:["mcp","health"],queryFn:({signal:s})=>k(s),retry:!1,staleTime:3e4,refetchInterval:6e4,refetchOnWindowFocus:!1}),N=[["search_papers","Search by topic, title, author, or arXiv ID."],["list_papers","Filter and order papers by taxonomy, venue, date, or organization."],["get_paper_info","Read canonical metadata, authors, abstract, links, and resources."],["read_paper","Read stored paper Markdown with safe continuation for long papers."],["list_recent_papers","Browse the most recently indexed research."],["get_related_papers","Find related work already indexed in the catalogue."],["list_trending_papers","Discover papers with recent repository momentum."],["get_paper_evaluations","Inspect benchmark results reported by one paper."],["get_paper_lineage","Follow explicit predecessor and successor relationships."],["list_tasks","Search tasks and retrieve stable slugs for exact lookup."],["get_task","Inspect a research task and its benchmark coverage."],["list_methods","Search methods and retrieve stable slugs for exact lookup."],["get_method","Inspect a method, its source paper, and catalogue metadata."],["list_conferences","Browse conferences with imported papers."],["get_conference","Inspect one exact conference edition."],["list_organizations","Browse research organizations."],["get_organization","Inspect one exact research organization."],["list_frameworks","Browse frameworks by domain, category, or platform."],["get_framework","Inspect one exact research framework."],["list_benchmarks","Browse and filter benchmark leaderboards."],["get_benchmark","Read one benchmark, metrics, datasets, and leading results."]],P=["pwc://papers/{paper}","pwc://papers/{paper}/markdown","pwc://tasks/{task}","pwc://benchmarks/{benchmark}"],_=["Find recent papers on test-time compute and summarize the main approaches.","Compare the methods and reported benchmarks in these three arXiv papers.","What are the leading benchmarks for text-to-video generation?","Trace the predecessor and successor papers for Mamba."],d=[{key:"chatgpt",label:"ChatGPT",summary:"In workspace developer settings, add a custom MCP app and paste the server URL. Availability and admin approval vary by plan."},{key:"claude",label:"Claude",summary:"Open Settings → Connectors → Add custom connector, paste the URL, then enable Papers With Code from Search and tools."},{key:"claude-code",label:"Claude Code",summary:"Add the anonymous Streamable HTTP server from a terminal.",code:s=>`claude mcp add --transport http paperswithcode ${s}`},{key:"cursor",label:"Cursor",summary:"Add this entry to your project or user MCP configuration.",code:s=>JSON.stringify({mcpServers:{paperswithcode:{url:s}}},null,2)},{key:"vscode",label:"VS Code",summary:"Add this Streamable HTTP server to .vscode/mcp.json.",code:s=>JSON.stringify({servers:{paperswithcode:{type:"http",url:s}}},null,2)},{key:"generic",label:"Generic",summary:"Configure an anonymous, stateless Streamable HTTP server using the URL below. No API key or OAuth flow is required."}],l=({value:s,label:a})=>{const[c,o]=m.useState(!1),t=async()=>{var n;(n=navigator.clipboard)!=null&&n.writeText&&(await navigator.clipboard.writeText(s),o(!0),window.setTimeout(()=>o(!1),1500))};return e.jsxs("button",{className:"action-btn mcp-copy",type:"button",onClick:()=>void t(),"aria-label":a,children:[c?e.jsx(b,{size:16,"aria-hidden":!0}):e.jsx(g,{size:16,"aria-hidden":!0}),c?"Copied":"Copy"]})},L=()=>{var n;const s=u(),a=x(C()),[c,o]=m.useState("chatgpt"),t=d.find(r=>r.key===c)??d[0];return m.useEffect(()=>(document.title=j("MCP Server"),()=>{document.title=f}),[]),e.jsxs("article",{className:"page mcp-page",children:[e.jsxs("header",{className:"mcp-hero",children:[e.jsxs("div",{children:[e.jsx("p",{className:"sidebar-label mcp-kicker",children:"Model Context Protocol"}),e.jsx("h1",{className:"feed-title",children:"Use Papers With Code in your AI assistant"}),e.jsx("p",{className:"mcp-lede",children:"Search research, inspect methods and benchmarks, and read complete papers through one anonymous, read-only MCP connection."}),e.jsxs("div",{className:"mcp-status","aria-live":"polite",children:[e.jsx("span",{className:a.isSuccess?"is-up":"is-unknown","aria-hidden":!0}),a.isSuccess?"Operational":"Status unavailable",a.data?` · v${a.data.version}`:""]})]}),e.jsxs("div",{className:"mcp-endpoint-card",children:[e.jsx("span",{children:"Remote MCP URL"}),e.jsx("code",{children:s}),e.jsx(l,{value:s,label:"Copy MCP server URL"})]})]}),e.jsxs("section",{className:"mcp-section","aria-labelledby":"mcp-connect",children:[e.jsxs("div",{className:"mcp-section-heading",children:[e.jsx("p",{className:"sidebar-label",children:"Connect"}),e.jsx("h2",{id:"mcp-connect",children:"One URL, your preferred client"}),e.jsx("span",{children:"Setup matrix reviewed September 13, 2026; staging qualification pending."})]}),e.jsx("div",{className:"mcp-client-tabs",role:"tablist","aria-label":"MCP client setup",children:d.map(r=>e.jsx("button",{type:"button",role:"tab","aria-selected":c===r.key,onClick:()=>o(r.key),children:r.label},r.key))}),e.jsxs("div",{className:"mcp-setup",role:"tabpanel",children:[e.jsx("p",{children:t.summary}),t.code?e.jsxs("div",{className:"mcp-code-row",children:[e.jsx("pre",{children:e.jsx("code",{children:t.code(s)})}),e.jsx(l,{value:t.code(s),label:`Copy ${t.label} setup`})]}):e.jsxs("div",{className:"mcp-code-row",children:[e.jsx("pre",{children:e.jsx("code",{children:s})}),e.jsx(l,{value:s,label:`Copy ${t.label} endpoint`})]})]})]}),e.jsxs("section",{className:"mcp-section","aria-labelledby":"mcp-capabilities",children:[e.jsxs("div",{className:"mcp-section-heading",children:[e.jsx("p",{className:"sidebar-label",children:"Capabilities"}),e.jsx("h2",{id:"mcp-capabilities",children:"Research context, structured for assistants"})]}),e.jsx("div",{className:"mcp-capability-grid",children:[["Discover","Search recent and established work with catalogue filters."],["Read","Continue through long stored papers without presenting a partial document as complete."],["Connect","Explore related work, paper lineage, tasks, and methods."],["Compare","Inspect benchmarks, datasets, metrics, and reported evaluations."]].map(([r,p])=>e.jsxs("div",{children:[e.jsx("h3",{children:r}),e.jsx("p",{children:p})]},r))})]}),e.jsxs("section",{className:"mcp-section","aria-labelledby":"mcp-tools",children:[e.jsxs("div",{className:"mcp-section-heading",children:[e.jsx("p",{className:"sidebar-label",children:"Catalogue"}),e.jsx("h2",{id:"mcp-tools",children:"Twenty-one focused, read-only tools"})]}),e.jsx("div",{className:"mcp-tool-grid",children:N.map(([r,p])=>e.jsxs("div",{className:"mcp-tool",children:[e.jsx("code",{children:r}),e.jsx("p",{children:p})]},r))}),e.jsx("h3",{className:"mcp-subheading",children:"Resource templates"}),e.jsx("div",{className:"mcp-resource-list",children:P.map(r=>e.jsx("code",{children:r},r))})]}),e.jsxs("section",{className:"mcp-section","aria-labelledby":"mcp-prompts",children:[e.jsxs("div",{className:"mcp-section-heading",children:[e.jsx("p",{className:"sidebar-label",children:"Try asking"}),e.jsx("h2",{id:"mcp-prompts",children:"Prompts that start useful research"})]}),e.jsx("div",{className:"mcp-prompt-list",children:_.map(r=>e.jsxs("div",{children:[e.jsx("p",{children:r}),e.jsx(l,{value:r,label:"Copy example prompt"})]},r))})]}),e.jsxs("section",{className:"mcp-section mcp-notes","aria-labelledby":"mcp-limits",children:[e.jsxs("div",{children:[e.jsx("p",{className:"sidebar-label mcp-kicker",children:"Limits & privacy"}),e.jsx("h2",{id:"mcp-limits",children:"Public by design"}),e.jsx("p",{children:"No account, API key, or write access. Fair-use limits are 60 total requests per minute, 10 semantic searches per minute, four concurrent requests per client, and 25 list results per call."}),e.jsx("p",{children:"MCP telemetry retains tool name, status, latency, response size, protocol, and server version—not prompts, paper IDs, cursors, resource URIs, raw IPs, authorization values, or bodies. Catalogue infrastructure has its own operational logging policy."})]}),e.jsxs("div",{children:[e.jsx("p",{className:"sidebar-label mcp-kicker",children:"Protocol & troubleshooting"}),e.jsx("h2",{children:"Streamable HTTP"}),e.jsxs("p",{children:["Primary protocol: ",((n=a.data)==null?void 0:n.protocol)??"verified during connection setup",". If setup fails, confirm your client supports remote Streamable HTTP, that custom servers are enabled by your workspace administrator, and that you pasted the URL exactly."]}),e.jsxs("nav",{className:"mcp-links","aria-label":"MCP documentation links",children:[e.jsxs("a",{href:"https://github.com/huggingface/pwc-cli",target:"_blank",rel:"noreferrer",children:["CLI repository ",e.jsx(i,{size:13})]}),e.jsxs("a",{href:"https://modelcontextprotocol.io/docs/2026-07-28/learn/server-concepts",target:"_blank",rel:"noreferrer",children:["MCP specification ",e.jsx(i,{size:13})]}),e.jsxs("a",{href:"/docs",target:"_blank",rel:"noreferrer",children:["Public API ",e.jsx(i,{size:13})]}),e.jsxs("a",{href:"/mcp/schema",target:"_blank",rel:"noreferrer",children:["MCP tool schema ",e.jsx(i,{size:13})]}),e.jsxs("a",{href:"/llms.txt",target:"_blank",rel:"noreferrer",children:["llms.txt ",e.jsx(i,{size:13})]})]})]})]})]})};export{L as default};
 
1
+ import{B as m,j as e,C as b}from"./index-D6NpXxup.js";import{u as x}from"./useQuery-BSzsAAZV.js";import{f as j,D as f}from"./latexPlainText-DI8YEXVe.js";import{q as y}from"./queryOptions-C9woPjwX.js";import{E as i}from"./external-link-CCoWzQWa.js";import{C as g}from"./copy-ClJTXvCU.js";const h="https://paperswithcode.co/mcp",v="https://staging.paperswithcode.co/mcp";function u(s){const a=typeof window>"u"?void 0:window.location;return a?a.hostname==="staging.paperswithcode.co"?v:a.hostname==="paperswithcode.co"||a.hostname==="www.paperswithcode.co"?h:`${a.origin.replace(/\/$/,"")}/mcp`:h}function w(s){if(!s||typeof s!="object"||s.status!=="ok"||s.service!=="pwc-mcp"||typeof s.version!="string"||typeof s.protocol!="string")throw new Error("MCP health response is invalid");return s}async function k(s){const a=new AbortController,c=()=>a.abort();s==null||s.addEventListener("abort",c,{once:!0});const o=window.setTimeout(c,5e3);try{const t=await fetch(`${u()}/health`,{headers:{Accept:"application/json"},signal:a.signal,credentials:"omit"});if(!t.ok)throw new Error("MCP service is unavailable");return w(await t.json())}finally{window.clearTimeout(o),s==null||s.removeEventListener("abort",c)}}const C=()=>y({queryKey:["mcp","health"],queryFn:({signal:s})=>k(s),retry:!1,staleTime:3e4,refetchInterval:6e4,refetchOnWindowFocus:!1}),N=[["search_papers","Search by topic, title, author, or arXiv ID."],["list_papers","Filter and order papers by taxonomy, venue, date, or organization."],["get_paper_info","Read canonical metadata, authors, abstract, links, and resources."],["read_paper","Read stored paper Markdown with safe continuation for long papers."],["list_recent_papers","Browse the most recently indexed research."],["get_related_papers","Find related work already indexed in the catalogue."],["list_trending_papers","Discover papers with recent repository momentum."],["get_paper_evaluations","Inspect benchmark results reported by one paper."],["get_paper_lineage","Follow explicit predecessor and successor relationships."],["list_tasks","Search tasks and retrieve stable slugs for exact lookup."],["get_task","Inspect a research task and its benchmark coverage."],["list_methods","Search methods and retrieve stable slugs for exact lookup."],["get_method","Inspect a method, its source paper, and catalogue metadata."],["list_conferences","Browse conferences with imported papers."],["get_conference","Inspect one exact conference edition."],["list_organizations","Browse research organizations."],["get_organization","Inspect one exact research organization."],["list_frameworks","Browse frameworks by domain, category, or platform."],["get_framework","Inspect one exact research framework."],["list_benchmarks","Browse and filter benchmark leaderboards."],["get_benchmark","Read one benchmark, metrics, datasets, and leading results."]],P=["pwc://papers/{paper}","pwc://papers/{paper}/markdown","pwc://tasks/{task}","pwc://benchmarks/{benchmark}"],_=["Find recent papers on test-time compute and summarize the main approaches.","Compare the methods and reported benchmarks in these three arXiv papers.","What are the leading benchmarks for text-to-video generation?","Trace the predecessor and successor papers for Mamba."],d=[{key:"chatgpt",label:"ChatGPT",summary:"In workspace developer settings, add a custom MCP app and paste the server URL. Availability and admin approval vary by plan."},{key:"claude",label:"Claude",summary:"Open Settings → Connectors → Add custom connector, paste the URL, then enable Papers With Code from Search and tools."},{key:"claude-code",label:"Claude Code",summary:"Add the anonymous Streamable HTTP server from a terminal.",code:s=>`claude mcp add --transport http paperswithcode ${s}`},{key:"cursor",label:"Cursor",summary:"Add this entry to your project or user MCP configuration.",code:s=>JSON.stringify({mcpServers:{paperswithcode:{url:s}}},null,2)},{key:"vscode",label:"VS Code",summary:"Add this Streamable HTTP server to .vscode/mcp.json.",code:s=>JSON.stringify({servers:{paperswithcode:{type:"http",url:s}}},null,2)},{key:"generic",label:"Generic",summary:"Configure an anonymous, stateless Streamable HTTP server using the URL below. No API key or OAuth flow is required."}],l=({value:s,label:a})=>{const[c,o]=m.useState(!1),t=async()=>{var n;(n=navigator.clipboard)!=null&&n.writeText&&(await navigator.clipboard.writeText(s),o(!0),window.setTimeout(()=>o(!1),1500))};return e.jsxs("button",{className:"action-btn mcp-copy",type:"button",onClick:()=>void t(),"aria-label":a,children:[c?e.jsx(b,{size:16,"aria-hidden":!0}):e.jsx(g,{size:16,"aria-hidden":!0}),c?"Copied":"Copy"]})},L=()=>{var n;const s=u(),a=x(C()),[c,o]=m.useState("chatgpt"),t=d.find(r=>r.key===c)??d[0];return m.useEffect(()=>(document.title=j("MCP Server"),()=>{document.title=f}),[]),e.jsxs("article",{className:"page mcp-page",children:[e.jsxs("header",{className:"mcp-hero",children:[e.jsxs("div",{children:[e.jsx("p",{className:"sidebar-label mcp-kicker",children:"Model Context Protocol"}),e.jsx("h1",{className:"feed-title",children:"Use Papers With Code in your AI assistant"}),e.jsx("p",{className:"mcp-lede",children:"Search research, inspect methods and benchmarks, and read complete papers through one anonymous, read-only MCP connection."}),e.jsxs("div",{className:"mcp-status","aria-live":"polite",children:[e.jsx("span",{className:a.isSuccess?"is-up":"is-unknown","aria-hidden":!0}),a.isSuccess?"Operational":"Status unavailable",a.data?` · v${a.data.version}`:""]})]}),e.jsxs("div",{className:"mcp-endpoint-card",children:[e.jsx("span",{children:"Remote MCP URL"}),e.jsx("code",{children:s}),e.jsx(l,{value:s,label:"Copy MCP server URL"})]})]}),e.jsxs("section",{className:"mcp-section","aria-labelledby":"mcp-connect",children:[e.jsxs("div",{className:"mcp-section-heading",children:[e.jsx("p",{className:"sidebar-label",children:"Connect"}),e.jsx("h2",{id:"mcp-connect",children:"One URL, your preferred client"}),e.jsx("span",{children:"Setup matrix reviewed September 13, 2026; staging qualification pending."})]}),e.jsx("div",{className:"mcp-client-tabs",role:"tablist","aria-label":"MCP client setup",children:d.map(r=>e.jsx("button",{type:"button",role:"tab","aria-selected":c===r.key,onClick:()=>o(r.key),children:r.label},r.key))}),e.jsxs("div",{className:"mcp-setup",role:"tabpanel",children:[e.jsx("p",{children:t.summary}),t.code?e.jsxs("div",{className:"mcp-code-row",children:[e.jsx("pre",{children:e.jsx("code",{children:t.code(s)})}),e.jsx(l,{value:t.code(s),label:`Copy ${t.label} setup`})]}):e.jsxs("div",{className:"mcp-code-row",children:[e.jsx("pre",{children:e.jsx("code",{children:s})}),e.jsx(l,{value:s,label:`Copy ${t.label} endpoint`})]})]})]}),e.jsxs("section",{className:"mcp-section","aria-labelledby":"mcp-capabilities",children:[e.jsxs("div",{className:"mcp-section-heading",children:[e.jsx("p",{className:"sidebar-label",children:"Capabilities"}),e.jsx("h2",{id:"mcp-capabilities",children:"Research context, structured for assistants"})]}),e.jsx("div",{className:"mcp-capability-grid",children:[["Discover","Search recent and established work with catalogue filters."],["Read","Continue through long stored papers without presenting a partial document as complete."],["Connect","Explore related work, paper lineage, tasks, and methods."],["Compare","Inspect benchmarks, datasets, metrics, and reported evaluations."]].map(([r,p])=>e.jsxs("div",{children:[e.jsx("h3",{children:r}),e.jsx("p",{children:p})]},r))})]}),e.jsxs("section",{className:"mcp-section","aria-labelledby":"mcp-tools",children:[e.jsxs("div",{className:"mcp-section-heading",children:[e.jsx("p",{className:"sidebar-label",children:"Catalogue"}),e.jsx("h2",{id:"mcp-tools",children:"Twenty-one focused, read-only tools"})]}),e.jsx("div",{className:"mcp-tool-grid",children:N.map(([r,p])=>e.jsxs("div",{className:"mcp-tool",children:[e.jsx("code",{children:r}),e.jsx("p",{children:p})]},r))}),e.jsx("h3",{className:"mcp-subheading",children:"Resource templates"}),e.jsx("div",{className:"mcp-resource-list",children:P.map(r=>e.jsx("code",{children:r},r))})]}),e.jsxs("section",{className:"mcp-section","aria-labelledby":"mcp-prompts",children:[e.jsxs("div",{className:"mcp-section-heading",children:[e.jsx("p",{className:"sidebar-label",children:"Try asking"}),e.jsx("h2",{id:"mcp-prompts",children:"Prompts that start useful research"})]}),e.jsx("div",{className:"mcp-prompt-list",children:_.map(r=>e.jsxs("div",{children:[e.jsx("p",{children:r}),e.jsx(l,{value:r,label:"Copy example prompt"})]},r))})]}),e.jsxs("section",{className:"mcp-section mcp-notes","aria-labelledby":"mcp-limits",children:[e.jsxs("div",{children:[e.jsx("p",{className:"sidebar-label mcp-kicker",children:"Limits & privacy"}),e.jsx("h2",{id:"mcp-limits",children:"Public by design"}),e.jsx("p",{children:"No account, API key, or write access. Fair-use limits are 60 total requests per minute, 10 semantic searches per minute, four concurrent requests per client, and 25 list results per call."}),e.jsx("p",{children:"MCP telemetry retains tool name, status, latency, response size, protocol, and server version—not prompts, paper IDs, cursors, resource URIs, raw IPs, authorization values, or bodies. Catalogue infrastructure has its own operational logging policy."})]}),e.jsxs("div",{children:[e.jsx("p",{className:"sidebar-label mcp-kicker",children:"Protocol & troubleshooting"}),e.jsx("h2",{children:"Streamable HTTP"}),e.jsxs("p",{children:["Primary protocol: ",((n=a.data)==null?void 0:n.protocol)??"verified during connection setup",". If setup fails, confirm your client supports remote Streamable HTTP, that custom servers are enabled by your workspace administrator, and that you pasted the URL exactly."]}),e.jsxs("nav",{className:"mcp-links","aria-label":"MCP documentation links",children:[e.jsxs("a",{href:"https://github.com/huggingface/pwc-cli",target:"_blank",rel:"noreferrer",children:["CLI repository ",e.jsx(i,{size:13})]}),e.jsxs("a",{href:"https://modelcontextprotocol.io/docs/2026-07-28/learn/server-concepts",target:"_blank",rel:"noreferrer",children:["MCP specification ",e.jsx(i,{size:13})]}),e.jsxs("a",{href:"/docs",target:"_blank",rel:"noreferrer",children:["Public API ",e.jsx(i,{size:13})]}),e.jsxs("a",{href:"/mcp/schema",target:"_blank",rel:"noreferrer",children:["MCP tool schema ",e.jsx(i,{size:13})]}),e.jsxs("a",{href:"/llms.txt",target:"_blank",rel:"noreferrer",children:["llms.txt ",e.jsx(i,{size:13})]})]})]})]})]})};export{L as default};
assets/MethodDetailView-B36ncCT5.js DELETED
@@ -1 +0,0 @@
1
- import{j as e,r as A,u as Z,c as V,L,ac as X}from"./index-D1SFE8tx.js";import{p as Y}from"./paperQueryKeys-CcqbH5YG.js";import{u as F}from"./useQuery-8sGgldYe.js";import{u as J}from"./useInfiniteQuery-rPEO6e6c.js";import{M as ee,P as te}from"./components-BAR1mYoW.js";import{u as ae,P as se}from"./useIntersectionObserver-BPOzk2Hc.js";import{a as re,P as ne,b as ie}from"./PaperDateFilter-GmvHJTjc.js";import{r as le,M as O}from"./MarkdownText-B1RI0BDb.js";import{c as N}from"./catalog-BIqvVz-s.js";import{p as oe}from"./papers-Cv1LxXF4.js";import{s as ce}from"./slug-BpH-Nkvz.js";import{t as de}from"./transform-BmaYjIy4.js";import{S as M}from"./skeleton-D5wy8oMn.js";import{A as me,a as he}from"./alert-D8tgAf4z.js";import{s as pe}from"./safeExternalHref-CkBrsh84.js";import"./LatexTitle-C3kQa1rr.js";import"./katex.min-BSBacQyE.js";import"./popover-BbVqI79y.js";import"./PaperPreviewLink-D5_ka8a2.js";import"./index-CZU6xdjr.js";import"./index-DJRFtxnI.js";import"./hover-card-BtW3iC4Z.js";import"./useMutation-BOPUR0a5.js";const a={pink:"#F8D7D9",pinkS:"#D9B0B3",yellow:"#FBEFC2",yellowS:"#C9B97D",orange:"#F8D7B3",orangeS:"#C99466",blue:"#CDE2EE",blueS:"#7FA4BA",purple:"#D4D2EA",purpleS:"#8E8AC0",green:"#CCE2C5",greenS:"#7DA475",ink:"#1A1814",faint:"#8E8678"},j=({x:t,y:n,w:d,h:m,fill:f,stroke:x,label:p,fontSize:l=10})=>e.jsxs("g",{children:[e.jsx("rect",{x:t,y:n,width:d,height:m,rx:"3",ry:"3",fill:f,stroke:x,strokeWidth:"1"}),e.jsx("text",{x:t+d/2,y:n+m/2,fontSize:l,fontFamily:"var(--sans)",fill:a.ink,textAnchor:"middle",dominantBaseline:"middle",children:p})]}),ue=()=>e.jsxs("svg",{viewBox:"0 0 360 420",width:"100%",height:"100%",style:{display:"block"},children:[e.jsx("text",{x:"180",y:"20",fontSize:"11",fontFamily:"var(--serif)",fontStyle:"italic",fill:a.faint,textAnchor:"middle",children:"Scaled Dot-Product Attention"}),e.jsx(j,{x:140,y:40,w:80,h:26,fill:a.yellow,stroke:a.yellowS,label:"MatMul",fontSize:11}),e.jsx("path",{d:"M180 66 L180 80",stroke:a.ink}),e.jsx(j,{x:140,y:80,w:80,h:26,fill:a.green,stroke:a.greenS,label:"SoftMax",fontSize:11}),e.jsx("path",{d:"M180 106 L180 120",stroke:a.ink}),e.jsx(j,{x:140,y:120,w:80,h:26,fill:a.purple,stroke:a.purpleS,label:"Mask (opt.)",fontSize:11}),e.jsx("path",{d:"M180 146 L180 160",stroke:a.ink}),e.jsx(j,{x:140,y:160,w:80,h:26,fill:a.blue,stroke:a.blueS,label:"Scale ÷√dₖ",fontSize:11}),e.jsx("path",{d:"M180 186 L180 200",stroke:a.ink}),e.jsx(j,{x:140,y:200,w:80,h:26,fill:a.yellow,stroke:a.yellowS,label:"MatMul",fontSize:11}),e.jsx("path",{d:"M156 226 L120 270",stroke:a.ink}),e.jsx("path",{d:"M180 226 L180 270",stroke:a.ink}),e.jsx("path",{d:"M204 226 L240 270",stroke:a.ink}),e.jsx(j,{x:100,y:270,w:40,h:24,fill:a.pink,stroke:a.pinkS,label:"Q",fontSize:13}),e.jsx(j,{x:160,y:270,w:40,h:24,fill:a.pink,stroke:a.pinkS,label:"K",fontSize:13}),e.jsx(j,{x:220,y:270,w:40,h:24,fill:a.pink,stroke:a.pinkS,label:"V",fontSize:13}),e.jsxs("text",{x:"180",y:"330",fontSize:"14",fontFamily:"var(--serif)",fontStyle:"italic",fill:a.ink,textAnchor:"middle",children:["softmax(QK",e.jsx("tspan",{fontSize:"9",baselineShift:"super",children:"⊤"})," / √d) V"]})]}),xe=[["my-skill/",""],["├── SKILL.md","# Required: metadata + instructions"],["├── scripts/","# Optional: executable code"],["├── references/","# Optional: documentation"],["├── assets/","# Optional: templates, resources"],["└── ...","# Any additional files or directories"]],ge=()=>e.jsxs("svg",{viewBox:"0 0 360 420",width:"100%",height:"100%",style:{display:"block"},children:[e.jsx("text",{x:"180",y:"20",fontSize:"11",fontFamily:"var(--serif)",fontStyle:"italic",fill:a.faint,textAnchor:"middle",children:"Skill package layout"}),e.jsx("rect",{x:"28",y:"48",width:"304",height:"318",rx:"8",fill:"#FFFDF8",stroke:a.faint,strokeWidth:"1"}),xe.map(([t,n],d)=>{const m=92+d*44;return e.jsxs("g",{children:[e.jsx("text",{x:"44",y:m,fontSize:"11",fontFamily:"var(--mono)",fill:a.ink,dominantBaseline:"middle",children:t}),n?e.jsx("text",{x:"138",y:m,fontSize:"8.5",fontFamily:"var(--mono)",fill:a.faint,dominantBaseline:"middle",children:n}):null]},t)})]}),fe={attention:ue,"agent-skills":ge},je=({method:t})=>e.jsxs("svg",{viewBox:"0 0 360 420",width:"100%",height:"100%",children:[e.jsx("text",{x:"180",y:"20",fontSize:"11",fontFamily:"var(--serif)",fontStyle:"italic",fill:a.faint,textAnchor:"middle",children:t.name||"method"}),e.jsx(j,{x:80,y:70,w:200,h:50,fill:a.blue,stroke:a.blueS,label:"Input",fontSize:12}),e.jsx("path",{d:"M180 120 L180 150",stroke:a.ink}),e.jsx(j,{x:80,y:150,w:200,h:70,fill:a.orange,stroke:a.orangeS,label:t.name||"transform",fontSize:13}),e.jsx("path",{d:"M180 220 L180 250",stroke:a.ink}),e.jsx(j,{x:80,y:250,w:200,h:50,fill:a.purple,stroke:a.purpleS,label:"Output",fontSize:12})]}),_e=({method:t})=>{const n=(t.slug||"").toLowerCase(),d=fe[n];if(d)return e.jsx("div",{className:"method-figure-svg method-figure-svg--schematic",children:e.jsx(d,{})});if(t.image_url){const m=n==="transformer"||n==="gpt-4"||n==="gpt-4o"||n==="multi-head-attention"?" method-figure-svg--compact":n==="rpn"?" method-figure-svg--scaled-80":"";return e.jsx("div",{className:`method-figure-svg method-figure-svg--image${m}`,children:e.jsx("img",{className:"method-figure-img",src:t.image_url,alt:`${t.name} figure`})})}return e.jsx("div",{className:"method-figure-svg method-figure-svg--schematic",children:e.jsx(je,{method:t})})},C=720,T=138,u={top:8,right:10,bottom:25,left:36},Q=56,ye=new Intl.DateTimeFormat("en",{month:"short",year:"2-digit",timeZone:"UTC"}),ve=new Intl.DateTimeFormat("en",{year:"numeric",timeZone:"UTC"}),z=t=>ye.format(new Date(`${t}T00:00:00Z`)),Se=(t,n)=>{if(t===0)return new Set;const d=t>48?12:t>36?6:t>18?3:2,m=Math.max(1,Math.ceil(Q/n)),f=Math.max(d,m),x=t-1,p=new Set([0,x]);for(let l=f;l<x;l+=f)(x-l)*n>=Q&&p.add(l);return p},U=t=>{if(t.coverage_status===void 0||["complete","not_applicable"].includes(t.coverage_status))return null;const n=t.processed_paper_count!==void 0&&t.eligible_paper_count!==void 0?`; ${t.processed_paper_count.toLocaleString()} of ${t.eligible_paper_count.toLocaleString()} eligible papers processed`:"";return`Historical tagging ${t.coverage_status==="failed"?"needs retry":"in progress"}${n}`},Ne=({history:t,methodName:n})=>{const[d,m]=A.useState(null),f=Math.max(1,...t.map(o=>o.paper_count)),x=C-u.left-u.right,p=T-u.top-u.bottom,l=t.length?x/t.length:x,k=Math.max(2,l*.68),D=Se(t.length,l),h=Array.from(new Set([0,Math.ceil(f/2),f])),_=d==null?null:t[d],g=_?U(_):null;return e.jsxs("div",{className:"method-usage-chart-wrap",children:[e.jsxs("svg",{className:"method-usage-chart",viewBox:`0 0 ${C} ${T}`,role:"group","aria-label":`${n}: papers mentioning this method by publication month`,children:[e.jsxs("title",{children:[n,": papers mentioning this method by publication month"]}),h.map(o=>{const i=u.top+p-o/f*p;return e.jsxs("g",{children:[e.jsx("line",{className:"method-usage-gridline",x1:u.left,x2:C-u.right,y1:i,y2:i}),e.jsx("text",{className:"method-usage-y-label",x:u.left-8,y:i+3,textAnchor:"end",children:o})]},o)}),t.map((o,i)=>{const b=o.paper_count/f*p,y=o.paper_count>0?Math.max(1,b):0,P=u.left+l*i+(l-k)/2,w=u.top+p-y,s=d===i,S=i===t.length-1,v=U(o);return e.jsxs("g",{className:`method-usage-bar${s?" is-active":""}${S?" is-current":""}`,tabIndex:0,role:"img","aria-label":`${z(o.start_date)}: ${o.paper_count} ${o.paper_count===1?"paper":"papers"}${v?`. ${v}`:""}`,onMouseEnter:()=>m(i),onMouseLeave:()=>m(null),onFocus:()=>m(i),onBlur:()=>m(null),children:[e.jsx("rect",{className:"method-usage-bar-hit",x:u.left+l*i,y:u.top,width:l,height:p}),e.jsx("rect",{className:"method-usage-bar-mark",x:P,y:w,width:k,height:y,rx:"1.5"})]},o.start_date)}),t.map((o,i)=>D.has(i)?e.jsx("text",{className:"method-usage-x-label",x:u.left+l*(i+.5),y:T-11,textAnchor:"middle",children:t.length>48?ve.format(new Date(`${o.start_date}T00:00:00Z`)):z(o.start_date)},o.start_date):null)]}),_&&e.jsxs("div",{className:"method-usage-tooltip",role:"status",children:[e.jsx("strong",{children:z(_.start_date)}),e.jsxs("span",{children:[_.paper_count," ",_.paper_count===1?"paper":"papers",d===t.length-1?" · month to date":""]}),e.jsxs("span",{children:[(_.catalog_share??0).toFixed(2),"% of"," ",(_.catalog_paper_count??0).toLocaleString()," catalog papers"]}),g&&e.jsx("span",{children:g})]})]})},ke=[["trending","trending"],["new","newest"],["cited","most cited"]],G={"on-policy-distillation":["fine-tuning","post-training","rlvr","rlhf","direct-preference-optimization-dpo"],mcp:["agent-skills"],"agent-skills":["mcp"]},We=()=>{var I,B,$,H,R,q;const{methodSlug:t}=Z(),[n,d]=V(),[m,f]=A.useState("trending"),x=n.get("has_code")==="true",p=n.get("has_hf_artifacts")==="true",l=re(n),k=r=>{const c=new URLSearchParams(n);r?c.set("has_code","true"):c.delete("has_code"),d(c)},D=r=>{const c=new URLSearchParams(n);r?c.set("has_hf_artifacts","true"):c.delete("has_hf_artifacts"),d(c)},h=F({queryKey:["method",t],queryFn:()=>N.getMethod(t),enabled:!!t,staleTime:10*60*1e3}),_=F({queryKey:["areas-all"],queryFn:()=>N.listAreas({page_size:50,ordering:"name"}),enabled:!!((I=h.data)!=null&&I.area_id),staleTime:10*60*1e3}),g=F({queryKey:["method-trend",t],queryFn:()=>N.methodTrend(t),enabled:!!t&&!!h.data,staleTime:10*60*1e3}),o=m==="trending"?"trending":m==="cited"?"citation_count":"date_published",i=J({queryKey:[...Y.feeds.method,t,o,x,p,l.startDate,l.endDate],queryFn:({pageParam:r=1})=>oe.forMethod(t,{page:r,page_size:20,order_by:o,order_dir:"desc",include_resources:!0,has_code:x,has_hf_artifacts:p,start_date:l.startDate,end_date:l.endDate}),getNextPageParam:r=>r.next_page,initialPageParam:1,enabled:!!t,staleTime:5*60*1e3,placeholderData:X}),b=F({queryKey:["related-methods",(B=h.data)==null?void 0:B.slug,($=h.data)==null?void 0:$.area_id,(H=h.data)==null?void 0:H.id],queryFn:async()=>{const r=h.data;if(!r)return[];const c=r.slug?G[r.slug]:void 0;return c?Promise.all(c.map(W=>N.getMethod(W))):r.area_id?(await N.listMethods({area_id:r.area_id,exclude_id:r.id,ordering:"-paper_count",page_size:8})).results:[]},enabled:!!(h.data&&(h.data.slug&&G[h.data.slug]||h.data.area_id)),staleTime:10*60*1e3}),y=A.useMemo(()=>{var c;return(((c=i.data)==null?void 0:c.pages.flatMap(K=>K.results))||[]).map(de)},[i.data]),{targetRef:P,isIntersecting:w}=ae({rootMargin:"200px"});if(A.useEffect(()=>{w&&i.hasNextPage&&!i.isFetchingNextPage&&i.fetchNextPage()},[w,i.hasNextPage,i.isFetchingNextPage]),h.isLoading)return e.jsxs("div",{className:"page",children:[e.jsx(M,{className:"h-12 w-1/2 mb-4"}),e.jsx(M,{className:"h-64 w-full"})]});if(h.error||!h.data)return e.jsx("div",{className:"page",children:e.jsx(me,{variant:"destructive",children:e.jsx(he,{children:"Method not found."})})});const s=h.data,S=(R=_.data)==null?void 0:R.results.find(r=>r.id===s.area_id),v=le(s.source_url),E=v?null:pe(s.source_url);return e.jsxs("div",{className:"page",children:[e.jsxs("div",{className:"breadcrumb",children:[e.jsx(L,{to:"/methods",children:"Methods"}),S&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"sep",children:"/"}),e.jsx(L,{to:`/methods#area-${ce(S.name)}`,children:S.name})]}),e.jsx("span",{className:"sep",children:"/"}),e.jsx("span",{style:{color:"var(--ink)"},children:s.name})]}),e.jsxs("div",{className:`tag-hero method-hero-grid${s.slug==="grokking"||s.slug==="latent-reasoning"||s.slug==="world-action-models"?" method-hero-grid--wide-figure":""}`,children:[e.jsxs("div",{children:[e.jsx("div",{className:"tag-hero-eyebrow",children:"METHOD"}),e.jsx("h1",{className:"tag-hero-title method-hero-title",children:s.name}),s.full_name&&s.full_name!==s.name&&e.jsx("div",{style:{fontFamily:"var(--serif)",fontSize:16,fontStyle:"italic",color:"var(--ink-soft)",marginTop:8},children:s.full_name}),s.description&&e.jsx(O,{className:"method-description",text:s.description}),s.source_url&&s.source_title&&e.jsxs("div",{className:"method-source",children:[e.jsx("span",{className:"method-source-label",children:"Source"}),v?e.jsxs(L,{className:"method-source-link",to:v,target:"_blank",rel:"noopener noreferrer",children:[e.jsx("span",{className:"method-source-title",children:s.source_title}),s.introduced_year&&e.jsx("span",{className:"method-source-meta",children:s.introduced_year})]}):E?e.jsxs("a",{className:"method-source-link",href:E,target:"_blank",rel:"noopener noreferrer",children:[e.jsx("span",{className:"method-source-title",children:s.source_title}),s.introduced_year&&e.jsx("span",{className:"method-source-meta",children:s.introduced_year})]}):e.jsxs("div",{className:"method-source-link is-static",children:[e.jsx("span",{className:"method-source-title",children:s.source_title}),s.introduced_year&&e.jsx("span",{className:"method-source-meta",children:s.introduced_year})]})]}),e.jsxs("div",{className:"tag-hero-meta",children:[e.jsxs("div",{className:"stat",children:[e.jsx("span",{className:"label",children:"Papers mentioning"}),e.jsx("span",{className:"value",children:(s.paper_count??0).toLocaleString()})]}),g.data&&e.jsxs("div",{className:"stat",children:[e.jsx("span",{className:"label",children:"Recent mentions"}),e.jsxs("span",{className:"value",children:[(g.data.recent_paper_count*30/g.data.recent_days).toFixed(1),e.jsx("small",{children:"/mo"})]}),!g.data.comparison_complete&&e.jsx("span",{title:"Tagging is still catching up. This rate reflects mentions found so far.",children:"Partial coverage"})]}),s.introduced_year!=null&&e.jsxs("div",{className:"stat",children:[e.jsx("span",{className:"label",children:"Introduced"}),e.jsx("span",{className:"value",children:s.introduced_year})]})]}),g.isLoading?e.jsx(M,{className:"h-36 w-full method-trend-skeleton"}):g.data?e.jsxs("section",{className:"method-trend-panel method-trend-panel--compact",children:[e.jsxs("div",{className:"method-trend-header",children:[e.jsx("div",{children:e.jsx("div",{className:"method-trend-eyebrow",children:"Usage trend"})}),e.jsxs("div",{className:"method-trend-summary",children:[e.jsx("strong",{children:g.data.recent_paper_count}),e.jsxs("span",{children:["papers / ",g.data.recent_days,"d"]})]})]}),e.jsx(Ne,{history:g.data.history,methodName:s.name})]}):null]}),e.jsxs("figure",{className:"method-figure-card",children:[e.jsx(_e,{method:s}),s.image_credit&&e.jsx("figcaption",{children:e.jsx(O,{className:"method-image-credit",text:s.image_credit})})]})]}),(((q=b.data)==null?void 0:q.length)??0)>0&&e.jsxs("div",{className:"filter-row",children:[e.jsx("span",{className:"label",children:"Related methods"}),b.data.map(r=>e.jsx(ee,{method:{slug:r.slug,name:r.name}},r.id))]}),e.jsxs("div",{className:"sort-bar",children:[e.jsxs("div",{className:"paper-feed-toolbar-controls",children:[e.jsx("div",{className:"sort-options",children:ke.map(([r,c])=>e.jsx("button",{className:`sort-btn ${m===r?"active":""}`,onClick:()=>f(r),children:c},r))}),e.jsx(se,{hasCode:x,hasHfArtifacts:p,onHasCodeChange:k,onHasHfArtifactsChange:D})]}),e.jsx(ne,{startDate:l.startDate,endDate:l.endDate,onChange:r=>d(ie(n,r))}),e.jsxs("div",{className:"results-count",children:[y.length," papers mentioning ",s.name]})]}),i.isLoading?e.jsx("div",{className:"paper-list",children:Array.from({length:4}).map((r,c)=>e.jsx(M,{className:"h-40 w-full"},c))}):y.length===0?e.jsx("div",{className:"no-results",children:"No papers tagged with this method yet."}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"paper-list",children:y.map((r,c)=>e.jsx(te,{paper:r,rank:c+1},r.id))}),e.jsx("div",{ref:P,style:{height:1}}),i.isFetchingNextPage&&e.jsx("div",{style:{padding:"20px 0",textAlign:"center",color:"var(--ink-faint)"},children:"Loading more…"})]})]})};export{We as default};
 
 
assets/MethodDetailView-B9lNVgdr.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import{j as e,r as A,u as Z,c as V,L,ac as X}from"./index-D6NpXxup.js";import{p as Y}from"./paperQueryKeys-CcqbH5YG.js";import{u as F}from"./useQuery-BSzsAAZV.js";import{u as J}from"./useInfiniteQuery-BA3fe-wV.js";import{M as ee,P as te}from"./components-C-Wk0LlL.js";import{u as ae,P as se}from"./useIntersectionObserver-C8GlpU4F.js";import{a as re,P as ne,b as ie}from"./PaperDateFilter-CwWio6o1.js";import{r as le,M as O}from"./MarkdownText-OPahlM9D.js";import{c as N}from"./catalog-BkXnDjBr.js";import{p as oe}from"./papers-CJuRKhYV.js";import{s as ce}from"./slug-BpH-Nkvz.js";import{t as de}from"./transform-dsZcnzEu.js";import{S as M}from"./skeleton-BZlAxqUu.js";import{A as me,a as he}from"./alert-CEE7Xf4h.js";import{s as pe}from"./safeExternalHref-CkBrsh84.js";import"./LatexTitle-Cd92uzqM.js";import"./popover-VFNGJa2a.js";/* empty css */import"./PaperPreviewLink-BaxpCHGH.js";import"./index-BiPn19VT.js";import"./index-PW6rRKKS.js";import"./katex-DkKDou_j.js";import"./hover-card-C5GFpPJ1.js";import"./useMutation-DI9QqXsO.js";const a={pink:"#F8D7D9",pinkS:"#D9B0B3",yellow:"#FBEFC2",yellowS:"#C9B97D",orange:"#F8D7B3",orangeS:"#C99466",blue:"#CDE2EE",blueS:"#7FA4BA",purple:"#D4D2EA",purpleS:"#8E8AC0",green:"#CCE2C5",greenS:"#7DA475",ink:"#1A1814",faint:"#8E8678"},j=({x:t,y:n,w:d,h:m,fill:f,stroke:x,label:p,fontSize:l=10})=>e.jsxs("g",{children:[e.jsx("rect",{x:t,y:n,width:d,height:m,rx:"3",ry:"3",fill:f,stroke:x,strokeWidth:"1"}),e.jsx("text",{x:t+d/2,y:n+m/2,fontSize:l,fontFamily:"var(--sans)",fill:a.ink,textAnchor:"middle",dominantBaseline:"middle",children:p})]}),ue=()=>e.jsxs("svg",{viewBox:"0 0 360 420",width:"100%",height:"100%",style:{display:"block"},children:[e.jsx("text",{x:"180",y:"20",fontSize:"11",fontFamily:"var(--serif)",fontStyle:"italic",fill:a.faint,textAnchor:"middle",children:"Scaled Dot-Product Attention"}),e.jsx(j,{x:140,y:40,w:80,h:26,fill:a.yellow,stroke:a.yellowS,label:"MatMul",fontSize:11}),e.jsx("path",{d:"M180 66 L180 80",stroke:a.ink}),e.jsx(j,{x:140,y:80,w:80,h:26,fill:a.green,stroke:a.greenS,label:"SoftMax",fontSize:11}),e.jsx("path",{d:"M180 106 L180 120",stroke:a.ink}),e.jsx(j,{x:140,y:120,w:80,h:26,fill:a.purple,stroke:a.purpleS,label:"Mask (opt.)",fontSize:11}),e.jsx("path",{d:"M180 146 L180 160",stroke:a.ink}),e.jsx(j,{x:140,y:160,w:80,h:26,fill:a.blue,stroke:a.blueS,label:"Scale ÷√dₖ",fontSize:11}),e.jsx("path",{d:"M180 186 L180 200",stroke:a.ink}),e.jsx(j,{x:140,y:200,w:80,h:26,fill:a.yellow,stroke:a.yellowS,label:"MatMul",fontSize:11}),e.jsx("path",{d:"M156 226 L120 270",stroke:a.ink}),e.jsx("path",{d:"M180 226 L180 270",stroke:a.ink}),e.jsx("path",{d:"M204 226 L240 270",stroke:a.ink}),e.jsx(j,{x:100,y:270,w:40,h:24,fill:a.pink,stroke:a.pinkS,label:"Q",fontSize:13}),e.jsx(j,{x:160,y:270,w:40,h:24,fill:a.pink,stroke:a.pinkS,label:"K",fontSize:13}),e.jsx(j,{x:220,y:270,w:40,h:24,fill:a.pink,stroke:a.pinkS,label:"V",fontSize:13}),e.jsxs("text",{x:"180",y:"330",fontSize:"14",fontFamily:"var(--serif)",fontStyle:"italic",fill:a.ink,textAnchor:"middle",children:["softmax(QK",e.jsx("tspan",{fontSize:"9",baselineShift:"super",children:"⊤"})," / √d) V"]})]}),xe=[["my-skill/",""],["├── SKILL.md","# Required: metadata + instructions"],["├── scripts/","# Optional: executable code"],["├── references/","# Optional: documentation"],["├── assets/","# Optional: templates, resources"],["└── ...","# Any additional files or directories"]],ge=()=>e.jsxs("svg",{viewBox:"0 0 360 420",width:"100%",height:"100%",style:{display:"block"},children:[e.jsx("text",{x:"180",y:"20",fontSize:"11",fontFamily:"var(--serif)",fontStyle:"italic",fill:a.faint,textAnchor:"middle",children:"Skill package layout"}),e.jsx("rect",{x:"28",y:"48",width:"304",height:"318",rx:"8",fill:"#FFFDF8",stroke:a.faint,strokeWidth:"1"}),xe.map(([t,n],d)=>{const m=92+d*44;return e.jsxs("g",{children:[e.jsx("text",{x:"44",y:m,fontSize:"11",fontFamily:"var(--mono)",fill:a.ink,dominantBaseline:"middle",children:t}),n?e.jsx("text",{x:"138",y:m,fontSize:"8.5",fontFamily:"var(--mono)",fill:a.faint,dominantBaseline:"middle",children:n}):null]},t)})]}),fe={attention:ue,"agent-skills":ge},je=({method:t})=>e.jsxs("svg",{viewBox:"0 0 360 420",width:"100%",height:"100%",children:[e.jsx("text",{x:"180",y:"20",fontSize:"11",fontFamily:"var(--serif)",fontStyle:"italic",fill:a.faint,textAnchor:"middle",children:t.name||"method"}),e.jsx(j,{x:80,y:70,w:200,h:50,fill:a.blue,stroke:a.blueS,label:"Input",fontSize:12}),e.jsx("path",{d:"M180 120 L180 150",stroke:a.ink}),e.jsx(j,{x:80,y:150,w:200,h:70,fill:a.orange,stroke:a.orangeS,label:t.name||"transform",fontSize:13}),e.jsx("path",{d:"M180 220 L180 250",stroke:a.ink}),e.jsx(j,{x:80,y:250,w:200,h:50,fill:a.purple,stroke:a.purpleS,label:"Output",fontSize:12})]}),_e=({method:t})=>{const n=(t.slug||"").toLowerCase(),d=fe[n];if(d)return e.jsx("div",{className:"method-figure-svg method-figure-svg--schematic",children:e.jsx(d,{})});if(t.image_url){const m=n==="transformer"||n==="gpt-4"||n==="gpt-4o"||n==="multi-head-attention"?" method-figure-svg--compact":n==="rpn"?" method-figure-svg--scaled-80":"";return e.jsx("div",{className:`method-figure-svg method-figure-svg--image${m}`,children:e.jsx("img",{className:"method-figure-img",src:t.image_url,alt:`${t.name} figure`})})}return e.jsx("div",{className:"method-figure-svg method-figure-svg--schematic",children:e.jsx(je,{method:t})})},C=720,T=138,u={top:8,right:10,bottom:25,left:36},Q=56,ye=new Intl.DateTimeFormat("en",{month:"short",year:"2-digit",timeZone:"UTC"}),ve=new Intl.DateTimeFormat("en",{year:"numeric",timeZone:"UTC"}),z=t=>ye.format(new Date(`${t}T00:00:00Z`)),Se=(t,n)=>{if(t===0)return new Set;const d=t>48?12:t>36?6:t>18?3:2,m=Math.max(1,Math.ceil(Q/n)),f=Math.max(d,m),x=t-1,p=new Set([0,x]);for(let l=f;l<x;l+=f)(x-l)*n>=Q&&p.add(l);return p},U=t=>{if(t.coverage_status===void 0||["complete","not_applicable"].includes(t.coverage_status))return null;const n=t.processed_paper_count!==void 0&&t.eligible_paper_count!==void 0?`; ${t.processed_paper_count.toLocaleString()} of ${t.eligible_paper_count.toLocaleString()} eligible papers processed`:"";return`Historical tagging ${t.coverage_status==="failed"?"needs retry":"in progress"}${n}`},Ne=({history:t,methodName:n})=>{const[d,m]=A.useState(null),f=Math.max(1,...t.map(o=>o.paper_count)),x=C-u.left-u.right,p=T-u.top-u.bottom,l=t.length?x/t.length:x,k=Math.max(2,l*.68),D=Se(t.length,l),h=Array.from(new Set([0,Math.ceil(f/2),f])),_=d==null?null:t[d],g=_?U(_):null;return e.jsxs("div",{className:"method-usage-chart-wrap",children:[e.jsxs("svg",{className:"method-usage-chart",viewBox:`0 0 ${C} ${T}`,role:"group","aria-label":`${n}: papers mentioning this method by publication month`,children:[e.jsxs("title",{children:[n,": papers mentioning this method by publication month"]}),h.map(o=>{const i=u.top+p-o/f*p;return e.jsxs("g",{children:[e.jsx("line",{className:"method-usage-gridline",x1:u.left,x2:C-u.right,y1:i,y2:i}),e.jsx("text",{className:"method-usage-y-label",x:u.left-8,y:i+3,textAnchor:"end",children:o})]},o)}),t.map((o,i)=>{const b=o.paper_count/f*p,y=o.paper_count>0?Math.max(1,b):0,P=u.left+l*i+(l-k)/2,w=u.top+p-y,s=d===i,S=i===t.length-1,v=U(o);return e.jsxs("g",{className:`method-usage-bar${s?" is-active":""}${S?" is-current":""}`,tabIndex:0,role:"img","aria-label":`${z(o.start_date)}: ${o.paper_count} ${o.paper_count===1?"paper":"papers"}${v?`. ${v}`:""}`,onMouseEnter:()=>m(i),onMouseLeave:()=>m(null),onFocus:()=>m(i),onBlur:()=>m(null),children:[e.jsx("rect",{className:"method-usage-bar-hit",x:u.left+l*i,y:u.top,width:l,height:p}),e.jsx("rect",{className:"method-usage-bar-mark",x:P,y:w,width:k,height:y,rx:"1.5"})]},o.start_date)}),t.map((o,i)=>D.has(i)?e.jsx("text",{className:"method-usage-x-label",x:u.left+l*(i+.5),y:T-11,textAnchor:"middle",children:t.length>48?ve.format(new Date(`${o.start_date}T00:00:00Z`)):z(o.start_date)},o.start_date):null)]}),_&&e.jsxs("div",{className:"method-usage-tooltip",role:"status",children:[e.jsx("strong",{children:z(_.start_date)}),e.jsxs("span",{children:[_.paper_count," ",_.paper_count===1?"paper":"papers",d===t.length-1?" · month to date":""]}),e.jsxs("span",{children:[(_.catalog_share??0).toFixed(2),"% of"," ",(_.catalog_paper_count??0).toLocaleString()," catalog papers"]}),g&&e.jsx("span",{children:g})]})]})},ke=[["trending","trending"],["new","newest"],["cited","most cited"]],G={"on-policy-distillation":["fine-tuning","post-training","rlvr","rlhf","direct-preference-optimization-dpo"],mcp:["agent-skills"],"agent-skills":["mcp"]},Ze=()=>{var I,B,$,H,R,q;const{methodSlug:t}=Z(),[n,d]=V(),[m,f]=A.useState("trending"),x=n.get("has_code")==="true",p=n.get("has_hf_artifacts")==="true",l=re(n),k=r=>{const c=new URLSearchParams(n);r?c.set("has_code","true"):c.delete("has_code"),d(c)},D=r=>{const c=new URLSearchParams(n);r?c.set("has_hf_artifacts","true"):c.delete("has_hf_artifacts"),d(c)},h=F({queryKey:["method",t],queryFn:()=>N.getMethod(t),enabled:!!t,staleTime:10*60*1e3}),_=F({queryKey:["areas-all"],queryFn:()=>N.listAreas({page_size:50,ordering:"name"}),enabled:!!((I=h.data)!=null&&I.area_id),staleTime:10*60*1e3}),g=F({queryKey:["method-trend",t],queryFn:()=>N.methodTrend(t),enabled:!!t&&!!h.data,staleTime:10*60*1e3}),o=m==="trending"?"trending":m==="cited"?"citation_count":"date_published",i=J({queryKey:[...Y.feeds.method,t,o,x,p,l.startDate,l.endDate],queryFn:({pageParam:r=1})=>oe.forMethod(t,{page:r,page_size:20,order_by:o,order_dir:"desc",include_resources:!0,has_code:x,has_hf_artifacts:p,start_date:l.startDate,end_date:l.endDate}),getNextPageParam:r=>r.next_page,initialPageParam:1,enabled:!!t,staleTime:5*60*1e3,placeholderData:X}),b=F({queryKey:["related-methods",(B=h.data)==null?void 0:B.slug,($=h.data)==null?void 0:$.area_id,(H=h.data)==null?void 0:H.id],queryFn:async()=>{const r=h.data;if(!r)return[];const c=r.slug?G[r.slug]:void 0;return c?Promise.all(c.map(W=>N.getMethod(W))):r.area_id?(await N.listMethods({area_id:r.area_id,exclude_id:r.id,ordering:"-paper_count",page_size:8})).results:[]},enabled:!!(h.data&&(h.data.slug&&G[h.data.slug]||h.data.area_id)),staleTime:10*60*1e3}),y=A.useMemo(()=>{var c;return(((c=i.data)==null?void 0:c.pages.flatMap(K=>K.results))||[]).map(de)},[i.data]),{targetRef:P,isIntersecting:w}=ae({rootMargin:"200px"});if(A.useEffect(()=>{w&&i.hasNextPage&&!i.isFetchingNextPage&&i.fetchNextPage()},[w,i.hasNextPage,i.isFetchingNextPage]),h.isLoading)return e.jsxs("div",{className:"page",children:[e.jsx(M,{className:"h-12 w-1/2 mb-4"}),e.jsx(M,{className:"h-64 w-full"})]});if(h.error||!h.data)return e.jsx("div",{className:"page",children:e.jsx(me,{variant:"destructive",children:e.jsx(he,{children:"Method not found."})})});const s=h.data,S=(R=_.data)==null?void 0:R.results.find(r=>r.id===s.area_id),v=le(s.source_url),E=v?null:pe(s.source_url);return e.jsxs("div",{className:"page",children:[e.jsxs("div",{className:"breadcrumb",children:[e.jsx(L,{to:"/methods",children:"Methods"}),S&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"sep",children:"/"}),e.jsx(L,{to:`/methods#area-${ce(S.name)}`,children:S.name})]}),e.jsx("span",{className:"sep",children:"/"}),e.jsx("span",{style:{color:"var(--ink)"},children:s.name})]}),e.jsxs("div",{className:`tag-hero method-hero-grid${s.slug==="grokking"||s.slug==="latent-reasoning"||s.slug==="world-action-models"?" method-hero-grid--wide-figure":""}`,children:[e.jsxs("div",{children:[e.jsx("div",{className:"tag-hero-eyebrow",children:"METHOD"}),e.jsx("h1",{className:"tag-hero-title method-hero-title",children:s.name}),s.full_name&&s.full_name!==s.name&&e.jsx("div",{style:{fontFamily:"var(--serif)",fontSize:16,fontStyle:"italic",color:"var(--ink-soft)",marginTop:8},children:s.full_name}),s.description&&e.jsx(O,{className:"method-description",text:s.description}),s.source_url&&s.source_title&&e.jsxs("div",{className:"method-source",children:[e.jsx("span",{className:"method-source-label",children:"Source"}),v?e.jsxs(L,{className:"method-source-link",to:v,target:"_blank",rel:"noopener noreferrer",children:[e.jsx("span",{className:"method-source-title",children:s.source_title}),s.introduced_year&&e.jsx("span",{className:"method-source-meta",children:s.introduced_year})]}):E?e.jsxs("a",{className:"method-source-link",href:E,target:"_blank",rel:"noopener noreferrer",children:[e.jsx("span",{className:"method-source-title",children:s.source_title}),s.introduced_year&&e.jsx("span",{className:"method-source-meta",children:s.introduced_year})]}):e.jsxs("div",{className:"method-source-link is-static",children:[e.jsx("span",{className:"method-source-title",children:s.source_title}),s.introduced_year&&e.jsx("span",{className:"method-source-meta",children:s.introduced_year})]})]}),e.jsxs("div",{className:"tag-hero-meta",children:[e.jsxs("div",{className:"stat",children:[e.jsx("span",{className:"label",children:"Papers mentioning"}),e.jsx("span",{className:"value",children:(s.paper_count??0).toLocaleString()})]}),g.data&&e.jsxs("div",{className:"stat",children:[e.jsx("span",{className:"label",children:"Recent mentions"}),e.jsxs("span",{className:"value",children:[(g.data.recent_paper_count*30/g.data.recent_days).toFixed(1),e.jsx("small",{children:"/mo"})]}),!g.data.comparison_complete&&e.jsx("span",{title:"Tagging is still catching up. This rate reflects mentions found so far.",children:"Partial coverage"})]}),s.introduced_year!=null&&e.jsxs("div",{className:"stat",children:[e.jsx("span",{className:"label",children:"Introduced"}),e.jsx("span",{className:"value",children:s.introduced_year})]})]}),g.isLoading?e.jsx(M,{className:"h-36 w-full method-trend-skeleton"}):g.data?e.jsxs("section",{className:"method-trend-panel method-trend-panel--compact",children:[e.jsxs("div",{className:"method-trend-header",children:[e.jsx("div",{children:e.jsx("div",{className:"method-trend-eyebrow",children:"Usage trend"})}),e.jsxs("div",{className:"method-trend-summary",children:[e.jsx("strong",{children:g.data.recent_paper_count}),e.jsxs("span",{children:["papers / ",g.data.recent_days,"d"]})]})]}),e.jsx(Ne,{history:g.data.history,methodName:s.name})]}):null]}),e.jsxs("figure",{className:"method-figure-card",children:[e.jsx(_e,{method:s}),s.image_credit&&e.jsx("figcaption",{children:e.jsx(O,{className:"method-image-credit",text:s.image_credit})})]})]}),(((q=b.data)==null?void 0:q.length)??0)>0&&e.jsxs("div",{className:"filter-row",children:[e.jsx("span",{className:"label",children:"Related methods"}),b.data.map(r=>e.jsx(ee,{method:{slug:r.slug,name:r.name}},r.id))]}),e.jsxs("div",{className:"sort-bar",children:[e.jsxs("div",{className:"paper-feed-toolbar-controls",children:[e.jsx("div",{className:"sort-options",children:ke.map(([r,c])=>e.jsx("button",{className:`sort-btn ${m===r?"active":""}`,onClick:()=>f(r),children:c},r))}),e.jsx(se,{hasCode:x,hasHfArtifacts:p,onHasCodeChange:k,onHasHfArtifactsChange:D})]}),e.jsx(ne,{startDate:l.startDate,endDate:l.endDate,onChange:r=>d(ie(n,r))}),e.jsxs("div",{className:"results-count",children:[y.length," papers mentioning ",s.name]})]}),i.isLoading?e.jsx("div",{className:"paper-list",children:Array.from({length:4}).map((r,c)=>e.jsx(M,{className:"h-40 w-full"},c))}):y.length===0?e.jsx("div",{className:"no-results",children:"No papers tagged with this method yet."}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"paper-list",children:y.map((r,c)=>e.jsx(te,{paper:r,rank:c+1},r.id))}),e.jsx("div",{ref:P,style:{height:1}}),i.isFetchingNextPage&&e.jsx("div",{style:{padding:"20px 0",textAlign:"center",color:"var(--ink-faint)"},children:"Loading more…"})]})]})};export{Ze as default};
assets/{MethodsIndexView-BDhB-5-e.js → MethodsIndexView-yUwvWQMH.js} RENAMED
@@ -1,4 +1,4 @@
1
- import{e as g,r as d,j as e,L as f}from"./index-D1SFE8tx.js";import{u as m}from"./useQuery-8sGgldYe.js";import{c as h}from"./catalog-BIqvVz-s.js";import{s as j}from"./slug-BpH-Nkvz.js";import{S as p}from"./skeleton-D5wy8oMn.js";import{A as y,a as v}from"./alert-D8tgAf4z.js";import{T as _}from"./TaxonomySuggestionTile-B9tj8y3C.js";import"./SignInToEditDialog-CL9l_TG2.js";import"./button-4gNpQKIh.js";import"./input-BKhwSyKU.js";import"./textarea-C0BVR_Sv.js";import"./searchable-select-DMfq7SRz.js";import"./popover-BbVqI79y.js";import"./dialog-PZJPRYO-.js";import"./loader-circle-BHlWsJ7C.js";import"./useMutation-BOPUR0a5.js";import"./submissions--BNtF3h2.js";/**
2
  * @license lucide-react v0.462.0 - ISC
3
  *
4
  * This source code is licensed under the ISC license.
 
1
+ import{e as g,r as d,j as e,L as f}from"./index-D6NpXxup.js";import{u as m}from"./useQuery-BSzsAAZV.js";import{c as h}from"./catalog-BkXnDjBr.js";import{s as j}from"./slug-BpH-Nkvz.js";import{S as p}from"./skeleton-BZlAxqUu.js";import{A as y,a as v}from"./alert-CEE7Xf4h.js";import{T as _}from"./TaxonomySuggestionTile-R7BmY9a5.js";import"./SignInToEditDialog-CpDcwAtr.js";import"./button-B8eVvd3T.js";import"./input-ezGnYvUD.js";import"./textarea-CDG-0EaF.js";import"./searchable-select-t_3YAgwN.js";import"./popover-VFNGJa2a.js";import"./dialog-DSbe7eWD.js";import"./loader-circle-JPWzaaPU.js";import"./useMutation-DI9QqXsO.js";import"./submissions-KVVzXrHP.js";/**
2
  * @license lucide-react v0.462.0 - ISC
3
  *
4
  * This source code is licensed under the ISC license.
assets/{NotFound-BIkKS5G_.js → NotFound-B_m3ewwi.js} RENAMED
@@ -1 +1 @@
1
- import{aQ as o,r as a,j as t,L as s}from"./index-D1SFE8tx.js";const r=()=>{const e=o();return a.useEffect(()=>{console.error("404 Error: User attempted to access non-existent route:",e.pathname)},[e.pathname]),t.jsxs("div",{className:"page",style:{textAlign:"center",paddingTop:96},children:[t.jsx("h1",{className:"detail-title",style:{fontSize:96,marginBottom:8},children:"404"}),t.jsx("p",{style:{fontFamily:"var(--serif)",fontStyle:"italic",color:"var(--ink-soft)",marginBottom:24},children:"That route isn't on the map."}),t.jsx(s,{to:"/",className:"action-btn",children:"Return home"})]})};export{r as default};
 
1
+ import{aQ as o,r as a,j as t,L as s}from"./index-D6NpXxup.js";const r=()=>{const e=o();return a.useEffect(()=>{console.error("404 Error: User attempted to access non-existent route:",e.pathname)},[e.pathname]),t.jsxs("div",{className:"page",style:{textAlign:"center",paddingTop:96},children:[t.jsx("h1",{className:"detail-title",style:{fontSize:96,marginBottom:8},children:"404"}),t.jsx("p",{style:{fontFamily:"var(--serif)",fontStyle:"italic",color:"var(--ink-soft)",marginBottom:24},children:"That route isn't on the map."}),t.jsx(s,{to:"/",className:"action-btn",children:"Return home"})]})};export{r as default};
assets/{OrganizationContributionGraph-79vg2bLM.js → OrganizationContributionGraph-BCf6UI-1.js} RENAMED
@@ -1 +1 @@
1
- import{r as b,j as o}from"./index-D1SFE8tx.js";import{u as z}from"./useQuery-8sGgldYe.js";import{S as T}from"./skeleton-D5wy8oMn.js";import{c as w}from"./catalog-BIqvVz-s.js";const x=24*60*60*1e3,f=12,y=3,v=new Map([[1,"Mon"],[3,"Wed"],[5,"Fri"]]),$=n=>new Date(`${n}T00:00:00Z`),N=n=>n.toISOString().slice(0,10),_=(n,r)=>{if(n===0)return 0;const i=r.findIndex(s=>n<=s);return i===-1?4:i+1},D=n=>{const r=$(n.start_date),i=$(n.end_date),s=new Date(r.getTime()-r.getUTCDay()*x),h=new Date(i.getTime()+(6-i.getUTCDay())*x),p=new Map(n.results.map(e=>[e.date,e.paper_count])),u=n.results.map(e=>e.paper_count).sort((e,m)=>e-m),c=[.25,.5,.75].map(e=>u[Math.min(u.length-1,Math.floor(u.length*e))]??1),l=[];for(let e=s.getTime();e<=h.getTime();e+=x){const m=new Date(e),d=N(m),g=e>=r.getTime()&&e<=i.getTime(),C=g?p.get(d)??0:0;l.push({key:d,date:m,count:C,inRange:g,level:_(C,c)})}const t=l.length/7,a=[];let j=-1;for(let e=0;e<t;e+=1){const d=l.slice(e*7,e*7+7).find(g=>g.inRange&&(e===0||g.date.getUTCDate()<=7));d&&d.date.getUTCMonth()!==j&&(j=d.date.getUTCMonth(),a.length>0&&e-a[a.length-1].column<3&&a.pop(),a.push({label:d.date.toLocaleString("en",{month:"short",timeZone:"UTC"}),column:e}))}return{days:l,months:a,weekCount:t}},L=({data:n,organizationName:r,title:i="Paper contributions",noun:s="paper"})=>{const h=b.useRef(null),{days:p,months:u,weekCount:c}=b.useMemo(()=>D(n),[n]),l=c*f+(c-1)*y;return b.useEffect(()=>{const t=h.current;t&&(t.scrollLeft=t.scrollWidth)},[c]),o.jsxs("section",{className:"organization-contributions","aria-labelledby":"organization-contributions-title",children:[o.jsxs("div",{className:"organization-contributions-header",children:[o.jsx("h2",{id:"organization-contributions-title",className:"organization-contributions-title",children:i}),o.jsxs("p",{className:"organization-contributions-summary",children:[n.total_count.toLocaleString()," ",n.total_count===1?s:`${s}s`," recorded in the last year"]})]}),o.jsx("div",{className:"organization-contributions-scroll",ref:h,children:o.jsxs("div",{className:"organization-contributions-plot",style:{width:l+34},role:"img","aria-label":`${r} recorded ${n.total_count} ${n.total_count===1?s:`${s}s`} in the last year`,children:[o.jsx("div",{className:"organization-contributions-weekdays","aria-hidden":"true",children:Array.from({length:7}).map((t,a)=>o.jsx("span",{children:v.get(a)??""},a))}),o.jsxs("div",{children:[o.jsx("div",{className:"organization-contributions-months",style:{width:l,gridTemplateColumns:`repeat(${c}, ${f}px)`},"aria-hidden":"true",children:u.map(t=>o.jsx("span",{style:{gridColumnStart:t.column+1},children:t.label},`${t.label}-${t.column}`))}),o.jsx("div",{className:"organization-contributions-grid",style:{width:l,gridTemplateColumns:`repeat(${c}, ${f}px)`},"aria-hidden":"true",children:p.map(t=>o.jsx("span",{className:`organization-contribution-cell ${t.inRange?`level-${t.level}`:"is-outside"}`,title:t.inRange?`${t.count} ${t.count===1?s:`${s}s`} on ${t.date.toLocaleDateString("en",{dateStyle:"long",timeZone:"UTC"})}`:void 0},t.key))})]})]})}),o.jsxs("div",{className:"organization-contributions-legend","aria-hidden":"true",children:[o.jsx("span",{children:"Fewer"}),[0,1,2,3,4].map(t=>o.jsx("span",{className:`organization-contribution-cell level-${t}`},t)),o.jsx("span",{children:"More"})]})]})},A=({organizationSlug:n,organizationName:r})=>{const i=z({queryKey:["organization-contributions",n],queryFn:()=>w.organizationContributions(n),staleTime:6e5});return i.isLoading?o.jsx(T,{className:"organization-contributions-skeleton"}):i.data?o.jsx(L,{data:i.data,organizationName:r}):null};export{L as C,A as O};
 
1
+ import{r as b,j as o}from"./index-D6NpXxup.js";import{u as z}from"./useQuery-BSzsAAZV.js";import{S as T}from"./skeleton-BZlAxqUu.js";import{c as w}from"./catalog-BkXnDjBr.js";const x=24*60*60*1e3,f=12,y=3,v=new Map([[1,"Mon"],[3,"Wed"],[5,"Fri"]]),$=n=>new Date(`${n}T00:00:00Z`),N=n=>n.toISOString().slice(0,10),_=(n,r)=>{if(n===0)return 0;const i=r.findIndex(s=>n<=s);return i===-1?4:i+1},D=n=>{const r=$(n.start_date),i=$(n.end_date),s=new Date(r.getTime()-r.getUTCDay()*x),h=new Date(i.getTime()+(6-i.getUTCDay())*x),p=new Map(n.results.map(e=>[e.date,e.paper_count])),u=n.results.map(e=>e.paper_count).sort((e,m)=>e-m),c=[.25,.5,.75].map(e=>u[Math.min(u.length-1,Math.floor(u.length*e))]??1),l=[];for(let e=s.getTime();e<=h.getTime();e+=x){const m=new Date(e),d=N(m),g=e>=r.getTime()&&e<=i.getTime(),C=g?p.get(d)??0:0;l.push({key:d,date:m,count:C,inRange:g,level:_(C,c)})}const t=l.length/7,a=[];let j=-1;for(let e=0;e<t;e+=1){const d=l.slice(e*7,e*7+7).find(g=>g.inRange&&(e===0||g.date.getUTCDate()<=7));d&&d.date.getUTCMonth()!==j&&(j=d.date.getUTCMonth(),a.length>0&&e-a[a.length-1].column<3&&a.pop(),a.push({label:d.date.toLocaleString("en",{month:"short",timeZone:"UTC"}),column:e}))}return{days:l,months:a,weekCount:t}},L=({data:n,organizationName:r,title:i="Paper contributions",noun:s="paper"})=>{const h=b.useRef(null),{days:p,months:u,weekCount:c}=b.useMemo(()=>D(n),[n]),l=c*f+(c-1)*y;return b.useEffect(()=>{const t=h.current;t&&(t.scrollLeft=t.scrollWidth)},[c]),o.jsxs("section",{className:"organization-contributions","aria-labelledby":"organization-contributions-title",children:[o.jsxs("div",{className:"organization-contributions-header",children:[o.jsx("h2",{id:"organization-contributions-title",className:"organization-contributions-title",children:i}),o.jsxs("p",{className:"organization-contributions-summary",children:[n.total_count.toLocaleString()," ",n.total_count===1?s:`${s}s`," recorded in the last year"]})]}),o.jsx("div",{className:"organization-contributions-scroll",ref:h,children:o.jsxs("div",{className:"organization-contributions-plot",style:{width:l+34},role:"img","aria-label":`${r} recorded ${n.total_count} ${n.total_count===1?s:`${s}s`} in the last year`,children:[o.jsx("div",{className:"organization-contributions-weekdays","aria-hidden":"true",children:Array.from({length:7}).map((t,a)=>o.jsx("span",{children:v.get(a)??""},a))}),o.jsxs("div",{children:[o.jsx("div",{className:"organization-contributions-months",style:{width:l,gridTemplateColumns:`repeat(${c}, ${f}px)`},"aria-hidden":"true",children:u.map(t=>o.jsx("span",{style:{gridColumnStart:t.column+1},children:t.label},`${t.label}-${t.column}`))}),o.jsx("div",{className:"organization-contributions-grid",style:{width:l,gridTemplateColumns:`repeat(${c}, ${f}px)`},"aria-hidden":"true",children:p.map(t=>o.jsx("span",{className:`organization-contribution-cell ${t.inRange?`level-${t.level}`:"is-outside"}`,title:t.inRange?`${t.count} ${t.count===1?s:`${s}s`} on ${t.date.toLocaleDateString("en",{dateStyle:"long",timeZone:"UTC"})}`:void 0},t.key))})]})]})}),o.jsxs("div",{className:"organization-contributions-legend","aria-hidden":"true",children:[o.jsx("span",{children:"Fewer"}),[0,1,2,3,4].map(t=>o.jsx("span",{className:`organization-contribution-cell level-${t}`},t)),o.jsx("span",{children:"More"})]})]})},A=({organizationSlug:n,organizationName:r})=>{const i=z({queryKey:["organization-contributions",n],queryFn:()=>w.organizationContributions(n),staleTime:6e5});return i.isLoading?o.jsx(T,{className:"organization-contributions-skeleton"}):i.data?o.jsx(L,{data:i.data,organizationName:r}):null};export{L as C,A as O};
assets/OrganizationDetailView-DQ01_2sv.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import{u as t,j as r}from"./index-D6NpXxup.js";import{O as i}from"./OrganizationPaperFeed-DKywRtt2.js";import m from"./NotFound-B_m3ewwi.js";import"./useQuery-BSzsAAZV.js";import"./components-C-Wk0LlL.js";import"./paperQueryKeys-CcqbH5YG.js";import"./LatexTitle-Cd92uzqM.js";import"./transform-dsZcnzEu.js";import"./papers-CJuRKhYV.js";import"./safeExternalHref-CkBrsh84.js";import"./MarkdownText-OPahlM9D.js";/* empty css */import"./PaperPreviewLink-BaxpCHGH.js";import"./index-BiPn19VT.js";import"./index-PW6rRKKS.js";import"./katex-DkKDou_j.js";import"./hover-card-C5GFpPJ1.js";import"./useMutation-DI9QqXsO.js";import"./OrganizationContributionGraph-BCf6UI-1.js";import"./skeleton-BZlAxqUu.js";import"./catalog-BkXnDjBr.js";import"./useIntersectionObserver-C8GlpU4F.js";import"./PaperDateFilter-CwWio6o1.js";import"./popover-VFNGJa2a.js";import"./alert-CEE7Xf4h.js";import"./searchable-select-t_3YAgwN.js";import"./button-B8eVvd3T.js";import"./dialog-DSbe7eWD.js";import"./loader-circle-JPWzaaPU.js";import"./usePapers-D7q7tNxt.js";import"./useInfiniteQuery-BA3fe-wV.js";const B=()=>{const{orgSlug:o}=t();return o?r.jsx(i,{organizationSlug:o}):r.jsx(m,{})};export{B as default};
assets/OrganizationDetailView-QywY5Dw8.js DELETED
@@ -1 +0,0 @@
1
- import{u as t,j as r}from"./index-D1SFE8tx.js";import{O as i}from"./OrganizationPaperFeed-vDOTWCNa.js";import m from"./NotFound-BIkKS5G_.js";import"./useQuery-8sGgldYe.js";import"./components-BAR1mYoW.js";import"./paperQueryKeys-CcqbH5YG.js";import"./LatexTitle-C3kQa1rr.js";import"./katex.min-BSBacQyE.js";import"./transform-BmaYjIy4.js";import"./papers-Cv1LxXF4.js";import"./safeExternalHref-CkBrsh84.js";import"./MarkdownText-B1RI0BDb.js";import"./PaperPreviewLink-D5_ka8a2.js";import"./index-CZU6xdjr.js";import"./index-DJRFtxnI.js";import"./hover-card-BtW3iC4Z.js";import"./useMutation-BOPUR0a5.js";import"./OrganizationContributionGraph-79vg2bLM.js";import"./skeleton-D5wy8oMn.js";import"./catalog-BIqvVz-s.js";import"./useIntersectionObserver-BPOzk2Hc.js";import"./PaperDateFilter-GmvHJTjc.js";import"./popover-BbVqI79y.js";import"./alert-D8tgAf4z.js";import"./searchable-select-DMfq7SRz.js";import"./button-4gNpQKIh.js";import"./dialog-PZJPRYO-.js";import"./loader-circle-BHlWsJ7C.js";import"./usePapers-jBjTfCJU.js";import"./useInfiniteQuery-rPEO6e6c.js";const A=()=>{const{orgSlug:o}=t();return o?r.jsx(i,{organizationSlug:o}):r.jsx(m,{})};export{A as default};
 
 
assets/{OrganizationPaperFeed-vDOTWCNa.js → OrganizationPaperFeed-DKywRtt2.js} RENAMED
@@ -1 +1 @@
1
- import{b as E,c as Q,r as d,j as e,L as A}from"./index-D1SFE8tx.js";import{u as C}from"./useQuery-8sGgldYe.js";import{P as U}from"./components-BAR1mYoW.js";import{M as B}from"./MarkdownText-B1RI0BDb.js";import{O as G}from"./OrganizationContributionGraph-79vg2bLM.js";import{u as K,P as W}from"./useIntersectionObserver-BPOzk2Hc.js";import{a as Z,P as J,b as V}from"./PaperDateFilter-GmvHJTjc.js";import{A as X,a as Y}from"./alert-D8tgAf4z.js";import{S as z}from"./searchable-select-DMfq7SRz.js";import{S as $}from"./skeleton-D5wy8oMn.js";import{e as ee}from"./usePapers-jBjTfCJU.js";import{c as D}from"./catalog-BIqvVz-s.js";import{d as R,t as se}from"./transform-BmaYjIy4.js";import ae from"./NotFound-BIkKS5G_.js";const re=[["trending","trending"],["date_published","newest"],["citation_count","most cited"]],te=n=>n==="date_published"||n==="citation_count"?n:"trending",je=({organizationSlug:n,taskSlug:p})=>{var y,P,v,F,L,k,w,O;const T=E(),[o,h]=Q(),[I,u]=d.useState(!1),g=te(o.get("order_by")),f=o.get("has_code")==="true",_=o.get("has_hf_artifacts")==="true",m=Z(o),x=C({queryKey:["organization",n],queryFn:()=>D.getOrganization(n),staleTime:10*60*1e3}),c=C({queryKey:["organization-areas-with-tasks",n],queryFn:()=>D.organizationAreasWithTasks(n),staleTime:10*60*1e3}),i=ee({organizationSlug:n,taskSlug:p,page_size:12,order_by:g,order_dir:"desc",include_resources:!0,has_code:f,has_hf_artifacts:_,start_date:m.startDate,end_date:m.endDate,enabled:!!n}),{targetRef:M,isIntersecting:j}=K({rootMargin:"200px"});d.useEffect(()=>{j&&i.hasNextPage&&!i.isFetchingNextPage&&i.fetchNextPage()},[j,i.hasNextPage,i.isFetchingNextPage]),d.useEffect(()=>{u(!1)},[n,p]);const b=d.useMemo(()=>{var a;return(((a=c.data)==null?void 0:a.results)??[]).flatMap(r=>r.tasks.filter(t=>!!t.slug).map(t=>({...t,slug:t.slug,label:R(t.name,t.slug)})))},[c.data]),l=b.find(a=>a.slug===p),N=d.useMemo(()=>{var a;return(((a=i.data)==null?void 0:a.pages)??[]).flatMap(r=>r.results.map(se))},[i.data]),s=x.data??((y=c.data)==null?void 0:y.organization),H=((v=(P=i.data)==null?void 0:P.pages[0])==null?void 0:v.count)??0;if(((F=x.error)==null?void 0:F.status)===404||((L=c.error)==null?void 0:L.status)===404||((k=i.error)==null?void 0:k.status)===404)return e.jsx(ae,{});if(c.error||i.error)return e.jsx("div",{className:"page",children:e.jsx(X,{variant:"destructive",children:e.jsx(Y,{children:"Failed to load organization papers. Please try again."})})});const q=a=>{const r=a.trim().toLocaleLowerCase();return b.filter(t=>`${t.label} ${t.slug}`.toLocaleLowerCase().includes(r)).map(t=>({value:t.slug,label:t.label,description:`${t.paper_count.toLocaleString()} ${t.paper_count===1?"paper":"papers"}`}))},S=a=>{const r=a==="__all__"?`/orgs/${n}`:`/orgs/${n}/${a}`,t=o.toString();T({pathname:r,search:t?`?${t}`:""})};return e.jsxs("div",{className:"page",children:[e.jsxs("nav",{className:"breadcrumb","aria-label":"Breadcrumb",children:[e.jsx(A,{to:"/",children:"Home"}),e.jsx("span",{children:" / "}),e.jsx(A,{to:"/organizations",children:"Organizations"}),e.jsx("span",{children:" / "}),e.jsx("span",{children:(s==null?void 0:s.name)??n}),l&&e.jsxs(e.Fragment,{children:[e.jsx("span",{children:" / "}),e.jsx("span",{children:R(l.name,l.slug)})]})]}),e.jsxs("header",{className:"organization-hero",children:[e.jsxs("div",{className:"organization-hero-profile",children:[e.jsx("div",{className:"organizations-eyebrow",children:"ORGANIZATION"}),e.jsxs("h1",{className:"feed-title organization-hero-title",children:[s!=null&&s.logo_url&&!I?e.jsx("img",{src:s.logo_url,alt:"",width:58,height:58,onError:()=>u(!0)}):s?e.jsx("span",{className:"organization-logo organization-logo--fallback","aria-hidden":"true",children:s.name.slice(0,1).toUpperCase()}):null,(s==null?void 0:s.name)??e.jsx($,{className:"h-12 w-64"})]}),s&&e.jsxs("div",{className:"feed-subtitle",children:[((w=s.paper_count)==null?void 0:w.toLocaleString())??0," papers",(s.organization_trending_score??0)>0&&s.trending_rank&&e.jsxs(e.Fragment,{children:[" · #",s.trending_rank," trending this month"]})]}),(s==null?void 0:s.description)&&e.jsx(B,{className:"method-description",text:s.description}),s&&e.jsxs("div",{className:"organization-hero-links",children:[s.website_url&&e.jsx("a",{href:s.website_url,target:"_blank",rel:"noreferrer",children:"Website ↗"}),s.hf_url&&e.jsx("a",{href:s.hf_url,target:"_blank",rel:"noreferrer",children:"Hugging Face ↗"}),s.github_url&&e.jsx("a",{href:s.github_url,target:"_blank",rel:"noreferrer",children:"GitHub ↗"})]})]}),e.jsx(G,{organizationSlug:n,organizationName:(s==null?void 0:s.name)??n})]}),e.jsxs("div",{className:"sort-bar",style:{alignItems:"center",gap:16},children:[e.jsx("div",{style:{minWidth:260},children:e.jsx(z,{value:p??"__all__",onChange:S,placeholder:"All tasks",searchPlaceholder:"Search organization tasks...",emptyMessage:"No matching tasks.",ariaLabel:"Filter papers by task",selectedOption:l?{value:l.slug,label:l.label,description:`${l.paper_count.toLocaleString()} ${l.paper_count===1?"paper":"papers"}`}:{value:"__all__",label:"All tasks",description:`${((O=s==null?void 0:s.paper_count)==null?void 0:O.toLocaleString())??0} papers`},queryKey:["organization-task-options",n],queryFn:async a=>{var r;return[{value:"__all__",label:"All tasks",description:`${((r=s==null?void 0:s.paper_count)==null?void 0:r.toLocaleString())??0} papers`},...q(a)]},enabled:!c.isLoading,className:"h-[38px]"})}),e.jsxs("div",{className:"paper-feed-toolbar-controls",children:[e.jsx("div",{className:"sort-options",children:re.map(([a,r])=>e.jsx("button",{type:"button",className:`sort-btn ${g===a?"active":""}`,onClick:()=>{const t=new URLSearchParams(o);a==="trending"?t.delete("order_by"):t.set("order_by",a),h(t)},children:r},a))}),e.jsx(W,{hasCode:f,hasHfArtifacts:_,onHasCodeChange:a=>{const r=new URLSearchParams(o);a?r.set("has_code","true"):r.delete("has_code"),h(r)},onHasHfArtifactsChange:a=>{const r=new URLSearchParams(o);a?r.set("has_hf_artifacts","true"):r.delete("has_hf_artifacts"),h(r)}})]}),e.jsx(J,{startDate:m.startDate,endDate:m.endDate,onChange:a=>h(V(o,a))}),e.jsxs("div",{className:"results-count",children:[H.toLocaleString()," papers"]})]}),i.isLoading?e.jsx("div",{className:"paper-list",children:Array.from({length:4}).map((a,r)=>e.jsx($,{className:"h-40 w-full"},r))}):N.length===0?e.jsx("div",{className:"no-results",children:(s==null?void 0:s.paper_count)===0?"No papers indexed yet":"No papers found for this selection."}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"paper-list",children:N.map((a,r)=>e.jsx(U,{paper:a,rank:r+1,showInstitution:!1},a.id))}),e.jsx("div",{ref:M,style:{height:1}}),i.isFetchingNextPage&&e.jsx("div",{style:{padding:"20px 0",textAlign:"center"},children:"Loading more…"})]})]})};export{je as O};
 
1
+ import{b as E,c as Q,r as d,j as e,L as A}from"./index-D6NpXxup.js";import{u as C}from"./useQuery-BSzsAAZV.js";import{P as U}from"./components-C-Wk0LlL.js";import{M as B}from"./MarkdownText-OPahlM9D.js";import{O as G}from"./OrganizationContributionGraph-BCf6UI-1.js";import{u as K,P as W}from"./useIntersectionObserver-C8GlpU4F.js";import{a as Z,P as J,b as V}from"./PaperDateFilter-CwWio6o1.js";import{A as X,a as Y}from"./alert-CEE7Xf4h.js";import{S as z}from"./searchable-select-t_3YAgwN.js";import{S as $}from"./skeleton-BZlAxqUu.js";import{e as ee}from"./usePapers-D7q7tNxt.js";import{c as D}from"./catalog-BkXnDjBr.js";import{d as R,t as se}from"./transform-dsZcnzEu.js";import ae from"./NotFound-B_m3ewwi.js";const re=[["trending","trending"],["date_published","newest"],["citation_count","most cited"]],te=n=>n==="date_published"||n==="citation_count"?n:"trending",je=({organizationSlug:n,taskSlug:p})=>{var y,P,v,F,L,k,w,O;const T=E(),[o,h]=Q(),[I,u]=d.useState(!1),g=te(o.get("order_by")),f=o.get("has_code")==="true",_=o.get("has_hf_artifacts")==="true",m=Z(o),x=C({queryKey:["organization",n],queryFn:()=>D.getOrganization(n),staleTime:10*60*1e3}),c=C({queryKey:["organization-areas-with-tasks",n],queryFn:()=>D.organizationAreasWithTasks(n),staleTime:10*60*1e3}),i=ee({organizationSlug:n,taskSlug:p,page_size:12,order_by:g,order_dir:"desc",include_resources:!0,has_code:f,has_hf_artifacts:_,start_date:m.startDate,end_date:m.endDate,enabled:!!n}),{targetRef:M,isIntersecting:j}=K({rootMargin:"200px"});d.useEffect(()=>{j&&i.hasNextPage&&!i.isFetchingNextPage&&i.fetchNextPage()},[j,i.hasNextPage,i.isFetchingNextPage]),d.useEffect(()=>{u(!1)},[n,p]);const b=d.useMemo(()=>{var a;return(((a=c.data)==null?void 0:a.results)??[]).flatMap(r=>r.tasks.filter(t=>!!t.slug).map(t=>({...t,slug:t.slug,label:R(t.name,t.slug)})))},[c.data]),l=b.find(a=>a.slug===p),N=d.useMemo(()=>{var a;return(((a=i.data)==null?void 0:a.pages)??[]).flatMap(r=>r.results.map(se))},[i.data]),s=x.data??((y=c.data)==null?void 0:y.organization),H=((v=(P=i.data)==null?void 0:P.pages[0])==null?void 0:v.count)??0;if(((F=x.error)==null?void 0:F.status)===404||((L=c.error)==null?void 0:L.status)===404||((k=i.error)==null?void 0:k.status)===404)return e.jsx(ae,{});if(c.error||i.error)return e.jsx("div",{className:"page",children:e.jsx(X,{variant:"destructive",children:e.jsx(Y,{children:"Failed to load organization papers. Please try again."})})});const q=a=>{const r=a.trim().toLocaleLowerCase();return b.filter(t=>`${t.label} ${t.slug}`.toLocaleLowerCase().includes(r)).map(t=>({value:t.slug,label:t.label,description:`${t.paper_count.toLocaleString()} ${t.paper_count===1?"paper":"papers"}`}))},S=a=>{const r=a==="__all__"?`/orgs/${n}`:`/orgs/${n}/${a}`,t=o.toString();T({pathname:r,search:t?`?${t}`:""})};return e.jsxs("div",{className:"page",children:[e.jsxs("nav",{className:"breadcrumb","aria-label":"Breadcrumb",children:[e.jsx(A,{to:"/",children:"Home"}),e.jsx("span",{children:" / "}),e.jsx(A,{to:"/organizations",children:"Organizations"}),e.jsx("span",{children:" / "}),e.jsx("span",{children:(s==null?void 0:s.name)??n}),l&&e.jsxs(e.Fragment,{children:[e.jsx("span",{children:" / "}),e.jsx("span",{children:R(l.name,l.slug)})]})]}),e.jsxs("header",{className:"organization-hero",children:[e.jsxs("div",{className:"organization-hero-profile",children:[e.jsx("div",{className:"organizations-eyebrow",children:"ORGANIZATION"}),e.jsxs("h1",{className:"feed-title organization-hero-title",children:[s!=null&&s.logo_url&&!I?e.jsx("img",{src:s.logo_url,alt:"",width:58,height:58,onError:()=>u(!0)}):s?e.jsx("span",{className:"organization-logo organization-logo--fallback","aria-hidden":"true",children:s.name.slice(0,1).toUpperCase()}):null,(s==null?void 0:s.name)??e.jsx($,{className:"h-12 w-64"})]}),s&&e.jsxs("div",{className:"feed-subtitle",children:[((w=s.paper_count)==null?void 0:w.toLocaleString())??0," papers",(s.organization_trending_score??0)>0&&s.trending_rank&&e.jsxs(e.Fragment,{children:[" · #",s.trending_rank," trending this month"]})]}),(s==null?void 0:s.description)&&e.jsx(B,{className:"method-description",text:s.description}),s&&e.jsxs("div",{className:"organization-hero-links",children:[s.website_url&&e.jsx("a",{href:s.website_url,target:"_blank",rel:"noreferrer",children:"Website ↗"}),s.hf_url&&e.jsx("a",{href:s.hf_url,target:"_blank",rel:"noreferrer",children:"Hugging Face ↗"}),s.github_url&&e.jsx("a",{href:s.github_url,target:"_blank",rel:"noreferrer",children:"GitHub ↗"})]})]}),e.jsx(G,{organizationSlug:n,organizationName:(s==null?void 0:s.name)??n})]}),e.jsxs("div",{className:"sort-bar",style:{alignItems:"center",gap:16},children:[e.jsx("div",{style:{minWidth:260},children:e.jsx(z,{value:p??"__all__",onChange:S,placeholder:"All tasks",searchPlaceholder:"Search organization tasks...",emptyMessage:"No matching tasks.",ariaLabel:"Filter papers by task",selectedOption:l?{value:l.slug,label:l.label,description:`${l.paper_count.toLocaleString()} ${l.paper_count===1?"paper":"papers"}`}:{value:"__all__",label:"All tasks",description:`${((O=s==null?void 0:s.paper_count)==null?void 0:O.toLocaleString())??0} papers`},queryKey:["organization-task-options",n],queryFn:async a=>{var r;return[{value:"__all__",label:"All tasks",description:`${((r=s==null?void 0:s.paper_count)==null?void 0:r.toLocaleString())??0} papers`},...q(a)]},enabled:!c.isLoading,className:"h-[38px]"})}),e.jsxs("div",{className:"paper-feed-toolbar-controls",children:[e.jsx("div",{className:"sort-options",children:re.map(([a,r])=>e.jsx("button",{type:"button",className:`sort-btn ${g===a?"active":""}`,onClick:()=>{const t=new URLSearchParams(o);a==="trending"?t.delete("order_by"):t.set("order_by",a),h(t)},children:r},a))}),e.jsx(W,{hasCode:f,hasHfArtifacts:_,onHasCodeChange:a=>{const r=new URLSearchParams(o);a?r.set("has_code","true"):r.delete("has_code"),h(r)},onHasHfArtifactsChange:a=>{const r=new URLSearchParams(o);a?r.set("has_hf_artifacts","true"):r.delete("has_hf_artifacts"),h(r)}})]}),e.jsx(J,{startDate:m.startDate,endDate:m.endDate,onChange:a=>h(V(o,a))}),e.jsxs("div",{className:"results-count",children:[H.toLocaleString()," papers"]})]}),i.isLoading?e.jsx("div",{className:"paper-list",children:Array.from({length:4}).map((a,r)=>e.jsx($,{className:"h-40 w-full"},r))}):N.length===0?e.jsx("div",{className:"no-results",children:(s==null?void 0:s.paper_count)===0?"No papers indexed yet":"No papers found for this selection."}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"paper-list",children:N.map((a,r)=>e.jsx(U,{paper:a,rank:r+1,showInstitution:!1},a.id))}),e.jsx("div",{ref:M,style:{height:1}}),i.isFetchingNextPage&&e.jsx("div",{style:{padding:"20px 0",textAlign:"center"},children:"Loading more…"})]})]})};export{je as O};
assets/OrganizationTaskView-CMEbfWkO.js DELETED
@@ -1 +0,0 @@
1
- import{u as i,j as t}from"./index-D1SFE8tx.js";import{O as m}from"./OrganizationPaperFeed-vDOTWCNa.js";import p from"./NotFound-BIkKS5G_.js";import"./useQuery-8sGgldYe.js";import"./components-BAR1mYoW.js";import"./paperQueryKeys-CcqbH5YG.js";import"./LatexTitle-C3kQa1rr.js";import"./katex.min-BSBacQyE.js";import"./transform-BmaYjIy4.js";import"./papers-Cv1LxXF4.js";import"./safeExternalHref-CkBrsh84.js";import"./MarkdownText-B1RI0BDb.js";import"./PaperPreviewLink-D5_ka8a2.js";import"./index-CZU6xdjr.js";import"./index-DJRFtxnI.js";import"./hover-card-BtW3iC4Z.js";import"./useMutation-BOPUR0a5.js";import"./OrganizationContributionGraph-79vg2bLM.js";import"./skeleton-D5wy8oMn.js";import"./catalog-BIqvVz-s.js";import"./useIntersectionObserver-BPOzk2Hc.js";import"./PaperDateFilter-GmvHJTjc.js";import"./popover-BbVqI79y.js";import"./alert-D8tgAf4z.js";import"./searchable-select-DMfq7SRz.js";import"./button-4gNpQKIh.js";import"./dialog-PZJPRYO-.js";import"./loader-circle-BHlWsJ7C.js";import"./usePapers-jBjTfCJU.js";import"./useInfiniteQuery-rPEO6e6c.js";const B=()=>{const{orgSlug:o,taskSlug:r}=i();return o&&r?t.jsx(m,{organizationSlug:o,taskSlug:r}):t.jsx(p,{})};export{B as default};
 
 
assets/OrganizationTaskView-Cm6_HluA.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import{u as i,j as t}from"./index-D6NpXxup.js";import{O as m}from"./OrganizationPaperFeed-DKywRtt2.js";import p from"./NotFound-B_m3ewwi.js";import"./useQuery-BSzsAAZV.js";import"./components-C-Wk0LlL.js";import"./paperQueryKeys-CcqbH5YG.js";import"./LatexTitle-Cd92uzqM.js";import"./transform-dsZcnzEu.js";import"./papers-CJuRKhYV.js";import"./safeExternalHref-CkBrsh84.js";import"./MarkdownText-OPahlM9D.js";/* empty css */import"./PaperPreviewLink-BaxpCHGH.js";import"./index-BiPn19VT.js";import"./index-PW6rRKKS.js";import"./katex-DkKDou_j.js";import"./hover-card-C5GFpPJ1.js";import"./useMutation-DI9QqXsO.js";import"./OrganizationContributionGraph-BCf6UI-1.js";import"./skeleton-BZlAxqUu.js";import"./catalog-BkXnDjBr.js";import"./useIntersectionObserver-C8GlpU4F.js";import"./PaperDateFilter-CwWio6o1.js";import"./popover-VFNGJa2a.js";import"./alert-CEE7Xf4h.js";import"./searchable-select-t_3YAgwN.js";import"./button-B8eVvd3T.js";import"./dialog-DSbe7eWD.js";import"./loader-circle-JPWzaaPU.js";import"./usePapers-D7q7tNxt.js";import"./useInfiniteQuery-BA3fe-wV.js";const C=()=>{const{orgSlug:o,taskSlug:r}=i();return o&&r?t.jsx(m,{organizationSlug:o,taskSlug:r}):t.jsx(p,{})};export{C as default};
assets/{OrganizationsIndexView-UI3J0rqs.js → OrganizationsIndexView-Bnj1k6WC.js} RENAMED
@@ -1 +1 @@
1
- import{c as u,r as g,j as e,L as x}from"./index-D1SFE8tx.js";import{u as j}from"./useQuery-8sGgldYe.js";import{A as y,a as f}from"./alert-D8tgAf4z.js";import{S as _}from"./skeleton-D5wy8oMn.js";import{c as N}from"./catalog-BIqvVz-s.js";const v=n=>n==="papers"||n==="name"?n:"trending",S=({organization:n})=>{const[d,t]=g.useState(!1);return!n.logo_url||d?e.jsx("span",{className:"organization-logo organization-logo--fallback","aria-hidden":"true",children:n.name.slice(0,1).toUpperCase()}):e.jsx("span",{className:"organization-logo",children:e.jsx("img",{src:n.logo_url,alt:"",width:48,height:48,onError:()=>t(!0)})})},A=()=>{var h;const[n,d]=u(),t=v(n.get("sort")),c=n.get("q")??"",o=j({queryKey:["organizations","featured"],queryFn:()=>N.organizationIndex(),staleTime:10*60*1e3}),p=s=>{const a=new URLSearchParams(n),i=s.sort??t,r=s.query??c;i==="trending"?a.delete("sort"):a.set("sort",i),r.trim()?a.set("q",r):a.delete("q"),d(a)},m=g.useMemo(()=>{var i;const s=c.trim().toLocaleLowerCase(),a=(((i=o.data)==null?void 0:i.results)??[]).filter(r=>[r.name,r.slug,r.hf_slug??""].join(" ").toLocaleLowerCase().includes(s));return t==="papers"?[...a].sort((r,l)=>(l.paper_count??0)-(r.paper_count??0)||r.name.localeCompare(l.name)||r.slug.localeCompare(l.slug)):t==="name"?[...a].sort((r,l)=>r.name.localeCompare(l.name)||r.slug.localeCompare(l.slug)):a},[o.data,c,t]);return e.jsxs("div",{className:"page organizations-page",children:[e.jsx("div",{className:"feed-header",children:e.jsxs("div",{children:[e.jsxs("h1",{className:"feed-title",children:["AI ",e.jsx("em",{children:"Organizations"})]}),e.jsx("div",{className:"feed-subtitle",children:"Explore papers from leading AI organizations, ranked by sustained community momentum over the past 30 days."})]})}),e.jsxs("section",{"aria-labelledby":"organizations-heading",children:[e.jsxs("div",{className:"organizations-section-heading",children:[e.jsxs("h2",{id:"organizations-heading",children:[((h=o.data)==null?void 0:h.count)??21," organizations"]}),e.jsx("span",{children:t==="trending"?"Ranked by 30-day momentum":t==="papers"?"Sorted by linked papers":"Sorted A–Z"})]}),e.jsxs("div",{className:"organizations-controls",children:[e.jsxs("label",{children:[e.jsx("span",{className:"sr-only",children:"Search organizations"}),e.jsx("input",{type:"search",value:c,onChange:s=>p({query:s.target.value}),placeholder:"Search organizations"})]}),e.jsx("div",{className:"organizations-sort","aria-label":"Sort organizations",children:[["trending","Trending"],["papers","Most papers"],["name","A–Z"]].map(([s,a])=>e.jsx("button",{type:"button",className:t===s?"active":"","aria-pressed":t===s,onClick:()=>p({sort:s}),children:a},s))})]}),o.isLoading?e.jsx("div",{className:"organizations-grid","aria-busy":"true",children:Array.from({length:6}).map((s,a)=>e.jsx(_,{className:"organization-card-skeleton"},a))}):o.error?e.jsx(y,{variant:"destructive",children:e.jsxs(f,{children:["Failed to load organizations."," ",e.jsx("button",{type:"button",onClick:()=>o.refetch(),children:"Try again"})]})}):m.length===0?e.jsxs("div",{className:"organizations-empty",children:["No organizations match “",c,"”."]}):e.jsx("div",{className:"organizations-grid",children:m.map(s=>{var r;const a=s.paper_count??0,i=s.first_paper_year&&s.latest_paper_year?s.first_paper_year===s.latest_paper_year?String(s.first_paper_year):`${s.first_paper_year}–${s.latest_paper_year}`:null;return e.jsxs(x,{to:`/orgs/${s.slug}`,className:"organization-card","aria-label":a?`Browse ${a.toLocaleString()} ${s.name} papers`:`Browse ${s.name} papers`,children:[e.jsxs("div",{className:"organization-card-header",children:[e.jsx(S,{organization:s}),e.jsxs("div",{children:[e.jsx("h3",{children:s.name}),e.jsxs("span",{children:["@",s.hf_slug??s.slug]})]})]}),e.jsxs("div",{className:"organization-card-metrics",children:[e.jsx("strong",{children:a.toLocaleString()}),e.jsx("span",{children:a===1?"paper":"papers"}),t==="trending"&&s.trending_rank&&e.jsxs("span",{className:"organization-rank",children:["#",s.trending_rank]})]}),e.jsxs("div",{className:"organization-highlight",children:[e.jsx("span",{children:"Trending paper"}),e.jsx("strong",{children:((r=s.top_trending_paper)==null?void 0:r.title)??"No papers indexed yet"})]}),e.jsxs("div",{className:"organization-card-footer",children:[i?`Publishing ${i}`:"Research archive ready",e.jsx("span",{"aria-hidden":"true",children:"↗"})]})]},s.id)})})]})]})};export{A as default};
 
1
+ import{c as u,r as g,j as e,L as x}from"./index-D6NpXxup.js";import{u as j}from"./useQuery-BSzsAAZV.js";import{A as y,a as f}from"./alert-CEE7Xf4h.js";import{S as _}from"./skeleton-BZlAxqUu.js";import{c as N}from"./catalog-BkXnDjBr.js";const v=n=>n==="papers"||n==="name"?n:"trending",S=({organization:n})=>{const[d,t]=g.useState(!1);return!n.logo_url||d?e.jsx("span",{className:"organization-logo organization-logo--fallback","aria-hidden":"true",children:n.name.slice(0,1).toUpperCase()}):e.jsx("span",{className:"organization-logo",children:e.jsx("img",{src:n.logo_url,alt:"",width:48,height:48,onError:()=>t(!0)})})},A=()=>{var h;const[n,d]=u(),t=v(n.get("sort")),c=n.get("q")??"",o=j({queryKey:["organizations","featured"],queryFn:()=>N.organizationIndex(),staleTime:10*60*1e3}),p=s=>{const a=new URLSearchParams(n),i=s.sort??t,r=s.query??c;i==="trending"?a.delete("sort"):a.set("sort",i),r.trim()?a.set("q",r):a.delete("q"),d(a)},m=g.useMemo(()=>{var i;const s=c.trim().toLocaleLowerCase(),a=(((i=o.data)==null?void 0:i.results)??[]).filter(r=>[r.name,r.slug,r.hf_slug??""].join(" ").toLocaleLowerCase().includes(s));return t==="papers"?[...a].sort((r,l)=>(l.paper_count??0)-(r.paper_count??0)||r.name.localeCompare(l.name)||r.slug.localeCompare(l.slug)):t==="name"?[...a].sort((r,l)=>r.name.localeCompare(l.name)||r.slug.localeCompare(l.slug)):a},[o.data,c,t]);return e.jsxs("div",{className:"page organizations-page",children:[e.jsx("div",{className:"feed-header",children:e.jsxs("div",{children:[e.jsxs("h1",{className:"feed-title",children:["AI ",e.jsx("em",{children:"Organizations"})]}),e.jsx("div",{className:"feed-subtitle",children:"Explore papers from leading AI organizations, ranked by sustained community momentum over the past 30 days."})]})}),e.jsxs("section",{"aria-labelledby":"organizations-heading",children:[e.jsxs("div",{className:"organizations-section-heading",children:[e.jsxs("h2",{id:"organizations-heading",children:[((h=o.data)==null?void 0:h.count)??21," organizations"]}),e.jsx("span",{children:t==="trending"?"Ranked by 30-day momentum":t==="papers"?"Sorted by linked papers":"Sorted A–Z"})]}),e.jsxs("div",{className:"organizations-controls",children:[e.jsxs("label",{children:[e.jsx("span",{className:"sr-only",children:"Search organizations"}),e.jsx("input",{type:"search",value:c,onChange:s=>p({query:s.target.value}),placeholder:"Search organizations"})]}),e.jsx("div",{className:"organizations-sort","aria-label":"Sort organizations",children:[["trending","Trending"],["papers","Most papers"],["name","A–Z"]].map(([s,a])=>e.jsx("button",{type:"button",className:t===s?"active":"","aria-pressed":t===s,onClick:()=>p({sort:s}),children:a},s))})]}),o.isLoading?e.jsx("div",{className:"organizations-grid","aria-busy":"true",children:Array.from({length:6}).map((s,a)=>e.jsx(_,{className:"organization-card-skeleton"},a))}):o.error?e.jsx(y,{variant:"destructive",children:e.jsxs(f,{children:["Failed to load organizations."," ",e.jsx("button",{type:"button",onClick:()=>o.refetch(),children:"Try again"})]})}):m.length===0?e.jsxs("div",{className:"organizations-empty",children:["No organizations match “",c,"”."]}):e.jsx("div",{className:"organizations-grid",children:m.map(s=>{var r;const a=s.paper_count??0,i=s.first_paper_year&&s.latest_paper_year?s.first_paper_year===s.latest_paper_year?String(s.first_paper_year):`${s.first_paper_year}–${s.latest_paper_year}`:null;return e.jsxs(x,{to:`/orgs/${s.slug}`,className:"organization-card","aria-label":a?`Browse ${a.toLocaleString()} ${s.name} papers`:`Browse ${s.name} papers`,children:[e.jsxs("div",{className:"organization-card-header",children:[e.jsx(S,{organization:s}),e.jsxs("div",{children:[e.jsx("h3",{children:s.name}),e.jsxs("span",{children:["@",s.hf_slug??s.slug]})]})]}),e.jsxs("div",{className:"organization-card-metrics",children:[e.jsx("strong",{children:a.toLocaleString()}),e.jsx("span",{children:a===1?"paper":"papers"}),t==="trending"&&s.trending_rank&&e.jsxs("span",{className:"organization-rank",children:["#",s.trending_rank]})]}),e.jsxs("div",{className:"organization-highlight",children:[e.jsx("span",{children:"Trending paper"}),e.jsx("strong",{children:((r=s.top_trending_paper)==null?void 0:r.title)??"No papers indexed yet"})]}),e.jsxs("div",{className:"organization-card-footer",children:[i?`Publishing ${i}`:"Research archive ready",e.jsx("span",{"aria-hidden":"true",children:"↗"})]})]},s.id)})})]})]})};export{A as default};
assets/{PaperDateFilter-GmvHJTjc.js → PaperDateFilter-CwWio6o1.js} RENAMED
@@ -1 +1 @@
1
- import{r as p,j as n}from"./index-D1SFE8tx.js";import{P as q,a as G,b as Q}from"./popover-BbVqI79y.js";const E=(e,t)=>{const a=new Date(t),s=new Date(a);return s.setUTCDate(a.getUTCDate()-(e==="week"?6:29)),{startDate:s.toISOString().slice(0,10),endDate:a.toISOString().slice(0,10)}},z=e=>({startDate:e.get("start_date")||void 0,endDate:e.get("end_date")||void 0}),oe=(e,t=new Date)=>{const a=z(e);if(a.startDate||a.endDate||e.get("time")==="all_time")return a;const s=new Date(Date.UTC(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()));return E("week",s)},J=(e,t)=>{const a=new URLSearchParams(e);return t.startDate?a.set("start_date",t.startDate):a.delete("start_date"),t.endDate?a.set("end_date",t.endDate):a.delete("end_date"),a.delete("time"),a},ie=(e,t)=>{const a=J(e,t);return!t.startDate&&!t.endDate&&a.set("time","all_time"),a},K=new Intl.DateTimeFormat("en",{month:"long",year:"numeric",timeZone:"UTC"}),O=new Intl.DateTimeFormat("en",{month:"short",timeZone:"UTC"}),L="(max-width: 640px)",X=()=>{const[e,t]=p.useState(()=>typeof window<"u"&&window.matchMedia(L).matches);return p.useEffect(()=>{const a=window.matchMedia(L),s=l=>t(l.matches);return t(a.matches),a.addEventListener("change",s),()=>a.removeEventListener("change",s)},[]),e},V=e=>e.toISOString().slice(0,10),b=e=>new Date(`${e}T00:00:00Z`),ee=()=>{const e=new Date;return new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()))},R=(e,t)=>new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth()+t,1)),M=e=>new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),1)),te=(e,t)=>new Date(Date.UTC(t,e.getUTCMonth(),1)),w=(e,t)=>e.startDate===t.startDate&&e.endDate===t.endDate,ae=(e,t)=>{const a=b(e),s=b(t),l=O.format(a),c=O.format(s),g=a.getUTCDate(),d=s.getUTCDate(),o=a.getUTCFullYear(),u=s.getUTCFullYear();return e===t?`${l} ${g}, ${o}`:o===u&&a.getUTCMonth()===s.getUTCMonth()?`${l} ${g}–${d}, ${o}`:o===u?`${l} ${g}–${c} ${d}, ${o}`:`${l} ${g}, ${o}–${c} ${d}, ${u}`},ne=e=>{const t=e.getUTCFullYear(),a=e.getUTCMonth(),s=new Date(Date.UTC(t,a,1)),l=(s.getUTCDay()+6)%7,c=new Date(s);return c.setUTCDate(s.getUTCDate()-l),Array.from({length:42},(g,d)=>{const o=new Date(c);return o.setUTCDate(c.getUTCDate()+d),{iso:V(o),day:o.getUTCDate(),outsideMonth:o.getUTCMonth()!==a}})},A=({month:e,today:t,startDate:a,endDate:s,onSelect:l,yearLabel:c,yearValue:g,onYearChange:d,secondary:o=!1})=>{const u=p.useMemo(()=>ne(e),[e]);return n.jsxs("section",{className:`paper-date-calendar${o?" paper-date-calendar-secondary":""}`,children:[n.jsxs("label",{className:"paper-date-year",children:[n.jsx("span",{children:c}),n.jsx("input",{type:"number",inputMode:"numeric",min:"1900",max:t.slice(0,4),step:"1",value:g,onChange:r=>d(r.target.value)})]}),n.jsx("h3",{children:K.format(e)}),n.jsx("div",{className:"paper-date-weekdays","aria-hidden":"true",children:["Mon","Tue","Wed","Thu","Fri","Sat","Sun"].map(r=>n.jsx("span",{children:r},r))}),n.jsx("div",{className:"paper-date-days",children:u.map(r=>{const h=r.iso===a||r.iso===s,T=!!(a&&s&&r.iso>a&&r.iso<s),m=r.outsideMonth||r.iso>t;return n.jsx("button",{type:"button","aria-label":r.iso,"aria-selected":h,disabled:m,className:["paper-date-day",r.outsideMonth?"outside":"",h?"selected":"",T?"in-range":"",r.iso===t?"today":""].filter(Boolean).join(" "),onClick:()=>l(r.iso),children:r.day},r.iso)})})]})},I=({calendar:e,onPrevious:t,onNext:a,secondary:s=!1})=>n.jsxs("div",{className:`paper-date-navigation-group${s?" paper-date-navigation-group-secondary":""}`,children:[n.jsx("button",{type:"button","aria-label":`Previous ${e} month`,onClick:t,children:"←"}),n.jsx("button",{type:"button","aria-label":`Next ${e} month`,onClick:a,children:"→"})]}),ce=({startDate:e,endDate:t,onChange:a,currentDate:s})=>{const l=X(),c=s?b(s):ee(),[g,d]=p.useState(!1),[o,u]=p.useState(),[r,h]=p.useState(),[T,m]=p.useState(()=>M(c)),[$,D]=p.useState(()=>R(M(c),1)),[H,y]=p.useState(()=>String(c.getUTCFullYear())),[B,U]=p.useState(()=>String(c.getUTCFullYear())),f={startDate:e,endDate:t},N=E("week",c),Y=E("month",c),P=V(c),v=!!(e&&t&&!w(f,N)&&!w(f,Y)),Z=()=>{u(e),h(t);const i=M(e?b(e):c),C=M(t?b(t):R(i,1));m(i),D(C),y(String(i.getUTCFullYear())),U(String(C.getUTCFullYear())),d(!0)},k=(i,C,F)=>{if(C(i),!/^\d{4}$/.test(i))return;const x=Number(i);x>=1900&&x<=c.getUTCFullYear()&&F(j=>te(j,x))},S=(i,C,F,x)=>{const j=R(i,C);F(j),x(String(j.getUTCFullYear()))},_=i=>{!o||r?(u(i),h(void 0)):i<o?u(i):h(i)},W=()=>{a({}),d(!1)};return n.jsxs("div",{className:`paper-date-filter${l?" paper-date-filter-single-calendar":""}`,role:"group","aria-label":"Publication date",children:[n.jsx("button",{type:"button",className:`sort-btn sort-btn-time${w(f,N)?" active":""}`,onClick:()=>a(N),children:"Last Week"}),n.jsx("button",{type:"button",className:`sort-btn sort-btn-time${w(f,Y)?" active":""}`,onClick:()=>a(Y),children:"Last Month"}),n.jsx("button",{type:"button",className:`sort-btn sort-btn-time${!e&&!t?" active":""}`,onClick:()=>a({}),children:"All Time"}),n.jsxs(q,{open:g,onOpenChange:i=>{i?Z():d(!1)},children:[n.jsx(G,{asChild:!0,children:n.jsx("button",{type:"button",className:`sort-btn sort-btn-time${v?" active":""}`,"aria-label":v?"Change date range":"Select a range",children:v&&e&&t?ae(e,t):"Select a range"})}),n.jsxs(Q,{align:"end",className:`paper-date-popover${l?" paper-date-popover-single-calendar":""}`,role:"dialog","aria-label":"Select a date range",children:[n.jsxs("div",{className:"paper-date-popover-header",children:[n.jsx("h2",{children:"Select a date range"}),n.jsx("p",{children:"Choose an inclusive start and end publication date."})]}),n.jsxs("div",{className:"paper-date-navigation",children:[n.jsx(I,{calendar:"start",onPrevious:()=>S(T,-1,m,y),onNext:()=>S(T,1,m,y)}),!l&&n.jsx(I,{calendar:"end",onPrevious:()=>S($,-1,D,U),onNext:()=>S($,1,D,U),secondary:!0})]}),n.jsxs("div",{className:"paper-date-calendars",children:[n.jsx(A,{month:T,today:P,startDate:o,endDate:r,onSelect:_,yearLabel:l?"Year":"Start year",yearValue:H,onYearChange:i=>k(i,y,m)}),!l&&n.jsx(A,{month:$,today:P,startDate:o,endDate:r,onSelect:_,yearLabel:"End year",yearValue:B,onYearChange:i=>k(i,U,D),secondary:!0})]}),n.jsxs("div",{className:"paper-date-actions",children:[n.jsx("button",{type:"button",className:"paper-date-clear",onClick:W,children:"Clear range"}),n.jsxs("div",{children:[n.jsx("button",{type:"button",onClick:()=>d(!1),children:"Cancel"}),n.jsx("button",{type:"button",className:"paper-date-apply",disabled:!o||!r,onClick:()=>{o&&r&&a({startDate:o,endDate:r}),d(!1)},children:"Apply"})]})]})]})]})]})};export{ce as P,z as a,J as b,oe as r,ie as w};
 
1
+ import{r as p,j as n}from"./index-D6NpXxup.js";import{P as q,a as G,b as Q}from"./popover-VFNGJa2a.js";const E=(e,t)=>{const a=new Date(t),s=new Date(a);return s.setUTCDate(a.getUTCDate()-(e==="week"?6:29)),{startDate:s.toISOString().slice(0,10),endDate:a.toISOString().slice(0,10)}},z=e=>({startDate:e.get("start_date")||void 0,endDate:e.get("end_date")||void 0}),oe=(e,t=new Date)=>{const a=z(e);if(a.startDate||a.endDate||e.get("time")==="all_time")return a;const s=new Date(Date.UTC(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()));return E("week",s)},J=(e,t)=>{const a=new URLSearchParams(e);return t.startDate?a.set("start_date",t.startDate):a.delete("start_date"),t.endDate?a.set("end_date",t.endDate):a.delete("end_date"),a.delete("time"),a},ie=(e,t)=>{const a=J(e,t);return!t.startDate&&!t.endDate&&a.set("time","all_time"),a},K=new Intl.DateTimeFormat("en",{month:"long",year:"numeric",timeZone:"UTC"}),O=new Intl.DateTimeFormat("en",{month:"short",timeZone:"UTC"}),L="(max-width: 640px)",X=()=>{const[e,t]=p.useState(()=>typeof window<"u"&&window.matchMedia(L).matches);return p.useEffect(()=>{const a=window.matchMedia(L),s=l=>t(l.matches);return t(a.matches),a.addEventListener("change",s),()=>a.removeEventListener("change",s)},[]),e},V=e=>e.toISOString().slice(0,10),b=e=>new Date(`${e}T00:00:00Z`),ee=()=>{const e=new Date;return new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()))},R=(e,t)=>new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth()+t,1)),M=e=>new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),1)),te=(e,t)=>new Date(Date.UTC(t,e.getUTCMonth(),1)),w=(e,t)=>e.startDate===t.startDate&&e.endDate===t.endDate,ae=(e,t)=>{const a=b(e),s=b(t),l=O.format(a),c=O.format(s),g=a.getUTCDate(),d=s.getUTCDate(),o=a.getUTCFullYear(),u=s.getUTCFullYear();return e===t?`${l} ${g}, ${o}`:o===u&&a.getUTCMonth()===s.getUTCMonth()?`${l} ${g}–${d}, ${o}`:o===u?`${l} ${g}–${c} ${d}, ${o}`:`${l} ${g}, ${o}–${c} ${d}, ${u}`},ne=e=>{const t=e.getUTCFullYear(),a=e.getUTCMonth(),s=new Date(Date.UTC(t,a,1)),l=(s.getUTCDay()+6)%7,c=new Date(s);return c.setUTCDate(s.getUTCDate()-l),Array.from({length:42},(g,d)=>{const o=new Date(c);return o.setUTCDate(c.getUTCDate()+d),{iso:V(o),day:o.getUTCDate(),outsideMonth:o.getUTCMonth()!==a}})},A=({month:e,today:t,startDate:a,endDate:s,onSelect:l,yearLabel:c,yearValue:g,onYearChange:d,secondary:o=!1})=>{const u=p.useMemo(()=>ne(e),[e]);return n.jsxs("section",{className:`paper-date-calendar${o?" paper-date-calendar-secondary":""}`,children:[n.jsxs("label",{className:"paper-date-year",children:[n.jsx("span",{children:c}),n.jsx("input",{type:"number",inputMode:"numeric",min:"1900",max:t.slice(0,4),step:"1",value:g,onChange:r=>d(r.target.value)})]}),n.jsx("h3",{children:K.format(e)}),n.jsx("div",{className:"paper-date-weekdays","aria-hidden":"true",children:["Mon","Tue","Wed","Thu","Fri","Sat","Sun"].map(r=>n.jsx("span",{children:r},r))}),n.jsx("div",{className:"paper-date-days",children:u.map(r=>{const h=r.iso===a||r.iso===s,T=!!(a&&s&&r.iso>a&&r.iso<s),m=r.outsideMonth||r.iso>t;return n.jsx("button",{type:"button","aria-label":r.iso,"aria-selected":h,disabled:m,className:["paper-date-day",r.outsideMonth?"outside":"",h?"selected":"",T?"in-range":"",r.iso===t?"today":""].filter(Boolean).join(" "),onClick:()=>l(r.iso),children:r.day},r.iso)})})]})},I=({calendar:e,onPrevious:t,onNext:a,secondary:s=!1})=>n.jsxs("div",{className:`paper-date-navigation-group${s?" paper-date-navigation-group-secondary":""}`,children:[n.jsx("button",{type:"button","aria-label":`Previous ${e} month`,onClick:t,children:"←"}),n.jsx("button",{type:"button","aria-label":`Next ${e} month`,onClick:a,children:"→"})]}),ce=({startDate:e,endDate:t,onChange:a,currentDate:s})=>{const l=X(),c=s?b(s):ee(),[g,d]=p.useState(!1),[o,u]=p.useState(),[r,h]=p.useState(),[T,m]=p.useState(()=>M(c)),[$,D]=p.useState(()=>R(M(c),1)),[H,y]=p.useState(()=>String(c.getUTCFullYear())),[B,U]=p.useState(()=>String(c.getUTCFullYear())),f={startDate:e,endDate:t},N=E("week",c),Y=E("month",c),P=V(c),v=!!(e&&t&&!w(f,N)&&!w(f,Y)),Z=()=>{u(e),h(t);const i=M(e?b(e):c),C=M(t?b(t):R(i,1));m(i),D(C),y(String(i.getUTCFullYear())),U(String(C.getUTCFullYear())),d(!0)},k=(i,C,F)=>{if(C(i),!/^\d{4}$/.test(i))return;const x=Number(i);x>=1900&&x<=c.getUTCFullYear()&&F(j=>te(j,x))},S=(i,C,F,x)=>{const j=R(i,C);F(j),x(String(j.getUTCFullYear()))},_=i=>{!o||r?(u(i),h(void 0)):i<o?u(i):h(i)},W=()=>{a({}),d(!1)};return n.jsxs("div",{className:`paper-date-filter${l?" paper-date-filter-single-calendar":""}`,role:"group","aria-label":"Publication date",children:[n.jsx("button",{type:"button",className:`sort-btn sort-btn-time${w(f,N)?" active":""}`,onClick:()=>a(N),children:"Last Week"}),n.jsx("button",{type:"button",className:`sort-btn sort-btn-time${w(f,Y)?" active":""}`,onClick:()=>a(Y),children:"Last Month"}),n.jsx("button",{type:"button",className:`sort-btn sort-btn-time${!e&&!t?" active":""}`,onClick:()=>a({}),children:"All Time"}),n.jsxs(q,{open:g,onOpenChange:i=>{i?Z():d(!1)},children:[n.jsx(G,{asChild:!0,children:n.jsx("button",{type:"button",className:`sort-btn sort-btn-time${v?" active":""}`,"aria-label":v?"Change date range":"Select a range",children:v&&e&&t?ae(e,t):"Select a range"})}),n.jsxs(Q,{align:"end",className:`paper-date-popover${l?" paper-date-popover-single-calendar":""}`,role:"dialog","aria-label":"Select a date range",children:[n.jsxs("div",{className:"paper-date-popover-header",children:[n.jsx("h2",{children:"Select a date range"}),n.jsx("p",{children:"Choose an inclusive start and end publication date."})]}),n.jsxs("div",{className:"paper-date-navigation",children:[n.jsx(I,{calendar:"start",onPrevious:()=>S(T,-1,m,y),onNext:()=>S(T,1,m,y)}),!l&&n.jsx(I,{calendar:"end",onPrevious:()=>S($,-1,D,U),onNext:()=>S($,1,D,U),secondary:!0})]}),n.jsxs("div",{className:"paper-date-calendars",children:[n.jsx(A,{month:T,today:P,startDate:o,endDate:r,onSelect:_,yearLabel:l?"Year":"Start year",yearValue:H,onYearChange:i=>k(i,y,m)}),!l&&n.jsx(A,{month:$,today:P,startDate:o,endDate:r,onSelect:_,yearLabel:"End year",yearValue:B,onYearChange:i=>k(i,U,D),secondary:!0})]}),n.jsxs("div",{className:"paper-date-actions",children:[n.jsx("button",{type:"button",className:"paper-date-clear",onClick:W,children:"Clear range"}),n.jsxs("div",{children:[n.jsx("button",{type:"button",onClick:()=>d(!1),children:"Cancel"}),n.jsx("button",{type:"button",className:"paper-date-apply",disabled:!o||!r,onClick:()=>{o&&r&&a({startDate:o,endDate:r}),d(!1)},children:"Apply"})]})]})]})]})]})};export{ce as P,z as a,J as b,oe as r,ie as w};
assets/{PaperDetailView-BrV1MkbN.js → PaperDetailView-7XF100Ab.js} RENAMED
The diff for this file is too large to render. See raw diff
 
assets/{PaperPreviewLink-D5_ka8a2.js → PaperPreviewLink-BaxpCHGH.js} RENAMED
@@ -1,4 +1,4 @@
1
- import{o as k,f as F,m as b,a as oe,p as O,b as L,n as z,h as le,s as ce,c as ue,v as he,S as pe}from"./index-CZU6xdjr.js";import{l as me}from"./index-DJRFtxnI.js";import{k as D}from"./katex.min-BSBacQyE.js";import{j as m,B as M,O as fe,n as j,ao as de,h as ge,L as E,A as xe}from"./index-D1SFE8tx.js";import{u as ye}from"./useQuery-8sGgldYe.js";import{H as we,a as be,b as Ne}from"./hover-card-BtW3iC4Z.js";import{p as ve}from"./paperQueryKeys-CcqbH5YG.js";import{p as P}from"./papers-Cv1LxXF4.js";import{u as ke}from"./useMutation-BOPUR0a5.js";function Fe(){return{enter:{mathFlow:e,mathFlowFenceMeta:t,mathText:s},exit:{mathFlow:i,mathFlowFence:n,mathFlowFenceMeta:r,mathFlowValue:l,mathText:o,mathTextData:l}};function e(a){const c={type:"element",tagName:"code",properties:{className:["language-math","math-display"]},children:[]};this.enter({type:"math",meta:null,value:"",data:{hName:"pre",hChildren:[c]}},a)}function t(){this.buffer()}function r(){const a=this.resume(),c=this.stack[this.stack.length-1];k(c.type==="math"),c.meta=a}function n(){this.data.mathFlowInside||(this.buffer(),this.data.mathFlowInside=!0)}function i(a){const c=this.resume().replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),h=this.stack[this.stack.length-1];k(h.type==="math"),this.exit(a),h.value=c;const f=h.data.hChildren[0];k(f.type==="element"),k(f.tagName==="code"),f.children.push({type:"text",value:c}),this.data.mathFlowInside=void 0}function s(a){this.enter({type:"inlineMath",value:"",data:{hName:"code",hProperties:{className:["language-math","math-inline"]},hChildren:[]}},a),this.buffer()}function o(a){const c=this.resume(),h=this.stack[this.stack.length-1];k(h.type==="inlineMath"),this.exit(a),h.value=c,h.data.hChildren.push({type:"text",value:c})}function l(a){this.config.enter.data.call(this,a),this.config.exit.data.call(this,a)}}function je(e){let t=(e||{}).singleDollarTextMath;return t==null&&(t=!0),n.peek=i,{unsafe:[{character:"\r",inConstruct:"mathFlowMeta"},{character:`
2
  `,inConstruct:"mathFlowMeta"},{character:"$",after:t?void 0:"\\$",inConstruct:"phrasing"},{character:"$",inConstruct:"mathFlowMeta"},{atBreak:!0,character:"$",after:"\\$"}],handlers:{math:r,inlineMath:n}};function r(s,o,l,a){const c=s.value||"",h=l.createTracker(a),f="$".repeat(Math.max(me(c,"$")+1,2)),g=l.enter("mathFlow");let x=h.move(f);if(s.meta){const d=l.enter("mathFlowMeta");x+=h.move(l.safe(s.meta,{after:`
3
  `,before:x,encode:["$"],...h.current()})),d()}return x+=h.move(`
4
  `),c&&(x+=h.move(c+`
 
1
+ import{o as k,f as F,m as b,a as oe,p as O,b as L,n as z,h as le,s as ce,c as ue,v as he,S as pe}from"./index-BiPn19VT.js";import{l as me}from"./index-PW6rRKKS.js";import D from"./katex-DkKDou_j.js";import{j as m,B as M,O as fe,n as j,ao as de,h as ge,L as E,A as xe}from"./index-D6NpXxup.js";import{u as ye}from"./useQuery-BSzsAAZV.js";import{H as we,a as be,b as Ne}from"./hover-card-C5GFpPJ1.js";import{p as ve}from"./paperQueryKeys-CcqbH5YG.js";import{p as P}from"./papers-CJuRKhYV.js";import{u as ke}from"./useMutation-DI9QqXsO.js";function Fe(){return{enter:{mathFlow:e,mathFlowFenceMeta:t,mathText:s},exit:{mathFlow:i,mathFlowFence:n,mathFlowFenceMeta:r,mathFlowValue:l,mathText:o,mathTextData:l}};function e(a){const c={type:"element",tagName:"code",properties:{className:["language-math","math-display"]},children:[]};this.enter({type:"math",meta:null,value:"",data:{hName:"pre",hChildren:[c]}},a)}function t(){this.buffer()}function r(){const a=this.resume(),c=this.stack[this.stack.length-1];k(c.type==="math"),c.meta=a}function n(){this.data.mathFlowInside||(this.buffer(),this.data.mathFlowInside=!0)}function i(a){const c=this.resume().replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),h=this.stack[this.stack.length-1];k(h.type==="math"),this.exit(a),h.value=c;const f=h.data.hChildren[0];k(f.type==="element"),k(f.tagName==="code"),f.children.push({type:"text",value:c}),this.data.mathFlowInside=void 0}function s(a){this.enter({type:"inlineMath",value:"",data:{hName:"code",hProperties:{className:["language-math","math-inline"]},hChildren:[]}},a),this.buffer()}function o(a){const c=this.resume(),h=this.stack[this.stack.length-1];k(h.type==="inlineMath"),this.exit(a),h.value=c,h.data.hChildren.push({type:"text",value:c})}function l(a){this.config.enter.data.call(this,a),this.config.exit.data.call(this,a)}}function je(e){let t=(e||{}).singleDollarTextMath;return t==null&&(t=!0),n.peek=i,{unsafe:[{character:"\r",inConstruct:"mathFlowMeta"},{character:`
2
  `,inConstruct:"mathFlowMeta"},{character:"$",after:t?void 0:"\\$",inConstruct:"phrasing"},{character:"$",inConstruct:"mathFlowMeta"},{atBreak:!0,character:"$",after:"\\$"}],handlers:{math:r,inlineMath:n}};function r(s,o,l,a){const c=s.value||"",h=l.createTracker(a),f="$".repeat(Math.max(me(c,"$")+1,2)),g=l.enter("mathFlow");let x=h.move(f);if(s.meta){const d=l.enter("mathFlowMeta");x+=h.move(l.safe(s.meta,{after:`
3
  `,before:x,encode:["$"],...h.current()})),d()}return x+=h.move(`
4
  `),c&&(x+=h.move(c+`
assets/PaperReaderView-C9PdgbAR.js DELETED
@@ -1 +0,0 @@
1
- import{u as oe,j as o,b as je,n as $e,O as ie,r as s,Q as Ie,L as K}from"./index-D1SFE8tx.js";import{u as Ae}from"./useQuery-8sGgldYe.js";import{A as ke,u as Ne,a as Ee,P as Te}from"./ArtifactWorkspace-DKr_vDVE.js";import{b as ze}from"./usePapers-jBjTfCJU.js";import{c as Le}from"./chat-CaGUU5iT.js";import{s as q}from"./safeExternalHref-CkBrsh84.js";import{ChatExperience as Fe}from"./ChatView-BpLTEg-e.js";import"./chatLaunch-DE6TPfMe.js";import"./chevron-down-BlzggtLy.js";import"./papers-Cv1LxXF4.js";import"./katex.min-BSBacQyE.js";import"./hover-card-BtW3iC4Z.js";import"./github-BF3kA9OC.js";import"./github-RNL764mH.js";import"./PaperPreviewLink-D5_ka8a2.js";import"./index-CZU6xdjr.js";import"./index-DJRFtxnI.js";import"./paperQueryKeys-CcqbH5YG.js";import"./useMutation-BOPUR0a5.js";import"./copy-Dn7dfg-f.js";import"./file-text-Bsi3wgDE.js";import"./external-link-CbOEnNr7.js";import"./useInfiniteQuery-rPEO6e6c.js";import"./chatPrompts-CDY3UGU1.js";import"./openrouter-C8OOjJA3.js";import"./queryOptions-C9woPjwX.js";const ce=66,He=240,O="pwc:reader:split-ratio",k=r=>`pwc:reader:session:${r}`,B=r=>`pwc:reader:assistant-collapsed:${r}`,le=r=>`pwc:reader:page:${r}`;function D(r){const i=Number(sessionStorage.getItem(le(r)));return Number.isInteger(i)&&i>0?i:1}function Me(){const r=Number(localStorage.getItem(O));return Number.isFinite(r)&&r>=45&&r<=75?r:ce}function Ue(r){const i=q(r);if(!i)return null;const n=new URL(i);return(n.hostname==="arxiv.org"||n.hostname==="www.arxiv.org")&&n.pathname.startsWith("/pdf/")&&n.pathname.endsWith(".pdf")&&(n.pathname=n.pathname.slice(0,-4)),n.href}const We=/^\/pdf\/(\d{4}\.\d{4,5}(?:v\d{1,3})?|[a-z]+(?:-[a-z]+)*(?:\.[A-Z]{2})?\/\d{7}(?:v\d{1,3})?)$/;function Ke(r){const i=new URL(r),n=i.pathname.match(We);return(i.hostname==="arxiv.org"||i.hostname==="www.arxiv.org")&&n&&!i.search?ie(`/paper-assets/arxiv-pdf/${n[1]}`)??r:r}function Be(r){return new URL(r).hostname.replace(/^www\./,"")}function De(r){if(!r)return{};const i={};for(const u of r.repositories??[]){if(!u.is_official)continue;const t=q(u.url);if(!t)continue;const m=new URL(t),w=m.pathname.split("/").filter(Boolean);if((m.hostname==="github.com"||m.hostname==="www.github.com")&&w.length>=2){i.repository={href:t,stars:u.num_stars||0};break}}const n=[...r.project_pages??[]].sort((u,t)=>Number(t.is_official)-Number(u.is_official));for(const u of n){const t=q(u.url);if(t){i.projectPage={href:t,label:Be(t)};break}}const v=r.hf_artifact_summary?r.hf_artifact_summary.model_count+r.hf_artifact_summary.dataset_count+r.hf_artifact_summary.space_count:new Set([...r.hf_models??[],...r.hf_datasets??[],...r.hf_spaces??[]]).size;return v>0&&r.arxiv_id&&(i.huggingFace={href:`https://huggingface.co/papers/${r.arxiv_id.replace(/v\d+$/i,"")}`,count:v}),i}function qe(){var re,ae,se,ne;const r=je(),{paperId:i}=oe(),n=$e(i??"").replace(/v\d+$/i,""),v=ze(n,!!n),u=Ae({queryKey:["chatAvailability"],queryFn:()=>Le.getAvailability(),refetchInterval:3e4,retry:!1}),t=v.data,m=(t==null?void 0:t.source)==="external"?ie(`/paper-assets/external/${t.id}/paper.pdf`):Ue(t==null?void 0:t.url_pdf),w=m&&(t==null?void 0:t.source)!=="external"?Ke(m):m,de=De(t),f=((re=t==null?void 0:t.arxiv_id)==null?void 0:re.replace(/v\d+$/i,""))||n,ue=s.useCallback(()=>r(`/paper/${f}`),[f,r]),[y,N]=s.useState(()=>sessionStorage.getItem(k(n))||void 0),[R,E]=s.useState(Me),[p,V]=s.useState(()=>sessionStorage.getItem(B(n))==="1"),[h,C]=s.useState("paper"),[T,x]=s.useState(),[pe,b]=s.useState(""),[fe,me]=s.useState(()=>D(n)),[P,he]=s.useState(0),[X,Q]=s.useState(!1),[ge,z]=s.useState(!1),_=s.useRef(null),L=s.useRef(null),F=s.useRef(null),Y=s.useRef(null),j=s.useRef(!1),$=s.useRef(0),g=s.useRef(0),H=s.useRef(0),S=s.useRef(R),M=s.useRef(D(n)),U=s.useRef(t==null?void 0:t.version),Z=Ne().reset,G=s.useRef(`${n}:${y??"new"}`),c=P>=840;s.useEffect(()=>{const e=`${n}:${y??"new"}`;G.current!==e&&(G.current=e,Z())},[y,Z,n]),s.useEffect(()=>{t!=null&&t.version&&U.current&&t.version!==U.current&&(x(void 0),b("")),U.current=t==null?void 0:t.version},[t==null?void 0:t.version]),s.useEffect(()=>{window.clearTimeout($.current),z(!1);const e=sessionStorage.getItem(k(n));N(e||void 0),V(sessionStorage.getItem(B(n))==="1"),C("paper"),x(void 0),b("");const a=D(n);M.current=a,me(a)},[n]),s.useEffect(()=>()=>{window.clearTimeout($.current),cancelAnimationFrame(g.current)},[]),s.useLayoutEffect(()=>{const e=_.current;if(!e)return;const a=()=>he(e.clientWidth);a();const l=new ResizeObserver(a);return l.observe(e),()=>l.disconnect()},[t]),s.useEffect(()=>{if(!t)return;document.title=`${t.title} — Papers With Code reader`;let e=document.querySelector('meta[name="robots"]');const a=!e;e||(e=document.createElement("meta"),e.name="robots",document.head.appendChild(e));const l=e.content;e.content="noindex, nofollow";let d=document.querySelector('link[rel="canonical"]');const Ce=!d;d||(d=document.createElement("link"),d.rel="canonical",document.head.appendChild(d));const _e=d.href;return d.href=`${window.location.origin}/paper/${f}`,()=>{document.title="Papers With Code",a?e==null||e.remove():e&&(e.content=l),Ce?d==null||d.remove():d&&(d.href=_e)}},[f,t]);const I=s.useCallback(e=>{if(!P)return Math.max(45,Math.min(75,e));const a=480/P*100,l=100-360/P*100;return Math.max(a,Math.min(l,e))},[P]);s.useEffect(()=>E(e=>{const a=I(e);return S.current=a,a}),[I]);const A=e=>{const a=I(e);S.current=a,E(a),localStorage.setItem(O,String(a))},J=e=>{var l;const a=I(e);S.current=a,L.current&&(L.current.style.width=`${a}%`),F.current&&(F.current.style.width=`${100-a}%`),(l=Y.current)==null||l.setAttribute("aria-valuenow",String(Math.round(a)))},ee=e=>{H.current=e,!g.current&&(g.current=requestAnimationFrame(()=>{var l;g.current=0;const a=(l=_.current)==null?void 0:l.getBoundingClientRect();a!=null&&a.width&&J((H.current-a.left)/a.width*100)}))},ve=e=>{j.current=!0,Q(!0),e.currentTarget.setPointerCapture(e.pointerId),ee(e.clientX)},W=()=>{var e;if(j.current){if(g.current){cancelAnimationFrame(g.current),g.current=0;const a=(e=_.current)==null?void 0:e.getBoundingClientRect();a!=null&&a.width&&J((H.current-a.left)/a.width*100)}j.current=!1,E(S.current),localStorage.setItem(O,String(S.current)),Q(!1)}},te=e=>{window.clearTimeout($.current),z(!0),V(e),sessionStorage.setItem(B(n),e?"1":"0"),$.current=window.setTimeout(()=>z(!1),He+40)},be=e=>{N(e),sessionStorage.setItem(k(n),e)},we=()=>{N(void 0),sessionStorage.removeItem(k(n)),x(void 0),b("")},Re=((ae=u.data)==null?void 0:ae.paper_reader_selection_enabled)===!0,xe=e=>{x(e),b(`Selection from page ${e.page} added to chat`),c&&p&&te(!1)},Pe=s.useCallback(e=>{x(e),e||b("")},[]),Se=Ie()&&((se=u.data)==null?void 0:se.paper_reader_chat_enabled)!==!1,ye=t&&Se?o.jsx(Fe,{mode:"paper",routeSessionId:y,primaryPaper:{id:t.id,routeId:f,title:t.title},currentPage:()=>M.current,paperSelection:T,onPaperSelectionChange:Pe,onSessionId:be,onReaderSubmit:()=>C("assistant"),onReaderNewChat:we}):o.jsx("div",{className:"reader-chat-unavailable",children:"Chat is not enabled for this preview."});return v.isLoading?o.jsx("div",{className:"reader-status",role:"status",children:"Loading paper…"}):v.error||!t?o.jsxs("div",{className:"reader-status",role:"alert",children:[o.jsx("p",{children:"Paper not found."}),o.jsx(K,{to:"/papers",children:"Browse papers"})]}):((ne=u.data)==null?void 0:ne.native_pdf_reader_enabled)===!1?o.jsxs("div",{className:"reader-status",role:"alert",children:[o.jsx("p",{children:"The native reader is currently unavailable."}),o.jsx(K,{to:`/paper/${f}`,children:"Back to paper"})]}):w?o.jsxs("div",{className:"paper-reader-shell",children:[!c&&o.jsxs("div",{className:"reader-tabs",role:"tablist","aria-label":"Reader panels",children:[o.jsx("button",{type:"button",role:"tab","aria-selected":h==="paper",onClick:()=>C("paper"),children:"Paper"}),o.jsxs("button",{type:"button",role:"tab","aria-selected":h==="assistant","aria-label":T&&h!=="assistant"?"Chat, selection attached":"Chat",onClick:()=>C("assistant"),children:["Chat",T&&h!=="assistant"&&o.jsx("span",{className:"reader-tab-pending","aria-hidden":"true"})]})]}),o.jsx(Ee,{variant:"reader",children:o.jsxs("div",{ref:_,className:`reader-workspace${c?" is-desktop":" is-tabs"}${p?" is-assistant-collapsed":""}${X?" is-resizing":""}`,"data-testid":"paper-chat-workspace",children:[o.jsx("section",{ref:L,className:`reader-paper-pane${!c&&h!=="paper"?" is-hidden":""}`,style:c?{width:p?"100%":`${R}%`}:void 0,role:"tabpanel","aria-label":"Paper","aria-hidden":!c&&h!=="paper",children:o.jsx(Te,{url:w,downloadUrl:m??w,paperKey:f,paperTitle:t.title,paperHref:`/paper/${f}`,onClose:ue,resources:de,initialPage:fe,resizeActive:X||ge,selectionEnabled:Re,paperVersion:t.version,loadErrorMessage:t.source==="external"?"Paper content is still being prepared. Please try again later.":void 0,onPaperSelection:xe,onPaperSelectionError:b,onPageChange:e=>{M.current=e,sessionStorage.setItem(le(n),String(e))}})}),c&&!p&&o.jsx("div",{ref:Y,className:"reader-resize-handle",role:"separator","aria-label":"Resize paper and Chat panels","aria-orientation":"vertical","aria-valuemin":45,"aria-valuemax":75,"aria-valuenow":Math.round(R),tabIndex:0,onPointerDown:ve,onPointerMove:e=>{j.current&&ee(e.clientX)},onPointerUp:W,onPointerCancel:W,onLostPointerCapture:W,onDoubleClick:()=>A(ce),onKeyDown:e=>{(e.key==="ArrowLeft"||e.key==="ArrowRight")&&(e.preventDefault(),A(R+(e.key==="ArrowRight"?2:-2))),e.key==="Home"&&A(45),e.key==="End"&&A(75)}}),o.jsx("aside",{ref:F,id:"reader-chat-panel",className:`reader-assistant-pane${!c&&h!=="assistant"?" is-hidden":""}${c&&p?" is-collapsed":""}`,style:c?{width:p?0:`${100-R}%`}:void 0,role:"tabpanel","aria-label":"Chat","aria-hidden":!c&&h!=="assistant"||p,children:ye}),o.jsx("div",{className:"sr-only","aria-live":"polite",children:pe}),c&&o.jsx("button",{type:"button",className:"reader-collapse-assistant","aria-controls":"reader-chat-panel","aria-expanded":!p,onClick:()=>te(!p),children:p?"Open chat":"Hide chat"})]})})]}):o.jsxs("div",{className:"reader-status",role:"alert",children:[o.jsx("p",{children:"Native reading is unavailable for this resource."}),o.jsx(K,{to:`/paper/${f}`,children:"Back to paper"})]})}function wt(){const{paperId:r=""}=oe();return o.jsx(ke,{workspaceKey:`reader:${r}`,children:o.jsx(qe,{})})}export{wt as default,De as readerToolbarResources};
 
 
assets/PaperReaderView-DqaAd3re.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import{u as oe,j as o,b as je,n as $e,O as ie,r as s,Q as Ie,L as K}from"./index-D6NpXxup.js";import{u as Ae}from"./useQuery-BSzsAAZV.js";import{A as ke,u as Ne,a as Ee,P as Te}from"./ArtifactWorkspace-B7lf_s0k.js";import{b as ze}from"./usePapers-D7q7tNxt.js";import{c as Le}from"./chat-CtW0GA2A.js";import{s as q}from"./safeExternalHref-CkBrsh84.js";import{ChatExperience as Fe}from"./ChatView-Cb4CdzFN.js";import"./chatLaunch-KGz9i5Uq.js";import"./chevron-down-BkB1bFLS.js";import"./papers-CJuRKhYV.js";/* empty css */import"./hover-card-C5GFpPJ1.js";import"./github-quuMVjBU.js";import"./github-CM8g5cw_.js";import"./PaperPreviewLink-BaxpCHGH.js";import"./index-BiPn19VT.js";import"./index-PW6rRKKS.js";import"./katex-DkKDou_j.js";import"./paperQueryKeys-CcqbH5YG.js";import"./useMutation-DI9QqXsO.js";import"./copy-ClJTXvCU.js";import"./file-text-ltUPoEqb.js";import"./external-link-CCoWzQWa.js";import"./useInfiniteQuery-BA3fe-wV.js";import"./chatPrompts-CDY3UGU1.js";import"./openrouter-CamRGky-.js";import"./queryOptions-C9woPjwX.js";const ce=66,He=240,O="pwc:reader:split-ratio",k=r=>`pwc:reader:session:${r}`,B=r=>`pwc:reader:assistant-collapsed:${r}`,le=r=>`pwc:reader:page:${r}`;function D(r){const i=Number(sessionStorage.getItem(le(r)));return Number.isInteger(i)&&i>0?i:1}function Me(){const r=Number(localStorage.getItem(O));return Number.isFinite(r)&&r>=45&&r<=75?r:ce}function Ue(r){const i=q(r);if(!i)return null;const n=new URL(i);return(n.hostname==="arxiv.org"||n.hostname==="www.arxiv.org")&&n.pathname.startsWith("/pdf/")&&n.pathname.endsWith(".pdf")&&(n.pathname=n.pathname.slice(0,-4)),n.href}const We=/^\/pdf\/(\d{4}\.\d{4,5}(?:v\d{1,3})?|[a-z]+(?:-[a-z]+)*(?:\.[A-Z]{2})?\/\d{7}(?:v\d{1,3})?)$/;function Ke(r){const i=new URL(r),n=i.pathname.match(We);return(i.hostname==="arxiv.org"||i.hostname==="www.arxiv.org")&&n&&!i.search?ie(`/paper-assets/arxiv-pdf/${n[1]}`)??r:r}function Be(r){return new URL(r).hostname.replace(/^www\./,"")}function De(r){if(!r)return{};const i={};for(const u of r.repositories??[]){if(!u.is_official)continue;const t=q(u.url);if(!t)continue;const m=new URL(t),w=m.pathname.split("/").filter(Boolean);if((m.hostname==="github.com"||m.hostname==="www.github.com")&&w.length>=2){i.repository={href:t,stars:u.num_stars||0};break}}const n=[...r.project_pages??[]].sort((u,t)=>Number(t.is_official)-Number(u.is_official));for(const u of n){const t=q(u.url);if(t){i.projectPage={href:t,label:Be(t)};break}}const v=r.hf_artifact_summary?r.hf_artifact_summary.model_count+r.hf_artifact_summary.dataset_count+r.hf_artifact_summary.space_count:new Set([...r.hf_models??[],...r.hf_datasets??[],...r.hf_spaces??[]]).size;return v>0&&r.arxiv_id&&(i.huggingFace={href:`https://huggingface.co/papers/${r.arxiv_id.replace(/v\d+$/i,"")}`,count:v}),i}function qe(){var re,ae,se,ne;const r=je(),{paperId:i}=oe(),n=$e(i??"").replace(/v\d+$/i,""),v=ze(n,!!n),u=Ae({queryKey:["chatAvailability"],queryFn:()=>Le.getAvailability(),refetchInterval:3e4,retry:!1}),t=v.data,m=(t==null?void 0:t.source)==="external"?ie(`/paper-assets/external/${t.id}/paper.pdf`):Ue(t==null?void 0:t.url_pdf),w=m&&(t==null?void 0:t.source)!=="external"?Ke(m):m,de=De(t),f=((re=t==null?void 0:t.arxiv_id)==null?void 0:re.replace(/v\d+$/i,""))||n,ue=s.useCallback(()=>r(`/paper/${f}`),[f,r]),[y,N]=s.useState(()=>sessionStorage.getItem(k(n))||void 0),[R,E]=s.useState(Me),[p,V]=s.useState(()=>sessionStorage.getItem(B(n))==="1"),[h,C]=s.useState("paper"),[T,x]=s.useState(),[pe,b]=s.useState(""),[fe,me]=s.useState(()=>D(n)),[P,he]=s.useState(0),[X,Q]=s.useState(!1),[ge,z]=s.useState(!1),_=s.useRef(null),L=s.useRef(null),F=s.useRef(null),Y=s.useRef(null),j=s.useRef(!1),$=s.useRef(0),g=s.useRef(0),H=s.useRef(0),S=s.useRef(R),M=s.useRef(D(n)),U=s.useRef(t==null?void 0:t.version),Z=Ne().reset,G=s.useRef(`${n}:${y??"new"}`),c=P>=840;s.useEffect(()=>{const e=`${n}:${y??"new"}`;G.current!==e&&(G.current=e,Z())},[y,Z,n]),s.useEffect(()=>{t!=null&&t.version&&U.current&&t.version!==U.current&&(x(void 0),b("")),U.current=t==null?void 0:t.version},[t==null?void 0:t.version]),s.useEffect(()=>{window.clearTimeout($.current),z(!1);const e=sessionStorage.getItem(k(n));N(e||void 0),V(sessionStorage.getItem(B(n))==="1"),C("paper"),x(void 0),b("");const a=D(n);M.current=a,me(a)},[n]),s.useEffect(()=>()=>{window.clearTimeout($.current),cancelAnimationFrame(g.current)},[]),s.useLayoutEffect(()=>{const e=_.current;if(!e)return;const a=()=>he(e.clientWidth);a();const l=new ResizeObserver(a);return l.observe(e),()=>l.disconnect()},[t]),s.useEffect(()=>{if(!t)return;document.title=`${t.title} — Papers With Code reader`;let e=document.querySelector('meta[name="robots"]');const a=!e;e||(e=document.createElement("meta"),e.name="robots",document.head.appendChild(e));const l=e.content;e.content="noindex, nofollow";let d=document.querySelector('link[rel="canonical"]');const Ce=!d;d||(d=document.createElement("link"),d.rel="canonical",document.head.appendChild(d));const _e=d.href;return d.href=`${window.location.origin}/paper/${f}`,()=>{document.title="Papers With Code",a?e==null||e.remove():e&&(e.content=l),Ce?d==null||d.remove():d&&(d.href=_e)}},[f,t]);const I=s.useCallback(e=>{if(!P)return Math.max(45,Math.min(75,e));const a=480/P*100,l=100-360/P*100;return Math.max(a,Math.min(l,e))},[P]);s.useEffect(()=>E(e=>{const a=I(e);return S.current=a,a}),[I]);const A=e=>{const a=I(e);S.current=a,E(a),localStorage.setItem(O,String(a))},J=e=>{var l;const a=I(e);S.current=a,L.current&&(L.current.style.width=`${a}%`),F.current&&(F.current.style.width=`${100-a}%`),(l=Y.current)==null||l.setAttribute("aria-valuenow",String(Math.round(a)))},ee=e=>{H.current=e,!g.current&&(g.current=requestAnimationFrame(()=>{var l;g.current=0;const a=(l=_.current)==null?void 0:l.getBoundingClientRect();a!=null&&a.width&&J((H.current-a.left)/a.width*100)}))},ve=e=>{j.current=!0,Q(!0),e.currentTarget.setPointerCapture(e.pointerId),ee(e.clientX)},W=()=>{var e;if(j.current){if(g.current){cancelAnimationFrame(g.current),g.current=0;const a=(e=_.current)==null?void 0:e.getBoundingClientRect();a!=null&&a.width&&J((H.current-a.left)/a.width*100)}j.current=!1,E(S.current),localStorage.setItem(O,String(S.current)),Q(!1)}},te=e=>{window.clearTimeout($.current),z(!0),V(e),sessionStorage.setItem(B(n),e?"1":"0"),$.current=window.setTimeout(()=>z(!1),He+40)},be=e=>{N(e),sessionStorage.setItem(k(n),e)},we=()=>{N(void 0),sessionStorage.removeItem(k(n)),x(void 0),b("")},Re=((ae=u.data)==null?void 0:ae.paper_reader_selection_enabled)===!0,xe=e=>{x(e),b(`Selection from page ${e.page} added to chat`),c&&p&&te(!1)},Pe=s.useCallback(e=>{x(e),e||b("")},[]),Se=Ie()&&((se=u.data)==null?void 0:se.paper_reader_chat_enabled)!==!1,ye=t&&Se?o.jsx(Fe,{mode:"paper",routeSessionId:y,primaryPaper:{id:t.id,routeId:f,title:t.title},currentPage:()=>M.current,paperSelection:T,onPaperSelectionChange:Pe,onSessionId:be,onReaderSubmit:()=>C("assistant"),onReaderNewChat:we}):o.jsx("div",{className:"reader-chat-unavailable",children:"Chat is not enabled for this preview."});return v.isLoading?o.jsx("div",{className:"reader-status",role:"status",children:"Loading paper…"}):v.error||!t?o.jsxs("div",{className:"reader-status",role:"alert",children:[o.jsx("p",{children:"Paper not found."}),o.jsx(K,{to:"/papers",children:"Browse papers"})]}):((ne=u.data)==null?void 0:ne.native_pdf_reader_enabled)===!1?o.jsxs("div",{className:"reader-status",role:"alert",children:[o.jsx("p",{children:"The native reader is currently unavailable."}),o.jsx(K,{to:`/paper/${f}`,children:"Back to paper"})]}):w?o.jsxs("div",{className:"paper-reader-shell",children:[!c&&o.jsxs("div",{className:"reader-tabs",role:"tablist","aria-label":"Reader panels",children:[o.jsx("button",{type:"button",role:"tab","aria-selected":h==="paper",onClick:()=>C("paper"),children:"Paper"}),o.jsxs("button",{type:"button",role:"tab","aria-selected":h==="assistant","aria-label":T&&h!=="assistant"?"Chat, selection attached":"Chat",onClick:()=>C("assistant"),children:["Chat",T&&h!=="assistant"&&o.jsx("span",{className:"reader-tab-pending","aria-hidden":"true"})]})]}),o.jsx(Ee,{variant:"reader",children:o.jsxs("div",{ref:_,className:`reader-workspace${c?" is-desktop":" is-tabs"}${p?" is-assistant-collapsed":""}${X?" is-resizing":""}`,"data-testid":"paper-chat-workspace",children:[o.jsx("section",{ref:L,className:`reader-paper-pane${!c&&h!=="paper"?" is-hidden":""}`,style:c?{width:p?"100%":`${R}%`}:void 0,role:"tabpanel","aria-label":"Paper","aria-hidden":!c&&h!=="paper",children:o.jsx(Te,{url:w,downloadUrl:m??w,paperKey:f,paperTitle:t.title,paperHref:`/paper/${f}`,onClose:ue,resources:de,initialPage:fe,resizeActive:X||ge,selectionEnabled:Re,paperVersion:t.version,loadErrorMessage:t.source==="external"?"Paper content is still being prepared. Please try again later.":void 0,onPaperSelection:xe,onPaperSelectionError:b,onPageChange:e=>{M.current=e,sessionStorage.setItem(le(n),String(e))}})}),c&&!p&&o.jsx("div",{ref:Y,className:"reader-resize-handle",role:"separator","aria-label":"Resize paper and Chat panels","aria-orientation":"vertical","aria-valuemin":45,"aria-valuemax":75,"aria-valuenow":Math.round(R),tabIndex:0,onPointerDown:ve,onPointerMove:e=>{j.current&&ee(e.clientX)},onPointerUp:W,onPointerCancel:W,onLostPointerCapture:W,onDoubleClick:()=>A(ce),onKeyDown:e=>{(e.key==="ArrowLeft"||e.key==="ArrowRight")&&(e.preventDefault(),A(R+(e.key==="ArrowRight"?2:-2))),e.key==="Home"&&A(45),e.key==="End"&&A(75)}}),o.jsx("aside",{ref:F,id:"reader-chat-panel",className:`reader-assistant-pane${!c&&h!=="assistant"?" is-hidden":""}${c&&p?" is-collapsed":""}`,style:c?{width:p?0:`${100-R}%`}:void 0,role:"tabpanel","aria-label":"Chat","aria-hidden":!c&&h!=="assistant"||p,children:ye}),o.jsx("div",{className:"sr-only","aria-live":"polite",children:pe}),c&&o.jsx("button",{type:"button",className:"reader-collapse-assistant","aria-controls":"reader-chat-panel","aria-expanded":!p,onClick:()=>te(!p),children:p?"Open chat":"Hide chat"})]})})]}):o.jsxs("div",{className:"reader-status",role:"alert",children:[o.jsx("p",{children:"Native reading is unavailable for this resource."}),o.jsx(K,{to:`/paper/${f}`,children:"Back to paper"})]})}function Rt(){const{paperId:r=""}=oe();return o.jsx(ke,{workspaceKey:`reader:${r}`,children:o.jsx(qe,{})})}export{Rt as default,De as readerToolbarResources};
assets/PapersListView-DNBWUF1o.js DELETED
@@ -1 +0,0 @@
1
- import{c as X,r as x,A as J,j as e,L as j,i as W}from"./index-D1SFE8tx.js";import{I as U,T as Y,P as Z}from"./components-BAR1mYoW.js";import{c as ee}from"./catalog-BIqvVz-s.js";import{t as se,d as ae}from"./transform-BmaYjIy4.js";import{u as re,a as te}from"./usePapers-jBjTfCJU.js";import{u as ne}from"./useDebounce-BDnCoyu6.js";import{u as ie,P as oe}from"./useIntersectionObserver-BPOzk2Hc.js";import{S as _}from"./skeleton-D5wy8oMn.js";import{A as ce,a as le}from"./alert-D8tgAf4z.js";import{u as de}from"./useQuery-8sGgldYe.js";import{a as me,P as he,b as pe}from"./PaperDateFilter-GmvHJTjc.js";import"./paperQueryKeys-CcqbH5YG.js";import"./LatexTitle-C3kQa1rr.js";import"./katex.min-BSBacQyE.js";import"./papers-Cv1LxXF4.js";import"./safeExternalHref-CkBrsh84.js";import"./useInfiniteQuery-rPEO6e6c.js";import"./popover-BbVqI79y.js";const v=360;function ue(a,o){const m=a.toLocaleLowerCase();return o.trim().split(/\s+/).filter(Boolean).reduce((c,t)=>{const l=m.indexOf(t.toLocaleLowerCase());return l>=0&&(c<0||l<c)?l:c},-1)}function z(a,o,m){if((a.slice(0,o).match(/\$/g)||[]).length%2===0)return o;if(m==="start")return a.lastIndexOf("$",o)+1;const t=a.indexOf("$",o);return t>=0?t+1:o}function fe(a,o){if(a.length<=v)return a;const m=ue(a,o);if(m<0||m<v*.6)return a;let c=Math.max(0,m-Math.floor(v*.35)),t=Math.min(a.length,c+v);return c=z(a,c,"start"),t=z(a,t,"end"),`${c>0?"…":""}${a.slice(c,t).trim()}${t<a.length?"…":""}`}const xe=[["trending","trending"],["new","newest"],["cited","most cited"]],ge=[["relevance","relevance"],["new","newest"],["cited","most cited"]],je=a=>new Intl.NumberFormat("en",{notation:a>=1e3?"compact":"standard",maximumFractionDigits:1}).format(a),Oe=()=>{var I,$,T,O,B,H,M,q,G;const[a,o]=X(),m=a.get("framework")||void 0,c=a.get("repository")||void 0,t=!!(m||c),l=a.get("search")||"",[F,C]=x.useState(l),p=ne(F,300),n=!t&&l.trim().length>0;x.useEffect(()=>C(l),[l]),x.useEffect(()=>{if(p===l)return;const s=new URLSearchParams(a);p?s.set("search",p):s.delete("search"),o(s,{replace:!0})},[p]),x.useEffect(()=>{const s=a.get("order_by"),i=new URLSearchParams(a);n&&!["relevance","date_published","citation_count"].includes(s||"")?(i.set("order_by","relevance"),o(i,{replace:!0})):!n&&s==="relevance"&&(i.delete("order_by"),o(i,{replace:!0}))},[n,a,o]);const L=a.get("order_by"),g=L==="citation_count"?"cited":L==="date_published"?"new":n?"relevance":"trending",u=me(a),w=a.get("has_hf_artifacts")==="true",k=!t&&a.get("has_code")==="true",y=(s,i)=>{const h=new URLSearchParams(a);i?h.set(s,i):h.delete(s),o(h)},Q=s=>{y("order_by",s==="cited"?"citation_count":s==="new"?"date_published":s)},b=re({page_size:20,order_by:g==="trending"?"trending":g==="cited"?"citation_count":"date_published",order_dir:"desc",search:t&&p||void 0,start_date:u.startDate,end_date:u.endDate,include_resources:!0,conference:a.get("conference")||void 0,latest_only:a.get("latest_only")!=="false",has_code:k,has_hf_artifacts:w,framework:m,repository:c,enabled:!n}),R=te({q:p.trim(),order_by:g==="cited"?"citation_count":g==="new"?"date_published":"relevance",start_date:u.startDate,end_date:u.endDate,has_code:k,has_hf_artifacts:w,enabled:n}),d=n?R:b,A=de({queryKey:["top-tasks-sidebar"],queryFn:()=>ee.topTasks(8),enabled:!t&&!n,staleTime:10*60*1e3}),N=x.useMemo(()=>{var i;return(((i=d.data)==null?void 0:i.pages.flatMap(h=>h.results))||[]).map(h=>{const S=se(h);return n?{...S,abstract:fe(S.abstract,l)}:S})},[d.data,n,l]),{targetRef:K,isIntersecting:D}=ie({rootMargin:"200px"});x.useEffect(()=>{D&&d.hasNextPage&&!d.isFetchingNextPage&&d.fetchNextPage()},[D,d.hasNextPage,d.isFetchingNextPage]);const f=((T=($=(I=b.data)==null?void 0:I.pages)==null?void 0:$[0])==null?void 0:T.count)??0,r=(H=(B=(O=b.data)==null?void 0:O.pages)==null?void 0:B[0])==null?void 0:H.scope,P=(q=(M=R.data)==null?void 0:M.pages)==null?void 0:q.at(-1),E=m&&d.error instanceof J&&d.error.status===404,V=(r==null?void 0:r.kind)==="framework"?r.framework_name:r==null?void 0:r.repository;return e.jsxs("div",{className:"page",children:[(r==null?void 0:r.kind)==="framework"&&e.jsxs("nav",{className:"breadcrumb","aria-label":"Breadcrumb",children:[e.jsx(j,{to:"/",children:"Papers"}),e.jsx("span",{className:"sep",children:"/"}),e.jsx(j,{to:"/frameworks",children:"Frameworks"}),e.jsx("span",{className:"sep",children:"/"}),e.jsx("span",{style:{color:"var(--ink)"},children:r.framework_name})]}),e.jsxs("div",{className:"feed-header",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"feed-title",children:t?e.jsxs(e.Fragment,{children:["Papers implemented by ",e.jsx("em",{children:V||m||c})]}):n?e.jsxs(e.Fragment,{children:["Search results for ",e.jsxs("em",{children:["“",l,"”"]})]}):e.jsxs(e.Fragment,{children:["All ",e.jsx("em",{children:"Papers"})]})}),e.jsx("div",{className:"feed-subtitle",children:t?(r==null?void 0:r.kind)==="framework"?f>0&&`${f.toLocaleString()} papers.`:r!=null&&r.repository?e.jsxs(e.Fragment,{children:["GitHub repository ",e.jsx("strong",{children:r.repository}),". ",f>0&&`${f.toLocaleString()} papers.`]}):"Repository-scoped paper feed.":n?`${N.length} loaded from the most relevant results.`:e.jsxs(e.Fragment,{children:["Search the full corpus. ",f>0&&`${f.toLocaleString()} papers indexed.`]})}),t&&r&&e.jsxs("div",{className:"paper-feed-scope-links",children:[e.jsxs("div",{className:"paper-feed-primary-links",children:[r.github_url&&e.jsxs("a",{href:r.github_url,target:"_blank",rel:"noopener noreferrer",className:r.kind==="framework"?"task-framework-link":"framework-link",children:[e.jsx(U,{name:"github",size:13}),r.kind==="framework"?e.jsxs(e.Fragment,{children:[e.jsx("span",{children:r.repository||"GitHub"}),r.num_stars!=null&&e.jsxs("span",{className:"task-framework-link-stars",children:["★ ",je(r.num_stars)]})]}):"GitHub"]}),r.kind==="framework"&&r.introducing_paper_arxiv_id&&e.jsx(j,{to:`/paper/${r.introducing_paper_arxiv_id}`,className:"framework-link",children:"Introducing paper"})]}),r.kind==="framework"&&r.recommended_tasks&&r.recommended_tasks.length>0&&e.jsx("div",{className:"paper-feed-task-tags",children:r.recommended_tasks.map(s=>s.slug?e.jsx(Y,{slug:s.slug,label:s.name},s.id):null)})]})]}),e.jsx(he,{startDate:u.startDate,endDate:u.endDate,onChange:s=>o(pe(a,s))})]}),e.jsx("div",{className:"papers-search-row",children:e.jsxs("div",{className:"papers-search-input-wrap",children:[e.jsx(U,{name:"search",size:14}),e.jsx("input",{className:"papers-search-input",placeholder:"Search title or abstract…",value:F,onChange:s=>C(s.target.value)})]})}),e.jsxs("div",{className:t||n?"papers-feed-layout-scoped":"layout-with-sidebar",children:[!t&&!n&&e.jsx("aside",{className:"sidebar",children:e.jsxs("div",{className:"sidebar-section",children:[e.jsx("div",{className:"sidebar-label",children:"Top Domains"}),A.isLoading&&e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:Array.from({length:6}).map((s,i)=>e.jsx(_,{className:"h-5 w-full"},i))}),(G=A.data)==null?void 0:G.map(s=>e.jsxs(j,{to:`/tasks/${s.slug}`,className:"sidebar-link",children:[ae(s.name,s.slug),s.paper_count!=null&&e.jsx("span",{className:"count",children:s.paper_count})]},s.id))]})}),e.jsxs("div",{children:[e.jsxs("div",{className:"sort-bar",children:[e.jsxs("div",{className:"paper-feed-toolbar-controls",children:[e.jsx("div",{className:"sort-options",children:(n?ge:xe).map(([s,i])=>e.jsx("button",{className:`sort-btn ${g===s?"active":""}`,onClick:()=>Q(s),children:i},s))}),e.jsx(oe,{hasCode:k,hasHfArtifacts:w,onHasCodeChange:s=>y("has_code",s?"true":void 0),onHasHfArtifactsChange:s=>y("has_hf_artifacts",s?"true":void 0),showHasCode:!t})]}),e.jsxs("div",{className:"results-count",children:[N.length," loaded"]})]}),E?e.jsx("div",{className:"no-results",children:"Framework not found."}):d.error&&e.jsx(ce,{variant:"destructive",className:"mb-4",children:e.jsx(le,{children:"Failed to load papers. Please try again."})}),!E&&(d.isLoading?e.jsx("div",{className:"paper-list",children:Array.from({length:6}).map((s,i)=>e.jsxs("div",{className:"paper-card",children:[e.jsx(_,{className:"h-[220px] w-[160px]"}),e.jsxs("div",{className:"paper-body",style:{flex:1,gap:12},children:[e.jsx(_,{className:"h-6 w-3/4"}),e.jsx(_,{className:"h-4 w-1/2"}),e.jsx(_,{className:"h-12 w-full"})]})]},i))}):N.length===0?e.jsxs("div",{className:"no-results",children:[e.jsx("p",{children:"No matching papers."}),n&&W()&&e.jsx(j,{to:`/chat?q=${encodeURIComponent(l.trim())}`,children:"Ask the assistant instead"})]}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"paper-list",children:N.map((s,i)=>e.jsx(Z,{paper:s,rank:i+1,highlightQuery:n?l:void 0},s.id))}),e.jsx("div",{ref:K,style:{height:1}}),d.isFetchingNextPage&&e.jsx("div",{style:{padding:"20px 0",textAlign:"center",color:"var(--ink-faint)"},children:"Loading more…"}),!d.hasNextPage&&!d.isFetchingNextPage&&n&&e.jsx("div",{className:"search-results-end",children:P!=null&&P.cap_reached?"End of the top 100 results":"End of results"})]}))]})]})]})};export{Oe as default};
 
 
assets/PapersListView-Dnf8Enmr.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import{c as X,r as x,A as J,j as e,L as j,i as W}from"./index-D6NpXxup.js";import{I as U,T as Y,P as Z}from"./components-C-Wk0LlL.js";import{c as ee}from"./catalog-BkXnDjBr.js";import{t as se,d as ae}from"./transform-dsZcnzEu.js";import{u as re,a as te}from"./usePapers-D7q7tNxt.js";import{u as ne}from"./useDebounce-CJgp69zc.js";import{u as ie,P as oe}from"./useIntersectionObserver-C8GlpU4F.js";import{S as _}from"./skeleton-BZlAxqUu.js";import{A as ce,a as le}from"./alert-CEE7Xf4h.js";import{u as de}from"./useQuery-BSzsAAZV.js";import{a as me,P as he,b as pe}from"./PaperDateFilter-CwWio6o1.js";import"./paperQueryKeys-CcqbH5YG.js";import"./LatexTitle-Cd92uzqM.js";import"./papers-CJuRKhYV.js";import"./safeExternalHref-CkBrsh84.js";import"./useInfiniteQuery-BA3fe-wV.js";import"./popover-VFNGJa2a.js";const v=360;function ue(a,o){const m=a.toLocaleLowerCase();return o.trim().split(/\s+/).filter(Boolean).reduce((c,t)=>{const l=m.indexOf(t.toLocaleLowerCase());return l>=0&&(c<0||l<c)?l:c},-1)}function z(a,o,m){if((a.slice(0,o).match(/\$/g)||[]).length%2===0)return o;if(m==="start")return a.lastIndexOf("$",o)+1;const t=a.indexOf("$",o);return t>=0?t+1:o}function fe(a,o){if(a.length<=v)return a;const m=ue(a,o);if(m<0||m<v*.6)return a;let c=Math.max(0,m-Math.floor(v*.35)),t=Math.min(a.length,c+v);return c=z(a,c,"start"),t=z(a,t,"end"),`${c>0?"…":""}${a.slice(c,t).trim()}${t<a.length?"…":""}`}const xe=[["trending","trending"],["new","newest"],["cited","most cited"]],ge=[["relevance","relevance"],["new","newest"],["cited","most cited"]],je=a=>new Intl.NumberFormat("en",{notation:a>=1e3?"compact":"standard",maximumFractionDigits:1}).format(a),Te=()=>{var I,$,T,O,B,H,M,q,G;const[a,o]=X(),m=a.get("framework")||void 0,c=a.get("repository")||void 0,t=!!(m||c),l=a.get("search")||"",[F,C]=x.useState(l),p=ne(F,300),n=!t&&l.trim().length>0;x.useEffect(()=>C(l),[l]),x.useEffect(()=>{if(p===l)return;const s=new URLSearchParams(a);p?s.set("search",p):s.delete("search"),o(s,{replace:!0})},[p]),x.useEffect(()=>{const s=a.get("order_by"),i=new URLSearchParams(a);n&&!["relevance","date_published","citation_count"].includes(s||"")?(i.set("order_by","relevance"),o(i,{replace:!0})):!n&&s==="relevance"&&(i.delete("order_by"),o(i,{replace:!0}))},[n,a,o]);const L=a.get("order_by"),g=L==="citation_count"?"cited":L==="date_published"?"new":n?"relevance":"trending",u=me(a),w=a.get("has_hf_artifacts")==="true",k=!t&&a.get("has_code")==="true",y=(s,i)=>{const h=new URLSearchParams(a);i?h.set(s,i):h.delete(s),o(h)},Q=s=>{y("order_by",s==="cited"?"citation_count":s==="new"?"date_published":s)},b=re({page_size:20,order_by:g==="trending"?"trending":g==="cited"?"citation_count":"date_published",order_dir:"desc",search:t&&p||void 0,start_date:u.startDate,end_date:u.endDate,include_resources:!0,conference:a.get("conference")||void 0,latest_only:a.get("latest_only")!=="false",has_code:k,has_hf_artifacts:w,framework:m,repository:c,enabled:!n}),R=te({q:p.trim(),order_by:g==="cited"?"citation_count":g==="new"?"date_published":"relevance",start_date:u.startDate,end_date:u.endDate,has_code:k,has_hf_artifacts:w,enabled:n}),d=n?R:b,A=de({queryKey:["top-tasks-sidebar"],queryFn:()=>ee.topTasks(8),enabled:!t&&!n,staleTime:10*60*1e3}),N=x.useMemo(()=>{var i;return(((i=d.data)==null?void 0:i.pages.flatMap(h=>h.results))||[]).map(h=>{const S=se(h);return n?{...S,abstract:fe(S.abstract,l)}:S})},[d.data,n,l]),{targetRef:K,isIntersecting:D}=ie({rootMargin:"200px"});x.useEffect(()=>{D&&d.hasNextPage&&!d.isFetchingNextPage&&d.fetchNextPage()},[D,d.hasNextPage,d.isFetchingNextPage]);const f=((T=($=(I=b.data)==null?void 0:I.pages)==null?void 0:$[0])==null?void 0:T.count)??0,r=(H=(B=(O=b.data)==null?void 0:O.pages)==null?void 0:B[0])==null?void 0:H.scope,P=(q=(M=R.data)==null?void 0:M.pages)==null?void 0:q.at(-1),E=m&&d.error instanceof J&&d.error.status===404,V=(r==null?void 0:r.kind)==="framework"?r.framework_name:r==null?void 0:r.repository;return e.jsxs("div",{className:"page",children:[(r==null?void 0:r.kind)==="framework"&&e.jsxs("nav",{className:"breadcrumb","aria-label":"Breadcrumb",children:[e.jsx(j,{to:"/",children:"Papers"}),e.jsx("span",{className:"sep",children:"/"}),e.jsx(j,{to:"/frameworks",children:"Frameworks"}),e.jsx("span",{className:"sep",children:"/"}),e.jsx("span",{style:{color:"var(--ink)"},children:r.framework_name})]}),e.jsxs("div",{className:"feed-header",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"feed-title",children:t?e.jsxs(e.Fragment,{children:["Papers implemented by ",e.jsx("em",{children:V||m||c})]}):n?e.jsxs(e.Fragment,{children:["Search results for ",e.jsxs("em",{children:["“",l,"”"]})]}):e.jsxs(e.Fragment,{children:["All ",e.jsx("em",{children:"Papers"})]})}),e.jsx("div",{className:"feed-subtitle",children:t?(r==null?void 0:r.kind)==="framework"?f>0&&`${f.toLocaleString()} papers.`:r!=null&&r.repository?e.jsxs(e.Fragment,{children:["GitHub repository ",e.jsx("strong",{children:r.repository}),". ",f>0&&`${f.toLocaleString()} papers.`]}):"Repository-scoped paper feed.":n?`${N.length} loaded from the most relevant results.`:e.jsxs(e.Fragment,{children:["Search the full corpus. ",f>0&&`${f.toLocaleString()} papers indexed.`]})}),t&&r&&e.jsxs("div",{className:"paper-feed-scope-links",children:[e.jsxs("div",{className:"paper-feed-primary-links",children:[r.github_url&&e.jsxs("a",{href:r.github_url,target:"_blank",rel:"noopener noreferrer",className:r.kind==="framework"?"task-framework-link":"framework-link",children:[e.jsx(U,{name:"github",size:13}),r.kind==="framework"?e.jsxs(e.Fragment,{children:[e.jsx("span",{children:r.repository||"GitHub"}),r.num_stars!=null&&e.jsxs("span",{className:"task-framework-link-stars",children:["★ ",je(r.num_stars)]})]}):"GitHub"]}),r.kind==="framework"&&r.introducing_paper_arxiv_id&&e.jsx(j,{to:`/paper/${r.introducing_paper_arxiv_id}`,className:"framework-link",children:"Introducing paper"})]}),r.kind==="framework"&&r.recommended_tasks&&r.recommended_tasks.length>0&&e.jsx("div",{className:"paper-feed-task-tags",children:r.recommended_tasks.map(s=>s.slug?e.jsx(Y,{slug:s.slug,label:s.name},s.id):null)})]})]}),e.jsx(he,{startDate:u.startDate,endDate:u.endDate,onChange:s=>o(pe(a,s))})]}),e.jsx("div",{className:"papers-search-row",children:e.jsxs("div",{className:"papers-search-input-wrap",children:[e.jsx(U,{name:"search",size:14}),e.jsx("input",{className:"papers-search-input",placeholder:"Search title or abstract…",value:F,onChange:s=>C(s.target.value)})]})}),e.jsxs("div",{className:t||n?"papers-feed-layout-scoped":"layout-with-sidebar",children:[!t&&!n&&e.jsx("aside",{className:"sidebar",children:e.jsxs("div",{className:"sidebar-section",children:[e.jsx("div",{className:"sidebar-label",children:"Top Domains"}),A.isLoading&&e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:Array.from({length:6}).map((s,i)=>e.jsx(_,{className:"h-5 w-full"},i))}),(G=A.data)==null?void 0:G.map(s=>e.jsxs(j,{to:`/tasks/${s.slug}`,className:"sidebar-link",children:[ae(s.name,s.slug),s.paper_count!=null&&e.jsx("span",{className:"count",children:s.paper_count})]},s.id))]})}),e.jsxs("div",{children:[e.jsxs("div",{className:"sort-bar",children:[e.jsxs("div",{className:"paper-feed-toolbar-controls",children:[e.jsx("div",{className:"sort-options",children:(n?ge:xe).map(([s,i])=>e.jsx("button",{className:`sort-btn ${g===s?"active":""}`,onClick:()=>Q(s),children:i},s))}),e.jsx(oe,{hasCode:k,hasHfArtifacts:w,onHasCodeChange:s=>y("has_code",s?"true":void 0),onHasHfArtifactsChange:s=>y("has_hf_artifacts",s?"true":void 0),showHasCode:!t})]}),e.jsxs("div",{className:"results-count",children:[N.length," loaded"]})]}),E?e.jsx("div",{className:"no-results",children:"Framework not found."}):d.error&&e.jsx(ce,{variant:"destructive",className:"mb-4",children:e.jsx(le,{children:"Failed to load papers. Please try again."})}),!E&&(d.isLoading?e.jsx("div",{className:"paper-list",children:Array.from({length:6}).map((s,i)=>e.jsxs("div",{className:"paper-card",children:[e.jsx(_,{className:"h-[220px] w-[160px]"}),e.jsxs("div",{className:"paper-body",style:{flex:1,gap:12},children:[e.jsx(_,{className:"h-6 w-3/4"}),e.jsx(_,{className:"h-4 w-1/2"}),e.jsx(_,{className:"h-12 w-full"})]})]},i))}):N.length===0?e.jsxs("div",{className:"no-results",children:[e.jsx("p",{children:"No matching papers."}),n&&W()&&e.jsx(j,{to:`/chat?q=${encodeURIComponent(l.trim())}`,children:"Ask the assistant instead"})]}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"paper-list",children:N.map((s,i)=>e.jsx(Z,{paper:s,rank:i+1,highlightQuery:n?l:void 0},s.id))}),e.jsx("div",{ref:K,style:{height:1}}),d.isFetchingNextPage&&e.jsx("div",{style:{padding:"20px 0",textAlign:"center",color:"var(--ink-faint)"},children:"Loading more…"}),!d.hasNextPage&&!d.isFetchingNextPage&&n&&e.jsx("div",{className:"search-results-end",children:P!=null&&P.cap_reached?"End of the top 100 results":"End of results"})]}))]})]})]})};export{Te as default};
assets/{PrivacyView-DH9UoMhd.js → PrivacyView-D0_TASOw.js} RENAMED
@@ -1 +1 @@
1
- import{B as s,j as e}from"./index-D1SFE8tx.js";import{f as i,D as r}from"./latexPlainText-DI8YEXVe.js";const n=()=>(s.useEffect(()=>(document.title=i("Privacy Policy"),()=>{document.title=r}),[]),e.jsxs("article",{className:"page legal-page",children:[e.jsxs("header",{className:"legal-header",children:[e.jsx("p",{className:"legal-kicker",children:"Legal"}),e.jsx("h1",{children:"Privacy Policy"}),e.jsx("p",{className:"legal-effective-date",children:"Effective August 11, 2026"})]}),e.jsx("p",{children:"This Privacy Policy explains how Hugging Face, Inc. (“Hugging Face,” “we,” or “us”) collects, uses, and shares information when you use Papers With Code, including its website, research assistant, APIs, and related services (the “Service”)."}),e.jsxs("section",{children:[e.jsx("h2",{children:"1. Information we collect"}),e.jsx("h3",{children:"Information you provide"}),e.jsxs("ul",{children:[e.jsxs("li",{children:[e.jsx("strong",{children:"Account information."})," If you sign in with Hugging Face, we receive account identifiers and profile details needed to authenticate you, such as your user ID, username, and avatar. If you request contributor access, we also receive and retain the verified email address associated with your Hugging Face account so we can review and communicate about your request."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Contributions and preferences."})," We collect information you submit or save, such as paper submissions and edits, bookmarks, display preferences, feedback, and communications with us. Material you submit to a public research page may be publicly visible."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Research assistant content."})," We collect your questions, conversation history, generated answers, citations, tool calls and results, and feedback about answers. Chats are private to your account unless you choose to create a share link; anyone with that link may be able to view the shared chat."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Provider and billing information."})," If you enable a model provider, we process the authorization or API credentials needed to make requests on your behalf. Hugging Face or another provider processes its own billing information under its terms. Papers With Code does not collect your payment-card details."]})]}),e.jsx("h3",{children:"Information collected automatically"}),e.jsx("p",{children:"We collect technical and usage information such as IP address, browser and device type, operating system, pages or features used, dates and times, referring pages, request identifiers, cookies, logs, and diagnostic data. For research-assistant requests, this may include the selected model, token and cost details, latency, errors, and other operational metadata."}),e.jsx("h3",{children:"Research assistant tracing"}),e.jsxs("p",{children:["To evaluate, debug, secure, and improve the research assistant, we use Langfuse to record traces. A trace may contain the complete text of your question and the assistant's answer, as well as tool inputs, tool outputs, retrieved research material, model details, usage data, and related operational metadata.",e.jsx("strong",{children:" This trace content is not redacted before it is sent to Langfuse."})]}),e.jsx("p",{children:"Papers With Code is designed for questions about research literature. Do not put passwords, API keys, confidential information, health or financial data, or other sensitive personal information in research-assistant prompts."})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"2. How we use information"}),e.jsx("p",{children:"We use information to:"}),e.jsxs("ul",{children:[e.jsx("li",{children:"provide, personalize, maintain, and operate the Service;"}),e.jsx("li",{children:"authenticate users and keep accounts and the Service secure;"}),e.jsx("li",{children:"run research-assistant requests and preserve conversation history;"}),e.jsx("li",{children:"measure performance, troubleshoot failures, and improve quality;"}),e.jsx("li",{children:"review contributions, prevent abuse, and enforce applicable terms;"}),e.jsx("li",{children:"communicate with you and respond to requests; and"}),e.jsx("li",{children:"comply with law and protect users, Hugging Face, and the public."})]})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"3. How we share information"}),e.jsx("p",{children:"We may share information in these circumstances:"}),e.jsxs("ul",{children:[e.jsxs("li",{children:[e.jsx("strong",{children:"Service providers."})," Vendors process information for hosting, authentication, analytics, observability, security, and support. These include Hugging Face services, Langfuse for research-assistant tracing, Plausible for website analytics, and infrastructure providers."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Model providers."})," Research-assistant content is sent to the model provider you use, such as Hugging Face Inference Providers or OpenRouter, so it can generate a response. That provider's privacy terms also apply to its processing."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Public and shared content."})," Contributions intended for public pages are public. A chat is disclosed through the Service when you create and distribute a share link."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Legal, safety, and corporate events."})," We may disclose information when reasonably necessary to comply with law, protect rights and safety, investigate abuse, or complete a merger, acquisition, financing, or transfer of assets."]})]}),e.jsx("p",{children:"We do not sell your personal information."})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"4. Cookies and analytics"}),e.jsx("p",{children:"We use cookies and similar storage when needed for sign-in, security, preferences, and operation of the Service. We also use Plausible to understand aggregate website usage. You can control cookies through your browser, but disabling necessary cookies may prevent account features from working."})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"5. Legal bases"}),e.jsx("p",{children:"Where applicable law requires a legal basis, we process information as needed to perform our agreement with you, with your consent, to comply with legal obligations, and for legitimate interests such as operating, securing, and improving the Service. You may withdraw consent where consent is the basis for processing, without affecting earlier processing."})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"6. Retention and deletion"}),e.jsx("p",{children:"Private chats are retained until you delete them, subject to limits of 500 active chats and 100 MB of chat data per user. Archiving hides a chat and frees active-chat quota but does not delete it. You may deliberately share an unlisted snapshot; deleting its private chat removes the durable transcript, workspace reference, and share link after deletion is verified. No dedicated private-chat export format is currently offered."}),e.jsx("p",{children:"We keep information for as long as reasonably needed for the purposes described here, including providing the Service, maintaining security and audit records, resolving disputes, and meeting legal obligations. Retention periods vary by data type and service provider. You can delete individual chats in the Service. Deletion may not immediately remove information from backups, security logs, or third-party systems where limited retention is required."})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"7. Security and international transfers"}),e.jsx("p",{children:"We use reasonable administrative, technical, and organizational safeguards, but no internet service can guarantee absolute security. We and our service providers may process information in the United States and other countries, which may have different data-protection laws from your country. Where required, we use appropriate safeguards for international transfers."})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"8. Your privacy rights"}),e.jsx("p",{children:"Depending on where you live, you may have rights to access, correct, delete, or receive a copy of your personal information; object to or restrict processing; withdraw consent; or appeal a decision about a request. You may also have the right to complain to a data-protection authority. We may need to verify your identity before fulfilling a request."})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"9. Children"}),e.jsx("p",{children:"The Service is not directed to children under 13, and we do not knowingly collect personal information from children under 13. If you believe a child has provided personal information, please contact us."})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"10. Changes to this policy"}),e.jsx("p",{children:"We may update this policy as the Service changes. We will post the revised policy here and update its effective date. If a change is material, we will provide additional notice when appropriate."})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"11. Contact us"}),e.jsxs("p",{children:["For questions or privacy requests, contact"," ",e.jsx("a",{href:"mailto:privacy@huggingface.co",children:"privacy@huggingface.co"}),". Please do not include passwords, API keys, or other sensitive credentials in your message."]})]})]}));export{n as default};
 
1
+ import{B as s,j as e}from"./index-D6NpXxup.js";import{f as i,D as r}from"./latexPlainText-DI8YEXVe.js";const n=()=>(s.useEffect(()=>(document.title=i("Privacy Policy"),()=>{document.title=r}),[]),e.jsxs("article",{className:"page legal-page",children:[e.jsxs("header",{className:"legal-header",children:[e.jsx("p",{className:"legal-kicker",children:"Legal"}),e.jsx("h1",{children:"Privacy Policy"}),e.jsx("p",{className:"legal-effective-date",children:"Effective August 11, 2026"})]}),e.jsx("p",{children:"This Privacy Policy explains how Hugging Face, Inc. (“Hugging Face,” “we,” or “us”) collects, uses, and shares information when you use Papers With Code, including its website, research assistant, APIs, and related services (the “Service”)."}),e.jsxs("section",{children:[e.jsx("h2",{children:"1. Information we collect"}),e.jsx("h3",{children:"Information you provide"}),e.jsxs("ul",{children:[e.jsxs("li",{children:[e.jsx("strong",{children:"Account information."})," If you sign in with Hugging Face, we receive account identifiers and profile details needed to authenticate you, such as your user ID, username, and avatar. If you request contributor access, we also receive and retain the verified email address associated with your Hugging Face account so we can review and communicate about your request."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Contributions and preferences."})," We collect information you submit or save, such as paper submissions and edits, bookmarks, display preferences, feedback, and communications with us. Material you submit to a public research page may be publicly visible."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Research assistant content."})," We collect your questions, conversation history, generated answers, citations, tool calls and results, and feedback about answers. Chats are private to your account unless you choose to create a share link; anyone with that link may be able to view the shared chat."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Provider and billing information."})," If you enable a model provider, we process the authorization or API credentials needed to make requests on your behalf. Hugging Face or another provider processes its own billing information under its terms. Papers With Code does not collect your payment-card details."]})]}),e.jsx("h3",{children:"Information collected automatically"}),e.jsx("p",{children:"We collect technical and usage information such as IP address, browser and device type, operating system, pages or features used, dates and times, referring pages, request identifiers, cookies, logs, and diagnostic data. For research-assistant requests, this may include the selected model, token and cost details, latency, errors, and other operational metadata."}),e.jsx("h3",{children:"Research assistant tracing"}),e.jsxs("p",{children:["To evaluate, debug, secure, and improve the research assistant, we use Langfuse to record traces. A trace may contain the complete text of your question and the assistant's answer, as well as tool inputs, tool outputs, retrieved research material, model details, usage data, and related operational metadata.",e.jsx("strong",{children:" This trace content is not redacted before it is sent to Langfuse."})]}),e.jsx("p",{children:"Papers With Code is designed for questions about research literature. Do not put passwords, API keys, confidential information, health or financial data, or other sensitive personal information in research-assistant prompts."})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"2. How we use information"}),e.jsx("p",{children:"We use information to:"}),e.jsxs("ul",{children:[e.jsx("li",{children:"provide, personalize, maintain, and operate the Service;"}),e.jsx("li",{children:"authenticate users and keep accounts and the Service secure;"}),e.jsx("li",{children:"run research-assistant requests and preserve conversation history;"}),e.jsx("li",{children:"measure performance, troubleshoot failures, and improve quality;"}),e.jsx("li",{children:"review contributions, prevent abuse, and enforce applicable terms;"}),e.jsx("li",{children:"communicate with you and respond to requests; and"}),e.jsx("li",{children:"comply with law and protect users, Hugging Face, and the public."})]})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"3. How we share information"}),e.jsx("p",{children:"We may share information in these circumstances:"}),e.jsxs("ul",{children:[e.jsxs("li",{children:[e.jsx("strong",{children:"Service providers."})," Vendors process information for hosting, authentication, analytics, observability, security, and support. These include Hugging Face services, Langfuse for research-assistant tracing, Plausible for website analytics, and infrastructure providers."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Model providers."})," Research-assistant content is sent to the model provider you use, such as Hugging Face Inference Providers or OpenRouter, so it can generate a response. That provider's privacy terms also apply to its processing."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Public and shared content."})," Contributions intended for public pages are public. A chat is disclosed through the Service when you create and distribute a share link."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Legal, safety, and corporate events."})," We may disclose information when reasonably necessary to comply with law, protect rights and safety, investigate abuse, or complete a merger, acquisition, financing, or transfer of assets."]})]}),e.jsx("p",{children:"We do not sell your personal information."})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"4. Cookies and analytics"}),e.jsx("p",{children:"We use cookies and similar storage when needed for sign-in, security, preferences, and operation of the Service. We also use Plausible to understand aggregate website usage. You can control cookies through your browser, but disabling necessary cookies may prevent account features from working."})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"5. Legal bases"}),e.jsx("p",{children:"Where applicable law requires a legal basis, we process information as needed to perform our agreement with you, with your consent, to comply with legal obligations, and for legitimate interests such as operating, securing, and improving the Service. You may withdraw consent where consent is the basis for processing, without affecting earlier processing."})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"6. Retention and deletion"}),e.jsx("p",{children:"Private chats are retained until you delete them, subject to limits of 500 active chats and 100 MB of chat data per user. Archiving hides a chat and frees active-chat quota but does not delete it. You may deliberately share an unlisted snapshot; deleting its private chat removes the durable transcript, workspace reference, and share link after deletion is verified. No dedicated private-chat export format is currently offered."}),e.jsx("p",{children:"We keep information for as long as reasonably needed for the purposes described here, including providing the Service, maintaining security and audit records, resolving disputes, and meeting legal obligations. Retention periods vary by data type and service provider. You can delete individual chats in the Service. Deletion may not immediately remove information from backups, security logs, or third-party systems where limited retention is required."})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"7. Security and international transfers"}),e.jsx("p",{children:"We use reasonable administrative, technical, and organizational safeguards, but no internet service can guarantee absolute security. We and our service providers may process information in the United States and other countries, which may have different data-protection laws from your country. Where required, we use appropriate safeguards for international transfers."})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"8. Your privacy rights"}),e.jsx("p",{children:"Depending on where you live, you may have rights to access, correct, delete, or receive a copy of your personal information; object to or restrict processing; withdraw consent; or appeal a decision about a request. You may also have the right to complain to a data-protection authority. We may need to verify your identity before fulfilling a request."})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"9. Children"}),e.jsx("p",{children:"The Service is not directed to children under 13, and we do not knowingly collect personal information from children under 13. If you believe a child has provided personal information, please contact us."})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"10. Changes to this policy"}),e.jsx("p",{children:"We may update this policy as the Service changes. We will post the revised policy here and update its effective date. If a change is material, we will provide additional notice when appropriate."})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"11. Contact us"}),e.jsxs("p",{children:["For questions or privacy requests, contact"," ",e.jsx("a",{href:"mailto:privacy@huggingface.co",children:"privacy@huggingface.co"}),". Please do not include passwords, API keys, or other sensitive credentials in your message."]})]})]}));export{n as default};
assets/{RateLimitsView-DypxuNTs.js → RateLimitsView-CGA-3Q_X.js} RENAMED
@@ -1 +1 @@
1
- import{j as e,D as t}from"./index-D1SFE8tx.js";import{u as s}from"./useQuery-8sGgldYe.js";const n=()=>{const i=s({queryKey:["submission-rate-limit-policy"],queryFn:()=>t.getRateLimitPolicy()}).data;return e.jsxs("div",{className:"page",style:{maxWidth:760},children:[e.jsx("h1",{children:"Submission and rate-limit policy"}),i?e.jsxs(e.Fragment,{children:[e.jsxs("p",{children:["Each account may have up to ",i.active_pending," active submissions."]}),e.jsxs("p",{children:["New submissions are limited to ",i.subject_per_hour," per account and ",i.ip_per_hour," per source network in a rolling hour."]})]}):e.jsx("p",{children:"Loading current limits…"}),e.jsx("p",{children:"Duplicate, no-op, and idempotently replayed requests do not consume creation quota."}),e.jsx("p",{children:"Rate-limited responses use HTTP 429 with Retry-After, RateLimit, and RateLimit-Policy headers."}),e.jsx("p",{children:"Good-faith contributors who are blocked should contact the Papers with Code maintainers with their Hugging Face username."})]})};export{n as default};
 
1
+ import{j as e,D as t}from"./index-D6NpXxup.js";import{u as s}from"./useQuery-BSzsAAZV.js";const n=()=>{const i=s({queryKey:["submission-rate-limit-policy"],queryFn:()=>t.getRateLimitPolicy()}).data;return e.jsxs("div",{className:"page",style:{maxWidth:760},children:[e.jsx("h1",{children:"Submission and rate-limit policy"}),i?e.jsxs(e.Fragment,{children:[e.jsxs("p",{children:["Each account may have up to ",i.active_pending," active submissions."]}),e.jsxs("p",{children:["New submissions are limited to ",i.subject_per_hour," per account and ",i.ip_per_hour," per source network in a rolling hour."]})]}):e.jsx("p",{children:"Loading current limits…"}),e.jsx("p",{children:"Duplicate, no-op, and idempotently replayed requests do not consume creation quota."}),e.jsx("p",{children:"Rate-limited responses use HTTP 429 with Retry-After, RateLimit, and RateLimit-Policy headers."}),e.jsx("p",{children:"Good-faith contributors who are blocked should contact the Papers with Code maintainers with their Hugging Face username."})]})};export{n as default};
assets/SavedPapersView-CAy7RQFY.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import{a as h,A as g,j as e,H as v,L as x,D as j}from"./index-D6NpXxup.js";import{p as f}from"./paperQueryKeys-CcqbH5YG.js";import{u as N}from"./useQuery-BSzsAAZV.js";import{T as b,P as k}from"./components-C-Wk0LlL.js";import{S as r}from"./skeleton-BZlAxqUu.js";import{A as y,a as w}from"./alert-CEE7Xf4h.js";import{t as A}from"./transform-dsZcnzEu.js";import{s as B}from"./savedPapersAuth-DxcIkeVO.js";import"./LatexTitle-Cd92uzqM.js";import"./papers-CJuRKhYV.js";import"./safeExternalHref-CkBrsh84.js";const W=()=>{var c,o;const{user:t,isLoading:u}=h(),a=N({queryKey:[...f.feeds.saved],queryFn:()=>j.getBookmarks(),enabled:!!t,staleTime:30*1e3,refetchOnWindowFocus:!1}),n=a.error instanceof g&&a.error.code==="saved_papers_bucket_authorization_required",m=!!a.data&&!a.data.bucket_connected,d=()=>{window.location.assign(B())};return u?e.jsxs("div",{className:"page",children:[e.jsx(r,{className:"h-10 w-1/3 mb-4"}),e.jsx(r,{className:"h-6 w-1/2 mb-8"})]}):t?e.jsxs("div",{className:"page",children:[e.jsx("div",{className:"feed-header",children:e.jsxs("div",{children:[e.jsxs("h1",{className:"feed-title",children:["Saved ",e.jsx("em",{children:"Papers"})]}),e.jsxs("div",{className:"feed-subtitle",children:[(c=a.data)!=null&&c.count?`${a.data.count.toLocaleString()} saved · grouped by domain`:"Your bookmarked papers, grouped by domain.",(o=a.data)!=null&&o.bucket_connected?e.jsxs(e.Fragment,{children:[" · ",e.jsx("a",{href:`https://huggingface.co/buckets/${t.username}/pwc-saved-papers`,target:"_blank",rel:"noopener noreferrer",children:"Open your Hugging Face Bucket"})]}):null]})]})}),n?e.jsxs("div",{className:"saved-bucket-migration",children:[e.jsx("p",{children:"Your saved papers are still safe in Papers With Code. Approve Bucket access to copy them into a private Hugging Face Bucket that belongs to you."}),e.jsx("button",{type:"button",className:"hf-signin-btn",onClick:d,children:"Approve and migrate saved papers"})]}):a.error?e.jsx(y,{variant:"destructive",className:"mb-4",children:e.jsx(w,{children:"Failed to load your saved papers. Please try again."})}):null,m?e.jsxs("div",{className:"saved-bucket-migration",children:[e.jsxs("p",{children:[a.data.count?`Your ${a.data.count.toLocaleString()} saved ${a.data.count===1?"paper is":"papers are"} still available below. `:"When you save your first paper, ","Approve Bucket access to copy saved papers into a private Hugging Face Bucket that belongs to you. The existing data is kept until the copy is verified."]}),e.jsx("button",{type:"button",className:"hf-signin-btn",onClick:d,children:a.data.count?"Approve and migrate saved papers":"Use a Hugging Face Bucket"})]}):null,n||a.error?null:a.isLoading?e.jsx("div",{className:"paper-list",children:Array.from({length:4}).map((i,s)=>e.jsxs("div",{className:"paper-card",children:[e.jsx(r,{className:"h-[220px] w-[160px]"}),e.jsxs("div",{className:"paper-body",style:{flex:1,gap:12},children:[e.jsx(r,{className:"h-6 w-3/4"}),e.jsx(r,{className:"h-4 w-1/2"}),e.jsx(r,{className:"h-12 w-full"})]})]},s))}):!a.data||a.data.count===0?e.jsxs("div",{className:"no-results",children:["No saved papers yet."," ",e.jsx(x,{to:"/papers",className:"sidebar-link",style:{display:"inline"},children:"Browse papers →"})]}):a.data.areas.map(i=>e.jsxs("section",{className:"saved-area-section",children:[e.jsx("h2",{className:"saved-area-heading",children:i.name}),i.tasks.map(s=>{const l=s.papers.length;return e.jsxs("div",{className:"saved-task-block",children:[e.jsxs("div",{className:"saved-task-row",children:[s.slug?e.jsx(b,{slug:s.slug,label:s.name}):e.jsx("span",{className:"tag-chip",style:{background:"var(--surface)"},children:s.name}),e.jsxs("span",{className:"saved-task-count",children:[l," ",l===1?"paper":"papers"]})]}),e.jsx("div",{className:"paper-list",children:s.papers.map(p=>e.jsx(k,{paper:A(p),rank:1},p.id))})]},`task-${i.id??"other"}-${s.id??"untagged"}`)})]},`area-${i.id??"other"}`))]}):e.jsxs("div",{className:"page",children:[e.jsx("div",{className:"feed-header",children:e.jsxs("div",{children:[e.jsxs("h1",{className:"feed-title",children:["Saved ",e.jsx("em",{children:"Papers"})]}),e.jsx("div",{className:"feed-subtitle",children:"Sign in with Hugging Face to save papers and revisit them later."})]})}),e.jsx("div",{className:"saved-signin-panel",children:e.jsx(v,{returnTo:"/saved"})})]})};export{W as default};
assets/SavedPapersView-OFhLntHy.js DELETED
@@ -1 +0,0 @@
1
- import{a as h,A as g,j as e,H as v,L as x,D as j}from"./index-D1SFE8tx.js";import{p as f}from"./paperQueryKeys-CcqbH5YG.js";import{u as N}from"./useQuery-8sGgldYe.js";import{T as b,P as k}from"./components-BAR1mYoW.js";import{S as r}from"./skeleton-D5wy8oMn.js";import{A as y,a as w}from"./alert-D8tgAf4z.js";import{t as A}from"./transform-BmaYjIy4.js";import{s as B}from"./savedPapersAuth-CbYMrdxI.js";import"./LatexTitle-C3kQa1rr.js";import"./katex.min-BSBacQyE.js";import"./papers-Cv1LxXF4.js";import"./safeExternalHref-CkBrsh84.js";const Y=()=>{var c,o;const{user:t,isLoading:u}=h(),a=N({queryKey:[...f.feeds.saved],queryFn:()=>j.getBookmarks(),enabled:!!t,staleTime:30*1e3,refetchOnWindowFocus:!1}),n=a.error instanceof g&&a.error.code==="saved_papers_bucket_authorization_required",m=!!a.data&&!a.data.bucket_connected,d=()=>{window.location.assign(B())};return u?e.jsxs("div",{className:"page",children:[e.jsx(r,{className:"h-10 w-1/3 mb-4"}),e.jsx(r,{className:"h-6 w-1/2 mb-8"})]}):t?e.jsxs("div",{className:"page",children:[e.jsx("div",{className:"feed-header",children:e.jsxs("div",{children:[e.jsxs("h1",{className:"feed-title",children:["Saved ",e.jsx("em",{children:"Papers"})]}),e.jsxs("div",{className:"feed-subtitle",children:[(c=a.data)!=null&&c.count?`${a.data.count.toLocaleString()} saved · grouped by domain`:"Your bookmarked papers, grouped by domain.",(o=a.data)!=null&&o.bucket_connected?e.jsxs(e.Fragment,{children:[" · ",e.jsx("a",{href:`https://huggingface.co/buckets/${t.username}/pwc-saved-papers`,target:"_blank",rel:"noopener noreferrer",children:"Open your Hugging Face Bucket"})]}):null]})]})}),n?e.jsxs("div",{className:"saved-bucket-migration",children:[e.jsx("p",{children:"Your saved papers are still safe in Papers With Code. Approve Bucket access to copy them into a private Hugging Face Bucket that belongs to you."}),e.jsx("button",{type:"button",className:"hf-signin-btn",onClick:d,children:"Approve and migrate saved papers"})]}):a.error?e.jsx(y,{variant:"destructive",className:"mb-4",children:e.jsx(w,{children:"Failed to load your saved papers. Please try again."})}):null,m?e.jsxs("div",{className:"saved-bucket-migration",children:[e.jsxs("p",{children:[a.data.count?`Your ${a.data.count.toLocaleString()} saved ${a.data.count===1?"paper is":"papers are"} still available below. `:"When you save your first paper, ","Approve Bucket access to copy saved papers into a private Hugging Face Bucket that belongs to you. The existing data is kept until the copy is verified."]}),e.jsx("button",{type:"button",className:"hf-signin-btn",onClick:d,children:a.data.count?"Approve and migrate saved papers":"Use a Hugging Face Bucket"})]}):null,n||a.error?null:a.isLoading?e.jsx("div",{className:"paper-list",children:Array.from({length:4}).map((i,s)=>e.jsxs("div",{className:"paper-card",children:[e.jsx(r,{className:"h-[220px] w-[160px]"}),e.jsxs("div",{className:"paper-body",style:{flex:1,gap:12},children:[e.jsx(r,{className:"h-6 w-3/4"}),e.jsx(r,{className:"h-4 w-1/2"}),e.jsx(r,{className:"h-12 w-full"})]})]},s))}):!a.data||a.data.count===0?e.jsxs("div",{className:"no-results",children:["No saved papers yet."," ",e.jsx(x,{to:"/papers",className:"sidebar-link",style:{display:"inline"},children:"Browse papers →"})]}):a.data.areas.map(i=>e.jsxs("section",{className:"saved-area-section",children:[e.jsx("h2",{className:"saved-area-heading",children:i.name}),i.tasks.map(s=>{const l=s.papers.length;return e.jsxs("div",{className:"saved-task-block",children:[e.jsxs("div",{className:"saved-task-row",children:[s.slug?e.jsx(b,{slug:s.slug,label:s.name}):e.jsx("span",{className:"tag-chip",style:{background:"var(--surface)"},children:s.name}),e.jsxs("span",{className:"saved-task-count",children:[l," ",l===1?"paper":"papers"]})]}),e.jsx("div",{className:"paper-list",children:s.papers.map(p=>e.jsx(k,{paper:A(p),rank:1},p.id))})]},`task-${i.id??"other"}-${s.id??"untagged"}`)})]},`area-${i.id??"other"}`))]}):e.jsxs("div",{className:"page",children:[e.jsx("div",{className:"feed-header",children:e.jsxs("div",{children:[e.jsxs("h1",{className:"feed-title",children:["Saved ",e.jsx("em",{children:"Papers"})]}),e.jsx("div",{className:"feed-subtitle",children:"Sign in with Hugging Face to save papers and revisit them later."})]})}),e.jsx("div",{className:"saved-signin-panel",children:e.jsx(v,{returnTo:"/saved"})})]})};export{Y as default};
 
 
assets/SearchOverlay-DPjF08Vt.js DELETED
@@ -1 +0,0 @@
1
- import{r as C,b as Q,B as S,i as D,j as e}from"./index-D1SFE8tx.js";import{p as K}from"./paperQueryKeys-CcqbH5YG.js";import{u}from"./useQuery-8sGgldYe.js";import{L as $}from"./LatexTitle-C3kQa1rr.js";import{c as j}from"./catalog-BIqvVz-s.js";import{p as L}from"./papers-Cv1LxXF4.js";import{u as M}from"./useDebounce-BDnCoyu6.js";import{c as B,h as I,d as z}from"./transform-BmaYjIy4.js";import"./katex.min-BSBacQyE.js";const H=10,O=350,y=3,es=({open:t,onClose:i})=>{var E,F,q,w;const v=C.useRef(null),T=Q(),[r,A]=S.useState(""),a=M(r,O),p=r.trim(),c=a.length>=y,x=D();C.useEffect(()=>{var n;if(!t)return;(n=v.current)==null||n.focus();const s=g=>{g.key==="Escape"&&(g.preventDefault(),g.stopPropagation(),i())};return window.addEventListener("keydown",s,!0),()=>window.removeEventListener("keydown",s,!0)},[t,i]);const f=u({queryKey:[...K.feeds.searchOverlay,a],queryFn:()=>L.search(a,1,H),enabled:t&&c,staleTime:6e4,retry:!1}),k=u({queryKey:["search-tasks",a],queryFn:()=>j.listTasks({q:a,page_size:6}),enabled:t&&c,staleTime:6e4,retry:!1}),N=u({queryKey:["search-methods",a],queryFn:()=>j.listMethods({q:a,page_size:6}),enabled:t&&c,staleTime:6e4,retry:!1}),b=u({queryKey:["search-benchmarks",a],queryFn:()=>j.listDatasets({q:a,page_size:6}),enabled:t&&c,staleTime:6e4,retry:!1});if(!t)return null;const o=((E=k.data)==null?void 0:E.results)||[],h=((F=N.data)==null?void 0:F.results)||[],d=((q=b.data)==null?void 0:q.results)||[],m=((w=f.data)==null?void 0:w.results)||[],P=f.isFetching||k.isFetching||N.isFetching||b.isFetching,R=o.length||m.length||h.length||d.length,l=s=>{i(),T(s)},_=()=>{const s=r.trim();s&&l(`/chat?q=${encodeURIComponent(s)}`)};return e.jsx("div",{className:"search-overlay",onClick:i,children:e.jsxs("div",{className:"search-modal",onClick:s=>s.stopPropagation(),children:[e.jsx("input",{ref:v,className:"search-modal-input",placeholder:"Search papers, tasks, methods, or benchmarks…",value:r,onChange:s=>A(s.target.value),onKeyDown:s=>{x&&s.key==="Enter"&&(s.preventDefault(),_())}}),e.jsxs("div",{className:"search-results",children:[x&&r.trim()&&e.jsxs("button",{type:"button",className:"search-ask-row",onClick:_,children:[e.jsx("span",{className:"search-ask-chip",children:"assistant"}),e.jsxs("span",{className:"search-ask-text",children:["Ask: “",r.trim(),"”"]}),e.jsx("kbd",{children:"↵"})]}),!a&&e.jsxs("div",{className:"search-empty",children:["Try “diffusion”, “object detection”, or an arXiv id.",x&&e.jsx("span",{className:"search-empty-sub",children:"Press Enter to ask the assistant"})]}),a&&!c&&e.jsxs("div",{className:"search-empty",children:["Keep typing: results appear from ",y," characters."]}),c&&!P&&!R&&e.jsxs("div",{className:"search-empty",children:['No matches for "',r,'"']}),o.length>0&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"search-section-label",children:["Tasks · ",o.length]}),o.map(s=>{const n=B(I(s.slug||""));return e.jsxs("div",{className:"search-result-tag",onClick:()=>l(`/tasks/${s.slug}`),children:[e.jsx("span",{className:"dot",style:{width:6,height:6,borderRadius:"50%",background:n.dot}}),e.jsx("span",{className:"name",children:z(s.name,s.slug)}),s.paper_count!=null&&e.jsxs("span",{className:"count",children:[s.paper_count," papers"]})]},s.id)})]}),h.length>0&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"search-section-label",children:["Methods · ",h.length]}),h.map(s=>e.jsxs("div",{className:"search-result-tag",onClick:()=>l(`/methods/${s.slug||s.id}`),children:[e.jsx("span",{style:{fontFamily:"var(--mono)",fontWeight:600},children:s.name}),s.paper_count!=null&&e.jsxs("span",{className:"count",children:[s.paper_count," papers"]})]},s.id))]}),d.length>0&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"search-section-label",children:["Benchmarks · ",d.length]}),d.map(s=>e.jsxs("div",{className:"search-result-tag",onClick:()=>l(`/benchmark/${s.slug||s.id}`),children:[e.jsx("span",{className:"name",children:s.name}),s.paper_count!=null&&s.paper_count>0&&e.jsxs("span",{className:"count",children:[s.paper_count," entries"]})]},s.id))]}),m.length>0&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"search-section-label",children:["Papers · ",m.length]}),m.map(s=>{var n;return e.jsxs("div",{className:"search-result",onClick:()=>l(`/paper/${s.arxiv_id||s.id}`),children:[e.jsx("div",{className:"search-result-title",children:e.jsx($,{title:s.title})}),e.jsxs("div",{className:"search-result-meta",children:[e.jsx("span",{children:s.arxiv_id?`arXiv:${s.arxiv_id}`:"External resource"}),((n=s.authors)==null?void 0:n[0])&&e.jsxs(e.Fragment,{children:[e.jsx("span",{children:"·"}),e.jsxs("span",{children:[s.authors[0],s.authors.length>1?" et al.":""]})]}),s.citation_count!=null&&e.jsxs(e.Fragment,{children:[e.jsx("span",{children:"·"}),e.jsxs("span",{children:["↑ ",s.citation_count.toLocaleString()]})]})]})]},s.id)})]}),p.length>=y&&e.jsxs("button",{type:"button",className:"search-view-all-row",onClick:()=>l(`/papers?search=${encodeURIComponent(p)}`),children:["View all paper results for “",p,"”"]})]})]})})};export{es as default};
 
 
assets/SearchOverlay-DdIBp4Kv.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import{r as C,b as Q,B as S,i as D,j as e}from"./index-D6NpXxup.js";import{p as K}from"./paperQueryKeys-CcqbH5YG.js";import{u}from"./useQuery-BSzsAAZV.js";import{L as $}from"./LatexTitle-Cd92uzqM.js";import{c as j}from"./catalog-BkXnDjBr.js";import{p as L}from"./papers-CJuRKhYV.js";import{u as M}from"./useDebounce-CJgp69zc.js";import{c as B,h as I,d as z}from"./transform-dsZcnzEu.js";const H=10,O=350,y=3,ss=({open:t,onClose:i})=>{var E,F,q,w;const v=C.useRef(null),T=Q(),[r,A]=S.useState(""),a=M(r,O),p=r.trim(),c=a.length>=y,x=D();C.useEffect(()=>{var n;if(!t)return;(n=v.current)==null||n.focus();const s=g=>{g.key==="Escape"&&(g.preventDefault(),g.stopPropagation(),i())};return window.addEventListener("keydown",s,!0),()=>window.removeEventListener("keydown",s,!0)},[t,i]);const f=u({queryKey:[...K.feeds.searchOverlay,a],queryFn:()=>L.search(a,1,H),enabled:t&&c,staleTime:6e4,retry:!1}),k=u({queryKey:["search-tasks",a],queryFn:()=>j.listTasks({q:a,page_size:6}),enabled:t&&c,staleTime:6e4,retry:!1}),N=u({queryKey:["search-methods",a],queryFn:()=>j.listMethods({q:a,page_size:6}),enabled:t&&c,staleTime:6e4,retry:!1}),b=u({queryKey:["search-benchmarks",a],queryFn:()=>j.listDatasets({q:a,page_size:6}),enabled:t&&c,staleTime:6e4,retry:!1});if(!t)return null;const o=((E=k.data)==null?void 0:E.results)||[],h=((F=N.data)==null?void 0:F.results)||[],d=((q=b.data)==null?void 0:q.results)||[],m=((w=f.data)==null?void 0:w.results)||[],P=f.isFetching||k.isFetching||N.isFetching||b.isFetching,R=o.length||m.length||h.length||d.length,l=s=>{i(),T(s)},_=()=>{const s=r.trim();s&&l(`/chat?q=${encodeURIComponent(s)}`)};return e.jsx("div",{className:"search-overlay",onClick:i,children:e.jsxs("div",{className:"search-modal",onClick:s=>s.stopPropagation(),children:[e.jsx("input",{ref:v,className:"search-modal-input",placeholder:"Search papers, tasks, methods, or benchmarks…",value:r,onChange:s=>A(s.target.value),onKeyDown:s=>{x&&s.key==="Enter"&&(s.preventDefault(),_())}}),e.jsxs("div",{className:"search-results",children:[x&&r.trim()&&e.jsxs("button",{type:"button",className:"search-ask-row",onClick:_,children:[e.jsx("span",{className:"search-ask-chip",children:"assistant"}),e.jsxs("span",{className:"search-ask-text",children:["Ask: “",r.trim(),"”"]}),e.jsx("kbd",{children:"↵"})]}),!a&&e.jsxs("div",{className:"search-empty",children:["Try “diffusion”, “object detection”, or an arXiv id.",x&&e.jsx("span",{className:"search-empty-sub",children:"Press Enter to ask the assistant"})]}),a&&!c&&e.jsxs("div",{className:"search-empty",children:["Keep typing: results appear from ",y," characters."]}),c&&!P&&!R&&e.jsxs("div",{className:"search-empty",children:['No matches for "',r,'"']}),o.length>0&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"search-section-label",children:["Tasks · ",o.length]}),o.map(s=>{const n=B(I(s.slug||""));return e.jsxs("div",{className:"search-result-tag",onClick:()=>l(`/tasks/${s.slug}`),children:[e.jsx("span",{className:"dot",style:{width:6,height:6,borderRadius:"50%",background:n.dot}}),e.jsx("span",{className:"name",children:z(s.name,s.slug)}),s.paper_count!=null&&e.jsxs("span",{className:"count",children:[s.paper_count," papers"]})]},s.id)})]}),h.length>0&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"search-section-label",children:["Methods · ",h.length]}),h.map(s=>e.jsxs("div",{className:"search-result-tag",onClick:()=>l(`/methods/${s.slug||s.id}`),children:[e.jsx("span",{style:{fontFamily:"var(--mono)",fontWeight:600},children:s.name}),s.paper_count!=null&&e.jsxs("span",{className:"count",children:[s.paper_count," papers"]})]},s.id))]}),d.length>0&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"search-section-label",children:["Benchmarks · ",d.length]}),d.map(s=>e.jsxs("div",{className:"search-result-tag",onClick:()=>l(`/benchmark/${s.slug||s.id}`),children:[e.jsx("span",{className:"name",children:s.name}),s.paper_count!=null&&s.paper_count>0&&e.jsxs("span",{className:"count",children:[s.paper_count," entries"]})]},s.id))]}),m.length>0&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"search-section-label",children:["Papers · ",m.length]}),m.map(s=>{var n;return e.jsxs("div",{className:"search-result",onClick:()=>l(`/paper/${s.arxiv_id||s.id}`),children:[e.jsx("div",{className:"search-result-title",children:e.jsx($,{title:s.title})}),e.jsxs("div",{className:"search-result-meta",children:[e.jsx("span",{children:s.arxiv_id?`arXiv:${s.arxiv_id}`:"External resource"}),((n=s.authors)==null?void 0:n[0])&&e.jsxs(e.Fragment,{children:[e.jsx("span",{children:"·"}),e.jsxs("span",{children:[s.authors[0],s.authors.length>1?" et al.":""]})]}),s.citation_count!=null&&e.jsxs(e.Fragment,{children:[e.jsx("span",{children:"·"}),e.jsxs("span",{children:["↑ ",s.citation_count.toLocaleString()]})]})]})]},s.id)})]}),p.length>=y&&e.jsxs("button",{type:"button",className:"search-view-all-row",onClick:()=>l(`/papers?search=${encodeURIComponent(p)}`),children:["View all paper results for “",p,"”"]})]})]})})};export{ss as default};