diff --git a/assets/AgentLogos-xoTIu0NB.js b/assets/AgentLogos-PqR86_NK.js similarity index 99% rename from assets/AgentLogos-xoTIu0NB.js rename to assets/AgentLogos-PqR86_NK.js index 8e3fce7c22d7ffffc7337c1109dd3e557409b6d4..7fb73f127eff32e3fedd091a437df5f0076b4a34 100644 --- a/assets/AgentLogos-xoTIu0NB.js +++ b/assets/AgentLogos-PqR86_NK.js @@ -1 +1 @@ -import{j as e}from"./index-CjdUkE4w.js";const s="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='256'%20height='257'%20preserveAspectRatio='xMidYMid'%20viewBox='0%200%20256%20257'%3e%3cpath%20fill='%23D97757'%20d='m50.228%20170.321%2050.357-28.257.843-2.463-.843-1.361h-2.462l-8.426-.518-28.775-.778-24.952-1.037-24.175-1.296-6.092-1.297L0%20125.796l.583-3.759%205.12-3.434%207.324.648%2016.202%201.101%2024.304%201.685%2017.629%201.037%2026.118%202.722h4.148l.583-1.685-1.426-1.037-1.101-1.037-25.147-17.045-27.22-18.017-14.258-10.37-7.713-5.25-3.888-4.925-1.685-10.758%207-7.713%209.397.649%202.398.648%209.527%207.323%2020.35%2015.75L94.817%2091.9l3.889%203.24%201.555-1.102.195-.777-1.75-2.917-14.453-26.118-15.425-26.572-6.87-11.018-1.814-6.61c-.648-2.723-1.102-4.991-1.102-7.778l7.972-10.823L71.42%200%2082.05%201.426l4.472%203.888%206.61%2015.101%2010.694%2023.786%2016.591%2032.34%204.861%209.592%202.592%208.879.973%202.722h1.685v-1.556l1.36-18.211%202.528-22.36%202.463-28.776.843-8.1%204.018-9.722%207.971-5.25%206.222%202.981%205.12%207.324-.713%204.73-3.046%2019.768-5.962%2030.98-3.889%2020.739h2.268l2.593-2.593%2010.499-13.934%2017.628-22.036%207.778-8.749%209.073-9.657%205.833-4.601h11.018l8.1%2012.055-3.628%2012.443-11.342%2014.388-9.398%2012.184-13.48%2018.147-8.426%2014.518.778%201.166%202.01-.194%2030.46-6.481%2016.462-2.982%2019.637-3.37%208.88%204.148.971%204.213-3.5%208.62-20.998%205.184-24.628%204.926-36.682%208.685-.454.324.519.648%2016.526%201.555%207.065.389h17.304l32.21%202.398%208.426%205.574%205.055%206.805-.843%205.184-12.962%206.611-17.498-4.148-40.83-9.721-14-3.5h-1.944v1.167l11.666%2011.406%2021.387%2019.314%2026.767%2024.887%201.36%206.157-3.434%204.86-3.63-.518-23.526-17.693-9.073-7.972-20.545-17.304h-1.36v1.814l4.73%206.935%2025.017%2037.59%201.296%2011.536-1.814%203.76-6.481%202.268-7.13-1.297-14.647-20.544-15.1-23.138-12.185-20.739-1.49.843-7.194%2077.448-3.37%203.953-7.778%202.981-6.48-4.925-3.436-7.972%203.435-15.749%204.148-20.544%203.37-16.333%203.046-20.285%201.815-6.74-.13-.454-1.49.194-15.295%2020.999-23.267%2031.433-18.406%2019.702-4.407%201.75-7.648-3.954.713-7.064%204.277-6.286%2025.47-32.405%2015.36-20.092%209.917-11.6-.065-1.686h-.583L44.07%20198.125l-12.055%201.555-5.185-4.86.648-7.972%202.463-2.593%2020.35-13.999-.064.065Z'/%3e%3c/svg%3e",a="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='256'%20height='257'%20preserveAspectRatio='xMidYMid'%20viewBox='0%200%20256%20257'%3e%3cpath%20fill='%23D97757'%20d='m50.228%20170.321%2050.357-28.257.843-2.463-.843-1.361h-2.462l-8.426-.518-28.775-.778-24.952-1.037-24.175-1.296-6.092-1.297L0%20125.796l.583-3.759%205.12-3.434%207.324.648%2016.202%201.101%2024.304%201.685%2017.629%201.037%2026.118%202.722h4.148l.583-1.685-1.426-1.037-1.101-1.037-25.147-17.045-27.22-18.017-14.258-10.37-7.713-5.25-3.888-4.925-1.685-10.758%207-7.713%209.397.649%202.398.648%209.527%207.323%2020.35%2015.75L94.817%2091.9l3.889%203.24%201.555-1.102.195-.777-1.75-2.917-14.453-26.118-15.425-26.572-6.87-11.018-1.814-6.61c-.648-2.723-1.102-4.991-1.102-7.778l7.972-10.823L71.42%200%2082.05%201.426l4.472%203.888%206.61%2015.101%2010.694%2023.786%2016.591%2032.34%204.861%209.592%202.592%208.879.973%202.722h1.685v-1.556l1.36-18.211%202.528-22.36%202.463-28.776.843-8.1%204.018-9.722%207.971-5.25%206.222%202.981%205.12%207.324-.713%204.73-3.046%2019.768-5.962%2030.98-3.889%2020.739h2.268l2.593-2.593%2010.499-13.934%2017.628-22.036%207.778-8.749%209.073-9.657%205.833-4.601h11.018l8.1%2012.055-3.628%2012.443-11.342%2014.388-9.398%2012.184-13.48%2018.147-8.426%2014.518.778%201.166%202.01-.194%2030.46-6.481%2016.462-2.982%2019.637-3.37%208.88%204.148.971%204.213-3.5%208.62-20.998%205.184-24.628%204.926-36.682%208.685-.454.324.519.648%2016.526%201.555%207.065.389h17.304l32.21%202.398%208.426%205.574%205.055%206.805-.843%205.184-12.962%206.611-17.498-4.148-40.83-9.721-14-3.5h-1.944v1.167l11.666%2011.406%2021.387%2019.314%2026.767%2024.887%201.36%206.157-3.434%204.86-3.63-.518-23.526-17.693-9.073-7.972-20.545-17.304h-1.36v1.814l4.73%206.935%2025.017%2037.59%201.296%2011.536-1.814%203.76-6.481%202.268-7.13-1.297-14.647-20.544-15.1-23.138-12.185-20.739-1.49.843-7.194%2077.448-3.37%203.953-7.778%202.981-6.48-4.925-3.436-7.972%203.435-15.749%204.148-20.544%203.37-16.333%203.046-20.285%201.815-6.74-.13-.454-1.49.194-15.295%2020.999-23.267%2031.433-18.406%2019.702-4.407%201.75-7.648-3.954.713-7.064%204.277-6.286%2025.47-32.405%2015.36-20.092%209.917-11.6-.065-1.686h-.583L44.07%20198.125l-12.055%201.555-5.185-4.86.648-7.972%202.463-2.593%2020.35-13.999-.064.065Z'/%3e%3c/svg%3e",h="data:image/svg+xml,%3csvg%20fill='%23111'%20fill-rule='evenodd'%20height='1em'%20style='flex:none;line-height:1'%20viewBox='0%200%2024%2024'%20width='1em'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eCodex%3c/title%3e%3cpath%20clip-rule='evenodd'%20d='M8.086.457a6.105%206.105%200%20013.046-.415c1.333.153%202.521.72%203.564%201.7a.117.117%200%2000.107.029c1.408-.346%202.762-.224%204.061.366l.063.03.154.076c1.357.703%202.33%201.77%202.918%203.198.278.679.418%201.388.421%202.126a5.655%205.655%200%2001-.18%201.631.167.167%200%2000.04.155%205.982%205.982%200%20011.578%202.891c.385%201.901-.01%203.615-1.183%205.14l-.182.22a6.063%206.063%200%2001-2.934%201.851.162.162%200%2000-.108.102c-.255.736-.511%201.364-.987%201.992-1.199%201.582-2.962%202.462-4.948%202.451-1.583-.008-2.986-.587-4.21-1.736a.145.145%200%2000-.14-.032c-.518.167-1.04.191-1.604.185a5.924%205.924%200%2001-2.595-.622%206.058%206.058%200%2001-2.146-1.781c-.203-.269-.404-.522-.551-.821a7.74%207.74%200%2001-.495-1.283%206.11%206.11%200%2001-.017-3.064.166.166%200%2000.008-.074.115.115%200%2000-.037-.064%205.958%205.958%200%2001-1.38-2.202%205.196%205.196%200%2001-.333-1.589%206.915%206.915%200%2001.188-2.132c.45-1.484%201.309-2.648%202.577-3.493.282-.188.55-.334.802-.438.286-.12.573-.22.861-.304a.129.129%200%2000.087-.087A6.016%206.016%200%20015.635%202.31C6.315%201.464%207.132.846%208.086.457zm-.804%207.85a.848.848%200%2000-1.473.842l1.694%202.965-1.688%202.848a.849.849%200%20001.46.864l1.94-3.272a.849.849%200%2000.007-.854l-1.94-3.393zm5.446%206.24a.849.849%200%20000%201.695h4.848a.849.849%200%20000-1.696h-4.848z'%3e%3c/path%3e%3c/svg%3e",o="data:image/svg+xml,%3csvg%20fill='%23fff'%20fill-rule='evenodd'%20height='1em'%20style='flex:none;line-height:1'%20viewBox='0%200%2024%2024'%20width='1em'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eCodex%3c/title%3e%3cpath%20clip-rule='evenodd'%20d='M8.086.457a6.105%206.105%200%20013.046-.415c1.333.153%202.521.72%203.564%201.7a.117.117%200%2000.107.029c1.408-.346%202.762-.224%204.061.366l.063.03.154.076c1.357.703%202.33%201.77%202.918%203.198.278.679.418%201.388.421%202.126a5.655%205.655%200%2001-.18%201.631.167.167%200%2000.04.155%205.982%205.982%200%20011.578%202.891c.385%201.901-.01%203.615-1.183%205.14l-.182.22a6.063%206.063%200%2001-2.934%201.851.162.162%200%2000-.108.102c-.255.736-.511%201.364-.987%201.992-1.199%201.582-2.962%202.462-4.948%202.451-1.583-.008-2.986-.587-4.21-1.736a.145.145%200%2000-.14-.032c-.518.167-1.04.191-1.604.185a5.924%205.924%200%2001-2.595-.622%206.058%206.058%200%2001-2.146-1.781c-.203-.269-.404-.522-.551-.821a7.74%207.74%200%2001-.495-1.283%206.11%206.11%200%2001-.017-3.064.166.166%200%2000.008-.074.115.115%200%2000-.037-.064%205.958%205.958%200%2001-1.38-2.202%205.196%205.196%200%2001-.333-1.589%206.915%206.915%200%2001.188-2.132c.45-1.484%201.309-2.648%202.577-3.493.282-.188.55-.334.802-.438.286-.12.573-.22.861-.304a.129.129%200%2000.087-.087A6.016%206.016%200%20015.635%202.31C6.315%201.464%207.132.846%208.086.457zm-.804%207.85a.848.848%200%2000-1.473.842l1.694%202.965-1.688%202.848a.849.849%200%20001.46.864l1.94-3.272a.849.849%200%2000.007-.854l-1.94-3.393zm5.446%206.24a.849.849%200%20000%201.695h4.848a.849.849%200%20000-1.696h-4.848z'%3e%3c/path%3e%3c/svg%3e",r="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20id='cursor_light__Ebene_1'%20xmlns='http://www.w3.org/2000/svg'%20version='1.1'%20viewBox='0%200%20466.73%20532.09'%3e%3c!--Generator:%20Adobe%20Illustrator%2029.6.1,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%202.1.1%20Build%209)--%3e%3cdefs%3e%3cstyle%3e.cursor_light__st0{fill:%2326251e}%3c/style%3e%3c/defs%3e%3cpath%20class='cursor_light__st0'%20d='M457.43,125.94L244.42,2.96c-6.84-3.95-15.28-3.95-22.12,0L9.3,125.94c-5.75,3.32-9.3,9.46-9.3,16.11v247.99c0,6.65,3.55,12.79,9.3,16.11l213.01,122.98c6.84,3.95,15.28,3.95,22.12,0l213.01-122.98c5.75-3.32,9.3-9.46,9.3-16.11v-247.99c0-6.65-3.55-12.79-9.3-16.11h-.01ZM444.05,151.99l-205.63,356.16c-1.39,2.4-5.06,1.42-5.06-1.36v-233.21c0-4.66-2.49-8.97-6.53-11.31L24.87,145.67c-2.4-1.39-1.42-5.06,1.36-5.06h411.26c5.84,0,9.49,6.33,6.57,11.39h-.01Z'/%3e%3c/svg%3e",d="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20id='cursor_dark__Ebene_1'%20xmlns='http://www.w3.org/2000/svg'%20version='1.1'%20viewBox='0%200%20466.73%20532.09'%3e%3c!--Generator:%20Adobe%20Illustrator%2029.6.1,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%202.1.1%20Build%209)--%3e%3cdefs%3e%3cstyle%3e.cursor_dark__st0{fill:%23edecec}%3c/style%3e%3c/defs%3e%3cpath%20class='cursor_dark__st0'%20d='M457.43,125.94L244.42,2.96c-6.84-3.95-15.28-3.95-22.12,0L9.3,125.94c-5.75,3.32-9.3,9.46-9.3,16.11v247.99c0,6.65,3.55,12.79,9.3,16.11l213.01,122.98c6.84,3.95,15.28,3.95,22.12,0l213.01-122.98c5.75-3.32,9.3-9.46,9.3-16.11v-247.99c0-6.65-3.55-12.79-9.3-16.11h-.01ZM444.05,151.99l-205.63,356.16c-1.39,2.4-5.06,1.42-5.06-1.36v-233.21c0-4.66-2.49-8.97-6.53-11.31L24.87,145.67c-2.4-1.39-1.42-5.06,1.36-5.06h411.26c5.84,0,9.49,6.33,6.57,11.39h-.01Z'/%3e%3c/svg%3e",n="data:image/svg+xml,%3csvg%20width='512'%20height='512'%20viewBox='0%200%20512%20512'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20width='512'%20height='512'%20fill='%23FDFCFC'/%3e%3cpath%20d='M320%20224V352H192V224H320Z'%20fill='%23E6E5E6'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M384%20416H128V96H384V416ZM320%20160H192V352H320V160Z'%20fill='%2317181C'/%3e%3c/svg%3e",g="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20version='1.1'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='512'%20height='512'%3e%3csvg%20width='512'%20height='512'%20viewBox='0%200%20512%20512'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20width='512'%20height='512'%20fill='%23131010'%3e%3c/rect%3e%3cpath%20d='M320%20224V352H192V224H320Z'%20fill='%235A5858'%3e%3c/path%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M384%20416H128V96H384V416ZM320%20160H192V352H320V160Z'%20fill='white'%3e%3c/path%3e%3c/svg%3e%3cstyle%3e@media%20(prefers-color-scheme:%20light)%20{%20:root%20{%20filter:%20none;%20}%20}%20@media%20(prefers-color-scheme:%20dark)%20{%20:root%20{%20filter:%20none;%20}%20}%20%3c/style%3e%3c/svg%3e",i=[{name:"Claude",light:s,dark:a},{name:"Codex",light:h,dark:o},{name:"Cursor",light:r,dark:d},{name:"OpenCode",light:n,dark:g}];function w(){return e.jsx("span",{className:"ml-1 inline-flex shrink-0 items-center gap-1.5","aria-hidden":"true",children:i.map(({name:l,light:t,dark:c})=>e.jsxs("span",{title:l,className:"inline-flex h-[18px] w-[18px]",children:[e.jsx("img",{src:t,alt:"",width:18,height:18,className:"h-full w-full object-contain dark:hidden"}),e.jsx("img",{src:c,alt:"",width:18,height:18,className:"hidden h-full w-full object-contain dark:block"})]},l))})}function m(){return e.jsx("ul",{className:"flex flex-wrap gap-2","aria-label":"Supported coding agents",children:i.map(({name:l,light:t,dark:c})=>e.jsxs("li",{className:"inline-flex items-center gap-2 rounded-full border px-3 py-1 text-sm",children:[e.jsx("img",{src:t,alt:"",width:18,height:18,className:"h-[18px] w-[18px] object-contain dark:hidden"}),e.jsx("img",{src:c,alt:"",width:18,height:18,className:"hidden h-[18px] w-[18px] object-contain dark:block"}),l]},l))})}export{w as A,m as a}; +import{j as e}from"./index-CHGpuh10.js";const s="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='256'%20height='257'%20preserveAspectRatio='xMidYMid'%20viewBox='0%200%20256%20257'%3e%3cpath%20fill='%23D97757'%20d='m50.228%20170.321%2050.357-28.257.843-2.463-.843-1.361h-2.462l-8.426-.518-28.775-.778-24.952-1.037-24.175-1.296-6.092-1.297L0%20125.796l.583-3.759%205.12-3.434%207.324.648%2016.202%201.101%2024.304%201.685%2017.629%201.037%2026.118%202.722h4.148l.583-1.685-1.426-1.037-1.101-1.037-25.147-17.045-27.22-18.017-14.258-10.37-7.713-5.25-3.888-4.925-1.685-10.758%207-7.713%209.397.649%202.398.648%209.527%207.323%2020.35%2015.75L94.817%2091.9l3.889%203.24%201.555-1.102.195-.777-1.75-2.917-14.453-26.118-15.425-26.572-6.87-11.018-1.814-6.61c-.648-2.723-1.102-4.991-1.102-7.778l7.972-10.823L71.42%200%2082.05%201.426l4.472%203.888%206.61%2015.101%2010.694%2023.786%2016.591%2032.34%204.861%209.592%202.592%208.879.973%202.722h1.685v-1.556l1.36-18.211%202.528-22.36%202.463-28.776.843-8.1%204.018-9.722%207.971-5.25%206.222%202.981%205.12%207.324-.713%204.73-3.046%2019.768-5.962%2030.98-3.889%2020.739h2.268l2.593-2.593%2010.499-13.934%2017.628-22.036%207.778-8.749%209.073-9.657%205.833-4.601h11.018l8.1%2012.055-3.628%2012.443-11.342%2014.388-9.398%2012.184-13.48%2018.147-8.426%2014.518.778%201.166%202.01-.194%2030.46-6.481%2016.462-2.982%2019.637-3.37%208.88%204.148.971%204.213-3.5%208.62-20.998%205.184-24.628%204.926-36.682%208.685-.454.324.519.648%2016.526%201.555%207.065.389h17.304l32.21%202.398%208.426%205.574%205.055%206.805-.843%205.184-12.962%206.611-17.498-4.148-40.83-9.721-14-3.5h-1.944v1.167l11.666%2011.406%2021.387%2019.314%2026.767%2024.887%201.36%206.157-3.434%204.86-3.63-.518-23.526-17.693-9.073-7.972-20.545-17.304h-1.36v1.814l4.73%206.935%2025.017%2037.59%201.296%2011.536-1.814%203.76-6.481%202.268-7.13-1.297-14.647-20.544-15.1-23.138-12.185-20.739-1.49.843-7.194%2077.448-3.37%203.953-7.778%202.981-6.48-4.925-3.436-7.972%203.435-15.749%204.148-20.544%203.37-16.333%203.046-20.285%201.815-6.74-.13-.454-1.49.194-15.295%2020.999-23.267%2031.433-18.406%2019.702-4.407%201.75-7.648-3.954.713-7.064%204.277-6.286%2025.47-32.405%2015.36-20.092%209.917-11.6-.065-1.686h-.583L44.07%20198.125l-12.055%201.555-5.185-4.86.648-7.972%202.463-2.593%2020.35-13.999-.064.065Z'/%3e%3c/svg%3e",a="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='256'%20height='257'%20preserveAspectRatio='xMidYMid'%20viewBox='0%200%20256%20257'%3e%3cpath%20fill='%23D97757'%20d='m50.228%20170.321%2050.357-28.257.843-2.463-.843-1.361h-2.462l-8.426-.518-28.775-.778-24.952-1.037-24.175-1.296-6.092-1.297L0%20125.796l.583-3.759%205.12-3.434%207.324.648%2016.202%201.101%2024.304%201.685%2017.629%201.037%2026.118%202.722h4.148l.583-1.685-1.426-1.037-1.101-1.037-25.147-17.045-27.22-18.017-14.258-10.37-7.713-5.25-3.888-4.925-1.685-10.758%207-7.713%209.397.649%202.398.648%209.527%207.323%2020.35%2015.75L94.817%2091.9l3.889%203.24%201.555-1.102.195-.777-1.75-2.917-14.453-26.118-15.425-26.572-6.87-11.018-1.814-6.61c-.648-2.723-1.102-4.991-1.102-7.778l7.972-10.823L71.42%200%2082.05%201.426l4.472%203.888%206.61%2015.101%2010.694%2023.786%2016.591%2032.34%204.861%209.592%202.592%208.879.973%202.722h1.685v-1.556l1.36-18.211%202.528-22.36%202.463-28.776.843-8.1%204.018-9.722%207.971-5.25%206.222%202.981%205.12%207.324-.713%204.73-3.046%2019.768-5.962%2030.98-3.889%2020.739h2.268l2.593-2.593%2010.499-13.934%2017.628-22.036%207.778-8.749%209.073-9.657%205.833-4.601h11.018l8.1%2012.055-3.628%2012.443-11.342%2014.388-9.398%2012.184-13.48%2018.147-8.426%2014.518.778%201.166%202.01-.194%2030.46-6.481%2016.462-2.982%2019.637-3.37%208.88%204.148.971%204.213-3.5%208.62-20.998%205.184-24.628%204.926-36.682%208.685-.454.324.519.648%2016.526%201.555%207.065.389h17.304l32.21%202.398%208.426%205.574%205.055%206.805-.843%205.184-12.962%206.611-17.498-4.148-40.83-9.721-14-3.5h-1.944v1.167l11.666%2011.406%2021.387%2019.314%2026.767%2024.887%201.36%206.157-3.434%204.86-3.63-.518-23.526-17.693-9.073-7.972-20.545-17.304h-1.36v1.814l4.73%206.935%2025.017%2037.59%201.296%2011.536-1.814%203.76-6.481%202.268-7.13-1.297-14.647-20.544-15.1-23.138-12.185-20.739-1.49.843-7.194%2077.448-3.37%203.953-7.778%202.981-6.48-4.925-3.436-7.972%203.435-15.749%204.148-20.544%203.37-16.333%203.046-20.285%201.815-6.74-.13-.454-1.49.194-15.295%2020.999-23.267%2031.433-18.406%2019.702-4.407%201.75-7.648-3.954.713-7.064%204.277-6.286%2025.47-32.405%2015.36-20.092%209.917-11.6-.065-1.686h-.583L44.07%20198.125l-12.055%201.555-5.185-4.86.648-7.972%202.463-2.593%2020.35-13.999-.064.065Z'/%3e%3c/svg%3e",h="data:image/svg+xml,%3csvg%20fill='%23111'%20fill-rule='evenodd'%20height='1em'%20style='flex:none;line-height:1'%20viewBox='0%200%2024%2024'%20width='1em'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eCodex%3c/title%3e%3cpath%20clip-rule='evenodd'%20d='M8.086.457a6.105%206.105%200%20013.046-.415c1.333.153%202.521.72%203.564%201.7a.117.117%200%2000.107.029c1.408-.346%202.762-.224%204.061.366l.063.03.154.076c1.357.703%202.33%201.77%202.918%203.198.278.679.418%201.388.421%202.126a5.655%205.655%200%2001-.18%201.631.167.167%200%2000.04.155%205.982%205.982%200%20011.578%202.891c.385%201.901-.01%203.615-1.183%205.14l-.182.22a6.063%206.063%200%2001-2.934%201.851.162.162%200%2000-.108.102c-.255.736-.511%201.364-.987%201.992-1.199%201.582-2.962%202.462-4.948%202.451-1.583-.008-2.986-.587-4.21-1.736a.145.145%200%2000-.14-.032c-.518.167-1.04.191-1.604.185a5.924%205.924%200%2001-2.595-.622%206.058%206.058%200%2001-2.146-1.781c-.203-.269-.404-.522-.551-.821a7.74%207.74%200%2001-.495-1.283%206.11%206.11%200%2001-.017-3.064.166.166%200%2000.008-.074.115.115%200%2000-.037-.064%205.958%205.958%200%2001-1.38-2.202%205.196%205.196%200%2001-.333-1.589%206.915%206.915%200%2001.188-2.132c.45-1.484%201.309-2.648%202.577-3.493.282-.188.55-.334.802-.438.286-.12.573-.22.861-.304a.129.129%200%2000.087-.087A6.016%206.016%200%20015.635%202.31C6.315%201.464%207.132.846%208.086.457zm-.804%207.85a.848.848%200%2000-1.473.842l1.694%202.965-1.688%202.848a.849.849%200%20001.46.864l1.94-3.272a.849.849%200%2000.007-.854l-1.94-3.393zm5.446%206.24a.849.849%200%20000%201.695h4.848a.849.849%200%20000-1.696h-4.848z'%3e%3c/path%3e%3c/svg%3e",o="data:image/svg+xml,%3csvg%20fill='%23fff'%20fill-rule='evenodd'%20height='1em'%20style='flex:none;line-height:1'%20viewBox='0%200%2024%2024'%20width='1em'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eCodex%3c/title%3e%3cpath%20clip-rule='evenodd'%20d='M8.086.457a6.105%206.105%200%20013.046-.415c1.333.153%202.521.72%203.564%201.7a.117.117%200%2000.107.029c1.408-.346%202.762-.224%204.061.366l.063.03.154.076c1.357.703%202.33%201.77%202.918%203.198.278.679.418%201.388.421%202.126a5.655%205.655%200%2001-.18%201.631.167.167%200%2000.04.155%205.982%205.982%200%20011.578%202.891c.385%201.901-.01%203.615-1.183%205.14l-.182.22a6.063%206.063%200%2001-2.934%201.851.162.162%200%2000-.108.102c-.255.736-.511%201.364-.987%201.992-1.199%201.582-2.962%202.462-4.948%202.451-1.583-.008-2.986-.587-4.21-1.736a.145.145%200%2000-.14-.032c-.518.167-1.04.191-1.604.185a5.924%205.924%200%2001-2.595-.622%206.058%206.058%200%2001-2.146-1.781c-.203-.269-.404-.522-.551-.821a7.74%207.74%200%2001-.495-1.283%206.11%206.11%200%2001-.017-3.064.166.166%200%2000.008-.074.115.115%200%2000-.037-.064%205.958%205.958%200%2001-1.38-2.202%205.196%205.196%200%2001-.333-1.589%206.915%206.915%200%2001.188-2.132c.45-1.484%201.309-2.648%202.577-3.493.282-.188.55-.334.802-.438.286-.12.573-.22.861-.304a.129.129%200%2000.087-.087A6.016%206.016%200%20015.635%202.31C6.315%201.464%207.132.846%208.086.457zm-.804%207.85a.848.848%200%2000-1.473.842l1.694%202.965-1.688%202.848a.849.849%200%20001.46.864l1.94-3.272a.849.849%200%2000.007-.854l-1.94-3.393zm5.446%206.24a.849.849%200%20000%201.695h4.848a.849.849%200%20000-1.696h-4.848z'%3e%3c/path%3e%3c/svg%3e",r="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20id='cursor_light__Ebene_1'%20xmlns='http://www.w3.org/2000/svg'%20version='1.1'%20viewBox='0%200%20466.73%20532.09'%3e%3c!--Generator:%20Adobe%20Illustrator%2029.6.1,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%202.1.1%20Build%209)--%3e%3cdefs%3e%3cstyle%3e.cursor_light__st0{fill:%2326251e}%3c/style%3e%3c/defs%3e%3cpath%20class='cursor_light__st0'%20d='M457.43,125.94L244.42,2.96c-6.84-3.95-15.28-3.95-22.12,0L9.3,125.94c-5.75,3.32-9.3,9.46-9.3,16.11v247.99c0,6.65,3.55,12.79,9.3,16.11l213.01,122.98c6.84,3.95,15.28,3.95,22.12,0l213.01-122.98c5.75-3.32,9.3-9.46,9.3-16.11v-247.99c0-6.65-3.55-12.79-9.3-16.11h-.01ZM444.05,151.99l-205.63,356.16c-1.39,2.4-5.06,1.42-5.06-1.36v-233.21c0-4.66-2.49-8.97-6.53-11.31L24.87,145.67c-2.4-1.39-1.42-5.06,1.36-5.06h411.26c5.84,0,9.49,6.33,6.57,11.39h-.01Z'/%3e%3c/svg%3e",d="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20id='cursor_dark__Ebene_1'%20xmlns='http://www.w3.org/2000/svg'%20version='1.1'%20viewBox='0%200%20466.73%20532.09'%3e%3c!--Generator:%20Adobe%20Illustrator%2029.6.1,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%202.1.1%20Build%209)--%3e%3cdefs%3e%3cstyle%3e.cursor_dark__st0{fill:%23edecec}%3c/style%3e%3c/defs%3e%3cpath%20class='cursor_dark__st0'%20d='M457.43,125.94L244.42,2.96c-6.84-3.95-15.28-3.95-22.12,0L9.3,125.94c-5.75,3.32-9.3,9.46-9.3,16.11v247.99c0,6.65,3.55,12.79,9.3,16.11l213.01,122.98c6.84,3.95,15.28,3.95,22.12,0l213.01-122.98c5.75-3.32,9.3-9.46,9.3-16.11v-247.99c0-6.65-3.55-12.79-9.3-16.11h-.01ZM444.05,151.99l-205.63,356.16c-1.39,2.4-5.06,1.42-5.06-1.36v-233.21c0-4.66-2.49-8.97-6.53-11.31L24.87,145.67c-2.4-1.39-1.42-5.06,1.36-5.06h411.26c5.84,0,9.49,6.33,6.57,11.39h-.01Z'/%3e%3c/svg%3e",n="data:image/svg+xml,%3csvg%20width='512'%20height='512'%20viewBox='0%200%20512%20512'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20width='512'%20height='512'%20fill='%23FDFCFC'/%3e%3cpath%20d='M320%20224V352H192V224H320Z'%20fill='%23E6E5E6'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M384%20416H128V96H384V416ZM320%20160H192V352H320V160Z'%20fill='%2317181C'/%3e%3c/svg%3e",g="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20version='1.1'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='512'%20height='512'%3e%3csvg%20width='512'%20height='512'%20viewBox='0%200%20512%20512'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20width='512'%20height='512'%20fill='%23131010'%3e%3c/rect%3e%3cpath%20d='M320%20224V352H192V224H320Z'%20fill='%235A5858'%3e%3c/path%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M384%20416H128V96H384V416ZM320%20160H192V352H320V160Z'%20fill='white'%3e%3c/path%3e%3c/svg%3e%3cstyle%3e@media%20(prefers-color-scheme:%20light)%20{%20:root%20{%20filter:%20none;%20}%20}%20@media%20(prefers-color-scheme:%20dark)%20{%20:root%20{%20filter:%20none;%20}%20}%20%3c/style%3e%3c/svg%3e",i=[{name:"Claude",light:s,dark:a},{name:"Codex",light:h,dark:o},{name:"Cursor",light:r,dark:d},{name:"OpenCode",light:n,dark:g}];function w(){return e.jsx("span",{className:"ml-1 inline-flex shrink-0 items-center gap-1.5","aria-hidden":"true",children:i.map(({name:l,light:t,dark:c})=>e.jsxs("span",{title:l,className:"inline-flex h-[18px] w-[18px]",children:[e.jsx("img",{src:t,alt:"",width:18,height:18,className:"h-full w-full object-contain dark:hidden"}),e.jsx("img",{src:c,alt:"",width:18,height:18,className:"hidden h-full w-full object-contain dark:block"})]},l))})}function m(){return e.jsx("ul",{className:"flex flex-wrap gap-2","aria-label":"Supported coding agents",children:i.map(({name:l,light:t,dark:c})=>e.jsxs("li",{className:"inline-flex items-center gap-2 rounded-full border px-3 py-1 text-sm",children:[e.jsx("img",{src:t,alt:"",width:18,height:18,className:"h-[18px] w-[18px] object-contain dark:hidden"}),e.jsx("img",{src:c,alt:"",width:18,height:18,className:"hidden h-[18px] w-[18px] object-contain dark:block"}),l]},l))})}export{w as A,m as a}; diff --git a/assets/AiDeadlinesView-Dh-TYdum.js b/assets/AiDeadlinesView-Ad6LnMOr.js similarity index 96% rename from assets/AiDeadlinesView-Dh-TYdum.js rename to assets/AiDeadlinesView-Ad6LnMOr.js index 2bad95ac432488e0d7c63fc1e3d9e9de6e02dba6..e0c289324d70786018488a33a9a14661a9542eb4 100644 --- a/assets/AiDeadlinesView-Dh-TYdum.js +++ b/assets/AiDeadlinesView-Ad6LnMOr.js @@ -1,3 +1,3 @@ -import{d as g,j as t,b as R,T as A}from"./index-CjdUkE4w.js";import{c as L}from"./catalog-qXcKve0z.js";import{S as B}from"./switch-hcLL2FH0.js";import{S as U}from"./skeleton-DTWi7Ctg.js";import{A as W,a as M}from"./alert-BM9Xfuyy.js";import{s as $}from"./safeExternalHref-CkBrsh84.js";import{D as O,a as V,c as P,b as G,d as H}from"./dialog-BzX9PD3v.js";import{s as K,n as S,f as _,p as Y,u as N,l as k,a as I,c as b,D as q,b as z,d as Q}from"./deadlines-BH32v7D1.js";import"./index-BxR27SAB.js";const w={fontFamily:"var(--mono)",fontSize:10,letterSpacing:"0.12em",textTransform:"uppercase",color:"var(--ink-faint)"},J=(e,l)=>{const s=Math.ceil((e-l)/q);return s<=0?"passed":`${s} ${s===1?"day":"days"}`},F=(e,l)=>{const s=_(e.start_date,e.end_date),r=e.venue||[e.city,e.country].filter(Boolean).join(", ");return[`${l.label||l.type||"Deadline"} for ${e.name}`,s?`Dates: ${s}`:null,r?`Location: ${r}`:null,e.url?`Website: ${e.url}`:null].filter(Boolean).join(` +import{d as g,j as t,b as R,T as A}from"./index-CHGpuh10.js";import{c as L}from"./catalog-DMzmJg__.js";import{S as B}from"./switch-CD23XWT7.js";import{S as U}from"./skeleton-Df0GaMuw.js";import{A as W,a as M}from"./alert-DPvmCXZT.js";import{s as $}from"./safeExternalHref-CkBrsh84.js";import{D as O,a as V,c as P,b as G,d as H}from"./dialog-BfI2DQVf.js";import{s as K,n as S,f as _,p as Y,u as N,l as k,a as I,c as b,D as q,b as z,d as Q}from"./deadlines-BH32v7D1.js";import"./index-CWaI9Snb.js";const w={fontFamily:"var(--mono)",fontSize:10,letterSpacing:"0.12em",textTransform:"uppercase",color:"var(--ink-faint)"},J=(e,l)=>{const s=Math.ceil((e-l)/q);return s<=0?"passed":`${s} ${s===1?"day":"days"}`},F=(e,l)=>{const s=_(e.start_date,e.end_date),r=e.venue||[e.city,e.country].filter(Boolean).join(", ");return[`${l.label||l.type||"Deadline"} for ${e.name}`,s?`Dates: ${s}`:null,r?`Location: ${r}`:null,e.url?`Website: ${e.url}`:null].filter(Boolean).join(` `)},C=e=>e.toISOString().replace(/[-:]/g,"").replace(/\.\d{3}/,""),X=(e,l)=>{const s=new Date(l.deadline_at),r=new Date(s.getTime()+60*60*1e3),o=`${e.short_name||e.name} ${l.label||l.type||"deadline"}`,h=e.venue||[e.city,e.country].filter(Boolean).join(", "),n=`https://calendar.google.com/calendar/render?action=TEMPLATE&text=${encodeURIComponent(o)}&dates=${C(s)}/${C(r)}&details=${encodeURIComponent(F(e,l))}&location=${encodeURIComponent(h)}`,p=$(n);p&&window.open(p,"_blank","noopener,noreferrer")},Z=(e,l)=>{const s=new Date(l.deadline_at),r=new Date(s.getTime()+60*60*1e3),o=`${e.short_name||e.name} ${l.label||l.type||"deadline"}`,h=e.venue||[e.city,e.country].filter(Boolean).join(", "),n=["BEGIN:VCALENDAR","VERSION:2.0","BEGIN:VEVENT",e.url?`URL:${e.url}`:null,`DTSTART:${C(s)}`,`DTEND:${C(r)}`,`SUMMARY:${o}`,`DESCRIPTION:${F(e,l).replace(/\n/g,"\\n")}`,h?`LOCATION:${h}`:null,"END:VEVENT","END:VCALENDAR"].filter(Boolean).join(` `),p=new Blob([n],{type:"text/calendar;charset=utf-8"}),d=document.createElement("a");d.href=URL.createObjectURL(p),d.download=`${(e.short_name||e.name).toLowerCase().replace(/\s+/g,"-")}-deadline.ics`,document.body.appendChild(d),d.click(),document.body.removeChild(d),URL.revokeObjectURL(d.href)},ee=({conf:e,open:l,onOpenChange:s})=>{const[r,o]=g.useState(()=>Date.now());g.useEffect(()=>{if(!l)return;o(Date.now());const i=setInterval(()=>o(Date.now()),1e3);return()=>clearInterval(i)},[l]);const h=g.useMemo(()=>e?K(e):[],[e]),n=g.useMemo(()=>e?S(e,r):null,[e,r]),p=e?_(e.start_date,e.end_date):null,d=e?e.venue||[e.city,e.country].filter(Boolean).join(", ")||e.location:null,m=n?new Date(n.deadline_at).getTime():null;return t.jsx(O,{open:l,onOpenChange:s,children:t.jsx(V,{className:"max-w-xl",style:{background:"var(--bg-elevated)",maxHeight:"85vh",overflowY:"auto"},children:e&&t.jsxs(t.Fragment,{children:[t.jsxs(P,{children:[t.jsx(G,{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(H,{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:[p&&t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:4},children:[t.jsx("span",{style:w,children:"Dates"}),t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:13,color:"var(--ink-soft)"},children:p})]}),d&&t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:4},children:[t.jsx("span",{style:w,children:"Venue"}),t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:13,color:"var(--ink-soft)"},children:d})]})]}),m!=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:w,children:"Next deadline in"}),t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:22,fontWeight:600,color:N(m,r)},children:Y(m,r)})]}),t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:8},children:[t.jsx("span",{style:w,children:"Important deadlines"}),h.length===0?t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:13,color:"var(--ink-faint)"},children:"No deadlines listed"}):h.map((i,c)=>{const y=new Date(i.deadline_at).getTime(),a=n!=null&&i.deadline_at===n.deadline_at&&i.type===n.type,u=y<=r;return t.jsxs("div",{style:{display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:12,padding:"8px 12px",borderRadius:6,background:a?"var(--accent-soft)":"transparent",border:a?"1px solid var(--hairline-strong)":"1px solid var(--hairline)",opacity:u&&!a?.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:a?600:400},children:[i.label||k(i.type||"deadline"),a&&t.jsx("span",{style:{...w,marginLeft:8},children:"Next"})]}),t.jsxs("span",{style:{fontFamily:"var(--mono)",fontSize:12,color:"var(--ink-faint)"},children:[I(i.deadline_at),i.timezone?` · ${i.timezone}`:""]})]}),t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:12,fontWeight:600,whiteSpace:"nowrap",color:N(u?null:y,r)},children:J(y,r)})]},`${i.type??"deadline"}-${c}`)})]}),b(e).length>0&&t.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:6},children:b(e).map(i=>t.jsx("span",{className:"tag-chip",style:{background:"var(--bg-subtle)",color:"var(--ink-soft)"},children:k(i)},i))}),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:$(e.url)??void 0,target:"_blank",rel:"noopener noreferrer",style:{fontFamily:"var(--mono)",fontSize:12,color:"var(--accent-text)"},children:"Visit website ↗"}),n&&t.jsxs("div",{style:{display:"flex",gap:12,marginLeft:"auto"},children:[t.jsx("button",{type:"button",className:"tag-chip",onClick:()=>X(e,n),style:{background:"var(--bg-subtle)",color:"var(--ink-soft)"},children:"+ Google Calendar"}),t.jsx("button",{type:"button",className:"tag-chip",onClick:()=>Z(e,n),style:{background:"var(--bg-subtle)",color:"var(--ink-soft)"},children:"+ Apple / .ics"})]})]})]})]})})})},E=({id:e,label:l,checked:s,onChange:r})=>t.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,fontFamily:"var(--mono)",fontSize:12,color:"var(--ink-soft)"},children:[t.jsx(B,{id:e,checked:s,onCheckedChange:r}),t.jsx("label",{htmlFor:e,style:{cursor:"pointer"},children:l})]}),te=({conf:e,now:l,selectedDomains:s,onToggleDomain:r,onOpen:o})=>{const h=S(e,l),n=h??z(e),p=n?new Date(n.deadline_at).getTime():null,d=N(h?p:null,l),m=_(e.start_date,e.end_date),i=[e.city??null,e.country??null].filter(Boolean).join(", ");return t.jsxs("div",{role:"button",tabIndex:0,onClick:()=>o(e),onKeyDown:c=>{(c.key==="Enter"||c.key===" ")&&(c.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:$(e.url)??void 0,target:"_blank",rel:"noopener noreferrer",onClick:c=>c.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:(n==null?void 0:n.label)||(n==null?void 0:n.type)||"Deadline"}),t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:12,color:"var(--ink-soft)"},children:n?`${I(n.deadline_at)}${n.timezone?` · ${n.timezone}`:""}`:"TBD"})]}),t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:14,fontWeight:600,color:d,whiteSpace:"nowrap"},children:p!=null?Q(p,l):"TBD"})]}),t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:4,fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)"},children:[m&&t.jsx("span",{children:m}),i&&t.jsx("span",{children:i})]}),b(e).length>0&&t.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:6},children:b(e).map(c=>{const y=s.has(c);return t.jsx("button",{className:"tag-chip",onClick:a=>{a.stopPropagation(),r(c)},style:{background:y?"var(--ink)":"var(--bg-subtle)",color:y?"var(--bg)":"var(--ink-soft)"},children:k(c)},c)})})]})},pe=()=>{const[e,l]=g.useState(!0),[s,r]=g.useState(!1),[o,h]=g.useState(new Set),[n,p]=g.useState(null),d=g.useMemo(()=>Date.now(),[]),m=R({queryKey:["conference-deadlines"],queryFn:()=>L.conferenceDeadlines(),staleTime:A}),i=a=>{h(u=>{const x=new Set(u);return x.has(a)?x.delete(a):x.add(a),x})},c=g.useMemo(()=>{var u;const a=new Map;return(u=m.data)==null||u.results.forEach(x=>{b(x).forEach(j=>a.set(j,(a.get(j)??0)+1))}),Array.from(a.entries()).sort((x,j)=>j[1]-x[1]).map(([x])=>x)},[m.data]),y=g.useMemo(()=>{var j;const u=(((j=m.data)==null?void 0:j.results)??[]).filter(f=>!(e&&f.tier!=="a"||o.size>0&&!b(f).some(v=>o.has(v))||!s&&!S(f,d))),x=f=>{const D=S(f,d);if(D)return{group:0,time:new Date(D.deadline_at).getTime()};const v=z(f);return{group:1,time:-(v?new Date(v.deadline_at).getTime():0)}};return[...u].sort((f,D)=>{const v=x(f),T=x(D);return v.group!==T.group?v.group-T.group:v.time-T.time})},[m.data,e,s,o,d]);return m.error?t.jsx("div",{className:"page",children:t.jsx(W,{variant:"destructive",children:t.jsx(M,{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:l}),t.jsx(E,{id:"show-past",label:"Show past conferences",checked:s,onChange:r})]}),c.length>0&&t.jsxs("div",{style:{display:"flex",flexWrap:"wrap",gap:6,marginBottom:24},children:[c.map(a=>{const u=o.has(a);return t.jsx("button",{className:"tag-chip",onClick:()=>i(a),style:{background:u?"var(--ink)":"var(--bg-subtle)",color:u?"var(--bg)":"var(--ink-soft)"},children:k(a)},a)}),o.size>0&&t.jsx("button",{className:"tag-chip",onClick:()=>h(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:m.isLoading?"…":`${y.length} conferences`})}),m.isLoading?t.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(320px, 1fr))",gap:16},children:Array.from({length:6}).map((a,u)=>t.jsx(U,{className:"h-44"},u))}):y.length===0?t.jsxs("div",{className:"no-results",children:["No conferences match these filters",s?".":" — try enabling “Show past conferences”."]}):t.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(320px, 1fr))",gap:16},children:y.map(a=>t.jsx(te,{conf:a,now:d,selectedDomains:o,onToggleDomain:i,onOpen:p},a.id))}),t.jsx(ee,{conf:n,open:n!==null,onOpenChange:a=>{a||p(null)}})]})};export{pe as default}; diff --git a/assets/ApiDocsView-LwSN2FTa.js b/assets/ApiDocsView-DT_kBPK6.js similarity index 98% rename from assets/ApiDocsView-LwSN2FTa.js rename to assets/ApiDocsView-DT_kBPK6.js index 4c338ebb04c991f63646e59d6f879ba94f872259..a9c40c7f5798d522bd930936cbe3c32e72ce854b 100644 --- a/assets/ApiDocsView-LwSN2FTa.js +++ b/assets/ApiDocsView-DT_kBPK6.js @@ -1,4 +1,4 @@ -import{ac as m,b as f,d as h,j as e}from"./index-CjdUkE4w.js";import{u as g}from"./useDocumentTitle-2Ho8_KfW.js";import{M as y}from"./index-tLcwYp0U.js";const b={queryKey:["public-api-schema"],queryFn:()=>m("/openapi.json",{credentials:"omit"}),staleTime:5*60*1e3};function w(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 v(s,r){return r==="Python"?`import requests +import{ac as m,b as f,d as h,j as e}from"./index-CHGpuh10.js";import{u as g}from"./useDocumentTitle-Deu479Zd.js";import{M as y}from"./index-B141zdPU.js";const b={queryKey:["public-api-schema"],queryFn:()=>m("/openapi.json",{credentials:"omit"}),staleTime:5*60*1e3};function w(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 v(s,r){return r==="Python"?`import requests response = requests.get(${JSON.stringify(s)}, timeout=30) response.raise_for_status() diff --git a/assets/AreaSection-iYSRoy6-.js b/assets/AreaSection-BVX3JiNc.js similarity index 88% rename from assets/AreaSection-iYSRoy6-.js rename to assets/AreaSection-BVX3JiNc.js index 64bb5dce39e759dc6da1b86239882af8245795da..e51506a52920696c7d26681e07df8f0286ba3a53 100644 --- a/assets/AreaSection-iYSRoy6-.js +++ b/assets/AreaSection-BVX3JiNc.js @@ -1 +1 @@ -import{j as s}from"./index-CjdUkE4w.js";import{S as l}from"./skeleton-DTWi7Ctg.js";const m=({id:t,title:a,description:e,meta:r,style:c,children:i})=>s.jsxs("section",{id:t,className:"area-section",style:c,children:[s.jsxs("div",{className:"area-section-head",children:[s.jsxs("div",{children:[s.jsx("h2",{className:"area-section-title",children:a}),e&&s.jsx("div",{className:"area-section-description",children:e})]}),s.jsx("div",{className:"area-section-meta",children:r})]}),s.jsx("div",{className:"tag-grid",children:i})]}),h=({sections:t=4,tiles:a,tileClassName:e})=>s.jsx("div",{className:"area-directory-skeleton",children:Array.from({length:t}).map((r,c)=>s.jsxs("div",{children:[s.jsx(l,{className:"h-8 w-1/3 mb-4"}),s.jsx("div",{className:"tag-grid",children:Array.from({length:a}).map((i,n)=>s.jsx(l,{className:e},n))})]},c))}),x=({areas:t})=>{const a=t.filter(r=>r.tasks.length>0),e=a.reduce((r,c)=>r+c.tasks.length,0);return e===0?null:s.jsxs("div",{className:"area-directory-footer",children:[e," tasks across ",a.length," areas."]})};export{h as A,m as a,x as b}; +import{j as s}from"./index-CHGpuh10.js";import{S as l}from"./skeleton-Df0GaMuw.js";const m=({id:t,title:a,description:e,meta:r,style:c,children:i})=>s.jsxs("section",{id:t,className:"area-section",style:c,children:[s.jsxs("div",{className:"area-section-head",children:[s.jsxs("div",{children:[s.jsx("h2",{className:"area-section-title",children:a}),e&&s.jsx("div",{className:"area-section-description",children:e})]}),s.jsx("div",{className:"area-section-meta",children:r})]}),s.jsx("div",{className:"tag-grid",children:i})]}),h=({sections:t=4,tiles:a,tileClassName:e})=>s.jsx("div",{className:"area-directory-skeleton",children:Array.from({length:t}).map((r,c)=>s.jsxs("div",{children:[s.jsx(l,{className:"h-8 w-1/3 mb-4"}),s.jsx("div",{className:"tag-grid",children:Array.from({length:a}).map((i,n)=>s.jsx(l,{className:e},n))})]},c))}),x=({areas:t})=>{const a=t.filter(r=>r.tasks.length>0),e=a.reduce((r,c)=>r+c.tasks.length,0);return e===0?null:s.jsxs("div",{className:"area-directory-footer",children:[e," tasks across ",a.length," areas."]})};export{h as A,m as a,x as b}; diff --git a/assets/AstraForRoboticsView-BMiTVC2T.js b/assets/AstraForRoboticsView-BiXYC0gV.js similarity index 89% rename from assets/AstraForRoboticsView-BMiTVC2T.js rename to assets/AstraForRoboticsView-BiXYC0gV.js index 33203cf45249e4cfe02fe532b546853bacede5d9..a97205c37287a559777c504fec5858feaa049075 100644 --- a/assets/AstraForRoboticsView-BMiTVC2T.js +++ b/assets/AstraForRoboticsView-BiXYC0gV.js @@ -1 +1 @@ -import{p,d as u,j as a,L as o}from"./index-CjdUkE4w.js";import{u as g,b as x,a as b}from"./PaperFeed-D3FZw29k.js";import{A as f,a as j}from"./alert-BM9Xfuyy.js";import{u as y}from"./usePapers-BZThqZCx.js";import{p as v}from"./papers-DgZwjF3K.js";import{u as k,f as w}from"./useDocumentTitle-2Ho8_KfW.js";import{t as A}from"./transform-CRNzYLch.js";import"./PaperCard-dvXhr75r.js";import"./AuthorAvatar-D9249Frl.js";import"./SotaBadges-CyScuNCv.js";import"./colors-BkWRhvFI.js";import"./Icon-CGRs4BYD.js";import"./LatexTitle-DESKtS30.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-Df5_dywQ.js";import"./skeleton-DTWi7Ctg.js";import"./useIntersectionObserver-Ch6RpsSk.js";import"./useInfiniteQuery-DeZTTVbI.js";import"./curation-CyyuHfv5.js";const n="robotics",i="gpt-6-astra",_="https://x.com/YuXiang_IRVL/status/2100395131924840570",P=[{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"}],R=[{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"}],h=({posts:s,label:e})=>a.jsxs("div",{className:"astra-posts",children:[a.jsx("div",{className:"astra-posts-label",children:e}),a.jsx("ul",{children:s.map(t=>a.jsxs("li",{children:[a.jsxs("a",{href:t.url,target:"_blank",rel:"noreferrer",children:["@",t.handle]}),a.jsxs("span",{className:"astra-post-author",children:[" ",t.author]}),a.jsxs("span",{className:"astra-post-summary",children:[" — ",t.summary]})]},t.url))})]}),B=()=>{var l,c;const s=g(),e=y([...p.feeds.infinite,{task:n,method:i,...s.filters}],r=>v.list({...s.filters,task:n,method:i,page:r,page_size:12}));k(w("GPT-6 Astra for Robotics"));const t=u.useMemo(()=>{var r;return(((r=e.data)==null?void 0:r.pages)??[]).flatMap(d=>d.results.map(A))},[e.data]),m=((c=(l=e.data)==null?void 0:l.pages[0])==null?void 0:c.count)??0;return a.jsxs("div",{className:"page",children:[a.jsxs("nav",{className:"breadcrumb","aria-label":"Breadcrumb",children:[a.jsx(o,{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:_,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(h,{posts:P,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(h,{posts:R,label:"Seen on X"})]})]}),a.jsxs("p",{className:"astra-note",children:["Listing is automatic: any paper tagged with both the"," ",a.jsx(o,{to:`/tasks/${n}`,children:"Robotics"})," task and the"," ",a.jsx(o,{to:`/methods/${i}`,children:"GPT-6 Astra"})," method appears here. Missing a report or preprint?"," ",a.jsx(o,{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:["[",m.toLocaleString(),"]"]})]})]}),a.jsx(x,{feed:s,showDateFilter:!1}),e.error?a.jsx(f,{variant:"destructive",children:a.jsx(j,{children:"Failed to load the collection. Please try again."})}):a.jsx(b,{query:e,cards:t,empty:"No papers match this selection yet."})]})};export{B as default}; +import{p,d as u,j as a,L as o}from"./index-CHGpuh10.js";import{u as g,b as x,a as b}from"./PaperFeed-DjmnPHUi.js";import{A as f,a as j}from"./alert-DPvmCXZT.js";import{u as y}from"./usePapers-DzyOc-Ae.js";import{p as v}from"./papers-BPpxs2sO.js";import{u as k,f as w}from"./useDocumentTitle-Deu479Zd.js";import{t as A}from"./transform-Cs8_lTDx.js";import"./PaperCard-BtCEa6CD.js";import"./AuthorAvatar-fJxhX3fO.js";import"./SotaBadges-D825CK6n.js";import"./colors-BkWRhvFI.js";import"./Icon-CRWrVPWO.js";import"./LatexTitle-CfeEppH3.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-BHpRw7vT.js";import"./skeleton-Df0GaMuw.js";import"./useIntersectionObserver-DZSpsOQX.js";import"./useInfiniteQuery-DhWyWKGj.js";import"./curation-DI9_zYNx.js";const n="robotics",i="gpt-6-astra",_="https://x.com/YuXiang_IRVL/status/2100395131924840570",P=[{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"}],R=[{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"}],h=({posts:s,label:e})=>a.jsxs("div",{className:"astra-posts",children:[a.jsx("div",{className:"astra-posts-label",children:e}),a.jsx("ul",{children:s.map(t=>a.jsxs("li",{children:[a.jsxs("a",{href:t.url,target:"_blank",rel:"noreferrer",children:["@",t.handle]}),a.jsxs("span",{className:"astra-post-author",children:[" ",t.author]}),a.jsxs("span",{className:"astra-post-summary",children:[" — ",t.summary]})]},t.url))})]}),B=()=>{var l,c;const s=g(),e=y([...p.feeds.infinite,{task:n,method:i,...s.filters}],r=>v.list({...s.filters,task:n,method:i,page:r,page_size:12}));k(w("GPT-6 Astra for Robotics"));const t=u.useMemo(()=>{var r;return(((r=e.data)==null?void 0:r.pages)??[]).flatMap(d=>d.results.map(A))},[e.data]),m=((c=(l=e.data)==null?void 0:l.pages[0])==null?void 0:c.count)??0;return a.jsxs("div",{className:"page",children:[a.jsxs("nav",{className:"breadcrumb","aria-label":"Breadcrumb",children:[a.jsx(o,{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:_,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(h,{posts:P,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(h,{posts:R,label:"Seen on X"})]})]}),a.jsxs("p",{className:"astra-note",children:["Listing is automatic: any paper tagged with both the"," ",a.jsx(o,{to:`/tasks/${n}`,children:"Robotics"})," task and the"," ",a.jsx(o,{to:`/methods/${i}`,children:"GPT-6 Astra"})," method appears here. Missing a report or preprint?"," ",a.jsx(o,{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:["[",m.toLocaleString(),"]"]})]})]}),a.jsx(x,{feed:s,showDateFilter:!1}),e.error?a.jsx(f,{variant:"destructive",children:a.jsx(j,{children:"Failed to load the collection. Please try again."})}):a.jsx(b,{query:e,cards:t,empty:"No papers match this selection yet."})]})};export{B as default}; diff --git a/assets/AuthorAvatar-D9249Frl.js b/assets/AuthorAvatar-fJxhX3fO.js similarity index 86% rename from assets/AuthorAvatar-D9249Frl.js rename to assets/AuthorAvatar-fJxhX3fO.js index e3963ce4b99038e335d00b086f51ebc08c075e71..a6b6a90deaa15851f60f4a3fb7a080313854e3cb 100644 --- a/assets/AuthorAvatar-D9249Frl.js +++ b/assets/AuthorAvatar-fJxhX3fO.js @@ -1 +1 @@ -import{d as c,j as r}from"./index-CjdUkE4w.js";const p=a=>a!=null&&a.startsWith("https://")&&!a.startsWith("https://huggingface.co/avatars/")?a:null,g=({url:a,className:o,href:t,label:n})=>{const[i,l]=c.useState(!1),s=i?null:p(a);if(!s)return null;const e=r.jsx("img",{className:`author-avatar-base ${o}`,src:s,alt:"",loading:"lazy",onError:()=>l(!0)});return t?r.jsx("a",{href:t,target:"_blank",rel:"noopener noreferrer","aria-label":n,children:e}):e};export{g as A}; +import{d as c,j as r}from"./index-CHGpuh10.js";const p=a=>a!=null&&a.startsWith("https://")&&!a.startsWith("https://huggingface.co/avatars/")?a:null,g=({url:a,className:o,href:t,label:n})=>{const[i,l]=c.useState(!1),s=i?null:p(a);if(!s)return null;const e=r.jsx("img",{className:`author-avatar-base ${o}`,src:s,alt:"",loading:"lazy",onError:()=>l(!0)});return t?r.jsx("a",{href:t,target:"_blank",rel:"noopener noreferrer","aria-label":n,children:e}):e};export{g as A}; diff --git a/assets/AuthorDetailView-BwEN_vpq.js b/assets/AuthorDetailView-HZ2z-PQp.js similarity index 76% rename from assets/AuthorDetailView-BwEN_vpq.js rename to assets/AuthorDetailView-HZ2z-PQp.js index 833c0df9fac6b2a1a3fce1d77ead9fa4175beced..1219add2349f78b8cd2fa45f2e54c174c0a1694f 100644 --- a/assets/AuthorDetailView-BwEN_vpq.js +++ b/assets/AuthorDetailView-HZ2z-PQp.js @@ -1 +1 @@ -import{u as b,j as a,b as N,p as v,d as F,ao as y,L as A}from"./index-CjdUkE4w.js";import{A as k}from"./AuthorAvatar-D9249Frl.js";import{u as P,b as $,a as S}from"./PaperFeed-D3FZw29k.js";import{R as L}from"./ResearchFollowButton-DcTptDpW.js";import{A as R,a as w}from"./alert-BM9Xfuyy.js";import{S as z}from"./skeleton-DTWi7Ctg.js";import{u as C}from"./usePapers-BZThqZCx.js";import{p as m}from"./papers-DgZwjF3K.js";import{i as H}from"./apiErrors-D0w5By9R.js";import{t as q}from"./transform-CRNzYLch.js";import f from"./NotFound-BeWhm9El.js";import"./PaperCard-dvXhr75r.js";import"./SotaBadges-CyScuNCv.js";import"./colors-BkWRhvFI.js";import"./Icon-CGRs4BYD.js";import"./LatexTitle-DESKtS30.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-Df5_dywQ.js";import"./useIntersectionObserver-Ch6RpsSk.js";import"./researchTopic-NmABF6tT.js";import"./useMutation-BYtVrkc7.js";import"./plus-AztI1566.js";import"./useInfiniteQuery-DeZTTVbI.js";import"./curation-CyyuHfv5.js";const Q=({authorId:r})=>{var n,i,l,p,c,d,h,u;const o=P(),{searchParams:g}=o,e=N({queryKey:["author",r],queryFn:()=>m.getAuthor(r)}),s=C([...v.feeds.infinite,{author:r,...o.filters}],t=>m.list({...o.filters,author:r,page:t,page_size:12})),x=F.useMemo(()=>{var t;return(((t=s.data)==null?void 0:t.pages)??[]).flatMap(_=>_.results.map(q))},[s.data]),j=((i=(n=s.data)==null?void 0:n.pages[0])==null?void 0:i.count)??0;if(H(e.error))return a.jsx(f,{});if((l=e.data)!=null&&l.organization_slug){const t=g.toString();return a.jsx(y,{to:`/orgs/${e.data.organization_slug}${t?`?${t}`:""}`,replace:!0})}return a.jsxs("div",{className:"page",children:[a.jsxs("nav",{className:"breadcrumb","aria-label":"Breadcrumb",children:[a.jsx(A,{to:"/",children:"Home"}),a.jsx("span",{children:" / "}),a.jsx("span",{children:"Authors"}),a.jsx("span",{children:" / "}),a.jsx("span",{children:((p=e.data)==null?void 0:p.full_name)??r})]}),a.jsxs("header",{className:"author-hero",children:[a.jsx("div",{className:"organizations-eyebrow",children:"AUTHOR"}),a.jsxs("div",{className:"author-hero-title",children:[(c=e.data)!=null&&c.photo?a.jsxs("figure",{className:"author-photo",children:[a.jsx("img",{className:"author-avatar-base author-avatar",src:e.data.photo.url,alt:""}),a.jsxs("figcaption",{children:["Photo:"," ",a.jsx("a",{href:e.data.photo.source_url,target:"_blank",rel:"noopener noreferrer",children:e.data.photo.credit}),", ",e.data.photo.license_url?a.jsx("a",{href:e.data.photo.license_url,target:"_blank",rel:"noopener noreferrer",children:e.data.photo.license}):e.data.photo.license]})]}):((d=e.data)==null?void 0:d.hf_username)&&a.jsx(k,{className:"author-avatar",url:e.data.hf_avatar_url,href:`https://huggingface.co/${e.data.hf_username}`,label:`@${e.data.hf_username} on Hugging Face`}),a.jsx("h1",{className:"feed-title",children:((h=e.data)==null?void 0:h.full_name)??a.jsx(z,{className:"h-12 w-64 inline-block"})})]}),e.data&&a.jsxs("div",{className:"feed-subtitle",children:[e.data.paper_count.toLocaleString()," ",e.data.paper_count===1?"paper":"papers",e.data.hf_username&&a.jsxs(a.Fragment,{children:[" · ",a.jsxs("a",{href:`https://huggingface.co/${e.data.hf_username}`,target:"_blank",rel:"noopener noreferrer",children:["@",e.data.hf_username," on Hugging Face ↗"]})]}),e.data.google_scholar_id&&a.jsxs(a.Fragment,{children:[" · ",a.jsx("a",{href:`https://scholar.google.com/citations?user=${encodeURIComponent(e.data.google_scholar_id)}`,target:"_blank",rel:"noopener noreferrer",children:"Google Scholar ↗"})]})]}),e.data&&a.jsx(L,{kind:"author",entityId:e.data.id})]}),a.jsx($,{feed:o,style:{alignItems:"center",gap:16},children:a.jsxs("div",{className:"results-count",children:[j.toLocaleString()," papers"]})}),s.error?a.jsx(R,{variant:"destructive",children:a.jsxs(w,{children:["Failed to load papers."," ",a.jsx("button",{type:"button",onClick:()=>void s.refetch(),children:"Try again"})]})}):a.jsx(S,{query:s,cards:x,empty:((u=e.data)==null?void 0:u.paper_count)===0?"No public papers are available.":"No papers found for this selection."})]})},la=()=>{const{authorId:r}=b();return r?a.jsx(Q,{authorId:r},r):a.jsx(f,{})};export{la as default}; +import{u as b,j as a,b as N,p as v,d as F,ao as y,L as A}from"./index-CHGpuh10.js";import{A as k}from"./AuthorAvatar-fJxhX3fO.js";import{u as P,b as $,a as S}from"./PaperFeed-DjmnPHUi.js";import{R as L}from"./ResearchFollowButton-DFGdTBex.js";import{A as R,a as w}from"./alert-DPvmCXZT.js";import{S as z}from"./skeleton-Df0GaMuw.js";import{u as C}from"./usePapers-DzyOc-Ae.js";import{p as m}from"./papers-BPpxs2sO.js";import{i as H}from"./apiErrors-CvxFAcrW.js";import{t as q}from"./transform-Cs8_lTDx.js";import f from"./NotFound-Bc6y0g0J.js";import"./PaperCard-BtCEa6CD.js";import"./SotaBadges-D825CK6n.js";import"./colors-BkWRhvFI.js";import"./Icon-CRWrVPWO.js";import"./LatexTitle-CfeEppH3.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-BHpRw7vT.js";import"./useIntersectionObserver-DZSpsOQX.js";import"./researchTopic-DK_KbYKH.js";import"./useMutation-3fOqWcpt.js";import"./plus-CYgr1KdS.js";import"./useInfiniteQuery-DhWyWKGj.js";import"./curation-DI9_zYNx.js";const Q=({authorId:r})=>{var n,i,l,p,c,d,h,u;const o=P(),{searchParams:g}=o,e=N({queryKey:["author",r],queryFn:()=>m.getAuthor(r)}),s=C([...v.feeds.infinite,{author:r,...o.filters}],t=>m.list({...o.filters,author:r,page:t,page_size:12})),x=F.useMemo(()=>{var t;return(((t=s.data)==null?void 0:t.pages)??[]).flatMap(_=>_.results.map(q))},[s.data]),j=((i=(n=s.data)==null?void 0:n.pages[0])==null?void 0:i.count)??0;if(H(e.error))return a.jsx(f,{});if((l=e.data)!=null&&l.organization_slug){const t=g.toString();return a.jsx(y,{to:`/orgs/${e.data.organization_slug}${t?`?${t}`:""}`,replace:!0})}return a.jsxs("div",{className:"page",children:[a.jsxs("nav",{className:"breadcrumb","aria-label":"Breadcrumb",children:[a.jsx(A,{to:"/",children:"Home"}),a.jsx("span",{children:" / "}),a.jsx("span",{children:"Authors"}),a.jsx("span",{children:" / "}),a.jsx("span",{children:((p=e.data)==null?void 0:p.full_name)??r})]}),a.jsxs("header",{className:"author-hero",children:[a.jsx("div",{className:"organizations-eyebrow",children:"AUTHOR"}),a.jsxs("div",{className:"author-hero-title",children:[(c=e.data)!=null&&c.photo?a.jsxs("figure",{className:"author-photo",children:[a.jsx("img",{className:"author-avatar-base author-avatar",src:e.data.photo.url,alt:""}),a.jsxs("figcaption",{children:["Photo:"," ",a.jsx("a",{href:e.data.photo.source_url,target:"_blank",rel:"noopener noreferrer",children:e.data.photo.credit}),", ",e.data.photo.license_url?a.jsx("a",{href:e.data.photo.license_url,target:"_blank",rel:"noopener noreferrer",children:e.data.photo.license}):e.data.photo.license]})]}):((d=e.data)==null?void 0:d.hf_username)&&a.jsx(k,{className:"author-avatar",url:e.data.hf_avatar_url,href:`https://huggingface.co/${e.data.hf_username}`,label:`@${e.data.hf_username} on Hugging Face`}),a.jsx("h1",{className:"feed-title",children:((h=e.data)==null?void 0:h.full_name)??a.jsx(z,{className:"h-12 w-64 inline-block"})})]}),e.data&&a.jsxs("div",{className:"feed-subtitle",children:[e.data.paper_count.toLocaleString()," ",e.data.paper_count===1?"paper":"papers",e.data.hf_username&&a.jsxs(a.Fragment,{children:[" · ",a.jsxs("a",{href:`https://huggingface.co/${e.data.hf_username}`,target:"_blank",rel:"noopener noreferrer",children:["@",e.data.hf_username," on Hugging Face ↗"]})]}),e.data.google_scholar_id&&a.jsxs(a.Fragment,{children:[" · ",a.jsx("a",{href:`https://scholar.google.com/citations?user=${encodeURIComponent(e.data.google_scholar_id)}`,target:"_blank",rel:"noopener noreferrer",children:"Google Scholar ↗"})]})]}),e.data&&a.jsx(L,{kind:"author",entityId:e.data.id})]}),a.jsx($,{feed:o,style:{alignItems:"center",gap:16},children:a.jsxs("div",{className:"results-count",children:[j.toLocaleString()," papers"]})}),s.error?a.jsx(R,{variant:"destructive",children:a.jsxs(w,{children:["Failed to load papers."," ",a.jsx("button",{type:"button",onClick:()=>void s.refetch(),children:"Try again"})]})}):a.jsx(S,{query:s,cards:x,empty:((u=e.data)==null?void 0:u.paper_count)===0?"No public papers are available.":"No papers found for this selection."})]})},la=()=>{const{authorId:r}=b();return r?a.jsx(Q,{authorId:r},r):a.jsx(f,{})};export{la as default}; diff --git a/assets/AuthorizePaperEditView-C-sg5DHX.js b/assets/AuthorizePaperEditView-BmKMH1AZ.js similarity index 87% rename from assets/AuthorizePaperEditView-C-sg5DHX.js rename to assets/AuthorizePaperEditView-BmKMH1AZ.js index 8e5734df803e77335a6c2dbb1468044767f1766b..884a1fda7afe67640ff08911918dc71fbfbecedb 100644 --- a/assets/AuthorizePaperEditView-C-sg5DHX.js +++ b/assets/AuthorizePaperEditView-BmKMH1AZ.js @@ -1 +1 @@ -import{u,a as d,b as l,j as e,L as p,H as c}from"./index-CjdUkE4w.js";import{u as h}from"./useMutation-BYtVrkc7.js";import{B as g}from"./button-DetZl_ch.js";import{p as n}from"./paperEdits-C_3nZTKz.js";function f(){const{authorizationId:t=""}=u(),{user:s,isLoading:o}=d(),i=l({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(p,{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(g,{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(c,{returnTo:`/authorize-paper-edit/${t}`,label:"Sign in with Hugging Face"}),r.error&&e.jsx("p",{role:"alert",children:r.error.message})]})]})}export{f as default}; +import{u,a as d,b as l,j as e,L as p,H as c}from"./index-CHGpuh10.js";import{u as h}from"./useMutation-3fOqWcpt.js";import{B as g}from"./button-C4kqC3Av.js";import{p as n}from"./paperEdits-DFgln8kE.js";function f(){const{authorizationId:t=""}=u(),{user:s,isLoading:o}=d(),i=l({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(p,{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(g,{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(c,{returnTo:`/authorize-paper-edit/${t}`,label:"Sign in with Hugging Face"}),r.error&&e.jsx("p",{role:"alert",children:r.error.message})]})]})}export{f as default}; diff --git a/assets/AutonomousOperations-BMzZOLm6.js b/assets/AutonomousOperations-Ch9vfeiA.js similarity index 94% rename from assets/AutonomousOperations-BMzZOLm6.js rename to assets/AutonomousOperations-Ch9vfeiA.js index 3f842b9f2d887d6a879539a58eb22445b83f682b..c78c1ebd3568b865ec8f38c9eb23d6abd8ab0414 100644 --- a/assets/AutonomousOperations-BMzZOLm6.js +++ b/assets/AutonomousOperations-Ch9vfeiA.js @@ -1 +1 @@ -import{i as R,d,b as B,J as C,j as e,L as q}from"./index-CjdUkE4w.js";import{u as Q}from"./useMutation-BYtVrkc7.js";import{C as n,e as i,S as H,b as l,c as t,t as E,f as m,o as x}from"./CronDashboard-Di5xM1py.js";import{B as I}from"./badge-C8r6F6JD.js";import{B as h}from"./button-DetZl_ch.js";import{I as u}from"./input-7i-rZ7fA.js";import{A as P}from"./activity--6WvmXv2.js";import{A as D}from"./arrow-left-CkQb0MI4.js";const j={submissions:"Submission review",curation:"Scheduled curation",cron_health:"CRON health",chat_reliability:"Chat reliability"},S={healthy:"healthy",degraded:"degraded",repairing:"running","rolled-back":"broken",manual:"degraded"},V=()=>{var A;const M=R(),[p,T]=d.useState(""),[f,_]=d.useState(""),[b,v]=d.useState({}),[g,N]=d.useState(""),c=B({queryKey:C.autonomousOperations,queryFn:()=>x.getAutonomousOperations(),refetchInterval:3e4,retry:!1}),r=Q({mutationFn:s=>s(),onSuccess:s=>{M.setQueryData(C.autonomousOperations,s),_(""),v({}),N("")}}),a=c.data,y=r.error instanceof Error?r.error.message:null;if(c.isLoading)return e.jsx("div",{className:"page","aria-busy":"true",children:"Loading autonomous operations…"});if(c.error||!a)return e.jsxs("div",{className:"page",children:[e.jsx("h1",{children:"Autonomous operations unavailable"}),e.jsx("p",{children:c.error instanceof Error?c.error.message:"No status was returned."})]});const O=()=>r.mutate(()=>x.setAutonomousManualMode(!a.manual_mode,a.revision,f)),k=(s,o)=>r.mutate(()=>x.setAutonomousOperator(s,o,a.revision,b[s]??"")),w=()=>{var o;const s=((o=a.baseline)==null?void 0:o.revision)??0;r.mutate(()=>x.qualifyAutonomousChatBaseline(p,s,g))};return e.jsx("div",{className:"cron-dashboard","data-shadcn":!0,children:e.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8 space-y-6",children:[e.jsxs("div",{className:"flex items-center justify-between gap-4 flex-wrap",children:[e.jsxs("div",{children:[e.jsxs("h1",{className:"text-3xl font-bold flex items-center gap-3",children:[e.jsx(P,{className:"h-8 w-8"}),"Autonomous operations"]}),e.jsx("p",{className:"mt-2 cron-muted",children:"Content-free supervision, remote controls, and bounded audit history."})]}),e.jsx(h,{asChild:!0,variant:"outline",children:e.jsxs(q,{to:"/admin-dashboard",children:[e.jsx(D,{className:"h-4 w-4 mr-2"}),"Admin dashboard"]})})]}),a.manual_mode&&e.jsx(n,{className:"cron-status--degraded",role:"status",children:e.jsxs(i,{className:"pt-6 flex gap-3",children:[e.jsx(H,{className:"h-5 w-5"}),e.jsxs("div",{children:[e.jsx("strong",{children:"Manual mode is enabled."}),e.jsxs("p",{children:[a.monitoring_active?"Monitoring remains active":"Monitoring is not currently verified","; autonomous callbacks, retries, deployments, and data mutations fail closed."]})]})]})}),e.jsxs("div",{className:"grid md:grid-cols-4 gap-4",children:[e.jsxs(n,{className:E(S[a.display_state]),children:[e.jsx(l,{children:e.jsx(t,{className:"text-sm",children:"Overall state"})}),e.jsxs(i,{children:[e.jsx("div",{className:"text-2xl font-bold capitalize",children:a.display_state}),e.jsxs("p",{className:"text-sm",children:["Monitoring ",a.monitoring_active?"active":"inactive"]})]})]}),e.jsxs(n,{children:[e.jsx(l,{children:e.jsx(t,{className:"text-sm",children:"Codex cost"})}),e.jsxs(i,{children:[e.jsxs("div",{className:"text-2xl font-bold",children:["$",a.costs.total_usd]}),e.jsxs("p",{className:"text-sm",children:[a.costs.input_tokens+a.costs.output_tokens," tokens"]})]})]}),e.jsxs(n,{children:[e.jsx(l,{children:e.jsx(t,{className:"text-sm",children:"Repair lease"})}),e.jsxs(i,{children:[e.jsx("div",{className:"text-lg font-bold",children:a.active_lease?a.active_lease.owner_operator:"Available"}),e.jsx("p",{className:"text-sm",children:a.active_lease?`Expires ${m(a.active_lease.expires_at)}`:"No active source repair"})]})]}),e.jsxs(n,{children:[e.jsx(l,{children:e.jsx(t,{className:"text-sm",children:"Global control"})}),e.jsxs(i,{className:"space-y-2",children:[e.jsx(u,{"aria-label":"Manual mode confirmation",value:f,onChange:s=>_(s.target.value),placeholder:"Type SET_MANUAL_MODE"}),e.jsx(h,{disabled:r.isPending||f!=="SET_MANUAL_MODE",onClick:O,children:a.manual_mode?"Leave manual mode":"Enable manual mode"})]})]})]}),e.jsx("div",{className:"grid md:grid-cols-4 gap-4",children:a.operators.map(s=>e.jsxs(n,{className:E(S[s.status]),children:[e.jsx(l,{children:e.jsxs(t,{className:"flex justify-between gap-2",children:[e.jsx("span",{children:j[s.operator]}),e.jsx(I,{children:s.status})]})}),e.jsxs(i,{className:"space-y-3",children:[e.jsxs("p",{children:[s.enabled?"Mutation enabled":"Mutation disabled"," · monitoring ",s.monitoring_active?"active":"unverified"]}),e.jsxs("p",{className:"text-sm",children:["Next scheduled run: ",s.next_scheduled_run?m(s.next_scheduled_run):"not scheduled"]}),e.jsx(u,{"aria-label":`${j[s.operator]} confirmation`,value:b[s.operator]??"",onChange:o=>v(L=>({...L,[s.operator]:o.target.value})),placeholder:"Type SET_OPERATOR_STATE"}),e.jsx(h,{disabled:r.isPending||a.manual_mode&&!s.enabled||b[s.operator]!=="SET_OPERATOR_STATE",onClick:()=>k(s.operator,!s.enabled),children:s.enabled?"Disable":"Enable"})]})]},s.operator))}),e.jsxs(n,{children:[e.jsx(l,{children:e.jsx(t,{children:"Qualified scalable-chat baseline"})}),e.jsxs(i,{className:"space-y-3",children:[e.jsx("p",{className:"font-mono break-all",children:((A=a.baseline)==null?void 0:A.sha)??"No baseline qualified"}),a.baseline&&e.jsxs("p",{className:"text-sm",children:["Revision ",a.baseline.revision," · ",a.baseline.qualified_by," · ",m(a.baseline.qualified_at)]}),e.jsxs("div",{className:"grid md:grid-cols-[1fr_1fr_auto] gap-2",children:[e.jsx(u,{"aria-label":"Exact baseline SHA",value:p,onChange:s=>T(s.target.value),placeholder:"40-character lowercase commit SHA"}),e.jsx(u,{"aria-label":"Baseline confirmation",value:g,onChange:s=>N(s.target.value),placeholder:"Type QUALIFY_CHAT_BASELINE"}),e.jsx(h,{disabled:r.isPending||!/^[0-9a-f]{40}$/.test(p)||g!=="QUALIFY_CHAT_BASELINE",onClick:w,children:"Qualify exact SHA"})]})]})]}),e.jsxs(n,{children:[e.jsx(l,{children:e.jsx(t,{children:"Provider and fallback state"})}),e.jsx(i,{children:a.provider_states.length?e.jsx("ul",{className:"space-y-2",children:a.provider_states.map(s=>e.jsxs("li",{children:[e.jsx("strong",{children:s.environment}),": ",s.active_provider," · ",s.reason_code," · manifest ",s.manifest_revision]},s.environment))}):e.jsx("p",{children:"No provider state recorded."})})]}),e.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[e.jsxs(n,{children:[e.jsx(l,{children:e.jsx(t,{children:"Recent runs"})}),e.jsx(i,{children:a.recent_runs.length?e.jsx("ul",{className:"space-y-2",children:a.recent_runs.map(s=>e.jsxs("li",{children:[e.jsx("strong",{children:j[s.operator]})," · ",s.status," · ",s.exit_classification," · $",s.cost_usd," · ",m(s.created_at)]},s.run_id))}):e.jsx("p",{children:"No runs recorded."})})]}),e.jsxs(n,{children:[e.jsx(l,{children:e.jsx(t,{children:"Recent actions"})}),e.jsx(i,{children:a.recent_actions.length?e.jsx("ul",{className:"space-y-2",children:a.recent_actions.map(s=>e.jsxs("li",{children:[e.jsx("strong",{children:j[s.operator]})," · ",s.capability," · ",s.reason_code," · ",s.resource_kind,"/",s.resource_identifier]},s.action_id))}):e.jsx("p",{children:"No actions recorded."})})]})]}),e.jsxs(n,{children:[e.jsx(l,{children:e.jsx(t,{children:"Hard exclusions"})}),e.jsx(i,{children:e.jsx("ul",{className:"list-disc pl-5",children:a.exclusions.map(s=>e.jsx("li",{children:s},s))})})]}),y&&e.jsxs("p",{role:"alert",children:["Control update failed: ",y,". Refresh before retrying."]})]})})};export{V as default}; +import{i as R,d,b as B,J as C,j as e,L as q}from"./index-CHGpuh10.js";import{u as Q}from"./useMutation-3fOqWcpt.js";import{C as n,e as i,S as H,b as l,c as t,t as E,f as m,o as x}from"./CronDashboard-CgnzKY0g.js";import{B as I}from"./badge-DZeCGN5Q.js";import{B as h}from"./button-C4kqC3Av.js";import{I as u}from"./input-FDP77A0C.js";import{A as P}from"./activity-CPcCgbtC.js";import{A as D}from"./arrow-left-C11GHdHp.js";const j={submissions:"Submission review",curation:"Scheduled curation",cron_health:"CRON health",chat_reliability:"Chat reliability"},S={healthy:"healthy",degraded:"degraded",repairing:"running","rolled-back":"broken",manual:"degraded"},V=()=>{var A;const M=R(),[p,T]=d.useState(""),[f,_]=d.useState(""),[b,v]=d.useState({}),[g,N]=d.useState(""),c=B({queryKey:C.autonomousOperations,queryFn:()=>x.getAutonomousOperations(),refetchInterval:3e4,retry:!1}),r=Q({mutationFn:s=>s(),onSuccess:s=>{M.setQueryData(C.autonomousOperations,s),_(""),v({}),N("")}}),a=c.data,y=r.error instanceof Error?r.error.message:null;if(c.isLoading)return e.jsx("div",{className:"page","aria-busy":"true",children:"Loading autonomous operations…"});if(c.error||!a)return e.jsxs("div",{className:"page",children:[e.jsx("h1",{children:"Autonomous operations unavailable"}),e.jsx("p",{children:c.error instanceof Error?c.error.message:"No status was returned."})]});const O=()=>r.mutate(()=>x.setAutonomousManualMode(!a.manual_mode,a.revision,f)),k=(s,o)=>r.mutate(()=>x.setAutonomousOperator(s,o,a.revision,b[s]??"")),w=()=>{var o;const s=((o=a.baseline)==null?void 0:o.revision)??0;r.mutate(()=>x.qualifyAutonomousChatBaseline(p,s,g))};return e.jsx("div",{className:"cron-dashboard","data-shadcn":!0,children:e.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8 space-y-6",children:[e.jsxs("div",{className:"flex items-center justify-between gap-4 flex-wrap",children:[e.jsxs("div",{children:[e.jsxs("h1",{className:"text-3xl font-bold flex items-center gap-3",children:[e.jsx(P,{className:"h-8 w-8"}),"Autonomous operations"]}),e.jsx("p",{className:"mt-2 cron-muted",children:"Content-free supervision, remote controls, and bounded audit history."})]}),e.jsx(h,{asChild:!0,variant:"outline",children:e.jsxs(q,{to:"/admin-dashboard",children:[e.jsx(D,{className:"h-4 w-4 mr-2"}),"Admin dashboard"]})})]}),a.manual_mode&&e.jsx(n,{className:"cron-status--degraded",role:"status",children:e.jsxs(i,{className:"pt-6 flex gap-3",children:[e.jsx(H,{className:"h-5 w-5"}),e.jsxs("div",{children:[e.jsx("strong",{children:"Manual mode is enabled."}),e.jsxs("p",{children:[a.monitoring_active?"Monitoring remains active":"Monitoring is not currently verified","; autonomous callbacks, retries, deployments, and data mutations fail closed."]})]})]})}),e.jsxs("div",{className:"grid md:grid-cols-4 gap-4",children:[e.jsxs(n,{className:E(S[a.display_state]),children:[e.jsx(l,{children:e.jsx(t,{className:"text-sm",children:"Overall state"})}),e.jsxs(i,{children:[e.jsx("div",{className:"text-2xl font-bold capitalize",children:a.display_state}),e.jsxs("p",{className:"text-sm",children:["Monitoring ",a.monitoring_active?"active":"inactive"]})]})]}),e.jsxs(n,{children:[e.jsx(l,{children:e.jsx(t,{className:"text-sm",children:"Codex cost"})}),e.jsxs(i,{children:[e.jsxs("div",{className:"text-2xl font-bold",children:["$",a.costs.total_usd]}),e.jsxs("p",{className:"text-sm",children:[a.costs.input_tokens+a.costs.output_tokens," tokens"]})]})]}),e.jsxs(n,{children:[e.jsx(l,{children:e.jsx(t,{className:"text-sm",children:"Repair lease"})}),e.jsxs(i,{children:[e.jsx("div",{className:"text-lg font-bold",children:a.active_lease?a.active_lease.owner_operator:"Available"}),e.jsx("p",{className:"text-sm",children:a.active_lease?`Expires ${m(a.active_lease.expires_at)}`:"No active source repair"})]})]}),e.jsxs(n,{children:[e.jsx(l,{children:e.jsx(t,{className:"text-sm",children:"Global control"})}),e.jsxs(i,{className:"space-y-2",children:[e.jsx(u,{"aria-label":"Manual mode confirmation",value:f,onChange:s=>_(s.target.value),placeholder:"Type SET_MANUAL_MODE"}),e.jsx(h,{disabled:r.isPending||f!=="SET_MANUAL_MODE",onClick:O,children:a.manual_mode?"Leave manual mode":"Enable manual mode"})]})]})]}),e.jsx("div",{className:"grid md:grid-cols-4 gap-4",children:a.operators.map(s=>e.jsxs(n,{className:E(S[s.status]),children:[e.jsx(l,{children:e.jsxs(t,{className:"flex justify-between gap-2",children:[e.jsx("span",{children:j[s.operator]}),e.jsx(I,{children:s.status})]})}),e.jsxs(i,{className:"space-y-3",children:[e.jsxs("p",{children:[s.enabled?"Mutation enabled":"Mutation disabled"," · monitoring ",s.monitoring_active?"active":"unverified"]}),e.jsxs("p",{className:"text-sm",children:["Next scheduled run: ",s.next_scheduled_run?m(s.next_scheduled_run):"not scheduled"]}),e.jsx(u,{"aria-label":`${j[s.operator]} confirmation`,value:b[s.operator]??"",onChange:o=>v(L=>({...L,[s.operator]:o.target.value})),placeholder:"Type SET_OPERATOR_STATE"}),e.jsx(h,{disabled:r.isPending||a.manual_mode&&!s.enabled||b[s.operator]!=="SET_OPERATOR_STATE",onClick:()=>k(s.operator,!s.enabled),children:s.enabled?"Disable":"Enable"})]})]},s.operator))}),e.jsxs(n,{children:[e.jsx(l,{children:e.jsx(t,{children:"Qualified scalable-chat baseline"})}),e.jsxs(i,{className:"space-y-3",children:[e.jsx("p",{className:"font-mono break-all",children:((A=a.baseline)==null?void 0:A.sha)??"No baseline qualified"}),a.baseline&&e.jsxs("p",{className:"text-sm",children:["Revision ",a.baseline.revision," · ",a.baseline.qualified_by," · ",m(a.baseline.qualified_at)]}),e.jsxs("div",{className:"grid md:grid-cols-[1fr_1fr_auto] gap-2",children:[e.jsx(u,{"aria-label":"Exact baseline SHA",value:p,onChange:s=>T(s.target.value),placeholder:"40-character lowercase commit SHA"}),e.jsx(u,{"aria-label":"Baseline confirmation",value:g,onChange:s=>N(s.target.value),placeholder:"Type QUALIFY_CHAT_BASELINE"}),e.jsx(h,{disabled:r.isPending||!/^[0-9a-f]{40}$/.test(p)||g!=="QUALIFY_CHAT_BASELINE",onClick:w,children:"Qualify exact SHA"})]})]})]}),e.jsxs(n,{children:[e.jsx(l,{children:e.jsx(t,{children:"Provider and fallback state"})}),e.jsx(i,{children:a.provider_states.length?e.jsx("ul",{className:"space-y-2",children:a.provider_states.map(s=>e.jsxs("li",{children:[e.jsx("strong",{children:s.environment}),": ",s.active_provider," · ",s.reason_code," · manifest ",s.manifest_revision]},s.environment))}):e.jsx("p",{children:"No provider state recorded."})})]}),e.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[e.jsxs(n,{children:[e.jsx(l,{children:e.jsx(t,{children:"Recent runs"})}),e.jsx(i,{children:a.recent_runs.length?e.jsx("ul",{className:"space-y-2",children:a.recent_runs.map(s=>e.jsxs("li",{children:[e.jsx("strong",{children:j[s.operator]})," · ",s.status," · ",s.exit_classification," · $",s.cost_usd," · ",m(s.created_at)]},s.run_id))}):e.jsx("p",{children:"No runs recorded."})})]}),e.jsxs(n,{children:[e.jsx(l,{children:e.jsx(t,{children:"Recent actions"})}),e.jsx(i,{children:a.recent_actions.length?e.jsx("ul",{className:"space-y-2",children:a.recent_actions.map(s=>e.jsxs("li",{children:[e.jsx("strong",{children:j[s.operator]})," · ",s.capability," · ",s.reason_code," · ",s.resource_kind,"/",s.resource_identifier]},s.action_id))}):e.jsx("p",{children:"No actions recorded."})})]})]}),e.jsxs(n,{children:[e.jsx(l,{children:e.jsx(t,{children:"Hard exclusions"})}),e.jsx(i,{children:e.jsx("ul",{className:"list-disc pl-5",children:a.exclusions.map(s=>e.jsx("li",{children:s},s))})})]}),y&&e.jsxs("p",{role:"alert",children:["Control update failed: ",y,". Refresh before retrying."]})]})})};export{V as default}; diff --git a/assets/BenchmarkDetailView-B6qFGTVj.js b/assets/BenchmarkDetailView-BomzuNed.js similarity index 98% rename from assets/BenchmarkDetailView-B6qFGTVj.js rename to assets/BenchmarkDetailView-BomzuNed.js index 7f14b3a68ca462c3fb5a8c51490625a553a45d5a..6a582cacd48dbdb5551b21118faabc9de7528545 100644 --- a/assets/BenchmarkDetailView-B6qFGTVj.js +++ b/assets/BenchmarkDetailView-BomzuNed.js @@ -1,2 +1,2 @@ -import{d as L,j as a,M as le,L as ne,e as dt,x as ut,u as mt,g as ht,b as te,o as de,t as ft,T as oe}from"./index-CjdUkE4w.js";import{R as pt}from"./ResearchFollowButton-DcTptDpW.js";import{c as re}from"./catalog-qXcKve0z.js";import{C as gt,E as xt,e as bt}from"./ExternalSourceEvalBadge-B3fyun97.js";import{u as yt}from"./preferences-DMhkYrri.js";import{L as ce}from"./LatexTitle-DESKtS30.js";import{S as Ge}from"./switch-hcLL2FH0.js";import{I as wt}from"./Icon-CGRs4BYD.js";import{S as ue}from"./skeleton-DTWi7Ctg.js";import{A as vt,a as jt}from"./alert-BM9Xfuyy.js";import{B as _t}from"./BenchmarkTrendSparkline-Dfex1cLI.js";import{s as St}from"./safeExternalHref-CkBrsh84.js";import{s as kt}from"./slug-BpH-Nkvz.js";import{i as Ct}from"./apiErrors-D0w5By9R.js";import Et from"./NotFound-BeWhm9El.js";import"./researchTopic-NmABF6tT.js";import"./useMutation-BYtVrkc7.js";import"./plus-AztI1566.js";import"./curation-CyyuHfv5.js";import"./hover-card-CIBIV2Hx.js";import"./account-DoluPGSd.js";import"./index-BxR27SAB.js";function ie(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 Xe=[{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 Nt(e){const t=e===null?void 0:Number(e);return Xe.some(r=>r.maxParametersExclusive===t)?t:void 0}function Rt(e){return new Intl.NumberFormat("en",{notation:"compact",maximumSignificantDigits:3}).format(e)}function Pt(e){return[e.paper_id,e.task_id,e.dataset_id,e.model_name,e.harness??""].join("|")}function Tt(e){const t=new Map;for(const r of e){const s=Pt(r),n=t.get(s);if(!n){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}n.metrics={...n.metrics,...r.metrics||{}},n.sourceEvaluationIds.push(r.id),r.best_metric&&r.best_rank!=null&&(n.ranksByMetric[r.best_metric]=r.best_rank),r.num_parameters!=null&&!n.hasParameterConflict&&(n.parameterCount===null?n.parameterCount=r.num_parameters:n.parameterCount!==r.num_parameters&&(n.parameterCount=null,n.hasParameterConflict=!0))}return Array.from(t.values())}function Ae(e,t){return t===void 0?e:e.filter(r=>r.parameterCount!==null&&r.parameterCounts+n,0);for(const[s,n]of t)if(n>=2&&n*2>r)return s;return null}function Lt(e,t){const r=e.evaluated_on;return r&&r!==t&&r!==$t(e.updated_at)?r:e.paper_published_date||""}function It(e,t,r){if(e.length===0)return{points:[],sota:0,sotaModel:""};const s=Ft(e),n=e.map(u=>{var R;const h=ie((R=u.metrics)==null?void 0:R[t]);return{eval:u,value:h,date:Lt(u,s)}}).filter(u=>u.value!==null&&!!u.date).sort((u,h)=>u.date.localeCompare(h.date)),i=[];let l=null;for(const u of n){const h=l==null?!0:r==="↓"?u.valuel;h&&(l=u.value),i.push({value:u.value,date:u.date,dateLabel:u.date.slice(0,7),modelName:u.eval.model_name||"",paperTitle:u.eval.paper_title||"",paperRouteId:u.eval.paper_arxiv_id||u.eval.paper_id||null,isSota:h})}const d=e.map(u=>{var h;return{eval:u,value:ie((h=u.metrics)==null?void 0:h[t])}}).filter(u=>u.value!==null).sort((u,h)=>r==="↓"?u.value-h.value:h.value-u.value)[0],f=(d==null?void 0:d.value)??0,x=(d==null?void 0:d.eval.model_name)||(d==null?void 0:d.eval.paper_title)||"";return{points:i,sota:f,sotaModel:x}}function At(e,t,r){const s=t?(e??[]).filter(l=>l.task_id===t):e??[],n=s.filter(l=>l.is_open===!1),i=n.reduce((l,c)=>l?(c.best_rank??Number.POSITIVE_INFINITY)<(l.best_rank??Number.POSITIVE_INFINITY)?c:l:c,null);return{visible:r?s.filter(l=>l.is_open!==!1):s,hiddenClosed:n,topHiddenClosed:i}}function Ye(e,t,r,s){const n=t.find(i=>i.id===s);if(e.length===0)return null;if(n!=null&&n.task_id&&e.some(i=>i.id===n.task_id))return n.task_id;if(r){const i=e.find(l=>l.slug===r);if(i)return i.id}if(e.length===1)return e[0].id;if(t.length>0){const i=new Map;for(const d of t)i.set(d.task_id,(i.get(d.task_id)||0)+1);let l=null,c=-1;for(const d of e){const f=i.get(d.id)||0;f>c&&(c=f,l=d.id)}if(l)return l}return e[0].id}function Bt(e){var _,X,Y;const{evaluations:t,tasks:r,taskSlug:s,highlightEvalId:n,parameterBound:i,showMoreMetrics:l,fittingMetricCount:c=1}=e,d=Ye(r,t,s,n),f=r.find(o=>o.id===d)||r[0]||null,x=t.find(o=>o.id===n),u=At(t,d,e.hideClosed),h=Tt(u.visible),R=Ae(h,i),C=e.configuredMetrics.map(o=>o.metric_name),P=Array.from(new Set(h.flatMap(o=>[...o.best_metric?[o.best_metric]:[],...Object.keys(o.metrics||{})]))),S=C.length?C:P,g=new Map;for(const o of h){const m=o.best_metric;!m||ie(o.metrics[m])===null||C.length&&!S.includes(m)||g.set(m,(g.get(m)||0)+1)}const k=((_=[...g].sort((o,m)=>m[1]-o[1])[0])==null?void 0:_[0])||S[0]||"",j=S.find(o=>{var m;return o.toLocaleLowerCase()===((m=e.metric)==null?void 0:m.trim().toLocaleLowerCase())})||(x==null?void 0:x.best_metric)||k,D=((X=e.directions)==null?void 0:X.directions[j])==="lower_is_better"?"↓":"↑",W=j&&S.includes(j)?[j,...S.filter(o=>o!==j)]:S,w=W.length?l?W:W.slice(0,Math.max(1,c)):j?[j]:[],q=R.slice().sort((o,m)=>{const p=ie(o.metrics[j]),y=ie(m.metrics[j]);return p!==null&&y!==null?D==="↓"?p-y:y-p:p!==null?-1:y!==null?1:Be(o,j)-Be(m,j)});let I=null,N=0;const G=q.map((o,m)=>{const p=ie(o.metrics[j]);return p!==null&&p!==I&&(I=p,N=m+1),{evaluation:o,rank:p===null?null:N,isHighlighted:Mt(o,n)}}),{points:z,sota:ee,sotaModel:O}=It(R,j,D),M=i===void 0?e.initialSummary:void 0,U=e.ready.evaluations&&e.ready.tasks&&e.ready.directions&&(!d||e.ready.metrics),K={parameter_coverage_known:h.filter(o=>o.parameterCount!==null).length,parameter_coverage_total:h.length};return{currentTaskId:d,primaryTask:f,activeMetric:j,arrow:D,allowedMetrics:S,orderedMetrics:W,visibleMetrics:w,rows:G,chartPoints:z,highlightedEval:((Y=G.find(o=>o.isHighlighted))==null?void 0:Y.evaluation)||null,hiddenClosedEvals:u.hiddenClosed,hiddenClosedTopEval:u.topHiddenClosed,parameterBound:i,parameterCoverage:K,hasParameterMetadata:K.parameter_coverage_known>0,parameterFilters:Xe.map(o=>({...o,selected:i===o.maxParametersExclusive,disabled:i!==o.maxParametersExclusive&&Ae(h,o.maxParametersExclusive).length===0})),displayedMetric:U?j:M==null?void 0:M.metric,displayedSota:U?ee:M==null?void 0:M.value,displayedSotaModel:U?O:M==null?void 0:M.model_name,isSummaryLoading:!U&&!M,isInitialFilteredViewLoading:i!==void 0&&!U}}function Dt(e,t,r,s=1,n=0){const i=e-t.fixed-(r?t.harness:0);if(t.metric<=0)return 1;const l=Math.floor(i/t.metric);if(lr+pe(t,s),0),harness:pe(t,"--bm-harness-width"),metric:pe(t,"--bm-metric-width")}}const Vt=20;function De(e,t){return e?a.jsx(ce,{title:e}):t||"—"}function Wt({model:e,showHarness:t,setMetric:r,highlightRowRef:s,onFittingMetricCountChange:n}){const{rows:i,visibleMetrics:l,activeMetric:c,arrow:d}=e,[f,x]=L.useState(null);return L.useEffect(()=>{if(!f)return;const u=()=>{f.classList.toggle("has-horizontal-overflow",f.scrollWidth>f.clientWidth);const R=f.firstElementChild;if(!R)return;const C=f.clientWidth,P=Ht(R);f.classList.toggle("unpins-trailing-columns",CS.clientHeight?0:Vt;n(k=>Dt(C,P,t,k,g))},h=new ResizeObserver(u);return h.observe(f),f.firstElementChild&&h.observe(f.firstElementChild),u(),()=>h.disconnect()},[f,t,n]),a.jsx("div",{ref:x,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":l.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"}),l.map(u=>a.jsx("col",{className:"bm-width-metric"},u)),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.jsxs("th",{className:"col-parameters",children:[a.jsx("span",{className:"bm-label-full",children:"Parameters"}),a.jsx("span",{className:"bm-label-short",children:"Params"})]}),t&&a.jsx("th",{className:"col-harness",children:"Harness"}),l.map(u=>{const h=u===c;return a.jsx("th",{className:`col-value ${h?"is-active":""}`,"aria-sort":h?d==="↓"?"ascending":"descending":"none",children:a.jsxs("button",{type:"button",className:"bm-metric-header",onClick:()=>r(u),"aria-pressed":h,title:`Sort by ${u}`,children:[u,h?` ${d}`:""]})},u)}),a.jsx("th",{className:"col-paper",children:"Paper"}),a.jsx("th",{className:"col-year",children:"Year"})]})}),a.jsx("tbody",{children:i.map(({evaluation:u,rank:h,isHighlighted:R})=>{var S;const C=u.paper_arxiv_id||u.paper_id,P=u.paper_title||(u.paper_arxiv_id?`arXiv:${u.paper_arxiv_id}`:null);return a.jsxs("tr",{ref:R?s:void 0,className:R?"is-highlighted":void 0,children:[a.jsx("td",{className:"col-rank",children:h??"—"}),a.jsxs("td",{className:"col-model",children:[R&&a.jsx("span",{className:"bm-row-marker","aria-hidden":"true"}),u.hf_model_url?a.jsx("a",{href:u.hf_model_url,target:"_blank",rel:"noopener noreferrer",className:"bm-model-link",title:`Open ${u.model_name||"model"} on Hugging Face`,children:u.model_name||"—"}):u.model_name||"—",u.is_open===!1&&a.jsx(gt,{}),(u.external??u.is_external)&&a.jsx(xt,{sourceUrl:u.source_url||u.external_source_url||u.result_url})]}),a.jsx("td",{className:"col-parameters",title:u.parameterCount===null?void 0:u.parameterCount.toLocaleString("en-US"),"aria-label":u.parameterCount===null?"Parameters unknown":`${u.parameterCount.toLocaleString("en-US")} parameters`,children:u.parameterCount===null?"—":Rt(u.parameterCount)}),t&&a.jsx("td",{className:"col-harness",children:u.harness||"—"}),l.map(g=>{var j;const k=g===c,B=(j=u.metrics)==null?void 0:j[g];return a.jsx("td",{className:`col-value${k?" is-active":""}${k&&h===1?" is-best":""}`,children:B!=null&&B!==""?le(B):"—"},g)}),a.jsx("td",{className:"col-paper",children:C?a.jsx(ne,{to:`/paper/${C}`,title:u.paper_title||P||void 0,children:De(u.paper_title,P)}):De(u.paper_title,P)}),a.jsx("td",{className:"col-year",children:((S=u.evaluated_on||u.paper_published_date)==null?void 0:S.slice(0,4))||"—"})]},u.id)})})]})})}function He(e){const t=e.length===7?`${e}-01`:e,r=new Date(t).getTime();return Number.isFinite(r)?r:0}const ge=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function xe(e){const t=new Date(e);return{year:t.getFullYear(),month:t.getMonth()}}function Ot(e,t){if(e===t){const{year:d,month:f}=xe(e);return[{timestamp:new Date(d,f,1).getTime(),key:`${d}-${f}`,label:`${ge[f]} ${d}`}]}const r=xe(e),s=xe(t);if(r.year===s.year){const d=s.month-r.month+1;let f=1;const x=12;d>x&&(f=Math.ceil(d/x));const u=[];for(let h=r.month;h<=s.month;h+=f)u.push({timestamp:new Date(r.year,h,1).getTime(),key:`${r.year}-${h}`,label:d<=3?`${ge[h]} ${r.year}`:ge[h]});return u}const n=s.year-r.year+1;let i=1;const l=12;n>l&&(i=Math.ceil(n/l));const c=[];for(let d=r.year;d<=s.year;d+=i)c.push({timestamp:new Date(d,0,1).getTime(),key:String(d),label:String(d)});return c}const Ut=({points:e,metric:t})=>{const r=dt(),[s,n]=L.useState(null),i=880,l=320,c=60,d=30,f=40,x=50,u=e.map(o=>o.value),h=Math.min(...u),C=Math.max(...u)-h||1,P=i-c-d,S=l-f-x,g=e.map(o=>He(o.date)),k=Math.min(...g),B=Math.max(...g),j=B-k||1,D=o=>k===B?c+P/2:c+(o-k)/j*P,W=e.map((o,m)=>{const p=D(He(o.date)),y=(o.value-h)/C,T=f+S*(1-y);return{x:p,y:T,data:o,idx:m}}),w=W.filter(o=>o.data.isSota);let q="";if(w.length>=2){q=`M${w[0].x},${w[0].y}`;for(let o=1;o{const m=o.data.modelName||o.data.paperTitle||"";if(!m)return null;const p=m.length>22?m.slice(0,21)+"…":m,y=p.length*I;let T=o.x-y/2,E=o.x+y/2,v="middle";return Ti-d&&(E=i-d,T=E-y,v="end"),{x:v==="start"?c:v==="end"?i-d:o.x,y:o.y-G,text:p,anchor:v,left:T,right:E}},ee=[],O=w.length>0?z(w[w.length-1]):null;let M=-1/0;for(let o=0;oO.left-N||(M=m.right,ee.push({x:m.x,y:m.y,text:m.text,anchor:m.anchor})))}O&&ee.push({x:O.x,y:O.y,text:O.text,anchor:O.anchor});const U=Ot(k,B),K=5,_=o=>n(m=>m===o?null:m),X=o=>{o&&r(`/paper/${o}`)},Y=(o,m)=>{const y=`${o.data.modelName||o.data.paperTitle||"Unknown model"}: ${le(o.data.value)} on ${o.data.dateLabel}`,T=!!o.data.paperRouteId;return a.jsxs("g",{children:[m,a.jsx("circle",{cx:o.x,cy:o.y,r:"10",fill:"transparent",style:{cursor:T?"pointer":"default",outline:"none"},tabIndex:0,role:T?"link":"img","aria-label":y,onMouseEnter:()=>n(o.idx),onMouseLeave:()=>_(o.idx),onFocus:()=>n(o.idx),onBlur:()=>_(o.idx),onClick:()=>X(o.data.paperRouteId),onKeyDown:E=>{T&&(E.key==="Enter"||E.key===" ")&&(E.preventDefault(),X(o.data.paperRouteId))},children:a.jsx("title",{children:y})})]},o.idx)};return a.jsxs("svg",{width:"100%",viewBox:`0 0 ${i} ${l}`,style:{display:"block"},children:[a.jsx("text",{x:c-38,y:f+S/2,fontSize:"11",fontFamily:"var(--mono)",fill:"var(--ink-faint)",textAnchor:"middle",transform:`rotate(-90 ${c-38} ${f+S/2})`,children:t}),Array.from({length:K}).map((o,m)=>{const p=m/(K-1),y=f+S*(1-p),T=h+C*p;return a.jsxs("g",{children:[a.jsx("line",{x1:c,y1:y,x2:i-d,y2:y,stroke:"var(--hairline)",strokeWidth:"1"}),a.jsx("text",{x:c-10,y:y+4,fontSize:"11",fontFamily:"var(--mono)",fill:"var(--ink-faint)",textAnchor:"end",children:le(T)})]},m)}),U.map(o=>{const m=D(o.timestamp);return a.jsx("text",{x:m,y:l-x+18,fontSize:"11",fontFamily:"var(--mono)",fill:"var(--ink-soft)",textAnchor:"middle",children:o.label},o.key)}),W.filter(o=>!o.data.isSota).map(o=>{const m=s===o.idx;return Y(o,a.jsx("circle",{cx:o.x,cy:o.y,r:m?3:2,fill:"var(--ink-faint)",opacity:m?1:.45,style:{transition:"r 0.12s ease, opacity 0.12s ease"}}))}),q&&a.jsx("path",{d:q,stroke:"var(--accent)",strokeWidth:"2",fill:"none",strokeLinejoin:"round",strokeLinecap:"round"}),w.map(o=>{const m=s===o.idx;return Y(o,a.jsx("circle",{cx:o.x,cy:o.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"}}))}),ee.map((o,m)=>a.jsx("text",{x:o.x,y:o.y,fontSize:"9.5",fontFamily:"var(--mono)",fill:"var(--ink-soft)",textAnchor:o.anchor,pointerEvents:"none",style:{paintOrder:"stroke",stroke:"var(--bg-elevated)",strokeWidth:3,strokeLinejoin:"round"},children:o.text},`label-${m}`)),s!==null&&W[s]&&(()=>{const o=W[s],m=o.data.modelName||o.data.paperTitle||"Unknown model",y=`${m.length>40?m.slice(0,39)+"…":m}: ${le(o.data.value)}`,E=Math.max(120,Math.min(340,y.length*6.6+24)),v=30;let H=o.x-E/2;Hi-d&&(H=i-d-E);const Q=o.y-v-14>=f?o.y-v-12:o.y+12;return a.jsxs("g",{pointerEvents:"none",children:[a.jsx("rect",{x:H,y:Q,width:E,height:v,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:H+12,y:Q+19,fontSize:"12",fontFamily:"var(--sans)",fill:"var(--ink)",fontWeight:500,children:y})]})})()]})};function qt(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"),n=r.createElement("a");return r.head.appendChild(s),r.body.appendChild(n),t&&(s.href=t),n.href=e,n.href}const zt=(()=>{let e=0;const t=()=>`0000${(Math.random()*36**4<<0).toString(36)}`.slice(-4);return()=>(e+=1,`u${t()}${e}`)})();function Z(e){const t=[];for(let r=0,s=e.length;rV||e.height>V)&&(e.width>V&&e.height>V?e.width>e.height?(e.height*=V/e.width,e.width=V):(e.width*=V/e.height,e.height=V):e.width>V?(e.height*=V/e.width,e.width=V):(e.width*=V/e.height,e.height=V))}function Yt(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]),n=s.length,i=new Uint8Array(n);for(let l=0;l{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 Jt(e){return Promise.resolve().then(()=>new XMLSerializer().serializeToString(e)).then(encodeURIComponent).then(t=>`data:image/svg+xml;charset=utf-8,${t}`)}async function Zt(e,t,r){const s="http://www.w3.org/2000/svg",n=document.createElementNS(s,"svg"),i=document.createElementNS(s,"foreignObject");return n.setAttribute("width",`${t}`),n.setAttribute("height",`${r}`),n.setAttribute("viewBox",`0 0 ${t} ${r}`),i.setAttribute("width","100%"),i.setAttribute("height","100%"),i.setAttribute("x","0"),i.setAttribute("y","0"),i.setAttribute("externalResourcesRequired","true"),n.appendChild(i),i.appendChild(e),Jt(n)}const A=(e,t)=>{if(e instanceof t)return!0;const r=Object.getPrototypeOf(e);return r===null?!1:r.constructor.name===t.name||A(r,t)};function er(e){const t=e.getPropertyValue("content");return`${e.cssText} content: '${t.replace(/'|"/g,"")}';`}function tr(e,t){return Je(t).map(r=>{const s=e.getPropertyValue(r),n=e.getPropertyPriority(r);return`${r}: ${s}${n?" !important":""};`}).join(" ")}function rr(e,t,r,s){const n=`.${e}:${t}`,i=r.cssText?er(r):tr(r,s);return document.createTextNode(`${n}{${i}}`)}function Ve(e,t,r,s){const n=window.getComputedStyle(e,r),i=n.getPropertyValue("content");if(i===""||i==="none")return;const l=zt();try{t.className=`${t.className} ${l}`}catch{return}const c=document.createElement("style");c.appendChild(rr(l,r,n,s)),t.appendChild(c)}function ar(e,t,r){Ve(e,t,":before",r),Ve(e,t,":after",r)}const We="application/font-woff",Oe="image/jpeg",sr={woff:We,woff2:We,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:Oe,jpeg:Oe,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml",webp:"image/webp"};function nr(e){const t=/\.([^./]*?)$/g.exec(e);return t?t[1]:""}function ve(e){const t=nr(e).toLowerCase();return sr[t]||""}function ir(e){return e.split(/,/)[1]}function ye(e){return e.search(/^(data:)/)!==-1}function lr(e,t){return`data:${t};base64,${e}`}async function et(e,t,r){const s=await fetch(e,t);if(s.status===404)throw new Error(`Resource "${s.url}" not found`);const n=await s.blob();return new Promise((i,l)=>{const c=new FileReader;c.onerror=l,c.onloadend=()=>{try{i(r({res:s,result:c.result}))}catch(d){l(d)}},c.readAsDataURL(n)})}const be={};function or(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 je(e,t,r){const s=or(e,t,r.includeQueryParams);if(be[s]!=null)return be[s];r.cacheBust&&(e+=(/\?/.test(e)?"&":"?")+new Date().getTime());let n;try{const i=await et(e,r.fetchRequestInit,({res:l,result:c})=>(t||(t=l.headers.get("Content-Type")||""),ir(c)));n=lr(i,t)}catch(i){n=r.imagePlaceholder||"";let l=`Failed to fetch resource: ${e}`;i&&(l=typeof i=="string"?i:i.message),l&&console.warn(l)}return be[s]=n,n}async function cr(e){const t=e.toDataURL();return t==="data:,"?e.cloneNode(!1):he(t)}async function dr(e,t){if(e.currentSrc){const i=document.createElement("canvas"),l=i.getContext("2d");i.width=e.clientWidth,i.height=e.clientHeight,l==null||l.drawImage(e,0,0,i.width,i.height);const c=i.toDataURL();return he(c)}const r=e.poster,s=ve(r),n=await je(r,s,t);return he(n)}async function ur(e,t){var r;try{if(!((r=e==null?void 0:e.contentDocument)===null||r===void 0)&&r.body)return await fe(e.contentDocument.body,t,!0)}catch{}return e.cloneNode(!1)}async function mr(e,t){return A(e,HTMLCanvasElement)?cr(e):A(e,HTMLVideoElement)?dr(e,t):A(e,HTMLIFrameElement)?ur(e,t):e.cloneNode(tt(e))}const hr=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SLOT",tt=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SVG";async function fr(e,t,r){var s,n;if(tt(t))return t;let i=[];return hr(e)&&e.assignedNodes?i=Z(e.assignedNodes()):A(e,HTMLIFrameElement)&&(!((s=e.contentDocument)===null||s===void 0)&&s.body)?i=Z(e.contentDocument.body.childNodes):i=Z(((n=e.shadowRoot)!==null&&n!==void 0?n:e).childNodes),i.length===0||A(e,HTMLVideoElement)||await i.reduce((l,c)=>l.then(()=>fe(c,r)).then(d=>{d&&t.appendChild(d)}),Promise.resolve()),t}function pr(e,t,r){const s=t.style;if(!s)return;const n=window.getComputedStyle(e);n.cssText?(s.cssText=n.cssText,s.transformOrigin=n.transformOrigin):Je(r).forEach(i=>{let l=n.getPropertyValue(i);i==="font-size"&&l.endsWith("px")&&(l=`${Math.floor(parseFloat(l.substring(0,l.length-2)))-.1}px`),A(e,HTMLIFrameElement)&&i==="display"&&l==="inline"&&(l="block"),i==="d"&&t.getAttribute("d")&&(l=`path(${t.getAttribute("d")})`),s.setProperty(i,l,n.getPropertyPriority(i))})}function gr(e,t){A(e,HTMLTextAreaElement)&&(t.innerHTML=e.value),A(e,HTMLInputElement)&&t.setAttribute("value",e.value)}function xr(e,t){if(A(e,HTMLSelectElement)){const r=t,s=Array.from(r.children).find(n=>e.value===n.getAttribute("value"));s&&s.setAttribute("selected","")}}function br(e,t,r){return A(t,Element)&&(pr(e,t,r),ar(e,t,r),gr(e,t),xr(e,t)),t}async function yr(e,t){const r=e.querySelectorAll?e.querySelectorAll("use"):[];if(r.length===0)return e;const s={};for(let i=0;imr(s,t)).then(s=>fr(e,s,t)).then(s=>br(e,s,t)).then(s=>yr(s,t))}const rt=/url\((['"]?)([^'"]+?)\1\)/g,wr=/url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g,vr=/src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;function jr(e){const t=e.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1");return new RegExp(`(url\\(['"]?)(${t})(['"]?\\))`,"g")}function _r(e){const t=[];return e.replace(rt,(r,s,n)=>(t.push(n),r)),t.filter(r=>!ye(r))}async function Sr(e,t,r,s,n){try{const i=r?qt(t,r):t,l=ve(t);let c;return n||(c=await je(i,l,s)),e.replace(jr(t),`$1${c}$3`)}catch{}return e}function kr(e,{preferredFontFormat:t}){return t?e.replace(vr,r=>{for(;;){const[s,,n]=wr.exec(r)||[];if(!n)return"";if(n===t)return`src: ${s};`}}):e}function at(e){return e.search(rt)!==-1}async function st(e,t,r){if(!at(e))return e;const s=kr(e,r);return _r(s).reduce((i,l)=>i.then(c=>Sr(c,l,t,r)),Promise.resolve(s))}async function se(e,t,r){var s;const n=(s=t.style)===null||s===void 0?void 0:s.getPropertyValue(e);if(n){const i=await st(n,null,r);return t.style.setProperty(e,i,t.style.getPropertyPriority(e)),!0}return!1}async function Cr(e,t){await se("background",e,t)||await se("background-image",e,t),await se("mask",e,t)||await se("-webkit-mask",e,t)||await se("mask-image",e,t)||await se("-webkit-mask-image",e,t)}async function Er(e,t){const r=A(e,HTMLImageElement);if(!(r&&!ye(e.src))&&!(A(e,SVGImageElement)&&!ye(e.href.baseVal)))return;const s=r?e.src:e.href.baseVal,n=await je(s,ve(s),t);await new Promise((i,l)=>{e.onload=i,e.onerror=t.onImageErrorHandler?(...d)=>{try{i(t.onImageErrorHandler(...d))}catch(f){l(f)}}:l;const c=e;c.decode&&(c.decode=i),c.loading==="lazy"&&(c.loading="eager"),r?(e.srcset="",e.src=n):e.href.baseVal=n})}async function Nr(e,t){const s=Z(e.childNodes).map(n=>nt(n,t));await Promise.all(s).then(()=>e)}async function nt(e,t){A(e,Element)&&(await Cr(e,t),await Er(e,t),await Nr(e,t))}function Rr(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(n=>{r[n]=s[n]}),e}const Ue={};async function qe(e){let t=Ue[e];if(t!=null)return t;const s=await(await fetch(e)).text();return t={url:e,cssText:s},Ue[e]=t,t}async function ze(e,t){let r=e.cssText;const s=/url\(["']?([^"')]+)["']?\)/g,i=(r.match(/url\([^)]+\)/g)||[]).map(async l=>{let c=l.replace(s,"$1");return c.startsWith("https://")||(c=new URL(c,e.url).href),et(c,t.fetchRequestInit,({result:d})=>(r=r.replace(l,`url(${d})`),[l,d]))});return Promise.all(i).then(()=>r)}function Ke(e){if(e==null)return[];const t=[],r=/(\/\*[\s\S]*?\*\/)/gi;let s=e.replace(r,"");const n=new RegExp("((@.*?keyframes [\\s\\S]*?){([\\s\\S]*?}\\s*?)})","gi");for(;;){const d=n.exec(s);if(d===null)break;t.push(d[0])}s=s.replace(n,"");const i=/@import[\s\S]*?url\([^)]*\)[\s\S]*?;/gi,l="((\\s*?(?:\\/\\*[\\s\\S]*?\\*\\/)?\\s*?@media[\\s\\S]*?){([\\s\\S]*?)}\\s*?})|(([\\s\\S]*?){([\\s\\S]*?)})",c=new RegExp(l,"gi");for(;;){let d=i.exec(s);if(d===null){if(d=c.exec(s),d===null)break;i.lastIndex=c.lastIndex}else c.lastIndex=i.lastIndex;t.push(d[0])}return t}async function Pr(e,t){const r=[],s=[];return e.forEach(n=>{if("cssRules"in n)try{Z(n.cssRules||[]).forEach((i,l)=>{if(i.type===CSSRule.IMPORT_RULE){let c=l+1;const d=i.href,f=qe(d).then(x=>ze(x,t)).then(x=>Ke(x).forEach(u=>{try{n.insertRule(u,u.startsWith("@import")?c+=1:n.cssRules.length)}catch(h){console.error("Error inserting rule from remote css",{rule:u,error:h})}})).catch(x=>{console.error("Error loading remote css",x.toString())});s.push(f)}})}catch(i){const l=e.find(c=>c.href==null)||document.styleSheets[0];n.href!=null&&s.push(qe(n.href).then(c=>ze(c,t)).then(c=>Ke(c).forEach(d=>{l.insertRule(d,l.cssRules.length)})).catch(c=>{console.error("Error loading remote stylesheet",c)})),console.error("Error inlining remote css file",i)}}),Promise.all(s).then(()=>(e.forEach(n=>{if("cssRules"in n)try{Z(n.cssRules||[]).forEach(i=>{r.push(i)})}catch(i){console.error(`Error while reading CSS rules from ${n.href}`,i)}}),r))}function Tr(e){return e.filter(t=>t.type===CSSRule.FONT_FACE_RULE).filter(t=>at(t.style.getPropertyValue("src")))}async function Mr(e,t){if(e.ownerDocument==null)throw new Error("Provided element is not within a Document");const r=Z(e.ownerDocument.styleSheets),s=await Pr(r,t);return Tr(s)}function it(e){return e.trim().replace(/["']/g,"")}function $r(e){const t=new Set;function r(s){(s.style.fontFamily||getComputedStyle(s).fontFamily).split(",").forEach(i=>{t.add(it(i))}),Array.from(s.children).forEach(i=>{i instanceof HTMLElement&&r(i)})}return r(e),t}async function Fr(e,t){const r=await Mr(e,t),s=$r(e);return(await Promise.all(r.filter(i=>s.has(it(i.style.fontFamily))).map(i=>{const l=i.parentStyleSheet?i.parentStyleSheet.href:null;return st(i.cssText,l,t)}))).join(` +import{d as L,j as a,M as le,L as ne,e as dt,x as ut,u as mt,g as ht,b as te,o as de,t as ft,T as oe}from"./index-CHGpuh10.js";import{R as pt}from"./ResearchFollowButton-DFGdTBex.js";import{c as re}from"./catalog-DMzmJg__.js";import{C as gt,E as xt,e as bt}from"./ExternalSourceEvalBadge-CMfiSNvf.js";import{u as yt}from"./preferences-BR-SGx3E.js";import{L as ce}from"./LatexTitle-CfeEppH3.js";import{S as Ge}from"./switch-CD23XWT7.js";import{I as wt}from"./Icon-CRWrVPWO.js";import{S as ue}from"./skeleton-Df0GaMuw.js";import{A as vt,a as jt}from"./alert-DPvmCXZT.js";import{B as _t}from"./BenchmarkTrendSparkline-dQdt-ejq.js";import{s as St}from"./safeExternalHref-CkBrsh84.js";import{s as kt}from"./slug-BpH-Nkvz.js";import{i as Ct}from"./apiErrors-CvxFAcrW.js";import Et from"./NotFound-Bc6y0g0J.js";import"./researchTopic-DK_KbYKH.js";import"./useMutation-3fOqWcpt.js";import"./plus-CYgr1KdS.js";import"./curation-DI9_zYNx.js";import"./hover-card-Dz7z6DCn.js";import"./account-D9O54ufU.js";import"./index-CWaI9Snb.js";function ie(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 Xe=[{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 Nt(e){const t=e===null?void 0:Number(e);return Xe.some(r=>r.maxParametersExclusive===t)?t:void 0}function Rt(e){return new Intl.NumberFormat("en",{notation:"compact",maximumSignificantDigits:3}).format(e)}function Pt(e){return[e.paper_id,e.task_id,e.dataset_id,e.model_name,e.harness??""].join("|")}function Tt(e){const t=new Map;for(const r of e){const s=Pt(r),n=t.get(s);if(!n){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}n.metrics={...n.metrics,...r.metrics||{}},n.sourceEvaluationIds.push(r.id),r.best_metric&&r.best_rank!=null&&(n.ranksByMetric[r.best_metric]=r.best_rank),r.num_parameters!=null&&!n.hasParameterConflict&&(n.parameterCount===null?n.parameterCount=r.num_parameters:n.parameterCount!==r.num_parameters&&(n.parameterCount=null,n.hasParameterConflict=!0))}return Array.from(t.values())}function Ae(e,t){return t===void 0?e:e.filter(r=>r.parameterCount!==null&&r.parameterCounts+n,0);for(const[s,n]of t)if(n>=2&&n*2>r)return s;return null}function Lt(e,t){const r=e.evaluated_on;return r&&r!==t&&r!==$t(e.updated_at)?r:e.paper_published_date||""}function It(e,t,r){if(e.length===0)return{points:[],sota:0,sotaModel:""};const s=Ft(e),n=e.map(u=>{var R;const h=ie((R=u.metrics)==null?void 0:R[t]);return{eval:u,value:h,date:Lt(u,s)}}).filter(u=>u.value!==null&&!!u.date).sort((u,h)=>u.date.localeCompare(h.date)),i=[];let l=null;for(const u of n){const h=l==null?!0:r==="↓"?u.valuel;h&&(l=u.value),i.push({value:u.value,date:u.date,dateLabel:u.date.slice(0,7),modelName:u.eval.model_name||"",paperTitle:u.eval.paper_title||"",paperRouteId:u.eval.paper_arxiv_id||u.eval.paper_id||null,isSota:h})}const d=e.map(u=>{var h;return{eval:u,value:ie((h=u.metrics)==null?void 0:h[t])}}).filter(u=>u.value!==null).sort((u,h)=>r==="↓"?u.value-h.value:h.value-u.value)[0],f=(d==null?void 0:d.value)??0,x=(d==null?void 0:d.eval.model_name)||(d==null?void 0:d.eval.paper_title)||"";return{points:i,sota:f,sotaModel:x}}function At(e,t,r){const s=t?(e??[]).filter(l=>l.task_id===t):e??[],n=s.filter(l=>l.is_open===!1),i=n.reduce((l,c)=>l?(c.best_rank??Number.POSITIVE_INFINITY)<(l.best_rank??Number.POSITIVE_INFINITY)?c:l:c,null);return{visible:r?s.filter(l=>l.is_open!==!1):s,hiddenClosed:n,topHiddenClosed:i}}function Ye(e,t,r,s){const n=t.find(i=>i.id===s);if(e.length===0)return null;if(n!=null&&n.task_id&&e.some(i=>i.id===n.task_id))return n.task_id;if(r){const i=e.find(l=>l.slug===r);if(i)return i.id}if(e.length===1)return e[0].id;if(t.length>0){const i=new Map;for(const d of t)i.set(d.task_id,(i.get(d.task_id)||0)+1);let l=null,c=-1;for(const d of e){const f=i.get(d.id)||0;f>c&&(c=f,l=d.id)}if(l)return l}return e[0].id}function Bt(e){var _,X,Y;const{evaluations:t,tasks:r,taskSlug:s,highlightEvalId:n,parameterBound:i,showMoreMetrics:l,fittingMetricCount:c=1}=e,d=Ye(r,t,s,n),f=r.find(o=>o.id===d)||r[0]||null,x=t.find(o=>o.id===n),u=At(t,d,e.hideClosed),h=Tt(u.visible),R=Ae(h,i),C=e.configuredMetrics.map(o=>o.metric_name),P=Array.from(new Set(h.flatMap(o=>[...o.best_metric?[o.best_metric]:[],...Object.keys(o.metrics||{})]))),S=C.length?C:P,g=new Map;for(const o of h){const m=o.best_metric;!m||ie(o.metrics[m])===null||C.length&&!S.includes(m)||g.set(m,(g.get(m)||0)+1)}const k=((_=[...g].sort((o,m)=>m[1]-o[1])[0])==null?void 0:_[0])||S[0]||"",j=S.find(o=>{var m;return o.toLocaleLowerCase()===((m=e.metric)==null?void 0:m.trim().toLocaleLowerCase())})||(x==null?void 0:x.best_metric)||k,D=((X=e.directions)==null?void 0:X.directions[j])==="lower_is_better"?"↓":"↑",W=j&&S.includes(j)?[j,...S.filter(o=>o!==j)]:S,w=W.length?l?W:W.slice(0,Math.max(1,c)):j?[j]:[],q=R.slice().sort((o,m)=>{const p=ie(o.metrics[j]),y=ie(m.metrics[j]);return p!==null&&y!==null?D==="↓"?p-y:y-p:p!==null?-1:y!==null?1:Be(o,j)-Be(m,j)});let I=null,N=0;const G=q.map((o,m)=>{const p=ie(o.metrics[j]);return p!==null&&p!==I&&(I=p,N=m+1),{evaluation:o,rank:p===null?null:N,isHighlighted:Mt(o,n)}}),{points:z,sota:ee,sotaModel:O}=It(R,j,D),M=i===void 0?e.initialSummary:void 0,U=e.ready.evaluations&&e.ready.tasks&&e.ready.directions&&(!d||e.ready.metrics),K={parameter_coverage_known:h.filter(o=>o.parameterCount!==null).length,parameter_coverage_total:h.length};return{currentTaskId:d,primaryTask:f,activeMetric:j,arrow:D,allowedMetrics:S,orderedMetrics:W,visibleMetrics:w,rows:G,chartPoints:z,highlightedEval:((Y=G.find(o=>o.isHighlighted))==null?void 0:Y.evaluation)||null,hiddenClosedEvals:u.hiddenClosed,hiddenClosedTopEval:u.topHiddenClosed,parameterBound:i,parameterCoverage:K,hasParameterMetadata:K.parameter_coverage_known>0,parameterFilters:Xe.map(o=>({...o,selected:i===o.maxParametersExclusive,disabled:i!==o.maxParametersExclusive&&Ae(h,o.maxParametersExclusive).length===0})),displayedMetric:U?j:M==null?void 0:M.metric,displayedSota:U?ee:M==null?void 0:M.value,displayedSotaModel:U?O:M==null?void 0:M.model_name,isSummaryLoading:!U&&!M,isInitialFilteredViewLoading:i!==void 0&&!U}}function Dt(e,t,r,s=1,n=0){const i=e-t.fixed-(r?t.harness:0);if(t.metric<=0)return 1;const l=Math.floor(i/t.metric);if(lr+pe(t,s),0),harness:pe(t,"--bm-harness-width"),metric:pe(t,"--bm-metric-width")}}const Vt=20;function De(e,t){return e?a.jsx(ce,{title:e}):t||"—"}function Wt({model:e,showHarness:t,setMetric:r,highlightRowRef:s,onFittingMetricCountChange:n}){const{rows:i,visibleMetrics:l,activeMetric:c,arrow:d}=e,[f,x]=L.useState(null);return L.useEffect(()=>{if(!f)return;const u=()=>{f.classList.toggle("has-horizontal-overflow",f.scrollWidth>f.clientWidth);const R=f.firstElementChild;if(!R)return;const C=f.clientWidth,P=Ht(R);f.classList.toggle("unpins-trailing-columns",CS.clientHeight?0:Vt;n(k=>Dt(C,P,t,k,g))},h=new ResizeObserver(u);return h.observe(f),f.firstElementChild&&h.observe(f.firstElementChild),u(),()=>h.disconnect()},[f,t,n]),a.jsx("div",{ref:x,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":l.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"}),l.map(u=>a.jsx("col",{className:"bm-width-metric"},u)),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.jsxs("th",{className:"col-parameters",children:[a.jsx("span",{className:"bm-label-full",children:"Parameters"}),a.jsx("span",{className:"bm-label-short",children:"Params"})]}),t&&a.jsx("th",{className:"col-harness",children:"Harness"}),l.map(u=>{const h=u===c;return a.jsx("th",{className:`col-value ${h?"is-active":""}`,"aria-sort":h?d==="↓"?"ascending":"descending":"none",children:a.jsxs("button",{type:"button",className:"bm-metric-header",onClick:()=>r(u),"aria-pressed":h,title:`Sort by ${u}`,children:[u,h?` ${d}`:""]})},u)}),a.jsx("th",{className:"col-paper",children:"Paper"}),a.jsx("th",{className:"col-year",children:"Year"})]})}),a.jsx("tbody",{children:i.map(({evaluation:u,rank:h,isHighlighted:R})=>{var S;const C=u.paper_arxiv_id||u.paper_id,P=u.paper_title||(u.paper_arxiv_id?`arXiv:${u.paper_arxiv_id}`:null);return a.jsxs("tr",{ref:R?s:void 0,className:R?"is-highlighted":void 0,children:[a.jsx("td",{className:"col-rank",children:h??"—"}),a.jsxs("td",{className:"col-model",children:[R&&a.jsx("span",{className:"bm-row-marker","aria-hidden":"true"}),u.hf_model_url?a.jsx("a",{href:u.hf_model_url,target:"_blank",rel:"noopener noreferrer",className:"bm-model-link",title:`Open ${u.model_name||"model"} on Hugging Face`,children:u.model_name||"—"}):u.model_name||"—",u.is_open===!1&&a.jsx(gt,{}),(u.external??u.is_external)&&a.jsx(xt,{sourceUrl:u.source_url||u.external_source_url||u.result_url})]}),a.jsx("td",{className:"col-parameters",title:u.parameterCount===null?void 0:u.parameterCount.toLocaleString("en-US"),"aria-label":u.parameterCount===null?"Parameters unknown":`${u.parameterCount.toLocaleString("en-US")} parameters`,children:u.parameterCount===null?"—":Rt(u.parameterCount)}),t&&a.jsx("td",{className:"col-harness",children:u.harness||"—"}),l.map(g=>{var j;const k=g===c,B=(j=u.metrics)==null?void 0:j[g];return a.jsx("td",{className:`col-value${k?" is-active":""}${k&&h===1?" is-best":""}`,children:B!=null&&B!==""?le(B):"—"},g)}),a.jsx("td",{className:"col-paper",children:C?a.jsx(ne,{to:`/paper/${C}`,title:u.paper_title||P||void 0,children:De(u.paper_title,P)}):De(u.paper_title,P)}),a.jsx("td",{className:"col-year",children:((S=u.evaluated_on||u.paper_published_date)==null?void 0:S.slice(0,4))||"—"})]},u.id)})})]})})}function He(e){const t=e.length===7?`${e}-01`:e,r=new Date(t).getTime();return Number.isFinite(r)?r:0}const ge=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function xe(e){const t=new Date(e);return{year:t.getFullYear(),month:t.getMonth()}}function Ot(e,t){if(e===t){const{year:d,month:f}=xe(e);return[{timestamp:new Date(d,f,1).getTime(),key:`${d}-${f}`,label:`${ge[f]} ${d}`}]}const r=xe(e),s=xe(t);if(r.year===s.year){const d=s.month-r.month+1;let f=1;const x=12;d>x&&(f=Math.ceil(d/x));const u=[];for(let h=r.month;h<=s.month;h+=f)u.push({timestamp:new Date(r.year,h,1).getTime(),key:`${r.year}-${h}`,label:d<=3?`${ge[h]} ${r.year}`:ge[h]});return u}const n=s.year-r.year+1;let i=1;const l=12;n>l&&(i=Math.ceil(n/l));const c=[];for(let d=r.year;d<=s.year;d+=i)c.push({timestamp:new Date(d,0,1).getTime(),key:String(d),label:String(d)});return c}const Ut=({points:e,metric:t})=>{const r=dt(),[s,n]=L.useState(null),i=880,l=320,c=60,d=30,f=40,x=50,u=e.map(o=>o.value),h=Math.min(...u),C=Math.max(...u)-h||1,P=i-c-d,S=l-f-x,g=e.map(o=>He(o.date)),k=Math.min(...g),B=Math.max(...g),j=B-k||1,D=o=>k===B?c+P/2:c+(o-k)/j*P,W=e.map((o,m)=>{const p=D(He(o.date)),y=(o.value-h)/C,T=f+S*(1-y);return{x:p,y:T,data:o,idx:m}}),w=W.filter(o=>o.data.isSota);let q="";if(w.length>=2){q=`M${w[0].x},${w[0].y}`;for(let o=1;o{const m=o.data.modelName||o.data.paperTitle||"";if(!m)return null;const p=m.length>22?m.slice(0,21)+"…":m,y=p.length*I;let T=o.x-y/2,E=o.x+y/2,v="middle";return Ti-d&&(E=i-d,T=E-y,v="end"),{x:v==="start"?c:v==="end"?i-d:o.x,y:o.y-G,text:p,anchor:v,left:T,right:E}},ee=[],O=w.length>0?z(w[w.length-1]):null;let M=-1/0;for(let o=0;oO.left-N||(M=m.right,ee.push({x:m.x,y:m.y,text:m.text,anchor:m.anchor})))}O&&ee.push({x:O.x,y:O.y,text:O.text,anchor:O.anchor});const U=Ot(k,B),K=5,_=o=>n(m=>m===o?null:m),X=o=>{o&&r(`/paper/${o}`)},Y=(o,m)=>{const y=`${o.data.modelName||o.data.paperTitle||"Unknown model"}: ${le(o.data.value)} on ${o.data.dateLabel}`,T=!!o.data.paperRouteId;return a.jsxs("g",{children:[m,a.jsx("circle",{cx:o.x,cy:o.y,r:"10",fill:"transparent",style:{cursor:T?"pointer":"default",outline:"none"},tabIndex:0,role:T?"link":"img","aria-label":y,onMouseEnter:()=>n(o.idx),onMouseLeave:()=>_(o.idx),onFocus:()=>n(o.idx),onBlur:()=>_(o.idx),onClick:()=>X(o.data.paperRouteId),onKeyDown:E=>{T&&(E.key==="Enter"||E.key===" ")&&(E.preventDefault(),X(o.data.paperRouteId))},children:a.jsx("title",{children:y})})]},o.idx)};return a.jsxs("svg",{width:"100%",viewBox:`0 0 ${i} ${l}`,style:{display:"block"},children:[a.jsx("text",{x:c-38,y:f+S/2,fontSize:"11",fontFamily:"var(--mono)",fill:"var(--ink-faint)",textAnchor:"middle",transform:`rotate(-90 ${c-38} ${f+S/2})`,children:t}),Array.from({length:K}).map((o,m)=>{const p=m/(K-1),y=f+S*(1-p),T=h+C*p;return a.jsxs("g",{children:[a.jsx("line",{x1:c,y1:y,x2:i-d,y2:y,stroke:"var(--hairline)",strokeWidth:"1"}),a.jsx("text",{x:c-10,y:y+4,fontSize:"11",fontFamily:"var(--mono)",fill:"var(--ink-faint)",textAnchor:"end",children:le(T)})]},m)}),U.map(o=>{const m=D(o.timestamp);return a.jsx("text",{x:m,y:l-x+18,fontSize:"11",fontFamily:"var(--mono)",fill:"var(--ink-soft)",textAnchor:"middle",children:o.label},o.key)}),W.filter(o=>!o.data.isSota).map(o=>{const m=s===o.idx;return Y(o,a.jsx("circle",{cx:o.x,cy:o.y,r:m?3:2,fill:"var(--ink-faint)",opacity:m?1:.45,style:{transition:"r 0.12s ease, opacity 0.12s ease"}}))}),q&&a.jsx("path",{d:q,stroke:"var(--accent)",strokeWidth:"2",fill:"none",strokeLinejoin:"round",strokeLinecap:"round"}),w.map(o=>{const m=s===o.idx;return Y(o,a.jsx("circle",{cx:o.x,cy:o.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"}}))}),ee.map((o,m)=>a.jsx("text",{x:o.x,y:o.y,fontSize:"9.5",fontFamily:"var(--mono)",fill:"var(--ink-soft)",textAnchor:o.anchor,pointerEvents:"none",style:{paintOrder:"stroke",stroke:"var(--bg-elevated)",strokeWidth:3,strokeLinejoin:"round"},children:o.text},`label-${m}`)),s!==null&&W[s]&&(()=>{const o=W[s],m=o.data.modelName||o.data.paperTitle||"Unknown model",y=`${m.length>40?m.slice(0,39)+"…":m}: ${le(o.data.value)}`,E=Math.max(120,Math.min(340,y.length*6.6+24)),v=30;let H=o.x-E/2;Hi-d&&(H=i-d-E);const Q=o.y-v-14>=f?o.y-v-12:o.y+12;return a.jsxs("g",{pointerEvents:"none",children:[a.jsx("rect",{x:H,y:Q,width:E,height:v,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:H+12,y:Q+19,fontSize:"12",fontFamily:"var(--sans)",fill:"var(--ink)",fontWeight:500,children:y})]})})()]})};function qt(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"),n=r.createElement("a");return r.head.appendChild(s),r.body.appendChild(n),t&&(s.href=t),n.href=e,n.href}const zt=(()=>{let e=0;const t=()=>`0000${(Math.random()*36**4<<0).toString(36)}`.slice(-4);return()=>(e+=1,`u${t()}${e}`)})();function Z(e){const t=[];for(let r=0,s=e.length;rV||e.height>V)&&(e.width>V&&e.height>V?e.width>e.height?(e.height*=V/e.width,e.width=V):(e.width*=V/e.height,e.height=V):e.width>V?(e.height*=V/e.width,e.width=V):(e.width*=V/e.height,e.height=V))}function Yt(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]),n=s.length,i=new Uint8Array(n);for(let l=0;l{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 Jt(e){return Promise.resolve().then(()=>new XMLSerializer().serializeToString(e)).then(encodeURIComponent).then(t=>`data:image/svg+xml;charset=utf-8,${t}`)}async function Zt(e,t,r){const s="http://www.w3.org/2000/svg",n=document.createElementNS(s,"svg"),i=document.createElementNS(s,"foreignObject");return n.setAttribute("width",`${t}`),n.setAttribute("height",`${r}`),n.setAttribute("viewBox",`0 0 ${t} ${r}`),i.setAttribute("width","100%"),i.setAttribute("height","100%"),i.setAttribute("x","0"),i.setAttribute("y","0"),i.setAttribute("externalResourcesRequired","true"),n.appendChild(i),i.appendChild(e),Jt(n)}const A=(e,t)=>{if(e instanceof t)return!0;const r=Object.getPrototypeOf(e);return r===null?!1:r.constructor.name===t.name||A(r,t)};function er(e){const t=e.getPropertyValue("content");return`${e.cssText} content: '${t.replace(/'|"/g,"")}';`}function tr(e,t){return Je(t).map(r=>{const s=e.getPropertyValue(r),n=e.getPropertyPriority(r);return`${r}: ${s}${n?" !important":""};`}).join(" ")}function rr(e,t,r,s){const n=`.${e}:${t}`,i=r.cssText?er(r):tr(r,s);return document.createTextNode(`${n}{${i}}`)}function Ve(e,t,r,s){const n=window.getComputedStyle(e,r),i=n.getPropertyValue("content");if(i===""||i==="none")return;const l=zt();try{t.className=`${t.className} ${l}`}catch{return}const c=document.createElement("style");c.appendChild(rr(l,r,n,s)),t.appendChild(c)}function ar(e,t,r){Ve(e,t,":before",r),Ve(e,t,":after",r)}const We="application/font-woff",Oe="image/jpeg",sr={woff:We,woff2:We,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:Oe,jpeg:Oe,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml",webp:"image/webp"};function nr(e){const t=/\.([^./]*?)$/g.exec(e);return t?t[1]:""}function ve(e){const t=nr(e).toLowerCase();return sr[t]||""}function ir(e){return e.split(/,/)[1]}function ye(e){return e.search(/^(data:)/)!==-1}function lr(e,t){return`data:${t};base64,${e}`}async function et(e,t,r){const s=await fetch(e,t);if(s.status===404)throw new Error(`Resource "${s.url}" not found`);const n=await s.blob();return new Promise((i,l)=>{const c=new FileReader;c.onerror=l,c.onloadend=()=>{try{i(r({res:s,result:c.result}))}catch(d){l(d)}},c.readAsDataURL(n)})}const be={};function or(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 je(e,t,r){const s=or(e,t,r.includeQueryParams);if(be[s]!=null)return be[s];r.cacheBust&&(e+=(/\?/.test(e)?"&":"?")+new Date().getTime());let n;try{const i=await et(e,r.fetchRequestInit,({res:l,result:c})=>(t||(t=l.headers.get("Content-Type")||""),ir(c)));n=lr(i,t)}catch(i){n=r.imagePlaceholder||"";let l=`Failed to fetch resource: ${e}`;i&&(l=typeof i=="string"?i:i.message),l&&console.warn(l)}return be[s]=n,n}async function cr(e){const t=e.toDataURL();return t==="data:,"?e.cloneNode(!1):he(t)}async function dr(e,t){if(e.currentSrc){const i=document.createElement("canvas"),l=i.getContext("2d");i.width=e.clientWidth,i.height=e.clientHeight,l==null||l.drawImage(e,0,0,i.width,i.height);const c=i.toDataURL();return he(c)}const r=e.poster,s=ve(r),n=await je(r,s,t);return he(n)}async function ur(e,t){var r;try{if(!((r=e==null?void 0:e.contentDocument)===null||r===void 0)&&r.body)return await fe(e.contentDocument.body,t,!0)}catch{}return e.cloneNode(!1)}async function mr(e,t){return A(e,HTMLCanvasElement)?cr(e):A(e,HTMLVideoElement)?dr(e,t):A(e,HTMLIFrameElement)?ur(e,t):e.cloneNode(tt(e))}const hr=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SLOT",tt=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SVG";async function fr(e,t,r){var s,n;if(tt(t))return t;let i=[];return hr(e)&&e.assignedNodes?i=Z(e.assignedNodes()):A(e,HTMLIFrameElement)&&(!((s=e.contentDocument)===null||s===void 0)&&s.body)?i=Z(e.contentDocument.body.childNodes):i=Z(((n=e.shadowRoot)!==null&&n!==void 0?n:e).childNodes),i.length===0||A(e,HTMLVideoElement)||await i.reduce((l,c)=>l.then(()=>fe(c,r)).then(d=>{d&&t.appendChild(d)}),Promise.resolve()),t}function pr(e,t,r){const s=t.style;if(!s)return;const n=window.getComputedStyle(e);n.cssText?(s.cssText=n.cssText,s.transformOrigin=n.transformOrigin):Je(r).forEach(i=>{let l=n.getPropertyValue(i);i==="font-size"&&l.endsWith("px")&&(l=`${Math.floor(parseFloat(l.substring(0,l.length-2)))-.1}px`),A(e,HTMLIFrameElement)&&i==="display"&&l==="inline"&&(l="block"),i==="d"&&t.getAttribute("d")&&(l=`path(${t.getAttribute("d")})`),s.setProperty(i,l,n.getPropertyPriority(i))})}function gr(e,t){A(e,HTMLTextAreaElement)&&(t.innerHTML=e.value),A(e,HTMLInputElement)&&t.setAttribute("value",e.value)}function xr(e,t){if(A(e,HTMLSelectElement)){const r=t,s=Array.from(r.children).find(n=>e.value===n.getAttribute("value"));s&&s.setAttribute("selected","")}}function br(e,t,r){return A(t,Element)&&(pr(e,t,r),ar(e,t,r),gr(e,t),xr(e,t)),t}async function yr(e,t){const r=e.querySelectorAll?e.querySelectorAll("use"):[];if(r.length===0)return e;const s={};for(let i=0;imr(s,t)).then(s=>fr(e,s,t)).then(s=>br(e,s,t)).then(s=>yr(s,t))}const rt=/url\((['"]?)([^'"]+?)\1\)/g,wr=/url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g,vr=/src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;function jr(e){const t=e.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1");return new RegExp(`(url\\(['"]?)(${t})(['"]?\\))`,"g")}function _r(e){const t=[];return e.replace(rt,(r,s,n)=>(t.push(n),r)),t.filter(r=>!ye(r))}async function Sr(e,t,r,s,n){try{const i=r?qt(t,r):t,l=ve(t);let c;return n||(c=await je(i,l,s)),e.replace(jr(t),`$1${c}$3`)}catch{}return e}function kr(e,{preferredFontFormat:t}){return t?e.replace(vr,r=>{for(;;){const[s,,n]=wr.exec(r)||[];if(!n)return"";if(n===t)return`src: ${s};`}}):e}function at(e){return e.search(rt)!==-1}async function st(e,t,r){if(!at(e))return e;const s=kr(e,r);return _r(s).reduce((i,l)=>i.then(c=>Sr(c,l,t,r)),Promise.resolve(s))}async function se(e,t,r){var s;const n=(s=t.style)===null||s===void 0?void 0:s.getPropertyValue(e);if(n){const i=await st(n,null,r);return t.style.setProperty(e,i,t.style.getPropertyPriority(e)),!0}return!1}async function Cr(e,t){await se("background",e,t)||await se("background-image",e,t),await se("mask",e,t)||await se("-webkit-mask",e,t)||await se("mask-image",e,t)||await se("-webkit-mask-image",e,t)}async function Er(e,t){const r=A(e,HTMLImageElement);if(!(r&&!ye(e.src))&&!(A(e,SVGImageElement)&&!ye(e.href.baseVal)))return;const s=r?e.src:e.href.baseVal,n=await je(s,ve(s),t);await new Promise((i,l)=>{e.onload=i,e.onerror=t.onImageErrorHandler?(...d)=>{try{i(t.onImageErrorHandler(...d))}catch(f){l(f)}}:l;const c=e;c.decode&&(c.decode=i),c.loading==="lazy"&&(c.loading="eager"),r?(e.srcset="",e.src=n):e.href.baseVal=n})}async function Nr(e,t){const s=Z(e.childNodes).map(n=>nt(n,t));await Promise.all(s).then(()=>e)}async function nt(e,t){A(e,Element)&&(await Cr(e,t),await Er(e,t),await Nr(e,t))}function Rr(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(n=>{r[n]=s[n]}),e}const Ue={};async function qe(e){let t=Ue[e];if(t!=null)return t;const s=await(await fetch(e)).text();return t={url:e,cssText:s},Ue[e]=t,t}async function ze(e,t){let r=e.cssText;const s=/url\(["']?([^"')]+)["']?\)/g,i=(r.match(/url\([^)]+\)/g)||[]).map(async l=>{let c=l.replace(s,"$1");return c.startsWith("https://")||(c=new URL(c,e.url).href),et(c,t.fetchRequestInit,({result:d})=>(r=r.replace(l,`url(${d})`),[l,d]))});return Promise.all(i).then(()=>r)}function Ke(e){if(e==null)return[];const t=[],r=/(\/\*[\s\S]*?\*\/)/gi;let s=e.replace(r,"");const n=new RegExp("((@.*?keyframes [\\s\\S]*?){([\\s\\S]*?}\\s*?)})","gi");for(;;){const d=n.exec(s);if(d===null)break;t.push(d[0])}s=s.replace(n,"");const i=/@import[\s\S]*?url\([^)]*\)[\s\S]*?;/gi,l="((\\s*?(?:\\/\\*[\\s\\S]*?\\*\\/)?\\s*?@media[\\s\\S]*?){([\\s\\S]*?)}\\s*?})|(([\\s\\S]*?){([\\s\\S]*?)})",c=new RegExp(l,"gi");for(;;){let d=i.exec(s);if(d===null){if(d=c.exec(s),d===null)break;i.lastIndex=c.lastIndex}else c.lastIndex=i.lastIndex;t.push(d[0])}return t}async function Pr(e,t){const r=[],s=[];return e.forEach(n=>{if("cssRules"in n)try{Z(n.cssRules||[]).forEach((i,l)=>{if(i.type===CSSRule.IMPORT_RULE){let c=l+1;const d=i.href,f=qe(d).then(x=>ze(x,t)).then(x=>Ke(x).forEach(u=>{try{n.insertRule(u,u.startsWith("@import")?c+=1:n.cssRules.length)}catch(h){console.error("Error inserting rule from remote css",{rule:u,error:h})}})).catch(x=>{console.error("Error loading remote css",x.toString())});s.push(f)}})}catch(i){const l=e.find(c=>c.href==null)||document.styleSheets[0];n.href!=null&&s.push(qe(n.href).then(c=>ze(c,t)).then(c=>Ke(c).forEach(d=>{l.insertRule(d,l.cssRules.length)})).catch(c=>{console.error("Error loading remote stylesheet",c)})),console.error("Error inlining remote css file",i)}}),Promise.all(s).then(()=>(e.forEach(n=>{if("cssRules"in n)try{Z(n.cssRules||[]).forEach(i=>{r.push(i)})}catch(i){console.error(`Error while reading CSS rules from ${n.href}`,i)}}),r))}function Tr(e){return e.filter(t=>t.type===CSSRule.FONT_FACE_RULE).filter(t=>at(t.style.getPropertyValue("src")))}async function Mr(e,t){if(e.ownerDocument==null)throw new Error("Provided element is not within a Document");const r=Z(e.ownerDocument.styleSheets),s=await Pr(r,t);return Tr(s)}function it(e){return e.trim().replace(/["']/g,"")}function $r(e){const t=new Set;function r(s){(s.style.fontFamily||getComputedStyle(s).fontFamily).split(",").forEach(i=>{t.add(it(i))}),Array.from(s.children).forEach(i=>{i instanceof HTMLElement&&r(i)})}return r(e),t}async function Fr(e,t){const r=await Mr(e,t),s=$r(e);return(await Promise.all(r.filter(i=>s.has(it(i.style.fontFamily))).map(i=>{const l=i.parentStyleSheet?i.parentStyleSheet.href:null;return st(i.cssText,l,t)}))).join(` `)}async function Lr(e,t){const r=t.fontEmbedCSS!=null?t.fontEmbedCSS:t.skipFonts?null:await Fr(e,t);if(r){const s=document.createElement("style"),n=document.createTextNode(r);s.appendChild(n),e.firstChild?e.insertBefore(s,e.firstChild):e.appendChild(s)}}async function Ir(e,t={}){const{width:r,height:s}=Ze(e,t),n=await fe(e,t,!0);return await Lr(n,t),await nt(n,t),Rr(n,t),await Zt(n,r,s)}async function Ar(e,t={}){const{width:r,height:s}=Ze(e,t),n=await Ir(e,t),i=await he(n),l=document.createElement("canvas"),c=l.getContext("2d"),d=t.pixelRatio||Gt(),f=t.canvasWidth||r,x=t.canvasHeight||s;return l.width=f*d,l.height=x*d,t.skipAutoScale||Xt(l),l.style.width=`${f}`,l.style.height=`${x}`,t.backgroundColor&&(c.fillStyle=t.backgroundColor,c.fillRect(0,0,l.width,l.height)),c.drawImage(i,0,0,l.width,l.height),l}async function Br(e,t={}){const r=await Ar(e,t);return await Yt(r)}const we="#ffffff";function Dr(){return typeof window>"u"?we:window.getComputedStyle(document.documentElement).getPropertyValue("--bg-elevated").trim()||we}function Hr(e){if(typeof window>"u")return we;const t=window.getComputedStyle(e).backgroundColor;return!t||t==="rgba(0, 0, 0, 0)"||t==="transparent"?Dr():t}async function Vr(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 Br(e,{pixelRatio:2,cacheBust:!0,backgroundColor:Hr(e)});if(!t)throw new Error("Failed to render screenshot.");await window.navigator.clipboard.write([new window.ClipboardItem({"image/png":t})])}const lt=({targetRef:e,label:t})=>{const{toast:r}=ut(),[s,n]=L.useState("idle"),i=L.useRef(null);L.useEffect(()=>()=>{i.current!==null&&window.clearTimeout(i.current)},[]);const l=L.useCallback(async()=>{const d=e.current;if(d){n("copying"),d.classList.add("is-capturing"),d.offsetHeight,await new Promise(f=>window.requestAnimationFrame(()=>f()));try{await Vr(d),n("copied"),r({title:"Screenshot copied",description:`Image of the ${t} copied to your clipboard.`}),i.current!==null&&window.clearTimeout(i.current),i.current=window.setTimeout(()=>n("idle"),1500)}catch(f){n("idle"),r({title:"Copy failed",description:f instanceof Error&&f.message?f.message:"Could not copy the screenshot to your clipboard.",variant:"destructive"})}finally{d.classList.remove("is-capturing")}}},[e,t,r]),c=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(wt,{name:"copy",size:11}),c]})};function Wr({model:e,datasetName:t,hideClosed:r,setHideClosed:s,setMetric:n}){const i=L.useRef(null),{isInitialFilteredViewLoading:l,chartPoints:c,activeMetric:d,allowedMetrics:f,orderedMetrics:x,parameterBound:u}=e;return l||c.length===0?null:a.jsxs("div",{className:"bm-card",ref:i,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:[f.length>1&&a.jsxs("label",{className:"bm-view-select",children:[a.jsx("span",{className:"bm-view-select-label",children:"View"}),a.jsx("select",{value:d,onChange:h=>n(h.target.value),children:x.map(h=>a.jsx("option",{value:h,children:h},h))})]}),a.jsxs("label",{className:"bm-closed-toggle",title:"Show or hide evaluations of closed-source models",children:[a.jsx(Ge,{className:"bm-closed-toggle-switch",checked:!r,onCheckedChange:h=>{s(!h)},"aria-label":"Show closed-source models"}),a.jsx("span",{className:"bm-closed-toggle-label",children:"Closed-source"})]}),a.jsx(lt,{targetRef:i,label:"SOTA chart"})]})]}),a.jsx("div",{className:"bm-chart-wrap",children:a.jsx(Ut,{points:c,metric:d})}),a.jsxs("div",{className:"bm-chart-foot",children:[a.jsx("span",{className:"legend-dot"}),u===void 0?"All models":"Filtered models"," over time · highlighted dots track the running best · hover for the model · click to open the paper"]})]})}function Or(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 Qe(e,t){return e?a.jsx(ce,{title:e}):t||"—"}const ma=()=>{var _e,Se,ke,Ce,Ee,Ne,Re,Pe,Te,Me,$e;const{datasetSlug:e}=mt(),[t,r]=ht(),s=t.get("task")||void 0,n=t.get("eval")||void 0,i=Nt(t.get("max_parameters_exclusive")),{preferences:l,setHideClosedSourceEvals:c}=yt(),d=L.useRef(null),f=L.useRef(!1),x=L.useRef(null),[u,h]=L.useState(null),R=`${e}:${s||""}`,C=u===R,[P,S]=L.useState(1),g=te({queryKey:[...de.dataset(e),"with-paper",s,l.hide_closed_source_evals?"open":"all"],queryFn:()=>re.getDatasetBySlug(e,{include_paper:!0,task:s,is_open:l.hide_closed_source_evals?!0:void 0}),enabled:!!e,staleTime:oe}),k=te({queryKey:ft.byDataset((_e=g.data)==null?void 0:_e.id),queryFn:()=>bt.byDataset(g.data.id),enabled:!!((Se=g.data)!=null&&Se.id),staleTime:5*60*1e3}),B=te({queryKey:[...de.datasetTasks,(ke=g.data)==null?void 0:ke.id],queryFn:()=>re.datasetTasks(g.data.id),enabled:!!((Ce=g.data)!=null&&Ce.id),staleTime:oe}),j=te({queryKey:["metric-directions"],queryFn:()=>re.metricDirections(),staleTime:60*60*1e3}),D=Ye(B.data||[],k.data||[],s,n),W=te({queryKey:[...de.taskBenchmarkTrends,D,l.hide_closed_source_evals?!0:void 0],queryFn:()=>re.trendingBenchmarks(D,{limit:100,min_recent_papers:0,is_open:l.hide_closed_source_evals?!0:void 0}),enabled:!!D&&!!((Ee=g.data)!=null&&Ee.id),staleTime:oe}),w=L.useMemo(()=>{var b;return(((b=W.data)==null?void 0:b.results)||[]).find($=>{var F;return $.id===((F=g.data)==null?void 0:F.id)})||null},[W.data,(Ne=g.data)==null?void 0:Ne.id]),q=te({queryKey:["leaderboard-metrics",(Re=g.data)==null?void 0:Re.id,D],queryFn:()=>re.leaderboardMetrics(g.data.id,D),enabled:!!((Pe=g.data)!=null&&Pe.id)&&!!D,staleTime:oe}),I=Bt({evaluations:k.data||[],tasks:B.data||[],configuredMetrics:q.data||[],directions:j.data,initialSummary:(Te=g.data)==null?void 0:Te.leaderboard_summary,taskSlug:s,highlightEvalId:n,metric:t.get("metric")||void 0,hideClosed:l.hide_closed_source_evals,parameterBound:i,showMoreMetrics:C,fittingMetricCount:P,ready:{evaluations:k.isSuccess,tasks:B.isSuccess,directions:j.isSuccess,metrics:q.isSuccess}}),{primaryTask:N,hiddenClosedEvals:G,hiddenClosedTopEval:z,isSummaryLoading:ee,displayedMetric:O,displayedSota:M,displayedSotaModel:U,isInitialFilteredViewLoading:K,highlightedEval:_,hasParameterMetadata:X,parameterCoverage:Y,orderedMetrics:o}=I;L.useEffect(()=>{if(f.current||!n||!k.data||k.data.length===0)return;const b=d.current;b&&(f.current=!0,b.scrollIntoView({behavior:"smooth",block:"start"}))},[n,k.data]);const m=te({queryKey:de.area(N==null?void 0:N.area_id),queryFn:()=>re.getArea(N.area_id),enabled:!!(N!=null&&N.area_id),staleTime:oe});if(g.isLoading)return a.jsxs("div",{className:"page",children:[a.jsx(ue,{className:"h-12 w-1/2 mb-6"}),a.jsx(ue,{className:"h-64 w-full"})]});if(Ct(g.error))return a.jsx(Et,{});if(g.error||!g.data)return a.jsx("div",{className:"page",children:a.jsx(vt,{variant:"destructive",children:a.jsx(jt,{children:"Benchmark not found."})})});const p=g.data,y=!!p.supports_harness,T=b=>{r($=>{const F=new URLSearchParams($);return b===void 0?F.delete("max_parameters_exclusive"):F.set("max_parameters_exclusive",String(b)),F})},E=b=>{r($=>{const F=new URLSearchParams($);return F.set("metric",b),F})},v=p.introducing_paper??void 0,H=(v==null?void 0:v.arxiv_id)||(v==null?void 0:v.id)||Or(p.paper_url),J=(v==null?void 0:v.title)||p.introducing_paper_title||null,Q=((Me=v==null?void 0:v.published)==null?void 0:Me.slice(0,4))||p.introduced_year||null,ot=!!H||!!p.paper_url||!!J,ct=v!=null&&v.arxiv_id||($e=p.paper_url)!=null&&$e.match(/^https?:\/\/(?:www\.)?arxiv\.org\//i)?`arXiv:${H}`:`Paper ${H}`;return a.jsx("div",{className:"page",children:a.jsxs("div",{className:"bm-page",children:[a.jsxs("div",{className:"breadcrumb",children:[a.jsx(ne,{to:"/tasks",children:"Tasks"}),m.data&&a.jsxs(a.Fragment,{children:[a.jsx("span",{className:"sep",children:"/"}),a.jsx(ne,{to:`/tasks#area-${kt(m.data.name)}`,children:m.data.name})]}),N&&a.jsxs(a.Fragment,{children:[a.jsx("span",{className:"sep",children:"/"}),a.jsx(ne,{to:`/tasks/${N.slug||N.id}`,children:N.name})]}),a.jsx("span",{className:"sep",children:"/"}),a.jsx("span",{style:{color:"var(--accent-text)"},children:p.name})]}),a.jsxs("div",{className:"bm-title-row",children:[a.jsx("h1",{className:"bm-title",children:p.name}),w&&a.jsxs("div",{className:"bm-title-trend","aria-label":`${p.name} reporting trend`,children:[a.jsx(_t,{history:w.history,benchmarkName:w.name}),a.jsxs("span",{className:"bm-title-trend-summary",children:[a.jsx("strong",{children:w.recent_paper_count})," ",w.recent_paper_count===1?"paper":"papers",w.rate_change==null?w.recent_paper_count>0&&a.jsx("span",{className:"benchmark-trend-change is-new",children:"new"}):a.jsxs("span",{className:`benchmark-trend-change ${w.rate_change>=1?"is-up":"is-down"}`,children:[w.rate_change>=1?"↑":"↓"," ",w.rate_change.toFixed(1),"×"]})]})]})]}),a.jsx(pt,{kind:"benchmark",entityId:p.id}),a.jsxs("div",{className:"bm-subtitle",children:[ee?a.jsx(ue,{className:"h-5 w-64 bm-summary-skeleton","aria-label":"Loading benchmark summary"}):a.jsxs("span",{children:[O&&a.jsxs(a.Fragment,{children:[a.jsx("span",{className:"metric-tag",children:O}),a.jsx("span",{style:{color:"var(--hairline-strong)",margin:"0 8px"},children:"·"})]}),U?a.jsxs("span",{children:["Best: ",a.jsx("span",{className:"best-name",children:le(M)})," by ",a.jsx("span",{className:"best-name",style:{fontStyle:"normal"},children:U})]}):a.jsxs("span",{children:[I.rows.length," evaluations"]})]}),p.hf_url&&a.jsxs("a",{className:"bm-action-btn",href:p.hf_url,target:"_blank",rel:"noopener noreferrer",children:[a.jsx("span",{"aria-hidden":"true",children:"🤗"})," View on Hugging Face"]})]}),p.description&&a.jsx("p",{className:"bm-description",children:p.description}),l.hide_closed_source_evals&&G.length>0&&a.jsxs("div",{className:"bm-hidden-closed-notice",children:[a.jsxs("span",{children:[G.length," closed-source ",G.length===1?"row is":"rows are"," hidden",z!=null&&z.model_name?a.jsxs(a.Fragment,{children:[", including ",a.jsx("strong",{children:z.model_name})]}):null,"."]}),a.jsx("button",{type:"button",className:"bm-hidden-closed-action",onClick:()=>{c(!1)},children:"Show closed-source"})]}),ot&&a.jsxs("div",{className:"method-source",style:{marginTop:0,marginBottom:18},children:[a.jsx("span",{className:"method-source-label",children:"Source"}),H?a.jsxs(ne,{to:`/paper/${H}`,target:"_blank",rel:"noopener noreferrer",className:"method-source-link",children:[a.jsx("span",{className:"method-source-title",children:J?a.jsx(ce,{title:J}):ct}),Q&&a.jsx("span",{className:"method-source-meta",children:Q})]}):p.paper_url?a.jsxs("a",{href:St(p.paper_url)??void 0,target:"_blank",rel:"noopener noreferrer",className:"method-source-link",children:[a.jsx("span",{className:"method-source-title",children:J?a.jsx(ce,{title:J}):p.paper_url}),Q&&a.jsx("span",{className:"method-source-meta",children:Q})]}):a.jsxs("div",{className:"method-source-link is-static",children:[a.jsx("span",{className:"method-source-title",children:J?a.jsx(ce,{title:J}):null}),Q&&a.jsx("span",{className:"method-source-meta",children:Q})]})]}),a.jsx(Wr,{model:I,datasetName:p.name,hideClosed:l.hide_closed_source_evals,setHideClosed:c,setMetric:E}),_&&(()=>{var Le,Ie;const b=_.paper_arxiv_id||_.paper_id,$=_.paper_title||(_.paper_arxiv_id?`arXiv:${_.paper_arxiv_id}`:null),F=_.best_metric&&((Le=_.metrics)==null?void 0:Le[_.best_metric])!==void 0?_.best_metric:I.activeMetric,Fe=(Ie=_.metrics)==null?void 0:Ie[F];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:[_.model_name||$||"—",_.harness?` · ${_.harness}`:""]}),a.jsxs("span",{className:"bm-highlight-meta",children:[Fe!==void 0&&F?a.jsxs(a.Fragment,{children:[F,": ",le(Fe),$?" · ":""]}):null,b?a.jsx(ne,{to:`/paper/${b}`,children:Qe(_.paper_title,$)}):Qe(_.paper_title,$)]})]})]})})(),a.jsxs("div",{className:"bm-card",ref:x,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:p.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:[I.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:I.activeMetric,onChange:b=>E(b.target.value),children:o.map(b=>a.jsx("option",{value:b,children:b},b))})]}),a.jsxs("label",{className:"bm-closed-toggle",title:"Show or hide evaluations of closed-source models",children:[a.jsx(Ge,{className:"bm-closed-toggle-switch",checked:!l.hide_closed_source_evals,onCheckedChange:b=>{c(!b)},"aria-label":"Show closed-source models"}),a.jsx("span",{className:"bm-closed-toggle-label",children:"Closed-source"})]}),!K&&!X&&k.isSuccess?a.jsx("span",{className:"bm-parameter-unavailable",children:"Parameter metadata unavailable"}):null,a.jsx(lt,{targetRef:x,label:"leaderboard"})]})]}),!K&&X&&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:I.parameterFilters.map(b=>{const{selected:$,disabled:F}=b;return a.jsx("button",{type:"button",className:`bm-parameter-filter-option${$?" is-active":""}`,"aria-pressed":$,disabled:F,onClick:()=>T(b.maxParametersExclusive),children:b.label},b.label)})}),a.jsxs("span",{className:"bm-parameter-coverage",children:["Parameters known for ",Y.parameter_coverage_known," of ",Y.parameter_coverage_total," entries"]})]}),k.isLoading||K?a.jsx("div",{style:{padding:16},children:Array.from({length:5}).map((b,$)=>a.jsx(ue,{className:"h-10 w-full mb-2"},$))}):I.rows.length===0?i?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:()=>T(void 0),children:"Show all"})]}):a.jsx("div",{className:"no-results",children:"No evaluations submitted yet."}):a.jsxs(a.Fragment,{children:[o.length>P&&a.jsxs("div",{className:"bm-metric-columns-control",children:[a.jsx("button",{type:"button",className:"bm-metric-columns-toggle","aria-expanded":C,"aria-controls":"benchmark-leaderboard",onClick:()=>h(C?null:R),children:C?"Show fewer metrics":`Show more metrics (${o.length-P})`}),C&&a.jsx("span",{children:"Scroll metrics horizontally; model and paper details stay visible."})]}),a.jsx(Wt,{model:I,showHarness:y,setMetric:E,highlightRowRef:d,onFittingMetricCountChange:S})]})]})]})})};export{ma as default}; diff --git a/assets/BenchmarkTrendSparkline-Dfex1cLI.js b/assets/BenchmarkTrendSparkline-dQdt-ejq.js similarity index 97% rename from assets/BenchmarkTrendSparkline-Dfex1cLI.js rename to assets/BenchmarkTrendSparkline-dQdt-ejq.js index a5f87e6ef8ee26a0ed480b6b2e7d29a86169af7e..831dfe3f3832c40feed207e55a6b4bc858e9287d 100644 --- a/assets/BenchmarkTrendSparkline-Dfex1cLI.js +++ b/assets/BenchmarkTrendSparkline-dQdt-ejq.js @@ -1 +1 @@ -import{d as C,j as t}from"./index-CjdUkE4w.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}; +import{d as C,j as t}from"./index-CHGpuh10.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}; diff --git a/assets/CatalogEntityPreviewLink-DY_jhXy9.js b/assets/CatalogEntityPreviewLink-C5CxvSnT.js similarity index 97% rename from assets/CatalogEntityPreviewLink-DY_jhXy9.js rename to assets/CatalogEntityPreviewLink-C5CxvSnT.js index be72fdcc5d40746aef417a73592b36332c592374..c59d2b9e7d2f3fc3ba434fefd3b1768657be69ae 100644 --- a/assets/CatalogEntityPreviewLink-DY_jhXy9.js +++ b/assets/CatalogEntityPreviewLink-C5CxvSnT.js @@ -1,4 +1,4 @@ -import{s as m,a5 as h,V as d,b as g,j as s,L as f,a3 as k}from"./index-CjdUkE4w.js";import{H as w,a as y,b as v}from"./hover-card-CIBIV2Hx.js";import{c as l}from"./catalog-qXcKve0z.js";/** +import{s as m,a5 as h,V as d,b as g,j as s,L as f,a3 as k}from"./index-CHGpuh10.js";import{H as w,a as y,b as v}from"./hover-card-Dz7z6DCn.js";import{c as l}from"./catalog-DMzmJg__.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/ChatView-DeilSeCH.js b/assets/ChatView-BYQGLYvv.js similarity index 98% rename from assets/ChatView-DeilSeCH.js rename to assets/ChatView-BYQGLYvv.js index a2b5b59ff63d644fa8ef567d5c60ebc237e65dff..b84af0d59c1fcc4bc2e2dbc40ba7b41022903290 100644 --- a/assets/ChatView-DeilSeCH.js +++ b/assets/ChatView-BYQGLYvv.js @@ -1,4 +1,4 @@ -var It=Object.defineProperty;var Nt=(t,e,r)=>e in t?It(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var se=(t,e,r)=>Nt(t,typeof e!="symbol"?e+"":e,r);import{s as Dt,d as l,j as s,X as yt,x as bt,b as Re,L as wt,_ as Lt,$ as Ft,a0 as Pt,a1 as nt,V as Oe,g as vt,e as St,q as _t,i as xt,h as Bt,a as Et,u as Ot,A as qt}from"./index-CjdUkE4w.js";import{C as Ut,U as at,b as Ht,f as Ce,A as Wt,a as zt,c as Kt,g as Qt,h as Vt,i as Pe,j as Yt,k as it,t as $t,l as Gt,E as Xt,m as Jt,n as Zt,o as ot}from"./chatLifecycle-B6B3Dpfi.js";import{g as Ie,h as es,j as Ct,k as ts,T as ss,e as Rt,l as Te,m as We,r as rs,n as ns,o as oe,D as ze,s as as,t as is,v as os,w as cs,x as ls,y as us,z as ds,B as hs,C as ps,E as Xe,F as fs,G as ct,H as jt,I as lt,J as Ke,f as ms,K as gs,L as ys,M as At,N as bs,O as ws,Q as vs,R as Ss,S as _s}from"./chatSessions-9VEG8seW.js";import{M as xs}from"./McpShowcase-Bo79ATLK.js";import{c as ce}from"./chat-B1EBF720.js";import{S as Es}from"./share-2-Nvga0TP8.js";import{u as qe}from"./useMutation-BYtVrkc7.js";import{u as Cs,O as Rs}from"./openrouter-B-ghWDkd.js";/* empty css */import"./hover-card-CIBIV2Hx.js";import"./CatalogEntityPreviewLink-DY_jhXy9.js";import"./catalog-qXcKve0z.js";import"./github-4bW4WI_e.js";import"./file-text-CHlxsNJC.js";import"./PaperPreviewLink-zGfFNaz6.js";import"./index-tLcwYp0U.js";import"./index-Dj6aE-6E.js";import"./katex-DkKDou_j.js";import"./papers-DgZwjF3K.js";import"./curation-CyyuHfv5.js";import"./thumbs-up-Dn_5H93T.js";import"./copy-SoF5zg-g.js";import"./queryOptions-C9woPjwX.js";import"./arrow-left-CkQb0MI4.js";import"./external-link-CTLWFJ8S.js";import"./plus-AztI1566.js";import"./search-DxMn7VKI.js";import"./chevron-up-BwiJ46dh.js";import"./AuthorAvatar-D9249Frl.js";import"./AgentLogos-xoTIu0NB.js";/** +var It=Object.defineProperty;var Nt=(t,e,r)=>e in t?It(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var se=(t,e,r)=>Nt(t,typeof e!="symbol"?e+"":e,r);import{s as Dt,d as l,j as s,X as yt,x as bt,b as Re,L as wt,_ as Lt,$ as Ft,a0 as Pt,a1 as nt,V as Oe,g as vt,e as St,q as _t,i as xt,h as Bt,a as Et,u as Ot,A as qt}from"./index-CHGpuh10.js";import{C as Ut,U as at,b as Ht,f as Ce,A as Wt,a as zt,c as Kt,g as Qt,h as Vt,i as Pe,j as Yt,k as it,t as $t,l as Gt,E as Xt,m as Jt,n as Zt,o as ot}from"./chatLifecycle-Bdz7bFwH.js";import{g as Ie,h as es,j as Ct,k as ts,T as ss,e as Rt,l as Te,m as We,r as rs,n as ns,o as oe,D as ze,s as as,t as is,v as os,w as cs,x as ls,y as us,z as ds,B as hs,C as ps,E as Xe,F as fs,G as ct,H as jt,I as lt,J as Ke,f as ms,K as gs,L as ys,M as At,N as bs,O as ws,Q as vs,R as Ss,S as _s}from"./chatSessions-BuiIkSLS.js";import{M as xs}from"./McpShowcase-D5BEHBL4.js";import{c as ce}from"./chat-CuiFt2kN.js";import{S as Es}from"./share-2-8l7A6ayI.js";import{u as qe}from"./useMutation-3fOqWcpt.js";import{u as Cs,O as Rs}from"./openrouter-CqtCKiJB.js";/* empty css */import"./hover-card-Dz7z6DCn.js";import"./CatalogEntityPreviewLink-C5CxvSnT.js";import"./catalog-DMzmJg__.js";import"./github-CRId1LT2.js";import"./file-text-DPLtNP9U.js";import"./PaperPreviewLink-CPkn2Kqv.js";import"./index-B141zdPU.js";import"./index-BzjqtLRb.js";import"./katex-DkKDou_j.js";import"./papers-BPpxs2sO.js";import"./curation-DI9_zYNx.js";import"./thumbs-up-BGuynS0P.js";import"./copy-CvlL053K.js";import"./queryOptions-C9woPjwX.js";import"./arrow-left-C11GHdHp.js";import"./external-link-CeQVHd7V.js";import"./plus-CYgr1KdS.js";import"./search-Czb1C2Q7.js";import"./chevron-up-BnyqTe42.js";import"./AuthorAvatar-fJxhX3fO.js";import"./AgentLogos-PqR86_NK.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/ConferenceDetailView-CujSkc9V.js b/assets/ConferenceDetailView-BEtffUKD.js similarity index 82% rename from assets/ConferenceDetailView-CujSkc9V.js rename to assets/ConferenceDetailView-BEtffUKD.js index f6b368431eed2315fc2e8a6f9a09a5821e29d640..96ad54e6c4ffa75aed9908fafb49d8175753cfeb 100644 --- a/assets/ConferenceDetailView-CujSkc9V.js +++ b/assets/ConferenceDetailView-BEtffUKD.js @@ -1 +1 @@ -import{u as y,b as k,d as _,j as e,L as h,T as S}from"./index-CjdUkE4w.js";import{a as f,A as b,b as E}from"./AreaSection-iYSRoy6-.js";import{M as j}from"./MarkdownText-MrITlqRE.js";import{c as A}from"./catalog-qXcKve0z.js";import{i as C}from"./apiErrors-D0w5By9R.js";import{s as F}from"./areas-Dvi8w2dp.js";import{c as T,h as L}from"./colors-BkWRhvFI.js";import{C as $}from"./conferenceListings-BnmhBx-_.js";import{f as w}from"./deadlines-BH32v7D1.js";import{d as D}from"./transform-CRNzYLch.js";import{S as P}from"./skeleton-DTWi7Ctg.js";import{A as M,a as R}from"./alert-BM9Xfuyy.js";import{s as B}from"./safeExternalHref-CkBrsh84.js";import I from"./NotFound-BeWhm9El.js";/* empty css */import"./PaperPreviewLink-zGfFNaz6.js";import"./index-tLcwYp0U.js";import"./index-Dj6aE-6E.js";import"./katex-DkKDou_j.js";import"./hover-card-CIBIV2Hx.js";import"./papers-DgZwjF3K.js";import"./curation-CyyuHfv5.js";import"./useMutation-BYtVrkc7.js";const ce=()=>{var g,x;const{confSlug:o}=y(),t=k({queryKey:["conference-areas-with-tasks",o],queryFn:()=>A.conferenceAreasWithTasks(o),enabled:!!o,staleTime:S}),m=_.useMemo(()=>{var a;return F(((a=t.data)==null?void 0:a.results)??[])},[t.data]),s=(g=t.data)==null?void 0:g.conference,d=((x=t.data)==null?void 0:x.total_paper_count)??0,N=$.filter(a=>{var r;return(((r=t.data)==null?void 0:r[a.countKey])??0)>0});if(C(t.error))return e.jsx(I,{});if(t.error)return e.jsx("div",{className:"page",children:e.jsx(M,{variant:"destructive",children:e.jsx(R,{children:"Failed to load conference. Please try again."})})});const p=s?w(s.start_date,s.end_date):null,u=s?[s.venue,s.location].filter(Boolean).join(", "):null,n=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:n??e.jsx(P,{className:"h-10 w-64 inline-block"})}),e.jsxs("div",{className:"feed-subtitle",style:{display:"flex",flexDirection:"column",gap:4},children:[p&&e.jsx("span",{children:p}),u&&e.jsx("span",{children:u}),(s==null?void 0:s.url)&&e.jsx("a",{href:B(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(j,{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:n?`${n} visual`:"Conference visual",onError:a=>{var r,c;(c=(r=a.currentTarget.parentElement)==null?void 0:r.parentElement)==null||c.style.setProperty("display","none")}})}),e.jsxs("figcaption",{children:["Figure · ",n??"Conference",s.image_credit&&e.jsxs(e.Fragment,{children:[e.jsx("br",{}),e.jsx(j,{className:"task-image-credit",text:s.image_credit})]})]})]})]}),!t.isLoading&&d>0&&e.jsx(f,{title:"Browse papers",description:"All accepted papers, plus oral, spotlight, outstanding, and best paper finalists.",meta:`${d.toLocaleString()} papers`,style:{marginTop:48},children:N.map(a=>{var r;return e.jsxs(h,{to:`/conferences/${o}/${a.slug}`,className:"tag-cell",children:[e.jsxs("div",{className:"name",children:[e.jsx("span",{className:"dot",style:{background:a.dotColor}}),a.label]}),e.jsx("div",{className:"meta",children:e.jsxs("span",{children:[(((r=t.data)==null?void 0:r[a.countKey])??0).toLocaleString()," papers"]})})]},a.slug)})}),t.isLoading?e.jsx(b,{tiles:6,tileClassName:"h-24"}):m.map(a=>{const r=a.tasks;if(r.length===0)return null;const c=r.reduce((i,l)=>i+(l.paper_count||0),0);return e.jsx(f,{title:a.name,description:a.description,meta:`${r.length} ${r.length===1?"task":"tasks"} · ${c.toLocaleString()} papers`,children:r.map(i=>{const l=i.slug||"",v=T(L(l));return e.jsxs(h,{to:`/conferences/${o}/${l}`,className:"tag-cell",children:[e.jsxs("div",{className:"name",children:[e.jsx("span",{className:"dot",style:{background:v.dot}}),D(i.name,l)]}),e.jsx("div",{className:"meta",children:e.jsxs("span",{children:[(i.paper_count??0).toLocaleString()," papers"]})})]},i.id)})},a.id)}),e.jsx(E,{areas:m})]})};export{ce as default}; +import{u as y,b as k,d as _,j as e,L as h,T as S}from"./index-CHGpuh10.js";import{a as f,A as b,b as E}from"./AreaSection-BVX3JiNc.js";import{M as j}from"./MarkdownText-D0AGKKJ1.js";import{c as A}from"./catalog-DMzmJg__.js";import{i as C}from"./apiErrors-CvxFAcrW.js";import{s as F}from"./areas-Dvi8w2dp.js";import{c as T,h as L}from"./colors-BkWRhvFI.js";import{C as $}from"./conferenceListings-BnmhBx-_.js";import{f as w}from"./deadlines-BH32v7D1.js";import{d as D}from"./transform-Cs8_lTDx.js";import{S as P}from"./skeleton-Df0GaMuw.js";import{A as M,a as R}from"./alert-DPvmCXZT.js";import{s as B}from"./safeExternalHref-CkBrsh84.js";import I from"./NotFound-Bc6y0g0J.js";/* empty css */import"./PaperPreviewLink-CPkn2Kqv.js";import"./index-B141zdPU.js";import"./index-BzjqtLRb.js";import"./katex-DkKDou_j.js";import"./hover-card-Dz7z6DCn.js";import"./papers-BPpxs2sO.js";import"./curation-DI9_zYNx.js";import"./useMutation-3fOqWcpt.js";const ce=()=>{var g,x;const{confSlug:o}=y(),t=k({queryKey:["conference-areas-with-tasks",o],queryFn:()=>A.conferenceAreasWithTasks(o),enabled:!!o,staleTime:S}),m=_.useMemo(()=>{var a;return F(((a=t.data)==null?void 0:a.results)??[])},[t.data]),s=(g=t.data)==null?void 0:g.conference,d=((x=t.data)==null?void 0:x.total_paper_count)??0,N=$.filter(a=>{var r;return(((r=t.data)==null?void 0:r[a.countKey])??0)>0});if(C(t.error))return e.jsx(I,{});if(t.error)return e.jsx("div",{className:"page",children:e.jsx(M,{variant:"destructive",children:e.jsx(R,{children:"Failed to load conference. Please try again."})})});const p=s?w(s.start_date,s.end_date):null,u=s?[s.venue,s.location].filter(Boolean).join(", "):null,n=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:n??e.jsx(P,{className:"h-10 w-64 inline-block"})}),e.jsxs("div",{className:"feed-subtitle",style:{display:"flex",flexDirection:"column",gap:4},children:[p&&e.jsx("span",{children:p}),u&&e.jsx("span",{children:u}),(s==null?void 0:s.url)&&e.jsx("a",{href:B(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(j,{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:n?`${n} visual`:"Conference visual",onError:a=>{var r,c;(c=(r=a.currentTarget.parentElement)==null?void 0:r.parentElement)==null||c.style.setProperty("display","none")}})}),e.jsxs("figcaption",{children:["Figure · ",n??"Conference",s.image_credit&&e.jsxs(e.Fragment,{children:[e.jsx("br",{}),e.jsx(j,{className:"task-image-credit",text:s.image_credit})]})]})]})]}),!t.isLoading&&d>0&&e.jsx(f,{title:"Browse papers",description:"All accepted papers, plus oral, spotlight, outstanding, and best paper finalists.",meta:`${d.toLocaleString()} papers`,style:{marginTop:48},children:N.map(a=>{var r;return e.jsxs(h,{to:`/conferences/${o}/${a.slug}`,className:"tag-cell",children:[e.jsxs("div",{className:"name",children:[e.jsx("span",{className:"dot",style:{background:a.dotColor}}),a.label]}),e.jsx("div",{className:"meta",children:e.jsxs("span",{children:[(((r=t.data)==null?void 0:r[a.countKey])??0).toLocaleString()," papers"]})})]},a.slug)})}),t.isLoading?e.jsx(b,{tiles:6,tileClassName:"h-24"}):m.map(a=>{const r=a.tasks;if(r.length===0)return null;const c=r.reduce((i,l)=>i+(l.paper_count||0),0);return e.jsx(f,{title:a.name,description:a.description,meta:`${r.length} ${r.length===1?"task":"tasks"} · ${c.toLocaleString()} papers`,children:r.map(i=>{const l=i.slug||"",v=T(L(l));return e.jsxs(h,{to:`/conferences/${o}/${l}`,className:"tag-cell",children:[e.jsxs("div",{className:"name",children:[e.jsx("span",{className:"dot",style:{background:v.dot}}),D(i.name,l)]}),e.jsx("div",{className:"meta",children:e.jsxs("span",{children:[(i.paper_count??0).toLocaleString()," papers"]})})]},i.id)})},a.id)}),e.jsx(E,{areas:m})]})};export{ce as default}; diff --git a/assets/ConferenceTaskView-BrixcLRv.js b/assets/ConferenceTaskView-BAq9JbyI.js similarity index 79% rename from assets/ConferenceTaskView-BrixcLRv.js rename to assets/ConferenceTaskView-BAq9JbyI.js index eac1532db4dba296963e691c45e3257ee6a20a59..3f310ad9963ef1677b5d78a73298dbdc8a5c7ab4 100644 --- a/assets/ConferenceTaskView-BrixcLRv.js +++ b/assets/ConferenceTaskView-BAq9JbyI.js @@ -1 +1 @@ -import{u as S,b as _,p as R,d as C,j as e,L as x,o as M,T as E}from"./index-CjdUkE4w.js";import{u as L,b as Q,a as q}from"./PaperFeed-D3FZw29k.js";import{M as g}from"./MarkdownText-MrITlqRE.js";import{c as F}from"./catalog-qXcKve0z.js";import{p as B}from"./papers-DgZwjF3K.js";import{i as A}from"./apiErrors-D0w5By9R.js";import{C as O}from"./conferenceListings-BnmhBx-_.js";import{t as z,d as H}from"./transform-CRNzYLch.js";import{u as I}from"./usePapers-BZThqZCx.js";import{A as K,a as $}from"./alert-BM9Xfuyy.js";import V from"./NotFound-BeWhm9El.js";import"./PaperCard-dvXhr75r.js";import"./AuthorAvatar-D9249Frl.js";import"./SotaBadges-CyScuNCv.js";import"./colors-BkWRhvFI.js";import"./Icon-CGRs4BYD.js";import"./LatexTitle-DESKtS30.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-Df5_dywQ.js";import"./skeleton-DTWi7Ctg.js";import"./useIntersectionObserver-Ch6RpsSk.js";/* empty css */import"./PaperPreviewLink-zGfFNaz6.js";import"./index-tLcwYp0U.js";import"./index-Dj6aE-6E.js";import"./katex-DkKDou_j.js";import"./hover-card-CIBIV2Hx.js";import"./useMutation-BYtVrkc7.js";import"./curation-CyyuHfv5.js";import"./useInfiniteQuery-DeZTTVbI.js";const D={"iclr-2026/outstanding":"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/).","icml-2026/outstanding":"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/).","cvpr-2026/best-paper-finalists":"CVPR 2026 recognized fifteen Best Paper Award finalists, including the winners. [Read the announcement](https://x.com/CVPR/status/2062912519522717978)."},Pe=()=>{var b,y,v,P,k,w;const{confSlug:t,taskSlug:n}=S(),p=L(),a=O.find(r=>r.slug===n),u=!!(a!=null&&a.award),i=_({queryKey:["conference",t],queryFn:()=>F.getConference(t),enabled:!!t,staleTime:E}),c=_({queryKey:M.task(n),queryFn:()=>F.getTask(n),enabled:!!n&&!a,staleTime:E}),l=I([...R.feeds.conference,t,n,p.filters],r=>B.forConference(t,{...p.filters,task:a?void 0:n,presentation:a==null?void 0:a.presentation,page:r,page_size:12}),{enabled:!!t}),f=C.useMemo(()=>{var r;return((r=l.data)==null?void 0:r.pages.flatMap(o=>o.results))??[]},[l.data]),h=C.useMemo(()=>f.map(z),[f]),d=(a==null?void 0:a.label)??H(((b=c.data)==null?void 0:b.name)||n||"",((y=c.data)==null?void 0:y.slug)||n),j=D[`${t}/${n}`],N=((P=(v=l.data)==null?void 0:v.pages[0])==null?void 0:P.count)??((k=i.data)==null?void 0:k.paper_count)??0,s=c.data;return A(i.error)||A(c.error)?e.jsx(V,{}):i.error||c.error||l.error?e.jsx("div",{className:"page",children:e.jsx(K,{variant:"destructive",children:e.jsx($,{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(x,{to:"/",children:"Home"}),e.jsx("span",{children:" / "}),e.jsx(x,{to:"/conferences",children:"Conferences"}),e.jsx("span",{children:" / "}),e.jsx(x,{to:`/conferences/${t}`,children:((w=i.data)==null?void 0:w.name)??t}),e.jsx("span",{children:" / "}),e.jsx("span",{children:d})]}),e.jsxs("div",{className:!a&&(s!=null&&s.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:a?"BROWSE PAPERS":"TASK"}),e.jsx("h1",{className:"domain-mega-title",children:d}),j&&e.jsx(g,{className:"task-explainer",text:j}),!a&&(s==null?void 0:s.description)&&e.jsx(g,{className:"task-explainer",text:s.description}),i.data&&e.jsxs("div",{className:"task-quickstats",style:{marginTop:12},children:[e.jsxs("span",{children:[e.jsx("span",{className:"num",children:N.toLocaleString()}),"PAPERS"]}),e.jsx("span",{children:i.data.name})]})]}),!a&&(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:`${d} schematic`,onError:r=>{var o,m;(m=(o=r.currentTarget.parentElement)==null?void 0:o.parentElement)==null||m.style.setProperty("display","none")}})}),e.jsxs("figcaption",{children:["Figure · ",d,s.image_credit&&e.jsxs(e.Fragment,{children:[e.jsx("br",{}),e.jsx(g,{className:"task-image-credit",text:s.image_credit})]})]})]})]}),e.jsxs("div",{className:"task-section-head",children:[e.jsx("div",{className:"task-section-eyebrow",children:u?"Award papers":"Conference papers · sort below"}),e.jsxs("div",{className:"task-section-title",children:["Papers ",e.jsxs("span",{className:"meta",children:["[",N.toLocaleString(),"]"]})]})]}),e.jsx(Q,{feed:p,sorts:u?null:void 0,children:!u&&e.jsxs("div",{className:"results-count",children:[h.length," loaded in ",e.jsx("span",{children:d})]})}),e.jsx(q,{query:l,cards:h,empty:"No papers found for this selection.",cardHeader:r=>{var T;const o=(T=f[r])==null?void 0:T.conference_award,m=o==="outstanding"?"Outstanding Paper":o==="honorable_mention"?"Honorable Mention":o==="best_paper_finalist"&&(a==null?void 0:a.presentation)!=="best_paper_finalist"?"Best Paper Finalist":null;return m&&e.jsx("div",{className:"conference-award-label",children:m})}})]})};export{Pe as default}; +import{u as S,b as _,p as R,d as C,j as e,L as x,o as M,T as E}from"./index-CHGpuh10.js";import{u as L,b as Q,a as q}from"./PaperFeed-DjmnPHUi.js";import{M as g}from"./MarkdownText-D0AGKKJ1.js";import{c as F}from"./catalog-DMzmJg__.js";import{p as B}from"./papers-BPpxs2sO.js";import{i as A}from"./apiErrors-CvxFAcrW.js";import{C as O}from"./conferenceListings-BnmhBx-_.js";import{t as z,d as H}from"./transform-Cs8_lTDx.js";import{u as I}from"./usePapers-DzyOc-Ae.js";import{A as K,a as $}from"./alert-DPvmCXZT.js";import V from"./NotFound-Bc6y0g0J.js";import"./PaperCard-BtCEa6CD.js";import"./AuthorAvatar-fJxhX3fO.js";import"./SotaBadges-D825CK6n.js";import"./colors-BkWRhvFI.js";import"./Icon-CRWrVPWO.js";import"./LatexTitle-CfeEppH3.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-BHpRw7vT.js";import"./skeleton-Df0GaMuw.js";import"./useIntersectionObserver-DZSpsOQX.js";/* empty css */import"./PaperPreviewLink-CPkn2Kqv.js";import"./index-B141zdPU.js";import"./index-BzjqtLRb.js";import"./katex-DkKDou_j.js";import"./hover-card-Dz7z6DCn.js";import"./useMutation-3fOqWcpt.js";import"./curation-DI9_zYNx.js";import"./useInfiniteQuery-DhWyWKGj.js";const D={"iclr-2026/outstanding":"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/).","icml-2026/outstanding":"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/).","cvpr-2026/best-paper-finalists":"CVPR 2026 recognized fifteen Best Paper Award finalists, including the winners. [Read the announcement](https://x.com/CVPR/status/2062912519522717978)."},Pe=()=>{var b,y,v,P,k,w;const{confSlug:t,taskSlug:n}=S(),p=L(),a=O.find(r=>r.slug===n),u=!!(a!=null&&a.award),i=_({queryKey:["conference",t],queryFn:()=>F.getConference(t),enabled:!!t,staleTime:E}),c=_({queryKey:M.task(n),queryFn:()=>F.getTask(n),enabled:!!n&&!a,staleTime:E}),l=I([...R.feeds.conference,t,n,p.filters],r=>B.forConference(t,{...p.filters,task:a?void 0:n,presentation:a==null?void 0:a.presentation,page:r,page_size:12}),{enabled:!!t}),f=C.useMemo(()=>{var r;return((r=l.data)==null?void 0:r.pages.flatMap(o=>o.results))??[]},[l.data]),h=C.useMemo(()=>f.map(z),[f]),d=(a==null?void 0:a.label)??H(((b=c.data)==null?void 0:b.name)||n||"",((y=c.data)==null?void 0:y.slug)||n),j=D[`${t}/${n}`],N=((P=(v=l.data)==null?void 0:v.pages[0])==null?void 0:P.count)??((k=i.data)==null?void 0:k.paper_count)??0,s=c.data;return A(i.error)||A(c.error)?e.jsx(V,{}):i.error||c.error||l.error?e.jsx("div",{className:"page",children:e.jsx(K,{variant:"destructive",children:e.jsx($,{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(x,{to:"/",children:"Home"}),e.jsx("span",{children:" / "}),e.jsx(x,{to:"/conferences",children:"Conferences"}),e.jsx("span",{children:" / "}),e.jsx(x,{to:`/conferences/${t}`,children:((w=i.data)==null?void 0:w.name)??t}),e.jsx("span",{children:" / "}),e.jsx("span",{children:d})]}),e.jsxs("div",{className:!a&&(s!=null&&s.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:a?"BROWSE PAPERS":"TASK"}),e.jsx("h1",{className:"domain-mega-title",children:d}),j&&e.jsx(g,{className:"task-explainer",text:j}),!a&&(s==null?void 0:s.description)&&e.jsx(g,{className:"task-explainer",text:s.description}),i.data&&e.jsxs("div",{className:"task-quickstats",style:{marginTop:12},children:[e.jsxs("span",{children:[e.jsx("span",{className:"num",children:N.toLocaleString()}),"PAPERS"]}),e.jsx("span",{children:i.data.name})]})]}),!a&&(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:`${d} schematic`,onError:r=>{var o,m;(m=(o=r.currentTarget.parentElement)==null?void 0:o.parentElement)==null||m.style.setProperty("display","none")}})}),e.jsxs("figcaption",{children:["Figure · ",d,s.image_credit&&e.jsxs(e.Fragment,{children:[e.jsx("br",{}),e.jsx(g,{className:"task-image-credit",text:s.image_credit})]})]})]})]}),e.jsxs("div",{className:"task-section-head",children:[e.jsx("div",{className:"task-section-eyebrow",children:u?"Award papers":"Conference papers · sort below"}),e.jsxs("div",{className:"task-section-title",children:["Papers ",e.jsxs("span",{className:"meta",children:["[",N.toLocaleString(),"]"]})]})]}),e.jsx(Q,{feed:p,sorts:u?null:void 0,children:!u&&e.jsxs("div",{className:"results-count",children:[h.length," loaded in ",e.jsx("span",{children:d})]})}),e.jsx(q,{query:l,cards:h,empty:"No papers found for this selection.",cardHeader:r=>{var T;const o=(T=f[r])==null?void 0:T.conference_award,m=o==="outstanding"?"Outstanding Paper":o==="honorable_mention"?"Honorable Mention":o==="best_paper_finalist"&&(a==null?void 0:a.presentation)!=="best_paper_finalist"?"Best Paper Finalist":null;return m&&e.jsx("div",{className:"conference-award-label",children:m})}})]})};export{Pe as default}; diff --git a/assets/ConferencesIndexView-CS7nG4hL.js b/assets/ConferencesIndexView-CYTn_PTx.js similarity index 76% rename from assets/ConferencesIndexView-CS7nG4hL.js rename to assets/ConferencesIndexView-CYTn_PTx.js index 561251067413bbb5269760609dddd1374473f95e..56fb101632d5beebe298711bd5ba29b5e99d7dc1 100644 --- a/assets/ConferencesIndexView-CS7nG4hL.js +++ b/assets/ConferencesIndexView-CYTn_PTx.js @@ -1 +1 @@ -import{b as d,d as m,j as e,L as c,T as p}from"./index-CjdUkE4w.js";import{c as u}from"./catalog-qXcKve0z.js";import{f}from"./deadlines-BH32v7D1.js";import{A as h,a as x}from"./alert-BM9Xfuyy.js";import{A as g,a as j}from"./AreaSection-iYSRoy6-.js";import{T as N}from"./TaxonomySuggestionTile-ByzqhBFs.js";import"./skeleton-DTWi7Ctg.js";import"./SignInToEditDialog-rWxdYNRK.js";import"./button-DetZl_ch.js";import"./input-7i-rZ7fA.js";import"./textarea-biscLKBK.js";import"./searchable-select-EPf13F1I.js";import"./popover-Df5_dywQ.js";import"./dialog-BzX9PD3v.js";import"./search-DxMn7VKI.js";import"./loader-circle-xTdSzHv_.js";import"./useMutation-BYtVrkc7.js";import"./submissions-CQ6M0giV.js";import"./plus-AztI1566.js";const 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},_=(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)},Q=()=>{const r=d({queryKey:["conferences"],queryFn:()=>u.conferences(),staleTime:p}),a=m.useMemo(()=>{var i;if(!((i=r.data)!=null&&i.results))return null;const t={};return r.data.results.forEach(n=>{const s=v(n);(t[s]||(t[s]=[])).push(n)}),Object.values(t).forEach(n=>n.sort(_)),Object.keys(t).map(Number).sort((n,s)=>s-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(x,{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(c,{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(g,{sections:2,tiles:3,tileClassName:"h-32"}):a==null?void 0:a.map(({year:t,conferences:i})=>{const n=i.reduce((s,o)=>s+(o.paper_count??0),0);return e.jsxs(j,{title:t>0?String(t):"Unknown year",meta:`${i.length} ${i.length===1?"conference":"conferences"} · ${n.toLocaleString()} papers`,children:[i.map(s=>{const o=f(s.start_date,s.end_date),l=[s.venue,s.location].filter(Boolean).join(", ");return e.jsxs(c,{to:`/conferences/${s.slug}`,className:"tag-cell",children:[e.jsx("div",{className:"name",children:s.name}),e.jsxs("div",{className:"meta",style:{display:"flex",flexDirection:"column",gap:4},children:[o&&e.jsx("span",{children:o}),l&&e.jsx("span",{children:l}),e.jsxs("span",{children:[(s.paper_count??0).toLocaleString()," papers"]})]})]},s.id)}),e.jsx(N,{kind:"conference"})]},t)})]})};export{Q as default}; +import{b as d,d as m,j as e,L as c,T as p}from"./index-CHGpuh10.js";import{c as u}from"./catalog-DMzmJg__.js";import{f}from"./deadlines-BH32v7D1.js";import{A as h,a as x}from"./alert-DPvmCXZT.js";import{A as g,a as j}from"./AreaSection-BVX3JiNc.js";import{T as N}from"./TaxonomySuggestionTile-QKr6E6VG.js";import"./skeleton-Df0GaMuw.js";import"./SignInToEditDialog-B3EJVut1.js";import"./button-C4kqC3Av.js";import"./input-FDP77A0C.js";import"./textarea-CDMkQNbH.js";import"./searchable-select-9e2cCX5g.js";import"./popover-BHpRw7vT.js";import"./dialog-BfI2DQVf.js";import"./search-Czb1C2Q7.js";import"./loader-circle-DuUnmHjj.js";import"./useMutation-3fOqWcpt.js";import"./submissions-BHHAmt53.js";import"./plus-CYgr1KdS.js";const 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},_=(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)},Q=()=>{const r=d({queryKey:["conferences"],queryFn:()=>u.conferences(),staleTime:p}),a=m.useMemo(()=>{var i;if(!((i=r.data)!=null&&i.results))return null;const t={};return r.data.results.forEach(n=>{const s=v(n);(t[s]||(t[s]=[])).push(n)}),Object.values(t).forEach(n=>n.sort(_)),Object.keys(t).map(Number).sort((n,s)=>s-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(x,{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(c,{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(g,{sections:2,tiles:3,tileClassName:"h-32"}):a==null?void 0:a.map(({year:t,conferences:i})=>{const n=i.reduce((s,o)=>s+(o.paper_count??0),0);return e.jsxs(j,{title:t>0?String(t):"Unknown year",meta:`${i.length} ${i.length===1?"conference":"conferences"} · ${n.toLocaleString()} papers`,children:[i.map(s=>{const o=f(s.start_date,s.end_date),l=[s.venue,s.location].filter(Boolean).join(", ");return e.jsxs(c,{to:`/conferences/${s.slug}`,className:"tag-cell",children:[e.jsx("div",{className:"name",children:s.name}),e.jsxs("div",{className:"meta",style:{display:"flex",flexDirection:"column",gap:4},children:[o&&e.jsx("span",{children:o}),l&&e.jsx("span",{children:l}),e.jsxs("span",{children:[(s.paper_count??0).toLocaleString()," papers"]})]})]},s.id)}),e.jsx(N,{kind:"conference"})]},t)})]})};export{Q as default}; diff --git a/assets/CronDashboard-BgGmgfB6.js b/assets/CronDashboard-BrJey03Y.js similarity index 98% rename from assets/CronDashboard-BgGmgfB6.js rename to assets/CronDashboard-BrJey03Y.js index 7f0c21209ee21070dcf1a0d97996610c12775802..f18345d8380d309ce0e2df1ec49ced5623e8e05a 100644 --- a/assets/CronDashboard-BgGmgfB6.js +++ b/assets/CronDashboard-BrJey03Y.js @@ -1,4 +1,4 @@ -import{s as O,d as h,N as is,B as cs,j as e,z as ie,af as ls,R as ds,O as os,E as oe,P as ms,G as us,Q as Ae,I as L,b as G,J as $,i as xe,A as Re,L as pe,a as hs,q as xs}from"./index-CjdUkE4w.js";import{u as P}from"./useMutation-BYtVrkc7.js";import{t as ge,f as v,a as S,S as Te,o as ue,C as g,b as N,c as b,d as F,e as j,g as C}from"./CronDashboard-Di5xM1py.js";import{B as D}from"./badge-C8r6F6JD.js";import{B as y}from"./button-DetZl_ch.js";import{C as ps,a as gs}from"./chevron-up-BwiJ46dh.js";import{D as fe}from"./database-b_ekt_5x.js";import{T as js}from"./trending-up-BMb-8Pi8.js";import{A as ne}from"./activity--6WvmXv2.js";import{F as Ne}from"./file-text-CHlxsNJC.js";import{T as Ee,I as vs}from"./triangle-alert-DF8Mdy0J.js";import{E as Y}from"./external-link-CTLWFJ8S.js";import{C as Z,R as be}from"./refresh-cw-BuRFYuxm.js";import{L as R}from"./loader-circle-xTdSzHv_.js";import{C as je}from"./circle-check-B2vTBhyc.js";import{c as M,A as _s}from"./codex-CgFzL2AI.js";import{u as fs}from"./useInfiniteQuery-DeZTTVbI.js";import{p as Me}from"./paperEdits-C_3nZTKz.js";import{c as me}from"./catalog-qXcKve0z.js";import{c as ye}from"./chat-B1EBF720.js";/** +import{s as O,d as h,N as is,B as cs,j as e,z as ie,af as ls,R as ds,O as os,E as oe,P as ms,G as us,Q as Ae,I as L,b as G,J as $,i as xe,A as Re,L as pe,a as hs,q as xs}from"./index-CHGpuh10.js";import{u as P}from"./useMutation-3fOqWcpt.js";import{t as ge,f as v,a as S,S as Te,o as ue,C as g,b as N,c as b,d as F,e as j,g as C}from"./CronDashboard-CgnzKY0g.js";import{B as D}from"./badge-DZeCGN5Q.js";import{B as y}from"./button-C4kqC3Av.js";import{C as ps,a as gs}from"./chevron-up-BnyqTe42.js";import{D as fe}from"./database-DYuYu8SE.js";import{T as js}from"./trending-up-Cqe6Lpc9.js";import{A as ne}from"./activity-CPcCgbtC.js";import{F as Ne}from"./file-text-DPLtNP9U.js";import{T as Ee,I as vs}from"./triangle-alert-nsUjBiKf.js";import{E as Y}from"./external-link-CeQVHd7V.js";import{C as Z,R as be}from"./refresh-cw-BmXCr1RQ.js";import{L as R}from"./loader-circle-DuUnmHjj.js";import{C as je}from"./circle-check-B_15foPp.js";import{c as M,A as _s}from"./codex-WU2WBMcn.js";import{u as fs}from"./useInfiniteQuery-DhWyWKGj.js";import{p as Me}from"./paperEdits-DFgln8kE.js";import{c as me}from"./catalog-DMzmJg__.js";import{c as ye}from"./chat-CuiFt2kN.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/CronDashboard-Di5xM1py.js b/assets/CronDashboard-CgnzKY0g.js similarity index 97% rename from assets/CronDashboard-Di5xM1py.js rename to assets/CronDashboard-CgnzKY0g.js index 5294b2f8548ee218076d236f211d3dfba2550e79..cc66ea219c314b0b1544504eda945353d82d5728 100644 --- a/assets/CronDashboard-Di5xM1py.js +++ b/assets/CronDashboard-CgnzKY0g.js @@ -1,4 +1,4 @@ -import{s as c,d as a,j as r,I as n,ac as u}from"./index-CjdUkE4w.js";/** +import{s as c,d as a,j as r,I as n,ac as u}from"./index-CHGpuh10.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/ExternalSourceEvalBadge-B3fyun97.js b/assets/ExternalSourceEvalBadge-CMfiSNvf.js similarity index 94% rename from assets/ExternalSourceEvalBadge-B3fyun97.js rename to assets/ExternalSourceEvalBadge-CMfiSNvf.js index aaf4b2473c14cde055428ded0e731e6bea87ccd6..1367020bf63c83ff049aa9cc10a8db3cc0183fbd 100644 --- a/assets/ExternalSourceEvalBadge-B3fyun97.js +++ b/assets/ExternalSourceEvalBadge-CMfiSNvf.js @@ -1 +1 @@ -import{p as o}from"./curation-CyyuHfv5.js";import{ac as g,j as a,L as l}from"./index-CjdUkE4w.js";import{H as u,a as c,b as d}from"./hover-card-CIBIV2Hx.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}; +import{p as o}from"./curation-DI9_zYNx.js";import{ac as g,j as a,L as l}from"./index-CHGpuh10.js";import{H as u,a as c,b as d}from"./hover-card-Dz7z6DCn.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}; diff --git a/assets/FeedView-BZs7imUl.js b/assets/FeedView-BZs7imUl.js deleted file mode 100644 index 538a1193cd29d7c9e1e0bc27d63668e7ae555dca..0000000000000000000000000000000000000000 --- a/assets/FeedView-BZs7imUl.js +++ /dev/null @@ -1 +0,0 @@ -import{j as e,L as F,a as _e,c as Ce,b as H,r as ne,d as h,h as Ee,C as Fe,T as Q,e as je,f as Le,g as Ae,p as se,i as De,k as Re,l as re,m as ve,n as Me,o as qe}from"./index-CjdUkE4w.js";import{S as Ie}from"./sparkles-CIfeDmV2.js";import{D as Oe,a as He,b as $e}from"./dialog-BzX9PD3v.js";import{c as J}from"./catalog-qXcKve0z.js";import{u as Ne,a as Se,b as ke,T as me,s as ze,c as Ke,r as ee,d as ge,e as fe,f as Be}from"./researchTopic-NmABF6tT.js";import{d as le,t as Ue}from"./transform-CRNzYLch.js";import{P as Ge}from"./plus-AztI1566.js";import{A as Qe}from"./arrow-right-BrRhWCQS.js";import{r as We,P as Xe,w as Ye,a as Ze}from"./PaperFeed-D3FZw29k.js";import{M as Ve}from"./McpShowcase-Bo79ATLK.js";import{u as Je,a as es,P as ss,i as ts,A as as,b as os,S as $,c as is,D as te,q as ns,d as rs}from"./chatSessions-9VEG8seW.js";import{c as ls}from"./chat-B1EBF720.js";import{u as cs}from"./usePapers-BZThqZCx.js";import{p as xe}from"./papers-DgZwjF3K.js";import{S as ae}from"./skeleton-DTWi7Ctg.js";import{A as oe,a as ie}from"./alert-BM9Xfuyy.js";import"./useMutation-BYtVrkc7.js";import"./PaperCard-dvXhr75r.js";import"./AuthorAvatar-D9249Frl.js";import"./SotaBadges-CyScuNCv.js";import"./colors-BkWRhvFI.js";import"./Icon-CGRs4BYD.js";import"./LatexTitle-DESKtS30.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-Df5_dywQ.js";import"./useIntersectionObserver-Ch6RpsSk.js";import"./AgentLogos-xoTIu0NB.js";import"./useInfiniteQuery-DeZTTVbI.js";import"./curation-CyyuHfv5.js";function ds({onBuild:r}){return e.jsxs("section",{className:"following-intro","aria-labelledby":"following-intro-title",children:[e.jsx("h2",{id:"following-intro-title",children:"Build your personal research feed"}),e.jsx("p",{className:"following-intro-lead",children:"Describe a topic in your own words, or follow the tasks, benchmarks, authors, and organizations you care about, and this page collects their latest papers and results in one place."}),r&&e.jsxs("button",{type:"button",className:"research-topic-save following-intro-topic",onClick:r,children:[e.jsx(Ie,{"aria-hidden":"true"}),"Build your feed"]}),e.jsxs("p",{className:"following-intro-note",children:["Matching papers also arrive as a weekly email, which you can turn off in"," ",e.jsx(F,{to:"/settings",children:"Settings"}),"."]})]})}const we=16;function us({open:r,onOpenChange:o}){return e.jsx(Oe,{open:r,onOpenChange:o,children:e.jsx(He,{className:"topic-dialog","aria-describedby":void 0,children:e.jsx(ps,{onDone:()=>o(!1)})})})}function ps({onDone:r}){var W,X,Y,Z,O,z,B;const{user:o}=_e(),m=Ce(),l=H({queryKey:ne.topic(o==null?void 0:o.hf_subject),queryFn:ee.topic,enabled:!!o}),t=Ne(),w=H({queryKey:["trending-tasks-follow"],queryFn:()=>J.trendingTasks({limit:we,level:0}),staleTime:Q}),y=H({queryKey:["trending-methods-follow"],queryFn:()=>J.trendingMethods({limit:we}),staleTime:Q}),c=H({queryKey:["research-follow-suggestions"],queryFn:ee.followSuggestions,staleTime:Q}),j=(n=[])=>n.map(p=>({id:String(p.entity_id),name:p.name,image:p.image_url})),[S,L]=h.useState(null),[P,v]=h.useState([]),_=Se(),M=ke(),b=((W=l.data)==null?void 0:W.text)??"",i=S??b,d=i.trim().replace(/\s+/g," "),C=((X=l.data)==null?void 0:X.status)==="failed"&&d===b,A=d.length>=3&&(d!==b||C),D=_.isPending||M.isPending,a=(n,p)=>{var N;return((N=t.data)==null?void 0:N.some(k=>k.kind===n&&String(k.entity_id)===p))??!1},g=(n,p)=>{var N;return((N=P.find(k=>k.kind===n&&k.id===p))==null?void 0:N.follow)??a(n,p)},f=P.filter(n=>n.follow!==a(n.kind,n.id)),E=!D&&(A||f.length>0),R=(n,p,N)=>v(k=>[...k.filter(U=>U.kind!==n||U.id!==p),{kind:n,id:p,name:N,follow:!g(n,p)}]),q=()=>{if(!E)return;if(!o){A&&ze(d),f.length&&Ke(f),window.location.href=Ee(`${m.pathname}${m.search}`);return}const n=[...f.length?[M.mutateAsync(f)]:[],...A?[_.mutateAsync(d)]:[]];Promise.allSettled(n).then(p=>{p.every(N=>N.status==="fulfilled")&&r()})},I=(n,p,N,k)=>{const V=[...(t.data??[]).filter(x=>x.kind===p).map(x=>({id:String(x.entity_id),name:x.name,slug:x.url.split("/").pop(),image:x.image_url})),...N.filter(x=>!a(p,x.id)).map(x=>({...x,suggested:!0}))];return V.length>0&&e.jsxs("div",{className:"topic-dialog-group",children:[e.jsx("h3",{children:n}),e.jsxs(hs,{children:[V.map(x=>{const G=g(p,x.id),K=p==="task"?le(x.name,x.slug??void 0):x.name;return e.jsxs("button",{type:"button",className:"topic-dialog-chip","aria-pressed":G,disabled:D,"data-suggested":"suggested"in x||void 0,onClick:()=>R(p,x.id,K),children:[G?e.jsx(Fe,{"aria-hidden":"true"}):e.jsx(Ge,{"aria-hidden":"true"}),(p==="author"||p==="organization")&&e.jsx(ms,{kind:p,name:K,src:x.image}),K]},x.id)}),k&&e.jsxs(F,{to:k.to,className:"topic-dialog-browse",children:[k.label,e.jsx(Qe,{"aria-hidden":"true"})]})]})]})};return e.jsxs("form",{className:"topic-dialog-form",onSubmit:n=>{n.preventDefault(),q()},children:[e.jsx($e,{className:"topic-dialog-title",children:b||(Y=t.data)!=null&&Y.length?"Edit your research feed":"Build your research feed"}),e.jsxs("div",{className:"topic-dialog-group",children:[e.jsx("h3",{children:e.jsx("label",{htmlFor:"topic-dialog-input",children:"Describe a topic in your own words"})}),e.jsx("p",{className:"topic-dialog-hint",children:"A model reads every new paper and adds the ones that match to your Following feed."}),e.jsx("textarea",{id:"topic-dialog-input",className:"research-topic-input",rows:4,maxLength:me,"aria-label":"Research topic",placeholder:"e.g. diffusion policies for robot manipulation, or speculative decoding for LLM inference",value:i,onChange:n=>L(n.target.value),onKeyDown:n=>{n.key==="Enter"&&!n.shiftKey&&!n.nativeEvent.isComposing&&(n.preventDefault(),q())}}),e.jsxs("span",{className:"research-topic-count",children:[i.length,"/",me]})]}),I("Trending tasks","task",((Z=w.data)==null?void 0:Z.results)??[],{to:"/tasks",label:"Browse tasks"}),I("Trending methods","method",((O=y.data)==null?void 0:O.results)??[],{to:"/methods",label:"Browse methods"}),I("Benchmarks","benchmark",[],{to:"/tasks",label:"Browse benchmarks"}),I("Popular authors","author",j((z=c.data)==null?void 0:z.authors)),I("Popular organizations","organization",j((B=c.data)==null?void 0:B.organizations),{to:"/organizations",label:"Browse organizations"}),(_.error||M.error)&&e.jsx("p",{className:"settings-token-error",role:"alert",children:"Could not save your feed. Please try again."}),e.jsxs("div",{className:"topic-dialog-actions",children:[b&&e.jsx("button",{type:"button",className:"research-follow-action topic-dialog-remove",disabled:D,onClick:()=>_.mutate(null,{onSuccess:r}),children:"Remove topic"}),e.jsx("button",{type:"button",className:"research-follow-action",disabled:D,onClick:r,children:"Cancel"}),e.jsx("button",{type:"submit",className:"research-topic-save",disabled:!E,children:f.some(n=>n.follow===!1)?"Save":f.length?"Follow":C?"Retry":b?"Update topic":"Follow"})]})]})}function hs({children:r}){const o=h.useRef(null);return h.useLayoutEffect(()=>{const m=o.current;if(!m)return;const l=()=>{const t=[...m.children],w=t.filter(c=>c.dataset.suggested);w.forEach(c=>{c.hidden=!1});const y=()=>new Set(t.filter(c=>!c.hidden).map(c=>c.offsetTop)).size;for(let c=w.length-1;c>=0&&y()>2;c--)w[c].hidden=!0};return l(),window.addEventListener("resize",l),()=>window.removeEventListener("resize",l)}),e.jsx("div",{ref:o,className:"topic-dialog-chips",children:r})}function ms({kind:r,name:o,src:m}){const[l,t]=h.useState(!1);if(m&&!l)return e.jsx("img",{className:`topic-dialog-chip-image is-${r}`,src:m,alt:"",loading:"lazy",onError:()=>t(!0)});if(r!=="author")return null;const w=o.split(/\s+/).filter(Boolean).map(y=>y[0]).slice(0,2).join("").toUpperCase();return e.jsx("span",{className:"topic-dialog-chip-image is-author is-initials","aria-hidden":"true",children:w})}const be=45,gs=1800,fs=25,xs=350,ws=r=>{const[o,m]=h.useState($[0].slice(0,1)),[l,t]=h.useState(0);return h.useEffect(()=>{var L,P;if(!r)return;if((P=(L=window.matchMedia)==null?void 0:L.call(window,"(prefers-reduced-motion: reduce)"))!=null&&P.matches){m($[0]),t(0);return}let w=0,y=1,c=!1,j;m($[0].slice(0,y)),t(0);const S=()=>{const v=$[w];if(!c){if(y+=1,m(v.slice(0,y)),y===v.length){c=!0,j=window.setTimeout(S,gs);return}j=window.setTimeout(S,be);return}if(y-=1,m(v.slice(0,y)),y===0){c=!1,w=(w+1)%$.length,t(w),j=window.setTimeout(S,xs);return}j=window.setTimeout(S,fs)};return j=window.setTimeout(S,be),()=>window.clearTimeout(j)},[r]),{placeholder:o,prompt:$[l]}},bs=()=>{var D;const r=je(),o=ve(),[m,l]=h.useState({text:"",paperMentions:[]}),t=m.text,[w,y]=h.useState(0),[c,j]=h.useState(!1),[S,L]=h.useState(null),{placeholder:P,prompt:v}=ws(!t),_=h.useRef(null),M=H({queryKey:["chatAvailability"],queryFn:()=>ls.getAvailability(),retry:!1,enabled:re()}),b=re()&&((D=M.data)==null?void 0:D.paper_mentions_enabled)!==!1,i=Je({draft:m,onChange:l,enabled:b,textareaRef:_}),d=es(m,i.open),C=t?d.completion:v;h.useLayoutEffect(()=>{const a=_.current;if(!a)return;const g=()=>{if(a.style.height="auto",t){a.style.height=`${Math.min(is(a),160)}px`;return}const f=a.placeholder,E=$.reduce((R,q)=>(a.placeholder=q,Math.max(R,a.scrollHeight)),0);a.placeholder=f,a.style.height=`${Math.min(E,160)}px`};return g(),window.addEventListener("resize",g),()=>window.removeEventListener("resize",g)},[t,C]);const A=async(a=m)=>{const g=a.text.trim();if(!(!g||c)){if(o){const f=new URLSearchParams({q:g,model:te}),E=`${Me}?${f}`,R=window.open(E,"_blank");if(!R){L(E);return}R.opener=null,L(null),l({text:"",paperMentions:[]});return}j(!0),ns(a,te);try{const f=await rs(te);r(`/chat/${f.id}`)}catch{r("/chat")}}};return e.jsxs(e.Fragment,{children:[!o&&e.jsx("div",{className:"ask-home-new",children:"Hint: type @ to bring papers into context, or press Tab to use a suggestion"}),e.jsxs("div",{className:"ask-home",children:[e.jsxs("div",{className:"ask-home-row",children:[e.jsxs("div",{className:"ask-home-textarea-wrap",children:[e.jsx(ss,{text:m.text,mentions:m.paperMentions,scrollTop:w,variant:"home",completion:t?C:""}),e.jsx("textarea",{ref:_,rows:1,value:t,placeholder:P,"aria-label":"Ask the assistant",disabled:c,onChange:a=>{i.updateText(a.target.value,a.target.selectionStart),d.trackCaret(a.target)},onSelect:a=>{i.refresh(a.currentTarget.selectionStart),d.trackCaret(a.currentTarget)},onClick:a=>{i.refresh(a.currentTarget.selectionStart),d.trackCaret(a.currentTarget)},onScroll:a=>y(a.currentTarget.scrollTop),onBlur:a=>{var g,f;(f=(g=a.relatedTarget)==null?void 0:g.closest)!=null&&f.call(g,".chat-paper-picker")||window.setTimeout(i.close,0)},onKeyDown:a=>{if(!i.keyDown(a)){if(ts(a)&&C){a.preventDefault();const g=t+C;i.updateText(g,g.length),window.requestAnimationFrame(()=>{var f;return(f=_.current)==null?void 0:f.setSelectionRange(g.length,g.length)});return}a.key==="Enter"&&!a.shiftKey&&(a.preventDefault(),A())}},role:b?"combobox":void 0,"aria-expanded":b?i.open:void 0,"aria-controls":i.open?i.pickerId:void 0,"aria-activedescendant":i.open&&i.results.length?`${i.optionIdPrefix}-${i.activeIndex}`:void 0,"aria-autocomplete":b?"list":void 0,"aria-describedby":i.message?"ask-home-paper-mention-message":void 0})]}),e.jsx("button",{type:"button",className:`chat-send${t.trim()?" chat-send-on":""}`,onClick:()=>void A(),disabled:!t.trim()||c,"aria-label":"Ask the assistant",children:e.jsx(as,{})})]}),S&&e.jsx("div",{className:"chat-paper-mention-message",role:"alert",children:e.jsx("a",{href:S,target:"_blank",rel:"noreferrer",children:"Open this question on paperswithcode.co"})}),i.message&&e.jsx("div",{id:"ask-home-paper-mention-message",className:"chat-paper-mention-message",role:"alert",children:i.message}),e.jsx(os,{open:i.open,query:i.query,results:i.results,activeIndex:i.activeIndex,loading:i.loading,error:i.error,onSelect:i.select,id:i.pickerId,optionIdPrefix:i.optionIdPrefix})]})]})},Te={task:"Tasks",method:"Methods",benchmark:"Benchmarks",author:"Authors",organization:"Orgs"},ys=Object.keys(Te),js=30,ye=40,vs=async r=>{const o=await r;return{results:o.results.map(m=>({paper:m})),next_page:o.next_page}},Ns=({mode:r})=>{var G,K,ce,de,ue,pe,he;const o=r==="following",m=je(),l=Le(),t=l==null?void 0:l.user,[w,y]=Ae(),c=We(w,void 0,o?"month":"week"),j=s=>{const u=new URLSearchParams(w);u.delete("order_by"),u.delete("only");const T=u.toString();m(T?`${s}?${T}`:s)},S=s=>{const u=new URLSearchParams(w);s?u.set("only","topic"):u.delete("only");const T=u.toString();return T?`/following?${T}`:"/following"},L=H({queryKey:qe.topTasksSidebar,queryFn:()=>J.topTasks(8),staleTime:Q}),P=H({queryKey:["trending-tasks-sidebar"],queryFn:()=>J.trendingTasks({limit:8,level:0}),staleTime:Q}),v=o&&w.get("only")==="topic",_={start_date:c.startDate,end_date:c.endDate},M={...c,topicOnly:v},b=cs(o?[...se.feeds.following,t==null?void 0:t.hf_subject,M]:[...r==="x"?se.feeds.xTrending:se.feeds.trending,_],async s=>{if(o){const T=await ee.following(s,M),Pe=T.length===ye?s+ye:null;return{results:T,next_page:Pe}}const u={..._,page:s,page_size:js,include_resources:!0};return vs(r==="x"?xe.xTrending(u):xe.list({...u,order_by:"trending",order_dir:"desc",latest_only:!0}))},{enabled:!o||!!t,initialPage:o?0:1}),i=Ne(o),d=H({queryKey:ne.topic(t==null?void 0:t.hf_subject),queryFn:ee.topic,enabled:o&&!!t,refetchInterval:s=>s.state.data&&["pending","running"].includes(s.state.data.status)?1e4:!1}),C=!!d.data&&["pending","running"].includes(d.data.status),A=d.data?d.data.label??d.data.text:"",[D,a]=h.useState(!1),g=De(),f=h.useRef(!1);h.useEffect(()=>{f.current&&!C&&g.invalidateQueries({queryKey:ne.feed(t==null?void 0:t.hf_subject)}),f.current=C},[C,g,t==null?void 0:t.hf_subject]);const E=o&&!!t&&((G=i.data)==null?void 0:G.length)===0&&d.isSuccess&&!d.data,R=o&&!(l!=null&&l.isLoading)&&!t||E,q=!!t||!Re(),[I,W]=h.useState(!1),[X]=h.useState(()=>!!ge()||fe().length>0),[Y,Z]=h.useState(!1);!I&&(d.data||(K=i.data)!=null&&K.length)&&W(!0),R&&!Y&&(Z(!0),q&&!I&&!X&&a(!0));const O=Se(),{mutate:z}=O,B=h.useRef(!1);h.useEffect(()=>{var u;const s=ge();!t||!d.isSuccess||!s||B.current||(B.current=!0,s===((u=d.data)==null?void 0:u.text)?Be():z(s))},[t,d.isSuccess,d.data,z]);const n=ke(),{mutate:p}=n,N=h.useRef(!1);h.useEffect(()=>{const s=fe();!t||!s.length||N.current||(N.current=!0,p(s))},[t,p]);const k=h.useMemo(()=>ys.map(s=>{var u;return{kind:s,follows:o?((u=i.data)==null?void 0:u.filter(T=>T.kind===s))??[]:[]}}).filter(s=>s.follows.length>0),[o,i.data]),U=o&&(!!(l!=null&&l.isLoading)||!!t&&!E),V=h.useMemo(()=>{var s;return((s=b.data)==null?void 0:s.pages.flatMap(u=>u.results.map(T=>({...Ue(T.paper),followReasons:T.reasons}))))??[]},[b.data]),x=b.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:r==="x"?"Papers people share most on X, picked daily":"Curated daily from arXiv and Hugging Face"})]})}),e.jsxs("div",{className:"layout-with-sidebar",children:[e.jsxs("aside",{className:"sidebar feed-sidebar",children:[U?e.jsxs("div",{className:"sidebar-section sidebar-section-follows",children:[e.jsx("div",{className:"sidebar-label",children:"You follow"}),((l==null?void 0:l.isLoading)||i.isLoading)&&e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:Array.from({length:4}).map((s,u)=>e.jsx(ae,{className:"h-5 w-full"},u))}),i.isError&&e.jsx("div",{style:{fontSize:12,color:"var(--ink-faint)"},children:"Couldn't load your follows."}),e.jsxs("div",{className:"sidebar-links",children:[d.data&&e.jsxs("div",{className:`sidebar-follow-topic ${v?"active":""}`,children:[e.jsxs(F,{to:S(!v),className:"sidebar-link sidebar-follow-link",title:v?"Show papers from everything you follow":`Show only papers about “${d.data.text}”`,"aria-current":v?"true":void 0,children:[e.jsx("span",{className:"sidebar-follow-kind",children:"Topic"}),e.jsx("span",{className:"sidebar-follow-name",children:A})]}),e.jsx("button",{type:"button",className:"sidebar-follow-edit","aria-label":"Edit topic","aria-expanded":D,onClick:()=>a(!0),children:"edit"})]}),k.map(s=>e.jsxs("div",{className:"sidebar-follow-group",children:[e.jsx("span",{className:"sidebar-follow-kind",children:Te[s.kind]}),s.follows.map(u=>e.jsx(F,{to:u.url,className:"sidebar-link sidebar-follow-link",children:e.jsx("span",{className:"sidebar-follow-name",children:u.name})},u.entity_id))]},s.kind))]}),e.jsx(F,{to:"/settings",className:"sidebar-follow-manage",children:"Manage in Settings"})]}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"sidebar-section sidebar-section-top-domains",children:[e.jsx("div",{className:"sidebar-label",children:"Top Domains"}),L.isLoading&&e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:Array.from({length:6}).map((s,u)=>e.jsx(ae,{className:"h-5 w-full"},u))}),e.jsxs("div",{className:"sidebar-links",children:[(ce=L.data)==null?void 0:ce.map(s=>e.jsxs(F,{to:`/tasks/${s.slug}`,className:"sidebar-link",children:[le(s.name,s.slug),s.paper_count!=null&&e.jsx("span",{className:"count",children:s.paper_count})]},s.id)),e.jsx(F,{to:"/tasks",className:"sidebar-link sidebar-link-more",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,u)=>e.jsx(ae,{className:"h-5 w-full"},u))}),((ue=(de=P.data)==null?void 0:de.results)==null?void 0:ue.length)===0&&!P.isLoading&&e.jsx("div",{style:{fontSize:12,color:"var(--ink-faint)"},children:"No domains gaining momentum right now."}),e.jsx("div",{className:"sidebar-links",children:(he=(pe=P.data)==null?void 0:pe.results)==null?void 0:he.map(s=>e.jsxs(F,{to:`/tasks/${s.slug}`,className:"sidebar-link",children:[le(s.name,s.slug),e.jsxs("span",{className:"count",children:[s.share_lift.toFixed(1),"x"]})]},s.id))})]})]}),e.jsx(Ve,{})]}),e.jsxs("div",{className:"feed-main",children:[(re()||ve())&&e.jsx("div",{className:"feed-chat",children:e.jsx(bs,{})}),e.jsxs("div",{className:"feed-content",children:[e.jsxs("div",{className:"sort-bar home-feed-sort-bar",children:[e.jsx("div",{className:"paper-feed-toolbar-controls",children:e.jsxs("div",{className:"sort-options",children:[e.jsx("button",{className:`sort-btn ${r==="trending"?"active":""}`,onClick:()=>j("/"),children:"trending"}),e.jsx("button",{className:`sort-btn ${r==="x"?"active":""}`,onClick:()=>j("/x-trending"),children:"trending (X)"}),e.jsx("button",{className:`sort-btn ${o?"active":""}`,onClick:()=>j("/following"),children:"following"})]})}),e.jsx(Xe,{startDate:c.startDate,endDate:c.endDate,onChange:s=>y(Ye(w,s))})]}),x&&e.jsx(oe,{variant:"destructive",className:"mb-4",children:e.jsxs(ie,{children:["Failed to load papers. ",e.jsx("button",{type:"button",onClick:()=>void b.refetch(),children:"Try again"})]})}),O.isError&&O.variables&&e.jsx(oe,{variant:"destructive",className:"mb-4",children:e.jsxs(ie,{children:["Could not follow “",O.variables,"”. ",e.jsx("button",{type:"button",onClick:()=>z(O.variables),children:"Try again"})]})}),n.isError&&n.variables&&e.jsx(oe,{variant:"destructive",className:"mb-4",children:e.jsxs(ie,{children:["Could not follow ",n.variables.map(s=>s.name).join(", "),". ",e.jsx("button",{type:"button",onClick:()=>p(n.variables),children:"Try again"})]})}),o&&!!t&&d.isSuccess&&!i.isPending&&!E&&(d.data?C?e.jsxs("div",{className:"following-topic-note",role:"status",children:["Showing the closest papers about “",A,"” now. A model is reading papers to refine these matches, which takes a few minutes."]}):null:e.jsxs("div",{className:"following-topic-note",role:"status",children:["Describe a topic in your own words, and a model adds matching new papers to this feed."," ",e.jsx("button",{type:"button",className:"link-button",onClick:()=>a(!0),children:"Follow a topic"})]})),o&&q&&e.jsx(us,{open:D,onOpenChange:a}),v&&d.data&&e.jsxs("div",{className:"following-topic-note following-topic-filter",role:"status",children:["Showing only papers about “",A,"”."," ",e.jsx(F,{to:S(!1),children:"Show everything you follow"})]}),R?e.jsx(ds,{onBuild:q?()=>a(!0):void 0}):e.jsx(Ze,{query:b,isLoading:b.isLoading||o&&!!(l!=null&&l.isLoading),cards:V,skeleton:"card",rootMargin:"400px",empty:x?null:v?e.jsxs(e.Fragment,{children:["No papers about your topic match these filters. Widen the date range or ",e.jsx("button",{type:"button",className:"link-button",onClick:()=>a(!0),children:"edit your topic"}),"."]}):o?e.jsxs(e.Fragment,{children:["No papers from your topic or follows match these filters. Widen the date range, or follow more from ",e.jsx(F,{to:"/tasks",children:"tasks"}),", ",e.jsx(F,{to:"/methods",children:"methods"}),", benchmark, author, or organization pages."]}):r==="x"?"No papers shared on X in this window.":"No papers in this window."})]})]})]})]})},Js=({xTrending:r=!1})=>e.jsx(Ns,{mode:r?"x":"trending"});export{bs as AskAssistant,Ns as HomeFeed,Js as default}; diff --git a/assets/FeedView-wNAf1UnM.js b/assets/FeedView-wNAf1UnM.js new file mode 100644 index 0000000000000000000000000000000000000000..786b02f3ab484e751e39d2478f32366ceb2b4799 --- /dev/null +++ b/assets/FeedView-wNAf1UnM.js @@ -0,0 +1 @@ +import{j as e,L as F,a as _e,c as Ce,b as H,r as ie,d as h,h as Ee,C as Fe,T as Q,e as je,f as Le,g as Ae,p as se,i as De,k as Re,l as re,m as ve,n as Me,o as qe}from"./index-CHGpuh10.js";import{S as Ie}from"./sparkles-BSDHUYSH.js";import{D as Oe,a as He,b as $e}from"./dialog-BfI2DQVf.js";import{c as J}from"./catalog-DMzmJg__.js";import{u as Ne,a as Se,b as ke,T as me,s as ze,c as Ke,r as ee,d as ge,e as fe,f as Be}from"./researchTopic-DK_KbYKH.js";import{d as le,t as Ue}from"./transform-Cs8_lTDx.js";import{P as Ge}from"./plus-CYgr1KdS.js";import{A as Qe}from"./arrow-right-CUTKRnAt.js";import{r as We,P as Xe,w as Ye,a as Ze}from"./PaperFeed-DjmnPHUi.js";import{M as Ve}from"./McpShowcase-D5BEHBL4.js";import{u as Je,a as es,P as ss,i as ts,A as as,b as os,S as $,c as ns,D as te,q as is,d as rs}from"./chatSessions-BuiIkSLS.js";import{c as ls}from"./chat-CuiFt2kN.js";import{u as cs}from"./usePapers-DzyOc-Ae.js";import{p as xe}from"./papers-BPpxs2sO.js";import{S as ae}from"./skeleton-Df0GaMuw.js";import{A as oe,a as ne}from"./alert-DPvmCXZT.js";import"./useMutation-3fOqWcpt.js";import"./PaperCard-BtCEa6CD.js";import"./AuthorAvatar-fJxhX3fO.js";import"./SotaBadges-D825CK6n.js";import"./colors-BkWRhvFI.js";import"./Icon-CRWrVPWO.js";import"./LatexTitle-CfeEppH3.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-BHpRw7vT.js";import"./useIntersectionObserver-DZSpsOQX.js";import"./AgentLogos-PqR86_NK.js";import"./useInfiniteQuery-DhWyWKGj.js";import"./curation-DI9_zYNx.js";function ds({onBuild:r}){return e.jsxs("section",{className:"following-intro","aria-labelledby":"following-intro-title",children:[e.jsx("h2",{id:"following-intro-title",children:"Build your personal research feed"}),e.jsx("p",{className:"following-intro-lead",children:"Describe a topic in your own words, or follow the tasks, benchmarks, authors, and organizations you care about, and this page collects their latest papers and results in one place."}),r&&e.jsxs("button",{type:"button",className:"research-topic-save following-intro-topic",onClick:r,children:[e.jsx(Ie,{"aria-hidden":"true"}),"Build your feed"]}),e.jsxs("p",{className:"following-intro-note",children:["Matching papers also arrive as a weekly email, which you can turn off in"," ",e.jsx(F,{to:"/settings",children:"Settings"}),"."]})]})}const we=16;function us({open:r,onOpenChange:o}){return e.jsx(Oe,{open:r,onOpenChange:o,children:e.jsx(He,{className:"topic-dialog","aria-describedby":void 0,children:e.jsx(ps,{onDone:()=>o(!1)})})})}function ps({onDone:r}){var W,X,Y,Z,O,z,B;const{user:o}=_e(),m=Ce(),l=H({queryKey:ie.topic(o==null?void 0:o.hf_subject),queryFn:ee.topic,enabled:!!o}),t=Ne(),w=H({queryKey:["trending-tasks-follow"],queryFn:()=>J.trendingTasks({limit:we,level:0}),staleTime:Q}),y=H({queryKey:["trending-methods-follow"],queryFn:()=>J.trendingMethods({limit:we}),staleTime:Q}),c=H({queryKey:["research-follow-suggestions"],queryFn:ee.followSuggestions,staleTime:Q}),j=(i=[])=>i.map(p=>({id:String(p.entity_id),name:p.name,image:p.image_url})),[S,L]=h.useState(null),[P,v]=h.useState([]),_=Se(),M=ke(),b=((W=l.data)==null?void 0:W.text)??"",n=S??b,d=n.trim().replace(/\s+/g," "),C=((X=l.data)==null?void 0:X.status)==="failed"&&d===b,A=d.length>=3&&(d!==b||C),D=_.isPending||M.isPending,a=(i,p)=>{var N;return((N=t.data)==null?void 0:N.some(k=>k.kind===i&&String(k.entity_id)===p))??!1},g=(i,p)=>{var N;return((N=P.find(k=>k.kind===i&&k.id===p))==null?void 0:N.follow)??a(i,p)},f=P.filter(i=>i.follow!==a(i.kind,i.id)),E=!D&&(A||f.length>0),R=(i,p,N)=>v(k=>[...k.filter(U=>U.kind!==i||U.id!==p),{kind:i,id:p,name:N,follow:!g(i,p)}]),q=()=>{if(!E)return;if(!o){A&&ze(d),f.length&&Ke(f),window.location.href=Ee(`${m.pathname}${m.search}`);return}const i=[...f.length?[M.mutateAsync(f)]:[],...A?[_.mutateAsync(d)]:[]];Promise.allSettled(i).then(p=>{p.every(N=>N.status==="fulfilled")&&r()})},I=(i,p,N,k)=>{const V=[...(t.data??[]).filter(x=>x.kind===p).map(x=>({id:String(x.entity_id),name:x.name,slug:x.url.split("/").pop(),image:x.image_url})),...N.filter(x=>!a(p,x.id)).map(x=>({...x,suggested:!0}))];return V.length>0&&e.jsxs("div",{className:"topic-dialog-group",children:[e.jsx("h3",{children:i}),e.jsxs(hs,{children:[V.map(x=>{const G=g(p,x.id),K=p==="task"?le(x.name,x.slug??void 0):x.name;return e.jsxs("button",{type:"button",className:"topic-dialog-chip","aria-pressed":G,disabled:D,"data-suggested":"suggested"in x||void 0,onClick:()=>R(p,x.id,K),children:[G?e.jsx(Fe,{"aria-hidden":"true"}):e.jsx(Ge,{"aria-hidden":"true"}),(p==="author"||p==="organization")&&e.jsx(ms,{kind:p,name:K,src:x.image}),K]},x.id)}),k&&e.jsxs(F,{to:k.to,className:"topic-dialog-browse",children:[k.label,e.jsx(Qe,{"aria-hidden":"true"})]})]})]})};return e.jsxs("form",{className:"topic-dialog-form",onSubmit:i=>{i.preventDefault(),q()},children:[e.jsx($e,{className:"topic-dialog-title",children:b||(Y=t.data)!=null&&Y.length?"Edit your research feed":"Build your research feed"}),e.jsxs("div",{className:"topic-dialog-group",children:[e.jsx("h3",{children:e.jsx("label",{htmlFor:"topic-dialog-input",children:"Describe a topic in your own words"})}),e.jsx("p",{className:"topic-dialog-hint",children:"A model reads every new paper and adds the ones that match to your Following feed."}),e.jsx("textarea",{id:"topic-dialog-input",className:"research-topic-input",rows:4,maxLength:me,"aria-label":"Research topic",placeholder:"e.g. diffusion policies for robot manipulation, or speculative decoding for LLM inference",value:n,onChange:i=>L(i.target.value),onKeyDown:i=>{i.key==="Enter"&&!i.shiftKey&&!i.nativeEvent.isComposing&&(i.preventDefault(),q())}}),e.jsxs("span",{className:"research-topic-count",children:[n.length,"/",me]})]}),I("Trending tasks","task",((Z=w.data)==null?void 0:Z.results)??[],{to:"/tasks",label:"Browse tasks"}),I("Trending methods","method",((O=y.data)==null?void 0:O.results)??[],{to:"/methods",label:"Browse methods"}),I("Benchmarks","benchmark",[],{to:"/tasks",label:"Browse benchmarks"}),I("Popular authors","author",j((z=c.data)==null?void 0:z.authors)),I("Popular organizations","organization",j((B=c.data)==null?void 0:B.organizations),{to:"/organizations",label:"Browse organizations"}),(_.error||M.error)&&e.jsx("p",{className:"settings-token-error",role:"alert",children:"Could not save your feed. Please try again."}),e.jsxs("div",{className:"topic-dialog-actions",children:[b&&e.jsx("button",{type:"button",className:"research-follow-action topic-dialog-remove",disabled:D,onClick:()=>_.mutate(null,{onSuccess:r}),children:"Remove topic"}),e.jsx("button",{type:"button",className:"research-follow-action",disabled:D,onClick:r,children:"Cancel"}),e.jsx("button",{type:"submit",className:"research-topic-save",disabled:!E,children:f.some(i=>i.follow===!1)?"Save":f.length?"Follow":C?"Retry":b?"Update topic":"Follow"})]})]})}function hs({children:r}){const o=h.useRef(null);return h.useLayoutEffect(()=>{const m=o.current;if(!m)return;const l=()=>{const t=[...m.children],w=t.filter(c=>c.dataset.suggested);w.forEach(c=>{c.hidden=!1});const y=()=>new Set(t.filter(c=>!c.hidden).map(c=>c.offsetTop)).size;for(let c=w.length-1;c>=0&&y()>2;c--)w[c].hidden=!0};return l(),window.addEventListener("resize",l),()=>window.removeEventListener("resize",l)}),e.jsx("div",{ref:o,className:"topic-dialog-chips",children:r})}function ms({kind:r,name:o,src:m}){const[l,t]=h.useState(!1);if(m&&!l)return e.jsx("img",{className:`topic-dialog-chip-image is-${r}`,src:m,alt:"",loading:"lazy",onError:()=>t(!0)});if(r!=="author")return null;const w=o.split(/\s+/).filter(Boolean).map(y=>y[0]).slice(0,2).join("").toUpperCase();return e.jsx("span",{className:"topic-dialog-chip-image is-author is-initials","aria-hidden":"true",children:w})}const be=45,gs=1800,fs=25,xs=350,ws=r=>{const[o,m]=h.useState($[0].slice(0,1)),[l,t]=h.useState(0);return h.useEffect(()=>{var L,P;if(!r)return;if((P=(L=window.matchMedia)==null?void 0:L.call(window,"(prefers-reduced-motion: reduce)"))!=null&&P.matches){m($[0]),t(0);return}let w=0,y=1,c=!1,j;m($[0].slice(0,y)),t(0);const S=()=>{const v=$[w];if(!c){if(y+=1,m(v.slice(0,y)),y===v.length){c=!0,j=window.setTimeout(S,gs);return}j=window.setTimeout(S,be);return}if(y-=1,m(v.slice(0,y)),y===0){c=!1,w=(w+1)%$.length,t(w),j=window.setTimeout(S,xs);return}j=window.setTimeout(S,fs)};return j=window.setTimeout(S,be),()=>window.clearTimeout(j)},[r]),{placeholder:o,prompt:$[l]}},bs=()=>{var D;const r=je(),o=ve(),[m,l]=h.useState({text:"",paperMentions:[]}),t=m.text,[w,y]=h.useState(0),[c,j]=h.useState(!1),[S,L]=h.useState(null),{placeholder:P,prompt:v}=ws(!t),_=h.useRef(null),M=H({queryKey:["chatAvailability"],queryFn:()=>ls.getAvailability(),retry:!1,enabled:re()}),b=re()&&((D=M.data)==null?void 0:D.paper_mentions_enabled)!==!1,n=Je({draft:m,onChange:l,enabled:b,textareaRef:_}),d=es(m,n.open),C=t?d.completion:v;h.useLayoutEffect(()=>{const a=_.current;if(!a)return;const g=()=>{if(a.style.height="auto",t){a.style.height=`${Math.min(ns(a),160)}px`;return}const f=a.placeholder,E=$.reduce((R,q)=>(a.placeholder=q,Math.max(R,a.scrollHeight)),0);a.placeholder=f,a.style.height=`${Math.min(E,160)}px`};return g(),window.addEventListener("resize",g),()=>window.removeEventListener("resize",g)},[t,C]);const A=async(a=m)=>{const g=a.text.trim();if(!(!g||c)){if(o){const f=new URLSearchParams({q:g,model:te}),E=`${Me}?${f}`,R=window.open(E,"_blank");if(!R){L(E);return}R.opener=null,L(null),l({text:"",paperMentions:[]});return}j(!0),is(a,te);try{const f=await rs(te);r(`/chat/${f.id}`)}catch{r("/chat")}}};return e.jsxs(e.Fragment,{children:[!o&&e.jsx("div",{className:"ask-home-new",children:"Hint: type @ to bring papers into context, or press Tab to use a suggestion"}),e.jsxs("div",{className:"ask-home",children:[e.jsxs("div",{className:"ask-home-row",children:[e.jsxs("div",{className:"ask-home-textarea-wrap",children:[e.jsx(ss,{text:m.text,mentions:m.paperMentions,scrollTop:w,variant:"home",completion:t?C:""}),e.jsx("textarea",{ref:_,rows:1,value:t,placeholder:P,"aria-label":"Ask the assistant",disabled:c,onChange:a=>{n.updateText(a.target.value,a.target.selectionStart),d.trackCaret(a.target)},onSelect:a=>{n.refresh(a.currentTarget.selectionStart),d.trackCaret(a.currentTarget)},onClick:a=>{n.refresh(a.currentTarget.selectionStart),d.trackCaret(a.currentTarget)},onScroll:a=>y(a.currentTarget.scrollTop),onBlur:a=>{var g,f;(f=(g=a.relatedTarget)==null?void 0:g.closest)!=null&&f.call(g,".chat-paper-picker")||window.setTimeout(n.close,0)},onKeyDown:a=>{if(!n.keyDown(a)){if(ts(a)&&C){a.preventDefault();const g=t+C;n.updateText(g,g.length),window.requestAnimationFrame(()=>{var f;return(f=_.current)==null?void 0:f.setSelectionRange(g.length,g.length)});return}a.key==="Enter"&&!a.shiftKey&&(a.preventDefault(),A())}},role:b?"combobox":void 0,"aria-expanded":b?n.open:void 0,"aria-controls":n.open?n.pickerId:void 0,"aria-activedescendant":n.open&&n.results.length?`${n.optionIdPrefix}-${n.activeIndex}`:void 0,"aria-autocomplete":b?"list":void 0,"aria-describedby":n.message?"ask-home-paper-mention-message":void 0})]}),e.jsx("button",{type:"button",className:`chat-send${t.trim()?" chat-send-on":""}`,onClick:()=>void A(),disabled:!t.trim()||c,"aria-label":"Ask the assistant",children:e.jsx(as,{})})]}),S&&e.jsx("div",{className:"chat-paper-mention-message",role:"alert",children:e.jsx("a",{href:S,target:"_blank",rel:"noreferrer",children:"Open this question on paperswithcode.co"})}),n.message&&e.jsx("div",{id:"ask-home-paper-mention-message",className:"chat-paper-mention-message",role:"alert",children:n.message}),e.jsx(os,{open:n.open,query:n.query,results:n.results,activeIndex:n.activeIndex,loading:n.loading,error:n.error,onSelect:n.select,id:n.pickerId,optionIdPrefix:n.optionIdPrefix})]})]})},Te={task:"Tasks",method:"Methods",benchmark:"Benchmarks",author:"Authors",organization:"Orgs"},ys=Object.keys(Te),js=30,ye=40,vs=async r=>{const o=await r;return{results:o.results.map(m=>({paper:m})),next_page:o.next_page}},Ns=({mode:r})=>{var G,K,ce,de,ue,pe,he;const o=r==="following",m=je(),l=Le(),t=l==null?void 0:l.user,[w,y]=Ae(),c=We(w,void 0,r==="trending"?"week":"month"),j=s=>{const u=new URLSearchParams(w);u.delete("order_by"),u.delete("only");const T=u.toString();m(T?`${s}?${T}`:s)},S=s=>{const u=new URLSearchParams(w);s?u.set("only","topic"):u.delete("only");const T=u.toString();return T?`/following?${T}`:"/following"},L=H({queryKey:qe.topTasksSidebar,queryFn:()=>J.topTasks(8),staleTime:Q}),P=H({queryKey:["trending-tasks-sidebar"],queryFn:()=>J.trendingTasks({limit:8,level:0}),staleTime:Q}),v=o&&w.get("only")==="topic",_={start_date:c.startDate,end_date:c.endDate},M={...c,topicOnly:v},b=cs(o?[...se.feeds.following,t==null?void 0:t.hf_subject,M]:[...r==="x"?se.feeds.xTrending:se.feeds.trending,_],async s=>{if(o){const T=await ee.following(s,M),Pe=T.length===ye?s+ye:null;return{results:T,next_page:Pe}}const u={..._,page:s,page_size:js,include_resources:!0};return vs(r==="x"?xe.xTrending(u):xe.list({...u,order_by:"trending",order_dir:"desc",latest_only:!0}))},{enabled:!o||!!t,initialPage:o?0:1}),n=Ne(o),d=H({queryKey:ie.topic(t==null?void 0:t.hf_subject),queryFn:ee.topic,enabled:o&&!!t,refetchInterval:s=>s.state.data&&["pending","running"].includes(s.state.data.status)?1e4:!1}),C=!!d.data&&["pending","running"].includes(d.data.status),A=d.data?d.data.label??d.data.text:"",[D,a]=h.useState(!1),g=De(),f=h.useRef(!1);h.useEffect(()=>{f.current&&!C&&g.invalidateQueries({queryKey:ie.feed(t==null?void 0:t.hf_subject)}),f.current=C},[C,g,t==null?void 0:t.hf_subject]);const E=o&&!!t&&((G=n.data)==null?void 0:G.length)===0&&d.isSuccess&&!d.data,R=o&&!(l!=null&&l.isLoading)&&!t||E,q=!!t||!Re(),[I,W]=h.useState(!1),[X]=h.useState(()=>!!ge()||fe().length>0),[Y,Z]=h.useState(!1);!I&&(d.data||(K=n.data)!=null&&K.length)&&W(!0),R&&!Y&&(Z(!0),q&&!I&&!X&&a(!0));const O=Se(),{mutate:z}=O,B=h.useRef(!1);h.useEffect(()=>{var u;const s=ge();!t||!d.isSuccess||!s||B.current||(B.current=!0,s===((u=d.data)==null?void 0:u.text)?Be():z(s))},[t,d.isSuccess,d.data,z]);const i=ke(),{mutate:p}=i,N=h.useRef(!1);h.useEffect(()=>{const s=fe();!t||!s.length||N.current||(N.current=!0,p(s))},[t,p]);const k=h.useMemo(()=>ys.map(s=>{var u;return{kind:s,follows:o?((u=n.data)==null?void 0:u.filter(T=>T.kind===s))??[]:[]}}).filter(s=>s.follows.length>0),[o,n.data]),U=o&&(!!(l!=null&&l.isLoading)||!!t&&!E),V=h.useMemo(()=>{var s;return((s=b.data)==null?void 0:s.pages.flatMap(u=>u.results.map(T=>({...Ue(T.paper),followReasons:T.reasons}))))??[]},[b.data]),x=b.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:r==="x"?"Papers people share most on X, picked daily":"Curated daily from arXiv and Hugging Face"})]})}),e.jsxs("div",{className:"layout-with-sidebar",children:[e.jsxs("aside",{className:"sidebar feed-sidebar",children:[U?e.jsxs("div",{className:"sidebar-section sidebar-section-follows",children:[e.jsx("div",{className:"sidebar-label",children:"You follow"}),((l==null?void 0:l.isLoading)||n.isLoading)&&e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:Array.from({length:4}).map((s,u)=>e.jsx(ae,{className:"h-5 w-full"},u))}),n.isError&&e.jsx("div",{style:{fontSize:12,color:"var(--ink-faint)"},children:"Couldn't load your follows."}),e.jsxs("div",{className:"sidebar-links",children:[d.data&&e.jsxs("div",{className:`sidebar-follow-topic ${v?"active":""}`,children:[e.jsxs(F,{to:S(!v),className:"sidebar-link sidebar-follow-link",title:v?"Show papers from everything you follow":`Show only papers about “${d.data.text}”`,"aria-current":v?"true":void 0,children:[e.jsx("span",{className:"sidebar-follow-kind",children:"Topic"}),e.jsx("span",{className:"sidebar-follow-name",children:A})]}),e.jsx("button",{type:"button",className:"sidebar-follow-edit","aria-label":"Edit topic","aria-expanded":D,onClick:()=>a(!0),children:"edit"})]}),k.map(s=>e.jsxs("div",{className:"sidebar-follow-group",children:[e.jsx("span",{className:"sidebar-follow-kind",children:Te[s.kind]}),s.follows.map(u=>e.jsx(F,{to:u.url,className:"sidebar-link sidebar-follow-link",children:e.jsx("span",{className:"sidebar-follow-name",children:u.name})},u.entity_id))]},s.kind))]}),e.jsx(F,{to:"/settings",className:"sidebar-follow-manage",children:"Manage in Settings"})]}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"sidebar-section sidebar-section-top-domains",children:[e.jsx("div",{className:"sidebar-label",children:"Top Domains"}),L.isLoading&&e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:Array.from({length:6}).map((s,u)=>e.jsx(ae,{className:"h-5 w-full"},u))}),e.jsxs("div",{className:"sidebar-links",children:[(ce=L.data)==null?void 0:ce.map(s=>e.jsxs(F,{to:`/tasks/${s.slug}`,className:"sidebar-link",children:[le(s.name,s.slug),s.paper_count!=null&&e.jsx("span",{className:"count",children:s.paper_count})]},s.id)),e.jsx(F,{to:"/tasks",className:"sidebar-link sidebar-link-more",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,u)=>e.jsx(ae,{className:"h-5 w-full"},u))}),((ue=(de=P.data)==null?void 0:de.results)==null?void 0:ue.length)===0&&!P.isLoading&&e.jsx("div",{style:{fontSize:12,color:"var(--ink-faint)"},children:"No domains gaining momentum right now."}),e.jsx("div",{className:"sidebar-links",children:(he=(pe=P.data)==null?void 0:pe.results)==null?void 0:he.map(s=>e.jsxs(F,{to:`/tasks/${s.slug}`,className:"sidebar-link",children:[le(s.name,s.slug),e.jsxs("span",{className:"count",children:[s.share_lift.toFixed(1),"x"]})]},s.id))})]})]}),e.jsx(Ve,{})]}),e.jsxs("div",{className:"feed-main",children:[(re()||ve())&&e.jsx("div",{className:"feed-chat",children:e.jsx(bs,{})}),e.jsxs("div",{className:"feed-content",children:[e.jsxs("div",{className:"sort-bar home-feed-sort-bar",children:[e.jsx("div",{className:"paper-feed-toolbar-controls",children:e.jsxs("div",{className:"sort-options",children:[e.jsx("button",{className:`sort-btn ${r==="trending"?"active":""}`,onClick:()=>j("/"),children:"trending"}),e.jsx("button",{className:`sort-btn ${r==="x"?"active":""}`,onClick:()=>j("/x-trending"),children:"trending (X)"}),e.jsx("button",{className:`sort-btn ${o?"active":""}`,onClick:()=>j("/following"),children:"following"})]})}),e.jsx(Xe,{startDate:c.startDate,endDate:c.endDate,onChange:s=>y(Ye(w,s))})]}),x&&e.jsx(oe,{variant:"destructive",className:"mb-4",children:e.jsxs(ne,{children:["Failed to load papers. ",e.jsx("button",{type:"button",onClick:()=>void b.refetch(),children:"Try again"})]})}),O.isError&&O.variables&&e.jsx(oe,{variant:"destructive",className:"mb-4",children:e.jsxs(ne,{children:["Could not follow “",O.variables,"”. ",e.jsx("button",{type:"button",onClick:()=>z(O.variables),children:"Try again"})]})}),i.isError&&i.variables&&e.jsx(oe,{variant:"destructive",className:"mb-4",children:e.jsxs(ne,{children:["Could not follow ",i.variables.map(s=>s.name).join(", "),". ",e.jsx("button",{type:"button",onClick:()=>p(i.variables),children:"Try again"})]})}),o&&!!t&&d.isSuccess&&!n.isPending&&!E&&(d.data?C?e.jsxs("div",{className:"following-topic-note",role:"status",children:["Showing the closest papers about “",A,"” now. A model is reading papers to refine these matches, which takes a few minutes."]}):null:e.jsxs("div",{className:"following-topic-note",role:"status",children:["Describe a topic in your own words, and a model adds matching new papers to this feed."," ",e.jsx("button",{type:"button",className:"link-button",onClick:()=>a(!0),children:"Follow a topic"})]})),o&&q&&e.jsx(us,{open:D,onOpenChange:a}),v&&d.data&&e.jsxs("div",{className:"following-topic-note following-topic-filter",role:"status",children:["Showing only papers about “",A,"”."," ",e.jsx(F,{to:S(!1),children:"Show everything you follow"})]}),R?e.jsx(ds,{onBuild:q?()=>a(!0):void 0}):e.jsx(Ze,{query:b,isLoading:b.isLoading||o&&!!(l!=null&&l.isLoading),cards:V,skeleton:"card",rootMargin:"400px",empty:x?null:v?e.jsxs(e.Fragment,{children:["No papers about your topic match these filters. Widen the date range or ",e.jsx("button",{type:"button",className:"link-button",onClick:()=>a(!0),children:"edit your topic"}),"."]}):o?e.jsxs(e.Fragment,{children:["No papers from your topic or follows match these filters. Widen the date range, or follow more from ",e.jsx(F,{to:"/tasks",children:"tasks"}),", ",e.jsx(F,{to:"/methods",children:"methods"}),", benchmark, author, or organization pages."]}):r==="x"?"No papers shared on X in this window.":"No papers in this window."})]})]})]})]})},Js=({xTrending:r=!1})=>e.jsx(Ns,{mode:r?"x":"trending"});export{bs as AskAssistant,Ns as HomeFeed,Js as default}; diff --git a/assets/FollowingView-C0KL9Wds.js b/assets/FollowingView-C0KL9Wds.js deleted file mode 100644 index 80e0f034b9859d1af9bbf8d9dc884501f59ad6d6..0000000000000000000000000000000000000000 --- a/assets/FollowingView-C0KL9Wds.js +++ /dev/null @@ -1 +0,0 @@ -import{j as o}from"./index-CjdUkE4w.js";import{HomeFeed as r}from"./FeedView-BZs7imUl.js";import"./sparkles-CIfeDmV2.js";import"./dialog-BzX9PD3v.js";import"./catalog-qXcKve0z.js";import"./researchTopic-NmABF6tT.js";import"./useMutation-BYtVrkc7.js";import"./transform-CRNzYLch.js";import"./plus-AztI1566.js";import"./arrow-right-BrRhWCQS.js";import"./PaperFeed-D3FZw29k.js";import"./PaperCard-dvXhr75r.js";import"./AuthorAvatar-D9249Frl.js";import"./SotaBadges-CyScuNCv.js";import"./colors-BkWRhvFI.js";import"./Icon-CGRs4BYD.js";import"./LatexTitle-DESKtS30.js";import"./papers-DgZwjF3K.js";import"./curation-CyyuHfv5.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-Df5_dywQ.js";import"./skeleton-DTWi7Ctg.js";import"./useIntersectionObserver-Ch6RpsSk.js";import"./McpShowcase-Bo79ATLK.js";import"./AgentLogos-xoTIu0NB.js";import"./chatSessions-9VEG8seW.js";import"./chat-B1EBF720.js";import"./usePapers-BZThqZCx.js";import"./useInfiniteQuery-DeZTTVbI.js";import"./alert-BM9Xfuyy.js";function B(){return o.jsx(r,{mode:"following"})}export{B as default}; diff --git a/assets/FollowingView-e1HW5vmf.js b/assets/FollowingView-e1HW5vmf.js new file mode 100644 index 0000000000000000000000000000000000000000..cd01a271a138967580df0e1f918064ffdff9c3bf --- /dev/null +++ b/assets/FollowingView-e1HW5vmf.js @@ -0,0 +1 @@ +import{j as o}from"./index-CHGpuh10.js";import{HomeFeed as r}from"./FeedView-wNAf1UnM.js";import"./sparkles-BSDHUYSH.js";import"./dialog-BfI2DQVf.js";import"./catalog-DMzmJg__.js";import"./researchTopic-DK_KbYKH.js";import"./useMutation-3fOqWcpt.js";import"./transform-Cs8_lTDx.js";import"./plus-CYgr1KdS.js";import"./arrow-right-CUTKRnAt.js";import"./PaperFeed-DjmnPHUi.js";import"./PaperCard-BtCEa6CD.js";import"./AuthorAvatar-fJxhX3fO.js";import"./SotaBadges-D825CK6n.js";import"./colors-BkWRhvFI.js";import"./Icon-CRWrVPWO.js";import"./LatexTitle-CfeEppH3.js";import"./papers-BPpxs2sO.js";import"./curation-DI9_zYNx.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-BHpRw7vT.js";import"./skeleton-Df0GaMuw.js";import"./useIntersectionObserver-DZSpsOQX.js";import"./McpShowcase-D5BEHBL4.js";import"./AgentLogos-PqR86_NK.js";import"./chatSessions-BuiIkSLS.js";import"./chat-CuiFt2kN.js";import"./usePapers-DzyOc-Ae.js";import"./useInfiniteQuery-DhWyWKGj.js";import"./alert-DPvmCXZT.js";function B(){return o.jsx(r,{mode:"following"})}export{B as default}; diff --git a/assets/FrameworksIndexView-BBgK14SQ.js b/assets/FrameworksIndexView-D3oe8htL.js similarity index 95% rename from assets/FrameworksIndexView-BBgK14SQ.js rename to assets/FrameworksIndexView-D3oe8htL.js index f6b9270fdc4306faabfc4fce5c02f4532e4b1bb7..ab4b995ce925b403e12be32fcaa42fe213401639 100644 --- a/assets/FrameworksIndexView-BBgK14SQ.js +++ b/assets/FrameworksIndexView-D3oe8htL.js @@ -1 +1 @@ -import{e as d,j as e,L as c,b as m,V as h}from"./index-CjdUkE4w.js";import{I as p}from"./Icon-CGRs4BYD.js";import{c as u}from"./catalog-qXcKve0z.js";import{c as g,h as x}from"./colors-BkWRhvFI.js";import{P as f}from"./frameworks-DDA0P4Tf.js";const j={fontFamily:"var(--mono)",fontSize:13,fontWeight:600,letterSpacing:"0.04em",textTransform:"uppercase",color:"var(--ink)",marginBottom:6},k=({platform:s})=>{const n=g(x(s));return e.jsx("span",{className:"framework-platform-chip",style:{background:n.bg,color:n.text},children:f[s]})},_=({framework:s})=>{const n=d(),t=`/papers?framework=${encodeURIComponent(s.slug)}`;return e.jsxs("article",{id:`framework-${s.slug}`,className:"framework-card framework-card-clickable",role:"link",tabIndex:0,"aria-label":`View papers implemented by ${s.name}`,onClick:a=>{a.target.closest("a, button")||n(t)},onKeyDown:a=>{a.target===a.currentTarget&&(a.key==="Enter"||a.key===" ")&&(a.preventDefault(),n(t))},children:[e.jsxs("div",{className:"framework-card-head",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"framework-card-name",children:s.name}),s.organization_name&&e.jsx("div",{className:"framework-card-org",children:s.organization_name})]}),s.platforms&&s.platforms.length>0&&e.jsx("div",{className:"framework-platform-row",children:s.platforms.map(a=>e.jsx(k,{platform:a},a))})]}),e.jsx("p",{className:"framework-card-desc",children:s.description}),s.when_to_use&&e.jsxs("div",{className:"framework-card-when",children:[e.jsx("span",{className:"framework-card-when-label",children:"When to use"}),s.when_to_use]}),(s.github_url||s.docs_url||s.introducing_paper_arxiv_id)&&e.jsxs("div",{className:"framework-card-links",children:[s.introducing_paper_arxiv_id&&e.jsx(c,{to:`/paper/${s.introducing_paper_arxiv_id}`,className:"framework-link",children:"Introducing paper"}),s.github_url&&s.paper_count>0&&e.jsxs(c,{to:t,className:"framework-link",children:["Implements ",s.paper_count," ",s.paper_count===1?"paper":"papers"]}),s.github_url&&s.paper_count===0&&e.jsx("span",{className:"framework-link framework-link-disabled","aria-disabled":"true",children:"Implements 0 papers"}),s.github_url&&e.jsxs("a",{href:s.github_url,target:"_blank",rel:"noopener noreferrer",className:"framework-link",children:[e.jsx(p,{name:"github",size:13}),"GitHub"]}),s.docs_url&&s.docs_url!==s.github_url&&e.jsx("a",{href:s.docs_url,target:"_blank",rel:"noopener noreferrer",className:"framework-link",children:"Docs"})]})]})},I=()=>{var a;const s=m({queryKey:["framework-catalog"],queryFn:()=>u.frameworkCatalog()}),n=((a=s.data)==null?void 0:a.domains)??[],t=n.reduce((i,r)=>i+r.categories.reduce((l,o)=>l+o.frameworks.length,0),0);return h.useEffect(()=>{var r;const i=window.location.hash.slice(1);i&&((r=document.getElementById(i))==null||r.scrollIntoView())},[s.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."})]})}),s.isLoading&&e.jsx("div",{className:"empty",children:"Loading frameworks…"}),s.isError&&e.jsx("div",{className:"empty",children:"Could not load frameworks."}),n.map(i=>e.jsxs("section",{style:{marginBottom:56},children:[e.jsxs("div",{className:"area-section-head",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"area-section-title",children:i.name}),e.jsx("div",{className:"area-section-description",children:i.description})]}),e.jsxs("div",{className:"area-section-meta",children:[i.categories.length," ",i.categories.length===1?"category":"categories"," ·"," ",i.categories.reduce((r,l)=>r+l.frameworks.length,0)," frameworks"]})]}),i.categories.map(r=>e.jsxs("div",{className:"framework-category",children:[e.jsxs("div",{className:"framework-category-head",children:[e.jsxs("div",{children:[e.jsx("h3",{style:j,children:r.name}),r.description&&e.jsx("p",{className:"framework-category-blurb",children:r.description}),r.guide_url&&e.jsxs("a",{href:r.guide_url,target:"_blank",rel:"noopener noreferrer",className:"framework-guide-link",children:[r.guide_label??"Read guide"," →"]})]}),e.jsxs("div",{className:"framework-category-meta",children:[r.frameworks.length," ",r.frameworks.length===1?"framework":"frameworks"]})]}),e.jsx("div",{className:"framework-grid",children:r.frameworks.map(l=>e.jsx(_,{framework:l},l.slug))})]},r.slug))]},i.slug)),e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",marginTop:8},children:[t," frameworks across ",n.length," ",n.length===1?"domain":"domains",". More areas coming soon."]})]})};export{_ as FrameworkCard,I as default}; +import{e as d,j as e,L as c,b as m,V as h}from"./index-CHGpuh10.js";import{I as p}from"./Icon-CRWrVPWO.js";import{c as u}from"./catalog-DMzmJg__.js";import{c as g,h as x}from"./colors-BkWRhvFI.js";import{P as f}from"./frameworks-DDA0P4Tf.js";const j={fontFamily:"var(--mono)",fontSize:13,fontWeight:600,letterSpacing:"0.04em",textTransform:"uppercase",color:"var(--ink)",marginBottom:6},k=({platform:s})=>{const n=g(x(s));return e.jsx("span",{className:"framework-platform-chip",style:{background:n.bg,color:n.text},children:f[s]})},_=({framework:s})=>{const n=d(),t=`/papers?framework=${encodeURIComponent(s.slug)}`;return e.jsxs("article",{id:`framework-${s.slug}`,className:"framework-card framework-card-clickable",role:"link",tabIndex:0,"aria-label":`View papers implemented by ${s.name}`,onClick:a=>{a.target.closest("a, button")||n(t)},onKeyDown:a=>{a.target===a.currentTarget&&(a.key==="Enter"||a.key===" ")&&(a.preventDefault(),n(t))},children:[e.jsxs("div",{className:"framework-card-head",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"framework-card-name",children:s.name}),s.organization_name&&e.jsx("div",{className:"framework-card-org",children:s.organization_name})]}),s.platforms&&s.platforms.length>0&&e.jsx("div",{className:"framework-platform-row",children:s.platforms.map(a=>e.jsx(k,{platform:a},a))})]}),e.jsx("p",{className:"framework-card-desc",children:s.description}),s.when_to_use&&e.jsxs("div",{className:"framework-card-when",children:[e.jsx("span",{className:"framework-card-when-label",children:"When to use"}),s.when_to_use]}),(s.github_url||s.docs_url||s.introducing_paper_arxiv_id)&&e.jsxs("div",{className:"framework-card-links",children:[s.introducing_paper_arxiv_id&&e.jsx(c,{to:`/paper/${s.introducing_paper_arxiv_id}`,className:"framework-link",children:"Introducing paper"}),s.github_url&&s.paper_count>0&&e.jsxs(c,{to:t,className:"framework-link",children:["Implements ",s.paper_count," ",s.paper_count===1?"paper":"papers"]}),s.github_url&&s.paper_count===0&&e.jsx("span",{className:"framework-link framework-link-disabled","aria-disabled":"true",children:"Implements 0 papers"}),s.github_url&&e.jsxs("a",{href:s.github_url,target:"_blank",rel:"noopener noreferrer",className:"framework-link",children:[e.jsx(p,{name:"github",size:13}),"GitHub"]}),s.docs_url&&s.docs_url!==s.github_url&&e.jsx("a",{href:s.docs_url,target:"_blank",rel:"noopener noreferrer",className:"framework-link",children:"Docs"})]})]})},I=()=>{var a;const s=m({queryKey:["framework-catalog"],queryFn:()=>u.frameworkCatalog()}),n=((a=s.data)==null?void 0:a.domains)??[],t=n.reduce((i,r)=>i+r.categories.reduce((l,o)=>l+o.frameworks.length,0),0);return h.useEffect(()=>{var r;const i=window.location.hash.slice(1);i&&((r=document.getElementById(i))==null||r.scrollIntoView())},[s.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."})]})}),s.isLoading&&e.jsx("div",{className:"empty",children:"Loading frameworks…"}),s.isError&&e.jsx("div",{className:"empty",children:"Could not load frameworks."}),n.map(i=>e.jsxs("section",{style:{marginBottom:56},children:[e.jsxs("div",{className:"area-section-head",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"area-section-title",children:i.name}),e.jsx("div",{className:"area-section-description",children:i.description})]}),e.jsxs("div",{className:"area-section-meta",children:[i.categories.length," ",i.categories.length===1?"category":"categories"," ·"," ",i.categories.reduce((r,l)=>r+l.frameworks.length,0)," frameworks"]})]}),i.categories.map(r=>e.jsxs("div",{className:"framework-category",children:[e.jsxs("div",{className:"framework-category-head",children:[e.jsxs("div",{children:[e.jsx("h3",{style:j,children:r.name}),r.description&&e.jsx("p",{className:"framework-category-blurb",children:r.description}),r.guide_url&&e.jsxs("a",{href:r.guide_url,target:"_blank",rel:"noopener noreferrer",className:"framework-guide-link",children:[r.guide_label??"Read guide"," →"]})]}),e.jsxs("div",{className:"framework-category-meta",children:[r.frameworks.length," ",r.frameworks.length===1?"framework":"frameworks"]})]}),e.jsx("div",{className:"framework-grid",children:r.frameworks.map(l=>e.jsx(_,{framework:l},l.slug))})]},r.slug))]},i.slug)),e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",marginTop:8},children:[t," frameworks across ",n.length," ",n.length===1?"domain":"domains",". More areas coming soon."]})]})};export{_ as FrameworkCard,I as default}; diff --git a/assets/Icon-CGRs4BYD.js b/assets/Icon-CRWrVPWO.js similarity index 97% rename from assets/Icon-CGRs4BYD.js rename to assets/Icon-CRWrVPWO.js index 4b1f3e89b980593fdbb3d5177d71ae690e1cb56e..de93366dcddefeb96b9086a2c50e28b6db04e90f 100644 --- a/assets/Icon-CGRs4BYD.js +++ b/assets/Icon-CRWrVPWO.js @@ -1 +1 @@ -import{j as o}from"./index-CjdUkE4w.js";const s=({name:t,size:r=14})=>{const e={search:o.jsx("path",{d:"M11 11l3 3M7 12.5a5.5 5.5 0 110-11 5.5 5.5 0 010 11z",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinecap:"round"}),arrowUp:o.jsx("path",{d:"M8 3l5 6H3l5-6z",fill:"currentColor"}),arrowLeft:o.jsx("path",{d:"M9 3l-4 5 4 5",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"}),arrowRight:o.jsx("path",{d:"M7 3l4 5-4 5",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"}),external:o.jsx("path",{d:"M5 3h-2v8h8v-2M9 3h3v3M7 9l5-5",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"}),github:o.jsx("path",{d:"M8 1a7 7 0 00-2.21 13.64c.35.06.48-.15.48-.34v-1.2c-1.95.42-2.36-.94-2.36-.94-.32-.81-.78-1.03-.78-1.03-.64-.43.05-.43.05-.43.7.05 1.07.72 1.07.72.62 1.07 1.64.76 2.04.58.06-.45.24-.76.44-.94-1.55-.18-3.18-.78-3.18-3.46 0-.76.27-1.39.72-1.88-.07-.18-.31-.89.07-1.86 0 0 .59-.19 1.92.72.56-.15 1.16-.23 1.75-.24.59 0 1.19.08 1.75.24 1.33-.9 1.92-.72 1.92-.72.38.97.14 1.68.07 1.86.45.49.72 1.12.72 1.88 0 2.69-1.64 3.28-3.19 3.45.25.22.48.65.48 1.32v1.95c0 .19.13.41.49.34A7 7 0 008 1z",fill:"currentColor"}),citation:o.jsx("path",{d:"M3 4h3v3H3zM4 7v1.5a1.5 1.5 0 01-1.5 1.5M9 4h3v3H9zM10 7v1.5a1.5 1.5 0 01-1.5 1.5",stroke:"currentColor",strokeWidth:"1.2",fill:"none"}),bookmark:o.jsx("path",{d:"M4 2h8v12l-4-3-4 3V2z",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinejoin:"round"}),chart:o.jsx("path",{d:"M2 13h12M3 11l3-4 3 2 4-5",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"}),chat:o.jsx("path",{d:"M3 3h10v7H7l-3 3v-3H3V3z",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinejoin:"round"}),pdf:o.jsx("path",{d:"M5 2h5l3 3v9H5V2z",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinejoin:"round"}),copy:o.jsx("path",{d:"M5 5h7v8H5V5zM3 3h7v2M3 3v8h2",stroke:"currentColor",strokeWidth:"1.2",fill:"none",strokeLinejoin:"round"}),sparkle:o.jsx("path",{d:"M8 2l1.2 3.8L13 7l-3.8 1.2L8 12l-1.2-3.8L3 7l3.8-1.2L8 2z",fill:"currentColor"}),user:o.jsx("path",{d:"M8 8a3 3 0 100-6 3 3 0 000 6zM2 14c0-3 2.5-5 6-5s6 2 6 5",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinecap:"round"}),globe:o.jsx("path",{d:"M8 1.5a6.5 6.5 0 100 13 6.5 6.5 0 000-13zM1.5 8h13M8 1.5c1.7 1.9 2.6 4.2 2.6 6.5s-.9 4.6-2.6 6.5M8 1.5C6.3 3.4 5.4 5.7 5.4 8s.9 4.6 2.6 6.5",stroke:"currentColor",strokeWidth:"1.2",fill:"none",strokeLinecap:"round"}),menu:o.jsx("path",{d:"M2 4h12M2 8h12M2 12h12",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"}),close:o.jsx("path",{d:"M3 3l10 10M13 3L3 13",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"}),pencil:o.jsx("path",{d:"M10.5 2.5l3 3L6 13H3v-3l7.5-7.5zM9 4l3 3",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"})};return o.jsx("svg",{className:r===11?"icon-sm":"icon",viewBox:"0 0 16 16",width:r,height:r,children:e[t]})};export{s as I}; +import{j as o}from"./index-CHGpuh10.js";const s=({name:t,size:r=14})=>{const e={search:o.jsx("path",{d:"M11 11l3 3M7 12.5a5.5 5.5 0 110-11 5.5 5.5 0 010 11z",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinecap:"round"}),arrowUp:o.jsx("path",{d:"M8 3l5 6H3l5-6z",fill:"currentColor"}),arrowLeft:o.jsx("path",{d:"M9 3l-4 5 4 5",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"}),arrowRight:o.jsx("path",{d:"M7 3l4 5-4 5",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"}),external:o.jsx("path",{d:"M5 3h-2v8h8v-2M9 3h3v3M7 9l5-5",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"}),github:o.jsx("path",{d:"M8 1a7 7 0 00-2.21 13.64c.35.06.48-.15.48-.34v-1.2c-1.95.42-2.36-.94-2.36-.94-.32-.81-.78-1.03-.78-1.03-.64-.43.05-.43.05-.43.7.05 1.07.72 1.07.72.62 1.07 1.64.76 2.04.58.06-.45.24-.76.44-.94-1.55-.18-3.18-.78-3.18-3.46 0-.76.27-1.39.72-1.88-.07-.18-.31-.89.07-1.86 0 0 .59-.19 1.92.72.56-.15 1.16-.23 1.75-.24.59 0 1.19.08 1.75.24 1.33-.9 1.92-.72 1.92-.72.38.97.14 1.68.07 1.86.45.49.72 1.12.72 1.88 0 2.69-1.64 3.28-3.19 3.45.25.22.48.65.48 1.32v1.95c0 .19.13.41.49.34A7 7 0 008 1z",fill:"currentColor"}),citation:o.jsx("path",{d:"M3 4h3v3H3zM4 7v1.5a1.5 1.5 0 01-1.5 1.5M9 4h3v3H9zM10 7v1.5a1.5 1.5 0 01-1.5 1.5",stroke:"currentColor",strokeWidth:"1.2",fill:"none"}),bookmark:o.jsx("path",{d:"M4 2h8v12l-4-3-4 3V2z",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinejoin:"round"}),chart:o.jsx("path",{d:"M2 13h12M3 11l3-4 3 2 4-5",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"}),chat:o.jsx("path",{d:"M3 3h10v7H7l-3 3v-3H3V3z",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinejoin:"round"}),pdf:o.jsx("path",{d:"M5 2h5l3 3v9H5V2z",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinejoin:"round"}),copy:o.jsx("path",{d:"M5 5h7v8H5V5zM3 3h7v2M3 3v8h2",stroke:"currentColor",strokeWidth:"1.2",fill:"none",strokeLinejoin:"round"}),sparkle:o.jsx("path",{d:"M8 2l1.2 3.8L13 7l-3.8 1.2L8 12l-1.2-3.8L3 7l3.8-1.2L8 2z",fill:"currentColor"}),user:o.jsx("path",{d:"M8 8a3 3 0 100-6 3 3 0 000 6zM2 14c0-3 2.5-5 6-5s6 2 6 5",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinecap:"round"}),globe:o.jsx("path",{d:"M8 1.5a6.5 6.5 0 100 13 6.5 6.5 0 000-13zM1.5 8h13M8 1.5c1.7 1.9 2.6 4.2 2.6 6.5s-.9 4.6-2.6 6.5M8 1.5C6.3 3.4 5.4 5.7 5.4 8s.9 4.6 2.6 6.5",stroke:"currentColor",strokeWidth:"1.2",fill:"none",strokeLinecap:"round"}),menu:o.jsx("path",{d:"M2 4h12M2 8h12M2 12h12",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"}),close:o.jsx("path",{d:"M3 3l10 10M13 3L3 13",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"}),pencil:o.jsx("path",{d:"M10.5 2.5l3 3L6 13H3v-3l7.5-7.5zM9 4l3 3",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"})};return o.jsx("svg",{className:r===11?"icon-sm":"icon",viewBox:"0 0 16 16",width:r,height:r,children:e[t]})};export{s as I}; diff --git a/assets/LatexTitle-DESKtS30.js b/assets/LatexTitle-CfeEppH3.js similarity index 98% rename from assets/LatexTitle-DESKtS30.js rename to assets/LatexTitle-CfeEppH3.js index 9db029a06e5d634417c6de6744648a471a388dcb..cf1ff9c51825116e65cdd0c10ab911e378a64b2d 100644 --- a/assets/LatexTitle-DESKtS30.js +++ b/assets/LatexTitle-CfeEppH3.js @@ -1,2 +1,2 @@ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/katex-wklAmtGL.css"])))=>i.map(i=>d[i]); -import{j as u,d as A,a7 as L}from"./index-CjdUkE4w.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)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)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(;oe.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(;rr&&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}; +import{j as u,d as A,a7 as L}from"./index-CHGpuh10.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)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)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(;oe.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(;rr&&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}; diff --git a/assets/MarkdownText-MrITlqRE.js b/assets/MarkdownText-D0AGKKJ1.js similarity index 86% rename from assets/MarkdownText-MrITlqRE.js rename to assets/MarkdownText-D0AGKKJ1.js index 3c1143a4930db7649dfbd1f22a96aca0611b202d..430d2fcdf1209ea15ac13162e9eb0719250c012e 100644 --- a/assets/MarkdownText-MrITlqRE.js +++ b/assets/MarkdownText-D0AGKKJ1.js @@ -1 +1 @@ -import{w as c,j as o,L as u}from"./index-CjdUkE4w.js";/* empty css */import{r as p,a as m,P as d}from"./PaperPreviewLink-zGfFNaz6.js";import{M as h}from"./index-tLcwYp0U.js";import{r as f}from"./index-Dj6aE-6E.js";function w(e){return(e??"").split(",").map(a=>a.trim().toLowerCase()).filter(Boolean)}const x=new Set(["paperswithcode.co","www.paperswithcode.co","localhost","127.0.0.1",...w(void 0)]),P=["/methods","/paper","/papers","/tasks","/benchmark","/conferences"];function k(e,a=window.location.origin){if(!e)return null;let t;if(e.startsWith("/"))t=e;else try{const n=new URL(e,a);if(!x.has(n.hostname))return null;t=`${n.pathname}${n.search}${n.hash}`}catch{return null}const r=t.split(/[?#]/,1)[0];return P.some(n=>r===n||r.startsWith(`${n}/`))?t:null}function I(e){const t=e.split(/[?#]/,1)[0].match(/^\/papers?\/([^/]+)$/);if(!t||t[1].includes("%"))return null;const r=t[1],n=/^\d{4}[.-]\d{4,5}(?:v\d+)?$/.test(r),s=/^[1-9]\d*$/.test(r);return!n&&!s?null:c(r)}const M=({text:e,className:a=""})=>o.jsx("div",{className:a,children:o.jsx(h,{remarkPlugins:[f,m],rehypePlugins:[p],components:{a:({href:t,children:r,node:n,...s})=>{const i=k(t);if(i){const l=I(i);return l?o.jsx(d,{routeId:l,to:i,...s,children:r}):o.jsx(u,{to:i,...s,children:r})}return o.jsx("a",{href:t,target:"_blank",rel:"noopener noreferrer",...s,children:r})}},children:e})});export{M,k as r}; +import{w as c,j as o,L as u}from"./index-CHGpuh10.js";/* empty css */import{r as p,a as m,P as d}from"./PaperPreviewLink-CPkn2Kqv.js";import{M as h}from"./index-B141zdPU.js";import{r as f}from"./index-BzjqtLRb.js";function w(e){return(e??"").split(",").map(a=>a.trim().toLowerCase()).filter(Boolean)}const x=new Set(["paperswithcode.co","www.paperswithcode.co","localhost","127.0.0.1",...w(void 0)]),P=["/methods","/paper","/papers","/tasks","/benchmark","/conferences"];function k(e,a=window.location.origin){if(!e)return null;let t;if(e.startsWith("/"))t=e;else try{const n=new URL(e,a);if(!x.has(n.hostname))return null;t=`${n.pathname}${n.search}${n.hash}`}catch{return null}const r=t.split(/[?#]/,1)[0];return P.some(n=>r===n||r.startsWith(`${n}/`))?t:null}function I(e){const t=e.split(/[?#]/,1)[0].match(/^\/papers?\/([^/]+)$/);if(!t||t[1].includes("%"))return null;const r=t[1],n=/^\d{4}[.-]\d{4,5}(?:v\d+)?$/.test(r),s=/^[1-9]\d*$/.test(r);return!n&&!s?null:c(r)}const M=({text:e,className:a=""})=>o.jsx("div",{className:a,children:o.jsx(h,{remarkPlugins:[f,m],rehypePlugins:[p],components:{a:({href:t,children:r,node:n,...s})=>{const i=k(t);if(i){const l=I(i);return l?o.jsx(d,{routeId:l,to:i,...s,children:r}):o.jsx(u,{to:i,...s,children:r})}return o.jsx("a",{href:t,target:"_blank",rel:"noopener noreferrer",...s,children:r})}},children:e})});export{M,k as r}; diff --git a/assets/McpShowcase-Bo79ATLK.js b/assets/McpShowcase-D5BEHBL4.js similarity index 84% rename from assets/McpShowcase-Bo79ATLK.js rename to assets/McpShowcase-D5BEHBL4.js index ec16b65d21fffb532d53a5e501cf1b80ebc7abce..ea4a8351d31680c7b8eebf3035ba4043c29c8519 100644 --- a/assets/McpShowcase-Bo79ATLK.js +++ b/assets/McpShowcase-D5BEHBL4.js @@ -1 +1 @@ -import{j as e,L as t}from"./index-CjdUkE4w.js";import{A as a}from"./AgentLogos-xoTIu0NB.js";function n({className:s="",canNavigate:r}){return e.jsxs("div",{className:`sidebar-section sidebar-section-tools ${s}`.trim(),children:[e.jsx("div",{className:"sidebar-label",children:"Use PwC with your agent"}),e.jsxs(t,{to:"/mcp",className:"action-btn sidebar-tools-mcp",title:"Connect Claude, Codex, Cursor, or OpenCode to the PwC MCP server",onClick:o=>{r&&!r()&&o.preventDefault()},children:["MCP server",e.jsx(a,{})]}),e.jsxs("p",{className:"sidebar-tools-copy",children:["Search papers, benchmarks, and leaderboards from any MCP client, or from the terminal with the"," ",e.jsxs("a",{href:"https://github.com/huggingface/pwc-cli",target:"_blank",rel:"noreferrer",children:[e.jsx("code",{children:"pwc"})," CLI"]}),"."]})]})}export{n as M}; +import{j as e,L as t}from"./index-CHGpuh10.js";import{A as a}from"./AgentLogos-PqR86_NK.js";function n({className:s="",canNavigate:r}){return e.jsxs("div",{className:`sidebar-section sidebar-section-tools ${s}`.trim(),children:[e.jsx("div",{className:"sidebar-label",children:"Use PwC with your agent"}),e.jsxs(t,{to:"/mcp",className:"action-btn sidebar-tools-mcp",title:"Connect Claude, Codex, Cursor, or OpenCode to the PwC MCP server",onClick:o=>{r&&!r()&&o.preventDefault()},children:["MCP server",e.jsx(a,{})]}),e.jsxs("p",{className:"sidebar-tools-copy",children:["Search papers, benchmarks, and leaderboards from any MCP client, or from the terminal with the"," ",e.jsxs("a",{href:"https://github.com/huggingface/pwc-cli",target:"_blank",rel:"noreferrer",children:[e.jsx("code",{children:"pwc"})," CLI"]}),"."]})]})}export{n as M}; diff --git a/assets/McpView-A6zV6cTb.js b/assets/McpView-B1VMxy4R.js similarity index 97% rename from assets/McpView-A6zV6cTb.js rename to assets/McpView-B1VMxy4R.js index e1286f389e2834fa25f005502ce9d1b14ba8c647..bb27b181b523499bd4ced42cbe3c920559129f42 100644 --- a/assets/McpView-A6zV6cTb.js +++ b/assets/McpView-B1VMxy4R.js @@ -1,4 +1,4 @@ -import{s as b,b as x,V as m,j as e,C as j}from"./index-CjdUkE4w.js";import{u as g,f as y}from"./useDocumentTitle-2Ho8_KfW.js";import{q as f}from"./queryOptions-C9woPjwX.js";import{G as v}from"./github-4bW4WI_e.js";import{E as o}from"./external-link-CTLWFJ8S.js";import{C as w}from"./copy-SoF5zg-g.js";/** +import{s as b,b as x,V as m,j as e,C as j}from"./index-CHGpuh10.js";import{u as g,f as y}from"./useDocumentTitle-Deu479Zd.js";import{q as f}from"./queryOptions-C9woPjwX.js";import{G as v}from"./github-CRId1LT2.js";import{E as o}from"./external-link-CeQVHd7V.js";import{C as w}from"./copy-CvlL053K.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/MethodDetailView-DVIskZnq.js b/assets/MethodDetailView-BI5O9w4y.js similarity index 92% rename from assets/MethodDetailView-DVIskZnq.js rename to assets/MethodDetailView-BI5O9w4y.js index 7472d27125b8c8e465823a36759bae01d43723e2..ec1206e08c3457775998b9f6893f5599aba6815e 100644 --- a/assets/MethodDetailView-DVIskZnq.js +++ b/assets/MethodDetailView-BI5O9w4y.js @@ -1 +1 @@ -import{j as e,d as I,u as P,b as k,p as V,L as _,o as A,T as v}from"./index-CjdUkE4w.js";import{R as H}from"./ResearchFollowButton-DcTptDpW.js";import{M as Q}from"./SotaBadges-CyScuNCv.js";import{u as q,b as K,a as R}from"./PaperFeed-D3FZw29k.js";import{r as G,M as L}from"./MarkdownText-MrITlqRE.js";import{c as b}from"./catalog-qXcKve0z.js";import{p as U}from"./papers-DgZwjF3K.js";import{i as O}from"./apiErrors-D0w5By9R.js";import{s as W}from"./slug-BpH-Nkvz.js";import{t as Z}from"./transform-CRNzYLch.js";import{u as X}from"./usePapers-BZThqZCx.js";import{S as N}from"./skeleton-DTWi7Ctg.js";import{A as Y,a as J}from"./alert-BM9Xfuyy.js";import{s as ee}from"./safeExternalHref-CkBrsh84.js";import te from"./NotFound-BeWhm9El.js";import"./researchTopic-NmABF6tT.js";import"./useMutation-BYtVrkc7.js";import"./plus-AztI1566.js";import"./colors-BkWRhvFI.js";import"./PaperCard-dvXhr75r.js";import"./AuthorAvatar-D9249Frl.js";import"./Icon-CGRs4BYD.js";import"./LatexTitle-DESKtS30.js";import"./popover-Df5_dywQ.js";import"./useIntersectionObserver-Ch6RpsSk.js";/* empty css */import"./PaperPreviewLink-zGfFNaz6.js";import"./index-tLcwYp0U.js";import"./index-Dj6aE-6E.js";import"./katex-DkKDou_j.js";import"./hover-card-CIBIV2Hx.js";import"./curation-CyyuHfv5.js";import"./useInfiniteQuery-DeZTTVbI.js";const t={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"},n=({x:s,y:r,w:l,h:d,fill:o,stroke:p,label:h,fontSize:c=10})=>e.jsxs("g",{children:[e.jsx("rect",{x:s,y:r,width:l,height:d,rx:"3",ry:"3",fill:o,stroke:p,strokeWidth:"1"}),e.jsx("text",{x:s+l/2,y:r+d/2,fontSize:c,fontFamily:"var(--sans)",fill:t.ink,textAnchor:"middle",dominantBaseline:"middle",children:h})]}),se=()=>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:t.faint,textAnchor:"middle",children:"Scaled Dot-Product Attention"}),e.jsx(n,{x:140,y:40,w:80,h:26,fill:t.yellow,stroke:t.yellowS,label:"MatMul",fontSize:11}),e.jsx("path",{d:"M180 66 L180 80",stroke:t.ink}),e.jsx(n,{x:140,y:80,w:80,h:26,fill:t.green,stroke:t.greenS,label:"SoftMax",fontSize:11}),e.jsx("path",{d:"M180 106 L180 120",stroke:t.ink}),e.jsx(n,{x:140,y:120,w:80,h:26,fill:t.purple,stroke:t.purpleS,label:"Mask (opt.)",fontSize:11}),e.jsx("path",{d:"M180 146 L180 160",stroke:t.ink}),e.jsx(n,{x:140,y:160,w:80,h:26,fill:t.blue,stroke:t.blueS,label:"Scale ÷√dₖ",fontSize:11}),e.jsx("path",{d:"M180 186 L180 200",stroke:t.ink}),e.jsx(n,{x:140,y:200,w:80,h:26,fill:t.yellow,stroke:t.yellowS,label:"MatMul",fontSize:11}),e.jsx("path",{d:"M156 226 L120 270",stroke:t.ink}),e.jsx("path",{d:"M180 226 L180 270",stroke:t.ink}),e.jsx("path",{d:"M204 226 L240 270",stroke:t.ink}),e.jsx(n,{x:100,y:270,w:40,h:24,fill:t.pink,stroke:t.pinkS,label:"Q",fontSize:13}),e.jsx(n,{x:160,y:270,w:40,h:24,fill:t.pink,stroke:t.pinkS,label:"K",fontSize:13}),e.jsx(n,{x:220,y:270,w:40,h:24,fill:t.pink,stroke:t.pinkS,label:"V",fontSize:13}),e.jsxs("text",{x:"180",y:"330",fontSize:"14",fontFamily:"var(--serif)",fontStyle:"italic",fill:t.ink,textAnchor:"middle",children:["softmax(QK",e.jsx("tspan",{fontSize:"9",baselineShift:"super",children:"⊤"})," / √d) V"]})]}),ae=()=>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:t.faint,textAnchor:"middle",children:"Contrastive learning"}),e.jsx(n,{x:120,y:40,w:120,h:26,fill:t.blue,stroke:t.blueS,label:"Input x",fontSize:11}),e.jsx("path",{d:"M180 66 V76 M90 76 H270 M90 76 V88 M270 76 V88",stroke:t.ink}),e.jsx(n,{x:35,y:88,w:110,h:26,fill:t.yellow,stroke:t.yellowS,label:"Augment t₁",fontSize:11}),e.jsx(n,{x:215,y:88,w:110,h:26,fill:t.yellow,stroke:t.yellowS,label:"Augment t₂",fontSize:11}),e.jsx("path",{d:"M90 114 V138 M270 114 V138",stroke:t.ink}),e.jsx(n,{x:35,y:138,w:110,h:26,fill:t.orange,stroke:t.orangeS,label:"Encoder f",fontSize:11}),e.jsx(n,{x:215,y:138,w:110,h:26,fill:t.orange,stroke:t.orangeS,label:"Encoder f",fontSize:11}),e.jsx("text",{x:"180",y:"155",fontSize:"9",fontFamily:"var(--serif)",fontStyle:"italic",fill:t.faint,textAnchor:"middle",children:"shared weights"}),e.jsx("path",{d:"M90 164 V188 M270 164 V188",stroke:t.ink}),e.jsx(n,{x:35,y:188,w:110,h:26,fill:t.purple,stroke:t.purpleS,label:"Projection g",fontSize:11}),e.jsx(n,{x:215,y:188,w:110,h:26,fill:t.purple,stroke:t.purpleS,label:"Projection g",fontSize:11}),e.jsx("path",{d:"M90 214 V238 M270 214 V238",stroke:t.ink}),e.jsx(n,{x:35,y:238,w:110,h:26,fill:t.pink,stroke:t.pinkS,label:"z₁",fontSize:13}),e.jsx(n,{x:215,y:238,w:110,h:26,fill:t.pink,stroke:t.pinkS,label:"z₂",fontSize:13}),e.jsx("path",{d:"M145 251 H215",stroke:t.greenS,strokeWidth:"1.5",strokeDasharray:"4 3"}),e.jsx("text",{x:"180",y:"244",fontSize:"9",fontFamily:"var(--sans)",fill:t.greenS,textAnchor:"middle",children:"attract"}),e.jsx("text",{x:"180",y:"318",fontSize:"12",fontFamily:"var(--serif)",fontStyle:"italic",fill:t.ink,textAnchor:"middle",children:"Positive pair: pull together"}),e.jsx("text",{x:"180",y:"336",fontSize:"12",fontFamily:"var(--serif)",fontStyle:"italic",fill:t.ink,textAnchor:"middle",children:"Other samples: push apart"}),e.jsx("text",{x:"180",y:"370",fontSize:"11",fontFamily:"var(--serif)",fill:t.faint,textAnchor:"middle",children:"InfoNCE: maximize sim(z₁, z₂) / τ"})]}),re=[["my-skill/",""],["├── SKILL.md","# Required: metadata + instructions"],["├── scripts/","# Optional: executable code"],["├── references/","# Optional: documentation"],["├── assets/","# Optional: templates, resources"],["└── ...","# Any additional files or directories"]],le=()=>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:t.faint,textAnchor:"middle",children:"Skill package layout"}),e.jsx("rect",{x:"28",y:"48",width:"304",height:"318",rx:"8",fill:"#FFFDF8",stroke:t.faint,strokeWidth:"1"}),re.map(([s,r],l)=>{const d=92+l*44;return e.jsxs("g",{children:[e.jsx("text",{x:"44",y:d,fontSize:"11",fontFamily:"var(--mono)",fill:t.ink,dominantBaseline:"middle",children:s}),r?e.jsx("text",{x:"138",y:d,fontSize:"8.5",fontFamily:"var(--mono)",fill:t.faint,dominantBaseline:"middle",children:r}):null]},s)})]}),ie={attention:se,"contrastive-learning":ae,"agent-skills":le},ne=({method:s})=>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:t.faint,textAnchor:"middle",children:s.name||"method"}),e.jsx(n,{x:80,y:70,w:200,h:50,fill:t.blue,stroke:t.blueS,label:"Input",fontSize:12}),e.jsx("path",{d:"M180 120 L180 150",stroke:t.ink}),e.jsx(n,{x:80,y:150,w:200,h:70,fill:t.orange,stroke:t.orangeS,label:s.name||"transform",fontSize:13}),e.jsx("path",{d:"M180 220 L180 250",stroke:t.ink}),e.jsx(n,{x:80,y:250,w:200,h:50,fill:t.purple,stroke:t.purpleS,label:"Output",fontSize:12})]}),oe=({method:s})=>{const r=(s.slug||"").toLowerCase(),l=ie[r];if(l)return e.jsx("div",{className:"method-figure-svg method-figure-svg--schematic",children:e.jsx(l,{})});if(s.image_url){const d=r==="transformer"||r==="gpt-4"||r==="gpt-4o"||r==="multi-head-attention"?" method-figure-svg--compact":r==="rpn"?" method-figure-svg--scaled-80":"";return e.jsx("div",{className:`method-figure-svg method-figure-svg--image${d}`,children:e.jsx("img",{className:"method-figure-img",src:s.image_url,alt:`${s.name} figure`})})}return e.jsx("div",{className:"method-figure-svg method-figure-svg--schematic",children:e.jsx(ne,{method:s})})},w=720,M=138,x={top:8,right:10,bottom:25,left:36},E=56,ce=new Intl.DateTimeFormat("en",{month:"short",year:"2-digit",timeZone:"UTC"}),de=new Intl.DateTimeFormat("en",{year:"numeric",timeZone:"UTC"}),F=s=>ce.format(new Date(`${s}T00:00:00Z`)),me=(s,r)=>{if(s===0)return new Set;const l=s>48?12:s>36?6:s>18?3:2,d=Math.max(1,Math.ceil(E/r)),o=Math.max(l,d),p=s-1,h=new Set([0,p]);for(let c=o;c=E&&h.add(c);return h},T=s=>{if(s.coverage_status===void 0||["complete","not_applicable"].includes(s.coverage_status))return null;const r=s.processed_paper_count!==void 0&&s.eligible_paper_count!==void 0?`; ${s.processed_paper_count.toLocaleString()} of ${s.eligible_paper_count.toLocaleString()} eligible papers processed`:"";return`Historical tagging ${s.coverage_status==="failed"?"needs retry":"in progress"}${r}`},he=({history:s,methodName:r})=>{const[l,d]=I.useState(null),o=Math.max(1,...s.map(i=>i.paper_count)),p=w-x.left-x.right,h=M-x.top-x.bottom,c=s.length?p/s.length:p,a=Math.max(2,c*.68),g=me(s.length,c),j=Array.from(new Set([0,Math.ceil(o/2),o])),f=l==null?null:s[l],y=f?T(f):null;return e.jsxs("div",{className:"method-usage-chart-wrap",children:[e.jsxs("svg",{className:"method-usage-chart",viewBox:`0 0 ${w} ${M}`,role:"group","aria-label":`${r}: papers mentioning this method by publication month`,children:[e.jsxs("title",{children:[r,": papers mentioning this method by publication month"]}),j.map(i=>{const m=x.top+h-i/o*h;return e.jsxs("g",{children:[e.jsx("line",{className:"method-usage-gridline",x1:x.left,x2:w-x.right,y1:m,y2:m}),e.jsx("text",{className:"method-usage-y-label",x:x.left-8,y:m+3,textAnchor:"end",children:i})]},i)}),s.map((i,m)=>{const u=i.paper_count/o*h,S=i.paper_count>0?Math.max(1,u):0,C=x.left+c*m+(c-a)/2,D=x.top+h-S,$=l===m,B=m===s.length-1,z=T(i);return e.jsxs("g",{className:`method-usage-bar${$?" is-active":""}${B?" is-current":""}`,tabIndex:0,role:"img","aria-label":`${F(i.start_date)}: ${i.paper_count} ${i.paper_count===1?"paper":"papers"}${z?`. ${z}`:""}`,onMouseEnter:()=>d(m),onMouseLeave:()=>d(null),onFocus:()=>d(m),onBlur:()=>d(null),children:[e.jsx("rect",{className:"method-usage-bar-hit",x:x.left+c*m,y:x.top,width:c,height:h}),e.jsx("rect",{className:"method-usage-bar-mark",x:C,y:D,width:a,height:S,rx:"1.5"})]},i.start_date)}),s.map((i,m)=>g.has(m)?e.jsx("text",{className:"method-usage-x-label",x:x.left+c*(m+.5),y:M-11,textAnchor:"middle",children:s.length>48?de.format(new Date(`${i.start_date}T00:00:00Z`)):F(i.start_date)},i.start_date):null)]}),f&&e.jsxs("div",{className:"method-usage-tooltip",role:"status",children:[e.jsx("strong",{children:F(f.start_date)}),e.jsxs("span",{children:[f.paper_count," ",f.paper_count===1?"paper":"papers",l===s.length-1?" · month to date":""]}),e.jsxs("span",{children:[(f.catalog_share??0).toFixed(2),"% of"," ",(f.catalog_paper_count??0).toLocaleString()," catalog papers"]}),y&&e.jsx("span",{children:y})]})]})},Ge=()=>{var y,i,m;const{methodSlug:s}=P(),r=q(),l=k({queryKey:A.method(s),queryFn:()=>b.getMethod(s),enabled:!!s,staleTime:v}),d=k({queryKey:A.areas,queryFn:()=>b.listAreas({page_size:50,ordering:"name"}),enabled:!!((y=l.data)!=null&&y.area_id),staleTime:v}),o=k({queryKey:["method-trend",s],queryFn:()=>b.methodTrend(s),enabled:!!s,staleTime:v}),p=X([...V.feeds.method,s,r.filters],u=>U.forMethod(s,{...r.filters,page:u,page_size:20,repository_limit:1}),{enabled:!!s}),h=k({queryKey:["related-methods",s],queryFn:()=>b.relatedMethods(s),enabled:!!s,staleTime:v}),c=I.useMemo(()=>{var u;return((u=p.data)==null?void 0:u.pages.flatMap(S=>S.results.map(Z)))??[]},[p.data]);if(l.isLoading)return e.jsxs("div",{className:"page",children:[e.jsx(N,{className:"h-12 w-1/2 mb-4"}),e.jsx(N,{className:"h-64 w-full"})]});if(O(l.error))return e.jsx(te,{});if(l.error||!l.data)return e.jsx("div",{className:"page",children:e.jsx(Y,{variant:"destructive",children:e.jsx(J,{children:"Method not found."})})});const a=l.data,g=(i=d.data)==null?void 0:i.results.find(u=>u.id===a.area_id),j=G(a.source_url),f=j?null:ee(a.source_url);return e.jsxs("div",{className:"page",children:[e.jsxs("div",{className:"breadcrumb",children:[e.jsx(_,{to:"/methods",children:"Methods"}),g&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"sep",children:"/"}),e.jsx(_,{to:`/methods#area-${W(g.name)}`,children:g.name})]}),e.jsx("span",{className:"sep",children:"/"}),e.jsx("span",{style:{color:"var(--ink)"},children:a.name})]}),e.jsxs("div",{className:`tag-hero method-hero-grid${a.slug==="grokking"||a.slug==="latent-reasoning"||a.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:a.name}),e.jsx(H,{kind:"method",entityId:a.id}),a.full_name&&!a.name.includes(a.full_name)&&e.jsx("div",{style:{fontFamily:"var(--serif)",fontSize:16,fontStyle:"italic",color:"var(--ink-soft)",marginTop:8},children:a.full_name}),a.description&&e.jsx(L,{className:"method-description",text:a.description}),a.source_url&&a.source_title&&e.jsxs("div",{className:"method-source",children:[e.jsx("span",{className:"method-source-label",children:"Source"}),j?e.jsxs(_,{className:"method-source-link",to:j,target:"_blank",rel:"noopener noreferrer",children:[e.jsx("span",{className:"method-source-title",children:a.source_title}),a.introduced_year&&e.jsx("span",{className:"method-source-meta",children:a.introduced_year})]}):f?e.jsxs("a",{className:"method-source-link",href:f,target:"_blank",rel:"noopener noreferrer",children:[e.jsx("span",{className:"method-source-title",children:a.source_title}),a.introduced_year&&e.jsx("span",{className:"method-source-meta",children:a.introduced_year})]}):e.jsxs("div",{className:"method-source-link is-static",children:[e.jsx("span",{className:"method-source-title",children:a.source_title}),a.introduced_year&&e.jsx("span",{className:"method-source-meta",children:a.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:(a.paper_count??0).toLocaleString()})]}),o.data&&e.jsxs("div",{className:"stat",children:[e.jsx("span",{className:"label",children:"Recent mentions"}),e.jsxs("span",{className:"value",children:[(o.data.recent_paper_count*30/o.data.recent_days).toFixed(1),e.jsx("small",{children:"/mo"})]}),!o.data.comparison_complete&&e.jsx("span",{title:"Tagging is still catching up. This rate reflects mentions found so far.",children:"Partial coverage"})]}),a.introduced_year!=null&&e.jsxs("div",{className:"stat",children:[e.jsx("span",{className:"label",children:"Introduced"}),e.jsx("span",{className:"value",children:a.introduced_year})]})]}),o.isLoading?e.jsx(N,{className:"h-36 w-full method-trend-skeleton"}):o.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:o.data.recent_paper_count}),e.jsxs("span",{children:["papers / ",o.data.recent_days,"d"]})]})]}),e.jsx(he,{history:o.data.history,methodName:a.name})]}):null]}),e.jsxs("figure",{className:"method-figure-card",children:[e.jsx(oe,{method:a}),a.image_credit&&e.jsx("figcaption",{children:e.jsx(L,{className:"method-image-credit",text:a.image_credit})})]})]}),(((m=h.data)==null?void 0:m.results.length)??0)>0&&e.jsxs("div",{className:"filter-row",children:[e.jsx("span",{className:"label",children:"Related methods"}),h.data.results.map(u=>e.jsx(Q,{method:{slug:u.slug,name:u.name}},u.id))]}),e.jsx(K,{feed:r,children:e.jsxs("div",{className:"results-count",children:[c.length," papers mentioning ",a.name]})}),e.jsx(R,{query:p,cards:c,empty:"No papers tagged with this method yet."})]})};export{Ge as default}; +import{j as e,d as I,u as P,b as k,p as V,L as _,o as A,T as v}from"./index-CHGpuh10.js";import{R as H}from"./ResearchFollowButton-DFGdTBex.js";import{M as Q}from"./SotaBadges-D825CK6n.js";import{u as q,b as K,a as R}from"./PaperFeed-DjmnPHUi.js";import{r as G,M as L}from"./MarkdownText-D0AGKKJ1.js";import{c as b}from"./catalog-DMzmJg__.js";import{p as U}from"./papers-BPpxs2sO.js";import{i as O}from"./apiErrors-CvxFAcrW.js";import{s as W}from"./slug-BpH-Nkvz.js";import{t as Z}from"./transform-Cs8_lTDx.js";import{u as X}from"./usePapers-DzyOc-Ae.js";import{S as N}from"./skeleton-Df0GaMuw.js";import{A as Y,a as J}from"./alert-DPvmCXZT.js";import{s as ee}from"./safeExternalHref-CkBrsh84.js";import te from"./NotFound-Bc6y0g0J.js";import"./researchTopic-DK_KbYKH.js";import"./useMutation-3fOqWcpt.js";import"./plus-CYgr1KdS.js";import"./colors-BkWRhvFI.js";import"./PaperCard-BtCEa6CD.js";import"./AuthorAvatar-fJxhX3fO.js";import"./Icon-CRWrVPWO.js";import"./LatexTitle-CfeEppH3.js";import"./popover-BHpRw7vT.js";import"./useIntersectionObserver-DZSpsOQX.js";/* empty css */import"./PaperPreviewLink-CPkn2Kqv.js";import"./index-B141zdPU.js";import"./index-BzjqtLRb.js";import"./katex-DkKDou_j.js";import"./hover-card-Dz7z6DCn.js";import"./curation-DI9_zYNx.js";import"./useInfiniteQuery-DhWyWKGj.js";const t={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"},n=({x:s,y:r,w:l,h:d,fill:o,stroke:p,label:h,fontSize:c=10})=>e.jsxs("g",{children:[e.jsx("rect",{x:s,y:r,width:l,height:d,rx:"3",ry:"3",fill:o,stroke:p,strokeWidth:"1"}),e.jsx("text",{x:s+l/2,y:r+d/2,fontSize:c,fontFamily:"var(--sans)",fill:t.ink,textAnchor:"middle",dominantBaseline:"middle",children:h})]}),se=()=>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:t.faint,textAnchor:"middle",children:"Scaled Dot-Product Attention"}),e.jsx(n,{x:140,y:40,w:80,h:26,fill:t.yellow,stroke:t.yellowS,label:"MatMul",fontSize:11}),e.jsx("path",{d:"M180 66 L180 80",stroke:t.ink}),e.jsx(n,{x:140,y:80,w:80,h:26,fill:t.green,stroke:t.greenS,label:"SoftMax",fontSize:11}),e.jsx("path",{d:"M180 106 L180 120",stroke:t.ink}),e.jsx(n,{x:140,y:120,w:80,h:26,fill:t.purple,stroke:t.purpleS,label:"Mask (opt.)",fontSize:11}),e.jsx("path",{d:"M180 146 L180 160",stroke:t.ink}),e.jsx(n,{x:140,y:160,w:80,h:26,fill:t.blue,stroke:t.blueS,label:"Scale ÷√dₖ",fontSize:11}),e.jsx("path",{d:"M180 186 L180 200",stroke:t.ink}),e.jsx(n,{x:140,y:200,w:80,h:26,fill:t.yellow,stroke:t.yellowS,label:"MatMul",fontSize:11}),e.jsx("path",{d:"M156 226 L120 270",stroke:t.ink}),e.jsx("path",{d:"M180 226 L180 270",stroke:t.ink}),e.jsx("path",{d:"M204 226 L240 270",stroke:t.ink}),e.jsx(n,{x:100,y:270,w:40,h:24,fill:t.pink,stroke:t.pinkS,label:"Q",fontSize:13}),e.jsx(n,{x:160,y:270,w:40,h:24,fill:t.pink,stroke:t.pinkS,label:"K",fontSize:13}),e.jsx(n,{x:220,y:270,w:40,h:24,fill:t.pink,stroke:t.pinkS,label:"V",fontSize:13}),e.jsxs("text",{x:"180",y:"330",fontSize:"14",fontFamily:"var(--serif)",fontStyle:"italic",fill:t.ink,textAnchor:"middle",children:["softmax(QK",e.jsx("tspan",{fontSize:"9",baselineShift:"super",children:"⊤"})," / √d) V"]})]}),ae=()=>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:t.faint,textAnchor:"middle",children:"Contrastive learning"}),e.jsx(n,{x:120,y:40,w:120,h:26,fill:t.blue,stroke:t.blueS,label:"Input x",fontSize:11}),e.jsx("path",{d:"M180 66 V76 M90 76 H270 M90 76 V88 M270 76 V88",stroke:t.ink}),e.jsx(n,{x:35,y:88,w:110,h:26,fill:t.yellow,stroke:t.yellowS,label:"Augment t₁",fontSize:11}),e.jsx(n,{x:215,y:88,w:110,h:26,fill:t.yellow,stroke:t.yellowS,label:"Augment t₂",fontSize:11}),e.jsx("path",{d:"M90 114 V138 M270 114 V138",stroke:t.ink}),e.jsx(n,{x:35,y:138,w:110,h:26,fill:t.orange,stroke:t.orangeS,label:"Encoder f",fontSize:11}),e.jsx(n,{x:215,y:138,w:110,h:26,fill:t.orange,stroke:t.orangeS,label:"Encoder f",fontSize:11}),e.jsx("text",{x:"180",y:"155",fontSize:"9",fontFamily:"var(--serif)",fontStyle:"italic",fill:t.faint,textAnchor:"middle",children:"shared weights"}),e.jsx("path",{d:"M90 164 V188 M270 164 V188",stroke:t.ink}),e.jsx(n,{x:35,y:188,w:110,h:26,fill:t.purple,stroke:t.purpleS,label:"Projection g",fontSize:11}),e.jsx(n,{x:215,y:188,w:110,h:26,fill:t.purple,stroke:t.purpleS,label:"Projection g",fontSize:11}),e.jsx("path",{d:"M90 214 V238 M270 214 V238",stroke:t.ink}),e.jsx(n,{x:35,y:238,w:110,h:26,fill:t.pink,stroke:t.pinkS,label:"z₁",fontSize:13}),e.jsx(n,{x:215,y:238,w:110,h:26,fill:t.pink,stroke:t.pinkS,label:"z₂",fontSize:13}),e.jsx("path",{d:"M145 251 H215",stroke:t.greenS,strokeWidth:"1.5",strokeDasharray:"4 3"}),e.jsx("text",{x:"180",y:"244",fontSize:"9",fontFamily:"var(--sans)",fill:t.greenS,textAnchor:"middle",children:"attract"}),e.jsx("text",{x:"180",y:"318",fontSize:"12",fontFamily:"var(--serif)",fontStyle:"italic",fill:t.ink,textAnchor:"middle",children:"Positive pair: pull together"}),e.jsx("text",{x:"180",y:"336",fontSize:"12",fontFamily:"var(--serif)",fontStyle:"italic",fill:t.ink,textAnchor:"middle",children:"Other samples: push apart"}),e.jsx("text",{x:"180",y:"370",fontSize:"11",fontFamily:"var(--serif)",fill:t.faint,textAnchor:"middle",children:"InfoNCE: maximize sim(z₁, z₂) / τ"})]}),re=[["my-skill/",""],["├── SKILL.md","# Required: metadata + instructions"],["├── scripts/","# Optional: executable code"],["├── references/","# Optional: documentation"],["├── assets/","# Optional: templates, resources"],["└── ...","# Any additional files or directories"]],le=()=>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:t.faint,textAnchor:"middle",children:"Skill package layout"}),e.jsx("rect",{x:"28",y:"48",width:"304",height:"318",rx:"8",fill:"#FFFDF8",stroke:t.faint,strokeWidth:"1"}),re.map(([s,r],l)=>{const d=92+l*44;return e.jsxs("g",{children:[e.jsx("text",{x:"44",y:d,fontSize:"11",fontFamily:"var(--mono)",fill:t.ink,dominantBaseline:"middle",children:s}),r?e.jsx("text",{x:"138",y:d,fontSize:"8.5",fontFamily:"var(--mono)",fill:t.faint,dominantBaseline:"middle",children:r}):null]},s)})]}),ie={attention:se,"contrastive-learning":ae,"agent-skills":le},ne=({method:s})=>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:t.faint,textAnchor:"middle",children:s.name||"method"}),e.jsx(n,{x:80,y:70,w:200,h:50,fill:t.blue,stroke:t.blueS,label:"Input",fontSize:12}),e.jsx("path",{d:"M180 120 L180 150",stroke:t.ink}),e.jsx(n,{x:80,y:150,w:200,h:70,fill:t.orange,stroke:t.orangeS,label:s.name||"transform",fontSize:13}),e.jsx("path",{d:"M180 220 L180 250",stroke:t.ink}),e.jsx(n,{x:80,y:250,w:200,h:50,fill:t.purple,stroke:t.purpleS,label:"Output",fontSize:12})]}),oe=({method:s})=>{const r=(s.slug||"").toLowerCase(),l=ie[r];if(l)return e.jsx("div",{className:"method-figure-svg method-figure-svg--schematic",children:e.jsx(l,{})});if(s.image_url){const d=r==="transformer"||r==="gpt-4"||r==="gpt-4o"||r==="multi-head-attention"?" method-figure-svg--compact":r==="rpn"?" method-figure-svg--scaled-80":"";return e.jsx("div",{className:`method-figure-svg method-figure-svg--image${d}`,children:e.jsx("img",{className:"method-figure-img",src:s.image_url,alt:`${s.name} figure`})})}return e.jsx("div",{className:"method-figure-svg method-figure-svg--schematic",children:e.jsx(ne,{method:s})})},w=720,M=138,x={top:8,right:10,bottom:25,left:36},E=56,ce=new Intl.DateTimeFormat("en",{month:"short",year:"2-digit",timeZone:"UTC"}),de=new Intl.DateTimeFormat("en",{year:"numeric",timeZone:"UTC"}),F=s=>ce.format(new Date(`${s}T00:00:00Z`)),me=(s,r)=>{if(s===0)return new Set;const l=s>48?12:s>36?6:s>18?3:2,d=Math.max(1,Math.ceil(E/r)),o=Math.max(l,d),p=s-1,h=new Set([0,p]);for(let c=o;c=E&&h.add(c);return h},T=s=>{if(s.coverage_status===void 0||["complete","not_applicable"].includes(s.coverage_status))return null;const r=s.processed_paper_count!==void 0&&s.eligible_paper_count!==void 0?`; ${s.processed_paper_count.toLocaleString()} of ${s.eligible_paper_count.toLocaleString()} eligible papers processed`:"";return`Historical tagging ${s.coverage_status==="failed"?"needs retry":"in progress"}${r}`},he=({history:s,methodName:r})=>{const[l,d]=I.useState(null),o=Math.max(1,...s.map(i=>i.paper_count)),p=w-x.left-x.right,h=M-x.top-x.bottom,c=s.length?p/s.length:p,a=Math.max(2,c*.68),g=me(s.length,c),j=Array.from(new Set([0,Math.ceil(o/2),o])),f=l==null?null:s[l],y=f?T(f):null;return e.jsxs("div",{className:"method-usage-chart-wrap",children:[e.jsxs("svg",{className:"method-usage-chart",viewBox:`0 0 ${w} ${M}`,role:"group","aria-label":`${r}: papers mentioning this method by publication month`,children:[e.jsxs("title",{children:[r,": papers mentioning this method by publication month"]}),j.map(i=>{const m=x.top+h-i/o*h;return e.jsxs("g",{children:[e.jsx("line",{className:"method-usage-gridline",x1:x.left,x2:w-x.right,y1:m,y2:m}),e.jsx("text",{className:"method-usage-y-label",x:x.left-8,y:m+3,textAnchor:"end",children:i})]},i)}),s.map((i,m)=>{const u=i.paper_count/o*h,S=i.paper_count>0?Math.max(1,u):0,C=x.left+c*m+(c-a)/2,D=x.top+h-S,$=l===m,B=m===s.length-1,z=T(i);return e.jsxs("g",{className:`method-usage-bar${$?" is-active":""}${B?" is-current":""}`,tabIndex:0,role:"img","aria-label":`${F(i.start_date)}: ${i.paper_count} ${i.paper_count===1?"paper":"papers"}${z?`. ${z}`:""}`,onMouseEnter:()=>d(m),onMouseLeave:()=>d(null),onFocus:()=>d(m),onBlur:()=>d(null),children:[e.jsx("rect",{className:"method-usage-bar-hit",x:x.left+c*m,y:x.top,width:c,height:h}),e.jsx("rect",{className:"method-usage-bar-mark",x:C,y:D,width:a,height:S,rx:"1.5"})]},i.start_date)}),s.map((i,m)=>g.has(m)?e.jsx("text",{className:"method-usage-x-label",x:x.left+c*(m+.5),y:M-11,textAnchor:"middle",children:s.length>48?de.format(new Date(`${i.start_date}T00:00:00Z`)):F(i.start_date)},i.start_date):null)]}),f&&e.jsxs("div",{className:"method-usage-tooltip",role:"status",children:[e.jsx("strong",{children:F(f.start_date)}),e.jsxs("span",{children:[f.paper_count," ",f.paper_count===1?"paper":"papers",l===s.length-1?" · month to date":""]}),e.jsxs("span",{children:[(f.catalog_share??0).toFixed(2),"% of"," ",(f.catalog_paper_count??0).toLocaleString()," catalog papers"]}),y&&e.jsx("span",{children:y})]})]})},Ge=()=>{var y,i,m;const{methodSlug:s}=P(),r=q(),l=k({queryKey:A.method(s),queryFn:()=>b.getMethod(s),enabled:!!s,staleTime:v}),d=k({queryKey:A.areas,queryFn:()=>b.listAreas({page_size:50,ordering:"name"}),enabled:!!((y=l.data)!=null&&y.area_id),staleTime:v}),o=k({queryKey:["method-trend",s],queryFn:()=>b.methodTrend(s),enabled:!!s,staleTime:v}),p=X([...V.feeds.method,s,r.filters],u=>U.forMethod(s,{...r.filters,page:u,page_size:20,repository_limit:1}),{enabled:!!s}),h=k({queryKey:["related-methods",s],queryFn:()=>b.relatedMethods(s),enabled:!!s,staleTime:v}),c=I.useMemo(()=>{var u;return((u=p.data)==null?void 0:u.pages.flatMap(S=>S.results.map(Z)))??[]},[p.data]);if(l.isLoading)return e.jsxs("div",{className:"page",children:[e.jsx(N,{className:"h-12 w-1/2 mb-4"}),e.jsx(N,{className:"h-64 w-full"})]});if(O(l.error))return e.jsx(te,{});if(l.error||!l.data)return e.jsx("div",{className:"page",children:e.jsx(Y,{variant:"destructive",children:e.jsx(J,{children:"Method not found."})})});const a=l.data,g=(i=d.data)==null?void 0:i.results.find(u=>u.id===a.area_id),j=G(a.source_url),f=j?null:ee(a.source_url);return e.jsxs("div",{className:"page",children:[e.jsxs("div",{className:"breadcrumb",children:[e.jsx(_,{to:"/methods",children:"Methods"}),g&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"sep",children:"/"}),e.jsx(_,{to:`/methods#area-${W(g.name)}`,children:g.name})]}),e.jsx("span",{className:"sep",children:"/"}),e.jsx("span",{style:{color:"var(--ink)"},children:a.name})]}),e.jsxs("div",{className:`tag-hero method-hero-grid${a.slug==="grokking"||a.slug==="latent-reasoning"||a.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:a.name}),e.jsx(H,{kind:"method",entityId:a.id}),a.full_name&&!a.name.includes(a.full_name)&&e.jsx("div",{style:{fontFamily:"var(--serif)",fontSize:16,fontStyle:"italic",color:"var(--ink-soft)",marginTop:8},children:a.full_name}),a.description&&e.jsx(L,{className:"method-description",text:a.description}),a.source_url&&a.source_title&&e.jsxs("div",{className:"method-source",children:[e.jsx("span",{className:"method-source-label",children:"Source"}),j?e.jsxs(_,{className:"method-source-link",to:j,target:"_blank",rel:"noopener noreferrer",children:[e.jsx("span",{className:"method-source-title",children:a.source_title}),a.introduced_year&&e.jsx("span",{className:"method-source-meta",children:a.introduced_year})]}):f?e.jsxs("a",{className:"method-source-link",href:f,target:"_blank",rel:"noopener noreferrer",children:[e.jsx("span",{className:"method-source-title",children:a.source_title}),a.introduced_year&&e.jsx("span",{className:"method-source-meta",children:a.introduced_year})]}):e.jsxs("div",{className:"method-source-link is-static",children:[e.jsx("span",{className:"method-source-title",children:a.source_title}),a.introduced_year&&e.jsx("span",{className:"method-source-meta",children:a.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:(a.paper_count??0).toLocaleString()})]}),o.data&&e.jsxs("div",{className:"stat",children:[e.jsx("span",{className:"label",children:"Recent mentions"}),e.jsxs("span",{className:"value",children:[(o.data.recent_paper_count*30/o.data.recent_days).toFixed(1),e.jsx("small",{children:"/mo"})]}),!o.data.comparison_complete&&e.jsx("span",{title:"Tagging is still catching up. This rate reflects mentions found so far.",children:"Partial coverage"})]}),a.introduced_year!=null&&e.jsxs("div",{className:"stat",children:[e.jsx("span",{className:"label",children:"Introduced"}),e.jsx("span",{className:"value",children:a.introduced_year})]})]}),o.isLoading?e.jsx(N,{className:"h-36 w-full method-trend-skeleton"}):o.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:o.data.recent_paper_count}),e.jsxs("span",{children:["papers / ",o.data.recent_days,"d"]})]})]}),e.jsx(he,{history:o.data.history,methodName:a.name})]}):null]}),e.jsxs("figure",{className:"method-figure-card",children:[e.jsx(oe,{method:a}),a.image_credit&&e.jsx("figcaption",{children:e.jsx(L,{className:"method-image-credit",text:a.image_credit})})]})]}),(((m=h.data)==null?void 0:m.results.length)??0)>0&&e.jsxs("div",{className:"filter-row",children:[e.jsx("span",{className:"label",children:"Related methods"}),h.data.results.map(u=>e.jsx(Q,{method:{slug:u.slug,name:u.name}},u.id))]}),e.jsx(K,{feed:r,children:e.jsxs("div",{className:"results-count",children:[c.length," papers mentioning ",a.name]})}),e.jsx(R,{query:p,cards:c,empty:"No papers tagged with this method yet."})]})};export{Ge as default}; diff --git a/assets/MethodsIndexView-BlMbRRsu.js b/assets/MethodsIndexView-CPxYYZYk.js similarity index 82% rename from assets/MethodsIndexView-BlMbRRsu.js rename to assets/MethodsIndexView-CPxYYZYk.js index 170a75277c216866ad3f5df437a32543debdcdf8..6329ce0f540f534ba2a7f77acc00a8129caffe53 100644 --- a/assets/MethodsIndexView-BlMbRRsu.js +++ b/assets/MethodsIndexView-CPxYYZYk.js @@ -1,4 +1,4 @@ -import{s as f,b as c,d as l,j as s,L as _,o as N,T as m}from"./index-CjdUkE4w.js";import{c as p}from"./catalog-qXcKve0z.js";import{s as T}from"./areas-Dvi8w2dp.js";import{s as v}from"./slug-BpH-Nkvz.js";import{A as L,a as M}from"./alert-BM9Xfuyy.js";import{A,a as F}from"./AreaSection-iYSRoy6-.js";import{T as q}from"./TaxonomySuggestionTile-ByzqhBFs.js";import{u as S,T as I}from"./useHashScrollOnReady-mScSLUem.js";import"./skeleton-DTWi7Ctg.js";import"./SignInToEditDialog-rWxdYNRK.js";import"./button-DetZl_ch.js";import"./input-7i-rZ7fA.js";import"./textarea-biscLKBK.js";import"./searchable-select-EPf13F1I.js";import"./popover-Df5_dywQ.js";import"./dialog-BzX9PD3v.js";import"./search-DxMn7VKI.js";import"./loader-circle-xTdSzHv_.js";import"./useMutation-BYtVrkc7.js";import"./submissions-CQ6M0giV.js";import"./plus-AztI1566.js";import"./trending-up-BMb-8Pi8.js";/** +import{s as f,b as c,d as l,j as s,L as _,o as N,T as m}from"./index-CHGpuh10.js";import{c as p}from"./catalog-DMzmJg__.js";import{s as T}from"./areas-Dvi8w2dp.js";import{s as v}from"./slug-BpH-Nkvz.js";import{A as L,a as M}from"./alert-DPvmCXZT.js";import{A,a as F}from"./AreaSection-BVX3JiNc.js";import{T as q}from"./TaxonomySuggestionTile-QKr6E6VG.js";import{u as S,T as I}from"./useHashScrollOnReady-BOZxHdDU.js";import"./skeleton-Df0GaMuw.js";import"./SignInToEditDialog-B3EJVut1.js";import"./button-C4kqC3Av.js";import"./input-FDP77A0C.js";import"./textarea-CDMkQNbH.js";import"./searchable-select-9e2cCX5g.js";import"./popover-BHpRw7vT.js";import"./dialog-BfI2DQVf.js";import"./search-Czb1C2Q7.js";import"./loader-circle-DuUnmHjj.js";import"./useMutation-3fOqWcpt.js";import"./submissions-BHHAmt53.js";import"./plus-CYgr1KdS.js";import"./trending-up-Cqe6Lpc9.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/NotFound-BeWhm9El.js b/assets/NotFound-Bc6y0g0J.js similarity index 89% rename from assets/NotFound-BeWhm9El.js rename to assets/NotFound-Bc6y0g0J.js index 77e5e4fb73b0cb04a5975e83c3093bf6baf130f0..166382a606ebbc7cfa356a1d037cda34c8077de7 100644 --- a/assets/NotFound-BeWhm9El.js +++ b/assets/NotFound-Bc6y0g0J.js @@ -1 +1 @@ -import{c as o,d as s,j as t,L as a}from"./index-CjdUkE4w.js";const r=()=>{const e=o();return s.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(a,{to:"/",className:"action-btn",children:"Return home"})]})};export{r as default}; +import{c as o,d as s,j as t,L as a}from"./index-CHGpuh10.js";const r=()=>{const e=o();return s.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(a,{to:"/",className:"action-btn",children:"Return home"})]})};export{r as default}; diff --git a/assets/OrganizationContributionGraph-JI11b4D1.js b/assets/OrganizationContributionGraph-Dd08m_k9.js similarity index 94% rename from assets/OrganizationContributionGraph-JI11b4D1.js rename to assets/OrganizationContributionGraph-Dd08m_k9.js index 9c8392a5459fa7a5a8b8e285aacf06b47acf6abd..0b2f0c08c06f8a1ee265167baa7a8d2947885f20 100644 --- a/assets/OrganizationContributionGraph-JI11b4D1.js +++ b/assets/OrganizationContributionGraph-Dd08m_k9.js @@ -1 +1 @@ -import{d as b,j as o,b as $,T as z}from"./index-CjdUkE4w.js";import{S as w}from"./skeleton-DTWi7Ctg.js";import{c as y}from"./catalog-qXcKve0z.js";const x=24*60*60*1e3,f=12,N=3,v=new Map([[1,"Mon"],[3,"Wed"],[5,"Fri"]]),T=n=>new Date(`${n}T00:00:00Z`),_=n=>n.toISOString().slice(0,10),M=(n,a)=>{if(n===0)return 0;const i=a.findIndex(s=>n<=s);return i===-1?4:i+1},S=n=>{const a=T(n.start_date),i=T(n.end_date),s=new Date(a.getTime()-a.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,g)=>e-g),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 g=new Date(e),d=_(g),m=e>=a.getTime()&&e<=i.getTime(),C=m?p.get(d)??0:0;l.push({key:d,date:g,count:C,inRange:m,level:M(C,c)})}const t=l.length/7,r=[];let j=-1;for(let e=0;em.inRange&&(e===0||m.date.getUTCDate()<=7));d&&d.date.getUTCMonth()!==j&&(j=d.date.getUTCMonth(),r.length>0&&e-r[r.length-1].column<3&&r.pop(),r.push({label:d.date.toLocaleString("en",{month:"short",timeZone:"UTC"}),column:e}))}return{days:l,months:r,weekCount:t}},D=({data:n,organizationName:a,title:i="Paper contributions",noun:s="paper"})=>{const h=b.useRef(null),{days:p,months:u,weekCount:c}=b.useMemo(()=>S(n),[n]),l=c*f+(c-1)*N;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":`${a} 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,r)=>o.jsx("span",{children:v.get(r)??""},r))}),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"})]})]})},U=({organizationSlug:n,organizationName:a})=>{const i=$({queryKey:["organization-contributions",n],queryFn:()=>y.organizationContributions(n),staleTime:z});return i.isLoading?o.jsx(w,{className:"organization-contributions-skeleton"}):i.data?o.jsx(D,{data:i.data,organizationName:a}):null};export{D as C,U as O}; +import{d as b,j as o,b as $,T as z}from"./index-CHGpuh10.js";import{S as w}from"./skeleton-Df0GaMuw.js";import{c as y}from"./catalog-DMzmJg__.js";const x=24*60*60*1e3,f=12,N=3,v=new Map([[1,"Mon"],[3,"Wed"],[5,"Fri"]]),T=n=>new Date(`${n}T00:00:00Z`),_=n=>n.toISOString().slice(0,10),M=(n,a)=>{if(n===0)return 0;const i=a.findIndex(s=>n<=s);return i===-1?4:i+1},S=n=>{const a=T(n.start_date),i=T(n.end_date),s=new Date(a.getTime()-a.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,g)=>e-g),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 g=new Date(e),d=_(g),m=e>=a.getTime()&&e<=i.getTime(),C=m?p.get(d)??0:0;l.push({key:d,date:g,count:C,inRange:m,level:M(C,c)})}const t=l.length/7,r=[];let j=-1;for(let e=0;em.inRange&&(e===0||m.date.getUTCDate()<=7));d&&d.date.getUTCMonth()!==j&&(j=d.date.getUTCMonth(),r.length>0&&e-r[r.length-1].column<3&&r.pop(),r.push({label:d.date.toLocaleString("en",{month:"short",timeZone:"UTC"}),column:e}))}return{days:l,months:r,weekCount:t}},D=({data:n,organizationName:a,title:i="Paper contributions",noun:s="paper"})=>{const h=b.useRef(null),{days:p,months:u,weekCount:c}=b.useMemo(()=>S(n),[n]),l=c*f+(c-1)*N;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":`${a} 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,r)=>o.jsx("span",{children:v.get(r)??""},r))}),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"})]})]})},U=({organizationSlug:n,organizationName:a})=>{const i=$({queryKey:["organization-contributions",n],queryFn:()=>y.organizationContributions(n),staleTime:z});return i.isLoading?o.jsx(w,{className:"organization-contributions-skeleton"}):i.data?o.jsx(D,{data:i.data,organizationName:a}):null};export{D as C,U as O}; diff --git a/assets/OrganizationDetailView-ysggtQzi.js b/assets/OrganizationDetailView-DiOUhHgj.js similarity index 75% rename from assets/OrganizationDetailView-ysggtQzi.js rename to assets/OrganizationDetailView-DiOUhHgj.js index 213b2c19d2156cbfb460990980e3d42bfdb888c7..7095ddc4e7d4edd8b257634dc0b238acd9884422 100644 --- a/assets/OrganizationDetailView-ysggtQzi.js +++ b/assets/OrganizationDetailView-DiOUhHgj.js @@ -1 +1 @@ -import{e as q,d,b as N,p as C,j as r,L as y,o as Q,T as F,u as z}from"./index-CjdUkE4w.js";import{R as E}from"./ResearchFollowButton-DcTptDpW.js";import{M as I}from"./MarkdownText-MrITlqRE.js";import{O as K}from"./OrganizationContributionGraph-JI11b4D1.js";import{u as R,b as G,a as H}from"./PaperFeed-D3FZw29k.js";import{A as W,a as B}from"./alert-BM9Xfuyy.js";import{S as D}from"./searchable-select-EPf13F1I.js";import{S}from"./skeleton-DTWi7Ctg.js";import{u as U}from"./usePapers-BZThqZCx.js";import{c as v}from"./catalog-qXcKve0z.js";import{p as V}from"./papers-DgZwjF3K.js";import{i as Z}from"./apiErrors-D0w5By9R.js";import{d as L,t as J}from"./transform-CRNzYLch.js";import{o as X,i as Y}from"./organizationNames-BVKzYEBp.js";import k from"./NotFound-BeWhm9El.js";import"./researchTopic-NmABF6tT.js";import"./useMutation-BYtVrkc7.js";import"./plus-AztI1566.js";/* empty css */import"./PaperPreviewLink-zGfFNaz6.js";import"./index-tLcwYp0U.js";import"./index-Dj6aE-6E.js";import"./katex-DkKDou_j.js";import"./hover-card-CIBIV2Hx.js";import"./PaperCard-dvXhr75r.js";import"./AuthorAvatar-D9249Frl.js";import"./SotaBadges-CyScuNCv.js";import"./colors-BkWRhvFI.js";import"./Icon-CGRs4BYD.js";import"./LatexTitle-DESKtS30.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-Df5_dywQ.js";import"./useIntersectionObserver-Ch6RpsSk.js";import"./button-DetZl_ch.js";import"./dialog-BzX9PD3v.js";import"./search-DxMn7VKI.js";import"./loader-circle-xTdSzHv_.js";import"./useInfiniteQuery-DeZTTVbI.js";import"./curation-CyyuHfv5.js";const ee=({organizationSlug:a,taskSlug:n})=>{var f,x,j,_,b;const $=q(),c=R(),{searchParams:w}=c,[O,h]=d.useState(!1),u=N({queryKey:Q.organization(a),queryFn:()=>v.getOrganization(a),staleTime:F}),l=N({queryKey:["organization-areas-with-tasks",a],queryFn:()=>v.organizationAreasWithTasks(a),staleTime:F}),p=U([...C.feeds.organization,a,n,c.filters],t=>V.forOrganization(a,{...c.filters,task:n,page:t,page_size:12}),{enabled:!!a});d.useEffect(()=>{h(!1)},[a,n]);const g=d.useMemo(()=>{var t;return(((t=l.data)==null?void 0:t.results)??[]).flatMap(o=>o.tasks.filter(s=>!!s.slug).map(s=>({...s,slug:s.slug,label:L(s.name,s.slug)})))},[l.data]),i=g.find(t=>t.slug===n),T=d.useMemo(()=>{var t;return(((t=p.data)==null?void 0:t.pages)??[]).flatMap(o=>o.results.map(J))},[p.data]),e=u.data??((f=l.data)==null?void 0:f.organization),m=e?X(e):null,A=((j=(x=p.data)==null?void 0:x.pages[0])==null?void 0:j.count)??0;if([u.error,l.error,p.error].some(Z))return r.jsx(k,{});if(l.error||p.error)return r.jsx("div",{className:"page",children:r.jsx(W,{variant:"destructive",children:r.jsx(B,{children:"Failed to load organization papers. Please try again."})})});const P=t=>{const o=t.trim().toLocaleLowerCase();return g.filter(s=>`${s.label} ${s.slug}`.toLocaleLowerCase().includes(o)).map(s=>({value:s.slug,label:s.label,description:`${s.paper_count.toLocaleString()} ${s.paper_count===1?"paper":"papers"}`}))},M=t=>{const o=t==="__all__"?`/orgs/${a}`:`/orgs/${a}/${t}`,s=w.toString();$({pathname:o,search:s?`?${s}`:""})};return r.jsxs("div",{className:"page",children:[r.jsxs("nav",{className:"breadcrumb","aria-label":"Breadcrumb",children:[r.jsx(y,{to:"/",children:"Home"}),r.jsx("span",{children:" / "}),r.jsx(y,{to:"/organizations",children:"Organizations"}),r.jsx("span",{children:" / "}),r.jsx("span",{children:(e==null?void 0:e.name)??a}),i&&r.jsxs(r.Fragment,{children:[r.jsx("span",{children:" / "}),r.jsx("span",{children:L(i.name,i.slug)})]})]}),r.jsxs("header",{className:"organization-hero",children:[r.jsxs("div",{className:"organization-hero-profile",children:[r.jsx("div",{className:"organizations-eyebrow",children:"ORGANIZATION"}),r.jsxs("h1",{className:`feed-title organization-hero-title${e&&!m&&Y(e.name)?" organization-hero-title--long":""}`,children:[e!=null&&e.logo_url&&!O?r.jsx("img",{src:e.logo_url,alt:"",width:58,height:58,onError:()=>h(!0)}):e?r.jsx("span",{className:"organization-hero-monogram","aria-hidden":"true",children:(m??e.name).slice(0,1).toUpperCase()}):null,e?r.jsxs("span",{className:"organization-hero-name",children:[m??e.name,m&&r.jsx("span",{className:"organization-hero-full-name",children:e.name})]}):r.jsx(S,{className:"h-12 w-64"})]}),e&&r.jsx(E,{kind:"organization",entityId:e.id}),e&&r.jsxs("div",{className:"feed-subtitle",children:[((_=e.paper_count)==null?void 0:_.toLocaleString())??0," papers",(e.organization_trending_score??0)>0&&e.trending_rank&&r.jsxs(r.Fragment,{children:[" · #",e.trending_rank," trending this month"]})]}),(e==null?void 0:e.description)&&r.jsx(I,{className:"method-description",text:e.description}),e&&r.jsxs("div",{className:"organization-hero-links",children:[e.website_url&&r.jsx("a",{href:e.website_url,target:"_blank",rel:"noreferrer",children:"Website ↗"}),e.hf_url&&r.jsx("a",{href:e.hf_url,target:"_blank",rel:"noreferrer",children:"Hugging Face ↗"}),e.github_url&&r.jsx("a",{href:e.github_url,target:"_blank",rel:"noreferrer",children:"GitHub ↗"})]})]}),r.jsx(K,{organizationSlug:a,organizationName:(e==null?void 0:e.name)??a})]}),r.jsx(G,{feed:c,style:{alignItems:"center",gap:16},leading:r.jsx("div",{style:{minWidth:260},children:r.jsx(D,{value:n??"__all__",onChange:M,placeholder:"All tasks",searchPlaceholder:"Search organization tasks...",emptyMessage:"No matching tasks.",ariaLabel:"Filter papers by task",selectedOption:i?{value:i.slug,label:i.label,description:`${i.paper_count.toLocaleString()} ${i.paper_count===1?"paper":"papers"}`}:{value:"__all__",label:"All tasks",description:`${((b=e==null?void 0:e.paper_count)==null?void 0:b.toLocaleString())??0} papers`},queryKey:["organization-task-options",a],queryFn:async t=>{var o;return[{value:"__all__",label:"All tasks",description:`${((o=e==null?void 0:e.paper_count)==null?void 0:o.toLocaleString())??0} papers`},...P(t)]},enabled:!l.isLoading,className:"h-[38px]"})}),children:r.jsxs("div",{className:"results-count",children:[A.toLocaleString()," papers"]})}),r.jsx(H,{query:p,cards:T,showInstitution:!1,empty:(e==null?void 0:e.paper_count)===0?"No papers indexed yet":"No papers found for this selection."})]})},Ke=()=>{const{orgSlug:a,taskSlug:n}=z();return a?r.jsx(ee,{organizationSlug:a,taskSlug:n}):r.jsx(k,{})};export{Ke as default}; +import{e as q,d,b as N,p as C,j as r,L as y,o as Q,T as F,u as z}from"./index-CHGpuh10.js";import{R as E}from"./ResearchFollowButton-DFGdTBex.js";import{M as I}from"./MarkdownText-D0AGKKJ1.js";import{O as K}from"./OrganizationContributionGraph-Dd08m_k9.js";import{u as R,b as G,a as H}from"./PaperFeed-DjmnPHUi.js";import{A as W,a as B}from"./alert-DPvmCXZT.js";import{S as D}from"./searchable-select-9e2cCX5g.js";import{S}from"./skeleton-Df0GaMuw.js";import{u as U}from"./usePapers-DzyOc-Ae.js";import{c as v}from"./catalog-DMzmJg__.js";import{p as V}from"./papers-BPpxs2sO.js";import{i as Z}from"./apiErrors-CvxFAcrW.js";import{d as L,t as J}from"./transform-Cs8_lTDx.js";import{o as X,i as Y}from"./organizationNames-BVKzYEBp.js";import k from"./NotFound-Bc6y0g0J.js";import"./researchTopic-DK_KbYKH.js";import"./useMutation-3fOqWcpt.js";import"./plus-CYgr1KdS.js";/* empty css */import"./PaperPreviewLink-CPkn2Kqv.js";import"./index-B141zdPU.js";import"./index-BzjqtLRb.js";import"./katex-DkKDou_j.js";import"./hover-card-Dz7z6DCn.js";import"./PaperCard-BtCEa6CD.js";import"./AuthorAvatar-fJxhX3fO.js";import"./SotaBadges-D825CK6n.js";import"./colors-BkWRhvFI.js";import"./Icon-CRWrVPWO.js";import"./LatexTitle-CfeEppH3.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-BHpRw7vT.js";import"./useIntersectionObserver-DZSpsOQX.js";import"./button-C4kqC3Av.js";import"./dialog-BfI2DQVf.js";import"./search-Czb1C2Q7.js";import"./loader-circle-DuUnmHjj.js";import"./useInfiniteQuery-DhWyWKGj.js";import"./curation-DI9_zYNx.js";const ee=({organizationSlug:a,taskSlug:n})=>{var f,x,j,_,b;const $=q(),c=R(),{searchParams:w}=c,[O,h]=d.useState(!1),u=N({queryKey:Q.organization(a),queryFn:()=>v.getOrganization(a),staleTime:F}),l=N({queryKey:["organization-areas-with-tasks",a],queryFn:()=>v.organizationAreasWithTasks(a),staleTime:F}),p=U([...C.feeds.organization,a,n,c.filters],t=>V.forOrganization(a,{...c.filters,task:n,page:t,page_size:12}),{enabled:!!a});d.useEffect(()=>{h(!1)},[a,n]);const g=d.useMemo(()=>{var t;return(((t=l.data)==null?void 0:t.results)??[]).flatMap(o=>o.tasks.filter(s=>!!s.slug).map(s=>({...s,slug:s.slug,label:L(s.name,s.slug)})))},[l.data]),i=g.find(t=>t.slug===n),T=d.useMemo(()=>{var t;return(((t=p.data)==null?void 0:t.pages)??[]).flatMap(o=>o.results.map(J))},[p.data]),e=u.data??((f=l.data)==null?void 0:f.organization),m=e?X(e):null,A=((j=(x=p.data)==null?void 0:x.pages[0])==null?void 0:j.count)??0;if([u.error,l.error,p.error].some(Z))return r.jsx(k,{});if(l.error||p.error)return r.jsx("div",{className:"page",children:r.jsx(W,{variant:"destructive",children:r.jsx(B,{children:"Failed to load organization papers. Please try again."})})});const P=t=>{const o=t.trim().toLocaleLowerCase();return g.filter(s=>`${s.label} ${s.slug}`.toLocaleLowerCase().includes(o)).map(s=>({value:s.slug,label:s.label,description:`${s.paper_count.toLocaleString()} ${s.paper_count===1?"paper":"papers"}`}))},M=t=>{const o=t==="__all__"?`/orgs/${a}`:`/orgs/${a}/${t}`,s=w.toString();$({pathname:o,search:s?`?${s}`:""})};return r.jsxs("div",{className:"page",children:[r.jsxs("nav",{className:"breadcrumb","aria-label":"Breadcrumb",children:[r.jsx(y,{to:"/",children:"Home"}),r.jsx("span",{children:" / "}),r.jsx(y,{to:"/organizations",children:"Organizations"}),r.jsx("span",{children:" / "}),r.jsx("span",{children:(e==null?void 0:e.name)??a}),i&&r.jsxs(r.Fragment,{children:[r.jsx("span",{children:" / "}),r.jsx("span",{children:L(i.name,i.slug)})]})]}),r.jsxs("header",{className:"organization-hero",children:[r.jsxs("div",{className:"organization-hero-profile",children:[r.jsx("div",{className:"organizations-eyebrow",children:"ORGANIZATION"}),r.jsxs("h1",{className:`feed-title organization-hero-title${e&&!m&&Y(e.name)?" organization-hero-title--long":""}`,children:[e!=null&&e.logo_url&&!O?r.jsx("img",{src:e.logo_url,alt:"",width:58,height:58,onError:()=>h(!0)}):e?r.jsx("span",{className:"organization-hero-monogram","aria-hidden":"true",children:(m??e.name).slice(0,1).toUpperCase()}):null,e?r.jsxs("span",{className:"organization-hero-name",children:[m??e.name,m&&r.jsx("span",{className:"organization-hero-full-name",children:e.name})]}):r.jsx(S,{className:"h-12 w-64"})]}),e&&r.jsx(E,{kind:"organization",entityId:e.id}),e&&r.jsxs("div",{className:"feed-subtitle",children:[((_=e.paper_count)==null?void 0:_.toLocaleString())??0," papers",(e.organization_trending_score??0)>0&&e.trending_rank&&r.jsxs(r.Fragment,{children:[" · #",e.trending_rank," trending this month"]})]}),(e==null?void 0:e.description)&&r.jsx(I,{className:"method-description",text:e.description}),e&&r.jsxs("div",{className:"organization-hero-links",children:[e.website_url&&r.jsx("a",{href:e.website_url,target:"_blank",rel:"noreferrer",children:"Website ↗"}),e.hf_url&&r.jsx("a",{href:e.hf_url,target:"_blank",rel:"noreferrer",children:"Hugging Face ↗"}),e.github_url&&r.jsx("a",{href:e.github_url,target:"_blank",rel:"noreferrer",children:"GitHub ↗"})]})]}),r.jsx(K,{organizationSlug:a,organizationName:(e==null?void 0:e.name)??a})]}),r.jsx(G,{feed:c,style:{alignItems:"center",gap:16},leading:r.jsx("div",{style:{minWidth:260},children:r.jsx(D,{value:n??"__all__",onChange:M,placeholder:"All tasks",searchPlaceholder:"Search organization tasks...",emptyMessage:"No matching tasks.",ariaLabel:"Filter papers by task",selectedOption:i?{value:i.slug,label:i.label,description:`${i.paper_count.toLocaleString()} ${i.paper_count===1?"paper":"papers"}`}:{value:"__all__",label:"All tasks",description:`${((b=e==null?void 0:e.paper_count)==null?void 0:b.toLocaleString())??0} papers`},queryKey:["organization-task-options",a],queryFn:async t=>{var o;return[{value:"__all__",label:"All tasks",description:`${((o=e==null?void 0:e.paper_count)==null?void 0:o.toLocaleString())??0} papers`},...P(t)]},enabled:!l.isLoading,className:"h-[38px]"})}),children:r.jsxs("div",{className:"results-count",children:[A.toLocaleString()," papers"]})}),r.jsx(H,{query:p,cards:T,showInstitution:!1,empty:(e==null?void 0:e.paper_count)===0?"No papers indexed yet":"No papers found for this selection."})]})},Ke=()=>{const{orgSlug:a,taskSlug:n}=z();return a?r.jsx(ee,{organizationSlug:a,taskSlug:n}):r.jsx(k,{})};export{Ke as default}; diff --git a/assets/OrganizationsIndexView-ec7nj_SS.js b/assets/OrganizationsIndexView-BfbGHJbZ.js similarity index 97% rename from assets/OrganizationsIndexView-ec7nj_SS.js rename to assets/OrganizationsIndexView-BfbGHJbZ.js index a3d5b2b822000a33e9271c7736f6412c068b6ab4..9559557b62b6e2a51060434d1d315585c8553209 100644 --- a/assets/OrganizationsIndexView-ec7nj_SS.js +++ b/assets/OrganizationsIndexView-BfbGHJbZ.js @@ -1 +1 @@ -import{g as m,b as x,d as h,j as e,L as u,o as j,T as y}from"./index-CjdUkE4w.js";import{A as N,a as f}from"./alert-BM9Xfuyy.js";import{c as _}from"./catalog-qXcKve0z.js";const v=n=>n==="papers"||n==="name"?n:"trending",z=({organization:n})=>{const[d,i]=h.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:()=>i(!0)})})},L=()=>{const[n,d]=m(),i=v(n.get("sort")),c=n.get("q")??"",o=x({queryKey:[...j.organizations,"featured"],queryFn:()=>_.organizationIndex(),staleTime:y}),p=s=>{const a=new URLSearchParams(n),t=s.sort??i,r=s.query??c;t==="trending"?a.delete("sort"):a.set("sort",t),r.trim()?a.set("q",r):a.delete("q"),d(a)},g=h.useMemo(()=>{var t;const s=c.trim().toLocaleLowerCase(),a=(((t=o.data)==null?void 0:t.results)??[]).filter(r=>[r.name,r.slug,r.hf_slug??""].join(" ").toLocaleLowerCase().includes(s));return i==="papers"?[...a].sort((r,l)=>(l.paper_count??0)-(r.paper_count??0)||r.name.localeCompare(l.name)||r.slug.localeCompare(l.slug)):i==="name"?[...a].sort((r,l)=>r.name.localeCompare(l.name)||r.slug.localeCompare(l.slug)):a},[o.data,c,i]);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.jsx("h2",{id:"organizations-heading",children:o.data?`${o.data.count.toLocaleString()} organizations`:"Organizations"}),e.jsx("span",{children:i==="trending"?"Ranked by 30-day momentum":i==="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:i===s?"active":"","aria-pressed":i===s,onClick:()=>p({sort:s}),children:a},s))})]}),o.isLoading?e.jsx("div",{className:"organizations-grid","aria-busy":"true","aria-label":"Loading organizations",children:Array.from({length:12}).map((s,a)=>e.jsxs("div",{className:"organization-card organization-card-skeleton",children:[e.jsxs("div",{className:"organization-card-header",children:[e.jsx("span",{className:"organization-logo"}),e.jsxs("div",{children:[e.jsx("span",{className:"organization-skeleton-line"}),e.jsx("span",{className:"organization-skeleton-line short"})]})]}),e.jsx("div",{className:"organization-card-metrics",children:e.jsx("span",{className:"organization-skeleton-line short"})}),e.jsxs("div",{className:"organization-highlight",children:[e.jsx("span",{className:"organization-skeleton-line"}),e.jsx("span",{className:"organization-skeleton-line"})]})]},a))}):o.error?e.jsx(N,{variant:"destructive",children:e.jsxs(f,{children:["Failed to load organizations."," ",e.jsx("button",{type:"button",onClick:()=>o.refetch(),children:"Try again"})]})}):g.length===0?e.jsxs("div",{className:"organizations-empty",children:["No organizations match “",c,"”."]}):e.jsx("div",{className:"organizations-grid",children:g.map(s=>{var r;const a=s.paper_count??0,t=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(u,{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(z,{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"}),i==="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:[t?`Publishing ${t}`:"Research archive ready",e.jsx("span",{"aria-hidden":"true",children:"↗"})]})]},s.id)})})]})]})};export{L as default}; +import{g as m,b as x,d as h,j as e,L as u,o as j,T as y}from"./index-CHGpuh10.js";import{A as N,a as f}from"./alert-DPvmCXZT.js";import{c as _}from"./catalog-DMzmJg__.js";const v=n=>n==="papers"||n==="name"?n:"trending",z=({organization:n})=>{const[d,i]=h.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:()=>i(!0)})})},L=()=>{const[n,d]=m(),i=v(n.get("sort")),c=n.get("q")??"",o=x({queryKey:[...j.organizations,"featured"],queryFn:()=>_.organizationIndex(),staleTime:y}),p=s=>{const a=new URLSearchParams(n),t=s.sort??i,r=s.query??c;t==="trending"?a.delete("sort"):a.set("sort",t),r.trim()?a.set("q",r):a.delete("q"),d(a)},g=h.useMemo(()=>{var t;const s=c.trim().toLocaleLowerCase(),a=(((t=o.data)==null?void 0:t.results)??[]).filter(r=>[r.name,r.slug,r.hf_slug??""].join(" ").toLocaleLowerCase().includes(s));return i==="papers"?[...a].sort((r,l)=>(l.paper_count??0)-(r.paper_count??0)||r.name.localeCompare(l.name)||r.slug.localeCompare(l.slug)):i==="name"?[...a].sort((r,l)=>r.name.localeCompare(l.name)||r.slug.localeCompare(l.slug)):a},[o.data,c,i]);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.jsx("h2",{id:"organizations-heading",children:o.data?`${o.data.count.toLocaleString()} organizations`:"Organizations"}),e.jsx("span",{children:i==="trending"?"Ranked by 30-day momentum":i==="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:i===s?"active":"","aria-pressed":i===s,onClick:()=>p({sort:s}),children:a},s))})]}),o.isLoading?e.jsx("div",{className:"organizations-grid","aria-busy":"true","aria-label":"Loading organizations",children:Array.from({length:12}).map((s,a)=>e.jsxs("div",{className:"organization-card organization-card-skeleton",children:[e.jsxs("div",{className:"organization-card-header",children:[e.jsx("span",{className:"organization-logo"}),e.jsxs("div",{children:[e.jsx("span",{className:"organization-skeleton-line"}),e.jsx("span",{className:"organization-skeleton-line short"})]})]}),e.jsx("div",{className:"organization-card-metrics",children:e.jsx("span",{className:"organization-skeleton-line short"})}),e.jsxs("div",{className:"organization-highlight",children:[e.jsx("span",{className:"organization-skeleton-line"}),e.jsx("span",{className:"organization-skeleton-line"})]})]},a))}):o.error?e.jsx(N,{variant:"destructive",children:e.jsxs(f,{children:["Failed to load organizations."," ",e.jsx("button",{type:"button",onClick:()=>o.refetch(),children:"Try again"})]})}):g.length===0?e.jsxs("div",{className:"organizations-empty",children:["No organizations match “",c,"”."]}):e.jsx("div",{className:"organizations-grid",children:g.map(s=>{var r;const a=s.paper_count??0,t=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(u,{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(z,{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"}),i==="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:[t?`Publishing ${t}`:"Research archive ready",e.jsx("span",{"aria-hidden":"true",children:"↗"})]})]},s.id)})})]})]})};export{L as default}; diff --git a/assets/PaperCard-dvXhr75r.js b/assets/PaperCard-BtCEa6CD.js similarity index 96% rename from assets/PaperCard-dvXhr75r.js rename to assets/PaperCard-BtCEa6CD.js index d5e8633752872cfcb56198b7f953c87582c882f9..c87558a4b9e13a69fd8ac5d7f3e130a50dc01ce5 100644 --- a/assets/PaperCard-dvXhr75r.js +++ b/assets/PaperCard-BtCEa6CD.js @@ -1 +1 @@ -import{i as v,V as g,T as M,p as y,j as a,L as d}from"./index-CjdUkE4w.js";import{A as L}from"./AuthorAvatar-D9249Frl.js";import{P as Z,S as A,T as k,M as E}from"./SotaBadges-CyScuNCv.js";import{I as P}from"./Icon-CGRs4BYD.js";import{L as U,a as w}from"./LatexTitle-DESKtS30.js";import{p as C}from"./papers-DgZwjF3K.js";import{s as h}from"./safeExternalHref-CkBrsh84.js";const $=({size:s=16})=>a.jsxs("svg",{className:"hf-logo",width:s,height:s,viewBox:"0 0 95 88",fill:"none","aria-hidden":"true",focusable:"false",children:[a.jsx("path",{fill:"#FFD21E",d:"M47.21 76.5a34.75 34.75 0 1 0 0-69.5 34.75 34.75 0 0 0 0 69.5Z"}),a.jsx("path",{fill:"#FF9D0B",d:"M81.96 41.75a34.75 34.75 0 1 0-69.5 0 34.75 34.75 0 0 0 69.5 0Zm-73.5 0a38.75 38.75 0 1 1 77.5 0 38.75 38.75 0 0 1-77.5 0Z"}),a.jsx("path",{fill:"#3A3B45",d:"M58.5 32.3c1.28.44 1.78 3.06 3.07 2.38a5 5 0 1 0-6.76-2.07c.61 1.15 2.55-.72 3.7-.32ZM34.95 32.3c-1.28.44-1.79 3.06-3.07 2.38a5 5 0 1 1 6.76-2.07c-.61 1.15-2.56-.72-3.7-.32Z"}),a.jsx("path",{fill:"#FF323D",d:"M46.96 56.29c9.83 0 13-8.76 13-13.26 0-2.34-1.57-1.6-4.09-.36-2.33 1.15-5.46 2.74-8.9 2.74-7.19 0-13-6.88-13-2.38s3.16 13.26 13 13.26Z"}),a.jsx("path",{fill:"#3A3B45",fillRule:"evenodd",clipRule:"evenodd",d:"M39.43 54a8.7 8.7 0 0 1 5.3-4.49c.4-.12.81.57 1.24 1.28.4.68.82 1.37 1.24 1.37.45 0 .9-.68 1.33-1.35.45-.7.89-1.38 1.32-1.25a8.61 8.61 0 0 1 5 4.17c3.73-2.94 5.1-7.74 5.1-10.7 0-2.34-1.57-1.6-4.09-.36l-.14.07c-2.31 1.15-5.39 2.67-8.77 2.67s-6.45-1.52-8.77-2.67c-2.6-1.29-4.23-2.1-4.23.29 0 3.05 1.46 8.06 5.47 10.97Z"}),a.jsx("path",{fill:"#FF9D0B",d:"M70.71 37a3.25 3.25 0 1 0 0-6.5 3.25 3.25 0 0 0 0 6.5ZM24.21 37a3.25 3.25 0 1 0 0-6.5 3.25 3.25 0 0 0 0 6.5ZM17.52 48c-1.62 0-3.06.66-4.07 1.87a5.97 5.97 0 0 0-1.33 3.76 7.1 7.1 0 0 0-1.94-.3c-1.55 0-2.95.59-3.94 1.66a5.8 5.8 0 0 0-.8 7 5.3 5.3 0 0 0-1.79 2.82c-.24.9-.48 2.8.8 4.74a5.22 5.22 0 0 0-.37 5.02c1.02 2.32 3.57 4.14 8.52 6.1 3.07 1.22 5.89 2 5.91 2.01a44.33 44.33 0 0 0 10.93 1.6c5.86 0 10.05-1.8 12.46-5.34 3.88-5.69 3.33-10.9-1.7-15.92-2.77-2.78-4.62-6.87-5-7.77-.78-2.66-2.84-5.62-6.25-5.62a5.7 5.7 0 0 0-4.6 2.46c-1-1.26-1.98-2.25-2.86-2.82A7.4 7.4 0 0 0 17.52 48Zm0 4c.51 0 1.14.22 1.82.65 2.14 1.36 6.25 8.43 7.76 11.18.5.92 1.37 1.31 2.14 1.31 1.55 0 2.75-1.53.15-3.48-3.92-2.93-2.55-7.72-.68-8.01.08-.02.17-.02.24-.02 1.7 0 2.45 2.93 2.45 2.93s2.2 5.52 5.98 9.3c3.77 3.77 3.97 6.8 1.22 10.83-1.88 2.75-5.47 3.58-9.16 3.58-3.81 0-7.73-.9-9.92-1.46-.11-.03-13.45-3.8-11.76-7 .28-.54.75-.76 1.34-.76 2.38 0 6.7 3.54 8.57 3.54.41 0 .7-.17.83-.6.79-2.85-12.06-4.05-10.98-8.17.2-.73.71-1.02 1.44-1.02 3.14 0 10.2 5.53 11.68 5.53.11 0 .2-.03.24-.1.74-1.2.33-2.04-4.9-5.2-5.21-3.16-8.88-5.06-6.8-7.33.24-.26.58-.38 1-.38 3.17 0 10.66 6.82 10.66 6.82s2.02 2.1 3.25 2.1c.28 0 .52-.1.68-.38.86-1.46-8.06-8.22-8.56-11.01-.34-1.9.24-2.85 1.31-2.85Z"}),a.jsx("path",{fill:"#FFD21E",d:"M38.6 76.69c2.75-4.04 2.55-7.07-1.22-10.84-3.78-3.77-5.98-9.3-5.98-9.3s-.82-3.2-2.69-2.9c-1.87.3-3.24 5.08.68 8.01 3.91 2.93-.78 4.92-2.29 2.17-1.5-2.75-5.62-9.82-7.76-11.18-2.13-1.35-3.63-.6-3.13 2.2.5 2.79 9.43 9.55 8.56 11-.87 1.47-3.93-1.71-3.93-1.71s-9.57-8.71-11.66-6.44c-2.08 2.27 1.59 4.17 6.8 7.33 5.23 3.16 5.64 4 4.9 5.2-.75 1.2-12.28-8.53-13.36-4.4-1.08 4.11 11.77 5.3 10.98 8.15-.8 2.85-9.06-5.38-10.74-2.18-1.7 3.21 11.65 6.98 11.76 7.01 4.3 1.12 15.25 3.49 19.08-2.12Z"}),a.jsx("path",{fill:"#FF9D0B",d:"M77.4 48c1.62 0 3.07.66 4.07 1.87a5.97 5.97 0 0 1 1.33 3.76 7.1 7.1 0 0 1 1.95-.3c1.55 0 2.95.59 3.94 1.66a5.8 5.8 0 0 1 .8 7 5.3 5.3 0 0 1 1.78 2.82c.24.9.48 2.8-.8 4.74a5.22 5.22 0 0 1 .37 5.02c-1.02 2.32-3.57 4.14-8.51 6.1-3.08 1.22-5.9 2-5.92 2.01a44.33 44.33 0 0 1-10.93 1.6c-5.86 0-10.05-1.8-12.46-5.34-3.88-5.69-3.33-10.9 1.7-15.92 2.78-2.78 4.63-6.87 5.01-7.77.78-2.66 2.83-5.62 6.24-5.62a5.7 5.7 0 0 1 4.6 2.46c1-1.26 1.98-2.25 2.87-2.82A7.4 7.4 0 0 1 77.4 48Zm0 4c-.51 0-1.13.22-1.82.65-2.13 1.36-6.25 8.43-7.76 11.18a2.43 2.43 0 0 1-2.14 1.31c-1.54 0-2.75-1.53-.14-3.48 3.91-2.93 2.54-7.72.67-8.01a1.54 1.54 0 0 0-.24-.02c-1.7 0-2.45 2.93-2.45 2.93s-2.2 5.52-5.97 9.3c-3.78 3.77-3.98 6.8-1.22 10.83 1.87 2.75 5.47 3.58 9.15 3.58 3.82 0 7.73-.9 9.93-1.46.1-.03 13.45-3.8 11.76-7-.29-.54-.75-.76-1.34-.76-2.38 0-6.71 3.54-8.57 3.54-.42 0-.71-.17-.83-.6-.8-2.85 12.05-4.05 10.97-8.17-.19-.73-.7-1.02-1.44-1.02-3.14 0-10.2 5.53-11.68 5.53-.1 0-.19-.03-.23-.1-.74-1.2-.34-2.04 4.88-5.2 5.23-3.16 8.9-5.06 6.8-7.33-.23-.26-.57-.38-.98-.38-3.18 0-10.67 6.82-10.67 6.82s-2.02 2.1-3.24 2.1a.74.74 0 0 1-.68-.38c-.87-1.46 8.05-8.22 8.55-11.01.34-1.9-.24-2.85-1.31-2.85Z"}),a.jsx("path",{fill:"#FFD21E",d:"M56.33 76.69c-2.75-4.04-2.56-7.07 1.22-10.84 3.77-3.77 5.97-9.3 5.97-9.3s.82-3.2 2.7-2.9c1.86.3 3.23 5.08-.68 8.01-3.92 2.93.78 4.92 2.28 2.17 1.51-2.75 5.63-9.82 7.76-11.18 2.13-1.35 3.64-.6 3.13 2.2-.5 2.79-9.42 9.55-8.55 11 .86 1.47 3.92-1.71 3.92-1.71s9.58-8.71 11.66-6.44c2.08 2.27-1.58 4.17-6.8 7.33-5.23 3.16-5.63 4-4.9 5.2.75 1.2 12.28-8.53 13.36-4.4 1.08 4.11-11.76 5.3-10.97 8.15.8 2.85 9.05-5.38 10.74-2.18 1.69 3.21-11.65 6.98-11.76 7.01-4.31 1.12-15.26 3.49-19.08-2.12Z"})]});function T(s){const t=[...new Set(s.map(r=>r.replace(/ \(subtask\)$/,"")))],l=t.length>3?[...t.slice(0,2),`${t.length-2} more`]:t;return l.length>1?`${l.slice(0,-1).join(", ")} and ${l[l.length-1]}`:l[0]}const z="language-modeling";function p(s){return s?s.toLowerCase().replace(/\(.*?\)/g," ").replace(/[^a-z]+/g," ").replace(/\bllm\b/g," ").replace(/\s+/g," ").trim().replace(/s$/,""):""}function B(s){return p(s.slug)==="large language model"||p(s.name)==="large language model"}function D(s){return s.tags.includes(z)?s.methods.filter(t=>!B(t)):s.methods}const S=({name:s,slug:t,logoUrl:l})=>{const[r,i]=g.useState(!1);return!l||r?null:a.jsx(d,{to:`/orgs/${t}`,className:"paper-organization-logo","aria-label":`View ${s} organization`,title:s,children:a.jsx("img",{src:l,alt:"",onError:()=>i(!0)})})},q=({paper:s,priority:t=!1,showInstitution:l=!0,highlightQuery:r,followReasons:i})=>{const m=v(),u=`/paper/${s.id}`,n=g.useCallback(()=>{m.prefetchQuery({queryKey:y.detail(s.id),queryFn:()=>C.get(s.id,!0),staleTime:M})},[s.id,m]),F=s.authors.slice(0,3).map((e,o)=>{var b,N;const f=(b=s.authorIds)==null?void 0:b[o],j=(N=s.authorHfProfiles)==null?void 0:N[o];return a.jsxs(g.Fragment,{children:[o>0&&", ",j&&a.jsx(L,{className:"paper-card-author-avatar",url:j.avatarUrl}),f?a.jsx(d,{to:`/authors/${f}`,children:e}):e]},o)}),c=s.authors.length,x=D(s);return a.jsxs("article",{className:"paper-card",children:[a.jsx(d,{to:u,className:"paper-thumb-wrap",onFocus:n,onMouseEnter:n,children:a.jsx(Z,{paperId:s.id,title:s.title,thumbnailUrl:s.thumbnailUrl,priority:t})}),a.jsxs("div",{className:"paper-body",children:[a.jsxs("div",{className:"paper-body-main",children:[i&&i.length>0&&a.jsxs("div",{className:"paper-follow-reason",children:["Because you follow ",T(i)]}),a.jsxs("h3",{className:"paper-title",children:[a.jsx(d,{to:u,onFocus:n,onMouseEnter:n,children:a.jsx(U,{title:s.title,highlight:r})}),l&&s.organizations.length>0&&a.jsx("span",{className:"paper-organization-logos",children:s.organizations.map(e=>a.jsx(S,{...e},e.slug))})]}),a.jsxs("div",{className:"paper-authors",children:[F,c>3&&a.jsxs("span",{children:[", ","+",c-3," authors"]}),s.date&&a.jsxs(a.Fragment,{children:[c>0?" · ":"",a.jsx("span",{children:s.date})]}),s.citations>0&&a.jsxs(a.Fragment,{children:[c>0||s.date?" · ":"",a.jsxs("span",{children:[s.citations.toLocaleString()," citations"]})]})]}),s.abstract&&a.jsx("p",{className:"paper-abstract",children:a.jsx(w,{text:s.abstract,highlight:r})}),s.sotaRanks.length>0&&a.jsx(A,{ranks:s.sotaRanks,paperHref:u}),(s.tags.length>0||x.length>0)&&a.jsxs("div",{className:"paper-tags paper-tags--clamped",children:[s.tags.map(e=>a.jsx(k,{slug:e},e)),x.map(e=>a.jsx(E,{method:e},e.id||e.slug||e.name))]})]}),(s.githubUrl||s.hfUrl)&&a.jsxs("div",{className:"paper-resources",children:[h(s.githubUrl)&&a.jsxs("a",{className:"paper-resource is-link",href:h(s.githubUrl)??void 0,target:"_blank",rel:"noopener noreferrer","aria-label":"Open GitHub repository",onClick:e=>e.stopPropagation(),children:[a.jsx(P,{name:"github",size:20}),s.velocity24h!=null&&s.velocity24h>0&&a.jsxs("span",{className:"resource-stat",children:[a.jsxs("span",{className:"resource-value",children:[a.jsx("span",{className:"gh-rate-arrow",children:"↑"}),s.velocity24h.toFixed(1)]}),a.jsx("span",{className:"resource-label",children:"stars / hr"})]})]}),h(s.hfUrl)&&s.hfKind&&a.jsxs("a",{className:"paper-resource is-link",href:h(s.hfUrl)??void 0,target:"_blank",rel:"noopener noreferrer","aria-label":`Open Hugging Face ${s.hfKind}`,onClick:e=>e.stopPropagation(),children:[a.jsx($,{size:20}),a.jsxs("span",{className:"resource-stat",children:[a.jsx("span",{className:"resource-value",children:s.hfCount}),a.jsx("span",{className:"resource-label",children:s.hfKind})]})]})]})]})]})};export{q as P}; +import{i as v,V as g,T as M,p as y,j as a,L as d}from"./index-CHGpuh10.js";import{A as L}from"./AuthorAvatar-fJxhX3fO.js";import{P as Z,S as A,T as k,M as E}from"./SotaBadges-D825CK6n.js";import{I as P}from"./Icon-CRWrVPWO.js";import{L as U,a as w}from"./LatexTitle-CfeEppH3.js";import{p as C}from"./papers-BPpxs2sO.js";import{s as h}from"./safeExternalHref-CkBrsh84.js";const $=({size:s=16})=>a.jsxs("svg",{className:"hf-logo",width:s,height:s,viewBox:"0 0 95 88",fill:"none","aria-hidden":"true",focusable:"false",children:[a.jsx("path",{fill:"#FFD21E",d:"M47.21 76.5a34.75 34.75 0 1 0 0-69.5 34.75 34.75 0 0 0 0 69.5Z"}),a.jsx("path",{fill:"#FF9D0B",d:"M81.96 41.75a34.75 34.75 0 1 0-69.5 0 34.75 34.75 0 0 0 69.5 0Zm-73.5 0a38.75 38.75 0 1 1 77.5 0 38.75 38.75 0 0 1-77.5 0Z"}),a.jsx("path",{fill:"#3A3B45",d:"M58.5 32.3c1.28.44 1.78 3.06 3.07 2.38a5 5 0 1 0-6.76-2.07c.61 1.15 2.55-.72 3.7-.32ZM34.95 32.3c-1.28.44-1.79 3.06-3.07 2.38a5 5 0 1 1 6.76-2.07c-.61 1.15-2.56-.72-3.7-.32Z"}),a.jsx("path",{fill:"#FF323D",d:"M46.96 56.29c9.83 0 13-8.76 13-13.26 0-2.34-1.57-1.6-4.09-.36-2.33 1.15-5.46 2.74-8.9 2.74-7.19 0-13-6.88-13-2.38s3.16 13.26 13 13.26Z"}),a.jsx("path",{fill:"#3A3B45",fillRule:"evenodd",clipRule:"evenodd",d:"M39.43 54a8.7 8.7 0 0 1 5.3-4.49c.4-.12.81.57 1.24 1.28.4.68.82 1.37 1.24 1.37.45 0 .9-.68 1.33-1.35.45-.7.89-1.38 1.32-1.25a8.61 8.61 0 0 1 5 4.17c3.73-2.94 5.1-7.74 5.1-10.7 0-2.34-1.57-1.6-4.09-.36l-.14.07c-2.31 1.15-5.39 2.67-8.77 2.67s-6.45-1.52-8.77-2.67c-2.6-1.29-4.23-2.1-4.23.29 0 3.05 1.46 8.06 5.47 10.97Z"}),a.jsx("path",{fill:"#FF9D0B",d:"M70.71 37a3.25 3.25 0 1 0 0-6.5 3.25 3.25 0 0 0 0 6.5ZM24.21 37a3.25 3.25 0 1 0 0-6.5 3.25 3.25 0 0 0 0 6.5ZM17.52 48c-1.62 0-3.06.66-4.07 1.87a5.97 5.97 0 0 0-1.33 3.76 7.1 7.1 0 0 0-1.94-.3c-1.55 0-2.95.59-3.94 1.66a5.8 5.8 0 0 0-.8 7 5.3 5.3 0 0 0-1.79 2.82c-.24.9-.48 2.8.8 4.74a5.22 5.22 0 0 0-.37 5.02c1.02 2.32 3.57 4.14 8.52 6.1 3.07 1.22 5.89 2 5.91 2.01a44.33 44.33 0 0 0 10.93 1.6c5.86 0 10.05-1.8 12.46-5.34 3.88-5.69 3.33-10.9-1.7-15.92-2.77-2.78-4.62-6.87-5-7.77-.78-2.66-2.84-5.62-6.25-5.62a5.7 5.7 0 0 0-4.6 2.46c-1-1.26-1.98-2.25-2.86-2.82A7.4 7.4 0 0 0 17.52 48Zm0 4c.51 0 1.14.22 1.82.65 2.14 1.36 6.25 8.43 7.76 11.18.5.92 1.37 1.31 2.14 1.31 1.55 0 2.75-1.53.15-3.48-3.92-2.93-2.55-7.72-.68-8.01.08-.02.17-.02.24-.02 1.7 0 2.45 2.93 2.45 2.93s2.2 5.52 5.98 9.3c3.77 3.77 3.97 6.8 1.22 10.83-1.88 2.75-5.47 3.58-9.16 3.58-3.81 0-7.73-.9-9.92-1.46-.11-.03-13.45-3.8-11.76-7 .28-.54.75-.76 1.34-.76 2.38 0 6.7 3.54 8.57 3.54.41 0 .7-.17.83-.6.79-2.85-12.06-4.05-10.98-8.17.2-.73.71-1.02 1.44-1.02 3.14 0 10.2 5.53 11.68 5.53.11 0 .2-.03.24-.1.74-1.2.33-2.04-4.9-5.2-5.21-3.16-8.88-5.06-6.8-7.33.24-.26.58-.38 1-.38 3.17 0 10.66 6.82 10.66 6.82s2.02 2.1 3.25 2.1c.28 0 .52-.1.68-.38.86-1.46-8.06-8.22-8.56-11.01-.34-1.9.24-2.85 1.31-2.85Z"}),a.jsx("path",{fill:"#FFD21E",d:"M38.6 76.69c2.75-4.04 2.55-7.07-1.22-10.84-3.78-3.77-5.98-9.3-5.98-9.3s-.82-3.2-2.69-2.9c-1.87.3-3.24 5.08.68 8.01 3.91 2.93-.78 4.92-2.29 2.17-1.5-2.75-5.62-9.82-7.76-11.18-2.13-1.35-3.63-.6-3.13 2.2.5 2.79 9.43 9.55 8.56 11-.87 1.47-3.93-1.71-3.93-1.71s-9.57-8.71-11.66-6.44c-2.08 2.27 1.59 4.17 6.8 7.33 5.23 3.16 5.64 4 4.9 5.2-.75 1.2-12.28-8.53-13.36-4.4-1.08 4.11 11.77 5.3 10.98 8.15-.8 2.85-9.06-5.38-10.74-2.18-1.7 3.21 11.65 6.98 11.76 7.01 4.3 1.12 15.25 3.49 19.08-2.12Z"}),a.jsx("path",{fill:"#FF9D0B",d:"M77.4 48c1.62 0 3.07.66 4.07 1.87a5.97 5.97 0 0 1 1.33 3.76 7.1 7.1 0 0 1 1.95-.3c1.55 0 2.95.59 3.94 1.66a5.8 5.8 0 0 1 .8 7 5.3 5.3 0 0 1 1.78 2.82c.24.9.48 2.8-.8 4.74a5.22 5.22 0 0 1 .37 5.02c-1.02 2.32-3.57 4.14-8.51 6.1-3.08 1.22-5.9 2-5.92 2.01a44.33 44.33 0 0 1-10.93 1.6c-5.86 0-10.05-1.8-12.46-5.34-3.88-5.69-3.33-10.9 1.7-15.92 2.78-2.78 4.63-6.87 5.01-7.77.78-2.66 2.83-5.62 6.24-5.62a5.7 5.7 0 0 1 4.6 2.46c1-1.26 1.98-2.25 2.87-2.82A7.4 7.4 0 0 1 77.4 48Zm0 4c-.51 0-1.13.22-1.82.65-2.13 1.36-6.25 8.43-7.76 11.18a2.43 2.43 0 0 1-2.14 1.31c-1.54 0-2.75-1.53-.14-3.48 3.91-2.93 2.54-7.72.67-8.01a1.54 1.54 0 0 0-.24-.02c-1.7 0-2.45 2.93-2.45 2.93s-2.2 5.52-5.97 9.3c-3.78 3.77-3.98 6.8-1.22 10.83 1.87 2.75 5.47 3.58 9.15 3.58 3.82 0 7.73-.9 9.93-1.46.1-.03 13.45-3.8 11.76-7-.29-.54-.75-.76-1.34-.76-2.38 0-6.71 3.54-8.57 3.54-.42 0-.71-.17-.83-.6-.8-2.85 12.05-4.05 10.97-8.17-.19-.73-.7-1.02-1.44-1.02-3.14 0-10.2 5.53-11.68 5.53-.1 0-.19-.03-.23-.1-.74-1.2-.34-2.04 4.88-5.2 5.23-3.16 8.9-5.06 6.8-7.33-.23-.26-.57-.38-.98-.38-3.18 0-10.67 6.82-10.67 6.82s-2.02 2.1-3.24 2.1a.74.74 0 0 1-.68-.38c-.87-1.46 8.05-8.22 8.55-11.01.34-1.9-.24-2.85-1.31-2.85Z"}),a.jsx("path",{fill:"#FFD21E",d:"M56.33 76.69c-2.75-4.04-2.56-7.07 1.22-10.84 3.77-3.77 5.97-9.3 5.97-9.3s.82-3.2 2.7-2.9c1.86.3 3.23 5.08-.68 8.01-3.92 2.93.78 4.92 2.28 2.17 1.51-2.75 5.63-9.82 7.76-11.18 2.13-1.35 3.64-.6 3.13 2.2-.5 2.79-9.42 9.55-8.55 11 .86 1.47 3.92-1.71 3.92-1.71s9.58-8.71 11.66-6.44c2.08 2.27-1.58 4.17-6.8 7.33-5.23 3.16-5.63 4-4.9 5.2.75 1.2 12.28-8.53 13.36-4.4 1.08 4.11-11.76 5.3-10.97 8.15.8 2.85 9.05-5.38 10.74-2.18 1.69 3.21-11.65 6.98-11.76 7.01-4.31 1.12-15.26 3.49-19.08-2.12Z"})]});function T(s){const t=[...new Set(s.map(r=>r.replace(/ \(subtask\)$/,"")))],l=t.length>3?[...t.slice(0,2),`${t.length-2} more`]:t;return l.length>1?`${l.slice(0,-1).join(", ")} and ${l[l.length-1]}`:l[0]}const z="language-modeling";function p(s){return s?s.toLowerCase().replace(/\(.*?\)/g," ").replace(/[^a-z]+/g," ").replace(/\bllm\b/g," ").replace(/\s+/g," ").trim().replace(/s$/,""):""}function B(s){return p(s.slug)==="large language model"||p(s.name)==="large language model"}function D(s){return s.tags.includes(z)?s.methods.filter(t=>!B(t)):s.methods}const S=({name:s,slug:t,logoUrl:l})=>{const[r,i]=g.useState(!1);return!l||r?null:a.jsx(d,{to:`/orgs/${t}`,className:"paper-organization-logo","aria-label":`View ${s} organization`,title:s,children:a.jsx("img",{src:l,alt:"",onError:()=>i(!0)})})},q=({paper:s,priority:t=!1,showInstitution:l=!0,highlightQuery:r,followReasons:i})=>{const m=v(),u=`/paper/${s.id}`,n=g.useCallback(()=>{m.prefetchQuery({queryKey:y.detail(s.id),queryFn:()=>C.get(s.id,!0),staleTime:M})},[s.id,m]),F=s.authors.slice(0,3).map((e,o)=>{var b,N;const f=(b=s.authorIds)==null?void 0:b[o],j=(N=s.authorHfProfiles)==null?void 0:N[o];return a.jsxs(g.Fragment,{children:[o>0&&", ",j&&a.jsx(L,{className:"paper-card-author-avatar",url:j.avatarUrl}),f?a.jsx(d,{to:`/authors/${f}`,children:e}):e]},o)}),c=s.authors.length,x=D(s);return a.jsxs("article",{className:"paper-card",children:[a.jsx(d,{to:u,className:"paper-thumb-wrap",onFocus:n,onMouseEnter:n,children:a.jsx(Z,{paperId:s.id,title:s.title,thumbnailUrl:s.thumbnailUrl,priority:t})}),a.jsxs("div",{className:"paper-body",children:[a.jsxs("div",{className:"paper-body-main",children:[i&&i.length>0&&a.jsxs("div",{className:"paper-follow-reason",children:["Because you follow ",T(i)]}),a.jsxs("h3",{className:"paper-title",children:[a.jsx(d,{to:u,onFocus:n,onMouseEnter:n,children:a.jsx(U,{title:s.title,highlight:r})}),l&&s.organizations.length>0&&a.jsx("span",{className:"paper-organization-logos",children:s.organizations.map(e=>a.jsx(S,{...e},e.slug))})]}),a.jsxs("div",{className:"paper-authors",children:[F,c>3&&a.jsxs("span",{children:[", ","+",c-3," authors"]}),s.date&&a.jsxs(a.Fragment,{children:[c>0?" · ":"",a.jsx("span",{children:s.date})]}),s.citations>0&&a.jsxs(a.Fragment,{children:[c>0||s.date?" · ":"",a.jsxs("span",{children:[s.citations.toLocaleString()," citations"]})]})]}),s.abstract&&a.jsx("p",{className:"paper-abstract",children:a.jsx(w,{text:s.abstract,highlight:r})}),s.sotaRanks.length>0&&a.jsx(A,{ranks:s.sotaRanks,paperHref:u}),(s.tags.length>0||x.length>0)&&a.jsxs("div",{className:"paper-tags paper-tags--clamped",children:[s.tags.map(e=>a.jsx(k,{slug:e},e)),x.map(e=>a.jsx(E,{method:e},e.id||e.slug||e.name))]})]}),(s.githubUrl||s.hfUrl)&&a.jsxs("div",{className:"paper-resources",children:[h(s.githubUrl)&&a.jsxs("a",{className:"paper-resource is-link",href:h(s.githubUrl)??void 0,target:"_blank",rel:"noopener noreferrer","aria-label":"Open GitHub repository",onClick:e=>e.stopPropagation(),children:[a.jsx(P,{name:"github",size:20}),s.velocity24h!=null&&s.velocity24h>0&&a.jsxs("span",{className:"resource-stat",children:[a.jsxs("span",{className:"resource-value",children:[a.jsx("span",{className:"gh-rate-arrow",children:"↑"}),s.velocity24h.toFixed(1)]}),a.jsx("span",{className:"resource-label",children:"stars / hr"})]})]}),h(s.hfUrl)&&s.hfKind&&a.jsxs("a",{className:"paper-resource is-link",href:h(s.hfUrl)??void 0,target:"_blank",rel:"noopener noreferrer","aria-label":`Open Hugging Face ${s.hfKind}`,onClick:e=>e.stopPropagation(),children:[a.jsx($,{size:20}),a.jsxs("span",{className:"resource-stat",children:[a.jsx("span",{className:"resource-value",children:s.hfCount}),a.jsx("span",{className:"resource-label",children:s.hfKind})]})]})]})]})]})};export{q as P}; diff --git a/assets/PaperDetailView-DSf05yVz.js b/assets/PaperDetailView-BGo-dK6S.js similarity index 98% rename from assets/PaperDetailView-DSf05yVz.js rename to assets/PaperDetailView-BGo-dK6S.js index 9070c1e04ecfa8608ee71431cf6d020defecd81b..a1c5614f0eb9e208396e376f7bbd24f9db1ab82b 100644 --- a/assets/PaperDetailView-DSf05yVz.js +++ b/assets/PaperDetailView-BGo-dK6S.js @@ -1,4 +1,4 @@ -import{s as ft,b as Q,t as ea,T as it,v as re,w as ta,e as rs,x as J,d as b,p as me,j as e,C as gt,i as Z,y as xt,X as ns,o as Lt,P as is,z as ee,B as os,D as pe,E as he,F as ls,G as bt,I as Ce,J as Tt,K as sa,L as K,M as aa,N as ra,R as na,O as ia,Q as cs,S as oa,h as la,U as ca,A as Se,l as da,a as Pe,V as Ee,W as se,k as ds,u as ua,Y as Dt,Z as ma,q as Ft,_ as ha,$ as pa,a0 as fa,a1 as ga,a2 as xa,a3 as ba}from"./index-CjdUkE4w.js";import{u as ae}from"./useMutation-BYtVrkc7.js";import{I as F}from"./Icon-CGRs4BYD.js";import{T as ja,M as va,S as ya,P as _a}from"./SotaBadges-CyScuNCv.js";import{L as Ne,a as ot}from"./LatexTitle-DESKtS30.js";import{e as $e,C as ka,E as Na}from"./ExternalSourceEvalBadge-B3fyun97.js";import{p as U}from"./papers-DgZwjF3K.js";import{s as wa,a as Ca}from"./transform-CRNzYLch.js";import{r as us,p as Sa}from"./paperReader-h6jqpWHI.js";import{a as Ea}from"./usePapers-BZThqZCx.js";import{u as Pa,f as $a}from"./useDocumentTitle-2Ho8_KfW.js";import{u as Ia}from"./preferences-DMhkYrri.js";import{s as Y}from"./safeExternalHref-CkBrsh84.js";import{F as Ut,i as Ra,P as Aa}from"./curation-CyyuHfv5.js";import{S as ue}from"./skeleton-DTWi7Ctg.js";import{A as La,a as Ta}from"./alert-BM9Xfuyy.js";import{B as A}from"./button-DetZl_ch.js";import{D as Ie,a as Re,c as Ae,b as Le,d as Te,e as jt}from"./dialog-BzX9PD3v.js";import{A as Da,a as Fa}from"./AgentLogos-xoTIu0NB.js";import{C as Ua}from"./copy-SoF5zg-g.js";import{u as ye,r as Ba,e as za}from"./evaluationQueryInvalidation-BAyi4YoG.js";import{I as z}from"./input-7i-rZ7fA.js";import{S as Bt}from"./searchable-select-EPf13F1I.js";import{L as vt}from"./loader-circle-xTdSzHv_.js";import{T as fe,n as He,g as zt,C as Ma}from"./CatalogEntityPreviewLink-DY_jhXy9.js";import{S as ms,L as O,a as Ha}from"./SignInToEditDialog-rWxdYNRK.js";import{c as G}from"./catalog-qXcKve0z.js";import{s as hs,p as ps}from"./submissions-CQ6M0giV.js";import{i as fs,a as gs,r as Oa}from"./queryInvalidation-LiTu0GxY.js";import{D as qa}from"./database-b_ekt_5x.js";import{P as ge}from"./plus-AztI1566.js";import{S as lt}from"./search-DxMn7VKI.js";import{B as xs}from"./badge-C8r6F6JD.js";import{G as Mt}from"./globe-mBp0l-nC.js";import{G as Ht}from"./github-4bW4WI_e.js";import{u as bs}from"./index-BxR27SAB.js";import{c as Oe,A as Ka}from"./codex-CgFzL2AI.js";import{M as Ga}from"./index-tLcwYp0U.js";import{r as Qa}from"./index-Dj6aE-6E.js";import{u as Xa}from"./useIntersectionObserver-Ch6RpsSk.js";import{a as ct}from"./account-DoluPGSd.js";import{S as Ot,s as Va}from"./savedPapersAuth-DT83MLdi.js";import{o as Wa}from"./organizationNames-BVKzYEBp.js";import{A as Ya}from"./AuthorAvatar-D9249Frl.js";import"./colors-BkWRhvFI.js";import"./hover-card-CIBIV2Hx.js";import"./useInfiniteQuery-DeZTTVbI.js";import"./popover-Df5_dywQ.js";import"./textarea-biscLKBK.js";/** +import{s as ft,b as Q,t as ea,T as it,v as re,w as ta,e as rs,x as J,d as b,p as me,j as e,C as gt,i as Z,y as xt,X as ns,o as Lt,P as is,z as ee,B as os,D as pe,E as he,F as ls,G as bt,I as Ce,J as Tt,K as sa,L as K,M as aa,N as ra,R as na,O as ia,Q as cs,S as oa,h as la,U as ca,A as Se,l as da,a as Pe,V as Ee,W as se,k as ds,u as ua,Y as Dt,Z as ma,q as Ft,_ as ha,$ as pa,a0 as fa,a1 as ga,a2 as xa,a3 as ba}from"./index-CHGpuh10.js";import{u as ae}from"./useMutation-3fOqWcpt.js";import{I as F}from"./Icon-CRWrVPWO.js";import{T as ja,M as va,S as ya,P as _a}from"./SotaBadges-D825CK6n.js";import{L as Ne,a as ot}from"./LatexTitle-CfeEppH3.js";import{e as $e,C as ka,E as Na}from"./ExternalSourceEvalBadge-CMfiSNvf.js";import{p as U}from"./papers-BPpxs2sO.js";import{s as wa,a as Ca}from"./transform-Cs8_lTDx.js";import{r as us,p as Sa}from"./paperReader-h6jqpWHI.js";import{a as Ea}from"./usePapers-DzyOc-Ae.js";import{u as Pa,f as $a}from"./useDocumentTitle-Deu479Zd.js";import{u as Ia}from"./preferences-BR-SGx3E.js";import{s as Y}from"./safeExternalHref-CkBrsh84.js";import{F as Ut,i as Ra,P as Aa}from"./curation-DI9_zYNx.js";import{S as ue}from"./skeleton-Df0GaMuw.js";import{A as La,a as Ta}from"./alert-DPvmCXZT.js";import{B as A}from"./button-C4kqC3Av.js";import{D as Ie,a as Re,c as Ae,b as Le,d as Te,e as jt}from"./dialog-BfI2DQVf.js";import{A as Da,a as Fa}from"./AgentLogos-PqR86_NK.js";import{C as Ua}from"./copy-CvlL053K.js";import{u as ye,r as Ba,e as za}from"./evaluationQueryInvalidation-oiaNU_fe.js";import{I as z}from"./input-FDP77A0C.js";import{S as Bt}from"./searchable-select-9e2cCX5g.js";import{L as vt}from"./loader-circle-DuUnmHjj.js";import{T as fe,n as He,g as zt,C as Ma}from"./CatalogEntityPreviewLink-C5CxvSnT.js";import{S as ms,L as O,a as Ha}from"./SignInToEditDialog-B3EJVut1.js";import{c as G}from"./catalog-DMzmJg__.js";import{s as hs,p as ps}from"./submissions-BHHAmt53.js";import{i as fs,a as gs,r as Oa}from"./queryInvalidation-rIB0mIr9.js";import{D as qa}from"./database-DYuYu8SE.js";import{P as ge}from"./plus-CYgr1KdS.js";import{S as lt}from"./search-Czb1C2Q7.js";import{B as xs}from"./badge-DZeCGN5Q.js";import{G as Mt}from"./globe-CR-SV3ud.js";import{G as Ht}from"./github-CRId1LT2.js";import{u as bs}from"./index-CWaI9Snb.js";import{c as Oe,A as Ka}from"./codex-WU2WBMcn.js";import{M as Ga}from"./index-B141zdPU.js";import{r as Qa}from"./index-BzjqtLRb.js";import{u as Xa}from"./useIntersectionObserver-DZSpsOQX.js";import{a as ct}from"./account-D9O54ufU.js";import{S as Ot,s as Va}from"./savedPapersAuth-Coc4Zc7v.js";import{o as Wa}from"./organizationNames-BVKzYEBp.js";import{A as Ya}from"./AuthorAvatar-fJxhX3fO.js";import"./colors-BkWRhvFI.js";import"./hover-card-Dz7z6DCn.js";import"./useInfiniteQuery-DhWyWKGj.js";import"./popover-BHpRw7vT.js";import"./textarea-CDMkQNbH.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/PaperFeed-D3FZw29k.js b/assets/PaperFeed-DjmnPHUi.js similarity index 97% rename from assets/PaperFeed-D3FZw29k.js rename to assets/PaperFeed-DjmnPHUi.js index 265fe2c60d93a71263af5a95ee74475af5de3624..4f11427cdb1fec74d52a84376def5138620326ce 100644 --- a/assets/PaperFeed-D3FZw29k.js +++ b/assets/PaperFeed-DjmnPHUi.js @@ -1 +1 @@ -import{d as u,j as t,g as J,V as K}from"./index-CjdUkE4w.js";import{P as X}from"./PaperCard-dvXhr75r.js";import{P as ee,a as te,b as ae}from"./popover-Df5_dywQ.js";import{I as se}from"./Icon-CGRs4BYD.js";import{S as j}from"./skeleton-DTWi7Ctg.js";import{u as ne}from"./useIntersectionObserver-Ch6RpsSk.js";const Y=(e,a)=>{const s=new Date(a),n=new Date(s);return n.setUTCDate(s.getUTCDate()-(e==="week"?6:29)),{startDate:n.toISOString().slice(0,10),endDate:s.toISOString().slice(0,10)}},V=e=>({startDate:e.get("start_date")||void 0,endDate:e.get("end_date")||void 0}),Ne=(e,a=new Date,s="week")=>{const n=V(e);if(n.startDate||n.endDate||e.get("time")==="all_time")return n;const o=new Date(Date.UTC(a.getUTCFullYear(),a.getUTCMonth(),a.getUTCDate()));return Y(s,o)},Z=(e,a)=>{const s=new URLSearchParams(e);return a.startDate?s.set("start_date",a.startDate):s.delete("start_date"),a.endDate?s.set("end_date",a.endDate):s.delete("end_date"),s.delete("time"),s},Se=(e,a)=>{const s=Z(e,a);return!a.startDate&&!a.endDate&&s.set("time","all_time"),s},re=new Intl.DateTimeFormat("en",{month:"long",year:"numeric",timeZone:"UTC"}),H=new Intl.DateTimeFormat("en",{month:"short",timeZone:"UTC"}),O="(max-width: 640px)",oe=()=>{const[e,a]=u.useState(()=>typeof window<"u"&&window.matchMedia(O).matches);return u.useEffect(()=>{const s=window.matchMedia(O),n=o=>a(o.matches);return a(s.matches),s.addEventListener("change",n),()=>s.removeEventListener("change",n)},[]),e},W=e=>e.toISOString().slice(0,10),b=e=>new Date(`${e}T00:00:00Z`),ie=()=>{const e=new Date;return new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()))},F=(e,a)=>new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth()+a,1)),v=e=>new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),1)),ce=(e,a)=>new Date(Date.UTC(a,e.getUTCMonth(),1)),w=(e,a)=>e.startDate===a.startDate&&e.endDate===a.endDate,le=(e,a)=>{const s=b(e),n=b(a),o=H.format(s),i=H.format(n),d=s.getUTCDate(),l=n.getUTCDate(),r=s.getUTCFullYear(),p=n.getUTCFullYear();return e===a?`${o} ${d}, ${r}`:r===p&&s.getUTCMonth()===n.getUTCMonth()?`${o} ${d}–${l}, ${r}`:r===p?`${o} ${d}–${i} ${l}, ${r}`:`${o} ${d}, ${r}–${i} ${l}, ${p}`},de=e=>{const a=e.getUTCFullYear(),s=e.getUTCMonth(),n=new Date(Date.UTC(a,s,1)),o=(n.getUTCDay()+6)%7,i=new Date(n);return i.setUTCDate(n.getUTCDate()-o),Array.from({length:42},(d,l)=>{const r=new Date(i);return r.setUTCDate(i.getUTCDate()+l),{iso:W(r),day:r.getUTCDate(),outsideMonth:r.getUTCMonth()!==s}})},L=({month:e,today:a,startDate:s,endDate:n,onSelect:o,yearLabel:i,yearValue:d,onYearChange:l,secondary:r=!1})=>{const p=u.useMemo(()=>de(e),[e]);return t.jsxs("section",{className:`paper-date-calendar${r?" paper-date-calendar-secondary":""}`,children:[t.jsxs("label",{className:"paper-date-year",children:[t.jsx("span",{children:i}),t.jsx("input",{type:"number",inputMode:"numeric",min:"1900",max:a.slice(0,4),step:"1",value:d,onChange:c=>l(c.target.value)})]}),t.jsx("h3",{children:re.format(e)}),t.jsx("div",{className:"paper-date-weekdays","aria-hidden":"true",children:["Mon","Tue","Wed","Thu","Fri","Sat","Sun"].map(c=>t.jsx("span",{children:c},c))}),t.jsx("div",{className:"paper-date-days",children:p.map(c=>{const g=c.iso===s||c.iso===n,m=!!(s&&n&&c.iso>s&&c.isoa;return t.jsx("button",{type:"button","aria-label":c.iso,"aria-selected":g,disabled:f,className:["paper-date-day",c.outsideMonth?"outside":"",g?"selected":"",m?"in-range":"",c.iso===a?"today":""].filter(Boolean).join(" "),onClick:()=>o(c.iso),children:c.day},c.iso)})})]})},I=({calendar:e,onPrevious:a,onNext:s,secondary:n=!1})=>t.jsxs("div",{className:`paper-date-navigation-group${n?" paper-date-navigation-group-secondary":""}`,children:[t.jsx("button",{type:"button","aria-label":`Previous ${e} month`,onClick:a,children:"←"}),t.jsx("button",{type:"button","aria-label":`Next ${e} month`,onClick:s,children:"→"})]}),he=({startDate:e,endDate:a,onChange:s,currentDate:n})=>{const o=oe(),i=n?b(n):ie(),[d,l]=u.useState(!1),[r,p]=u.useState(),[c,g]=u.useState(),[m,f]=u.useState(()=>v(i)),[_,T]=u.useState(()=>F(v(i),1)),[z,D]=u.useState(()=>String(i.getUTCFullYear())),[G,y]=u.useState(()=>String(i.getUTCFullYear())),N={startDate:e,endDate:a},M=Y("week",i),P=Y("month",i),k=W(i),R=!!(e&&a&&!w(N,M)&&!w(N,P)),Q=()=>{p(e),g(a);const h=v(e?b(e):i),x=v(a?b(a):F(h,1));f(h),T(x),D(String(h.getUTCFullYear())),y(String(x.getUTCFullYear())),l(!0)},E=(h,x,$)=>{if(x(h),!/^\d{4}$/.test(h))return;const C=Number(h);C>=1900&&C<=i.getUTCFullYear()&&$(U=>ce(U,C))},S=(h,x,$,C)=>{const U=F(h,x);$(U),C(String(U.getUTCFullYear()))},A=h=>{!r||c?(p(h),g(void 0)):h{s({}),l(!1)};return t.jsxs("div",{className:`paper-date-filter${o?" paper-date-filter-single-calendar":""}`,role:"group","aria-label":"Publication date",children:[t.jsx("button",{type:"button",className:`sort-btn sort-btn-time${w(N,M)?" active":""}`,onClick:()=>s(M),children:"Last Week"}),t.jsx("button",{type:"button",className:`sort-btn sort-btn-time${w(N,P)?" active":""}`,onClick:()=>s(P),children:"Last Month"}),t.jsx("button",{type:"button",className:`sort-btn sort-btn-time${!e&&!a?" active":""}`,onClick:()=>s({}),children:"All Time"}),t.jsxs(ee,{open:d,onOpenChange:h=>{h?Q():l(!1)},children:[t.jsx(te,{asChild:!0,children:t.jsx("button",{type:"button",className:`sort-btn sort-btn-time${R?" active":""}`,"aria-label":R?"Change date range":"Select a range",children:R&&e&&a?le(e,a):"Select a range"})}),t.jsxs(ae,{align:"end",className:`paper-date-popover${o?" paper-date-popover-single-calendar":""}`,role:"dialog","aria-label":"Select a date range",children:[t.jsxs("div",{className:"paper-date-popover-header",children:[t.jsx("h2",{children:"Select a date range"}),t.jsx("p",{children:"Choose an inclusive start and end publication date."})]}),t.jsxs("div",{className:"paper-date-navigation",children:[t.jsx(I,{calendar:"start",onPrevious:()=>S(m,-1,f,D),onNext:()=>S(m,1,f,D)}),!o&&t.jsx(I,{calendar:"end",onPrevious:()=>S(_,-1,T,y),onNext:()=>S(_,1,T,y),secondary:!0})]}),t.jsxs("div",{className:"paper-date-calendars",children:[t.jsx(L,{month:m,today:k,startDate:r,endDate:c,onSelect:A,yearLabel:o?"Year":"Start year",yearValue:z,onYearChange:h=>E(h,D,f)}),!o&&t.jsx(L,{month:_,today:k,startDate:r,endDate:c,onSelect:A,yearLabel:"End year",yearValue:G,onYearChange:h=>E(h,y,T),secondary:!0})]}),t.jsxs("div",{className:"paper-date-actions",children:[t.jsx("button",{type:"button",className:"paper-date-clear",onClick:q,children:"Clear range"}),t.jsxs("div",{children:[t.jsx("button",{type:"button",onClick:()=>l(!1),children:"Cancel"}),t.jsx("button",{type:"button",className:"paper-date-apply",disabled:!r||!c,onClick:()=>{r&&c&&s({startDate:r,endDate:c}),l(!1)},children:"Apply"})]})]})]})]})]})},pe=()=>t.jsxs("span",{className:"hf-resource-logo",children:[t.jsx("img",{className:"hf-resource-logo-black",src:"/hf-logo-monochrome-black.svg?v=20260729",alt:""}),t.jsx("img",{className:"hf-resource-logo-white",src:"/hf-logo-monochrome-white.svg?v=20260729",alt:""})]}),B=({checked:e,icon:a,label:s,onChange:n})=>t.jsxs("button",{type:"button",className:`paper-feed-filter ${e?"active":""}`,"aria-pressed":e,onClick:()=>n(!e),children:[t.jsxs("span",{className:"paper-feed-filter-content",children:[t.jsx("span",{className:"paper-feed-filter-icon","aria-hidden":"true",children:a}),s]}),e&&t.jsx("span",{className:"paper-feed-filter-check","aria-hidden":"true",children:"✓"})]}),ge=({hasCode:e,hasHfArtifacts:a,onHasCodeChange:s,onHasHfArtifactsChange:n,showDivider:o=!0,showHasCode:i=!0})=>t.jsxs("div",{className:"paper-feed-resource-controls",role:"group","aria-label":"Resource filters",children:[o&&t.jsx("span",{className:"paper-feed-resource-divider","aria-hidden":"true"}),t.jsxs("div",{className:"paper-feed-filter-options",children:[i&&t.jsx(B,{checked:e,icon:t.jsx(se,{name:"github",size:14}),label:"Has code",onChange:s}),t.jsx(B,{checked:a,icon:t.jsx(pe,{}),label:"Has artifacts",onChange:n})]})]});function ue(e,a="200px"){const{targetRef:s,isIntersecting:n}=ne({rootMargin:a}),{data:o,hasNextPage:i,isFetchingNextPage:d,fetchNextPage:l}=e;return u.useEffect(()=>{n&&i&&!d&&l()},[n,i,d,l,o]),s}const me=[["trending","trending"],["date_published","newest"],["citation_count","most cited"]];function Ue(){const[e,a]=J(),s=e.get("order_by"),n=s==="date_published"||s==="citation_count"?s:"trending",o=e.get("has_code")==="true",i=e.get("has_hf_artifacts")==="true",d=V(e),l=(r,p)=>{const c=new URLSearchParams(e);p?c.set(r,p):c.delete(r),a(c)};return{searchParams:e,setSearchParams:a,orderBy:n,hasCode:o,hasHfArtifacts:i,dateRange:d,setOrderBy:r=>l("order_by",r==="trending"?null:r),setHasCode:r=>l("has_code",r?"true":null),setHasHfArtifacts:r=>l("has_hf_artifacts",r?"true":null),setDateRange:r=>a(Z(e,r)),filters:{order_by:n,order_dir:"desc",latest_only:!0,include_resources:!0,has_code:o,has_hf_artifacts:i,start_date:d.startDate,end_date:d.endDate}}}const ve=({feed:e,sorts:a=me,activeSort:s=e.orderBy,showDateFilter:n=!0,showHasCode:o,style:i,leading:d,children:l})=>t.jsxs("div",{className:"sort-bar",style:i,children:[d,t.jsxs("div",{className:"paper-feed-toolbar-controls",children:[a&&t.jsx("div",{className:"sort-options",children:a.map(([r,p])=>t.jsx("button",{type:"button",className:`sort-btn ${s===r?"active":""}`,onClick:()=>e.setOrderBy(r),children:p},r))}),t.jsx(ge,{hasCode:e.hasCode,hasHfArtifacts:e.hasHfArtifacts,onHasCodeChange:e.setHasCode,onHasHfArtifactsChange:e.setHasHfArtifacts,showDivider:!!a,showHasCode:o})]}),n&&t.jsx(he,{startDate:e.dateRange.startDate,endDate:e.dateRange.endDate,onChange:e.setDateRange}),l]}),fe=()=>t.jsx(j,{className:"h-40 w-full"}),xe=()=>t.jsxs("div",{className:"paper-card",children:[t.jsx("div",{className:"paper-thumb-wrap",children:t.jsx(j,{className:"paper-thumb-skeleton"})}),t.jsxs("div",{className:"paper-body",style:{flex:1,gap:12},children:[t.jsx(j,{className:"h-6 w-3/4"}),t.jsx(j,{className:"h-4 w-1/2"}),t.jsx(j,{className:"h-12 w-full"})]})]}),we=({query:e,isLoading:a=e.isLoading,cards:s,empty:n,skeleton:o="block",showInstitution:i,highlightQuery:d,cardHeader:l,rootMargin:r,children:p})=>{const c=ue(e,r);if(a){const g=o==="card"?xe:fe;return t.jsx("div",{className:"paper-list",children:Array.from({length:o==="card"?6:4}).map((m,f)=>t.jsx(g,{},f))})}return s.length===0?n===null?null:t.jsx("div",{className:"no-results",children:n}):t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"paper-list",children:s.map((g,m)=>t.jsxs(K.Fragment,{children:[l==null?void 0:l(m),t.jsx(X,{paper:g,priority:m<3,showInstitution:i,highlightQuery:d,followReasons:g.followReasons})]},g.id))}),t.jsx("div",{ref:c,style:{height:1}}),e.isFetchingNextPage&&t.jsx("div",{style:{padding:"20px 0",textAlign:"center",color:"var(--ink-faint)"},children:"Loading more…"}),p]})};export{he as P,we as a,ve as b,me as c,Ne as r,Ue as u,Se as w}; +import{d as u,j as t,g as J,V as K}from"./index-CHGpuh10.js";import{P as X}from"./PaperCard-BtCEa6CD.js";import{P as ee,a as te,b as ae}from"./popover-BHpRw7vT.js";import{I as se}from"./Icon-CRWrVPWO.js";import{S as j}from"./skeleton-Df0GaMuw.js";import{u as ne}from"./useIntersectionObserver-DZSpsOQX.js";const Y=(e,a)=>{const s=new Date(a),n=new Date(s);return n.setUTCDate(s.getUTCDate()-(e==="week"?6:29)),{startDate:n.toISOString().slice(0,10),endDate:s.toISOString().slice(0,10)}},V=e=>({startDate:e.get("start_date")||void 0,endDate:e.get("end_date")||void 0}),Ne=(e,a=new Date,s="week")=>{const n=V(e);if(n.startDate||n.endDate||e.get("time")==="all_time")return n;const o=new Date(Date.UTC(a.getUTCFullYear(),a.getUTCMonth(),a.getUTCDate()));return Y(s,o)},Z=(e,a)=>{const s=new URLSearchParams(e);return a.startDate?s.set("start_date",a.startDate):s.delete("start_date"),a.endDate?s.set("end_date",a.endDate):s.delete("end_date"),s.delete("time"),s},Se=(e,a)=>{const s=Z(e,a);return!a.startDate&&!a.endDate&&s.set("time","all_time"),s},re=new Intl.DateTimeFormat("en",{month:"long",year:"numeric",timeZone:"UTC"}),H=new Intl.DateTimeFormat("en",{month:"short",timeZone:"UTC"}),O="(max-width: 640px)",oe=()=>{const[e,a]=u.useState(()=>typeof window<"u"&&window.matchMedia(O).matches);return u.useEffect(()=>{const s=window.matchMedia(O),n=o=>a(o.matches);return a(s.matches),s.addEventListener("change",n),()=>s.removeEventListener("change",n)},[]),e},W=e=>e.toISOString().slice(0,10),b=e=>new Date(`${e}T00:00:00Z`),ie=()=>{const e=new Date;return new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()))},F=(e,a)=>new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth()+a,1)),v=e=>new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),1)),ce=(e,a)=>new Date(Date.UTC(a,e.getUTCMonth(),1)),w=(e,a)=>e.startDate===a.startDate&&e.endDate===a.endDate,le=(e,a)=>{const s=b(e),n=b(a),o=H.format(s),i=H.format(n),d=s.getUTCDate(),l=n.getUTCDate(),r=s.getUTCFullYear(),p=n.getUTCFullYear();return e===a?`${o} ${d}, ${r}`:r===p&&s.getUTCMonth()===n.getUTCMonth()?`${o} ${d}–${l}, ${r}`:r===p?`${o} ${d}–${i} ${l}, ${r}`:`${o} ${d}, ${r}–${i} ${l}, ${p}`},de=e=>{const a=e.getUTCFullYear(),s=e.getUTCMonth(),n=new Date(Date.UTC(a,s,1)),o=(n.getUTCDay()+6)%7,i=new Date(n);return i.setUTCDate(n.getUTCDate()-o),Array.from({length:42},(d,l)=>{const r=new Date(i);return r.setUTCDate(i.getUTCDate()+l),{iso:W(r),day:r.getUTCDate(),outsideMonth:r.getUTCMonth()!==s}})},L=({month:e,today:a,startDate:s,endDate:n,onSelect:o,yearLabel:i,yearValue:d,onYearChange:l,secondary:r=!1})=>{const p=u.useMemo(()=>de(e),[e]);return t.jsxs("section",{className:`paper-date-calendar${r?" paper-date-calendar-secondary":""}`,children:[t.jsxs("label",{className:"paper-date-year",children:[t.jsx("span",{children:i}),t.jsx("input",{type:"number",inputMode:"numeric",min:"1900",max:a.slice(0,4),step:"1",value:d,onChange:c=>l(c.target.value)})]}),t.jsx("h3",{children:re.format(e)}),t.jsx("div",{className:"paper-date-weekdays","aria-hidden":"true",children:["Mon","Tue","Wed","Thu","Fri","Sat","Sun"].map(c=>t.jsx("span",{children:c},c))}),t.jsx("div",{className:"paper-date-days",children:p.map(c=>{const g=c.iso===s||c.iso===n,m=!!(s&&n&&c.iso>s&&c.isoa;return t.jsx("button",{type:"button","aria-label":c.iso,"aria-selected":g,disabled:f,className:["paper-date-day",c.outsideMonth?"outside":"",g?"selected":"",m?"in-range":"",c.iso===a?"today":""].filter(Boolean).join(" "),onClick:()=>o(c.iso),children:c.day},c.iso)})})]})},I=({calendar:e,onPrevious:a,onNext:s,secondary:n=!1})=>t.jsxs("div",{className:`paper-date-navigation-group${n?" paper-date-navigation-group-secondary":""}`,children:[t.jsx("button",{type:"button","aria-label":`Previous ${e} month`,onClick:a,children:"←"}),t.jsx("button",{type:"button","aria-label":`Next ${e} month`,onClick:s,children:"→"})]}),he=({startDate:e,endDate:a,onChange:s,currentDate:n})=>{const o=oe(),i=n?b(n):ie(),[d,l]=u.useState(!1),[r,p]=u.useState(),[c,g]=u.useState(),[m,f]=u.useState(()=>v(i)),[_,T]=u.useState(()=>F(v(i),1)),[z,D]=u.useState(()=>String(i.getUTCFullYear())),[G,y]=u.useState(()=>String(i.getUTCFullYear())),N={startDate:e,endDate:a},M=Y("week",i),P=Y("month",i),k=W(i),R=!!(e&&a&&!w(N,M)&&!w(N,P)),Q=()=>{p(e),g(a);const h=v(e?b(e):i),x=v(a?b(a):F(h,1));f(h),T(x),D(String(h.getUTCFullYear())),y(String(x.getUTCFullYear())),l(!0)},E=(h,x,$)=>{if(x(h),!/^\d{4}$/.test(h))return;const C=Number(h);C>=1900&&C<=i.getUTCFullYear()&&$(U=>ce(U,C))},S=(h,x,$,C)=>{const U=F(h,x);$(U),C(String(U.getUTCFullYear()))},A=h=>{!r||c?(p(h),g(void 0)):h{s({}),l(!1)};return t.jsxs("div",{className:`paper-date-filter${o?" paper-date-filter-single-calendar":""}`,role:"group","aria-label":"Publication date",children:[t.jsx("button",{type:"button",className:`sort-btn sort-btn-time${w(N,M)?" active":""}`,onClick:()=>s(M),children:"Last Week"}),t.jsx("button",{type:"button",className:`sort-btn sort-btn-time${w(N,P)?" active":""}`,onClick:()=>s(P),children:"Last Month"}),t.jsx("button",{type:"button",className:`sort-btn sort-btn-time${!e&&!a?" active":""}`,onClick:()=>s({}),children:"All Time"}),t.jsxs(ee,{open:d,onOpenChange:h=>{h?Q():l(!1)},children:[t.jsx(te,{asChild:!0,children:t.jsx("button",{type:"button",className:`sort-btn sort-btn-time${R?" active":""}`,"aria-label":R?"Change date range":"Select a range",children:R&&e&&a?le(e,a):"Select a range"})}),t.jsxs(ae,{align:"end",className:`paper-date-popover${o?" paper-date-popover-single-calendar":""}`,role:"dialog","aria-label":"Select a date range",children:[t.jsxs("div",{className:"paper-date-popover-header",children:[t.jsx("h2",{children:"Select a date range"}),t.jsx("p",{children:"Choose an inclusive start and end publication date."})]}),t.jsxs("div",{className:"paper-date-navigation",children:[t.jsx(I,{calendar:"start",onPrevious:()=>S(m,-1,f,D),onNext:()=>S(m,1,f,D)}),!o&&t.jsx(I,{calendar:"end",onPrevious:()=>S(_,-1,T,y),onNext:()=>S(_,1,T,y),secondary:!0})]}),t.jsxs("div",{className:"paper-date-calendars",children:[t.jsx(L,{month:m,today:k,startDate:r,endDate:c,onSelect:A,yearLabel:o?"Year":"Start year",yearValue:z,onYearChange:h=>E(h,D,f)}),!o&&t.jsx(L,{month:_,today:k,startDate:r,endDate:c,onSelect:A,yearLabel:"End year",yearValue:G,onYearChange:h=>E(h,y,T),secondary:!0})]}),t.jsxs("div",{className:"paper-date-actions",children:[t.jsx("button",{type:"button",className:"paper-date-clear",onClick:q,children:"Clear range"}),t.jsxs("div",{children:[t.jsx("button",{type:"button",onClick:()=>l(!1),children:"Cancel"}),t.jsx("button",{type:"button",className:"paper-date-apply",disabled:!r||!c,onClick:()=>{r&&c&&s({startDate:r,endDate:c}),l(!1)},children:"Apply"})]})]})]})]})]})},pe=()=>t.jsxs("span",{className:"hf-resource-logo",children:[t.jsx("img",{className:"hf-resource-logo-black",src:"/hf-logo-monochrome-black.svg?v=20260729",alt:""}),t.jsx("img",{className:"hf-resource-logo-white",src:"/hf-logo-monochrome-white.svg?v=20260729",alt:""})]}),B=({checked:e,icon:a,label:s,onChange:n})=>t.jsxs("button",{type:"button",className:`paper-feed-filter ${e?"active":""}`,"aria-pressed":e,onClick:()=>n(!e),children:[t.jsxs("span",{className:"paper-feed-filter-content",children:[t.jsx("span",{className:"paper-feed-filter-icon","aria-hidden":"true",children:a}),s]}),e&&t.jsx("span",{className:"paper-feed-filter-check","aria-hidden":"true",children:"✓"})]}),ge=({hasCode:e,hasHfArtifacts:a,onHasCodeChange:s,onHasHfArtifactsChange:n,showDivider:o=!0,showHasCode:i=!0})=>t.jsxs("div",{className:"paper-feed-resource-controls",role:"group","aria-label":"Resource filters",children:[o&&t.jsx("span",{className:"paper-feed-resource-divider","aria-hidden":"true"}),t.jsxs("div",{className:"paper-feed-filter-options",children:[i&&t.jsx(B,{checked:e,icon:t.jsx(se,{name:"github",size:14}),label:"Has code",onChange:s}),t.jsx(B,{checked:a,icon:t.jsx(pe,{}),label:"Has artifacts",onChange:n})]})]});function ue(e,a="200px"){const{targetRef:s,isIntersecting:n}=ne({rootMargin:a}),{data:o,hasNextPage:i,isFetchingNextPage:d,fetchNextPage:l}=e;return u.useEffect(()=>{n&&i&&!d&&l()},[n,i,d,l,o]),s}const me=[["trending","trending"],["date_published","newest"],["citation_count","most cited"]];function Ue(){const[e,a]=J(),s=e.get("order_by"),n=s==="date_published"||s==="citation_count"?s:"trending",o=e.get("has_code")==="true",i=e.get("has_hf_artifacts")==="true",d=V(e),l=(r,p)=>{const c=new URLSearchParams(e);p?c.set(r,p):c.delete(r),a(c)};return{searchParams:e,setSearchParams:a,orderBy:n,hasCode:o,hasHfArtifacts:i,dateRange:d,setOrderBy:r=>l("order_by",r==="trending"?null:r),setHasCode:r=>l("has_code",r?"true":null),setHasHfArtifacts:r=>l("has_hf_artifacts",r?"true":null),setDateRange:r=>a(Z(e,r)),filters:{order_by:n,order_dir:"desc",latest_only:!0,include_resources:!0,has_code:o,has_hf_artifacts:i,start_date:d.startDate,end_date:d.endDate}}}const ve=({feed:e,sorts:a=me,activeSort:s=e.orderBy,showDateFilter:n=!0,showHasCode:o,style:i,leading:d,children:l})=>t.jsxs("div",{className:"sort-bar",style:i,children:[d,t.jsxs("div",{className:"paper-feed-toolbar-controls",children:[a&&t.jsx("div",{className:"sort-options",children:a.map(([r,p])=>t.jsx("button",{type:"button",className:`sort-btn ${s===r?"active":""}`,onClick:()=>e.setOrderBy(r),children:p},r))}),t.jsx(ge,{hasCode:e.hasCode,hasHfArtifacts:e.hasHfArtifacts,onHasCodeChange:e.setHasCode,onHasHfArtifactsChange:e.setHasHfArtifacts,showDivider:!!a,showHasCode:o})]}),n&&t.jsx(he,{startDate:e.dateRange.startDate,endDate:e.dateRange.endDate,onChange:e.setDateRange}),l]}),fe=()=>t.jsx(j,{className:"h-40 w-full"}),xe=()=>t.jsxs("div",{className:"paper-card",children:[t.jsx("div",{className:"paper-thumb-wrap",children:t.jsx(j,{className:"paper-thumb-skeleton"})}),t.jsxs("div",{className:"paper-body",style:{flex:1,gap:12},children:[t.jsx(j,{className:"h-6 w-3/4"}),t.jsx(j,{className:"h-4 w-1/2"}),t.jsx(j,{className:"h-12 w-full"})]})]}),we=({query:e,isLoading:a=e.isLoading,cards:s,empty:n,skeleton:o="block",showInstitution:i,highlightQuery:d,cardHeader:l,rootMargin:r,children:p})=>{const c=ue(e,r);if(a){const g=o==="card"?xe:fe;return t.jsx("div",{className:"paper-list",children:Array.from({length:o==="card"?6:4}).map((m,f)=>t.jsx(g,{},f))})}return s.length===0?n===null?null:t.jsx("div",{className:"no-results",children:n}):t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"paper-list",children:s.map((g,m)=>t.jsxs(K.Fragment,{children:[l==null?void 0:l(m),t.jsx(X,{paper:g,priority:m<3,showInstitution:i,highlightQuery:d,followReasons:g.followReasons})]},g.id))}),t.jsx("div",{ref:c,style:{height:1}}),e.isFetchingNextPage&&t.jsx("div",{style:{padding:"20px 0",textAlign:"center",color:"var(--ink-faint)"},children:"Loading more…"}),p]})};export{he as P,we as a,ve as b,me as c,Ne as r,Ue as u,Se as w}; diff --git a/assets/PaperPreviewLink-zGfFNaz6.js b/assets/PaperPreviewLink-CPkn2Kqv.js similarity index 98% rename from assets/PaperPreviewLink-zGfFNaz6.js rename to assets/PaperPreviewLink-CPkn2Kqv.js index 47efa127c2de2b73abff9ddab54f0880ffe60891..77dbb06cb6c9d03b138588da65210c21a957b030 100644 --- a/assets/PaperPreviewLink-zGfFNaz6.js +++ b/assets/PaperPreviewLink-CPkn2Kqv.js @@ -1,4 +1,4 @@ -import{o as F,f as j,m as b,a as le,p as O,b as z,n as D,h as ce,s as ue,c as he,v as pe,S as me}from"./index-tLcwYp0U.js";import{l as fe}from"./index-Dj6aE-6E.js";import R from"./katex-DkKDou_j.js";import{j as p,V as A,a3 as de,p as xe,w as C,f as ge,i as ye,L as T,b as we,A as be}from"./index-CjdUkE4w.js";import{H as Ne,a as ve,b as ke}from"./hover-card-CIBIV2Hx.js";import{p as I}from"./papers-DgZwjF3K.js";import{u as Fe}from"./useMutation-BYtVrkc7.js";function je(){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];F(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,""),m=this.stack[this.stack.length-1];F(m.type==="math"),this.exit(a),m.value=c;const f=m.data.hChildren[0];F(f.type==="element"),F(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(),m=this.stack[this.stack.length-1];F(m.type==="inlineMath"),this.exit(a),m.value=c,m.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 Ce(e){let t=(e||{}).singleDollarTextMath;return t==null&&(t=!0),n.peek=i,{unsafe:[{character:"\r",inConstruct:"mathFlowMeta"},{character:` +import{o as F,f as j,m as b,a as le,p as O,b as z,n as D,h as ce,s as ue,c as he,v as pe,S as me}from"./index-B141zdPU.js";import{l as fe}from"./index-BzjqtLRb.js";import R from"./katex-DkKDou_j.js";import{j as p,V as A,a3 as de,p as xe,w as C,f as ge,i as ye,L as T,b as we,A as be}from"./index-CHGpuh10.js";import{H as Ne,a as ve,b as ke}from"./hover-card-Dz7z6DCn.js";import{p as I}from"./papers-BPpxs2sO.js";import{u as Fe}from"./useMutation-3fOqWcpt.js";function je(){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];F(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,""),m=this.stack[this.stack.length-1];F(m.type==="math"),this.exit(a),m.value=c;const f=m.data.hChildren[0];F(f.type==="element"),F(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(),m=this.stack[this.stack.length-1];F(m.type==="inlineMath"),this.exit(a),m.value=c,m.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 Ce(e){let t=(e||{}).singleDollarTextMath;return t==null&&(t=!0),n.peek=i,{unsafe:[{character:"\r",inConstruct:"mathFlowMeta"},{character:` `,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||"",m=l.createTracker(a),f="$".repeat(Math.max(fe(c,"$")+1,2)),g=l.enter("mathFlow");let d=m.move(f);if(s.meta){const x=l.enter("mathFlowMeta");d+=m.move(l.safe(s.meta,{after:` `,before:d,encode:["$"],...m.current()})),x()}return d+=m.move(` `),c&&(d+=m.move(c+` diff --git a/assets/PaperReaderView-CqbyUlPD.js b/assets/PaperReaderView-BEoTUiXT.js similarity index 90% rename from assets/PaperReaderView-CqbyUlPD.js rename to assets/PaperReaderView-BEoTUiXT.js index 3c74b88a4b3719b7284352271d28418f0ba77bc5..f8209515e92108f1ad6e6cfe5f342902b6683788 100644 --- a/assets/PaperReaderView-CqbyUlPD.js +++ b/assets/PaperReaderView-BEoTUiXT.js @@ -1 +1 @@ -import{d as s,b as Q,j as a,A as X,u as He,w as Fe,e as qe,a3 as Pe,Z as Ke,L as O}from"./index-CjdUkE4w.js";import{u as Ue,R as De,A as Oe,c as Ve,d as Qe,a as Xe,P as Ze,e as Ye}from"./chatLifecycle-B6B3Dpfi.js";import{M as Ge}from"./MarkdownText-MrITlqRE.js";import{g as Je,a as et}from"./papers-DgZwjF3K.js";import{w as tt,e as rt,a as V,b as xe,c as we}from"./paperReader-h6jqpWHI.js";import{a as at}from"./usePapers-BZThqZCx.js";import{c as st}from"./chat-B1EBF720.js";import{s as Z}from"./safeExternalHref-CkBrsh84.js";import{ChatExperience as nt}from"./ChatView-DeilSeCH.js";import"./chatSessions-9VEG8seW.js";/* empty css */import"./hover-card-CIBIV2Hx.js";import"./CatalogEntityPreviewLink-DY_jhXy9.js";import"./catalog-qXcKve0z.js";import"./github-4bW4WI_e.js";import"./file-text-CHlxsNJC.js";import"./PaperPreviewLink-zGfFNaz6.js";import"./index-tLcwYp0U.js";import"./index-Dj6aE-6E.js";import"./katex-DkKDou_j.js";import"./useMutation-BYtVrkc7.js";import"./thumbs-up-Dn_5H93T.js";import"./copy-SoF5zg-g.js";import"./queryOptions-C9woPjwX.js";import"./arrow-left-CkQb0MI4.js";import"./external-link-CTLWFJ8S.js";import"./plus-AztI1566.js";import"./search-DxMn7VKI.js";import"./chevron-up-BwiJ46dh.js";import"./AuthorAvatar-D9249Frl.js";import"./curation-CyyuHfv5.js";import"./useInfiniteQuery-DeZTTVbI.js";import"./McpShowcase-Bo79ATLK.js";import"./AgentLogos-xoTIu0NB.js";import"./share-2-Nvga0TP8.js";import"./openrouter-B-ghWDkd.js";function ot(r){return r instanceof X&&r.status===422?"This page could not be turned into a readable paper.":r instanceof X&&r.status===503?"Paper content is still being prepared. Please try again later.":"The paper could not be loaded."}function it({paperId:r,paperKey:o,paperTitle:i,paperHref:g,sourceUrl:t,resources:c,paperVersion:h="",selectionEnabled:b=!1,onReady:P,onPaperSelection:W,onPaperSelectionError:l}){const C=s.useRef(null),f=Q({queryKey:["paperWebMarkdown",r],queryFn:()=>Je(r),staleTime:5*6e4,retry:(S,d)=>S<2&&!(d instanceof X&&d.status<500),retryDelay:3e3}),y=f.isSuccess;s.useEffect(()=>{y&&(P==null||P())},[P,y]),Ue({enabled:b&&!!h&&y,pagesRoot:C,routeId:o,paperVersion:h,numPages:1,onSelect:W,onError:l});const v=f.data?tt(f.data):"";return a.jsxs("div",{className:"pdf-viewer",children:[a.jsx(De,{paperTitle:i,paperHref:g,resources:c,label:"Paper controls",children:a.jsx("div",{className:"pdf-toolbar-controls",children:a.jsx("a",{href:t,target:"_blank",rel:"noopener noreferrer",children:"Open original"})})}),a.jsx("div",{className:"pdf-scroll-frame",children:a.jsx("div",{className:"pdf-scroll",role:"region","aria-label":"Paper web page",children:f.isPending?a.jsx("div",{className:"pdf-loading",role:"status",children:"Preparing a readable version of this page…"}):f.isError?a.jsxs("div",{className:"pdf-error",role:"alert",children:[a.jsx("p",{children:ot(f.error)}),a.jsxs("div",{children:[a.jsx("button",{type:"button",onClick:()=>void f.refetch(),children:"Retry"})," ",a.jsx("a",{href:t,target:"_blank",rel:"noopener noreferrer",children:"Open original"})]})]}):a.jsxs("article",{ref:C,className:"reader-web-document","data-page":"1",children:[!v.startsWith("# ")&&a.jsx("h1",{children:i}),a.jsx(Ge,{text:v})]})})})]})}const ye=66,ct=240,Y="pwc:reader:split-ratio";function lt(r){const o=Number(sessionStorage.getItem(we(r)));return Number.isInteger(o)&&o>0?o:1}function dt(){const r=Number(localStorage.getItem(Y));return Number.isFinite(r)&&r>=45&&r<=75?r:ye}function ut(r){const o=Z(r);if(!o)return null;const i=new URL(o);return(i.hostname==="arxiv.org"||i.hostname==="www.arxiv.org")&&i.pathname.startsWith("/pdf/")&&i.pathname.endsWith(".pdf")&&(i.pathname=i.pathname.slice(0,-4)),i.href}const ft=/^\/pdf\/(\d{4}\.\d{4,5}(?:v\d{1,3})?|[a-z]+(?:-[a-z]+)*(?:\.[A-Z]{2})?\/\d{7}(?:v\d{1,3})?)$/;function pt(r){const o=new URL(r),i=o.pathname.match(ft);return(o.hostname==="arxiv.org"||o.hostname==="www.arxiv.org")&&i&&!o.search?Pe(`/paper-assets/arxiv-pdf/${i[1]}`)??r:r}function mt(r){return new URL(r).hostname.replace(/^www\./,"")}function ht(r){if(!r)return{};const o={};for(const t of r.repositories??[]){if(!t.is_official)continue;const c=Z(t.url);if(!c)continue;const h=new URL(c),b=h.pathname.split("/").filter(Boolean);if((h.hostname==="github.com"||h.hostname==="www.github.com")&&b.length>=2){o.repository={href:c,stars:t.num_stars||0};break}}const i=[...r.project_pages??[]].sort((t,c)=>Number(c.is_official)-Number(t.is_official));for(const t of i){const c=Z(t.url);if(c){o.projectPage={href:c,label:mt(c)};break}}const g=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 g>0&&r.arxiv_id&&(o.huggingFace={href:`https://huggingface.co/papers/${r.arxiv_id.replace(/v\d+$/i,"")}`,count:g}),o}function gt({routeId:r}){var me,he,ge,be,ve;const o=qe(),i=at(r,!!r),g=Q({queryKey:["chatAvailability"],queryFn:()=>st.getAvailability(),refetchInterval:3e4,retry:!1}),t=i.data,c=t?rt(t):null,h=c?null:(t==null?void 0:t.source)==="external"?Pe(`/paper-assets/external/${t.id}/paper.pdf`):ut(t==null?void 0:t.url_pdf),b=h&&(t==null?void 0:t.source)!=="external"?pt(h):h,P=ht(t),W=s.useMemo(()=>{var e;return(e=t==null?void 0:t.author_links)==null?void 0:e.flatMap(n=>n.id?[{id:n.id,name:n.name,avatarUrl:n.hf_avatar_url}]:[])},[t==null?void 0:t.author_links]),l=((me=t==null?void 0:t.arxiv_id)==null?void 0:me.replace(/v\d+$/i,""))||r,C=s.useCallback(()=>o(`/paper/${l}`),[l,o]),[f,y]=s.useState(()=>sessionStorage.getItem(V(r))||void 0),[v,S]=s.useState(dt),[d,Re]=s.useState(()=>sessionStorage.getItem(xe(r))==="1"),[x,k]=s.useState("paper"),[z,A]=s.useState(),[Se,je]=s.useState(),[_e,Ce]=s.useState(!1),ke=s.useCallback(()=>Ce(!0),[]),[Ae,R]=s.useState(""),[G]=s.useState(()=>lt(r)),[j,Ne]=s.useState(0),[J,ee]=s.useState(!1),[Ee,te]=s.useState(!1),N=s.useRef(null),L=s.useRef(null),E=s.useRef(null),re=s.useRef(null),ae=s.useRef(null),B=s.useRef(!1),T=s.useRef(!1),H=s.useRef(0),w=s.useRef(0),F=s.useRef(0),_=s.useRef(v),se=s.useRef(G),q=s.useRef(t==null?void 0:t.version),ne=Ve().reset,oe=s.useRef(f),p=j>=840;s.useEffect(()=>{oe.current!==f&&(oe.current=f,ne())},[f,ne]),s.useEffect(()=>{t!=null&&t.version&&q.current&&t.version!==q.current&&(A(void 0),R("")),q.current=t==null?void 0:t.version},[t==null?void 0:t.version]),s.useEffect(()=>()=>{window.clearTimeout(H.current),cancelAnimationFrame(w.current)},[]),s.useLayoutEffect(()=>{const e=N.current;if(!e)return;const n=()=>Ne(e.clientWidth);n();const u=new ResizeObserver(n);return u.observe(e),()=>u.disconnect()},[t]),s.useEffect(()=>{if(!t)return;document.title=`${t.title} — Papers With Code reader`;let e=document.querySelector('meta[name="robots"]');const n=!e;e||(e=document.createElement("meta"),e.name="robots",document.head.appendChild(e));const u=e.content;e.content="noindex, nofollow";let m=document.querySelector('link[rel="canonical"]');const Le=!m;m||(m=document.createElement("link"),m.rel="canonical",document.head.appendChild(m));const Be=m.href;return m.href=`${window.location.origin}/paper/${l}`,()=>{document.title="Papers With Code",n?e==null||e.remove():e&&(e.content=u),Le?m==null||m.remove():m&&(m.href=Be)}},[l,t]);const $=s.useCallback(e=>{if(!j)return Math.max(45,Math.min(75,e));const n=480/j*100,u=100-360/j*100;return Math.max(n,Math.min(u,e))},[j]);s.useEffect(()=>S(e=>{const n=$(e);return _.current=n,n}),[$]);const I=e=>{const n=$(e);_.current=n,S(n),localStorage.setItem(Y,String(n))},ie=e=>{var u;const n=$(e);_.current=n,L.current&&(L.current.style.width=`${n}%`),E.current&&(E.current.style.width=`${100-n}%`),(u=re.current)==null||u.setAttribute("aria-valuenow",String(Math.round(n)))},ce=e=>{F.current=e,!w.current&&(w.current=requestAnimationFrame(()=>{var u;w.current=0;const n=(u=N.current)==null?void 0:u.getBoundingClientRect();n!=null&&n.width&&ie((F.current-n.left)/n.width*100)}))},Te=e=>{T.current=!0,ee(!0),e.currentTarget.setPointerCapture(e.pointerId),ce(e.clientX)},K=()=>{var e;if(T.current){if(w.current){cancelAnimationFrame(w.current),w.current=0;const n=(e=N.current)==null?void 0:e.getBoundingClientRect();n!=null&&n.width&&ie((F.current-n.left)/n.width*100)}T.current=!1,S(_.current),localStorage.setItem(Y,String(_.current)),ee(!1)}},le=e=>{window.clearTimeout(H.current),te(!0),Re(e),sessionStorage.setItem(xe(r),e?"1":"0"),H.current=window.setTimeout(()=>te(!1),ct+40)},de=e=>{B.current=!0,le(e)};s.useEffect(()=>{var e;B.current&&(B.current=!1,(e=d?ae.current:E.current)==null||e.focus())},[d]);const $e=e=>{y(e),sessionStorage.setItem(V(r),e)},Ie=()=>{y(void 0),sessionStorage.removeItem(V(r)),A(void 0),R("")},ue=((he=g.data)==null?void 0:he.paper_reader_selection_enabled)===!0,fe=e=>{A(e),R(`Selection from page ${e.page} added to chat`),p&&d&&le(!1)},Me=s.useCallback(e=>{A(e),e||R("")},[]),U=((ge=g.data)==null?void 0:ge.paper_reader_citations_enabled)===!0&&!!b,M=Q({queryKey:["paper-layout",l],queryFn:()=>et(l),enabled:U&&!!l,staleTime:5*6e4}).data,We=s.useMemo(()=>U?{layout:M,open:e=>{const n=M?Qe(M,e):[];n.length&&(je(u=>({boxes:n,nonce:((u==null?void 0:u.nonce)??0)+1})),k("paper"))}}:null,[U,M]),pe=Ke()&&((be=g.data)==null?void 0:be.paper_reader_chat_enabled)!==!1,D=!!(t&&pe&&!(c&&!_e)),ze=t&&pe&&!D?a.jsx("div",{className:"reader-chat-unavailable",role:"status",children:"Chat opens once the paper is ready."}):t&&D?a.jsx(nt,{mode:"paper",routeSessionId:f,primaryPaper:{id:t.id,routeId:l,title:t.title},currentPage:()=>se.current,paperSelection:z,onPaperSelectionChange:Me,onSessionId:$e,onReaderSubmit:()=>k("assistant"),onReaderNewChat:Ie,onReaderClose:p?()=>de(!0):void 0}):a.jsx("div",{className:"reader-chat-unavailable",children:"Chat is not enabled for this preview."});return i.isLoading?a.jsx("div",{className:"reader-status",role:"status",children:"Loading paper…"}):i.error||!t?a.jsxs("div",{className:"reader-status",role:"alert",children:[a.jsx("p",{children:"Paper not found."}),a.jsx(O,{to:"/papers",children:"Browse papers"})]}):((ve=g.data)==null?void 0:ve.native_pdf_reader_enabled)===!1?a.jsxs("div",{className:"reader-status",role:"alert",children:[a.jsx("p",{children:"The native reader is currently unavailable."}),a.jsx(O,{to:`/paper/${l}`,children:"Back to paper"})]}):!b&&!c?a.jsxs("div",{className:"reader-status",role:"alert",children:[a.jsx("p",{children:"Native reading is unavailable for this resource."}),a.jsx(O,{to:`/paper/${l}`,children:"Back to paper"})]}):a.jsxs("div",{className:"paper-reader-shell",children:[!p&&a.jsxs("div",{className:"reader-tabs",role:"tablist","aria-label":"Reader panels",children:[a.jsx("button",{type:"button",role:"tab","aria-selected":x==="paper",onClick:()=>k("paper"),children:"Paper"}),a.jsxs("button",{type:"button",role:"tab","aria-selected":x==="assistant","aria-label":z&&x!=="assistant"?"Chat, selection attached":"Chat",onClick:()=>k("assistant"),children:["Chat",z&&x!=="assistant"&&a.jsx("span",{className:"reader-tab-pending","aria-hidden":"true"})]})]}),a.jsx(Xe,{variant:"reader",children:a.jsxs("div",{ref:N,className:`reader-workspace${p?" is-desktop":" is-tabs"}${d?" is-assistant-collapsed":""}${J?" is-resizing":""}`,"data-testid":"paper-chat-workspace",children:[a.jsx("section",{ref:L,className:`reader-paper-pane${!p&&x!=="paper"?" is-hidden":""}`,style:p?{width:d?"100%":`${v}%`}:void 0,role:"tabpanel","aria-label":"Paper","aria-hidden":!p&&x!=="paper",children:c?a.jsx(it,{paperId:t.id,paperKey:l,paperTitle:t.title,paperHref:`/paper/${l}`,sourceUrl:c,resources:P,paperVersion:t.version,selectionEnabled:ue,onReady:ke,onPaperSelection:fe,onPaperSelectionError:R}):b&&a.jsx(Ze,{url:b,downloadUrl:h??b,paperKey:l,paperTitle:t.title,paperHref:`/paper/${l}`,onClose:C,resources:P,initialPage:G,resizeActive:J||Ee,selectionEnabled:ue,paperVersion:t.version,authors:W,loadErrorMessage:t.source==="external"?"Paper content is still being prepared. Please try again later.":void 0,onPaperSelection:fe,onPaperSelectionError:R,highlight:Se,onPageChange:e=>{se.current=e,sessionStorage.setItem(we(r),String(e))}})}),p&&!d&&a.jsx("div",{ref:re,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(v),tabIndex:0,onPointerDown:Te,onPointerMove:e=>{T.current&&ce(e.clientX)},onPointerUp:K,onPointerCancel:K,onLostPointerCapture:K,onDoubleClick:()=>I(ye),onKeyDown:e=>{(e.key==="ArrowLeft"||e.key==="ArrowRight")&&(e.preventDefault(),I(v+(e.key==="ArrowRight"?2:-2))),e.key==="Home"&&I(45),e.key==="End"&&I(75)}}),a.jsx("aside",{ref:E,id:"reader-chat-panel",className:`reader-assistant-pane${!p&&x!=="assistant"?" is-hidden":""}${p&&d?" is-collapsed":""}`,style:p?{width:d?0:`${100-v}%`}:void 0,role:"tabpanel","aria-label":"Chat","aria-hidden":!p&&x!=="assistant"||d,tabIndex:-1,children:a.jsx(Ye.Provider,{value:We,children:ze})}),a.jsx("div",{className:"sr-only","aria-live":"polite",children:Ae}),p&&(d||!D)&&a.jsx("button",{ref:ae,type:"button",className:"reader-collapse-assistant","aria-controls":"reader-chat-panel","aria-expanded":!d,onClick:()=>de(!d),children:d?"Open chat":"Hide chat"})]})})]})}function tr(){const{paperId:r=""}=He(),o=Fe(r).replace(/v\d+$/i,"");return a.jsx(Oe,{workspaceKey:`reader:${r}`,children:a.jsx(gt,{routeId:o},o)})}export{tr as default,ht as readerToolbarResources}; +import{d as s,b as Q,j as a,A as X,u as He,w as Fe,e as qe,a3 as Pe,Z as Ke,L as O}from"./index-CHGpuh10.js";import{u as Ue,R as De,A as Oe,c as Ve,d as Qe,a as Xe,P as Ze,e as Ye}from"./chatLifecycle-Bdz7bFwH.js";import{M as Ge}from"./MarkdownText-D0AGKKJ1.js";import{g as Je,a as et}from"./papers-BPpxs2sO.js";import{w as tt,e as rt,a as V,b as xe,c as we}from"./paperReader-h6jqpWHI.js";import{a as at}from"./usePapers-DzyOc-Ae.js";import{c as st}from"./chat-CuiFt2kN.js";import{s as Z}from"./safeExternalHref-CkBrsh84.js";import{ChatExperience as nt}from"./ChatView-BYQGLYvv.js";import"./chatSessions-BuiIkSLS.js";/* empty css */import"./hover-card-Dz7z6DCn.js";import"./CatalogEntityPreviewLink-C5CxvSnT.js";import"./catalog-DMzmJg__.js";import"./github-CRId1LT2.js";import"./file-text-DPLtNP9U.js";import"./PaperPreviewLink-CPkn2Kqv.js";import"./index-B141zdPU.js";import"./index-BzjqtLRb.js";import"./katex-DkKDou_j.js";import"./useMutation-3fOqWcpt.js";import"./thumbs-up-BGuynS0P.js";import"./copy-CvlL053K.js";import"./queryOptions-C9woPjwX.js";import"./arrow-left-C11GHdHp.js";import"./external-link-CeQVHd7V.js";import"./plus-CYgr1KdS.js";import"./search-Czb1C2Q7.js";import"./chevron-up-BnyqTe42.js";import"./AuthorAvatar-fJxhX3fO.js";import"./curation-DI9_zYNx.js";import"./useInfiniteQuery-DhWyWKGj.js";import"./McpShowcase-D5BEHBL4.js";import"./AgentLogos-PqR86_NK.js";import"./share-2-8l7A6ayI.js";import"./openrouter-CqtCKiJB.js";function ot(r){return r instanceof X&&r.status===422?"This page could not be turned into a readable paper.":r instanceof X&&r.status===503?"Paper content is still being prepared. Please try again later.":"The paper could not be loaded."}function it({paperId:r,paperKey:o,paperTitle:i,paperHref:g,sourceUrl:t,resources:c,paperVersion:h="",selectionEnabled:b=!1,onReady:P,onPaperSelection:W,onPaperSelectionError:l}){const C=s.useRef(null),f=Q({queryKey:["paperWebMarkdown",r],queryFn:()=>Je(r),staleTime:5*6e4,retry:(S,d)=>S<2&&!(d instanceof X&&d.status<500),retryDelay:3e3}),y=f.isSuccess;s.useEffect(()=>{y&&(P==null||P())},[P,y]),Ue({enabled:b&&!!h&&y,pagesRoot:C,routeId:o,paperVersion:h,numPages:1,onSelect:W,onError:l});const v=f.data?tt(f.data):"";return a.jsxs("div",{className:"pdf-viewer",children:[a.jsx(De,{paperTitle:i,paperHref:g,resources:c,label:"Paper controls",children:a.jsx("div",{className:"pdf-toolbar-controls",children:a.jsx("a",{href:t,target:"_blank",rel:"noopener noreferrer",children:"Open original"})})}),a.jsx("div",{className:"pdf-scroll-frame",children:a.jsx("div",{className:"pdf-scroll",role:"region","aria-label":"Paper web page",children:f.isPending?a.jsx("div",{className:"pdf-loading",role:"status",children:"Preparing a readable version of this page…"}):f.isError?a.jsxs("div",{className:"pdf-error",role:"alert",children:[a.jsx("p",{children:ot(f.error)}),a.jsxs("div",{children:[a.jsx("button",{type:"button",onClick:()=>void f.refetch(),children:"Retry"})," ",a.jsx("a",{href:t,target:"_blank",rel:"noopener noreferrer",children:"Open original"})]})]}):a.jsxs("article",{ref:C,className:"reader-web-document","data-page":"1",children:[!v.startsWith("# ")&&a.jsx("h1",{children:i}),a.jsx(Ge,{text:v})]})})})]})}const ye=66,ct=240,Y="pwc:reader:split-ratio";function lt(r){const o=Number(sessionStorage.getItem(we(r)));return Number.isInteger(o)&&o>0?o:1}function dt(){const r=Number(localStorage.getItem(Y));return Number.isFinite(r)&&r>=45&&r<=75?r:ye}function ut(r){const o=Z(r);if(!o)return null;const i=new URL(o);return(i.hostname==="arxiv.org"||i.hostname==="www.arxiv.org")&&i.pathname.startsWith("/pdf/")&&i.pathname.endsWith(".pdf")&&(i.pathname=i.pathname.slice(0,-4)),i.href}const ft=/^\/pdf\/(\d{4}\.\d{4,5}(?:v\d{1,3})?|[a-z]+(?:-[a-z]+)*(?:\.[A-Z]{2})?\/\d{7}(?:v\d{1,3})?)$/;function pt(r){const o=new URL(r),i=o.pathname.match(ft);return(o.hostname==="arxiv.org"||o.hostname==="www.arxiv.org")&&i&&!o.search?Pe(`/paper-assets/arxiv-pdf/${i[1]}`)??r:r}function mt(r){return new URL(r).hostname.replace(/^www\./,"")}function ht(r){if(!r)return{};const o={};for(const t of r.repositories??[]){if(!t.is_official)continue;const c=Z(t.url);if(!c)continue;const h=new URL(c),b=h.pathname.split("/").filter(Boolean);if((h.hostname==="github.com"||h.hostname==="www.github.com")&&b.length>=2){o.repository={href:c,stars:t.num_stars||0};break}}const i=[...r.project_pages??[]].sort((t,c)=>Number(c.is_official)-Number(t.is_official));for(const t of i){const c=Z(t.url);if(c){o.projectPage={href:c,label:mt(c)};break}}const g=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 g>0&&r.arxiv_id&&(o.huggingFace={href:`https://huggingface.co/papers/${r.arxiv_id.replace(/v\d+$/i,"")}`,count:g}),o}function gt({routeId:r}){var me,he,ge,be,ve;const o=qe(),i=at(r,!!r),g=Q({queryKey:["chatAvailability"],queryFn:()=>st.getAvailability(),refetchInterval:3e4,retry:!1}),t=i.data,c=t?rt(t):null,h=c?null:(t==null?void 0:t.source)==="external"?Pe(`/paper-assets/external/${t.id}/paper.pdf`):ut(t==null?void 0:t.url_pdf),b=h&&(t==null?void 0:t.source)!=="external"?pt(h):h,P=ht(t),W=s.useMemo(()=>{var e;return(e=t==null?void 0:t.author_links)==null?void 0:e.flatMap(n=>n.id?[{id:n.id,name:n.name,avatarUrl:n.hf_avatar_url}]:[])},[t==null?void 0:t.author_links]),l=((me=t==null?void 0:t.arxiv_id)==null?void 0:me.replace(/v\d+$/i,""))||r,C=s.useCallback(()=>o(`/paper/${l}`),[l,o]),[f,y]=s.useState(()=>sessionStorage.getItem(V(r))||void 0),[v,S]=s.useState(dt),[d,Re]=s.useState(()=>sessionStorage.getItem(xe(r))==="1"),[x,k]=s.useState("paper"),[z,A]=s.useState(),[Se,je]=s.useState(),[_e,Ce]=s.useState(!1),ke=s.useCallback(()=>Ce(!0),[]),[Ae,R]=s.useState(""),[G]=s.useState(()=>lt(r)),[j,Ne]=s.useState(0),[J,ee]=s.useState(!1),[Ee,te]=s.useState(!1),N=s.useRef(null),L=s.useRef(null),E=s.useRef(null),re=s.useRef(null),ae=s.useRef(null),B=s.useRef(!1),T=s.useRef(!1),H=s.useRef(0),w=s.useRef(0),F=s.useRef(0),_=s.useRef(v),se=s.useRef(G),q=s.useRef(t==null?void 0:t.version),ne=Ve().reset,oe=s.useRef(f),p=j>=840;s.useEffect(()=>{oe.current!==f&&(oe.current=f,ne())},[f,ne]),s.useEffect(()=>{t!=null&&t.version&&q.current&&t.version!==q.current&&(A(void 0),R("")),q.current=t==null?void 0:t.version},[t==null?void 0:t.version]),s.useEffect(()=>()=>{window.clearTimeout(H.current),cancelAnimationFrame(w.current)},[]),s.useLayoutEffect(()=>{const e=N.current;if(!e)return;const n=()=>Ne(e.clientWidth);n();const u=new ResizeObserver(n);return u.observe(e),()=>u.disconnect()},[t]),s.useEffect(()=>{if(!t)return;document.title=`${t.title} — Papers With Code reader`;let e=document.querySelector('meta[name="robots"]');const n=!e;e||(e=document.createElement("meta"),e.name="robots",document.head.appendChild(e));const u=e.content;e.content="noindex, nofollow";let m=document.querySelector('link[rel="canonical"]');const Le=!m;m||(m=document.createElement("link"),m.rel="canonical",document.head.appendChild(m));const Be=m.href;return m.href=`${window.location.origin}/paper/${l}`,()=>{document.title="Papers With Code",n?e==null||e.remove():e&&(e.content=u),Le?m==null||m.remove():m&&(m.href=Be)}},[l,t]);const $=s.useCallback(e=>{if(!j)return Math.max(45,Math.min(75,e));const n=480/j*100,u=100-360/j*100;return Math.max(n,Math.min(u,e))},[j]);s.useEffect(()=>S(e=>{const n=$(e);return _.current=n,n}),[$]);const I=e=>{const n=$(e);_.current=n,S(n),localStorage.setItem(Y,String(n))},ie=e=>{var u;const n=$(e);_.current=n,L.current&&(L.current.style.width=`${n}%`),E.current&&(E.current.style.width=`${100-n}%`),(u=re.current)==null||u.setAttribute("aria-valuenow",String(Math.round(n)))},ce=e=>{F.current=e,!w.current&&(w.current=requestAnimationFrame(()=>{var u;w.current=0;const n=(u=N.current)==null?void 0:u.getBoundingClientRect();n!=null&&n.width&&ie((F.current-n.left)/n.width*100)}))},Te=e=>{T.current=!0,ee(!0),e.currentTarget.setPointerCapture(e.pointerId),ce(e.clientX)},K=()=>{var e;if(T.current){if(w.current){cancelAnimationFrame(w.current),w.current=0;const n=(e=N.current)==null?void 0:e.getBoundingClientRect();n!=null&&n.width&&ie((F.current-n.left)/n.width*100)}T.current=!1,S(_.current),localStorage.setItem(Y,String(_.current)),ee(!1)}},le=e=>{window.clearTimeout(H.current),te(!0),Re(e),sessionStorage.setItem(xe(r),e?"1":"0"),H.current=window.setTimeout(()=>te(!1),ct+40)},de=e=>{B.current=!0,le(e)};s.useEffect(()=>{var e;B.current&&(B.current=!1,(e=d?ae.current:E.current)==null||e.focus())},[d]);const $e=e=>{y(e),sessionStorage.setItem(V(r),e)},Ie=()=>{y(void 0),sessionStorage.removeItem(V(r)),A(void 0),R("")},ue=((he=g.data)==null?void 0:he.paper_reader_selection_enabled)===!0,fe=e=>{A(e),R(`Selection from page ${e.page} added to chat`),p&&d&&le(!1)},Me=s.useCallback(e=>{A(e),e||R("")},[]),U=((ge=g.data)==null?void 0:ge.paper_reader_citations_enabled)===!0&&!!b,M=Q({queryKey:["paper-layout",l],queryFn:()=>et(l),enabled:U&&!!l,staleTime:5*6e4}).data,We=s.useMemo(()=>U?{layout:M,open:e=>{const n=M?Qe(M,e):[];n.length&&(je(u=>({boxes:n,nonce:((u==null?void 0:u.nonce)??0)+1})),k("paper"))}}:null,[U,M]),pe=Ke()&&((be=g.data)==null?void 0:be.paper_reader_chat_enabled)!==!1,D=!!(t&&pe&&!(c&&!_e)),ze=t&&pe&&!D?a.jsx("div",{className:"reader-chat-unavailable",role:"status",children:"Chat opens once the paper is ready."}):t&&D?a.jsx(nt,{mode:"paper",routeSessionId:f,primaryPaper:{id:t.id,routeId:l,title:t.title},currentPage:()=>se.current,paperSelection:z,onPaperSelectionChange:Me,onSessionId:$e,onReaderSubmit:()=>k("assistant"),onReaderNewChat:Ie,onReaderClose:p?()=>de(!0):void 0}):a.jsx("div",{className:"reader-chat-unavailable",children:"Chat is not enabled for this preview."});return i.isLoading?a.jsx("div",{className:"reader-status",role:"status",children:"Loading paper…"}):i.error||!t?a.jsxs("div",{className:"reader-status",role:"alert",children:[a.jsx("p",{children:"Paper not found."}),a.jsx(O,{to:"/papers",children:"Browse papers"})]}):((ve=g.data)==null?void 0:ve.native_pdf_reader_enabled)===!1?a.jsxs("div",{className:"reader-status",role:"alert",children:[a.jsx("p",{children:"The native reader is currently unavailable."}),a.jsx(O,{to:`/paper/${l}`,children:"Back to paper"})]}):!b&&!c?a.jsxs("div",{className:"reader-status",role:"alert",children:[a.jsx("p",{children:"Native reading is unavailable for this resource."}),a.jsx(O,{to:`/paper/${l}`,children:"Back to paper"})]}):a.jsxs("div",{className:"paper-reader-shell",children:[!p&&a.jsxs("div",{className:"reader-tabs",role:"tablist","aria-label":"Reader panels",children:[a.jsx("button",{type:"button",role:"tab","aria-selected":x==="paper",onClick:()=>k("paper"),children:"Paper"}),a.jsxs("button",{type:"button",role:"tab","aria-selected":x==="assistant","aria-label":z&&x!=="assistant"?"Chat, selection attached":"Chat",onClick:()=>k("assistant"),children:["Chat",z&&x!=="assistant"&&a.jsx("span",{className:"reader-tab-pending","aria-hidden":"true"})]})]}),a.jsx(Xe,{variant:"reader",children:a.jsxs("div",{ref:N,className:`reader-workspace${p?" is-desktop":" is-tabs"}${d?" is-assistant-collapsed":""}${J?" is-resizing":""}`,"data-testid":"paper-chat-workspace",children:[a.jsx("section",{ref:L,className:`reader-paper-pane${!p&&x!=="paper"?" is-hidden":""}`,style:p?{width:d?"100%":`${v}%`}:void 0,role:"tabpanel","aria-label":"Paper","aria-hidden":!p&&x!=="paper",children:c?a.jsx(it,{paperId:t.id,paperKey:l,paperTitle:t.title,paperHref:`/paper/${l}`,sourceUrl:c,resources:P,paperVersion:t.version,selectionEnabled:ue,onReady:ke,onPaperSelection:fe,onPaperSelectionError:R}):b&&a.jsx(Ze,{url:b,downloadUrl:h??b,paperKey:l,paperTitle:t.title,paperHref:`/paper/${l}`,onClose:C,resources:P,initialPage:G,resizeActive:J||Ee,selectionEnabled:ue,paperVersion:t.version,authors:W,loadErrorMessage:t.source==="external"?"Paper content is still being prepared. Please try again later.":void 0,onPaperSelection:fe,onPaperSelectionError:R,highlight:Se,onPageChange:e=>{se.current=e,sessionStorage.setItem(we(r),String(e))}})}),p&&!d&&a.jsx("div",{ref:re,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(v),tabIndex:0,onPointerDown:Te,onPointerMove:e=>{T.current&&ce(e.clientX)},onPointerUp:K,onPointerCancel:K,onLostPointerCapture:K,onDoubleClick:()=>I(ye),onKeyDown:e=>{(e.key==="ArrowLeft"||e.key==="ArrowRight")&&(e.preventDefault(),I(v+(e.key==="ArrowRight"?2:-2))),e.key==="Home"&&I(45),e.key==="End"&&I(75)}}),a.jsx("aside",{ref:E,id:"reader-chat-panel",className:`reader-assistant-pane${!p&&x!=="assistant"?" is-hidden":""}${p&&d?" is-collapsed":""}`,style:p?{width:d?0:`${100-v}%`}:void 0,role:"tabpanel","aria-label":"Chat","aria-hidden":!p&&x!=="assistant"||d,tabIndex:-1,children:a.jsx(Ye.Provider,{value:We,children:ze})}),a.jsx("div",{className:"sr-only","aria-live":"polite",children:Ae}),p&&(d||!D)&&a.jsx("button",{ref:ae,type:"button",className:"reader-collapse-assistant","aria-controls":"reader-chat-panel","aria-expanded":!d,onClick:()=>de(!d),children:d?"Open chat":"Hide chat"})]})})]})}function tr(){const{paperId:r=""}=He(),o=Fe(r).replace(/v\d+$/i,"");return a.jsx(Oe,{workspaceKey:`reader:${r}`,children:a.jsx(gt,{routeId:o},o)})}export{tr as default,ht as readerToolbarResources}; diff --git a/assets/PapersListView-DL7UDvBC.js b/assets/PapersListView-BkLVnEdQ.js similarity index 88% rename from assets/PapersListView-DL7UDvBC.js rename to assets/PapersListView-BkLVnEdQ.js index 41739d090b3f257d64c56394aa64c9eb069cbee1..6f6961f62b160e199dec114e8b551ce9acebbac7 100644 --- a/assets/PapersListView-DL7UDvBC.js +++ b/assets/PapersListView-BkLVnEdQ.js @@ -1 +1 @@ -import{d as f,p as M,b as K,j as e,L as x,l as V,o as X,T as J}from"./index-CjdUkE4w.js";import{T as W}from"./SotaBadges-CyScuNCv.js";import{I as H}from"./Icon-CGRs4BYD.js";import{u as Y,P as Z,b as ee,c as se,a as re}from"./PaperFeed-D3FZw29k.js";import{c as ae}from"./catalog-qXcKve0z.js";import{p as O}from"./papers-DgZwjF3K.js";import{t as te,d as ne}from"./transform-CRNzYLch.js";import{u as Q}from"./usePapers-BZThqZCx.js";import{u as ie}from"./useDebounce-wGQ3PIQd.js";import{S as oe}from"./skeleton-DTWi7Ctg.js";import{A as le,a as ce}from"./alert-BM9Xfuyy.js";import{i as de}from"./apiErrors-D0w5By9R.js";import{f as me}from"./frameworks-DDA0P4Tf.js";import"./colors-BkWRhvFI.js";import"./PaperCard-dvXhr75r.js";import"./AuthorAvatar-D9249Frl.js";import"./LatexTitle-DESKtS30.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-Df5_dywQ.js";import"./useIntersectionObserver-Ch6RpsSk.js";import"./curation-CyyuHfv5.js";import"./useInfiniteQuery-DeZTTVbI.js";const g=360;function pe(r,t){const c=r.toLocaleLowerCase();return t.trim().split(/\s+/).filter(Boolean).reduce((i,l)=>{const o=c.indexOf(l.toLocaleLowerCase());return o>=0&&(i<0||o=0?l+1:t}function he(r,t){if(r.length<=g)return r;const c=pe(r,t);if(c<0||c0?"…":""}${r.slice(i,l).trim()}${l{var L,R,T,D,$,A,I,B,q;const r=Y(),{searchParams:t,setSearchParams:c}=r,i=t.get("framework")||void 0,l=t.get("repository")||void 0,o=!!(i||l),d=t.get("search")||"",[b,F]=f.useState(d),h=ie(b,300),n=!o&&d.trim().length>0;f.useEffect(()=>F(d),[d]),f.useEffect(()=>{if(h===d)return;const a=new URLSearchParams(t);h?a.set("search",h):a.delete("search"),c(a,{replace:!0})},[h]),f.useEffect(()=>{const a=t.get("order_by"),m=new URLSearchParams(t);n&&!["relevance","date_published","citation_count"].includes(a||"")?(m.set("order_by","relevance"),c(m,{replace:!0})):!n&&a==="relevance"&&(m.delete("order_by"),c(m,{replace:!0}))},[n,t,c]);const j=n&&r.orderBy==="trending"?"relevance":r.orderBy,S=!o&&r.hasCode,P={...r.filters,has_code:S,search:o&&h||void 0,conference:t.get("conference")||void 0,latest_only:t.get("latest_only")!=="false",framework:i,repository:l},k=Q([...M.feeds.infinite,P],a=>O.list({...P,page:a,page_size:20}),{enabled:!n}),_={q:h.trim(),order_by:j==="trending"?"relevance":j,start_date:r.dateRange.startDate,end_date:r.dateRange.endDate,has_code:S,has_hf_artifacts:r.hasHfArtifacts},E=Q([...M.feeds.search,_],a=>O.searchFeed({..._,page:a,page_size:20,mode:"hybrid"}),{enabled:n&&_.q.length>0}),p=n?E:k,C=K({queryKey:X.topTasksSidebar,queryFn:()=>ae.topTasks(8),enabled:!o&&!n,staleTime:J}),v=f.useMemo(()=>{var m;return(((m=p.data)==null?void 0:m.pages.flatMap(N=>N.results))||[]).map(N=>{const w=te(N);return n?{...w,abstract:he(w.abstract,d)}:w})},[p.data,n,d]),u=((T=(R=(L=k.data)==null?void 0:L.pages)==null?void 0:R[0])==null?void 0:T.count)??0,s=(A=($=(D=k.data)==null?void 0:D.pages)==null?void 0:$[0])==null?void 0:A.scope,y=(B=(I=E.data)==null?void 0:I.pages)==null?void 0:B.at(-1),G=i&&de(p.error),U=(s==null?void 0:s.kind)==="framework"?s.framework_name:s==null?void 0:s.repository;return e.jsxs("div",{className:"page",children:[(s==null?void 0:s.kind)==="framework"&&e.jsxs("nav",{className:"breadcrumb","aria-label":"Breadcrumb",children:[e.jsx(x,{to:"/",children:"Papers"}),e.jsx("span",{className:"sep",children:"/"}),e.jsx(x,{to:"/frameworks",children:"Frameworks"}),e.jsx("span",{className:"sep",children:"/"}),e.jsx("span",{style:{color:"var(--ink)"},children:s.framework_name})]}),e.jsxs("div",{className:"feed-header",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"feed-title",children:o?e.jsxs(e.Fragment,{children:["Papers implemented by ",e.jsx("em",{children:U||i||l})]}):n?e.jsxs(e.Fragment,{children:["Search results for ",e.jsxs("em",{children:["“",d,"”"]})]}):e.jsxs(e.Fragment,{children:["All ",e.jsx("em",{children:"Papers"})]})}),e.jsx("div",{className:"feed-subtitle",children:o?(s==null?void 0:s.kind)==="framework"?u>0&&`${u.toLocaleString()} papers.`:s!=null&&s.repository?e.jsxs(e.Fragment,{children:["GitHub repository ",e.jsx("strong",{children:s.repository}),". ",u>0&&`${u.toLocaleString()} papers.`]}):"Repository-scoped paper feed.":n?`${v.length} loaded from the most relevant results.`:e.jsxs(e.Fragment,{children:["Search the full corpus. ",u>0&&`${u.toLocaleString()} papers indexed.`]})}),o&&s&&e.jsxs("div",{className:"paper-feed-scope-links",children:[e.jsxs("div",{className:"paper-feed-primary-links",children:[s.github_url&&e.jsxs("a",{href:s.github_url,target:"_blank",rel:"noopener noreferrer",className:s.kind==="framework"?"task-framework-link":"framework-link",children:[e.jsx(H,{name:"github",size:13}),s.kind==="framework"?e.jsxs(e.Fragment,{children:[e.jsx("span",{children:s.repository||"GitHub"}),s.num_stars!=null&&e.jsxs("span",{className:"task-framework-link-stars",children:["★ ",me(s.num_stars)]})]}):"GitHub"]}),s.kind==="framework"&&s.introducing_paper_arxiv_id&&e.jsx(x,{to:`/paper/${s.introducing_paper_arxiv_id}`,className:"framework-link",children:"Introducing paper"})]}),s.kind==="framework"&&s.recommended_tasks&&s.recommended_tasks.length>0&&e.jsx("div",{className:"paper-feed-task-tags",children:s.recommended_tasks.map(a=>a.slug?e.jsx(W,{slug:a.slug,label:a.name},a.id):null)})]})]}),e.jsx(Z,{startDate:r.dateRange.startDate,endDate:r.dateRange.endDate,onChange:r.setDateRange})]}),e.jsx("div",{className:"papers-search-row",children:e.jsxs("div",{className:"papers-search-input-wrap",children:[e.jsx(H,{name:"search",size:14}),e.jsx("input",{className:"papers-search-input",placeholder:"Search title or abstract…",value:b,onChange:a=>F(a.target.value)})]})}),e.jsxs("div",{className:o||n?"papers-feed-layout-scoped":"layout-with-sidebar",children:[!o&&!n&&e.jsx("aside",{className:"sidebar",children:e.jsxs("div",{className:"sidebar-section",children:[e.jsx("div",{className:"sidebar-label",children:"Top Domains"}),C.isLoading&&e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:Array.from({length:6}).map((a,m)=>e.jsx(oe,{className:"h-5 w-full"},m))}),e.jsx("div",{className:"sidebar-links",children:(q=C.data)==null?void 0:q.map(a=>e.jsxs(x,{to:`/tasks/${a.slug}`,className:"sidebar-link",children:[ne(a.name,a.slug),a.paper_count!=null&&e.jsx("span",{className:"count",children:a.paper_count})]},a.id))})]})}),e.jsxs("div",{children:[e.jsx(ee,{feed:r,sorts:n?ue:se,activeSort:j,showDateFilter:!1,showHasCode:!o,children:e.jsxs("div",{className:"results-count",children:[v.length," loaded"]})}),G?e.jsx("div",{className:"no-results",children:"Framework not found."}):e.jsxs(e.Fragment,{children:[p.error&&e.jsx(le,{variant:"destructive",className:"mb-4",children:e.jsx(ce,{children:"Failed to load papers. Please try again."})}),e.jsx(re,{query:p,cards:v,skeleton:"card",highlightQuery:n?d:void 0,empty:e.jsxs(e.Fragment,{children:[e.jsx("p",{children:"No matching papers."}),n&&V()&&e.jsx(x,{to:`/chat?q=${encodeURIComponent(d.trim())}`,children:"Ask the assistant instead"})]}),children:!p.hasNextPage&&!p.isFetchingNextPage&&n&&e.jsx("div",{className:"search-results-end",children:y!=null&&y.cap_reached?"End of the top 100 results":"End of results"})})]})]})]})]})};export{Ie as default}; +import{d as f,p as M,b as K,j as e,L as x,l as V,o as X,T as J}from"./index-CHGpuh10.js";import{T as W}from"./SotaBadges-D825CK6n.js";import{I as H}from"./Icon-CRWrVPWO.js";import{u as Y,P as Z,b as ee,c as se,a as re}from"./PaperFeed-DjmnPHUi.js";import{c as ae}from"./catalog-DMzmJg__.js";import{p as O}from"./papers-BPpxs2sO.js";import{t as te,d as ne}from"./transform-Cs8_lTDx.js";import{u as Q}from"./usePapers-DzyOc-Ae.js";import{u as ie}from"./useDebounce-ifvvHuBF.js";import{S as oe}from"./skeleton-Df0GaMuw.js";import{A as le,a as ce}from"./alert-DPvmCXZT.js";import{i as de}from"./apiErrors-CvxFAcrW.js";import{f as me}from"./frameworks-DDA0P4Tf.js";import"./colors-BkWRhvFI.js";import"./PaperCard-BtCEa6CD.js";import"./AuthorAvatar-fJxhX3fO.js";import"./LatexTitle-CfeEppH3.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-BHpRw7vT.js";import"./useIntersectionObserver-DZSpsOQX.js";import"./curation-DI9_zYNx.js";import"./useInfiniteQuery-DhWyWKGj.js";const g=360;function pe(r,t){const c=r.toLocaleLowerCase();return t.trim().split(/\s+/).filter(Boolean).reduce((i,l)=>{const o=c.indexOf(l.toLocaleLowerCase());return o>=0&&(i<0||o=0?l+1:t}function he(r,t){if(r.length<=g)return r;const c=pe(r,t);if(c<0||c0?"…":""}${r.slice(i,l).trim()}${l{var L,R,T,D,$,A,I,B,q;const r=Y(),{searchParams:t,setSearchParams:c}=r,i=t.get("framework")||void 0,l=t.get("repository")||void 0,o=!!(i||l),d=t.get("search")||"",[b,F]=f.useState(d),h=ie(b,300),n=!o&&d.trim().length>0;f.useEffect(()=>F(d),[d]),f.useEffect(()=>{if(h===d)return;const a=new URLSearchParams(t);h?a.set("search",h):a.delete("search"),c(a,{replace:!0})},[h]),f.useEffect(()=>{const a=t.get("order_by"),m=new URLSearchParams(t);n&&!["relevance","date_published","citation_count"].includes(a||"")?(m.set("order_by","relevance"),c(m,{replace:!0})):!n&&a==="relevance"&&(m.delete("order_by"),c(m,{replace:!0}))},[n,t,c]);const j=n&&r.orderBy==="trending"?"relevance":r.orderBy,S=!o&&r.hasCode,P={...r.filters,has_code:S,search:o&&h||void 0,conference:t.get("conference")||void 0,latest_only:t.get("latest_only")!=="false",framework:i,repository:l},k=Q([...M.feeds.infinite,P],a=>O.list({...P,page:a,page_size:20}),{enabled:!n}),_={q:h.trim(),order_by:j==="trending"?"relevance":j,start_date:r.dateRange.startDate,end_date:r.dateRange.endDate,has_code:S,has_hf_artifacts:r.hasHfArtifacts},E=Q([...M.feeds.search,_],a=>O.searchFeed({..._,page:a,page_size:20,mode:"hybrid"}),{enabled:n&&_.q.length>0}),p=n?E:k,C=K({queryKey:X.topTasksSidebar,queryFn:()=>ae.topTasks(8),enabled:!o&&!n,staleTime:J}),v=f.useMemo(()=>{var m;return(((m=p.data)==null?void 0:m.pages.flatMap(N=>N.results))||[]).map(N=>{const w=te(N);return n?{...w,abstract:he(w.abstract,d)}:w})},[p.data,n,d]),u=((T=(R=(L=k.data)==null?void 0:L.pages)==null?void 0:R[0])==null?void 0:T.count)??0,s=(A=($=(D=k.data)==null?void 0:D.pages)==null?void 0:$[0])==null?void 0:A.scope,y=(B=(I=E.data)==null?void 0:I.pages)==null?void 0:B.at(-1),G=i&&de(p.error),U=(s==null?void 0:s.kind)==="framework"?s.framework_name:s==null?void 0:s.repository;return e.jsxs("div",{className:"page",children:[(s==null?void 0:s.kind)==="framework"&&e.jsxs("nav",{className:"breadcrumb","aria-label":"Breadcrumb",children:[e.jsx(x,{to:"/",children:"Papers"}),e.jsx("span",{className:"sep",children:"/"}),e.jsx(x,{to:"/frameworks",children:"Frameworks"}),e.jsx("span",{className:"sep",children:"/"}),e.jsx("span",{style:{color:"var(--ink)"},children:s.framework_name})]}),e.jsxs("div",{className:"feed-header",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"feed-title",children:o?e.jsxs(e.Fragment,{children:["Papers implemented by ",e.jsx("em",{children:U||i||l})]}):n?e.jsxs(e.Fragment,{children:["Search results for ",e.jsxs("em",{children:["“",d,"”"]})]}):e.jsxs(e.Fragment,{children:["All ",e.jsx("em",{children:"Papers"})]})}),e.jsx("div",{className:"feed-subtitle",children:o?(s==null?void 0:s.kind)==="framework"?u>0&&`${u.toLocaleString()} papers.`:s!=null&&s.repository?e.jsxs(e.Fragment,{children:["GitHub repository ",e.jsx("strong",{children:s.repository}),". ",u>0&&`${u.toLocaleString()} papers.`]}):"Repository-scoped paper feed.":n?`${v.length} loaded from the most relevant results.`:e.jsxs(e.Fragment,{children:["Search the full corpus. ",u>0&&`${u.toLocaleString()} papers indexed.`]})}),o&&s&&e.jsxs("div",{className:"paper-feed-scope-links",children:[e.jsxs("div",{className:"paper-feed-primary-links",children:[s.github_url&&e.jsxs("a",{href:s.github_url,target:"_blank",rel:"noopener noreferrer",className:s.kind==="framework"?"task-framework-link":"framework-link",children:[e.jsx(H,{name:"github",size:13}),s.kind==="framework"?e.jsxs(e.Fragment,{children:[e.jsx("span",{children:s.repository||"GitHub"}),s.num_stars!=null&&e.jsxs("span",{className:"task-framework-link-stars",children:["★ ",me(s.num_stars)]})]}):"GitHub"]}),s.kind==="framework"&&s.introducing_paper_arxiv_id&&e.jsx(x,{to:`/paper/${s.introducing_paper_arxiv_id}`,className:"framework-link",children:"Introducing paper"})]}),s.kind==="framework"&&s.recommended_tasks&&s.recommended_tasks.length>0&&e.jsx("div",{className:"paper-feed-task-tags",children:s.recommended_tasks.map(a=>a.slug?e.jsx(W,{slug:a.slug,label:a.name},a.id):null)})]})]}),e.jsx(Z,{startDate:r.dateRange.startDate,endDate:r.dateRange.endDate,onChange:r.setDateRange})]}),e.jsx("div",{className:"papers-search-row",children:e.jsxs("div",{className:"papers-search-input-wrap",children:[e.jsx(H,{name:"search",size:14}),e.jsx("input",{className:"papers-search-input",placeholder:"Search title or abstract…",value:b,onChange:a=>F(a.target.value)})]})}),e.jsxs("div",{className:o||n?"papers-feed-layout-scoped":"layout-with-sidebar",children:[!o&&!n&&e.jsx("aside",{className:"sidebar",children:e.jsxs("div",{className:"sidebar-section",children:[e.jsx("div",{className:"sidebar-label",children:"Top Domains"}),C.isLoading&&e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:Array.from({length:6}).map((a,m)=>e.jsx(oe,{className:"h-5 w-full"},m))}),e.jsx("div",{className:"sidebar-links",children:(q=C.data)==null?void 0:q.map(a=>e.jsxs(x,{to:`/tasks/${a.slug}`,className:"sidebar-link",children:[ne(a.name,a.slug),a.paper_count!=null&&e.jsx("span",{className:"count",children:a.paper_count})]},a.id))})]})}),e.jsxs("div",{children:[e.jsx(ee,{feed:r,sorts:n?ue:se,activeSort:j,showDateFilter:!1,showHasCode:!o,children:e.jsxs("div",{className:"results-count",children:[v.length," loaded"]})}),G?e.jsx("div",{className:"no-results",children:"Framework not found."}):e.jsxs(e.Fragment,{children:[p.error&&e.jsx(le,{variant:"destructive",className:"mb-4",children:e.jsx(ce,{children:"Failed to load papers. Please try again."})}),e.jsx(re,{query:p,cards:v,skeleton:"card",highlightQuery:n?d:void 0,empty:e.jsxs(e.Fragment,{children:[e.jsx("p",{children:"No matching papers."}),n&&V()&&e.jsx(x,{to:`/chat?q=${encodeURIComponent(d.trim())}`,children:"Ask the assistant instead"})]}),children:!p.hasNextPage&&!p.isFetchingNextPage&&n&&e.jsx("div",{className:"search-results-end",children:y!=null&&y.cap_reached?"End of the top 100 results":"End of results"})})]})]})]})]})};export{Ie as default}; diff --git a/assets/PrivacyView-BHODG2cO.js b/assets/PrivacyView-Dv3D7fuz.js similarity index 98% rename from assets/PrivacyView-BHODG2cO.js rename to assets/PrivacyView-Dv3D7fuz.js index 345d664d3356b2e00e324c4602e95faf33685593..3c4dc613184ddb333e12b87e4ac80fd472f74fbc 100644 --- a/assets/PrivacyView-BHODG2cO.js +++ b/assets/PrivacyView-Dv3D7fuz.js @@ -1 +1 @@ -import{j as e}from"./index-CjdUkE4w.js";import{u as s,f as i}from"./useDocumentTitle-2Ho8_KfW.js";const t=()=>(s(i("Privacy Policy")),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{t as default}; +import{j as e}from"./index-CHGpuh10.js";import{u as s,f as i}from"./useDocumentTitle-Deu479Zd.js";const t=()=>(s(i("Privacy Policy")),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{t as default}; diff --git a/assets/RateLimitsView-CrvlGHnU.js b/assets/RateLimitsView-CHGVVIWH.js similarity index 87% rename from assets/RateLimitsView-CrvlGHnU.js rename to assets/RateLimitsView-CHGVVIWH.js index 49f4e3804e972b95e9bce5654ba1bda06451d9dd..893cc6ac037cd58e1c7b03c9c126482a28d5b96f 100644 --- a/assets/RateLimitsView-CrvlGHnU.js +++ b/assets/RateLimitsView-CHGVVIWH.js @@ -1 +1 @@ -import{b as t,j as e}from"./index-CjdUkE4w.js";import{a as s}from"./account-DoluPGSd.js";const n=()=>{const i=t({queryKey:["submission-rate-limit-policy"],queryFn:()=>s.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}; +import{b as t,j as e}from"./index-CHGpuh10.js";import{a as s}from"./account-D9O54ufU.js";const n=()=>{const i=t({queryKey:["submission-rate-limit-policy"],queryFn:()=>s.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}; diff --git a/assets/ResearchFollowButton-DcTptDpW.js b/assets/ResearchFollowButton-DFGdTBex.js similarity index 93% rename from assets/ResearchFollowButton-DcTptDpW.js rename to assets/ResearchFollowButton-DFGdTBex.js index e4191216b3908465d2597865aec6a16899e998ec..dcad28dfe3780ed560941af63e7642e6b2923f44 100644 --- a/assets/ResearchFollowButton-DcTptDpW.js +++ b/assets/ResearchFollowButton-DFGdTBex.js @@ -1 +1 @@ -import{f as x,c as j,d as b,k as F,j as e,h as N,C as S,L as i}from"./index-CjdUkE4w.js";import{u as y,g as C}from"./researchTopic-NmABF6tT.js";import{P as w}from"./plus-AztI1566.js";const f={task:"Get new papers on this task",method:"Get new papers using this method",benchmark:"Get new results on this benchmark",author:"Get new papers by this author",organization:"Get new papers from this organization"};function R({kind:o,entityId:n}){var u;const l=x(),c=l==null?void 0:l.user,h=j(),[m,p]=b.useState(null),d=`${o}:${n}`,a=y(),s=((u=a.data)==null?void 0:u.some(r=>r.kind===o&&String(r.entity_id)===String(n)))??!1,t=C({onChanged:({follow:r})=>p(r?d:null),awaitRefresh:!0});if(!l||!c&&F())return null;if(!c)return e.jsxs("div",{className:"research-follow",children:[e.jsxs("a",{className:"research-follow-btn",href:N(h.pathname+h.search),children:[e.jsx(w,{"aria-hidden":"true"}),"Follow"]}),e.jsxs("span",{className:"research-follow-hint",children:["Sign in to ",f[o].toLowerCase(),"."]})]});const g=t.error||a.error;return e.jsxs("div",{className:"research-follow",children:[e.jsx("button",{type:"button",className:s?"research-follow-btn is-following":"research-follow-btn",disabled:a.isLoading||!!a.error||t.isPending,"aria-pressed":s,"aria-label":s?"Unfollow":"Follow",onClick:()=>t.mutate({kind:o,entityId:n,follow:!s}),children:s?e.jsxs(e.Fragment,{children:[e.jsx(S,{"aria-hidden":"true"}),e.jsx("span",{className:"research-follow-label",children:"Following"}),e.jsx("span",{className:"research-follow-label-hover",children:"Unfollow"})]}):e.jsxs(e.Fragment,{children:[e.jsx(w,{"aria-hidden":"true"}),"Follow"]})}),g?e.jsx("span",{className:"research-follow-hint is-error",role:"alert",children:"Could not update follows. Please try again."}):s?m===d&&e.jsxs("span",{className:"research-follow-hint",role:"status",children:["Added to ",e.jsx(i,{to:"/following",children:"your Following feed"})," · ",e.jsx(i,{to:"/settings",children:"Manage in Settings"})]}):e.jsxs("span",{className:"research-follow-hint",children:[f[o]," in ",e.jsx(i,{to:"/following",children:"your Following feed"}),"."]})]})}export{R}; +import{f as x,c as j,d as b,k as F,j as e,h as N,C as S,L as i}from"./index-CHGpuh10.js";import{u as y,g as C}from"./researchTopic-DK_KbYKH.js";import{P as w}from"./plus-CYgr1KdS.js";const f={task:"Get new papers on this task",method:"Get new papers using this method",benchmark:"Get new results on this benchmark",author:"Get new papers by this author",organization:"Get new papers from this organization"};function R({kind:o,entityId:n}){var u;const l=x(),c=l==null?void 0:l.user,h=j(),[m,p]=b.useState(null),d=`${o}:${n}`,a=y(),s=((u=a.data)==null?void 0:u.some(r=>r.kind===o&&String(r.entity_id)===String(n)))??!1,t=C({onChanged:({follow:r})=>p(r?d:null),awaitRefresh:!0});if(!l||!c&&F())return null;if(!c)return e.jsxs("div",{className:"research-follow",children:[e.jsxs("a",{className:"research-follow-btn",href:N(h.pathname+h.search),children:[e.jsx(w,{"aria-hidden":"true"}),"Follow"]}),e.jsxs("span",{className:"research-follow-hint",children:["Sign in to ",f[o].toLowerCase(),"."]})]});const g=t.error||a.error;return e.jsxs("div",{className:"research-follow",children:[e.jsx("button",{type:"button",className:s?"research-follow-btn is-following":"research-follow-btn",disabled:a.isLoading||!!a.error||t.isPending,"aria-pressed":s,"aria-label":s?"Unfollow":"Follow",onClick:()=>t.mutate({kind:o,entityId:n,follow:!s}),children:s?e.jsxs(e.Fragment,{children:[e.jsx(S,{"aria-hidden":"true"}),e.jsx("span",{className:"research-follow-label",children:"Following"}),e.jsx("span",{className:"research-follow-label-hover",children:"Unfollow"})]}):e.jsxs(e.Fragment,{children:[e.jsx(w,{"aria-hidden":"true"}),"Follow"]})}),g?e.jsx("span",{className:"research-follow-hint is-error",role:"alert",children:"Could not update follows. Please try again."}):s?m===d&&e.jsxs("span",{className:"research-follow-hint",role:"status",children:["Added to ",e.jsx(i,{to:"/following",children:"your Following feed"})," · ",e.jsx(i,{to:"/settings",children:"Manage in Settings"})]}):e.jsxs("span",{className:"research-follow-hint",children:[f[o]," in ",e.jsx(i,{to:"/following",children:"your Following feed"}),"."]})]})}export{R}; diff --git a/assets/SavedPapersView-CCKo8hBZ.js b/assets/SavedPapersView-B2OtoH-9.js similarity index 89% rename from assets/SavedPapersView-CCKo8hBZ.js rename to assets/SavedPapersView-B2OtoH-9.js index 754a02f7e5d5b1e5dcb133859cf72f268dcef117..59afc62aec6d1c452ba02cc00099cb24d71b22fd 100644 --- a/assets/SavedPapersView-CCKo8hBZ.js +++ b/assets/SavedPapersView-B2OtoH-9.js @@ -1 +1 @@ -import{a as g,b as v,A as x,j as e,H as j,L as b,p as N}from"./index-CjdUkE4w.js";import{P as f}from"./PaperCard-dvXhr75r.js";import{T as k}from"./SotaBadges-CyScuNCv.js";import{S as r}from"./skeleton-DTWi7Ctg.js";import{A as y,a as w}from"./alert-BM9Xfuyy.js";import{a as A}from"./account-DoluPGSd.js";import{t as B}from"./transform-CRNzYLch.js";import{s as F}from"./savedPapersAuth-DT83MLdi.js";import"./AuthorAvatar-D9249Frl.js";import"./Icon-CGRs4BYD.js";import"./LatexTitle-DESKtS30.js";import"./papers-DgZwjF3K.js";import"./curation-CyyuHfv5.js";import"./safeExternalHref-CkBrsh84.js";import"./colors-BkWRhvFI.js";const U=()=>{var d,l;const{user:i,isLoading:m}=g(),a=v({queryKey:[...N.feeds.saved],queryFn:()=>A.getBookmarks(),enabled:!!i,staleTime:30*1e3}),c=a.error instanceof x&&a.error.code==="saved_papers_bucket_authorization_required",o=!!a.data&&!a.data.bucket_connected,n=()=>{window.location.assign(F())};if(m)return 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"})]});if(!i)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:["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(j,{returnTo:"/saved"})})]});let h=0;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:["Saved ",e.jsx("em",{children:"Papers"})]}),e.jsxs("div",{className:"feed-subtitle",children:[(d=a.data)!=null&&d.count?`${a.data.count.toLocaleString()} saved · grouped by domain`:"Your bookmarked papers, grouped by domain.",(l=a.data)!=null&&l.bucket_connected?e.jsxs(e.Fragment,{children:[" · ",e.jsx("a",{href:`https://huggingface.co/buckets/${i.username}/pwc-saved-papers`,target:"_blank",rel:"noopener noreferrer",children:"Open your Hugging Face Bucket"})]}):null]})]})}),c?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:n,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,o&&a.data.bucket_migrated?e.jsxs("div",{className:"saved-bucket-migration",children:[e.jsx("p",{children:"Your saved papers are already in your private Hugging Face Bucket. Reconnect it in this browser to read from it and save new papers there."}),e.jsx("button",{type:"button",className:"hf-signin-btn",onClick:n,children:"Reconnect Hugging Face Bucket"})]}):o?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:n,children:a.data.count?"Approve and migrate saved papers":"Use a Hugging Face Bucket"})]}):null,c||a.error?null:a.isLoading?e.jsx("div",{className:"paper-list",children:Array.from({length:4}).map((t,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(b,{to:"/papers",className:"sidebar-link",style:{display:"inline"},children:"Browse papers →"})]}):a.data.areas.map(t=>e.jsxs("section",{className:"saved-area-section",children:[e.jsx("h2",{className:"saved-area-heading",children:t.name}),t.tasks.map(s=>{const p=s.papers.length;return e.jsxs("div",{className:"saved-task-block",children:[e.jsxs("div",{className:"saved-task-row",children:[s.slug?e.jsx(k,{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:[p," ",p===1?"paper":"papers"]})]}),e.jsx("div",{className:"paper-list",children:s.papers.map(u=>e.jsx(f,{paper:B(u),priority:h++<3},u.id))})]},`task-${t.id??"other"}-${s.id??"untagged"}`)})]},`area-${t.id??"other"}`))]})};export{U as default}; +import{a as g,b as v,A as x,j as e,H as j,L as b,p as N}from"./index-CHGpuh10.js";import{P as f}from"./PaperCard-BtCEa6CD.js";import{T as k}from"./SotaBadges-D825CK6n.js";import{S as r}from"./skeleton-Df0GaMuw.js";import{A as y,a as w}from"./alert-DPvmCXZT.js";import{a as A}from"./account-D9O54ufU.js";import{t as B}from"./transform-Cs8_lTDx.js";import{s as F}from"./savedPapersAuth-Coc4Zc7v.js";import"./AuthorAvatar-fJxhX3fO.js";import"./Icon-CRWrVPWO.js";import"./LatexTitle-CfeEppH3.js";import"./papers-BPpxs2sO.js";import"./curation-DI9_zYNx.js";import"./safeExternalHref-CkBrsh84.js";import"./colors-BkWRhvFI.js";const U=()=>{var d,l;const{user:i,isLoading:m}=g(),a=v({queryKey:[...N.feeds.saved],queryFn:()=>A.getBookmarks(),enabled:!!i,staleTime:30*1e3}),c=a.error instanceof x&&a.error.code==="saved_papers_bucket_authorization_required",o=!!a.data&&!a.data.bucket_connected,n=()=>{window.location.assign(F())};if(m)return 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"})]});if(!i)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:["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(j,{returnTo:"/saved"})})]});let h=0;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:["Saved ",e.jsx("em",{children:"Papers"})]}),e.jsxs("div",{className:"feed-subtitle",children:[(d=a.data)!=null&&d.count?`${a.data.count.toLocaleString()} saved · grouped by domain`:"Your bookmarked papers, grouped by domain.",(l=a.data)!=null&&l.bucket_connected?e.jsxs(e.Fragment,{children:[" · ",e.jsx("a",{href:`https://huggingface.co/buckets/${i.username}/pwc-saved-papers`,target:"_blank",rel:"noopener noreferrer",children:"Open your Hugging Face Bucket"})]}):null]})]})}),c?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:n,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,o&&a.data.bucket_migrated?e.jsxs("div",{className:"saved-bucket-migration",children:[e.jsx("p",{children:"Your saved papers are already in your private Hugging Face Bucket. Reconnect it in this browser to read from it and save new papers there."}),e.jsx("button",{type:"button",className:"hf-signin-btn",onClick:n,children:"Reconnect Hugging Face Bucket"})]}):o?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:n,children:a.data.count?"Approve and migrate saved papers":"Use a Hugging Face Bucket"})]}):null,c||a.error?null:a.isLoading?e.jsx("div",{className:"paper-list",children:Array.from({length:4}).map((t,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(b,{to:"/papers",className:"sidebar-link",style:{display:"inline"},children:"Browse papers →"})]}):a.data.areas.map(t=>e.jsxs("section",{className:"saved-area-section",children:[e.jsx("h2",{className:"saved-area-heading",children:t.name}),t.tasks.map(s=>{const p=s.papers.length;return e.jsxs("div",{className:"saved-task-block",children:[e.jsxs("div",{className:"saved-task-row",children:[s.slug?e.jsx(k,{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:[p," ",p===1?"paper":"papers"]})]}),e.jsx("div",{className:"paper-list",children:s.papers.map(u=>e.jsx(f,{paper:B(u),priority:h++<3},u.id))})]},`task-${t.id??"other"}-${s.id??"untagged"}`)})]},`area-${t.id??"other"}`))]})};export{U as default}; diff --git a/assets/SearchOverlay-Dvr0LreX.js b/assets/SearchOverlay-DLtGxH8I.js similarity index 95% rename from assets/SearchOverlay-Dvr0LreX.js rename to assets/SearchOverlay-DLtGxH8I.js index ed966f60e67f33ffe0ecd98ed166a51154db0c6c..db27253b126909d15d64bda813de22bd99b2b51d 100644 --- a/assets/SearchOverlay-Dvr0LreX.js +++ b/assets/SearchOverlay-DLtGxH8I.js @@ -1 +1 @@ -import{d as K,e as O,V as M,l as B,b as i,j as e,p as H}from"./index-CjdUkE4w.js";import{L as U}from"./LatexTitle-DESKtS30.js";import{c as x}from"./catalog-qXcKve0z.js";import{p as R}from"./papers-DgZwjF3K.js";import{u as Y}from"./useDebounce-wGQ3PIQd.js";import{c as G,h as V}from"./colors-BkWRhvFI.js";import{d as X}from"./transform-CRNzYLch.js";import"./curation-CyyuHfv5.js";const Z=10,S=6,W=350,v=3,ls=({open:t,onClose:h})=>{var A,C,w,P,Q,z;const f=K.useRef(null),$=O(),[c,D]=M.useState(""),a=Y(c,W),j=c.trim(),r=a.trim().length>=v,y=B();K.useEffect(()=>{var l;if(!t)return;(l=f.current)==null||l.focus();const s=N=>{N.key==="Escape"&&(N.preventDefault(),N.stopPropagation(),h())};return window.addEventListener("keydown",s,!0),()=>window.removeEventListener("keydown",s,!0)},[t,h]);const k=i({queryKey:[...H.feeds.searchOverlay,a],queryFn:()=>R.search(a,1,Z),enabled:t&&r,staleTime:6e4,retry:!1}),_=i({queryKey:["search-tasks",a],queryFn:()=>x.listTasks({q:a,page_size:6}),enabled:t&&r,staleTime:6e4,retry:!1}),b=i({queryKey:["search-methods",a],queryFn:()=>x.listMethods({q:a,page_size:6}),enabled:t&&r,staleTime:6e4,retry:!1}),E=i({queryKey:["search-benchmarks",a],queryFn:()=>x.listDatasets({q:a,page_size:6}),enabled:t&&r,staleTime:6e4,retry:!1}),F=i({queryKey:["search-authors",a],queryFn:()=>R.searchAuthors(a,S),enabled:t&&r,staleTime:6e4,retry:!1}),q=i({queryKey:["search-organizations",a],queryFn:()=>x.searchOrganizations(a,S),enabled:t&&r,staleTime:6e4,retry:!1});if(!t)return null;const o=((A=_.data)==null?void 0:A.results)||[],d=((C=b.data)==null?void 0:C.results)||[],u=((w=E.data)==null?void 0:w.results)||[],m=((P=F.data)==null?void 0:P.results)||[],p=((Q=q.data)==null?void 0:Q.results)||[],g=((z=k.data)==null?void 0:z.results)||[],I=k.isFetching||_.isFetching||b.isFetching||E.isFetching||F.isFetching||q.isFetching,L=o.length||g.length||d.length||u.length||m.length||p.length,n=s=>{h(),$(s)},T=()=>{const s=c.trim();s&&n(`/chat?q=${encodeURIComponent(s)}`)};return e.jsx("div",{className:"search-overlay",onClick:h,children:e.jsxs("div",{className:"search-modal",onClick:s=>s.stopPropagation(),children:[e.jsx("input",{ref:f,className:"search-modal-input",placeholder:"Search papers, tasks, methods, benchmarks, authors, or organizations…",value:c,onChange:s=>D(s.target.value),onKeyDown:s=>{y&&s.key==="Enter"&&(s.preventDefault(),T())}}),e.jsxs("div",{className:"search-results",children:[y&&c.trim()&&e.jsxs("button",{type:"button",className:"search-ask-row",onClick:T,children:[e.jsx("span",{className:"search-ask-chip",children:"assistant"}),e.jsxs("span",{className:"search-ask-text",children:["Ask: “",c.trim(),"”"]}),e.jsx("kbd",{children:"↵"})]}),!a&&e.jsxs("div",{className:"search-empty",children:["Try “diffusion”, “object detection”, or an arXiv id.",y&&e.jsx("span",{className:"search-empty-sub",children:"Press Enter to ask the assistant"})]}),a&&!r&&e.jsxs("div",{className:"search-empty",children:["Keep typing: results appear from ",v," characters."]}),r&&!I&&!L&&e.jsxs("div",{className:"search-empty",children:['No matches for "',c,'"']}),o.length>0&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"search-section-label",children:["Tasks · ",o.length]}),o.map(s=>{const l=G(V(s.slug||""));return e.jsxs("div",{className:"search-result-tag",onClick:()=>n(`/tasks/${s.slug}`),children:[e.jsx("span",{className:"dot",style:{width:6,height:6,borderRadius:"50%",background:l.dot}}),e.jsx("span",{className:"name",children:X(s.name,s.slug)}),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:["Methods · ",d.length]}),d.map(s=>e.jsxs("div",{className:"search-result-tag",onClick:()=>n(`/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))]}),u.length>0&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"search-section-label",children:["Benchmarks · ",u.length]}),u.map(s=>e.jsxs("div",{className:"search-result-tag",onClick:()=>n(`/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:["Authors · ",m.length]}),m.map(s=>e.jsxs("div",{className:"search-result-tag",onClick:()=>n(`/authors/${s.id}`),children:[e.jsx("span",{className:"name",children:s.full_name}),s.hf_username&&e.jsxs("span",{className:"handle",children:["@",s.hf_username]}),s.paper_count>0&&e.jsxs("span",{className:"count",children:[s.paper_count," papers"]})]},s.id))]}),p.length>0&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"search-section-label",children:["Organizations · ",p.length]}),p.map(s=>e.jsxs("div",{className:"search-result-tag",onClick:()=>n(`/orgs/${s.slug}`),children:[s.logo_url&&e.jsx("img",{className:"logo",src:s.logo_url,alt:"",loading:"lazy"}),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," papers"]})]},s.id))]}),g.length>0&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"search-section-label",children:["Papers · ",g.length]}),g.map(s=>{var l;return e.jsxs("div",{className:"search-result",onClick:()=>n(`/paper/${s.arxiv_id||s.id}`),children:[e.jsx("div",{className:"search-result-title",children:e.jsx(U,{title:s.title})}),e.jsxs("div",{className:"search-result-meta",children:[e.jsx("span",{children:s.arxiv_id?`arXiv:${s.arxiv_id}`:"External resource"}),((l=s.authors)==null?void 0:l[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)})]}),j.length>=v&&e.jsxs("button",{type:"button",className:"search-view-all-row",onClick:()=>n(`/papers?search=${encodeURIComponent(j)}`),children:["View all paper results for “",j,"”"]})]})]})})};export{ls as default}; +import{d as K,e as O,V as M,l as B,b as i,j as e,p as H}from"./index-CHGpuh10.js";import{L as U}from"./LatexTitle-CfeEppH3.js";import{c as x}from"./catalog-DMzmJg__.js";import{p as R}from"./papers-BPpxs2sO.js";import{u as Y}from"./useDebounce-ifvvHuBF.js";import{c as G,h as V}from"./colors-BkWRhvFI.js";import{d as X}from"./transform-Cs8_lTDx.js";import"./curation-DI9_zYNx.js";const Z=10,S=6,W=350,v=3,ls=({open:t,onClose:h})=>{var A,C,w,P,Q,z;const f=K.useRef(null),$=O(),[c,D]=M.useState(""),a=Y(c,W),j=c.trim(),r=a.trim().length>=v,y=B();K.useEffect(()=>{var l;if(!t)return;(l=f.current)==null||l.focus();const s=N=>{N.key==="Escape"&&(N.preventDefault(),N.stopPropagation(),h())};return window.addEventListener("keydown",s,!0),()=>window.removeEventListener("keydown",s,!0)},[t,h]);const k=i({queryKey:[...H.feeds.searchOverlay,a],queryFn:()=>R.search(a,1,Z),enabled:t&&r,staleTime:6e4,retry:!1}),_=i({queryKey:["search-tasks",a],queryFn:()=>x.listTasks({q:a,page_size:6}),enabled:t&&r,staleTime:6e4,retry:!1}),b=i({queryKey:["search-methods",a],queryFn:()=>x.listMethods({q:a,page_size:6}),enabled:t&&r,staleTime:6e4,retry:!1}),E=i({queryKey:["search-benchmarks",a],queryFn:()=>x.listDatasets({q:a,page_size:6}),enabled:t&&r,staleTime:6e4,retry:!1}),F=i({queryKey:["search-authors",a],queryFn:()=>R.searchAuthors(a,S),enabled:t&&r,staleTime:6e4,retry:!1}),q=i({queryKey:["search-organizations",a],queryFn:()=>x.searchOrganizations(a,S),enabled:t&&r,staleTime:6e4,retry:!1});if(!t)return null;const o=((A=_.data)==null?void 0:A.results)||[],d=((C=b.data)==null?void 0:C.results)||[],u=((w=E.data)==null?void 0:w.results)||[],m=((P=F.data)==null?void 0:P.results)||[],p=((Q=q.data)==null?void 0:Q.results)||[],g=((z=k.data)==null?void 0:z.results)||[],I=k.isFetching||_.isFetching||b.isFetching||E.isFetching||F.isFetching||q.isFetching,L=o.length||g.length||d.length||u.length||m.length||p.length,n=s=>{h(),$(s)},T=()=>{const s=c.trim();s&&n(`/chat?q=${encodeURIComponent(s)}`)};return e.jsx("div",{className:"search-overlay",onClick:h,children:e.jsxs("div",{className:"search-modal",onClick:s=>s.stopPropagation(),children:[e.jsx("input",{ref:f,className:"search-modal-input",placeholder:"Search papers, tasks, methods, benchmarks, authors, or organizations…",value:c,onChange:s=>D(s.target.value),onKeyDown:s=>{y&&s.key==="Enter"&&(s.preventDefault(),T())}}),e.jsxs("div",{className:"search-results",children:[y&&c.trim()&&e.jsxs("button",{type:"button",className:"search-ask-row",onClick:T,children:[e.jsx("span",{className:"search-ask-chip",children:"assistant"}),e.jsxs("span",{className:"search-ask-text",children:["Ask: “",c.trim(),"”"]}),e.jsx("kbd",{children:"↵"})]}),!a&&e.jsxs("div",{className:"search-empty",children:["Try “diffusion”, “object detection”, or an arXiv id.",y&&e.jsx("span",{className:"search-empty-sub",children:"Press Enter to ask the assistant"})]}),a&&!r&&e.jsxs("div",{className:"search-empty",children:["Keep typing: results appear from ",v," characters."]}),r&&!I&&!L&&e.jsxs("div",{className:"search-empty",children:['No matches for "',c,'"']}),o.length>0&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"search-section-label",children:["Tasks · ",o.length]}),o.map(s=>{const l=G(V(s.slug||""));return e.jsxs("div",{className:"search-result-tag",onClick:()=>n(`/tasks/${s.slug}`),children:[e.jsx("span",{className:"dot",style:{width:6,height:6,borderRadius:"50%",background:l.dot}}),e.jsx("span",{className:"name",children:X(s.name,s.slug)}),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:["Methods · ",d.length]}),d.map(s=>e.jsxs("div",{className:"search-result-tag",onClick:()=>n(`/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))]}),u.length>0&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"search-section-label",children:["Benchmarks · ",u.length]}),u.map(s=>e.jsxs("div",{className:"search-result-tag",onClick:()=>n(`/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:["Authors · ",m.length]}),m.map(s=>e.jsxs("div",{className:"search-result-tag",onClick:()=>n(`/authors/${s.id}`),children:[e.jsx("span",{className:"name",children:s.full_name}),s.hf_username&&e.jsxs("span",{className:"handle",children:["@",s.hf_username]}),s.paper_count>0&&e.jsxs("span",{className:"count",children:[s.paper_count," papers"]})]},s.id))]}),p.length>0&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"search-section-label",children:["Organizations · ",p.length]}),p.map(s=>e.jsxs("div",{className:"search-result-tag",onClick:()=>n(`/orgs/${s.slug}`),children:[s.logo_url&&e.jsx("img",{className:"logo",src:s.logo_url,alt:"",loading:"lazy"}),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," papers"]})]},s.id))]}),g.length>0&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"search-section-label",children:["Papers · ",g.length]}),g.map(s=>{var l;return e.jsxs("div",{className:"search-result",onClick:()=>n(`/paper/${s.arxiv_id||s.id}`),children:[e.jsx("div",{className:"search-result-title",children:e.jsx(U,{title:s.title})}),e.jsxs("div",{className:"search-result-meta",children:[e.jsx("span",{children:s.arxiv_id?`arXiv:${s.arxiv_id}`:"External resource"}),((l=s.authors)==null?void 0:l[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)})]}),j.length>=v&&e.jsxs("button",{type:"button",className:"search-view-all-row",onClick:()=>n(`/papers?search=${encodeURIComponent(j)}`),children:["View all paper results for “",j,"”"]})]})]})})};export{ls as default}; diff --git a/assets/SettingsView-DAkLrhMP.js b/assets/SettingsView-DSsDYMnQ.js similarity index 97% rename from assets/SettingsView-DAkLrhMP.js rename to assets/SettingsView-DSsDYMnQ.js index f4702e2a32c4e5f691a48e7f12a1bf8317838ee4..b5e7486fff579c891fbac3bc34384a1a4855a112 100644 --- a/assets/SettingsView-DAkLrhMP.js +++ b/assets/SettingsView-DSsDYMnQ.js @@ -1,4 +1,4 @@ -import{s as k,a as A,c as ce,d as L,b as I,r as Q,j as e,L as T,i as W,H as C,h as de,aw as he,l as ue,V as P,A as ae}from"./index-CjdUkE4w.js";import{u as E}from"./useMutation-BYtVrkc7.js";import{a as ge,T as se,r as z,u as me,g as pe}from"./researchTopic-NmABF6tT.js";import{S as K}from"./switch-hcLL2FH0.js";import{S as fe}from"./sparkles-CIfeDmV2.js";import{A as ye}from"./arrow-right-BrRhWCQS.js";import{T as xe}from"./trophy-BQy3NGXy.js";import{c as N}from"./chat-B1EBF720.js";import{u as je,f as be}from"./useDocumentTitle-2Ho8_KfW.js";import{a as ve,u as we,r as ke,O as Y}from"./openrouter-B-ghWDkd.js";import{u as Ne}from"./preferences-DMhkYrri.js";import{E as ne}from"./external-link-CTLWFJ8S.js";import{M as Ce}from"./moon-HVqBvdxs.js";import"./index-BxR27SAB.js";import"./account-DoluPGSd.js";/** +import{s as k,a as A,c as ce,d as L,b as I,r as Q,j as e,L as T,i as W,H as C,h as de,aw as he,l as ue,V as P,A as ae}from"./index-CHGpuh10.js";import{u as E}from"./useMutation-3fOqWcpt.js";import{a as ge,T as se,r as z,u as me,g as pe}from"./researchTopic-DK_KbYKH.js";import{S as K}from"./switch-CD23XWT7.js";import{S as fe}from"./sparkles-BSDHUYSH.js";import{A as ye}from"./arrow-right-CUTKRnAt.js";import{T as xe}from"./trophy-BFUARFPy.js";import{c as N}from"./chat-CuiFt2kN.js";import{u as je,f as be}from"./useDocumentTitle-Deu479Zd.js";import{a as ve,u as we,r as ke,O as Y}from"./openrouter-CqtCKiJB.js";import{u as Ne}from"./preferences-BR-SGx3E.js";import{E as ne}from"./external-link-CeQVHd7V.js";import{M as Ce}from"./moon-DPD0RWyO.js";import"./index-CWaI9Snb.js";import"./account-D9O54ufU.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/SharedChatView-BS81XNKW.js b/assets/SharedChatView-pWPy2puC.js similarity index 78% rename from assets/SharedChatView-BS81XNKW.js rename to assets/SharedChatView-pWPy2puC.js index b3c54f0e88e0ef910b018ffc7e90e25d2a4237b8..62a2427c7fd5a134d9cacaba7d09ff29a40bdee0 100644 --- a/assets/SharedChatView-BS81XNKW.js +++ b/assets/SharedChatView-pWPy2puC.js @@ -1 +1 @@ -import{u as x,e as g,d as o,b as v,j as e,A as f,q as j}from"./index-CjdUkE4w.js";import{A as b,a as y,C as S,U as w,b as N,t as k}from"./chatLifecycle-B6B3Dpfi.js";import{e as C,p as q,f as A,q as P}from"./chatSessions-9VEG8seW.js";import{c as _}from"./chat-B1EBF720.js";/* empty css */import"./hover-card-CIBIV2Hx.js";import"./CatalogEntityPreviewLink-DY_jhXy9.js";import"./catalog-qXcKve0z.js";import"./github-4bW4WI_e.js";import"./file-text-CHlxsNJC.js";import"./PaperPreviewLink-zGfFNaz6.js";import"./index-tLcwYp0U.js";import"./index-Dj6aE-6E.js";import"./katex-DkKDou_j.js";import"./papers-DgZwjF3K.js";import"./curation-CyyuHfv5.js";import"./useMutation-BYtVrkc7.js";import"./thumbs-up-Dn_5H93T.js";import"./copy-SoF5zg-g.js";import"./queryOptions-C9woPjwX.js";import"./arrow-left-CkQb0MI4.js";import"./external-link-CTLWFJ8S.js";import"./plus-AztI1566.js";import"./search-DxMn7VKI.js";import"./chevron-up-BwiJ46dh.js";import"./AuthorAvatar-D9249Frl.js";const m=s=>s instanceof f&&s.status===404,E=({detail:s})=>{const[n,i]=o.useState(()=>q(s)),h=o.useMemo(()=>A(n),[n]),l=(t,p)=>{i(u=>k(u,t,p))};return e.jsx("div",{className:"shared-chat-transcript",children:n.map(t=>t.role==="user"?e.jsx(w,{id:t.id,text:t.text??"",paperMentions:t.paperMentions??[],paperSelection:t.paperSelection},t.id):e.jsx(N,{msg:t,papers:h,onToggleBlock:l},t.id))})},se=()=>{const{shareId:s=""}=x(),n=g(),i=j(),[h,l]=o.useState(60),t=v({queryKey:["shared-chat",s],queryFn:()=>_.getSharedChat(s),retry:(r,a)=>!m(a)&&r<1});o.useEffect(()=>{const r=document.title,a=document.head.querySelector('meta[name="robots"]'),c=a==null?void 0:a.content,d=a??document.createElement("meta");return d.name="robots",d.content="noindex,nofollow",a||document.head.appendChild(d),document.title="Shared conversation",()=>{document.title=r,a?a.content=c??"":d.remove()}},[]),o.useLayoutEffect(()=>{const r=document.querySelector(".app-header");if(!r)return;const a=()=>l(r.offsetHeight);a();const c=new ResizeObserver(a);return c.observe(r),()=>c.disconnect()},[]);const p=r=>{P(r,void 0,{autoSend:!1}),n("/chat")},u=m(t.error);return t.isLoading?e.jsxs("div",{className:"shared-chat-state",role:"status",children:[e.jsx(C,{})," Loading shared conversation…"]}):u?e.jsxs("div",{className:"shared-chat-state shared-chat-not-found",children:[e.jsx("h1",{children:"Shared conversation not found"}),e.jsx("p",{children:"This link is invalid or is no longer available."})]}):t.isError||!t.data?e.jsxs("div",{className:"shared-chat-state",role:"alert",children:[e.jsx("h1",{children:"Couldn’t load this conversation"}),e.jsx("p",{children:"Please check your connection and try again."}),e.jsx("button",{type:"button",onClick:()=>void t.refetch(),children:"Try again"})]}):e.jsx(b,{workspaceKey:`share:${s}:${t.data.updated_at}`,autoOpenOnMount:!0,children:e.jsxs("div",{className:"shared-chat-page",style:{height:`calc(100dvh - ${h}px)`},children:[e.jsxs("div",{className:"shared-chat-heading",children:[e.jsx("h1",{children:"Shared conversation"}),i&&e.jsx("span",{className:"chat-staging-badge",children:"Staging"})]}),e.jsx(y,{variant:"shared",children:e.jsxs("div",{className:"shared-chat-content","data-testid":"shared-conversation-pane",children:[e.jsx(E,{detail:t.data},t.data.updated_at),t.data.model_label&&e.jsxs("div",{className:"shared-chat-attribution",children:[e.jsxs("span",{children:["Generated with ",t.data.model_label]}),t.data.model_provider==="huggingface"&&e.jsxs("span",{children:["Powered by ",e.jsx("span",{"aria-hidden":"true",children:"🤗"})," ",e.jsx("a",{href:"https://huggingface.co/docs/inference-providers/en/index",target:"_blank",rel:"noreferrer",children:"Inference Providers"})]}),t.data.model_provider==="openrouter"&&e.jsxs("span",{children:["Powered by ",e.jsx("a",{href:"https://openrouter.ai",target:"_blank",rel:"noreferrer",children:"OpenRouter"})]}),t.data.model_provider==="openai"&&e.jsx("span",{children:"Powered by OpenAI"})]}),e.jsxs("section",{className:"shared-chat-fresh","aria-labelledby":"shared-chat-fresh-title",children:[e.jsx("h2",{id:"shared-chat-fresh-title",children:"Start a new conversation"}),e.jsx("p",{children:"Your new question starts with an empty context."}),i&&e.jsxs("div",{className:"shared-chat-access-note",role:"note",children:[e.jsx("strong",{children:"Limited staging preview."})," Starting a chat is available only to approved Hugging Face users."]}),e.jsx(S,{onSend:r=>p(r.text),placeholder:"Ask a new research question…"})]})]})})]})})};export{se as default}; +import{u as x,e as g,d as o,b as v,j as e,A as f,q as j}from"./index-CHGpuh10.js";import{A as b,a as y,C as S,U as w,b as N,t as k}from"./chatLifecycle-Bdz7bFwH.js";import{e as C,p as q,f as A,q as P}from"./chatSessions-BuiIkSLS.js";import{c as _}from"./chat-CuiFt2kN.js";/* empty css */import"./hover-card-Dz7z6DCn.js";import"./CatalogEntityPreviewLink-C5CxvSnT.js";import"./catalog-DMzmJg__.js";import"./github-CRId1LT2.js";import"./file-text-DPLtNP9U.js";import"./PaperPreviewLink-CPkn2Kqv.js";import"./index-B141zdPU.js";import"./index-BzjqtLRb.js";import"./katex-DkKDou_j.js";import"./papers-BPpxs2sO.js";import"./curation-DI9_zYNx.js";import"./useMutation-3fOqWcpt.js";import"./thumbs-up-BGuynS0P.js";import"./copy-CvlL053K.js";import"./queryOptions-C9woPjwX.js";import"./arrow-left-C11GHdHp.js";import"./external-link-CeQVHd7V.js";import"./plus-CYgr1KdS.js";import"./search-Czb1C2Q7.js";import"./chevron-up-BnyqTe42.js";import"./AuthorAvatar-fJxhX3fO.js";const m=s=>s instanceof f&&s.status===404,E=({detail:s})=>{const[n,i]=o.useState(()=>q(s)),h=o.useMemo(()=>A(n),[n]),l=(t,p)=>{i(u=>k(u,t,p))};return e.jsx("div",{className:"shared-chat-transcript",children:n.map(t=>t.role==="user"?e.jsx(w,{id:t.id,text:t.text??"",paperMentions:t.paperMentions??[],paperSelection:t.paperSelection},t.id):e.jsx(N,{msg:t,papers:h,onToggleBlock:l},t.id))})},se=()=>{const{shareId:s=""}=x(),n=g(),i=j(),[h,l]=o.useState(60),t=v({queryKey:["shared-chat",s],queryFn:()=>_.getSharedChat(s),retry:(r,a)=>!m(a)&&r<1});o.useEffect(()=>{const r=document.title,a=document.head.querySelector('meta[name="robots"]'),c=a==null?void 0:a.content,d=a??document.createElement("meta");return d.name="robots",d.content="noindex,nofollow",a||document.head.appendChild(d),document.title="Shared conversation",()=>{document.title=r,a?a.content=c??"":d.remove()}},[]),o.useLayoutEffect(()=>{const r=document.querySelector(".app-header");if(!r)return;const a=()=>l(r.offsetHeight);a();const c=new ResizeObserver(a);return c.observe(r),()=>c.disconnect()},[]);const p=r=>{P(r,void 0,{autoSend:!1}),n("/chat")},u=m(t.error);return t.isLoading?e.jsxs("div",{className:"shared-chat-state",role:"status",children:[e.jsx(C,{})," Loading shared conversation…"]}):u?e.jsxs("div",{className:"shared-chat-state shared-chat-not-found",children:[e.jsx("h1",{children:"Shared conversation not found"}),e.jsx("p",{children:"This link is invalid or is no longer available."})]}):t.isError||!t.data?e.jsxs("div",{className:"shared-chat-state",role:"alert",children:[e.jsx("h1",{children:"Couldn’t load this conversation"}),e.jsx("p",{children:"Please check your connection and try again."}),e.jsx("button",{type:"button",onClick:()=>void t.refetch(),children:"Try again"})]}):e.jsx(b,{workspaceKey:`share:${s}:${t.data.updated_at}`,autoOpenOnMount:!0,children:e.jsxs("div",{className:"shared-chat-page",style:{height:`calc(100dvh - ${h}px)`},children:[e.jsxs("div",{className:"shared-chat-heading",children:[e.jsx("h1",{children:"Shared conversation"}),i&&e.jsx("span",{className:"chat-staging-badge",children:"Staging"})]}),e.jsx(y,{variant:"shared",children:e.jsxs("div",{className:"shared-chat-content","data-testid":"shared-conversation-pane",children:[e.jsx(E,{detail:t.data},t.data.updated_at),t.data.model_label&&e.jsxs("div",{className:"shared-chat-attribution",children:[e.jsxs("span",{children:["Generated with ",t.data.model_label]}),t.data.model_provider==="huggingface"&&e.jsxs("span",{children:["Powered by ",e.jsx("span",{"aria-hidden":"true",children:"🤗"})," ",e.jsx("a",{href:"https://huggingface.co/docs/inference-providers/en/index",target:"_blank",rel:"noreferrer",children:"Inference Providers"})]}),t.data.model_provider==="openrouter"&&e.jsxs("span",{children:["Powered by ",e.jsx("a",{href:"https://openrouter.ai",target:"_blank",rel:"noreferrer",children:"OpenRouter"})]}),t.data.model_provider==="openai"&&e.jsx("span",{children:"Powered by OpenAI"})]}),e.jsxs("section",{className:"shared-chat-fresh","aria-labelledby":"shared-chat-fresh-title",children:[e.jsx("h2",{id:"shared-chat-fresh-title",children:"Start a new conversation"}),e.jsx("p",{children:"Your new question starts with an empty context."}),i&&e.jsxs("div",{className:"shared-chat-access-note",role:"note",children:[e.jsx("strong",{children:"Limited staging preview."})," Starting a chat is available only to approved Hugging Face users."]}),e.jsx(S,{onSend:r=>p(r.text),placeholder:"Ask a new research question…"})]})]})})]})})};export{se as default}; diff --git a/assets/SignInToEditDialog-rWxdYNRK.js b/assets/SignInToEditDialog-B3EJVut1.js similarity index 95% rename from assets/SignInToEditDialog-rWxdYNRK.js rename to assets/SignInToEditDialog-B3EJVut1.js index 58ddde7f2a869bc6d0e2b2e894ace05256b084cd..96492d2e0bc4a8b3970a1c494fb2505e7686363b 100644 --- a/assets/SignInToEditDialog-rWxdYNRK.js +++ b/assets/SignInToEditDialog-B3EJVut1.js @@ -1,4 +1,4 @@ -import{s as be,d as a,j as e,ad as je,I as fe,ae as ye,x as Ne,y as we,X as Se,C as _e,H as ke}from"./index-CjdUkE4w.js";import{B as P}from"./button-DetZl_ch.js";import{I as u}from"./input-7i-rZ7fA.js";import{T as Ce}from"./textarea-biscLKBK.js";import{S as se}from"./searchable-select-EPf13F1I.js";import{D as ie,a as oe,c as le,b as ce,d as de,e as De}from"./dialog-BzX9PD3v.js";import{u as Ie}from"./useMutation-BYtVrkc7.js";import{s as b,p as j}from"./submissions-CQ6M0giV.js";import{c as te}from"./catalog-qXcKve0z.js";import{L as Ee}from"./loader-circle-xTdSzHv_.js";/** +import{s as be,d as a,j as e,ad as je,I as fe,ae as ye,x as Ne,y as we,X as Se,C as _e,H as ke}from"./index-CHGpuh10.js";import{B as P}from"./button-C4kqC3Av.js";import{I as u}from"./input-FDP77A0C.js";import{T as Ce}from"./textarea-CDMkQNbH.js";import{S as se}from"./searchable-select-9e2cCX5g.js";import{D as ie,a as oe,c as le,b as ce,d as de,e as De}from"./dialog-BfI2DQVf.js";import{u as Ie}from"./useMutation-3fOqWcpt.js";import{s as b,p as j}from"./submissions-BHHAmt53.js";import{c as te}from"./catalog-DMzmJg__.js";import{L as Ee}from"./loader-circle-DuUnmHjj.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/SotaBadges-CyScuNCv.js b/assets/SotaBadges-D825CK6n.js similarity index 97% rename from assets/SotaBadges-CyScuNCv.js rename to assets/SotaBadges-D825CK6n.js index 9f712be7fed93d6b222b39043abb94386027ba4d..a7ea8ec797c6423db598ac3b9a52f379eb85d832 100644 --- a/assets/SotaBadges-CyScuNCv.js +++ b/assets/SotaBadges-D825CK6n.js @@ -1 +1 @@ -import{e as M,j as e,V as x,L as C}from"./index-CjdUkE4w.js";import{h as F,c as E}from"./colors-BkWRhvFI.js";import{d as A,h as P}from"./transform-CRNzYLch.js";const D=({slug:t,label:s,onClick:r})=>{const a=M(),j=F(t),o=E(j),p=c=>{if(c.stopPropagation(),r){r(t);return}a(`/tasks/${t}`)};return e.jsxs("span",{className:"tag-chip",style:{background:o.bg,color:o.text},onClick:p,children:[e.jsx("span",{className:"dot",style:{background:o.dot}}),A(s||P(t),t)]})},I=({method:t,onClick:s})=>{const r=M(),a=t.slug||t.id||"";if(!a)return null;const j=o=>{if(o.stopPropagation(),s){s(a);return}r(`/methods/${a}`)};return e.jsx("span",{className:"method-chip",onClick:j,children:t.name})},W=t=>{let s=2166136261;for(let r=0;r(s=Math.imul(s^s>>>15,2246822507),s=Math.imul(s^s>>>13,3266489909),s^=s>>>16,(s>>>0)%1e4/1e4)},O=({paperId:t})=>{const s=W(t),r=160,a=220,j=[.85+s()*.1,.55+s()*.25],o=.45+s()*.3,p=[],c=9+Math.floor(s()*3);for(let y=0;y.3,l=Math.floor(s()*3),m=[],$=6+Math.floor(s()*3);for(let y=0;y<$;y++)m.push(.5+s()*.45);const d="#9A9588",u="#3A352D",i=5,h=(r-i*2-2)/2,k=i,f=i+h+2;let w=i+2;const R=w;w+=6;const T=w+1;w+=5;const L=w;w+=3;const g=w+1;return e.jsx("div",{style:{width:r,height:a,background:"#FDFCF9",border:"1px solid var(--hairline-strong)",borderRadius:2,boxShadow:"0 1px 0 rgba(0,0,0,0.04), 0 4px 8px -4px rgba(0,0,0,0.08)",flexShrink:0,overflow:"hidden",position:"relative"},children:e.jsxs("svg",{width:r,height:a,viewBox:`0 0 ${r} ${a}`,style:{display:"block"},children:[j.map((y,v)=>e.jsx("rect",{x:i+(r-i*2)*(1-y)/2,y:R+v*2.4,width:(r-i*2)*y,height:1.4,fill:u,rx:.3},`t${v}`)),e.jsx("rect",{x:i+(r-i*2)*(1-o)/2,y:T,width:(r-i*2)*o,height:.9,fill:d,opacity:.7,rx:.2}),e.jsx("rect",{x:i,y:L,width:6,height:1,fill:u,opacity:.6}),p.map((y,v)=>{const b=g+v*2.1;return b>a-i-1?null:e.jsx("rect",{x:k,y:b,width:h*y,height:.8,fill:d,opacity:.55,rx:.2},`l${v}`)}),n&&e.jsxs("g",{children:[e.jsx("rect",{x:f,y:g,width:h,height:14,fill:"#F0EBE0",stroke:d,strokeWidth:.3,opacity:.9}),l===0&&e.jsx("g",{stroke:u,strokeWidth:.4,fill:"none",opacity:.6,children:e.jsx("polyline",{points:`${f+2},${g+11} ${f+6},${g+8} ${f+10},${g+9} ${f+14},${g+5} ${f+18},${g+6} ${f+22},${g+3}`})}),l===1&&e.jsxs("g",{opacity:.55,children:[e.jsx("circle",{cx:f+h/2,cy:g+7,r:3.5,fill:u}),e.jsx("rect",{x:f+2,y:g+11,width:h-4,height:1.5,fill:d})]}),l===2&&e.jsxs("g",{opacity:.55,children:[e.jsx("rect",{x:f+3,y:g+5,width:h-6,height:1,fill:u}),e.jsx("rect",{x:f+6,y:g+8,width:h-12,height:.8,fill:u})]})]}),m.map((y,v)=>{const b=g+(n?16:0)+v*2.1;return b>a-i-1?null:e.jsx("rect",{x:f,y:b,width:h*y,height:.8,fill:d,opacity:.55,rx:.2},`r${v}`)})]})})},Y=({paperId:t,title:s,thumbnailUrl:r,priority:a=!1})=>{const[j,o]=x.useState(!1),[p,c]=x.useState(0),[n,l]=x.useState(a),m=x.useRef(null);x.useEffect(()=>{o(!1),c(0)},[r]);const $=x.useMemo(()=>{if(!r)return null;if(p===0)return r;const d=r.includes("?")?"&":"?";return`${r}${d}retry=${p}`},[r,p]);return x.useEffect(()=>{if(a||n)return;const d=m.current;if(!d)return;const u=new IntersectionObserver(([i])=>{i.isIntersecting&&(l(!0),u.disconnect())},{rootMargin:"250px"});return u.observe(d),()=>u.disconnect()},[a,n]),r&&!j?e.jsx("div",{ref:m,style:{width:160,height:220,background:"#FDFCF9",border:"1px solid var(--hairline-strong)",borderRadius:2,boxShadow:"0 1px 0 rgba(0,0,0,0.04), 0 4px 8px -4px rgba(0,0,0,0.08)",flexShrink:0,overflow:"hidden",position:"relative"},children:(a||n)&&$&&e.jsx("img",{src:$,alt:`Thumbnail for ${s}`,loading:a?"eager":"lazy",decoding:"async",fetchPriority:a?"high":"auto",style:{width:"100%",height:"100%",objectFit:"contain",display:"block"},onError:()=>{if(p<1){c(d=>d+1);return}o(!0)}},$)}):e.jsx(O,{paperId:t})},S={1:"SOTA 🏆",2:"#2",3:"#3"},N=({units:t,paperHref:s})=>{const r=x.useRef(null),a=x.useRef(null),[j,o]=x.useState(t.length);if(x.useLayoutEffect(()=>{const n=r.current,l=a.current;if(!n||!l||t.length===0)return;const m=u=>(l.textContent=u,l.scrollWidth),$=()=>{const u=n.clientWidth;if(u<=0)return;let i=0,h=0;for(const k of t){const f=m(k.measureText);if(i+f<=u)i+=f,h+=1;else break}if(h0&&i+m(` · +${t.length-h} more`)>u;)h-=1,i-=m(t[h].measureText);h===0&&(h=1)}o(h)};$();const d=new ResizeObserver($);return d.observe(n),()=>d.disconnect()},[t]),t.length===0)return null;const p=t.slice(0,Math.max(1,Math.min(j,t.length))),c=t.length-p.length;return e.jsxs("div",{className:"paper-sota",ref:r,children:[e.jsx("span",{ref:a,className:"paper-sota-measure","aria-hidden":"true"}),p.map((n,l)=>e.jsxs(x.Fragment,{children:[n.isGroupStart?e.jsxs(e.Fragment,{children:[l>0&&e.jsx("span",{className:"paper-sota-sep",children:" · "}),e.jsx("span",{className:`paper-sota-label${n.rank===1?" paper-sota-label--sota":""}`,children:S[n.rank]}),e.jsx("span",{className:"paper-sota-on",children:" on "})]}):e.jsx("span",{className:"paper-sota-sep",children:", "}),n.href?e.jsx(C,{to:n.href,className:"paper-sota-name",onClick:m=>m.stopPropagation(),children:n.name}):e.jsx("span",{className:"paper-sota-name",children:n.name})]},`${n.href||n.name}-${l}`)),c>0&&e.jsxs(C,{to:`${s}#results`,className:"paper-sota-more",onClick:n=>n.stopPropagation(),children:[" · +",c," more"]})]})},V=({ranks:t,paperHref:s,wrap:r=!1})=>{const a=x.useMemo(()=>{const o=[];let p=!0;for(const c of[1,2,3]){const n=t.filter(l=>l.rank===c);n.forEach((l,m)=>{const $=m===0,d=$?`${p?"":" · "}${S[c]} on `:", ";o.push({name:l.name,href:l.href,rank:c,isGroupStart:$,measureText:d+l.name})}),n.length>0&&(p=!1)}return o},[t]),j=x.useMemo(()=>[1,2,3].map(o=>t.filter(c=>c.rank===o).map((c,n)=>({name:c.name,href:c.href,rank:o,isGroupStart:n===0,measureText:(n===0?`${S[o]} on `:", ")+c.name}))).filter(o=>o.length>0),[t]);return r?j.length===0?null:e.jsx("div",{className:"paper-sota-stack",children:j.map(o=>e.jsx(N,{units:o,paperHref:s},o[0].rank))}):a.length===0?null:e.jsx(N,{units:a,paperHref:s})};export{I as M,Y as P,V as S,D as T}; +import{e as M,j as e,V as x,L as C}from"./index-CHGpuh10.js";import{h as F,c as E}from"./colors-BkWRhvFI.js";import{d as A,h as P}from"./transform-Cs8_lTDx.js";const D=({slug:t,label:s,onClick:r})=>{const a=M(),j=F(t),o=E(j),p=c=>{if(c.stopPropagation(),r){r(t);return}a(`/tasks/${t}`)};return e.jsxs("span",{className:"tag-chip",style:{background:o.bg,color:o.text},onClick:p,children:[e.jsx("span",{className:"dot",style:{background:o.dot}}),A(s||P(t),t)]})},I=({method:t,onClick:s})=>{const r=M(),a=t.slug||t.id||"";if(!a)return null;const j=o=>{if(o.stopPropagation(),s){s(a);return}r(`/methods/${a}`)};return e.jsx("span",{className:"method-chip",onClick:j,children:t.name})},W=t=>{let s=2166136261;for(let r=0;r(s=Math.imul(s^s>>>15,2246822507),s=Math.imul(s^s>>>13,3266489909),s^=s>>>16,(s>>>0)%1e4/1e4)},O=({paperId:t})=>{const s=W(t),r=160,a=220,j=[.85+s()*.1,.55+s()*.25],o=.45+s()*.3,p=[],c=9+Math.floor(s()*3);for(let y=0;y.3,l=Math.floor(s()*3),m=[],$=6+Math.floor(s()*3);for(let y=0;y<$;y++)m.push(.5+s()*.45);const d="#9A9588",u="#3A352D",i=5,h=(r-i*2-2)/2,k=i,f=i+h+2;let w=i+2;const R=w;w+=6;const T=w+1;w+=5;const L=w;w+=3;const g=w+1;return e.jsx("div",{style:{width:r,height:a,background:"#FDFCF9",border:"1px solid var(--hairline-strong)",borderRadius:2,boxShadow:"0 1px 0 rgba(0,0,0,0.04), 0 4px 8px -4px rgba(0,0,0,0.08)",flexShrink:0,overflow:"hidden",position:"relative"},children:e.jsxs("svg",{width:r,height:a,viewBox:`0 0 ${r} ${a}`,style:{display:"block"},children:[j.map((y,v)=>e.jsx("rect",{x:i+(r-i*2)*(1-y)/2,y:R+v*2.4,width:(r-i*2)*y,height:1.4,fill:u,rx:.3},`t${v}`)),e.jsx("rect",{x:i+(r-i*2)*(1-o)/2,y:T,width:(r-i*2)*o,height:.9,fill:d,opacity:.7,rx:.2}),e.jsx("rect",{x:i,y:L,width:6,height:1,fill:u,opacity:.6}),p.map((y,v)=>{const b=g+v*2.1;return b>a-i-1?null:e.jsx("rect",{x:k,y:b,width:h*y,height:.8,fill:d,opacity:.55,rx:.2},`l${v}`)}),n&&e.jsxs("g",{children:[e.jsx("rect",{x:f,y:g,width:h,height:14,fill:"#F0EBE0",stroke:d,strokeWidth:.3,opacity:.9}),l===0&&e.jsx("g",{stroke:u,strokeWidth:.4,fill:"none",opacity:.6,children:e.jsx("polyline",{points:`${f+2},${g+11} ${f+6},${g+8} ${f+10},${g+9} ${f+14},${g+5} ${f+18},${g+6} ${f+22},${g+3}`})}),l===1&&e.jsxs("g",{opacity:.55,children:[e.jsx("circle",{cx:f+h/2,cy:g+7,r:3.5,fill:u}),e.jsx("rect",{x:f+2,y:g+11,width:h-4,height:1.5,fill:d})]}),l===2&&e.jsxs("g",{opacity:.55,children:[e.jsx("rect",{x:f+3,y:g+5,width:h-6,height:1,fill:u}),e.jsx("rect",{x:f+6,y:g+8,width:h-12,height:.8,fill:u})]})]}),m.map((y,v)=>{const b=g+(n?16:0)+v*2.1;return b>a-i-1?null:e.jsx("rect",{x:f,y:b,width:h*y,height:.8,fill:d,opacity:.55,rx:.2},`r${v}`)})]})})},Y=({paperId:t,title:s,thumbnailUrl:r,priority:a=!1})=>{const[j,o]=x.useState(!1),[p,c]=x.useState(0),[n,l]=x.useState(a),m=x.useRef(null);x.useEffect(()=>{o(!1),c(0)},[r]);const $=x.useMemo(()=>{if(!r)return null;if(p===0)return r;const d=r.includes("?")?"&":"?";return`${r}${d}retry=${p}`},[r,p]);return x.useEffect(()=>{if(a||n)return;const d=m.current;if(!d)return;const u=new IntersectionObserver(([i])=>{i.isIntersecting&&(l(!0),u.disconnect())},{rootMargin:"250px"});return u.observe(d),()=>u.disconnect()},[a,n]),r&&!j?e.jsx("div",{ref:m,style:{width:160,height:220,background:"#FDFCF9",border:"1px solid var(--hairline-strong)",borderRadius:2,boxShadow:"0 1px 0 rgba(0,0,0,0.04), 0 4px 8px -4px rgba(0,0,0,0.08)",flexShrink:0,overflow:"hidden",position:"relative"},children:(a||n)&&$&&e.jsx("img",{src:$,alt:`Thumbnail for ${s}`,loading:a?"eager":"lazy",decoding:"async",fetchPriority:a?"high":"auto",style:{width:"100%",height:"100%",objectFit:"contain",display:"block"},onError:()=>{if(p<1){c(d=>d+1);return}o(!0)}},$)}):e.jsx(O,{paperId:t})},S={1:"SOTA 🏆",2:"#2",3:"#3"},N=({units:t,paperHref:s})=>{const r=x.useRef(null),a=x.useRef(null),[j,o]=x.useState(t.length);if(x.useLayoutEffect(()=>{const n=r.current,l=a.current;if(!n||!l||t.length===0)return;const m=u=>(l.textContent=u,l.scrollWidth),$=()=>{const u=n.clientWidth;if(u<=0)return;let i=0,h=0;for(const k of t){const f=m(k.measureText);if(i+f<=u)i+=f,h+=1;else break}if(h0&&i+m(` · +${t.length-h} more`)>u;)h-=1,i-=m(t[h].measureText);h===0&&(h=1)}o(h)};$();const d=new ResizeObserver($);return d.observe(n),()=>d.disconnect()},[t]),t.length===0)return null;const p=t.slice(0,Math.max(1,Math.min(j,t.length))),c=t.length-p.length;return e.jsxs("div",{className:"paper-sota",ref:r,children:[e.jsx("span",{ref:a,className:"paper-sota-measure","aria-hidden":"true"}),p.map((n,l)=>e.jsxs(x.Fragment,{children:[n.isGroupStart?e.jsxs(e.Fragment,{children:[l>0&&e.jsx("span",{className:"paper-sota-sep",children:" · "}),e.jsx("span",{className:`paper-sota-label${n.rank===1?" paper-sota-label--sota":""}`,children:S[n.rank]}),e.jsx("span",{className:"paper-sota-on",children:" on "})]}):e.jsx("span",{className:"paper-sota-sep",children:", "}),n.href?e.jsx(C,{to:n.href,className:"paper-sota-name",onClick:m=>m.stopPropagation(),children:n.name}):e.jsx("span",{className:"paper-sota-name",children:n.name})]},`${n.href||n.name}-${l}`)),c>0&&e.jsxs(C,{to:`${s}#results`,className:"paper-sota-more",onClick:n=>n.stopPropagation(),children:[" · +",c," more"]})]})},V=({ranks:t,paperHref:s,wrap:r=!1})=>{const a=x.useMemo(()=>{const o=[];let p=!0;for(const c of[1,2,3]){const n=t.filter(l=>l.rank===c);n.forEach((l,m)=>{const $=m===0,d=$?`${p?"":" · "}${S[c]} on `:", ";o.push({name:l.name,href:l.href,rank:c,isGroupStart:$,measureText:d+l.name})}),n.length>0&&(p=!1)}return o},[t]),j=x.useMemo(()=>[1,2,3].map(o=>t.filter(c=>c.rank===o).map((c,n)=>({name:c.name,href:c.href,rank:o,isGroupStart:n===0,measureText:(n===0?`${S[o]} on `:", ")+c.name}))).filter(o=>o.length>0),[t]);return r?j.length===0?null:e.jsx("div",{className:"paper-sota-stack",children:j.map(o=>e.jsx(N,{units:o,paperHref:s},o[0].rank))}):a.length===0?null:e.jsx(N,{units:a,paperHref:s})};export{I as M,Y as P,V as S,D as T}; diff --git a/assets/StagingAccessRequestView-D1t7icpG.js b/assets/StagingAccessRequestView-B7Yf73-b.js similarity index 95% rename from assets/StagingAccessRequestView-D1t7icpG.js rename to assets/StagingAccessRequestView-B7Yf73-b.js index b1b05012a91b4c97b146500458b9b99937d2419f..12e5a61b7518b7c771818b41f357f989ac5acbb7 100644 --- a/assets/StagingAccessRequestView-D1t7icpG.js +++ b/assets/StagingAccessRequestView-B7Yf73-b.js @@ -1 +1 @@ -import{a as m,V as a,j as e,H as g,b3 as p}from"./index-CjdUkE4w.js";import{C as j}from"./circle-check-B2vTBhyc.js";const f=()=>{const{user:s,isLoading:u}=m(),[l,d]=a.useState(!1),[r,t]=a.useState(!1),[c,i]=a.useState(null),o=async h=>{h.preventDefault(),t(!0),i(null);try{await p.requestStagingAccess(),d(!0)}catch(n){i(n instanceof Error?n.message:"Could not submit your request.")}finally{t(!1)}};return e.jsx("main",{className:"access-request-page",children:e.jsxs("section",{className:"access-request-card","aria-labelledby":"access-request-title",children:[e.jsxs("a",{className:"access-request-brand",href:"https://paperswithcode.co",children:[e.jsx("span",{className:"brand-mark","aria-hidden":"true"}),e.jsxs("span",{className:"brand-name",children:["Papers ",e.jsx("em",{children:"with"})," Code"]})]}),l?e.jsxs("div",{className:"access-request-success",role:"status",children:[e.jsx(j,{size:34,strokeWidth:1.6,"aria-hidden":"true"}),e.jsx("h1",{id:"access-request-title",children:"Request received"}),e.jsxs("p",{children:["Thanks, @",s==null?void 0:s.username,". We’ll review your contributor access request."]})]}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"access-request-heading",children:[e.jsx("p",{className:"access-request-eyebrow",children:"Staging preview"}),e.jsx("h1",{id:"access-request-title",children:"Request access"}),e.jsx("p",{children:"This preview is limited to project contributors. Send us your verified Hugging Face username and email address to request access."})]}),u?e.jsx("p",{className:"access-request-status",role:"status",children:"Checking your Hugging Face account…"}):s?e.jsxs("form",{className:"access-request-form",onSubmit:o,children:[e.jsx("label",{htmlFor:"hf-username",children:"Hugging Face username"}),e.jsxs("div",{className:"access-request-input-wrap",children:[e.jsx("span",{"aria-hidden":"true",children:"@"}),e.jsx("input",{id:"hf-username",name:"hf_username",value:s.username,readOnly:!0,autoComplete:"username"})]}),e.jsxs("p",{className:"access-request-verified",children:["Username and email verified through Hugging Face sign-in. See our"," ",e.jsx("a",{href:"https://paperswithcode.co/privacy",children:"Privacy Policy"}),"."]}),c&&e.jsx("p",{className:"access-request-error",role:"alert",children:c}),e.jsx("button",{className:"access-request-submit",type:"submit",disabled:r,children:r?"Sending…":"Request access"})]}):e.jsxs("div",{className:"access-request-signin",children:[e.jsx("p",{children:"Sign in first so we can verify the account you’re requesting access for."}),e.jsx(g,{returnTo:"/request-access",label:"Sign in with Hugging Face",collectEmail:!0})]})]})]})})};export{f as default}; +import{a as m,V as a,j as e,H as g,b3 as p}from"./index-CHGpuh10.js";import{C as j}from"./circle-check-B_15foPp.js";const f=()=>{const{user:s,isLoading:u}=m(),[l,d]=a.useState(!1),[r,t]=a.useState(!1),[c,i]=a.useState(null),o=async h=>{h.preventDefault(),t(!0),i(null);try{await p.requestStagingAccess(),d(!0)}catch(n){i(n instanceof Error?n.message:"Could not submit your request.")}finally{t(!1)}};return e.jsx("main",{className:"access-request-page",children:e.jsxs("section",{className:"access-request-card","aria-labelledby":"access-request-title",children:[e.jsxs("a",{className:"access-request-brand",href:"https://paperswithcode.co",children:[e.jsx("span",{className:"brand-mark","aria-hidden":"true"}),e.jsxs("span",{className:"brand-name",children:["Papers ",e.jsx("em",{children:"with"})," Code"]})]}),l?e.jsxs("div",{className:"access-request-success",role:"status",children:[e.jsx(j,{size:34,strokeWidth:1.6,"aria-hidden":"true"}),e.jsx("h1",{id:"access-request-title",children:"Request received"}),e.jsxs("p",{children:["Thanks, @",s==null?void 0:s.username,". We’ll review your contributor access request."]})]}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"access-request-heading",children:[e.jsx("p",{className:"access-request-eyebrow",children:"Staging preview"}),e.jsx("h1",{id:"access-request-title",children:"Request access"}),e.jsx("p",{children:"This preview is limited to project contributors. Send us your verified Hugging Face username and email address to request access."})]}),u?e.jsx("p",{className:"access-request-status",role:"status",children:"Checking your Hugging Face account…"}):s?e.jsxs("form",{className:"access-request-form",onSubmit:o,children:[e.jsx("label",{htmlFor:"hf-username",children:"Hugging Face username"}),e.jsxs("div",{className:"access-request-input-wrap",children:[e.jsx("span",{"aria-hidden":"true",children:"@"}),e.jsx("input",{id:"hf-username",name:"hf_username",value:s.username,readOnly:!0,autoComplete:"username"})]}),e.jsxs("p",{className:"access-request-verified",children:["Username and email verified through Hugging Face sign-in. See our"," ",e.jsx("a",{href:"https://paperswithcode.co/privacy",children:"Privacy Policy"}),"."]}),c&&e.jsx("p",{className:"access-request-error",role:"alert",children:c}),e.jsx("button",{className:"access-request-submit",type:"submit",disabled:r,children:r?"Sending…":"Request access"})]}):e.jsxs("div",{className:"access-request-signin",children:[e.jsx("p",{children:"Sign in first so we can verify the account you’re requesting access for."}),e.jsx(g,{returnTo:"/request-access",label:"Sign in with Hugging Face",collectEmail:!0})]})]})]})})};export{f as default}; diff --git a/assets/SubmissionsDashboard-CkzOBcpM.js b/assets/SubmissionsDashboard-D9hqPZPB.js similarity index 97% rename from assets/SubmissionsDashboard-CkzOBcpM.js rename to assets/SubmissionsDashboard-D9hqPZPB.js index 1f91856341f05fa67af7f177e8d885aace68b3d9..ac79b030a85eae53447d2d600cabd6295e6242f2 100644 --- a/assets/SubmissionsDashboard-CkzOBcpM.js +++ b/assets/SubmissionsDashboard-D9hqPZPB.js @@ -1,4 +1,4 @@ -import{s as ae,V as v,j as e,I as y,b as ne,o as H,a3 as re,x as oe,p as le,y as E,i as de,aB as T,aC as ce,aD as ue,aE as pe}from"./index-CjdUkE4w.js";import{u as W,r as me,e as he}from"./evaluationQueryInvalidation-BAyi4YoG.js";import{i as X,a as K}from"./queryInvalidation-LiTu0GxY.js";import{u as D}from"./useMutation-BYtVrkc7.js";import{u as fe}from"./useInfiniteQuery-DeZTTVbI.js";import{c as C}from"./catalog-qXcKve0z.js";import{s as xe}from"./safeExternalHref-CkBrsh84.js";import{E as O,s as I}from"./submissions-CQ6M0giV.js";import{p as je}from"./papers-DgZwjF3K.js";import{R as ge,C as ve}from"./refresh-cw-BuRFYuxm.js";import{L as $}from"./loader-circle-xTdSzHv_.js";import{C as be}from"./circle-check-B2vTBhyc.js";import"./curation-CyyuHfv5.js";/** +import{s as ae,V as v,j as e,I as y,b as ne,o as H,a3 as re,x as oe,p as le,y as E,i as de,aB as T,aC as ce,aD as ue,aE as pe}from"./index-CHGpuh10.js";import{u as W,r as me,e as he}from"./evaluationQueryInvalidation-oiaNU_fe.js";import{i as X,a as K}from"./queryInvalidation-rIB0mIr9.js";import{u as D}from"./useMutation-3fOqWcpt.js";import{u as fe}from"./useInfiniteQuery-DhWyWKGj.js";import{c as C}from"./catalog-DMzmJg__.js";import{s as xe}from"./safeExternalHref-CkBrsh84.js";import{E as O,s as I}from"./submissions-BHHAmt53.js";import{p as je}from"./papers-BPpxs2sO.js";import{R as ge,C as ve}from"./refresh-cw-BmXCr1RQ.js";import{L as $}from"./loader-circle-DuUnmHjj.js";import{C as be}from"./circle-check-B_15foPp.js";import"./curation-DI9_zYNx.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/SubmitView-BCL1MLcF.js b/assets/SubmitView-Ddks3aKH.js similarity index 93% rename from assets/SubmitView-BCL1MLcF.js rename to assets/SubmitView-Ddks3aKH.js index 251b559af3f4d93582ce17c6a77a81a412ec7b1c..ca07e8ae3d0a3bac66a2f7f9768361bc7b1b210c 100644 --- a/assets/SubmitView-BCL1MLcF.js +++ b/assets/SubmitView-Ddks3aKH.js @@ -1 +1 @@ -import{e as D,i as E,x as C,a as F,g as N,V as o,y as X,j as e,h as z}from"./index-CjdUkE4w.js";import{u as U}from"./useMutation-BYtVrkc7.js";import{A as O,a as V}from"./alert-BM9Xfuyy.js";import{B as P}from"./button-DetZl_ch.js";import{I as h}from"./input-7i-rZ7fA.js";import{T as q}from"./textarea-biscLKBK.js";import{p as B}from"./papers-DgZwjF3K.js";import{a as H}from"./queryInvalidation-LiTu0GxY.js";import"./curation-CyyuHfv5.js";const S="pwc:paper-submit-draft",R={color:"var(--accent-text)",fontWeight:600,textDecoration:"underline",textUnderlineOffset:2},M=/^\d{4}\.\d{4,5}(v\d+)?$/i,J=/^[a-z-]+(\.[A-Z]{2})?\/\d{7}$/,W=/^https?:\/\/(?:www\.)?arxiv\.org\//i;function k(l){const i=l.trim();return i?M.test(i)||J.test(i)||W.test(i)?"arxiv":/^https?:\/\//i.test(i)?"external":"arxiv":"empty"}function $(l,i){const r=l.trim();if(k(r)==="arxiv")return/^https?:\/\//i.test(r)?{source_url:r}:{arxiv_id:r};const s={source_url:r},p=i.title.trim();p&&(s.title=p);const d=i.abstract.trim();d&&(s.abstract=d);const n=i.authors.split(/[,\n]/).map(c=>c.trim()).filter(Boolean);return n.length>0&&(s.authors=n),i.datePublished&&(s.date_published=i.datePublished),s}const re=()=>{const l=D(),i=E(),{toast:r}=C(),{user:g,isLoading:s}=F(),[p]=N(),d=p.get("arxiv_id")??"",[n,c]=o.useState(d),[f,j]=o.useState(""),[x,w]=o.useState(""),[b,I]=o.useState(""),[v,_]=o.useState(""),[A,y]=o.useState(null);o.useEffect(()=>{if(d)return;const t=sessionStorage.getItem(S);if(t){sessionStorage.removeItem(S);try{const a=JSON.parse(t);c(a.input??""),j(a.title??""),w(a.abstract??""),I(a.authors??""),_(a.datePublished??"")}catch{}}},[d]);const m=k(n),L=m==="external",u=U({mutationFn:t=>B.submit(t),onSuccess:t=>{if(t.pending_review){r({title:"Submission queued for review",description:"No source page was fetched and no catalog row was changed."}),u.reset();return}H(i);const a=t.refreshed&&t.created&&t.latest_version;r({title:a?`Paper updated to ${t.latest_version}`:t.created?"Paper submitted":"Paper already indexed",description:a?"Opening the updated paper page…":t.created?"Opening the paper page…":"Opening the existing paper page…"}),t.route_identifier&&l(`/paper/${t.route_identifier}`)},onError:t=>{y(X(t,"Submission failed"))}}),T=t=>{if(t.preventDefault(),y(null),m==="empty"){y("Enter an arXiv ID or a paper URL to submit.");return}if(!g){sessionStorage.setItem(S,JSON.stringify({input:n,title:f,abstract:x,authors:b,datePublished:v})),window.location.assign(z(window.location.href));return}const a=$(n,{title:f,abstract:x,authors:b,datePublished:v});u.mutate(a)};return e.jsxs("div",{className:"page",style:{maxWidth:720},children:[e.jsx("h1",{className:"detail-title",children:"Submit a paper"}),e.jsxs("p",{style:{fontFamily:"var(--serif)",color:"var(--ink-soft)",marginTop:12,lineHeight:1.55},children:["If your paper is on arXiv, submit it on"," ",e.jsx("a",{href:"https://huggingface.co/papers/submit",target:"_blank",rel:"noopener noreferrer",style:R,children:"Hugging Face"}),", which will automatically index it on Papers with Code."]}),e.jsxs("p",{style:{fontFamily:"var(--serif)",color:"var(--ink-soft)",marginTop:12,lineHeight:1.55},children:["If your paper is not on arXiv, submit it here. Non-arXiv papers (blog posts, technical reports, model release pages) enter the submission queue and appear only after review."," ",e.jsx("a",{href:"/rate-limits",style:R,children:"Read the submission and rate-limit policy."})]}),e.jsxs("form",{onSubmit:T,style:{marginTop:28,display:"grid",gap:20},children:[e.jsxs("div",{style:{display:"grid",gap:8},children:[e.jsx("label",{htmlFor:"submit-input",style:{fontWeight:600,fontSize:14},children:"arXiv ID or paper URL"}),e.jsx(h,{id:"submit-input",value:n,onChange:t=>c(t.target.value),placeholder:"2501.12345 · https://arxiv.org/abs/2501.12345 · https://blog.example.com/release",autoFocus:!0,required:!0}),e.jsx("div",{style:{fontSize:12,color:"var(--ink-soft)",minHeight:18},children:m==="arxiv"?"Detected: arXiv paper — metadata will be fetched automatically.":m==="external"?"Detected: external URL — we'll extract metadata and you can override below.":"Paste an arXiv ID like 2501.12345 or any paper/blog URL."})]}),L&&e.jsxs("fieldset",{style:{border:"1px solid var(--rule)",borderRadius:8,padding:"16px 20px 20px",display:"grid",gap:16},children:[e.jsx("legend",{style:{padding:"0 8px",fontSize:12,color:"var(--ink-soft)",textTransform:"uppercase",letterSpacing:.5},children:"External paper details (optional)"}),e.jsxs("div",{style:{display:"grid",gap:8},children:[e.jsx("label",{htmlFor:"submit-title",style:{fontSize:13},children:"Title"}),e.jsx(h,{id:"submit-title",value:f,onChange:t=>j(t.target.value),placeholder:"Leave blank to extract automatically"})]}),e.jsxs("div",{style:{display:"grid",gap:8},children:[e.jsx("label",{htmlFor:"submit-abstract",style:{fontSize:13},children:"Abstract or summary"}),e.jsx(q,{id:"submit-abstract",value:x,onChange:t=>w(t.target.value),rows:4,placeholder:"Leave blank to extract automatically"})]}),e.jsxs("div",{style:{display:"grid",gap:8},children:[e.jsx("label",{htmlFor:"submit-authors",style:{fontSize:13},children:"Authors (comma-separated)"}),e.jsx(h,{id:"submit-authors",value:b,onChange:t=>I(t.target.value),placeholder:"Jane Smith, John Doe"})]}),e.jsxs("div",{style:{display:"grid",gap:8},children:[e.jsx("label",{htmlFor:"submit-date",style:{fontSize:13},children:"Publication date"}),e.jsx(h,{id:"submit-date",type:"date",value:v,onChange:t=>_(t.target.value),style:{maxWidth:220}}),e.jsx("div",{style:{fontSize:12,color:"var(--ink-soft)"},children:"Required only if we cannot infer a date from the page."})]})]}),A&&e.jsx(O,{variant:"destructive",children:e.jsx(V,{children:A})}),e.jsxs("div",{style:{display:"flex",gap:12,alignItems:"center"},children:[e.jsx(P,{type:"submit",disabled:u.isPending||s,children:s?"Checking sign-in…":u.isPending?"Submitting…":g?"Submit paper":"Sign in to submit"}),e.jsx(P,{type:"button",variant:"outline",onClick:()=>l(-1),disabled:u.isPending,children:"Cancel"})]})]})]})};export{re as default}; +import{e as D,i as E,x as C,a as F,g as N,V as o,y as X,j as e,h as z}from"./index-CHGpuh10.js";import{u as U}from"./useMutation-3fOqWcpt.js";import{A as O,a as V}from"./alert-DPvmCXZT.js";import{B as P}from"./button-C4kqC3Av.js";import{I as h}from"./input-FDP77A0C.js";import{T as q}from"./textarea-CDMkQNbH.js";import{p as B}from"./papers-BPpxs2sO.js";import{a as H}from"./queryInvalidation-rIB0mIr9.js";import"./curation-DI9_zYNx.js";const S="pwc:paper-submit-draft",R={color:"var(--accent-text)",fontWeight:600,textDecoration:"underline",textUnderlineOffset:2},M=/^\d{4}\.\d{4,5}(v\d+)?$/i,J=/^[a-z-]+(\.[A-Z]{2})?\/\d{7}$/,W=/^https?:\/\/(?:www\.)?arxiv\.org\//i;function k(l){const i=l.trim();return i?M.test(i)||J.test(i)||W.test(i)?"arxiv":/^https?:\/\//i.test(i)?"external":"arxiv":"empty"}function $(l,i){const r=l.trim();if(k(r)==="arxiv")return/^https?:\/\//i.test(r)?{source_url:r}:{arxiv_id:r};const s={source_url:r},p=i.title.trim();p&&(s.title=p);const d=i.abstract.trim();d&&(s.abstract=d);const n=i.authors.split(/[,\n]/).map(c=>c.trim()).filter(Boolean);return n.length>0&&(s.authors=n),i.datePublished&&(s.date_published=i.datePublished),s}const re=()=>{const l=D(),i=E(),{toast:r}=C(),{user:g,isLoading:s}=F(),[p]=N(),d=p.get("arxiv_id")??"",[n,c]=o.useState(d),[f,j]=o.useState(""),[x,w]=o.useState(""),[b,I]=o.useState(""),[v,_]=o.useState(""),[A,y]=o.useState(null);o.useEffect(()=>{if(d)return;const t=sessionStorage.getItem(S);if(t){sessionStorage.removeItem(S);try{const a=JSON.parse(t);c(a.input??""),j(a.title??""),w(a.abstract??""),I(a.authors??""),_(a.datePublished??"")}catch{}}},[d]);const m=k(n),L=m==="external",u=U({mutationFn:t=>B.submit(t),onSuccess:t=>{if(t.pending_review){r({title:"Submission queued for review",description:"No source page was fetched and no catalog row was changed."}),u.reset();return}H(i);const a=t.refreshed&&t.created&&t.latest_version;r({title:a?`Paper updated to ${t.latest_version}`:t.created?"Paper submitted":"Paper already indexed",description:a?"Opening the updated paper page…":t.created?"Opening the paper page…":"Opening the existing paper page…"}),t.route_identifier&&l(`/paper/${t.route_identifier}`)},onError:t=>{y(X(t,"Submission failed"))}}),T=t=>{if(t.preventDefault(),y(null),m==="empty"){y("Enter an arXiv ID or a paper URL to submit.");return}if(!g){sessionStorage.setItem(S,JSON.stringify({input:n,title:f,abstract:x,authors:b,datePublished:v})),window.location.assign(z(window.location.href));return}const a=$(n,{title:f,abstract:x,authors:b,datePublished:v});u.mutate(a)};return e.jsxs("div",{className:"page",style:{maxWidth:720},children:[e.jsx("h1",{className:"detail-title",children:"Submit a paper"}),e.jsxs("p",{style:{fontFamily:"var(--serif)",color:"var(--ink-soft)",marginTop:12,lineHeight:1.55},children:["If your paper is on arXiv, submit it on"," ",e.jsx("a",{href:"https://huggingface.co/papers/submit",target:"_blank",rel:"noopener noreferrer",style:R,children:"Hugging Face"}),", which will automatically index it on Papers with Code."]}),e.jsxs("p",{style:{fontFamily:"var(--serif)",color:"var(--ink-soft)",marginTop:12,lineHeight:1.55},children:["If your paper is not on arXiv, submit it here. Non-arXiv papers (blog posts, technical reports, model release pages) enter the submission queue and appear only after review."," ",e.jsx("a",{href:"/rate-limits",style:R,children:"Read the submission and rate-limit policy."})]}),e.jsxs("form",{onSubmit:T,style:{marginTop:28,display:"grid",gap:20},children:[e.jsxs("div",{style:{display:"grid",gap:8},children:[e.jsx("label",{htmlFor:"submit-input",style:{fontWeight:600,fontSize:14},children:"arXiv ID or paper URL"}),e.jsx(h,{id:"submit-input",value:n,onChange:t=>c(t.target.value),placeholder:"2501.12345 · https://arxiv.org/abs/2501.12345 · https://blog.example.com/release",autoFocus:!0,required:!0}),e.jsx("div",{style:{fontSize:12,color:"var(--ink-soft)",minHeight:18},children:m==="arxiv"?"Detected: arXiv paper — metadata will be fetched automatically.":m==="external"?"Detected: external URL — we'll extract metadata and you can override below.":"Paste an arXiv ID like 2501.12345 or any paper/blog URL."})]}),L&&e.jsxs("fieldset",{style:{border:"1px solid var(--rule)",borderRadius:8,padding:"16px 20px 20px",display:"grid",gap:16},children:[e.jsx("legend",{style:{padding:"0 8px",fontSize:12,color:"var(--ink-soft)",textTransform:"uppercase",letterSpacing:.5},children:"External paper details (optional)"}),e.jsxs("div",{style:{display:"grid",gap:8},children:[e.jsx("label",{htmlFor:"submit-title",style:{fontSize:13},children:"Title"}),e.jsx(h,{id:"submit-title",value:f,onChange:t=>j(t.target.value),placeholder:"Leave blank to extract automatically"})]}),e.jsxs("div",{style:{display:"grid",gap:8},children:[e.jsx("label",{htmlFor:"submit-abstract",style:{fontSize:13},children:"Abstract or summary"}),e.jsx(q,{id:"submit-abstract",value:x,onChange:t=>w(t.target.value),rows:4,placeholder:"Leave blank to extract automatically"})]}),e.jsxs("div",{style:{display:"grid",gap:8},children:[e.jsx("label",{htmlFor:"submit-authors",style:{fontSize:13},children:"Authors (comma-separated)"}),e.jsx(h,{id:"submit-authors",value:b,onChange:t=>I(t.target.value),placeholder:"Jane Smith, John Doe"})]}),e.jsxs("div",{style:{display:"grid",gap:8},children:[e.jsx("label",{htmlFor:"submit-date",style:{fontSize:13},children:"Publication date"}),e.jsx(h,{id:"submit-date",type:"date",value:v,onChange:t=>_(t.target.value),style:{maxWidth:220}}),e.jsx("div",{style:{fontSize:12,color:"var(--ink-soft)"},children:"Required only if we cannot infer a date from the page."})]})]}),A&&e.jsx(O,{variant:"destructive",children:e.jsx(V,{children:A})}),e.jsxs("div",{style:{display:"flex",gap:12,alignItems:"center"},children:[e.jsx(P,{type:"submit",disabled:u.isPending||s,children:s?"Checking sign-in…":u.isPending?"Submitting…":g?"Submit paper":"Sign in to submit"}),e.jsx(P,{type:"button",variant:"outline",onClick:()=>l(-1),disabled:u.isPending,children:"Cancel"})]})]})]})};export{re as default}; diff --git a/assets/TagBrowseView-jVCzOB7D.js b/assets/TagBrowseView-B4ApRi7q.js similarity index 91% rename from assets/TagBrowseView-jVCzOB7D.js rename to assets/TagBrowseView-B4ApRi7q.js index 10399da4a1b35d8b5656d5d3325867aee3d52a8c..7869c075e9bce21253a66a6da5ca10a839db6dcc 100644 --- a/assets/TagBrowseView-jVCzOB7D.js +++ b/assets/TagBrowseView-B4ApRi7q.js @@ -1 +1 @@ -import{j as e,L as g,V as oe,u as de,e as me,d as j,b as G,p as he,a3 as pe,o as K,T as O}from"./index-CjdUkE4w.js";import{R as ue}from"./ResearchFollowButton-DcTptDpW.js";import{M as ge}from"./SotaBadges-CyScuNCv.js";import{u as be,b as xe,a as je}from"./PaperFeed-D3FZw29k.js";import{A as L}from"./arrow-right-BrRhWCQS.js";import{B as ke}from"./BenchmarkTrendSparkline-Dfex1cLI.js";import{M as W}from"./MarkdownText-MrITlqRE.js";import{c as J}from"./catalog-qXcKve0z.js";import{p as _e}from"./papers-DgZwjF3K.js";import{i as Ne}from"./apiErrors-D0w5By9R.js";import{f as fe}from"./frameworks-DDA0P4Tf.js";import{u as we}from"./preferences-DMhkYrri.js";import{s as ve}from"./slug-BpH-Nkvz.js";import{d as f,t as ye}from"./transform-CRNzYLch.js";import{u as Se}from"./usePapers-BZThqZCx.js";import{S as P}from"./skeleton-DTWi7Ctg.js";import{A as Te,a as Ee}from"./alert-BM9Xfuyy.js";import Be from"./NotFound-BeWhm9El.js";import{T as $e}from"./trophy-BQy3NGXy.js";import{G as Me}from"./github-4bW4WI_e.js";import"./researchTopic-NmABF6tT.js";import"./useMutation-BYtVrkc7.js";import"./plus-AztI1566.js";import"./colors-BkWRhvFI.js";import"./PaperCard-dvXhr75r.js";import"./AuthorAvatar-D9249Frl.js";import"./Icon-CGRs4BYD.js";import"./LatexTitle-DESKtS30.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-Df5_dywQ.js";import"./useIntersectionObserver-Ch6RpsSk.js";/* empty css */import"./PaperPreviewLink-zGfFNaz6.js";import"./index-tLcwYp0U.js";import"./index-Dj6aE-6E.js";import"./katex-DkKDou_j.js";import"./hover-card-CIBIV2Hx.js";import"./curation-CyyuHfv5.js";import"./account-DoluPGSd.js";import"./useInfiniteQuery-DeZTTVbI.js";const Ce=()=>e.jsxs(g,{to:"/astra-for-robotics",className:"task-featured-collection","aria-label":"Featured collection: GPT-6 Astra for Robotics",children:[e.jsx("span",{className:"task-featured-collection-eyebrow",children:"Featured collection"}),e.jsx("strong",{children:"GPT-6 Astra for Robotics"}),e.jsx("span",{className:"task-featured-collection-description",children:"Papers and demos that put GPT-6 Astra in control of real and simulated robots, as the policy itself or as an agent orchestrating the stack."}),e.jsxs("span",{className:"task-featured-collection-meta",children:["Explore the collection",e.jsx(L,{size:14,"aria-hidden":"true"})]})]}),X=n=>{const c=n.match(/\(([^()]*)\)\s*$/);return c?c[1].split(",").map(d=>d.trim()).filter(Boolean):[]};function Fe(n,c){const d=X(n);if(c===void 0)return"standard";const i=new Set(X(c).map(l=>l.toLowerCase())),m=d.filter(l=>!i.has(l.toLowerCase()));return m.length?m.join(", "):n}function Ae(n,c){const d=new Map(n.map(l=>[l.id,l])),i=l=>{const x=new Set([l.id]);let k=l;for(;;){const w=c(k),_=w?d.get(w):void 0;if(!_)return k.id;if(x.has(_.id))return l.id;x.add(_.id),k=_}},m=new Map;return n.forEach(l=>{const x=i(l);m.set(x,[...m.get(x)||[],l])}),[...m].map(([l,x])=>({key:l,members:[d.get(l),...x.filter(k=>k.id!==l)]}))}const R=3,Pe=[{slug:"healthcare",eyebrow:"Clinical systems",title:"Clinical AI & Healthcare",description:"Agents, clinical workflows, medical calculators, safety, and decision support.",href:"#benchmarks"},{slug:"medical-question-answering",eyebrow:"Language & reasoning",title:"Medical Question Answering",description:"Medical exams, biomedical evidence, clinical comprehension, and explanations.",href:"/tasks/medical-question-answering"},{slug:"medical-imaging",eyebrow:"Vision",title:"Medical Imaging",description:"Radiology, pathology, ophthalmology, ultrasound, and diagnostic imaging.",href:"/tasks/medical-imaging"},{slug:"medical-visual-question-answering",eyebrow:"Multimodal",title:"Medical Visual Question Answering",description:"Questions grounded in radiology, pathology, and other biomedical images.",href:"/tasks/medical-visual-question-answering"}],Re=({frameworks:n})=>n.length===0?null:e.jsxs("div",{className:"task-framework-links",children:[e.jsx("span",{className:"task-framework-links-label",children:"Recommended frameworks"}),n.map(c=>e.jsxs(g,{to:`/papers?framework=${encodeURIComponent(c.framework_slug)}`,className:"task-framework-link",children:[e.jsx("span",{children:c.framework_name}),e.jsxs("span",{className:"task-framework-link-stars",children:["★ ",fe(c.num_stars)]})]},c.framework_id))]}),Le=({task:n,area:c,parents:d})=>e.jsxs("nav",{className:"breadcrumb","aria-label":"Breadcrumb",children:[e.jsx(g,{to:"/tasks",children:"Tasks"}),c&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"sep",children:"/"}),e.jsx(g,{to:`/tasks#area-${ve(c.name)}`,children:c.name})]}),[...d].reverse().map(i=>e.jsxs(oe.Fragment,{children:[e.jsx("span",{className:"sep",children:"/"}),e.jsx(g,{to:`/tasks/${i.slug||i.id}`,children:f(i.name,i.slug)})]},i.id)),e.jsx("span",{className:"sep",children:"/"}),e.jsx("span",{style:{color:"var(--accent-text)"},children:f(n.name,n.slug)})]}),Ie=({task:n,relatedTasks:c})=>{const d=new Map([n,...c].map(i=>[i.slug,i]));return e.jsxs("section",{className:"medical-ai-hub","aria-labelledby":"medical-ai-hub-title",children:[e.jsxs("div",{className:"medical-ai-hub-heading",children:[e.jsx("span",{children:"Medical AI directory"}),e.jsx("h2",{id:"medical-ai-hub-title",children:"Explore Healthcare & Medical AI"}),e.jsx("p",{children:"Browse the field by clinical application, language, vision, or multimodal reasoning."})]}),e.jsx("div",{className:"medical-ai-hub-grid",children:Pe.map(i=>{const m=d.get(i.slug),l=e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"medical-ai-hub-card-eyebrow",children:i.eyebrow}),e.jsx("strong",{children:i.title}),e.jsx("span",{className:"medical-ai-hub-card-description",children:i.description}),e.jsxs("span",{className:"medical-ai-hub-card-meta",children:[(m==null?void 0:m.paper_count)!=null?`${m.paper_count.toLocaleString()} papers`:"Explore task",e.jsx(L,{size:14,"aria-hidden":"true"})]})]});return i.slug==="healthcare"?e.jsx("a",{href:i.href,className:"medical-ai-hub-card",children:l},i.slug):e.jsx(g,{to:i.href,className:"medical-ai-hub-card",children:l},i.slug)})})]})},qe=n=>[...n].sort((c,d)=>{const i=c.slug==="classic-language-modeling",m=d.slug==="classic-language-modeling";return i!==m?i?1:-1:0}),Ss=()=>{var V,z,U;const{taskSlug:n}=de(),c=me(),d=be(),{searchParams:i}=d,[m,l]=j.useState(!1),[x,k]=j.useState({}),[w,_]=j.useState(()=>new Set),{preferences:Y}=we(),E=(s,a)=>{const t=s||"";return a?`/benchmark/${t}?task=${encodeURIComponent(a)}`:`/benchmark/${t}`},v=Y.hide_closed_source_evals?!0:void 0,h=G({queryKey:[...K.taskPage,n,v],queryFn:()=>J.taskPage(n,{is_open:v}),enabled:!!n,staleTime:O});j.useEffect(()=>{var t;const s=(t=h.data)==null?void 0:t.task.slug;if(!n||!s||s===n)return;const a=i.toString();c(`/tasks/${s}${a?`?${a}`:""}`,{replace:!0})},[c,(V=h.data)==null?void 0:V.task.slug,i,n]);const I=G({queryKey:[...K.taskBenchmarkTrends,n,v],queryFn:()=>J.trendingBenchmarks(n,{limit:100,min_recent_papers:0,is_open:v}),enabled:!!n,staleTime:O}),y=j.useMemo(()=>{var s;return qe(((s=h.data)==null?void 0:s.children)||[])},[h.data]),B=j.useMemo(()=>{var a;const s=new Map;return(((a=h.data)==null?void 0:a.subtask_benchmarks)||[]).forEach(t=>{s.set(t.subtask_id,t.benchmarks||[])}),s},[h.data]),N=Se([...he.feeds.task,n,d.filters],s=>_e.forTask(n,{...d.filters,page:s,page_size:20,repository_limit:1}),{enabled:!!n}),Z=j.useMemo(()=>{var s;return((s=N.data)==null?void 0:s.pages.flatMap(a=>a.results.map(ye)))??[]},[N.data]),$=j.useMemo(()=>{var a;const s={};return(a=N.data)==null||a.pages.forEach(t=>t.results.forEach(b=>(b.methods||[]).forEach(u=>{const r=u.slug||u.id;s[r]||(s[r]={id:u.id,name:u.name,slug:u.slug||"",count:0}),s[r].count++}))),Object.values(s).sort((t,b)=>b.count-t.count).slice(0,8)},[N.data]);if(h.isLoading)return e.jsxs("div",{className:"page",children:[e.jsx(P,{className:"h-12 w-1/2 mb-4"}),e.jsx(P,{className:"h-6 w-1/3 mb-8"}),e.jsx(P,{className:"h-64 w-full"})]});if(Ne(h.error))return e.jsx(Be,{});if(h.error||!h.data)return e.jsx("div",{className:"page",children:e.jsx(Te,{variant:"destructive",children:e.jsx(Ee,{children:"Task not found."})})});const o=h.data.task,ee=h.data.parents||[],M=f(o.name,o.slug),C=(h.data.sisters||[]).filter(s=>s.id!==o.id),se=h.data.recommended_frameworks||[],S=h.data.benchmarks||[],q=new Map(S.map(s=>[s.id,s])),ae=new Set(S.map(s=>s.id)),H=(((z=I.data)==null?void 0:z.results)||[]).filter(s=>ae.has(s.id)).map(s=>{const a=q.get(s.id);return{...s,best_model_name:(a==null?void 0:a.best_model_name)??s.best_model_name,best_paper_route:a==null?void 0:a.best_paper_route,best_paper_title:a==null?void 0:a.best_paper_title,best_code_url:a==null?void 0:a.best_code_url}}),F=H.length?H:S.map(s=>({id:s.id,name:s.name,slug:s.slug,full_name:s.full_name,recent_paper_count:0,baseline_paper_count:0,all_time_paper_count:s.paper_count||0,trend_score:0,support_weighted_score:0,rate_change:null,latest_reported_on:null,best_model_name:s.best_model_name,best_paper_route:s.best_paper_route,best_paper_title:s.best_paper_title,best_code_url:s.best_code_url,history:[]})),T=Ae(F,s=>{var a;return(a=q.get(s.id))==null?void 0:a.parent_dataset_id}),re=m?T:T.slice(0,5),ne=T.slice(5).reduce((s,a)=>s+a.members.length,0),Q=((U=I.data)==null?void 0:U.recent_days)||90,te=y.some(s=>(B.get(s.id)||[]).length>0),ie=y.length>0,D=F.length>0,ce=(()=>{const s=new Set;return S.forEach(a=>s.add(a.id)),B.forEach(a=>a.forEach(t=>s.add(t.id))),s.size})(),le=s=>{_(a=>{const t=new Set(a);return t.has(s)?t.delete(s):t.add(s),t})};return e.jsxs("div",{className:"page",children:[e.jsx(Le,{task:o,area:h.data.area,parents:ee}),e.jsxs("div",{className:o.image_url?`task-hero-grid${o.slug==="auto-research"?" task-hero-grid--wide":""}`: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:"TASK"}),e.jsx("h1",{className:"domain-mega-title",children:M}),e.jsx(ue,{kind:"task",entityId:o.id}),o.description&&e.jsx(W,{className:"task-explainer",text:o.description}),e.jsxs("div",{className:"task-quickstats",children:[e.jsxs("span",{children:[e.jsx("span",{className:"num",children:(o.paper_count??0).toLocaleString()}),"PAPERS"]}),e.jsxs("span",{children:[e.jsx("span",{className:"num",children:ce}),"BENCHMARKS"]}),e.jsxs("span",{children:[e.jsxs("span",{className:"num",children:[$.length,"+"]}),"METHODS USED"]})]}),e.jsx(Re,{frameworks:se})]}),o.image_url&&e.jsxs("figure",{className:`task-figure-card${o.slug==="omni-models"?" task-figure-card--compact":""}`,children:[e.jsx("div",{className:"task-figure-img-wrap",children:e.jsx("img",{className:"task-figure-img",src:pe(o.image_url)??void 0,alt:`${M} schematic`,onError:s=>{var a,t;(t=(a=s.currentTarget.parentElement)==null?void 0:a.parentElement)==null||t.style.setProperty("display","none")}})}),e.jsxs("figcaption",{children:["Figure · ",M,o.image_credit&&e.jsxs(e.Fragment,{children:[e.jsx("br",{}),e.jsx(W,{className:"task-image-credit",text:o.image_credit})]})]})]})]}),o.slug==="healthcare"&&e.jsx(Ie,{task:o,relatedTasks:C}),o.slug==="robotics"&&e.jsx(Ce,{}),e.jsxs("div",{className:"task-page-grid",style:{marginTop:28},children:[e.jsxs("div",{children:[D&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"task-section-head",id:"benchmarks",children:[e.jsxs("div",{className:"task-section-eyebrow",children:[Q,"-day reporting activity · select a benchmark"]}),e.jsxs("div",{className:"task-section-title",children:["Benchmarks ",e.jsxs("span",{className:"meta",children:["[",F.length,"]"]})]})]}),e.jsxs("div",{className:"benchmark-trend-table",role:"table","aria-label":"Trending benchmarks",children:[e.jsxs("div",{className:"benchmark-trend-head",role:"row",children:[e.jsx("span",{role:"columnheader",children:"Trend"}),e.jsx("span",{role:"columnheader",children:"Benchmark"}),e.jsx("span",{role:"columnheader",children:"Best model"}),e.jsx("span",{role:"columnheader",children:"Paper title"}),e.jsx("span",{role:"columnheader",children:"Code"}),e.jsx("span",{role:"columnheader",children:"Compare"})]}),re.map(({key:s,members:a})=>{const t=a[0],b=p=>p===t?"standard":Fe(p.name,t.name),u=[t,...a.slice(1).sort((p,A)=>b(p).localeCompare(b(A),void 0,{sensitivity:"base"}))],r=u.find(p=>p.id===x[s])??t;return e.jsxs("div",{className:"benchmark-trend-row",role:"row",children:[e.jsxs("div",{className:"benchmark-trend-cell",role:"cell",children:[e.jsx(ke,{history:r.history,benchmarkName:r.name}),e.jsxs("div",{className:"benchmark-trend-meta",children:[e.jsxs("span",{children:[e.jsx("strong",{children:r.recent_paper_count})," ",r.recent_paper_count===1?"paper":"papers"," /"," ",Q,"d"]}),r.rate_change==null?r.recent_paper_count>0&&e.jsx("span",{className:"benchmark-trend-change is-new",children:"new"}):e.jsxs("span",{className:`benchmark-trend-change ${r.rate_change>=1?"is-up":"is-down"}`,children:[r.rate_change>=1?"↑":"↓"," ",r.rate_change.toFixed(1),"×"]})]})]}),e.jsxs("div",{className:"benchmark-trend-benchmark",role:"cell",children:[e.jsx(g,{className:"bench-row-name",to:E(r.slug||r.id,n),children:r.name}),u.length>1&&e.jsx("div",{className:"bench-row-variants",role:"group","aria-label":`Evaluation protocols for ${t.name}`,children:u.map(p=>e.jsx("button",{type:"button",className:"bench-row-variant","aria-pressed":p.id===r.id,title:p.name,onClick:()=>k(A=>({...A,[s]:p.id})),children:b(p)},p.id))}),e.jsx("div",{className:"bench-row-sub",children:e.jsxs("span",{children:[e.jsx("strong",{children:r.all_time_paper_count})," reporting papers"]})})]}),e.jsx("div",{className:"bench-row-best",role:"cell",children:r.best_model_name?e.jsxs(e.Fragment,{children:[e.jsx($e,{size:13,className:"bench-row-best-icon"}),e.jsx("span",{className:"bench-row-best-name",children:r.best_model_name})]}):e.jsx("span",{className:"bench-row-best-empty",children:"—"})}),e.jsx("div",{className:"bench-row-paper",role:"cell",children:r.best_paper_route&&r.best_paper_title?e.jsx(g,{to:`/paper/${encodeURIComponent(r.best_paper_route)}`,children:r.best_paper_title}):e.jsx("span",{className:"bench-row-best-empty",children:"—"})}),e.jsx("div",{className:"bench-row-code",role:"cell",children:r.best_code_url?e.jsx("a",{href:r.best_code_url,target:"_blank",rel:"noopener noreferrer","aria-label":`Code for ${r.best_paper_title||r.best_model_name}`,children:e.jsx(Me,{size:18,strokeWidth:1.8,"aria-hidden":"true"})}):e.jsx("span",{className:"bench-row-best-empty",children:"—"})}),e.jsx("div",{className:"bench-row-compare",role:"cell",children:e.jsxs(g,{to:E(r.slug||r.id,n),"aria-label":`Compare ${r.best_model_name||"the best model"} with all results on ${r.name}`,children:[e.jsx("span",{children:"See all"}),e.jsx(L,{size:11,strokeWidth:2,"aria-hidden":"true"})]})})]},s)})]}),T.length>5&&e.jsx("button",{type:"button",className:"bench-show-more",onClick:()=>l(s=>!s),children:m?"− show top 5":`+ show ${ne} more benchmarks`})]}),ie&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"task-section-head",style:D?{marginTop:36}:void 0,children:[e.jsx("div",{className:"task-section-eyebrow",children:te?"Benchmarks by capability":"Task hierarchy"}),e.jsxs("div",{className:"task-section-title",children:["Subtasks ",e.jsxs("span",{className:"meta",children:["[",y.length,"]"]})]})]}),e.jsx("div",{className:"subtask-grid",children:y.map(s=>{const a=B.get(s.id)||[],t=w.has(s.id),b=t?a:a.slice(0,R),u=a.length-R;return e.jsxs("div",{className:"subtask-section",children:[e.jsxs("div",{className:"subtask-head",children:[e.jsx(g,{to:`/tasks/${s.slug||s.id}`,className:"subtask-head-name",children:f(s.name,s.slug)}),e.jsx("span",{className:"subtask-head-meta",children:a.length>0?`[${a.length} benchmark${a.length===1?"":"s"}]`:`[${(s.paper_count??0).toLocaleString()} papers]`})]}),b.length>0?b.map((r,p)=>e.jsxs("div",{className:"bench-row",onClick:()=>c(E(r.slug||r.id,s.slug||s.id)),children:[e.jsx("div",{className:"bench-row-num",children:String(p+1).padStart(2,"0")}),e.jsxs("div",{className:"bench-row-main",children:[e.jsx("div",{className:"bench-row-name",children:r.name}),e.jsx("div",{className:"bench-row-sub",children:r.paper_count!=null&&e.jsxs("span",{children:[e.jsx("strong",{children:r.paper_count})," ENTRIES"]})})]}),e.jsx("div",{className:"bench-row-arrow",children:"→"})]},r.id)):e.jsxs(g,{to:`/tasks/${s.slug||s.id}`,className:"subtask-summary",children:[e.jsxs("span",{children:[(s.paper_count??0).toLocaleString()," papers"]}),s.description&&e.jsx("span",{className:"subtask-summary-desc",children:s.description})]}),u>0&&e.jsx("button",{type:"button",className:"bench-show-more",onClick:()=>le(s.id),children:t?`− show top ${R}`:`+ show ${u} more benchmark${u===1?"":"s"}`})]},s.id)})})]}),e.jsxs("div",{className:"task-section-head",style:{marginTop:36},children:[e.jsx("div",{className:"task-section-eyebrow",children:"Top trending · sort below"}),e.jsxs("div",{className:"task-section-title",children:["Papers ",e.jsxs("span",{className:"meta",children:["[",(o.paper_count??0).toLocaleString(),"]"]})]})]}),e.jsx(xe,{feed:d}),e.jsx(je,{query:N,cards:Z,empty:"No papers in this task yet."})]}),e.jsxs("aside",{className:"task-side",children:[C.length>0&&o.slug!=="healthcare"&&e.jsxs("div",{className:"side-block",children:[e.jsx("div",{className:"side-block-num",children:"01/"}),e.jsx("div",{className:"side-block-label",children:"Sister Tasks"}),C.slice(0,8).map(s=>e.jsxs(g,{to:`/tasks/${s.slug||s.id}`,className:"side-link-row",children:[e.jsx("span",{children:f(s.name,s.slug)}),s.paper_count!=null&&e.jsx("span",{className:"count",children:s.paper_count.toLocaleString()})]},s.id))]}),$.length>0&&e.jsxs("div",{className:"side-block",children:[e.jsx("div",{className:"side-block-num",children:"02/"}),e.jsx("div",{className:"side-block-label",children:"Common Methods"}),$.map(s=>e.jsxs("div",{className:"side-method-row",children:[e.jsx(ge,{method:{slug:s.slug,name:s.name}}),e.jsxs("span",{className:"num",children:["·",s.count]})]},s.id))]})]})]})]})};export{Ie as HealthcareMedicalAiHub,Re as RecommendedFrameworkLinks,Le as TaskBreadcrumb,Ss as default}; +import{j as e,L as g,V as oe,u as de,e as me,d as j,b as G,p as he,a3 as pe,o as K,T as O}from"./index-CHGpuh10.js";import{R as ue}from"./ResearchFollowButton-DFGdTBex.js";import{M as ge}from"./SotaBadges-D825CK6n.js";import{u as be,b as xe,a as je}from"./PaperFeed-DjmnPHUi.js";import{A as L}from"./arrow-right-CUTKRnAt.js";import{B as ke}from"./BenchmarkTrendSparkline-dQdt-ejq.js";import{M as W}from"./MarkdownText-D0AGKKJ1.js";import{c as J}from"./catalog-DMzmJg__.js";import{p as _e}from"./papers-BPpxs2sO.js";import{i as Ne}from"./apiErrors-CvxFAcrW.js";import{f as fe}from"./frameworks-DDA0P4Tf.js";import{u as we}from"./preferences-BR-SGx3E.js";import{s as ve}from"./slug-BpH-Nkvz.js";import{d as f,t as ye}from"./transform-Cs8_lTDx.js";import{u as Se}from"./usePapers-DzyOc-Ae.js";import{S as P}from"./skeleton-Df0GaMuw.js";import{A as Te,a as Ee}from"./alert-DPvmCXZT.js";import Be from"./NotFound-Bc6y0g0J.js";import{T as $e}from"./trophy-BFUARFPy.js";import{G as Me}from"./github-CRId1LT2.js";import"./researchTopic-DK_KbYKH.js";import"./useMutation-3fOqWcpt.js";import"./plus-CYgr1KdS.js";import"./colors-BkWRhvFI.js";import"./PaperCard-BtCEa6CD.js";import"./AuthorAvatar-fJxhX3fO.js";import"./Icon-CRWrVPWO.js";import"./LatexTitle-CfeEppH3.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-BHpRw7vT.js";import"./useIntersectionObserver-DZSpsOQX.js";/* empty css */import"./PaperPreviewLink-CPkn2Kqv.js";import"./index-B141zdPU.js";import"./index-BzjqtLRb.js";import"./katex-DkKDou_j.js";import"./hover-card-Dz7z6DCn.js";import"./curation-DI9_zYNx.js";import"./account-D9O54ufU.js";import"./useInfiniteQuery-DhWyWKGj.js";const Ce=()=>e.jsxs(g,{to:"/astra-for-robotics",className:"task-featured-collection","aria-label":"Featured collection: GPT-6 Astra for Robotics",children:[e.jsx("span",{className:"task-featured-collection-eyebrow",children:"Featured collection"}),e.jsx("strong",{children:"GPT-6 Astra for Robotics"}),e.jsx("span",{className:"task-featured-collection-description",children:"Papers and demos that put GPT-6 Astra in control of real and simulated robots, as the policy itself or as an agent orchestrating the stack."}),e.jsxs("span",{className:"task-featured-collection-meta",children:["Explore the collection",e.jsx(L,{size:14,"aria-hidden":"true"})]})]}),X=n=>{const c=n.match(/\(([^()]*)\)\s*$/);return c?c[1].split(",").map(d=>d.trim()).filter(Boolean):[]};function Fe(n,c){const d=X(n);if(c===void 0)return"standard";const i=new Set(X(c).map(l=>l.toLowerCase())),m=d.filter(l=>!i.has(l.toLowerCase()));return m.length?m.join(", "):n}function Ae(n,c){const d=new Map(n.map(l=>[l.id,l])),i=l=>{const x=new Set([l.id]);let k=l;for(;;){const w=c(k),_=w?d.get(w):void 0;if(!_)return k.id;if(x.has(_.id))return l.id;x.add(_.id),k=_}},m=new Map;return n.forEach(l=>{const x=i(l);m.set(x,[...m.get(x)||[],l])}),[...m].map(([l,x])=>({key:l,members:[d.get(l),...x.filter(k=>k.id!==l)]}))}const R=3,Pe=[{slug:"healthcare",eyebrow:"Clinical systems",title:"Clinical AI & Healthcare",description:"Agents, clinical workflows, medical calculators, safety, and decision support.",href:"#benchmarks"},{slug:"medical-question-answering",eyebrow:"Language & reasoning",title:"Medical Question Answering",description:"Medical exams, biomedical evidence, clinical comprehension, and explanations.",href:"/tasks/medical-question-answering"},{slug:"medical-imaging",eyebrow:"Vision",title:"Medical Imaging",description:"Radiology, pathology, ophthalmology, ultrasound, and diagnostic imaging.",href:"/tasks/medical-imaging"},{slug:"medical-visual-question-answering",eyebrow:"Multimodal",title:"Medical Visual Question Answering",description:"Questions grounded in radiology, pathology, and other biomedical images.",href:"/tasks/medical-visual-question-answering"}],Re=({frameworks:n})=>n.length===0?null:e.jsxs("div",{className:"task-framework-links",children:[e.jsx("span",{className:"task-framework-links-label",children:"Recommended frameworks"}),n.map(c=>e.jsxs(g,{to:`/papers?framework=${encodeURIComponent(c.framework_slug)}`,className:"task-framework-link",children:[e.jsx("span",{children:c.framework_name}),e.jsxs("span",{className:"task-framework-link-stars",children:["★ ",fe(c.num_stars)]})]},c.framework_id))]}),Le=({task:n,area:c,parents:d})=>e.jsxs("nav",{className:"breadcrumb","aria-label":"Breadcrumb",children:[e.jsx(g,{to:"/tasks",children:"Tasks"}),c&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"sep",children:"/"}),e.jsx(g,{to:`/tasks#area-${ve(c.name)}`,children:c.name})]}),[...d].reverse().map(i=>e.jsxs(oe.Fragment,{children:[e.jsx("span",{className:"sep",children:"/"}),e.jsx(g,{to:`/tasks/${i.slug||i.id}`,children:f(i.name,i.slug)})]},i.id)),e.jsx("span",{className:"sep",children:"/"}),e.jsx("span",{style:{color:"var(--accent-text)"},children:f(n.name,n.slug)})]}),Ie=({task:n,relatedTasks:c})=>{const d=new Map([n,...c].map(i=>[i.slug,i]));return e.jsxs("section",{className:"medical-ai-hub","aria-labelledby":"medical-ai-hub-title",children:[e.jsxs("div",{className:"medical-ai-hub-heading",children:[e.jsx("span",{children:"Medical AI directory"}),e.jsx("h2",{id:"medical-ai-hub-title",children:"Explore Healthcare & Medical AI"}),e.jsx("p",{children:"Browse the field by clinical application, language, vision, or multimodal reasoning."})]}),e.jsx("div",{className:"medical-ai-hub-grid",children:Pe.map(i=>{const m=d.get(i.slug),l=e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"medical-ai-hub-card-eyebrow",children:i.eyebrow}),e.jsx("strong",{children:i.title}),e.jsx("span",{className:"medical-ai-hub-card-description",children:i.description}),e.jsxs("span",{className:"medical-ai-hub-card-meta",children:[(m==null?void 0:m.paper_count)!=null?`${m.paper_count.toLocaleString()} papers`:"Explore task",e.jsx(L,{size:14,"aria-hidden":"true"})]})]});return i.slug==="healthcare"?e.jsx("a",{href:i.href,className:"medical-ai-hub-card",children:l},i.slug):e.jsx(g,{to:i.href,className:"medical-ai-hub-card",children:l},i.slug)})})]})},qe=n=>[...n].sort((c,d)=>{const i=c.slug==="classic-language-modeling",m=d.slug==="classic-language-modeling";return i!==m?i?1:-1:0}),Ss=()=>{var V,z,U;const{taskSlug:n}=de(),c=me(),d=be(),{searchParams:i}=d,[m,l]=j.useState(!1),[x,k]=j.useState({}),[w,_]=j.useState(()=>new Set),{preferences:Y}=we(),E=(s,a)=>{const t=s||"";return a?`/benchmark/${t}?task=${encodeURIComponent(a)}`:`/benchmark/${t}`},v=Y.hide_closed_source_evals?!0:void 0,h=G({queryKey:[...K.taskPage,n,v],queryFn:()=>J.taskPage(n,{is_open:v}),enabled:!!n,staleTime:O});j.useEffect(()=>{var t;const s=(t=h.data)==null?void 0:t.task.slug;if(!n||!s||s===n)return;const a=i.toString();c(`/tasks/${s}${a?`?${a}`:""}`,{replace:!0})},[c,(V=h.data)==null?void 0:V.task.slug,i,n]);const I=G({queryKey:[...K.taskBenchmarkTrends,n,v],queryFn:()=>J.trendingBenchmarks(n,{limit:100,min_recent_papers:0,is_open:v}),enabled:!!n,staleTime:O}),y=j.useMemo(()=>{var s;return qe(((s=h.data)==null?void 0:s.children)||[])},[h.data]),B=j.useMemo(()=>{var a;const s=new Map;return(((a=h.data)==null?void 0:a.subtask_benchmarks)||[]).forEach(t=>{s.set(t.subtask_id,t.benchmarks||[])}),s},[h.data]),N=Se([...he.feeds.task,n,d.filters],s=>_e.forTask(n,{...d.filters,page:s,page_size:20,repository_limit:1}),{enabled:!!n}),Z=j.useMemo(()=>{var s;return((s=N.data)==null?void 0:s.pages.flatMap(a=>a.results.map(ye)))??[]},[N.data]),$=j.useMemo(()=>{var a;const s={};return(a=N.data)==null||a.pages.forEach(t=>t.results.forEach(b=>(b.methods||[]).forEach(u=>{const r=u.slug||u.id;s[r]||(s[r]={id:u.id,name:u.name,slug:u.slug||"",count:0}),s[r].count++}))),Object.values(s).sort((t,b)=>b.count-t.count).slice(0,8)},[N.data]);if(h.isLoading)return e.jsxs("div",{className:"page",children:[e.jsx(P,{className:"h-12 w-1/2 mb-4"}),e.jsx(P,{className:"h-6 w-1/3 mb-8"}),e.jsx(P,{className:"h-64 w-full"})]});if(Ne(h.error))return e.jsx(Be,{});if(h.error||!h.data)return e.jsx("div",{className:"page",children:e.jsx(Te,{variant:"destructive",children:e.jsx(Ee,{children:"Task not found."})})});const o=h.data.task,ee=h.data.parents||[],M=f(o.name,o.slug),C=(h.data.sisters||[]).filter(s=>s.id!==o.id),se=h.data.recommended_frameworks||[],S=h.data.benchmarks||[],q=new Map(S.map(s=>[s.id,s])),ae=new Set(S.map(s=>s.id)),H=(((z=I.data)==null?void 0:z.results)||[]).filter(s=>ae.has(s.id)).map(s=>{const a=q.get(s.id);return{...s,best_model_name:(a==null?void 0:a.best_model_name)??s.best_model_name,best_paper_route:a==null?void 0:a.best_paper_route,best_paper_title:a==null?void 0:a.best_paper_title,best_code_url:a==null?void 0:a.best_code_url}}),F=H.length?H:S.map(s=>({id:s.id,name:s.name,slug:s.slug,full_name:s.full_name,recent_paper_count:0,baseline_paper_count:0,all_time_paper_count:s.paper_count||0,trend_score:0,support_weighted_score:0,rate_change:null,latest_reported_on:null,best_model_name:s.best_model_name,best_paper_route:s.best_paper_route,best_paper_title:s.best_paper_title,best_code_url:s.best_code_url,history:[]})),T=Ae(F,s=>{var a;return(a=q.get(s.id))==null?void 0:a.parent_dataset_id}),re=m?T:T.slice(0,5),ne=T.slice(5).reduce((s,a)=>s+a.members.length,0),Q=((U=I.data)==null?void 0:U.recent_days)||90,te=y.some(s=>(B.get(s.id)||[]).length>0),ie=y.length>0,D=F.length>0,ce=(()=>{const s=new Set;return S.forEach(a=>s.add(a.id)),B.forEach(a=>a.forEach(t=>s.add(t.id))),s.size})(),le=s=>{_(a=>{const t=new Set(a);return t.has(s)?t.delete(s):t.add(s),t})};return e.jsxs("div",{className:"page",children:[e.jsx(Le,{task:o,area:h.data.area,parents:ee}),e.jsxs("div",{className:o.image_url?`task-hero-grid${o.slug==="auto-research"?" task-hero-grid--wide":""}`: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:"TASK"}),e.jsx("h1",{className:"domain-mega-title",children:M}),e.jsx(ue,{kind:"task",entityId:o.id}),o.description&&e.jsx(W,{className:"task-explainer",text:o.description}),e.jsxs("div",{className:"task-quickstats",children:[e.jsxs("span",{children:[e.jsx("span",{className:"num",children:(o.paper_count??0).toLocaleString()}),"PAPERS"]}),e.jsxs("span",{children:[e.jsx("span",{className:"num",children:ce}),"BENCHMARKS"]}),e.jsxs("span",{children:[e.jsxs("span",{className:"num",children:[$.length,"+"]}),"METHODS USED"]})]}),e.jsx(Re,{frameworks:se})]}),o.image_url&&e.jsxs("figure",{className:`task-figure-card${o.slug==="omni-models"?" task-figure-card--compact":""}`,children:[e.jsx("div",{className:"task-figure-img-wrap",children:e.jsx("img",{className:"task-figure-img",src:pe(o.image_url)??void 0,alt:`${M} schematic`,onError:s=>{var a,t;(t=(a=s.currentTarget.parentElement)==null?void 0:a.parentElement)==null||t.style.setProperty("display","none")}})}),e.jsxs("figcaption",{children:["Figure · ",M,o.image_credit&&e.jsxs(e.Fragment,{children:[e.jsx("br",{}),e.jsx(W,{className:"task-image-credit",text:o.image_credit})]})]})]})]}),o.slug==="healthcare"&&e.jsx(Ie,{task:o,relatedTasks:C}),o.slug==="robotics"&&e.jsx(Ce,{}),e.jsxs("div",{className:"task-page-grid",style:{marginTop:28},children:[e.jsxs("div",{children:[D&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"task-section-head",id:"benchmarks",children:[e.jsxs("div",{className:"task-section-eyebrow",children:[Q,"-day reporting activity · select a benchmark"]}),e.jsxs("div",{className:"task-section-title",children:["Benchmarks ",e.jsxs("span",{className:"meta",children:["[",F.length,"]"]})]})]}),e.jsxs("div",{className:"benchmark-trend-table",role:"table","aria-label":"Trending benchmarks",children:[e.jsxs("div",{className:"benchmark-trend-head",role:"row",children:[e.jsx("span",{role:"columnheader",children:"Trend"}),e.jsx("span",{role:"columnheader",children:"Benchmark"}),e.jsx("span",{role:"columnheader",children:"Best model"}),e.jsx("span",{role:"columnheader",children:"Paper title"}),e.jsx("span",{role:"columnheader",children:"Code"}),e.jsx("span",{role:"columnheader",children:"Compare"})]}),re.map(({key:s,members:a})=>{const t=a[0],b=p=>p===t?"standard":Fe(p.name,t.name),u=[t,...a.slice(1).sort((p,A)=>b(p).localeCompare(b(A),void 0,{sensitivity:"base"}))],r=u.find(p=>p.id===x[s])??t;return e.jsxs("div",{className:"benchmark-trend-row",role:"row",children:[e.jsxs("div",{className:"benchmark-trend-cell",role:"cell",children:[e.jsx(ke,{history:r.history,benchmarkName:r.name}),e.jsxs("div",{className:"benchmark-trend-meta",children:[e.jsxs("span",{children:[e.jsx("strong",{children:r.recent_paper_count})," ",r.recent_paper_count===1?"paper":"papers"," /"," ",Q,"d"]}),r.rate_change==null?r.recent_paper_count>0&&e.jsx("span",{className:"benchmark-trend-change is-new",children:"new"}):e.jsxs("span",{className:`benchmark-trend-change ${r.rate_change>=1?"is-up":"is-down"}`,children:[r.rate_change>=1?"↑":"↓"," ",r.rate_change.toFixed(1),"×"]})]})]}),e.jsxs("div",{className:"benchmark-trend-benchmark",role:"cell",children:[e.jsx(g,{className:"bench-row-name",to:E(r.slug||r.id,n),children:r.name}),u.length>1&&e.jsx("div",{className:"bench-row-variants",role:"group","aria-label":`Evaluation protocols for ${t.name}`,children:u.map(p=>e.jsx("button",{type:"button",className:"bench-row-variant","aria-pressed":p.id===r.id,title:p.name,onClick:()=>k(A=>({...A,[s]:p.id})),children:b(p)},p.id))}),e.jsx("div",{className:"bench-row-sub",children:e.jsxs("span",{children:[e.jsx("strong",{children:r.all_time_paper_count})," reporting papers"]})})]}),e.jsx("div",{className:"bench-row-best",role:"cell",children:r.best_model_name?e.jsxs(e.Fragment,{children:[e.jsx($e,{size:13,className:"bench-row-best-icon"}),e.jsx("span",{className:"bench-row-best-name",children:r.best_model_name})]}):e.jsx("span",{className:"bench-row-best-empty",children:"—"})}),e.jsx("div",{className:"bench-row-paper",role:"cell",children:r.best_paper_route&&r.best_paper_title?e.jsx(g,{to:`/paper/${encodeURIComponent(r.best_paper_route)}`,children:r.best_paper_title}):e.jsx("span",{className:"bench-row-best-empty",children:"—"})}),e.jsx("div",{className:"bench-row-code",role:"cell",children:r.best_code_url?e.jsx("a",{href:r.best_code_url,target:"_blank",rel:"noopener noreferrer","aria-label":`Code for ${r.best_paper_title||r.best_model_name}`,children:e.jsx(Me,{size:18,strokeWidth:1.8,"aria-hidden":"true"})}):e.jsx("span",{className:"bench-row-best-empty",children:"—"})}),e.jsx("div",{className:"bench-row-compare",role:"cell",children:e.jsxs(g,{to:E(r.slug||r.id,n),"aria-label":`Compare ${r.best_model_name||"the best model"} with all results on ${r.name}`,children:[e.jsx("span",{children:"See all"}),e.jsx(L,{size:11,strokeWidth:2,"aria-hidden":"true"})]})})]},s)})]}),T.length>5&&e.jsx("button",{type:"button",className:"bench-show-more",onClick:()=>l(s=>!s),children:m?"− show top 5":`+ show ${ne} more benchmarks`})]}),ie&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"task-section-head",style:D?{marginTop:36}:void 0,children:[e.jsx("div",{className:"task-section-eyebrow",children:te?"Benchmarks by capability":"Task hierarchy"}),e.jsxs("div",{className:"task-section-title",children:["Subtasks ",e.jsxs("span",{className:"meta",children:["[",y.length,"]"]})]})]}),e.jsx("div",{className:"subtask-grid",children:y.map(s=>{const a=B.get(s.id)||[],t=w.has(s.id),b=t?a:a.slice(0,R),u=a.length-R;return e.jsxs("div",{className:"subtask-section",children:[e.jsxs("div",{className:"subtask-head",children:[e.jsx(g,{to:`/tasks/${s.slug||s.id}`,className:"subtask-head-name",children:f(s.name,s.slug)}),e.jsx("span",{className:"subtask-head-meta",children:a.length>0?`[${a.length} benchmark${a.length===1?"":"s"}]`:`[${(s.paper_count??0).toLocaleString()} papers]`})]}),b.length>0?b.map((r,p)=>e.jsxs("div",{className:"bench-row",onClick:()=>c(E(r.slug||r.id,s.slug||s.id)),children:[e.jsx("div",{className:"bench-row-num",children:String(p+1).padStart(2,"0")}),e.jsxs("div",{className:"bench-row-main",children:[e.jsx("div",{className:"bench-row-name",children:r.name}),e.jsx("div",{className:"bench-row-sub",children:r.paper_count!=null&&e.jsxs("span",{children:[e.jsx("strong",{children:r.paper_count})," ENTRIES"]})})]}),e.jsx("div",{className:"bench-row-arrow",children:"→"})]},r.id)):e.jsxs(g,{to:`/tasks/${s.slug||s.id}`,className:"subtask-summary",children:[e.jsxs("span",{children:[(s.paper_count??0).toLocaleString()," papers"]}),s.description&&e.jsx("span",{className:"subtask-summary-desc",children:s.description})]}),u>0&&e.jsx("button",{type:"button",className:"bench-show-more",onClick:()=>le(s.id),children:t?`− show top ${R}`:`+ show ${u} more benchmark${u===1?"":"s"}`})]},s.id)})})]}),e.jsxs("div",{className:"task-section-head",style:{marginTop:36},children:[e.jsx("div",{className:"task-section-eyebrow",children:"Top trending · sort below"}),e.jsxs("div",{className:"task-section-title",children:["Papers ",e.jsxs("span",{className:"meta",children:["[",(o.paper_count??0).toLocaleString(),"]"]})]})]}),e.jsx(xe,{feed:d}),e.jsx(je,{query:N,cards:Z,empty:"No papers in this task yet."})]}),e.jsxs("aside",{className:"task-side",children:[C.length>0&&o.slug!=="healthcare"&&e.jsxs("div",{className:"side-block",children:[e.jsx("div",{className:"side-block-num",children:"01/"}),e.jsx("div",{className:"side-block-label",children:"Sister Tasks"}),C.slice(0,8).map(s=>e.jsxs(g,{to:`/tasks/${s.slug||s.id}`,className:"side-link-row",children:[e.jsx("span",{children:f(s.name,s.slug)}),s.paper_count!=null&&e.jsx("span",{className:"count",children:s.paper_count.toLocaleString()})]},s.id))]}),$.length>0&&e.jsxs("div",{className:"side-block",children:[e.jsx("div",{className:"side-block-num",children:"02/"}),e.jsx("div",{className:"side-block-label",children:"Common Methods"}),$.map(s=>e.jsxs("div",{className:"side-method-row",children:[e.jsx(ge,{method:{slug:s.slug,name:s.name}}),e.jsxs("span",{className:"num",children:["·",s.count]})]},s.id))]})]})]})]})};export{Ie as HealthcareMedicalAiHub,Re as RecommendedFrameworkLinks,Le as TaskBreadcrumb,Ss as default}; diff --git a/assets/TagsIndexView-Bqdox0Xx.js b/assets/TagsIndexView-Bkf2GkuQ.js similarity index 97% rename from assets/TagsIndexView-Bqdox0Xx.js rename to assets/TagsIndexView-Bkf2GkuQ.js index 73867169fa5cf29453cee30d471b545429a4ef01..eb37bc186923934e4fbbdb40bd16f716e0ea4ca3 100644 --- a/assets/TagsIndexView-Bqdox0Xx.js +++ b/assets/TagsIndexView-Bkf2GkuQ.js @@ -1,4 +1,4 @@ -import{s as e,b as s,d as g,j as a,L as z,o as j,T as p}from"./index-CjdUkE4w.js";import{c as k}from"./catalog-qXcKve0z.js";import{c as v,h as u}from"./colors-BkWRhvFI.js";import{d as f}from"./transform-CRNzYLch.js";import{s as S}from"./slug-BpH-Nkvz.js";import{S as L}from"./search-DxMn7VKI.js";import{I as C,T as V}from"./triangle-alert-DF8Mdy0J.js";import{S as A}from"./share-2-Nvga0TP8.js";import{T as H}from"./trending-up-BMb-8Pi8.js";import{M as T}from"./moon-HVqBvdxs.js";import{T as F}from"./thumbs-up-Dn_5H93T.js";import{D as Z}from"./database-b_ekt_5x.js";import{T as B}from"./trophy-BQy3NGXy.js";import{F as P}from"./file-text-CHlxsNJC.js";import{A as N}from"./activity--6WvmXv2.js";import{G as D}from"./globe-mBp0l-nC.js";import{S as E}from"./sparkles-CIfeDmV2.js";import{A as _,a as G}from"./alert-BM9Xfuyy.js";import{A as I,a as U,b as W}from"./AreaSection-iYSRoy6-.js";import{T as Q}from"./TaxonomySuggestionTile-ByzqhBFs.js";import{u as R,T as $}from"./useHashScrollOnReady-mScSLUem.js";import{s as K}from"./areas-Dvi8w2dp.js";import"./skeleton-DTWi7Ctg.js";import"./SignInToEditDialog-rWxdYNRK.js";import"./button-DetZl_ch.js";import"./input-7i-rZ7fA.js";import"./textarea-biscLKBK.js";import"./searchable-select-EPf13F1I.js";import"./popover-Df5_dywQ.js";import"./dialog-BzX9PD3v.js";import"./loader-circle-xTdSzHv_.js";import"./useMutation-BYtVrkc7.js";import"./submissions-CQ6M0giV.js";import"./plus-AztI1566.js";/** +import{s as e,b as s,d as g,j as a,L as z,o as j,T as p}from"./index-CHGpuh10.js";import{c as k}from"./catalog-DMzmJg__.js";import{c as v,h as u}from"./colors-BkWRhvFI.js";import{d as f}from"./transform-Cs8_lTDx.js";import{s as S}from"./slug-BpH-Nkvz.js";import{S as L}from"./search-Czb1C2Q7.js";import{I as C,T as V}from"./triangle-alert-nsUjBiKf.js";import{S as A}from"./share-2-8l7A6ayI.js";import{T as H}from"./trending-up-Cqe6Lpc9.js";import{M as T}from"./moon-DPD0RWyO.js";import{T as F}from"./thumbs-up-BGuynS0P.js";import{D as Z}from"./database-DYuYu8SE.js";import{T as B}from"./trophy-BFUARFPy.js";import{F as P}from"./file-text-DPLtNP9U.js";import{A as N}from"./activity-CPcCgbtC.js";import{G as D}from"./globe-CR-SV3ud.js";import{S as E}from"./sparkles-BSDHUYSH.js";import{A as _,a as G}from"./alert-DPvmCXZT.js";import{A as I,a as U,b as W}from"./AreaSection-BVX3JiNc.js";import{T as Q}from"./TaxonomySuggestionTile-QKr6E6VG.js";import{u as R,T as $}from"./useHashScrollOnReady-BOZxHdDU.js";import{s as K}from"./areas-Dvi8w2dp.js";import"./skeleton-Df0GaMuw.js";import"./SignInToEditDialog-B3EJVut1.js";import"./button-C4kqC3Av.js";import"./input-FDP77A0C.js";import"./textarea-CDMkQNbH.js";import"./searchable-select-9e2cCX5g.js";import"./popover-BHpRw7vT.js";import"./dialog-BfI2DQVf.js";import"./loader-circle-DuUnmHjj.js";import"./useMutation-3fOqWcpt.js";import"./submissions-BHHAmt53.js";import"./plus-CYgr1KdS.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/TaxonomySuggestionTile-ByzqhBFs.js b/assets/TaxonomySuggestionTile-QKr6E6VG.js similarity index 76% rename from assets/TaxonomySuggestionTile-ByzqhBFs.js rename to assets/TaxonomySuggestionTile-QKr6E6VG.js index fe2117b5b497876be6aaa2fa601f036780fdfd9b..66aae4de7031036b3ccfba985098de7d90ab62b3 100644 --- a/assets/TaxonomySuggestionTile-ByzqhBFs.js +++ b/assets/TaxonomySuggestionTile-QKr6E6VG.js @@ -1 +1 @@ -import{a as u,d as t,j as e}from"./index-CjdUkE4w.js";import{S as c,a as m}from"./SignInToEditDialog-rWxdYNRK.js";import{P as p}from"./plus-AztI1566.js";function j({kind:s}){const{user:a}=u(),[i,n]=t.useState(!1),[l,o]=t.useState(!1),r=`Suggest a new ${s}...`,g=()=>{a?n(!0):o(!0)};return e.jsxs(e.Fragment,{children:[e.jsxs("button",{type:"button",className:"tag-cell taxonomy-suggestion-cell",onClick:g,children:[e.jsxs("div",{className:"name",children:[e.jsx(p,{className:"taxonomy-suggestion-icon","aria-hidden":"true"}),r]}),e.jsx("div",{className:"meta",children:e.jsx("span",{children:"Propose an addition"})})]}),e.jsx(c,{open:i,onOpenChange:n,kind:s}),e.jsx(m,{open:l,onOpenChange:o,sectionLabel:`${s}s`,returnTo:typeof window<"u"?window.location.pathname:`/${s}s`,taxonomySuggestion:!0})]})}export{j as T}; +import{a as u,d as t,j as e}from"./index-CHGpuh10.js";import{S as c,a as m}from"./SignInToEditDialog-B3EJVut1.js";import{P as p}from"./plus-CYgr1KdS.js";function j({kind:s}){const{user:a}=u(),[i,n]=t.useState(!1),[l,o]=t.useState(!1),r=`Suggest a new ${s}...`,g=()=>{a?n(!0):o(!0)};return e.jsxs(e.Fragment,{children:[e.jsxs("button",{type:"button",className:"tag-cell taxonomy-suggestion-cell",onClick:g,children:[e.jsxs("div",{className:"name",children:[e.jsx(p,{className:"taxonomy-suggestion-icon","aria-hidden":"true"}),r]}),e.jsx("div",{className:"meta",children:e.jsx("span",{children:"Propose an addition"})})]}),e.jsx(c,{open:i,onOpenChange:n,kind:s}),e.jsx(m,{open:l,onOpenChange:o,sectionLabel:`${s}s`,returnTo:typeof window<"u"?window.location.pathname:`/${s}s`,taxonomySuggestion:!0})]})}export{j as T}; diff --git a/assets/TrendsView-DPKj3I8y.js b/assets/TrendsView-C7Tf25qK.js similarity index 97% rename from assets/TrendsView-DPKj3I8y.js rename to assets/TrendsView-C7Tf25qK.js index ac85a6026ab284d4f186453306ad89440339c7e5..0910ff3f3518c9843a533d0fdb588cbd5785d5d8 100644 --- a/assets/TrendsView-DPKj3I8y.js +++ b/assets/TrendsView-C7Tf25qK.js @@ -1 +1 @@ -import{V as I,j as e,ac as X,b as G}from"./index-CjdUkE4w.js";import{A as J,a as V}from"./alert-BM9Xfuyy.js";import{S as P}from"./skeleton-DTWi7Ctg.js";const m=t=>{const r=/^(\d{4})-(0[1-9]|1[0-2])$/.exec(t);if(!r)return t;const[,s,l]=r;return`${["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"][Number(l)-1]} '${s.slice(2)}`},g=980,j=400,x=62,B=26,f=30,E=58,u=g-x-B,A=j-f-E,v=f+A,Q=t=>{if(t.length<3)return t.map((s,l)=>`${l?"L":"M"}${s[0]} ${s[1]}`).join(" ");let r=`M${t[0][0]} ${t[0][1]}`;for(let s=0;s{const[a,y]=I.useState(null),i=r.length,b=l[l.length-1],d=n=>x+u*(i===1?0:n/(i-1)),p=n=>f+A*(1-n/b);if(i===0)return null;const R=r.map((n,h)=>[d(h),p(n.percent)]),F=Q(R),_=`${F} L ${d(i-1)} ${v} L ${x} ${v} Z`,w=i<=12?1:Math.ceil(i/8),O=n=>{const h=n.currentTarget.getBoundingClientRect(),S=(n.clientX-h.left)/h.width*g,k=i>1?u/(i-1):u,q=Math.max(0,Math.min(i-1,Math.round((S-x)/k)));y(q)},H=`trend-gradient-${t}`;return e.jsxs("figure",{className:"trend-chart",children:[e.jsxs("div",{className:"trend-chart-visual",children:[e.jsxs("svg",{viewBox:`0 0 ${g} ${j}`,width:"100%",role:"img","aria-label":`${c} by ${o.toLowerCase()}, from ${m(r[0].month)} (${r[0].percent}%) to ${m(r[i-1].month)} (${r[i-1].percent}%)`,style:{display:"block",overflow:"visible",cursor:"crosshair"},onPointerMove:O,onPointerLeave:()=>y(null),children:[e.jsx("defs",{children:e.jsxs("linearGradient",{id:H,x1:"0",y1:"0",x2:"0",y2:"1",children:[e.jsx("stop",{offset:"0%",style:{stopColor:s,stopOpacity:.26}}),e.jsx("stop",{offset:"100%",style:{stopColor:s,stopOpacity:.02}})]})}),l.map(n=>e.jsxs("g",{children:[e.jsx("line",{x1:x,x2:g-B,y1:p(n),y2:p(n),stroke:"var(--hairline)",strokeWidth:1}),e.jsxs("text",{x:x-14,y:p(n)+4,textAnchor:"end",style:W,children:[n,"%"]})]},n)),e.jsx("path",{d:_,fill:`url(#${H})`}),e.jsx("path",{d:F,fill:"none",stroke:s,strokeWidth:2,strokeLinejoin:"round",strokeLinecap:"round"}),r.map((n,h)=>{const S=h===i-1,k=h%w===0&&i-1-h>=w/2;return!S&&!k?null:e.jsx("text",{x:d(h),y:v+24,textAnchor:"middle",style:W,children:m(n.month)},n.month)}),e.jsx("text",{x:x+u/2,y:j-4,textAnchor:"middle",style:z,children:o}),e.jsx("text",{transform:`translate(16 ${f+A/2}) rotate(-90)`,textAnchor:"middle",style:z,children:c}),a!=null&&e.jsxs(e.Fragment,{children:[e.jsx("line",{x1:d(a),x2:d(a),y1:f,y2:v,stroke:s,strokeWidth:1,strokeDasharray:"3 4",opacity:.5}),e.jsx("circle",{cx:d(a),cy:p(r[a].percent),r:5,fill:"var(--bg)",stroke:s,strokeWidth:2})]})]}),a!=null&&e.jsxs("div",{style:{position:"absolute",left:`${d(a)/g*100}%`,top:`${p(r[a].percent)/j*100}%`,transform:"translate(-50%, calc(-100% - 14px))",background:"var(--bg-elevated)",border:"1px solid var(--hairline)",borderRadius:6,boxShadow:"0 8px 26px rgba(0,0,0,.13)",padding:"7px 12px",pointerEvents:"none",whiteSpace:"nowrap",zIndex:3},children:[e.jsx("div",{style:{fontFamily:"var(--serif)",fontStyle:"italic",color:"var(--ink-faint)",fontSize:13,marginBottom:2},children:m(r[a].month)}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:7,fontFamily:"var(--mono)",fontWeight:600,fontSize:15,color:"var(--ink)"},children:[e.jsx("span",{style:{width:8,height:8,borderRadius:2,background:s,display:"inline-block"}}),r[a].percent,"%"]})]})]}),e.jsxs("details",{className:"trend-chart-table",children:[e.jsx("summary",{style:{fontFamily:"var(--mono)",fontSize:11,letterSpacing:"0.04em",color:"var(--ink-faint)",cursor:"pointer"},children:"View data table"}),e.jsxs("table",{style:{marginTop:8,borderCollapse:"collapse",fontFamily:"var(--mono)",fontSize:12,color:"var(--ink-soft)"},children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{style:{textAlign:"left",padding:"3px 18px 3px 0"},children:o}),e.jsx("th",{style:{textAlign:"right",padding:"3px 0"},children:c})]})}),e.jsx("tbody",{children:r.map(n=>e.jsxs("tr",{children:[e.jsx("td",{style:{padding:"2px 18px 2px 0"},children:m(n.month)}),e.jsxs("td",{style:{textAlign:"right",padding:"2px 0"},children:[n.percent,"%"]})]},n.month))})]})]})]})};class Y{constructor(r){this.request=r}trends(){return this.request("/stats/trends")}}const K=new Y(X),$={maxWidth:960,padding:"48px 0 8px",borderTop:"1px solid var(--hairline)",marginTop:48},T={fontFamily:"var(--serif)",fontSize:34,fontWeight:500,letterSpacing:"-0.02em",margin:"0 0 10px",color:"var(--ink)"},M={fontFamily:"var(--serif)",fontSize:18,lineHeight:1.55,color:"var(--ink-soft)",maxWidth:620,margin:"0 0 8px"},C={fontFamily:"var(--mono)",fontSize:12,fontWeight:600,letterSpacing:"0.14em",textTransform:"uppercase",color:"var(--ink-faint)",marginBottom:8},N={fontFamily:"var(--serif)",fontSize:17,lineHeight:1.6,color:"var(--ink-soft)",margin:0},D={height:320,marginTop:26},te=()=>{const t=G({queryKey:["research-trends"],queryFn:()=>K.trends(),staleTime:36e5});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:["Research ",e.jsx("em",{children:"Trends"})]}),e.jsx("div",{className:"feed-subtitle",children:"How open science is changing across machine learning — tracked over time from arXiv and the Hugging Face Hub."})]})}),t.error&&e.jsx(J,{variant:"destructive",children:e.jsx(V,{children:"Failed to load research trends. Please try again."})}),e.jsxs("section",{style:$,children:[e.jsx("h2",{style:T,children:"Code Availability"}),e.jsx("p",{style:M,children:"The percentage of published papers that have at least one official code implementation on GitHub."}),e.jsx("div",{style:{marginTop:26},children:t.data?e.jsx(L,{id:"code",data:t.data.code_availability,color:"var(--trend-code)",yTicks:[0,20,40,60,80],yLabel:"Code Availability",xLabel:"Paper Publication Date"}):!t.error&&e.jsx(P,{style:D})})]}),e.jsxs("section",{style:$,children:[e.jsx("h2",{style:T,children:"Papers with Hugging Face artifacts"}),e.jsx("p",{style:M,children:"The percentage of published papers linked to at least one Hugging Face artifact — a model, dataset or Space — making the work directly runnable and reusable."}),e.jsx("div",{style:{marginTop:26},children:t.data?e.jsx(L,{id:"hf",data:t.data.hf_artifacts,color:"var(--trend-hf)",yTicks:[0,10,20,30,40,50],yLabel:"HF Artifact Coverage",xLabel:"Paper Publication Date"}):!t.error&&e.jsx(P,{style:D})})]}),e.jsxs("section",{style:{...$,paddingBottom:72},children:[e.jsx("h2",{style:{...T,fontSize:27},children:"How the data is collected"}),e.jsxs("div",{style:{display:"grid",gap:24,maxWidth:680},children:[e.jsxs("div",{children:[e.jsx("div",{style:C,children:"Code Availability"}),e.jsx("p",{style:N,children:"For every open-access machine learning paper, we check whether an official code implementation is linked on GitHub. The date axis is the paper's publication date."})]}),e.jsxs("div",{children:[e.jsx("div",{style:C,children:"Hugging Face artifacts"}),e.jsx("p",{style:N,children:"We resolve links between papers and the Hugging Face Hub, counting a paper as covered when it references at least one model, dataset or Space. The date axis is the paper's publication date."})]}),e.jsx("p",{style:{fontFamily:"var(--mono)",fontSize:12,lineHeight:1.6,color:"var(--ink-faint)",margin:"8px 0 0",letterSpacing:"0.02em"},children:"Figures use complete publication months. Historical Hugging Face coverage reflects artifacts currently linked in the catalog."})]})]})]})};export{te as default}; +import{V as I,j as e,ac as X,b as G}from"./index-CHGpuh10.js";import{A as J,a as V}from"./alert-DPvmCXZT.js";import{S as P}from"./skeleton-Df0GaMuw.js";const m=t=>{const r=/^(\d{4})-(0[1-9]|1[0-2])$/.exec(t);if(!r)return t;const[,s,l]=r;return`${["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"][Number(l)-1]} '${s.slice(2)}`},g=980,j=400,x=62,B=26,f=30,E=58,u=g-x-B,A=j-f-E,v=f+A,Q=t=>{if(t.length<3)return t.map((s,l)=>`${l?"L":"M"}${s[0]} ${s[1]}`).join(" ");let r=`M${t[0][0]} ${t[0][1]}`;for(let s=0;s{const[a,y]=I.useState(null),i=r.length,b=l[l.length-1],d=n=>x+u*(i===1?0:n/(i-1)),p=n=>f+A*(1-n/b);if(i===0)return null;const R=r.map((n,h)=>[d(h),p(n.percent)]),F=Q(R),_=`${F} L ${d(i-1)} ${v} L ${x} ${v} Z`,w=i<=12?1:Math.ceil(i/8),O=n=>{const h=n.currentTarget.getBoundingClientRect(),S=(n.clientX-h.left)/h.width*g,k=i>1?u/(i-1):u,q=Math.max(0,Math.min(i-1,Math.round((S-x)/k)));y(q)},H=`trend-gradient-${t}`;return e.jsxs("figure",{className:"trend-chart",children:[e.jsxs("div",{className:"trend-chart-visual",children:[e.jsxs("svg",{viewBox:`0 0 ${g} ${j}`,width:"100%",role:"img","aria-label":`${c} by ${o.toLowerCase()}, from ${m(r[0].month)} (${r[0].percent}%) to ${m(r[i-1].month)} (${r[i-1].percent}%)`,style:{display:"block",overflow:"visible",cursor:"crosshair"},onPointerMove:O,onPointerLeave:()=>y(null),children:[e.jsx("defs",{children:e.jsxs("linearGradient",{id:H,x1:"0",y1:"0",x2:"0",y2:"1",children:[e.jsx("stop",{offset:"0%",style:{stopColor:s,stopOpacity:.26}}),e.jsx("stop",{offset:"100%",style:{stopColor:s,stopOpacity:.02}})]})}),l.map(n=>e.jsxs("g",{children:[e.jsx("line",{x1:x,x2:g-B,y1:p(n),y2:p(n),stroke:"var(--hairline)",strokeWidth:1}),e.jsxs("text",{x:x-14,y:p(n)+4,textAnchor:"end",style:W,children:[n,"%"]})]},n)),e.jsx("path",{d:_,fill:`url(#${H})`}),e.jsx("path",{d:F,fill:"none",stroke:s,strokeWidth:2,strokeLinejoin:"round",strokeLinecap:"round"}),r.map((n,h)=>{const S=h===i-1,k=h%w===0&&i-1-h>=w/2;return!S&&!k?null:e.jsx("text",{x:d(h),y:v+24,textAnchor:"middle",style:W,children:m(n.month)},n.month)}),e.jsx("text",{x:x+u/2,y:j-4,textAnchor:"middle",style:z,children:o}),e.jsx("text",{transform:`translate(16 ${f+A/2}) rotate(-90)`,textAnchor:"middle",style:z,children:c}),a!=null&&e.jsxs(e.Fragment,{children:[e.jsx("line",{x1:d(a),x2:d(a),y1:f,y2:v,stroke:s,strokeWidth:1,strokeDasharray:"3 4",opacity:.5}),e.jsx("circle",{cx:d(a),cy:p(r[a].percent),r:5,fill:"var(--bg)",stroke:s,strokeWidth:2})]})]}),a!=null&&e.jsxs("div",{style:{position:"absolute",left:`${d(a)/g*100}%`,top:`${p(r[a].percent)/j*100}%`,transform:"translate(-50%, calc(-100% - 14px))",background:"var(--bg-elevated)",border:"1px solid var(--hairline)",borderRadius:6,boxShadow:"0 8px 26px rgba(0,0,0,.13)",padding:"7px 12px",pointerEvents:"none",whiteSpace:"nowrap",zIndex:3},children:[e.jsx("div",{style:{fontFamily:"var(--serif)",fontStyle:"italic",color:"var(--ink-faint)",fontSize:13,marginBottom:2},children:m(r[a].month)}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:7,fontFamily:"var(--mono)",fontWeight:600,fontSize:15,color:"var(--ink)"},children:[e.jsx("span",{style:{width:8,height:8,borderRadius:2,background:s,display:"inline-block"}}),r[a].percent,"%"]})]})]}),e.jsxs("details",{className:"trend-chart-table",children:[e.jsx("summary",{style:{fontFamily:"var(--mono)",fontSize:11,letterSpacing:"0.04em",color:"var(--ink-faint)",cursor:"pointer"},children:"View data table"}),e.jsxs("table",{style:{marginTop:8,borderCollapse:"collapse",fontFamily:"var(--mono)",fontSize:12,color:"var(--ink-soft)"},children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{style:{textAlign:"left",padding:"3px 18px 3px 0"},children:o}),e.jsx("th",{style:{textAlign:"right",padding:"3px 0"},children:c})]})}),e.jsx("tbody",{children:r.map(n=>e.jsxs("tr",{children:[e.jsx("td",{style:{padding:"2px 18px 2px 0"},children:m(n.month)}),e.jsxs("td",{style:{textAlign:"right",padding:"2px 0"},children:[n.percent,"%"]})]},n.month))})]})]})]})};class Y{constructor(r){this.request=r}trends(){return this.request("/stats/trends")}}const K=new Y(X),$={maxWidth:960,padding:"48px 0 8px",borderTop:"1px solid var(--hairline)",marginTop:48},T={fontFamily:"var(--serif)",fontSize:34,fontWeight:500,letterSpacing:"-0.02em",margin:"0 0 10px",color:"var(--ink)"},M={fontFamily:"var(--serif)",fontSize:18,lineHeight:1.55,color:"var(--ink-soft)",maxWidth:620,margin:"0 0 8px"},C={fontFamily:"var(--mono)",fontSize:12,fontWeight:600,letterSpacing:"0.14em",textTransform:"uppercase",color:"var(--ink-faint)",marginBottom:8},N={fontFamily:"var(--serif)",fontSize:17,lineHeight:1.6,color:"var(--ink-soft)",margin:0},D={height:320,marginTop:26},te=()=>{const t=G({queryKey:["research-trends"],queryFn:()=>K.trends(),staleTime:36e5});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:["Research ",e.jsx("em",{children:"Trends"})]}),e.jsx("div",{className:"feed-subtitle",children:"How open science is changing across machine learning — tracked over time from arXiv and the Hugging Face Hub."})]})}),t.error&&e.jsx(J,{variant:"destructive",children:e.jsx(V,{children:"Failed to load research trends. Please try again."})}),e.jsxs("section",{style:$,children:[e.jsx("h2",{style:T,children:"Code Availability"}),e.jsx("p",{style:M,children:"The percentage of published papers that have at least one official code implementation on GitHub."}),e.jsx("div",{style:{marginTop:26},children:t.data?e.jsx(L,{id:"code",data:t.data.code_availability,color:"var(--trend-code)",yTicks:[0,20,40,60,80],yLabel:"Code Availability",xLabel:"Paper Publication Date"}):!t.error&&e.jsx(P,{style:D})})]}),e.jsxs("section",{style:$,children:[e.jsx("h2",{style:T,children:"Papers with Hugging Face artifacts"}),e.jsx("p",{style:M,children:"The percentage of published papers linked to at least one Hugging Face artifact — a model, dataset or Space — making the work directly runnable and reusable."}),e.jsx("div",{style:{marginTop:26},children:t.data?e.jsx(L,{id:"hf",data:t.data.hf_artifacts,color:"var(--trend-hf)",yTicks:[0,10,20,30,40,50],yLabel:"HF Artifact Coverage",xLabel:"Paper Publication Date"}):!t.error&&e.jsx(P,{style:D})})]}),e.jsxs("section",{style:{...$,paddingBottom:72},children:[e.jsx("h2",{style:{...T,fontSize:27},children:"How the data is collected"}),e.jsxs("div",{style:{display:"grid",gap:24,maxWidth:680},children:[e.jsxs("div",{children:[e.jsx("div",{style:C,children:"Code Availability"}),e.jsx("p",{style:N,children:"For every open-access machine learning paper, we check whether an official code implementation is linked on GitHub. The date axis is the paper's publication date."})]}),e.jsxs("div",{children:[e.jsx("div",{style:C,children:"Hugging Face artifacts"}),e.jsx("p",{style:N,children:"We resolve links between papers and the Hugging Face Hub, counting a paper as covered when it references at least one model, dataset or Space. The date axis is the paper's publication date."})]}),e.jsx("p",{style:{fontFamily:"var(--mono)",fontSize:12,lineHeight:1.6,color:"var(--ink-faint)",margin:"8px 0 0",letterSpacing:"0.02em"},children:"Figures use complete publication months. Historical Hugging Face coverage reflects artifacts currently linked in the catalog."})]})]})]})};export{te as default}; diff --git a/assets/UserProfileView-kB3mGrtz.js b/assets/UserProfileView-xzT46sjD.js similarity index 89% rename from assets/UserProfileView-kB3mGrtz.js rename to assets/UserProfileView-xzT46sjD.js index 9b15bd8c7e584b9cea30ceff7e2dbd62fccce89f..7ac3cefc919471da8fc88f95c3d73acf6037682c 100644 --- a/assets/UserProfileView-kB3mGrtz.js +++ b/assets/UserProfileView-xzT46sjD.js @@ -1 +1 @@ -import{az as n,u as i,b as o,j as e,ao as d}from"./index-CjdUkE4w.js";import{C as l}from"./OrganizationContributionGraph-JI11b4D1.js";import"./skeleton-DTWi7Ctg.js";import"./catalog-qXcKve0z.js";const c={async get(s){const a=await n(`/profiles/${encodeURIComponent(s)}`),r=await a.json();if(!a.redirected)return r;const t=decodeURIComponent(new URL(a.url).pathname.split("/").pop()||r.username);return{...r,username:t,redirected_from_alias:!0}}},x=()=>{const{username:s=""}=i(),a=o({queryKey:["user-profile",s.toLowerCase()],queryFn:()=>c.get(s)});return a.isLoading?e.jsx("div",{className:"page",children:"Loading profile…"}):a.data?a.data.redirected_from_alias?e.jsx(d,{to:`/${a.data.username}`,replace:!0}):e.jsxs("div",{className:"page",style:{maxWidth:960},children:[e.jsxs("h1",{children:["@",a.data.username]}),e.jsx("p",{children:"Canonical Papers with Code contributions"}),e.jsx(l,{data:a.data.calendar,organizationName:`@${a.data.username}`,title:"Canonical contributions",noun:"contribution"}),a.data.is_owner&&e.jsxs("section",{className:"mt-10",children:[e.jsx("h2",{children:"Your submissions"}),e.jsxs("p",{className:"text-sm text-muted-foreground",children:["Limits and duplicate behavior are documented on ",e.jsx("a",{href:"/rate-limits",children:"the policy page"}),"."]}),e.jsx("div",{className:"mt-4 space-y-3",children:a.data.submissions.map(r=>e.jsxs("article",{className:"rounded-md border p-4",children:[e.jsx("strong",{children:r.edit_type})," · ",r.status,e.jsxs("details",{className:"mt-2 text-xs",children:[e.jsx("summary",{children:"Original and applied payload"}),e.jsx("pre",{children:JSON.stringify({proposed:r.proposed_payload,applied:r.applied_payload},null,2)})]}),r.review_reason&&e.jsx("p",{children:r.review_reason})]},r.id))})]})]}):e.jsx("div",{className:"page",children:e.jsx("h1",{children:"Profile not found"})})};export{x as default}; +import{az as n,u as i,b as o,j as e,ao as d}from"./index-CHGpuh10.js";import{C as l}from"./OrganizationContributionGraph-Dd08m_k9.js";import"./skeleton-Df0GaMuw.js";import"./catalog-DMzmJg__.js";const c={async get(s){const a=await n(`/profiles/${encodeURIComponent(s)}`),r=await a.json();if(!a.redirected)return r;const t=decodeURIComponent(new URL(a.url).pathname.split("/").pop()||r.username);return{...r,username:t,redirected_from_alias:!0}}},x=()=>{const{username:s=""}=i(),a=o({queryKey:["user-profile",s.toLowerCase()],queryFn:()=>c.get(s)});return a.isLoading?e.jsx("div",{className:"page",children:"Loading profile…"}):a.data?a.data.redirected_from_alias?e.jsx(d,{to:`/${a.data.username}`,replace:!0}):e.jsxs("div",{className:"page",style:{maxWidth:960},children:[e.jsxs("h1",{children:["@",a.data.username]}),e.jsx("p",{children:"Canonical Papers with Code contributions"}),e.jsx(l,{data:a.data.calendar,organizationName:`@${a.data.username}`,title:"Canonical contributions",noun:"contribution"}),a.data.is_owner&&e.jsxs("section",{className:"mt-10",children:[e.jsx("h2",{children:"Your submissions"}),e.jsxs("p",{className:"text-sm text-muted-foreground",children:["Limits and duplicate behavior are documented on ",e.jsx("a",{href:"/rate-limits",children:"the policy page"}),"."]}),e.jsx("div",{className:"mt-4 space-y-3",children:a.data.submissions.map(r=>e.jsxs("article",{className:"rounded-md border p-4",children:[e.jsx("strong",{children:r.edit_type})," · ",r.status,e.jsxs("details",{className:"mt-2 text-xs",children:[e.jsx("summary",{children:"Original and applied payload"}),e.jsx("pre",{children:JSON.stringify({proposed:r.proposed_payload,applied:r.applied_payload},null,2)})]}),r.review_reason&&e.jsx("p",{children:r.review_reason})]},r.id))})]})]}):e.jsx("div",{className:"page",children:e.jsx("h1",{children:"Profile not found"})})};export{x as default}; diff --git a/assets/account-DoluPGSd.js b/assets/account-D9O54ufU.js similarity index 89% rename from assets/account-DoluPGSd.js rename to assets/account-D9O54ufU.js index 49bed73301782991cc2b00d225c9f84e10bbac12..709fb95ae6d75425018510b31baec4343323b58c 100644 --- a/assets/account-DoluPGSd.js +++ b/assets/account-D9O54ufU.js @@ -1 +1 @@ -import{ac as r}from"./index-CjdUkE4w.js";class t{constructor(e){this.request=e}getPreferences(){return this.request("/me/preferences")}updatePreferences(e){return this.request("/me/preferences",{method:"PUT",body:JSON.stringify(e)})}getRateLimitPolicy(){return this.request("/rate-limits",{credentials:"omit"})}getBookmarkIds(){return this.request("/me/bookmarks/ids")}getBookmarks(){return this.request("/me/bookmarks")}addBookmark(e){return this.request(`/me/bookmarks/${e}`,{method:"POST"})}removeBookmark(e){return this.request(`/me/bookmarks/${e}`,{method:"DELETE"})}}const m=new t(r);export{m as a}; +import{ac as r}from"./index-CHGpuh10.js";class t{constructor(e){this.request=e}getPreferences(){return this.request("/me/preferences")}updatePreferences(e){return this.request("/me/preferences",{method:"PUT",body:JSON.stringify(e)})}getRateLimitPolicy(){return this.request("/rate-limits",{credentials:"omit"})}getBookmarkIds(){return this.request("/me/bookmarks/ids")}getBookmarks(){return this.request("/me/bookmarks")}addBookmark(e){return this.request(`/me/bookmarks/${e}`,{method:"POST"})}removeBookmark(e){return this.request(`/me/bookmarks/${e}`,{method:"DELETE"})}}const m=new t(r);export{m as a}; diff --git a/assets/activity--6WvmXv2.js b/assets/activity-CPcCgbtC.js similarity index 89% rename from assets/activity--6WvmXv2.js rename to assets/activity-CPcCgbtC.js index 974b2f67de84c5a5d6fe84358bac10579c2c9705..5dbdc89a4a705b088048bcaaafe94fff965bdf3f 100644 --- a/assets/activity--6WvmXv2.js +++ b/assets/activity-CPcCgbtC.js @@ -1,4 +1,4 @@ -import{s as t}from"./index-CjdUkE4w.js";/** +import{s as t}from"./index-CHGpuh10.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/alert-BM9Xfuyy.js b/assets/alert-DPvmCXZT.js similarity index 92% rename from assets/alert-BM9Xfuyy.js rename to assets/alert-DPvmCXZT.js index ab0ecc8a86920fd168aaed54720522d578ae94c4..5e3e82b05b45e625442405cf2a0fb6b2c050c27b 100644 --- a/assets/alert-BM9Xfuyy.js +++ b/assets/alert-DPvmCXZT.js @@ -1 +1 @@ -import{d as r,j as s,I as d,ae as i}from"./index-CjdUkE4w.js";const o=i("relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),n=r.forwardRef(({className:e,variant:t,...a},l)=>s.jsx("div",{ref:l,role:"alert",className:d(o({variant:t}),e),...a}));n.displayName="Alert";const v=r.forwardRef(({className:e,...t},a)=>s.jsx("h5",{ref:a,className:d("mb-1 font-medium leading-none tracking-tight",e),...t}));v.displayName="AlertTitle";const c=r.forwardRef(({className:e,...t},a)=>s.jsx("div",{ref:a,className:d("text-sm [&_p]:leading-relaxed",e),...t}));c.displayName="AlertDescription";export{n as A,c as a}; +import{d as r,j as s,I as d,ae as i}from"./index-CHGpuh10.js";const o=i("relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),n=r.forwardRef(({className:e,variant:t,...a},l)=>s.jsx("div",{ref:l,role:"alert",className:d(o({variant:t}),e),...a}));n.displayName="Alert";const v=r.forwardRef(({className:e,...t},a)=>s.jsx("h5",{ref:a,className:d("mb-1 font-medium leading-none tracking-tight",e),...t}));v.displayName="AlertTitle";const c=r.forwardRef(({className:e,...t},a)=>s.jsx("div",{ref:a,className:d("text-sm [&_p]:leading-relaxed",e),...t}));c.displayName="AlertDescription";export{n as A,c as a}; diff --git a/assets/apiErrors-CvxFAcrW.js b/assets/apiErrors-CvxFAcrW.js new file mode 100644 index 0000000000000000000000000000000000000000..efceb73bfc478061f329c0c83e3b86a1e21d46d1 --- /dev/null +++ b/assets/apiErrors-CvxFAcrW.js @@ -0,0 +1 @@ +import{A as s}from"./index-CHGpuh10.js";const i=o=>o instanceof s&&o.status===404;export{i}; diff --git a/assets/apiErrors-D0w5By9R.js b/assets/apiErrors-D0w5By9R.js deleted file mode 100644 index a96c31efb9180ba9c61f46ef0552297422c1392e..0000000000000000000000000000000000000000 --- a/assets/apiErrors-D0w5By9R.js +++ /dev/null @@ -1 +0,0 @@ -import{A as s}from"./index-CjdUkE4w.js";const i=o=>o instanceof s&&o.status===404;export{i}; diff --git a/assets/arrow-left-CkQb0MI4.js b/assets/arrow-left-C11GHdHp.js similarity index 86% rename from assets/arrow-left-CkQb0MI4.js rename to assets/arrow-left-C11GHdHp.js index 8a520070cf34c6410724d42a54ed342a8b40ff09..3bc6bd537d304dd46cbfaa13b467c6f7e097fa6b 100644 --- a/assets/arrow-left-CkQb0MI4.js +++ b/assets/arrow-left-C11GHdHp.js @@ -1,4 +1,4 @@ -import{s as e}from"./index-CjdUkE4w.js";/** +import{s as e}from"./index-CHGpuh10.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/arrow-right-BrRhWCQS.js b/assets/arrow-right-CUTKRnAt.js similarity index 86% rename from assets/arrow-right-BrRhWCQS.js rename to assets/arrow-right-CUTKRnAt.js index 0c4bfd59f88a22fe90a62ee3bdd4783e00c059ea..8fccf6a62de52bdf972c9101aeabb43bbc9ee580 100644 --- a/assets/arrow-right-BrRhWCQS.js +++ b/assets/arrow-right-CUTKRnAt.js @@ -1,4 +1,4 @@ -import{s as r}from"./index-CjdUkE4w.js";/** +import{s as r}from"./index-CHGpuh10.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/badge-C8r6F6JD.js b/assets/badge-DZeCGN5Q.js similarity index 90% rename from assets/badge-C8r6F6JD.js rename to assets/badge-DZeCGN5Q.js index f06738ae575c2ce0b48aaea87051a0705c1b5761..2bb817ef66cd67b4d63c501caa53b8ff203be8a7 100644 --- a/assets/badge-C8r6F6JD.js +++ b/assets/badge-DZeCGN5Q.js @@ -1 +1 @@ -import{j as n,I as o,ae as a}from"./index-CjdUkE4w.js";const s=a("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function d({className:r,variant:e,...t}){return n.jsx("div",{className:o(s({variant:e}),r),...t})}export{d as B}; +import{j as n,I as o,ae as a}from"./index-CHGpuh10.js";const s=a("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function d({className:r,variant:e,...t}){return n.jsx("div",{className:o(s({variant:e}),r),...t})}export{d as B}; diff --git a/assets/button-DetZl_ch.js b/assets/button-C4kqC3Av.js similarity index 89% rename from assets/button-DetZl_ch.js rename to assets/button-C4kqC3Av.js index da5bdc64ddada126024a4848ea27d54479b448b1..c92604e0431f02d82224ea770475985f8c53c514 100644 --- a/assets/button-DetZl_ch.js +++ b/assets/button-C4kqC3Av.js @@ -1 +1 @@ -import{d as a,j as d,aA as u,I as c,ae as f}from"./index-CjdUkE4w.js";const g=f("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),v=a.forwardRef(({className:e,variant:t,size:r,asChild:n=!1,...o},s)=>{const i=n?u:"button";return d.jsx(i,{className:c(g({variant:t,size:r,className:e})),ref:s,...o})});v.displayName="Button";export{v as B}; +import{d as a,j as d,aA as u,I as c,ae as f}from"./index-CHGpuh10.js";const g=f("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),v=a.forwardRef(({className:e,variant:t,size:r,asChild:n=!1,...o},s)=>{const i=n?u:"button";return d.jsx(i,{className:c(g({variant:t,size:r,className:e})),ref:s,...o})});v.displayName="Button";export{v as B}; diff --git a/assets/catalog-qXcKve0z.js b/assets/catalog-DMzmJg__.js similarity index 97% rename from assets/catalog-qXcKve0z.js rename to assets/catalog-DMzmJg__.js index 60afd34059fcb7b575f03eb303350c429008b567..200e7b7d31cdce62aedf81416b38a22d4fbf5d74 100644 --- a/assets/catalog-qXcKve0z.js +++ b/assets/catalog-DMzmJg__.js @@ -1 +1 @@ -import{ac as o}from"./index-CjdUkE4w.js";function s(a,e){const t=new URLSearchParams;for(const[i,n]of Object.entries(e??{}))n!==void 0&&n!==""&&t.set(i,String(n));const r=t.toString();return`${a}${r?`?${r}`:""}`}class u{constructor(e){this.request=e}listAreas(e){return this.request(s("/areas/",e))}getArea(e){return this.request(`/areas/${e}`)}areasWithTasks(){return this.request("/areas/with-tasks/")}listTasks(e){return this.request(s("/tasks/",e))}getTask(e){return this.request(`/tasks/${e}`)}topTasks(e){return this.request(s("/tasks/top",{limit:e}))}trendingTasks(e){return this.request(s("/tasks/trending",e))}taskChildren(e,t){return this.request(s(`/tasks/${e}/children`,t))}taskParents(e){return this.request(`/tasks/${e}/parents`)}taskPage(e,t){return this.request(s(`/tasks/${e}/page`,t))}trendingBenchmarks(e,t){return this.request(s(`/tasks/${encodeURIComponent(e)}/trending-benchmarks`,t))}frameworkCatalog(){return this.request("/frameworks/")}listMethods(e){return this.request(s("/methods/",e))}methodIndex(){return this.request("/methods/index/cards")}trendingMethods(e){return this.request(s("/methods/trending",e))}getMethod(e){return this.request(`/methods/${encodeURIComponent(e)}`)}relatedMethods(e){return this.request(`/methods/${encodeURIComponent(e)}/related`)}methodTrend(e,t){return this.request(s(`/methods/${encodeURIComponent(e)}/trend`,t))}listDatasets(e){const{task_id:t,...r}=e??{};return this.request(s("/datasets/",{...r,task:r.task??t}))}getDataset(e){return this.request(`/datasets/${e}`)}getDatasetBySlug(e,t){return this.request(s(`/datasets/${e}`,t))}async datasetTasks(e){return(await this.request(`/datasets/${e}/tasks/`)).results}async leaderboardMetrics(e,t){return(await this.request(`/datasets/${e}/tasks/${t}/metrics`)).metrics}metricDirections(){return this.request("/metrics/directions")}conferences(){return this.request("/conferences/")}conferenceDeadlines(){return this.request("/conferences/deadlines")}getConference(e){return this.request(`/conferences/${e}`)}conferenceAreasWithTasks(e){return this.request(`/conferences/${e}/areas-with-tasks`)}organizations(e=!1){return this.request(`/organizations/${e?"?featured_only=true":""}`)}searchOrganizations(e,t){return this.request(s("/organizations/",{q:e,limit:t}))}organizationIndex(){return this.request("/organizations/index/cards")}getOrganization(e){return this.request(`/organizations/${e}`)}organizationContributions(e){return this.request(`/organizations/${e}/contributions`)}organizationAreasWithTasks(e){return this.request(`/organizations/${e}/areas-with-tasks`)}audit(e){return this.request(s("/admin/catalog-audit",{cursor:e}))}acknowledgeAudit(){return this.request("/admin/catalog-audit/acknowledge",{method:"POST"})}rollbackEvent(e){return this.request(`/admin/catalog-audit/${e}/rollback`,{method:"POST"})}}const d=new u(o);export{d as c}; +import{ac as o}from"./index-CHGpuh10.js";function s(a,e){const t=new URLSearchParams;for(const[i,n]of Object.entries(e??{}))n!==void 0&&n!==""&&t.set(i,String(n));const r=t.toString();return`${a}${r?`?${r}`:""}`}class u{constructor(e){this.request=e}listAreas(e){return this.request(s("/areas/",e))}getArea(e){return this.request(`/areas/${e}`)}areasWithTasks(){return this.request("/areas/with-tasks/")}listTasks(e){return this.request(s("/tasks/",e))}getTask(e){return this.request(`/tasks/${e}`)}topTasks(e){return this.request(s("/tasks/top",{limit:e}))}trendingTasks(e){return this.request(s("/tasks/trending",e))}taskChildren(e,t){return this.request(s(`/tasks/${e}/children`,t))}taskParents(e){return this.request(`/tasks/${e}/parents`)}taskPage(e,t){return this.request(s(`/tasks/${e}/page`,t))}trendingBenchmarks(e,t){return this.request(s(`/tasks/${encodeURIComponent(e)}/trending-benchmarks`,t))}frameworkCatalog(){return this.request("/frameworks/")}listMethods(e){return this.request(s("/methods/",e))}methodIndex(){return this.request("/methods/index/cards")}trendingMethods(e){return this.request(s("/methods/trending",e))}getMethod(e){return this.request(`/methods/${encodeURIComponent(e)}`)}relatedMethods(e){return this.request(`/methods/${encodeURIComponent(e)}/related`)}methodTrend(e,t){return this.request(s(`/methods/${encodeURIComponent(e)}/trend`,t))}listDatasets(e){const{task_id:t,...r}=e??{};return this.request(s("/datasets/",{...r,task:r.task??t}))}getDataset(e){return this.request(`/datasets/${e}`)}getDatasetBySlug(e,t){return this.request(s(`/datasets/${e}`,t))}async datasetTasks(e){return(await this.request(`/datasets/${e}/tasks/`)).results}async leaderboardMetrics(e,t){return(await this.request(`/datasets/${e}/tasks/${t}/metrics`)).metrics}metricDirections(){return this.request("/metrics/directions")}conferences(){return this.request("/conferences/")}conferenceDeadlines(){return this.request("/conferences/deadlines")}getConference(e){return this.request(`/conferences/${e}`)}conferenceAreasWithTasks(e){return this.request(`/conferences/${e}/areas-with-tasks`)}organizations(e=!1){return this.request(`/organizations/${e?"?featured_only=true":""}`)}searchOrganizations(e,t){return this.request(s("/organizations/",{q:e,limit:t}))}organizationIndex(){return this.request("/organizations/index/cards")}getOrganization(e){return this.request(`/organizations/${e}`)}organizationContributions(e){return this.request(`/organizations/${e}/contributions`)}organizationAreasWithTasks(e){return this.request(`/organizations/${e}/areas-with-tasks`)}audit(e){return this.request(s("/admin/catalog-audit",{cursor:e}))}acknowledgeAudit(){return this.request("/admin/catalog-audit/acknowledge",{method:"POST"})}rollbackEvent(e){return this.request(`/admin/catalog-audit/${e}/rollback`,{method:"POST"})}}const d=new u(o);export{d as c}; diff --git a/assets/chat-B1EBF720.js b/assets/chat-CuiFt2kN.js similarity index 98% rename from assets/chat-B1EBF720.js rename to assets/chat-CuiFt2kN.js index de4c356d52e860a4d7ee89792ed4d55885e30bdf..92f8c1a8416be9c3bab7c9321536465892bb3518 100644 --- a/assets/chat-B1EBF720.js +++ b/assets/chat-CuiFt2kN.js @@ -1 +1 @@ -import{a5 as i,ac as p,ay as h,az as m}from"./index-CjdUkE4w.js";const c=encodeURIComponent,n=s=>`/chat/artifacts/${c(s)}`,a=(s,e)=>`${n(s)}/versions/${c(e)}`,u=s=>s.split("/").map(encodeURIComponent).join("/"),S={preview:(s,e)=>i(`/api/v1${a(s,e)}/preview`),file:(s,e,t,r)=>i(`/api/v1${a(s,e)}/${t}/${u(r)}`),pdfExport:s=>i(`/api/v1${n(s)}/export/pdf`),sourceZip:(s,e)=>i(`/api/v1${a(s,e)}/export/source.zip`),sharedRoot:(s,e)=>i(`/api/v1/chat/shares/${c(s)}/artifacts/${c(e)}`)};class l{constructor(e){this.request=e}listSessions(e){const t=new URLSearchParams({limit:"50"});return e&&t.set("cursor",e),this.request(`/chat/sessions?${t.toString()}`)}createSession(e,t="low"){return this.request("/chat/sessions",{method:"POST",body:JSON.stringify({selected_model:e||null,reasoning_effort:t})})}getSession(e){return this.request(`/chat/sessions/${e}`)}updateSession(e,t){return this.request(`/chat/sessions/${e}`,{method:"PATCH",body:JSON.stringify(t)})}removeSession(e){return this.request(`/chat/sessions/${e}`,{method:"DELETE"})}archiveOldChats(){return this.request("/chat/sessions/archive-old",{method:"POST"})}archiveOldestChats(){return this.request("/chat/sessions/archive-oldest",{method:"POST"})}cancelSession(e){return this.request(`/chat/sessions/${e}/cancel`,{method:"POST"})}createOrRefreshShare(e){return this.request(`/chat/sessions/${e}/share`,{method:"POST"})}getSessionPublicShare(e){return this.request(`/chat/sessions/${encodeURIComponent(e)}/public-share`,{credentials:"omit"})}getSharedChat(e){return this.request(`/chat/shares/${encodeURIComponent(e)}`,{credentials:"omit"})}getModels(){return this.request("/chat/models")}getUsage(){return this.request("/chat/usage",{cache:"no-store"})}getOpenAIUsage(){return this.request("/chat/openai-usage",{cache:"no-store"})}getAvailability(){return this.request("/chat/availability",{cache:"no-store"})}getAutocompleteVocabulary(){return this.request("/chat/autocomplete-vocabulary")}getInferenceBilling(){return this.request("/me/inference-billing",{cache:"no-store"})}selectInferenceBillingAccount(e){return this.request("/me/inference-billing",{method:"PATCH",body:JSON.stringify({bill_to:e})})}prewarmPaperContext(e){return this.request("/chat/paper-context/prewarm",{method:"POST",body:JSON.stringify({route_id:e}),credentials:"omit",cache:"no-store"})}getSandboxSpend(e){const t=e?`?environment=${encodeURIComponent(e)}`:"";return this.request(`/chat/admin/sandbox-spend${t}`,{cache:"no-store"})}getWebSearchBudget(){return this.request("/chat/admin/web-search-budget",{cache:"no-store"})}getOpenRouterCredential(){return this.request("/chat/openrouter-key",{cache:"no-store"})}connectOpenRouterCredential(e){return this.request("/chat/openrouter-key",{method:"PUT",body:JSON.stringify({api_key:e})})}setOpenRouterFallback(e){return this.request("/chat/openrouter-key",{method:"PATCH",body:JSON.stringify({enabled:e})})}disconnectOpenRouterCredential(){return this.request("/chat/openrouter-key",{method:"DELETE"})}reportLatency(e,t){return h(`/chat/latency/${encodeURIComponent(e)}`,{method:"POST",keepalive:!0,body:JSON.stringify(t)})}reportFeedback(e,t,r){return this.request(`/chat/messages/${encodeURIComponent(e)}/feedback`,{method:"POST",body:JSON.stringify({value:t,...r?{comment:r}:{}})})}getPosterVersions(e){return this.request(n(e),{cache:"no-store"}).then(t=>t.versions)}getPosterManifest(e,t){return this.request(`${a(e,t)}/manifest`,{cache:"no-store"})}getLatexPaper(e){return this.request(n(e),{cache:"no-store"})}getLatexPaperHistory(e,t){const r=new URLSearchParams({limit:"20"});return t&&r.set("cursor",t),this.request(`${n(e)}/versions?${r}`,{cache:"no-store"})}getLatexPaperManifest(e,t){return this.request(`${a(e,t)}/manifest`,{cache:"no-store"})}getArtifactSource(e,t,r){return m(`${a(e,t)}/source/${u(r)}`,{cache:"no-store"}).then(o=>o.text())}saveLatexPaper(e,t,r){return this.request(`${n(e)}/save-compile`,{method:"POST",body:JSON.stringify({expected_parent_version_id:t,files:Object.entries(r).map(([o,d])=>({path:o,content:d}))})})}restoreLatexPaperVersion(e,t,r){return this.request(`${n(e)}/versions/restore`,{method:"POST",body:JSON.stringify({source_version_id:t,expected_parent_version_id:r})})}uploadLatexPaperFigure(e,t,r){const o=new FormData;return o.set("expected_parent_version_id",t),o.set("path",`figures/${r.name}`),o.set("figure",r),this.request(`${n(e)}/figures`,{method:"POST",body:o})}refreshLatexPaperCompile(e){return this.request(`${n(e)}/refresh-compile`,{method:"POST"})}stream(e,t){return h("/chat/stream",{method:"POST",headers:{Accept:"text/event-stream"},body:JSON.stringify(e),signal:t})}resumeStream(e,t,r){return h(`/chat/sessions/${encodeURIComponent(e)}/stream`,{method:"GET",headers:{Accept:"text/event-stream",...r&&r>0?{"Last-Event-ID":String(r)}:{}},signal:t})}}const f=new l(p);export{S as a,f as c}; +import{a5 as i,ac as p,ay as h,az as m}from"./index-CHGpuh10.js";const c=encodeURIComponent,n=s=>`/chat/artifacts/${c(s)}`,a=(s,e)=>`${n(s)}/versions/${c(e)}`,u=s=>s.split("/").map(encodeURIComponent).join("/"),S={preview:(s,e)=>i(`/api/v1${a(s,e)}/preview`),file:(s,e,t,r)=>i(`/api/v1${a(s,e)}/${t}/${u(r)}`),pdfExport:s=>i(`/api/v1${n(s)}/export/pdf`),sourceZip:(s,e)=>i(`/api/v1${a(s,e)}/export/source.zip`),sharedRoot:(s,e)=>i(`/api/v1/chat/shares/${c(s)}/artifacts/${c(e)}`)};class l{constructor(e){this.request=e}listSessions(e){const t=new URLSearchParams({limit:"50"});return e&&t.set("cursor",e),this.request(`/chat/sessions?${t.toString()}`)}createSession(e,t="low"){return this.request("/chat/sessions",{method:"POST",body:JSON.stringify({selected_model:e||null,reasoning_effort:t})})}getSession(e){return this.request(`/chat/sessions/${e}`)}updateSession(e,t){return this.request(`/chat/sessions/${e}`,{method:"PATCH",body:JSON.stringify(t)})}removeSession(e){return this.request(`/chat/sessions/${e}`,{method:"DELETE"})}archiveOldChats(){return this.request("/chat/sessions/archive-old",{method:"POST"})}archiveOldestChats(){return this.request("/chat/sessions/archive-oldest",{method:"POST"})}cancelSession(e){return this.request(`/chat/sessions/${e}/cancel`,{method:"POST"})}createOrRefreshShare(e){return this.request(`/chat/sessions/${e}/share`,{method:"POST"})}getSessionPublicShare(e){return this.request(`/chat/sessions/${encodeURIComponent(e)}/public-share`,{credentials:"omit"})}getSharedChat(e){return this.request(`/chat/shares/${encodeURIComponent(e)}`,{credentials:"omit"})}getModels(){return this.request("/chat/models")}getUsage(){return this.request("/chat/usage",{cache:"no-store"})}getOpenAIUsage(){return this.request("/chat/openai-usage",{cache:"no-store"})}getAvailability(){return this.request("/chat/availability",{cache:"no-store"})}getAutocompleteVocabulary(){return this.request("/chat/autocomplete-vocabulary")}getInferenceBilling(){return this.request("/me/inference-billing",{cache:"no-store"})}selectInferenceBillingAccount(e){return this.request("/me/inference-billing",{method:"PATCH",body:JSON.stringify({bill_to:e})})}prewarmPaperContext(e){return this.request("/chat/paper-context/prewarm",{method:"POST",body:JSON.stringify({route_id:e}),credentials:"omit",cache:"no-store"})}getSandboxSpend(e){const t=e?`?environment=${encodeURIComponent(e)}`:"";return this.request(`/chat/admin/sandbox-spend${t}`,{cache:"no-store"})}getWebSearchBudget(){return this.request("/chat/admin/web-search-budget",{cache:"no-store"})}getOpenRouterCredential(){return this.request("/chat/openrouter-key",{cache:"no-store"})}connectOpenRouterCredential(e){return this.request("/chat/openrouter-key",{method:"PUT",body:JSON.stringify({api_key:e})})}setOpenRouterFallback(e){return this.request("/chat/openrouter-key",{method:"PATCH",body:JSON.stringify({enabled:e})})}disconnectOpenRouterCredential(){return this.request("/chat/openrouter-key",{method:"DELETE"})}reportLatency(e,t){return h(`/chat/latency/${encodeURIComponent(e)}`,{method:"POST",keepalive:!0,body:JSON.stringify(t)})}reportFeedback(e,t,r){return this.request(`/chat/messages/${encodeURIComponent(e)}/feedback`,{method:"POST",body:JSON.stringify({value:t,...r?{comment:r}:{}})})}getPosterVersions(e){return this.request(n(e),{cache:"no-store"}).then(t=>t.versions)}getPosterManifest(e,t){return this.request(`${a(e,t)}/manifest`,{cache:"no-store"})}getLatexPaper(e){return this.request(n(e),{cache:"no-store"})}getLatexPaperHistory(e,t){const r=new URLSearchParams({limit:"20"});return t&&r.set("cursor",t),this.request(`${n(e)}/versions?${r}`,{cache:"no-store"})}getLatexPaperManifest(e,t){return this.request(`${a(e,t)}/manifest`,{cache:"no-store"})}getArtifactSource(e,t,r){return m(`${a(e,t)}/source/${u(r)}`,{cache:"no-store"}).then(o=>o.text())}saveLatexPaper(e,t,r){return this.request(`${n(e)}/save-compile`,{method:"POST",body:JSON.stringify({expected_parent_version_id:t,files:Object.entries(r).map(([o,d])=>({path:o,content:d}))})})}restoreLatexPaperVersion(e,t,r){return this.request(`${n(e)}/versions/restore`,{method:"POST",body:JSON.stringify({source_version_id:t,expected_parent_version_id:r})})}uploadLatexPaperFigure(e,t,r){const o=new FormData;return o.set("expected_parent_version_id",t),o.set("path",`figures/${r.name}`),o.set("figure",r),this.request(`${n(e)}/figures`,{method:"POST",body:o})}refreshLatexPaperCompile(e){return this.request(`${n(e)}/refresh-compile`,{method:"POST"})}stream(e,t){return h("/chat/stream",{method:"POST",headers:{Accept:"text/event-stream"},body:JSON.stringify(e),signal:t})}resumeStream(e,t,r){return h(`/chat/sessions/${encodeURIComponent(e)}/stream`,{method:"GET",headers:{Accept:"text/event-stream",...r&&r>0?{"Last-Event-ID":String(r)}:{}},signal:t})}}const f=new l(p);export{S as a,f as c}; diff --git a/assets/chatLifecycle-B6B3Dpfi.js b/assets/chatLifecycle-Bdz7bFwH.js similarity index 99% rename from assets/chatLifecycle-B6B3Dpfi.js rename to assets/chatLifecycle-Bdz7bFwH.js index 7510fae2300328e8d002c34440f42144c9d09f6a..2dd6fcd9fcfa1edcd6269fe1cb1086007b14f558 100644 --- a/assets/chatLifecycle-B6B3Dpfi.js +++ b/assets/chatLifecycle-Bdz7bFwH.js @@ -1,4 +1,4 @@ -var wL=Object.defineProperty;var ck=n=>{throw TypeError(n)};var _L=(n,e,t)=>e in n?wL(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var ae=(n,e,t)=>_L(n,typeof e!="symbol"?e+"":e,t),J0=(n,e,t)=>e.has(n)||ck("Cannot "+t);var f=(n,e,t)=>(J0(n,e,"read from private field"),t?t.call(n):e.get(n)),M=(n,e,t)=>e.has(n)?ck("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(n):e.set(n,t),$=(n,e,t,s)=>(J0(n,e,"write to private field"),s?s.call(n,t):e.set(n,t),t),P=(n,e,t)=>(J0(n,e,"access private method"),t);var os=(n,e,t,s)=>({set _(i){$(n,e,i,t)},get _(){return f(n,e,s)}});import{s as To,d as V,j as S,V as ee,b as yo,a4 as G_,a5 as SL,L as Md,a6 as xL,X as n0,a7 as um,a8 as s0,a9 as kL,i as FC,aa as Id,A as AL,C as EL}from"./index-CjdUkE4w.js";import{u as zC,a as CL,c as $L,P as HC,i as TL,b as BC,e as K_,A as PL,o as RL,U as ML,V as IL,W as OL,X as NL,Y as LL,Z as DL,_ as qC,$ as jL}from"./chatSessions-9VEG8seW.js";/* empty css */import{H as Ip,a as Op,b as Np}from"./hover-card-CIBIV2Hx.js";import{f as FL,i as VC,p as zL,C as HL,a as BL,T as qL}from"./CatalogEntityPreviewLink-DY_jhXy9.js";import{G as i0}from"./github-4bW4WI_e.js";import{F as UC}from"./file-text-CHlxsNJC.js";import{r as VL,a as UL,P as r0,c as WL}from"./PaperPreviewLink-zGfFNaz6.js";import{M as GL,d as KL}from"./index-tLcwYp0U.js";import{r as ZL}from"./index-Dj6aE-6E.js";import{u as ad}from"./useMutation-BYtVrkc7.js";import{c as ts,a as zo}from"./chat-B1EBF720.js";import{T as XL}from"./thumbs-up-Dn_5H93T.js";import{C as YL}from"./copy-SoF5zg-g.js";import{q as o0}from"./queryOptions-C9woPjwX.js";import{A as JL}from"./arrow-left-CkQb0MI4.js";import{E as WC}from"./external-link-CTLWFJ8S.js";import{P as QL}from"./plus-AztI1566.js";import{S as eD}from"./search-DxMn7VKI.js";import{C as GC,a as KC}from"./chevron-up-BwiJ46dh.js";import{A as tD}from"./AuthorAvatar-D9249Frl.js";import{p as nD}from"./papers-DgZwjF3K.js";/** +var wL=Object.defineProperty;var ck=n=>{throw TypeError(n)};var _L=(n,e,t)=>e in n?wL(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var ae=(n,e,t)=>_L(n,typeof e!="symbol"?e+"":e,t),J0=(n,e,t)=>e.has(n)||ck("Cannot "+t);var f=(n,e,t)=>(J0(n,e,"read from private field"),t?t.call(n):e.get(n)),M=(n,e,t)=>e.has(n)?ck("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(n):e.set(n,t),$=(n,e,t,s)=>(J0(n,e,"write to private field"),s?s.call(n,t):e.set(n,t),t),P=(n,e,t)=>(J0(n,e,"access private method"),t);var os=(n,e,t,s)=>({set _(i){$(n,e,i,t)},get _(){return f(n,e,s)}});import{s as To,d as V,j as S,V as ee,b as yo,a4 as G_,a5 as SL,L as Md,a6 as xL,X as n0,a7 as um,a8 as s0,a9 as kL,i as FC,aa as Id,A as AL,C as EL}from"./index-CHGpuh10.js";import{u as zC,a as CL,c as $L,P as HC,i as TL,b as BC,e as K_,A as PL,o as RL,U as ML,V as IL,W as OL,X as NL,Y as LL,Z as DL,_ as qC,$ as jL}from"./chatSessions-BuiIkSLS.js";/* empty css */import{H as Ip,a as Op,b as Np}from"./hover-card-Dz7z6DCn.js";import{f as FL,i as VC,p as zL,C as HL,a as BL,T as qL}from"./CatalogEntityPreviewLink-C5CxvSnT.js";import{G as i0}from"./github-CRId1LT2.js";import{F as UC}from"./file-text-DPLtNP9U.js";import{r as VL,a as UL,P as r0,c as WL}from"./PaperPreviewLink-CPkn2Kqv.js";import{M as GL,d as KL}from"./index-B141zdPU.js";import{r as ZL}from"./index-BzjqtLRb.js";import{u as ad}from"./useMutation-3fOqWcpt.js";import{c as ts,a as zo}from"./chat-CuiFt2kN.js";import{T as XL}from"./thumbs-up-BGuynS0P.js";import{C as YL}from"./copy-CvlL053K.js";import{q as o0}from"./queryOptions-C9woPjwX.js";import{A as JL}from"./arrow-left-C11GHdHp.js";import{E as WC}from"./external-link-CeQVHd7V.js";import{P as QL}from"./plus-CYgr1KdS.js";import{S as eD}from"./search-Czb1C2Q7.js";import{C as GC,a as KC}from"./chevron-up-BnyqTe42.js";import{A as tD}from"./AuthorAvatar-fJxhX3fO.js";import{p as nD}from"./papers-BPpxs2sO.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/chatSessions-9VEG8seW.js b/assets/chatSessions-BuiIkSLS.js similarity index 99% rename from assets/chatSessions-9VEG8seW.js rename to assets/chatSessions-BuiIkSLS.js index bd1738d383c43ba8ac97871e34b0fd8075955a68..b974ee3ff7916ac38c1166a426232021a7cb6db6 100644 --- a/assets/chatSessions-9VEG8seW.js +++ b/assets/chatSessions-BuiIkSLS.js @@ -1,4 +1,4 @@ -import{j as p,V as f,b as oe,A as Ce,ab as xe}from"./index-CjdUkE4w.js";import{c as k}from"./chat-B1EBF720.js";import{p as Re}from"./papers-DgZwjF3K.js";const et=({light:e})=>p.jsx("span",{className:`chat-spinner${e?" chat-spinner-light":""}`}),tt=({open:e})=>p.jsx("svg",{className:`chat-chev${e?" chat-chev-open":""}`,width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:p.jsx("path",{d:"m6 9 6 6 6-6"})}),rt=()=>p.jsxs("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[p.jsx("circle",{cx:"12",cy:"12",r:"9"}),p.jsx("path",{d:"m9 12 2 2 4-4"})]}),nt=({size:e=14})=>p.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[p.jsx("circle",{cx:"11",cy:"11",r:"7"}),p.jsx("path",{d:"m21 21-4.3-4.3"})]}),ot=()=>p.jsx("svg",{width:"17",height:"17",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.2",children:p.jsx("path",{d:"M12 19V5M5 12l7-7 7 7"})}),at=()=>p.jsx("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:p.jsx("path",{d:"M12 5v14M5 12h14"})}),st=()=>p.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",children:[p.jsx("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"}),p.jsx("path",{d:"M9 4v16"})]}),it=()=>p.jsx("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:p.jsx("path",{d:"M3 6h18M8 6V4a1 1 0 0 1 1-1h6a1 1 0 0 1 1 1v2M6 6l1 14a2 2 0 0 0 2 2h6a2 2 0 0 0 2-2l1-14"})}),ct=({text:e,mentions:t,scrollTop:r=0,variant:n="composer",completion:o=""})=>{const s=[];let i=0;for(const a of[...t].sort((u,d)=>u.start-d.start)){const u=e.slice(a.start,a.end),d=u===a.title||u===`@${a.title}`;a.starte.length||!d||(s.push(e.slice(i,a.start)),s.push(p.jsx("span",{className:`chat-paper-inline-highlight${a.unavailable?" is-unavailable":""}`,"data-paper-route-id":a.route_id,children:u},a.key)),i=a.end)}return s.push(e.slice(i)),o&&s.push(p.jsx("span",{className:"chat-prompt-completion",children:o},"completion")),e.endsWith(` +import{j as p,V as f,b as oe,A as Ce,ab as xe}from"./index-CHGpuh10.js";import{c as k}from"./chat-CuiFt2kN.js";import{p as Re}from"./papers-BPpxs2sO.js";const et=({light:e})=>p.jsx("span",{className:`chat-spinner${e?" chat-spinner-light":""}`}),tt=({open:e})=>p.jsx("svg",{className:`chat-chev${e?" chat-chev-open":""}`,width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:p.jsx("path",{d:"m6 9 6 6 6-6"})}),rt=()=>p.jsxs("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[p.jsx("circle",{cx:"12",cy:"12",r:"9"}),p.jsx("path",{d:"m9 12 2 2 4-4"})]}),nt=({size:e=14})=>p.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[p.jsx("circle",{cx:"11",cy:"11",r:"7"}),p.jsx("path",{d:"m21 21-4.3-4.3"})]}),ot=()=>p.jsx("svg",{width:"17",height:"17",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.2",children:p.jsx("path",{d:"M12 19V5M5 12l7-7 7 7"})}),at=()=>p.jsx("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:p.jsx("path",{d:"M12 5v14M5 12h14"})}),st=()=>p.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",children:[p.jsx("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"}),p.jsx("path",{d:"M9 4v16"})]}),it=()=>p.jsx("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:p.jsx("path",{d:"M3 6h18M8 6V4a1 1 0 0 1 1-1h6a1 1 0 0 1 1 1v2M6 6l1 14a2 2 0 0 0 2 2h6a2 2 0 0 0 2-2l1-14"})}),ct=({text:e,mentions:t,scrollTop:r=0,variant:n="composer",completion:o=""})=>{const s=[];let i=0;for(const a of[...t].sort((u,d)=>u.start-d.start)){const u=e.slice(a.start,a.end),d=u===a.title||u===`@${a.title}`;a.starte.length||!d||(s.push(e.slice(i,a.start)),s.push(p.jsx("span",{className:`chat-paper-inline-highlight${a.unavailable?" is-unavailable":""}`,"data-paper-route-id":a.route_id,children:u},a.key)),i=a.end)}return s.push(e.slice(i)),o&&s.push(p.jsx("span",{className:"chat-prompt-completion",children:o},"completion")),e.endsWith(` `)&&s.push("​"),p.jsx("div",{"aria-hidden":"true",className:`chat-paper-highlight-layer chat-paper-highlight-layer-${n}`,children:p.jsx("div",{style:{transform:`translateY(-${r}px)`},children:s})})},lt=({open:e,query:t,results:r,activeIndex:n,loading:o,error:s,onSelect:i,id:a="chat-paper-picker",optionIdPrefix:u="chat-paper-option"})=>{if(!e)return null;const d=t.trim()?o?"Searching papers…":s?"Paper search is unavailable":r.length?`${r.length} paper${r.length===1?"":"s"} found`:"No papers found":"Type to search papers";return p.jsxs("div",{className:"chat-paper-picker",id:a,role:"listbox","aria-label":"Paper results",children:[p.jsx("div",{className:"chat-paper-picker-status",role:"status","aria-live":"polite",children:d}),r.map((h,l)=>{const O=h.arxiv_id||h.id,L=h.arxiv_id||(()=>{try{return h.source_url?new URL(h.source_url).hostname:"External resource"}catch{return"External resource"}})();return p.jsxs("button",{type:"button",id:`${u}-${l}`,role:"option","aria-selected":l===n,className:`chat-paper-option${l===n?" is-active":""}`,onMouseDown:Y=>{Y.preventDefault(),i(h)},children:[p.jsx("span",{className:"chat-paper-option-title",children:h.title}),p.jsx("span",{className:"chat-paper-option-meta",children:L})]},O)})]})},ke=["What are decision models?","Find relevant papers on RLVR","What's the state-of-the-art for real-time object detection?"],ut=["Summarize the main contributions","Explain in simple terms","Identify the main limitations"],Ae=[...ke,"What are the latest papers on ","Which benchmarks are used for ","Which methods work best for ","How does ","Explain how ","Compare ","Summarize the key contributions of "],De=3,Ie=4,Le=new Set(["about","all","and","are","best","can","compare","does","explain","find","for","from","give","how","into","latest","list","method","methods","model","models","new","paper","papers","recent","show","state","summarize","task","tasks","the","this","use","what","when","where","which","who","why","with","work"]),Me=new RegExp(`(?:^|(?<=[\\s("'“‘]))(?=\\S)`,"g"),Pe=e=>{const t=e.toLowerCase(),r=Ae.find(n=>n.length>e.length&&n.toLowerCase().startsWith(t));return r?r.slice(e.length):""},Ne=(e,t)=>{const r=[...e.matchAll(Me)].map(n=>n.index??0);for(const n of r.slice(-4)){const o=e.slice(n),s=o.toLowerCase(),i=/\s/.test(o);if(o.length<(i?De:Ie)||!i&&Le.has(s))continue;const a=t.find(u=>u.length>o.length&&u.toLowerCase().startsWith(s));if(a)return a.slice(o.length)}return""},Ye=(e,t)=>!e.trim()||/\s$/.test(e)?"":Pe(e)||Ne(e,t);function dt(e,t=!1){var h;const r=e.text,[n,o]=f.useState(null),s=oe({queryKey:["chatAutocompleteVocabulary"],queryFn:()=>k.getAutocompleteVocabulary(),enabled:r.length>0,staleTime:1/0,gcTime:1/0,retry:!1}),i=(n==null?void 0:n.text)===r?n.atEnd:!0,a=e.paperMentions.some(l=>l.end===r.length);return{completion:!t&&i&&!a?Ye(r,((h=s.data)==null?void 0:h.names)??[]):"",trackCaret:l=>o({text:l.value,atEnd:l.selectionStart===l.selectionEnd&&l.selectionEnd===l.value.length})}}const pt=e=>e.key==="Tab"&&!e.shiftKey&&!e.altKey&&!e.ctrlKey&&!e.metaKey&&!e.nativeEvent.isComposing,ht=e=>{var r;const t=(r=e.parentElement)==null?void 0:r.querySelector(".chat-paper-highlight-layer");return Math.max(e.scrollHeight,(t==null?void 0:t.scrollHeight)??0)},ae=8e3,se=16384,ie=1e4,C={crossPage:"Select text within one PDF page.",outside:"Select text from the paper, not the surrounding interface.",tooLarge:"Select a shorter passage (maximum 8,000 characters)."};function ce(e){return new TextEncoder().encode(e).length}function le(e){return e.replace(/\r\n/g,` `).replace(/\r/g,` `).replace(/\u00a0/g," ").replace(/[^\S\n]+/g," ").trim()}function ft(e){return`${e.routeId}\0${e.paperVersion}\0${e.page}\0${e.text}`}function mt(e){return{route_id:e.routeId,paper_version:e.paperVersion,page:e.page,text:e.text}}function N(e="",t){return t?{text:e,paperMentions:[],paperSelection:t}:{text:e,paperMentions:[]}}function K(e,t,r){return e.paperSelection?{text:t,paperMentions:r,paperSelection:e.paperSelection}:{text:t,paperMentions:r}}function Fe(e){if(!e||typeof e!="object")return;const t=e;if(typeof t.routeId!="string"||!t.routeId.trim()||typeof t.paperVersion!="string"||!t.paperVersion.trim())return;const r=t.page;if(typeof r!="number"||!Number.isInteger(r)||r<1||r>ie||typeof t.text!="string")return;const n=le(t.text);if(n&&!(n.length>ae)&&!(ce(n)>se))return{routeId:t.routeId.trim(),paperVersion:t.paperVersion.trim(),page:r,text:n}}function je(e,t){if(typeof e=="string")return N(e);if(!e||typeof e!="object")return t===void 0?null:N(t);const r=e;if(typeof r.text!="string"||!Array.isArray(r.paperMentions))return t===void 0?null:N(t);const n=Fe(r.paperSelection);return n?{text:r.text,paperMentions:r.paperMentions,paperSelection:n}:{text:r.text,paperMentions:r.paperMentions}}function ue(e){return e?e instanceof Element?e:e.parentElement:null}function G(e,t){const r=ue(e);if(!r||!t.contains(r)||!r.closest(".textLayer, .reader-web-document"))return null;const n=r.closest(".pdf-page[data-page], .reader-web-document[data-page]");if(!n||!t.contains(n))return null;const o=Number(n.dataset.page);return!Number.isInteger(o)||o<1||o>ie?null:o}function gt(e){const{selection:t,pagesRoot:r,routeId:n,paperVersion:o,numPages:s}=e;if(!r||!t||t.rangeCount!==1)return t&&t.rangeCount>1?{ok:!1,error:C.crossPage}:{ok:!1,error:null};const i=t.getRangeAt(0);if(i.collapsed)return{ok:!1,error:null};const a=G(i.startContainer,r),u=G(i.endContainer,r),d=ue(i.commonAncestorContainer);if(!d||!r.contains(d))return{ok:!1,error:C.outside};if(a===null||u===null)return{ok:!1,error:C.outside};if(a!==u)return{ok:!1,error:C.crossPage};if(s&&(a<1||a>s))return{ok:!1,error:C.crossPage};const h=t.toString(),l=le(h);return l?l.length>ae||ce(l)>se?{ok:!1,error:C.tooLarge}:{ok:!0,selection:{routeId:n,paperVersion:o,page:a,text:l}}:{ok:!1,error:C.crossPage}}const qe=10,We=3;function z(e,t){const n=e.slice(0,t).lastIndexOf("@");if(n<0)return null;const o=n>0?e[n-1]:"";if(o&&/[\p{L}\p{M}\p{N}_@]/u.test(o))return null;const s=e.slice(n+1,t);return/[\n\r@]/.test(s)?null:{start:n,end:t,query:s}}function X(e,t,r){let n=0;for(;na.end<=n?[a]:a.start>=s?[{...a,start:a.start+i,end:a.end+i}]:[])}function yt({draft:e,onChange:t,enabled:r,textareaRef:n}){var V;const o=`chat-paper-picker-${f.useId().replace(/:/g,"")}`,s=`${o}-option`,[i,a]=f.useState(null),[u,d]=f.useState(""),[h,l]=f.useState(0),[O,L]=f.useState(""),Y=f.useRef(new Set);f.useEffect(()=>{r||a(null)},[r]),f.useEffect(()=>{const c=window.setTimeout(()=>d((i==null?void 0:i.query.trim())??""),150);return()=>window.clearTimeout(c)},[i==null?void 0:i.query]);const D=oe({queryKey:["chat-paper-mention-search",u.toLowerCase()],queryFn:({signal:c})=>Re.search(u,1,10,"hybrid",c),enabled:r&&!!i&&u.length>=1,staleTime:3e4,refetchOnWindowFocus:!1,retry:!1}),y=f.useMemo(()=>{var c;return((c=D.data)==null?void 0:c.results)??[]},[(V=D.data)==null?void 0:V.results]);f.useEffect(()=>l(0),[u]),f.useEffect(()=>{var c;(c=document.getElementById(`${s}-${h}`))==null||c.scrollIntoView({block:"nearest"})},[h,s]);const be=f.useCallback(c=>{var v;if(!r){a(null);return}const m=c??((v=n.current)==null?void 0:v.selectionStart)??e.text.length;if(e.paperMentions.some(T=>m>T.start&&m<=T.end)){a(null);return}a(z(e.text,m))},[e.paperMentions,e.text,r,n]),Oe=f.useCallback((c,m)=>{var M;const v=X(e.text,c,e.paperMentions),T=K(e,c,v);t(T);const E=m??((M=n.current)==null?void 0:M.selectionStart)??c.length;r&&!v.some(P=>E>P.start&&E<=P.end)?a(z(c,E)):a(null)},[e,r,t,n]),W=f.useCallback(c=>{if(!i)return!1;const m=c.arxiv_id||c.id,v=new Set(e.paperMentions.map(I=>I.route_id));if(e.paperMentions.length>=qe)return L("A message can contain at most 10 paper mentions."),!1;if(!v.has(m)&&v.size>=We)return L("A message can attach at most 3 distinct papers."),!1;const T=c.title,E=e.text.slice(i.end),M=E.length===0,P=e.text.slice(0,i.start)+T+(M?" ":"")+E,Ee=X(e.text,P,e.paperMentions),$={key:crypto.randomUUID(),route_id:m,title:c.title,source:c.source==="external"?"external":"arxiv",start:i.start,end:i.start+T.length};return t(K(e,P,[...Ee,$].sort((I,F)=>I.start-F.start))),a(null),L(""),window.requestAnimationFrame(()=>{var F,B;const I=$.end+(M||E.startsWith(" ")?1:0);(F=n.current)==null||F.focus(),(B=n.current)==null||B.setSelectionRange(I,I)}),Y.current.has(m)||(Y.current.add(m),k.prewarmPaperContext(m).catch(()=>{})),!0},[i,e,t,n]),Te=f.useCallback(c=>!i||c.nativeEvent.isComposing?!1:c.key==="Tab"?(a(null),!1):c.key==="Escape"?(c.preventDefault(),a(null),!0):c.key==="ArrowDown"||c.key==="ArrowUp"?(c.preventDefault(),y.length&&l(m=>c.key==="ArrowDown"?(m+1)%y.length:(m-1+y.length)%y.length),!0):c.key==="Home"&&y.length?(c.preventDefault(),l(0),!0):c.key==="End"&&y.length?(c.preventDefault(),l(y.length-1),!0):c.key==="Enter"&&!c.shiftKey?(c.preventDefault(),y[h]?W(y[h]):D.isFetching||a(null),!0):!1,[i,h,y,D.isFetching,W]);return{open:!!i,query:(i==null?void 0:i.query)??"",results:y,activeIndex:h,loading:D.isFetching,error:D.isError,message:O,pickerId:o,optionIdPrefix:s,updateText:Oe,refresh:be,select:W,keyDown:Te,close:()=>a(null)}}const g=(e,t)=>new Promise(r=>{const n=setTimeout(o,e);function o(){t==null||t.removeEventListener("abort",o),clearTimeout(n),r()}t==null||t.addEventListener("abort",o)}),S=e=>({arxiv_id:null,source:"arxiv",source_url:null,thumbnail_url:null,authors:[],published:null,conference:null,citation_count:null,tasks:[],methods:[],repositories:[],project_pages:[],...e}),w={name:"Object Detection",slug:"object-detection"},x={name:"Real-Time Object Detection",slug:"real-time-object-detection"},He={"2502.12524":{route_id:"2502.12524",title:"YOLOv12: Attention-Centric Real-Time Object Detectors",content:"Enhancing the network architecture of the YOLO framework has been crucial for a long time. This work introduces an attention-centric YOLO framework, namely YOLOv12, built around area attention and residual efficient layer aggregation networks (R-ELAN). YOLOv12-N reaches 40.6 mAP at 1.64 ms on a T4 GPU, closing the gap to attention-based detectors without the usual latency penalty and surpassing YOLOv10/YOLOv11 by +1.2–1.6 mAP at matched latency.",content_truncated:!1,metadata:S({arxiv_id:"2502.12524",authors:[{name:"Y. Tian"},{name:"Q. Ye"},{name:"D. Doermann"}],published:"2025-02-18",citation_count:412,tasks:[w,x],methods:[{name:"Area Attention",slug:"area-attention"}],repositories:[{url:"https://github.com/sunsmarterjie/yolov12",stars:18700}]})},"2407.17140":{route_id:"2407.17140",title:"RT-DETRv2: Improved Baseline with Bag-of-Freebies for Real-Time Detection",content:"RT-DETRv2 improves the real-time DETR baseline with selective multi-scale feature extraction, a discrete sampling operator to ease deployment, and training-only 'bag-of-freebies' that add no inference cost. RT-DETRv2-R18/R50/R101 reach 47.9 / 53.4 / 54.3 mAP on COCO at 217 / 108 / 74 FPS on T4 TensorRT FP16, remaining NMS-free end to end.",content_truncated:!1,metadata:S({arxiv_id:"2407.17140",authors:[{name:"W. Lv"},{name:"Y. Zhao"},{name:"J. Chang"}],published:"2024-07-24",citation_count:268,tasks:[w,x],methods:[{name:"DETR",slug:"detr"}],repositories:[{url:"https://github.com/lyuwenyu/RT-DETR",stars:9400}]})},"2410.13842":{route_id:"2410.13842",title:"D-FINE: Redefining Regression as Fine-grained Distribution Refinement",content:"D-FINE reformulates bounding-box regression in DETR-style detectors as iterative refinement of probability distributions (FDR) and adds a localization self-distillation scheme (GO-LSD). D-FINE-L reaches 54.0 mAP at ~9 ms and D-FINE-X 55.8 mAP on COCO while staying real-time on modern GPUs, dominating RT-DETRv2 and YOLOv10 on the accuracy–latency Pareto front.",content_truncated:!1,metadata:S({arxiv_id:"2410.13842",authors:[{name:"Y. Peng"},{name:"H. Li"},{name:"P. Wu"}],published:"2024-10-17",conference:"ICLR 2025",citation_count:187,tasks:[w,x],methods:[{name:"Knowledge Distillation",slug:"knowledge-distillation"}],repositories:[{url:"https://github.com/Peterande/D-FINE",stars:12100}]})},"2406.03459":{route_id:"2406.03459",title:"LW-DETR: A Transformer Replacement to YOLO for Real-Time Detection",content:"LW-DETR pairs a plain ViT encoder with a lightweight DETR decoder and shows the combination outperforms YOLOv8 and YOLO-NAS at comparable latency, arguing transformer detectors are viable even at the fast end of the accuracy–latency curve. Uses multi-level feature aggregation, window-attention interleaving, and IoU-aware classification.",content_truncated:!1,metadata:S({arxiv_id:"2406.03459",authors:[{name:"Q. Chen"},{name:"X. Su"},{name:"X. Zhang"}],published:"2024-06-05",citation_count:94,tasks:[w,x],methods:[{name:"Vision Transformer",slug:"vision-transformer"}],repositories:[{url:"https://github.com/Atten4Vis/LW-DETR",stars:5200}]})},"2304.08069":{route_id:"2304.08069",title:"DETRs Beat YOLOs on Real-time Object Detection",content:"RT-DETR is the first real-time end-to-end object detector, built on an efficient hybrid encoder that decouples intra-scale interaction and cross-scale fusion, plus IoU-aware query selection. RT-DETR-R50 achieves 53.1 mAP at 108 FPS on COCO, beating comparably sized YOLO detectors in both speed and accuracy while eliminating NMS entirely; its Figure 1 accuracy–latency plot became the reference for later real-time detectors.",content_truncated:!1,metadata:S({arxiv_id:"2304.08069",authors:[{name:"Y. Zhao"},{name:"W. Lv"},{name:"S. Xu"}],published:"2023-04-17",conference:"CVPR 2024",citation_count:2310,tasks:[w,x],methods:[{name:"DETR",slug:"detr"}],repositories:[{url:"https://github.com/lyuwenyu/RT-DETR",stars:9400}]})},"2405.14458":{route_id:"2405.14458",title:"YOLOv10: Real-Time End-to-End Object Detection",content:"YOLOv10 removes NMS from the YOLO pipeline via consistent dual assignments during training and applies a holistic efficiency–accuracy driven design across the architecture. YOLOv10-S is 1.8x faster than RT-DETR-R18 at similar COCO accuracy; the family spans 46.3–54.4 mAP with substantially lower end-to-end latency than prior YOLOs because post-processing disappears.",content_truncated:!1,metadata:S({arxiv_id:"2405.14458",authors:[{name:"A. Wang"},{name:"H. Chen"},{name:"L. Liu"}],published:"2024-05-23",conference:"NeurIPS 2024",citation_count:1650,tasks:[w,x],methods:[{name:"NMS-free Training",slug:"nms-free-training"}],repositories:[{url:"https://github.com/THU-MIG/yolov10",stars:44200}]})},"2401.17270":{route_id:"2401.17270",title:"YOLO-World: Real-Time Open-Vocabulary Object Detection",content:"YOLO-World extends the YOLO paradigm to open-vocabulary detection through vision-language modeling with a re-parameterizable vision-language path aggregation network (RepVL-PAN) and region-text contrastive pretraining. It detects categories never seen at training time while running at 35+ FPS, and its prompt-then-detect deployment re-parameterizes text embeddings for zero runtime text-encoder cost.",content_truncated:!1,metadata:S({arxiv_id:"2401.17270",authors:[{name:"T. Cheng"},{name:"L. Song"},{name:"Y. Ge"}],published:"2024-01-30",conference:"CVPR 2024",citation_count:890,tasks:[{name:"Open-Vocabulary Object Detection",slug:"open-vocabulary-object-detection"},w],methods:[{name:"Contrastive Learning",slug:"contrastive-learning"}],repositories:[{url:"https://github.com/AILab-CVC/YOLO-World",stars:16800}]})},158342:{route_id:"158342",title:"Ultralytics YOLO: real-time detection framework and model zoo",content:"Official Ultralytics framework release covering YOLO11 and YOLOv12 deployment: pretrained COCO checkpoints from nano to x-large, TensorRT/ONNX/CoreML export paths, and reproducible latency benchmarks on T4, Jetson Orin, and CPU targets. Widely used as the practical baseline for real-time detection deployments.",content_truncated:!1,metadata:S({source:"external",source_url:"https://docs.ultralytics.com/models/",authors:[{name:"Ultralytics"}],published:"2025-01-02",tasks:[w,x],repositories:[{url:"https://github.com/ultralytics/ultralytics",stars:46e3}],project_pages:[{url:"https://docs.ultralytics.com"}]})}},de=e=>e.map(t=>He[t]),J=de(["2502.12524","2407.17140","2410.13842","2406.03459","2304.08069","2405.14458","2401.17270","158342"]),Q=de(["2410.13842","2502.12524","2407.17140","2405.14458","2304.08069"]),Z="The user wants the current state-of-the-art for real-time object detection. That's a moving target split across two lineages — the YOLO family (fast CNN one-stage detectors) and the DETR family (transformer, end-to-end, NMS-free). I should ground the answer in recent papers benchmarked on COCO with reported latency or FPS, not just accuracy. Let me start with a broad hybrid search, see which papers surface, then run a second, narrower query to pin down the head-to-head COCO mAP vs latency trade-offs before I write anything.",ee="Good — both lineages are well represented. YOLOv12, YOLOv10 and RT-DETRv2 / D-FINE keep coming up. To actually rank them I need the accuracy-vs-latency numbers side by side on the same COCO val2017 protocol, so let me narrow the query to the benchmark comparison specifically.",te=`There isn't a single winner — real-time object detection in 2026 is a two-horse race between the [YOLO family](paper:2502.12524) (fast one-stage CNNs) and the end-to-end [DETR family](paper:2304.08069) (NMS-free transformers). Which one is “SOTA” depends entirely on where you sit on the accuracy-vs-latency curve. diff --git a/assets/chevron-up-BwiJ46dh.js b/assets/chevron-up-BnyqTe42.js similarity index 91% rename from assets/chevron-up-BwiJ46dh.js rename to assets/chevron-up-BnyqTe42.js index b3fe2370adacc6088a7dc10649921367d63c7c7b..bd4ff8d33cc0f34782ba7af887abea0145ad64b9 100644 --- a/assets/chevron-up-BwiJ46dh.js +++ b/assets/chevron-up-BnyqTe42.js @@ -1,4 +1,4 @@ -import{s as o}from"./index-CjdUkE4w.js";/** +import{s as o}from"./index-CHGpuh10.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/circle-check-B2vTBhyc.js b/assets/circle-check-B_15foPp.js similarity index 87% rename from assets/circle-check-B2vTBhyc.js rename to assets/circle-check-B_15foPp.js index 041d5d27203ee362883c3bbedb75e0cef8e8eef1..adafcd92ca690640a4e6a97d4c13ae69a255ca23 100644 --- a/assets/circle-check-B2vTBhyc.js +++ b/assets/circle-check-B_15foPp.js @@ -1,4 +1,4 @@ -import{s as c}from"./index-CjdUkE4w.js";/** +import{s as c}from"./index-CHGpuh10.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/codex-CgFzL2AI.js b/assets/codex-WU2WBMcn.js similarity index 95% rename from assets/codex-CgFzL2AI.js rename to assets/codex-WU2WBMcn.js index 1009f02891744ae2f7fd6176ead0ea299990b780..7d400278db0cec88ec704fc6856c47aa1d1ad0f2 100644 --- a/assets/codex-CgFzL2AI.js +++ b/assets/codex-WU2WBMcn.js @@ -1 +1 @@ -import{ac as i,a5 as c}from"./index-CjdUkE4w.js";const u="No paper text was available yet. This job starts again automatically within an hour of the paper's Markdown being extracted.",r="/admin/codex-curation/jobs";class n{constructor(e){this.request=e}startPaperJob(e,t){return this.request(`/admin/codex-${e}/jobs`,{method:"POST",body:JSON.stringify({paper_id:t})})}getPaperJob(e,t){return this.request(`/admin/codex-${e}/jobs/${t}`)}cancelPaperJob(e,t){return this.request(`/admin/codex-${e}/jobs/${t}`,{method:"DELETE"})}listJobs(e=100,t={}){const a=new URLSearchParams({limit:String(e)});return Object.entries(t).forEach(([o,s])=>{s&&a.set(o,s)}),this.request(`${r}?${a}`,{cache:"no-store"})}retryJob(e){return this.request(`${r}/${e}/retry`,{method:"POST"})}cancelJob(e){return this.request(`${r}/${e}`,{method:"DELETE"})}async retryTrace(e){await this.request(`${r}/${e}/retry-trace`,{method:"POST"})}async setScheduler(e){await this.request(`${r}/scheduler/${e}`,{method:"POST"})}async promoteBenchmarkCandidate(e,t){await this.request(`${r}/benchmark-candidates/${e}/promote`,{method:"POST",body:JSON.stringify(t)})}async rollbackBenchmarkCandidate(e){await this.request(`${r}/benchmark-candidates/${e}/rollback`,{method:"POST"})}traceUrl(e){return c(`/api/v1${r}/${e}/trace`)}}const m=new n(i);export{u as A,m as c}; +import{ac as i,a5 as c}from"./index-CHGpuh10.js";const u="No paper text was available yet. This job starts again automatically within an hour of the paper's Markdown being extracted.",r="/admin/codex-curation/jobs";class n{constructor(e){this.request=e}startPaperJob(e,t){return this.request(`/admin/codex-${e}/jobs`,{method:"POST",body:JSON.stringify({paper_id:t})})}getPaperJob(e,t){return this.request(`/admin/codex-${e}/jobs/${t}`)}cancelPaperJob(e,t){return this.request(`/admin/codex-${e}/jobs/${t}`,{method:"DELETE"})}listJobs(e=100,t={}){const a=new URLSearchParams({limit:String(e)});return Object.entries(t).forEach(([o,s])=>{s&&a.set(o,s)}),this.request(`${r}?${a}`,{cache:"no-store"})}retryJob(e){return this.request(`${r}/${e}/retry`,{method:"POST"})}cancelJob(e){return this.request(`${r}/${e}`,{method:"DELETE"})}async retryTrace(e){await this.request(`${r}/${e}/retry-trace`,{method:"POST"})}async setScheduler(e){await this.request(`${r}/scheduler/${e}`,{method:"POST"})}async promoteBenchmarkCandidate(e,t){await this.request(`${r}/benchmark-candidates/${e}/promote`,{method:"POST",body:JSON.stringify(t)})}async rollbackBenchmarkCandidate(e){await this.request(`${r}/benchmark-candidates/${e}/rollback`,{method:"POST"})}traceUrl(e){return c(`/api/v1${r}/${e}/trace`)}}const m=new n(i);export{u as A,m as c}; diff --git a/assets/copy-SoF5zg-g.js b/assets/copy-CvlL053K.js similarity index 89% rename from assets/copy-SoF5zg-g.js rename to assets/copy-CvlL053K.js index 385f536a040d8c4c228a9e5a002b13afdfc50a72..ea14ff320d7370c8e04bd89ab68e857f7eb501a5 100644 --- a/assets/copy-SoF5zg-g.js +++ b/assets/copy-CvlL053K.js @@ -1,4 +1,4 @@ -import{s as e}from"./index-CjdUkE4w.js";/** +import{s as e}from"./index-CHGpuh10.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/curation-CyyuHfv5.js b/assets/curation-DI9_zYNx.js similarity index 98% rename from assets/curation-CyyuHfv5.js rename to assets/curation-DI9_zYNx.js index 7e8aa5c6aa19c30c947d1a29527fda619bba450e..78d69c8538a5c8ab2c7d8460988f2182b4815958 100644 --- a/assets/curation-CyyuHfv5.js +++ b/assets/curation-DI9_zYNx.js @@ -1 +1 @@ -var f=Object.defineProperty;var w=(i,e,t)=>e in i?f(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t;var d=(i,e,t)=>w(i,typeof e!="symbol"?e+"":e,t);import{A as l,b2 as g,ac as v}from"./index-CjdUkE4w.js";const y={tasks:"tasks",methods:"methods",organizations:"organizations",repositories:"GitHub repositories",project_pages:"project pages",hf_artifacts:"Hugging Face artifacts",source_url:"source URL",x_threads:"X threads",evaluations:"evaluation results"};function _(i){return Object.prototype.hasOwnProperty.call(y,i)}const p="pwc:fresh-auth-edit",c="pwc:fresh-auth-mutation";function E(i){if(typeof window>"u")return;sessionStorage.setItem(p,i);const e=g("/api/v1/auth/hf/login");window.location.assign(`${e}?return_to=${encodeURIComponent(window.location.href)}`)}class S{constructor(e,t=E){d(this,"paperLoads",new Map);d(this,"evaluationLoads",new Map);this.request=e,this.recoverFreshAuth=t}primePaper(e,t=!1){t&&this.paperLoads.delete(e);let s=this.paperLoads.get(e);return s||(s=this.request(`/papers/${e}/curation-state`).catch(o=>{throw this.paperLoads.delete(e),o}),this.paperLoads.set(e,s)),s}primeEvaluations(e,t=!1){t&&this.evaluationLoads.delete(e);let s=this.evaluationLoads.get(e);return s||(s=this.request(`/evaluations/curation-state?paper_id=${e}`).catch(o=>{throw this.evaluationLoads.delete(e),o}),this.evaluationLoads.set(e,s)),s}async mutatePaper(e,t,s,o,a){const r=this.paperLoads.get(e);if(!r)throw new Error("The catalog version was not loaded when this editor opened. Close and reopen the editor.");const h=(await r).sections[t];if(!h)throw new Error(`Missing curation version for ${t}`);return this.mutate(t,o,s,h,a,`paper:${e}:${t}`)}async mutateEvaluations(e,t,s,o){const a=this.evaluationLoads.get(String(e));if(!a)throw new Error("The evaluation version was not loaded when this editor opened. Close and reopen the editor.");const r=(await a).version;return this.mutate("evaluations",s,t,r,o,`paper:${e}:evaluations`)}async mutate(e,t,s,o,a,r){const h=new Headers(a.headers);Object.entries(this.idempotencyHeaders(r,s,o)).forEach(([n,m])=>h.set(n,m));const u={...a,headers:h};try{const n=await this.request(t,u);return this.clearAttempt(u),n}catch(n){throw n instanceof l&&n.status===401&&n.code==="fresh_auth_required"?(this.saveFreshAuthMutation(e,t,s,u),this.recoverFreshAuth(e)):n instanceof l&&n.status===409&&(this.clearAttempt(u),typeof window<"u"&&window.dispatchEvent(new CustomEvent("pwc:catalog-conflict",{detail:{endpoint:t}}))),n}}freshAuthMutationDraft(){const e=sessionStorage.getItem(c);if(!e)return null;try{const t=JSON.parse(e);if(!t.endpoint.startsWith("/")||t.endpoint.startsWith("//")||!["POST","PUT","PATCH","DELETE"].includes(t.options.method))throw new Error("Invalid saved mutation draft");return t}catch{return sessionStorage.removeItem(c),null}}async resumeFreshAuthMutation(){const e=this.freshAuthMutationDraft();if(!e)throw new Error("No saved catalog edit is available.");const t=await this.request(e.endpoint,{method:e.options.method,body:e.options.body,headers:e.options.headers});return this.clearAttempt({headers:e.options.headers}),sessionStorage.removeItem(c),sessionStorage.removeItem(p),t}saveFreshAuthMutation(e,t,s,o){const a=Object.fromEntries(new Headers(o.headers).entries()),r=typeof o.body=="string"?o.body:void 0;sessionStorage.setItem(c,JSON.stringify({section:e,endpoint:t,payload:s,options:{method:(o.method??"POST").toUpperCase(),body:r,headers:a}}))}idempotencyHeaders(e,t,s){const o=`pwc:mutation:${e}:${JSON.stringify(t)}`,a=sessionStorage.getItem(o);if(a){const h=JSON.parse(a);return{"Idempotency-Key":h.key,"If-Match":h.version}}const r=crypto.randomUUID();return sessionStorage.setItem(o,JSON.stringify({key:r,version:s})),sessionStorage.setItem(`pwc:mutation-key:${r}`,o),{"Idempotency-Key":r,"If-Match":s}}clearAttempt(e){const t=new Headers(e.headers).get("Idempotency-Key");if(!t)return;const s=sessionStorage.getItem(`pwc:mutation-key:${t}`);s&&sessionStorage.removeItem(s),sessionStorage.removeItem(`pwc:mutation-key:${t}`),this.paperLoads.clear(),this.evaluationLoads.clear()}}const T=new S(v);export{p as F,y as P,_ as i,T as p}; +var f=Object.defineProperty;var w=(i,e,t)=>e in i?f(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t;var d=(i,e,t)=>w(i,typeof e!="symbol"?e+"":e,t);import{A as l,b2 as g,ac as v}from"./index-CHGpuh10.js";const y={tasks:"tasks",methods:"methods",organizations:"organizations",repositories:"GitHub repositories",project_pages:"project pages",hf_artifacts:"Hugging Face artifacts",source_url:"source URL",x_threads:"X threads",evaluations:"evaluation results"};function _(i){return Object.prototype.hasOwnProperty.call(y,i)}const p="pwc:fresh-auth-edit",c="pwc:fresh-auth-mutation";function E(i){if(typeof window>"u")return;sessionStorage.setItem(p,i);const e=g("/api/v1/auth/hf/login");window.location.assign(`${e}?return_to=${encodeURIComponent(window.location.href)}`)}class S{constructor(e,t=E){d(this,"paperLoads",new Map);d(this,"evaluationLoads",new Map);this.request=e,this.recoverFreshAuth=t}primePaper(e,t=!1){t&&this.paperLoads.delete(e);let s=this.paperLoads.get(e);return s||(s=this.request(`/papers/${e}/curation-state`).catch(o=>{throw this.paperLoads.delete(e),o}),this.paperLoads.set(e,s)),s}primeEvaluations(e,t=!1){t&&this.evaluationLoads.delete(e);let s=this.evaluationLoads.get(e);return s||(s=this.request(`/evaluations/curation-state?paper_id=${e}`).catch(o=>{throw this.evaluationLoads.delete(e),o}),this.evaluationLoads.set(e,s)),s}async mutatePaper(e,t,s,o,a){const r=this.paperLoads.get(e);if(!r)throw new Error("The catalog version was not loaded when this editor opened. Close and reopen the editor.");const h=(await r).sections[t];if(!h)throw new Error(`Missing curation version for ${t}`);return this.mutate(t,o,s,h,a,`paper:${e}:${t}`)}async mutateEvaluations(e,t,s,o){const a=this.evaluationLoads.get(String(e));if(!a)throw new Error("The evaluation version was not loaded when this editor opened. Close and reopen the editor.");const r=(await a).version;return this.mutate("evaluations",s,t,r,o,`paper:${e}:evaluations`)}async mutate(e,t,s,o,a,r){const h=new Headers(a.headers);Object.entries(this.idempotencyHeaders(r,s,o)).forEach(([n,m])=>h.set(n,m));const u={...a,headers:h};try{const n=await this.request(t,u);return this.clearAttempt(u),n}catch(n){throw n instanceof l&&n.status===401&&n.code==="fresh_auth_required"?(this.saveFreshAuthMutation(e,t,s,u),this.recoverFreshAuth(e)):n instanceof l&&n.status===409&&(this.clearAttempt(u),typeof window<"u"&&window.dispatchEvent(new CustomEvent("pwc:catalog-conflict",{detail:{endpoint:t}}))),n}}freshAuthMutationDraft(){const e=sessionStorage.getItem(c);if(!e)return null;try{const t=JSON.parse(e);if(!t.endpoint.startsWith("/")||t.endpoint.startsWith("//")||!["POST","PUT","PATCH","DELETE"].includes(t.options.method))throw new Error("Invalid saved mutation draft");return t}catch{return sessionStorage.removeItem(c),null}}async resumeFreshAuthMutation(){const e=this.freshAuthMutationDraft();if(!e)throw new Error("No saved catalog edit is available.");const t=await this.request(e.endpoint,{method:e.options.method,body:e.options.body,headers:e.options.headers});return this.clearAttempt({headers:e.options.headers}),sessionStorage.removeItem(c),sessionStorage.removeItem(p),t}saveFreshAuthMutation(e,t,s,o){const a=Object.fromEntries(new Headers(o.headers).entries()),r=typeof o.body=="string"?o.body:void 0;sessionStorage.setItem(c,JSON.stringify({section:e,endpoint:t,payload:s,options:{method:(o.method??"POST").toUpperCase(),body:r,headers:a}}))}idempotencyHeaders(e,t,s){const o=`pwc:mutation:${e}:${JSON.stringify(t)}`,a=sessionStorage.getItem(o);if(a){const h=JSON.parse(a);return{"Idempotency-Key":h.key,"If-Match":h.version}}const r=crypto.randomUUID();return sessionStorage.setItem(o,JSON.stringify({key:r,version:s})),sessionStorage.setItem(`pwc:mutation-key:${r}`,o),{"Idempotency-Key":r,"If-Match":s}}clearAttempt(e){const t=new Headers(e.headers).get("Idempotency-Key");if(!t)return;const s=sessionStorage.getItem(`pwc:mutation-key:${t}`);s&&sessionStorage.removeItem(s),sessionStorage.removeItem(`pwc:mutation-key:${t}`),this.paperLoads.clear(),this.evaluationLoads.clear()}}const T=new S(v);export{p as F,y as P,_ as i,T as p}; diff --git a/assets/database-b_ekt_5x.js b/assets/database-DYuYu8SE.js similarity index 89% rename from assets/database-b_ekt_5x.js rename to assets/database-DYuYu8SE.js index 9dffdc5c9c2101dce3b6040b0f6c39ac5d777b56..5720b2039fb9cdb0cb2f1520855002279aec73f9 100644 --- a/assets/database-b_ekt_5x.js +++ b/assets/database-DYuYu8SE.js @@ -1,4 +1,4 @@ -import{s as e}from"./index-CjdUkE4w.js";/** +import{s as e}from"./index-CHGpuh10.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/dialog-BzX9PD3v.js b/assets/dialog-BfI2DQVf.js similarity index 96% rename from assets/dialog-BzX9PD3v.js rename to assets/dialog-BfI2DQVf.js index 20b5d20464038bb0a83a06fccd03f3cdd4fa10ce..cf118d2e054243c19fc9798a819d7872be5f1c26 100644 --- a/assets/dialog-BzX9PD3v.js +++ b/assets/dialog-BfI2DQVf.js @@ -1 +1 @@ -import{ag as f,d as l,j as t,ah as p,aj as d,al as g,X as x,I as o,ai as n,am as i,an as r}from"./index-CjdUkE4w.js";const w=f,u=p,c=l.forwardRef(({className:a,...e},s)=>t.jsx(n,{ref:s,className:o("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",a),...e}));c.displayName=n.displayName;const y=l.forwardRef(({className:a,children:e,...s},m)=>t.jsxs(u,{children:[t.jsx(c,{}),t.jsxs(d,{ref:m,className:o("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",a),...s,children:[e,t.jsxs(g,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity data-[state=open]:bg-accent data-[state=open]:text-muted-foreground hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none",children:[t.jsx(x,{className:"h-4 w-4"}),t.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));y.displayName=d.displayName;const N=({className:a,...e})=>t.jsx("div",{className:o("flex flex-col space-y-1.5 text-center sm:text-left",a),...e});N.displayName="DialogHeader";const j=({className:a,...e})=>t.jsx("div",{className:o("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",a),...e});j.displayName="DialogFooter";const D=l.forwardRef(({className:a,...e},s)=>t.jsx(i,{ref:s,className:o("text-lg font-semibold leading-none tracking-tight",a),...e}));D.displayName=i.displayName;const b=l.forwardRef(({className:a,...e},s)=>t.jsx(r,{ref:s,className:o("text-sm text-muted-foreground",a),...e}));b.displayName=r.displayName;export{w as D,y as a,D as b,N as c,b as d,j as e}; +import{ag as f,d as l,j as t,ah as p,aj as d,al as g,X as x,I as o,ai as n,am as i,an as r}from"./index-CHGpuh10.js";const w=f,u=p,c=l.forwardRef(({className:a,...e},s)=>t.jsx(n,{ref:s,className:o("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",a),...e}));c.displayName=n.displayName;const y=l.forwardRef(({className:a,children:e,...s},m)=>t.jsxs(u,{children:[t.jsx(c,{}),t.jsxs(d,{ref:m,className:o("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",a),...s,children:[e,t.jsxs(g,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity data-[state=open]:bg-accent data-[state=open]:text-muted-foreground hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none",children:[t.jsx(x,{className:"h-4 w-4"}),t.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));y.displayName=d.displayName;const N=({className:a,...e})=>t.jsx("div",{className:o("flex flex-col space-y-1.5 text-center sm:text-left",a),...e});N.displayName="DialogHeader";const j=({className:a,...e})=>t.jsx("div",{className:o("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",a),...e});j.displayName="DialogFooter";const D=l.forwardRef(({className:a,...e},s)=>t.jsx(i,{ref:s,className:o("text-lg font-semibold leading-none tracking-tight",a),...e}));D.displayName=i.displayName;const b=l.forwardRef(({className:a,...e},s)=>t.jsx(r,{ref:s,className:o("text-sm text-muted-foreground",a),...e}));b.displayName=r.displayName;export{w as D,y as a,D as b,N as c,b as d,j as e}; diff --git a/assets/evaluationQueryInvalidation-BAyi4YoG.js b/assets/evaluationQueryInvalidation-oiaNU_fe.js similarity index 97% rename from assets/evaluationQueryInvalidation-BAyi4YoG.js rename to assets/evaluationQueryInvalidation-oiaNU_fe.js index 4afb9d3a84b100898fa0521fb566121d682dca19..822ed90e295903897d54b9fc59b74ce904f32f29 100644 --- a/assets/evaluationQueryInvalidation-BAyi4YoG.js +++ b/assets/evaluationQueryInvalidation-oiaNU_fe.js @@ -1 +1 @@ -var F=a=>{throw TypeError(a)};var B=(a,e,t)=>e.has(a)||F("Cannot "+t);var u=(a,e,t)=>(B(a,e,"read from private field"),t?t.call(a):e.get(a)),v=(a,e,t)=>e.has(a)?F("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(a):e.set(a,t),l=(a,e,t,s)=>(B(a,e,"write to private field"),s?s.call(a,t):e.set(a,t),t),g=(a,e,t)=>(B(a,e,"access private method"),t);import{aF as X,aG as H,aH as Y,aI as Z,aJ as J,i as W,aK as ee,aL as se,d as x,aM as te,aN as re,aO as ae,aP as ie,aQ as U,aR as ne,aS as oe,t as A,o as I}from"./index-CjdUkE4w.js";import{i as ue,a as ce}from"./queryInvalidation-LiTu0GxY.js";function j(a,e){const t=new Set(e);return a.filter(s=>!t.has(s))}function de(a,e,t){const s=a.slice(0);return s[e]=t,s}var _,f,w,E,y,R,C,K,M,P,d,L,D,N,$,T,z,G,he=(G=class extends X{constructor(e,t,s){super();v(this,d);v(this,_);v(this,f);v(this,w);v(this,E);v(this,y);v(this,R);v(this,C);v(this,K);v(this,M);v(this,P,[]);l(this,_,e),l(this,E,s),l(this,w,[]),l(this,y,[]),l(this,f,[]),this.setQueries(t)}onSubscribe(){this.listeners.size===1&&u(this,y).forEach(e=>{e.subscribe(t=>{g(this,d,T).call(this,e,t)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,u(this,y).forEach(e=>{e.destroy()})}setQueries(e,t){l(this,w,e),l(this,E,t),H.batch(()=>{const s=u(this,y),n=g(this,d,$).call(this,u(this,w));n.forEach(i=>i.observer.setOptions(i.defaultedQueryOptions));const r=n.map(i=>i.observer),o=r.map(i=>i.getCurrentResult()),h=s.length!==r.length,m=r.some((i,b)=>i!==s[b]),S=h||m,c=S?!0:o.some((i,b)=>{const k=u(this,f)[b];return!k||!Y(i,k)});!S&&!c||(S&&(l(this,P,n),l(this,y,r)),l(this,f,o),this.hasListeners()&&(S&&(j(s,r).forEach(i=>{i.destroy()}),j(r,s).forEach(i=>{i.subscribe(b=>{g(this,d,T).call(this,i,b)})})),g(this,d,z).call(this)))})}getCurrentResult(){return u(this,f)}getQueries(){return u(this,y).map(e=>e.getCurrentQuery())}getObservers(){return u(this,y)}getOptimisticResult(e,t){const s=g(this,d,$).call(this,e),n=s.map(o=>o.observer.getOptimisticResult(o.defaultedQueryOptions)),r=s.map(o=>o.defaultedQueryOptions.queryHash);return[n,o=>g(this,d,D).call(this,o??n,t,r),()=>g(this,d,L).call(this,n,s)]}},_=new WeakMap,f=new WeakMap,w=new WeakMap,E=new WeakMap,y=new WeakMap,R=new WeakMap,C=new WeakMap,K=new WeakMap,M=new WeakMap,P=new WeakMap,d=new WeakSet,L=function(e,t){return t.map((s,n)=>{const r=e[n];return s.defaultedQueryOptions.notifyOnChangeProps?r:s.observer.trackResult(r,o=>{t.forEach(h=>{h.observer.trackProp(o)})})})},D=function(e,t,s){if(t){const n=u(this,M),r=s!==void 0&&n!==void 0&&(n.length!==s.length||s.some((o,h)=>o!==n[h]));return(!u(this,R)||u(this,f)!==u(this,K)||r||t!==u(this,C))&&(l(this,C,t),l(this,K,u(this,f)),s!==void 0&&l(this,M,s),l(this,R,Z(u(this,R),t(e)))),u(this,R)}return e},N=function(){var e;return((e=u(this,E))==null?void 0:e.combine)!==void 0&&u(this,y).some((t,s)=>{var n;return t.options.suspense&&((n=u(this,f)[s])==null?void 0:n.data)===void 0})},$=function(e){const t=new Map;u(this,y).forEach(n=>{const r=n.options.queryHash;if(!r)return;const o=t.get(r);o?o.push(n):t.set(r,[n])});const s=[];return e.forEach(n=>{var m;const r=u(this,_).defaultQueryOptions(n),h=((m=t.get(r.queryHash))==null?void 0:m.shift())??new J(u(this,_),r);s.push({defaultedQueryOptions:r,observer:h})}),s},T=function(e,t){const s=u(this,y).indexOf(e);s!==-1&&(l(this,f,de(u(this,f),s,t)),g(this,d,z).call(this))},z=function(){var e;if(this.hasListeners()){const t=g(this,d,L).call(this,u(this,f),u(this,P)),s=g(this,d,N).call(this),n=u(this,R),r=s?n:g(this,d,D).call(this,t,(e=u(this,E))==null?void 0:e.combine);(s||n!==r)&&H.batch(()=>{this.listeners.forEach(o=>{o(u(this,f))})})}},G);function ye({queries:a,...e},t){const s=W(),n=ee(),r=se(),o=x.useMemo(()=>a.map(p=>{const Q=s.defaultQueryOptions(p);return Q._optimisticResults=n?"isRestoring":"optimistic",Q}),[a,s,n]);o.forEach(p=>{te(p);const Q=s.getQueryCache().get(p.queryHash);re(p,r,Q)}),ae(r);const[h]=x.useState(()=>new he(s,o,e)),[m,S,c]=h.getOptimisticResult(o,e.combine),i=!n&&e.subscribed!==!1;x.useSyncExternalStore(x.useCallback(p=>i?h.subscribe(H.batchCalls(p)):ie,[h,i]),()=>h.getCurrentResult(),()=>h.getCurrentResult()),x.useEffect(()=>{h.setQueries(o,e)},[o,e,h]);const k=m.some((p,Q)=>U(o[Q],p))?m.flatMap((p,Q)=>{const O=o[Q];if(O&&U(O,p)){const V=new J(s,O);return ne(O,V,r)}return[]}):[];if(k.length>0)throw Promise.all(k);const q=m.find((p,Q)=>{const O=o[Q];return O&&oe({result:p,errorResetBoundary:r,throwOnError:O.throwOnError,query:s.getQueryCache().get(O.queryHash),suspense:O.suspense})});if(q!=null&&q.error)throw q.error;return S(c())}function be(a,e,t,s){const n=new Set(t.flatMap(r=>r.op==="create"?[]:[String(r.evaluation_id)]));return{paperId:a,arxivId:s,contexts:[...e.filter(r=>r.id!==void 0&&n.has(String(r.id))),...t.flatMap(r=>r.op==="delete"?[]:[r.data])]}}function ve(a,e){const t=new Set(e.contexts.flatMap(c=>c.dataset_id==null?[]:[String(c.dataset_id)])),s=new Set(e.contexts.flatMap(c=>c.task_id==null?[]:[String(c.task_id)])),n=new Set([e.paperId]),r=new Set;e.arxivId&&r.add(e.arxivId);const o=new Set(e.contexts.map(c=>`${c.task_id}:${c.dataset_id}`)),h=a.getQueryCache(),m=[...h.findAll({queryKey:A.byDatasetAll}),...h.findAll({queryKey:A.byPaperAll})];for(const c of m)for(const i of c.state.data??[])o.has(`${i.task_id}:${i.dataset_id}`)&&(n.add(String(i.paper_id)),i.paper_arxiv_id&&r.add(i.paper_arxiv_id));ue(a,[...n,...r]),ce(a),a.invalidateQueries({queryKey:A.byPaperAll,predicate:c=>n.has(String(c.queryKey[2]))});const S=c=>t.has(String(c.queryKey[1]));a.invalidateQueries({queryKey:A.byDatasetAll,predicate:S}),a.invalidateQueries({queryKey:I.datasetTasks,predicate:S}),a.invalidateQueries({queryKey:I.datasets,predicate:c=>{const i=c.state.data;return S(c)||!!(i&&t.has(String(i.id)))}}),a.invalidateQueries({queryKey:I.taskPage,predicate:c=>{const i=c.state.data;return s.has(String(c.queryKey[1]))||!!(i&&(s.has(String(i.task.id))||i.subtask_benchmarks.some(b=>s.has(String(b.subtask_id)))||i.benchmarks.some(b=>t.has(String(b.id)))||i.subtask_benchmarks.some(b=>b.benchmarks.some(k=>t.has(String(k.id))))))}}),a.invalidateQueries({queryKey:I.taskBenchmarkTrends,predicate:c=>{const i=c.state.data;return s.has(String(c.queryKey[1]))||!!(i&&s.has(String(i.task_id)))}})}export{be as e,ve as r,ye as u}; +var F=a=>{throw TypeError(a)};var B=(a,e,t)=>e.has(a)||F("Cannot "+t);var u=(a,e,t)=>(B(a,e,"read from private field"),t?t.call(a):e.get(a)),v=(a,e,t)=>e.has(a)?F("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(a):e.set(a,t),l=(a,e,t,s)=>(B(a,e,"write to private field"),s?s.call(a,t):e.set(a,t),t),g=(a,e,t)=>(B(a,e,"access private method"),t);import{aF as X,aG as H,aH as Y,aI as Z,aJ as J,i as W,aK as ee,aL as se,d as x,aM as te,aN as re,aO as ae,aP as ie,aQ as U,aR as ne,aS as oe,t as A,o as I}from"./index-CHGpuh10.js";import{i as ue,a as ce}from"./queryInvalidation-rIB0mIr9.js";function j(a,e){const t=new Set(e);return a.filter(s=>!t.has(s))}function de(a,e,t){const s=a.slice(0);return s[e]=t,s}var _,f,w,E,y,R,C,K,M,P,d,L,D,N,$,T,z,G,he=(G=class extends X{constructor(e,t,s){super();v(this,d);v(this,_);v(this,f);v(this,w);v(this,E);v(this,y);v(this,R);v(this,C);v(this,K);v(this,M);v(this,P,[]);l(this,_,e),l(this,E,s),l(this,w,[]),l(this,y,[]),l(this,f,[]),this.setQueries(t)}onSubscribe(){this.listeners.size===1&&u(this,y).forEach(e=>{e.subscribe(t=>{g(this,d,T).call(this,e,t)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,u(this,y).forEach(e=>{e.destroy()})}setQueries(e,t){l(this,w,e),l(this,E,t),H.batch(()=>{const s=u(this,y),n=g(this,d,$).call(this,u(this,w));n.forEach(i=>i.observer.setOptions(i.defaultedQueryOptions));const r=n.map(i=>i.observer),o=r.map(i=>i.getCurrentResult()),h=s.length!==r.length,m=r.some((i,b)=>i!==s[b]),S=h||m,c=S?!0:o.some((i,b)=>{const k=u(this,f)[b];return!k||!Y(i,k)});!S&&!c||(S&&(l(this,P,n),l(this,y,r)),l(this,f,o),this.hasListeners()&&(S&&(j(s,r).forEach(i=>{i.destroy()}),j(r,s).forEach(i=>{i.subscribe(b=>{g(this,d,T).call(this,i,b)})})),g(this,d,z).call(this)))})}getCurrentResult(){return u(this,f)}getQueries(){return u(this,y).map(e=>e.getCurrentQuery())}getObservers(){return u(this,y)}getOptimisticResult(e,t){const s=g(this,d,$).call(this,e),n=s.map(o=>o.observer.getOptimisticResult(o.defaultedQueryOptions)),r=s.map(o=>o.defaultedQueryOptions.queryHash);return[n,o=>g(this,d,D).call(this,o??n,t,r),()=>g(this,d,L).call(this,n,s)]}},_=new WeakMap,f=new WeakMap,w=new WeakMap,E=new WeakMap,y=new WeakMap,R=new WeakMap,C=new WeakMap,K=new WeakMap,M=new WeakMap,P=new WeakMap,d=new WeakSet,L=function(e,t){return t.map((s,n)=>{const r=e[n];return s.defaultedQueryOptions.notifyOnChangeProps?r:s.observer.trackResult(r,o=>{t.forEach(h=>{h.observer.trackProp(o)})})})},D=function(e,t,s){if(t){const n=u(this,M),r=s!==void 0&&n!==void 0&&(n.length!==s.length||s.some((o,h)=>o!==n[h]));return(!u(this,R)||u(this,f)!==u(this,K)||r||t!==u(this,C))&&(l(this,C,t),l(this,K,u(this,f)),s!==void 0&&l(this,M,s),l(this,R,Z(u(this,R),t(e)))),u(this,R)}return e},N=function(){var e;return((e=u(this,E))==null?void 0:e.combine)!==void 0&&u(this,y).some((t,s)=>{var n;return t.options.suspense&&((n=u(this,f)[s])==null?void 0:n.data)===void 0})},$=function(e){const t=new Map;u(this,y).forEach(n=>{const r=n.options.queryHash;if(!r)return;const o=t.get(r);o?o.push(n):t.set(r,[n])});const s=[];return e.forEach(n=>{var m;const r=u(this,_).defaultQueryOptions(n),h=((m=t.get(r.queryHash))==null?void 0:m.shift())??new J(u(this,_),r);s.push({defaultedQueryOptions:r,observer:h})}),s},T=function(e,t){const s=u(this,y).indexOf(e);s!==-1&&(l(this,f,de(u(this,f),s,t)),g(this,d,z).call(this))},z=function(){var e;if(this.hasListeners()){const t=g(this,d,L).call(this,u(this,f),u(this,P)),s=g(this,d,N).call(this),n=u(this,R),r=s?n:g(this,d,D).call(this,t,(e=u(this,E))==null?void 0:e.combine);(s||n!==r)&&H.batch(()=>{this.listeners.forEach(o=>{o(u(this,f))})})}},G);function ye({queries:a,...e},t){const s=W(),n=ee(),r=se(),o=x.useMemo(()=>a.map(p=>{const Q=s.defaultQueryOptions(p);return Q._optimisticResults=n?"isRestoring":"optimistic",Q}),[a,s,n]);o.forEach(p=>{te(p);const Q=s.getQueryCache().get(p.queryHash);re(p,r,Q)}),ae(r);const[h]=x.useState(()=>new he(s,o,e)),[m,S,c]=h.getOptimisticResult(o,e.combine),i=!n&&e.subscribed!==!1;x.useSyncExternalStore(x.useCallback(p=>i?h.subscribe(H.batchCalls(p)):ie,[h,i]),()=>h.getCurrentResult(),()=>h.getCurrentResult()),x.useEffect(()=>{h.setQueries(o,e)},[o,e,h]);const k=m.some((p,Q)=>U(o[Q],p))?m.flatMap((p,Q)=>{const O=o[Q];if(O&&U(O,p)){const V=new J(s,O);return ne(O,V,r)}return[]}):[];if(k.length>0)throw Promise.all(k);const q=m.find((p,Q)=>{const O=o[Q];return O&&oe({result:p,errorResetBoundary:r,throwOnError:O.throwOnError,query:s.getQueryCache().get(O.queryHash),suspense:O.suspense})});if(q!=null&&q.error)throw q.error;return S(c())}function be(a,e,t,s){const n=new Set(t.flatMap(r=>r.op==="create"?[]:[String(r.evaluation_id)]));return{paperId:a,arxivId:s,contexts:[...e.filter(r=>r.id!==void 0&&n.has(String(r.id))),...t.flatMap(r=>r.op==="delete"?[]:[r.data])]}}function ve(a,e){const t=new Set(e.contexts.flatMap(c=>c.dataset_id==null?[]:[String(c.dataset_id)])),s=new Set(e.contexts.flatMap(c=>c.task_id==null?[]:[String(c.task_id)])),n=new Set([e.paperId]),r=new Set;e.arxivId&&r.add(e.arxivId);const o=new Set(e.contexts.map(c=>`${c.task_id}:${c.dataset_id}`)),h=a.getQueryCache(),m=[...h.findAll({queryKey:A.byDatasetAll}),...h.findAll({queryKey:A.byPaperAll})];for(const c of m)for(const i of c.state.data??[])o.has(`${i.task_id}:${i.dataset_id}`)&&(n.add(String(i.paper_id)),i.paper_arxiv_id&&r.add(i.paper_arxiv_id));ue(a,[...n,...r]),ce(a),a.invalidateQueries({queryKey:A.byPaperAll,predicate:c=>n.has(String(c.queryKey[2]))});const S=c=>t.has(String(c.queryKey[1]));a.invalidateQueries({queryKey:A.byDatasetAll,predicate:S}),a.invalidateQueries({queryKey:I.datasetTasks,predicate:S}),a.invalidateQueries({queryKey:I.datasets,predicate:c=>{const i=c.state.data;return S(c)||!!(i&&t.has(String(i.id)))}}),a.invalidateQueries({queryKey:I.taskPage,predicate:c=>{const i=c.state.data;return s.has(String(c.queryKey[1]))||!!(i&&(s.has(String(i.task.id))||i.subtask_benchmarks.some(b=>s.has(String(b.subtask_id)))||i.benchmarks.some(b=>t.has(String(b.id)))||i.subtask_benchmarks.some(b=>b.benchmarks.some(k=>t.has(String(k.id))))))}}),a.invalidateQueries({queryKey:I.taskBenchmarkTrends,predicate:c=>{const i=c.state.data;return s.has(String(c.queryKey[1]))||!!(i&&s.has(String(i.task_id)))}})}export{be as e,ve as r,ye as u}; diff --git a/assets/external-link-CTLWFJ8S.js b/assets/external-link-CeQVHd7V.js similarity index 89% rename from assets/external-link-CTLWFJ8S.js rename to assets/external-link-CeQVHd7V.js index b391c66bc966e72e8248ef41d1c6c051d30fda70..28abf4f58b4888e0c1b69b9e5497f03e680320bd 100644 --- a/assets/external-link-CTLWFJ8S.js +++ b/assets/external-link-CeQVHd7V.js @@ -1,4 +1,4 @@ -import{s as a}from"./index-CjdUkE4w.js";/** +import{s as a}from"./index-CHGpuh10.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/file-text-CHlxsNJC.js b/assets/file-text-DPLtNP9U.js similarity index 91% rename from assets/file-text-CHlxsNJC.js rename to assets/file-text-DPLtNP9U.js index 8c5ac1a7093a7ce9da6f2f8efdb217df7828b986..8b8de607e0f76d9cba8ca60e1081f3408dfce61a 100644 --- a/assets/file-text-CHlxsNJC.js +++ b/assets/file-text-DPLtNP9U.js @@ -1,4 +1,4 @@ -import{s as e}from"./index-CjdUkE4w.js";/** +import{s as e}from"./index-CHGpuh10.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/github-4bW4WI_e.js b/assets/github-CRId1LT2.js similarity index 92% rename from assets/github-4bW4WI_e.js rename to assets/github-CRId1LT2.js index ceb7fc550e46d4db67f24e90d2cf218c10a30abf..cc34bfd2119f433c6c343fa1cc1863f45346a60c 100644 --- a/assets/github-4bW4WI_e.js +++ b/assets/github-CRId1LT2.js @@ -1,4 +1,4 @@ -import{s as c}from"./index-CjdUkE4w.js";/** +import{s as c}from"./index-CHGpuh10.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/globe-mBp0l-nC.js b/assets/globe-CR-SV3ud.js similarity index 89% rename from assets/globe-mBp0l-nC.js rename to assets/globe-CR-SV3ud.js index 659ecb857d0b0e5471e82b8489a2020bdd7ec401..1ff6107ac8628561b69e5bef96ca65b7814ba022 100644 --- a/assets/globe-mBp0l-nC.js +++ b/assets/globe-CR-SV3ud.js @@ -1,4 +1,4 @@ -import{s as e}from"./index-CjdUkE4w.js";/** +import{s as e}from"./index-CHGpuh10.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/hover-card-CIBIV2Hx.js b/assets/hover-card-Dz7z6DCn.js similarity index 98% rename from assets/hover-card-CIBIV2Hx.js rename to assets/hover-card-Dz7z6DCn.js index 171f4eb81fc8ed710667972ae6f3df2acc4d9c4e..f9e73c123dc2052d7ba46b909c1dbe50c1aaa315 100644 --- a/assets/hover-card-CIBIV2Hx.js +++ b/assets/hover-card-Dz7z6DCn.js @@ -1 +1 @@ -import{d as n,B as k,j as c,ap as F,aq as I,z as U,E as l,ar as T,P as O,as as $,G as z,D as B,at as W,au as G,av as K,I as q}from"./index-CjdUkE4w.js";var E,g="HoverCard",[y]=z(g,[T]),w=T(),[V,S]=y(g),N=e=>{const{__scopeHoverCard:o,children:r,open:s,defaultOpen:a,onOpenChange:i,openDelay:f=700,closeDelay:v=300}=e,d=w(o),C=n.useRef(0),u=n.useRef(0),h=n.useRef(!1),p=n.useRef(!1),[m,t]=k({prop:s,defaultProp:a??!1,onChange:i,caller:g}),x=n.useCallback(()=>{clearTimeout(u.current),C.current=window.setTimeout(()=>t(!0),f)},[f,t]),P=n.useCallback(()=>{clearTimeout(C.current),!h.current&&!p.current&&(u.current=window.setTimeout(()=>t(!1),v))},[v,t]),M=n.useCallback(()=>t(!1),[t]);return n.useEffect(()=>()=>{clearTimeout(C.current),clearTimeout(u.current)},[]),c.jsx(V,{scope:o,open:m,onOpenChange:t,onOpen:x,onClose:P,onDismiss:M,hasSelectionRef:h,isPointerDownOnContentRef:p,children:c.jsx(F,{...d,children:r})})};N.displayName=g;var _="HoverCardTrigger",D=n.forwardRef((e,o)=>{const{__scopeHoverCard:r,...s}=e,a=S(_,r),i=w(r);return c.jsx(I,{asChild:!0,...i,children:c.jsx(U.a,{"data-state":a.open?"open":"closed",...s,ref:o,onPointerEnter:l(e.onPointerEnter,b(a.onOpen)),onPointerLeave:l(e.onPointerLeave,b(a.onClose)),onFocus:l(e.onFocus,a.onOpen),onBlur:l(e.onBlur,a.onClose),onTouchStart:l(e.onTouchStart,f=>f.preventDefault())})})});D.displayName=_;var H="HoverCardPortal",[J,Q]=y(H,{forceMount:void 0}),j=e=>{const{__scopeHoverCard:o,forceMount:r,children:s,container:a}=e,i=S(H,o);return c.jsx(J,{scope:o,forceMount:r,children:c.jsx(O,{present:r||i.open,children:c.jsx($,{asChild:!0,container:a,children:s})})})};j.displayName=H;var R="HoverCardContent",A=n.forwardRef((e,o)=>{const r=Q(R,e.__scopeHoverCard),{forceMount:s=r.forceMount,...a}=e,i=S(R,e.__scopeHoverCard);return c.jsx(O,{present:s||i.open,children:c.jsx(X,{"data-state":i.open?"open":"closed",...a,onPointerEnter:l(e.onPointerEnter,b(i.onOpen)),onPointerLeave:l(e.onPointerLeave,b(i.onClose)),ref:o})})});A.displayName=R;var X=n.forwardRef((e,o)=>{const{__scopeHoverCard:r,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:i,onInteractOutside:f,...v}=e,d=S(R,r),C=w(r),u=n.useRef(null),h=B(o,u),[p,m]=n.useState(!1);return n.useEffect(()=>{if(p){const t=document.body;return E=t.style.userSelect||t.style.webkitUserSelect,t.style.userSelect="none",t.style.webkitUserSelect="none",()=>{t.style.userSelect=E,t.style.webkitUserSelect=E}}},[p]),n.useEffect(()=>{if(u.current){const t=()=>{m(!1),d.isPointerDownOnContentRef.current=!1,setTimeout(()=>{var P;((P=document.getSelection())==null?void 0:P.toString())!==""&&(d.hasSelectionRef.current=!0)})};return document.addEventListener("pointerup",t),()=>{document.removeEventListener("pointerup",t),d.hasSelectionRef.current=!1,d.isPointerDownOnContentRef.current=!1}}},[d.isPointerDownOnContentRef,d.hasSelectionRef]),n.useEffect(()=>{u.current&&ee(u.current).forEach(x=>x.setAttribute("tabindex","-1"))}),c.jsx(W,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:f,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:l(i,t=>{t.preventDefault()}),onDismiss:d.onDismiss,children:c.jsx(G,{...C,...v,onPointerDown:l(v.onPointerDown,t=>{t.currentTarget.contains(t.target)&&m(!0),d.hasSelectionRef.current=!1,d.isPointerDownOnContentRef.current=!0}),ref:h,style:{...v.style,userSelect:p?"text":void 0,WebkitUserSelect:p?"text":void 0,"--radix-hover-card-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-hover-card-content-available-width":"var(--radix-popper-available-width)","--radix-hover-card-content-available-height":"var(--radix-popper-available-height)","--radix-hover-card-trigger-width":"var(--radix-popper-anchor-width)","--radix-hover-card-trigger-height":"var(--radix-popper-anchor-height)"}})})}),Y="HoverCardArrow",Z=n.forwardRef((e,o)=>{const{__scopeHoverCard:r,...s}=e,a=w(r);return c.jsx(K,{...a,...s,ref:o})});Z.displayName=Y;function b(e){return o=>o.pointerType==="touch"?void 0:e()}function ee(e){const o=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:s=>s.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});for(;r.nextNode();)o.push(r.currentNode);return o}var te=N,oe=D,re=j,L=A;const se=te,ce=oe,ne=n.forwardRef(({className:e,align:o="center",sideOffset:r=4,...s},a)=>c.jsx(re,{children:c.jsx(L,{ref:a,align:o,sideOffset:r,className:q("z-50 w-64 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...s})}));ne.displayName=L.displayName;export{se as H,ce as a,ne as b}; +import{d as n,B as k,j as c,ap as F,aq as I,z as U,E as l,ar as T,P as O,as as $,G as z,D as B,at as W,au as G,av as K,I as q}from"./index-CHGpuh10.js";var E,g="HoverCard",[y]=z(g,[T]),w=T(),[V,S]=y(g),N=e=>{const{__scopeHoverCard:o,children:r,open:s,defaultOpen:a,onOpenChange:i,openDelay:f=700,closeDelay:v=300}=e,d=w(o),C=n.useRef(0),u=n.useRef(0),h=n.useRef(!1),p=n.useRef(!1),[m,t]=k({prop:s,defaultProp:a??!1,onChange:i,caller:g}),x=n.useCallback(()=>{clearTimeout(u.current),C.current=window.setTimeout(()=>t(!0),f)},[f,t]),P=n.useCallback(()=>{clearTimeout(C.current),!h.current&&!p.current&&(u.current=window.setTimeout(()=>t(!1),v))},[v,t]),M=n.useCallback(()=>t(!1),[t]);return n.useEffect(()=>()=>{clearTimeout(C.current),clearTimeout(u.current)},[]),c.jsx(V,{scope:o,open:m,onOpenChange:t,onOpen:x,onClose:P,onDismiss:M,hasSelectionRef:h,isPointerDownOnContentRef:p,children:c.jsx(F,{...d,children:r})})};N.displayName=g;var _="HoverCardTrigger",D=n.forwardRef((e,o)=>{const{__scopeHoverCard:r,...s}=e,a=S(_,r),i=w(r);return c.jsx(I,{asChild:!0,...i,children:c.jsx(U.a,{"data-state":a.open?"open":"closed",...s,ref:o,onPointerEnter:l(e.onPointerEnter,b(a.onOpen)),onPointerLeave:l(e.onPointerLeave,b(a.onClose)),onFocus:l(e.onFocus,a.onOpen),onBlur:l(e.onBlur,a.onClose),onTouchStart:l(e.onTouchStart,f=>f.preventDefault())})})});D.displayName=_;var H="HoverCardPortal",[J,Q]=y(H,{forceMount:void 0}),j=e=>{const{__scopeHoverCard:o,forceMount:r,children:s,container:a}=e,i=S(H,o);return c.jsx(J,{scope:o,forceMount:r,children:c.jsx(O,{present:r||i.open,children:c.jsx($,{asChild:!0,container:a,children:s})})})};j.displayName=H;var R="HoverCardContent",A=n.forwardRef((e,o)=>{const r=Q(R,e.__scopeHoverCard),{forceMount:s=r.forceMount,...a}=e,i=S(R,e.__scopeHoverCard);return c.jsx(O,{present:s||i.open,children:c.jsx(X,{"data-state":i.open?"open":"closed",...a,onPointerEnter:l(e.onPointerEnter,b(i.onOpen)),onPointerLeave:l(e.onPointerLeave,b(i.onClose)),ref:o})})});A.displayName=R;var X=n.forwardRef((e,o)=>{const{__scopeHoverCard:r,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:i,onInteractOutside:f,...v}=e,d=S(R,r),C=w(r),u=n.useRef(null),h=B(o,u),[p,m]=n.useState(!1);return n.useEffect(()=>{if(p){const t=document.body;return E=t.style.userSelect||t.style.webkitUserSelect,t.style.userSelect="none",t.style.webkitUserSelect="none",()=>{t.style.userSelect=E,t.style.webkitUserSelect=E}}},[p]),n.useEffect(()=>{if(u.current){const t=()=>{m(!1),d.isPointerDownOnContentRef.current=!1,setTimeout(()=>{var P;((P=document.getSelection())==null?void 0:P.toString())!==""&&(d.hasSelectionRef.current=!0)})};return document.addEventListener("pointerup",t),()=>{document.removeEventListener("pointerup",t),d.hasSelectionRef.current=!1,d.isPointerDownOnContentRef.current=!1}}},[d.isPointerDownOnContentRef,d.hasSelectionRef]),n.useEffect(()=>{u.current&&ee(u.current).forEach(x=>x.setAttribute("tabindex","-1"))}),c.jsx(W,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:f,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:l(i,t=>{t.preventDefault()}),onDismiss:d.onDismiss,children:c.jsx(G,{...C,...v,onPointerDown:l(v.onPointerDown,t=>{t.currentTarget.contains(t.target)&&m(!0),d.hasSelectionRef.current=!1,d.isPointerDownOnContentRef.current=!0}),ref:h,style:{...v.style,userSelect:p?"text":void 0,WebkitUserSelect:p?"text":void 0,"--radix-hover-card-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-hover-card-content-available-width":"var(--radix-popper-available-width)","--radix-hover-card-content-available-height":"var(--radix-popper-available-height)","--radix-hover-card-trigger-width":"var(--radix-popper-anchor-width)","--radix-hover-card-trigger-height":"var(--radix-popper-anchor-height)"}})})}),Y="HoverCardArrow",Z=n.forwardRef((e,o)=>{const{__scopeHoverCard:r,...s}=e,a=w(r);return c.jsx(K,{...a,...s,ref:o})});Z.displayName=Y;function b(e){return o=>o.pointerType==="touch"?void 0:e()}function ee(e){const o=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:s=>s.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});for(;r.nextNode();)o.push(r.currentNode);return o}var te=N,oe=D,re=j,L=A;const se=te,ce=oe,ne=n.forwardRef(({className:e,align:o="center",sideOffset:r=4,...s},a)=>c.jsx(re,{children:c.jsx(L,{ref:a,align:o,sideOffset:r,className:q("z-50 w-64 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...s})}));ne.displayName=L.displayName;export{se as H,ce as a,ne as b}; diff --git a/assets/index-tLcwYp0U.js b/assets/index-B141zdPU.js similarity index 99% rename from assets/index-tLcwYp0U.js rename to assets/index-B141zdPU.js index 23e7928ee047dc3fa054b2a07df9299b511e6aa8..2b691a61e290f4b3e48b75cf431768186ffaa872 100644 --- a/assets/index-tLcwYp0U.js +++ b/assets/index-B141zdPU.js @@ -1,4 +1,4 @@ -import{ax as We,a4 as Ot,j as Ze}from"./index-CjdUkE4w.js";function hu(){}function mu(e){const n=[],t=String(e||"");let r=t.indexOf(","),i=0,l=!1;for(;!l;){r===-1&&(r=t.length,l=!0);const o=t.slice(i,r).trim();(o||!l)&&n.push(o),i=r+1,r=t.indexOf(",",i)}return n}function Ir(e,n){const t={};return(e[e.length-1]===""?[...e,""]:e).join((t.padRight?" ":"")+","+(t.padLeft===!1?"":" ")).trim()}const Tr=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Ar=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Pr={};function Vn(e,n){return(Pr.jsx?Ar:Tr).test(e)}const zr=/[ \t\n\f\r]/g;function Lr(e){return typeof e=="object"?e.type==="text"?qn(e.value):!1:qn(e)}function qn(e){return e.replace(zr,"")===""}class Me{constructor(n,t,r){this.normal=t,this.property=n,r&&(this.space=r)}}Me.prototype.normal={};Me.prototype.property={};Me.prototype.space=void 0;function _t(e,n){const t={},r={};for(const i of e)Object.assign(t,i.property),Object.assign(r,i.normal);return new Me(t,r,n)}function fn(e){return e.toLowerCase()}class J{constructor(n,t){this.attribute=t,this.property=n}}J.prototype.attribute="";J.prototype.booleanish=!1;J.prototype.boolean=!1;J.prototype.commaOrSpaceSeparated=!1;J.prototype.commaSeparated=!1;J.prototype.defined=!1;J.prototype.mustUseProperty=!1;J.prototype.number=!1;J.prototype.overloadedBoolean=!1;J.prototype.property="";J.prototype.spaceSeparated=!1;J.prototype.space=void 0;let vr=0;const z=be(),$=be(),hn=be(),k=be(),R=be(),Ie=be(),ee=be();function be(){return 2**++vr}const mn=Object.freeze(Object.defineProperty({__proto__:null,boolean:z,booleanish:$,commaOrSpaceSeparated:ee,commaSeparated:Ie,number:k,overloadedBoolean:hn,spaceSeparated:R},Symbol.toStringTag,{value:"Module"})),en=Object.keys(mn);class En extends J{constructor(n,t,r,i){let l=-1;if(super(n,t),$n(this,"space",i),typeof r=="number")for(;++l4&&t.slice(0,4)==="data"&&Fr.test(n)){if(n.charAt(4)==="-"){const l=n.slice(5).replace(Wn,Br);r="data"+l.charAt(0).toUpperCase()+l.slice(1)}else{const l=n.slice(4);if(!Wn.test(l)){let o=l.replace(Nr,Mr);o.charAt(0)!=="-"&&(o="-"+o),n="data"+o}}i=En}return new i(r,n)}function Mr(e){return"-"+e.toLowerCase()}function Br(e){return e.charAt(1).toUpperCase()}const jr=_t([Nt,Dr,Mt,Bt,jt],"html"),Cn=_t([Nt,Or,Mt,Bt,jt],"svg");function du(e){const n=String(e||"").trim();return n?n.split(/[ \t\n\r\f]+/g):[]}function Hr(e){return e.join(" ").trim()}var In={},Yn=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,Ur=/\n/g,Vr=/^\s*/,qr=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,$r=/^:\s*/,Wr=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,Yr=/^[;\s]*/,Xr=/^\s+|\s+$/g,Qr=` +import{ax as We,a4 as Ot,j as Ze}from"./index-CHGpuh10.js";function hu(){}function mu(e){const n=[],t=String(e||"");let r=t.indexOf(","),i=0,l=!1;for(;!l;){r===-1&&(r=t.length,l=!0);const o=t.slice(i,r).trim();(o||!l)&&n.push(o),i=r+1,r=t.indexOf(",",i)}return n}function Ir(e,n){const t={};return(e[e.length-1]===""?[...e,""]:e).join((t.padRight?" ":"")+","+(t.padLeft===!1?"":" ")).trim()}const Tr=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Ar=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Pr={};function Vn(e,n){return(Pr.jsx?Ar:Tr).test(e)}const zr=/[ \t\n\f\r]/g;function Lr(e){return typeof e=="object"?e.type==="text"?qn(e.value):!1:qn(e)}function qn(e){return e.replace(zr,"")===""}class Me{constructor(n,t,r){this.normal=t,this.property=n,r&&(this.space=r)}}Me.prototype.normal={};Me.prototype.property={};Me.prototype.space=void 0;function _t(e,n){const t={},r={};for(const i of e)Object.assign(t,i.property),Object.assign(r,i.normal);return new Me(t,r,n)}function fn(e){return e.toLowerCase()}class J{constructor(n,t){this.attribute=t,this.property=n}}J.prototype.attribute="";J.prototype.booleanish=!1;J.prototype.boolean=!1;J.prototype.commaOrSpaceSeparated=!1;J.prototype.commaSeparated=!1;J.prototype.defined=!1;J.prototype.mustUseProperty=!1;J.prototype.number=!1;J.prototype.overloadedBoolean=!1;J.prototype.property="";J.prototype.spaceSeparated=!1;J.prototype.space=void 0;let vr=0;const z=be(),$=be(),hn=be(),k=be(),R=be(),Ie=be(),ee=be();function be(){return 2**++vr}const mn=Object.freeze(Object.defineProperty({__proto__:null,boolean:z,booleanish:$,commaOrSpaceSeparated:ee,commaSeparated:Ie,number:k,overloadedBoolean:hn,spaceSeparated:R},Symbol.toStringTag,{value:"Module"})),en=Object.keys(mn);class En extends J{constructor(n,t,r,i){let l=-1;if(super(n,t),$n(this,"space",i),typeof r=="number")for(;++l4&&t.slice(0,4)==="data"&&Fr.test(n)){if(n.charAt(4)==="-"){const l=n.slice(5).replace(Wn,Br);r="data"+l.charAt(0).toUpperCase()+l.slice(1)}else{const l=n.slice(4);if(!Wn.test(l)){let o=l.replace(Nr,Mr);o.charAt(0)!=="-"&&(o="-"+o),n="data"+o}}i=En}return new i(r,n)}function Mr(e){return"-"+e.toLowerCase()}function Br(e){return e.charAt(1).toUpperCase()}const jr=_t([Nt,Dr,Mt,Bt,jt],"html"),Cn=_t([Nt,Or,Mt,Bt,jt],"svg");function du(e){const n=String(e||"").trim();return n?n.split(/[ \t\n\r\f]+/g):[]}function Hr(e){return e.join(" ").trim()}var In={},Yn=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,Ur=/\n/g,Vr=/^\s*/,qr=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,$r=/^:\s*/,Wr=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,Yr=/^[;\s]*/,Xr=/^\s+|\s+$/g,Qr=` `,Xn="/",Qn="*",ke="",Gr="comment",Kr="declaration";function Jr(e,n){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];n=n||{};var t=1,r=1;function i(y){var b=y.match(Ur);b&&(t+=b.length);var T=y.lastIndexOf(Qr);r=~T?y.length-T:r+y.length}function l(){var y={line:t,column:r};return function(b){return b.position=new o(y),c(),b}}function o(y){this.start=y,this.end={line:t,column:r},this.source=n.source}o.prototype.content=e;function a(y){var b=new Error(n.source+":"+t+":"+r+": "+y);if(b.reason=y,b.filename=n.source,b.line=t,b.column=r,b.source=e,!n.silent)throw b}function u(y){var b=y.exec(e);if(b){var T=b[0];return i(T),e=e.slice(T.length),b}}function c(){u(Vr)}function s(y){var b;for(y=y||[];b=f();)b!==!1&&y.push(b);return y}function f(){var y=l();if(!(Xn!=e.charAt(0)||Qn!=e.charAt(1))){for(var b=2;ke!=e.charAt(b)&&(Qn!=e.charAt(b)||Xn!=e.charAt(b+1));)++b;if(b+=2,ke===e.charAt(b-1))return a("End of comment missing");var T=e.slice(2,b-2);return r+=2,i(T),e=e.slice(b),r+=2,y({type:Gr,comment:T})}}function d(){var y=l(),b=u(qr);if(b){if(f(),!u($r))return a("property missing ':'");var T=u(Wr),w=y({type:Kr,property:Gn(b[0].replace(Yn,ke)),value:T?Gn(T[0].replace(Yn,ke)):ke});return u(Yr),w}}function p(){var y=[];s(y);for(var b;b=d();)b!==!1&&(y.push(b),s(y));return y}return c(),p()}function Gn(e){return e?e.replace(Xr,ke):ke}var Zr=Jr,ei=We&&We.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(In,"__esModule",{value:!0});In.default=ti;const ni=ei(Zr);function ti(e,n){let t=null;if(!e||typeof e!="string")return t;const r=(0,ni.default)(e),i=typeof n=="function";return r.forEach(l=>{if(l.type!=="declaration")return;const{property:o,value:a}=l;i?n(o,a,l):a&&(t=t||{},t[o]=a)}),t}var Qe={};Object.defineProperty(Qe,"__esModule",{value:!0});Qe.camelCase=void 0;var ri=/^--[a-zA-Z0-9_-]+$/,ii=/-([a-z])/g,li=/^[^-]+$/,oi=/^-(webkit|moz|ms|o|khtml)-/,ai=/^-(ms)-/,ui=function(e){return!e||li.test(e)||ri.test(e)},si=function(e,n){return n.toUpperCase()},Kn=function(e,n){return"".concat(n,"-")},ci=function(e,n){return n===void 0&&(n={}),ui(e)?e:(e=e.toLowerCase(),n.reactCompat?e=e.replace(ai,Kn):e=e.replace(oi,Kn),e.replace(ii,si))};Qe.camelCase=ci;var pi=We&&We.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},fi=pi(In),hi=Qe;function dn(e,n){var t={};return!e||typeof e!="string"||(0,fi.default)(e,function(r,i){r&&i&&(t[(0,hi.camelCase)(r,n)]=i)}),t}dn.default=dn;var mi=dn;const di=Ot(mi),Ht=Ut("end"),Tn=Ut("start");function Ut(e){return n;function n(t){const r=t&&t.position&&t.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function gi(e){const n=Tn(e),t=Ht(e);if(n&&t)return{start:n,end:t}}function _e(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Jn(e.position):"start"in e||"end"in e?Jn(e):"line"in e||"column"in e?gn(e):""}function gn(e){return Zn(e&&e.line)+":"+Zn(e&&e.column)}function Jn(e){return gn(e&&e.start)+"-"+gn(e&&e.end)}function Zn(e){return e&&typeof e=="number"?e:1}class Q extends Error{constructor(n,t,r){super(),typeof t=="string"&&(r=t,t=void 0);let i="",l={},o=!1;if(t&&("line"in t&&"column"in t?l={place:t}:"start"in t&&"end"in t?l={place:t}:"type"in t?l={ancestors:[t],place:t.position}:l={...t}),typeof n=="string"?i=n:!l.cause&&n&&(o=!0,i=n.message,l.cause=n),!l.ruleId&&!l.source&&typeof r=="string"){const u=r.indexOf(":");u===-1?l.ruleId=r:(l.source=r.slice(0,u),l.ruleId=r.slice(u+1))}if(!l.place&&l.ancestors&&l.ancestors){const u=l.ancestors[l.ancestors.length-1];u&&(l.place=u.position)}const a=l.place&&"start"in l.place?l.place.start:l.place;this.ancestors=l.ancestors||void 0,this.cause=l.cause||void 0,this.column=a?a.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=a?a.line:void 0,this.name=_e(l.place)||"1:1",this.place=l.place||void 0,this.reason=this.message,this.ruleId=l.ruleId||void 0,this.source=l.source||void 0,this.stack=o&&l.cause&&typeof l.cause.stack=="string"?l.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Q.prototype.file="";Q.prototype.name="";Q.prototype.reason="";Q.prototype.message="";Q.prototype.stack="";Q.prototype.column=void 0;Q.prototype.line=void 0;Q.prototype.ancestors=void 0;Q.prototype.cause=void 0;Q.prototype.fatal=void 0;Q.prototype.place=void 0;Q.prototype.ruleId=void 0;Q.prototype.source=void 0;const An={}.hasOwnProperty,yi=new Map,xi=/[A-Z]/g,ki=new Set(["table","tbody","thead","tfoot","tr"]),bi=new Set(["td","th"]),Vt="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function wi(e,n){if(!n||n.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const t=n.filePath||void 0;let r;if(n.development){if(typeof n.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=zi(t,n.jsxDEV)}else{if(typeof n.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof n.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=Pi(t,n.jsx,n.jsxs)}const i={Fragment:n.Fragment,ancestors:[],components:n.components||{},create:r,elementAttributeNameCase:n.elementAttributeNameCase||"react",evaluater:n.createEvaluater?n.createEvaluater():void 0,filePath:t,ignoreInvalidStyle:n.ignoreInvalidStyle||!1,passKeys:n.passKeys!==!1,passNode:n.passNode||!1,schema:n.space==="svg"?Cn:jr,stylePropertyNameCase:n.stylePropertyNameCase||"dom",tableCellAlignToStyle:n.tableCellAlignToStyle!==!1},l=qt(i,e,void 0);return l&&typeof l!="string"?l:i.create(e,i.Fragment,{children:l||void 0},void 0)}function qt(e,n,t){if(n.type==="element")return Si(e,n,t);if(n.type==="mdxFlowExpression"||n.type==="mdxTextExpression")return Ei(e,n);if(n.type==="mdxJsxFlowElement"||n.type==="mdxJsxTextElement")return Ii(e,n,t);if(n.type==="mdxjsEsm")return Ci(e,n);if(n.type==="root")return Ti(e,n,t);if(n.type==="text")return Ai(e,n)}function Si(e,n,t){const r=e.schema;let i=r;n.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=Cn,e.schema=i),e.ancestors.push(n);const l=Wt(e,n.tagName,!1),o=Li(e,n);let a=zn(e,n);return ki.has(n.tagName)&&(a=a.filter(function(u){return typeof u=="string"?!Lr(u):!0})),$t(e,o,l,n),Pn(o,a),e.ancestors.pop(),e.schema=r,e.create(n,l,o,t)}function Ei(e,n){if(n.data&&n.data.estree&&e.evaluater){const r=n.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}Re(e,n.position)}function Ci(e,n){if(n.data&&n.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(n.data.estree);Re(e,n.position)}function Ii(e,n,t){const r=e.schema;let i=r;n.name==="svg"&&r.space==="html"&&(i=Cn,e.schema=i),e.ancestors.push(n);const l=n.name===null?e.Fragment:Wt(e,n.name,!0),o=vi(e,n),a=zn(e,n);return $t(e,o,l,n),Pn(o,a),e.ancestors.pop(),e.schema=r,e.create(n,l,o,t)}function Ti(e,n,t){const r={};return Pn(r,zn(e,n)),e.create(n,e.Fragment,r,t)}function Ai(e,n){return n.value}function $t(e,n,t,r){typeof t!="string"&&t!==e.Fragment&&e.passNode&&(n.node=r)}function Pn(e,n){if(n.length>0){const t=n.length>1?n:n[0];t&&(e.children=t)}}function Pi(e,n,t){return r;function r(i,l,o,a){const c=Array.isArray(o.children)?t:n;return a?c(l,o,a):c(l,o)}}function zi(e,n){return t;function t(r,i,l,o){const a=Array.isArray(l.children),u=Tn(r);return n(i,l,o,a,{columnNumber:u?u.column-1:void 0,fileName:e,lineNumber:u?u.line:void 0},void 0)}}function Li(e,n){const t={};let r,i;for(i in n.properties)if(i!=="children"&&An.call(n.properties,i)){const l=Di(e,i,n.properties[i]);if(l){const[o,a]=l;e.tableCellAlignToStyle&&o==="align"&&typeof a=="string"&&bi.has(n.tagName)?r=a:t[o]=a}}if(r){const l=t.style||(t.style={});l[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return t}function vi(e,n){const t={};for(const r of n.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const l=r.data.estree.body[0];l.type;const o=l.expression;o.type;const a=o.properties[0];a.type,Object.assign(t,e.evaluater.evaluateExpression(a.argument))}else Re(e,n.position);else{const i=r.name;let l;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const a=r.value.data.estree.body[0];a.type,l=e.evaluater.evaluateExpression(a.expression)}else Re(e,n.position);else l=r.value===null?!0:r.value;t[i]=l}return t}function zn(e,n){const t=[];let r=-1;const i=e.passKeys?new Map:yi;for(;++ri?0:i+n:n=n>i?i:n,t=t>0?t:0,r.length<1e4)o=Array.from(r),o.unshift(n,t),e.splice(...o);else for(t&&e.splice(n,t);l0?(se(e,e.length,0,n),e):n}const tt={}.hasOwnProperty;function ji(e){const n={};let t=-1;for(;++t13&&t<32||t>126&&t<160||t>55295&&t<57344||t>64975&&t<65008||(t&65535)===65535||(t&65535)===65534||t>1114111?"�":String.fromCodePoint(t)}function Te(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const ue=ge(/[A-Za-z]/),ne=ge(/[\dA-Za-z]/),Vi=ge(/[#-'*+\--9=?A-Z^-~]/);function yn(e){return e!==null&&(e<32||e===127)}const xn=ge(/\d/),qi=ge(/[\dA-Fa-f]/),$i=ge(/[!-/:-@[-`{-~]/);function A(e){return e!==null&&e<-2}function K(e){return e!==null&&(e<0||e===32)}function O(e){return e===-2||e===-1||e===32}const Wi=ge(new RegExp("\\p{P}|\\p{S}","u")),Yi=ge(/\s/);function ge(e){return n;function n(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function Pe(e){const n=[];let t=-1,r=0,i=0;for(;++t55295&&l<57344){const a=e.charCodeAt(t+1);l<56320&&a>56319&&a<57344?(o=String.fromCharCode(l,a),i=1):o="�"}else o=String.fromCharCode(l);o&&(n.push(e.slice(r,t),encodeURIComponent(o)),r=t+i+1,o=""),i&&(t+=i,i=0)}return n.join("")+e.slice(r)}function M(e,n,t,r){const i=r?r-1:Number.POSITIVE_INFINITY;let l=0;return o;function o(u){return O(u)?(e.enter(t),a(u)):n(u)}function a(u){return O(u)&&l++o))return;const _=n.events.length;let V=_,N,B;for(;V--;)if(n.events[V][0]==="exit"&&n.events[V][1].type==="chunkFlow"){if(N){B=n.events[V][1].end;break}N=!0}for(w(r),x=_;xE;){const U=t[j];n.containerState=U[1],U[0].exit.call(n,e)}t.length=E}function L(){i.write([null]),l=void 0,i=void 0,n.containerState._closeFlow=void 0}}function Ji(e,n,t){return M(e,e.attempt(this.parser.constructs.document,n,t),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function it(e){if(e===null||K(e)||Yi(e))return 1;if(Wi(e))return 2}function vn(e,n,t){const r=[];let i=-1;for(;++i1&&e[t][1].end.offset-e[t][1].start.offset>1?2:1;const f={...e[r][1].end},d={...e[t][1].start};lt(f,-u),lt(d,u),o={type:u>1?"strongSequence":"emphasisSequence",start:f,end:{...e[r][1].end}},a={type:u>1?"strongSequence":"emphasisSequence",start:{...e[t][1].start},end:d},l={type:u>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[t][1].start}},i={type:u>1?"strong":"emphasis",start:{...o.start},end:{...a.end}},e[r][1].end={...o.start},e[t][1].start={...a.end},c=[],e[r][1].end.offset-e[r][1].start.offset&&(c=te(c,[["enter",e[r][1],n],["exit",e[r][1],n]])),c=te(c,[["enter",i,n],["enter",o,n],["exit",o,n],["enter",l,n]]),c=te(c,vn(n.parser.constructs.insideSpan.null,e.slice(r+1,t),n)),c=te(c,[["exit",l,n],["enter",a,n],["exit",a,n],["exit",i,n]]),e[t][1].end.offset-e[t][1].start.offset?(s=2,c=te(c,[["enter",e[t][1],n],["exit",e[t][1],n]])):s=0,se(e,r-1,t-r+3,c),t=r+c.length-s-2;break}}for(t=-1;++t0&&O(x)?M(e,L,"linePrefix",l+1)(x):L(x)}function L(x){return x===null||A(x)?e.check(ot,b,j)(x):(e.enter("codeFlowValue"),E(x))}function E(x){return x===null||A(x)?(e.exit("codeFlowValue"),L(x)):(e.consume(x),E)}function j(x){return e.exit("codeFenced"),n(x)}function U(x,_,V){let N=0;return B;function B(D){return x.enter("lineEnding"),x.consume(D),x.exit("lineEnding"),I}function I(D){return x.enter("codeFencedFence"),O(D)?M(x,C,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(D):C(D)}function C(D){return D===a?(x.enter("codeFencedFenceSequence"),H(D)):V(D)}function H(D){return D===a?(N++,x.consume(D),H):N>=o?(x.exit("codeFencedFenceSequence"),O(D)?M(x,q,"whitespace")(D):q(D)):V(D)}function q(D){return D===null||A(D)?(x.exit("codeFencedFence"),_(D)):V(D)}}}function cl(e,n,t){const r=this;return i;function i(o){return o===null?t(o):(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),l)}function l(o){return r.parser.lazy[r.now().line]?t(o):n(o)}}const tn={name:"codeIndented",tokenize:fl},pl={partial:!0,tokenize:hl};function fl(e,n,t){const r=this;return i;function i(c){return e.enter("codeIndented"),M(e,l,"linePrefix",5)(c)}function l(c){const s=r.events[r.events.length-1];return s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?o(c):t(c)}function o(c){return c===null?u(c):A(c)?e.attempt(pl,o,u)(c):(e.enter("codeFlowValue"),a(c))}function a(c){return c===null||A(c)?(e.exit("codeFlowValue"),o(c)):(e.consume(c),a)}function u(c){return e.exit("codeIndented"),n(c)}}function hl(e,n,t){const r=this;return i;function i(o){return r.parser.lazy[r.now().line]?t(o):A(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),i):M(e,l,"linePrefix",5)(o)}function l(o){const a=r.events[r.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?n(o):A(o)?i(o):t(o)}}const ml={name:"codeText",previous:gl,resolve:dl,tokenize:yl};function dl(e){let n=e.length-4,t=3,r,i;if((e[t][1].type==="lineEnding"||e[t][1].type==="space")&&(e[n][1].type==="lineEnding"||e[n][1].type==="space")){for(r=t;++r=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+n+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return nthis.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-n+this.left.length).reverse():this.left.slice(n).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(n,t,r){const i=t||0;this.setCursor(Math.trunc(n));const l=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&De(this.left,r),l.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(n){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(n)}pushMany(n){this.setCursor(Number.POSITIVE_INFINITY),De(this.left,n)}unshift(n){this.setCursor(0),this.right.push(n)}unshiftMany(n){this.setCursor(0),De(this.right,n.reverse())}setCursor(n){if(!(n===this.left.length||n>this.left.length&&this.right.length===0||n<0&&this.left.length===0))if(n=4?n(o):e.interrupt(r.parser.constructs.flow,t,n)(o)}}function Zt(e,n,t,r,i,l,o,a,u){const c=u||Number.POSITIVE_INFINITY;let s=0;return f;function f(w){return w===60?(e.enter(r),e.enter(i),e.enter(l),e.consume(w),e.exit(l),d):w===null||w===32||w===41||yn(w)?t(w):(e.enter(r),e.enter(o),e.enter(a),e.enter("chunkString",{contentType:"string"}),b(w))}function d(w){return w===62?(e.enter(l),e.consume(w),e.exit(l),e.exit(i),e.exit(r),n):(e.enter(a),e.enter("chunkString",{contentType:"string"}),p(w))}function p(w){return w===62?(e.exit("chunkString"),e.exit(a),d(w)):w===null||w===60||A(w)?t(w):(e.consume(w),w===92?y:p)}function y(w){return w===60||w===62||w===92?(e.consume(w),p):p(w)}function b(w){return!s&&(w===null||w===41||K(w))?(e.exit("chunkString"),e.exit(a),e.exit(o),e.exit(r),n(w)):s999||p===null||p===91||p===93&&!u||p===94&&!a&&"_hiddenFootnoteSupport"in o.parser.constructs?t(p):p===93?(e.exit(l),e.enter(i),e.consume(p),e.exit(i),e.exit(r),n):A(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),s):(e.enter("chunkString",{contentType:"string"}),f(p))}function f(p){return p===null||p===91||p===93||A(p)||a++>999?(e.exit("chunkString"),s(p)):(e.consume(p),u||(u=!O(p)),p===92?d:f)}function d(p){return p===91||p===92||p===93?(e.consume(p),a++,f):f(p)}}function nr(e,n,t,r,i,l){let o;return a;function a(d){return d===34||d===39||d===40?(e.enter(r),e.enter(i),e.consume(d),e.exit(i),o=d===40?41:d,u):t(d)}function u(d){return d===o?(e.enter(i),e.consume(d),e.exit(i),e.exit(r),n):(e.enter(l),c(d))}function c(d){return d===o?(e.exit(l),u(o)):d===null?t(d):A(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),M(e,c,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),s(d))}function s(d){return d===o||d===null||A(d)?(e.exit("chunkString"),c(d)):(e.consume(d),d===92?f:s)}function f(d){return d===o||d===92?(e.consume(d),s):s(d)}}function Ne(e,n){let t;return r;function r(i){return A(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),t=!0,r):O(i)?M(e,r,t?"linePrefix":"lineSuffix")(i):n(i)}}const Il={name:"definition",tokenize:Al},Tl={partial:!0,tokenize:Pl};function Al(e,n,t){const r=this;let i;return l;function l(p){return e.enter("definition"),o(p)}function o(p){return er.call(r,e,a,t,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function a(p){return i=Te(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),u):t(p)}function u(p){return K(p)?Ne(e,c)(p):c(p)}function c(p){return Zt(e,s,t,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function s(p){return e.attempt(Tl,f,f)(p)}function f(p){return O(p)?M(e,d,"whitespace")(p):d(p)}function d(p){return p===null||A(p)?(e.exit("definition"),r.parser.defined.push(i),n(p)):t(p)}}function Pl(e,n,t){return r;function r(a){return K(a)?Ne(e,i)(a):t(a)}function i(a){return nr(e,l,t,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function l(a){return O(a)?M(e,o,"whitespace")(a):o(a)}function o(a){return a===null||A(a)?n(a):t(a)}}const zl={name:"hardBreakEscape",tokenize:Ll};function Ll(e,n,t){return r;function r(l){return e.enter("hardBreakEscape"),e.consume(l),i}function i(l){return A(l)?(e.exit("hardBreakEscape"),n(l)):t(l)}}const vl={name:"headingAtx",resolve:Dl,tokenize:Ol};function Dl(e,n){let t=e.length-2,r=3,i,l;return e[r][1].type==="whitespace"&&(r+=2),t-2>r&&e[t][1].type==="whitespace"&&(t-=2),e[t][1].type==="atxHeadingSequence"&&(r===t-1||t-4>r&&e[t-2][1].type==="whitespace")&&(t-=r+1===t?2:4),t>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[t][1].end},l={type:"chunkText",start:e[r][1].start,end:e[t][1].end,contentType:"text"},se(e,r,t-r+1,[["enter",i,n],["enter",l,n],["exit",l,n],["exit",i,n]])),e}function Ol(e,n,t){let r=0;return i;function i(s){return e.enter("atxHeading"),l(s)}function l(s){return e.enter("atxHeadingSequence"),o(s)}function o(s){return s===35&&r++<6?(e.consume(s),o):s===null||K(s)?(e.exit("atxHeadingSequence"),a(s)):t(s)}function a(s){return s===35?(e.enter("atxHeadingSequence"),u(s)):s===null||A(s)?(e.exit("atxHeading"),n(s)):O(s)?M(e,a,"whitespace")(s):(e.enter("atxHeadingText"),c(s))}function u(s){return s===35?(e.consume(s),u):(e.exit("atxHeadingSequence"),a(s))}function c(s){return s===null||s===35||K(s)?(e.exit("atxHeadingText"),a(s)):(e.consume(s),c)}}const _l=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],ut=["pre","script","style","textarea"],Nl={concrete:!0,name:"htmlFlow",resolveTo:Ml,tokenize:Bl},Fl={partial:!0,tokenize:Hl},Rl={partial:!0,tokenize:jl};function Ml(e){let n=e.length;for(;n--&&!(e[n][0]==="enter"&&e[n][1].type==="htmlFlow"););return n>1&&e[n-2][1].type==="linePrefix"&&(e[n][1].start=e[n-2][1].start,e[n+1][1].start=e[n-2][1].start,e.splice(n-2,2)),e}function Bl(e,n,t){const r=this;let i,l,o,a,u;return c;function c(m){return s(m)}function s(m){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(m),f}function f(m){return m===33?(e.consume(m),d):m===47?(e.consume(m),l=!0,b):m===63?(e.consume(m),i=3,r.interrupt?n:h):ue(m)?(e.consume(m),o=String.fromCharCode(m),T):t(m)}function d(m){return m===45?(e.consume(m),i=2,p):m===91?(e.consume(m),i=5,a=0,y):ue(m)?(e.consume(m),i=4,r.interrupt?n:h):t(m)}function p(m){return m===45?(e.consume(m),r.interrupt?n:h):t(m)}function y(m){const le="CDATA[";return m===le.charCodeAt(a++)?(e.consume(m),a===le.length?r.interrupt?n:C:y):t(m)}function b(m){return ue(m)?(e.consume(m),o=String.fromCharCode(m),T):t(m)}function T(m){if(m===null||m===47||m===62||K(m)){const le=m===47,ye=o.toLowerCase();return!le&&!l&&ut.includes(ye)?(i=1,r.interrupt?n(m):C(m)):_l.includes(o.toLowerCase())?(i=6,le?(e.consume(m),w):r.interrupt?n(m):C(m)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?t(m):l?L(m):E(m))}return m===45||ne(m)?(e.consume(m),o+=String.fromCharCode(m),T):t(m)}function w(m){return m===62?(e.consume(m),r.interrupt?n:C):t(m)}function L(m){return O(m)?(e.consume(m),L):B(m)}function E(m){return m===47?(e.consume(m),B):m===58||m===95||ue(m)?(e.consume(m),j):O(m)?(e.consume(m),E):B(m)}function j(m){return m===45||m===46||m===58||m===95||ne(m)?(e.consume(m),j):U(m)}function U(m){return m===61?(e.consume(m),x):O(m)?(e.consume(m),U):E(m)}function x(m){return m===null||m===60||m===61||m===62||m===96?t(m):m===34||m===39?(e.consume(m),u=m,_):O(m)?(e.consume(m),x):V(m)}function _(m){return m===u?(e.consume(m),u=null,N):m===null||A(m)?t(m):(e.consume(m),_)}function V(m){return m===null||m===34||m===39||m===47||m===60||m===61||m===62||m===96||K(m)?U(m):(e.consume(m),V)}function N(m){return m===47||m===62||O(m)?E(m):t(m)}function B(m){return m===62?(e.consume(m),I):t(m)}function I(m){return m===null||A(m)?C(m):O(m)?(e.consume(m),I):t(m)}function C(m){return m===45&&i===2?(e.consume(m),X):m===60&&i===1?(e.consume(m),W):m===62&&i===4?(e.consume(m),ie):m===63&&i===3?(e.consume(m),h):m===93&&i===5?(e.consume(m),ce):A(m)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(Fl,pe,H)(m)):m===null||A(m)?(e.exit("htmlFlowData"),H(m)):(e.consume(m),C)}function H(m){return e.check(Rl,q,pe)(m)}function q(m){return e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),D}function D(m){return m===null||A(m)?H(m):(e.enter("htmlFlowData"),C(m))}function X(m){return m===45?(e.consume(m),h):C(m)}function W(m){return m===47?(e.consume(m),o="",re):C(m)}function re(m){if(m===62){const le=o.toLowerCase();return ut.includes(le)?(e.consume(m),ie):C(m)}return ue(m)&&o.length<8?(e.consume(m),o+=String.fromCharCode(m),re):C(m)}function ce(m){return m===93?(e.consume(m),h):C(m)}function h(m){return m===62?(e.consume(m),ie):m===45&&i===2?(e.consume(m),h):C(m)}function ie(m){return m===null||A(m)?(e.exit("htmlFlowData"),pe(m)):(e.consume(m),ie)}function pe(m){return e.exit("htmlFlow"),n(m)}}function jl(e,n,t){const r=this;return i;function i(o){return A(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),l):t(o)}function l(o){return r.parser.lazy[r.now().line]?t(o):n(o)}}function Hl(e,n,t){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Ge,n,t)}}const Ul={name:"htmlText",tokenize:Vl};function Vl(e,n,t){const r=this;let i,l,o;return a;function a(h){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(h),u}function u(h){return h===33?(e.consume(h),c):h===47?(e.consume(h),U):h===63?(e.consume(h),E):ue(h)?(e.consume(h),V):t(h)}function c(h){return h===45?(e.consume(h),s):h===91?(e.consume(h),l=0,y):ue(h)?(e.consume(h),L):t(h)}function s(h){return h===45?(e.consume(h),p):t(h)}function f(h){return h===null?t(h):h===45?(e.consume(h),d):A(h)?(o=f,W(h)):(e.consume(h),f)}function d(h){return h===45?(e.consume(h),p):f(h)}function p(h){return h===62?X(h):h===45?d(h):f(h)}function y(h){const ie="CDATA[";return h===ie.charCodeAt(l++)?(e.consume(h),l===ie.length?b:y):t(h)}function b(h){return h===null?t(h):h===93?(e.consume(h),T):A(h)?(o=b,W(h)):(e.consume(h),b)}function T(h){return h===93?(e.consume(h),w):b(h)}function w(h){return h===62?X(h):h===93?(e.consume(h),w):b(h)}function L(h){return h===null||h===62?X(h):A(h)?(o=L,W(h)):(e.consume(h),L)}function E(h){return h===null?t(h):h===63?(e.consume(h),j):A(h)?(o=E,W(h)):(e.consume(h),E)}function j(h){return h===62?X(h):E(h)}function U(h){return ue(h)?(e.consume(h),x):t(h)}function x(h){return h===45||ne(h)?(e.consume(h),x):_(h)}function _(h){return A(h)?(o=_,W(h)):O(h)?(e.consume(h),_):X(h)}function V(h){return h===45||ne(h)?(e.consume(h),V):h===47||h===62||K(h)?N(h):t(h)}function N(h){return h===47?(e.consume(h),X):h===58||h===95||ue(h)?(e.consume(h),B):A(h)?(o=N,W(h)):O(h)?(e.consume(h),N):X(h)}function B(h){return h===45||h===46||h===58||h===95||ne(h)?(e.consume(h),B):I(h)}function I(h){return h===61?(e.consume(h),C):A(h)?(o=I,W(h)):O(h)?(e.consume(h),I):N(h)}function C(h){return h===null||h===60||h===61||h===62||h===96?t(h):h===34||h===39?(e.consume(h),i=h,H):A(h)?(o=C,W(h)):O(h)?(e.consume(h),C):(e.consume(h),q)}function H(h){return h===i?(e.consume(h),i=void 0,D):h===null?t(h):A(h)?(o=H,W(h)):(e.consume(h),H)}function q(h){return h===null||h===34||h===39||h===60||h===61||h===96?t(h):h===47||h===62||K(h)?N(h):(e.consume(h),q)}function D(h){return h===47||h===62||K(h)?N(h):t(h)}function X(h){return h===62?(e.consume(h),e.exit("htmlTextData"),e.exit("htmlText"),n):t(h)}function W(h){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),re}function re(h){return O(h)?M(e,ce,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(h):ce(h)}function ce(h){return e.enter("htmlTextData"),o(h)}}const Dn={name:"labelEnd",resolveAll:Yl,resolveTo:Xl,tokenize:Ql},ql={tokenize:Gl},$l={tokenize:Kl},Wl={tokenize:Jl};function Yl(e){let n=-1;const t=[];for(;++n=3&&(c===null||A(c))?(e.exit("thematicBreak"),n(c)):t(c)}function u(c){return c===i?(e.consume(c),r++,u):(e.exit("thematicBreakSequence"),O(c)?M(e,a,"whitespace")(c):a(c))}}const G={continuation:{tokenize:uo},exit:co,name:"list",tokenize:ao},lo={partial:!0,tokenize:po},oo={partial:!0,tokenize:so};function ao(e,n,t){const r=this,i=r.events[r.events.length-1];let l=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,o=0;return a;function a(p){const y=r.containerState.type||(p===42||p===43||p===45?"listUnordered":"listOrdered");if(y==="listUnordered"?!r.containerState.marker||p===r.containerState.marker:xn(p)){if(r.containerState.type||(r.containerState.type=y,e.enter(y,{_container:!0})),y==="listUnordered")return e.enter("listItemPrefix"),p===42||p===45?e.check(qe,t,c)(p):c(p);if(!r.interrupt||p===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),u(p)}return t(p)}function u(p){return xn(p)&&++o<10?(e.consume(p),u):(!r.interrupt||o<2)&&(r.containerState.marker?p===r.containerState.marker:p===41||p===46)?(e.exit("listItemValue"),c(p)):t(p)}function c(p){return e.enter("listItemMarker"),e.consume(p),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||p,e.check(Ge,r.interrupt?t:s,e.attempt(lo,d,f))}function s(p){return r.containerState.initialBlankLine=!0,l++,d(p)}function f(p){return O(p)?(e.enter("listItemPrefixWhitespace"),e.consume(p),e.exit("listItemPrefixWhitespace"),d):t(p)}function d(p){return r.containerState.size=l+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,n(p)}}function uo(e,n,t){const r=this;return r.containerState._closeFlow=void 0,e.check(Ge,i,l);function i(a){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,M(e,n,"listItemIndent",r.containerState.size+1)(a)}function l(a){return r.containerState.furtherBlankLines||!O(a)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(a)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(oo,n,o)(a))}function o(a){return r.containerState._closeFlow=!0,r.interrupt=void 0,M(e,e.attempt(G,n,t),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function so(e,n,t){const r=this;return M(e,i,"listItemIndent",r.containerState.size+1);function i(l){const o=r.events[r.events.length-1];return o&&o[1].type==="listItemIndent"&&o[2].sliceSerialize(o[1],!0).length===r.containerState.size?n(l):t(l)}}function co(e){e.exit(this.containerState.type)}function po(e,n,t){const r=this;return M(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(l){const o=r.events[r.events.length-1];return!O(l)&&o&&o[1].type==="listItemPrefixWhitespace"?n(l):t(l)}}const st={name:"setextUnderline",resolveTo:fo,tokenize:ho};function fo(e,n){let t=e.length,r,i,l;for(;t--;)if(e[t][0]==="enter"){if(e[t][1].type==="content"){r=t;break}e[t][1].type==="paragraph"&&(i=t)}else e[t][1].type==="content"&&e.splice(t,1),!l&&e[t][1].type==="definition"&&(l=t);const o={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",l?(e.splice(i,0,["enter",o,n]),e.splice(l+1,0,["exit",e[r][1],n]),e[r][1].end={...e[l][1].end}):e[r][1]=o,e.push(["exit",o,n]),e}function ho(e,n,t){const r=this;let i;return l;function l(c){let s=r.events.length,f;for(;s--;)if(r.events[s][1].type!=="lineEnding"&&r.events[s][1].type!=="linePrefix"&&r.events[s][1].type!=="content"){f=r.events[s][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||f)?(e.enter("setextHeadingLine"),i=c,o(c)):t(c)}function o(c){return e.enter("setextHeadingLineSequence"),a(c)}function a(c){return c===i?(e.consume(c),a):(e.exit("setextHeadingLineSequence"),O(c)?M(e,u,"lineSuffix")(c):u(c))}function u(c){return c===null||A(c)?(e.exit("setextHeadingLine"),n(c)):t(c)}}const mo={tokenize:go};function go(e){const n=this,t=e.attempt(Ge,r,e.attempt(this.parser.constructs.flowInitial,i,M(e,e.attempt(this.parser.constructs.flow,i,e.attempt(bl,i)),"linePrefix")));return t;function r(l){if(l===null){e.consume(l);return}return e.enter("lineEndingBlank"),e.consume(l),e.exit("lineEndingBlank"),n.currentConstruct=void 0,t}function i(l){if(l===null){e.consume(l);return}return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),n.currentConstruct=void 0,t}}const yo={resolveAll:rr()},xo=tr("string"),ko=tr("text");function tr(e){return{resolveAll:rr(e==="text"?bo:void 0),tokenize:n};function n(t){const r=this,i=this.parser.constructs[e],l=t.attempt(i,o,a);return o;function o(s){return c(s)?l(s):a(s)}function a(s){if(s===null){t.consume(s);return}return t.enter("data"),t.consume(s),u}function u(s){return c(s)?(t.exit("data"),l(s)):(t.consume(s),u)}function c(s){if(s===null)return!0;const f=i[s];let d=-1;if(f)for(;++d-1){const a=o[0];typeof a=="string"?o[0]=a.slice(r):o.shift()}l>0&&o.push(e[i].slice(0,l))}return o}function Oo(e,n){let t=-1;const r=[];let i;for(;++t0){const oe=P.tokenStack[P.tokenStack.length-1];(oe[1]||pt).call(P,void 0,oe[0])}for(S.position={start:de(g.length>0?g[0][1].start:{line:1,column:1,offset:0}),end:de(g.length>0?g[g.length-2][1].end:{line:1,column:1,offset:0})},F=-1;++F0?{type:"text",value:y}:void 0),y===!1?p.lastIndex=v+1:(m!==v&&w.push({type:"text",value:s.value.slice(m,v)}),Array.isArray(y)?w.push(...y):y&&w.push(y),m=v+d[0].length,k=!0),!p.global)break;d=p.exec(s.value)}return k?(m?\]}]+$/.exec(e);if(!n)return[e,void 0];e=e.slice(0,n.index);let t=n[0],i=t.indexOf(")");const o=re(e,"(");let a=re(e,")");for(;i!==-1&&o>a;)e+=t.slice(0,i+1),t=t.slice(i+1),i=t.indexOf(")"),a++;return[e,t]}function he(e,n){const t=e.input.charCodeAt(e.index-1);return(e.index===0||I(t)||Z(t))&&(!n||t!==47)}me.peek=pt;function ot(){this.buffer()}function at(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function ut(){this.buffer()}function st(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function ct(e){const n=this.resume(),t=this.stack[this.stack.length-1];E(t.type==="footnoteReference"),t.identifier=O(this.sliceSerialize(e)).toLowerCase(),t.label=n}function ft(e){this.exit(e)}function ht(e){const n=this.resume(),t=this.stack[this.stack.length-1];E(t.type==="footnoteDefinition"),t.identifier=O(this.sliceSerialize(e)).toLowerCase(),t.label=n}function mt(e){this.exit(e)}function pt(){return"["}function me(e,n,t,i){const o=t.createTracker(i);let a=o.move("[^");const r=t.enter("footnoteReference"),u=t.enter("reference");return a+=o.move(t.safe(t.associationId(e),{after:"]",before:a})),u(),r(),a+=o.move("]"),a}function gt(){return{enter:{gfmFootnoteCallString:ot,gfmFootnoteCall:at,gfmFootnoteDefinitionLabelString:ut,gfmFootnoteDefinition:st},exit:{gfmFootnoteCallString:ct,gfmFootnoteCall:ft,gfmFootnoteDefinitionLabelString:ht,gfmFootnoteDefinition:mt}}}function kt(e){let n=!1;return e&&e.firstLineBlank&&(n=!0),{handlers:{footnoteDefinition:t,footnoteReference:me},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function t(i,o,a,r){const u=a.createTracker(r);let l=u.move("[^");const s=a.enter("footnoteDefinition"),h=a.enter("label");return l+=u.move(a.safe(a.associationId(i),{before:l,after:"]"})),h(),l+=u.move("]:"),i.children&&i.children.length>0&&(u.shift(4),l+=u.move((n?` +import{c as ce,v as _e,o as E,u as I,e as Z,g as O,i as W,j as Oe,t as fe,E as je,k as J,l as M,q as A,r as Be,w as qe,f as S,x as H,y as We,m as P,z as T,A as $e}from"./index-B141zdPU.js";function re(e,n){const t=String(e);if(typeof n!="string")throw new TypeError("Expected character");let i=0,o=t.indexOf(n);for(;o!==-1;)i++,o=t.indexOf(n,o+n.length);return i}function He(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function Ue(e,n,t){const o=ce((t||{}).ignore||[]),a=Ve(n);let r=-1;for(;++r0?{type:"text",value:y}:void 0),y===!1?p.lastIndex=v+1:(m!==v&&w.push({type:"text",value:s.value.slice(m,v)}),Array.isArray(y)?w.push(...y):y&&w.push(y),m=v+d[0].length,k=!0),!p.global)break;d=p.exec(s.value)}return k?(m?\]}]+$/.exec(e);if(!n)return[e,void 0];e=e.slice(0,n.index);let t=n[0],i=t.indexOf(")");const o=re(e,"(");let a=re(e,")");for(;i!==-1&&o>a;)e+=t.slice(0,i+1),t=t.slice(i+1),i=t.indexOf(")"),a++;return[e,t]}function he(e,n){const t=e.input.charCodeAt(e.index-1);return(e.index===0||I(t)||Z(t))&&(!n||t!==47)}me.peek=pt;function ot(){this.buffer()}function at(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function ut(){this.buffer()}function st(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function ct(e){const n=this.resume(),t=this.stack[this.stack.length-1];E(t.type==="footnoteReference"),t.identifier=O(this.sliceSerialize(e)).toLowerCase(),t.label=n}function ft(e){this.exit(e)}function ht(e){const n=this.resume(),t=this.stack[this.stack.length-1];E(t.type==="footnoteDefinition"),t.identifier=O(this.sliceSerialize(e)).toLowerCase(),t.label=n}function mt(e){this.exit(e)}function pt(){return"["}function me(e,n,t,i){const o=t.createTracker(i);let a=o.move("[^");const r=t.enter("footnoteReference"),u=t.enter("reference");return a+=o.move(t.safe(t.associationId(e),{after:"]",before:a})),u(),r(),a+=o.move("]"),a}function gt(){return{enter:{gfmFootnoteCallString:ot,gfmFootnoteCall:at,gfmFootnoteDefinitionLabelString:ut,gfmFootnoteDefinition:st},exit:{gfmFootnoteCallString:ct,gfmFootnoteCall:ft,gfmFootnoteDefinitionLabelString:ht,gfmFootnoteDefinition:mt}}}function kt(e){let n=!1;return e&&e.firstLineBlank&&(n=!0),{handlers:{footnoteDefinition:t,footnoteReference:me},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function t(i,o,a,r){const u=a.createTracker(r);let l=u.move("[^");const s=a.enter("footnoteDefinition"),h=a.enter("label");return l+=u.move(a.safe(a.associationId(i),{before:l,after:"]"})),h(),l+=u.move("]:"),i.children&&i.children.length>0&&(u.shift(4),l+=u.move((n?` `:" ")+a.indentLines(a.containerFlow(i,u.current()),n?pe:bt))),s(),l}}function bt(e,n,t){return n===0?e:pe(e,n,t)}function pe(e,n,t){return(t?"":" ")+e}const xt=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];ge.peek=vt;function wt(){return{canContainEols:["delete"],enter:{strikethrough:yt},exit:{strikethrough:Ct}}}function dt(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:xt}],handlers:{delete:ge}}}function yt(e){this.enter({type:"delete",children:[]},e)}function Ct(e){this.exit(e)}function ge(e,n,t,i){const o=t.createTracker(i),a=t.enter("strikethrough");let r=o.move("~~");return r+=t.containerPhrasing(e,{...o.current(),before:r,after:"~"}),r+=o.move("~~"),a(),r}function vt(){return"~"}function At(e){return e.length}function Dt(e,n){const t=n||{},i=(t.align||[]).concat(),o=t.stringLength||At,a=[],r=[],u=[],l=[];let s=0,h=-1;for(;++hs&&(s=e[h].length);++kl[k])&&(l[k]=d)}b.push(w)}r[h]=b,u[h]=x}let c=-1;if(typeof i=="object"&&"length"in i)for(;++cl[c]&&(l[c]=w),g[c]=w),p[c]=d}r.splice(1,0,p),u.splice(1,0,g),h=-1;const m=[];for(;++h "),a.shift(2);const r=t.indentLines(t.containerFlow(e,a.current()),Lt);return o(),r}function Lt(e,n,t){return">"+(t?"":" ")+e}function Tt(e,n){return le(e,n.inConstruct,!0)&&!le(e,n.notInConstruct,!1)}function le(e,n,t){if(typeof n=="string"&&(n=[n]),!n||n.length===0)return t;let i=-1;for(;++ii.map(i=>d[i]); +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/AuthorizePaperEditView-BmKMH1AZ.js","assets/useMutation-3fOqWcpt.js","assets/button-C4kqC3Av.js","assets/paperEdits-DFgln8kE.js","assets/FollowingView-e1HW5vmf.js","assets/FeedView-wNAf1UnM.js","assets/sparkles-BSDHUYSH.js","assets/dialog-BfI2DQVf.js","assets/catalog-DMzmJg__.js","assets/researchTopic-DK_KbYKH.js","assets/transform-Cs8_lTDx.js","assets/plus-CYgr1KdS.js","assets/arrow-right-CUTKRnAt.js","assets/PaperFeed-DjmnPHUi.js","assets/PaperCard-BtCEa6CD.js","assets/AuthorAvatar-fJxhX3fO.js","assets/AuthorAvatar-o5W6pl_W.css","assets/SotaBadges-D825CK6n.js","assets/colors-BkWRhvFI.js","assets/Icon-CRWrVPWO.js","assets/LatexTitle-CfeEppH3.js","assets/papers-BPpxs2sO.js","assets/curation-DI9_zYNx.js","assets/safeExternalHref-CkBrsh84.js","assets/popover-BHpRw7vT.js","assets/skeleton-Df0GaMuw.js","assets/useIntersectionObserver-DZSpsOQX.js","assets/McpShowcase-D5BEHBL4.js","assets/AgentLogos-PqR86_NK.js","assets/chatSessions-BuiIkSLS.js","assets/chat-CuiFt2kN.js","assets/usePapers-DzyOc-Ae.js","assets/useInfiniteQuery-DhWyWKGj.js","assets/alert-DPvmCXZT.js","assets/ChatView-BYQGLYvv.js","assets/chatLifecycle-Bdz7bFwH.js","assets/hover-card-Dz7z6DCn.js","assets/CatalogEntityPreviewLink-C5CxvSnT.js","assets/github-CRId1LT2.js","assets/file-text-DPLtNP9U.js","assets/PaperPreviewLink-CPkn2Kqv.js","assets/index-B141zdPU.js","assets/index-BzjqtLRb.js","assets/katex-DkKDou_j.js","assets/thumbs-up-BGuynS0P.js","assets/copy-CvlL053K.js","assets/queryOptions-C9woPjwX.js","assets/arrow-left-C11GHdHp.js","assets/external-link-CeQVHd7V.js","assets/search-Czb1C2Q7.js","assets/chevron-up-BnyqTe42.js","assets/chatLifecycle-Lr_OJaUk.css","assets/katex-wklAmtGL.css","assets/share-2-8l7A6ayI.js","assets/openrouter-CqtCKiJB.js","assets/SharedChatView-pWPy2puC.js","assets/PapersListView-BkLVnEdQ.js","assets/useDebounce-ifvvHuBF.js","assets/apiErrors-CvxFAcrW.js","assets/frameworks-DDA0P4Tf.js","assets/PaperDetailView-BGo-dK6S.js","assets/ExternalSourceEvalBadge-CMfiSNvf.js","assets/ExternalSourceEvalBadge-CWUQ52cV.css","assets/paperReader-h6jqpWHI.js","assets/useDocumentTitle-Deu479Zd.js","assets/preferences-BR-SGx3E.js","assets/account-D9O54ufU.js","assets/evaluationQueryInvalidation-oiaNU_fe.js","assets/queryInvalidation-rIB0mIr9.js","assets/input-FDP77A0C.js","assets/searchable-select-9e2cCX5g.js","assets/loader-circle-DuUnmHjj.js","assets/SignInToEditDialog-B3EJVut1.js","assets/textarea-CDMkQNbH.js","assets/submissions-BHHAmt53.js","assets/database-DYuYu8SE.js","assets/badge-DZeCGN5Q.js","assets/globe-CR-SV3ud.js","assets/index-CWaI9Snb.js","assets/codex-WU2WBMcn.js","assets/savedPapersAuth-Coc4Zc7v.js","assets/organizationNames-BVKzYEBp.js","assets/PaperDetailView-CUWCgV3F.css","assets/PaperReaderView-BEoTUiXT.js","assets/MarkdownText-D0AGKKJ1.js","assets/TagsIndexView-Bkf2GkuQ.js","assets/slug-BpH-Nkvz.js","assets/triangle-alert-nsUjBiKf.js","assets/trending-up-Cqe6Lpc9.js","assets/moon-DPD0RWyO.js","assets/trophy-BFUARFPy.js","assets/activity-CPcCgbtC.js","assets/AreaSection-BVX3JiNc.js","assets/TaxonomySuggestionTile-QKr6E6VG.js","assets/useHashScrollOnReady-BOZxHdDU.js","assets/areas-Dvi8w2dp.js","assets/TagBrowseView-B4ApRi7q.js","assets/ResearchFollowButton-DFGdTBex.js","assets/BenchmarkTrendSparkline-dQdt-ejq.js","assets/NotFound-Bc6y0g0J.js","assets/MethodsIndexView-CPxYYZYk.js","assets/FrameworksIndexView-D3oe8htL.js","assets/TrendsView-C7Tf25qK.js","assets/ConferencesIndexView-CYTn_PTx.js","assets/deadlines-BH32v7D1.js","assets/AiDeadlinesView-Ad6LnMOr.js","assets/switch-CD23XWT7.js","assets/ConferenceDetailView-BEtffUKD.js","assets/conferenceListings-BnmhBx-_.js","assets/ConferenceTaskView-BAq9JbyI.js","assets/OrganizationsIndexView-BfbGHJbZ.js","assets/OrganizationsIndexView-CJnrfIkP.css","assets/OrganizationDetailView-DiOUhHgj.js","assets/OrganizationContributionGraph-Dd08m_k9.js","assets/AuthorDetailView-HZ2z-PQp.js","assets/MethodDetailView-BI5O9w4y.js","assets/BenchmarkDetailView-BomzuNed.js","assets/BenchmarkDetailView-CXxK75GR.css","assets/SavedPapersView-B2OtoH-9.js","assets/SettingsView-DSsDYMnQ.js","assets/PrivacyView-Dv3D7fuz.js","assets/ApiDocsView-DT_kBPK6.js","assets/ApiDocsView-DPuMdYvY.css","assets/McpView-B1VMxy4R.js","assets/McpView-EGeqkP46.css","assets/SubmitView-Ddks3aKH.js","assets/CronDashboard-BrJey03Y.js","assets/CronDashboard-CgnzKY0g.js","assets/CronDashboard-DwChfW9h.css","assets/refresh-cw-BmXCr1RQ.js","assets/circle-check-B_15foPp.js","assets/AutonomousOperations-Ch9vfeiA.js","assets/SubmissionsDashboard-D9hqPZPB.js","assets/SubmissionsDashboard-BTmvDoLW.css","assets/UserProfileView-xzT46sjD.js","assets/RateLimitsView-CHGVVIWH.js","assets/AstraForRoboticsView-BiXYC0gV.js","assets/AstraForRoboticsView-C_lTF_XB.css","assets/SearchOverlay-DLtGxH8I.js","assets/StagingAccessRequestView-B7Yf73-b.js"])))=>i.map(i=>d[i]); var Uk=Object.defineProperty;var ym=e=>{throw TypeError(e)};var Vk=(e,t,n)=>t in e?Uk(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var kr=(e,t,n)=>Vk(e,typeof t!="symbol"?t+"":t,n),Nd=(e,t,n)=>t.has(e)||ym("Cannot "+n);var k=(e,t,n)=>(Nd(e,t,"read from private field"),n?n.call(e):t.get(e)),X=(e,t,n)=>t.has(e)?ym("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),H=(e,t,n,r)=>(Nd(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),ue=(e,t,n)=>(Nd(e,t,"access private method"),n);var Tl=(e,t,n,r)=>({set _(i){H(e,t,i,n)},get _(){return k(e,t,r)}});function Bk(e,t){for(var n=0;nr[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}})();var nz=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function aw(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var lw={exports:{}},Gc={},uw={exports:{}},le={};/** * @license React * react.production.min.js @@ -159,4 +159,4 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const d2=Id("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),f2=n2,h2=r2,p2=g.forwardRef(({className:e,inset:t,children:n,...r},i)=>w.jsxs(lk,{ref:i,className:ct("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[state=open]:bg-accent focus:bg-accent",t&&"pl-8",e),...r,children:[n,w.jsx(u2,{className:"ml-auto h-4 w-4"})]}));p2.displayName=lk.displayName;const v2=g.forwardRef(({className:e,...t},n)=>w.jsx(uk,{ref:n,className:ct("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t}));v2.displayName=uk.displayName;const dk=g.forwardRef(({className:e,sideOffset:t=4,...n},r)=>w.jsx(i2,{children:w.jsx(tk,{ref:r,sideOffset:t,className:ct("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n})}));dk.displayName=tk.displayName;const er=g.forwardRef(({className:e,inset:t,...n},r)=>w.jsx(rk,{ref:r,className:ct("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",t&&"pl-8",e),...n}));er.displayName=rk.displayName;const g2=g.forwardRef(({className:e,children:t,checked:n,...r},i)=>w.jsxs(ik,{ref:i,className:ct("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",e),checked:n,...r,children:[w.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:w.jsx(ok,{children:w.jsx(l2,{className:"h-4 w-4"})})}),t]}));g2.displayName=ik.displayName;const m2=g.forwardRef(({className:e,children:t,...n},r)=>w.jsxs(sk,{ref:r,className:ct("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",e),...n,children:[w.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:w.jsx(ok,{children:w.jsx(c2,{className:"h-2 w-2 fill-current"})})}),t]}));m2.displayName=sk.displayName;const fk=g.forwardRef(({className:e,inset:t,...n},r)=>w.jsx(nk,{ref:r,className:ct("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n}));fk.displayName=nk.displayName;const uv=g.forwardRef(({className:e,...t},n)=>w.jsx(ak,{ref:n,className:ct("-mx-1 my-1 h-px bg-muted",e),...t}));uv.displayName=ak.displayName;function y2(e){const n=(e.name||e.username||"?").trim().split(/\s+/).filter(Boolean);return n.length===0?"?":n.length===1?n[0][0].toUpperCase():(n[0][0]+n[n.length-1][0]).toUpperCase()}const _2=({user:e,onLogout:t})=>w.jsxs(f2,{children:[w.jsx(h2,{asChild:!0,children:w.jsx("button",{type:"button",className:"user-avatar-btn","aria-label":`Account menu for ${e.username}`,children:w.jsxs(D1,{className:"h-8 w-8",children:[e.avatar_url&&w.jsx(z1,{src:e.avatar_url,alt:e.username}),w.jsx(U1,{className:"text-xs",children:y2(e)})]})})}),w.jsxs(dk,{align:"end",className:"w-56",children:[w.jsxs(fk,{className:"flex flex-col gap-0.5 py-2",children:[w.jsx("span",{className:"text-sm font-medium leading-tight",children:e.name||e.username}),w.jsxs("span",{className:"text-xs font-normal text-muted-foreground",children:["@",e.username]}),e.is_admin&&w.jsx("span",{className:"mt-1 inline-flex w-fit items-center rounded-full bg-amber-100 px-2 py-0.5 text-[10px] font-medium uppercase tracking-wide text-amber-900",children:"Admin"}),e.role==="contributor"&&w.jsx("span",{className:"mt-1 inline-flex w-fit items-center rounded-full bg-blue-100 px-2 py-0.5 text-[10px] font-medium uppercase tracking-wide text-blue-900",children:"Contributor"})]}),w.jsx(uv,{}),w.jsx(er,{asChild:!0,children:w.jsx("a",{href:`https://huggingface.co/${encodeURIComponent(e.username)}`,target:"_blank",rel:"noopener noreferrer",children:"Hugging Face profile"})}),w.jsx(er,{asChild:!0,children:w.jsx(bn,{to:"/frameworks",children:"Frameworks"})}),w.jsx(er,{asChild:!0,children:w.jsx(bn,{to:"/trends",children:"Trends"})}),e.is_admin&&w.jsxs(w.Fragment,{children:[w.jsx(er,{asChild:!0,children:w.jsx(bn,{to:"/admin-dashboard",children:"Admin dashboard"})}),w.jsx(er,{asChild:!0,children:w.jsx(bn,{to:"/submissions",children:"Review submissions"})})]}),w.jsx(er,{asChild:!0,children:w.jsx(bn,{to:`/${encodeURIComponent(e.username)}`,children:"My contributions"})}),w.jsx(er,{asChild:!0,children:w.jsx(bn,{to:"/settings",children:"Settings"})}),w.jsx(uv,{}),w.jsx(er,{onSelect:n=>{n.preventDefault(),t()},children:"Log out"})]})]}),w2=!1;class Od extends Error{constructor(n,r){var i;super(`API request failed: ${n.status} ${n.statusText}`);kr(this,"status");kr(this,"statusText");kr(this,"response");kr(this,"detail");kr(this,"code");kr(this,"displayMessage");this.name="ApiError",this.status=n.status,this.statusText=n.statusText,this.response=r;try{if(this.detail=(i=JSON.parse(r))==null?void 0:i.detail,typeof this.detail=="string"&&(this.message=this.detail),Array.isArray(this.detail)){const s=this.detail[0];typeof s=="object"&&s!==null&&"msg"in s&&typeof s.msg=="string"&&(this.message=s.msg)}if(typeof this.detail=="object"&&this.detail!==null&&"code"in this.detail&&typeof this.detail.code=="string"&&(this.code=this.detail.code),typeof this.detail=="object"&&this.detail!==null&&"message"in this.detail&&typeof this.detail.message=="string"){const s="help"in this.detail&&typeof this.detail.help=="string"?` See ${this.detail.help} for help.`:"";this.message=`${this.detail.message}${s}`}}catch{this.detail=void 0,this.displayMessage=r||this.message;return}this.displayMessage=this.message}}function _z(e,t){return e instanceof Od?e.displayMessage||t:typeof e=="object"&&e!==null&&"message"in e&&typeof e.message=="string"&&e.message||t}class x2{constructor(t){this.baseUrl=t}async fetch(t,n){const r=`${this.baseUrl}${t}`;try{const{headers:i,...s}=n??{},a=(s.method??"GET").toUpperCase()==="GET"?"default":"no-store",l=new Headers(i);return typeof s.body=="string"&&!l.has("Content-Type")&&l.set("Content-Type","application/json"),await fetch(r,{...s,cache:s.cache??a,credentials:s.credentials??"include",headers:l})}catch(i){throw console.error(`[API] Request to ${r} failed:`,i),i}}async fetchOk(t,n){const r=await this.fetch(t,n);if(!r.ok){const i=new Od(r,await r.text());throw console.error("[API] Error response:",i.response),i}return r}async request(t,n){const r=await this.fetchOk(t,n);return r.status===204?void 0:await r.json()}}function b2(e){e instanceof Od&&e.status===401&&e.code!=="fresh_auth_required"&&e.code!=="saved_papers_bucket_authorization_required"&&typeof window<"u"&&window.dispatchEvent(new CustomEvent("pwc:auth-stale"))}async function hk(e){try{return await e()}catch(t){throw b2(t),t}}const cm=new x2(`${Bg()}/api/v1`),E2=(e,t)=>cm.fetch(e,t),wz=(e,t)=>hk(()=>cm.fetchOk(e,t)),cv=(e,t)=>hk(()=>cm.request(e,t));async function xz(e,t){try{return await cv(e,t)}catch(n){if(n instanceof Od&&n.status===404)return null;throw n}}const z0={async getCurrentUser(){if($o())return null;const e=await E2("/auth/me",{cache:"no-store"});return e.status===401||!e.ok?null:e.json()},async logout(){await cv("/auth/logout",{method:"POST"})},async requestStagingAccess(){await cv("/staging-access-request",{method:"POST"})}},S2={detail:e=>["paper",e],arxiv:e=>["paper-arxiv",e],preview:e=>["paper-preview",e],summary:e=>["paper-summary",e],feeds:{list:["papers"],infinite:["papers-infinite"],xTrending:["x-trending-papers-infinite"],following:["research-feed"],search:["paper-search-feed"],task:["task-papers-infinite"],conference:["conference-papers-infinite"],organization:["organization-papers-infinite"],method:["method-papers-infinite"],saved:["my-bookmarks"],related:["related-papers"],versions:["paper-versions"],searchOverlay:["search-papers"],mentions:["chat-paper-mention-search"],trending:["trending-papers"]}},bz=10*60*1e3,hu={me:["auth","me"]},Ez={preferences:["account","preferences"],bookmarkIds:["my-bookmark-ids"]},Sz={areas:["areas-all"],area:e=>["area",e],topTasksSidebar:["top-tasks-sidebar"],task:e=>["task",e],method:e=>["method",e],organization:e=>["organization",e],dataset:e=>["dataset",e],datasets:["dataset"],datasetTasks:["dataset-tasks"],taskPage:["task-page"],taskBenchmarkTrends:["task-benchmark-trends"],organizations:["organizations"]},Cz={all:["evaluations"],byPaper:e=>["evaluations","paper",e],byPaperAll:["evaluations","paper"],byDatasetAll:["dataset-evals"],byDataset:e=>["dataset-evals",e]},kz={pendingEdits:["pendingPaperEdits"]},Pz={all:["admin"],cronStatus:["admin","cronStatus"],chatSandboxSpend:e=>["admin","chatSandboxSpend",e],chatWebSearchBudget:["admin","chatWebSearchBudget"],autonomousOperations:["admin","autonomousOperations"],paperMarkdownJobs:["admin","paperMarkdownJobs"],codexPaperJobs:["admin","codexPaperJobs"],codexPaperJob:(e,t)=>["admin","codexPaperJob",e,t],catalogAudit:["catalog-audit"]},Rz={follows:e=>["research-follows",e],topic:e=>["research-topic",e],email:e=>["research-email",e],feed:e=>[...S2.feeds.following,e]},dm=q.createContext(null),U0="pwc:auth-stale",C2=({children:e})=>{const t=zS(),n=cN({queryKey:hu.me,queryFn:()=>z0.getCurrentUser(),staleTime:1/0}),r=n.data??null,i=q.useRef(null),{refetch:s}=n,o=q.useCallback(async()=>{await s()},[s]),a=q.useCallback(async()=>{const u=qg("/api/v1/auth/logout");if(new URL(u,window.location.origin).origin!==window.location.origin){const c=document.createElement("form");c.method="POST",c.action=`${u}?return_to=${encodeURIComponent(window.location.href)}`,document.body.appendChild(c),c.submit();return}await z0.logout(),t.setQueryData(hu.me,null)},[t]);q.useEffect(()=>{},[r]),q.useEffect(()=>{i.current&&!r&&t.resetQueries({predicate:u=>u.queryKey[0]!==hu.me[0]}),i.current=r},[t,r]),q.useEffect(()=>{const u=()=>t.setQueryData(hu.me,null);return window.addEventListener(U0,u),()=>window.removeEventListener(U0,u)},[t]);const l=q.useMemo(()=>({user:r,isLoading:n.isPending,refresh:o,logout:a}),[r,n.isPending,o,a]);return w.jsx(dm.Provider,{value:l,children:e})};function pk(){const e=q.useContext(dm);if(!e)throw new Error("useAuth must be used inside an ");return e}function Tz(){return q.useContext(dm)}const Mr=({name:e,size:t=14})=>{const n={search:w.jsx("path",{d:"M11 11l3 3M7 12.5a5.5 5.5 0 110-11 5.5 5.5 0 010 11z",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinecap:"round"}),bookmark:w.jsx("path",{d:"M4 2h8v12l-4-3-4 3V2z",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinejoin:"round"}),menu:w.jsx("path",{d:"M2 4h12M2 8h12M2 12h12",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"}),close:w.jsx("path",{d:"M3 3l10 10M13 3L3 13",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"}),github:w.jsx("path",{fill:"currentColor",d:"M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z"})};return w.jsx("svg",{className:t===11?"icon-sm":"icon",viewBox:"0 0 16 16",width:t,height:t,children:n[e]})},V0="https://github.com/huggingface/paperswithcode-feedback/issues",B0="https://github.com/huggingface/paperswithcode",k2="https://paperswithcode.co/following",q0="pwc:announcement:following-feed:v1:dismissed",th=[{to:"/",label:"Trending",end:!0},{to:"/tasks",label:"Browse state-of-the-art",end:!1},{to:"/methods",label:"Methods",end:!1},{to:"/conferences",label:"Conferences",end:!1},{to:"/organizations",label:"Organizations",end:!1},{to:"/submit",label:"Submit",end:!1}],P2=()=>{if(typeof navigator>"u")return!1;const e=navigator.userAgentData,t=(e==null?void 0:e.platform)||navigator.platform||navigator.userAgent||"";return/Mac|iPhone|iPad|iPod/i.test(t)},R2=()=>{const[e,t]=q.useState(!1);return q.useEffect(()=>{t(P2())},[]),w.jsx("kbd",{children:e?"⌘K":"Ctrl K"})},T2=({onOpenSearch:e})=>{const[t,n]=q.useState(!1),[r,i]=q.useState(()=>localStorage.getItem(q0)!=="1"),s=q.useRef(null),o=q.useRef(null),a=()=>n(!1),{user:l,logout:u}=pk(),c=hn(),d=c.pathname.startsWith("/pdf/"),f=`${c.pathname}${c.search}`||"/",m=$o(),_=al()?{to:"/chat",label:"Chat",end:!1,badge:"New"}:nF()?{to:"/chat",label:"Chat",end:!1,badge:"New",href:tF}:null,p=_?[th[0],_,...th.slice(1)]:th;return q.useLayoutEffect(()=>{var S;const y=s.current,h=o.current;if(!y||!h)return;let v=!1;const x=()=>{if(v)return;const P=y.querySelector(".nav-item.active"),C=(P==null?void 0:P.offsetWidth)??0;h.style.width=`${C}px`,h.style.transform=`translateX(${(P==null?void 0:P.offsetLeft)??0}px)`,h.style.opacity=C>0?"1":"0"};x();const b=window.requestAnimationFrame(()=>{h.classList.add("nav-indicator-ready")}),E=typeof ResizeObserver>"u"?null:new ResizeObserver(x);return E==null||E.observe(y),window.addEventListener("resize",x),(S=document.fonts)==null||S.ready.then(x),()=>{v=!0,window.cancelAnimationFrame(b),E==null||E.disconnect(),window.removeEventListener("resize",x)}},[c.pathname,p.length]),w.jsxs(W$,{open:t,onOpenChange:n,children:[w.jsxs("header",{className:"app-header",children:[w.jsxs("div",{className:"app-header-inner",children:[w.jsxs(ms,{to:"/",className:"brand",onClick:a,children:[w.jsx("span",{className:"brand-mark"}),w.jsxs("span",{className:"brand-name",children:["Papers ",w.jsx("em",{children:"With Code"})]})]}),w.jsxs("nav",{className:"nav",ref:s,children:[p.map(({to:y,label:h,end:v,badge:x,href:b})=>{const E=w.jsxs(w.Fragment,{children:[w.jsx("span",{children:h}),x&&w.jsx("span",{className:"nav-new-badge","aria-hidden":"true",children:x})]});return b?w.jsx("a",{href:b,target:"_blank",rel:"noreferrer",className:`nav-item${x?" nav-item-with-badge":""}`,children:E},y):w.jsx(ms,{to:y,end:v,className:({isActive:S})=>`nav-item${x?" nav-item-with-badge":""}${S?" active":""}`,children:E},y)}),w.jsx("span",{ref:o,className:"nav-indicator","aria-hidden":"true"})]}),w.jsx("div",{className:"header-spacer"}),w.jsx("a",{className:"feedback-link header-feedback-link",href:V0,target:"_blank",rel:"noreferrer",children:"Submit feedback"}),w.jsx("a",{className:"icon-btn header-github-btn",href:B0,target:"_blank",rel:"noreferrer","aria-label":"GitHub repository",title:"GitHub repository",children:w.jsx(Mr,{name:"github",size:14})}),w.jsxs("button",{className:"search-trigger","aria-label":"Search papers, authors, domains",onClick:e,children:[w.jsx(Mr,{name:"search",size:13}),w.jsx("span",{children:"Search papers, authors, domains…"}),w.jsx(R2,{})]}),w.jsx("button",{className:"icon-btn mobile-search-btn","aria-label":"Search",onClick:e,children:w.jsx(Mr,{name:"search",size:14})}),!m&&w.jsx(ms,{to:"/saved",className:"icon-btn header-bookmark-btn","aria-label":"Saved papers",title:"Saved papers",children:w.jsx(Mr,{name:"bookmark",size:13})}),m?null:l?w.jsx(_2,{user:l,onLogout:u}):w.jsx(y1,{returnTo:f}),w.jsx(H$,{asChild:!0,children:w.jsx("button",{className:"icon-btn mobile-menu-btn","aria-label":"Open menu",children:w.jsx(Mr,{name:"menu",size:14})})})]}),!d&&r&&w.jsxs("div",{className:"site-announcement",role:"status",children:[w.jsx("span",{children:"New: "}),m?w.jsx("a",{href:k2,target:"_blank",rel:"noreferrer",children:"following feed"}):w.jsx(bn,{to:"/following",children:"following feed"}),w.jsx("span",{children:", follow your favorite tasks, benchmarks, authors or organizations"}),w.jsx("button",{type:"button",className:"site-announcement-close","aria-label":"Dismiss announcement",onClick:()=>{localStorage.setItem(q0,"1"),i(!1)},children:w.jsx(Mr,{name:"close",size:11})})]})]}),w.jsx(G$,{children:w.jsx(K$,{className:"mobile-nav-drawer",children:w.jsxs(Q$,{className:"mobile-nav-panel","aria-describedby":void 0,children:[w.jsx(Y$,{className:"sr-only",children:"Navigation menu"}),w.jsx(X$,{className:"icon-btn mobile-nav-close","aria-label":"Close menu",children:w.jsx(Mr,{name:"close",size:14})}),w.jsxs("button",{type:"button",className:"mobile-nav-link mobile-nav-search",onClick:()=>{a(),e()},children:[w.jsx(Mr,{name:"search",size:14}),w.jsx("span",{children:"Search papers, authors, domains…"})]}),p.map(({to:y,label:h,end:v,badge:x,href:b})=>{const E=`mobile-nav-link${x?" mobile-nav-link-with-badge":""}`,S=w.jsxs(w.Fragment,{children:[w.jsx("span",{children:h}),x&&w.jsx("span",{className:"nav-new-badge","aria-hidden":"true",children:x})]});return b?w.jsx("a",{href:b,target:"_blank",rel:"noreferrer",className:E,onClick:a,children:S},y):w.jsx(ms,{to:y,end:v,className:E,onClick:a,children:S},y)}),w.jsx("a",{className:"mobile-nav-link",href:V0,target:"_blank",rel:"noreferrer",onClick:a,children:"Submit feedback"}),w.jsx("a",{className:"mobile-nav-link",href:B0,target:"_blank",rel:"noreferrer",onClick:a,children:"GitHub"}),!m&&w.jsx(ms,{to:"/saved",className:"mobile-nav-link",onClick:a,children:"Saved papers"}),!m&&(l==null?void 0:l.is_admin)&&w.jsx(ms,{to:"/admin-dashboard",className:"mobile-nav-link",onClick:a,children:"Admin dashboard"})]})})})]})},I2=()=>{const{pathname:e}=hn();return e==="/chat"||e.startsWith("/chat/")||e.startsWith("/pdf/")?null:w.jsx("footer",{className:"site-footer",children:w.jsxs("div",{className:"site-footer-inner",children:[w.jsxs("span",{children:["© ",new Date().getFullYear()," Hugging Face"]}),w.jsx(bn,{to:"/docs/api",children:"API"}),w.jsx(bn,{to:"/mcp",children:"MCP"}),w.jsx(bn,{to:"/privacy",children:"Privacy"}),w.jsx("a",{href:"https://github.com/huggingface/paperswithcode-feedback/issues",target:"_blank",rel:"noreferrer",children:"Feedback"})]})})},O2=1,M2=1e6;let nh=0;function A2(){return nh=(nh+1)%Number.MAX_SAFE_INTEGER,nh.toString()}const rh=new Map,W0=e=>{if(rh.has(e))return;const t=setTimeout(()=>{rh.delete(e),Ia({type:"REMOVE_TOAST",toastId:e})},M2);rh.set(e,t)},N2=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,O2)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(n=>n.id===t.toast.id?{...n,...t.toast}:n)};case"DISMISS_TOAST":{const{toastId:n}=t;return n?W0(n):e.toasts.forEach(r=>{W0(r.id)}),{...e,toasts:e.toasts.map(r=>r.id===n||n===void 0?{...r,open:!1}:r)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(n=>n.id!==t.toastId)}}},Lu=[];let ju={toasts:[]};function Ia(e){ju=N2(ju,e),Lu.forEach(t=>{t(ju)})}function $2({...e}){const t=A2(),n=i=>Ia({type:"UPDATE_TOAST",toast:{...i,id:t}}),r=()=>Ia({type:"DISMISS_TOAST",toastId:t});return Ia({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:i=>{i||r()}}}),{id:t,dismiss:r,update:n}}function F2(){const[e,t]=g.useState(ju);return g.useEffect(()=>(Lu.push(t),()=>{const n=Lu.indexOf(t);n>-1&&Lu.splice(n,1)}),[e]),{...e,toast:$2,dismiss:n=>Ia({type:"DISMISS_TOAST",toastId:n})}}var L2=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),j2="VisuallyHidden",fm=g.forwardRef((e,t)=>w.jsx(ke.span,{...e,ref:t,style:{...L2,...e.style}}));fm.displayName=j2;var hm="ToastProvider",[pm,D2,z2]=Kg("Toast"),[vk]=ss("Toast",[z2]),[U2,Md]=vk(hm),gk=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:i="right",swipeThreshold:s=50,children:o}=e,[a,l]=g.useState(null),[u,c]=g.useState(0),d=g.useRef(!1),f=g.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${hm}\`. Expected non-empty \`string\`.`),w.jsx(pm.Provider,{scope:t,children:w.jsx(U2,{scope:t,label:n,duration:r,swipeDirection:i,swipeThreshold:s,toastCount:u,viewport:a,onViewportChange:l,onToastAdd:g.useCallback(()=>c(m=>m+1),[]),onToastRemove:g.useCallback(()=>c(m=>m-1),[]),isFocusedToastEscapeKeyDownRef:d,isClosePausedRef:f,children:o})})};gk.displayName=hm;var mk="ToastViewport",V2=["F8"],dv="toast.viewportPause",fv="toast.viewportResume",yk=g.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=V2,label:i="Notifications ({hotkey})",...s}=e,o=Md(mk,n),a=D2(n),l=g.useRef(null),u=g.useRef(null),c=g.useRef(null),d=g.useRef(null),f=et(t,d,o.onViewportChange),m=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),_=o.toastCount>0;g.useEffect(()=>{const y=h=>{var x;r.length!==0&&r.every(b=>h[b]||h.code===b)&&((x=d.current)==null||x.focus())};return document.addEventListener("keydown",y),()=>document.removeEventListener("keydown",y)},[r]),g.useEffect(()=>{const y=l.current,h=d.current;if(_&&y&&h){const v=()=>{if(!o.isClosePausedRef.current){const S=new CustomEvent(dv);h.dispatchEvent(S),o.isClosePausedRef.current=!0}},x=()=>{if(o.isClosePausedRef.current){const S=new CustomEvent(fv);h.dispatchEvent(S),o.isClosePausedRef.current=!1}},b=S=>{!y.contains(S.relatedTarget)&&x()},E=()=>{y.contains(document.activeElement)||x()};return y.addEventListener("focusin",v),y.addEventListener("focusout",b),y.addEventListener("pointermove",v),y.addEventListener("pointerleave",E),window.addEventListener("blur",v),window.addEventListener("focus",x),()=>{y.removeEventListener("focusin",v),y.removeEventListener("focusout",b),y.removeEventListener("pointermove",v),y.removeEventListener("pointerleave",E),window.removeEventListener("blur",v),window.removeEventListener("focus",x)}}},[_,o.isClosePausedRef]);const p=g.useCallback(({tabbingDirection:y})=>{const v=a().map(x=>{const b=x.ref.current,E=[b,...t3(b)];return y==="forwards"?E:E.reverse()});return(y==="forwards"?v.reverse():v).flat()},[a]);return g.useEffect(()=>{const y=d.current;if(y){const h=v=>{var E,S,P;const x=v.altKey||v.ctrlKey||v.metaKey;if(v.key==="Tab"&&!x){const C=document.activeElement,T=v.shiftKey;if(v.target===y&&T){(E=u.current)==null||E.focus();return}const M=p({tabbingDirection:T?"backwards":"forwards"}),z=M.findIndex(F=>F===C);ih(M.slice(z+1))?v.preventDefault():T?(S=u.current)==null||S.focus():(P=c.current)==null||P.focus()}};return y.addEventListener("keydown",h),()=>y.removeEventListener("keydown",h)}},[a,p]),w.jsxs(AN,{ref:l,role:"region","aria-label":i.replace("{hotkey}",m),tabIndex:-1,style:{pointerEvents:_?void 0:"none"},children:[_&&w.jsx(hv,{ref:u,onFocusFromOutsideViewport:()=>{const y=p({tabbingDirection:"forwards"});ih(y)}}),w.jsx(pm.Slot,{scope:n,children:w.jsx(ke.ol,{tabIndex:-1,...s,ref:f})}),_&&w.jsx(hv,{ref:c,onFocusFromOutsideViewport:()=>{const y=p({tabbingDirection:"backwards"});ih(y)}})]})});yk.displayName=mk;var _k="ToastFocusProxy",hv=g.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...i}=e,s=Md(_k,n);return w.jsx(fm,{tabIndex:0,...i,ref:t,style:{position:"fixed"},onFocus:o=>{var u;const a=o.relatedTarget;!((u=s.viewport)!=null&&u.contains(a))&&r()}})});hv.displayName=_k;var Rl="Toast",B2="toast.swipeStart",q2="toast.swipeMove",W2="toast.swipeCancel",H2="toast.swipeEnd",wk=g.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:i,onOpenChange:s,...o}=e,[a,l]=yd({prop:r,defaultProp:i??!0,onChange:s,caller:Rl});return w.jsx(br,{present:n||a,children:w.jsx(Q2,{open:a,...o,ref:t,onClose:()=>l(!1),onPause:Ut(e.onPause),onResume:Ut(e.onResume),onSwipeStart:ee(e.onSwipeStart,u=>{u.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:ee(e.onSwipeMove,u=>{const{x:c,y:d}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","move"),u.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${c}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${d}px`)}),onSwipeCancel:ee(e.onSwipeCancel,u=>{u.currentTarget.setAttribute("data-swipe","cancel"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:ee(e.onSwipeEnd,u=>{const{x:c,y:d}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","end"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${c}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${d}px`),l(!1)})})})});wk.displayName=Rl;var[G2,K2]=vk(Rl,{onClose(){}}),Q2=g.forwardRef((e,t)=>{const{__scopeToast:n,type:r="foreground",duration:i,open:s,onClose:o,onEscapeKeyDown:a,onPause:l,onResume:u,onSwipeStart:c,onSwipeMove:d,onSwipeCancel:f,onSwipeEnd:m,..._}=e,p=Md(Rl,n),[y,h]=g.useState(null),v=et(t,F=>h(F)),x=g.useRef(null),b=g.useRef(null),E=i||p.duration,S=g.useRef(0),P=g.useRef(E),C=g.useRef(0),{onToastAdd:T,onToastRemove:R}=p,N=Ut(()=>{var W;(y==null?void 0:y.contains(document.activeElement))&&((W=p.viewport)==null||W.focus()),o()}),M=g.useCallback(F=>{!F||F===1/0||(window.clearTimeout(C.current),S.current=new Date().getTime(),C.current=window.setTimeout(N,F))},[N]);g.useEffect(()=>{const F=p.viewport;if(F){const W=()=>{M(P.current),u==null||u()},B=()=>{const Q=new Date().getTime()-S.current;P.current=P.current-Q,window.clearTimeout(C.current),l==null||l()};return F.addEventListener(dv,B),F.addEventListener(fv,W),()=>{F.removeEventListener(dv,B),F.removeEventListener(fv,W)}}},[p.viewport,E,l,u,M]),g.useEffect(()=>{s&&!p.isClosePausedRef.current&&M(E)},[s,E,p.isClosePausedRef,M]),g.useEffect(()=>(T(),()=>R()),[T,R]);const z=g.useMemo(()=>y?Pk(y):null,[y]);return p.viewport?w.jsxs(w.Fragment,{children:[z&&w.jsx(Y2,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite",children:z}),w.jsx(G2,{scope:n,onClose:N,children:xl.createPortal(w.jsx(pm.ItemSlot,{scope:n,children:w.jsx(MN,{asChild:!0,onEscapeKeyDown:ee(a,()=>{p.isFocusedToastEscapeKeyDownRef.current||N(),p.isFocusedToastEscapeKeyDownRef.current=!1}),children:w.jsx(ke.li,{tabIndex:0,"data-state":s?"open":"closed","data-swipe-direction":p.swipeDirection,..._,ref:v,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:ee(e.onKeyDown,F=>{F.key==="Escape"&&(a==null||a(F.nativeEvent),F.nativeEvent.defaultPrevented||(p.isFocusedToastEscapeKeyDownRef.current=!0,N()))}),onPointerDown:ee(e.onPointerDown,F=>{F.button===0&&(x.current={x:F.clientX,y:F.clientY})}),onPointerMove:ee(e.onPointerMove,F=>{if(!x.current)return;const W=F.clientX-x.current.x,B=F.clientY-x.current.y,Q=!!b.current,O=["left","right"].includes(p.swipeDirection),A=["left","up"].includes(p.swipeDirection)?Math.min:Math.max,V=O?A(0,W):0,K=O?0:A(0,B),te=F.pointerType==="touch"?10:2,oe={x:V,y:K},de={originalEvent:F,delta:oe};Q?(b.current=oe,pu(q2,d,de,{discrete:!1})):H0(oe,p.swipeDirection,te)?(b.current=oe,pu(B2,c,de,{discrete:!1}),F.target.setPointerCapture(F.pointerId)):(Math.abs(W)>te||Math.abs(B)>te)&&(x.current=null)}),onPointerUp:ee(e.onPointerUp,F=>{const W=b.current,B=F.target;if(B.hasPointerCapture(F.pointerId)&&B.releasePointerCapture(F.pointerId),b.current=null,x.current=null,W){const Q=F.currentTarget,O={originalEvent:F,delta:W};H0(W,p.swipeDirection,p.swipeThreshold)?pu(H2,m,O,{discrete:!0}):pu(W2,f,O,{discrete:!0}),Q.addEventListener("click",A=>A.preventDefault(),{once:!0})}})})})}),p.viewport)})]}):null}),Y2=e=>{const{__scopeToast:t,children:n,...r}=e,i=Md(Rl,t),[s,o]=g.useState(!1),[a,l]=g.useState(!1);return Z2(()=>o(!0)),g.useEffect(()=>{const u=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(u)},[]),a?null:w.jsx(wd,{asChild:!0,children:w.jsx(fm,{...r,children:s&&w.jsxs(w.Fragment,{children:[i.label," ",n]})})})},X2="ToastTitle",xk=g.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return w.jsx(ke.div,{...r,ref:t})});xk.displayName=X2;var J2="ToastDescription",bk=g.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return w.jsx(ke.div,{...r,ref:t})});bk.displayName=J2;var Ek="ToastAction",Sk=g.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?w.jsx(kk,{altText:n,asChild:!0,children:w.jsx(vm,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${Ek}\`. Expected non-empty \`string\`.`),null)});Sk.displayName=Ek;var Ck="ToastClose",vm=g.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,i=K2(Ck,n);return w.jsx(kk,{asChild:!0,children:w.jsx(ke.button,{type:"button",...r,ref:t,onClick:ee(e.onClick,i.onClose)})})});vm.displayName=Ck;var kk=g.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...i}=e;return w.jsx(ke.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...i,ref:t})});function Pk(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),e3(r)){const i=r.ariaHidden||r.hidden||r.style.display==="none",s=r.dataset.radixToastAnnounceExclude==="";if(!i)if(s){const o=r.dataset.radixToastAnnounceAlt;o&&t.push(o)}else t.push(...Pk(r))}}),t}function pu(e,t,n,{discrete:r}){const i=n.originalEvent.currentTarget,s=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?Lg(i,s):i.dispatchEvent(s)}var H0=(e,t,n=0)=>{const r=Math.abs(e.x),i=Math.abs(e.y),s=r>i;return t==="left"||t==="right"?s&&r>n:!s&&i>n};function Z2(e=()=>{}){const t=Ut(e);fn(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function e3(e){return e.nodeType===e.ELEMENT_NODE}function t3(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function ih(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var n3=gk,Rk=yk,Tk=wk,Ik=xk,Ok=bk,Mk=Sk,Ak=vm;const G0=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,K0=A1,r3=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return K0(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:i,defaultVariants:s}=t,o=Object.keys(i).map(u=>{const c=n==null?void 0:n[u],d=s==null?void 0:s[u];if(c===null)return null;const f=G0(c)||G0(d);return i[u][f]}),a=n&&Object.entries(n).reduce((u,c)=>{let[d,f]=c;return f===void 0||(u[d]=f),u},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,c)=>{let{class:d,className:f,...m}=c;return Object.entries(m).every(_=>{let[p,y]=_;return Array.isArray(y)?y.includes({...s,...a}[p]):{...s,...a}[p]===y})?[...u,d,f]:u},[]);return K0(e,o,l,n==null?void 0:n.class,n==null?void 0:n.className)},i3=n3,Nk=g.forwardRef(({className:e,...t},n)=>w.jsx(Rk,{ref:n,className:ct("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",e),...t}));Nk.displayName=Rk.displayName;const s3=r3("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-16 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),$k=g.forwardRef(({className:e,variant:t,...n},r)=>w.jsx(Tk,{ref:r,className:ct(s3({variant:t}),e),...n}));$k.displayName=Tk.displayName;const o3=g.forwardRef(({className:e,...t},n)=>w.jsx(Mk,{ref:n,className:ct("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors group-[.destructive]:border-muted/40 hover:bg-secondary group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 group-[.destructive]:focus:ring-destructive disabled:pointer-events-none disabled:opacity-50",e),...t}));o3.displayName=Mk.displayName;const Fk=g.forwardRef(({className:e,...t},n)=>w.jsx(Ak,{ref:n,className:ct("absolute right-2 top-2 inline-flex h-11 w-11 items-center justify-center rounded-md text-foreground transition-colors hover:bg-muted focus:outline-none focus:ring-2 focus:ring-ring group-[.destructive]:text-destructive-foreground group-[.destructive]:hover:bg-destructive-foreground/10 group-[.destructive]:focus:ring-destructive-foreground",e),"aria-label":"Dismiss notification","toast-close":"",...t,children:w.jsx(d2,{className:"h-4 w-4"})}));Fk.displayName=Ak.displayName;const Lk=g.forwardRef(({className:e,...t},n)=>w.jsx(Ik,{ref:n,className:ct("text-sm font-semibold",e),...t}));Lk.displayName=Ik.displayName;const jk=g.forwardRef(({className:e,...t},n)=>w.jsx(Ok,{ref:n,className:ct("text-sm opacity-90",e),...t}));jk.displayName=Ok.displayName;function a3(){const{toasts:e}=F2();return w.jsxs(i3,{children:[e.map(function({id:t,title:n,description:r,action:i,...s}){return w.jsxs($k,{...s,children:[w.jsxs("div",{className:"grid gap-1",children:[n&&w.jsx(Lk,{children:n}),r&&w.jsx(jk,{children:r})]}),i,w.jsx(Fk,{})]},t)}),w.jsx(Nk,{})]})}function l3(){const{pathname:e,hash:t}=hn();g.useLayoutEffect(()=>{t||window.scrollTo({top:0,left:0,behavior:"instant"})},[e,t])}const Dk=iF(),u3=Dk?xA:wA;if(!Dk&&typeof window<"u"){const e=window.location.hash;e.startsWith("#/")&&!e.startsWith("#//")&&window.history.replaceState(null,"",e.slice(1))}const c3=q.lazy(()=>ae(()=>import("./AuthorizePaperEditView-C-sg5DHX.js"),__vite__mapDeps([0,1,2,3]))),d3=q.lazy(()=>ae(()=>import("./FollowingView-C0KL9Wds.js"),__vite__mapDeps([4,5,6,7,8,9,1,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33]))),Q0=q.lazy(()=>ae(()=>import("./FeedView-BZs7imUl.js"),__vite__mapDeps([5,6,7,8,9,1,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33]))),f3=q.lazy(()=>ae(()=>import("./ChatView-DeilSeCH.js"),__vite__mapDeps([34,35,29,30,21,22,36,37,8,38,39,40,41,42,43,1,44,45,46,47,48,11,49,50,15,16,51,52,27,28,53,54]))),h3=q.lazy(()=>ae(()=>import("./SharedChatView-BS81XNKW.js"),__vite__mapDeps([55,35,29,30,21,22,36,37,8,38,39,40,41,42,43,1,44,45,46,47,48,11,49,50,15,16,51,52]))),p3=q.lazy(()=>ae(()=>import("./PapersListView-DL7UDvBC.js"),__vite__mapDeps([56,17,18,10,19,13,14,15,16,20,21,22,23,24,25,26,8,31,32,57,33,58,59]))),v3=q.lazy(()=>ae(()=>import("./PaperDetailView-DSf05yVz.js"),__vite__mapDeps([60,1,19,17,18,10,20,61,22,36,23,62,21,63,31,32,64,65,66,25,33,2,7,28,45,67,68,69,70,24,49,71,37,8,72,73,74,75,11,76,77,38,78,79,41,42,26,80,81,15,16,82]))),g3=q.lazy(()=>ae(()=>import("./PaperReaderView-CqbyUlPD.js"),__vite__mapDeps([83,35,29,30,21,22,36,37,8,38,39,40,41,42,43,1,44,45,46,47,48,11,49,50,15,16,51,52,84,63,23,31,32,34,27,28,53,54]))),m3=q.lazy(()=>ae(()=>import("./TagsIndexView-Bqdox0Xx.js"),__vite__mapDeps([85,8,18,10,86,49,87,53,88,89,44,75,90,39,91,77,6,33,92,25,93,72,2,69,73,70,24,7,71,1,74,11,94,95]))),y3=q.lazy(()=>ae(()=>import("./TagBrowseView-jVCzOB7D.js"),__vite__mapDeps([96,97,9,1,11,17,18,10,13,14,15,16,19,20,21,22,23,24,25,26,12,98,84,40,41,42,43,36,52,8,58,59,65,66,86,31,32,33,99,90,38]))),_3=q.lazy(()=>ae(()=>import("./MethodsIndexView-BlMbRRsu.js"),__vite__mapDeps([100,8,95,86,33,92,25,93,72,2,69,73,70,24,7,49,71,1,74,11,94,88]))),w3=q.lazy(()=>ae(()=>import("./FrameworksIndexView-BBgK14SQ.js"),__vite__mapDeps([101,19,8,18,59]))),x3=q.lazy(()=>ae(()=>import("./TrendsView-DPKj3I8y.js"),__vite__mapDeps([102,33,25]))),b3=q.lazy(()=>ae(()=>import("./ConferencesIndexView-CS7nG4hL.js"),__vite__mapDeps([103,8,104,33,92,25,93,72,2,69,73,70,24,7,49,71,1,74,11]))),E3=q.lazy(()=>ae(()=>import("./AiDeadlinesView-Dh-TYdum.js"),__vite__mapDeps([105,8,106,78,25,33,23,7,104]))),S3=q.lazy(()=>ae(()=>import("./ConferenceDetailView-CujSkc9V.js"),__vite__mapDeps([107,92,25,84,40,41,42,43,36,21,22,1,52,8,58,95,18,108,104,10,33,23,99]))),C3=q.lazy(()=>ae(()=>import("./ConferenceTaskView-BrixcLRv.js"),__vite__mapDeps([109,13,14,15,16,17,18,10,19,20,21,22,23,24,25,26,84,40,41,42,43,36,1,52,8,58,108,31,32,33,99]))),k3=q.lazy(()=>ae(()=>import("./OrganizationsIndexView-ec7nj_SS.js"),__vite__mapDeps([110,33,8,111]))),P3=q.lazy(()=>ae(()=>import("./OrganizationDetailView-ysggtQzi.js"),__vite__mapDeps([112,97,9,1,11,84,40,41,42,43,36,21,22,52,113,25,8,13,14,15,16,17,18,10,19,20,23,24,26,33,70,2,7,49,71,31,32,58,81,99]))),R3=q.lazy(()=>ae(()=>import("./OrganizationDetailView-ysggtQzi.js"),__vite__mapDeps([112,97,9,1,11,84,40,41,42,43,36,21,22,52,113,25,8,13,14,15,16,17,18,10,19,20,23,24,26,33,70,2,7,49,71,31,32,58,81,99]))),T3=q.lazy(()=>ae(()=>import("./AuthorDetailView-BwEN_vpq.js"),__vite__mapDeps([114,15,16,13,14,17,18,10,19,20,21,22,23,24,25,26,97,9,1,11,33,31,32,58,99]))),I3=q.lazy(()=>ae(()=>import("./MethodDetailView-DVIskZnq.js"),__vite__mapDeps([115,97,9,1,11,17,18,10,13,14,15,16,19,20,21,22,23,24,25,26,84,40,41,42,43,36,52,8,58,86,31,32,33,99]))),O3=q.lazy(()=>ae(()=>import("./BenchmarkDetailView-B6qFGTVj.js"),__vite__mapDeps([116,97,9,1,11,8,61,22,36,23,62,65,66,20,106,78,19,25,33,98,86,58,99,117]))),M3=q.lazy(()=>ae(()=>import("./SavedPapersView-CCKo8hBZ.js"),__vite__mapDeps([118,14,15,16,17,18,10,19,20,21,22,23,25,33,66,80]))),A3=q.lazy(()=>ae(()=>import("./SettingsView-DAkLrhMP.js"),__vite__mapDeps([119,1,9,106,78,6,12,90,30,64,54,65,66,48,89]))),N3=q.lazy(()=>ae(()=>import("./PrivacyView-BHODG2cO.js"),__vite__mapDeps([120,64]))),$3=q.lazy(()=>ae(()=>import("./ApiDocsView-LwSN2FTa.js"),__vite__mapDeps([121,64,41,122]))),F3=q.lazy(()=>ae(()=>import("./McpView-A6zV6cTb.js"),__vite__mapDeps([123,64,46,38,48,45,124]))),L3=q.lazy(()=>ae(()=>import("./SubmitView-BCL1MLcF.js"),__vite__mapDeps([125,1,33,2,69,73,21,22,68]))),j3=q.lazy(()=>ae(()=>import("./CronDashboard-BgGmgfB6.js"),__vite__mapDeps([126,1,127,128,76,2,50,75,88,91,39,87,48,129,71,130,79,32,3,8,30]))),D3=q.lazy(()=>ae(()=>import("./AutonomousOperations-BMzZOLm6.js"),__vite__mapDeps([131,1,127,128,76,2,69,91,47]))),z3=q.lazy(()=>ae(()=>import("./SubmissionsDashboard-CkzOBcpM.js"),__vite__mapDeps([132,67,68,1,32,8,23,74,21,22,129,71,130,133]))),U3=q.lazy(()=>ae(()=>import("./UserProfileView-kB3mGrtz.js"),__vite__mapDeps([134,113,25,8]))),V3=q.lazy(()=>ae(()=>import("./RateLimitsView-CrvlGHnU.js"),__vite__mapDeps([135,66]))),B3=q.lazy(()=>ae(()=>import("./AstraForRoboticsView-BMiTVC2T.js"),__vite__mapDeps([136,13,14,15,16,17,18,10,19,20,21,22,23,24,25,26,33,31,32,64,137]))),sh=q.lazy(()=>ae(()=>import("./NotFound-BeWhm9El.js"),[])),q3=q.lazy(()=>ae(()=>import("./SearchOverlay-Dvr0LreX.js"),__vite__mapDeps([138,20,8,21,22,57,18,10]))),W3=q.lazy(()=>ae(()=>import("./StagingAccessRequestView-D1t7icpG.js"),__vite__mapDeps([139,130]))),zk=()=>w.jsxs("div",{className:"page","aria-busy":"true","aria-live":"polite",children:[w.jsx("div",{className:"animate-pulse rounded-md bg-muted",style:{height:24,width:"30%",marginBottom:24}}),w.jsx("div",{className:"animate-pulse rounded-md bg-muted",style:{height:64,width:"60%",marginBottom:32}}),w.jsxs("div",{className:"paper-list",style:{display:"grid",gap:16},children:[w.jsx("div",{className:"animate-pulse rounded-md bg-muted",style:{height:96}}),w.jsx("div",{className:"animate-pulse rounded-md bg-muted",style:{height:96}}),w.jsx("div",{className:"animate-pulse rounded-md bg-muted",style:{height:96}})]})]}),H3=new XA({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:1}}}),G3=()=>{const{arxivId:e}=xS();return w.jsx(Ro,{to:e?`/paper/${e}`:"/papers",replace:!0})},K3=()=>{const{taskSlug:e}=xS();return w.jsx(Ro,{to:e?`/tasks/${e}`:"/tasks",replace:!0})},Q3=({element:e})=>$o()?w.jsx(Ro,{to:"/",replace:!0}):w.jsx(w.Fragment,{children:e}),pv=({element:e})=>{const{user:t,isLoading:n}=pk(),r=hn();return $o()?w.jsx(Ro,{to:"/",replace:!0}):n?w.jsx("div",{className:"page",children:w.jsx("div",{className:"submission-loading",children:w.jsx("span",{children:"Checking admin session..."})})}):t?t.is_admin?w.jsx(w.Fragment,{children:e}):w.jsx("div",{className:"page",children:w.jsxs("div",{className:"submission-empty submission-empty-warn",children:[w.jsx("h1",{children:"Admin access required"}),w.jsxs("p",{children:["Signed in as @",t.username,". This dashboard is limited to allowlisted admin accounts."]})]})}):w.jsx("div",{className:"page",children:w.jsxs("div",{className:"submission-empty submission-empty-warn",children:[w.jsx("h1",{children:"Sign in required"}),w.jsx("p",{children:"Sign in with an allowlisted Hugging Face admin account to view admin operations."}),w.jsx(y1,{returnTo:`${r.pathname}${r.search}`})]})})},Y3=()=>{const e=eF(),t=typeof window<"u"&&new URL(e,window.location.origin).origin!==window.location.origin;return q.useEffect(()=>{t&&window.location.replace(e)},[e,t]),t?w.jsx("div",{className:"page",children:w.jsxs("div",{className:"submission-loading",children:[w.jsx("span",{children:"Opening the production admin dashboard..."}),w.jsx("a",{href:e,children:"Continue"})]})}):w.jsx(pv,{element:w.jsx(j3,{})})},Y0=({reader:e=!1})=>{const[t,n]=q.useState(!1),{pathname:r}=hn();q.useEffect(()=>{const a=l=>{(l.metaKey||l.ctrlKey)&&l.key==="k"&&(l.preventDefault(),n(!0))};return window.addEventListener("keydown",a),()=>window.removeEventListener("keydown",a)},[]);const i=w.jsx(T2,{onOpenSearch:()=>n(!0)}),s=w.jsx(fS,{resetKey:r,children:w.jsx(q.Suspense,{fallback:w.jsx(zk,{}),children:w.jsx(cA,{})})}),o=t&&w.jsx(q.Suspense,{fallback:null,children:w.jsx(q3,{open:t,onClose:()=>n(!1)})});return e?w.jsxs("div",{className:"reader-route-shell",children:[i,w.jsx("div",{className:"reader-route-content",children:s}),o]}):w.jsxs(w.Fragment,{children:[i,w.jsx("main",{children:s}),w.jsx(I2,{}),o]})},X3=()=>(l3(),q.useLayoutEffect(()=>{var e;(e=document.getElementById("initial-discovery-footer"))==null||e.remove()},[]),w.jsxs(dA,{children:[w.jsx(re,{path:"/request-access",element:w.jsx(q.Suspense,{fallback:w.jsx(zk,{}),children:w.jsx(W3,{})})}),w.jsx(re,{element:w.jsx(Y0,{reader:!0}),children:w.jsx(re,{path:"/pdf/:paperId",element:rF()?w.jsx(g3,{}):w.jsx(sh,{})})}),w.jsxs(re,{element:w.jsx(Y0,{}),children:[w.jsx(re,{path:"/",element:w.jsx(Q0,{})}),w.jsx(re,{path:"/following",element:w.jsx(d3,{})}),w.jsx(re,{path:"/x-trending",element:w.jsx(Q0,{xTrending:!0})}),w.jsx(re,{path:"/chat/:sessionId?",element:al()?w.jsx(f3,{}):w.jsx(Ro,{to:"/",replace:!0})}),w.jsx(re,{path:"/share/:shareId",element:al()?w.jsx(h3,{}):w.jsx(sh,{})}),w.jsx(re,{path:"/papers",element:w.jsx(p3,{})}),w.jsx(re,{path:"/papers/:arxivId",element:w.jsx(G3,{})}),w.jsx(re,{path:"/paper/:arxivId",element:w.jsx(v3,{})}),w.jsx(re,{path:"/tasks",element:w.jsx(m3,{})}),w.jsx(re,{path:"/tasks/:taskSlug",element:w.jsx(y3,{})}),w.jsx(re,{path:"/task/:taskSlug",element:w.jsx(K3,{})}),w.jsx(re,{path:"/methods",element:w.jsx(_3,{})}),w.jsx(re,{path:"/methods/:methodSlug",element:w.jsx(I3,{})}),w.jsx(re,{path:"/frameworks",element:w.jsx(w3,{})}),w.jsx(re,{path:"/trends",element:w.jsx(x3,{})}),w.jsx(re,{path:"/conferences",element:w.jsx(b3,{})}),w.jsx(re,{path:"/ai-deadlines",element:w.jsx(E3,{})}),w.jsx(re,{path:"/conferences/:confSlug",element:w.jsx(S3,{})}),w.jsx(re,{path:"/conferences/:confSlug/:taskSlug",element:w.jsx(C3,{})}),w.jsx(re,{path:"/organizations",element:w.jsx(k3,{})}),w.jsx(re,{path:"/orgs/:orgSlug",element:w.jsx(P3,{})}),w.jsx(re,{path:"/orgs/:orgSlug/:taskSlug",element:w.jsx(R3,{})}),w.jsx(re,{path:"/authors/:authorId",element:w.jsx(T3,{})}),w.jsx(re,{path:"/benchmark/:datasetSlug",element:w.jsx(O3,{})}),w.jsx(re,{path:"/authorize-paper-edit/:authorizationId",element:w.jsx(c3,{})}),w.jsx(re,{path:"/submit",element:w.jsx(L3,{})}),w.jsx(re,{path:"/saved",element:w.jsx(Q3,{element:w.jsx(M3,{})})}),w.jsx(re,{path:"/settings",element:w.jsx(A3,{})}),w.jsx(re,{path:"/privacy",element:w.jsx(N3,{})}),w.jsx(re,{path:"/docs/api",element:w.jsx($3,{})}),w.jsx(re,{path:"/mcp",element:w.jsx(F3,{})}),w.jsx(re,{path:"/admin-dashboard",element:w.jsx(Y3,{})}),w.jsx(re,{path:"/autonomous-operations",element:w.jsx(pv,{element:w.jsx(D3,{})})}),w.jsx(re,{path:"/cron-dashboard",element:w.jsx(Ro,{to:"/admin-dashboard",replace:!0})}),w.jsx(re,{path:"/submissions",element:w.jsx(pv,{element:w.jsx(z3,{})})}),w.jsx(re,{path:"/rate-limits",element:w.jsx(V3,{})}),w.jsx(re,{path:"/astra-for-robotics",element:w.jsx(B3,{})}),w.jsx(re,{path:"/:username",element:w.jsx(U3,{})}),w.jsx(re,{path:"*",element:w.jsx(sh,{})})]})]})),J3=()=>w.jsx(JA,{client:H3,children:w.jsxs(C2,{children:[w.jsx(u3,{children:w.jsx(X3,{})}),w.jsx(a3,{}),!1]})});yM();const Z3=w.jsx(yT,{attribute:"class",defaultTheme:"system",enableSystem:!0,disableTransitionOnChange:!0,storageKey:"pwc-theme",children:w.jsx(fS,{children:w.jsx(J3,{})})}),ez=wb(document.getElementById("root"));ez.render(w.jsx(q.StrictMode,{children:Z3}));export{h2 as $,Od as A,yd as B,l2 as C,et as D,ee as E,xj as F,ss as G,y1 as H,ct as I,Pz as J,dz as K,bn as L,mz as M,V1 as N,Bj as O,br as P,fC as Q,Vj as R,c2 as S,bz as T,o3 as U,q as V,Ez as W,d2 as X,rF as Y,cz as Z,f2 as _,pk as a,oz as a$,dk as a0,er as a1,fz as a2,uz as a3,aw as a4,J$ as a5,u2 as a6,ae as a7,A1 as a8,xl as a9,pz as aA,kz as aB,D1 as aC,z1 as aD,U1 as aE,El as aF,at as aG,Up as aH,TS as aI,qA as aJ,ZA as aK,nN as aL,oN as aM,rN as aN,iN as aO,At as aP,lN as aQ,l0 as aR,sN as aS,il as aT,KA as aU,OS as aV,xz as aW,t1 as aX,Dg as aY,HS as aZ,jg as a_,$g as aa,b2 as ab,cv as ac,w1 as ad,r3 as ae,Qs as af,W$ as ag,G$ as ah,K$ as ai,Q$ as aj,vi as ak,X$ as al,Y$ as am,lz as an,Ro as ao,Rj as ap,Tj as aq,nC as ar,wd as as,_d as at,Ij as au,Oj as av,rz as aw,nz as ax,E2 as ay,wz as az,cN as b,sz as b0,uN as b1,qg as b2,z0 as b3,hn as c,g as d,Mg as e,Tz as f,iz as g,Z$ as h,zS as i,w as j,$o as k,al as l,nF as m,tF as n,Sz as o,S2 as p,hz as q,Rz as r,Id as s,Cz as t,xS as u,vz as v,gz as w,F2 as x,_z as y,ke as z}; + */const d2=Id("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),f2=n2,h2=r2,p2=g.forwardRef(({className:e,inset:t,children:n,...r},i)=>w.jsxs(lk,{ref:i,className:ct("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[state=open]:bg-accent focus:bg-accent",t&&"pl-8",e),...r,children:[n,w.jsx(u2,{className:"ml-auto h-4 w-4"})]}));p2.displayName=lk.displayName;const v2=g.forwardRef(({className:e,...t},n)=>w.jsx(uk,{ref:n,className:ct("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t}));v2.displayName=uk.displayName;const dk=g.forwardRef(({className:e,sideOffset:t=4,...n},r)=>w.jsx(i2,{children:w.jsx(tk,{ref:r,sideOffset:t,className:ct("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n})}));dk.displayName=tk.displayName;const er=g.forwardRef(({className:e,inset:t,...n},r)=>w.jsx(rk,{ref:r,className:ct("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",t&&"pl-8",e),...n}));er.displayName=rk.displayName;const g2=g.forwardRef(({className:e,children:t,checked:n,...r},i)=>w.jsxs(ik,{ref:i,className:ct("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",e),checked:n,...r,children:[w.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:w.jsx(ok,{children:w.jsx(l2,{className:"h-4 w-4"})})}),t]}));g2.displayName=ik.displayName;const m2=g.forwardRef(({className:e,children:t,...n},r)=>w.jsxs(sk,{ref:r,className:ct("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",e),...n,children:[w.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:w.jsx(ok,{children:w.jsx(c2,{className:"h-2 w-2 fill-current"})})}),t]}));m2.displayName=sk.displayName;const fk=g.forwardRef(({className:e,inset:t,...n},r)=>w.jsx(nk,{ref:r,className:ct("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n}));fk.displayName=nk.displayName;const uv=g.forwardRef(({className:e,...t},n)=>w.jsx(ak,{ref:n,className:ct("-mx-1 my-1 h-px bg-muted",e),...t}));uv.displayName=ak.displayName;function y2(e){const n=(e.name||e.username||"?").trim().split(/\s+/).filter(Boolean);return n.length===0?"?":n.length===1?n[0][0].toUpperCase():(n[0][0]+n[n.length-1][0]).toUpperCase()}const _2=({user:e,onLogout:t})=>w.jsxs(f2,{children:[w.jsx(h2,{asChild:!0,children:w.jsx("button",{type:"button",className:"user-avatar-btn","aria-label":`Account menu for ${e.username}`,children:w.jsxs(D1,{className:"h-8 w-8",children:[e.avatar_url&&w.jsx(z1,{src:e.avatar_url,alt:e.username}),w.jsx(U1,{className:"text-xs",children:y2(e)})]})})}),w.jsxs(dk,{align:"end",className:"w-56",children:[w.jsxs(fk,{className:"flex flex-col gap-0.5 py-2",children:[w.jsx("span",{className:"text-sm font-medium leading-tight",children:e.name||e.username}),w.jsxs("span",{className:"text-xs font-normal text-muted-foreground",children:["@",e.username]}),e.is_admin&&w.jsx("span",{className:"mt-1 inline-flex w-fit items-center rounded-full bg-amber-100 px-2 py-0.5 text-[10px] font-medium uppercase tracking-wide text-amber-900",children:"Admin"}),e.role==="contributor"&&w.jsx("span",{className:"mt-1 inline-flex w-fit items-center rounded-full bg-blue-100 px-2 py-0.5 text-[10px] font-medium uppercase tracking-wide text-blue-900",children:"Contributor"})]}),w.jsx(uv,{}),w.jsx(er,{asChild:!0,children:w.jsx("a",{href:`https://huggingface.co/${encodeURIComponent(e.username)}`,target:"_blank",rel:"noopener noreferrer",children:"Hugging Face profile"})}),w.jsx(er,{asChild:!0,children:w.jsx(bn,{to:"/frameworks",children:"Frameworks"})}),w.jsx(er,{asChild:!0,children:w.jsx(bn,{to:"/trends",children:"Trends"})}),e.is_admin&&w.jsxs(w.Fragment,{children:[w.jsx(er,{asChild:!0,children:w.jsx(bn,{to:"/admin-dashboard",children:"Admin dashboard"})}),w.jsx(er,{asChild:!0,children:w.jsx(bn,{to:"/submissions",children:"Review submissions"})})]}),w.jsx(er,{asChild:!0,children:w.jsx(bn,{to:`/${encodeURIComponent(e.username)}`,children:"My contributions"})}),w.jsx(er,{asChild:!0,children:w.jsx(bn,{to:"/settings",children:"Settings"})}),w.jsx(uv,{}),w.jsx(er,{onSelect:n=>{n.preventDefault(),t()},children:"Log out"})]})]}),w2=!1;class Od extends Error{constructor(n,r){var i;super(`API request failed: ${n.status} ${n.statusText}`);kr(this,"status");kr(this,"statusText");kr(this,"response");kr(this,"detail");kr(this,"code");kr(this,"displayMessage");this.name="ApiError",this.status=n.status,this.statusText=n.statusText,this.response=r;try{if(this.detail=(i=JSON.parse(r))==null?void 0:i.detail,typeof this.detail=="string"&&(this.message=this.detail),Array.isArray(this.detail)){const s=this.detail[0];typeof s=="object"&&s!==null&&"msg"in s&&typeof s.msg=="string"&&(this.message=s.msg)}if(typeof this.detail=="object"&&this.detail!==null&&"code"in this.detail&&typeof this.detail.code=="string"&&(this.code=this.detail.code),typeof this.detail=="object"&&this.detail!==null&&"message"in this.detail&&typeof this.detail.message=="string"){const s="help"in this.detail&&typeof this.detail.help=="string"?` See ${this.detail.help} for help.`:"";this.message=`${this.detail.message}${s}`}}catch{this.detail=void 0,this.displayMessage=r||this.message;return}this.displayMessage=this.message}}function _z(e,t){return e instanceof Od?e.displayMessage||t:typeof e=="object"&&e!==null&&"message"in e&&typeof e.message=="string"&&e.message||t}class x2{constructor(t){this.baseUrl=t}async fetch(t,n){const r=`${this.baseUrl}${t}`;try{const{headers:i,...s}=n??{},a=(s.method??"GET").toUpperCase()==="GET"?"default":"no-store",l=new Headers(i);return typeof s.body=="string"&&!l.has("Content-Type")&&l.set("Content-Type","application/json"),await fetch(r,{...s,cache:s.cache??a,credentials:s.credentials??"include",headers:l})}catch(i){throw console.error(`[API] Request to ${r} failed:`,i),i}}async fetchOk(t,n){const r=await this.fetch(t,n);if(!r.ok){const i=new Od(r,await r.text());throw console.error("[API] Error response:",i.response),i}return r}async request(t,n){const r=await this.fetchOk(t,n);return r.status===204?void 0:await r.json()}}function b2(e){e instanceof Od&&e.status===401&&e.code!=="fresh_auth_required"&&e.code!=="saved_papers_bucket_authorization_required"&&typeof window<"u"&&window.dispatchEvent(new CustomEvent("pwc:auth-stale"))}async function hk(e){try{return await e()}catch(t){throw b2(t),t}}const cm=new x2(`${Bg()}/api/v1`),E2=(e,t)=>cm.fetch(e,t),wz=(e,t)=>hk(()=>cm.fetchOk(e,t)),cv=(e,t)=>hk(()=>cm.request(e,t));async function xz(e,t){try{return await cv(e,t)}catch(n){if(n instanceof Od&&n.status===404)return null;throw n}}const z0={async getCurrentUser(){if($o())return null;const e=await E2("/auth/me",{cache:"no-store"});return e.status===401||!e.ok?null:e.json()},async logout(){await cv("/auth/logout",{method:"POST"})},async requestStagingAccess(){await cv("/staging-access-request",{method:"POST"})}},S2={detail:e=>["paper",e],arxiv:e=>["paper-arxiv",e],preview:e=>["paper-preview",e],summary:e=>["paper-summary",e],feeds:{list:["papers"],infinite:["papers-infinite"],xTrending:["x-trending-papers-infinite"],following:["research-feed"],search:["paper-search-feed"],task:["task-papers-infinite"],conference:["conference-papers-infinite"],organization:["organization-papers-infinite"],method:["method-papers-infinite"],saved:["my-bookmarks"],related:["related-papers"],versions:["paper-versions"],searchOverlay:["search-papers"],mentions:["chat-paper-mention-search"],trending:["trending-papers"]}},bz=10*60*1e3,hu={me:["auth","me"]},Ez={preferences:["account","preferences"],bookmarkIds:["my-bookmark-ids"]},Sz={areas:["areas-all"],area:e=>["area",e],topTasksSidebar:["top-tasks-sidebar"],task:e=>["task",e],method:e=>["method",e],organization:e=>["organization",e],dataset:e=>["dataset",e],datasets:["dataset"],datasetTasks:["dataset-tasks"],taskPage:["task-page"],taskBenchmarkTrends:["task-benchmark-trends"],organizations:["organizations"]},Cz={all:["evaluations"],byPaper:e=>["evaluations","paper",e],byPaperAll:["evaluations","paper"],byDatasetAll:["dataset-evals"],byDataset:e=>["dataset-evals",e]},kz={pendingEdits:["pendingPaperEdits"]},Pz={all:["admin"],cronStatus:["admin","cronStatus"],chatSandboxSpend:e=>["admin","chatSandboxSpend",e],chatWebSearchBudget:["admin","chatWebSearchBudget"],autonomousOperations:["admin","autonomousOperations"],paperMarkdownJobs:["admin","paperMarkdownJobs"],codexPaperJobs:["admin","codexPaperJobs"],codexPaperJob:(e,t)=>["admin","codexPaperJob",e,t],catalogAudit:["catalog-audit"]},Rz={follows:e=>["research-follows",e],topic:e=>["research-topic",e],email:e=>["research-email",e],feed:e=>[...S2.feeds.following,e]},dm=q.createContext(null),U0="pwc:auth-stale",C2=({children:e})=>{const t=zS(),n=cN({queryKey:hu.me,queryFn:()=>z0.getCurrentUser(),staleTime:1/0}),r=n.data??null,i=q.useRef(null),{refetch:s}=n,o=q.useCallback(async()=>{await s()},[s]),a=q.useCallback(async()=>{const u=qg("/api/v1/auth/logout");if(new URL(u,window.location.origin).origin!==window.location.origin){const c=document.createElement("form");c.method="POST",c.action=`${u}?return_to=${encodeURIComponent(window.location.href)}`,document.body.appendChild(c),c.submit();return}await z0.logout(),t.setQueryData(hu.me,null)},[t]);q.useEffect(()=>{},[r]),q.useEffect(()=>{i.current&&!r&&t.resetQueries({predicate:u=>u.queryKey[0]!==hu.me[0]}),i.current=r},[t,r]),q.useEffect(()=>{const u=()=>t.setQueryData(hu.me,null);return window.addEventListener(U0,u),()=>window.removeEventListener(U0,u)},[t]);const l=q.useMemo(()=>({user:r,isLoading:n.isPending,refresh:o,logout:a}),[r,n.isPending,o,a]);return w.jsx(dm.Provider,{value:l,children:e})};function pk(){const e=q.useContext(dm);if(!e)throw new Error("useAuth must be used inside an ");return e}function Tz(){return q.useContext(dm)}const Mr=({name:e,size:t=14})=>{const n={search:w.jsx("path",{d:"M11 11l3 3M7 12.5a5.5 5.5 0 110-11 5.5 5.5 0 010 11z",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinecap:"round"}),bookmark:w.jsx("path",{d:"M4 2h8v12l-4-3-4 3V2z",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinejoin:"round"}),menu:w.jsx("path",{d:"M2 4h12M2 8h12M2 12h12",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"}),close:w.jsx("path",{d:"M3 3l10 10M13 3L3 13",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"}),github:w.jsx("path",{fill:"currentColor",d:"M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z"})};return w.jsx("svg",{className:t===11?"icon-sm":"icon",viewBox:"0 0 16 16",width:t,height:t,children:n[e]})},V0="https://github.com/huggingface/paperswithcode-feedback/issues",B0="https://github.com/huggingface/paperswithcode",k2="https://paperswithcode.co/following",q0="pwc:announcement:following-feed:v1:dismissed",th=[{to:"/",label:"Trending",end:!0},{to:"/tasks",label:"Browse state-of-the-art",end:!1},{to:"/methods",label:"Methods",end:!1},{to:"/conferences",label:"Conferences",end:!1},{to:"/organizations",label:"Organizations",end:!1},{to:"/submit",label:"Submit",end:!1}],P2=()=>{if(typeof navigator>"u")return!1;const e=navigator.userAgentData,t=(e==null?void 0:e.platform)||navigator.platform||navigator.userAgent||"";return/Mac|iPhone|iPad|iPod/i.test(t)},R2=()=>{const[e,t]=q.useState(!1);return q.useEffect(()=>{t(P2())},[]),w.jsx("kbd",{children:e?"⌘K":"Ctrl K"})},T2=({onOpenSearch:e})=>{const[t,n]=q.useState(!1),[r,i]=q.useState(()=>localStorage.getItem(q0)!=="1"),s=q.useRef(null),o=q.useRef(null),a=()=>n(!1),{user:l,logout:u}=pk(),c=hn(),d=c.pathname.startsWith("/pdf/"),f=`${c.pathname}${c.search}`||"/",m=$o(),_=al()?{to:"/chat",label:"Chat",end:!1,badge:"New"}:nF()?{to:"/chat",label:"Chat",end:!1,badge:"New",href:tF}:null,p=_?[th[0],_,...th.slice(1)]:th;return q.useLayoutEffect(()=>{var S;const y=s.current,h=o.current;if(!y||!h)return;let v=!1;const x=()=>{if(v)return;const P=y.querySelector(".nav-item.active"),C=(P==null?void 0:P.offsetWidth)??0;h.style.width=`${C}px`,h.style.transform=`translateX(${(P==null?void 0:P.offsetLeft)??0}px)`,h.style.opacity=C>0?"1":"0"};x();const b=window.requestAnimationFrame(()=>{h.classList.add("nav-indicator-ready")}),E=typeof ResizeObserver>"u"?null:new ResizeObserver(x);return E==null||E.observe(y),window.addEventListener("resize",x),(S=document.fonts)==null||S.ready.then(x),()=>{v=!0,window.cancelAnimationFrame(b),E==null||E.disconnect(),window.removeEventListener("resize",x)}},[c.pathname,p.length]),w.jsxs(W$,{open:t,onOpenChange:n,children:[w.jsxs("header",{className:"app-header",children:[w.jsxs("div",{className:"app-header-inner",children:[w.jsxs(ms,{to:"/",className:"brand",onClick:a,children:[w.jsx("span",{className:"brand-mark"}),w.jsxs("span",{className:"brand-name",children:["Papers ",w.jsx("em",{children:"With Code"})]})]}),w.jsxs("nav",{className:"nav",ref:s,children:[p.map(({to:y,label:h,end:v,badge:x,href:b})=>{const E=w.jsxs(w.Fragment,{children:[w.jsx("span",{children:h}),x&&w.jsx("span",{className:"nav-new-badge","aria-hidden":"true",children:x})]});return b?w.jsx("a",{href:b,target:"_blank",rel:"noreferrer",className:`nav-item${x?" nav-item-with-badge":""}`,children:E},y):w.jsx(ms,{to:y,end:v,className:({isActive:S})=>`nav-item${x?" nav-item-with-badge":""}${S?" active":""}`,children:E},y)}),w.jsx("span",{ref:o,className:"nav-indicator","aria-hidden":"true"})]}),w.jsx("div",{className:"header-spacer"}),w.jsx("a",{className:"feedback-link header-feedback-link",href:V0,target:"_blank",rel:"noreferrer",children:"Submit feedback"}),w.jsx("a",{className:"icon-btn header-github-btn",href:B0,target:"_blank",rel:"noreferrer","aria-label":"GitHub repository",title:"GitHub repository",children:w.jsx(Mr,{name:"github",size:14})}),w.jsxs("button",{className:"search-trigger","aria-label":"Search papers, authors, domains",onClick:e,children:[w.jsx(Mr,{name:"search",size:13}),w.jsx("span",{children:"Search papers, authors, domains…"}),w.jsx(R2,{})]}),w.jsx("button",{className:"icon-btn mobile-search-btn","aria-label":"Search",onClick:e,children:w.jsx(Mr,{name:"search",size:14})}),!m&&w.jsx(ms,{to:"/saved",className:"icon-btn header-bookmark-btn","aria-label":"Saved papers",title:"Saved papers",children:w.jsx(Mr,{name:"bookmark",size:13})}),m?null:l?w.jsx(_2,{user:l,onLogout:u}):w.jsx(y1,{returnTo:f}),w.jsx(H$,{asChild:!0,children:w.jsx("button",{className:"icon-btn mobile-menu-btn","aria-label":"Open menu",children:w.jsx(Mr,{name:"menu",size:14})})})]}),!d&&r&&w.jsxs("div",{className:"site-announcement",role:"status",children:[w.jsx("span",{children:"New: "}),m?w.jsx("a",{href:k2,target:"_blank",rel:"noreferrer",children:"following feed"}):w.jsx(bn,{to:"/following",children:"following feed"}),w.jsx("span",{children:", follow your favorite tasks, benchmarks, authors or organizations"}),w.jsx("button",{type:"button",className:"site-announcement-close","aria-label":"Dismiss announcement",onClick:()=>{localStorage.setItem(q0,"1"),i(!1)},children:w.jsx(Mr,{name:"close",size:11})})]})]}),w.jsx(G$,{children:w.jsx(K$,{className:"mobile-nav-drawer",children:w.jsxs(Q$,{className:"mobile-nav-panel","aria-describedby":void 0,children:[w.jsx(Y$,{className:"sr-only",children:"Navigation menu"}),w.jsx(X$,{className:"icon-btn mobile-nav-close","aria-label":"Close menu",children:w.jsx(Mr,{name:"close",size:14})}),w.jsxs("button",{type:"button",className:"mobile-nav-link mobile-nav-search",onClick:()=>{a(),e()},children:[w.jsx(Mr,{name:"search",size:14}),w.jsx("span",{children:"Search papers, authors, domains…"})]}),p.map(({to:y,label:h,end:v,badge:x,href:b})=>{const E=`mobile-nav-link${x?" mobile-nav-link-with-badge":""}`,S=w.jsxs(w.Fragment,{children:[w.jsx("span",{children:h}),x&&w.jsx("span",{className:"nav-new-badge","aria-hidden":"true",children:x})]});return b?w.jsx("a",{href:b,target:"_blank",rel:"noreferrer",className:E,onClick:a,children:S},y):w.jsx(ms,{to:y,end:v,className:E,onClick:a,children:S},y)}),w.jsx("a",{className:"mobile-nav-link",href:V0,target:"_blank",rel:"noreferrer",onClick:a,children:"Submit feedback"}),w.jsx("a",{className:"mobile-nav-link",href:B0,target:"_blank",rel:"noreferrer",onClick:a,children:"GitHub"}),!m&&w.jsx(ms,{to:"/saved",className:"mobile-nav-link",onClick:a,children:"Saved papers"}),!m&&(l==null?void 0:l.is_admin)&&w.jsx(ms,{to:"/admin-dashboard",className:"mobile-nav-link",onClick:a,children:"Admin dashboard"})]})})})]})},I2=()=>{const{pathname:e}=hn();return e==="/chat"||e.startsWith("/chat/")||e.startsWith("/pdf/")?null:w.jsx("footer",{className:"site-footer",children:w.jsxs("div",{className:"site-footer-inner",children:[w.jsxs("span",{children:["© ",new Date().getFullYear()," Hugging Face"]}),w.jsx(bn,{to:"/docs/api",children:"API"}),w.jsx(bn,{to:"/mcp",children:"MCP"}),w.jsx(bn,{to:"/privacy",children:"Privacy"}),w.jsx("a",{href:"https://github.com/huggingface/paperswithcode-feedback/issues",target:"_blank",rel:"noreferrer",children:"Feedback"})]})})},O2=1,M2=1e6;let nh=0;function A2(){return nh=(nh+1)%Number.MAX_SAFE_INTEGER,nh.toString()}const rh=new Map,W0=e=>{if(rh.has(e))return;const t=setTimeout(()=>{rh.delete(e),Ia({type:"REMOVE_TOAST",toastId:e})},M2);rh.set(e,t)},N2=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,O2)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(n=>n.id===t.toast.id?{...n,...t.toast}:n)};case"DISMISS_TOAST":{const{toastId:n}=t;return n?W0(n):e.toasts.forEach(r=>{W0(r.id)}),{...e,toasts:e.toasts.map(r=>r.id===n||n===void 0?{...r,open:!1}:r)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(n=>n.id!==t.toastId)}}},Lu=[];let ju={toasts:[]};function Ia(e){ju=N2(ju,e),Lu.forEach(t=>{t(ju)})}function $2({...e}){const t=A2(),n=i=>Ia({type:"UPDATE_TOAST",toast:{...i,id:t}}),r=()=>Ia({type:"DISMISS_TOAST",toastId:t});return Ia({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:i=>{i||r()}}}),{id:t,dismiss:r,update:n}}function F2(){const[e,t]=g.useState(ju);return g.useEffect(()=>(Lu.push(t),()=>{const n=Lu.indexOf(t);n>-1&&Lu.splice(n,1)}),[e]),{...e,toast:$2,dismiss:n=>Ia({type:"DISMISS_TOAST",toastId:n})}}var L2=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),j2="VisuallyHidden",fm=g.forwardRef((e,t)=>w.jsx(ke.span,{...e,ref:t,style:{...L2,...e.style}}));fm.displayName=j2;var hm="ToastProvider",[pm,D2,z2]=Kg("Toast"),[vk]=ss("Toast",[z2]),[U2,Md]=vk(hm),gk=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:i="right",swipeThreshold:s=50,children:o}=e,[a,l]=g.useState(null),[u,c]=g.useState(0),d=g.useRef(!1),f=g.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${hm}\`. Expected non-empty \`string\`.`),w.jsx(pm.Provider,{scope:t,children:w.jsx(U2,{scope:t,label:n,duration:r,swipeDirection:i,swipeThreshold:s,toastCount:u,viewport:a,onViewportChange:l,onToastAdd:g.useCallback(()=>c(m=>m+1),[]),onToastRemove:g.useCallback(()=>c(m=>m-1),[]),isFocusedToastEscapeKeyDownRef:d,isClosePausedRef:f,children:o})})};gk.displayName=hm;var mk="ToastViewport",V2=["F8"],dv="toast.viewportPause",fv="toast.viewportResume",yk=g.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=V2,label:i="Notifications ({hotkey})",...s}=e,o=Md(mk,n),a=D2(n),l=g.useRef(null),u=g.useRef(null),c=g.useRef(null),d=g.useRef(null),f=et(t,d,o.onViewportChange),m=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),_=o.toastCount>0;g.useEffect(()=>{const y=h=>{var x;r.length!==0&&r.every(b=>h[b]||h.code===b)&&((x=d.current)==null||x.focus())};return document.addEventListener("keydown",y),()=>document.removeEventListener("keydown",y)},[r]),g.useEffect(()=>{const y=l.current,h=d.current;if(_&&y&&h){const v=()=>{if(!o.isClosePausedRef.current){const S=new CustomEvent(dv);h.dispatchEvent(S),o.isClosePausedRef.current=!0}},x=()=>{if(o.isClosePausedRef.current){const S=new CustomEvent(fv);h.dispatchEvent(S),o.isClosePausedRef.current=!1}},b=S=>{!y.contains(S.relatedTarget)&&x()},E=()=>{y.contains(document.activeElement)||x()};return y.addEventListener("focusin",v),y.addEventListener("focusout",b),y.addEventListener("pointermove",v),y.addEventListener("pointerleave",E),window.addEventListener("blur",v),window.addEventListener("focus",x),()=>{y.removeEventListener("focusin",v),y.removeEventListener("focusout",b),y.removeEventListener("pointermove",v),y.removeEventListener("pointerleave",E),window.removeEventListener("blur",v),window.removeEventListener("focus",x)}}},[_,o.isClosePausedRef]);const p=g.useCallback(({tabbingDirection:y})=>{const v=a().map(x=>{const b=x.ref.current,E=[b,...t3(b)];return y==="forwards"?E:E.reverse()});return(y==="forwards"?v.reverse():v).flat()},[a]);return g.useEffect(()=>{const y=d.current;if(y){const h=v=>{var E,S,P;const x=v.altKey||v.ctrlKey||v.metaKey;if(v.key==="Tab"&&!x){const C=document.activeElement,T=v.shiftKey;if(v.target===y&&T){(E=u.current)==null||E.focus();return}const M=p({tabbingDirection:T?"backwards":"forwards"}),z=M.findIndex(F=>F===C);ih(M.slice(z+1))?v.preventDefault():T?(S=u.current)==null||S.focus():(P=c.current)==null||P.focus()}};return y.addEventListener("keydown",h),()=>y.removeEventListener("keydown",h)}},[a,p]),w.jsxs(AN,{ref:l,role:"region","aria-label":i.replace("{hotkey}",m),tabIndex:-1,style:{pointerEvents:_?void 0:"none"},children:[_&&w.jsx(hv,{ref:u,onFocusFromOutsideViewport:()=>{const y=p({tabbingDirection:"forwards"});ih(y)}}),w.jsx(pm.Slot,{scope:n,children:w.jsx(ke.ol,{tabIndex:-1,...s,ref:f})}),_&&w.jsx(hv,{ref:c,onFocusFromOutsideViewport:()=>{const y=p({tabbingDirection:"backwards"});ih(y)}})]})});yk.displayName=mk;var _k="ToastFocusProxy",hv=g.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...i}=e,s=Md(_k,n);return w.jsx(fm,{tabIndex:0,...i,ref:t,style:{position:"fixed"},onFocus:o=>{var u;const a=o.relatedTarget;!((u=s.viewport)!=null&&u.contains(a))&&r()}})});hv.displayName=_k;var Rl="Toast",B2="toast.swipeStart",q2="toast.swipeMove",W2="toast.swipeCancel",H2="toast.swipeEnd",wk=g.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:i,onOpenChange:s,...o}=e,[a,l]=yd({prop:r,defaultProp:i??!0,onChange:s,caller:Rl});return w.jsx(br,{present:n||a,children:w.jsx(Q2,{open:a,...o,ref:t,onClose:()=>l(!1),onPause:Ut(e.onPause),onResume:Ut(e.onResume),onSwipeStart:ee(e.onSwipeStart,u=>{u.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:ee(e.onSwipeMove,u=>{const{x:c,y:d}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","move"),u.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${c}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${d}px`)}),onSwipeCancel:ee(e.onSwipeCancel,u=>{u.currentTarget.setAttribute("data-swipe","cancel"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:ee(e.onSwipeEnd,u=>{const{x:c,y:d}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","end"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${c}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${d}px`),l(!1)})})})});wk.displayName=Rl;var[G2,K2]=vk(Rl,{onClose(){}}),Q2=g.forwardRef((e,t)=>{const{__scopeToast:n,type:r="foreground",duration:i,open:s,onClose:o,onEscapeKeyDown:a,onPause:l,onResume:u,onSwipeStart:c,onSwipeMove:d,onSwipeCancel:f,onSwipeEnd:m,..._}=e,p=Md(Rl,n),[y,h]=g.useState(null),v=et(t,F=>h(F)),x=g.useRef(null),b=g.useRef(null),E=i||p.duration,S=g.useRef(0),P=g.useRef(E),C=g.useRef(0),{onToastAdd:T,onToastRemove:R}=p,N=Ut(()=>{var W;(y==null?void 0:y.contains(document.activeElement))&&((W=p.viewport)==null||W.focus()),o()}),M=g.useCallback(F=>{!F||F===1/0||(window.clearTimeout(C.current),S.current=new Date().getTime(),C.current=window.setTimeout(N,F))},[N]);g.useEffect(()=>{const F=p.viewport;if(F){const W=()=>{M(P.current),u==null||u()},B=()=>{const Q=new Date().getTime()-S.current;P.current=P.current-Q,window.clearTimeout(C.current),l==null||l()};return F.addEventListener(dv,B),F.addEventListener(fv,W),()=>{F.removeEventListener(dv,B),F.removeEventListener(fv,W)}}},[p.viewport,E,l,u,M]),g.useEffect(()=>{s&&!p.isClosePausedRef.current&&M(E)},[s,E,p.isClosePausedRef,M]),g.useEffect(()=>(T(),()=>R()),[T,R]);const z=g.useMemo(()=>y?Pk(y):null,[y]);return p.viewport?w.jsxs(w.Fragment,{children:[z&&w.jsx(Y2,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite",children:z}),w.jsx(G2,{scope:n,onClose:N,children:xl.createPortal(w.jsx(pm.ItemSlot,{scope:n,children:w.jsx(MN,{asChild:!0,onEscapeKeyDown:ee(a,()=>{p.isFocusedToastEscapeKeyDownRef.current||N(),p.isFocusedToastEscapeKeyDownRef.current=!1}),children:w.jsx(ke.li,{tabIndex:0,"data-state":s?"open":"closed","data-swipe-direction":p.swipeDirection,..._,ref:v,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:ee(e.onKeyDown,F=>{F.key==="Escape"&&(a==null||a(F.nativeEvent),F.nativeEvent.defaultPrevented||(p.isFocusedToastEscapeKeyDownRef.current=!0,N()))}),onPointerDown:ee(e.onPointerDown,F=>{F.button===0&&(x.current={x:F.clientX,y:F.clientY})}),onPointerMove:ee(e.onPointerMove,F=>{if(!x.current)return;const W=F.clientX-x.current.x,B=F.clientY-x.current.y,Q=!!b.current,O=["left","right"].includes(p.swipeDirection),A=["left","up"].includes(p.swipeDirection)?Math.min:Math.max,V=O?A(0,W):0,K=O?0:A(0,B),te=F.pointerType==="touch"?10:2,oe={x:V,y:K},de={originalEvent:F,delta:oe};Q?(b.current=oe,pu(q2,d,de,{discrete:!1})):H0(oe,p.swipeDirection,te)?(b.current=oe,pu(B2,c,de,{discrete:!1}),F.target.setPointerCapture(F.pointerId)):(Math.abs(W)>te||Math.abs(B)>te)&&(x.current=null)}),onPointerUp:ee(e.onPointerUp,F=>{const W=b.current,B=F.target;if(B.hasPointerCapture(F.pointerId)&&B.releasePointerCapture(F.pointerId),b.current=null,x.current=null,W){const Q=F.currentTarget,O={originalEvent:F,delta:W};H0(W,p.swipeDirection,p.swipeThreshold)?pu(H2,m,O,{discrete:!0}):pu(W2,f,O,{discrete:!0}),Q.addEventListener("click",A=>A.preventDefault(),{once:!0})}})})})}),p.viewport)})]}):null}),Y2=e=>{const{__scopeToast:t,children:n,...r}=e,i=Md(Rl,t),[s,o]=g.useState(!1),[a,l]=g.useState(!1);return Z2(()=>o(!0)),g.useEffect(()=>{const u=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(u)},[]),a?null:w.jsx(wd,{asChild:!0,children:w.jsx(fm,{...r,children:s&&w.jsxs(w.Fragment,{children:[i.label," ",n]})})})},X2="ToastTitle",xk=g.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return w.jsx(ke.div,{...r,ref:t})});xk.displayName=X2;var J2="ToastDescription",bk=g.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return w.jsx(ke.div,{...r,ref:t})});bk.displayName=J2;var Ek="ToastAction",Sk=g.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?w.jsx(kk,{altText:n,asChild:!0,children:w.jsx(vm,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${Ek}\`. Expected non-empty \`string\`.`),null)});Sk.displayName=Ek;var Ck="ToastClose",vm=g.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,i=K2(Ck,n);return w.jsx(kk,{asChild:!0,children:w.jsx(ke.button,{type:"button",...r,ref:t,onClick:ee(e.onClick,i.onClose)})})});vm.displayName=Ck;var kk=g.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...i}=e;return w.jsx(ke.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...i,ref:t})});function Pk(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),e3(r)){const i=r.ariaHidden||r.hidden||r.style.display==="none",s=r.dataset.radixToastAnnounceExclude==="";if(!i)if(s){const o=r.dataset.radixToastAnnounceAlt;o&&t.push(o)}else t.push(...Pk(r))}}),t}function pu(e,t,n,{discrete:r}){const i=n.originalEvent.currentTarget,s=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?Lg(i,s):i.dispatchEvent(s)}var H0=(e,t,n=0)=>{const r=Math.abs(e.x),i=Math.abs(e.y),s=r>i;return t==="left"||t==="right"?s&&r>n:!s&&i>n};function Z2(e=()=>{}){const t=Ut(e);fn(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function e3(e){return e.nodeType===e.ELEMENT_NODE}function t3(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function ih(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var n3=gk,Rk=yk,Tk=wk,Ik=xk,Ok=bk,Mk=Sk,Ak=vm;const G0=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,K0=A1,r3=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return K0(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:i,defaultVariants:s}=t,o=Object.keys(i).map(u=>{const c=n==null?void 0:n[u],d=s==null?void 0:s[u];if(c===null)return null;const f=G0(c)||G0(d);return i[u][f]}),a=n&&Object.entries(n).reduce((u,c)=>{let[d,f]=c;return f===void 0||(u[d]=f),u},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,c)=>{let{class:d,className:f,...m}=c;return Object.entries(m).every(_=>{let[p,y]=_;return Array.isArray(y)?y.includes({...s,...a}[p]):{...s,...a}[p]===y})?[...u,d,f]:u},[]);return K0(e,o,l,n==null?void 0:n.class,n==null?void 0:n.className)},i3=n3,Nk=g.forwardRef(({className:e,...t},n)=>w.jsx(Rk,{ref:n,className:ct("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",e),...t}));Nk.displayName=Rk.displayName;const s3=r3("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-16 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),$k=g.forwardRef(({className:e,variant:t,...n},r)=>w.jsx(Tk,{ref:r,className:ct(s3({variant:t}),e),...n}));$k.displayName=Tk.displayName;const o3=g.forwardRef(({className:e,...t},n)=>w.jsx(Mk,{ref:n,className:ct("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors group-[.destructive]:border-muted/40 hover:bg-secondary group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 group-[.destructive]:focus:ring-destructive disabled:pointer-events-none disabled:opacity-50",e),...t}));o3.displayName=Mk.displayName;const Fk=g.forwardRef(({className:e,...t},n)=>w.jsx(Ak,{ref:n,className:ct("absolute right-2 top-2 inline-flex h-11 w-11 items-center justify-center rounded-md text-foreground transition-colors hover:bg-muted focus:outline-none focus:ring-2 focus:ring-ring group-[.destructive]:text-destructive-foreground group-[.destructive]:hover:bg-destructive-foreground/10 group-[.destructive]:focus:ring-destructive-foreground",e),"aria-label":"Dismiss notification","toast-close":"",...t,children:w.jsx(d2,{className:"h-4 w-4"})}));Fk.displayName=Ak.displayName;const Lk=g.forwardRef(({className:e,...t},n)=>w.jsx(Ik,{ref:n,className:ct("text-sm font-semibold",e),...t}));Lk.displayName=Ik.displayName;const jk=g.forwardRef(({className:e,...t},n)=>w.jsx(Ok,{ref:n,className:ct("text-sm opacity-90",e),...t}));jk.displayName=Ok.displayName;function a3(){const{toasts:e}=F2();return w.jsxs(i3,{children:[e.map(function({id:t,title:n,description:r,action:i,...s}){return w.jsxs($k,{...s,children:[w.jsxs("div",{className:"grid gap-1",children:[n&&w.jsx(Lk,{children:n}),r&&w.jsx(jk,{children:r})]}),i,w.jsx(Fk,{})]},t)}),w.jsx(Nk,{})]})}function l3(){const{pathname:e,hash:t}=hn();g.useLayoutEffect(()=>{t||window.scrollTo({top:0,left:0,behavior:"instant"})},[e,t])}const Dk=iF(),u3=Dk?xA:wA;if(!Dk&&typeof window<"u"){const e=window.location.hash;e.startsWith("#/")&&!e.startsWith("#//")&&window.history.replaceState(null,"",e.slice(1))}const c3=q.lazy(()=>ae(()=>import("./AuthorizePaperEditView-BmKMH1AZ.js"),__vite__mapDeps([0,1,2,3]))),d3=q.lazy(()=>ae(()=>import("./FollowingView-e1HW5vmf.js"),__vite__mapDeps([4,5,6,7,8,9,1,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33]))),Q0=q.lazy(()=>ae(()=>import("./FeedView-wNAf1UnM.js"),__vite__mapDeps([5,6,7,8,9,1,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33]))),f3=q.lazy(()=>ae(()=>import("./ChatView-BYQGLYvv.js"),__vite__mapDeps([34,35,29,30,21,22,36,37,8,38,39,40,41,42,43,1,44,45,46,47,48,11,49,50,15,16,51,52,27,28,53,54]))),h3=q.lazy(()=>ae(()=>import("./SharedChatView-pWPy2puC.js"),__vite__mapDeps([55,35,29,30,21,22,36,37,8,38,39,40,41,42,43,1,44,45,46,47,48,11,49,50,15,16,51,52]))),p3=q.lazy(()=>ae(()=>import("./PapersListView-BkLVnEdQ.js"),__vite__mapDeps([56,17,18,10,19,13,14,15,16,20,21,22,23,24,25,26,8,31,32,57,33,58,59]))),v3=q.lazy(()=>ae(()=>import("./PaperDetailView-BGo-dK6S.js"),__vite__mapDeps([60,1,19,17,18,10,20,61,22,36,23,62,21,63,31,32,64,65,66,25,33,2,7,28,45,67,68,69,70,24,49,71,37,8,72,73,74,75,11,76,77,38,78,79,41,42,26,80,81,15,16,82]))),g3=q.lazy(()=>ae(()=>import("./PaperReaderView-BEoTUiXT.js"),__vite__mapDeps([83,35,29,30,21,22,36,37,8,38,39,40,41,42,43,1,44,45,46,47,48,11,49,50,15,16,51,52,84,63,23,31,32,34,27,28,53,54]))),m3=q.lazy(()=>ae(()=>import("./TagsIndexView-Bkf2GkuQ.js"),__vite__mapDeps([85,8,18,10,86,49,87,53,88,89,44,75,90,39,91,77,6,33,92,25,93,72,2,69,73,70,24,7,71,1,74,11,94,95]))),y3=q.lazy(()=>ae(()=>import("./TagBrowseView-B4ApRi7q.js"),__vite__mapDeps([96,97,9,1,11,17,18,10,13,14,15,16,19,20,21,22,23,24,25,26,12,98,84,40,41,42,43,36,52,8,58,59,65,66,86,31,32,33,99,90,38]))),_3=q.lazy(()=>ae(()=>import("./MethodsIndexView-CPxYYZYk.js"),__vite__mapDeps([100,8,95,86,33,92,25,93,72,2,69,73,70,24,7,49,71,1,74,11,94,88]))),w3=q.lazy(()=>ae(()=>import("./FrameworksIndexView-D3oe8htL.js"),__vite__mapDeps([101,19,8,18,59]))),x3=q.lazy(()=>ae(()=>import("./TrendsView-C7Tf25qK.js"),__vite__mapDeps([102,33,25]))),b3=q.lazy(()=>ae(()=>import("./ConferencesIndexView-CYTn_PTx.js"),__vite__mapDeps([103,8,104,33,92,25,93,72,2,69,73,70,24,7,49,71,1,74,11]))),E3=q.lazy(()=>ae(()=>import("./AiDeadlinesView-Ad6LnMOr.js"),__vite__mapDeps([105,8,106,78,25,33,23,7,104]))),S3=q.lazy(()=>ae(()=>import("./ConferenceDetailView-BEtffUKD.js"),__vite__mapDeps([107,92,25,84,40,41,42,43,36,21,22,1,52,8,58,95,18,108,104,10,33,23,99]))),C3=q.lazy(()=>ae(()=>import("./ConferenceTaskView-BAq9JbyI.js"),__vite__mapDeps([109,13,14,15,16,17,18,10,19,20,21,22,23,24,25,26,84,40,41,42,43,36,1,52,8,58,108,31,32,33,99]))),k3=q.lazy(()=>ae(()=>import("./OrganizationsIndexView-BfbGHJbZ.js"),__vite__mapDeps([110,33,8,111]))),P3=q.lazy(()=>ae(()=>import("./OrganizationDetailView-DiOUhHgj.js"),__vite__mapDeps([112,97,9,1,11,84,40,41,42,43,36,21,22,52,113,25,8,13,14,15,16,17,18,10,19,20,23,24,26,33,70,2,7,49,71,31,32,58,81,99]))),R3=q.lazy(()=>ae(()=>import("./OrganizationDetailView-DiOUhHgj.js"),__vite__mapDeps([112,97,9,1,11,84,40,41,42,43,36,21,22,52,113,25,8,13,14,15,16,17,18,10,19,20,23,24,26,33,70,2,7,49,71,31,32,58,81,99]))),T3=q.lazy(()=>ae(()=>import("./AuthorDetailView-HZ2z-PQp.js"),__vite__mapDeps([114,15,16,13,14,17,18,10,19,20,21,22,23,24,25,26,97,9,1,11,33,31,32,58,99]))),I3=q.lazy(()=>ae(()=>import("./MethodDetailView-BI5O9w4y.js"),__vite__mapDeps([115,97,9,1,11,17,18,10,13,14,15,16,19,20,21,22,23,24,25,26,84,40,41,42,43,36,52,8,58,86,31,32,33,99]))),O3=q.lazy(()=>ae(()=>import("./BenchmarkDetailView-BomzuNed.js"),__vite__mapDeps([116,97,9,1,11,8,61,22,36,23,62,65,66,20,106,78,19,25,33,98,86,58,99,117]))),M3=q.lazy(()=>ae(()=>import("./SavedPapersView-B2OtoH-9.js"),__vite__mapDeps([118,14,15,16,17,18,10,19,20,21,22,23,25,33,66,80]))),A3=q.lazy(()=>ae(()=>import("./SettingsView-DSsDYMnQ.js"),__vite__mapDeps([119,1,9,106,78,6,12,90,30,64,54,65,66,48,89]))),N3=q.lazy(()=>ae(()=>import("./PrivacyView-Dv3D7fuz.js"),__vite__mapDeps([120,64]))),$3=q.lazy(()=>ae(()=>import("./ApiDocsView-DT_kBPK6.js"),__vite__mapDeps([121,64,41,122]))),F3=q.lazy(()=>ae(()=>import("./McpView-B1VMxy4R.js"),__vite__mapDeps([123,64,46,38,48,45,124]))),L3=q.lazy(()=>ae(()=>import("./SubmitView-Ddks3aKH.js"),__vite__mapDeps([125,1,33,2,69,73,21,22,68]))),j3=q.lazy(()=>ae(()=>import("./CronDashboard-BrJey03Y.js"),__vite__mapDeps([126,1,127,128,76,2,50,75,88,91,39,87,48,129,71,130,79,32,3,8,30]))),D3=q.lazy(()=>ae(()=>import("./AutonomousOperations-Ch9vfeiA.js"),__vite__mapDeps([131,1,127,128,76,2,69,91,47]))),z3=q.lazy(()=>ae(()=>import("./SubmissionsDashboard-D9hqPZPB.js"),__vite__mapDeps([132,67,68,1,32,8,23,74,21,22,129,71,130,133]))),U3=q.lazy(()=>ae(()=>import("./UserProfileView-xzT46sjD.js"),__vite__mapDeps([134,113,25,8]))),V3=q.lazy(()=>ae(()=>import("./RateLimitsView-CHGVVIWH.js"),__vite__mapDeps([135,66]))),B3=q.lazy(()=>ae(()=>import("./AstraForRoboticsView-BiXYC0gV.js"),__vite__mapDeps([136,13,14,15,16,17,18,10,19,20,21,22,23,24,25,26,33,31,32,64,137]))),sh=q.lazy(()=>ae(()=>import("./NotFound-Bc6y0g0J.js"),[])),q3=q.lazy(()=>ae(()=>import("./SearchOverlay-DLtGxH8I.js"),__vite__mapDeps([138,20,8,21,22,57,18,10]))),W3=q.lazy(()=>ae(()=>import("./StagingAccessRequestView-B7Yf73-b.js"),__vite__mapDeps([139,130]))),zk=()=>w.jsxs("div",{className:"page","aria-busy":"true","aria-live":"polite",children:[w.jsx("div",{className:"animate-pulse rounded-md bg-muted",style:{height:24,width:"30%",marginBottom:24}}),w.jsx("div",{className:"animate-pulse rounded-md bg-muted",style:{height:64,width:"60%",marginBottom:32}}),w.jsxs("div",{className:"paper-list",style:{display:"grid",gap:16},children:[w.jsx("div",{className:"animate-pulse rounded-md bg-muted",style:{height:96}}),w.jsx("div",{className:"animate-pulse rounded-md bg-muted",style:{height:96}}),w.jsx("div",{className:"animate-pulse rounded-md bg-muted",style:{height:96}})]})]}),H3=new XA({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:1}}}),G3=()=>{const{arxivId:e}=xS();return w.jsx(Ro,{to:e?`/paper/${e}`:"/papers",replace:!0})},K3=()=>{const{taskSlug:e}=xS();return w.jsx(Ro,{to:e?`/tasks/${e}`:"/tasks",replace:!0})},Q3=({element:e})=>$o()?w.jsx(Ro,{to:"/",replace:!0}):w.jsx(w.Fragment,{children:e}),pv=({element:e})=>{const{user:t,isLoading:n}=pk(),r=hn();return $o()?w.jsx(Ro,{to:"/",replace:!0}):n?w.jsx("div",{className:"page",children:w.jsx("div",{className:"submission-loading",children:w.jsx("span",{children:"Checking admin session..."})})}):t?t.is_admin?w.jsx(w.Fragment,{children:e}):w.jsx("div",{className:"page",children:w.jsxs("div",{className:"submission-empty submission-empty-warn",children:[w.jsx("h1",{children:"Admin access required"}),w.jsxs("p",{children:["Signed in as @",t.username,". This dashboard is limited to allowlisted admin accounts."]})]})}):w.jsx("div",{className:"page",children:w.jsxs("div",{className:"submission-empty submission-empty-warn",children:[w.jsx("h1",{children:"Sign in required"}),w.jsx("p",{children:"Sign in with an allowlisted Hugging Face admin account to view admin operations."}),w.jsx(y1,{returnTo:`${r.pathname}${r.search}`})]})})},Y3=()=>{const e=eF(),t=typeof window<"u"&&new URL(e,window.location.origin).origin!==window.location.origin;return q.useEffect(()=>{t&&window.location.replace(e)},[e,t]),t?w.jsx("div",{className:"page",children:w.jsxs("div",{className:"submission-loading",children:[w.jsx("span",{children:"Opening the production admin dashboard..."}),w.jsx("a",{href:e,children:"Continue"})]})}):w.jsx(pv,{element:w.jsx(j3,{})})},Y0=({reader:e=!1})=>{const[t,n]=q.useState(!1),{pathname:r}=hn();q.useEffect(()=>{const a=l=>{(l.metaKey||l.ctrlKey)&&l.key==="k"&&(l.preventDefault(),n(!0))};return window.addEventListener("keydown",a),()=>window.removeEventListener("keydown",a)},[]);const i=w.jsx(T2,{onOpenSearch:()=>n(!0)}),s=w.jsx(fS,{resetKey:r,children:w.jsx(q.Suspense,{fallback:w.jsx(zk,{}),children:w.jsx(cA,{})})}),o=t&&w.jsx(q.Suspense,{fallback:null,children:w.jsx(q3,{open:t,onClose:()=>n(!1)})});return e?w.jsxs("div",{className:"reader-route-shell",children:[i,w.jsx("div",{className:"reader-route-content",children:s}),o]}):w.jsxs(w.Fragment,{children:[i,w.jsx("main",{children:s}),w.jsx(I2,{}),o]})},X3=()=>(l3(),q.useLayoutEffect(()=>{var e;(e=document.getElementById("initial-discovery-footer"))==null||e.remove()},[]),w.jsxs(dA,{children:[w.jsx(re,{path:"/request-access",element:w.jsx(q.Suspense,{fallback:w.jsx(zk,{}),children:w.jsx(W3,{})})}),w.jsx(re,{element:w.jsx(Y0,{reader:!0}),children:w.jsx(re,{path:"/pdf/:paperId",element:rF()?w.jsx(g3,{}):w.jsx(sh,{})})}),w.jsxs(re,{element:w.jsx(Y0,{}),children:[w.jsx(re,{path:"/",element:w.jsx(Q0,{})}),w.jsx(re,{path:"/following",element:w.jsx(d3,{})}),w.jsx(re,{path:"/x-trending",element:w.jsx(Q0,{xTrending:!0})}),w.jsx(re,{path:"/chat/:sessionId?",element:al()?w.jsx(f3,{}):w.jsx(Ro,{to:"/",replace:!0})}),w.jsx(re,{path:"/share/:shareId",element:al()?w.jsx(h3,{}):w.jsx(sh,{})}),w.jsx(re,{path:"/papers",element:w.jsx(p3,{})}),w.jsx(re,{path:"/papers/:arxivId",element:w.jsx(G3,{})}),w.jsx(re,{path:"/paper/:arxivId",element:w.jsx(v3,{})}),w.jsx(re,{path:"/tasks",element:w.jsx(m3,{})}),w.jsx(re,{path:"/tasks/:taskSlug",element:w.jsx(y3,{})}),w.jsx(re,{path:"/task/:taskSlug",element:w.jsx(K3,{})}),w.jsx(re,{path:"/methods",element:w.jsx(_3,{})}),w.jsx(re,{path:"/methods/:methodSlug",element:w.jsx(I3,{})}),w.jsx(re,{path:"/frameworks",element:w.jsx(w3,{})}),w.jsx(re,{path:"/trends",element:w.jsx(x3,{})}),w.jsx(re,{path:"/conferences",element:w.jsx(b3,{})}),w.jsx(re,{path:"/ai-deadlines",element:w.jsx(E3,{})}),w.jsx(re,{path:"/conferences/:confSlug",element:w.jsx(S3,{})}),w.jsx(re,{path:"/conferences/:confSlug/:taskSlug",element:w.jsx(C3,{})}),w.jsx(re,{path:"/organizations",element:w.jsx(k3,{})}),w.jsx(re,{path:"/orgs/:orgSlug",element:w.jsx(P3,{})}),w.jsx(re,{path:"/orgs/:orgSlug/:taskSlug",element:w.jsx(R3,{})}),w.jsx(re,{path:"/authors/:authorId",element:w.jsx(T3,{})}),w.jsx(re,{path:"/benchmark/:datasetSlug",element:w.jsx(O3,{})}),w.jsx(re,{path:"/authorize-paper-edit/:authorizationId",element:w.jsx(c3,{})}),w.jsx(re,{path:"/submit",element:w.jsx(L3,{})}),w.jsx(re,{path:"/saved",element:w.jsx(Q3,{element:w.jsx(M3,{})})}),w.jsx(re,{path:"/settings",element:w.jsx(A3,{})}),w.jsx(re,{path:"/privacy",element:w.jsx(N3,{})}),w.jsx(re,{path:"/docs/api",element:w.jsx($3,{})}),w.jsx(re,{path:"/mcp",element:w.jsx(F3,{})}),w.jsx(re,{path:"/admin-dashboard",element:w.jsx(Y3,{})}),w.jsx(re,{path:"/autonomous-operations",element:w.jsx(pv,{element:w.jsx(D3,{})})}),w.jsx(re,{path:"/cron-dashboard",element:w.jsx(Ro,{to:"/admin-dashboard",replace:!0})}),w.jsx(re,{path:"/submissions",element:w.jsx(pv,{element:w.jsx(z3,{})})}),w.jsx(re,{path:"/rate-limits",element:w.jsx(V3,{})}),w.jsx(re,{path:"/astra-for-robotics",element:w.jsx(B3,{})}),w.jsx(re,{path:"/:username",element:w.jsx(U3,{})}),w.jsx(re,{path:"*",element:w.jsx(sh,{})})]})]})),J3=()=>w.jsx(JA,{client:H3,children:w.jsxs(C2,{children:[w.jsx(u3,{children:w.jsx(X3,{})}),w.jsx(a3,{}),!1]})});yM();const Z3=w.jsx(yT,{attribute:"class",defaultTheme:"system",enableSystem:!0,disableTransitionOnChange:!0,storageKey:"pwc-theme",children:w.jsx(fS,{children:w.jsx(J3,{})})}),ez=wb(document.getElementById("root"));ez.render(w.jsx(q.StrictMode,{children:Z3}));export{h2 as $,Od as A,yd as B,l2 as C,et as D,ee as E,xj as F,ss as G,y1 as H,ct as I,Pz as J,dz as K,bn as L,mz as M,V1 as N,Bj as O,br as P,fC as Q,Vj as R,c2 as S,bz as T,o3 as U,q as V,Ez as W,d2 as X,rF as Y,cz as Z,f2 as _,pk as a,oz as a$,dk as a0,er as a1,fz as a2,uz as a3,aw as a4,J$ as a5,u2 as a6,ae as a7,A1 as a8,xl as a9,pz as aA,kz as aB,D1 as aC,z1 as aD,U1 as aE,El as aF,at as aG,Up as aH,TS as aI,qA as aJ,ZA as aK,nN as aL,oN as aM,rN as aN,iN as aO,At as aP,lN as aQ,l0 as aR,sN as aS,il as aT,KA as aU,OS as aV,xz as aW,t1 as aX,Dg as aY,HS as aZ,jg as a_,$g as aa,b2 as ab,cv as ac,w1 as ad,r3 as ae,Qs as af,W$ as ag,G$ as ah,K$ as ai,Q$ as aj,vi as ak,X$ as al,Y$ as am,lz as an,Ro as ao,Rj as ap,Tj as aq,nC as ar,wd as as,_d as at,Ij as au,Oj as av,rz as aw,nz as ax,E2 as ay,wz as az,cN as b,sz as b0,uN as b1,qg as b2,z0 as b3,hn as c,g as d,Mg as e,Tz as f,iz as g,Z$ as h,zS as i,w as j,$o as k,al as l,nF as m,tF as n,Sz as o,S2 as p,hz as q,Rz as r,Id as s,Cz as t,xS as u,vz as v,gz as w,F2 as x,_z as y,ke as z}; diff --git a/assets/index-BxR27SAB.js b/assets/index-CWaI9Snb.js similarity index 72% rename from assets/index-BxR27SAB.js rename to assets/index-CWaI9Snb.js index 27332764e6cd0589d3a3dd4cdb7afb58e9f59f9f..9a83f07a801cd63277383a2267a37b42b1ff5053 100644 --- a/assets/index-BxR27SAB.js +++ b/assets/index-CWaI9Snb.js @@ -1 +1 @@ -import{d as u}from"./index-CjdUkE4w.js";function o(r){const e=u.useRef({value:r,previous:r});return u.useMemo(()=>(e.current.value!==r&&(e.current.previous=e.current.value,e.current.value=r),e.current.previous),[r])}export{o as u}; +import{d as u}from"./index-CHGpuh10.js";function o(r){const e=u.useRef({value:r,previous:r});return u.useMemo(()=>(e.current.value!==r&&(e.current.previous=e.current.value,e.current.value=r),e.current.previous),[r])}export{o as u}; diff --git a/assets/input-7i-rZ7fA.js b/assets/input-FDP77A0C.js similarity index 88% rename from assets/input-7i-rZ7fA.js rename to assets/input-FDP77A0C.js index 9bee329800589093d6ad4d6262a2c4492012b0fc..19ba9e23c2880b16ac71a83029f5c5f91c05364c 100644 --- a/assets/input-7i-rZ7fA.js +++ b/assets/input-FDP77A0C.js @@ -1 +1 @@ -import{d as s,j as i,I as n}from"./index-CjdUkE4w.js";const d=s.forwardRef(({className:e,type:r,...o},t)=>i.jsx("input",{type:r,className:n("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:t,...o}));d.displayName="Input";export{d as I}; +import{d as s,j as i,I as n}from"./index-CHGpuh10.js";const d=s.forwardRef(({className:e,type:r,...o},t)=>i.jsx("input",{type:r,className:n("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:t,...o}));d.displayName="Input";export{d as I}; diff --git a/assets/loader-circle-xTdSzHv_.js b/assets/loader-circle-DuUnmHjj.js similarity index 85% rename from assets/loader-circle-xTdSzHv_.js rename to assets/loader-circle-DuUnmHjj.js index 1b1285b62c8165d07caa1fbc8f07ed7e9d458b6d..33ddb13ee0f022ff9fec7fe754dc496f68ca220c 100644 --- a/assets/loader-circle-xTdSzHv_.js +++ b/assets/loader-circle-DuUnmHjj.js @@ -1,4 +1,4 @@ -import{s as e}from"./index-CjdUkE4w.js";/** +import{s as e}from"./index-CHGpuh10.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/moon-HVqBvdxs.js b/assets/moon-DPD0RWyO.js similarity index 85% rename from assets/moon-HVqBvdxs.js rename to assets/moon-DPD0RWyO.js index c8e620facf8429c37fcbc8b62237b416f666a506..3eae9b849de8d26150f869873251ff93c38624a3 100644 --- a/assets/moon-HVqBvdxs.js +++ b/assets/moon-DPD0RWyO.js @@ -1,4 +1,4 @@ -import{s as o}from"./index-CjdUkE4w.js";/** +import{s as o}from"./index-CHGpuh10.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/openrouter-B-ghWDkd.js b/assets/openrouter-CqtCKiJB.js similarity index 82% rename from assets/openrouter-B-ghWDkd.js rename to assets/openrouter-CqtCKiJB.js index 6aaebfe4acfe8ad55d8df524dffe2b0a7f687104..e293b6c08f1fab7d9b213b70f040ce6d18badd88 100644 --- a/assets/openrouter-B-ghWDkd.js +++ b/assets/openrouter-CqtCKiJB.js @@ -1 +1 @@ -import{b as r}from"./index-CjdUkE4w.js";import{c as n}from"./chat-B1EBF720.js";const o=["chat","openrouter","usage"],u=["chat","openrouter","credential"];function s(e=!0){return r({queryKey:o,queryFn:()=>n.getUsage(),enabled:e,staleTime:3e4,refetchOnWindowFocus:!0})}function c(e=!0){return r({queryKey:u,queryFn:()=>n.getOpenRouterCredential(),enabled:e,refetchOnWindowFocus:!0})}function m(e){const t=new Date(e);return{local:new Intl.DateTimeFormat(void 0,{year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"2-digit",timeZoneName:"short"}).format(t),utc:`${t.toLocaleString("en-GB",{timeZone:"UTC",year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})} UTC`}}export{u as O,s as a,m as r,c as u}; +import{b as r}from"./index-CHGpuh10.js";import{c as n}from"./chat-CuiFt2kN.js";const o=["chat","openrouter","usage"],u=["chat","openrouter","credential"];function s(e=!0){return r({queryKey:o,queryFn:()=>n.getUsage(),enabled:e,staleTime:3e4,refetchOnWindowFocus:!0})}function c(e=!0){return r({queryKey:u,queryFn:()=>n.getOpenRouterCredential(),enabled:e,refetchOnWindowFocus:!0})}function m(e){const t=new Date(e);return{local:new Intl.DateTimeFormat(void 0,{year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"2-digit",timeZoneName:"short"}).format(t),utc:`${t.toLocaleString("en-GB",{timeZone:"UTC",year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})} UTC`}}export{u as O,s as a,m as r,c as u}; diff --git a/assets/paperEdits-C_3nZTKz.js b/assets/paperEdits-DFgln8kE.js similarity index 84% rename from assets/paperEdits-C_3nZTKz.js rename to assets/paperEdits-DFgln8kE.js index 44b6c7a54f12ad99672c37ed4450673a91452e1d..087d219321edebc4bfed5158ca8169428b356fc9 100644 --- a/assets/paperEdits-C_3nZTKz.js +++ b/assets/paperEdits-DFgln8kE.js @@ -1 +1 @@ -import{ac as p}from"./index-CjdUkE4w.js";const a={authorization:e=>p(`/paper-edit-authorizations/${encodeURIComponent(e)}`),approve:e=>p(`/paper-edit-authorizations/${encodeURIComponent(e)}/approve`,{method:"POST"}),digest:(e,t)=>p(`/admin/paper-edit-digest?day=${e}&page=${t}`),suspend:(e,t)=>p("/admin/paper-edit-suspension",{method:"POST",body:JSON.stringify({hf_subject:e,suspended:t})})};export{a as p}; +import{ac as p}from"./index-CHGpuh10.js";const a={authorization:e=>p(`/paper-edit-authorizations/${encodeURIComponent(e)}`),approve:e=>p(`/paper-edit-authorizations/${encodeURIComponent(e)}/approve`,{method:"POST"}),digest:(e,t)=>p(`/admin/paper-edit-digest?day=${e}&page=${t}`),suspend:(e,t)=>p("/admin/paper-edit-suspension",{method:"POST",body:JSON.stringify({hf_subject:e,suspended:t})})};export{a as p}; diff --git a/assets/papers-DgZwjF3K.js b/assets/papers-BPpxs2sO.js similarity index 96% rename from assets/papers-DgZwjF3K.js rename to assets/papers-BPpxs2sO.js index 31dfc82525875b3f3a87d8200bcd156efa47d518..6c2f4ea7bd9157da7a419184170b23562631ba2e 100644 --- a/assets/papers-DgZwjF3K.js +++ b/assets/papers-BPpxs2sO.js @@ -1 +1 @@ -import{p as a}from"./curation-CyyuHfv5.js";import{ac as c,az as h,aW as m}from"./index-CjdUkE4w.js";function u(i){const e=new URLSearchParams;for(const[t,s]of Object.entries(i??{}))s!==void 0&&s!==""&&e.set(t,String(s));const r=e.toString();return r?`?${r}`:""}class d{constructor(e){this.request=e}list(e){const r=new URLSearchParams;for(const[s,o]of Object.entries(e??{}))o!==void 0&&o!==""&&r.set(s,String(o));const t=r.toString();return this.request(`/papers/${t?`?${t}`:""}`,{cache:"no-cache"})}search(e,r=1,t=10,s,o,n){const p=new URLSearchParams({q:e,page:r.toString(),page_size:t.toString()});return s&&p.set("mode",s),n!=null&&n.start_date&&p.set("start_date",n.start_date),n!=null&&n.end_date&&p.set("end_date",n.end_date),this.request(`/papers/search?${p.toString()}`,{signal:o})}searchFeed(e){return this.request(`/papers/search/feed${u(e)}`,{cache:"no-cache"})}get(e,r=!0){const t=r?"?include_resources=true":"";return this.request(`/papers/${e}${t}`)}getByArxivId(e,r=!0){const t=r?"?include_resources=true":"";return this.request(`/papers/arxiv/${e}${t}`)}lookup(e){return this.request("/papers/lookup",{method:"POST",body:JSON.stringify({references:e})})}related(e,r=4){return this.request(`/papers/${encodeURIComponent(e)}/related?limit=${r}`)}suggestedQuestions(e){return this.request(`/papers/${encodeURIComponent(e)}/suggested-questions`)}versions(e){return this.request(`/papers/arxiv/${e}/versions`)}indexFromArxiv(e){return this.request(`/papers/index/${e}`,{method:"POST"})}submit(e){return this.request("/papers/submit",{method:"POST",body:JSON.stringify(e)})}copyToBucket(e,r){return this.request(`/papers/${encodeURIComponent(e)}/copy-to-bucket`,{method:"POST",body:JSON.stringify(r)})}trending(e){const r=new URLSearchParams;for(const[s,o]of Object.entries(e??{}))o!==void 0&&r.set(s,String(o));const t=r.toString();return this.request(`/papers/trending${t?`?${t}`:""}`,{cache:"no-store"})}xTrending(e){return this.request(`/papers/x-trending${u(e)}`)}forTask(e,r){return this.request(`/tasks/${e}/papers${u(r)}`)}forMethod(e,r){return this.request(`/methods/${encodeURIComponent(e)}/papers${u(r)}`)}forConference(e,r){return this.request(`/conferences/${e}/papers${u(r)}`)}forOrganization(e,r){return this.request(`/organizations/${e}/papers${u(r)}`)}getAuthor(e){return this.request(`/authors/${e}`)}searchAuthors(e,r){return this.request(`/authors/${u({search:e,page_size:r})}`)}primeCurationState(e,r=!1){return a.primePaper(e,r)}freshAuthMutationDraft(){return a.freshAuthMutationDraft()}resumeFreshAuthMutation(){return a.resumeFreshAuthMutation()}updateTasks(e,r){const t=new URLSearchParams(r.map(s=>["task_ids",String(s)])).toString();return a.mutatePaper(e,"tasks",r,`/papers/${e}/tasks?${t}`,{method:"PUT"})}updateMethods(e,r){const t=new URLSearchParams(r.map(s=>["method_ids",String(s)])).toString();return a.mutatePaper(e,"methods",r,`/papers/${e}/methods?${t}`,{method:"PUT"})}updateOrganizations(e,r){const t=new URLSearchParams(r.map(s=>["organization_ids",String(s)])).toString();return a.mutatePaper(e,"organizations",r,`/papers/${e}/organizations?${t}`,{method:"PUT"})}updateRepositories(e,r){return a.mutatePaper(e,"repositories",r,`/papers/${e}/repositories`,{method:"PUT",body:JSON.stringify({repositories:r})})}updateProjectPages(e,r){return a.mutatePaper(e,"project_pages",r,`/papers/${e}/project-pages`,{method:"PUT",body:JSON.stringify({project_pages:r})})}updateXThreads(e,r){return a.mutatePaper(e,"x_threads",r,`/papers/${e}/x-threads`,{method:"PUT",body:JSON.stringify({x_threads:r})})}updateSourceUrl(e,r){return a.mutatePaper(e,"source_url",r,`/papers/${e}/source-url`,{method:"PUT",body:JSON.stringify({source_url:r})})}updateHfArtifacts(e,r){return a.mutatePaper(e,"hf_artifacts",r,`/papers/${e}/hf-artifacts`,{method:"PUT",body:JSON.stringify(r)})}}const g=new d(c);async function P(i){return(await h(`/papers/${encodeURIComponent(i)}/web-markdown`)).text()}function S(i){return m(`/papers/${encodeURIComponent(i)}/layout`)}export{S as a,P as g,g as p}; +import{p as a}from"./curation-DI9_zYNx.js";import{ac as c,az as h,aW as m}from"./index-CHGpuh10.js";function u(i){const e=new URLSearchParams;for(const[t,s]of Object.entries(i??{}))s!==void 0&&s!==""&&e.set(t,String(s));const r=e.toString();return r?`?${r}`:""}class d{constructor(e){this.request=e}list(e){const r=new URLSearchParams;for(const[s,o]of Object.entries(e??{}))o!==void 0&&o!==""&&r.set(s,String(o));const t=r.toString();return this.request(`/papers/${t?`?${t}`:""}`,{cache:"no-cache"})}search(e,r=1,t=10,s,o,n){const p=new URLSearchParams({q:e,page:r.toString(),page_size:t.toString()});return s&&p.set("mode",s),n!=null&&n.start_date&&p.set("start_date",n.start_date),n!=null&&n.end_date&&p.set("end_date",n.end_date),this.request(`/papers/search?${p.toString()}`,{signal:o})}searchFeed(e){return this.request(`/papers/search/feed${u(e)}`,{cache:"no-cache"})}get(e,r=!0){const t=r?"?include_resources=true":"";return this.request(`/papers/${e}${t}`)}getByArxivId(e,r=!0){const t=r?"?include_resources=true":"";return this.request(`/papers/arxiv/${e}${t}`)}lookup(e){return this.request("/papers/lookup",{method:"POST",body:JSON.stringify({references:e})})}related(e,r=4){return this.request(`/papers/${encodeURIComponent(e)}/related?limit=${r}`)}suggestedQuestions(e){return this.request(`/papers/${encodeURIComponent(e)}/suggested-questions`)}versions(e){return this.request(`/papers/arxiv/${e}/versions`)}indexFromArxiv(e){return this.request(`/papers/index/${e}`,{method:"POST"})}submit(e){return this.request("/papers/submit",{method:"POST",body:JSON.stringify(e)})}copyToBucket(e,r){return this.request(`/papers/${encodeURIComponent(e)}/copy-to-bucket`,{method:"POST",body:JSON.stringify(r)})}trending(e){const r=new URLSearchParams;for(const[s,o]of Object.entries(e??{}))o!==void 0&&r.set(s,String(o));const t=r.toString();return this.request(`/papers/trending${t?`?${t}`:""}`,{cache:"no-store"})}xTrending(e){return this.request(`/papers/x-trending${u(e)}`)}forTask(e,r){return this.request(`/tasks/${e}/papers${u(r)}`)}forMethod(e,r){return this.request(`/methods/${encodeURIComponent(e)}/papers${u(r)}`)}forConference(e,r){return this.request(`/conferences/${e}/papers${u(r)}`)}forOrganization(e,r){return this.request(`/organizations/${e}/papers${u(r)}`)}getAuthor(e){return this.request(`/authors/${e}`)}searchAuthors(e,r){return this.request(`/authors/${u({search:e,page_size:r})}`)}primeCurationState(e,r=!1){return a.primePaper(e,r)}freshAuthMutationDraft(){return a.freshAuthMutationDraft()}resumeFreshAuthMutation(){return a.resumeFreshAuthMutation()}updateTasks(e,r){const t=new URLSearchParams(r.map(s=>["task_ids",String(s)])).toString();return a.mutatePaper(e,"tasks",r,`/papers/${e}/tasks?${t}`,{method:"PUT"})}updateMethods(e,r){const t=new URLSearchParams(r.map(s=>["method_ids",String(s)])).toString();return a.mutatePaper(e,"methods",r,`/papers/${e}/methods?${t}`,{method:"PUT"})}updateOrganizations(e,r){const t=new URLSearchParams(r.map(s=>["organization_ids",String(s)])).toString();return a.mutatePaper(e,"organizations",r,`/papers/${e}/organizations?${t}`,{method:"PUT"})}updateRepositories(e,r){return a.mutatePaper(e,"repositories",r,`/papers/${e}/repositories`,{method:"PUT",body:JSON.stringify({repositories:r})})}updateProjectPages(e,r){return a.mutatePaper(e,"project_pages",r,`/papers/${e}/project-pages`,{method:"PUT",body:JSON.stringify({project_pages:r})})}updateXThreads(e,r){return a.mutatePaper(e,"x_threads",r,`/papers/${e}/x-threads`,{method:"PUT",body:JSON.stringify({x_threads:r})})}updateSourceUrl(e,r){return a.mutatePaper(e,"source_url",r,`/papers/${e}/source-url`,{method:"PUT",body:JSON.stringify({source_url:r})})}updateHfArtifacts(e,r){return a.mutatePaper(e,"hf_artifacts",r,`/papers/${e}/hf-artifacts`,{method:"PUT",body:JSON.stringify(r)})}}const g=new d(c);async function P(i){return(await h(`/papers/${encodeURIComponent(i)}/web-markdown`)).text()}function S(i){return m(`/papers/${encodeURIComponent(i)}/layout`)}export{S as a,P as g,g as p}; diff --git a/assets/plus-AztI1566.js b/assets/plus-CYgr1KdS.js similarity index 87% rename from assets/plus-AztI1566.js rename to assets/plus-CYgr1KdS.js index fd33bc1c62bfa5a069a5098c3e67774714994a66..d158099a3b1beb4fdb112a8ba35d6120d08423af 100644 --- a/assets/plus-AztI1566.js +++ b/assets/plus-CYgr1KdS.js @@ -1,4 +1,4 @@ -import{s}from"./index-CjdUkE4w.js";/** +import{s}from"./index-CHGpuh10.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/popover-Df5_dywQ.js b/assets/popover-BHpRw7vT.js similarity index 98% rename from assets/popover-Df5_dywQ.js rename to assets/popover-BHpRw7vT.js index 68d6a011a5d8a1ce518bbeea7f386d87e0d3da61..3f0da05b0dce2aa744ba08b55d9e31b8fcaee8f6 100644 --- a/assets/popover-Df5_dywQ.js +++ b/assets/popover-BHpRw7vT.js @@ -1 +1 @@ -import{d as s,j as l,ak as V,B as $,ap as L,af as W,D as A,z as O,E as h,aq as E,ar as _,P as y,as as H,G as z,aX as G,aY as B,aZ as Z,a_ as K,at as q,au as U,av as X,I as Y}from"./index-CjdUkE4w.js";function J(e){const t=Q(e),r=s.forwardRef((n,o)=>{const{children:a,...c}=n,i=s.Children.toArray(a),p=i.find(oe);if(p){const u=p.props.children,P=i.map(f=>f===p?s.Children.count(u)>1?s.Children.only(null):s.isValidElement(u)?u.props.children:null:f);return l.jsx(t,{...c,ref:o,children:s.isValidElement(u)?s.cloneElement(u,void 0,P):null})}return l.jsx(t,{...c,ref:o,children:a})});return r.displayName=`${e}.Slot`,r}function Q(e){const t=s.forwardRef((r,n)=>{const{children:o,...a}=r;if(s.isValidElement(o)){const c=re(o),i=te(a,o.props);return o.type!==s.Fragment&&(i.ref=n?V(n,c):c),s.cloneElement(o,i)}return s.Children.count(o)>1?s.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var ee=Symbol("radix.slottable");function oe(e){return s.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===ee}function te(e,t){const r={...t};for(const n in t){const o=e[n],a=t[n];/^on[A-Z]/.test(n)?o&&a?r[n]=(...i)=>{const p=a(...i);return o(...i),p}:o&&(r[n]=o):n==="style"?r[n]={...o,...a}:n==="className"&&(r[n]=[o,a].filter(Boolean).join(" "))}return{...e,...r}}function re(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var C="Popover",[b]=z(C,[_]),m=_(),[ne,d]=b(C),j=e=>{const{__scopePopover:t,children:r,open:n,defaultOpen:o,onOpenChange:a,modal:c=!1}=e,i=m(t),p=s.useRef(null),[u,P]=s.useState(!1),[f,v]=$({prop:n,defaultProp:o??!1,onChange:a,caller:C});return l.jsx(L,{...i,children:l.jsx(ne,{scope:t,contentId:W(),triggerRef:p,open:f,onOpenChange:v,onOpenToggle:s.useCallback(()=>v(x=>!x),[v]),hasCustomAnchor:u,onCustomAnchorAdd:s.useCallback(()=>P(!0),[]),onCustomAnchorRemove:s.useCallback(()=>P(!1),[]),modal:c,children:r})})};j.displayName=C;var w="PopoverAnchor",ae=s.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=d(w,r),a=m(r),{onCustomAnchorAdd:c,onCustomAnchorRemove:i}=o;return s.useEffect(()=>(c(),()=>i()),[c,i]),l.jsx(E,{...a,...n,ref:t})});ae.displayName=w;var S="PopoverTrigger",N=s.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=d(S,r),a=m(r),c=A(t,o.triggerRef),i=l.jsx(O.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":M(o.open),...n,ref:c,onClick:h(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?i:l.jsx(E,{asChild:!0,...a,children:i})});N.displayName=S;var R="PopoverPortal",[se,ce]=b(R,{forceMount:void 0}),F=e=>{const{__scopePopover:t,forceMount:r,children:n,container:o}=e,a=d(R,t);return l.jsx(se,{scope:t,forceMount:r,children:l.jsx(y,{present:r||a.open,children:l.jsx(H,{asChild:!0,container:o,children:n})})})};F.displayName=R;var g="PopoverContent",D=s.forwardRef((e,t)=>{const r=ce(g,e.__scopePopover),{forceMount:n=r.forceMount,...o}=e,a=d(g,e.__scopePopover);return l.jsx(y,{present:n||a.open,children:a.modal?l.jsx(le,{...o,ref:t}):l.jsx(pe,{...o,ref:t})})});D.displayName=g;var ie=J("PopoverContent.RemoveScroll"),le=s.forwardRef((e,t)=>{const r=d(g,e.__scopePopover),n=s.useRef(null),o=A(t,n),a=s.useRef(!1);return s.useEffect(()=>{const c=n.current;if(c)return G(c)},[]),l.jsx(B,{as:ie,allowPinchZoom:!0,children:l.jsx(I,{...e,ref:o,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:h(e.onCloseAutoFocus,c=>{var i;c.preventDefault(),a.current||(i=r.triggerRef.current)==null||i.focus()}),onPointerDownOutside:h(e.onPointerDownOutside,c=>{const i=c.detail.originalEvent,p=i.button===0&&i.ctrlKey===!0,u=i.button===2||p;a.current=u},{checkForDefaultPrevented:!1}),onFocusOutside:h(e.onFocusOutside,c=>c.preventDefault(),{checkForDefaultPrevented:!1})})})}),pe=s.forwardRef((e,t)=>{const r=d(g,e.__scopePopover),n=s.useRef(!1),o=s.useRef(!1);return l.jsx(I,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var c,i;(c=e.onCloseAutoFocus)==null||c.call(e,a),a.defaultPrevented||(n.current||(i=r.triggerRef.current)==null||i.focus(),a.preventDefault()),n.current=!1,o.current=!1},onInteractOutside:a=>{var p,u;(p=e.onInteractOutside)==null||p.call(e,a),a.defaultPrevented||(n.current=!0,a.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const c=a.target;((u=r.triggerRef.current)==null?void 0:u.contains(c))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&o.current&&a.preventDefault()}})}),I=s.forwardRef((e,t)=>{const{__scopePopover:r,trapFocus:n,onOpenAutoFocus:o,onCloseAutoFocus:a,disableOutsidePointerEvents:c,onEscapeKeyDown:i,onPointerDownOutside:p,onFocusOutside:u,onInteractOutside:P,...f}=e,v=d(g,r),x=m(r);return Z(),l.jsx(K,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:o,onUnmountAutoFocus:a,children:l.jsx(q,{asChild:!0,disableOutsidePointerEvents:c,onInteractOutside:P,onEscapeKeyDown:i,onPointerDownOutside:p,onFocusOutside:u,onDismiss:()=>v.onOpenChange(!1),children:l.jsx(U,{"data-state":M(v.open),role:"dialog",id:v.contentId,...x,...f,ref:t,style:{...f.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),T="PopoverClose",ue=s.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=d(T,r);return l.jsx(O.button,{type:"button",...n,ref:t,onClick:h(e.onClick,()=>o.onOpenChange(!1))})});ue.displayName=T;var de="PopoverArrow",fe=s.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=m(r);return l.jsx(X,{...o,...n,ref:t})});fe.displayName=de;function M(e){return e?"open":"closed"}var ve=j,Pe=N,ge=F,k=D;const Ce=ve,xe=Pe,he=s.forwardRef(({className:e,align:t="center",sideOffset:r=4,...n},o)=>l.jsx(ge,{children:l.jsx(k,{ref:o,align:t,sideOffset:r,className:Y("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n})}));he.displayName=k.displayName;export{Ce as P,xe as a,he as b}; +import{d as s,j as l,ak as V,B as $,ap as L,af as W,D as A,z as O,E as h,aq as E,ar as _,P as y,as as H,G as z,aX as G,aY as B,aZ as Z,a_ as K,at as q,au as U,av as X,I as Y}from"./index-CHGpuh10.js";function J(e){const t=Q(e),r=s.forwardRef((n,o)=>{const{children:a,...c}=n,i=s.Children.toArray(a),p=i.find(oe);if(p){const u=p.props.children,P=i.map(f=>f===p?s.Children.count(u)>1?s.Children.only(null):s.isValidElement(u)?u.props.children:null:f);return l.jsx(t,{...c,ref:o,children:s.isValidElement(u)?s.cloneElement(u,void 0,P):null})}return l.jsx(t,{...c,ref:o,children:a})});return r.displayName=`${e}.Slot`,r}function Q(e){const t=s.forwardRef((r,n)=>{const{children:o,...a}=r;if(s.isValidElement(o)){const c=re(o),i=te(a,o.props);return o.type!==s.Fragment&&(i.ref=n?V(n,c):c),s.cloneElement(o,i)}return s.Children.count(o)>1?s.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var ee=Symbol("radix.slottable");function oe(e){return s.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===ee}function te(e,t){const r={...t};for(const n in t){const o=e[n],a=t[n];/^on[A-Z]/.test(n)?o&&a?r[n]=(...i)=>{const p=a(...i);return o(...i),p}:o&&(r[n]=o):n==="style"?r[n]={...o,...a}:n==="className"&&(r[n]=[o,a].filter(Boolean).join(" "))}return{...e,...r}}function re(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var C="Popover",[b]=z(C,[_]),m=_(),[ne,d]=b(C),j=e=>{const{__scopePopover:t,children:r,open:n,defaultOpen:o,onOpenChange:a,modal:c=!1}=e,i=m(t),p=s.useRef(null),[u,P]=s.useState(!1),[f,v]=$({prop:n,defaultProp:o??!1,onChange:a,caller:C});return l.jsx(L,{...i,children:l.jsx(ne,{scope:t,contentId:W(),triggerRef:p,open:f,onOpenChange:v,onOpenToggle:s.useCallback(()=>v(x=>!x),[v]),hasCustomAnchor:u,onCustomAnchorAdd:s.useCallback(()=>P(!0),[]),onCustomAnchorRemove:s.useCallback(()=>P(!1),[]),modal:c,children:r})})};j.displayName=C;var w="PopoverAnchor",ae=s.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=d(w,r),a=m(r),{onCustomAnchorAdd:c,onCustomAnchorRemove:i}=o;return s.useEffect(()=>(c(),()=>i()),[c,i]),l.jsx(E,{...a,...n,ref:t})});ae.displayName=w;var S="PopoverTrigger",N=s.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=d(S,r),a=m(r),c=A(t,o.triggerRef),i=l.jsx(O.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":M(o.open),...n,ref:c,onClick:h(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?i:l.jsx(E,{asChild:!0,...a,children:i})});N.displayName=S;var R="PopoverPortal",[se,ce]=b(R,{forceMount:void 0}),F=e=>{const{__scopePopover:t,forceMount:r,children:n,container:o}=e,a=d(R,t);return l.jsx(se,{scope:t,forceMount:r,children:l.jsx(y,{present:r||a.open,children:l.jsx(H,{asChild:!0,container:o,children:n})})})};F.displayName=R;var g="PopoverContent",D=s.forwardRef((e,t)=>{const r=ce(g,e.__scopePopover),{forceMount:n=r.forceMount,...o}=e,a=d(g,e.__scopePopover);return l.jsx(y,{present:n||a.open,children:a.modal?l.jsx(le,{...o,ref:t}):l.jsx(pe,{...o,ref:t})})});D.displayName=g;var ie=J("PopoverContent.RemoveScroll"),le=s.forwardRef((e,t)=>{const r=d(g,e.__scopePopover),n=s.useRef(null),o=A(t,n),a=s.useRef(!1);return s.useEffect(()=>{const c=n.current;if(c)return G(c)},[]),l.jsx(B,{as:ie,allowPinchZoom:!0,children:l.jsx(I,{...e,ref:o,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:h(e.onCloseAutoFocus,c=>{var i;c.preventDefault(),a.current||(i=r.triggerRef.current)==null||i.focus()}),onPointerDownOutside:h(e.onPointerDownOutside,c=>{const i=c.detail.originalEvent,p=i.button===0&&i.ctrlKey===!0,u=i.button===2||p;a.current=u},{checkForDefaultPrevented:!1}),onFocusOutside:h(e.onFocusOutside,c=>c.preventDefault(),{checkForDefaultPrevented:!1})})})}),pe=s.forwardRef((e,t)=>{const r=d(g,e.__scopePopover),n=s.useRef(!1),o=s.useRef(!1);return l.jsx(I,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var c,i;(c=e.onCloseAutoFocus)==null||c.call(e,a),a.defaultPrevented||(n.current||(i=r.triggerRef.current)==null||i.focus(),a.preventDefault()),n.current=!1,o.current=!1},onInteractOutside:a=>{var p,u;(p=e.onInteractOutside)==null||p.call(e,a),a.defaultPrevented||(n.current=!0,a.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const c=a.target;((u=r.triggerRef.current)==null?void 0:u.contains(c))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&o.current&&a.preventDefault()}})}),I=s.forwardRef((e,t)=>{const{__scopePopover:r,trapFocus:n,onOpenAutoFocus:o,onCloseAutoFocus:a,disableOutsidePointerEvents:c,onEscapeKeyDown:i,onPointerDownOutside:p,onFocusOutside:u,onInteractOutside:P,...f}=e,v=d(g,r),x=m(r);return Z(),l.jsx(K,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:o,onUnmountAutoFocus:a,children:l.jsx(q,{asChild:!0,disableOutsidePointerEvents:c,onInteractOutside:P,onEscapeKeyDown:i,onPointerDownOutside:p,onFocusOutside:u,onDismiss:()=>v.onOpenChange(!1),children:l.jsx(U,{"data-state":M(v.open),role:"dialog",id:v.contentId,...x,...f,ref:t,style:{...f.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),T="PopoverClose",ue=s.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=d(T,r);return l.jsx(O.button,{type:"button",...n,ref:t,onClick:h(e.onClick,()=>o.onOpenChange(!1))})});ue.displayName=T;var de="PopoverArrow",fe=s.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=m(r);return l.jsx(X,{...o,...n,ref:t})});fe.displayName=de;function M(e){return e?"open":"closed"}var ve=j,Pe=N,ge=F,k=D;const Ce=ve,xe=Pe,he=s.forwardRef(({className:e,align:t="center",sideOffset:r=4,...n},o)=>l.jsx(ge,{children:l.jsx(k,{ref:o,align:t,sideOffset:r,className:Y("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n})}));he.displayName=k.displayName;export{Ce as P,xe as a,he as b}; diff --git a/assets/preferences-DMhkYrri.js b/assets/preferences-BR-SGx3E.js similarity index 74% rename from assets/preferences-DMhkYrri.js rename to assets/preferences-BR-SGx3E.js index c31839c337cbd134ac7868fa50be9b7a52722cca..3ec8a8109519852d7d3981a218f6fe67ab054689 100644 --- a/assets/preferences-DMhkYrri.js +++ b/assets/preferences-BR-SGx3E.js @@ -1 +1 @@ -import{a as y,i as d,b as f,W as p}from"./index-CjdUkE4w.js";import{u as m}from"./useMutation-BYtVrkc7.js";import{a as c}from"./account-DoluPGSd.js";const i={hide_closed_source_evals:!1};function v(){const{user:t}=y(),r=d(),s=p.preferences,a=f({queryKey:s,queryFn:()=>c.getPreferences(),enabled:!!t,staleTime:1/0}),o=a.data??i,l=m({mutationFn:e=>t?c.updatePreferences(e):Promise.resolve(e),onMutate:async e=>{await r.cancelQueries({queryKey:s});const u=r.getQueryData(s)??i;return r.setQueryData(s,e),{previous:u}},onError:(e,u,n)=>{n&&r.setQueryData(s,n.previous)},onSuccess:e=>r.setQueryData(s,e)});return{preferences:o,canPersist:!!t,isLoading:a.isLoading,setHideClosedSourceEvals:e=>l.mutate({...o,hide_closed_source_evals:e})}}export{v as u}; +import{a as y,i as d,b as f,W as p}from"./index-CHGpuh10.js";import{u as m}from"./useMutation-3fOqWcpt.js";import{a as c}from"./account-D9O54ufU.js";const i={hide_closed_source_evals:!1};function v(){const{user:t}=y(),r=d(),s=p.preferences,a=f({queryKey:s,queryFn:()=>c.getPreferences(),enabled:!!t,staleTime:1/0}),o=a.data??i,l=m({mutationFn:e=>t?c.updatePreferences(e):Promise.resolve(e),onMutate:async e=>{await r.cancelQueries({queryKey:s});const u=r.getQueryData(s)??i;return r.setQueryData(s,e),{previous:u}},onError:(e,u,n)=>{n&&r.setQueryData(s,n.previous)},onSuccess:e=>r.setQueryData(s,e)});return{preferences:o,canPersist:!!t,isLoading:a.isLoading,setHideClosedSourceEvals:e=>l.mutate({...o,hide_closed_source_evals:e})}}export{v as u}; diff --git a/assets/queryInvalidation-LiTu0GxY.js b/assets/queryInvalidation-rIB0mIr9.js similarity index 93% rename from assets/queryInvalidation-LiTu0GxY.js rename to assets/queryInvalidation-rIB0mIr9.js index 735de74d1432a2407c5d240e54efd0366199c405..9add08c4a96df0edc46e8a41a944181d408ee7c8 100644 --- a/assets/queryInvalidation-LiTu0GxY.js +++ b/assets/queryInvalidation-rIB0mIr9.js @@ -1 +1 @@ -import{p as n,t as u}from"./index-CjdUkE4w.js";function f(e,t,a){if(!e)return e;const i=r=>r.paper_id!==t||r.paper_title===a?r:{...r,paper_title:a};if(Array.isArray(e)){const r=e.map(i);return r.some((s,o)=>s!==e[o])?r:e}if(Array.isArray(e.results)){const r=e.results.map(i);return r.some((s,o)=>s!==e.results[o])?{...e,results:r}:e}return e}function p(e,t){const a=new Set(t.filter(i=>!!i));for(const i of a)for(const r of[n.detail(i),n.arxiv(i),n.preview(i),n.summary(i)])e.invalidateQueries({queryKey:r,exact:!0})}function y(e){for(const t of Object.values(n.feeds))e.invalidateQueries({queryKey:t,refetchType:"none"})}function h(e,t,a){new Set([...a,t.id,t.arxiv_id].filter(s=>!!s)).forEach(s=>{e.setQueryData(n.detail(s),t),e.setQueryData(n.arxiv(s),t),e.setQueriesData({queryKey:n.preview(s),exact:!0},t),e.setQueriesData({queryKey:n.summary(s),exact:!0},t)}),y(e);const r=String(t.id),c=s=>f(s,r,t.title);for(const s of[u.all,u.byDatasetAll])e.setQueriesData({queryKey:s},c),e.invalidateQueries({queryKey:s,refetchType:"none"})}export{y as a,p as i,h as r}; +import{p as n,t as u}from"./index-CHGpuh10.js";function f(e,t,a){if(!e)return e;const i=r=>r.paper_id!==t||r.paper_title===a?r:{...r,paper_title:a};if(Array.isArray(e)){const r=e.map(i);return r.some((s,o)=>s!==e[o])?r:e}if(Array.isArray(e.results)){const r=e.results.map(i);return r.some((s,o)=>s!==e.results[o])?{...e,results:r}:e}return e}function p(e,t){const a=new Set(t.filter(i=>!!i));for(const i of a)for(const r of[n.detail(i),n.arxiv(i),n.preview(i),n.summary(i)])e.invalidateQueries({queryKey:r,exact:!0})}function y(e){for(const t of Object.values(n.feeds))e.invalidateQueries({queryKey:t,refetchType:"none"})}function h(e,t,a){new Set([...a,t.id,t.arxiv_id].filter(s=>!!s)).forEach(s=>{e.setQueryData(n.detail(s),t),e.setQueryData(n.arxiv(s),t),e.setQueriesData({queryKey:n.preview(s),exact:!0},t),e.setQueriesData({queryKey:n.summary(s),exact:!0},t)}),y(e);const r=String(t.id),c=s=>f(s,r,t.title);for(const s of[u.all,u.byDatasetAll])e.setQueriesData({queryKey:s},c),e.invalidateQueries({queryKey:s,refetchType:"none"})}export{y as a,p as i,h as r}; diff --git a/assets/refresh-cw-BuRFYuxm.js b/assets/refresh-cw-BmXCr1RQ.js similarity index 94% rename from assets/refresh-cw-BuRFYuxm.js rename to assets/refresh-cw-BmXCr1RQ.js index bec3976df366c02d8a3c24da85861157f8447e0f..a20072b697effc2b72917e762859889ff22a5381 100644 --- a/assets/refresh-cw-BuRFYuxm.js +++ b/assets/refresh-cw-BmXCr1RQ.js @@ -1,4 +1,4 @@ -import{s as e}from"./index-CjdUkE4w.js";/** +import{s as e}from"./index-CHGpuh10.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/researchTopic-NmABF6tT.js b/assets/researchTopic-DK_KbYKH.js similarity index 94% rename from assets/researchTopic-NmABF6tT.js rename to assets/researchTopic-DK_KbYKH.js index 33d0145970314368fbf459663158ee17f364e669..aef15b3d8e6e9a51a2d6cc10201029cafd552f71 100644 --- a/assets/researchTopic-NmABF6tT.js +++ b/assets/researchTopic-DK_KbYKH.js @@ -1 +1 @@ -import{ac as n,f as u,b as y,r,i as m}from"./index-CjdUkE4w.js";import{u as w}from"./useMutation-BYtVrkc7.js";const _=300,c={follows:()=>n("/me/follows"),followSuggestions:()=>n("/research/follow-suggestions"),setFollow:(e,t,s)=>n(`/me/follows/${e}/${t}`,{method:s?"PUT":"DELETE"}),following:(e=0,t={})=>{const s=new URLSearchParams({offset:String(e),limit:"40"});return t.startDate&&s.set("start_date",t.startDate),t.endDate&&s.set("end_date",t.endDate),!t.startDate&&!t.endDate&&s.set("all_time","true"),t.topicOnly&&s.set("topic_only","true"),n(`/me/following?${s}`)},topic:()=>n("/me/topic"),setTopic:e=>n("/me/topic",{method:"PUT",body:JSON.stringify({text:e})}),clearTopic:()=>n("/me/topic",{method:"DELETE"}),email:()=>n("/me/research-email"),setEmail:e=>n("/me/research-email",{method:"PUT",body:JSON.stringify({enabled:e})})};function d(e,t,{follows:s}){return Promise.all([s&&e.invalidateQueries({queryKey:r.follows(t)}),e.invalidateQueries({queryKey:r.feed(t)}),e.invalidateQueries({queryKey:r.email(t)})])}function F(e=!0){var s;const t=(s=u())==null?void 0:s.user;return y({queryKey:r.follows(t==null?void 0:t.hf_subject),queryFn:c.follows,enabled:e&&!!t})}function E({onChanged:e,awaitRefresh:t=!1}={}){var i;const s=(i=u())==null?void 0:i.user,a=m();return w({mutationFn:({kind:l,entityId:o,follow:f})=>c.setFollow(l,o,f),onSuccess:async(l,o)=>{e==null||e(o);const f=d(a,s==null?void 0:s.hf_subject,{follows:!0});t&&await f}})}function D(e){var a;const t=(a=u())==null?void 0:a.user,s=m();return w({mutationFn:async i=>i===null?(await c.clearTopic(),null):c.setTopic(i),onSuccess:i=>{s.setQueryData(r.topic(t==null?void 0:t.hf_subject),i),h(),e==null||e(),d(s,t==null?void 0:t.hf_subject,{follows:!1})}})}const p="pwc:following-pending-topic";function I(e){sessionStorage.setItem(p,e)}function O(){return sessionStorage.getItem(p)}function h(){sessionStorage.removeItem(p)}function N(){var s;const e=(s=u())==null?void 0:s.user,t=m();return w({mutationFn:async a=>{const l=(await Promise.allSettled(a.map(o=>c.setFollow(o.kind,o.id,o.follow??!0)))).find(o=>o.status==="rejected");if(l)throw l.reason},onSuccess:()=>S(),onSettled:()=>void d(t,e==null?void 0:e.hf_subject,{follows:!0})})}const g="pwc:following-pending-follows";function b(e){sessionStorage.setItem(g,JSON.stringify(e))}function K(){return JSON.parse(sessionStorage.getItem(g)??"[]")}function S(){sessionStorage.removeItem(g)}export{_ as T,D as a,N as b,b as c,O as d,K as e,h as f,E as g,c as r,I as s,F as u}; +import{ac as n,f as u,b as y,r,i as m}from"./index-CHGpuh10.js";import{u as w}from"./useMutation-3fOqWcpt.js";const _=300,c={follows:()=>n("/me/follows"),followSuggestions:()=>n("/research/follow-suggestions"),setFollow:(e,t,s)=>n(`/me/follows/${e}/${t}`,{method:s?"PUT":"DELETE"}),following:(e=0,t={})=>{const s=new URLSearchParams({offset:String(e),limit:"40"});return t.startDate&&s.set("start_date",t.startDate),t.endDate&&s.set("end_date",t.endDate),!t.startDate&&!t.endDate&&s.set("all_time","true"),t.topicOnly&&s.set("topic_only","true"),n(`/me/following?${s}`)},topic:()=>n("/me/topic"),setTopic:e=>n("/me/topic",{method:"PUT",body:JSON.stringify({text:e})}),clearTopic:()=>n("/me/topic",{method:"DELETE"}),email:()=>n("/me/research-email"),setEmail:e=>n("/me/research-email",{method:"PUT",body:JSON.stringify({enabled:e})})};function d(e,t,{follows:s}){return Promise.all([s&&e.invalidateQueries({queryKey:r.follows(t)}),e.invalidateQueries({queryKey:r.feed(t)}),e.invalidateQueries({queryKey:r.email(t)})])}function F(e=!0){var s;const t=(s=u())==null?void 0:s.user;return y({queryKey:r.follows(t==null?void 0:t.hf_subject),queryFn:c.follows,enabled:e&&!!t})}function E({onChanged:e,awaitRefresh:t=!1}={}){var i;const s=(i=u())==null?void 0:i.user,a=m();return w({mutationFn:({kind:l,entityId:o,follow:f})=>c.setFollow(l,o,f),onSuccess:async(l,o)=>{e==null||e(o);const f=d(a,s==null?void 0:s.hf_subject,{follows:!0});t&&await f}})}function D(e){var a;const t=(a=u())==null?void 0:a.user,s=m();return w({mutationFn:async i=>i===null?(await c.clearTopic(),null):c.setTopic(i),onSuccess:i=>{s.setQueryData(r.topic(t==null?void 0:t.hf_subject),i),h(),e==null||e(),d(s,t==null?void 0:t.hf_subject,{follows:!1})}})}const p="pwc:following-pending-topic";function I(e){sessionStorage.setItem(p,e)}function O(){return sessionStorage.getItem(p)}function h(){sessionStorage.removeItem(p)}function N(){var s;const e=(s=u())==null?void 0:s.user,t=m();return w({mutationFn:async a=>{const l=(await Promise.allSettled(a.map(o=>c.setFollow(o.kind,o.id,o.follow??!0)))).find(o=>o.status==="rejected");if(l)throw l.reason},onSuccess:()=>S(),onSettled:()=>void d(t,e==null?void 0:e.hf_subject,{follows:!0})})}const g="pwc:following-pending-follows";function b(e){sessionStorage.setItem(g,JSON.stringify(e))}function K(){return JSON.parse(sessionStorage.getItem(g)??"[]")}function S(){sessionStorage.removeItem(g)}export{_ as T,D as a,N as b,b as c,O as d,K as e,h as f,E as g,c as r,I as s,F as u}; diff --git a/assets/savedPapersAuth-DT83MLdi.js b/assets/savedPapersAuth-Coc4Zc7v.js similarity index 75% rename from assets/savedPapersAuth-DT83MLdi.js rename to assets/savedPapersAuth-Coc4Zc7v.js index 9901a38606b12005fb2486d002cd38f76c91b29f..9211a732fc132227cc51b3acf57edc9513db039a 100644 --- a/assets/savedPapersAuth-DT83MLdi.js +++ b/assets/savedPapersAuth-Coc4Zc7v.js @@ -1 +1 @@ -import{h as a}from"./index-CjdUkE4w.js";const t="saved_papers_authorized";function o(r=!1){const e=new URL(window.location.href);return r&&e.searchParams.set(t,"1"),a(`${e.pathname}${e.search}${e.hash}`,{authorizeBucket:!0,bucketCreate:!0})}export{t as S,o as s}; +import{h as a}from"./index-CHGpuh10.js";const t="saved_papers_authorized";function o(r=!1){const e=new URL(window.location.href);return r&&e.searchParams.set(t,"1"),a(`${e.pathname}${e.search}${e.hash}`,{authorizeBucket:!0,bucketCreate:!0})}export{t as S,o as s}; diff --git a/assets/search-DxMn7VKI.js b/assets/search-Czb1C2Q7.js similarity index 87% rename from assets/search-DxMn7VKI.js rename to assets/search-Czb1C2Q7.js index 42504e69564d46e856c40ba12db8d79f572e5d47..07d202bb9fb4c372ba64dd8d5cc3735079b5a5f7 100644 --- a/assets/search-DxMn7VKI.js +++ b/assets/search-Czb1C2Q7.js @@ -1,4 +1,4 @@ -import{s as e}from"./index-CjdUkE4w.js";/** +import{s as e}from"./index-CHGpuh10.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/searchable-select-EPf13F1I.js b/assets/searchable-select-9e2cCX5g.js similarity index 98% rename from assets/searchable-select-EPf13F1I.js rename to assets/searchable-select-9e2cCX5g.js index 8f0e38521c831d1a774f4678b21f8000859104ee..49f967e186f0f225d5b8419bd0998433c43b3fa0 100644 --- a/assets/searchable-select-EPf13F1I.js +++ b/assets/searchable-select-9e2cCX5g.js @@ -1,4 +1,4 @@ -import{s as Ae,d as a,af as z,z as L,ag as Me,ah as De,ai as $e,aj as Le,ak as H,j as p,I as D,b as Pe,C as Fe}from"./index-CjdUkE4w.js";import{B as Ke}from"./button-DetZl_ch.js";import{P as qe,a as Ve,b as Be}from"./popover-Df5_dywQ.js";import"./dialog-BzX9PD3v.js";import{S as Ue}from"./search-DxMn7VKI.js";import{L as ze}from"./loader-circle-xTdSzHv_.js";/** +import{s as Ae,d as a,af as z,z as L,ag as Me,ah as De,ai as $e,aj as Le,ak as H,j as p,I as D,b as Pe,C as Fe}from"./index-CHGpuh10.js";import{B as Ke}from"./button-C4kqC3Av.js";import{P as qe,a as Ve,b as Be}from"./popover-BHpRw7vT.js";import"./dialog-BfI2DQVf.js";import{S as Ue}from"./search-Czb1C2Q7.js";import{L as ze}from"./loader-circle-DuUnmHjj.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/share-2-Nvga0TP8.js b/assets/share-2-8l7A6ayI.js similarity index 91% rename from assets/share-2-Nvga0TP8.js rename to assets/share-2-8l7A6ayI.js index f947b1dd7c1a1de70c12af839c56a3df9e01d8ef..8ccd97f25d65f4fc77a98ce0a29ba83925ab5603 100644 --- a/assets/share-2-Nvga0TP8.js +++ b/assets/share-2-8l7A6ayI.js @@ -1,4 +1,4 @@ -import{s as c}from"./index-CjdUkE4w.js";/** +import{s as c}from"./index-CHGpuh10.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/skeleton-DTWi7Ctg.js b/assets/skeleton-Df0GaMuw.js similarity index 62% rename from assets/skeleton-DTWi7Ctg.js rename to assets/skeleton-Df0GaMuw.js index dcbf13313b98f64f6d84564c800dbf4239428ee0..de1eaec4d33df09e15416ca0e2eac8287dfc8ea0 100644 --- a/assets/skeleton-DTWi7Ctg.js +++ b/assets/skeleton-Df0GaMuw.js @@ -1 +1 @@ -import{j as t,I as n}from"./index-CjdUkE4w.js";function m({className:e,...s}){return t.jsx("div",{className:n("animate-pulse rounded-md bg-muted",e),...s})}export{m as S}; +import{j as t,I as n}from"./index-CHGpuh10.js";function m({className:e,...s}){return t.jsx("div",{className:n("animate-pulse rounded-md bg-muted",e),...s})}export{m as S}; diff --git a/assets/sparkles-CIfeDmV2.js b/assets/sparkles-BSDHUYSH.js similarity index 93% rename from assets/sparkles-CIfeDmV2.js rename to assets/sparkles-BSDHUYSH.js index 917722b031ec319be9fbdf2a03a49638bdd23605..ce72ac07d461a6d019eede26da9c60ca044a9632 100644 --- a/assets/sparkles-CIfeDmV2.js +++ b/assets/sparkles-BSDHUYSH.js @@ -1,4 +1,4 @@ -import{s as a}from"./index-CjdUkE4w.js";/** +import{s as a}from"./index-CHGpuh10.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/submissions-CQ6M0giV.js b/assets/submissions-BHHAmt53.js similarity index 99% rename from assets/submissions-CQ6M0giV.js rename to assets/submissions-BHHAmt53.js index 2910e88f7e18f01aa462a2928741482ac0cd3605..8fe8f0667cd46f7d3a626373348bd278200c82e1 100644 --- a/assets/submissions-CQ6M0giV.js +++ b/assets/submissions-BHHAmt53.js @@ -1 +1 @@ -import{ac as Fe}from"./index-CjdUkE4w.js";var v;(function(s){s.assertEqual=a=>{};function e(a){}s.assertIs=e;function t(a){throw new Error}s.assertNever=t,s.arrayToEnum=a=>{const n={};for(const i of a)n[i]=i;return n},s.getValidEnumValues=a=>{const n=s.objectKeys(a).filter(o=>typeof a[a[o]]!="number"),i={};for(const o of n)i[o]=a[o];return s.objectValues(i)},s.objectValues=a=>s.objectKeys(a).map(function(n){return a[n]}),s.objectKeys=typeof Object.keys=="function"?a=>Object.keys(a):a=>{const n=[];for(const i in a)Object.prototype.hasOwnProperty.call(a,i)&&n.push(i);return n},s.find=(a,n)=>{for(const i of a)if(n(i))return i},s.isInteger=typeof Number.isInteger=="function"?a=>Number.isInteger(a):a=>typeof a=="number"&&Number.isFinite(a)&&Math.floor(a)===a;function r(a,n=" | "){return a.map(i=>typeof i=="string"?`'${i}'`:i).join(n)}s.joinValues=r,s.jsonStringifyReplacer=(a,n)=>typeof n=="bigint"?n.toString():n})(v||(v={}));var Se;(function(s){s.mergeShapes=(e,t)=>({...e,...t})})(Se||(Se={}));const u=v.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),$=s=>{switch(typeof s){case"undefined":return u.undefined;case"string":return u.string;case"number":return Number.isNaN(s)?u.nan:u.number;case"boolean":return u.boolean;case"function":return u.function;case"bigint":return u.bigint;case"symbol":return u.symbol;case"object":return Array.isArray(s)?u.array:s===null?u.null:s.then&&typeof s.then=="function"&&s.catch&&typeof s.catch=="function"?u.promise:typeof Map<"u"&&s instanceof Map?u.map:typeof Set<"u"&&s instanceof Set?u.set:typeof Date<"u"&&s instanceof Date?u.date:u.object;default:return u.unknown}},d=v.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class I extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}format(e){const t=e||function(n){return n.message},r={_errors:[]},a=n=>{for(const i of n.issues)if(i.code==="invalid_union")i.unionErrors.map(a);else if(i.code==="invalid_return_type")a(i.returnTypeError);else if(i.code==="invalid_arguments")a(i.argumentsError);else if(i.path.length===0)r._errors.push(t(i));else{let o=r,f=0;for(;ft.message){const t={},r=[];for(const a of this.issues)if(a.path.length>0){const n=a.path[0];t[n]=t[n]||[],t[n].push(e(a))}else r.push(e(a));return{formErrors:r,fieldErrors:t}}get formErrors(){return this.flatten()}}I.create=s=>new I(s);const le=(s,e)=>{let t;switch(s.code){case d.invalid_type:s.received===u.undefined?t="Required":t=`Expected ${s.expected}, received ${s.received}`;break;case d.invalid_literal:t=`Invalid literal value, expected ${JSON.stringify(s.expected,v.jsonStringifyReplacer)}`;break;case d.unrecognized_keys:t=`Unrecognized key(s) in object: ${v.joinValues(s.keys,", ")}`;break;case d.invalid_union:t="Invalid input";break;case d.invalid_union_discriminator:t=`Invalid discriminator value. Expected ${v.joinValues(s.options)}`;break;case d.invalid_enum_value:t=`Invalid enum value. Expected ${v.joinValues(s.options)}, received '${s.received}'`;break;case d.invalid_arguments:t="Invalid function arguments";break;case d.invalid_return_type:t="Invalid function return type";break;case d.invalid_date:t="Invalid date";break;case d.invalid_string:typeof s.validation=="object"?"includes"in s.validation?(t=`Invalid input: must include "${s.validation.includes}"`,typeof s.validation.position=="number"&&(t=`${t} at one or more positions greater than or equal to ${s.validation.position}`)):"startsWith"in s.validation?t=`Invalid input: must start with "${s.validation.startsWith}"`:"endsWith"in s.validation?t=`Invalid input: must end with "${s.validation.endsWith}"`:v.assertNever(s.validation):s.validation!=="regex"?t=`Invalid ${s.validation}`:t="Invalid";break;case d.too_small:s.type==="array"?t=`Array must contain ${s.exact?"exactly":s.inclusive?"at least":"more than"} ${s.minimum} element(s)`:s.type==="string"?t=`String must contain ${s.exact?"exactly":s.inclusive?"at least":"over"} ${s.minimum} character(s)`:s.type==="number"?t=`Number must be ${s.exact?"exactly equal to ":s.inclusive?"greater than or equal to ":"greater than "}${s.minimum}`:s.type==="bigint"?t=`Number must be ${s.exact?"exactly equal to ":s.inclusive?"greater than or equal to ":"greater than "}${s.minimum}`:s.type==="date"?t=`Date must be ${s.exact?"exactly equal to ":s.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(s.minimum))}`:t="Invalid input";break;case d.too_big:s.type==="array"?t=`Array must contain ${s.exact?"exactly":s.inclusive?"at most":"less than"} ${s.maximum} element(s)`:s.type==="string"?t=`String must contain ${s.exact?"exactly":s.inclusive?"at most":"under"} ${s.maximum} character(s)`:s.type==="number"?t=`Number must be ${s.exact?"exactly":s.inclusive?"less than or equal to":"less than"} ${s.maximum}`:s.type==="bigint"?t=`BigInt must be ${s.exact?"exactly":s.inclusive?"less than or equal to":"less than"} ${s.maximum}`:s.type==="date"?t=`Date must be ${s.exact?"exactly":s.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(s.maximum))}`:t="Invalid input";break;case d.custom:t="Invalid input";break;case d.invalid_intersection_types:t="Intersection results could not be merged";break;case d.not_multiple_of:t=`Number must be a multiple of ${s.multipleOf}`;break;case d.not_finite:t="Number must be finite";break;default:t=e.defaultError,v.assertNever(s)}return{message:t}};let We=le;function Je(){return We}const Ye=s=>{const{data:e,path:t,errorMaps:r,issueData:a}=s,n=[...t,...a.path||[]],i={...a,path:n};if(a.message!==void 0)return{...a,path:n,message:a.message};let o="";const f=r.filter(p=>!!p).slice().reverse();for(const p of f)o=p(i,{data:e,defaultError:o}).message;return{...a,path:n,message:o}};function c(s,e){const t=Je(),r=Ye({issueData:e,data:s.data,path:s.path,errorMaps:[s.common.contextualErrorMap,s.schemaErrorMap,t,t===le?void 0:le].filter(a=>!!a)});s.common.issues.push(r)}class C{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,t){const r=[];for(const a of t){if(a.status==="aborted")return m;a.status==="dirty"&&e.dirty(),r.push(a.value)}return{status:e.value,value:r}}static async mergeObjectAsync(e,t){const r=[];for(const a of t){const n=await a.key,i=await a.value;r.push({key:n,value:i})}return C.mergeObjectSync(e,r)}static mergeObjectSync(e,t){const r={};for(const a of t){const{key:n,value:i}=a;if(n.status==="aborted"||i.status==="aborted")return m;n.status==="dirty"&&e.dirty(),i.status==="dirty"&&e.dirty(),n.value!=="__proto__"&&(typeof i.value<"u"||a.alwaysSet)&&(r[n.value]=i.value)}return{status:e.value,value:r}}}const m=Object.freeze({status:"aborted"}),J=s=>({status:"dirty",value:s}),O=s=>({status:"valid",value:s}),Ce=s=>s.status==="aborted",Oe=s=>s.status==="dirty",B=s=>s.status==="valid",X=s=>typeof Promise<"u"&&s instanceof Promise;var h;(function(s){s.errToObj=e=>typeof e=="string"?{message:e}:e||{},s.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(h||(h={}));class E{constructor(e,t,r,a){this._cachedPath=[],this.parent=e,this.data=t,this._path=r,this._key=a}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const Ne=(s,e)=>{if(B(e))return{success:!0,data:e.value};if(!s.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const t=new I(s.common.issues);return this._error=t,this._error}}};function g(s){if(!s)return{};const{errorMap:e,invalid_type_error:t,required_error:r,description:a}=s;if(e&&(t||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:a}:{errorMap:(i,o)=>{const{message:f}=s;return i.code==="invalid_enum_value"?{message:f??o.defaultError}:typeof o.data>"u"?{message:f??r??o.defaultError}:i.code!=="invalid_type"?{message:o.defaultError}:{message:f??t??o.defaultError}},description:a}}class y{get description(){return this._def.description}_getType(e){return $(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:$(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new C,ctx:{common:e.parent.common,data:e.data,parsedType:$(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(X(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){const t=this._parse(e);return Promise.resolve(t)}parse(e,t){const r=this.safeParse(e,t);if(r.success)return r.data;throw r.error}safeParse(e,t){const r={common:{issues:[],async:(t==null?void 0:t.async)??!1,contextualErrorMap:t==null?void 0:t.errorMap},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:$(e)},a=this._parseSync({data:e,path:r.path,parent:r});return Ne(r,a)}"~validate"(e){var r,a;const t={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:$(e)};if(!this["~standard"].async)try{const n=this._parseSync({data:e,path:[],parent:t});return B(n)?{value:n.value}:{issues:t.common.issues}}catch(n){(a=(r=n==null?void 0:n.message)==null?void 0:r.toLowerCase())!=null&&a.includes("encountered")&&(this["~standard"].async=!0),t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then(n=>B(n)?{value:n.value}:{issues:t.common.issues})}async parseAsync(e,t){const r=await this.safeParseAsync(e,t);if(r.success)return r.data;throw r.error}async safeParseAsync(e,t){const r={common:{issues:[],contextualErrorMap:t==null?void 0:t.errorMap,async:!0},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:$(e)},a=this._parse({data:e,path:r.path,parent:r}),n=await(X(a)?a:Promise.resolve(a));return Ne(r,n)}refine(e,t){const r=a=>typeof t=="string"||typeof t>"u"?{message:t}:typeof t=="function"?t(a):t;return this._refinement((a,n)=>{const i=e(a),o=()=>n.addIssue({code:d.custom,...r(a)});return typeof Promise<"u"&&i instanceof Promise?i.then(f=>f?!0:(o(),!1)):i?!0:(o(),!1)})}refinement(e,t){return this._refinement((r,a)=>e(r)?!0:(a.addIssue(typeof t=="function"?t(r,a):t),!1))}_refinement(e){return new L({schema:this,typeName:_.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:t=>this["~validate"](t)}}optional(){return j.create(this,this._def)}nullable(){return D.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return N.create(this)}promise(){return ae.create(this,this._def)}or(e){return ee.create([this,e],this._def)}and(e){return te.create(this,e,this._def)}transform(e){return new L({...g(this._def),schema:this,typeName:_.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t=typeof e=="function"?e:()=>e;return new ne({...g(this._def),innerType:this,defaultValue:t,typeName:_.ZodDefault})}brand(){return new ze({typeName:_.ZodBranded,type:this,...g(this._def)})}catch(e){const t=typeof e=="function"?e:()=>e;return new ie({...g(this._def),innerType:this,catchValue:t,typeName:_.ZodCatch})}describe(e){const t=this.constructor;return new t({...this._def,description:e})}pipe(e){return be.create(this,e)}readonly(){return oe.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const He=/^c[^\s-]{8,}$/i,Ge=/^[0-9a-z]+$/,Qe=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Xe=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,Ke=/^[a-z0-9_-]{21}$/i,et=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,tt=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,st=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,rt="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let ue;const at=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,nt=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,it=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,ot=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,dt=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,ct=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,$e="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",ut=new RegExp(`^${$e}$`);function Pe(s){let e="[0-5]\\d";s.precision?e=`${e}\\.\\d{${s.precision}}`:s.precision==null&&(e=`${e}(\\.\\d+)?`);const t=s.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${t}`}function lt(s){return new RegExp(`^${Pe(s)}$`)}function ht(s){let e=`${$e}T${Pe(s)}`;const t=[];return t.push(s.local?"Z?":"Z"),s.offset&&t.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${t.join("|")})`,new RegExp(`^${e}$`)}function ft(s,e){return!!((e==="v4"||!e)&&at.test(s)||(e==="v6"||!e)&&it.test(s))}function pt(s,e){if(!et.test(s))return!1;try{const[t]=s.split(".");if(!t)return!1;const r=t.replace(/-/g,"+").replace(/_/g,"/").padEnd(t.length+(4-t.length%4)%4,"="),a=JSON.parse(atob(r));return!(typeof a!="object"||a===null||"typ"in a&&(a==null?void 0:a.typ)!=="JWT"||!a.alg||e&&a.alg!==e)}catch{return!1}}function mt(s,e){return!!((e==="v4"||!e)&&nt.test(s)||(e==="v6"||!e)&&ot.test(s))}class R extends y{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==u.string){const n=this._getOrReturnCtx(e);return c(n,{code:d.invalid_type,expected:u.string,received:n.parsedType}),m}const r=new C;let a;for(const n of this._def.checks)if(n.kind==="min")e.data.lengthn.value&&(a=this._getOrReturnCtx(e,a),c(a,{code:d.too_big,maximum:n.value,type:"string",inclusive:!0,exact:!1,message:n.message}),r.dirty());else if(n.kind==="length"){const i=e.data.length>n.value,o=e.data.lengthe.test(a),{validation:t,code:d.invalid_string,...h.errToObj(r)})}_addCheck(e){return new R({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...h.errToObj(e)})}url(e){return this._addCheck({kind:"url",...h.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...h.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...h.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...h.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...h.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...h.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...h.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...h.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...h.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...h.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...h.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...h.errToObj(e)})}datetime(e){return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,offset:(e==null?void 0:e.offset)??!1,local:(e==null?void 0:e.local)??!1,...h.errToObj(e==null?void 0:e.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,...h.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...h.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...h.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:t==null?void 0:t.position,...h.errToObj(t==null?void 0:t.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...h.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...h.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...h.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...h.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...h.errToObj(t)})}nonempty(e){return this.min(1,h.errToObj(e))}trim(){return new R({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new R({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new R({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.valuenew R({checks:[],typeName:_.ZodString,coerce:(s==null?void 0:s.coerce)??!1,...g(s)});function _t(s,e){const t=(s.toString().split(".")[1]||"").length,r=(e.toString().split(".")[1]||"").length,a=t>r?t:r,n=Number.parseInt(s.toFixed(a).replace(".","")),i=Number.parseInt(e.toFixed(a).replace(".",""));return n%i/10**a}class q extends y{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==u.number){const n=this._getOrReturnCtx(e);return c(n,{code:d.invalid_type,expected:u.number,received:n.parsedType}),m}let r;const a=new C;for(const n of this._def.checks)n.kind==="int"?v.isInteger(e.data)||(r=this._getOrReturnCtx(e,r),c(r,{code:d.invalid_type,expected:"integer",received:"float",message:n.message}),a.dirty()):n.kind==="min"?(n.inclusive?e.datan.value:e.data>=n.value)&&(r=this._getOrReturnCtx(e,r),c(r,{code:d.too_big,maximum:n.value,type:"number",inclusive:n.inclusive,exact:!1,message:n.message}),a.dirty()):n.kind==="multipleOf"?_t(e.data,n.value)!==0&&(r=this._getOrReturnCtx(e,r),c(r,{code:d.not_multiple_of,multipleOf:n.value,message:n.message}),a.dirty()):n.kind==="finite"?Number.isFinite(e.data)||(r=this._getOrReturnCtx(e,r),c(r,{code:d.not_finite,message:n.message}),a.dirty()):v.assertNever(n);return{status:a.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,h.toString(t))}gt(e,t){return this.setLimit("min",e,!1,h.toString(t))}lte(e,t){return this.setLimit("max",e,!0,h.toString(t))}lt(e,t){return this.setLimit("max",e,!1,h.toString(t))}setLimit(e,t,r,a){return new q({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:h.toString(a)}]})}_addCheck(e){return new q({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:h.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:h.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:h.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:h.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:h.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:h.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:h.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:h.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:h.toString(e)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.valuee.kind==="int"||e.kind==="multipleOf"&&v.isInteger(e.value))}get isFinite(){let e=null,t=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(t===null||r.value>t)&&(t=r.value):r.kind==="max"&&(e===null||r.valuenew q({checks:[],typeName:_.ZodNumber,coerce:(s==null?void 0:s.coerce)||!1,...g(s)});class Y extends y{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==u.bigint)return this._getInvalidInput(e);let r;const a=new C;for(const n of this._def.checks)n.kind==="min"?(n.inclusive?e.datan.value:e.data>=n.value)&&(r=this._getOrReturnCtx(e,r),c(r,{code:d.too_big,type:"bigint",maximum:n.value,inclusive:n.inclusive,message:n.message}),a.dirty()):n.kind==="multipleOf"?e.data%n.value!==BigInt(0)&&(r=this._getOrReturnCtx(e,r),c(r,{code:d.not_multiple_of,multipleOf:n.value,message:n.message}),a.dirty()):v.assertNever(n);return{status:a.value,value:e.data}}_getInvalidInput(e){const t=this._getOrReturnCtx(e);return c(t,{code:d.invalid_type,expected:u.bigint,received:t.parsedType}),m}gte(e,t){return this.setLimit("min",e,!0,h.toString(t))}gt(e,t){return this.setLimit("min",e,!1,h.toString(t))}lte(e,t){return this.setLimit("max",e,!0,h.toString(t))}lt(e,t){return this.setLimit("max",e,!1,h.toString(t))}setLimit(e,t,r,a){return new Y({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:h.toString(a)}]})}_addCheck(e){return new Y({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:h.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:h.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:h.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:h.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:h.toString(t)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.valuenew Y({checks:[],typeName:_.ZodBigInt,coerce:(s==null?void 0:s.coerce)??!1,...g(s)});class he extends y{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==u.boolean){const r=this._getOrReturnCtx(e);return c(r,{code:d.invalid_type,expected:u.boolean,received:r.parsedType}),m}return O(e.data)}}he.create=s=>new he({typeName:_.ZodBoolean,coerce:(s==null?void 0:s.coerce)||!1,...g(s)});class K extends y{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==u.date){const n=this._getOrReturnCtx(e);return c(n,{code:d.invalid_type,expected:u.date,received:n.parsedType}),m}if(Number.isNaN(e.data.getTime())){const n=this._getOrReturnCtx(e);return c(n,{code:d.invalid_date}),m}const r=new C;let a;for(const n of this._def.checks)n.kind==="min"?e.data.getTime()n.value&&(a=this._getOrReturnCtx(e,a),c(a,{code:d.too_big,message:n.message,inclusive:!0,exact:!1,maximum:n.value,type:"date"}),r.dirty()):v.assertNever(n);return{status:r.value,value:new Date(e.data.getTime())}}_addCheck(e){return new K({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:h.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:h.toString(t)})}get minDate(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.valuenew K({checks:[],coerce:(s==null?void 0:s.coerce)||!1,typeName:_.ZodDate,...g(s)});class Ae extends y{_parse(e){if(this._getType(e)!==u.symbol){const r=this._getOrReturnCtx(e);return c(r,{code:d.invalid_type,expected:u.symbol,received:r.parsedType}),m}return O(e.data)}}Ae.create=s=>new Ae({typeName:_.ZodSymbol,...g(s)});class fe extends y{_parse(e){if(this._getType(e)!==u.undefined){const r=this._getOrReturnCtx(e);return c(r,{code:d.invalid_type,expected:u.undefined,received:r.parsedType}),m}return O(e.data)}}fe.create=s=>new fe({typeName:_.ZodUndefined,...g(s)});class pe extends y{_parse(e){if(this._getType(e)!==u.null){const r=this._getOrReturnCtx(e);return c(r,{code:d.invalid_type,expected:u.null,received:r.parsedType}),m}return O(e.data)}}pe.create=s=>new pe({typeName:_.ZodNull,...g(s)});class Ee extends y{constructor(){super(...arguments),this._any=!0}_parse(e){return O(e.data)}}Ee.create=s=>new Ee({typeName:_.ZodAny,...g(s)});class me extends y{constructor(){super(...arguments),this._unknown=!0}_parse(e){return O(e.data)}}me.create=s=>new me({typeName:_.ZodUnknown,...g(s)});class P extends y{_parse(e){const t=this._getOrReturnCtx(e);return c(t,{code:d.invalid_type,expected:u.never,received:t.parsedType}),m}}P.create=s=>new P({typeName:_.ZodNever,...g(s)});class Ze extends y{_parse(e){if(this._getType(e)!==u.undefined){const r=this._getOrReturnCtx(e);return c(r,{code:d.invalid_type,expected:u.void,received:r.parsedType}),m}return O(e.data)}}Ze.create=s=>new Ze({typeName:_.ZodVoid,...g(s)});class N extends y{_parse(e){const{ctx:t,status:r}=this._processInputParams(e),a=this._def;if(t.parsedType!==u.array)return c(t,{code:d.invalid_type,expected:u.array,received:t.parsedType}),m;if(a.exactLength!==null){const i=t.data.length>a.exactLength.value,o=t.data.lengtha.maxLength.value&&(c(t,{code:d.too_big,maximum:a.maxLength.value,type:"array",inclusive:!0,exact:!1,message:a.maxLength.message}),r.dirty()),t.common.async)return Promise.all([...t.data].map((i,o)=>a.type._parseAsync(new E(t,i,t.path,o)))).then(i=>C.mergeArray(r,i));const n=[...t.data].map((i,o)=>a.type._parseSync(new E(t,i,t.path,o)));return C.mergeArray(r,n)}get element(){return this._def.type}min(e,t){return new N({...this._def,minLength:{value:e,message:h.toString(t)}})}max(e,t){return new N({...this._def,maxLength:{value:e,message:h.toString(t)}})}length(e,t){return new N({...this._def,exactLength:{value:e,message:h.toString(t)}})}nonempty(e){return this.min(1,e)}}N.create=(s,e)=>new N({type:s,minLength:null,maxLength:null,exactLength:null,typeName:_.ZodArray,...g(e)});function U(s){if(s instanceof w){const e={};for(const t in s.shape){const r=s.shape[t];e[t]=j.create(U(r))}return new w({...s._def,shape:()=>e})}else return s instanceof N?new N({...s._def,type:U(s.element)}):s instanceof j?j.create(U(s.unwrap())):s instanceof D?D.create(U(s.unwrap())):s instanceof z?z.create(s.items.map(e=>U(e))):s}class w extends y{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),t=v.objectKeys(e);return this._cached={shape:e,keys:t},this._cached}_parse(e){if(this._getType(e)!==u.object){const p=this._getOrReturnCtx(e);return c(p,{code:d.invalid_type,expected:u.object,received:p.parsedType}),m}const{status:r,ctx:a}=this._processInputParams(e),{shape:n,keys:i}=this._getCached(),o=[];if(!(this._def.catchall instanceof P&&this._def.unknownKeys==="strip"))for(const p in a.data)i.includes(p)||o.push(p);const f=[];for(const p of i){const x=n[p],W=a.data[p];f.push({key:{status:"valid",value:p},value:x._parse(new E(a,W,a.path,p)),alwaysSet:p in a.data})}if(this._def.catchall instanceof P){const p=this._def.unknownKeys;if(p==="passthrough")for(const x of o)f.push({key:{status:"valid",value:x},value:{status:"valid",value:a.data[x]}});else if(p==="strict")o.length>0&&(c(a,{code:d.unrecognized_keys,keys:o}),r.dirty());else if(p!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const p=this._def.catchall;for(const x of o){const W=a.data[x];f.push({key:{status:"valid",value:x},value:p._parse(new E(a,W,a.path,x)),alwaysSet:x in a.data})}}return a.common.async?Promise.resolve().then(async()=>{const p=[];for(const x of f){const W=await x.key,qe=await x.value;p.push({key:W,value:qe,alwaysSet:x.alwaysSet})}return p}).then(p=>C.mergeObjectSync(r,p)):C.mergeObjectSync(r,f)}get shape(){return this._def.shape()}strict(e){return h.errToObj,new w({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(t,r)=>{var n,i;const a=((i=(n=this._def).errorMap)==null?void 0:i.call(n,t,r).message)??r.defaultError;return t.code==="unrecognized_keys"?{message:h.errToObj(e).message??a}:{message:a}}}:{}})}strip(){return new w({...this._def,unknownKeys:"strip"})}passthrough(){return new w({...this._def,unknownKeys:"passthrough"})}extend(e){return new w({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new w({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:_.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new w({...this._def,catchall:e})}pick(e){const t={};for(const r of v.objectKeys(e))e[r]&&this.shape[r]&&(t[r]=this.shape[r]);return new w({...this._def,shape:()=>t})}omit(e){const t={};for(const r of v.objectKeys(this.shape))e[r]||(t[r]=this.shape[r]);return new w({...this._def,shape:()=>t})}deepPartial(){return U(this)}partial(e){const t={};for(const r of v.objectKeys(this.shape)){const a=this.shape[r];e&&!e[r]?t[r]=a:t[r]=a.optional()}return new w({...this._def,shape:()=>t})}required(e){const t={};for(const r of v.objectKeys(this.shape))if(e&&!e[r])t[r]=this.shape[r];else{let n=this.shape[r];for(;n instanceof j;)n=n._def.innerType;t[r]=n}return new w({...this._def,shape:()=>t})}keyof(){return Me(v.objectKeys(this.shape))}}w.create=(s,e)=>new w({shape:()=>s,unknownKeys:"strip",catchall:P.create(),typeName:_.ZodObject,...g(e)});w.strictCreate=(s,e)=>new w({shape:()=>s,unknownKeys:"strict",catchall:P.create(),typeName:_.ZodObject,...g(e)});w.lazycreate=(s,e)=>new w({shape:s,unknownKeys:"strip",catchall:P.create(),typeName:_.ZodObject,...g(e)});class ee extends y{_parse(e){const{ctx:t}=this._processInputParams(e),r=this._def.options;function a(n){for(const o of n)if(o.result.status==="valid")return o.result;for(const o of n)if(o.result.status==="dirty")return t.common.issues.push(...o.ctx.common.issues),o.result;const i=n.map(o=>new I(o.ctx.common.issues));return c(t,{code:d.invalid_union,unionErrors:i}),m}if(t.common.async)return Promise.all(r.map(async n=>{const i={...t,common:{...t.common,issues:[]},parent:null};return{result:await n._parseAsync({data:t.data,path:t.path,parent:i}),ctx:i}})).then(a);{let n;const i=[];for(const f of r){const p={...t,common:{...t.common,issues:[]},parent:null},x=f._parseSync({data:t.data,path:t.path,parent:p});if(x.status==="valid")return x;x.status==="dirty"&&!n&&(n={result:x,ctx:p}),p.common.issues.length&&i.push(p.common.issues)}if(n)return t.common.issues.push(...n.ctx.common.issues),n.result;const o=i.map(f=>new I(f));return c(t,{code:d.invalid_union,unionErrors:o}),m}}get options(){return this._def.options}}ee.create=(s,e)=>new ee({options:s,typeName:_.ZodUnion,...g(e)});const Z=s=>s instanceof ge?Z(s.schema):s instanceof L?Z(s.innerType()):s instanceof re?[s.value]:s instanceof V?s.options:s instanceof ye?v.objectValues(s.enum):s instanceof ne?Z(s._def.innerType):s instanceof fe?[void 0]:s instanceof pe?[null]:s instanceof j?[void 0,...Z(s.unwrap())]:s instanceof D?[null,...Z(s.unwrap())]:s instanceof ze||s instanceof oe?Z(s.unwrap()):s instanceof ie?Z(s._def.innerType):[];class ke extends y{_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==u.object)return c(t,{code:d.invalid_type,expected:u.object,received:t.parsedType}),m;const r=this.discriminator,a=t.data[r],n=this.optionsMap.get(a);return n?t.common.async?n._parseAsync({data:t.data,path:t.path,parent:t}):n._parseSync({data:t.data,path:t.path,parent:t}):(c(t,{code:d.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),m)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,r){const a=new Map;for(const n of t){const i=Z(n.shape[e]);if(!i.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const o of i){if(a.has(o))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(o)}`);a.set(o,n)}}return new ke({typeName:_.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:a,...g(r)})}}function _e(s,e){const t=$(s),r=$(e);if(s===e)return{valid:!0,data:s};if(t===u.object&&r===u.object){const a=v.objectKeys(e),n=v.objectKeys(s).filter(o=>a.indexOf(o)!==-1),i={...s,...e};for(const o of n){const f=_e(s[o],e[o]);if(!f.valid)return{valid:!1};i[o]=f.data}return{valid:!0,data:i}}else if(t===u.array&&r===u.array){if(s.length!==e.length)return{valid:!1};const a=[];for(let n=0;n{if(Ce(n)||Ce(i))return m;const o=_e(n.value,i.value);return o.valid?((Oe(n)||Oe(i))&&t.dirty(),{status:t.value,value:o.data}):(c(r,{code:d.invalid_intersection_types}),m)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([n,i])=>a(n,i)):a(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}te.create=(s,e,t)=>new te({left:s,right:e,typeName:_.ZodIntersection,...g(t)});class z extends y{_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==u.array)return c(r,{code:d.invalid_type,expected:u.array,received:r.parsedType}),m;if(r.data.lengththis._def.items.length&&(c(r,{code:d.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const n=[...r.data].map((i,o)=>{const f=this._def.items[o]||this._def.rest;return f?f._parse(new E(r,i,r.path,o)):null}).filter(i=>!!i);return r.common.async?Promise.all(n).then(i=>C.mergeArray(t,i)):C.mergeArray(t,n)}get items(){return this._def.items}rest(e){return new z({...this._def,rest:e})}}z.create=(s,e)=>{if(!Array.isArray(s))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new z({items:s,typeName:_.ZodTuple,rest:null,...g(e)})};class se extends y{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==u.object)return c(r,{code:d.invalid_type,expected:u.object,received:r.parsedType}),m;const a=[],n=this._def.keyType,i=this._def.valueType;for(const o in r.data)a.push({key:n._parse(new E(r,o,r.path,o)),value:i._parse(new E(r,r.data[o],r.path,o)),alwaysSet:o in r.data});return r.common.async?C.mergeObjectAsync(t,a):C.mergeObjectSync(t,a)}get element(){return this._def.valueType}static create(e,t,r){return t instanceof y?new se({keyType:e,valueType:t,typeName:_.ZodRecord,...g(r)}):new se({keyType:R.create(),valueType:e,typeName:_.ZodRecord,...g(t)})}}class Re extends y{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==u.map)return c(r,{code:d.invalid_type,expected:u.map,received:r.parsedType}),m;const a=this._def.keyType,n=this._def.valueType,i=[...r.data.entries()].map(([o,f],p)=>({key:a._parse(new E(r,o,r.path,[p,"key"])),value:n._parse(new E(r,f,r.path,[p,"value"]))}));if(r.common.async){const o=new Map;return Promise.resolve().then(async()=>{for(const f of i){const p=await f.key,x=await f.value;if(p.status==="aborted"||x.status==="aborted")return m;(p.status==="dirty"||x.status==="dirty")&&t.dirty(),o.set(p.value,x.value)}return{status:t.value,value:o}})}else{const o=new Map;for(const f of i){const p=f.key,x=f.value;if(p.status==="aborted"||x.status==="aborted")return m;(p.status==="dirty"||x.status==="dirty")&&t.dirty(),o.set(p.value,x.value)}return{status:t.value,value:o}}}}Re.create=(s,e,t)=>new Re({valueType:e,keyType:s,typeName:_.ZodMap,...g(t)});class H extends y{_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==u.set)return c(r,{code:d.invalid_type,expected:u.set,received:r.parsedType}),m;const a=this._def;a.minSize!==null&&r.data.sizea.maxSize.value&&(c(r,{code:d.too_big,maximum:a.maxSize.value,type:"set",inclusive:!0,exact:!1,message:a.maxSize.message}),t.dirty());const n=this._def.valueType;function i(f){const p=new Set;for(const x of f){if(x.status==="aborted")return m;x.status==="dirty"&&t.dirty(),p.add(x.value)}return{status:t.value,value:p}}const o=[...r.data.values()].map((f,p)=>n._parse(new E(r,f,r.path,p)));return r.common.async?Promise.all(o).then(f=>i(f)):i(o)}min(e,t){return new H({...this._def,minSize:{value:e,message:h.toString(t)}})}max(e,t){return new H({...this._def,maxSize:{value:e,message:h.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}H.create=(s,e)=>new H({valueType:s,minSize:null,maxSize:null,typeName:_.ZodSet,...g(e)});class ge extends y{get schema(){return this._def.getter()}_parse(e){const{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}ge.create=(s,e)=>new ge({getter:s,typeName:_.ZodLazy,...g(e)});class re extends y{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return c(t,{received:t.data,code:d.invalid_literal,expected:this._def.value}),m}return{status:"valid",value:e.data}}get value(){return this._def.value}}re.create=(s,e)=>new re({value:s,typeName:_.ZodLiteral,...g(e)});function Me(s,e){return new V({values:s,typeName:_.ZodEnum,...g(e)})}class V extends y{_parse(e){if(typeof e.data!="string"){const t=this._getOrReturnCtx(e),r=this._def.values;return c(t,{expected:v.joinValues(r),received:t.parsedType,code:d.invalid_type}),m}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){const t=this._getOrReturnCtx(e),r=this._def.values;return c(t,{received:t.data,code:d.invalid_enum_value,options:r}),m}return O(e.data)}get options(){return this._def.values}get enum(){const e={};for(const t of this._def.values)e[t]=t;return e}get Values(){const e={};for(const t of this._def.values)e[t]=t;return e}get Enum(){const e={};for(const t of this._def.values)e[t]=t;return e}extract(e,t=this._def){return V.create(e,{...this._def,...t})}exclude(e,t=this._def){return V.create(this.options.filter(r=>!e.includes(r)),{...this._def,...t})}}V.create=Me;class ye extends y{_parse(e){const t=v.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(e);if(r.parsedType!==u.string&&r.parsedType!==u.number){const a=v.objectValues(t);return c(r,{expected:v.joinValues(a),received:r.parsedType,code:d.invalid_type}),m}if(this._cache||(this._cache=new Set(v.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){const a=v.objectValues(t);return c(r,{received:r.data,code:d.invalid_enum_value,options:a}),m}return O(e.data)}get enum(){return this._def.values}}ye.create=(s,e)=>new ye({values:s,typeName:_.ZodNativeEnum,...g(e)});class ae extends y{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==u.promise&&t.common.async===!1)return c(t,{code:d.invalid_type,expected:u.promise,received:t.parsedType}),m;const r=t.parsedType===u.promise?t.data:Promise.resolve(t.data);return O(r.then(a=>this._def.type.parseAsync(a,{path:t.path,errorMap:t.common.contextualErrorMap})))}}ae.create=(s,e)=>new ae({type:s,typeName:_.ZodPromise,...g(e)});class L extends y{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===_.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:r}=this._processInputParams(e),a=this._def.effect||null,n={addIssue:i=>{c(r,i),i.fatal?t.abort():t.dirty()},get path(){return r.path}};if(n.addIssue=n.addIssue.bind(n),a.type==="preprocess"){const i=a.transform(r.data,n);if(r.common.async)return Promise.resolve(i).then(async o=>{if(t.value==="aborted")return m;const f=await this._def.schema._parseAsync({data:o,path:r.path,parent:r});return f.status==="aborted"?m:f.status==="dirty"||t.value==="dirty"?J(f.value):f});{if(t.value==="aborted")return m;const o=this._def.schema._parseSync({data:i,path:r.path,parent:r});return o.status==="aborted"?m:o.status==="dirty"||t.value==="dirty"?J(o.value):o}}if(a.type==="refinement"){const i=o=>{const f=a.refinement(o,n);if(r.common.async)return Promise.resolve(f);if(f instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return o};if(r.common.async===!1){const o=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?m:(o.status==="dirty"&&t.dirty(),i(o.value),{status:t.value,value:o.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(o=>o.status==="aborted"?m:(o.status==="dirty"&&t.dirty(),i(o.value).then(()=>({status:t.value,value:o.value}))))}if(a.type==="transform")if(r.common.async===!1){const i=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!B(i))return m;const o=a.transform(i.value,n);if(o instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:o}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(i=>B(i)?Promise.resolve(a.transform(i.value,n)).then(o=>({status:t.value,value:o})):m);v.assertNever(a)}}L.create=(s,e,t)=>new L({schema:s,typeName:_.ZodEffects,effect:e,...g(t)});L.createWithPreprocess=(s,e,t)=>new L({schema:e,effect:{type:"preprocess",transform:s},typeName:_.ZodEffects,...g(t)});class j extends y{_parse(e){return this._getType(e)===u.undefined?O(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}j.create=(s,e)=>new j({innerType:s,typeName:_.ZodOptional,...g(e)});class D extends y{_parse(e){return this._getType(e)===u.null?O(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}D.create=(s,e)=>new D({innerType:s,typeName:_.ZodNullable,...g(e)});class ne extends y{_parse(e){const{ctx:t}=this._processInputParams(e);let r=t.data;return t.parsedType===u.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}ne.create=(s,e)=>new ne({innerType:s,typeName:_.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...g(e)});class ie extends y{_parse(e){const{ctx:t}=this._processInputParams(e),r={...t,common:{...t.common,issues:[]}},a=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return X(a)?a.then(n=>({status:"valid",value:n.status==="valid"?n.value:this._def.catchValue({get error(){return new I(r.common.issues)},input:r.data})})):{status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new I(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}ie.create=(s,e)=>new ie({innerType:s,typeName:_.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...g(e)});class je extends y{_parse(e){if(this._getType(e)!==u.nan){const r=this._getOrReturnCtx(e);return c(r,{code:d.invalid_type,expected:u.nan,received:r.parsedType}),m}return{status:"valid",value:e.data}}}je.create=s=>new je({typeName:_.ZodNaN,...g(s)});class ze extends y{_parse(e){const{ctx:t}=this._processInputParams(e),r=t.data;return this._def.type._parse({data:r,path:t.path,parent:t})}unwrap(){return this._def.type}}class be extends y{_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.common.async)return(async()=>{const n=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return n.status==="aborted"?m:n.status==="dirty"?(t.dirty(),J(n.value)):this._def.out._parseAsync({data:n.value,path:r.path,parent:r})})();{const a=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?m:a.status==="dirty"?(t.dirty(),{status:"dirty",value:a.value}):this._def.out._parseSync({data:a.value,path:r.path,parent:r})}}static create(e,t){return new be({in:e,out:t,typeName:_.ZodPipeline})}}class oe extends y{_parse(e){const t=this._def.innerType._parse(e),r=a=>(B(a)&&(a.value=Object.freeze(a.value)),a);return X(t)?t.then(a=>r(a)):r(t)}unwrap(){return this._def.innerType}}oe.create=(s,e)=>new oe({innerType:s,typeName:_.ZodReadonly,...g(e)});var _;(function(s){s.ZodString="ZodString",s.ZodNumber="ZodNumber",s.ZodNaN="ZodNaN",s.ZodBigInt="ZodBigInt",s.ZodBoolean="ZodBoolean",s.ZodDate="ZodDate",s.ZodSymbol="ZodSymbol",s.ZodUndefined="ZodUndefined",s.ZodNull="ZodNull",s.ZodAny="ZodAny",s.ZodUnknown="ZodUnknown",s.ZodNever="ZodNever",s.ZodVoid="ZodVoid",s.ZodArray="ZodArray",s.ZodObject="ZodObject",s.ZodUnion="ZodUnion",s.ZodDiscriminatedUnion="ZodDiscriminatedUnion",s.ZodIntersection="ZodIntersection",s.ZodTuple="ZodTuple",s.ZodRecord="ZodRecord",s.ZodMap="ZodMap",s.ZodSet="ZodSet",s.ZodFunction="ZodFunction",s.ZodLazy="ZodLazy",s.ZodLiteral="ZodLiteral",s.ZodEnum="ZodEnum",s.ZodEffects="ZodEffects",s.ZodNativeEnum="ZodNativeEnum",s.ZodOptional="ZodOptional",s.ZodNullable="ZodNullable",s.ZodDefault="ZodDefault",s.ZodCatch="ZodCatch",s.ZodPromise="ZodPromise",s.ZodBranded="ZodBranded",s.ZodPipeline="ZodPipeline",s.ZodReadonly="ZodReadonly"})(_||(_={}));const l=R.create,b=q.create,de=he.create,gt=me.create;P.create;const T=N.create,k=w.create,Ve=ee.create,Le=ke.create;te.create;z.create;const De=se.create,Q=re.create,ve=V.create;ae.create;j.create;D.create;const A=De(gt()),we=k({id:b(),name:l(),slug:l().optional()}).passthrough(),ce=k({url:l(),is_official:de()}),xe=k({task_id:b(),dataset_id:b(),model_name:l().nullish(),harness:l().nullish(),methodology:l().nullish(),metrics:De(Ve([l(),b()])),uses_additional_data:de().optional(),is_open:de().optional(),best_rank:b().nullish(),best_metric:l().nullish(),evaluated_on:l().nullish(),external_source_url:l().nullish(),num_parameters:b().nullish(),hf_model_url:l().nullish()}).passthrough(),yt=xe.partial().extend({id:b().optional()}),vt=Le("op",[k({op:Q("create"),data:xe}),k({op:Q("update"),evaluation_id:b(),data:xe}),k({op:Q("delete"),evaluation_id:b()})]),Ie=k({hf_models:T(l()),hf_datasets:T(l()),hf_spaces:T(l())}),Te=k({file_name:l(),mime_type:l(),data_url:l().optional(),url:l().optional()}),F=k({name:l(),description:l().optional()}),xt=F.extend({image:Te.optional(),image_credit:l().optional(),parent_id:b().optional(),area_id:b().optional(),keywords:l().optional()}),kt=F.extend({image:Te.optional(),image_credit:l().optional(),source_paper_id:b().optional(),source_url:l().optional(),source_title:l().optional()}),bt=Ve([k({benchmark:l(),task:l(),description:l()}),F.extend({description:l(),task_ids:T(b()),full_name:l().optional(),url:l().optional(),hf_url:l().optional(),paper_url:l().optional(),license_name:l().optional(),license_url:l().optional()})]),wt=F.extend({description:l(),direction:ve(["higher_is_better","lower_is_better"]),full_name:l().optional(),scale:l().optional(),task_id:b(),dataset_id:b()}),Tt=F.extend({short_name:l().optional(),venue:l().optional(),location:l().optional(),url:l(),year:b(),start_date:l().optional(),end_date:l().optional()}),St=F.extend({hf_slug:l().optional(),website_url:l().optional(),image:Te.optional()}),Ct=k({id:b(),paper_id:b().nullable(),hf_username:l(),hf_subject:l().nullish(),is_author:de(),status:ve(["pending","approved","rejected"]),applied_payload:A.nullish(),conflict_payload:A.nullish(),result_entity_type:l().nullish(),result_entity_id:l().nullish(),admin_note:l().nullish(),user_review_reason:l().nullish(),reviewed_by:l().nullish(),reviewed_by_kind:ve(["human","codex","auto"]).nullish(),catalog_event_id:l().nullish(),review_evidence:A.nullish(),created_at:l(),updated_at:l(),reviewed_at:l().nullish()});function S(s,e,t){return Ct.extend({edit_type:Q(s),proposed_payload:e,current_payload:t.nullish()})}const Ot=S("tasks",k({task_ids:T(b())}),k({tasks:T(we)})),Nt=S("methods",k({method_ids:T(b())}),k({methods:T(we)})),At=S("evaluations",k({operations:T(vt)}),k({evaluations:T(yt)})),Et=S("repositories",k({repositories:T(ce)}),k({repositories:T(ce)})),Zt=S("project_pages",k({project_pages:T(ce)}),k({project_pages:T(ce)})),Rt=S("source_url",k({source_url:l()}),k({source_url:l().nullish()})),jt=S("hf_artifacts",Ie,Ie),It=S("x_threads",k({x_threads:T(l())}),k({x_threads:T(k({url:l()}))})),$t=S("organizations",k({organization_ids:T(b())}),k({organizations:T(we)})),Pt=S("new_task",xt,A),Mt=S("new_method",kt,A),zt=S("new_benchmark",bt,A),Vt=S("new_metric",wt,A),Lt=S("new_conference",Tt,A),Dt=S("new_organization",St,A),Ut=S("new_external_paper",k({title:l().optional(),source_url:l(),authors:T(l()),date_published:l().optional(),abstract:l().optional()}),A),Ue=Le("edit_type",[Ot,Nt,At,Et,Zt,Rt,jt,It,$t,Pt,Mt,zt,Vt,Lt,Dt,Ut]);function Yt(s,e,t){return{paper_id:s,edit_type:e,proposed_payload:t}}const M=(s,e)=>({directory:{title:s,subtitle:e}}),Ht={tasks:{label:"tasks",administrative:!1},methods:{label:"methods",administrative:!1},evaluations:{label:"evaluations",administrative:!1},repositories:{label:"repositories",administrative:!1},project_pages:{label:"project pages",administrative:!1},source_url:{label:"source url",administrative:!1},x_threads:{label:"x threads",administrative:!1},hf_artifacts:{label:"hf artifacts",administrative:!1},organizations:{label:"organizations",administrative:!1},new_task:{label:"new task",administrative:!0,...M("New task","Task suggestion")},new_method:{label:"new method",administrative:!0,...M("New method","Method suggestion")},new_benchmark:{label:"new benchmark",administrative:!0,...M("New benchmark","Benchmark suggestion")},new_metric:{label:"new metric",administrative:!0,...M("New metric","Metric suggestion")},new_conference:{label:"new conference",administrative:!0,...M("New conference","Conference suggestion")},new_organization:{label:"new organization",administrative:!1,...M("New organization","Organization suggestion")},new_external_paper:{label:"external paper",administrative:!1,...M("External paper","External paper submission")}},Bt=k({count:b(),results:T(Ue)});class qt extends Error{constructor(e){super(`Malformed pending-edit payload: ${e}`),this.name="PendingEditPayloadError"}}function Be(s,e){const t=s.safeParse(e);if(t.success)return t.data;const r=t.error.issues[0];throw new qt(`${(r==null?void 0:r.path.join("."))||"response"}: ${(r==null?void 0:r.message)||"invalid value"}`)}const G=s=>Be(Ue,s),Ft=s=>Be(Bt,s);class Wt{constructor(e){this.request=e}async submit(e){return G(await this.request("/me/paper-edits",{method:"POST",body:JSON.stringify(e)}))}list(e){const t=new URLSearchParams;for(const[a,n]of Object.entries(e??{}))n!==void 0&&t.set(a,String(n));const r=t.toString();return this.request(`/admin/paper-edits${r?`?${r}`:""}`).then(Ft)}revertAutoApproved(e,t={}){return this.request(`/admin/submitters/${encodeURIComponent(e)}/revert-auto-approved`,{method:"POST",body:JSON.stringify(t)})}async get(e){return G(await this.request(`/admin/paper-edits/${e}`))}async approve(e,t={}){return G(await this.request(`/admin/paper-edits/${e}/approve`,{method:"POST",body:JSON.stringify(t)}))}async reject(e,t={}){return G(await this.request(`/admin/paper-edits/${e}/reject`,{method:"POST",body:JSON.stringify(t)}))}}const Gt=new Wt(Fe);export{Ht as E,Yt as p,Gt as s}; +import{ac as Fe}from"./index-CHGpuh10.js";var v;(function(s){s.assertEqual=a=>{};function e(a){}s.assertIs=e;function t(a){throw new Error}s.assertNever=t,s.arrayToEnum=a=>{const n={};for(const i of a)n[i]=i;return n},s.getValidEnumValues=a=>{const n=s.objectKeys(a).filter(o=>typeof a[a[o]]!="number"),i={};for(const o of n)i[o]=a[o];return s.objectValues(i)},s.objectValues=a=>s.objectKeys(a).map(function(n){return a[n]}),s.objectKeys=typeof Object.keys=="function"?a=>Object.keys(a):a=>{const n=[];for(const i in a)Object.prototype.hasOwnProperty.call(a,i)&&n.push(i);return n},s.find=(a,n)=>{for(const i of a)if(n(i))return i},s.isInteger=typeof Number.isInteger=="function"?a=>Number.isInteger(a):a=>typeof a=="number"&&Number.isFinite(a)&&Math.floor(a)===a;function r(a,n=" | "){return a.map(i=>typeof i=="string"?`'${i}'`:i).join(n)}s.joinValues=r,s.jsonStringifyReplacer=(a,n)=>typeof n=="bigint"?n.toString():n})(v||(v={}));var Se;(function(s){s.mergeShapes=(e,t)=>({...e,...t})})(Se||(Se={}));const u=v.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),$=s=>{switch(typeof s){case"undefined":return u.undefined;case"string":return u.string;case"number":return Number.isNaN(s)?u.nan:u.number;case"boolean":return u.boolean;case"function":return u.function;case"bigint":return u.bigint;case"symbol":return u.symbol;case"object":return Array.isArray(s)?u.array:s===null?u.null:s.then&&typeof s.then=="function"&&s.catch&&typeof s.catch=="function"?u.promise:typeof Map<"u"&&s instanceof Map?u.map:typeof Set<"u"&&s instanceof Set?u.set:typeof Date<"u"&&s instanceof Date?u.date:u.object;default:return u.unknown}},d=v.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class I extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}format(e){const t=e||function(n){return n.message},r={_errors:[]},a=n=>{for(const i of n.issues)if(i.code==="invalid_union")i.unionErrors.map(a);else if(i.code==="invalid_return_type")a(i.returnTypeError);else if(i.code==="invalid_arguments")a(i.argumentsError);else if(i.path.length===0)r._errors.push(t(i));else{let o=r,f=0;for(;ft.message){const t={},r=[];for(const a of this.issues)if(a.path.length>0){const n=a.path[0];t[n]=t[n]||[],t[n].push(e(a))}else r.push(e(a));return{formErrors:r,fieldErrors:t}}get formErrors(){return this.flatten()}}I.create=s=>new I(s);const le=(s,e)=>{let t;switch(s.code){case d.invalid_type:s.received===u.undefined?t="Required":t=`Expected ${s.expected}, received ${s.received}`;break;case d.invalid_literal:t=`Invalid literal value, expected ${JSON.stringify(s.expected,v.jsonStringifyReplacer)}`;break;case d.unrecognized_keys:t=`Unrecognized key(s) in object: ${v.joinValues(s.keys,", ")}`;break;case d.invalid_union:t="Invalid input";break;case d.invalid_union_discriminator:t=`Invalid discriminator value. Expected ${v.joinValues(s.options)}`;break;case d.invalid_enum_value:t=`Invalid enum value. Expected ${v.joinValues(s.options)}, received '${s.received}'`;break;case d.invalid_arguments:t="Invalid function arguments";break;case d.invalid_return_type:t="Invalid function return type";break;case d.invalid_date:t="Invalid date";break;case d.invalid_string:typeof s.validation=="object"?"includes"in s.validation?(t=`Invalid input: must include "${s.validation.includes}"`,typeof s.validation.position=="number"&&(t=`${t} at one or more positions greater than or equal to ${s.validation.position}`)):"startsWith"in s.validation?t=`Invalid input: must start with "${s.validation.startsWith}"`:"endsWith"in s.validation?t=`Invalid input: must end with "${s.validation.endsWith}"`:v.assertNever(s.validation):s.validation!=="regex"?t=`Invalid ${s.validation}`:t="Invalid";break;case d.too_small:s.type==="array"?t=`Array must contain ${s.exact?"exactly":s.inclusive?"at least":"more than"} ${s.minimum} element(s)`:s.type==="string"?t=`String must contain ${s.exact?"exactly":s.inclusive?"at least":"over"} ${s.minimum} character(s)`:s.type==="number"?t=`Number must be ${s.exact?"exactly equal to ":s.inclusive?"greater than or equal to ":"greater than "}${s.minimum}`:s.type==="bigint"?t=`Number must be ${s.exact?"exactly equal to ":s.inclusive?"greater than or equal to ":"greater than "}${s.minimum}`:s.type==="date"?t=`Date must be ${s.exact?"exactly equal to ":s.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(s.minimum))}`:t="Invalid input";break;case d.too_big:s.type==="array"?t=`Array must contain ${s.exact?"exactly":s.inclusive?"at most":"less than"} ${s.maximum} element(s)`:s.type==="string"?t=`String must contain ${s.exact?"exactly":s.inclusive?"at most":"under"} ${s.maximum} character(s)`:s.type==="number"?t=`Number must be ${s.exact?"exactly":s.inclusive?"less than or equal to":"less than"} ${s.maximum}`:s.type==="bigint"?t=`BigInt must be ${s.exact?"exactly":s.inclusive?"less than or equal to":"less than"} ${s.maximum}`:s.type==="date"?t=`Date must be ${s.exact?"exactly":s.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(s.maximum))}`:t="Invalid input";break;case d.custom:t="Invalid input";break;case d.invalid_intersection_types:t="Intersection results could not be merged";break;case d.not_multiple_of:t=`Number must be a multiple of ${s.multipleOf}`;break;case d.not_finite:t="Number must be finite";break;default:t=e.defaultError,v.assertNever(s)}return{message:t}};let We=le;function Je(){return We}const Ye=s=>{const{data:e,path:t,errorMaps:r,issueData:a}=s,n=[...t,...a.path||[]],i={...a,path:n};if(a.message!==void 0)return{...a,path:n,message:a.message};let o="";const f=r.filter(p=>!!p).slice().reverse();for(const p of f)o=p(i,{data:e,defaultError:o}).message;return{...a,path:n,message:o}};function c(s,e){const t=Je(),r=Ye({issueData:e,data:s.data,path:s.path,errorMaps:[s.common.contextualErrorMap,s.schemaErrorMap,t,t===le?void 0:le].filter(a=>!!a)});s.common.issues.push(r)}class C{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,t){const r=[];for(const a of t){if(a.status==="aborted")return m;a.status==="dirty"&&e.dirty(),r.push(a.value)}return{status:e.value,value:r}}static async mergeObjectAsync(e,t){const r=[];for(const a of t){const n=await a.key,i=await a.value;r.push({key:n,value:i})}return C.mergeObjectSync(e,r)}static mergeObjectSync(e,t){const r={};for(const a of t){const{key:n,value:i}=a;if(n.status==="aborted"||i.status==="aborted")return m;n.status==="dirty"&&e.dirty(),i.status==="dirty"&&e.dirty(),n.value!=="__proto__"&&(typeof i.value<"u"||a.alwaysSet)&&(r[n.value]=i.value)}return{status:e.value,value:r}}}const m=Object.freeze({status:"aborted"}),J=s=>({status:"dirty",value:s}),O=s=>({status:"valid",value:s}),Ce=s=>s.status==="aborted",Oe=s=>s.status==="dirty",B=s=>s.status==="valid",X=s=>typeof Promise<"u"&&s instanceof Promise;var h;(function(s){s.errToObj=e=>typeof e=="string"?{message:e}:e||{},s.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(h||(h={}));class E{constructor(e,t,r,a){this._cachedPath=[],this.parent=e,this.data=t,this._path=r,this._key=a}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const Ne=(s,e)=>{if(B(e))return{success:!0,data:e.value};if(!s.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const t=new I(s.common.issues);return this._error=t,this._error}}};function g(s){if(!s)return{};const{errorMap:e,invalid_type_error:t,required_error:r,description:a}=s;if(e&&(t||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:a}:{errorMap:(i,o)=>{const{message:f}=s;return i.code==="invalid_enum_value"?{message:f??o.defaultError}:typeof o.data>"u"?{message:f??r??o.defaultError}:i.code!=="invalid_type"?{message:o.defaultError}:{message:f??t??o.defaultError}},description:a}}class y{get description(){return this._def.description}_getType(e){return $(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:$(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new C,ctx:{common:e.parent.common,data:e.data,parsedType:$(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(X(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){const t=this._parse(e);return Promise.resolve(t)}parse(e,t){const r=this.safeParse(e,t);if(r.success)return r.data;throw r.error}safeParse(e,t){const r={common:{issues:[],async:(t==null?void 0:t.async)??!1,contextualErrorMap:t==null?void 0:t.errorMap},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:$(e)},a=this._parseSync({data:e,path:r.path,parent:r});return Ne(r,a)}"~validate"(e){var r,a;const t={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:$(e)};if(!this["~standard"].async)try{const n=this._parseSync({data:e,path:[],parent:t});return B(n)?{value:n.value}:{issues:t.common.issues}}catch(n){(a=(r=n==null?void 0:n.message)==null?void 0:r.toLowerCase())!=null&&a.includes("encountered")&&(this["~standard"].async=!0),t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then(n=>B(n)?{value:n.value}:{issues:t.common.issues})}async parseAsync(e,t){const r=await this.safeParseAsync(e,t);if(r.success)return r.data;throw r.error}async safeParseAsync(e,t){const r={common:{issues:[],contextualErrorMap:t==null?void 0:t.errorMap,async:!0},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:$(e)},a=this._parse({data:e,path:r.path,parent:r}),n=await(X(a)?a:Promise.resolve(a));return Ne(r,n)}refine(e,t){const r=a=>typeof t=="string"||typeof t>"u"?{message:t}:typeof t=="function"?t(a):t;return this._refinement((a,n)=>{const i=e(a),o=()=>n.addIssue({code:d.custom,...r(a)});return typeof Promise<"u"&&i instanceof Promise?i.then(f=>f?!0:(o(),!1)):i?!0:(o(),!1)})}refinement(e,t){return this._refinement((r,a)=>e(r)?!0:(a.addIssue(typeof t=="function"?t(r,a):t),!1))}_refinement(e){return new L({schema:this,typeName:_.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:t=>this["~validate"](t)}}optional(){return j.create(this,this._def)}nullable(){return D.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return N.create(this)}promise(){return ae.create(this,this._def)}or(e){return ee.create([this,e],this._def)}and(e){return te.create(this,e,this._def)}transform(e){return new L({...g(this._def),schema:this,typeName:_.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t=typeof e=="function"?e:()=>e;return new ne({...g(this._def),innerType:this,defaultValue:t,typeName:_.ZodDefault})}brand(){return new ze({typeName:_.ZodBranded,type:this,...g(this._def)})}catch(e){const t=typeof e=="function"?e:()=>e;return new ie({...g(this._def),innerType:this,catchValue:t,typeName:_.ZodCatch})}describe(e){const t=this.constructor;return new t({...this._def,description:e})}pipe(e){return be.create(this,e)}readonly(){return oe.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const He=/^c[^\s-]{8,}$/i,Ge=/^[0-9a-z]+$/,Qe=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Xe=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,Ke=/^[a-z0-9_-]{21}$/i,et=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,tt=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,st=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,rt="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let ue;const at=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,nt=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,it=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,ot=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,dt=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,ct=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,$e="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",ut=new RegExp(`^${$e}$`);function Pe(s){let e="[0-5]\\d";s.precision?e=`${e}\\.\\d{${s.precision}}`:s.precision==null&&(e=`${e}(\\.\\d+)?`);const t=s.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${t}`}function lt(s){return new RegExp(`^${Pe(s)}$`)}function ht(s){let e=`${$e}T${Pe(s)}`;const t=[];return t.push(s.local?"Z?":"Z"),s.offset&&t.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${t.join("|")})`,new RegExp(`^${e}$`)}function ft(s,e){return!!((e==="v4"||!e)&&at.test(s)||(e==="v6"||!e)&&it.test(s))}function pt(s,e){if(!et.test(s))return!1;try{const[t]=s.split(".");if(!t)return!1;const r=t.replace(/-/g,"+").replace(/_/g,"/").padEnd(t.length+(4-t.length%4)%4,"="),a=JSON.parse(atob(r));return!(typeof a!="object"||a===null||"typ"in a&&(a==null?void 0:a.typ)!=="JWT"||!a.alg||e&&a.alg!==e)}catch{return!1}}function mt(s,e){return!!((e==="v4"||!e)&&nt.test(s)||(e==="v6"||!e)&&ot.test(s))}class R extends y{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==u.string){const n=this._getOrReturnCtx(e);return c(n,{code:d.invalid_type,expected:u.string,received:n.parsedType}),m}const r=new C;let a;for(const n of this._def.checks)if(n.kind==="min")e.data.lengthn.value&&(a=this._getOrReturnCtx(e,a),c(a,{code:d.too_big,maximum:n.value,type:"string",inclusive:!0,exact:!1,message:n.message}),r.dirty());else if(n.kind==="length"){const i=e.data.length>n.value,o=e.data.lengthe.test(a),{validation:t,code:d.invalid_string,...h.errToObj(r)})}_addCheck(e){return new R({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...h.errToObj(e)})}url(e){return this._addCheck({kind:"url",...h.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...h.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...h.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...h.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...h.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...h.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...h.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...h.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...h.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...h.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...h.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...h.errToObj(e)})}datetime(e){return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,offset:(e==null?void 0:e.offset)??!1,local:(e==null?void 0:e.local)??!1,...h.errToObj(e==null?void 0:e.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,...h.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...h.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...h.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:t==null?void 0:t.position,...h.errToObj(t==null?void 0:t.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...h.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...h.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...h.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...h.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...h.errToObj(t)})}nonempty(e){return this.min(1,h.errToObj(e))}trim(){return new R({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new R({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new R({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.valuenew R({checks:[],typeName:_.ZodString,coerce:(s==null?void 0:s.coerce)??!1,...g(s)});function _t(s,e){const t=(s.toString().split(".")[1]||"").length,r=(e.toString().split(".")[1]||"").length,a=t>r?t:r,n=Number.parseInt(s.toFixed(a).replace(".","")),i=Number.parseInt(e.toFixed(a).replace(".",""));return n%i/10**a}class q extends y{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==u.number){const n=this._getOrReturnCtx(e);return c(n,{code:d.invalid_type,expected:u.number,received:n.parsedType}),m}let r;const a=new C;for(const n of this._def.checks)n.kind==="int"?v.isInteger(e.data)||(r=this._getOrReturnCtx(e,r),c(r,{code:d.invalid_type,expected:"integer",received:"float",message:n.message}),a.dirty()):n.kind==="min"?(n.inclusive?e.datan.value:e.data>=n.value)&&(r=this._getOrReturnCtx(e,r),c(r,{code:d.too_big,maximum:n.value,type:"number",inclusive:n.inclusive,exact:!1,message:n.message}),a.dirty()):n.kind==="multipleOf"?_t(e.data,n.value)!==0&&(r=this._getOrReturnCtx(e,r),c(r,{code:d.not_multiple_of,multipleOf:n.value,message:n.message}),a.dirty()):n.kind==="finite"?Number.isFinite(e.data)||(r=this._getOrReturnCtx(e,r),c(r,{code:d.not_finite,message:n.message}),a.dirty()):v.assertNever(n);return{status:a.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,h.toString(t))}gt(e,t){return this.setLimit("min",e,!1,h.toString(t))}lte(e,t){return this.setLimit("max",e,!0,h.toString(t))}lt(e,t){return this.setLimit("max",e,!1,h.toString(t))}setLimit(e,t,r,a){return new q({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:h.toString(a)}]})}_addCheck(e){return new q({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:h.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:h.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:h.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:h.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:h.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:h.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:h.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:h.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:h.toString(e)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.valuee.kind==="int"||e.kind==="multipleOf"&&v.isInteger(e.value))}get isFinite(){let e=null,t=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(t===null||r.value>t)&&(t=r.value):r.kind==="max"&&(e===null||r.valuenew q({checks:[],typeName:_.ZodNumber,coerce:(s==null?void 0:s.coerce)||!1,...g(s)});class Y extends y{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==u.bigint)return this._getInvalidInput(e);let r;const a=new C;for(const n of this._def.checks)n.kind==="min"?(n.inclusive?e.datan.value:e.data>=n.value)&&(r=this._getOrReturnCtx(e,r),c(r,{code:d.too_big,type:"bigint",maximum:n.value,inclusive:n.inclusive,message:n.message}),a.dirty()):n.kind==="multipleOf"?e.data%n.value!==BigInt(0)&&(r=this._getOrReturnCtx(e,r),c(r,{code:d.not_multiple_of,multipleOf:n.value,message:n.message}),a.dirty()):v.assertNever(n);return{status:a.value,value:e.data}}_getInvalidInput(e){const t=this._getOrReturnCtx(e);return c(t,{code:d.invalid_type,expected:u.bigint,received:t.parsedType}),m}gte(e,t){return this.setLimit("min",e,!0,h.toString(t))}gt(e,t){return this.setLimit("min",e,!1,h.toString(t))}lte(e,t){return this.setLimit("max",e,!0,h.toString(t))}lt(e,t){return this.setLimit("max",e,!1,h.toString(t))}setLimit(e,t,r,a){return new Y({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:h.toString(a)}]})}_addCheck(e){return new Y({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:h.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:h.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:h.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:h.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:h.toString(t)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.valuenew Y({checks:[],typeName:_.ZodBigInt,coerce:(s==null?void 0:s.coerce)??!1,...g(s)});class he extends y{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==u.boolean){const r=this._getOrReturnCtx(e);return c(r,{code:d.invalid_type,expected:u.boolean,received:r.parsedType}),m}return O(e.data)}}he.create=s=>new he({typeName:_.ZodBoolean,coerce:(s==null?void 0:s.coerce)||!1,...g(s)});class K extends y{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==u.date){const n=this._getOrReturnCtx(e);return c(n,{code:d.invalid_type,expected:u.date,received:n.parsedType}),m}if(Number.isNaN(e.data.getTime())){const n=this._getOrReturnCtx(e);return c(n,{code:d.invalid_date}),m}const r=new C;let a;for(const n of this._def.checks)n.kind==="min"?e.data.getTime()n.value&&(a=this._getOrReturnCtx(e,a),c(a,{code:d.too_big,message:n.message,inclusive:!0,exact:!1,maximum:n.value,type:"date"}),r.dirty()):v.assertNever(n);return{status:r.value,value:new Date(e.data.getTime())}}_addCheck(e){return new K({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:h.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:h.toString(t)})}get minDate(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.valuenew K({checks:[],coerce:(s==null?void 0:s.coerce)||!1,typeName:_.ZodDate,...g(s)});class Ae extends y{_parse(e){if(this._getType(e)!==u.symbol){const r=this._getOrReturnCtx(e);return c(r,{code:d.invalid_type,expected:u.symbol,received:r.parsedType}),m}return O(e.data)}}Ae.create=s=>new Ae({typeName:_.ZodSymbol,...g(s)});class fe extends y{_parse(e){if(this._getType(e)!==u.undefined){const r=this._getOrReturnCtx(e);return c(r,{code:d.invalid_type,expected:u.undefined,received:r.parsedType}),m}return O(e.data)}}fe.create=s=>new fe({typeName:_.ZodUndefined,...g(s)});class pe extends y{_parse(e){if(this._getType(e)!==u.null){const r=this._getOrReturnCtx(e);return c(r,{code:d.invalid_type,expected:u.null,received:r.parsedType}),m}return O(e.data)}}pe.create=s=>new pe({typeName:_.ZodNull,...g(s)});class Ee extends y{constructor(){super(...arguments),this._any=!0}_parse(e){return O(e.data)}}Ee.create=s=>new Ee({typeName:_.ZodAny,...g(s)});class me extends y{constructor(){super(...arguments),this._unknown=!0}_parse(e){return O(e.data)}}me.create=s=>new me({typeName:_.ZodUnknown,...g(s)});class P extends y{_parse(e){const t=this._getOrReturnCtx(e);return c(t,{code:d.invalid_type,expected:u.never,received:t.parsedType}),m}}P.create=s=>new P({typeName:_.ZodNever,...g(s)});class Ze extends y{_parse(e){if(this._getType(e)!==u.undefined){const r=this._getOrReturnCtx(e);return c(r,{code:d.invalid_type,expected:u.void,received:r.parsedType}),m}return O(e.data)}}Ze.create=s=>new Ze({typeName:_.ZodVoid,...g(s)});class N extends y{_parse(e){const{ctx:t,status:r}=this._processInputParams(e),a=this._def;if(t.parsedType!==u.array)return c(t,{code:d.invalid_type,expected:u.array,received:t.parsedType}),m;if(a.exactLength!==null){const i=t.data.length>a.exactLength.value,o=t.data.lengtha.maxLength.value&&(c(t,{code:d.too_big,maximum:a.maxLength.value,type:"array",inclusive:!0,exact:!1,message:a.maxLength.message}),r.dirty()),t.common.async)return Promise.all([...t.data].map((i,o)=>a.type._parseAsync(new E(t,i,t.path,o)))).then(i=>C.mergeArray(r,i));const n=[...t.data].map((i,o)=>a.type._parseSync(new E(t,i,t.path,o)));return C.mergeArray(r,n)}get element(){return this._def.type}min(e,t){return new N({...this._def,minLength:{value:e,message:h.toString(t)}})}max(e,t){return new N({...this._def,maxLength:{value:e,message:h.toString(t)}})}length(e,t){return new N({...this._def,exactLength:{value:e,message:h.toString(t)}})}nonempty(e){return this.min(1,e)}}N.create=(s,e)=>new N({type:s,minLength:null,maxLength:null,exactLength:null,typeName:_.ZodArray,...g(e)});function U(s){if(s instanceof w){const e={};for(const t in s.shape){const r=s.shape[t];e[t]=j.create(U(r))}return new w({...s._def,shape:()=>e})}else return s instanceof N?new N({...s._def,type:U(s.element)}):s instanceof j?j.create(U(s.unwrap())):s instanceof D?D.create(U(s.unwrap())):s instanceof z?z.create(s.items.map(e=>U(e))):s}class w extends y{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),t=v.objectKeys(e);return this._cached={shape:e,keys:t},this._cached}_parse(e){if(this._getType(e)!==u.object){const p=this._getOrReturnCtx(e);return c(p,{code:d.invalid_type,expected:u.object,received:p.parsedType}),m}const{status:r,ctx:a}=this._processInputParams(e),{shape:n,keys:i}=this._getCached(),o=[];if(!(this._def.catchall instanceof P&&this._def.unknownKeys==="strip"))for(const p in a.data)i.includes(p)||o.push(p);const f=[];for(const p of i){const x=n[p],W=a.data[p];f.push({key:{status:"valid",value:p},value:x._parse(new E(a,W,a.path,p)),alwaysSet:p in a.data})}if(this._def.catchall instanceof P){const p=this._def.unknownKeys;if(p==="passthrough")for(const x of o)f.push({key:{status:"valid",value:x},value:{status:"valid",value:a.data[x]}});else if(p==="strict")o.length>0&&(c(a,{code:d.unrecognized_keys,keys:o}),r.dirty());else if(p!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const p=this._def.catchall;for(const x of o){const W=a.data[x];f.push({key:{status:"valid",value:x},value:p._parse(new E(a,W,a.path,x)),alwaysSet:x in a.data})}}return a.common.async?Promise.resolve().then(async()=>{const p=[];for(const x of f){const W=await x.key,qe=await x.value;p.push({key:W,value:qe,alwaysSet:x.alwaysSet})}return p}).then(p=>C.mergeObjectSync(r,p)):C.mergeObjectSync(r,f)}get shape(){return this._def.shape()}strict(e){return h.errToObj,new w({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(t,r)=>{var n,i;const a=((i=(n=this._def).errorMap)==null?void 0:i.call(n,t,r).message)??r.defaultError;return t.code==="unrecognized_keys"?{message:h.errToObj(e).message??a}:{message:a}}}:{}})}strip(){return new w({...this._def,unknownKeys:"strip"})}passthrough(){return new w({...this._def,unknownKeys:"passthrough"})}extend(e){return new w({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new w({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:_.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new w({...this._def,catchall:e})}pick(e){const t={};for(const r of v.objectKeys(e))e[r]&&this.shape[r]&&(t[r]=this.shape[r]);return new w({...this._def,shape:()=>t})}omit(e){const t={};for(const r of v.objectKeys(this.shape))e[r]||(t[r]=this.shape[r]);return new w({...this._def,shape:()=>t})}deepPartial(){return U(this)}partial(e){const t={};for(const r of v.objectKeys(this.shape)){const a=this.shape[r];e&&!e[r]?t[r]=a:t[r]=a.optional()}return new w({...this._def,shape:()=>t})}required(e){const t={};for(const r of v.objectKeys(this.shape))if(e&&!e[r])t[r]=this.shape[r];else{let n=this.shape[r];for(;n instanceof j;)n=n._def.innerType;t[r]=n}return new w({...this._def,shape:()=>t})}keyof(){return Me(v.objectKeys(this.shape))}}w.create=(s,e)=>new w({shape:()=>s,unknownKeys:"strip",catchall:P.create(),typeName:_.ZodObject,...g(e)});w.strictCreate=(s,e)=>new w({shape:()=>s,unknownKeys:"strict",catchall:P.create(),typeName:_.ZodObject,...g(e)});w.lazycreate=(s,e)=>new w({shape:s,unknownKeys:"strip",catchall:P.create(),typeName:_.ZodObject,...g(e)});class ee extends y{_parse(e){const{ctx:t}=this._processInputParams(e),r=this._def.options;function a(n){for(const o of n)if(o.result.status==="valid")return o.result;for(const o of n)if(o.result.status==="dirty")return t.common.issues.push(...o.ctx.common.issues),o.result;const i=n.map(o=>new I(o.ctx.common.issues));return c(t,{code:d.invalid_union,unionErrors:i}),m}if(t.common.async)return Promise.all(r.map(async n=>{const i={...t,common:{...t.common,issues:[]},parent:null};return{result:await n._parseAsync({data:t.data,path:t.path,parent:i}),ctx:i}})).then(a);{let n;const i=[];for(const f of r){const p={...t,common:{...t.common,issues:[]},parent:null},x=f._parseSync({data:t.data,path:t.path,parent:p});if(x.status==="valid")return x;x.status==="dirty"&&!n&&(n={result:x,ctx:p}),p.common.issues.length&&i.push(p.common.issues)}if(n)return t.common.issues.push(...n.ctx.common.issues),n.result;const o=i.map(f=>new I(f));return c(t,{code:d.invalid_union,unionErrors:o}),m}}get options(){return this._def.options}}ee.create=(s,e)=>new ee({options:s,typeName:_.ZodUnion,...g(e)});const Z=s=>s instanceof ge?Z(s.schema):s instanceof L?Z(s.innerType()):s instanceof re?[s.value]:s instanceof V?s.options:s instanceof ye?v.objectValues(s.enum):s instanceof ne?Z(s._def.innerType):s instanceof fe?[void 0]:s instanceof pe?[null]:s instanceof j?[void 0,...Z(s.unwrap())]:s instanceof D?[null,...Z(s.unwrap())]:s instanceof ze||s instanceof oe?Z(s.unwrap()):s instanceof ie?Z(s._def.innerType):[];class ke extends y{_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==u.object)return c(t,{code:d.invalid_type,expected:u.object,received:t.parsedType}),m;const r=this.discriminator,a=t.data[r],n=this.optionsMap.get(a);return n?t.common.async?n._parseAsync({data:t.data,path:t.path,parent:t}):n._parseSync({data:t.data,path:t.path,parent:t}):(c(t,{code:d.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),m)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,r){const a=new Map;for(const n of t){const i=Z(n.shape[e]);if(!i.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const o of i){if(a.has(o))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(o)}`);a.set(o,n)}}return new ke({typeName:_.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:a,...g(r)})}}function _e(s,e){const t=$(s),r=$(e);if(s===e)return{valid:!0,data:s};if(t===u.object&&r===u.object){const a=v.objectKeys(e),n=v.objectKeys(s).filter(o=>a.indexOf(o)!==-1),i={...s,...e};for(const o of n){const f=_e(s[o],e[o]);if(!f.valid)return{valid:!1};i[o]=f.data}return{valid:!0,data:i}}else if(t===u.array&&r===u.array){if(s.length!==e.length)return{valid:!1};const a=[];for(let n=0;n{if(Ce(n)||Ce(i))return m;const o=_e(n.value,i.value);return o.valid?((Oe(n)||Oe(i))&&t.dirty(),{status:t.value,value:o.data}):(c(r,{code:d.invalid_intersection_types}),m)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([n,i])=>a(n,i)):a(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}te.create=(s,e,t)=>new te({left:s,right:e,typeName:_.ZodIntersection,...g(t)});class z extends y{_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==u.array)return c(r,{code:d.invalid_type,expected:u.array,received:r.parsedType}),m;if(r.data.lengththis._def.items.length&&(c(r,{code:d.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const n=[...r.data].map((i,o)=>{const f=this._def.items[o]||this._def.rest;return f?f._parse(new E(r,i,r.path,o)):null}).filter(i=>!!i);return r.common.async?Promise.all(n).then(i=>C.mergeArray(t,i)):C.mergeArray(t,n)}get items(){return this._def.items}rest(e){return new z({...this._def,rest:e})}}z.create=(s,e)=>{if(!Array.isArray(s))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new z({items:s,typeName:_.ZodTuple,rest:null,...g(e)})};class se extends y{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==u.object)return c(r,{code:d.invalid_type,expected:u.object,received:r.parsedType}),m;const a=[],n=this._def.keyType,i=this._def.valueType;for(const o in r.data)a.push({key:n._parse(new E(r,o,r.path,o)),value:i._parse(new E(r,r.data[o],r.path,o)),alwaysSet:o in r.data});return r.common.async?C.mergeObjectAsync(t,a):C.mergeObjectSync(t,a)}get element(){return this._def.valueType}static create(e,t,r){return t instanceof y?new se({keyType:e,valueType:t,typeName:_.ZodRecord,...g(r)}):new se({keyType:R.create(),valueType:e,typeName:_.ZodRecord,...g(t)})}}class Re extends y{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==u.map)return c(r,{code:d.invalid_type,expected:u.map,received:r.parsedType}),m;const a=this._def.keyType,n=this._def.valueType,i=[...r.data.entries()].map(([o,f],p)=>({key:a._parse(new E(r,o,r.path,[p,"key"])),value:n._parse(new E(r,f,r.path,[p,"value"]))}));if(r.common.async){const o=new Map;return Promise.resolve().then(async()=>{for(const f of i){const p=await f.key,x=await f.value;if(p.status==="aborted"||x.status==="aborted")return m;(p.status==="dirty"||x.status==="dirty")&&t.dirty(),o.set(p.value,x.value)}return{status:t.value,value:o}})}else{const o=new Map;for(const f of i){const p=f.key,x=f.value;if(p.status==="aborted"||x.status==="aborted")return m;(p.status==="dirty"||x.status==="dirty")&&t.dirty(),o.set(p.value,x.value)}return{status:t.value,value:o}}}}Re.create=(s,e,t)=>new Re({valueType:e,keyType:s,typeName:_.ZodMap,...g(t)});class H extends y{_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==u.set)return c(r,{code:d.invalid_type,expected:u.set,received:r.parsedType}),m;const a=this._def;a.minSize!==null&&r.data.sizea.maxSize.value&&(c(r,{code:d.too_big,maximum:a.maxSize.value,type:"set",inclusive:!0,exact:!1,message:a.maxSize.message}),t.dirty());const n=this._def.valueType;function i(f){const p=new Set;for(const x of f){if(x.status==="aborted")return m;x.status==="dirty"&&t.dirty(),p.add(x.value)}return{status:t.value,value:p}}const o=[...r.data.values()].map((f,p)=>n._parse(new E(r,f,r.path,p)));return r.common.async?Promise.all(o).then(f=>i(f)):i(o)}min(e,t){return new H({...this._def,minSize:{value:e,message:h.toString(t)}})}max(e,t){return new H({...this._def,maxSize:{value:e,message:h.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}H.create=(s,e)=>new H({valueType:s,minSize:null,maxSize:null,typeName:_.ZodSet,...g(e)});class ge extends y{get schema(){return this._def.getter()}_parse(e){const{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}ge.create=(s,e)=>new ge({getter:s,typeName:_.ZodLazy,...g(e)});class re extends y{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return c(t,{received:t.data,code:d.invalid_literal,expected:this._def.value}),m}return{status:"valid",value:e.data}}get value(){return this._def.value}}re.create=(s,e)=>new re({value:s,typeName:_.ZodLiteral,...g(e)});function Me(s,e){return new V({values:s,typeName:_.ZodEnum,...g(e)})}class V extends y{_parse(e){if(typeof e.data!="string"){const t=this._getOrReturnCtx(e),r=this._def.values;return c(t,{expected:v.joinValues(r),received:t.parsedType,code:d.invalid_type}),m}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){const t=this._getOrReturnCtx(e),r=this._def.values;return c(t,{received:t.data,code:d.invalid_enum_value,options:r}),m}return O(e.data)}get options(){return this._def.values}get enum(){const e={};for(const t of this._def.values)e[t]=t;return e}get Values(){const e={};for(const t of this._def.values)e[t]=t;return e}get Enum(){const e={};for(const t of this._def.values)e[t]=t;return e}extract(e,t=this._def){return V.create(e,{...this._def,...t})}exclude(e,t=this._def){return V.create(this.options.filter(r=>!e.includes(r)),{...this._def,...t})}}V.create=Me;class ye extends y{_parse(e){const t=v.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(e);if(r.parsedType!==u.string&&r.parsedType!==u.number){const a=v.objectValues(t);return c(r,{expected:v.joinValues(a),received:r.parsedType,code:d.invalid_type}),m}if(this._cache||(this._cache=new Set(v.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){const a=v.objectValues(t);return c(r,{received:r.data,code:d.invalid_enum_value,options:a}),m}return O(e.data)}get enum(){return this._def.values}}ye.create=(s,e)=>new ye({values:s,typeName:_.ZodNativeEnum,...g(e)});class ae extends y{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==u.promise&&t.common.async===!1)return c(t,{code:d.invalid_type,expected:u.promise,received:t.parsedType}),m;const r=t.parsedType===u.promise?t.data:Promise.resolve(t.data);return O(r.then(a=>this._def.type.parseAsync(a,{path:t.path,errorMap:t.common.contextualErrorMap})))}}ae.create=(s,e)=>new ae({type:s,typeName:_.ZodPromise,...g(e)});class L extends y{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===_.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:r}=this._processInputParams(e),a=this._def.effect||null,n={addIssue:i=>{c(r,i),i.fatal?t.abort():t.dirty()},get path(){return r.path}};if(n.addIssue=n.addIssue.bind(n),a.type==="preprocess"){const i=a.transform(r.data,n);if(r.common.async)return Promise.resolve(i).then(async o=>{if(t.value==="aborted")return m;const f=await this._def.schema._parseAsync({data:o,path:r.path,parent:r});return f.status==="aborted"?m:f.status==="dirty"||t.value==="dirty"?J(f.value):f});{if(t.value==="aborted")return m;const o=this._def.schema._parseSync({data:i,path:r.path,parent:r});return o.status==="aborted"?m:o.status==="dirty"||t.value==="dirty"?J(o.value):o}}if(a.type==="refinement"){const i=o=>{const f=a.refinement(o,n);if(r.common.async)return Promise.resolve(f);if(f instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return o};if(r.common.async===!1){const o=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?m:(o.status==="dirty"&&t.dirty(),i(o.value),{status:t.value,value:o.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(o=>o.status==="aborted"?m:(o.status==="dirty"&&t.dirty(),i(o.value).then(()=>({status:t.value,value:o.value}))))}if(a.type==="transform")if(r.common.async===!1){const i=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!B(i))return m;const o=a.transform(i.value,n);if(o instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:o}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(i=>B(i)?Promise.resolve(a.transform(i.value,n)).then(o=>({status:t.value,value:o})):m);v.assertNever(a)}}L.create=(s,e,t)=>new L({schema:s,typeName:_.ZodEffects,effect:e,...g(t)});L.createWithPreprocess=(s,e,t)=>new L({schema:e,effect:{type:"preprocess",transform:s},typeName:_.ZodEffects,...g(t)});class j extends y{_parse(e){return this._getType(e)===u.undefined?O(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}j.create=(s,e)=>new j({innerType:s,typeName:_.ZodOptional,...g(e)});class D extends y{_parse(e){return this._getType(e)===u.null?O(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}D.create=(s,e)=>new D({innerType:s,typeName:_.ZodNullable,...g(e)});class ne extends y{_parse(e){const{ctx:t}=this._processInputParams(e);let r=t.data;return t.parsedType===u.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}ne.create=(s,e)=>new ne({innerType:s,typeName:_.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...g(e)});class ie extends y{_parse(e){const{ctx:t}=this._processInputParams(e),r={...t,common:{...t.common,issues:[]}},a=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return X(a)?a.then(n=>({status:"valid",value:n.status==="valid"?n.value:this._def.catchValue({get error(){return new I(r.common.issues)},input:r.data})})):{status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new I(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}ie.create=(s,e)=>new ie({innerType:s,typeName:_.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...g(e)});class je extends y{_parse(e){if(this._getType(e)!==u.nan){const r=this._getOrReturnCtx(e);return c(r,{code:d.invalid_type,expected:u.nan,received:r.parsedType}),m}return{status:"valid",value:e.data}}}je.create=s=>new je({typeName:_.ZodNaN,...g(s)});class ze extends y{_parse(e){const{ctx:t}=this._processInputParams(e),r=t.data;return this._def.type._parse({data:r,path:t.path,parent:t})}unwrap(){return this._def.type}}class be extends y{_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.common.async)return(async()=>{const n=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return n.status==="aborted"?m:n.status==="dirty"?(t.dirty(),J(n.value)):this._def.out._parseAsync({data:n.value,path:r.path,parent:r})})();{const a=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?m:a.status==="dirty"?(t.dirty(),{status:"dirty",value:a.value}):this._def.out._parseSync({data:a.value,path:r.path,parent:r})}}static create(e,t){return new be({in:e,out:t,typeName:_.ZodPipeline})}}class oe extends y{_parse(e){const t=this._def.innerType._parse(e),r=a=>(B(a)&&(a.value=Object.freeze(a.value)),a);return X(t)?t.then(a=>r(a)):r(t)}unwrap(){return this._def.innerType}}oe.create=(s,e)=>new oe({innerType:s,typeName:_.ZodReadonly,...g(e)});var _;(function(s){s.ZodString="ZodString",s.ZodNumber="ZodNumber",s.ZodNaN="ZodNaN",s.ZodBigInt="ZodBigInt",s.ZodBoolean="ZodBoolean",s.ZodDate="ZodDate",s.ZodSymbol="ZodSymbol",s.ZodUndefined="ZodUndefined",s.ZodNull="ZodNull",s.ZodAny="ZodAny",s.ZodUnknown="ZodUnknown",s.ZodNever="ZodNever",s.ZodVoid="ZodVoid",s.ZodArray="ZodArray",s.ZodObject="ZodObject",s.ZodUnion="ZodUnion",s.ZodDiscriminatedUnion="ZodDiscriminatedUnion",s.ZodIntersection="ZodIntersection",s.ZodTuple="ZodTuple",s.ZodRecord="ZodRecord",s.ZodMap="ZodMap",s.ZodSet="ZodSet",s.ZodFunction="ZodFunction",s.ZodLazy="ZodLazy",s.ZodLiteral="ZodLiteral",s.ZodEnum="ZodEnum",s.ZodEffects="ZodEffects",s.ZodNativeEnum="ZodNativeEnum",s.ZodOptional="ZodOptional",s.ZodNullable="ZodNullable",s.ZodDefault="ZodDefault",s.ZodCatch="ZodCatch",s.ZodPromise="ZodPromise",s.ZodBranded="ZodBranded",s.ZodPipeline="ZodPipeline",s.ZodReadonly="ZodReadonly"})(_||(_={}));const l=R.create,b=q.create,de=he.create,gt=me.create;P.create;const T=N.create,k=w.create,Ve=ee.create,Le=ke.create;te.create;z.create;const De=se.create,Q=re.create,ve=V.create;ae.create;j.create;D.create;const A=De(gt()),we=k({id:b(),name:l(),slug:l().optional()}).passthrough(),ce=k({url:l(),is_official:de()}),xe=k({task_id:b(),dataset_id:b(),model_name:l().nullish(),harness:l().nullish(),methodology:l().nullish(),metrics:De(Ve([l(),b()])),uses_additional_data:de().optional(),is_open:de().optional(),best_rank:b().nullish(),best_metric:l().nullish(),evaluated_on:l().nullish(),external_source_url:l().nullish(),num_parameters:b().nullish(),hf_model_url:l().nullish()}).passthrough(),yt=xe.partial().extend({id:b().optional()}),vt=Le("op",[k({op:Q("create"),data:xe}),k({op:Q("update"),evaluation_id:b(),data:xe}),k({op:Q("delete"),evaluation_id:b()})]),Ie=k({hf_models:T(l()),hf_datasets:T(l()),hf_spaces:T(l())}),Te=k({file_name:l(),mime_type:l(),data_url:l().optional(),url:l().optional()}),F=k({name:l(),description:l().optional()}),xt=F.extend({image:Te.optional(),image_credit:l().optional(),parent_id:b().optional(),area_id:b().optional(),keywords:l().optional()}),kt=F.extend({image:Te.optional(),image_credit:l().optional(),source_paper_id:b().optional(),source_url:l().optional(),source_title:l().optional()}),bt=Ve([k({benchmark:l(),task:l(),description:l()}),F.extend({description:l(),task_ids:T(b()),full_name:l().optional(),url:l().optional(),hf_url:l().optional(),paper_url:l().optional(),license_name:l().optional(),license_url:l().optional()})]),wt=F.extend({description:l(),direction:ve(["higher_is_better","lower_is_better"]),full_name:l().optional(),scale:l().optional(),task_id:b(),dataset_id:b()}),Tt=F.extend({short_name:l().optional(),venue:l().optional(),location:l().optional(),url:l(),year:b(),start_date:l().optional(),end_date:l().optional()}),St=F.extend({hf_slug:l().optional(),website_url:l().optional(),image:Te.optional()}),Ct=k({id:b(),paper_id:b().nullable(),hf_username:l(),hf_subject:l().nullish(),is_author:de(),status:ve(["pending","approved","rejected"]),applied_payload:A.nullish(),conflict_payload:A.nullish(),result_entity_type:l().nullish(),result_entity_id:l().nullish(),admin_note:l().nullish(),user_review_reason:l().nullish(),reviewed_by:l().nullish(),reviewed_by_kind:ve(["human","codex","auto"]).nullish(),catalog_event_id:l().nullish(),review_evidence:A.nullish(),created_at:l(),updated_at:l(),reviewed_at:l().nullish()});function S(s,e,t){return Ct.extend({edit_type:Q(s),proposed_payload:e,current_payload:t.nullish()})}const Ot=S("tasks",k({task_ids:T(b())}),k({tasks:T(we)})),Nt=S("methods",k({method_ids:T(b())}),k({methods:T(we)})),At=S("evaluations",k({operations:T(vt)}),k({evaluations:T(yt)})),Et=S("repositories",k({repositories:T(ce)}),k({repositories:T(ce)})),Zt=S("project_pages",k({project_pages:T(ce)}),k({project_pages:T(ce)})),Rt=S("source_url",k({source_url:l()}),k({source_url:l().nullish()})),jt=S("hf_artifacts",Ie,Ie),It=S("x_threads",k({x_threads:T(l())}),k({x_threads:T(k({url:l()}))})),$t=S("organizations",k({organization_ids:T(b())}),k({organizations:T(we)})),Pt=S("new_task",xt,A),Mt=S("new_method",kt,A),zt=S("new_benchmark",bt,A),Vt=S("new_metric",wt,A),Lt=S("new_conference",Tt,A),Dt=S("new_organization",St,A),Ut=S("new_external_paper",k({title:l().optional(),source_url:l(),authors:T(l()),date_published:l().optional(),abstract:l().optional()}),A),Ue=Le("edit_type",[Ot,Nt,At,Et,Zt,Rt,jt,It,$t,Pt,Mt,zt,Vt,Lt,Dt,Ut]);function Yt(s,e,t){return{paper_id:s,edit_type:e,proposed_payload:t}}const M=(s,e)=>({directory:{title:s,subtitle:e}}),Ht={tasks:{label:"tasks",administrative:!1},methods:{label:"methods",administrative:!1},evaluations:{label:"evaluations",administrative:!1},repositories:{label:"repositories",administrative:!1},project_pages:{label:"project pages",administrative:!1},source_url:{label:"source url",administrative:!1},x_threads:{label:"x threads",administrative:!1},hf_artifacts:{label:"hf artifacts",administrative:!1},organizations:{label:"organizations",administrative:!1},new_task:{label:"new task",administrative:!0,...M("New task","Task suggestion")},new_method:{label:"new method",administrative:!0,...M("New method","Method suggestion")},new_benchmark:{label:"new benchmark",administrative:!0,...M("New benchmark","Benchmark suggestion")},new_metric:{label:"new metric",administrative:!0,...M("New metric","Metric suggestion")},new_conference:{label:"new conference",administrative:!0,...M("New conference","Conference suggestion")},new_organization:{label:"new organization",administrative:!1,...M("New organization","Organization suggestion")},new_external_paper:{label:"external paper",administrative:!1,...M("External paper","External paper submission")}},Bt=k({count:b(),results:T(Ue)});class qt extends Error{constructor(e){super(`Malformed pending-edit payload: ${e}`),this.name="PendingEditPayloadError"}}function Be(s,e){const t=s.safeParse(e);if(t.success)return t.data;const r=t.error.issues[0];throw new qt(`${(r==null?void 0:r.path.join("."))||"response"}: ${(r==null?void 0:r.message)||"invalid value"}`)}const G=s=>Be(Ue,s),Ft=s=>Be(Bt,s);class Wt{constructor(e){this.request=e}async submit(e){return G(await this.request("/me/paper-edits",{method:"POST",body:JSON.stringify(e)}))}list(e){const t=new URLSearchParams;for(const[a,n]of Object.entries(e??{}))n!==void 0&&t.set(a,String(n));const r=t.toString();return this.request(`/admin/paper-edits${r?`?${r}`:""}`).then(Ft)}revertAutoApproved(e,t={}){return this.request(`/admin/submitters/${encodeURIComponent(e)}/revert-auto-approved`,{method:"POST",body:JSON.stringify(t)})}async get(e){return G(await this.request(`/admin/paper-edits/${e}`))}async approve(e,t={}){return G(await this.request(`/admin/paper-edits/${e}/approve`,{method:"POST",body:JSON.stringify(t)}))}async reject(e,t={}){return G(await this.request(`/admin/paper-edits/${e}/reject`,{method:"POST",body:JSON.stringify(t)}))}}const Gt=new Wt(Fe);export{Ht as E,Yt as p,Gt as s}; diff --git a/assets/switch-hcLL2FH0.js b/assets/switch-CD23XWT7.js similarity index 94% rename from assets/switch-hcLL2FH0.js rename to assets/switch-CD23XWT7.js index af3d527f37134af267f1874db9bc8e0a8eec76d5..7c82d8da831f260cc4a1165c363193ec6cc3aca4 100644 --- a/assets/switch-hcLL2FH0.js +++ b/assets/switch-CD23XWT7.js @@ -1 +1 @@ -import{d as s,D as C,B as T,j as a,z as y,E as M,F as H,G as z,I as x}from"./index-CjdUkE4w.js";import{u as A}from"./index-BxR27SAB.js";var b="Switch",[U]=z(b),[q,D]=U(b),E=s.forwardRef((t,o)=>{const{__scopeSwitch:e,name:n,checked:r,defaultChecked:m,required:d,disabled:c,value:u="on",onCheckedChange:v,form:i,...w}=t,[l,p]=s.useState(null),S=C(o,h=>p(h)),k=s.useRef(!1),g=l?i||!!l.closest("form"):!0,[f,B]=T({prop:r,defaultProp:m??!1,onChange:v,caller:b});return a.jsxs(q,{scope:e,checked:f,disabled:c,children:[a.jsx(y.button,{type:"button",role:"switch","aria-checked":f,"aria-required":d,"data-state":j(f),"data-disabled":c?"":void 0,disabled:c,value:u,...w,ref:S,onClick:M(t.onClick,h=>{B(I=>!I),g&&(k.current=h.isPropagationStopped(),k.current||h.stopPropagation())})}),g&&a.jsx(N,{control:l,bubbles:!k.current,name:n,value:u,checked:f,required:d,disabled:c,form:i,style:{transform:"translateX(-100%)"}})]})});E.displayName=b;var P="SwitchThumb",R=s.forwardRef((t,o)=>{const{__scopeSwitch:e,...n}=t,r=D(P,e);return a.jsx(y.span,{"data-state":j(r.checked),"data-disabled":r.disabled?"":void 0,...n,ref:o})});R.displayName=P;var F="SwitchBubbleInput",N=s.forwardRef(({__scopeSwitch:t,control:o,checked:e,bubbles:n=!0,...r},m)=>{const d=s.useRef(null),c=C(d,m),u=A(e),v=H(o);return s.useEffect(()=>{const i=d.current;if(!i)return;const w=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(w,"checked").set;if(u!==e&&p){const S=new Event("click",{bubbles:n});p.call(i,e),i.dispatchEvent(S)}},[u,e,n]),a.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:e,...r,tabIndex:-1,ref:c,style:{...r.style,...v,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});N.displayName=F;function j(t){return t?"checked":"unchecked"}var _=E,L=R;const O=s.forwardRef(({className:t,...o},e)=>a.jsx(_,{className:x("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50",t),...o,ref:e,children:a.jsx(L,{className:x("pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")})}));O.displayName=_.displayName;export{O as S}; +import{d as s,D as C,B as T,j as a,z as y,E as M,F as H,G as z,I as x}from"./index-CHGpuh10.js";import{u as A}from"./index-CWaI9Snb.js";var b="Switch",[U]=z(b),[q,D]=U(b),E=s.forwardRef((t,o)=>{const{__scopeSwitch:e,name:n,checked:r,defaultChecked:m,required:d,disabled:c,value:u="on",onCheckedChange:v,form:i,...w}=t,[l,p]=s.useState(null),S=C(o,h=>p(h)),k=s.useRef(!1),g=l?i||!!l.closest("form"):!0,[f,B]=T({prop:r,defaultProp:m??!1,onChange:v,caller:b});return a.jsxs(q,{scope:e,checked:f,disabled:c,children:[a.jsx(y.button,{type:"button",role:"switch","aria-checked":f,"aria-required":d,"data-state":j(f),"data-disabled":c?"":void 0,disabled:c,value:u,...w,ref:S,onClick:M(t.onClick,h=>{B(I=>!I),g&&(k.current=h.isPropagationStopped(),k.current||h.stopPropagation())})}),g&&a.jsx(N,{control:l,bubbles:!k.current,name:n,value:u,checked:f,required:d,disabled:c,form:i,style:{transform:"translateX(-100%)"}})]})});E.displayName=b;var P="SwitchThumb",R=s.forwardRef((t,o)=>{const{__scopeSwitch:e,...n}=t,r=D(P,e);return a.jsx(y.span,{"data-state":j(r.checked),"data-disabled":r.disabled?"":void 0,...n,ref:o})});R.displayName=P;var F="SwitchBubbleInput",N=s.forwardRef(({__scopeSwitch:t,control:o,checked:e,bubbles:n=!0,...r},m)=>{const d=s.useRef(null),c=C(d,m),u=A(e),v=H(o);return s.useEffect(()=>{const i=d.current;if(!i)return;const w=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(w,"checked").set;if(u!==e&&p){const S=new Event("click",{bubbles:n});p.call(i,e),i.dispatchEvent(S)}},[u,e,n]),a.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:e,...r,tabIndex:-1,ref:c,style:{...r.style,...v,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});N.displayName=F;function j(t){return t?"checked":"unchecked"}var _=E,L=R;const O=s.forwardRef(({className:t,...o},e)=>a.jsx(_,{className:x("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50",t),...o,ref:e,children:a.jsx(L,{className:x("pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")})}));O.displayName=_.displayName;export{O as S}; diff --git a/assets/textarea-biscLKBK.js b/assets/textarea-CDMkQNbH.js similarity index 86% rename from assets/textarea-biscLKBK.js rename to assets/textarea-CDMkQNbH.js index 7f386a7b6ffcbc71201c7c27314c54799066f812..2daed1752ea215f565d0340f6b97d7288c76ec88 100644 --- a/assets/textarea-biscLKBK.js +++ b/assets/textarea-CDMkQNbH.js @@ -1 +1 @@ -import{d as s,j as a,I as t}from"./index-CjdUkE4w.js";const i=s.forwardRef(({className:e,...r},o)=>a.jsx("textarea",{className:t("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:o,...r}));i.displayName="Textarea";export{i as T}; +import{d as s,j as a,I as t}from"./index-CHGpuh10.js";const i=s.forwardRef(({className:e,...r},o)=>a.jsx("textarea",{className:t("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:o,...r}));i.displayName="Textarea";export{i as T}; diff --git a/assets/thumbs-up-Dn_5H93T.js b/assets/thumbs-up-BGuynS0P.js similarity index 90% rename from assets/thumbs-up-Dn_5H93T.js rename to assets/thumbs-up-BGuynS0P.js index 19446f1940d439cfe7b2a442fd345eaede68c12e..a9c5add20916c77ae682e04931c9134dcd7e88e1 100644 --- a/assets/thumbs-up-Dn_5H93T.js +++ b/assets/thumbs-up-BGuynS0P.js @@ -1,4 +1,4 @@ -import{s as a}from"./index-CjdUkE4w.js";/** +import{s as a}from"./index-CHGpuh10.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/transform-CRNzYLch.js b/assets/transform-Cs8_lTDx.js similarity index 99% rename from assets/transform-CRNzYLch.js rename to assets/transform-Cs8_lTDx.js index 759c1eb5a13492d7fbf67c5d485f70023ebb1b10..7e01740adefa466908e222dac86d7f4a916c2b78 100644 --- a/assets/transform-CRNzYLch.js +++ b/assets/transform-Cs8_lTDx.js @@ -1 +1 @@ -import{a3 as _}from"./index-CjdUkE4w.js";function w(t){const e=Object.prototype.toString.call(t);return t instanceof Date||typeof t=="object"&&e==="[object Date]"?new t.constructor(+t):typeof t=="number"||e==="[object Number]"||typeof t=="string"||e==="[object String]"?new Date(t):new Date(NaN)}function D(t,e){return t instanceof Date?new t.constructor(e):new Date(e)}const A=6048e5,z=864e5,I=6e4,R=36e5;let V={};function W(){return V}function v(t,e){var s,u,d,f;const n=W(),r=(e==null?void 0:e.weekStartsOn)??((u=(s=e==null?void 0:e.locale)==null?void 0:s.options)==null?void 0:u.weekStartsOn)??n.weekStartsOn??((f=(d=n.locale)==null?void 0:d.options)==null?void 0:f.weekStartsOn)??0,a=w(t),i=a.getDay(),o=(i=a.getTime()?n+1:e.getTime()>=o.getTime()?n:n-1}function F(t){const e=w(t);return e.setHours(0,0,0,0),e}function E(t){const e=w(t),n=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return n.setUTCFullYear(e.getFullYear()),+t-+n}function J(t,e){const n=F(t),r=F(e),a=+n-E(n),i=+r-E(r);return Math.round((a-i)/z)}function Z(t){const e=j(t),n=D(t,0);return n.setFullYear(e,0,4),n.setHours(0,0,0,0),S(n)}function K(t){return t instanceof Date||typeof t=="object"&&Object.prototype.toString.call(t)==="[object Date]"}function tt(t){if(!K(t)&&typeof t!="number")return!1;const e=w(t);return!isNaN(Number(e))}function et(t){const e=w(t),n=D(t,0);return n.setFullYear(e.getFullYear(),0,1),n.setHours(0,0,0,0),n}const nt={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},rt=(t,e,n)=>{let r;const a=nt[t];return typeof a=="string"?r=a:e===1?r=a.one:r=a.other.replace("{{count}}",e.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function N(t){return(e={})=>{const n=e.width?String(e.width):t.defaultWidth;return t.formats[n]||t.formats[t.defaultWidth]}}const at={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},it={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},ot={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},st={date:N({formats:at,defaultWidth:"full"}),time:N({formats:it,defaultWidth:"full"}),dateTime:N({formats:ot,defaultWidth:"full"})},ut={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},ct=(t,e,n,r)=>ut[t];function O(t){return(e,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let a;if(r==="formatting"&&t.formattingValues){const o=t.defaultFormattingWidth||t.defaultWidth,s=n!=null&&n.width?String(n.width):o;a=t.formattingValues[s]||t.formattingValues[o]}else{const o=t.defaultWidth,s=n!=null&&n.width?String(n.width):t.defaultWidth;a=t.values[s]||t.values[o]}const i=t.argumentCallback?t.argumentCallback(e):e;return a[i]}}const dt={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},lt={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},ft={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},ht={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},mt={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},gt={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},wt=(t,e)=>{const n=Number(t),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},yt={ordinalNumber:wt,era:O({values:dt,defaultWidth:"wide"}),quarter:O({values:lt,defaultWidth:"wide",argumentCallback:t=>t-1}),month:O({values:ft,defaultWidth:"wide"}),day:O({values:ht,defaultWidth:"wide"}),dayPeriod:O({values:mt,defaultWidth:"wide",formattingValues:gt,defaultFormattingWidth:"wide"})};function P(t){return(e,n={})=>{const r=n.width,a=r&&t.matchPatterns[r]||t.matchPatterns[t.defaultMatchWidth],i=e.match(a);if(!i)return null;const o=i[0],s=r&&t.parsePatterns[r]||t.parsePatterns[t.defaultParseWidth],u=Array.isArray(s)?Dt(s,g=>g.test(o)):bt(s,g=>g.test(o));let d;d=t.valueCallback?t.valueCallback(u):u,d=n.valueCallback?n.valueCallback(d):d;const f=e.slice(o.length);return{value:d,rest:f}}}function bt(t,e){for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&e(t[n]))return n}function Dt(t,e){for(let n=0;n{const r=e.match(t.matchPattern);if(!r)return null;const a=r[0],i=e.match(t.parsePattern);if(!i)return null;let o=t.valueCallback?t.valueCallback(i[0]):i[0];o=n.valueCallback?n.valueCallback(o):o;const s=e.slice(a.length);return{value:o,rest:s}}}const kt=/^(\d+)(th|st|nd|rd)?/i,Ot=/\d+/i,Pt={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},pt={any:[/^b/i,/^(a|c)/i]},vt={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},xt={any:[/1/i,/2/i,/3/i,/4/i]},Tt={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},St={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},Wt={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Yt={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},Nt={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Ct={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},_t={ordinalNumber:Mt({matchPattern:kt,parsePattern:Ot,valueCallback:t=>parseInt(t,10)}),era:P({matchPatterns:Pt,defaultMatchWidth:"wide",parsePatterns:pt,defaultParseWidth:"any"}),quarter:P({matchPatterns:vt,defaultMatchWidth:"wide",parsePatterns:xt,defaultParseWidth:"any",valueCallback:t=>t+1}),month:P({matchPatterns:Tt,defaultMatchWidth:"wide",parsePatterns:St,defaultParseWidth:"any"}),day:P({matchPatterns:Wt,defaultMatchWidth:"wide",parsePatterns:Yt,defaultParseWidth:"any"}),dayPeriod:P({matchPatterns:Nt,defaultMatchWidth:"any",parsePatterns:Ct,defaultParseWidth:"any"})},Ft={code:"en-US",formatDistance:rt,formatLong:st,formatRelative:ct,localize:yt,match:_t,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Et(t){const e=w(t);return J(e,et(e))+1}function qt(t){const e=w(t),n=+S(e)-+Z(e);return Math.round(n/A)+1}function Q(t,e){var f,g,l,k;const n=w(t),r=n.getFullYear(),a=W(),i=(e==null?void 0:e.firstWeekContainsDate)??((g=(f=e==null?void 0:e.locale)==null?void 0:f.options)==null?void 0:g.firstWeekContainsDate)??a.firstWeekContainsDate??((k=(l=a.locale)==null?void 0:l.options)==null?void 0:k.firstWeekContainsDate)??1,o=D(t,0);o.setFullYear(r+1,0,i),o.setHours(0,0,0,0);const s=v(o,e),u=D(t,0);u.setFullYear(r,0,i),u.setHours(0,0,0,0);const d=v(u,e);return n.getTime()>=s.getTime()?r+1:n.getTime()>=d.getTime()?r:r-1}function Ut(t,e){var s,u,d,f;const n=W(),r=(e==null?void 0:e.firstWeekContainsDate)??((u=(s=e==null?void 0:e.locale)==null?void 0:s.options)==null?void 0:u.firstWeekContainsDate)??n.firstWeekContainsDate??((f=(d=n.locale)==null?void 0:d.options)==null?void 0:f.firstWeekContainsDate)??1,a=Q(t,e),i=D(t,0);return i.setFullYear(a,0,r),i.setHours(0,0,0,0),v(i,e)}function Lt(t,e){const n=w(t),r=+v(n,e)-+Ut(n,e);return Math.round(r/A)+1}function c(t,e){const n=t<0?"-":"",r=Math.abs(t).toString().padStart(e,"0");return n+r}const y={y(t,e){const n=t.getFullYear(),r=n>0?n:1-n;return c(e==="yy"?r%100:r,e.length)},M(t,e){const n=t.getMonth();return e==="M"?String(n+1):c(n+1,2)},d(t,e){return c(t.getDate(),e.length)},a(t,e){const n=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(t,e){return c(t.getHours()%12||12,e.length)},H(t,e){return c(t.getHours(),e.length)},m(t,e){return c(t.getMinutes(),e.length)},s(t,e){return c(t.getSeconds(),e.length)},S(t,e){const n=e.length,r=t.getMilliseconds(),a=Math.trunc(r*Math.pow(10,n-3));return c(a,e.length)}},M={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},q={G:function(t,e,n){const r=t.getFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(t,e,n){if(e==="yo"){const r=t.getFullYear(),a=r>0?r:1-r;return n.ordinalNumber(a,{unit:"year"})}return y.y(t,e)},Y:function(t,e,n,r){const a=Q(t,r),i=a>0?a:1-a;if(e==="YY"){const o=i%100;return c(o,2)}return e==="Yo"?n.ordinalNumber(i,{unit:"year"}):c(i,e.length)},R:function(t,e){const n=j(t);return c(n,e.length)},u:function(t,e){const n=t.getFullYear();return c(n,e.length)},Q:function(t,e,n){const r=Math.ceil((t.getMonth()+1)/3);switch(e){case"Q":return String(r);case"QQ":return c(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(t,e,n){const r=Math.ceil((t.getMonth()+1)/3);switch(e){case"q":return String(r);case"qq":return c(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(t,e,n){const r=t.getMonth();switch(e){case"M":case"MM":return y.M(t,e);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(t,e,n){const r=t.getMonth();switch(e){case"L":return String(r+1);case"LL":return c(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(t,e,n,r){const a=Lt(t,r);return e==="wo"?n.ordinalNumber(a,{unit:"week"}):c(a,e.length)},I:function(t,e,n){const r=qt(t);return e==="Io"?n.ordinalNumber(r,{unit:"week"}):c(r,e.length)},d:function(t,e,n){return e==="do"?n.ordinalNumber(t.getDate(),{unit:"date"}):y.d(t,e)},D:function(t,e,n){const r=Et(t);return e==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):c(r,e.length)},E:function(t,e,n){const r=t.getDay();switch(e){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(t,e,n,r){const a=t.getDay(),i=(a-r.weekStartsOn+8)%7||7;switch(e){case"e":return String(i);case"ee":return c(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(a,{width:"short",context:"formatting"});case"eeee":default:return n.day(a,{width:"wide",context:"formatting"})}},c:function(t,e,n,r){const a=t.getDay(),i=(a-r.weekStartsOn+8)%7||7;switch(e){case"c":return String(i);case"cc":return c(i,e.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(a,{width:"narrow",context:"standalone"});case"cccccc":return n.day(a,{width:"short",context:"standalone"});case"cccc":default:return n.day(a,{width:"wide",context:"standalone"})}},i:function(t,e,n){const r=t.getDay(),a=r===0?7:r;switch(e){case"i":return String(a);case"ii":return c(a,e.length);case"io":return n.ordinalNumber(a,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(t,e,n){const a=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},b:function(t,e,n){const r=t.getHours();let a;switch(r===12?a=M.noon:r===0?a=M.midnight:a=r/12>=1?"pm":"am",e){case"b":case"bb":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},B:function(t,e,n){const r=t.getHours();let a;switch(r>=17?a=M.evening:r>=12?a=M.afternoon:r>=4?a=M.morning:a=M.night,e){case"B":case"BB":case"BBB":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},h:function(t,e,n){if(e==="ho"){let r=t.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return y.h(t,e)},H:function(t,e,n){return e==="Ho"?n.ordinalNumber(t.getHours(),{unit:"hour"}):y.H(t,e)},K:function(t,e,n){const r=t.getHours()%12;return e==="Ko"?n.ordinalNumber(r,{unit:"hour"}):c(r,e.length)},k:function(t,e,n){let r=t.getHours();return r===0&&(r=24),e==="ko"?n.ordinalNumber(r,{unit:"hour"}):c(r,e.length)},m:function(t,e,n){return e==="mo"?n.ordinalNumber(t.getMinutes(),{unit:"minute"}):y.m(t,e)},s:function(t,e,n){return e==="so"?n.ordinalNumber(t.getSeconds(),{unit:"second"}):y.s(t,e)},S:function(t,e){return y.S(t,e)},X:function(t,e,n){const r=t.getTimezoneOffset();if(r===0)return"Z";switch(e){case"X":return L(r);case"XXXX":case"XX":return b(r);case"XXXXX":case"XXX":default:return b(r,":")}},x:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"x":return L(r);case"xxxx":case"xx":return b(r);case"xxxxx":case"xxx":default:return b(r,":")}},O:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+U(r,":");case"OOOO":default:return"GMT"+b(r,":")}},z:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+U(r,":");case"zzzz":default:return"GMT"+b(r,":")}},t:function(t,e,n){const r=Math.trunc(t.getTime()/1e3);return c(r,e.length)},T:function(t,e,n){const r=t.getTime();return c(r,e.length)}};function U(t,e=""){const n=t>0?"-":"+",r=Math.abs(t),a=Math.trunc(r/60),i=r%60;return i===0?n+String(a):n+String(a)+e+c(i,2)}function L(t,e){return t%60===0?(t>0?"-":"+")+c(Math.abs(t)/60,2):b(t,e)}function b(t,e=""){const n=t>0?"-":"+",r=Math.abs(t),a=c(Math.trunc(r/60),2),i=c(r%60,2);return n+a+e+i}const H=(t,e)=>{switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});case"PPPP":default:return e.date({width:"full"})}},X=(t,e)=>{switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});case"pppp":default:return e.time({width:"full"})}},Ht=(t,e)=>{const n=t.match(/(P+)(p+)?/)||[],r=n[1],a=n[2];if(!a)return H(t,e);let i;switch(r){case"P":i=e.dateTime({width:"short"});break;case"PP":i=e.dateTime({width:"medium"});break;case"PPP":i=e.dateTime({width:"long"});break;case"PPPP":default:i=e.dateTime({width:"full"});break}return i.replace("{{date}}",H(r,e)).replace("{{time}}",X(a,e))},At={p:X,P:Ht},It=/^D+$/,Rt=/^Y+$/,jt=["D","DD","YY","YYYY"];function Qt(t){return It.test(t)}function Xt(t){return Rt.test(t)}function Bt(t,e,n){const r=Gt(t,e,n);if(console.warn(r),jt.includes(t))throw new RangeError(r)}function Gt(t,e,n){const r=t[0]==="Y"?"years":"days of the month";return`Use \`${t.toLowerCase()}\` instead of \`${t}\` (in \`${e}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const $t=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,zt=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Vt=/^'([^]*?)'?$/,Jt=/''/g,Zt=/[a-zA-Z]/;function Kt(t,e,n){var f,g,l,k;const r=W(),a=r.locale??Ft,i=r.firstWeekContainsDate??((g=(f=r.locale)==null?void 0:f.options)==null?void 0:g.firstWeekContainsDate)??1,o=r.weekStartsOn??((k=(l=r.locale)==null?void 0:l.options)==null?void 0:k.weekStartsOn)??0,s=w(t);if(!tt(s))throw new RangeError("Invalid time value");let u=e.match(zt).map(m=>{const h=m[0];if(h==="p"||h==="P"){const Y=At[h];return Y(m,a.formatLong)}return m}).join("").match($t).map(m=>{if(m==="''")return{isToken:!1,value:"'"};const h=m[0];if(h==="'")return{isToken:!1,value:te(m)};if(q[h])return{isToken:!0,value:m};if(h.match(Zt))throw new RangeError("Format string contains an unescaped latin alphabet character `"+h+"`");return{isToken:!1,value:m}});a.localize.preprocessor&&(u=a.localize.preprocessor(s,u));const d={firstWeekContainsDate:i,weekStartsOn:o,locale:a};return u.map(m=>{if(!m.isToken)return m.value;const h=m.value;(Xt(h)||Qt(h))&&Bt(h,e,String(t));const Y=q[h[0]];return Y(s,h,a.localize,d)}).join("")}function te(t){const e=t.match(Vt);return e?e[1].replace(Jt,"'"):t}function B(t,e){const r=ae(t);let a;if(r.date){const u=ie(r.date,2);a=oe(u.restDateString,u.year)}if(!a||isNaN(a.getTime()))return new Date(NaN);const i=a.getTime();let o=0,s;if(r.time&&(o=se(r.time),isNaN(o)))return new Date(NaN);if(r.timezone){if(s=ue(r.timezone),isNaN(s))return new Date(NaN)}else{const u=new Date(i+o),d=new Date(0);return d.setFullYear(u.getUTCFullYear(),u.getUTCMonth(),u.getUTCDate()),d.setHours(u.getUTCHours(),u.getUTCMinutes(),u.getUTCSeconds(),u.getUTCMilliseconds()),d}return new Date(i+o+s)}const x={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},ee=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,ne=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,re=/^([+-])(\d{2})(?::?(\d{2}))?$/;function ae(t){const e={},n=t.split(x.dateTimeDelimiter);let r;if(n.length>2)return e;if(/:/.test(n[0])?r=n[0]:(e.date=n[0],r=n[1],x.timeZoneDelimiter.test(e.date)&&(e.date=t.split(x.timeZoneDelimiter)[0],r=t.substr(e.date.length,t.length))),r){const a=x.timezone.exec(r);a?(e.time=r.replace(a[1],""),e.timezone=a[1]):e.time=r}return e}function ie(t,e){const n=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+e)+"})|(\\d{2}|[+-]\\d{"+(2+e)+"})$)"),r=t.match(n);if(!r)return{year:NaN,restDateString:""};const a=r[1]?parseInt(r[1]):null,i=r[2]?parseInt(r[2]):null;return{year:i===null?a:i*100,restDateString:t.slice((r[1]||r[2]).length)}}function oe(t,e){if(e===null)return new Date(NaN);const n=t.match(ee);if(!n)return new Date(NaN);const r=!!n[4],a=p(n[1]),i=p(n[2])-1,o=p(n[3]),s=p(n[4]),u=p(n[5])-1;if(r)return he(e,s,u)?ce(e,s,u):new Date(NaN);{const d=new Date(0);return!le(e,i,o)||!fe(e,a)?new Date(NaN):(d.setUTCFullYear(e,i,Math.max(a,o)),d)}}function p(t){return t?parseInt(t):1}function se(t){const e=t.match(ne);if(!e)return NaN;const n=C(e[1]),r=C(e[2]),a=C(e[3]);return me(n,r,a)?n*R+r*I+a*1e3:NaN}function C(t){return t&&parseFloat(t.replace(",","."))||0}function ue(t){if(t==="Z")return 0;const e=t.match(re);if(!e)return 0;const n=e[1]==="+"?-1:1,r=parseInt(e[2]),a=e[3]&&parseInt(e[3])||0;return ge(r,a)?n*(r*R+a*I):NaN}function ce(t,e,n){const r=new Date(0);r.setUTCFullYear(t,0,4);const a=r.getUTCDay()||7,i=(e-1)*7+n+1-a;return r.setUTCDate(r.getUTCDate()+i),r}const de=[31,null,31,30,31,30,31,31,30,31,30,31];function G(t){return t%400===0||t%4===0&&t%100!==0}function le(t,e,n){return e>=0&&e<=11&&n>=1&&n<=(de[e]||(G(t)?29:28))}function fe(t,e){return e>=1&&e<=(G(t)?366:365)}function he(t,e,n){return e>=1&&e<=53&&n>=0&&n<=6}function me(t,e,n){return t===24?e===0&&n===0:n>=0&&n<60&&e>=0&&e<60&&t>=0&&t<25}function ge(t,e){return e>=0&&e<=59}const we={model:"models",dataset:"datasets",space:"spaces"};function ye(t){const e=t.hf_artifact_summary;return!e||!e.best_kind||!e.best_url||e.best_count<=0?{hfKind:null,hfCount:0,hfUrl:null}:{hfKind:we[e.best_kind]??null,hfCount:e.best_count,hfUrl:e.best_url}}function be(t){if(!t||t.length===0)return{github:null,githubUrl:null,velocity24h:null};const e=t.filter(a=>a.is_official),r=[...e.length>0?e:t].sort((a,i)=>(i.num_stars||0)-(a.num_stars||0))[0];return{github:r&&r.num_stars>0?r.num_stars:null,githubUrl:(r==null?void 0:r.url)||null,velocity24h:(r==null?void 0:r.trending_score)??null}}function De(t){if(!t)return null;try{const e=typeof t=="string"?B(t):t;return Kt(e,"MMM d, yyyy")}catch{return null}}function Me(t){if(!t)return null;try{return B(t).getFullYear()}catch{return null}}function ke(t){return(t||[]).filter(e=>e.best_rank>=1&&e.best_rank<=3).map(e=>{let n=null;if(e.dataset_slug){const r=new URLSearchParams;e.task_slug&&r.set("task",e.task_slug),r.set("eval",e.evaluation_id),n=`/benchmark/${e.dataset_slug}?${r}`}return{name:e.dataset_name,href:n,rank:e.best_rank}})}function ve(t){var f,g;const{github:e,githubUrl:n,velocity24h:r}=be(t.repositories),{hfKind:a,hfCount:i,hfUrl:o}=ye(t),s=(t.tasks||[]).map(l=>l.slug||"").filter(Boolean),u=(t.methods||[]).map(l=>({id:l.id,name:l.name,slug:l.slug})),d=ke(t.leaderboard_ranks);return{id:t.arxiv_id||t.id,dbId:t.id,title:t.title,abstract:t.abstract||"",authors:t.authors||[],authorIds:(t.author_links||[]).map(l=>l.id??null),authorHfProfiles:(t.author_links||[]).map(l=>l.hf_username?{username:l.hf_username,avatarUrl:l.hf_avatar_url??null}:null),tags:s,methods:u,organizations:(t.organizations||[]).map(l=>({name:l.name,slug:l.slug,logoUrl:_(l.logo_url)||null})),citations:t.citation_count||0,github:e,githubUrl:n,project:((g=(f=t.project_pages)==null?void 0:f[0])==null?void 0:g.url)||null,date:De(t.published),publishedIso:t.published||null,year:Me(t.published),thumbnailUrl:_(t.thumbnail_url)||null,tldr:t.tldr||null,version:t.version||"v1",velocity24h:r,hfKind:a,hfCount:i,hfUrl:o,sotaRanks:d}}function Oe(t){const e=$.get(t.toLowerCase());if(e)return e;const n=t.toUpperCase();return T.has(n)?n:t.replace(/[-_]+/g," ").replace(/\b\w/g,r=>r.toUpperCase())}const T=new Set(["3D","AI","OCR"]),$=new Map([["3d-tracking","3D Tracking"],["point-tracking","2D Point Tracking"],["3d-generation","3D generation"],["3d-understanding","3D understanding"],["3d-semantic-segmentation","3D semantic segmentation"],["3d-instance-segmentation","3D instance segmentation"],["3d-object-detection","3D object detection"],["text-to-sql","Text-to-SQL"]]);function xe(t,e){const n=t||Oe(e||""),r=$.get((e==null?void 0:e.toLowerCase())||Pe(n));if(r)return r;const a=e==null?void 0:e.toUpperCase(),i=n.toUpperCase();return/^[A-Z0-9][A-Z0-9-]{1,}$/.test(n)||a&&T.has(a)||T.has(i)?i:n.replace(/\b[A-Za-z0-9]+\b/g,s=>/^[A-Z0-9]{2,}$/.test(s)||T.has(s.toUpperCase())?s.toUpperCase():s.charAt(0).toUpperCase()+s.slice(1).toLowerCase())}function Pe(t){return t.trim().toLowerCase().replace(/[\s_]+/g,"-")}export{ke as a,xe as d,Oe as h,be as s,ve as t}; +import{a3 as _}from"./index-CHGpuh10.js";function w(t){const e=Object.prototype.toString.call(t);return t instanceof Date||typeof t=="object"&&e==="[object Date]"?new t.constructor(+t):typeof t=="number"||e==="[object Number]"||typeof t=="string"||e==="[object String]"?new Date(t):new Date(NaN)}function D(t,e){return t instanceof Date?new t.constructor(e):new Date(e)}const A=6048e5,z=864e5,I=6e4,R=36e5;let V={};function W(){return V}function v(t,e){var s,u,d,f;const n=W(),r=(e==null?void 0:e.weekStartsOn)??((u=(s=e==null?void 0:e.locale)==null?void 0:s.options)==null?void 0:u.weekStartsOn)??n.weekStartsOn??((f=(d=n.locale)==null?void 0:d.options)==null?void 0:f.weekStartsOn)??0,a=w(t),i=a.getDay(),o=(i=a.getTime()?n+1:e.getTime()>=o.getTime()?n:n-1}function F(t){const e=w(t);return e.setHours(0,0,0,0),e}function E(t){const e=w(t),n=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return n.setUTCFullYear(e.getFullYear()),+t-+n}function J(t,e){const n=F(t),r=F(e),a=+n-E(n),i=+r-E(r);return Math.round((a-i)/z)}function Z(t){const e=j(t),n=D(t,0);return n.setFullYear(e,0,4),n.setHours(0,0,0,0),S(n)}function K(t){return t instanceof Date||typeof t=="object"&&Object.prototype.toString.call(t)==="[object Date]"}function tt(t){if(!K(t)&&typeof t!="number")return!1;const e=w(t);return!isNaN(Number(e))}function et(t){const e=w(t),n=D(t,0);return n.setFullYear(e.getFullYear(),0,1),n.setHours(0,0,0,0),n}const nt={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},rt=(t,e,n)=>{let r;const a=nt[t];return typeof a=="string"?r=a:e===1?r=a.one:r=a.other.replace("{{count}}",e.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function N(t){return(e={})=>{const n=e.width?String(e.width):t.defaultWidth;return t.formats[n]||t.formats[t.defaultWidth]}}const at={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},it={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},ot={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},st={date:N({formats:at,defaultWidth:"full"}),time:N({formats:it,defaultWidth:"full"}),dateTime:N({formats:ot,defaultWidth:"full"})},ut={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},ct=(t,e,n,r)=>ut[t];function O(t){return(e,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let a;if(r==="formatting"&&t.formattingValues){const o=t.defaultFormattingWidth||t.defaultWidth,s=n!=null&&n.width?String(n.width):o;a=t.formattingValues[s]||t.formattingValues[o]}else{const o=t.defaultWidth,s=n!=null&&n.width?String(n.width):t.defaultWidth;a=t.values[s]||t.values[o]}const i=t.argumentCallback?t.argumentCallback(e):e;return a[i]}}const dt={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},lt={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},ft={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},ht={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},mt={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},gt={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},wt=(t,e)=>{const n=Number(t),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},yt={ordinalNumber:wt,era:O({values:dt,defaultWidth:"wide"}),quarter:O({values:lt,defaultWidth:"wide",argumentCallback:t=>t-1}),month:O({values:ft,defaultWidth:"wide"}),day:O({values:ht,defaultWidth:"wide"}),dayPeriod:O({values:mt,defaultWidth:"wide",formattingValues:gt,defaultFormattingWidth:"wide"})};function P(t){return(e,n={})=>{const r=n.width,a=r&&t.matchPatterns[r]||t.matchPatterns[t.defaultMatchWidth],i=e.match(a);if(!i)return null;const o=i[0],s=r&&t.parsePatterns[r]||t.parsePatterns[t.defaultParseWidth],u=Array.isArray(s)?Dt(s,g=>g.test(o)):bt(s,g=>g.test(o));let d;d=t.valueCallback?t.valueCallback(u):u,d=n.valueCallback?n.valueCallback(d):d;const f=e.slice(o.length);return{value:d,rest:f}}}function bt(t,e){for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&e(t[n]))return n}function Dt(t,e){for(let n=0;n{const r=e.match(t.matchPattern);if(!r)return null;const a=r[0],i=e.match(t.parsePattern);if(!i)return null;let o=t.valueCallback?t.valueCallback(i[0]):i[0];o=n.valueCallback?n.valueCallback(o):o;const s=e.slice(a.length);return{value:o,rest:s}}}const kt=/^(\d+)(th|st|nd|rd)?/i,Ot=/\d+/i,Pt={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},pt={any:[/^b/i,/^(a|c)/i]},vt={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},xt={any:[/1/i,/2/i,/3/i,/4/i]},Tt={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},St={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},Wt={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Yt={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},Nt={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Ct={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},_t={ordinalNumber:Mt({matchPattern:kt,parsePattern:Ot,valueCallback:t=>parseInt(t,10)}),era:P({matchPatterns:Pt,defaultMatchWidth:"wide",parsePatterns:pt,defaultParseWidth:"any"}),quarter:P({matchPatterns:vt,defaultMatchWidth:"wide",parsePatterns:xt,defaultParseWidth:"any",valueCallback:t=>t+1}),month:P({matchPatterns:Tt,defaultMatchWidth:"wide",parsePatterns:St,defaultParseWidth:"any"}),day:P({matchPatterns:Wt,defaultMatchWidth:"wide",parsePatterns:Yt,defaultParseWidth:"any"}),dayPeriod:P({matchPatterns:Nt,defaultMatchWidth:"any",parsePatterns:Ct,defaultParseWidth:"any"})},Ft={code:"en-US",formatDistance:rt,formatLong:st,formatRelative:ct,localize:yt,match:_t,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Et(t){const e=w(t);return J(e,et(e))+1}function qt(t){const e=w(t),n=+S(e)-+Z(e);return Math.round(n/A)+1}function Q(t,e){var f,g,l,k;const n=w(t),r=n.getFullYear(),a=W(),i=(e==null?void 0:e.firstWeekContainsDate)??((g=(f=e==null?void 0:e.locale)==null?void 0:f.options)==null?void 0:g.firstWeekContainsDate)??a.firstWeekContainsDate??((k=(l=a.locale)==null?void 0:l.options)==null?void 0:k.firstWeekContainsDate)??1,o=D(t,0);o.setFullYear(r+1,0,i),o.setHours(0,0,0,0);const s=v(o,e),u=D(t,0);u.setFullYear(r,0,i),u.setHours(0,0,0,0);const d=v(u,e);return n.getTime()>=s.getTime()?r+1:n.getTime()>=d.getTime()?r:r-1}function Ut(t,e){var s,u,d,f;const n=W(),r=(e==null?void 0:e.firstWeekContainsDate)??((u=(s=e==null?void 0:e.locale)==null?void 0:s.options)==null?void 0:u.firstWeekContainsDate)??n.firstWeekContainsDate??((f=(d=n.locale)==null?void 0:d.options)==null?void 0:f.firstWeekContainsDate)??1,a=Q(t,e),i=D(t,0);return i.setFullYear(a,0,r),i.setHours(0,0,0,0),v(i,e)}function Lt(t,e){const n=w(t),r=+v(n,e)-+Ut(n,e);return Math.round(r/A)+1}function c(t,e){const n=t<0?"-":"",r=Math.abs(t).toString().padStart(e,"0");return n+r}const y={y(t,e){const n=t.getFullYear(),r=n>0?n:1-n;return c(e==="yy"?r%100:r,e.length)},M(t,e){const n=t.getMonth();return e==="M"?String(n+1):c(n+1,2)},d(t,e){return c(t.getDate(),e.length)},a(t,e){const n=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(t,e){return c(t.getHours()%12||12,e.length)},H(t,e){return c(t.getHours(),e.length)},m(t,e){return c(t.getMinutes(),e.length)},s(t,e){return c(t.getSeconds(),e.length)},S(t,e){const n=e.length,r=t.getMilliseconds(),a=Math.trunc(r*Math.pow(10,n-3));return c(a,e.length)}},M={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},q={G:function(t,e,n){const r=t.getFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(t,e,n){if(e==="yo"){const r=t.getFullYear(),a=r>0?r:1-r;return n.ordinalNumber(a,{unit:"year"})}return y.y(t,e)},Y:function(t,e,n,r){const a=Q(t,r),i=a>0?a:1-a;if(e==="YY"){const o=i%100;return c(o,2)}return e==="Yo"?n.ordinalNumber(i,{unit:"year"}):c(i,e.length)},R:function(t,e){const n=j(t);return c(n,e.length)},u:function(t,e){const n=t.getFullYear();return c(n,e.length)},Q:function(t,e,n){const r=Math.ceil((t.getMonth()+1)/3);switch(e){case"Q":return String(r);case"QQ":return c(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(t,e,n){const r=Math.ceil((t.getMonth()+1)/3);switch(e){case"q":return String(r);case"qq":return c(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(t,e,n){const r=t.getMonth();switch(e){case"M":case"MM":return y.M(t,e);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(t,e,n){const r=t.getMonth();switch(e){case"L":return String(r+1);case"LL":return c(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(t,e,n,r){const a=Lt(t,r);return e==="wo"?n.ordinalNumber(a,{unit:"week"}):c(a,e.length)},I:function(t,e,n){const r=qt(t);return e==="Io"?n.ordinalNumber(r,{unit:"week"}):c(r,e.length)},d:function(t,e,n){return e==="do"?n.ordinalNumber(t.getDate(),{unit:"date"}):y.d(t,e)},D:function(t,e,n){const r=Et(t);return e==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):c(r,e.length)},E:function(t,e,n){const r=t.getDay();switch(e){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(t,e,n,r){const a=t.getDay(),i=(a-r.weekStartsOn+8)%7||7;switch(e){case"e":return String(i);case"ee":return c(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(a,{width:"short",context:"formatting"});case"eeee":default:return n.day(a,{width:"wide",context:"formatting"})}},c:function(t,e,n,r){const a=t.getDay(),i=(a-r.weekStartsOn+8)%7||7;switch(e){case"c":return String(i);case"cc":return c(i,e.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(a,{width:"narrow",context:"standalone"});case"cccccc":return n.day(a,{width:"short",context:"standalone"});case"cccc":default:return n.day(a,{width:"wide",context:"standalone"})}},i:function(t,e,n){const r=t.getDay(),a=r===0?7:r;switch(e){case"i":return String(a);case"ii":return c(a,e.length);case"io":return n.ordinalNumber(a,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(t,e,n){const a=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},b:function(t,e,n){const r=t.getHours();let a;switch(r===12?a=M.noon:r===0?a=M.midnight:a=r/12>=1?"pm":"am",e){case"b":case"bb":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},B:function(t,e,n){const r=t.getHours();let a;switch(r>=17?a=M.evening:r>=12?a=M.afternoon:r>=4?a=M.morning:a=M.night,e){case"B":case"BB":case"BBB":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},h:function(t,e,n){if(e==="ho"){let r=t.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return y.h(t,e)},H:function(t,e,n){return e==="Ho"?n.ordinalNumber(t.getHours(),{unit:"hour"}):y.H(t,e)},K:function(t,e,n){const r=t.getHours()%12;return e==="Ko"?n.ordinalNumber(r,{unit:"hour"}):c(r,e.length)},k:function(t,e,n){let r=t.getHours();return r===0&&(r=24),e==="ko"?n.ordinalNumber(r,{unit:"hour"}):c(r,e.length)},m:function(t,e,n){return e==="mo"?n.ordinalNumber(t.getMinutes(),{unit:"minute"}):y.m(t,e)},s:function(t,e,n){return e==="so"?n.ordinalNumber(t.getSeconds(),{unit:"second"}):y.s(t,e)},S:function(t,e){return y.S(t,e)},X:function(t,e,n){const r=t.getTimezoneOffset();if(r===0)return"Z";switch(e){case"X":return L(r);case"XXXX":case"XX":return b(r);case"XXXXX":case"XXX":default:return b(r,":")}},x:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"x":return L(r);case"xxxx":case"xx":return b(r);case"xxxxx":case"xxx":default:return b(r,":")}},O:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+U(r,":");case"OOOO":default:return"GMT"+b(r,":")}},z:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+U(r,":");case"zzzz":default:return"GMT"+b(r,":")}},t:function(t,e,n){const r=Math.trunc(t.getTime()/1e3);return c(r,e.length)},T:function(t,e,n){const r=t.getTime();return c(r,e.length)}};function U(t,e=""){const n=t>0?"-":"+",r=Math.abs(t),a=Math.trunc(r/60),i=r%60;return i===0?n+String(a):n+String(a)+e+c(i,2)}function L(t,e){return t%60===0?(t>0?"-":"+")+c(Math.abs(t)/60,2):b(t,e)}function b(t,e=""){const n=t>0?"-":"+",r=Math.abs(t),a=c(Math.trunc(r/60),2),i=c(r%60,2);return n+a+e+i}const H=(t,e)=>{switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});case"PPPP":default:return e.date({width:"full"})}},X=(t,e)=>{switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});case"pppp":default:return e.time({width:"full"})}},Ht=(t,e)=>{const n=t.match(/(P+)(p+)?/)||[],r=n[1],a=n[2];if(!a)return H(t,e);let i;switch(r){case"P":i=e.dateTime({width:"short"});break;case"PP":i=e.dateTime({width:"medium"});break;case"PPP":i=e.dateTime({width:"long"});break;case"PPPP":default:i=e.dateTime({width:"full"});break}return i.replace("{{date}}",H(r,e)).replace("{{time}}",X(a,e))},At={p:X,P:Ht},It=/^D+$/,Rt=/^Y+$/,jt=["D","DD","YY","YYYY"];function Qt(t){return It.test(t)}function Xt(t){return Rt.test(t)}function Bt(t,e,n){const r=Gt(t,e,n);if(console.warn(r),jt.includes(t))throw new RangeError(r)}function Gt(t,e,n){const r=t[0]==="Y"?"years":"days of the month";return`Use \`${t.toLowerCase()}\` instead of \`${t}\` (in \`${e}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const $t=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,zt=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Vt=/^'([^]*?)'?$/,Jt=/''/g,Zt=/[a-zA-Z]/;function Kt(t,e,n){var f,g,l,k;const r=W(),a=r.locale??Ft,i=r.firstWeekContainsDate??((g=(f=r.locale)==null?void 0:f.options)==null?void 0:g.firstWeekContainsDate)??1,o=r.weekStartsOn??((k=(l=r.locale)==null?void 0:l.options)==null?void 0:k.weekStartsOn)??0,s=w(t);if(!tt(s))throw new RangeError("Invalid time value");let u=e.match(zt).map(m=>{const h=m[0];if(h==="p"||h==="P"){const Y=At[h];return Y(m,a.formatLong)}return m}).join("").match($t).map(m=>{if(m==="''")return{isToken:!1,value:"'"};const h=m[0];if(h==="'")return{isToken:!1,value:te(m)};if(q[h])return{isToken:!0,value:m};if(h.match(Zt))throw new RangeError("Format string contains an unescaped latin alphabet character `"+h+"`");return{isToken:!1,value:m}});a.localize.preprocessor&&(u=a.localize.preprocessor(s,u));const d={firstWeekContainsDate:i,weekStartsOn:o,locale:a};return u.map(m=>{if(!m.isToken)return m.value;const h=m.value;(Xt(h)||Qt(h))&&Bt(h,e,String(t));const Y=q[h[0]];return Y(s,h,a.localize,d)}).join("")}function te(t){const e=t.match(Vt);return e?e[1].replace(Jt,"'"):t}function B(t,e){const r=ae(t);let a;if(r.date){const u=ie(r.date,2);a=oe(u.restDateString,u.year)}if(!a||isNaN(a.getTime()))return new Date(NaN);const i=a.getTime();let o=0,s;if(r.time&&(o=se(r.time),isNaN(o)))return new Date(NaN);if(r.timezone){if(s=ue(r.timezone),isNaN(s))return new Date(NaN)}else{const u=new Date(i+o),d=new Date(0);return d.setFullYear(u.getUTCFullYear(),u.getUTCMonth(),u.getUTCDate()),d.setHours(u.getUTCHours(),u.getUTCMinutes(),u.getUTCSeconds(),u.getUTCMilliseconds()),d}return new Date(i+o+s)}const x={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},ee=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,ne=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,re=/^([+-])(\d{2})(?::?(\d{2}))?$/;function ae(t){const e={},n=t.split(x.dateTimeDelimiter);let r;if(n.length>2)return e;if(/:/.test(n[0])?r=n[0]:(e.date=n[0],r=n[1],x.timeZoneDelimiter.test(e.date)&&(e.date=t.split(x.timeZoneDelimiter)[0],r=t.substr(e.date.length,t.length))),r){const a=x.timezone.exec(r);a?(e.time=r.replace(a[1],""),e.timezone=a[1]):e.time=r}return e}function ie(t,e){const n=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+e)+"})|(\\d{2}|[+-]\\d{"+(2+e)+"})$)"),r=t.match(n);if(!r)return{year:NaN,restDateString:""};const a=r[1]?parseInt(r[1]):null,i=r[2]?parseInt(r[2]):null;return{year:i===null?a:i*100,restDateString:t.slice((r[1]||r[2]).length)}}function oe(t,e){if(e===null)return new Date(NaN);const n=t.match(ee);if(!n)return new Date(NaN);const r=!!n[4],a=p(n[1]),i=p(n[2])-1,o=p(n[3]),s=p(n[4]),u=p(n[5])-1;if(r)return he(e,s,u)?ce(e,s,u):new Date(NaN);{const d=new Date(0);return!le(e,i,o)||!fe(e,a)?new Date(NaN):(d.setUTCFullYear(e,i,Math.max(a,o)),d)}}function p(t){return t?parseInt(t):1}function se(t){const e=t.match(ne);if(!e)return NaN;const n=C(e[1]),r=C(e[2]),a=C(e[3]);return me(n,r,a)?n*R+r*I+a*1e3:NaN}function C(t){return t&&parseFloat(t.replace(",","."))||0}function ue(t){if(t==="Z")return 0;const e=t.match(re);if(!e)return 0;const n=e[1]==="+"?-1:1,r=parseInt(e[2]),a=e[3]&&parseInt(e[3])||0;return ge(r,a)?n*(r*R+a*I):NaN}function ce(t,e,n){const r=new Date(0);r.setUTCFullYear(t,0,4);const a=r.getUTCDay()||7,i=(e-1)*7+n+1-a;return r.setUTCDate(r.getUTCDate()+i),r}const de=[31,null,31,30,31,30,31,31,30,31,30,31];function G(t){return t%400===0||t%4===0&&t%100!==0}function le(t,e,n){return e>=0&&e<=11&&n>=1&&n<=(de[e]||(G(t)?29:28))}function fe(t,e){return e>=1&&e<=(G(t)?366:365)}function he(t,e,n){return e>=1&&e<=53&&n>=0&&n<=6}function me(t,e,n){return t===24?e===0&&n===0:n>=0&&n<60&&e>=0&&e<60&&t>=0&&t<25}function ge(t,e){return e>=0&&e<=59}const we={model:"models",dataset:"datasets",space:"spaces"};function ye(t){const e=t.hf_artifact_summary;return!e||!e.best_kind||!e.best_url||e.best_count<=0?{hfKind:null,hfCount:0,hfUrl:null}:{hfKind:we[e.best_kind]??null,hfCount:e.best_count,hfUrl:e.best_url}}function be(t){if(!t||t.length===0)return{github:null,githubUrl:null,velocity24h:null};const e=t.filter(a=>a.is_official),r=[...e.length>0?e:t].sort((a,i)=>(i.num_stars||0)-(a.num_stars||0))[0];return{github:r&&r.num_stars>0?r.num_stars:null,githubUrl:(r==null?void 0:r.url)||null,velocity24h:(r==null?void 0:r.trending_score)??null}}function De(t){if(!t)return null;try{const e=typeof t=="string"?B(t):t;return Kt(e,"MMM d, yyyy")}catch{return null}}function Me(t){if(!t)return null;try{return B(t).getFullYear()}catch{return null}}function ke(t){return(t||[]).filter(e=>e.best_rank>=1&&e.best_rank<=3).map(e=>{let n=null;if(e.dataset_slug){const r=new URLSearchParams;e.task_slug&&r.set("task",e.task_slug),r.set("eval",e.evaluation_id),n=`/benchmark/${e.dataset_slug}?${r}`}return{name:e.dataset_name,href:n,rank:e.best_rank}})}function ve(t){var f,g;const{github:e,githubUrl:n,velocity24h:r}=be(t.repositories),{hfKind:a,hfCount:i,hfUrl:o}=ye(t),s=(t.tasks||[]).map(l=>l.slug||"").filter(Boolean),u=(t.methods||[]).map(l=>({id:l.id,name:l.name,slug:l.slug})),d=ke(t.leaderboard_ranks);return{id:t.arxiv_id||t.id,dbId:t.id,title:t.title,abstract:t.abstract||"",authors:t.authors||[],authorIds:(t.author_links||[]).map(l=>l.id??null),authorHfProfiles:(t.author_links||[]).map(l=>l.hf_username?{username:l.hf_username,avatarUrl:l.hf_avatar_url??null}:null),tags:s,methods:u,organizations:(t.organizations||[]).map(l=>({name:l.name,slug:l.slug,logoUrl:_(l.logo_url)||null})),citations:t.citation_count||0,github:e,githubUrl:n,project:((g=(f=t.project_pages)==null?void 0:f[0])==null?void 0:g.url)||null,date:De(t.published),publishedIso:t.published||null,year:Me(t.published),thumbnailUrl:_(t.thumbnail_url)||null,tldr:t.tldr||null,version:t.version||"v1",velocity24h:r,hfKind:a,hfCount:i,hfUrl:o,sotaRanks:d}}function Oe(t){const e=$.get(t.toLowerCase());if(e)return e;const n=t.toUpperCase();return T.has(n)?n:t.replace(/[-_]+/g," ").replace(/\b\w/g,r=>r.toUpperCase())}const T=new Set(["3D","AI","OCR"]),$=new Map([["3d-tracking","3D Tracking"],["point-tracking","2D Point Tracking"],["3d-generation","3D generation"],["3d-understanding","3D understanding"],["3d-semantic-segmentation","3D semantic segmentation"],["3d-instance-segmentation","3D instance segmentation"],["3d-object-detection","3D object detection"],["text-to-sql","Text-to-SQL"]]);function xe(t,e){const n=t||Oe(e||""),r=$.get((e==null?void 0:e.toLowerCase())||Pe(n));if(r)return r;const a=e==null?void 0:e.toUpperCase(),i=n.toUpperCase();return/^[A-Z0-9][A-Z0-9-]{1,}$/.test(n)||a&&T.has(a)||T.has(i)?i:n.replace(/\b[A-Za-z0-9]+\b/g,s=>/^[A-Z0-9]{2,}$/.test(s)||T.has(s.toUpperCase())?s.toUpperCase():s.charAt(0).toUpperCase()+s.slice(1).toLowerCase())}function Pe(t){return t.trim().toLowerCase().replace(/[\s_]+/g,"-")}export{ke as a,xe as d,Oe as h,be as s,ve as t}; diff --git a/assets/trending-up-BMb-8Pi8.js b/assets/trending-up-Cqe6Lpc9.js similarity index 88% rename from assets/trending-up-BMb-8Pi8.js rename to assets/trending-up-Cqe6Lpc9.js index 2469bd91d90561b4eda4a398503717bf522c5eb4..26315a22d44fb640a5652b5da8bc959f76520e92 100644 --- a/assets/trending-up-BMb-8Pi8.js +++ b/assets/trending-up-Cqe6Lpc9.js @@ -1,4 +1,4 @@ -import{s as e}from"./index-CjdUkE4w.js";/** +import{s as e}from"./index-CHGpuh10.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/triangle-alert-DF8Mdy0J.js b/assets/triangle-alert-nsUjBiKf.js similarity index 94% rename from assets/triangle-alert-DF8Mdy0J.js rename to assets/triangle-alert-nsUjBiKf.js index 37e2d0515d7e5e9683993ef92bc4e1115022c27a..ec3d1613745cc73fa40eb35bf8f87673fea081d3 100644 --- a/assets/triangle-alert-DF8Mdy0J.js +++ b/assets/triangle-alert-nsUjBiKf.js @@ -1,4 +1,4 @@ -import{s as e}from"./index-CjdUkE4w.js";/** +import{s as e}from"./index-CHGpuh10.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/trophy-BQy3NGXy.js b/assets/trophy-BFUARFPy.js similarity index 93% rename from assets/trophy-BQy3NGXy.js rename to assets/trophy-BFUARFPy.js index 2f29d009aef8ce3aa1bbe72d37294790aaa37b11..74513ad5c3bd91c6ba8783e5e3c4eed3adab8e15 100644 --- a/assets/trophy-BQy3NGXy.js +++ b/assets/trophy-BFUARFPy.js @@ -1,4 +1,4 @@ -import{s as a}from"./index-CjdUkE4w.js";/** +import{s as a}from"./index-CHGpuh10.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/useDebounce-wGQ3PIQd.js b/assets/useDebounce-ifvvHuBF.js similarity index 66% rename from assets/useDebounce-wGQ3PIQd.js rename to assets/useDebounce-ifvvHuBF.js index 3fc6754730d303847ad181ab09f16bdfdbbe495d..4cd32c11f5ac51dc4af31a21d5f5b7fb7d4b8779 100644 --- a/assets/useDebounce-wGQ3PIQd.js +++ b/assets/useDebounce-ifvvHuBF.js @@ -1 +1 @@ -import{d as o}from"./index-CjdUkE4w.js";function s(e,t=300){const[r,u]=o.useState(e);return o.useEffect(()=>{const c=setTimeout(()=>u(e),t);return()=>clearTimeout(c)},[e,t]),r}export{s as u}; +import{d as o}from"./index-CHGpuh10.js";function s(e,t=300){const[r,u]=o.useState(e);return o.useEffect(()=>{const c=setTimeout(()=>u(e),t);return()=>clearTimeout(c)},[e,t]),r}export{s as u}; diff --git a/assets/useDocumentTitle-2Ho8_KfW.js b/assets/useDocumentTitle-Deu479Zd.js similarity index 96% rename from assets/useDocumentTitle-2Ho8_KfW.js rename to assets/useDocumentTitle-Deu479Zd.js index 68f70b2605ca57007b93453f868fa8bc570e0568..dc8111e4fe16b8585f5b567b77f5e78cf7391eef 100644 --- a/assets/useDocumentTitle-2Ho8_KfW.js +++ b/assets/useDocumentTitle-Deu479Zd.js @@ -1 +1 @@ -import{d as s}from"./index-CjdUkE4w.js";const E={a:"á",e:"é",i:"í",o:"ó",u:"ú",y:"ý",A:"Á",E:"É",I:"Í",O:"Ó",U:"Ú",Y:"Ý"},p={a:"à",e:"è",i:"ì",o:"ò",u:"ù",A:"À",E:"È",I:"Ì",O:"Ò",U:"Ù"},u={a:"â",e:"ê",i:"î",o:"ô",u:"û",A:"Â",E:"Ê",I:"Î",O:"Ô",U:"Û"},_={a:"ä",e:"ë",i:"ï",o:"ö",u:"ü",y:"ÿ",A:"Ä",E:"Ë",I:"Ï",O:"Ö",U:"Ü",Y:"Ÿ"},T={"'":E,"`":p,"^":u,'"':_,"~":{n:"ñ",N:"Ñ"}},i={ss:"ß",ae:"æ",AE:"Æ",oe:"œ",OE:"Œ",o:"ø",O:"Ø",l:"ł",L:"Ł"},m=[["varphi","φ"],["varepsilon","ε"],["vartheta","ϑ"],["Gamma","Γ"],["Delta","Δ"],["Theta","Θ"],["Lambda","Λ"],["Sigma","Σ"],["Omega","Ω"],["alpha","α"],["beta","β"],["gamma","γ"],["delta","δ"],["epsilon","ε"],["zeta","ζ"],["eta","η"],["theta","θ"],["kappa","κ"],["lambda","λ"],["mu","μ"],["nu","ν"],["xi","ξ"],["pi","π"],["rho","ρ"],["sigma","σ"],["tau","τ"],["phi","φ"],["chi","χ"],["psi","ψ"],["omega","ω"]],L=/\\(?:textbf|mathbf|emph|textit|textsl|texttt|color|textcolor)\{([^{}]*)\}/g,f=/\\(['"`^~])([A-Za-z])/g,C=/\\c\{([cCsS])\}/g,M=new RegExp(`\\\\(${Object.keys(i).join("|")})(?![A-Za-z])`,"g"),g=/\$\$([^$]+)\$\$/g,O=/\$([^$]+)\$/g,$=/\\([A-Za-z]+)/g;function o(e,t,a){return e.split(t).join(a)}function r(e){let t=e.trim();for(const[a,n]of m)t=o(t,`\\${a}`,n);return t=t.replace($,(a,n)=>n),o(t,"$","")}function h(e){let t=e.replace(g,(a,n)=>r(n));return t=t.replace(O,(a,n)=>r(n)),o(t,"$","")}function D(e){if(!e)return e;let t=e.replace(L,"$1");return t=t.replace(C,(a,n)=>({c:"ç",C:"Ç"})[n]??a),t=t.replace(f,(a,n,A)=>{var c;return((c=T[n])==null?void 0:c[A])??a}),t=t.replace(M,(a,n)=>i[n]??a),t=h(t),o(t,"~"," ")}const l="Papers with Code";function I(e,t=l){return`${D(e.trim())||"Paper"} | ${t}`}function R(e,{restorePrevious:t=!1}={}){s.useEffect(()=>{if(!e)return;const a=document.title;return document.title=e,()=>{document.title=t?a:l}},[e,t])}export{I as f,R as u}; +import{d as s}from"./index-CHGpuh10.js";const E={a:"á",e:"é",i:"í",o:"ó",u:"ú",y:"ý",A:"Á",E:"É",I:"Í",O:"Ó",U:"Ú",Y:"Ý"},p={a:"à",e:"è",i:"ì",o:"ò",u:"ù",A:"À",E:"È",I:"Ì",O:"Ò",U:"Ù"},u={a:"â",e:"ê",i:"î",o:"ô",u:"û",A:"Â",E:"Ê",I:"Î",O:"Ô",U:"Û"},_={a:"ä",e:"ë",i:"ï",o:"ö",u:"ü",y:"ÿ",A:"Ä",E:"Ë",I:"Ï",O:"Ö",U:"Ü",Y:"Ÿ"},T={"'":E,"`":p,"^":u,'"':_,"~":{n:"ñ",N:"Ñ"}},i={ss:"ß",ae:"æ",AE:"Æ",oe:"œ",OE:"Œ",o:"ø",O:"Ø",l:"ł",L:"Ł"},m=[["varphi","φ"],["varepsilon","ε"],["vartheta","ϑ"],["Gamma","Γ"],["Delta","Δ"],["Theta","Θ"],["Lambda","Λ"],["Sigma","Σ"],["Omega","Ω"],["alpha","α"],["beta","β"],["gamma","γ"],["delta","δ"],["epsilon","ε"],["zeta","ζ"],["eta","η"],["theta","θ"],["kappa","κ"],["lambda","λ"],["mu","μ"],["nu","ν"],["xi","ξ"],["pi","π"],["rho","ρ"],["sigma","σ"],["tau","τ"],["phi","φ"],["chi","χ"],["psi","ψ"],["omega","ω"]],L=/\\(?:textbf|mathbf|emph|textit|textsl|texttt|color|textcolor)\{([^{}]*)\}/g,f=/\\(['"`^~])([A-Za-z])/g,C=/\\c\{([cCsS])\}/g,M=new RegExp(`\\\\(${Object.keys(i).join("|")})(?![A-Za-z])`,"g"),g=/\$\$([^$]+)\$\$/g,O=/\$([^$]+)\$/g,$=/\\([A-Za-z]+)/g;function o(e,t,a){return e.split(t).join(a)}function r(e){let t=e.trim();for(const[a,n]of m)t=o(t,`\\${a}`,n);return t=t.replace($,(a,n)=>n),o(t,"$","")}function h(e){let t=e.replace(g,(a,n)=>r(n));return t=t.replace(O,(a,n)=>r(n)),o(t,"$","")}function D(e){if(!e)return e;let t=e.replace(L,"$1");return t=t.replace(C,(a,n)=>({c:"ç",C:"Ç"})[n]??a),t=t.replace(f,(a,n,A)=>{var c;return((c=T[n])==null?void 0:c[A])??a}),t=t.replace(M,(a,n)=>i[n]??a),t=h(t),o(t,"~"," ")}const l="Papers with Code";function I(e,t=l){return`${D(e.trim())||"Paper"} | ${t}`}function R(e,{restorePrevious:t=!1}={}){s.useEffect(()=>{if(!e)return;const a=document.title;return document.title=e,()=>{document.title=t?a:l}},[e,t])}export{I as f,R as u}; diff --git a/assets/useHashScrollOnReady-mScSLUem.js b/assets/useHashScrollOnReady-BOZxHdDU.js similarity index 90% rename from assets/useHashScrollOnReady-mScSLUem.js rename to assets/useHashScrollOnReady-BOZxHdDU.js index 6a5a8705af39f581da4ab7a293fdc4c335159a49..742b8c2fd58709dbc27708236bd0e49efec96f16 100644 --- a/assets/useHashScrollOnReady-mScSLUem.js +++ b/assets/useHashScrollOnReady-BOZxHdDU.js @@ -1 +1 @@ -import{j as s,L as h,d as x}from"./index-CjdUkE4w.js";import{S as p}from"./skeleton-DTWi7Ctg.js";import{A as j,a as m}from"./alert-BM9Xfuyy.js";import{T as d}from"./trending-up-BMb-8Pi8.js";const y=({noun:n,items:e,recentDays:i=30,baselineDays:l=180,isLoading:o,error:t,mono:c})=>!o&&!t&&!(e!=null&&e.length)?null:s.jsxs("section",{id:"trending",className:"taxonomy-trending","aria-label":`Trending ${n}s`,children:[s.jsxs("div",{className:"taxonomy-trending-header",children:[s.jsxs("h2",{children:[s.jsx(d,{size:22,"aria-hidden":"true"}),"Trending"]}),s.jsxs("p",{className:"taxonomy-trending-note",children:[n==="task"?"Tasks":"Methods"," across all areas whose share of papers in the last ",i," days grew the most against the preceding ",l," days."]})]}),t?s.jsx(j,{variant:"destructive",children:s.jsxs(m,{children:["Failed to load trending ",n,"s."]})}):o?s.jsx("div",{className:"tag-grid",children:Array.from({length:6}).map((a,r)=>s.jsx(p,{className:"h-20"},r))}):s.jsx("div",{className:"tag-grid",children:e==null?void 0:e.map((a,r)=>s.jsxs(h,{to:a.href,className:"tag-cell",children:[s.jsxs("div",{className:"name",style:c?{fontFamily:"var(--mono)",fontSize:15}:void 0,children:[s.jsx("span",{className:"taxonomy-trending-rank",children:r+1}),a.icon&&s.jsx("span",{className:"task-icon",style:{color:a.iconColor},children:s.jsx(a.icon,{size:16,strokeWidth:2,"aria-hidden":"true"})}),a.name]}),s.jsxs("div",{className:"meta taxonomy-trending-meta",children:[a.areaName&&s.jsxs(s.Fragment,{children:[s.jsx("span",{children:a.areaName}),s.jsx("span",{children:"·"})]}),s.jsxs("span",{children:[a.recentPaperCount.toLocaleString()," papers / ",i,"d"]}),s.jsx("span",{children:"·"}),s.jsxs("span",{className:"method-trend-score taxonomy-trending-lift",title:`Share of recent papers is ${a.shareLift.toFixed(1)}× its baseline share`,children:[s.jsx(d,{size:12,"aria-hidden":"true"}),a.shareLift.toFixed(1),"×"]})]})]},a.id))})]});function v(n){x.useEffect(()=>{var e;!n||!window.location.hash||(e=document.getElementById(window.location.hash.slice(1)))==null||e.scrollIntoView({block:"start"})},[n])}export{y as T,v as u}; +import{j as s,L as h,d as x}from"./index-CHGpuh10.js";import{S as p}from"./skeleton-Df0GaMuw.js";import{A as j,a as m}from"./alert-DPvmCXZT.js";import{T as d}from"./trending-up-Cqe6Lpc9.js";const y=({noun:n,items:e,recentDays:i=30,baselineDays:l=180,isLoading:o,error:t,mono:c})=>!o&&!t&&!(e!=null&&e.length)?null:s.jsxs("section",{id:"trending",className:"taxonomy-trending","aria-label":`Trending ${n}s`,children:[s.jsxs("div",{className:"taxonomy-trending-header",children:[s.jsxs("h2",{children:[s.jsx(d,{size:22,"aria-hidden":"true"}),"Trending"]}),s.jsxs("p",{className:"taxonomy-trending-note",children:[n==="task"?"Tasks":"Methods"," across all areas whose share of papers in the last ",i," days grew the most against the preceding ",l," days."]})]}),t?s.jsx(j,{variant:"destructive",children:s.jsxs(m,{children:["Failed to load trending ",n,"s."]})}):o?s.jsx("div",{className:"tag-grid",children:Array.from({length:6}).map((a,r)=>s.jsx(p,{className:"h-20"},r))}):s.jsx("div",{className:"tag-grid",children:e==null?void 0:e.map((a,r)=>s.jsxs(h,{to:a.href,className:"tag-cell",children:[s.jsxs("div",{className:"name",style:c?{fontFamily:"var(--mono)",fontSize:15}:void 0,children:[s.jsx("span",{className:"taxonomy-trending-rank",children:r+1}),a.icon&&s.jsx("span",{className:"task-icon",style:{color:a.iconColor},children:s.jsx(a.icon,{size:16,strokeWidth:2,"aria-hidden":"true"})}),a.name]}),s.jsxs("div",{className:"meta taxonomy-trending-meta",children:[a.areaName&&s.jsxs(s.Fragment,{children:[s.jsx("span",{children:a.areaName}),s.jsx("span",{children:"·"})]}),s.jsxs("span",{children:[a.recentPaperCount.toLocaleString()," papers / ",i,"d"]}),s.jsx("span",{children:"·"}),s.jsxs("span",{className:"method-trend-score taxonomy-trending-lift",title:`Share of recent papers is ${a.shareLift.toFixed(1)}× its baseline share`,children:[s.jsx(d,{size:12,"aria-hidden":"true"}),a.shareLift.toFixed(1),"×"]})]})]},a.id))})]});function v(n){x.useEffect(()=>{var e;!n||!window.location.hash||(e=document.getElementById(window.location.hash.slice(1)))==null||e.scrollIntoView({block:"start"})},[n])}export{y as T,v as u}; diff --git a/assets/useInfiniteQuery-DeZTTVbI.js b/assets/useInfiniteQuery-DhWyWKGj.js similarity index 94% rename from assets/useInfiniteQuery-DeZTTVbI.js rename to assets/useInfiniteQuery-DhWyWKGj.js index 992ebd7a4a5a0a6ceae5057d7c146d0fc6e9590d..615ce3921e7d2ff46aacc171e0cb229b2d274c94 100644 --- a/assets/useInfiniteQuery-DeZTTVbI.js +++ b/assets/useInfiniteQuery-DhWyWKGj.js @@ -1 +1 @@ -import{aJ as v,a$ as b,b0 as x,b1 as p}from"./index-CjdUkE4w.js";var l=class extends v{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){e._type="infinite",super.setOptions(e)}getOptimisticResult(e){return e._type="infinite",super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(e,t){var f,P;const{state:s}=e,i=super.createResult(e,t),{isFetching:a,isRefetching:g,isError:c,isRefetchError:d}=i,r=(P=(f=s.fetchMeta)==null?void 0:f.fetchMore)==null?void 0:P.direction,h=c&&r==="forward",n=a&&r==="forward",o=c&&r==="backward",u=a&&r==="backward";return{...i,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:x(t,s.data),hasPreviousPage:b(t,s.data),isFetchNextPageError:h,isFetchingNextPage:n,isFetchPreviousPageError:o,isFetchingPreviousPage:u,isRefetchError:d&&!h&&!o,isRefetching:g&&!n&&!u}}};function m(e,t){return p(e,l)}export{m as u}; +import{aJ as v,a$ as b,b0 as x,b1 as p}from"./index-CHGpuh10.js";var l=class extends v{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){e._type="infinite",super.setOptions(e)}getOptimisticResult(e){return e._type="infinite",super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(e,t){var f,P;const{state:s}=e,i=super.createResult(e,t),{isFetching:a,isRefetching:g,isError:c,isRefetchError:d}=i,r=(P=(f=s.fetchMeta)==null?void 0:f.fetchMore)==null?void 0:P.direction,h=c&&r==="forward",n=a&&r==="forward",o=c&&r==="backward",u=a&&r==="backward";return{...i,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:x(t,s.data),hasPreviousPage:b(t,s.data),isFetchNextPageError:h,isFetchingNextPage:n,isFetchPreviousPageError:o,isFetchingPreviousPage:u,isRefetchError:d&&!h&&!o,isRefetching:g&&!n&&!u}}};function m(e,t){return p(e,l)}export{m as u}; diff --git a/assets/useIntersectionObserver-Ch6RpsSk.js b/assets/useIntersectionObserver-DZSpsOQX.js similarity index 86% rename from assets/useIntersectionObserver-Ch6RpsSk.js rename to assets/useIntersectionObserver-DZSpsOQX.js index 2027f15bf6443d218b925521e10c36f4f88ee67e..f4093f856c9b664fec7629aece86a73405d730c2 100644 --- a/assets/useIntersectionObserver-Ch6RpsSk.js +++ b/assets/useIntersectionObserver-DZSpsOQX.js @@ -1 +1 @@ -import{d as r}from"./index-CjdUkE4w.js";function b(u={}){const{threshold:t=0,rootMargin:n="0px"}=u,[i,s]=r.useState(!1),e=r.useRef(null),f=r.useCallback(c=>{if(e.current&&(e.current.disconnect(),e.current=null),!c){s(!1);return}const o=new IntersectionObserver(([l])=>s(l.isIntersecting),{threshold:t,rootMargin:n});o.observe(c),e.current=o},[t,n]);return r.useEffect(()=>()=>{e.current&&(e.current.disconnect(),e.current=null)},[]),{targetRef:f,isIntersecting:i}}export{b as u}; +import{d as r}from"./index-CHGpuh10.js";function b(u={}){const{threshold:t=0,rootMargin:n="0px"}=u,[i,s]=r.useState(!1),e=r.useRef(null),f=r.useCallback(c=>{if(e.current&&(e.current.disconnect(),e.current=null),!c){s(!1);return}const o=new IntersectionObserver(([l])=>s(l.isIntersecting),{threshold:t,rootMargin:n});o.observe(c),e.current=o},[t,n]);return r.useEffect(()=>()=>{e.current&&(e.current.disconnect(),e.current=null)},[]),{targetRef:f,isIntersecting:i}}export{b as u}; diff --git a/assets/useMutation-BYtVrkc7.js b/assets/useMutation-3fOqWcpt.js similarity index 97% rename from assets/useMutation-BYtVrkc7.js rename to assets/useMutation-3fOqWcpt.js index 932db99f14e2244f98cf7eb8c72267e0397b0b53..640393d2e6ecd572da7c6fb1a7c1ca6cbd3c9a9b 100644 --- a/assets/useMutation-BYtVrkc7.js +++ b/assets/useMutation-3fOqWcpt.js @@ -1 +1 @@ -var P=i=>{throw TypeError(i)};var E=(i,t,s)=>t.has(i)||P("Cannot "+s);var e=(i,t,s)=>(E(i,t,"read from private field"),s?s.call(i):t.get(i)),b=(i,t,s)=>t.has(i)?P("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(i):t.set(i,s),p=(i,t,s,r)=>(E(i,t,"write to private field"),r?r.call(i,s):t.set(i,s),s),y=(i,t,s)=>(E(i,t,"access private method"),s);import{aF as U,aH as k,aT as R,aU as q,aG as w,i as L,d as v,aP as T,aV as A}from"./index-CjdUkE4w.js";var a,c,o,h,n,C,S,j,D=(j=class extends U{constructor(t,s){super();b(this,n);b(this,a);b(this,c);b(this,o);b(this,h);p(this,a,t),this.setOptions(s),this.bindMethods(),y(this,n,C).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){var r;const s=this.options;this.options=e(this,a).defaultMutationOptions(t),k(this.options,s)||e(this,a).getMutationCache().notify({type:"observerOptionsUpdated",mutation:e(this,o),observer:this}),s!=null&&s.mutationKey&&this.options.mutationKey&&R(s.mutationKey)!==R(this.options.mutationKey)?this.reset():((r=e(this,o))==null?void 0:r.state.status)==="pending"&&e(this,o).setOptions(this.options)}onUnsubscribe(){var t;this.hasListeners()||(t=e(this,o))==null||t.removeObserver(this)}onMutationUpdate(t){y(this,n,C).call(this),y(this,n,S).call(this,t)}getCurrentResult(){return e(this,c)}reset(){var t;(t=e(this,o))==null||t.removeObserver(this),p(this,o,void 0),y(this,n,C).call(this),y(this,n,S).call(this)}mutate(t,s){var r;return p(this,h,s),(r=e(this,o))==null||r.removeObserver(this),p(this,o,e(this,a).getMutationCache().build(e(this,a),this.options)),e(this,o).addObserver(this),e(this,o).execute(t)}},a=new WeakMap,c=new WeakMap,o=new WeakMap,h=new WeakMap,n=new WeakSet,C=function(){var s;const t=((s=e(this,o))==null?void 0:s.state)??q();p(this,c,{...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset})},S=function(t){w.batch(()=>{var s,r,u,f,d,O,x,K;if(e(this,h)&&this.hasListeners()){const m=e(this,c).variables,M=e(this,c).context,g={client:e(this,a),meta:this.options.meta,mutationKey:this.options.mutationKey};if((t==null?void 0:t.type)==="success"){try{(r=(s=e(this,h)).onSuccess)==null||r.call(s,t.data,m,M,g)}catch(l){Promise.reject(l)}try{(f=(u=e(this,h)).onSettled)==null||f.call(u,t.data,null,m,M,g)}catch(l){Promise.reject(l)}}else if((t==null?void 0:t.type)==="error"){try{(O=(d=e(this,h)).onError)==null||O.call(d,t.error,m,M,g)}catch(l){Promise.reject(l)}try{(K=(x=e(this,h)).onSettled)==null||K.call(x,void 0,t.error,m,M,g)}catch(l){Promise.reject(l)}}}this.listeners.forEach(m=>{m(e(this,c))})})},j);function H(i,t){const s=L(),[r]=v.useState(()=>new D(s,i));v.useEffect(()=>{r.setOptions(i)},[r,i]);const u=v.useSyncExternalStore(v.useCallback(d=>r.subscribe(w.batchCalls(d)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),f=v.useCallback((d,O)=>{r.mutate(d,O).catch(T)},[r]);if(u.error&&A(r.options.throwOnError,[u.error]))throw u.error;return{...u,mutate:f,mutateAsync:u.mutate}}export{H as u}; +var P=i=>{throw TypeError(i)};var E=(i,t,s)=>t.has(i)||P("Cannot "+s);var e=(i,t,s)=>(E(i,t,"read from private field"),s?s.call(i):t.get(i)),b=(i,t,s)=>t.has(i)?P("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(i):t.set(i,s),p=(i,t,s,r)=>(E(i,t,"write to private field"),r?r.call(i,s):t.set(i,s),s),y=(i,t,s)=>(E(i,t,"access private method"),s);import{aF as U,aH as k,aT as R,aU as q,aG as w,i as L,d as v,aP as T,aV as A}from"./index-CHGpuh10.js";var a,c,o,h,n,C,S,j,D=(j=class extends U{constructor(t,s){super();b(this,n);b(this,a);b(this,c);b(this,o);b(this,h);p(this,a,t),this.setOptions(s),this.bindMethods(),y(this,n,C).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){var r;const s=this.options;this.options=e(this,a).defaultMutationOptions(t),k(this.options,s)||e(this,a).getMutationCache().notify({type:"observerOptionsUpdated",mutation:e(this,o),observer:this}),s!=null&&s.mutationKey&&this.options.mutationKey&&R(s.mutationKey)!==R(this.options.mutationKey)?this.reset():((r=e(this,o))==null?void 0:r.state.status)==="pending"&&e(this,o).setOptions(this.options)}onUnsubscribe(){var t;this.hasListeners()||(t=e(this,o))==null||t.removeObserver(this)}onMutationUpdate(t){y(this,n,C).call(this),y(this,n,S).call(this,t)}getCurrentResult(){return e(this,c)}reset(){var t;(t=e(this,o))==null||t.removeObserver(this),p(this,o,void 0),y(this,n,C).call(this),y(this,n,S).call(this)}mutate(t,s){var r;return p(this,h,s),(r=e(this,o))==null||r.removeObserver(this),p(this,o,e(this,a).getMutationCache().build(e(this,a),this.options)),e(this,o).addObserver(this),e(this,o).execute(t)}},a=new WeakMap,c=new WeakMap,o=new WeakMap,h=new WeakMap,n=new WeakSet,C=function(){var s;const t=((s=e(this,o))==null?void 0:s.state)??q();p(this,c,{...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset})},S=function(t){w.batch(()=>{var s,r,u,f,d,O,x,K;if(e(this,h)&&this.hasListeners()){const m=e(this,c).variables,M=e(this,c).context,g={client:e(this,a),meta:this.options.meta,mutationKey:this.options.mutationKey};if((t==null?void 0:t.type)==="success"){try{(r=(s=e(this,h)).onSuccess)==null||r.call(s,t.data,m,M,g)}catch(l){Promise.reject(l)}try{(f=(u=e(this,h)).onSettled)==null||f.call(u,t.data,null,m,M,g)}catch(l){Promise.reject(l)}}else if((t==null?void 0:t.type)==="error"){try{(O=(d=e(this,h)).onError)==null||O.call(d,t.error,m,M,g)}catch(l){Promise.reject(l)}try{(K=(x=e(this,h)).onSettled)==null||K.call(x,void 0,t.error,m,M,g)}catch(l){Promise.reject(l)}}}this.listeners.forEach(m=>{m(e(this,c))})})},j);function H(i,t){const s=L(),[r]=v.useState(()=>new D(s,i));v.useEffect(()=>{r.setOptions(i)},[r,i]);const u=v.useSyncExternalStore(v.useCallback(d=>r.subscribe(w.batchCalls(d)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),f=v.useCallback((d,O)=>{r.mutate(d,O).catch(T)},[r]);if(u.error&&A(r.options.throwOnError,[u.error]))throw u.error;return{...u,mutate:f,mutateAsync:u.mutate}}export{H as u}; diff --git a/assets/usePapers-BZThqZCx.js b/assets/usePapers-DzyOc-Ae.js similarity index 63% rename from assets/usePapers-BZThqZCx.js rename to assets/usePapers-DzyOc-Ae.js index 46f829de665f24e94825d2bafb4182590b822768..18bc534184fadb646ba6efb76cd09d76254b74a6 100644 --- a/assets/usePapers-BZThqZCx.js +++ b/assets/usePapers-DzyOc-Ae.js @@ -1 +1 @@ -import{b as s,T as u,p as i}from"./index-CjdUkE4w.js";import{u as m}from"./useInfiniteQuery-DeZTTVbI.js";import{p as o}from"./papers-DgZwjF3K.js";function g(e,t=!0){return s({queryKey:i.detail(e),queryFn:()=>o.get(e),enabled:t&&!!e,staleTime:u})}function y(e,t,{enabled:n=!0,initialPage:p=1}={}){return m({queryKey:e,queryFn:({pageParam:a})=>t(a),initialPageParam:p,getNextPageParam:a=>a.next_page??void 0,enabled:n,staleTime:5*60*1e3,placeholderData:(a,r)=>(r==null?void 0:r.queryKey[0])===e[0]?a:void 0})}export{g as a,y as u}; +import{b as s,T as u,p as i}from"./index-CHGpuh10.js";import{u as m}from"./useInfiniteQuery-DhWyWKGj.js";import{p as o}from"./papers-BPpxs2sO.js";function g(e,t=!0){return s({queryKey:i.detail(e),queryFn:()=>o.get(e),enabled:t&&!!e,staleTime:u})}function y(e,t,{enabled:n=!0,initialPage:p=1}={}){return m({queryKey:e,queryFn:({pageParam:a})=>t(a),initialPageParam:p,getNextPageParam:a=>a.next_page??void 0,enabled:n,staleTime:5*60*1e3,placeholderData:(a,r)=>(r==null?void 0:r.queryKey[0])===e[0]?a:void 0})}export{g as a,y as u}; diff --git a/index.html b/index.html index 4b25b7827f39e9bc621dab76e504cc95ca51ac5e..2ec3a753022f552f0654988e345bc85392041bad 100644 --- a/index.html +++ b/index.html @@ -72,7 +72,7 @@ plausible.init(); })(); - +