diff --git a/assets/AgentLogos-CFt_vIO2.js b/assets/AgentLogos-DhD8p5ds.js similarity index 99% rename from assets/AgentLogos-CFt_vIO2.js rename to assets/AgentLogos-DhD8p5ds.js index a7914ac88959c29b6ebe39a5492787b446ee638d..916c8e71876782be0f2ca13114fdf4f91c25b1be 100644 --- a/assets/AgentLogos-CFt_vIO2.js +++ b/assets/AgentLogos-DhD8p5ds.js @@ -1 +1 @@ -import{j as e}from"./index-D6jcIRWs.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-YwiKC6Po.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-BWqSvLms.js b/assets/AiDeadlinesView-BWqSvLms.js new file mode 100644 index 0000000000000000000000000000000000000000..731e0d63e3b0e901bee59bf8ec943bfc278bc232 --- /dev/null +++ b/assets/AiDeadlinesView-BWqSvLms.js @@ -0,0 +1,3 @@ +import{r as g,j as t}from"./index-YwiKC6Po.js";import{u as R}from"./useQuery-DPH6Mb2w.js";import{c as A}from"./catalog-B15Yh5dN.js";import{S as L}from"./switch-Crqp0RkL.js";import{S as B}from"./skeleton-CXR1qouH.js";import{A as W,a as U}from"./alert-Cx5luC5D.js";import{s as $}from"./safeExternalHref-CkBrsh84.js";import{D as M,a as O,c as V,b as P,d as G}from"./dialog-foxx0Wu6.js";import{s as H,n as S,f as _,p as K,u as N,l as k,a as I,c as b,D as Y,b as E,d as q}from"./deadlines-BH32v7D1.js";import"./index-BaDZKp6X.js";const w={fontFamily:"var(--mono)",fontSize:10,letterSpacing:"0.12em",textTransform:"uppercase",color:"var(--ink-faint)"},Q=(e,l)=>{const s=Math.ceil((e-l)/Y);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}/,""),J=(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")},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=["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)},Z=({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?H(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(M,{open:l,onOpenChange:s,children:t.jsx(O,{className:"max-w-xl",style:{background:"var(--bg-elevated)",maxHeight:"85vh",overflowY:"auto"},children:e&&t.jsxs(t.Fragment,{children:[t.jsxs(V,{children:[t.jsx(P,{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(G,{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:K(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:Q(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:()=>J(e,n),style:{background:"var(--bg-subtle)",color:"var(--ink-soft)"},children:"+ Google Calendar"}),t.jsx("button",{type:"button",className:"tag-chip",onClick:()=>X(e,n),style:{background:"var(--bg-subtle)",color:"var(--ink-soft)"},children:"+ Apple / .ics"})]})]})]})]})})})},z=({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(L,{id:e,checked:s,onCheckedChange:r}),t.jsx("label",{htmlFor:e,style:{cursor:"pointer"},children:l})]}),ee=({conf:e,now:l,selectedDomains:s,onToggleDomain:r,onOpen:o})=>{const h=S(e,l),n=h??E(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:()=>A.conferenceDeadlines(),staleTime:10*60*1e3}),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=E(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(U,{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(z,{id:"top-tier-only",label:"Top tier only",checked:e,onChange:l}),t.jsx(z,{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(B,{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(ee,{conf:a,now:d,selectedDomains:o,onToggleDomain:i,onOpen:p},a.id))}),t.jsx(Z,{conf:n,open:n!==null,onOpenChange:a=>{a||p(null)}})]})};export{pe as default}; diff --git a/assets/AiDeadlinesView-DJLyTAgt.js b/assets/AiDeadlinesView-DJLyTAgt.js deleted file mode 100644 index 248a9ab081d0b77c09ba2a438feff45020b68bce..0000000000000000000000000000000000000000 --- a/assets/AiDeadlinesView-DJLyTAgt.js +++ /dev/null @@ -1,3 +0,0 @@ -import{r as x,j as t}from"./index-D6jcIRWs.js";import{u as A}from"./useQuery-CUJUm4FY.js";import{c as B}from"./catalog-PYrB8_bm.js";import{S as U}from"./switch-D_MyRbto.js";import{S as W}from"./skeleton-BqkYFmXl.js";import{A as O,a as V}from"./alert-2MbxVzGL.js";import{s as z}from"./safeExternalHref-CkBrsh84.js";import{D as P,a as G,c as Y,b as H,d as K}from"./dialog-vGFIbcd-.js";import"./index-DIg7XGE2.js";const b=1e3*60*60*24,S={urgent:"#c0392b",soon:"#b9770e",normal:"#3f7d3f",passed:"var(--ink-faint)"},k=e=>e.split("-").map(a=>a.charAt(0).toUpperCase()+a.slice(1)).join(" "),q=new Set(["machine-learning","computer-vision","natural-language-processing","data-mining","robotics","computer-graphics","human-computer-interaction","web-search","signal-processing","representation-learning","reinforcement-learning","optimization-methods","large-language-models","information-retrieval","speech","mathematics"]),Q=e=>e.trim().toLowerCase().replace(/\s+/g,"-"),D=e=>Array.from(new Set((e.tags??[]).map(Q).filter(a=>q.has(a)))),F=e=>new Date(e).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}),I=(e,a)=>{if(!e)return null;const n=new Date(`${e}T00:00:00`),r=a?new Date(`${a}T00:00:00`):null,o=s=>s.toLocaleDateString("en-US",{month:"long",day:"numeric"}),i=n.getFullYear();return r&&r.getTime()!==n.getTime()?n.getMonth()===r.getMonth()?`${o(n).replace(/\d+$/,"").trim()} ${n.getDate()}–${r.getDate()}, ${i}`:`${o(n)} – ${o(r)}, ${i}`:`${o(n)}, ${i}`},M=e=>[...e.deadlines??[]].sort((a,n)=>new Date(a.deadline_at).getTime()-new Date(n.deadline_at).getTime()),T=(e,a)=>M(e).find(n=>new Date(n.deadline_at).getTime()>a)??null,L=e=>{const a=M(e);return a.length?a[a.length-1]:null},J=(e,a)=>{const n=e-a;if(n<=0)return"Deadline passed";const r=Math.floor(n/b);if(r>=1){const s=Math.floor((n-r*b)/36e5);return`in ${r}d ${s}h`}const o=Math.floor(n/(1e3*60*60));return o>=1?`in ${o}h`:`in ${Math.max(1,Math.floor(n/(1e3*60)))}m`},X=(e,a)=>{const n=e-a;if(n<=0)return"Deadline passed";const r=Math.floor(n/b),o=Math.floor(n%b/(1e3*60*60)),i=Math.floor(n%(1e3*60*60)/(1e3*60)),s=Math.floor(n%(1e3*60)/1e3);return`${r}d ${o}h ${i}m ${s}s`},_=(e,a)=>{if(e==null)return S.passed;const n=(e-a)/b;return n<=0?S.passed:n<=7?S.urgent:n<=30?S.soon:S.normal},$={fontFamily:"var(--mono)",fontSize:10,letterSpacing:"0.12em",textTransform:"uppercase",color:"var(--ink-faint)"},Z=(e,a)=>{const n=Math.ceil((e-a)/b);return n<=0?"passed":`${n} ${n===1?"day":"days"}`},R=(e,a)=>{const n=I(e.start_date,e.end_date),r=e.venue||[e.city,e.country].filter(Boolean).join(", ");return[`${a.label||a.type||"Deadline"} for ${e.name}`,n?`Dates: ${n}`:null,r?`Location: ${r}`:null,e.url?`Website: ${e.url}`:null].filter(Boolean).join(` -`)},C=e=>e.toISOString().replace(/[-:]/g,"").replace(/\.\d{3}/,""),ee=(e,a)=>{const n=new Date(a.deadline_at),r=new Date(n.getTime()+60*60*1e3),o=`${e.short_name||e.name} ${a.label||a.type||"deadline"}`,i=e.venue||[e.city,e.country].filter(Boolean).join(", "),s=`https://calendar.google.com/calendar/render?action=TEMPLATE&text=${encodeURIComponent(o)}&dates=${C(n)}/${C(r)}&details=${encodeURIComponent(R(e,a))}&location=${encodeURIComponent(i)}`,m=z(s);m&&window.open(m,"_blank","noopener,noreferrer")},te=(e,a)=>{const n=new Date(a.deadline_at),r=new Date(n.getTime()+60*60*1e3),o=`${e.short_name||e.name} ${a.label||a.type||"deadline"}`,i=e.venue||[e.city,e.country].filter(Boolean).join(", "),s=["BEGIN:VCALENDAR","VERSION:2.0","BEGIN:VEVENT",e.url?`URL:${e.url}`:null,`DTSTART:${C(n)}`,`DTEND:${C(r)}`,`SUMMARY:${o}`,`DESCRIPTION:${R(e,a).replace(/\n/g,"\\n")}`,i?`LOCATION:${i}`:null,"END:VEVENT","END:VCALENDAR"].filter(Boolean).join(` -`),m=new Blob([s],{type:"text/calendar;charset=utf-8"}),c=document.createElement("a");c.href=URL.createObjectURL(m),c.download=`${(e.short_name||e.name).toLowerCase().replace(/\s+/g,"-")}-deadline.ics`,document.body.appendChild(c),c.click(),document.body.removeChild(c),URL.revokeObjectURL(c.href)},ne=({conf:e,open:a,onOpenChange:n})=>{const[r,o]=x.useState(()=>Date.now());x.useEffect(()=>{if(!a)return;o(Date.now());const d=setInterval(()=>o(Date.now()),1e3);return()=>clearInterval(d)},[a]);const i=x.useMemo(()=>e?M(e):[],[e]),s=x.useMemo(()=>e?T(e,r):null,[e,r]),m=e?I(e.start_date,e.end_date):null,c=e?e.venue||[e.city,e.country].filter(Boolean).join(", ")||e.location:null,u=s?new Date(s.deadline_at).getTime():null;return t.jsx(P,{open:a,onOpenChange:n,children:t.jsx(G,{className:"max-w-xl",style:{background:"var(--bg-elevated)",maxHeight:"85vh",overflowY:"auto"},children:e&&t.jsxs(t.Fragment,{children:[t.jsxs(Y,{children:[t.jsx(H,{asChild:!0,children:t.jsx("h2",{style:{fontFamily:"var(--serif)",fontSize:26,fontWeight:500,letterSpacing:"-0.01em",margin:0},children:e.short_name?`${e.short_name} ${e.year??""}`.trim():e.name})}),e.short_name&&e.name||e.description?t.jsx(K,{asChild:!0,children:t.jsx("span",{style:{fontFamily:"var(--serif)",fontSize:14,color:"var(--ink-soft)"},children:e.short_name?e.name:e.description})}):null]}),t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:20,marginTop:4},children:[t.jsxs("div",{style:{display:"flex",flexWrap:"wrap",gap:24},children:[m&&t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:4},children:[t.jsx("span",{style:$,children:"Dates"}),t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:13,color:"var(--ink-soft)"},children:m})]}),c&&t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:4},children:[t.jsx("span",{style:$,children:"Venue"}),t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:13,color:"var(--ink-soft)"},children:c})]})]}),u!=null&&t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:4,padding:"12px 14px",borderRadius:8,background:"var(--bg-subtle)",border:"1px solid var(--hairline)"},children:[t.jsx("span",{style:$,children:"Next deadline in"}),t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:22,fontWeight:600,color:_(u,r)},children:X(u,r)})]}),t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:8},children:[t.jsx("span",{style:$,children:"Important deadlines"}),i.length===0?t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:13,color:"var(--ink-faint)"},children:"No deadlines listed"}):i.map((d,p)=>{const y=new Date(d.deadline_at).getTime(),l=s!=null&&d.deadline_at===s.deadline_at&&d.type===s.type,h=y<=r;return t.jsxs("div",{style:{display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:12,padding:"8px 12px",borderRadius:6,background:l?"var(--accent-soft)":"transparent",border:l?"1px solid var(--hairline-strong)":"1px solid var(--hairline)",opacity:h&&!l?.55:1},children:[t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:2},children:[t.jsxs("span",{style:{fontFamily:"var(--mono)",fontSize:13,color:"var(--ink)",fontWeight:l?600:400},children:[d.label||k(d.type||"deadline"),l&&t.jsx("span",{style:{...$,marginLeft:8},children:"Next"})]}),t.jsxs("span",{style:{fontFamily:"var(--mono)",fontSize:12,color:"var(--ink-faint)"},children:[F(d.deadline_at),d.timezone?` · ${d.timezone}`:""]})]}),t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:12,fontWeight:600,whiteSpace:"nowrap",color:_(h?null:y,r)},children:Z(y,r)})]},`${d.type??"deadline"}-${p}`)})]}),D(e).length>0&&t.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:6},children:D(e).map(d=>t.jsx("span",{className:"tag-chip",style:{background:"var(--bg-subtle)",color:"var(--ink-soft)"},children:k(d)},d))}),t.jsxs("div",{style:{display:"flex",flexWrap:"wrap",alignItems:"center",gap:16,paddingTop:12,borderTop:"1px solid var(--hairline)"},children:[e.url&&t.jsx("a",{href:z(e.url)??void 0,target:"_blank",rel:"noopener noreferrer",style:{fontFamily:"var(--mono)",fontSize:12,color:"var(--accent-text)"},children:"Visit website ↗"}),s&&t.jsxs("div",{style:{display:"flex",gap:12,marginLeft:"auto"},children:[t.jsx("button",{type:"button",className:"tag-chip",onClick:()=>ee(e,s),style:{background:"var(--bg-subtle)",color:"var(--ink-soft)"},children:"+ Google Calendar"}),t.jsx("button",{type:"button",className:"tag-chip",onClick:()=>te(e,s),style:{background:"var(--bg-subtle)",color:"var(--ink-soft)"},children:"+ Apple / .ics"})]})]})]})]})})})},E=({id:e,label:a,checked:n,onChange:r})=>t.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,fontFamily:"var(--mono)",fontSize:12,color:"var(--ink-soft)"},children:[t.jsx(U,{id:e,checked:n,onCheckedChange:r}),t.jsx("label",{htmlFor:e,style:{cursor:"pointer"},children:a})]}),ae=({conf:e,now:a,selectedDomains:n,onToggleDomain:r,onOpen:o})=>{const i=T(e,a),s=i??L(e),m=s?new Date(s.deadline_at).getTime():null,c=_(i?m:null,a),u=I(e.start_date,e.end_date),d=[e.city??null,e.country??null].filter(Boolean).join(", ");return t.jsxs("div",{role:"button",tabIndex:0,onClick:()=>o(e),onKeyDown:p=>{(p.key==="Enter"||p.key===" ")&&(p.preventDefault(),o(e))},style:{border:"1px solid var(--hairline)",borderRadius:8,padding:20,background:"var(--bg-elevated)",display:"flex",flexDirection:"column",gap:12,cursor:"pointer"},children:[t.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"baseline",gap:12},children:[t.jsx("h3",{style:{fontFamily:"var(--serif)",fontSize:20,fontWeight:500,letterSpacing:"-0.01em",margin:0},children:e.short_name?`${e.short_name} ${e.year??""}`.trim():e.name}),e.url&&t.jsx("a",{href:z(e.url)??void 0,target:"_blank",rel:"noopener noreferrer",onClick:p=>p.stopPropagation(),style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--accent-text)",whiteSpace:"nowrap"},children:"website ↗"})]}),t.jsxs("div",{style:{display:"flex",alignItems:"baseline",justifyContent:"space-between",gap:12,paddingBottom:12,borderBottom:"1px solid var(--hairline)"},children:[t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:2},children:[t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)"},children:(s==null?void 0:s.label)||(s==null?void 0:s.type)||"Deadline"}),t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:12,color:"var(--ink-soft)"},children:s?`${F(s.deadline_at)}${s.timezone?` · ${s.timezone}`:""}`:"TBD"})]}),t.jsx("span",{style:{fontFamily:"var(--mono)",fontSize:14,fontWeight:600,color:c,whiteSpace:"nowrap"},children:m!=null?J(m,a):"TBD"})]}),t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:4,fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)"},children:[u&&t.jsx("span",{children:u}),d&&t.jsx("span",{children:d})]}),D(e).length>0&&t.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:6},children:D(e).map(p=>{const y=n.has(p);return t.jsx("button",{className:"tag-chip",onClick:l=>{l.stopPropagation(),r(p)},style:{background:y?"var(--ink)":"var(--bg-subtle)",color:y?"var(--bg)":"var(--ink-soft)"},children:k(p)},p)})})]})},ue=()=>{const[e,a]=x.useState(!0),[n,r]=x.useState(!1),[o,i]=x.useState(new Set),[s,m]=x.useState(null),c=x.useMemo(()=>Date.now(),[]),u=A({queryKey:["conference-deadlines"],queryFn:()=>B.conferenceDeadlines(),staleTime:10*60*1e3}),d=l=>{i(h=>{const g=new Set(h);return g.has(l)?g.delete(l):g.add(l),g})},p=x.useMemo(()=>{var h;const l=new Map;return(h=u.data)==null||h.results.forEach(g=>{D(g).forEach(j=>l.set(j,(l.get(j)??0)+1))}),Array.from(l.entries()).sort((g,j)=>j[1]-g[1]).map(([g])=>g)},[u.data]),y=x.useMemo(()=>{var j;const h=(((j=u.data)==null?void 0:j.results)??[]).filter(f=>!(e&&f.tier!=="a"||o.size>0&&!D(f).some(v=>o.has(v))||!n&&!T(f,c))),g=f=>{const w=T(f,c);if(w)return{group:0,time:new Date(w.deadline_at).getTime()};const v=L(f);return{group:1,time:-(v?new Date(v.deadline_at).getTime():0)}};return[...h].sort((f,w)=>{const v=g(f),N=g(w);return v.group!==N.group?v.group-N.group:v.time-N.time})},[u.data,e,n,o,c]);return u.error?t.jsx("div",{className:"page",children:t.jsx(O,{variant:"destructive",children:t.jsx(V,{children:"Failed to load conference deadlines. Please try again."})})}):t.jsxs("div",{className:"page",children:[t.jsx("div",{className:"feed-header",children:t.jsxs("div",{children:[t.jsxs("h1",{className:"feed-title",children:["AI Conference ",t.jsx("em",{children:"Deadlines"})]}),t.jsx("div",{className:"feed-subtitle",children:"Upcoming submission deadlines for major AI conferences, counting down."})]})}),t.jsxs("div",{style:{display:"flex",flexWrap:"wrap",alignItems:"center",gap:20,padding:"16px 0",borderBottom:"1px solid var(--hairline)",marginBottom:24},children:[t.jsx(E,{id:"top-tier-only",label:"Top tier only",checked:e,onChange:a}),t.jsx(E,{id:"show-past",label:"Show past conferences",checked:n,onChange:r})]}),p.length>0&&t.jsxs("div",{style:{display:"flex",flexWrap:"wrap",gap:6,marginBottom:24},children:[p.map(l=>{const h=o.has(l);return t.jsx("button",{className:"tag-chip",onClick:()=>d(l),style:{background:h?"var(--ink)":"var(--bg-subtle)",color:h?"var(--bg)":"var(--ink-soft)"},children:k(l)},l)}),o.size>0&&t.jsx("button",{className:"tag-chip",onClick:()=>i(new Set),style:{background:"transparent",color:"var(--ink-faint)"},children:"Clear ✕"})]}),t.jsx("div",{className:"sort-bar",children:t.jsx("div",{className:"results-count",children:u.isLoading?"…":`${y.length} conferences`})}),u.isLoading?t.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(320px, 1fr))",gap:16},children:Array.from({length:6}).map((l,h)=>t.jsx(W,{className:"h-44"},h))}):y.length===0?t.jsxs("div",{className:"no-results",children:["No conferences match these filters",n?".":" — try enabling “Show past conferences”."]}):t.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(320px, 1fr))",gap:16},children:y.map(l=>t.jsx(ae,{conf:l,now:c,selectedDomains:o,onToggleDomain:d,onOpen:m},l.id))}),t.jsx(ne,{conf:s,open:s!==null,onOpenChange:l=>{l||m(null)}})]})};export{ue as default}; diff --git a/assets/ApiDocsView-D3iY1sSs.js b/assets/ApiDocsView-Bb326kAF.js similarity index 98% rename from assets/ApiDocsView-D3iY1sSs.js rename to assets/ApiDocsView-Bb326kAF.js index e3831cd4bdcfeaede87e8d5831802a527f451efa..a8986acd81e6c933b3e47feaf6fef779ba52e9f4 100644 --- a/assets/ApiDocsView-D3iY1sSs.js +++ b/assets/ApiDocsView-Bb326kAF.js @@ -1,4 +1,4 @@ -import{a5 as m,r as o,j as e}from"./index-D6jcIRWs.js";import{u as f}from"./useQuery-CUJUm4FY.js";import{M as g}from"./index-uFGyKu5N.js";const y={queryKey:["public-api-schema"],queryFn:()=>m("/openapi.json",{credentials:"omit"}),staleTime:5*60*1e3};function b(s,r){const n=new URLSearchParams;for(const[a,t]of Object.entries(r["x-example-parameters"]))s.includes(`{${a}}`)?s=s.replace(`{${a}}`,encodeURIComponent(String(t))):n.append(a,String(t));return`https://paperswithcode.co${s}${n.size?`?${n}`:""}`}function w(s,r){return r==="Python"?`import requests +import{a5 as m,r as o,j as e}from"./index-YwiKC6Po.js";import{u as f}from"./useQuery-DPH6Mb2w.js";import{M as g}from"./index-CoRCN2p0.js";const y={queryKey:["public-api-schema"],queryFn:()=>m("/openapi.json",{credentials:"omit"}),staleTime:5*60*1e3};function b(s,r){const n=new URLSearchParams;for(const[a,t]of Object.entries(r["x-example-parameters"]))s.includes(`{${a}}`)?s=s.replace(`{${a}}`,encodeURIComponent(String(t))):n.append(a,String(t));return`https://paperswithcode.co${s}${n.size?`?${n}`:""}`}function w(s,r){return r==="Python"?`import requests response = requests.get(${JSON.stringify(s)}, timeout=30) response.raise_for_status() diff --git a/assets/AreaSection-CfCNkiTd.js b/assets/AreaSection-CfCNkiTd.js new file mode 100644 index 0000000000000000000000000000000000000000..a6cdaab15e1077351f85a6de76dcb4e973a66b04 --- /dev/null +++ b/assets/AreaSection-CfCNkiTd.js @@ -0,0 +1 @@ +import{j as s}from"./index-YwiKC6Po.js";import{S as l}from"./skeleton-CXR1qouH.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/ArtifactWorkspace-CUZCugRS.js b/assets/ArtifactWorkspace-BxDA6yNF.js similarity index 99% rename from assets/ArtifactWorkspace-CUZCugRS.js rename to assets/ArtifactWorkspace-BxDA6yNF.js index df42a3c3c40d4da6906bf828b872e9fb3d814471..7be0ca560ef22d5dcf4aa3094e837e10a2ad2af0 100644 --- a/assets/ArtifactWorkspace-CUZCugRS.js +++ b/assets/ArtifactWorkspace-BxDA6yNF.js @@ -1,4 +1,4 @@ -var TL=Object.defineProperty;var yA=n=>{throw TypeError(n)};var PL=(n,e,t)=>e in n?TL(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var oe=(n,e,t)=>PL(n,typeof e!="symbol"?e+"":e,t),av=(n,e,t)=>e.has(n)||yA("Cannot "+t);var f=(n,e,t)=>(av(n,e,"read from private field"),t?t.call(n):e.get(n)),M=(n,e,t)=>e.has(n)?yA("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(n):e.set(n,t),$=(n,e,t,s)=>(av(n,e,"write to private field"),s?s.call(n,t):e.set(n,t),t),P=(n,e,t)=>(av(n,e,"access private method"),t);var hs=(n,e,t,s)=>({set _(i){$(n,e,i,t)},get _(){return f(n,e,s)}});import{n as Mo,r as q,j as S,K as ee,_ as eS,$ as rn,a0 as gm,a1 as l0,L as Nd,a2 as RL,X as c0,a3 as ML,f as ZC,C as IL}from"./index-D6jcIRWs.js";import{u as XC,a as OL,c as NL,P as YC,i as LL,b as JC,e as tS,A as DL,v as jL,Z as FL,_ as zL,$ as HL,a0 as QC,a1 as BL}from"./chatSessions-DByIWBno.js";/* empty css */import{H as Np,a as Lp,b as Dp}from"./hover-card-DPpv0l_x.js";import{u as wo}from"./useQuery-CUJUm4FY.js";import{f as UL,i as e$,p as qL,C as VL,a as WL,T as GL}from"./CatalogEntityPreviewLink-BhTSUN-X.js";import{G as h0}from"./github-B7D_19Qm.js";import{F as t$}from"./file-text-4G2I5_Zo.js";import{r as KL,a as ZL,P as u0,c as XL}from"./PaperPreviewLink-fcJyP9H0.js";import{M as YL,d as JL}from"./index-uFGyKu5N.js";import{r as QL}from"./index-yduEvk9Z.js";import{c as vA}from"./chat-ChnK8XDU.js";import{C as eD}from"./copy-BmzqMihw.js";import{T as tD}from"./thumbs-up-BqRlVdvF.js";import{u as ym}from"./useMutation-p6mN4h17.js";import{A as nD}from"./arrow-left-IzGlownM.js";import{E as n$}from"./external-link-C_yz2sXa.js";import{P as sD}from"./plus-C4UQ62Q1.js";import{S as iD}from"./search-CfTufeR7.js";import{C as s$,a as i$}from"./chevron-up-CQKUhZ0S.js";import{A as rD}from"./AuthorAvatar-UMHOVOr9.js";import{a as oD}from"./papers-DIIIPDpj.js";/** +var TL=Object.defineProperty;var yA=n=>{throw TypeError(n)};var PL=(n,e,t)=>e in n?TL(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var oe=(n,e,t)=>PL(n,typeof e!="symbol"?e+"":e,t),av=(n,e,t)=>e.has(n)||yA("Cannot "+t);var f=(n,e,t)=>(av(n,e,"read from private field"),t?t.call(n):e.get(n)),M=(n,e,t)=>e.has(n)?yA("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(n):e.set(n,t),$=(n,e,t,s)=>(av(n,e,"write to private field"),s?s.call(n,t):e.set(n,t),t),P=(n,e,t)=>(av(n,e,"access private method"),t);var hs=(n,e,t,s)=>({set _(i){$(n,e,i,t)},get _(){return f(n,e,s)}});import{n as Mo,r as q,j as S,K as ee,_ as eS,$ as rn,a0 as gm,a1 as l0,L as Nd,a2 as RL,X as c0,a3 as ML,f as ZC,C as IL}from"./index-YwiKC6Po.js";import{u as XC,a as OL,c as NL,P as YC,i as LL,b as JC,e as tS,A as DL,v as jL,Z as FL,_ as zL,$ as HL,a0 as QC,a1 as BL}from"./chatSessions-CdNQ1toA.js";/* empty css */import{H as Np,a as Lp,b as Dp}from"./hover-card-BY9tUGxy.js";import{u as wo}from"./useQuery-DPH6Mb2w.js";import{f as UL,i as e$,p as qL,C as VL,a as WL,T as GL}from"./CatalogEntityPreviewLink-Cv_oezOz.js";import{G as h0}from"./github-BZMCt7Ub.js";import{F as t$}from"./file-text-Cijxx2XD.js";import{r as KL,a as ZL,P as u0,c as XL}from"./PaperPreviewLink-CKfmgBjs.js";import{M as YL,d as JL}from"./index-CoRCN2p0.js";import{r as QL}from"./index-BM_xSDJM.js";import{c as vA}from"./chat-DHGOonJg.js";import{C as eD}from"./copy-YHg6twss.js";import{T as tD}from"./thumbs-up-D9G2aLNB.js";import{u as ym}from"./useMutation-f6iDkf3w.js";import{A as nD}from"./arrow-left-B08fyfNi.js";import{E as n$}from"./external-link-4bBJT0yO.js";import{P as sD}from"./plus-Cfz0QbT1.js";import{S as iD}from"./search-wcEXdf1i.js";import{C as s$,a as i$}from"./chevron-up-BXtxbTfV.js";import{A as rD}from"./AuthorAvatar-CoTET6B3.js";import{a as oD}from"./paperQueryKeys-C5FMa4Oj.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/AstraForRoboticsView-CEJJvKPe.js b/assets/AstraForRoboticsView-CEJJvKPe.js deleted file mode 100644 index 43b4fce85bc013acb25dc8c35f1e0829755ed3fc..0000000000000000000000000000000000000000 --- a/assets/AstraForRoboticsView-CEJJvKPe.js +++ /dev/null @@ -1 +0,0 @@ -import{e as y,r as g,j as a,L as n}from"./index-D6jcIRWs.js";import{P as v}from"./components-DO1X940E.js";import{P as k}from"./PaperFeedFilters-DNebHp4l.js";import{A,a as w}from"./alert-2MbxVzGL.js";import{S as N}from"./skeleton-BqkYFmXl.js";import{u as P}from"./useInfiniteScroll-Dm7JY_X4.js";import{u as S}from"./usePapers-BbCSwcVk.js";import{f as R,D as L}from"./latexPlainText-DI8YEXVe.js";import{t as T}from"./colors-CLwl8a2d.js";import"./papers-DIIIPDpj.js";import"./AuthorAvatar-UMHOVOr9.js";import"./LatexTitle-D_92Jowu.js";import"./safeExternalHref-CkBrsh84.js";import"./useIntersectionObserver-3LTuEaFW.js";import"./useQuery-CUJUm4FY.js";import"./useInfiniteQuery-FXco4P1n.js";const x="robotics",f="gpt-6-astra",F="https://x.com/YuXiang_IRVL/status/2100395131924840570",C=[["trending","trending"],["date_published","newest"],["citation_count","most cited"]],I=[{handle:"Frame_Robotics",author:"Frame Robotics",summary:"Real-arm control that fixes grip angle and carry height on the next try after a miss.",url:"https://x.com/Frame_Robotics/status/2099900836273090614"},{handle:"qineng_wang",author:"Qineng Wang",summary:"Dual-ALOHA spatial-constraint puzzles: unlocking interlocked parts and threading a rope through three rings.",url:"https://x.com/qineng_wang/status/2099893504658866561"},{handle:"__Rhodium__",author:"Lucas",summary:"In-context learning of the controls and the workspace, reaching the task goal in three tries.",url:"https://x.com/__Rhodium__/status/2099521054678925534"},{handle:"SuveenE",author:"Suveen Ellawela",summary:"Picking up a pipette and fitting a 5 mm tip on a MolmoAct2 real-world eval, using the free hand for a better view.",url:"https://x.com/SuveenE/status/2099448450341605672"},{handle:"cdngdev",author:"thijs",summary:"A robot arm with a paintbrush painting the Golden Gate Bridge, improving across attempts from camera feedback.",url:"https://x.com/cdngdev/status/2097339677128982873"},{handle:"IsaacSin12",author:"Isaac Sin",summary:"Zero-shot sorting of irregularly shaped blocks into cups by color.",url:"https://x.com/IsaacSin12/status/2096715382166098302"},{handle:"chooi_jeq",author:"Jay Chooi",summary:"Robocurve's robot-control comparison: 95% task completion versus 40% for Fable 5.1 at lower cost.",url:"https://x.com/chooi_jeq/status/2096064315115839904"}],G=[{handle:"Lingjun_Mao",author:"Lingjun Mao",summary:"Adapting to a new embodiment to put a cake into an air fryer through CuRobo motion-planning tool APIs.",url:"https://x.com/Lingjun_Mao/status/2100294902672462176"},{handle:"walterzhu8",author:"Wentao Zhu",summary:"A day-and-a-half autonomous run that builds and trains pen spinning on a Sharpa hand in Isaac Lab.",url:"https://x.com/walterzhu8/status/2100212420840989112"},{handle:"mishig25",author:"Mishig",summary:"Painting the Eiffel Tower in MuJoCo with an SO-101 and a brush, with the full experiment shared on Hugging Face.",url:"https://x.com/mishig25/status/2099611674793668676"},{handle:"RunpeiDong",author:"Runpei Dong",summary:"Getting a humanoid into a Tesla in MuJoCo: learning from feedback, then reusing that experience with egocentric perception.",url:"https://x.com/RunpeiDong/status/2099604536327614717"},{handle:"frankzydou",author:"Zhiyang (Frank) Dou",summary:"A LeRobot SO-101 real-world pickup from a third-person RGB camera, where the arm has to bend back to reach the pen.",url:"https://x.com/frankzydou/status/2099338127915512297"},{handle:"Parvkpr",author:"Parv Kapoor",summary:"Real-to-sim: building an interactive simulation environment from a single image or video.",url:"https://x.com/Parvkpr/status/2098847963867238597"},{handle:"z_code68632",author:"code_z",summary:"One demo per task: unscrewing a bottle cap, inserting a plug, clearing obstacles, and imitating a dance on a real robot.",url:"https://x.com/z_code68632/status/2098397364725895387"}],b=({posts:t,label:i})=>a.jsxs("div",{className:"astra-posts",children:[a.jsx("div",{className:"astra-posts-label",children:i}),a.jsx("ul",{children:t.map(r=>a.jsxs("li",{children:[a.jsxs("a",{href:r.url,target:"_blank",rel:"noreferrer",children:["@",r.handle]}),a.jsxs("span",{className:"astra-post-author",children:[" ",r.author]}),a.jsxs("span",{className:"astra-post-summary",children:[" — ",r.summary]})]},r.url))})]}),O=t=>t==="date_published"||t==="citation_count"?t:"trending",W=()=>{var u,p;const[t,i]=y(),r=O(t.get("order_by")),h=t.get("has_code")==="true",d=t.get("has_hf_artifacts")==="true",o=S({task:x,method:f,page_size:12,order_by:r,order_dir:"desc",include_resources:!0,has_code:h,has_hf_artifacts:d});g.useEffect(()=>(document.title=R("GPT-6 Astra for Robotics"),()=>{document.title=L}),[]);const j=P(o),m=g.useMemo(()=>{var e;return(((e=o.data)==null?void 0:e.pages)??[]).flatMap(s=>s.results.map(T))},[o.data]),_=((p=(u=o.data)==null?void 0:u.pages[0])==null?void 0:p.count)??0,l=(e,s)=>{const c=new URLSearchParams(t);s===null?c.delete(e):c.set(e,s),i(c)};return a.jsxs("div",{className:"page",children:[a.jsxs("nav",{className:"breadcrumb","aria-label":"Breadcrumb",children:[a.jsx(n,{to:"/",children:"Home"}),a.jsx("span",{children:" / "}),a.jsx("span",{children:"GPT-6 Astra for Robotics"})]}),a.jsx("header",{className:"feed-header",children:a.jsxs("div",{children:[a.jsx("div",{className:"astra-eyebrow",children:"Collection"}),a.jsxs("h1",{className:"feed-title",children:["GPT-6 Astra ",a.jsx("em",{children:"for Robotics"})]}),a.jsx("div",{className:"feed-subtitle",children:"Papers, technical reports, and evaluations that put OpenAI’s frontier model in control of real and simulated robots."}),a.jsxs("p",{className:"astra-lede",children:["The GPT-6 Astra launch never mentioned robots, yet within days the model was driving arms, hands, and humanoids. As"," ",a.jsx("a",{href:F,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(b,{posts:I,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(b,{posts:G,label:"Seen on X"})]})]}),a.jsxs("p",{className:"astra-note",children:["Listing is automatic: any paper tagged with both the"," ",a.jsx(n,{to:`/tasks/${x}`,children:"Robotics"})," task and the"," ",a.jsx(n,{to:`/methods/${f}`,children:"GPT-6 Astra"})," method appears here. Missing a report or preprint?"," ",a.jsx(n,{to:"/submit",children:"Submit it"}),"."]}),a.jsxs("div",{className:"task-section-head",style:{marginTop:36},children:[a.jsx("div",{className:"task-section-eyebrow",children:"Top trending · sort below"}),a.jsxs("div",{className:"task-section-title",children:["Papers ",a.jsxs("span",{className:"meta",children:["[",_.toLocaleString(),"]"]})]})]}),a.jsx("div",{className:"sort-bar",children:a.jsxs("div",{className:"paper-feed-toolbar-controls",children:[a.jsx("div",{className:"sort-options",children:C.map(([e,s])=>a.jsx("button",{type:"button",className:`sort-btn ${r===e?"active":""}`,onClick:()=>l("order_by",e==="trending"?null:e),children:s},e))}),a.jsx(k,{hasCode:h,hasHfArtifacts:d,onHasCodeChange:e=>l("has_code",e?"true":null),onHasHfArtifactsChange:e=>l("has_hf_artifacts",e?"true":null)})]})}),o.error?a.jsx(A,{variant:"destructive",children:a.jsx(w,{children:"Failed to load the collection. Please try again."})}):o.isLoading?a.jsx("div",{className:"paper-list",children:Array.from({length:3}).map((e,s)=>a.jsx(N,{className:"h-40 w-full"},s))}):m.length===0?a.jsx("div",{className:"no-results",children:"No papers match this selection yet."}):a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"paper-list",children:m.map((e,s)=>a.jsx(v,{paper:e,rank:s+1},e.id))}),a.jsx("div",{ref:j,style:{height:1}}),o.isFetchingNextPage&&a.jsx("div",{style:{padding:"20px 0",textAlign:"center",color:"var(--ink-faint)"},children:"Loading more…"})]})]})};export{W as default}; diff --git a/assets/AstraForRoboticsView-CqbM4y2W.js b/assets/AstraForRoboticsView-CqbM4y2W.js new file mode 100644 index 0000000000000000000000000000000000000000..aca0138d6444af12d56ecf088dfcec05eafe8d69 --- /dev/null +++ b/assets/AstraForRoboticsView-CqbM4y2W.js @@ -0,0 +1 @@ +import{r as h,j as a,L as o}from"./index-YwiKC6Po.js";import{u,b as g,a as x}from"./PaperFeed-kaLm5US2.js";import{A as f,a as b}from"./alert-Cx5luC5D.js";import{u as j}from"./usePapers-C1deOZKl.js";import{p as y,a as v}from"./paperQueryKeys-C5FMa4Oj.js";import{f as k,D as w}from"./latexPlainText-DI8YEXVe.js";import{t as A}from"./transform-CNg3rvXk.js";import"./PaperCard-FG-bEpJk.js";import"./AuthorAvatar-CoTET6B3.js";import"./SotaBadges-DiQuEzfo.js";import"./colors-BkWRhvFI.js";import"./Icon-DXQ4sjQk.js";import"./LatexTitle-DI6voLfI.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-D7ygxg37.js";import"./skeleton-CXR1qouH.js";import"./useIntersectionObserver-Dt36kyjs.js";import"./useQuery-DPH6Mb2w.js";import"./useInfiniteQuery-BEbL80ez.js";import"./curation-CkzNFTMJ.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"}],m=({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))})]}),J=()=>{var l,c;const s=u(),e=j([...y.feeds.infinite,{task:n,method:i,...s.filters}],r=>v.list({...s.filters,task:n,method:i,page:r,page_size:12}));h.useEffect(()=>(document.title=k("GPT-6 Astra for Robotics"),()=>{document.title=w}),[]);const t=h.useMemo(()=>{var r;return(((r=e.data)==null?void 0:r.pages)??[]).flatMap(p=>p.results.map(A))},[e.data]),d=((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(m,{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(m,{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:["[",d.toLocaleString(),"]"]})]})]}),a.jsx(g,{feed:s,showDateFilter:!1}),e.error?a.jsx(f,{variant:"destructive",children:a.jsx(b,{children:"Failed to load the collection. Please try again."})}):a.jsx(x,{query:e,cards:t,empty:"No papers match this selection yet."})]})};export{J as default}; diff --git a/assets/AuthorAvatar-UMHOVOr9.js b/assets/AuthorAvatar-CoTET6B3.js similarity index 86% rename from assets/AuthorAvatar-UMHOVOr9.js rename to assets/AuthorAvatar-CoTET6B3.js index 36ea43c067b6f1645db7a90007eed9e3b2624749..76e60178bda8b356fbe1cfe884e7e3fbcaf4f82c 100644 --- a/assets/AuthorAvatar-UMHOVOr9.js +++ b/assets/AuthorAvatar-CoTET6B3.js @@ -1 +1 @@ -import{r as c,j as e}from"./index-D6jcIRWs.js";const p=a=>a!=null&&a.startsWith("https://")&&!a.startsWith("https://huggingface.co/avatars/")?a:null,h=({url:a,className:o,href:t,label:n})=>{const[i,l]=c.useState(!1),s=i?null:p(a);if(!s)return null;const r=e.jsx("img",{className:`author-avatar-base ${o}`,src:s,alt:"",loading:"lazy",onError:()=>l(!0)});return t?e.jsx("a",{href:t,target:"_blank",rel:"noopener noreferrer","aria-label":n,children:r}):r};export{h as A}; +import{r as c,j as e}from"./index-YwiKC6Po.js";const p=a=>a!=null&&a.startsWith("https://")&&!a.startsWith("https://huggingface.co/avatars/")?a:null,h=({url:a,className:o,href:t,label:n})=>{const[i,l]=c.useState(!1),s=i?null:p(a);if(!s)return null;const r=e.jsx("img",{className:`author-avatar-base ${o}`,src:s,alt:"",loading:"lazy",onError:()=>l(!0)});return t?e.jsx("a",{href:t,target:"_blank",rel:"noopener noreferrer","aria-label":n,children:r}):r};export{h as A}; diff --git a/assets/AuthorDetailView-BsVP0aHv.js b/assets/AuthorDetailView-BsVP0aHv.js deleted file mode 100644 index c33a2f65657241ad03e045c44596fe66d973f71c..0000000000000000000000000000000000000000 --- a/assets/AuthorDetailView-BsVP0aHv.js +++ /dev/null @@ -1 +0,0 @@ -import{u as C,j as a,e as D,r as R,ah as k,L as w}from"./index-D6jcIRWs.js";import{u as H}from"./useQuery-CUJUm4FY.js";import{P as $}from"./components-DO1X940E.js";import{A as L}from"./AuthorAvatar-UMHOVOr9.js";import{a as O,P as z,b as B}from"./PaperDateFilter-CPIqaHaq.js";import{P as I}from"./PaperFeedFilters-DNebHp4l.js";import{R as T}from"./ResearchFollowButton-C2Bfd9dP.js";import{A as U,a as q}from"./alert-2MbxVzGL.js";import{S as y}from"./skeleton-BqkYFmXl.js";import{u as E}from"./useInfiniteScroll-Dm7JY_X4.js";import{u as M}from"./usePapers-BbCSwcVk.js";import{a as G}from"./papers-DIIIPDpj.js";import{t as K}from"./colors-CLwl8a2d.js";import A from"./NotFound-BTsJlVc8.js";import"./LatexTitle-D_92Jowu.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-DCjqGpW0.js";import"./useMutation-p6mN4h17.js";import"./research-BggtGgC2.js";import"./plus-C4UQ62Q1.js";import"./useIntersectionObserver-3LTuEaFW.js";import"./useInfiniteQuery-FXco4P1n.js";const Q=[["trending","trending"],["date_published","newest"],["citation_count","most cited"]],V=t=>t==="date_published"||t==="citation_count"?t:"trending",J=({authorId:t})=>{var g,f,x,_,j,b,N,v,P;const[n,d]=D(),h=V(n.get("order_by")),p=n.get("has_code")==="true",m=n.get("has_hf_artifacts")==="true",i=O(n),e=H({queryKey:["author",t],queryFn:()=>G.getAuthor(t)}),o=M({author:t,page_size:12,order_by:h,order_dir:"desc",include_resources:!0,has_code:p,has_hf_artifacts:m,start_date:i.startDate,end_date:i.endDate}),u=R.useMemo(()=>{var r;return(((r=o.data)==null?void 0:r.pages)??[]).flatMap(s=>s.results.map(K))},[o.data]),F=E(o),S=((f=(g=o.data)==null?void 0:g.pages[0])==null?void 0:f.count)??0,c=(r,s)=>{const l=new URLSearchParams(n);s?l.set(r,s):l.delete(r),d(l)};if(((x=e.error)==null?void 0:x.status)===404)return a.jsx(A,{});if((_=e.data)!=null&&_.organization_slug){const r=n.toString();return a.jsx(k,{to:`/orgs/${e.data.organization_slug}${r?`?${r}`:""}`,replace:!0})}return a.jsxs("div",{className:"page",children:[a.jsxs("nav",{className:"breadcrumb","aria-label":"Breadcrumb",children:[a.jsx(w,{to:"/",children:"Home"}),a.jsx("span",{children:" / "}),a.jsx("span",{children:"Authors"}),a.jsx("span",{children:" / "}),a.jsx("span",{children:((j=e.data)==null?void 0:j.full_name)??t})]}),a.jsxs("header",{className:"author-hero",children:[a.jsx("div",{className:"organizations-eyebrow",children:"AUTHOR"}),a.jsxs("div",{className:"author-hero-title",children:[(b=e.data)!=null&&b.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]})]}):((N=e.data)==null?void 0:N.hf_username)&&a.jsx(L,{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:((v=e.data)==null?void 0:v.full_name)??a.jsx(y,{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(T,{kind:"author",entityId:e.data.id})]}),a.jsxs("div",{className:"sort-bar",style:{alignItems:"center",gap:16},children:[a.jsxs("div",{className:"paper-feed-toolbar-controls",children:[a.jsx("div",{className:"sort-options",children:Q.map(([r,s])=>a.jsx("button",{type:"button",className:`sort-btn ${h===r?"active":""}`,onClick:()=>c("order_by",r==="trending"?null:r),children:s},r))}),a.jsx(I,{hasCode:p,hasHfArtifacts:m,onHasCodeChange:r=>c("has_code",r?"true":null),onHasHfArtifactsChange:r=>c("has_hf_artifacts",r?"true":null)})]}),a.jsx(z,{startDate:i.startDate,endDate:i.endDate,onChange:r=>d(B(n,r))}),a.jsxs("div",{className:"results-count",children:[S.toLocaleString()," papers"]})]}),o.error?a.jsx(U,{variant:"destructive",children:a.jsxs(q,{children:["Failed to load papers."," ",a.jsx("button",{type:"button",onClick:()=>void o.refetch(),children:"Try again"})]})}):o.isLoading?a.jsx("div",{className:"paper-list",children:Array.from({length:4}).map((r,s)=>a.jsx(y,{className:"h-40 w-full"},s))}):u.length===0?a.jsx("div",{className:"no-results",children:((P=e.data)==null?void 0:P.paper_count)===0?"No public papers are available.":"No papers found for this selection."}):a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"paper-list",children:u.map((r,s)=>a.jsx($,{paper:r,rank:s+1},r.id))}),a.jsx("div",{ref:F,style:{height:1}}),o.isFetchingNextPage&&a.jsx("div",{style:{padding:"20px 0",textAlign:"center"},children:"Loading more…"})]})]})},_a=()=>{const{authorId:t}=C();return t?a.jsx(J,{authorId:t},t):a.jsx(A,{})};export{_a as default}; diff --git a/assets/AuthorDetailView-ETu8URv_.js b/assets/AuthorDetailView-ETu8URv_.js new file mode 100644 index 0000000000000000000000000000000000000000..19e6d5a1a93a5f260e04e042fd207ac7ecce25ce --- /dev/null +++ b/assets/AuthorDetailView-ETu8URv_.js @@ -0,0 +1 @@ +import{u as b,j as a,r as N,ah as v,L as F}from"./index-YwiKC6Po.js";import{u as y}from"./useQuery-DPH6Mb2w.js";import{A}from"./AuthorAvatar-CoTET6B3.js";import{u as k,b as P,a as $}from"./PaperFeed-kaLm5US2.js";import{R as S}from"./ResearchFollowButton-BFXC8E3t.js";import{A as L,a as R}from"./alert-Cx5luC5D.js";import{S as w}from"./skeleton-CXR1qouH.js";import{u as z}from"./usePapers-C1deOZKl.js";import{p as C,a as m}from"./paperQueryKeys-C5FMa4Oj.js";import{i as H}from"./apiErrors-DBfE_SVR.js";import{t as q}from"./transform-CNg3rvXk.js";import f from"./NotFound-D8hwuoEl.js";import"./PaperCard-FG-bEpJk.js";import"./SotaBadges-DiQuEzfo.js";import"./colors-BkWRhvFI.js";import"./Icon-DXQ4sjQk.js";import"./LatexTitle-DI6voLfI.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-D7ygxg37.js";import"./useIntersectionObserver-Dt36kyjs.js";import"./useMutation-f6iDkf3w.js";import"./research-5UpiU-ea.js";import"./plus-Cfz0QbT1.js";import"./useInfiniteQuery-BEbL80ez.js";import"./curation-CkzNFTMJ.js";const Q=({authorId:r})=>{var n,i,l,p,c,d,h,u;const o=k(),{searchParams:g}=o,e=y({queryKey:["author",r],queryFn:()=>m.getAuthor(r)}),s=z([...C.feeds.infinite,{author:r,...o.filters}],t=>m.list({...o.filters,author:r,page:t,page_size:12})),x=N.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(v,{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(F,{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(A,{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(w,{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(S,{kind:"author",entityId:e.data.id})]}),a.jsx(P,{feed:o,style:{alignItems:"center",gap:16},children:a.jsxs("div",{className:"results-count",children:[j.toLocaleString()," papers"]})}),s.error?a.jsx(L,{variant:"destructive",children:a.jsxs(R,{children:["Failed to load papers."," ",a.jsx("button",{type:"button",onClick:()=>void s.refetch(),children:"Try again"})]})}):a.jsx($,{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."})]})},pa=()=>{const{authorId:r}=b();return r?a.jsx(Q,{authorId:r},r):a.jsx(f,{})};export{pa as default}; diff --git a/assets/AuthorizePaperEditView-mMhbmAG2.js b/assets/AuthorizePaperEditView-BxV6NPKV.js similarity index 87% rename from assets/AuthorizePaperEditView-mMhbmAG2.js rename to assets/AuthorizePaperEditView-BxV6NPKV.js index 3458dd081e244dccbee39fe37bbba41a25b4e445..100940af1aabd572d4d49dfd6c49fa14db50e506 100644 --- a/assets/AuthorizePaperEditView-mMhbmAG2.js +++ b/assets/AuthorizePaperEditView-BxV6NPKV.js @@ -1 +1 @@ -import{u,a as d,j as e,L as l,H as p}from"./index-D6jcIRWs.js";import{u as c}from"./useQuery-CUJUm4FY.js";import{u as h}from"./useMutation-p6mN4h17.js";import{B as m}from"./button-Bzx0ccHH.js";import{p as n}from"./paperEdits-DUTCoe5T.js";function b(){const{authorizationId:t=""}=u(),{user:s,isLoading:o}=d(),i=c({queryKey:["paper-edit-authorization",t],queryFn:()=>n.authorization(t),retry:!1}),r=h({mutationFn:()=>n.approve(t)}),a=i.data;return e.jsxs("main",{className:"mx-auto max-w-xl space-y-5 px-6 py-12",children:[e.jsx("h1",{className:"text-2xl font-semibold",children:"Authorize your agent to edit a paper"}),(i.isLoading||o)&&e.jsx("p",{children:"Loading authorization…"}),i.error&&e.jsx("p",{role:"alert",children:i.error.message}),a&&e.jsxs(e.Fragment,{children:[e.jsx(l,{className:"underline",to:`/paper/${a.paper_id}`,children:a.title}),e.jsxs("p",{children:["Check that your CLI shows this code: ",e.jsx("strong",{className:"font-mono",children:a.user_code})]}),e.jsx("p",{children:"Only approve a request you started. Your agent will be able to publish changes to this paper’s links, tags, and evaluation results for one hour, without further approval."}),e.jsx("p",{children:"Edits appear publicly under your Hugging Face username. You can edit up to 20 distinct papers per UTC day. Evaluation deletion and changes to shared benchmark definitions require an administrator."}),r.isSuccess||a.approved?e.jsx("p",{role:"status",children:"Access approved. Return to your CLI to continue."}):s?e.jsxs(e.Fragment,{children:[e.jsxs("p",{children:["Signed in as ",e.jsxs("strong",{children:["@",s.username]})]}),e.jsx(m,{disabled:r.isPending||!s.can_directly_edit_catalog,onClick:()=>r.mutate(),children:r.isPending?"Authorizing…":"Authorize for one hour"}),!s.can_directly_edit_catalog&&e.jsx("p",{children:"Direct editing is unavailable for this session."})]}):e.jsx(p,{returnTo:`/authorize-paper-edit/${t}`,label:"Sign in with Hugging Face"}),r.error&&e.jsx("p",{role:"alert",children:r.error.message})]})]})}export{b as default}; +import{u,a as d,j as e,L as l,H as p}from"./index-YwiKC6Po.js";import{u as c}from"./useQuery-DPH6Mb2w.js";import{u as h}from"./useMutation-f6iDkf3w.js";import{B as m}from"./button-B90pJJiy.js";import{p as n}from"./paperEdits-B8a9u4Tx.js";function b(){const{authorizationId:t=""}=u(),{user:s,isLoading:o}=d(),i=c({queryKey:["paper-edit-authorization",t],queryFn:()=>n.authorization(t),retry:!1}),r=h({mutationFn:()=>n.approve(t)}),a=i.data;return e.jsxs("main",{className:"mx-auto max-w-xl space-y-5 px-6 py-12",children:[e.jsx("h1",{className:"text-2xl font-semibold",children:"Authorize your agent to edit a paper"}),(i.isLoading||o)&&e.jsx("p",{children:"Loading authorization…"}),i.error&&e.jsx("p",{role:"alert",children:i.error.message}),a&&e.jsxs(e.Fragment,{children:[e.jsx(l,{className:"underline",to:`/paper/${a.paper_id}`,children:a.title}),e.jsxs("p",{children:["Check that your CLI shows this code: ",e.jsx("strong",{className:"font-mono",children:a.user_code})]}),e.jsx("p",{children:"Only approve a request you started. Your agent will be able to publish changes to this paper’s links, tags, and evaluation results for one hour, without further approval."}),e.jsx("p",{children:"Edits appear publicly under your Hugging Face username. You can edit up to 20 distinct papers per UTC day. Evaluation deletion and changes to shared benchmark definitions require an administrator."}),r.isSuccess||a.approved?e.jsx("p",{role:"status",children:"Access approved. Return to your CLI to continue."}):s?e.jsxs(e.Fragment,{children:[e.jsxs("p",{children:["Signed in as ",e.jsxs("strong",{children:["@",s.username]})]}),e.jsx(m,{disabled:r.isPending||!s.can_directly_edit_catalog,onClick:()=>r.mutate(),children:r.isPending?"Authorizing…":"Authorize for one hour"}),!s.can_directly_edit_catalog&&e.jsx("p",{children:"Direct editing is unavailable for this session."})]}):e.jsx(p,{returnTo:`/authorize-paper-edit/${t}`,label:"Sign in with Hugging Face"}),r.error&&e.jsx("p",{role:"alert",children:r.error.message})]})]})}export{b as default}; diff --git a/assets/AutonomousOperations-BNbcighz.js b/assets/AutonomousOperations-epH5w9S2.js similarity index 93% rename from assets/AutonomousOperations-BNbcighz.js rename to assets/AutonomousOperations-epH5w9S2.js index 37b2acc52d234292c08e8643fee53e2f517a141d..5aa11e92bbe75efbb321ae897bbb16956f35f6e4 100644 --- a/assets/AutonomousOperations-BNbcighz.js +++ b/assets/AutonomousOperations-epH5w9S2.js @@ -1 +1 @@ -import{f as R,r as d,j as e,L as B}from"./index-D6jcIRWs.js";import{u as q}from"./useQuery-CUJUm4FY.js";import{u as H}from"./useMutation-p6mN4h17.js";import{C as n,e as i,S as I,b as l,c as r,t as C,f as m,o as x}from"./CronDashboard-B0sjsUM_.js";import{B as Q}from"./badge-t4oak8yc.js";import{B as h}from"./button-Bzx0ccHH.js";import{I as u}from"./input-CCN-4hy4.js";import{A as P}from"./activity-5IcAhZoH.js";import{A as D}from"./arrow-left-IzGlownM.js";const j={submissions:"Submission review",curation:"Scheduled curation",cron_health:"CRON health",chat_reliability:"Chat reliability"},E={healthy:"healthy",degraded:"degraded",repairing:"running","rolled-back":"broken",manual:"degraded"},S=["admin","autonomousOperations"],W=()=>{var A;const M=R(),[p,T]=d.useState(""),[f,_]=d.useState(""),[g,v]=d.useState({}),[b,N]=d.useState(""),c=q({queryKey:S,queryFn:()=>x.getAutonomousOperations(),refetchInterval:3e4,retry:!1}),t=H({mutationFn:s=>s(),onSuccess:s=>{M.setQueryData(S,s),_(""),v({}),N("")}}),a=c.data,y=t.error instanceof Error?t.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=()=>t.mutate(()=>x.setAutonomousManualMode(!a.manual_mode,a.revision,f)),k=(s,o)=>t.mutate(()=>x.setAutonomousOperator(s,o,a.revision,g[s]??"")),w=()=>{var o;const s=((o=a.baseline)==null?void 0:o.revision)??0;t.mutate(()=>x.qualifyAutonomousChatBaseline(p,s,b))};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(B,{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(I,{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:C(E[a.display_state]),children:[e.jsx(l,{children:e.jsx(r,{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(r,{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(r,{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(r,{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:t.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:C(E[s.status]),children:[e.jsx(l,{children:e.jsxs(r,{className:"flex justify-between gap-2",children:[e.jsx("span",{children:j[s.operator]}),e.jsx(Q,{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:g[s.operator]??"",onChange:o=>v(L=>({...L,[s.operator]:o.target.value})),placeholder:"Type SET_OPERATOR_STATE"}),e.jsx(h,{disabled:t.isPending||a.manual_mode&&!s.enabled||g[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(r,{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:b,onChange:s=>N(s.target.value),placeholder:"Type QUALIFY_CHAT_BASELINE"}),e.jsx(h,{disabled:t.isPending||!/^[0-9a-f]{40}$/.test(p)||b!=="QUALIFY_CHAT_BASELINE",onClick:w,children:"Qualify exact SHA"})]})]})]}),e.jsxs(n,{children:[e.jsx(l,{children:e.jsx(r,{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(r,{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(r,{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(r,{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{W as default}; +import{f as R,r as d,j as e,L as B}from"./index-YwiKC6Po.js";import{u as q}from"./useQuery-DPH6Mb2w.js";import{u as H}from"./useMutation-f6iDkf3w.js";import{C as n,e as i,S as I,b as l,c as r,t as C,f as m,o as x}from"./CronDashboard-DcLcBHdd.js";import{B as Q}from"./badge-CFf6CiSg.js";import{B as h}from"./button-B90pJJiy.js";import{I as u}from"./input-DEeEc0bH.js";import{A as P}from"./activity-95309hog.js";import{A as D}from"./arrow-left-B08fyfNi.js";const j={submissions:"Submission review",curation:"Scheduled curation",cron_health:"CRON health",chat_reliability:"Chat reliability"},E={healthy:"healthy",degraded:"degraded",repairing:"running","rolled-back":"broken",manual:"degraded"},S=["admin","autonomousOperations"],W=()=>{var A;const M=R(),[p,T]=d.useState(""),[f,_]=d.useState(""),[g,v]=d.useState({}),[b,N]=d.useState(""),c=q({queryKey:S,queryFn:()=>x.getAutonomousOperations(),refetchInterval:3e4,retry:!1}),t=H({mutationFn:s=>s(),onSuccess:s=>{M.setQueryData(S,s),_(""),v({}),N("")}}),a=c.data,y=t.error instanceof Error?t.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=()=>t.mutate(()=>x.setAutonomousManualMode(!a.manual_mode,a.revision,f)),k=(s,o)=>t.mutate(()=>x.setAutonomousOperator(s,o,a.revision,g[s]??"")),w=()=>{var o;const s=((o=a.baseline)==null?void 0:o.revision)??0;t.mutate(()=>x.qualifyAutonomousChatBaseline(p,s,b))};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(B,{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(I,{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:C(E[a.display_state]),children:[e.jsx(l,{children:e.jsx(r,{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(r,{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(r,{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(r,{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:t.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:C(E[s.status]),children:[e.jsx(l,{children:e.jsxs(r,{className:"flex justify-between gap-2",children:[e.jsx("span",{children:j[s.operator]}),e.jsx(Q,{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:g[s.operator]??"",onChange:o=>v(L=>({...L,[s.operator]:o.target.value})),placeholder:"Type SET_OPERATOR_STATE"}),e.jsx(h,{disabled:t.isPending||a.manual_mode&&!s.enabled||g[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(r,{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:b,onChange:s=>N(s.target.value),placeholder:"Type QUALIFY_CHAT_BASELINE"}),e.jsx(h,{disabled:t.isPending||!/^[0-9a-f]{40}$/.test(p)||b!=="QUALIFY_CHAT_BASELINE",onClick:w,children:"Qualify exact SHA"})]})]})]}),e.jsxs(n,{children:[e.jsx(l,{children:e.jsx(r,{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(r,{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(r,{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(r,{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{W as default}; diff --git a/assets/BenchmarkDetailView-CzOCvqTF.js b/assets/BenchmarkDetailView-CzOCvqTF.js new file mode 100644 index 0000000000000000000000000000000000000000..fb7c35416cd87f828006535a0767b0c57d83841a --- /dev/null +++ b/assets/BenchmarkDetailView-CzOCvqTF.js @@ -0,0 +1,2 @@ +import{r as L,j as a,D as le,L as ne,c as ot,p as ct,u as dt,e as ut,q as mt}from"./index-YwiKC6Po.js";import{R as ht}from"./ResearchFollowButton-BFXC8E3t.js";import{u as te}from"./useQuery-DPH6Mb2w.js";import{c as re}from"./catalog-B15Yh5dN.js";import{C as ft,E as pt,e as gt}from"./ExternalSourceEvalBadge-CimjRPVg.js";import{L as oe}from"./LatexTitle-DI6voLfI.js";import{S as Ke}from"./switch-Crqp0RkL.js";import{I as xt}from"./Icon-DXQ4sjQk.js";import{S as ce}from"./skeleton-CXR1qouH.js";import{A as bt,a as yt}from"./alert-Cx5luC5D.js";import{B as wt}from"./BenchmarkTrendSparkline-BBLKxMdW.js";import{s as vt}from"./safeExternalHref-CkBrsh84.js";import{s as jt}from"./slug-BpH-Nkvz.js";import{i as _t}from"./apiErrors-DBfE_SVR.js";import St from"./NotFound-D8hwuoEl.js";import"./useMutation-f6iDkf3w.js";import"./research-5UpiU-ea.js";import"./plus-Cfz0QbT1.js";import"./curation-CkzNFTMJ.js";import"./hover-card-BY9tUGxy.js";import"./index-BaDZKp6X.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 Ge=[{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 kt(e){const t=e===null?void 0:Number(e);return Ge.some(r=>r.maxParametersExclusive===t)?t:void 0}function Ct(e){return new Intl.NumberFormat("en",{notation:"compact",maximumSignificantDigits:3}).format(e)}function Et(e){return[e.paper_id,e.task_id,e.dataset_id,e.model_name,e.harness??""].join("|")}function Nt(e){const t=new Map;for(const r of e){const s=Et(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 Le(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 Mt(e,t){const r=e.evaluated_on;return r&&r!==t&&r!==Pt(e.updated_at)?r:e.paper_published_date||""}function Tt(e,t,r){if(e.length===0)return{points:[],sota:0,sotaModel:""};const s=$t(e),n=e.map(u=>{var R;const h=ie((R=u.metrics)==null?void 0:R[t]);return{eval:u,value:h,date:Mt(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 Ft(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 Qe(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 Lt(e){var _,X,Y;const{evaluations:t,tasks:r,taskSlug:s,highlightEvalId:n,parameterBound:i,showMoreMetrics:l,fittingMetricCount:c=1}=e,d=Qe(r,t,s,n),f=r.find(o=>o.id===d)||r[0]||null,x=t.find(o=>o.id===n),u=Ft(t,d,e.hideClosed),h=Nt(u.visible),R=Le(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]:[],U=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:Ie(o,j)-Ie(m,j)});let I=null,N=0;const Q=U.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:Rt(o,n)}}),{points:z,sota:ee,sotaModel:O}=Tt(R,j,D),M=i===void 0?e.initialSummary:void 0,q=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:Q,chartPoints:z,highlightedEval:((Y=Q.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:Ge.map(o=>({...o,selected:i===o.maxParametersExclusive,disabled:i!==o.maxParametersExclusive&&Le(h,o.maxParametersExclusive).length===0})),displayedMetric:q?j:M==null?void 0:M.metric,displayedSota:q?ee:M==null?void 0:M.value,displayedSotaModel:q?O:M==null?void 0:M.model_name,isSummaryLoading:!q&&!M,isInitialFilteredViewLoading:i!==void 0&&!q}}function It(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+he(t,s),0),harness:he(t,"--bm-harness-width"),metric:he(t,"--bm-metric-width")}}const Bt=20;function Ae(e,t){return e?a.jsx(oe,{title:e}):t||"—"}function Dt({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=At(R);f.classList.toggle("unpins-trailing-columns",CS.clientHeight?0:Bt;n(k=>It(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(ft,{}),(u.external??u.is_external)&&a.jsx(pt,{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?"—":Ct(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:Ae(u.paper_title,P)}):Ae(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 Be(e){const t=e.length===7?`${e}-01`:e,r=new Date(t).getTime();return Number.isFinite(r)?r:0}const fe=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function pe(e){const t=new Date(e);return{year:t.getFullYear(),month:t.getMonth()}}function Ht(e,t){if(e===t){const{year:d,month:f}=pe(e);return[{timestamp:new Date(d,f,1).getTime(),key:`${d}-${f}`,label:`${fe[f]} ${d}`}]}const r=pe(e),s=pe(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?`${fe[h]} ${r.year}`:fe[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 Vt=({points:e,metric:t})=>{const r=ot(),[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=>Be(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(Be(o.date)),y=(o.value-h)/C,$=f+S*(1-y);return{x:p,y:$,data:o,idx:m}}),w=W.filter(o=>o.data.isSota);let U="";if(w.length>=2){U=`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 $=o.x-y/2,E=o.x+y/2,v="middle";return $i-d&&(E=i-d,$=E-y,v="end"),{x:v==="start"?c:v==="end"?i-d:o.x,y:o.y-Q,text:p,anchor:v,left:$,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 q=Ht(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}`,$=!!o.data.paperRouteId;return a.jsxs("g",{children:[m,a.jsx("circle",{cx:o.x,cy:o.y,r:"10",fill:"transparent",style:{cursor:$?"pointer":"default",outline:"none"},tabIndex:0,role:$?"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=>{$&&(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),$=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($)})]},m)}),q.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"}}))}),U&&a.jsx("path",{d:U,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 G=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:G,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:G+19,fontSize:"12",fontFamily:"var(--sans)",fill:"var(--ink)",fontWeight:500,children:y})]})})()]})};function Wt(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 Ot=(()=>{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 Gt(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 Qt(e){return Promise.resolve().then(()=>new XMLSerializer().serializeToString(e)).then(encodeURIComponent).then(t=>`data:image/svg+xml;charset=utf-8,${t}`)}async function Xt(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),Qt(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 Yt(e){const t=e.getPropertyValue("content");return`${e.cssText} content: '${t.replace(/'|"/g,"")}';`}function Jt(e,t){return Xe(t).map(r=>{const s=e.getPropertyValue(r),n=e.getPropertyPriority(r);return`${r}: ${s}${n?" !important":""};`}).join(" ")}function Zt(e,t,r,s){const n=`.${e}:${t}`,i=r.cssText?Yt(r):Jt(r,s);return document.createTextNode(`${n}{${i}}`)}function De(e,t,r,s){const n=window.getComputedStyle(e,r),i=n.getPropertyValue("content");if(i===""||i==="none")return;const l=Ot();try{t.className=`${t.className} ${l}`}catch{return}const c=document.createElement("style");c.appendChild(Zt(l,r,n,s)),t.appendChild(c)}function er(e,t,r){De(e,t,":before",r),De(e,t,":after",r)}const He="application/font-woff",Ve="image/jpeg",tr={woff:He,woff2:He,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:Ve,jpeg:Ve,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml",webp:"image/webp"};function rr(e){const t=/\.([^./]*?)$/g.exec(e);return t?t[1]:""}function ye(e){const t=rr(e).toLowerCase();return tr[t]||""}function ar(e){return e.split(/,/)[1]}function xe(e){return e.search(/^(data:)/)!==-1}function sr(e,t){return`data:${t};base64,${e}`}async function Je(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 ge={};function nr(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 we(e,t,r){const s=nr(e,t,r.includeQueryParams);if(ge[s]!=null)return ge[s];r.cacheBust&&(e+=(/\?/.test(e)?"&":"?")+new Date().getTime());let n;try{const i=await Je(e,r.fetchRequestInit,({res:l,result:c})=>(t||(t=l.headers.get("Content-Type")||""),ar(c)));n=sr(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 ge[s]=n,n}async function ir(e){const t=e.toDataURL();return t==="data:,"?e.cloneNode(!1):ue(t)}async function lr(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 ue(c)}const r=e.poster,s=ye(r),n=await we(r,s,t);return ue(n)}async function or(e,t){var r;try{if(!((r=e==null?void 0:e.contentDocument)===null||r===void 0)&&r.body)return await me(e.contentDocument.body,t,!0)}catch{}return e.cloneNode(!1)}async function cr(e,t){return A(e,HTMLCanvasElement)?ir(e):A(e,HTMLVideoElement)?lr(e,t):A(e,HTMLIFrameElement)?or(e,t):e.cloneNode(Ze(e))}const dr=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SLOT",Ze=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SVG";async function ur(e,t,r){var s,n;if(Ze(t))return t;let i=[];return dr(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(()=>me(c,r)).then(d=>{d&&t.appendChild(d)}),Promise.resolve()),t}function mr(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):Xe(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 hr(e,t){A(e,HTMLTextAreaElement)&&(t.innerHTML=e.value),A(e,HTMLInputElement)&&t.setAttribute("value",e.value)}function fr(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 pr(e,t,r){return A(t,Element)&&(mr(e,t,r),er(e,t,r),hr(e,t),fr(e,t)),t}async function gr(e,t){const r=e.querySelectorAll?e.querySelectorAll("use"):[];if(r.length===0)return e;const s={};for(let i=0;icr(s,t)).then(s=>ur(e,s,t)).then(s=>pr(e,s,t)).then(s=>gr(s,t))}const et=/url\((['"]?)([^'"]+?)\1\)/g,xr=/url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g,br=/src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;function yr(e){const t=e.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1");return new RegExp(`(url\\(['"]?)(${t})(['"]?\\))`,"g")}function wr(e){const t=[];return e.replace(et,(r,s,n)=>(t.push(n),r)),t.filter(r=>!xe(r))}async function vr(e,t,r,s,n){try{const i=r?Wt(t,r):t,l=ye(t);let c;return n||(c=await we(i,l,s)),e.replace(yr(t),`$1${c}$3`)}catch{}return e}function jr(e,{preferredFontFormat:t}){return t?e.replace(br,r=>{for(;;){const[s,,n]=xr.exec(r)||[];if(!n)return"";if(n===t)return`src: ${s};`}}):e}function tt(e){return e.search(et)!==-1}async function rt(e,t,r){if(!tt(e))return e;const s=jr(e,r);return wr(s).reduce((i,l)=>i.then(c=>vr(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 rt(n,null,r);return t.style.setProperty(e,i,t.style.getPropertyPriority(e)),!0}return!1}async function _r(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 Sr(e,t){const r=A(e,HTMLImageElement);if(!(r&&!xe(e.src))&&!(A(e,SVGImageElement)&&!xe(e.href.baseVal)))return;const s=r?e.src:e.href.baseVal,n=await we(s,ye(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 kr(e,t){const s=Z(e.childNodes).map(n=>at(n,t));await Promise.all(s).then(()=>e)}async function at(e,t){A(e,Element)&&(await _r(e,t),await Sr(e,t),await kr(e,t))}function Cr(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 We={};async function Oe(e){let t=We[e];if(t!=null)return t;const s=await(await fetch(e)).text();return t={url:e,cssText:s},We[e]=t,t}async function qe(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),Je(c,t.fetchRequestInit,({result:d})=>(r=r.replace(l,`url(${d})`),[l,d]))});return Promise.all(i).then(()=>r)}function Ue(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 Er(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=Oe(d).then(x=>qe(x,t)).then(x=>Ue(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(Oe(n.href).then(c=>qe(c,t)).then(c=>Ue(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 Nr(e){return e.filter(t=>t.type===CSSRule.FONT_FACE_RULE).filter(t=>tt(t.style.getPropertyValue("src")))}async function Rr(e,t){if(e.ownerDocument==null)throw new Error("Provided element is not within a Document");const r=Z(e.ownerDocument.styleSheets),s=await Er(r,t);return Nr(s)}function st(e){return e.trim().replace(/["']/g,"")}function Pr(e){const t=new Set;function r(s){(s.style.fontFamily||getComputedStyle(s).fontFamily).split(",").forEach(i=>{t.add(st(i))}),Array.from(s.children).forEach(i=>{i instanceof HTMLElement&&r(i)})}return r(e),t}async function $r(e,t){const r=await Rr(e,t),s=Pr(e);return(await Promise.all(r.filter(i=>s.has(st(i.style.fontFamily))).map(i=>{const l=i.parentStyleSheet?i.parentStyleSheet.href:null;return rt(i.cssText,l,t)}))).join(` +`)}async function Mr(e,t){const r=t.fontEmbedCSS!=null?t.fontEmbedCSS:t.skipFonts?null:await $r(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 Tr(e,t={}){const{width:r,height:s}=Ye(e,t),n=await me(e,t,!0);return await Mr(n,t),await at(n,t),Cr(n,t),await Xt(n,r,s)}async function Fr(e,t={}){const{width:r,height:s}=Ye(e,t),n=await Tr(e,t),i=await ue(n),l=document.createElement("canvas"),c=l.getContext("2d"),d=t.pixelRatio||zt(),f=t.canvasWidth||r,x=t.canvasHeight||s;return l.width=f*d,l.height=x*d,t.skipAutoScale||Kt(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 Lr(e,t={}){const r=await Fr(e,t);return await Gt(r)}const be="#ffffff";function Ir(){return typeof window>"u"?be:window.getComputedStyle(document.documentElement).getPropertyValue("--bg-elevated").trim()||be}function Ar(e){if(typeof window>"u")return be;const t=window.getComputedStyle(e).backgroundColor;return!t||t==="rgba(0, 0, 0, 0)"||t==="transparent"?Ir():t}async function Br(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 Lr(e,{pixelRatio:2,cacheBust:!0,backgroundColor:Ar(e)});if(!t)throw new Error("Failed to render screenshot.");await window.navigator.clipboard.write([new window.ClipboardItem({"image/png":t})])}const nt=({targetRef:e,label:t})=>{const{toast:r}=ct(),[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 Br(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(xt,{name:"copy",size:11}),c]})};function Dr({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(Ke,{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(nt,{targetRef:i,label:"SOTA chart"})]})]}),a.jsx("div",{className:"bm-chart-wrap",children:a.jsx(Vt,{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 Hr(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 ze(e,t){return e?a.jsx(oe,{title:e}):t||"—"}const oa=()=>{var ve,je,_e,Se,ke,Ce,Ee,Ne,Re,Pe,$e;const{datasetSlug:e}=dt(),[t,r]=ut(),s=t.get("task")||void 0,n=t.get("eval")||void 0,i=kt(t.get("max_parameters_exclusive")),{preferences:l,setHideClosedSourceEvals:c}=mt(),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:["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:10*60*1e3}),k=te({queryKey:["dataset-evals",(ve=g.data)==null?void 0:ve.id],queryFn:()=>gt.byDataset(g.data.id),enabled:!!((je=g.data)!=null&&je.id),staleTime:5*60*1e3}),B=te({queryKey:["dataset-tasks",(_e=g.data)==null?void 0:_e.id],queryFn:()=>re.datasetTasks(g.data.id),enabled:!!((Se=g.data)!=null&&Se.id),staleTime:10*60*1e3}),j=te({queryKey:["metric-directions"],queryFn:()=>re.metricDirections(),staleTime:60*60*1e3}),D=Qe(B.data||[],k.data||[],s,n),W=te({queryKey:["task-benchmark-trends",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&&!!((ke=g.data)!=null&&ke.id),staleTime:10*60*1e3}),w=L.useMemo(()=>{var b;return(((b=W.data)==null?void 0:b.results)||[]).find(T=>{var F;return T.id===((F=g.data)==null?void 0:F.id)})||null},[W.data,(Ce=g.data)==null?void 0:Ce.id]),U=te({queryKey:["leaderboard-metrics",(Ee=g.data)==null?void 0:Ee.id,D],queryFn:()=>re.leaderboardMetrics(g.data.id,D),enabled:!!((Ne=g.data)!=null&&Ne.id)&&!!D,staleTime:10*60*1e3}),I=Lt({evaluations:k.data||[],tasks:B.data||[],configuredMetrics:U.data||[],directions:j.data,initialSummary:(Re=g.data)==null?void 0:Re.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:U.isSuccess}}),{primaryTask:N,hiddenClosedEvals:Q,hiddenClosedTopEval:z,isSummaryLoading:ee,displayedMetric:O,displayedSota:M,displayedSotaModel:q,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:["area",N==null?void 0:N.area_id],queryFn:()=>re.getArea(N.area_id),enabled:!!(N!=null&&N.area_id),staleTime:10*60*1e3});if(g.isLoading)return a.jsxs("div",{className:"page",children:[a.jsx(ce,{className:"h-12 w-1/2 mb-6"}),a.jsx(ce,{className:"h-64 w-full"})]});if(_t(g.error))return a.jsx(St,{});if(g.error||!g.data)return a.jsx("div",{className:"page",children:a.jsx(bt,{variant:"destructive",children:a.jsx(yt,{children:"Benchmark not found."})})});const p=g.data,y=!!p.supports_harness,$=b=>{r(T=>{const F=new URLSearchParams(T);return b===void 0?F.delete("max_parameters_exclusive"):F.set("max_parameters_exclusive",String(b)),F})},E=b=>{r(T=>{const F=new URLSearchParams(T);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)||Hr(p.paper_url),J=(v==null?void 0:v.title)||p.introducing_paper_title||null,G=((Pe=v==null?void 0:v.published)==null?void 0:Pe.slice(0,4))||p.introduced_year||null,it=!!H||!!p.paper_url||!!J,lt=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-${jt(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(wt,{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(ht,{kind:"benchmark",entityId:p.id}),a.jsxs("div",{className:"bm-subtitle",children:[ee?a.jsx(ce,{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:"·"})]}),q?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:q})]}):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&&Q.length>0&&a.jsxs("div",{className:"bm-hidden-closed-notice",children:[a.jsxs("span",{children:[Q.length," closed-source ",Q.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"})]}),it&&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(oe,{title:J}):lt}),G&&a.jsx("span",{className:"method-source-meta",children:G})]}):p.paper_url?a.jsxs("a",{href:vt(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(oe,{title:J}):p.paper_url}),G&&a.jsx("span",{className:"method-source-meta",children:G})]}):a.jsxs("div",{className:"method-source-link is-static",children:[a.jsx("span",{className:"method-source-title",children:J?a.jsx(oe,{title:J}):null}),G&&a.jsx("span",{className:"method-source-meta",children:G})]})]}),a.jsx(Dr,{model:I,datasetName:p.name,hideClosed:l.hide_closed_source_evals,setHideClosed:c,setMetric:E}),_&&(()=>{var Te,Fe;const b=_.paper_arxiv_id||_.paper_id,T=_.paper_title||(_.paper_arxiv_id?`arXiv:${_.paper_arxiv_id}`:null),F=_.best_metric&&((Te=_.metrics)==null?void 0:Te[_.best_metric])!==void 0?_.best_metric:I.activeMetric,Me=(Fe=_.metrics)==null?void 0:Fe[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||T||"—",_.harness?` · ${_.harness}`:""]}),a.jsxs("span",{className:"bm-highlight-meta",children:[Me!==void 0&&F?a.jsxs(a.Fragment,{children:[F,": ",le(Me),T?" · ":""]}):null,b?a.jsx(ne,{to:`/paper/${b}`,children:ze(_.paper_title,T)}):ze(_.paper_title,T)]})]})]})})(),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(Ke,{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(nt,{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:T,disabled:F}=b;return a.jsx("button",{type:"button",className:`bm-parameter-filter-option${T?" is-active":""}`,"aria-pressed":T,disabled:F,onClick:()=>$(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,T)=>a.jsx(ce,{className:"h-10 w-full mb-2"},T))}):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:()=>$(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(Dt,{model:I,showHarness:y,setMetric:E,highlightRowRef:d,onFittingMetricCountChange:S})]})]})]})})};export{oa as default}; diff --git a/assets/BenchmarkDetailView-DGAxl02Y.js b/assets/BenchmarkDetailView-DGAxl02Y.js deleted file mode 100644 index bcd089d17090e80d13865010cef36d0d6452ac06..0000000000000000000000000000000000000000 --- a/assets/BenchmarkDetailView-DGAxl02Y.js +++ /dev/null @@ -1,2 +0,0 @@ -import{r as L,j as a,E as le,L as ne,c as ct,p as ot,u as dt,e as ut,q as mt}from"./index-D6jcIRWs.js";import{R as ht}from"./ResearchFollowButton-C2Bfd9dP.js";import{u as te}from"./useQuery-CUJUm4FY.js";import{c as re}from"./catalog-PYrB8_bm.js";import{C as ft,E as pt,e as gt}from"./ExternalSourceEvalBadge-DfhTt9yv.js";import{L as ce}from"./LatexTitle-D_92Jowu.js";import{S as Ke}from"./switch-D_MyRbto.js";import{I as xt}from"./components-DO1X940E.js";import{S as oe}from"./skeleton-BqkYFmXl.js";import{A as bt,a as yt}from"./alert-2MbxVzGL.js";import{B as wt}from"./BenchmarkTrendSparkline-BfAoxAzu.js";import{s as vt}from"./safeExternalHref-CkBrsh84.js";import{s as jt}from"./slug-BpH-Nkvz.js";import"./useMutation-p6mN4h17.js";import"./research-BggtGgC2.js";import"./plus-C4UQ62Q1.js";import"./papers-DIIIPDpj.js";import"./hover-card-DPpv0l_x.js";import"./index-DIg7XGE2.js";import"./AuthorAvatar-UMHOVOr9.js";import"./colors-CLwl8a2d.js";function _t(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,o)=>l?(o.best_rank??Number.POSITIVE_INFINITY)<(l.best_rank??Number.POSITIVE_INFINITY)?o:l:o,null);return{visible:r?s.filter(l=>l.is_open!==!1):s,hiddenClosed:n,topHiddenClosed:i}}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 Ge=[{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 St(e){const t=e===null?void 0:Number(e);return Ge.some(r=>r.maxParametersExclusive===t)?t:void 0}function kt(e){return new Intl.NumberFormat("en",{notation:"compact",maximumSignificantDigits:3}).format(e)}function Ct(e){return[e.paper_id,e.task_id,e.dataset_id,e.model_name,e.harness??""].join("|")}function Et(e){const t=new Map;for(const r of e){const s=Ct(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 Le(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 $t(e,t){const r=e.evaluated_on;return r&&r!==t&&r!==Rt(e.updated_at)?r:e.paper_published_date||""}function Mt(e,t,r){if(e.length===0)return{points:[],sota:0,sotaModel:""};const s=Pt(e),n=e.map(u=>{var R;const h=ie((R=u.metrics)==null?void 0:R[t]);return{eval:u,value:h,date:$t(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 Qe(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,o=-1;for(const d of e){const f=i.get(d.id)||0;f>o&&(o=f,l=d.id)}if(l)return l}return e[0].id}function Tt(e){var _,X,Y;const{evaluations:t,tasks:r,taskSlug:s,highlightEvalId:n,parameterBound:i,showMoreMetrics:l,fittingMetricCount:o=1}=e,d=Qe(r,t,s,n),f=r.find(c=>c.id===d)||r[0]||null,x=t.find(c=>c.id===n),u=_t(t,d,e.hideClosed),h=Et(u.visible),R=Le(h,i),C=e.configuredMetrics.map(c=>c.metric_name),P=Array.from(new Set(h.flatMap(c=>[...c.best_metric?[c.best_metric]:[],...Object.keys(c.metrics||{})]))),S=C.length?C:P,g=new Map;for(const c of h){const m=c.best_metric;!m||ie(c.metrics[m])===null||C.length&&!S.includes(m)||g.set(m,(g.get(m)||0)+1)}const k=((_=[...g].sort((c,m)=>m[1]-c[1])[0])==null?void 0:_[0])||S[0]||"",j=S.find(c=>{var m;return c.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(c=>c!==j)]:S,w=W.length?l?W:W.slice(0,Math.max(1,o)):j?[j]:[],U=R.slice().sort((c,m)=>{const p=ie(c.metrics[j]),y=ie(m.metrics[j]);return p!==null&&y!==null?D==="↓"?p-y:y-p:p!==null?-1:y!==null?1:Ie(c,j)-Ie(m,j)});let I=null,N=0;const Q=U.map((c,m)=>{const p=ie(c.metrics[j]);return p!==null&&p!==I&&(I=p,N=m+1),{evaluation:c,rank:p===null?null:N,isHighlighted:Nt(c,n)}}),{points:z,sota:ee,sotaModel:O}=Mt(R,j,D),M=i===void 0?e.initialSummary:void 0,q=e.ready.evaluations&&e.ready.tasks&&e.ready.directions&&(!d||e.ready.metrics),K={parameter_coverage_known:h.filter(c=>c.parameterCount!==null).length,parameter_coverage_total:h.length};return{currentTaskId:d,primaryTask:f,activeMetric:j,arrow:D,allowedMetrics:S,orderedMetrics:W,visibleMetrics:w,rows:Q,chartPoints:z,highlightedEval:((Y=Q.find(c=>c.isHighlighted))==null?void 0:Y.evaluation)||null,hiddenClosedEvals:u.hiddenClosed,hiddenClosedTopEval:u.topHiddenClosed,parameterBound:i,parameterCoverage:K,hasParameterMetadata:K.parameter_coverage_known>0,parameterFilters:Ge.map(c=>({...c,selected:i===c.maxParametersExclusive,disabled:i!==c.maxParametersExclusive&&Le(h,c.maxParametersExclusive).length===0})),displayedMetric:q?j:M==null?void 0:M.metric,displayedSota:q?ee:M==null?void 0:M.value,displayedSotaModel:q?O:M==null?void 0:M.model_name,isSummaryLoading:!q&&!M,isInitialFilteredViewLoading:i!==void 0&&!q}}function Ft(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+he(t,s),0),harness:he(t,"--bm-harness-width"),metric:he(t,"--bm-metric-width")}}const It=20;function Ae(e,t){return e?a.jsx(ce,{title:e}):t||"—"}function At({model:e,showHarness:t,setMetric:r,highlightRowRef:s,onFittingMetricCountChange:n}){const{rows:i,visibleMetrics:l,activeMetric:o,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=Lt(R);f.classList.toggle("unpins-trailing-columns",CS.clientHeight?0:It;n(k=>Ft(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===o;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(ft,{}),(u.external??u.is_external)&&a.jsx(pt,{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?"—":kt(u.parameterCount)}),t&&a.jsx("td",{className:"col-harness",children:u.harness||"—"}),l.map(g=>{var j;const k=g===o,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:Ae(u.paper_title,P)}):Ae(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 Be(e){const t=e.length===7?`${e}-01`:e,r=new Date(t).getTime();return Number.isFinite(r)?r:0}const fe=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function pe(e){const t=new Date(e);return{year:t.getFullYear(),month:t.getMonth()}}function Bt(e,t){if(e===t){const{year:d,month:f}=pe(e);return[{timestamp:new Date(d,f,1).getTime(),key:`${d}-${f}`,label:`${fe[f]} ${d}`}]}const r=pe(e),s=pe(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?`${fe[h]} ${r.year}`:fe[h]});return u}const n=s.year-r.year+1;let i=1;const l=12;n>l&&(i=Math.ceil(n/l));const o=[];for(let d=r.year;d<=s.year;d+=i)o.push({timestamp:new Date(d,0,1).getTime(),key:String(d),label:String(d)});return o}const Dt=({points:e,metric:t})=>{const r=ct(),[s,n]=L.useState(null),i=880,l=320,o=60,d=30,f=40,x=50,u=e.map(c=>c.value),h=Math.min(...u),C=Math.max(...u)-h||1,P=i-o-d,S=l-f-x,g=e.map(c=>Be(c.date)),k=Math.min(...g),B=Math.max(...g),j=B-k||1,D=c=>k===B?o+P/2:o+(c-k)/j*P,W=e.map((c,m)=>{const p=D(Be(c.date)),y=(c.value-h)/C,$=f+S*(1-y);return{x:p,y:$,data:c,idx:m}}),w=W.filter(c=>c.data.isSota);let U="";if(w.length>=2){U=`M${w[0].x},${w[0].y}`;for(let c=1;c{const m=c.data.modelName||c.data.paperTitle||"";if(!m)return null;const p=m.length>22?m.slice(0,21)+"…":m,y=p.length*I;let $=c.x-y/2,E=c.x+y/2,v="middle";return $i-d&&(E=i-d,$=E-y,v="end"),{x:v==="start"?o:v==="end"?i-d:c.x,y:c.y-Q,text:p,anchor:v,left:$,right:E}},ee=[],O=w.length>0?z(w[w.length-1]):null;let M=-1/0;for(let c=0;cO.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 q=Bt(k,B),K=5,_=c=>n(m=>m===c?null:m),X=c=>{c&&r(`/paper/${c}`)},Y=(c,m)=>{const y=`${c.data.modelName||c.data.paperTitle||"Unknown model"}: ${le(c.data.value)} on ${c.data.dateLabel}`,$=!!c.data.paperRouteId;return a.jsxs("g",{children:[m,a.jsx("circle",{cx:c.x,cy:c.y,r:"10",fill:"transparent",style:{cursor:$?"pointer":"default",outline:"none"},tabIndex:0,role:$?"link":"img","aria-label":y,onMouseEnter:()=>n(c.idx),onMouseLeave:()=>_(c.idx),onFocus:()=>n(c.idx),onBlur:()=>_(c.idx),onClick:()=>X(c.data.paperRouteId),onKeyDown:E=>{$&&(E.key==="Enter"||E.key===" ")&&(E.preventDefault(),X(c.data.paperRouteId))},children:a.jsx("title",{children:y})})]},c.idx)};return a.jsxs("svg",{width:"100%",viewBox:`0 0 ${i} ${l}`,style:{display:"block"},children:[a.jsx("text",{x:o-38,y:f+S/2,fontSize:"11",fontFamily:"var(--mono)",fill:"var(--ink-faint)",textAnchor:"middle",transform:`rotate(-90 ${o-38} ${f+S/2})`,children:t}),Array.from({length:K}).map((c,m)=>{const p=m/(K-1),y=f+S*(1-p),$=h+C*p;return a.jsxs("g",{children:[a.jsx("line",{x1:o,y1:y,x2:i-d,y2:y,stroke:"var(--hairline)",strokeWidth:"1"}),a.jsx("text",{x:o-10,y:y+4,fontSize:"11",fontFamily:"var(--mono)",fill:"var(--ink-faint)",textAnchor:"end",children:le($)})]},m)}),q.map(c=>{const m=D(c.timestamp);return a.jsx("text",{x:m,y:l-x+18,fontSize:"11",fontFamily:"var(--mono)",fill:"var(--ink-soft)",textAnchor:"middle",children:c.label},c.key)}),W.filter(c=>!c.data.isSota).map(c=>{const m=s===c.idx;return Y(c,a.jsx("circle",{cx:c.x,cy:c.y,r:m?3:2,fill:"var(--ink-faint)",opacity:m?1:.45,style:{transition:"r 0.12s ease, opacity 0.12s ease"}}))}),U&&a.jsx("path",{d:U,stroke:"var(--accent)",strokeWidth:"2",fill:"none",strokeLinejoin:"round",strokeLinecap:"round"}),w.map(c=>{const m=s===c.idx;return Y(c,a.jsx("circle",{cx:c.x,cy:c.y,r:m?4.5:3,fill:m?"var(--accent)":"var(--bg-elevated)",stroke:"var(--accent)",strokeWidth:"1.5",style:{transition:"r 0.12s ease, fill 0.12s ease"}}))}),ee.map((c,m)=>a.jsx("text",{x:c.x,y:c.y,fontSize:"9.5",fontFamily:"var(--mono)",fill:"var(--ink-soft)",textAnchor:c.anchor,pointerEvents:"none",style:{paintOrder:"stroke",stroke:"var(--bg-elevated)",strokeWidth:3,strokeLinejoin:"round"},children:c.text},`label-${m}`)),s!==null&&W[s]&&(()=>{const c=W[s],m=c.data.modelName||c.data.paperTitle||"Unknown model",y=`${m.length>40?m.slice(0,39)+"…":m}: ${le(c.data.value)}`,E=Math.max(120,Math.min(340,y.length*6.6+24)),v=30;let H=c.x-E/2;Hi-d&&(H=i-d-E);const G=c.y-v-14>=f?c.y-v-12:c.y+12;return a.jsxs("g",{pointerEvents:"none",children:[a.jsx("rect",{x:H,y:G,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:G+19,fontSize:"12",fontFamily:"var(--sans)",fill:"var(--ink)",fontWeight:500,children:y})]})})()]})};function Ht(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 Vt=(()=>{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 zt(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 Kt(e){return Promise.resolve().then(()=>new XMLSerializer().serializeToString(e)).then(encodeURIComponent).then(t=>`data:image/svg+xml;charset=utf-8,${t}`)}async function Gt(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),Kt(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 Qt(e){const t=e.getPropertyValue("content");return`${e.cssText} content: '${t.replace(/'|"/g,"")}';`}function Xt(e,t){return Xe(t).map(r=>{const s=e.getPropertyValue(r),n=e.getPropertyPriority(r);return`${r}: ${s}${n?" !important":""};`}).join(" ")}function Yt(e,t,r,s){const n=`.${e}:${t}`,i=r.cssText?Qt(r):Xt(r,s);return document.createTextNode(`${n}{${i}}`)}function De(e,t,r,s){const n=window.getComputedStyle(e,r),i=n.getPropertyValue("content");if(i===""||i==="none")return;const l=Vt();try{t.className=`${t.className} ${l}`}catch{return}const o=document.createElement("style");o.appendChild(Yt(l,r,n,s)),t.appendChild(o)}function Jt(e,t,r){De(e,t,":before",r),De(e,t,":after",r)}const He="application/font-woff",Ve="image/jpeg",Zt={woff:He,woff2:He,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:Ve,jpeg:Ve,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml",webp:"image/webp"};function er(e){const t=/\.([^./]*?)$/g.exec(e);return t?t[1]:""}function ye(e){const t=er(e).toLowerCase();return Zt[t]||""}function tr(e){return e.split(/,/)[1]}function xe(e){return e.search(/^(data:)/)!==-1}function rr(e,t){return`data:${t};base64,${e}`}async function Je(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 o=new FileReader;o.onerror=l,o.onloadend=()=>{try{i(r({res:s,result:o.result}))}catch(d){l(d)}},o.readAsDataURL(n)})}const ge={};function ar(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 we(e,t,r){const s=ar(e,t,r.includeQueryParams);if(ge[s]!=null)return ge[s];r.cacheBust&&(e+=(/\?/.test(e)?"&":"?")+new Date().getTime());let n;try{const i=await Je(e,r.fetchRequestInit,({res:l,result:o})=>(t||(t=l.headers.get("Content-Type")||""),tr(o)));n=rr(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 ge[s]=n,n}async function sr(e){const t=e.toDataURL();return t==="data:,"?e.cloneNode(!1):ue(t)}async function nr(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 o=i.toDataURL();return ue(o)}const r=e.poster,s=ye(r),n=await we(r,s,t);return ue(n)}async function ir(e,t){var r;try{if(!((r=e==null?void 0:e.contentDocument)===null||r===void 0)&&r.body)return await me(e.contentDocument.body,t,!0)}catch{}return e.cloneNode(!1)}async function lr(e,t){return A(e,HTMLCanvasElement)?sr(e):A(e,HTMLVideoElement)?nr(e,t):A(e,HTMLIFrameElement)?ir(e,t):e.cloneNode(Ze(e))}const cr=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SLOT",Ze=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SVG";async function or(e,t,r){var s,n;if(Ze(t))return t;let i=[];return cr(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,o)=>l.then(()=>me(o,r)).then(d=>{d&&t.appendChild(d)}),Promise.resolve()),t}function dr(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):Xe(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 ur(e,t){A(e,HTMLTextAreaElement)&&(t.innerHTML=e.value),A(e,HTMLInputElement)&&t.setAttribute("value",e.value)}function mr(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 hr(e,t,r){return A(t,Element)&&(dr(e,t,r),Jt(e,t,r),ur(e,t),mr(e,t)),t}async function fr(e,t){const r=e.querySelectorAll?e.querySelectorAll("use"):[];if(r.length===0)return e;const s={};for(let i=0;ilr(s,t)).then(s=>or(e,s,t)).then(s=>hr(e,s,t)).then(s=>fr(s,t))}const et=/url\((['"]?)([^'"]+?)\1\)/g,pr=/url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g,gr=/src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;function xr(e){const t=e.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1");return new RegExp(`(url\\(['"]?)(${t})(['"]?\\))`,"g")}function br(e){const t=[];return e.replace(et,(r,s,n)=>(t.push(n),r)),t.filter(r=>!xe(r))}async function yr(e,t,r,s,n){try{const i=r?Ht(t,r):t,l=ye(t);let o;return n||(o=await we(i,l,s)),e.replace(xr(t),`$1${o}$3`)}catch{}return e}function wr(e,{preferredFontFormat:t}){return t?e.replace(gr,r=>{for(;;){const[s,,n]=pr.exec(r)||[];if(!n)return"";if(n===t)return`src: ${s};`}}):e}function tt(e){return e.search(et)!==-1}async function rt(e,t,r){if(!tt(e))return e;const s=wr(e,r);return br(s).reduce((i,l)=>i.then(o=>yr(o,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 rt(n,null,r);return t.style.setProperty(e,i,t.style.getPropertyPriority(e)),!0}return!1}async function vr(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 jr(e,t){const r=A(e,HTMLImageElement);if(!(r&&!xe(e.src))&&!(A(e,SVGImageElement)&&!xe(e.href.baseVal)))return;const s=r?e.src:e.href.baseVal,n=await we(s,ye(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 o=e;o.decode&&(o.decode=i),o.loading==="lazy"&&(o.loading="eager"),r?(e.srcset="",e.src=n):e.href.baseVal=n})}async function _r(e,t){const s=Z(e.childNodes).map(n=>at(n,t));await Promise.all(s).then(()=>e)}async function at(e,t){A(e,Element)&&(await vr(e,t),await jr(e,t),await _r(e,t))}function Sr(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 We={};async function Oe(e){let t=We[e];if(t!=null)return t;const s=await(await fetch(e)).text();return t={url:e,cssText:s},We[e]=t,t}async function qe(e,t){let r=e.cssText;const s=/url\(["']?([^"')]+)["']?\)/g,i=(r.match(/url\([^)]+\)/g)||[]).map(async l=>{let o=l.replace(s,"$1");return o.startsWith("https://")||(o=new URL(o,e.url).href),Je(o,t.fetchRequestInit,({result:d})=>(r=r.replace(l,`url(${d})`),[l,d]))});return Promise.all(i).then(()=>r)}function Ue(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]*?)})",o=new RegExp(l,"gi");for(;;){let d=i.exec(s);if(d===null){if(d=o.exec(s),d===null)break;i.lastIndex=o.lastIndex}else o.lastIndex=i.lastIndex;t.push(d[0])}return t}async function kr(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 o=l+1;const d=i.href,f=Oe(d).then(x=>qe(x,t)).then(x=>Ue(x).forEach(u=>{try{n.insertRule(u,u.startsWith("@import")?o+=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(o=>o.href==null)||document.styleSheets[0];n.href!=null&&s.push(Oe(n.href).then(o=>qe(o,t)).then(o=>Ue(o).forEach(d=>{l.insertRule(d,l.cssRules.length)})).catch(o=>{console.error("Error loading remote stylesheet",o)})),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 Cr(e){return e.filter(t=>t.type===CSSRule.FONT_FACE_RULE).filter(t=>tt(t.style.getPropertyValue("src")))}async function Er(e,t){if(e.ownerDocument==null)throw new Error("Provided element is not within a Document");const r=Z(e.ownerDocument.styleSheets),s=await kr(r,t);return Cr(s)}function st(e){return e.trim().replace(/["']/g,"")}function Nr(e){const t=new Set;function r(s){(s.style.fontFamily||getComputedStyle(s).fontFamily).split(",").forEach(i=>{t.add(st(i))}),Array.from(s.children).forEach(i=>{i instanceof HTMLElement&&r(i)})}return r(e),t}async function Rr(e,t){const r=await Er(e,t),s=Nr(e);return(await Promise.all(r.filter(i=>s.has(st(i.style.fontFamily))).map(i=>{const l=i.parentStyleSheet?i.parentStyleSheet.href:null;return rt(i.cssText,l,t)}))).join(` -`)}async function Pr(e,t){const r=t.fontEmbedCSS!=null?t.fontEmbedCSS:t.skipFonts?null:await Rr(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 $r(e,t={}){const{width:r,height:s}=Ye(e,t),n=await me(e,t,!0);return await Pr(n,t),await at(n,t),Sr(n,t),await Gt(n,r,s)}async function Mr(e,t={}){const{width:r,height:s}=Ye(e,t),n=await $r(e,t),i=await ue(n),l=document.createElement("canvas"),o=l.getContext("2d"),d=t.pixelRatio||qt(),f=t.canvasWidth||r,x=t.canvasHeight||s;return l.width=f*d,l.height=x*d,t.skipAutoScale||Ut(l),l.style.width=`${f}`,l.style.height=`${x}`,t.backgroundColor&&(o.fillStyle=t.backgroundColor,o.fillRect(0,0,l.width,l.height)),o.drawImage(i,0,0,l.width,l.height),l}async function Tr(e,t={}){const r=await Mr(e,t);return await zt(r)}const be="#ffffff";function Fr(){return typeof window>"u"?be:window.getComputedStyle(document.documentElement).getPropertyValue("--bg-elevated").trim()||be}function Lr(e){if(typeof window>"u")return be;const t=window.getComputedStyle(e).backgroundColor;return!t||t==="rgba(0, 0, 0, 0)"||t==="transparent"?Fr():t}async function Ir(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 Tr(e,{pixelRatio:2,cacheBust:!0,backgroundColor:Lr(e)});if(!t)throw new Error("Failed to render screenshot.");await window.navigator.clipboard.write([new window.ClipboardItem({"image/png":t})])}const nt=({targetRef:e,label:t})=>{const{toast:r}=ot(),[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 Ir(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]),o=s==="copied"?"Copied":s==="copying"?"Copying…":"Copy image";return a.jsxs("button",{type:"button",className:"bm-copy-btn",onClick:l,disabled:s==="copying","aria-label":`Copy ${t} screenshot to clipboard`,title:`Copy ${t} screenshot to clipboard`,children:[a.jsx(xt,{name:"copy",size:11}),o]})};function Ar({model:e,datasetName:t,hideClosed:r,setHideClosed:s,setMetric:n}){const i=L.useRef(null),{isInitialFilteredViewLoading:l,chartPoints:o,activeMetric:d,allowedMetrics:f,orderedMetrics:x,parameterBound:u}=e;return l||o.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(Ke,{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(nt,{targetRef:i,label:"SOTA chart"})]})]}),a.jsx("div",{className:"bm-chart-wrap",children:a.jsx(Dt,{points:o,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 Br(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 ze(e,t){return e?a.jsx(ce,{title:e}):t||"—"}const ia=()=>{var ve,je,_e,Se,ke,Ce,Ee,Ne,Re,Pe,$e;const{datasetSlug:e}=dt(),[t,r]=ut(),s=t.get("task")||void 0,n=t.get("eval")||void 0,i=St(t.get("max_parameters_exclusive")),{preferences:l,setHideClosedSourceEvals:o}=mt(),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:["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:10*60*1e3}),k=te({queryKey:["dataset-evals",(ve=g.data)==null?void 0:ve.id],queryFn:()=>gt.byDataset(g.data.id),enabled:!!((je=g.data)!=null&&je.id),staleTime:5*60*1e3}),B=te({queryKey:["dataset-tasks",(_e=g.data)==null?void 0:_e.id],queryFn:()=>re.datasetTasks(g.data.id),enabled:!!((Se=g.data)!=null&&Se.id),staleTime:10*60*1e3}),j=te({queryKey:["metric-directions"],queryFn:()=>re.metricDirections(),staleTime:60*60*1e3}),D=Qe(B.data||[],k.data||[],s,n),W=te({queryKey:["task-benchmark-trends",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&&!!((ke=g.data)!=null&&ke.id),staleTime:10*60*1e3}),w=L.useMemo(()=>{var b;return(((b=W.data)==null?void 0:b.results)||[]).find(T=>{var F;return T.id===((F=g.data)==null?void 0:F.id)})||null},[W.data,(Ce=g.data)==null?void 0:Ce.id]),U=te({queryKey:["leaderboard-metrics",(Ee=g.data)==null?void 0:Ee.id,D],queryFn:()=>re.leaderboardMetrics(g.data.id,D),enabled:!!((Ne=g.data)!=null&&Ne.id)&&!!D,staleTime:10*60*1e3}),I=Tt({evaluations:k.data||[],tasks:B.data||[],configuredMetrics:U.data||[],directions:j.data,initialSummary:(Re=g.data)==null?void 0:Re.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:U.isSuccess}}),{primaryTask:N,hiddenClosedEvals:Q,hiddenClosedTopEval:z,isSummaryLoading:ee,displayedMetric:O,displayedSota:M,displayedSotaModel:q,isInitialFilteredViewLoading:K,highlightedEval:_,hasParameterMetadata:X,parameterCoverage:Y,orderedMetrics:c}=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:["area",N==null?void 0:N.area_id],queryFn:()=>re.getArea(N.area_id),enabled:!!(N!=null&&N.area_id),staleTime:10*60*1e3});if(g.isLoading)return a.jsxs("div",{className:"page",children:[a.jsx(oe,{className:"h-12 w-1/2 mb-6"}),a.jsx(oe,{className:"h-64 w-full"})]});if(g.error||!g.data)return a.jsx("div",{className:"page",children:a.jsx(bt,{variant:"destructive",children:a.jsx(yt,{children:"Benchmark not found."})})});const p=g.data,y=!!p.supports_harness,$=b=>{r(T=>{const F=new URLSearchParams(T);return b===void 0?F.delete("max_parameters_exclusive"):F.set("max_parameters_exclusive",String(b)),F})},E=b=>{r(T=>{const F=new URLSearchParams(T);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)||Br(p.paper_url),J=(v==null?void 0:v.title)||p.introducing_paper_title||null,G=((Pe=v==null?void 0:v.published)==null?void 0:Pe.slice(0,4))||p.introduced_year||null,it=!!H||!!p.paper_url||!!J,lt=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-${jt(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(wt,{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(ht,{kind:"benchmark",entityId:p.id}),a.jsxs("div",{className:"bm-subtitle",children:[ee?a.jsx(oe,{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:"·"})]}),q?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:q})]}):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&&Q.length>0&&a.jsxs("div",{className:"bm-hidden-closed-notice",children:[a.jsxs("span",{children:[Q.length," closed-source ",Q.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:()=>{o(!1)},children:"Show closed-source"})]}),it&&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}):lt}),G&&a.jsx("span",{className:"method-source-meta",children:G})]}):p.paper_url?a.jsxs("a",{href:vt(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}),G&&a.jsx("span",{className:"method-source-meta",children:G})]}):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}),G&&a.jsx("span",{className:"method-source-meta",children:G})]})]}),a.jsx(Ar,{model:I,datasetName:p.name,hideClosed:l.hide_closed_source_evals,setHideClosed:o,setMetric:E}),_&&(()=>{var Te,Fe;const b=_.paper_arxiv_id||_.paper_id,T=_.paper_title||(_.paper_arxiv_id?`arXiv:${_.paper_arxiv_id}`:null),F=_.best_metric&&((Te=_.metrics)==null?void 0:Te[_.best_metric])!==void 0?_.best_metric:I.activeMetric,Me=(Fe=_.metrics)==null?void 0:Fe[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||T||"—",_.harness?` · ${_.harness}`:""]}),a.jsxs("span",{className:"bm-highlight-meta",children:[Me!==void 0&&F?a.jsxs(a.Fragment,{children:[F,": ",le(Me),T?" · ":""]}):null,b?a.jsx(ne,{to:`/paper/${b}`,children:ze(_.paper_title,T)}):ze(_.paper_title,T)]})]})]})})(),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:c.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(Ke,{className:"bm-closed-toggle-switch",checked:!l.hide_closed_source_evals,onCheckedChange:b=>{o(!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(nt,{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:T,disabled:F}=b;return a.jsx("button",{type:"button",className:`bm-parameter-filter-option${T?" is-active":""}`,"aria-pressed":T,disabled:F,onClick:()=>$(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,T)=>a.jsx(oe,{className:"h-10 w-full mb-2"},T))}):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:()=>$(void 0),children:"Show all"})]}):a.jsx("div",{className:"no-results",children:"No evaluations submitted yet."}):a.jsxs(a.Fragment,{children:[c.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 (${c.length-P})`}),C&&a.jsx("span",{children:"Scroll metrics horizontally; model and paper details stay visible."})]}),a.jsx(At,{model:I,showHarness:y,setMetric:E,highlightRowRef:d,onFittingMetricCountChange:S})]})]})]})})};export{ia as default}; diff --git a/assets/BenchmarkTrendSparkline-BfAoxAzu.js b/assets/BenchmarkTrendSparkline-BBLKxMdW.js similarity index 97% rename from assets/BenchmarkTrendSparkline-BfAoxAzu.js rename to assets/BenchmarkTrendSparkline-BBLKxMdW.js index 08497c829b36ba82edb9c8e34a0888615014f4ed..e978850945206aadb4bee62954287bc821ced0bb 100644 --- a/assets/BenchmarkTrendSparkline-BfAoxAzu.js +++ b/assets/BenchmarkTrendSparkline-BBLKxMdW.js @@ -1 +1 @@ -import{r as C,j as t}from"./index-D6jcIRWs.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{r as C,j as t}from"./index-YwiKC6Po.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-BhTSUN-X.js b/assets/CatalogEntityPreviewLink-Cv_oezOz.js similarity index 95% rename from assets/CatalogEntityPreviewLink-BhTSUN-X.js rename to assets/CatalogEntityPreviewLink-Cv_oezOz.js index 5106996261b1861e59df5e3c385bdf805fe35986..019e3afbb835aec0e3de9a2eefd6b6ec5ae4b2de 100644 --- a/assets/CatalogEntityPreviewLink-BhTSUN-X.js +++ b/assets/CatalogEntityPreviewLink-Cv_oezOz.js @@ -1,4 +1,4 @@ -import{n as m,$ as h,K as d,j as s,L as g,Y as f}from"./index-D6jcIRWs.js";import{u as k}from"./useQuery-CUJUm4FY.js";import{H as w,a as y,b as v}from"./hover-card-DPpv0l_x.js";import{c as l}from"./catalog-PYrB8_bm.js";/** +import{n as m,$ as h,K as d,j as s,L as g,Y as f}from"./index-YwiKC6Po.js";import{u as k}from"./useQuery-DPH6Mb2w.js";import{H as w,a as y,b as v}from"./hover-card-BY9tUGxy.js";import{c as l}from"./catalog-B15Yh5dN.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/ChatView-wJIPZ39W.js b/assets/ChatView-DsnEMREv.js similarity index 97% rename from assets/ChatView-wJIPZ39W.js rename to assets/ChatView-DsnEMREv.js index d8dcef61f0416016c4e39c5474b35c4482ce24fb..77f523fe62bb1195d638254801f321a183d32e8a 100644 --- a/assets/ChatView-wJIPZ39W.js +++ b/assets/ChatView-DsnEMREv.js @@ -1,6 +1,6 @@ -var ir=Object.defineProperty;var or=(e,r,t)=>r in e?ir(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t;var ee=(e,r,t)=>or(e,typeof r!="symbol"?r+"":r,t);import{n as cr,r as d,j as n,X as Pt,p as Ht,K as rt,a as Ut,u as lr,c as ur,e as dr,f as pr,Z as fr,A as hr,L as Ct,Q as mr,S as gr,U as yr,V as At,m as _r}from"./index-D6jcIRWs.js";import{u as Pe}from"./useQuery-CUJUm4FY.js";import{C as br,U as jt,b as wr,f as De,c as xr,g as vr,A as Sr,a as Er}from"./ArtifactWorkspace-CUZCugRS.js";import{f as Ue,h as Rr,j as Kt,k as Ir,T as kr,e as Wt,l as Cr,m as Ar,n as jr,r as Tr,o as Tt,s as Yt,t as nt,v as He,w as Le,x as Mr,y as Mt,z as Nr,B as Dr,E as ut,F as $t,G as Lr,H as Fr,I as Or,J as qr,D as st,K as Br,L as Pr,M as Je,N as Qe,O as Hr,Q as ze,R as Ge,U as Ur,V as Kr,S as Wr,W as Yr,X as Nt,Y as $r}from"./chatSessions-DByIWBno.js";import{M as Vr}from"./McpShowcase-CS9LZY9p.js";import{S as Qr}from"./share-2-DPo2j-OC.js";import{c as Xe}from"./chat-ChnK8XDU.js";import{u as zr,O as Gr}from"./openrouter-DrXWVMlM.js";import{q as Vt}from"./queryOptions-C9woPjwX.js";/* empty css */import"./hover-card-DPpv0l_x.js";import"./CatalogEntityPreviewLink-BhTSUN-X.js";import"./catalog-PYrB8_bm.js";import"./github-B7D_19Qm.js";import"./file-text-4G2I5_Zo.js";import"./PaperPreviewLink-fcJyP9H0.js";import"./index-uFGyKu5N.js";import"./index-yduEvk9Z.js";import"./katex-DkKDou_j.js";import"./papers-DIIIPDpj.js";import"./useMutation-p6mN4h17.js";import"./copy-BmzqMihw.js";import"./thumbs-up-BqRlVdvF.js";import"./arrow-left-IzGlownM.js";import"./external-link-C_yz2sXa.js";import"./plus-C4UQ62Q1.js";import"./search-CfTufeR7.js";import"./chevron-up-CQKUhZ0S.js";import"./AuthorAvatar-UMHOVOr9.js";import"./AgentLogos-CFt_vIO2.js";/** +var ir=Object.defineProperty;var or=(e,r,t)=>r in e?ir(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t;var ee=(e,r,t)=>or(e,typeof r!="symbol"?r+"":r,t);import{n as cr,r as d,j as n,X as Pt,p as Ht,K as rt,a as Ut,u as lr,c as ur,e as dr,f as pr,Z as fr,J as hr,L as Ct,Q as mr,S as gr,U as yr,V as At,m as _r}from"./index-YwiKC6Po.js";import{u as Pe}from"./useQuery-DPH6Mb2w.js";import{C as br,U as jt,b as wr,f as De,c as xr,g as vr,A as Sr,a as Er}from"./ArtifactWorkspace-BxDA6yNF.js";import{f as Ue,h as Rr,j as Kt,k as Ir,T as kr,e as Wt,l as Cr,m as Ar,n as jr,r as Tr,o as Tt,s as Yt,t as nt,v as He,w as Le,x as Mr,y as Mt,z as Nr,B as Dr,E as ut,F as $t,G as Lr,H as Fr,I as Or,J as qr,D as st,K as Br,L as Pr,M as Je,N as Qe,O as Hr,Q as ze,R as Ge,U as Ur,V as Kr,S as Wr,W as Yr,X as Nt,Y as $r}from"./chatSessions-CdNQ1toA.js";import{M as Vr}from"./McpShowcase-Fj71TTNl.js";import{S as Qr}from"./share-2-m8aPY8Vq.js";import{c as Xe}from"./chat-DHGOonJg.js";import{u as zr,O as Gr}from"./openrouter-BT3NQ0bL.js";import{q as Vt}from"./queryOptions-C9woPjwX.js";/* empty css */import"./hover-card-BY9tUGxy.js";import"./CatalogEntityPreviewLink-Cv_oezOz.js";import"./catalog-B15Yh5dN.js";import"./github-BZMCt7Ub.js";import"./file-text-Cijxx2XD.js";import"./PaperPreviewLink-CKfmgBjs.js";import"./index-CoRCN2p0.js";import"./index-BM_xSDJM.js";import"./katex-DkKDou_j.js";import"./paperQueryKeys-C5FMa4Oj.js";import"./curation-CkzNFTMJ.js";import"./useMutation-f6iDkf3w.js";import"./copy-YHg6twss.js";import"./thumbs-up-D9G2aLNB.js";import"./arrow-left-B08fyfNi.js";import"./external-link-4bBJT0yO.js";import"./plus-Cfz0QbT1.js";import"./search-wcEXdf1i.js";import"./chevron-up-BXtxbTfV.js";import"./AuthorAvatar-CoTET6B3.js";import"./AgentLogos-DhD8p5ds.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Jr=cr("EllipsisVertical",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}]]);function Xr(e){const[r,t]=d.useState("calc(100dvh - 60px)");return d.useLayoutEffect(()=>{if(!e)return;const s=document.querySelector(".app-header"),u=window.visualViewport,o=()=>{const a=(u==null?void 0:u.height)??window.innerHeight;t(`${Math.max(0,a-((s==null?void 0:s.offsetHeight)??0))}px`)};o();const p=new ResizeObserver(o);return s&&p.observe(s),u==null||u.addEventListener("resize",o),window.addEventListener("resize",o),()=>{p.disconnect(),u==null||u.removeEventListener("resize",o),window.removeEventListener("resize",o)}},[e]),e?r:"100%"}const Zr="https://huggingface.co/settings/inference-providers",Dt="pwc.chat.billing-notice-dismissed.v1";function es({provider:e}){const[r,t]=d.useState(()=>localStorage.getItem(Dt)==="1");return!Ue()||r||e!=="huggingface"?null:n.jsxs("div",{className:"chat-billing-notice",role:"note",children:[n.jsx("span",{children:"Hugging Face models use the inference permission granted when you start chatting. Included monthly credits are used first, then extra usage requires purchased credits. You can choose organization billing in Settings."}),n.jsxs("div",{className:"chat-billing-notice-actions",children:[n.jsx("a",{href:"/settings",children:"Review billing"}),n.jsx("a",{href:Zr,target:"_blank",rel:"noreferrer",children:"Review usage"}),n.jsx("button",{type:"button",className:"chat-billing-notice-dismiss","aria-label":"Dismiss billing notice",title:"Dismiss",onClick:()=>{localStorage.setItem(Dt,"1"),t(!0)},children:n.jsx(Pt,{size:15,"aria-hidden":"true"})})]})]})}function Lt({variant:e,composerProps:r,provider:t,sponsored:s=!1,paused:u,error:o,suggestions:p=[]}){var h;const a=n.jsxs(n.Fragment,{children:[!s&&n.jsx(es,{provider:t}),u&&n.jsx("div",{id:"chat-paused-description",className:"chat-paused-banner",role:"status",children:"Chat is temporarily disabled. You can keep browsing and editing your conversations. New research runs will return when chat is restored."}),o&&n.jsx("div",{className:"chat-composer-error",role:"alert",children:o}),n.jsx(br,{...r,...e==="empty"?{autoFocus:!0}:{placeholder:(h=r.draft)!=null&&h.text?"Edit and send again…":"Ask a follow-up…"}}),e==="empty"&&n.jsx("div",{className:"chat-examples",children:p.map(L=>n.jsx("button",{type:"button",className:"chat-example",disabled:u,onClick:()=>{var v;return r.onSend({text:L,paperMentions:[],...(v=r.draft)!=null&&v.paperSelection?{paperSelection:r.draft.paperSelection}:{}})},children:L},L))})]});return e==="empty"?a:n.jsx("div",{className:"chat-composer-wrap",children:n.jsxs("div",{className:"chat-composer-inner",children:[a,n.jsx("div",{className:"chat-composer-foot",children:Ue()?n.jsxs(n.Fragment,{children:[t==="huggingface"&&n.jsxs("span",{className:"chat-provider-attribution",children:["Powered by 🤗 ",n.jsx("a",{href:"https://huggingface.co/docs/inference-providers/en/index",target:"_blank",rel:"noreferrer",children:"Inference Providers"}),"."]}),t==="openrouter"&&n.jsxs("span",{className:"chat-provider-attribution",children:["Powered by ",n.jsx("a",{href:"https://openrouter.ai",target:"_blank",rel:"noreferrer",children:"OpenRouter"}),"."]}),t==="openai"&&n.jsx("span",{className:"chat-provider-attribution",children:"Powered by OpenAI."}),n.jsx("span",{children:"The AI assistant can make mistakes. Double-check responses."})]}):n.jsx(n.Fragment,{children:"Assistant preview — responses are simulated."})})]})})}function ts({messages:e,papers:r,busy:t,queuedDraft:s,paperMentionsEnabled:u,archivePending:o,openRouterFallbackEnabled:p,onToggleBlock:a,onEditAndResend:h,onRetryFromProgress:L,onRetryWithLuna:v,onArchiveOld:S,onArchiveOldest:A}){var m,I;const[B,O]=d.useState(null),k=d.useRef(null),j=d.useRef(null),W=d.useRef("bottom"),U=d.useRef(0),se=d.useRef(0),[Q,w]=d.useState(!1),T=d.useRef(null),C=d.useCallback(i=>{W.current=i},[]),_=d.useCallback(()=>{const i=k.current;i&&w(i.scrollHeight-i.scrollTop-i.clientHeight>1)},[]),V=e.filter(i=>i.role==="user"),$=V.length,F=d.useRef($),ne=d.useRef(!1),ue=(m=V[0])==null?void 0:m.id,z=(I=V.at(-1))==null?void 0:I.id;d.useEffect(()=>{t&&O(null)},[t]),d.useLayoutEffect(()=>{const i=k.current;if(i){if($>F.current||t&&!ne.current){const M=Array.from(i.querySelectorAll("[data-message-id]")).at(-1);if(M){const P=i.getBoundingClientRect().top;U.current=i.scrollTop+M.getBoundingClientRect().top-P-24,C("question")}}if(F.current=$,ne.current=t,j.current!==null){i.scrollTop=j.current,j.current=null;return}W.current==="bottom"&&(i.scrollTop=i.scrollHeight),W.current==="question"&&(i.scrollTop=U.current,se.current=i.scrollTop)}},[e,$,t,C]),d.useLayoutEffect(_),d.useEffect(()=>{const i=k.current;if(!i)return;const M=new ResizeObserver(_);return M.observe(i),i.firstElementChild&&M.observe(i.firstElementChild),()=>M.disconnect()},[_]);const J=(i,M)=>{var P;j.current=((P=k.current)==null?void 0:P.scrollTop)??null,a(i,M)};return n.jsxs("div",{className:"chat-conversation-viewport",children:[n.jsx("div",{className:"chat-conversation",ref:k,tabIndex:0,role:"region","aria-label":"Conversation",onWheel:i=>{(i.deltaY<0||W.current==="question")&&C("free")},onTouchStart:i=>{var M;T.current=((M=i.touches[0])==null?void 0:M.clientY)??null},onTouchMove:i=>{var P;const M=(P=i.touches[0])==null?void 0:P.clientY;M!==void 0&&T.current!==null&&(M>T.current||W.current==="question")&&C("free"),T.current=M??null},onKeyDown:i=>{i.target===i.currentTarget&&((["ArrowUp","PageUp","Home"].includes(i.key)||i.key===" "&&i.shiftKey)&&C("free"),["ArrowDown","PageDown","End"," "].includes(i.key)&&W.current==="question"&&C("free"))},onScroll:i=>{const{scrollHeight:M,scrollTop:P,clientHeight:ae}=i.currentTarget,ie=M-P-ae<=1;W.current==="bottom"&&!ie&&C("free");const fe=P-se.current;W.current==="question"&&(fe>1||fe<-1&&!ie)&&C("free"),_()},children:n.jsxs("div",{className:"chat-conversation-inner",children:[e.length===0&&(s==null?void 0:s.text)&&n.jsx(jt,{id:"queued-launch-preview",text:s.text,paperMentions:s.paperMentions,paperSelection:s.paperSelection,isInitial:!0}),e.map(i=>{var M,P,ae,ie;return i.role==="user"?n.jsx(jt,{id:i.id,text:i.text??"",paperMentions:i.paperMentions??[],paperSelection:i.paperSelection,paperMentionsEnabled:u,isInitial:i.id===ue,editingAllowed:!t&&!!i.revision,editing:B===i.id,editNotice:i.id===ue?"Sending will replace this conversation.":i.id===z?"Sending will replace the response.":"Sending will replace the response and all messages after it.",onEdit:()=>O(i.id),onCancel:()=>O(null),onResendDraft:fe=>{const ge=h(i.id,fe);return ge&&O(null),ge}},i.id):n.jsx(wr,{msg:i,papers:r,onToggleBlock:J,onRetryCompaction:!t&&i.id===((M=e.at(-1))==null?void 0:M.id)&&((P=V.at(-1))!=null&&P.revision)?L:void 0,onRetryWithLuna:!t&&i.id===((ae=e.at(-1))==null?void 0:ae.id)&&((ie=V.at(-1))!=null&&ie.revision)?v:void 0,onArchiveOldChats:S,onArchiveOldestChats:A,archivePending:o,hfBilling:null,openRouterFallbackEnabled:p,feedbackEnabled:!0},i.id)})]})}),Q&&n.jsx("button",{type:"button",className:"chat-jump-latest",onClick:()=>{C("bottom");const i=k.current;i&&(i.focus({preventScroll:!0}),i.scrollTop=i.scrollHeight,_())},children:"Jump to latest"})]})}function rs({retryAt:e,onRetry:r,onCancel:t}){const[s,u]=d.useState(()=>Math.max(0,Math.ceil((e-Date.now())/1e3))),o=d.useRef(null);return d.useEffect(()=>{var L;const p=document.activeElement instanceof HTMLElement?document.activeElement:null;(L=o.current)==null||L.focus();const a=()=>u(Math.max(0,Math.ceil((e-Date.now())/1e3)));a();const h=window.setInterval(a,250);return()=>{window.clearInterval(h),p==null||p.focus()}},[e]),n.jsx("div",{className:"chat-capacity-dialog-backdrop",role:"presentation",children:n.jsxs("div",{className:"chat-capacity-dialog",role:"dialog","aria-modal":"true","aria-labelledby":"chat-capacity-dialog-title","aria-describedby":"chat-capacity-dialog-description",onKeyDown:p=>{p.key==="Escape"&&(p.preventDefault(),t())},children:[n.jsx("h2",{id:"chat-capacity-dialog-title",children:"All research slots are currently in use"}),n.jsx("p",{id:"chat-capacity-dialog-description",children:"Your message was not sent or billed. Try again in a few seconds."}),n.jsx("p",{className:"chat-capacity-countdown","aria-live":"polite",children:s>0?`Try again available in ${s} second${s===1?"":"s"}.`:"You can try again now."}),n.jsxs("div",{className:"chat-capacity-dialog-actions",children:[n.jsx("button",{type:"button",className:"chat-capacity-cancel",ref:o,onClick:t,children:"Cancel"}),n.jsx("button",{type:"button",className:"chat-capacity-retry",disabled:s>0,onClick:r,children:"Try again"})]})]})})}function ss({onClose:e}){const r=d.useRef(null);return d.useEffect(()=>{var s;const t=document.activeElement instanceof HTMLElement?document.activeElement:null;return(s=r.current)==null||s.focus(),()=>t==null?void 0:t.focus()},[]),n.jsx("div",{className:"chat-capacity-dialog-backdrop",role:"presentation",children:n.jsxs("div",{className:"chat-capacity-dialog",role:"dialog","aria-modal":"true","aria-labelledby":"chat-disabled-title","aria-describedby":"chat-disabled-description",onKeyDown:t=>{t.key==="Escape"&&(t.preventDefault(),e())},children:[n.jsx("h2",{id:"chat-disabled-title",children:"Chat is temporarily disabled"}),n.jsx("p",{id:"chat-disabled-description",children:"We've temporarily paused new research runs. Your message wasn't sent, and your draft is still here. Please try again later."}),n.jsx("div",{className:"chat-capacity-dialog-actions",children:n.jsx("button",{ref:r,type:"button",className:"chat-capacity-cancel",onClick:e,children:"Keep editing"})})]})})}function ns({url:e,onClose:r}){return e?n.jsx("div",{className:"chat-share-dialog-backdrop",role:"presentation",onMouseDown:r,children:n.jsxs("div",{className:"chat-share-dialog",role:"dialog","aria-modal":"true","aria-labelledby":"chat-share-dialog-title",onMouseDown:t=>t.stopPropagation(),children:[n.jsx("h2",{id:"chat-share-dialog-title",children:"Public link created"}),n.jsx("p",{children:"Anyone with this link can see this conversation. It could not be copied automatically, so copy it manually:"}),n.jsx("input",{readOnly:!0,value:e,"aria-label":"Public conversation link",autoFocus:!0,onFocus:t=>t.currentTarget.select()}),n.jsx("button",{type:"button",onClick:r,children:"Close"})]})}):null}const at="pwc:chat:sidebar-width",it=280,ot=200,ct=480,as=12,lt=e=>Math.max(ot,Math.min(ct,e)),is=()=>{if(typeof window>"u")return it;const e=Number(localStorage.getItem(at));return Number.isFinite(e)&&e>0?lt(e):it};function os({sessions:e,activeSessionId:r,loading:t,error:s,open:u,onClose:o,onNew:p,onNavigate:a,onRename:h,onDelete:L}){const[v,S]=d.useState(is),A=d.useRef(null),B=d.useRef(v),[O,k]=d.useState(null),[j,W]=d.useState(""),[U,se]=d.useState(null),[Q,w]=d.useState(!1),T=[...e].sort((m,I)=>Date.parse(I.updated_at)-Date.parse(m.updated_at)),C=T.filter((m,I)=>I{if(!U)return;const m=()=>se(null),I=i=>{i.key==="Escape"&&m()};return window.addEventListener("click",m),window.addEventListener("keydown",I),()=>{window.removeEventListener("click",m),window.removeEventListener("keydown",I)}},[U]);const $=m=>{k(m.id),W(m.title)},F=async m=>{const I=j.trim();I&&await h(m,I)&&k(null)},ne=(m,I,i)=>se({id:m,x:I,y:i}),ue=m=>{if(!A.current)return;const I=lt(A.current.width+m-A.current.x);B.current=I,S(I)},z=()=>{A.current&&(A.current=null,localStorage.setItem(at,String(B.current)))},J=m=>{const I=lt(m);B.current=I,S(I),localStorage.setItem(at,String(I))};return n.jsxs(n.Fragment,{children:[u&&n.jsx("div",{className:"chat-sidebar-backdrop","aria-hidden":"true",onClick:o}),n.jsxs("aside",{className:`chat-sidebar${u?"":" chat-sidebar-closed"}`,style:{"--chat-sidebar-width":`${v}px`},children:[n.jsxs("div",{className:"chat-sidebar-top",children:[n.jsxs("button",{type:"button",className:"chat-new-chat",onClick:()=>{De()&&p()},children:[n.jsx(Rr,{})," New chat"]}),n.jsx("button",{type:"button",className:"icon-btn",onClick:o,title:"Collapse sidebar",children:n.jsx(Kt,{})})]}),n.jsxs("nav",{className:"chat-sessions","aria-label":"Chat history",children:[t&&n.jsx("div",{className:"chat-sessions-empty",children:"Loading chats…"}),!t&&s&&n.jsx("div",{className:"chat-sessions-empty",children:s}),!t&&!s&&e.length===0&&n.jsx("div",{className:"chat-sessions-empty",children:"Conversations you start will show up here."}),Ir(_).map(m=>n.jsxs("div",{className:"chat-session-group",children:[n.jsx("div",{className:"chat-session-group-label",children:m.label}),m.items.map(I=>n.jsxs("div",{className:`chat-session${I.id===r?" chat-session-active":""}`,role:"button",tabIndex:0,onClick:()=>{De()&&a(I.id)},onKeyDown:i=>{if(i.key==="Enter"&&De()&&a(I.id),i.key==="F2"&&$(I),i.key==="ContextMenu"||i.shiftKey&&i.key==="F10"){i.preventDefault();const M=i.currentTarget.getBoundingClientRect();ne(I.id,M.right-150,M.bottom)}},onContextMenu:i=>{i.preventDefault(),ne(I.id,i.clientX,i.clientY)},children:[O===I.id?n.jsx("input",{className:"chat-session-title-input",value:j,autoFocus:!0,maxLength:80,onClick:i=>i.stopPropagation(),onChange:i=>W(i.target.value),onBlur:()=>void F(I.id),onKeyDown:i=>{i.stopPropagation(),i.key==="Enter"&&F(I.id),i.key==="Escape"&&k(null)}}):n.jsx("span",{className:"chat-session-title",children:I.title}),n.jsx("button",{type:"button",className:"chat-session-menu","aria-label":"Chat actions","aria-haspopup":"menu",title:"Chat actions",onClick:i=>{i.stopPropagation();const M=i.currentTarget.getBoundingClientRect();ne(I.id,M.right-150,M.bottom)},children:"⋯"}),n.jsx("button",{type:"button",className:"chat-session-delete","aria-label":"Delete conversation",onClick:i=>{i.stopPropagation(),De()&&L(I.id)},children:n.jsx(kr,{})})]},I.id))]},m.label)),V>0&&n.jsx("button",{type:"button",className:"chat-sessions-toggle","aria-expanded":Q,onClick:()=>w(m=>!m),children:Q?"Show less":`Show ${V} older ${V===1?"chat":"chats"}`})]}),n.jsx(Vr,{className:"chat-sidebar-tools",canNavigate:De}),n.jsx("div",{className:"chat-sidebar-resize-handle",role:"separator","aria-label":"Resize chat history","aria-orientation":"vertical","aria-valuemin":ot,"aria-valuemax":ct,"aria-valuenow":v,title:"Drag to resize; double-click to reset",tabIndex:0,onPointerDown:m=>{m.button===0&&(A.current={x:m.clientX,width:v},B.current=v,m.currentTarget.setPointerCapture(m.pointerId))},onPointerMove:m=>ue(m.clientX),onPointerUp:z,onPointerCancel:z,onLostPointerCapture:z,onDoubleClick:()=>J(it),onKeyDown:m=>{(m.key==="ArrowLeft"||m.key==="ArrowRight")&&(m.preventDefault(),J(v+(m.key==="ArrowRight"?10:-10))),(m.key==="Home"||m.key==="End")&&(m.preventDefault(),J(m.key==="Home"?ot:ct))}}),U&&n.jsx("div",{className:"chat-session-context-menu",role:"menu",style:{left:U.x,top:U.y},onClick:m=>m.stopPropagation(),children:n.jsx("button",{type:"button",role:"menuitem",autoFocus:!0,onClick:()=>{const m=e.find(I=>I.id===U.id);m&&$(m),se(null)},children:"Rename chat"})})]})]})}function cs({sessionId:e,busy:r,loading:t,hasPaperSelection:s=!1,onError:u}){const{toast:o}=Ht(),[p,a]=d.useState(!1),[h,L]=d.useState(""),v=async()=>{var S;if(!(r||p)&&!(s&&!window.confirm("This public link will include the selected paper passage. Anyone with the link can read that passage. Continue?"))){a(!0);try{const A=await Cr(e),B=new URL(A.public_path,window.location.origin).toString();try{if(!((S=navigator.clipboard)!=null&&S.writeText))throw new Error("Clipboard unavailable");await navigator.clipboard.writeText(B),o({className:"chat-share-toast",duration:5e3,title:"Public link copied to your clipboard",description:"Anyone with this link can see this conversation."})}catch{L(B)}}catch(A){const B=A instanceof Error?A.message:"Could not share this conversation";u(B),o({variant:"destructive",title:"Share failed",description:B})}finally{a(!1)}}};return n.jsxs(n.Fragment,{children:[n.jsxs("button",{type:"button",className:"chat-share-button",onClick:()=>void v(),disabled:r||p||t,"aria-label":"Share conversation",children:[p?n.jsx(Wt,{}):n.jsx(Qr,{"aria-hidden":"true"}),n.jsx("span",{children:"Share"})]}),n.jsx(ns,{url:h,onClose:()=>L("")})]})}const ls=({descriptor:e})=>{const r=xr(),{open:t,register:s,unregister:u}=r,o=rt.useRef(null),p=e.source_head??e.preview_head,a=rt.useMemo(()=>p?{kind:"artifact",schema_version:1,scope:"owner",artifact_id:e.artifact_id,version_id:p.version_id,identifier:"latex-paper",version:p.version,artifact_kind:"latex_paper",title:e.title,status:"ready",preview_mime:"application/pdf",source_language:"latex",total_bytes:0}:null,[e.artifact_id,e.title,p]),h=a?vr(a):null;return rt.useEffect(()=>{if(!(!a||!h))return s(a),o.current!==h&&(o.current=h,t(a)),()=>u(h)},[a,h,t,s,u]),null};function us({messages:e,refreshSessions:r,resetChat:t,restoreDraft:s}){const{toast:u}=Ht(),[o,p]=d.useState(null),a=()=>{const v=[...e].reverse().find(S=>S.role==="user");t(),s({text:(v==null?void 0:v.text)??"",paperMentions:(v==null?void 0:v.paperMentions)??[],...v!=null&&v.paperSelection?{paperSelection:v.paperSelection}:{}})};return{pending:o,archiveOld:async()=>{if(o===null){p("old");try{const v=await jr();if(await r(),v.archived_count===0){u({title:"No chats were archived",description:"There are no inactive chats older than 30 days."});return}a(),u({title:`${v.archived_count} ${v.archived_count===1?"chat":"chats"} archived`,description:"Your question is ready to send again."})}catch(v){u({variant:"destructive",title:"Could not archive old chats",description:v instanceof Error?v.message:"Try again."})}finally{p(null)}}},archiveOldest:async()=>{if(o===null){p("oldest");try{const v=await Ar();await r(),a(),u({title:`${v.archived_count} ${v.archived_count===1?"chat":"chats"} archived`,description:"Your question is ready to send again."})}catch(v){u({variant:"destructive",title:"Could not archive chats",description:v instanceof Error?v.message:"Try again."})}finally{p(null)}}}}}class ds{constructor(r,t=Tr){ee(this,"requestId");ee(this,"firstVisibleAt");ee(this,"streamStartReported",!1);ee(this,"firstVisibleReported",!1);ee(this,"terminalReported",!1);ee(this,"semanticReported",new Set);this.submittedAt=r,this.report=t}recordStreamStart(r,t){this.requestId=r,this.streamStartReported||(this.streamStartReported=!0,this.send({submission_to_stream_start_ms:Math.max(0,t-this.submittedAt)})),this.reportFirstVisible()}recordFirstVisible(r){this.firstVisibleAt===void 0&&(this.firstVisibleAt=r,this.reportFirstVisible())}recordSemantic(r,t){if(this.semanticReported.has(r))return;this.semanticReported.add(r);const s=Math.max(0,t-this.submittedAt);this.send(r==="reasoning"?{submission_to_first_reasoning_delta_ms:s}:r==="tool"?{submission_to_first_tool_call_ms:s}:{submission_to_first_answer_delta_ms:s})}recordTerminal(r){this.terminalReported||(this.terminalReported=!0,this.send({terminal_classification:r}))}reportFirstVisible(){!this.requestId||this.firstVisibleAt===void 0||this.firstVisibleReported||(this.firstVisibleReported=!0,this.send({submission_to_first_visible_delta_ms:Math.max(0,this.firstVisibleAt-this.submittedAt)}))}send(r){this.requestId&&this.report(this.requestId,r)}}const Qt="Preparing research workspace…",zt={preparing_workspace:"Preparing secure workspace…",starting_agent:"Starting research agent…",connecting_model:"Connecting to model…"},Gt=()=>({messages:[],sessionId:null,title:"",phase:"idle"});function Ft(e,r){for(let t=e.length-1;t>=0;t-=1)if(r(e[t]))return t;return-1}function Re(e){if(e.status!==Qt&&!Object.values(zt).includes(e.status))return e;const{status:r,...t}=e;return t}function te(e,r){if(!e.length)return e;const t=e.slice();return t[t.length-1]=r(t[t.length-1]),t}function Ae(e,r,t){return te(e,s=>{const u=Re(s),o=u.blocks??[];return{...u,blocks:o.map((p,a)=>r(p,a,o)?t(p):p)}})}function ps(e,r){switch(r.type){case"stream_start":return r.session_id?{...e,sessionId:r.session_id}:e;case"sandbox_start":case"sandbox_ready":case"workspace_ready":return e;case"lifecycle":return{...e,messages:te(e.messages,t=>{var s;return t.role==="assistant"&&t.streaming&&(((s=t.blocks)==null?void 0:s.length)??0)===0?{...t,status:zt[r.phase]}:t})};case"session_title_start":return{...e,title:""};case"session_title_delta":return{...e,title:`${e.title}${r.text}`.replace(/\s+/g," ").slice(0,80)};case"session_title_done":return{...e,title:r.title};case"compaction_status":return{...e,messages:te(e.messages,t=>({...t,compacting:!!(t.streaming&&r.state==="started")}))};case"reasoning_start":return{...e,messages:te(e.messages,t=>{const s=Re(t);return{...s,blocks:[...(s.blocks??[]).map(u=>u.kind==="reasoning"&&u.active?{...u,active:!1,open:!1}:u),{kind:"reasoning",text:"",active:!0,open:!0}]}})};case"reasoning_delta":return{...e,messages:Ae(e.messages,(t,s,u)=>t.kind==="reasoning"&&Ft(u,o=>o.kind==="reasoning")===s,t=>t.kind==="reasoning"?{...t,text:t.text+r.text}:t)};case"reasoning_end":return{...e,messages:te(e.messages,t=>{const s=t.blocks??[],u=Ft(s,a=>a.kind==="reasoning"&&a.active);if(u<0)return t;const o=s[u];if(o.kind!=="reasoning")return t;const p=s[u-1];return(p==null?void 0:p.kind)==="reasoning"&&p.text===o.text?{...t,blocks:s.filter((a,h)=>h!==u)}:{...t,blocks:s.map((a,h)=>h===u?{...o,active:!1,open:!1}:a)}})};case"tool_call":return{...e,messages:te(e.messages,t=>{const s=Re(t);return{...s,blocks:[...s.blocks??[],{kind:"tool",id:r.id,name:r.name,args:r.args,status:"running",open:!1}]}})};case"tool_call_start":return{...e,messages:te(e.messages,t=>{const s=Re(t);return{...s,blocks:[...s.blocks??[],{kind:"tool",schema_version:2,id:r.id,name:r.name,args:{},argumentText:"",argumentState:"streaming",arguments_redacted:r.redacted,status:"running",open:!1}]}})};case"tool_call_arguments_delta":return{...e,messages:Ae(e.messages,t=>t.kind==="tool"&&t.id===r.id,t=>t.kind==="tool"?{...t,args:r.partial_args,argumentText:r.snapshot?r.delta:`${t.argumentText??""}${r.delta}`,arguments_redacted:t.arguments_redacted||r.redacted}:t)};case"tool_call_arguments_done":return{...e,messages:Ae(e.messages,t=>t.kind==="tool"&&t.id===r.id,t=>t.kind==="tool"?{...t,args:r.args,argumentText:JSON.stringify(r.args),argumentState:"done",arguments_redacted:t.arguments_redacted||r.redacted}:t)};case"app_start":return{...e,messages:te(e.messages,t=>{const s=Re(t);return{...s,blocks:[...s.blocks??[],{kind:"app",schema_version:1,instance_id:r.instance_id,provider:r.provider,server:r.server,tool:r.tool,resource_uri:r.resource_uri,status:"loading",input:r.input,result:{content:[],structuredContent:{},isError:!1},csp:{},permissions:{clipboardWrite:!0},height:525}]}})};case"app_result":return{...e,messages:Ae(e.messages,t=>t.kind==="app"&&t.instance_id===r.id,t=>t.kind==="app"?{...t,status:r.status,result:r.result}:t)};case"tool_result":return{...e,messages:Ae(e.messages,t=>t.kind==="tool"&&t.id===r.id,t=>t.kind!=="tool"?t:r.status?{...t,schema_version:2,status:r.status,took_ms:r.took_ms,content:r.content,metadata:r.metadata,open:r.status!=="success"}:{...t,status:"done",hits:r.hits,took_ms:r.took_ms,results:r.results})};case"artifact_start":return{...e,messages:te(e.messages,t=>{const s=Re(t);return{...s,blocks:[...s.blocks??[],{kind:"artifact",schema_version:1,scope:"owner",publication_id:r.publication_id,identifier:r.identifier,artifact_kind:"posterly",title:r.title,status:"generating",phase:"publishing_poster"}]}})};case"artifact_ready":return{...e,messages:Ae(e.messages,t=>t.kind==="artifact"&&t.publication_id===r.publication_id,t=>t.kind==="artifact"?{...t,artifact_id:r.artifact_id,version_id:r.version_id,identifier:r.identifier,version:r.version,title:r.title,status:"ready",preview_mime:r.preview_mime,source_language:r.source_language,gate_status:r.gate_status,total_bytes:r.total_bytes,phase:void 0}:t)};case"artifact_error":return{...e,messages:Ae(e.messages,t=>t.kind==="artifact"&&t.publication_id===r.publication_id,t=>t.kind==="artifact"?{...t,status:"error",phase:void 0,error_code:r.code,error_message:r.message}:t)};case"answer_delta":return{...e,messages:te(e.messages,t=>{const s=Re(t),u=s.blocks??[],o=u.at(-1);return(o==null?void 0:o.kind)==="answer"&&!o.done?{...s,blocks:[...u.slice(0,-1),{...o,text:o.text+r.text}]}:{...s,blocks:[...u,{kind:"answer",text:r.text,done:!1}]}})};case"done":return{...e,phase:"complete",messages:te(e.messages,t=>({...t,streaming:!1,compacting:!1,followups:r.followups,finishReason:r.finish_reason,citations:r.citations,blocks:(t.blocks??[]).map(s=>s.kind==="answer"?{...s,done:!0}:s.kind==="reasoning"&&s.active?{...s,active:!1,open:!1}:s)}))};case"error":return{...e,phase:"failed",messages:te(e.messages,t=>({...t,streaming:!1,compacting:!1,error:r.message,errorCode:r.code,blocks:(t.blocks??[]).map(s=>s.kind==="reasoning"&&s.active?{...s,active:!1,open:!1}:s.kind==="tool"&&s.status==="running"?{...s,status:"error",open:!0}:s)}))};default:return e}}function fs(e){return te(e,r=>{if(r.role!=="assistant")return r;const t=(r.blocks??[]).flatMap(s=>s.kind==="tool"&&s.status==="running"?[{...s,status:"error",open:!0}]:s.kind==="reasoning"&&s.active?s.text?[{...s,active:!1,open:!1}]:[]:s.kind==="answer"?[{...s,done:!0}]:[s]);return{...r,blocks:t,streaming:!1,compacting:!1,finishReason:"stopped"}})}function hs(e,r){switch(r.type){case"start":return{messages:r.messages,sessionId:r.sessionId,title:"",phase:"streaming"};case"event":return ps(e,r.event);case"load":return{messages:r.messages,sessionId:r.sessionId,title:e.title,phase:"idle"};case"workspace_status":return{...e,messages:te(e.messages,t=>{var s;return t.role==="assistant"&&t.streaming&&(((s=t.blocks)==null?void 0:s.length)??0)===0&&!t.error?{...t,status:Qt}:t})};case"clear_workspace_status":return{...e,messages:te(e.messages,Re)};case"settle":return{...e,phase:"idle",messages:te(e.messages,t=>t.streaming?{...t,streaming:!1,compacting:!1}:t)};case"stop":return{...e,messages:fs(e.messages),phase:"stopped"};case"toggle_block":return{...e,messages:Jt(e.messages,r.messageId,r.blockIndex)};case"reset":return Gt()}}function Jt(e,r,t){return e.map(s=>{var u;return s.id!==r?s:{...s,blocks:(u=s.blocks)==null?void 0:u.map((o,p)=>p===t&&(o.kind==="reasoning"||o.kind==="tool")?{...o,open:!o.open}:o)}})}const Ee={minDelayMs:5,maxDelayMs:80,minRateCharsPerMs:.3,maxBufferedMs:400,arrivalRateTauMs:1e3,arrivalRateHeadroom:1.1,maxPendingChars:64},ms={now:()=>performance.now(),sleep:(e,r)=>new Promise(t=>{if(r!=null&&r.aborted||e<=0){t();return}const s=window.setTimeout(u,e);function u(){r==null||r.removeEventListener("abort",u),window.clearTimeout(s),t()}r==null||r.addEventListener("abort",u,{once:!0})})};function gs(e){return!["stream_start","sandbox_start","sandbox_ready","workspace_ready","session_title_start","session_title_delta","session_title_done"].includes(e.type)}function ys(e,r=!1,t=Ee.maxPendingChars){var u;if(!e)return{pieces:[],pending:""};if(r)return{pieces:[e],pending:""};const s=Intl.Segmenter;if(s){const p=[...new s(void 0,{granularity:"word"}).segment(e)].filter(h=>h.isWordLike);let a=0;if(p.length>1&&(a=p.at(-1).index),p.length&&/\s$/u.test(e)&&(a=e.length),a>0){const h=e.slice(0,a),L=[],S=[...new s(void 0,{granularity:"word"}).segment(h)].filter(A=>A.isWordLike);for(let A=0;AB&&L.push(h.slice(B,O))}return S.length||L.push(h),{pieces:L,pending:e.slice(a)}}}else{const o=[...e.matchAll(/\s+/gu)];if(o.length){const p=[];let a=0;for(const h of o){const L=h.index+h[0].length;p.push(e.slice(a,L)),a=L}return{pieces:p,pending:e.slice(a)}}}return e.length>=t?{pieces:[e.slice(0,t)],pending:e.slice(t)}:{pieces:[],pending:e}}function _s(e,r={}){const t={minDelayMs:r.minDelayMs??Ee.minDelayMs,maxDelayMs:r.maxDelayMs??Ee.maxDelayMs,minRateCharsPerMs:r.minRateCharsPerMs??Ee.minRateCharsPerMs,maxBufferedMs:r.maxBufferedMs??Ee.maxBufferedMs,arrivalRateTauMs:r.arrivalRateTauMs??Ee.arrivalRateTauMs,arrivalRateHeadroom:r.arrivalRateHeadroom??Ee.arrivalRateHeadroom,maxPendingChars:r.maxPendingChars??Ee.maxPendingChars},s=r.clock??ms,u=[];let o="",p=null,a=0,h=!0,L=!1,v=null,S=0,A=s.now(),B=!1;const O=()=>{v==null||v(),v=null},k=(w,T)=>{const C=w.type==="reasoning_delta"||w.type==="answer_delta"?w.text.length:0;u.push({kind:"event",event:w,arrivedAt:T,chars:C}),O()},j=w=>{if(!p||!o)return;const T=ys(o,w,t.maxPendingChars);for(const C of T.pieces)C&&k({type:p,text:C},a),a=s.now();o=T.pending,o||(p=null)},W=w=>{if(!h)return;const T=s.now();if(w.type==="reasoning_delta"||w.type==="answer_delta"){const C=w.type;if(!w.text)return;if(!B){B=!0,S+=w.text.length,A=T;const V=Array.from(w.text)[0];k({type:C,text:V},T);const $=w.text.slice(V.length);if($)for(p=C,o=$,a=T,j(!1);o.length>=t.maxPendingChars;)j(!1);return}p&&p!==C&&j(!0),p||(p=C,a=T),o+=w.text;const _=Math.max(0,T-A);for(S*=Math.exp(-_/t.arrivalRateTauMs),S+=w.text.length,A=T,j(!1);o.length>=t.maxPendingChars;)j(!1);return}gs(w)&&j(!0),k(w,T)},U=(async()=>{var w;try{for await(const T of e)W(T);h&&j(!0)}catch(T){h&&!((w=r.signal)!=null&&w.aborted)&&(j(!0),u.push({kind:"error",error:T,arrivedAt:s.now(),chars:0}))}finally{L=!0,O()}})(),se=()=>u.length||L?Promise.resolve():new Promise(w=>{v=w});return{events:async function*(){var T,C,_,V;let w=Number.NEGATIVE_INFINITY;try{for(;;){if(await se(),!u.length){if(L||!h)return;continue}const $=u[0];if($.kind==="error")throw u.shift(),$.error;if($.chars&&!((T=r.isHidden)!=null&&T.call(r))){const F=s.now(),ne=u.reduce((ae,ie)=>ae+ie.chars,0),ue=((C=u.find(ae=>ae.chars))==null?void 0:C.arrivedAt)??F,z=Math.max(0,t.maxBufferedMs-(F-ue)),J=S*Math.exp(-Math.max(0,F-A)/t.arrivalRateTauMs)/t.arrivalRateTauMs,m=z>0?ne/z:Number.POSITIVE_INFINITY,I=Math.max(t.minRateCharsPerMs,J*t.arrivalRateHeadroom,m),i=Math.min(t.maxDelayMs,Math.max(t.minDelayMs,$.chars/I)),M=Math.max(0,$.arrivedAt+t.maxBufferedMs-F),P=Math.max($.arrivedAt,w+Math.min(i,M));if(await s.sleep(Math.max(0,P-s.now()),r.signal),!h||(_=r.signal)!=null&&_.aborted)return}u.shift(),w=s.now(),yield $.event}}finally{h&&(h=!1,O(),await((V=e.return)==null?void 0:V.call(e,void 0))),await U}}(),takeAcceptedForStop(){var T;if(!h)return[];h=!1,p&&o&&(k({type:p,text:o},a),o="",p=null);const w=u.flatMap(C=>C.kind==="event"&&C.event.type!=="done"&&C.event.type!=="error"?[C.event]:[]);return u.length=0,O(),(T=e.return)==null||T.call(e,void 0),w}}}const Ot=[250,500,1e3],bs=(e,r)=>new Promise(t=>{const s=()=>{window.clearTimeout(u),r.removeEventListener("abort",s),t()},u=window.setTimeout(s,e);r.addEventListener("abort",s,{once:!0})});async function*ws(e,r){let t=e,s=0;for(;;){let u=!1;try{for await(const o of t)(o.type==="done"||o.type==="error")&&(u=!0),yield o;if(u||r.signal.aborted)return;throw new Tt}catch(o){r.onDisconnect();const p=r.getSessionId();if(r.signal.aborted||u||!(o instanceof Tt)||!p||s>=Ot.length)throw o;if(await bs(Ot[s],r.signal),r.signal.aborted)return;s+=1,t=Yt(p,{signal:r.signal,afterSequence:r.getAfterSequence(),onSequence:r.onSequence})}}}const qt=new Set(["openrouter_monthly_budget_exhausted","openrouter_unavailable","openrouter_byok_credential_invalid","openrouter_byok_billing_error","openrouter_byok_rate_limit","hf_inference_billing_exhausted"]),xs=new Set(["paper_context_unavailable","paper_mention_unavailable","paper_mentions_disabled","paper_selection_disabled","paper_selection_requires_reader","paper_selection_paper_mismatch","paper_selection_version_mismatch","paper_selection_page_invalid","paper_selection_too_large","chat_storage_quota_exceeded"]);class vs{constructor(){ee(this,"configuration");ee(this,"lifecycle",Gt());ee(this,"_busy",!1);ee(this,"_pendingCapacity",null);ee(this,"_sawStreamStart",!1);ee(this,"_providerExecuted",!1);ee(this,"_providerStatusChanged",!1);ee(this,"terminal","pending");ee(this,"rejection",null)}get busy(){return this._busy}get pendingCapacity(){return this._pendingCapacity}get sawStreamStart(){return this._sawStreamStart}get sawTerminalEvent(){return this.terminal==="complete"||this.terminal==="error"}get streamFailed(){return this.terminal==="error"||this.terminal==="transport_error"}get admissionRejected(){return this.rejection!==null}get shouldRefreshProvider(){return this._sawStreamStart&&this._providerExecuted||this._providerStatusChanged}finish(){this._busy=!1}queueCapacity(r){this._pendingCapacity=r}cancelCapacity(){this._pendingCapacity=null}projectSession(r){return this._busy&&r===this.sessionId?this.messages:null}get state(){return this.lifecycle}get messages(){return this.lifecycle.messages}get sessionId(){return this.lifecycle.sessionId}transition(r){return this.lifecycle=hs(this.lifecycle,r),this.lifecycle}start(r,t,s){this.configuration=s,this._busy=!0,this._sawStreamStart=this._providerExecuted=this._providerStatusChanged=!1,this.terminal="pending",this.rejection=null,this.transition({type:"start",messages:r,sessionId:t})}restore(r,t=this.sessionId){return this.transition({type:"load",messages:r,sessionId:t})}observe(r){return r.type==="stream_start"&&(this._sawStreamStart=!0,this._providerExecuted=r.provider_execution!==!1),(r.type==="done"||r.type==="error")&&(this.terminal=r.type==="done"?"complete":"error"),r.type==="error"&&qt.has(r.code??"")?(this._providerStatusChanged=!0,!0):!1}reject(r,t){const s=r instanceof nt?r.code:void 0,u=t&&s==="chat_not_busy"?"completed":s==="chat_temporarily_disabled"?"disabled":s==="chat_capacity"?"capacity":xs.has(s??"")?"draft":qt.has(s??"")?"provider":"network";return this.terminal=u==="completed"?"already_complete":"transport_error",this.rejection=u==="disabled"||u==="capacity"||u==="draft"?u:null,this._providerStatusChanged||(this._providerStatusChanged=u==="provider"),u}reset(){this._busy=!1,this._pendingCapacity=null,this.transition({type:"reset"})}}const Ss=750;function Es(e,r){for(let t=e.length-1;t>=0;t-=1)if(r(e[t]))return t;return-1}function Se(e){const r=d.useRef(e);return d.useLayoutEffect(()=>{r.current=e}),d.useCallback((...t)=>r.current(...t),[])}function Rs(e){const[r,t]=d.useState([]),[s,u]=d.useState(!1),[o,p]=d.useState(""),[a]=d.useState(()=>new vs),h=d.useRef(null),L=d.useRef(null),v=d.useRef(null),S=d.useRef(null),A=d.useRef(!1),B=d.useRef(null),O=d.useRef(null),k=d.useRef("cleared"),j=d.useRef(null),[W,U]=d.useState(null),[se,Q]=d.useState(null),w=d.useRef([]),T=d.useRef(null),C=d.useRef(!1),_=d.useRef(e),V=d.useRef(He()),$=d.useRef(0),F=d.useRef(0),ne=d.useRef(e.sessionId);if(ne.current!==e.sessionId){ne.current=e.sessionId;const c=a.projectSession(e.sessionId);c&&t(c),a.sessionId!==e.sessionId&&(F.current+=1,j.current=null)}_.current=e,w.current=r,d.useEffect(()=>()=>{var c;O.current!==null&&window.clearTimeout(O.current),(c=h.current)==null||c.abort(),L.current=null,v.current!==null&&cancelAnimationFrame(v.current),S.current!==null&&window.clearTimeout(S.current),a.cancelCapacity()},[a]),d.useEffect(()=>{a.busy||a.restore(a.messages,e.sessionId)},[e.sessionId,a]),d.useEffect(()=>{const c=a.projectSession(e.sessionId);C.current=c!==null,c&&(t(c),w.current=c)},[e.sessionId,a]);const ue=d.useMemo(()=>{const c={};for(const f of r)for(const E of f.blocks??[])if(E.kind==="tool")for(const b of E.results??[])c[b.route_id]=b;return c},[r]),z=()=>`m${++$.current}_${Date.now().toString(36)}`,J=(c,f=!0)=>{const E=a.state,b=a.transition(c),g=c.type==="event"&&c.event.type==="stream_start"?c.event.session_id:null;return g?_.current.onSessionId(g,E.sessionId,a.configuration):b.sessionId&&b.sessionId!==E.sessionId&&_.current.onSessionId(b.sessionId,E.sessionId,a.configuration),b.title!==E.title&&_.current.onTitle(b.title,b.sessionId),f&&(w.current=b.messages,t(b.messages)),b},m=()=>T.current===F.current||C.current,I=()=>{v.current!==null&&(cancelAnimationFrame(v.current),v.current=null),S.current!==null&&(window.clearTimeout(S.current),S.current=null)},i=()=>{I(),document.visibilityState!=="hidden"&&C.current&&(A.current=!1,w.current=a.messages,t(a.messages))},M=()=>{if(!C.current||document.visibilityState==="hidden"||v.current!==null||S.current!==null)return;const c=()=>{v.current=null,S.current=null,i()};typeof requestAnimationFrame=="function"?v.current=requestAnimationFrame(c):S.current=window.setTimeout(c,0)};d.useEffect(()=>{const c=()=>{document.visibilityState==="visible"&&A.current&&M()};return document.addEventListener("visibilitychange",c),()=>document.removeEventListener("visibilitychange",c)});const P=c=>{if(h.current!==c||(O.current!==null&&(window.clearTimeout(O.current),O.current=null),k.current==="cleared"))return;const f=k.current==="shown";k.current="cleared",f&&J({type:"clear_workspace_status"},m())},ae=(c,f)=>{O.current!==null&&window.clearTimeout(O.current),k.current="armed",O.current=window.setTimeout(()=>{O.current=null,!(k.current!=="armed"||h.current!==c||c.signal.aborted||F.current!==f)&&(k.current="shown",J({type:"workspace_status"},m()))},Ss)},ie=(c,f)=>{const E=j.current;!E||E.controller!==c||E.tracker.recordStreamStart(f,performance.now())},fe=(c,f)=>{const E=j.current;!E||E.controller!==c||E.tracker.recordTerminal(f)};d.useLayoutEffect(()=>{const c=j.current;if(!c)return;const f=r.at(-1);if((f==null?void 0:f.role)!=="assistant"||!(f.blocks??[]).some(g=>g.kind==="tool"||g.kind==="reasoning"&&!!g.text.trim()||g.kind==="answer"&&!!g.text.trim()))return;const b=performance.now();c.tracker.recordFirstVisible(b);for(const g of f.blocks??[])g.kind==="reasoning"&&g.text.trim()?c.tracker.recordSemantic("reasoning",b):g.kind==="tool"?c.tracker.recordSemantic("tool",b):g.kind==="answer"&&g.text.trim()&&c.tracker.recordSemantic("answer",b)},[r]);const ge=(c,f=!0)=>{J({type:"event",event:c},f)},Ke=async(c,f)=>{var g;const E=await(_.current.loadSession??ut)(c);let b=$t(E);return((g=B.current)==null?void 0:g.sessionId)===c&&(b=B.current.messages,B.current=null),F.current!==f&&!(T.current===f&&C.current&&_.current.sessionId===c)?null:(t(b),w.current=b,a.restore(b,c),b)},Ie=(c,f,E,b,g,H,K)=>{const y=++F.current;T.current=y,C.current=!0;const N=new AbortController;h.current=N;const he=c.text;return V.current=c,p(""),t(E),a.start(E,f.session_id,K??{model:_.current.initialModel,webSearchEnabled:!!f.web_search_enabled,reasoningEffort:f.reasoning_effort??Le}),u(!0),j.current=H?null:{controller:N,tracker:new ds(performance.now())},k.current="cleared",(async()=>{var X,G,_e,re,ve,qe;let oe=0;const ce=Y=>{Y>oe&&(oe=Y)};try{const Y=H?Yt(H,{signal:N.signal,onSequence:ce}):Nr(f,{signal:N.signal,onSequence:ce}),q=ws(Y,{signal:N.signal,getSessionId:()=>a.sessionId,onDisconnect:()=>{!N.signal.aborted&&h.current===N&&ge({type:"compaction_status",state:"finished"},m())},getAfterSequence:()=>oe,onSequence:ce}),Z=!H&&Ue()&&Dr(),pe=Z?_s(q,{signal:N.signal,isHidden:()=>document.visibilityState==="hidden"}):null;pe&&(L.current={controller:N,stream:pe});for await(const D of(pe==null?void 0:pe.events)??q){if(N.signal.aborted||h.current!==N)break;D.type==="paper_artifact"&&((G=(X=_.current).onPaperArtifact)==null||G.call(X,D,a.sessionId)),D.type==="stream_start"&&ie(N,D.request_id),D.type==="sandbox_start"&&ae(N,y),(D.type==="sandbox_ready"||D.type==="workspace_ready"||D.type==="lifecycle")&&P(N),(D.type==="reasoning_start"||D.type==="reasoning_delta"||D.type==="tool_call"||D.type==="tool_call_start"||D.type==="tool_call_arguments_delta"||D.type==="tool_call_arguments_done"||D.type==="app_start"||D.type==="app_result"||D.type==="artifact_start"||D.type==="artifact_ready"||D.type==="artifact_error"||D.type==="answer_delta"||D.type==="done"||D.type==="error")&&P(N),a.observe(D)&&m()&&_.current.onInterrupted(c),(D.type==="done"||D.type==="error")&&fe(N,D.type==="error"?"error":"complete");const ke=m(),$e=ke&&!(Z&&document.visibilityState==="hidden"),Ze=D.type==="reasoning_delta"||D.type==="answer_delta"||D.type==="tool_call_arguments_delta",Be=!["stream_start","sandbox_start","sandbox_ready","workspace_ready","session_title_start","session_title_delta","session_title_done","reasoning_delta","answer_delta","tool_call_arguments_delta"].includes(D.type);Z&&Be&&i(),Z&&Ze?(ge(D,!1),A.current||(A.current=ke),M()):(ge(D,$e),Z&&ke&&!$e&&(A.current=!0))}}catch(Y){if(!N.signal.aborted&&h.current===N){const q=a.reject(Y,!!H),Z=q==="completed";if(P(N),!Z)if(q==="disabled")Q({question:he,draft:c}),a.restore(b),F.current===y&&(t(b),w.current=b,p(""));else if(q==="capacity"){const pe=Y instanceof nt?Y.retryAfterSeconds??5:5,D={question:he,draft:c,request:f,optimistic:E,original:b,edit:g,retryAfterSeconds:pe,retryAt:Date.now()+pe*1e3};a.queueCapacity(D),U({question:he,draft:c,retryAt:D.retryAt,retryAfterSeconds:pe}),a.restore(b),F.current===y&&(t(b),w.current=b,p(""))}else fe(N,"network_error"),q==="draft"&&(m()&&_.current.onInterrupted(c),a.restore(b),F.current===y&&(t(b),w.current=b,p(Y instanceof Error?Y.message:"The assistant stream failed."))),q==="provider"&&m()&&_.current.onInterrupted(c);!Z&&!a.admissionRejected&&F.current===y&&ge({type:"error",message:Y instanceof Error?Y.message:"The assistant stream failed.",code:Y instanceof nt?Y.code:void 0})}}finally{if(h.current===N){if(((_e=L.current)==null?void 0:_e.controller)===N&&(i(),L.current=null),P(N),!a.sawTerminalEvent&&!N.signal.aborted&&fe(N,"network_error"),a.finish(),u(!1),a.admissionRejected)_.current.onSettled(f.session_id);else if(!N.signal.aborted){a.shouldRefreshProvider&&((ve=(re=_.current).onProviderTerminal)==null||ve.call(re));const Y=a.sessionId;if(g&&!a.sawStreamStart)a.restore(g.snapshot),F.current===y&&(t(g.snapshot),w.current=g.snapshot,p("Couldn’t resend this message. Your original conversation was restored."));else if(Y){F.current===y&&g&&(a.streamFailed||!a.sawTerminalEvent)&&(a.restore(g.snapshot),t(g.snapshot),w.current=g.snapshot);try{const q=await Ke(Y,y);q&&g&&q.some(Z=>Z.id===g.targetId)&&p("Couldn’t resend this message. Your original conversation was restored.")}catch{F.current===y&&J({type:"settle"})}}else F.current===y&&J({type:"settle"});(!h.current||h.current===N)&&_.current.onSettled(Y)}((qe=j.current)==null?void 0:qe.controller)===N&&(j.current=null)}}})(),!0},je=Se(c=>{var ce,X;const f=typeof c=="string"?He(c.trim()):c,E=f.text;if(!E||E.length>8e3||a.busy||a.pendingCapacity)return!1;const b=w.current,g=[...b].reverse().find(G=>G.role==="user"),H=g!=null&&g.status&&g.status!=="complete"&&g.revision?{replace_message_id:g.id,prior_revision:g.revision}:null,K={id:z(),role:"user",text:E,paperMentions:f.paperMentions,paperSelection:f.paperSelection},y={id:z(),role:"assistant",streaming:!0,blocks:[]},N=H&&g?Es(b,G=>G.id===g.id):-1,he=N<0?[...b,K,y]:[...b.slice(0,N),K,y],oe=(X=(ce=_.current).viewerContext)==null?void 0:X.call(ce);return Ie(f,{message:E,paper_mentions:f.paperMentions.map(({route_id:G,title:_e,start:re,end:ve})=>({route_id:G,title:_e,start:re,end:ve})),session_id:_.current.sessionId,client_message_id:crypto.randomUUID(),web_search_enabled:!!_.current.webSearchEnabled,reasoning_effort:_.current.reasoningEffort??Le,..._.current.primaryPaperRouteId?{primary_paper_route_id:_.current.primaryPaperRouteId}:{},...oe?{viewer_context:oe}:{},...f.paperSelection?{paper_selection:Mt(f.paperSelection)}:{},...!_.current.sessionId&&_.current.initialModel?{initial_model:_.current.initialModel}:{},...H??{}},he,b)}),xe=Se((c,f)=>{var ce,X;const E=typeof f=="string"?He(f.trim()):f,b=E.text;if(!b||b.length>8e3||a.busy||a.pendingCapacity)return!1;const g=w.current.slice(),H=g.findIndex(G=>G.id===c&&G.role==="user");if(H<0)return!1;const K=g[H];if(!_.current.sessionId||!K.revision)return!1;const y={id:K.id,role:"user",text:b,paperMentions:E.paperMentions,paperSelection:E.paperSelection,revision:K.revision+1,status:"generating"},N={id:z(),role:"assistant",streaming:!0,blocks:[]},he=[...g.slice(0,H),y,N],oe=(X=(ce=_.current).viewerContext)==null?void 0:X.call(ce);return Ie(E,{message:b,paper_mentions:E.paperMentions.map(({route_id:G,title:_e,start:re,end:ve})=>({route_id:G,title:_e,start:re,end:ve})),session_id:_.current.sessionId,client_message_id:crypto.randomUUID(),web_search_enabled:!!_.current.webSearchEnabled,reasoning_effort:_.current.reasoningEffort??Le,..._.current.primaryPaperRouteId?{primary_paper_route_id:_.current.primaryPaperRouteId}:{},...oe?{viewer_context:oe}:{},...E.paperSelection?{paper_selection:Mt(E.paperSelection)}:{},replace_message_id:K.id,prior_revision:K.revision},he,g,{targetId:K.id,snapshot:g})}),de=Se(()=>{const c=w.current.slice(),f=[...c].reverse().find(g=>g.role==="user");if(!_.current.sessionId||!(f!=null&&f.revision)||a.busy||a.pendingCapacity)return!1;const E=He(f.text??"Continue the interrupted response from saved progress."),b=[...c,{id:z(),role:"user",text:E.text,paperMentions:[]},{id:z(),role:"assistant",streaming:!0,blocks:[]}];return Ie(E,{message:E.text,session_id:_.current.sessionId,client_message_id:crypto.randomUUID(),retry_message_id:f.id,..._.current.primaryPaperRouteId?{primary_paper_route_id:_.current.primaryPaperRouteId}:{},web_search_enabled:!!_.current.webSearchEnabled,reasoning_effort:_.current.reasoningEffort??Le},b,c)}),Te=Se(()=>{const c=[...w.current].reverse().find(f=>f.role==="user");return c!=null&&c.text?xe(c.id,{text:c.text,paperMentions:c.paperMentions??[],...c.paperSelection?{paperSelection:c.paperSelection}:{}}):!1}),We=d.useCallback(()=>{a.cancelCapacity(),U(null)},[a]),ye=Se(()=>{const c=a.pendingCapacity;return!c||Date.now(){var K,y;if(!h.current)return;const c=h.current;P(c),fe(c,"stopped"),c.abort();const f=((K=L.current)==null?void 0:K.controller)===c?L.current.stream.takeAcceptedForStop():[];L.current=null;for(const N of f)ge(N,!1);i(),h.current=null,((y=j.current)==null?void 0:y.controller)===c&&(j.current=null),a.finish(),u(!1);const E=m(),b=J({type:"stop"},!1).messages;E&&(w.current=b,t(b),_.current.onInterrupted(V.current));const g=a.sessionId;g&&(B.current={sessionId:g,messages:b}),g&&Mr(g).catch(()=>{});const H=++F.current;window.setTimeout(()=>{g&&E&&F.current===H?Ke(g,H).catch(()=>{}).finally(()=>{h.current||_.current.onSettled(g)}):h.current||_.current.onSettled(g)},450)}),Ne=Se((c,f)=>{const E=C.current?a.transition({type:"toggle_block",messageId:c,blockIndex:f}).messages:Jt(w.current,c,f);w.current=E,t(E)}),Ye=d.useCallback(()=>{var c;F.current+=1,O.current!==null&&(window.clearTimeout(O.current),O.current=null),k.current="cleared",(c=h.current)==null||c.abort(),h.current=null,L.current=null,I(),A.current=!1,B.current=null,j.current=null,U(null),a.reset(),T.current=null,C.current=!1,t([]),u(!1),p("")},[a]),Oe=Se((c,f,E=!1,b)=>{var g;if(F.current+=1,O.current!==null&&(window.clearTimeout(O.current),O.current=null),k.current="cleared",I(),A.current=!1,j.current=null,a.cancelCapacity(),U(null),a.busy&&f!==void 0&&f===a.sessionId){C.current=!0,t(a.messages),w.current=a.messages,p("");return}if(C.current=!1,a.busy||((g=h.current)==null||g.abort(),h.current=null,T.current=null,C.current=!1),E&&f&&!a.busy){const H=[...c].reverse().find(K=>K.role==="user");if(H){const K={text:H.text??"",paperMentions:H.paperMentions??[],...H.paperSelection?{paperSelection:H.paperSelection}:{}},y=[...c,{id:`${H.id}-active`,role:"assistant",streaming:!0,blocks:[]}];Ie(K,{message:K.text,session_id:f,client_message_id:"reconnect",web_search_enabled:!!_.current.webSearchEnabled,reasoning_effort:_.current.reasoningEffort??Le},y,c,void 0,f,b);return}}t(c),w.current=c,a.busy||a.restore(c,f??_.current.sessionId),a.busy||u(!1),p("")});return{messages:r,busy:s,activeSessionId:s?a.sessionId:null,activeTitle:a.state.title,activeConfiguration:a.configuration,selectedBusy:s&&a.sessionId===e.sessionId,papers:ue,sessionError:o,capacityRequest:W,disabledRequest:se,send:je,editAndResend:xe,retryFromProgress:de,retryLatest:Te,retryCapacity:ye,cancelCapacity:We,dismissDisabled:()=>Q(null),stop:Me,toggleBlock:Ne,reset:Ye,load:Oe}}const Xt=["chat","openai","usage"],Is=90,Zt="pwc:chat:openai-credits-notice:dismissed";function ks(e=!0){return Pe({queryKey:Xt,queryFn:()=>Xe.getOpenAIUsage(),enabled:e,staleTime:3e4,retry:!1,refetchOnWindowFocus:!0})}function Cs(e,r,t){if(!e||r!=="openai"||e.used_percent["chatSessions",e],detail:(e,r)=>["chatSession",e,r]},Ts=e=>Vt({queryKey:Fe.list(e),queryFn:Lr,staleTime:0,refetchOnWindowFocus:!1,retry:!1}),Bt=(e,r)=>Vt({queryKey:Fe.detail(e,r),queryFn:()=>{if(!r)throw new Error("A saved conversation is required");return ut(r)},staleTime:0,refetchOnWindowFocus:!1,retry:!1}),me=He,Ms=["Summarize the main contributions","Explain in simple terms","Identify the main limitations"],Ns=()=>{const e=sessionStorage.getItem(Je);if(!e)return null;try{return Yr(JSON.parse(e),e)}catch{}return me(e)},Ds=({enabled:e,workspaceKey:r,children:t,onAskAiFix:s})=>e?n.jsx(Sr,{workspaceKey:r,onAskAiFix:s,children:t}):n.jsx(n.Fragment,{children:t}),Ls=({enabled:e,children:r})=>e?n.jsx(Er,{variant:"chat",children:r}):n.jsx(n.Fragment,{children:r}),Fs=({mode:e="general",routeSessionId:r,primaryPaper:t,currentPage:s,paperSelection:u,onPaperSelectionChange:o,onSessionId:p,onReaderSubmit:a,onReaderNewChat:h,onReaderClose:L})=>{var ht,mt,gt,yt,_t,bt,wt,xt,vt,St,Et,Rt,It,kt;const{sessionId:v}=lr(),S=r??(e==="general"?v:void 0),A=ur(),[B,O]=dr(),{user:k,isLoading:j}=Ut(),W=pr(),U=(k==null?void 0:k.hf_subject)??null,se=_r(),Q=Pe({queryKey:["chatAvailability"],queryFn:()=>Xe.getAvailability(),refetchInterval:3e4,retry:!1,enabled:Ue()&&!!k}),w=((ht=Q.data)==null?void 0:ht.status)==="paused"||e==="paper"&&((mt=Q.data)==null?void 0:mt.paper_reader_chat_enabled)===!1,T=Pe({...Ts(U),enabled:!!k&&!j}),C=T.data??[],[_,V]=d.useState(null),[$,F]=d.useState(""),ne=l=>{W.setQueryData(Fe.list(U),x=>l(x??[]))},ue=(l,x)=>{ne(R=>R.map(le=>le.id===l?{...le,...x}:le)),W.setQueryData(Fe.detail(U,l),R=>R&&{...R,...x})},z=d.useRef(Fr()),J=d.useRef(B.get("model")||((gt=z.current)==null?void 0:gt.model)),[m,I]=d.useState(se?Or:qr),[i,M]=d.useState(J.current||st),P=Br(m,i),ae=Pr(m,i),ie=P==="huggingface"&&!ae,fe=zr(!!(k&&P==="openrouter")),ge=ks(Ue()&&!!k&&P==="openai"),[Ke,Ie]=d.useState(()=>As()),je=Cs(ge.data,P,Ke),[xe,de]=d.useState(()=>me()),Te=Le,We=!!((yt=Q.data)!=null&&yt.web_search_available),[ye,Me]=d.useState(()=>{var x,R;const l=(x=B.get("q"))==null?void 0:x.trim();return l?me(l):((R=z.current)==null?void 0:R.draft)??me()}),Ne=d.useRef(!1),Ye=d.useRef(!1),Oe=d.useRef(!1),[c,f]=d.useState(()=>typeof window>"u"||window.innerWidth>900),E=d.useRef(new Set),b=d.useRef(S);b.current=S;const[g,H]=d.useState(void 0),K=d.useCallback(async()=>{await W.invalidateQueries({queryKey:Fe.list(U)})},[W,U]),y=Rs({sessionId:S??null,initialModel:i,webSearchEnabled:We,reasoningEffort:Te,primaryPaperRouteId:e==="paper"?t==null?void 0:t.routeId:void 0,viewerContext:e==="paper"&&s?()=>({page:Math.max(1,Math.min(1e4,s()))}):void 0,loadSession:async l=>{const x=await W.fetchQuery(Bt(U,l));return V(R=>(R==null?void 0:R.sessionId)===l?null:R),x},onSessionId:(l,x,R)=>{W.cancelQueries({queryKey:Fe.list(U)});const le=new Date().toISOString();ne(we=>we.some(Ce=>Ce.id===l)?we.map(Ce=>Ce.id===l?{...Ce,is_busy:!0}:Ce):[{id:l,title:"New chat",selected_model:(R==null?void 0:R.model)??i,created_at:le,updated_at:le,message_count:1,is_busy:!0,web_search_enabled:(R==null?void 0:R.webSearchEnabled)??We,reasoning_effort:(R==null?void 0:R.reasoningEffort)??Te},...we]),(b.current??null)===x&&l!==x&&(e==="paper"?p==null||p(l):A(`/chat/${l}`,{replace:!0}))},onTitle:(l,x)=>{x&&!E.current.has(x)&&ue(x,{title:l})},onSettled:l=>{l&&ue(l,{is_busy:!1}),W.invalidateQueries({queryKey:Xt}),K()},onProviderTerminal:()=>{W.invalidateQueries({queryKey:Gr})},onPaperArtifact:(l,x)=>{x&&V({sessionId:x,descriptor:l.descriptor})},onInterrupted:l=>{de(l),o==null||o(l.paperSelection)}}),N=y.send;d.useEffect(()=>{y.capacityRequest&&(de(y.capacityRequest.draft),o==null||o(y.capacityRequest.draft.paperSelection))},[y.capacityRequest,o]);const he=d.useCallback(l=>{sessionStorage.setItem(Je,JSON.stringify(l)),sessionStorage.setItem(Qe,i),sessionStorage.setItem(Hr,Te),sessionStorage.setItem(ze,"1"),sessionStorage.setItem(Ge,"1");const x=e==="paper"&&t?`/pdf/${t.routeId}`:b.current?`/chat/${b.current}`:"/chat";window.location.href=fr(x,ie)},[e,t,Te,i,ie]),oe=d.useCallback((l,x)=>{sessionStorage.setItem(Je,JSON.stringify(l)),sessionStorage.setItem(Qe,i),sessionStorage.removeItem(ze),sessionStorage.removeItem(Ge),Me(me()),de(l),o==null||o(l.paperSelection),F(x)},[o,i]),ce=d.useCallback(async l=>{const x=o?u?{...l,paperSelection:u}:{text:l.text,paperMentions:l.paperMentions}:l;if(!k){he(x);return}if(ie&&!Ye.current){if(Oe.current)return;Oe.current=!0;try{if(!(await Xe.getInferenceBilling()).connected){if(sessionStorage.getItem(Ge)==="1"){oe(x,"Hugging Face inference authorization was not completed. Your prompt is ready to retry.");return}he(x);return}Ye.current=!0}catch(R){oe(x,R instanceof Error?R.message:"Could not check Hugging Face authorization.");return}finally{Oe.current=!1}}if(sessionStorage.removeItem(ze),!N(x)){oe(x,"Your prompt was not sent. It is ready to retry.");return}sessionStorage.removeItem(Je),sessionStorage.removeItem(Qe),sessionStorage.removeItem(Ge),Ur(),z.current=null,de(me()),o==null||o(void 0),e==="paper"&&(a==null||a())},[he,e,o,a,u,oe,N,k,ie]);d.useEffect(()=>{if(j||!k)return;const l=sessionStorage.getItem(Qe);l&&M(l),Kr().then(le=>{if(I(le.items),!b.current){const we=J.current||l;M(we&&le.items.some(Ce=>Ce.id===we)?we:le.default_model)}});const x=Ns(),R=sessionStorage.getItem(ze)==="1";x&&(o==null||o(x.paperSelection),R?Me(x):de(x))},[j,o,K,k]);const X=y.selectedBusy,{load:G,activeConfiguration:_e}=y,re=Pe({...Bt(U,S??null),enabled:!!(S&&k&&!j&&!X),refetchOnMount:"always"}),ve=!j&&(!k||re.error instanceof hr&&re.error.status===404),qe=Pe({queryKey:["chatSessionPublicShare",S],queryFn:()=>Xe.getSessionPublicShare(S??""),enabled:e==="general"&&!!S&&ve,retry:!1}),Y=(_t=qe.data)==null?void 0:_t.public_path;d.useEffect(()=>{Y&&A(Y,{replace:!0})},[A,Y]);const q=re.data,Z=X||g===(S??null),pe=_&&_.sessionId===S?_.descriptor:q==null?void 0:q.latex_paper,D=(wt=(bt=[...(q==null?void 0:q.messages)??[]].reverse().find(l=>l.role==="user"&&l.viewer_context))==null?void 0:bt.viewer_context)==null?void 0:wt.page;d.useLayoutEffect(()=>{const l=S??null;if(g!==l){if(X){H(l);const x=_e;x&&x.model&&M(x.model);return}if(!l){G([],null),H(null);return}!q||re.isFetching||(H(l),G($t(q),l,q.is_busy,{model:q.selected_model,webSearchEnabled:q.web_search_enabled,reasoningEffort:q.reasoning_effort??"high"}),F(""),M(q.selected_model))}},[S,X,q,G,_e,re.isFetching,g]),d.useEffect(()=>{var le;if(j)return;const l=(le=B.get("q"))==null?void 0:le.trim();if(!l)return;Ne.current=!1;const x=B.get("model");x&&M(x),Me(me(l));const R=new URLSearchParams(B);R.delete("q"),R.delete("model"),O(R,{replace:!0})},[j,B,O]),d.useEffect(()=>{if(j||y.busy||!ye.text||Ne.current||k&&Q.isFetching||S&&!Z)return;const l=window.setTimeout(()=>{if(Ne.current)return;Ne.current=!0,ce(ye).finally(()=>Me(me()))},0);return()=>window.clearTimeout(l)},[j,Q.isFetching,y.busy,ye,S,Z,ce,k]),d.useEffect(()=>{const l=()=>{!k||y.busy||K()};return window.addEventListener("focus",l),()=>window.removeEventListener("focus",l)},[y.busy,K,k]);const ke=()=>{window.innerWidth<=900&&f(!1),G([],null),H(null),de(me()),o==null||o(void 0),e==="paper"?h==null||h():A("/chat")},$e=async(l,x)=>{try{const R=await Nt(l,{title:x});return E.current.add(l),ue(l,R),!0}catch(R){return F(R instanceof Error?R.message:"Rename failed"),!1}},Ze=async l=>{const x=y.busy&&l===y.activeSessionId;if(window.confirm(x?"Stop and delete this chat? This cannot be undone.":"Delete this chat? This cannot be undone.")){x&&y.stop();try{if(x){const R=Date.now()+3e3;for(;(await ut(l)).is_busy;){if(Date.now()>=R)throw new Error("Generation is still stopping. The chat was not deleted.");await new Promise(we=>window.setTimeout(we,150))}}await $r(l),l===S&&ke(),await K()}catch(R){F(R instanceof Error?R.message:"Delete failed")}}},Be=us({messages:y.messages,refreshSessions:K,resetChat:y.reset,restoreDraft:de}),er=async l=>{const x=i;if(M(l),!S)return!0;try{const R=await Nt(S,{selected_model:l});return ue(S,{selected_model:R.selected_model}),F(""),!0}catch(R){return M(x),F(R instanceof Error?R.message:"Model change failed"),!1}},tr=m.some(l=>l.id===st),rr=async()=>{await er(st)&&y.retryLatest()},sr=Xr(e==="general"),dt=C.map(l=>l.id===y.activeSessionId&&y.busy?{...l,is_busy:!0,title:E.current.has(l.id)?l.title:y.activeTitle||l.title}:l),be=dt.find(l=>l.id===S),et=(be==null?void 0:be.primary_paper)??(q==null?void 0:q.primary_paper),tt=y.messages.length===0,Ve=!!(S&&(j||k&&!Z&&!re.isError||qe.isFetching||Y)),pt=!Z&&!Ve&&((xt=re.error)==null?void 0:xt.message),nr=!!((vt=fe.data)!=null&&vt.fallback_enabled),ar=o?u?{...xe,paperSelection:u}:{text:xe.text,paperMentions:xe.paperMentions}:xe,ft={onSend:ce,busy:X,onStop:y.stop,draft:ar,onDraftChange:l=>{o?(de({text:l.text,paperMentions:l.paperMentions}),l.paperSelection!==u&&o(l.paperSelection)):de(l)},disabled:w||j||y.busy&&!X,describedBy:w?"chat-paused-description":void 0,paperMentionsEnabled:!!((St=Q.data)!=null&&St.paper_mentions_enabled),paperSelectionEnabled:((Et=Q.data)==null?void 0:Et.paper_reader_selection_enabled)===!0,paperArtifactsEnabled:e==="general"&&((Rt=Q.data)==null?void 0:Rt.paper_artifacts_enabled)===!0};return n.jsx(Ds,{enabled:e==="general",workspaceKey:S??"new-chat",onAskAiFix:l=>{ce(me(l))},children:n.jsxs("div",{className:`chat-page${e==="paper"?" chat-page--reader":""}`,style:{height:sr},children:[e==="general"&&n.jsx(os,{sessions:dt,activeSessionId:S,loading:T.isLoading,error:$||((It=T.error)==null?void 0:It.message)||"",open:c,onClose:()=>f(!1),onNew:ke,onNavigate:l=>{window.innerWidth<=900&&f(!1),A(`/chat/${l}`)},onRename:$e,onDelete:l=>void Ze(l)}),n.jsx(Ls,{enabled:e==="general",children:n.jsxs("section",{className:"chat-main","data-testid":"active-chat-pane",children:[n.jsxs("div",{className:"chat-topbar",children:[e==="general"&&!c&&n.jsx("button",{type:"button",className:"icon-btn",onClick:()=>f(!0),title:"Open sidebar",children:n.jsx(Kt,{})}),n.jsx("span",{className:"chat-topbar-title",children:Ve?(be==null?void 0:be.title)||"":(be==null?void 0:be.title)||(q==null?void 0:q.title)||(tt?"":"New chat")}),se&&n.jsx("span",{className:"chat-staging-badge",children:"Staging"}),e==="general"&&S&&et&&n.jsx(Ct,{className:"chat-reader-action",to:`/pdf/${et.route_id}`,onClick:l=>{if(!De()){l.preventDefault();return}const x=et.route_id;sessionStorage.setItem(`pwc:reader:session:${x}`,S),D&&sessionStorage.setItem(`pwc:reader:page:${x}`,String(D))},children:"Open reader"}),S&&Z&&!tt&&n.jsx(cs,{sessionId:S,busy:X,loading:Ve,hasPaperSelection:y.messages.some(l=>!!l.paperSelection),onError:F}),e==="paper"&&n.jsxs(mr,{children:[n.jsx(gr,{asChild:!0,children:n.jsx("button",{type:"button",className:"icon-btn chat-reader-icon-btn","aria-label":"Chat options",title:"Chat options",children:n.jsx(Jr,{"aria-hidden":"true"})})}),n.jsxs(yr,{align:"end",children:[n.jsx(At,{onSelect:ke,children:"New chat"}),n.jsx(At,{asChild:!0,children:n.jsx(Ct,{to:"/chat",children:"All chats"})})]})]}),e==="paper"&&L&&n.jsx("button",{type:"button",className:"icon-btn chat-reader-icon-btn",onClick:L,"aria-label":"Close chat",title:"Close chat",children:n.jsx(Pt,{"aria-hidden":"true"})})]}),je&&n.jsxs("div",{className:"chat-credits-notice",role:"status",children:[n.jsx("span",{children:je.message}),n.jsx("button",{type:"button",className:"chat-credits-notice-close","aria-label":"Dismiss credits notice",onClick:()=>{js(je.resetsAt),Ie(je.resetsAt)},children:"×"})]}),e==="general"&&pe&&n.jsx(ls,{descriptor:pe}),Ve&&!ye.text?n.jsxs("div",{className:"chat-session-loading",role:"status","aria-live":"polite",children:[n.jsx(Wt,{}),n.jsx("span",{children:"Loading conversation…"})]}):pt?n.jsxs("div",{className:"chat-session-load-error",role:"alert",children:[n.jsx("p",{children:pt}),n.jsx("button",{type:"button",onClick:()=>{re.refetch()},children:"Try again"})]}):tt&&!ye.text?n.jsx("div",{className:"chat-empty",children:n.jsxs("div",{className:"chat-empty-inner",children:[n.jsx("div",{className:"chat-empty-eyebrow",children:e==="paper"?"Paper chat":"Research chat"}),n.jsx("h1",{className:"chat-empty-title",children:e==="paper"?"Ask about this paper":n.jsxs(n.Fragment,{children:["Ask ",n.jsx("em",{children:"Papers With Code"})]})}),n.jsx("p",{className:"chat-empty-sub",children:e==="paper"?"Questions are grounded in the open paper. Add up to three other papers with @.":"Answers are grounded in a live hybrid search over papers, tasks, and benchmarks — with citations you can follow."}),se&&n.jsx("p",{className:"chat-staging-access-note",children:"This is a limited staging preview. Only approved Hugging Face users can start chats."}),n.jsx(Lt,{variant:"empty",composerProps:ft,provider:P,sponsored:ae,paused:w,error:y.sessionError,suggestions:e==="paper"?Ms:Wr})]})}):n.jsxs(n.Fragment,{children:[n.jsx(ts,{messages:y.messages,papers:y.papers,busy:X,queuedDraft:ye.text?ye:void 0,paperMentionsEnabled:!!((kt=Q.data)!=null&&kt.paper_mentions_enabled),archivePending:Be.pending,openRouterFallbackEnabled:nr,onToggleBlock:y.toggleBlock,onEditAndResend:y.editAndResend,onRetryFromProgress:y.retryFromProgress,onRetryWithLuna:tr?()=>void rr():void 0,onArchiveOld:()=>void Be.archiveOld(),onArchiveOldest:()=>void Be.archiveOldest()}),n.jsx(Lt,{variant:"followup",composerProps:ft,provider:P,sponsored:ae,paused:w,error:y.sessionError})]})]})}),y.capacityRequest&&n.jsx(rs,{retryAt:y.capacityRequest.retryAt,onCancel:y.cancelCapacity,onRetry:()=>{y.retryCapacity()&&(de(me()),o==null||o(void 0))}}),y.disabledRequest&&n.jsx(ss,{onClose:()=>{var x;const l=((x=y.disabledRequest)==null?void 0:x.draft)??xe;de(l),o==null||o(l.paperSelection),y.dismissDisabled(),Q.refetch()}})]})})},Os=e=>{const{user:r}=Ut();return n.jsx(Fs,{...e},(r==null?void 0:r.hf_subject)??"guest")},gn=()=>n.jsx(Os,{});export{Os as ChatExperience,gn as default}; + */const Jr=cr("EllipsisVertical",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}]]);function Xr(e){const[r,t]=d.useState("calc(100dvh - 60px)");return d.useLayoutEffect(()=>{if(!e)return;const s=document.querySelector(".app-header"),u=window.visualViewport,o=()=>{const a=(u==null?void 0:u.height)??window.innerHeight;t(`${Math.max(0,a-((s==null?void 0:s.offsetHeight)??0))}px`)};o();const p=new ResizeObserver(o);return s&&p.observe(s),u==null||u.addEventListener("resize",o),window.addEventListener("resize",o),()=>{p.disconnect(),u==null||u.removeEventListener("resize",o),window.removeEventListener("resize",o)}},[e]),e?r:"100%"}const Zr="https://huggingface.co/settings/inference-providers",Dt="pwc.chat.billing-notice-dismissed.v1";function es({provider:e}){const[r,t]=d.useState(()=>localStorage.getItem(Dt)==="1");return!Ue()||r||e!=="huggingface"?null:n.jsxs("div",{className:"chat-billing-notice",role:"note",children:[n.jsx("span",{children:"Hugging Face models use the inference permission granted when you start chatting. Included monthly credits are used first, then extra usage requires purchased credits. You can choose organization billing in Settings."}),n.jsxs("div",{className:"chat-billing-notice-actions",children:[n.jsx("a",{href:"/settings",children:"Review billing"}),n.jsx("a",{href:Zr,target:"_blank",rel:"noreferrer",children:"Review usage"}),n.jsx("button",{type:"button",className:"chat-billing-notice-dismiss","aria-label":"Dismiss billing notice",title:"Dismiss",onClick:()=>{localStorage.setItem(Dt,"1"),t(!0)},children:n.jsx(Pt,{size:15,"aria-hidden":"true"})})]})]})}function Lt({variant:e,composerProps:r,provider:t,sponsored:s=!1,paused:u,error:o,suggestions:p=[]}){var h;const a=n.jsxs(n.Fragment,{children:[!s&&n.jsx(es,{provider:t}),u&&n.jsx("div",{id:"chat-paused-description",className:"chat-paused-banner",role:"status",children:"Chat is temporarily disabled. You can keep browsing and editing your conversations. New research runs will return when chat is restored."}),o&&n.jsx("div",{className:"chat-composer-error",role:"alert",children:o}),n.jsx(br,{...r,...e==="empty"?{autoFocus:!0}:{placeholder:(h=r.draft)!=null&&h.text?"Edit and send again…":"Ask a follow-up…"}}),e==="empty"&&n.jsx("div",{className:"chat-examples",children:p.map(L=>n.jsx("button",{type:"button",className:"chat-example",disabled:u,onClick:()=>{var v;return r.onSend({text:L,paperMentions:[],...(v=r.draft)!=null&&v.paperSelection?{paperSelection:r.draft.paperSelection}:{}})},children:L},L))})]});return e==="empty"?a:n.jsx("div",{className:"chat-composer-wrap",children:n.jsxs("div",{className:"chat-composer-inner",children:[a,n.jsx("div",{className:"chat-composer-foot",children:Ue()?n.jsxs(n.Fragment,{children:[t==="huggingface"&&n.jsxs("span",{className:"chat-provider-attribution",children:["Powered by 🤗 ",n.jsx("a",{href:"https://huggingface.co/docs/inference-providers/en/index",target:"_blank",rel:"noreferrer",children:"Inference Providers"}),"."]}),t==="openrouter"&&n.jsxs("span",{className:"chat-provider-attribution",children:["Powered by ",n.jsx("a",{href:"https://openrouter.ai",target:"_blank",rel:"noreferrer",children:"OpenRouter"}),"."]}),t==="openai"&&n.jsx("span",{className:"chat-provider-attribution",children:"Powered by OpenAI."}),n.jsx("span",{children:"The AI assistant can make mistakes. Double-check responses."})]}):n.jsx(n.Fragment,{children:"Assistant preview — responses are simulated."})})]})})}function ts({messages:e,papers:r,busy:t,queuedDraft:s,paperMentionsEnabled:u,archivePending:o,openRouterFallbackEnabled:p,onToggleBlock:a,onEditAndResend:h,onRetryFromProgress:L,onRetryWithLuna:v,onArchiveOld:S,onArchiveOldest:A}){var m,I;const[B,O]=d.useState(null),k=d.useRef(null),j=d.useRef(null),W=d.useRef("bottom"),U=d.useRef(0),se=d.useRef(0),[Q,w]=d.useState(!1),T=d.useRef(null),C=d.useCallback(i=>{W.current=i},[]),_=d.useCallback(()=>{const i=k.current;i&&w(i.scrollHeight-i.scrollTop-i.clientHeight>1)},[]),V=e.filter(i=>i.role==="user"),$=V.length,F=d.useRef($),ne=d.useRef(!1),ue=(m=V[0])==null?void 0:m.id,z=(I=V.at(-1))==null?void 0:I.id;d.useEffect(()=>{t&&O(null)},[t]),d.useLayoutEffect(()=>{const i=k.current;if(i){if($>F.current||t&&!ne.current){const M=Array.from(i.querySelectorAll("[data-message-id]")).at(-1);if(M){const P=i.getBoundingClientRect().top;U.current=i.scrollTop+M.getBoundingClientRect().top-P-24,C("question")}}if(F.current=$,ne.current=t,j.current!==null){i.scrollTop=j.current,j.current=null;return}W.current==="bottom"&&(i.scrollTop=i.scrollHeight),W.current==="question"&&(i.scrollTop=U.current,se.current=i.scrollTop)}},[e,$,t,C]),d.useLayoutEffect(_),d.useEffect(()=>{const i=k.current;if(!i)return;const M=new ResizeObserver(_);return M.observe(i),i.firstElementChild&&M.observe(i.firstElementChild),()=>M.disconnect()},[_]);const J=(i,M)=>{var P;j.current=((P=k.current)==null?void 0:P.scrollTop)??null,a(i,M)};return n.jsxs("div",{className:"chat-conversation-viewport",children:[n.jsx("div",{className:"chat-conversation",ref:k,tabIndex:0,role:"region","aria-label":"Conversation",onWheel:i=>{(i.deltaY<0||W.current==="question")&&C("free")},onTouchStart:i=>{var M;T.current=((M=i.touches[0])==null?void 0:M.clientY)??null},onTouchMove:i=>{var P;const M=(P=i.touches[0])==null?void 0:P.clientY;M!==void 0&&T.current!==null&&(M>T.current||W.current==="question")&&C("free"),T.current=M??null},onKeyDown:i=>{i.target===i.currentTarget&&((["ArrowUp","PageUp","Home"].includes(i.key)||i.key===" "&&i.shiftKey)&&C("free"),["ArrowDown","PageDown","End"," "].includes(i.key)&&W.current==="question"&&C("free"))},onScroll:i=>{const{scrollHeight:M,scrollTop:P,clientHeight:ae}=i.currentTarget,ie=M-P-ae<=1;W.current==="bottom"&&!ie&&C("free");const fe=P-se.current;W.current==="question"&&(fe>1||fe<-1&&!ie)&&C("free"),_()},children:n.jsxs("div",{className:"chat-conversation-inner",children:[e.length===0&&(s==null?void 0:s.text)&&n.jsx(jt,{id:"queued-launch-preview",text:s.text,paperMentions:s.paperMentions,paperSelection:s.paperSelection,isInitial:!0}),e.map(i=>{var M,P,ae,ie;return i.role==="user"?n.jsx(jt,{id:i.id,text:i.text??"",paperMentions:i.paperMentions??[],paperSelection:i.paperSelection,paperMentionsEnabled:u,isInitial:i.id===ue,editingAllowed:!t&&!!i.revision,editing:B===i.id,editNotice:i.id===ue?"Sending will replace this conversation.":i.id===z?"Sending will replace the response.":"Sending will replace the response and all messages after it.",onEdit:()=>O(i.id),onCancel:()=>O(null),onResendDraft:fe=>{const ge=h(i.id,fe);return ge&&O(null),ge}},i.id):n.jsx(wr,{msg:i,papers:r,onToggleBlock:J,onRetryCompaction:!t&&i.id===((M=e.at(-1))==null?void 0:M.id)&&((P=V.at(-1))!=null&&P.revision)?L:void 0,onRetryWithLuna:!t&&i.id===((ae=e.at(-1))==null?void 0:ae.id)&&((ie=V.at(-1))!=null&&ie.revision)?v:void 0,onArchiveOldChats:S,onArchiveOldestChats:A,archivePending:o,hfBilling:null,openRouterFallbackEnabled:p,feedbackEnabled:!0},i.id)})]})}),Q&&n.jsx("button",{type:"button",className:"chat-jump-latest",onClick:()=>{C("bottom");const i=k.current;i&&(i.focus({preventScroll:!0}),i.scrollTop=i.scrollHeight,_())},children:"Jump to latest"})]})}function rs({retryAt:e,onRetry:r,onCancel:t}){const[s,u]=d.useState(()=>Math.max(0,Math.ceil((e-Date.now())/1e3))),o=d.useRef(null);return d.useEffect(()=>{var L;const p=document.activeElement instanceof HTMLElement?document.activeElement:null;(L=o.current)==null||L.focus();const a=()=>u(Math.max(0,Math.ceil((e-Date.now())/1e3)));a();const h=window.setInterval(a,250);return()=>{window.clearInterval(h),p==null||p.focus()}},[e]),n.jsx("div",{className:"chat-capacity-dialog-backdrop",role:"presentation",children:n.jsxs("div",{className:"chat-capacity-dialog",role:"dialog","aria-modal":"true","aria-labelledby":"chat-capacity-dialog-title","aria-describedby":"chat-capacity-dialog-description",onKeyDown:p=>{p.key==="Escape"&&(p.preventDefault(),t())},children:[n.jsx("h2",{id:"chat-capacity-dialog-title",children:"All research slots are currently in use"}),n.jsx("p",{id:"chat-capacity-dialog-description",children:"Your message was not sent or billed. Try again in a few seconds."}),n.jsx("p",{className:"chat-capacity-countdown","aria-live":"polite",children:s>0?`Try again available in ${s} second${s===1?"":"s"}.`:"You can try again now."}),n.jsxs("div",{className:"chat-capacity-dialog-actions",children:[n.jsx("button",{type:"button",className:"chat-capacity-cancel",ref:o,onClick:t,children:"Cancel"}),n.jsx("button",{type:"button",className:"chat-capacity-retry",disabled:s>0,onClick:r,children:"Try again"})]})]})})}function ss({onClose:e}){const r=d.useRef(null);return d.useEffect(()=>{var s;const t=document.activeElement instanceof HTMLElement?document.activeElement:null;return(s=r.current)==null||s.focus(),()=>t==null?void 0:t.focus()},[]),n.jsx("div",{className:"chat-capacity-dialog-backdrop",role:"presentation",children:n.jsxs("div",{className:"chat-capacity-dialog",role:"dialog","aria-modal":"true","aria-labelledby":"chat-disabled-title","aria-describedby":"chat-disabled-description",onKeyDown:t=>{t.key==="Escape"&&(t.preventDefault(),e())},children:[n.jsx("h2",{id:"chat-disabled-title",children:"Chat is temporarily disabled"}),n.jsx("p",{id:"chat-disabled-description",children:"We've temporarily paused new research runs. Your message wasn't sent, and your draft is still here. Please try again later."}),n.jsx("div",{className:"chat-capacity-dialog-actions",children:n.jsx("button",{ref:r,type:"button",className:"chat-capacity-cancel",onClick:e,children:"Keep editing"})})]})})}function ns({url:e,onClose:r}){return e?n.jsx("div",{className:"chat-share-dialog-backdrop",role:"presentation",onMouseDown:r,children:n.jsxs("div",{className:"chat-share-dialog",role:"dialog","aria-modal":"true","aria-labelledby":"chat-share-dialog-title",onMouseDown:t=>t.stopPropagation(),children:[n.jsx("h2",{id:"chat-share-dialog-title",children:"Public link created"}),n.jsx("p",{children:"Anyone with this link can see this conversation. It could not be copied automatically, so copy it manually:"}),n.jsx("input",{readOnly:!0,value:e,"aria-label":"Public conversation link",autoFocus:!0,onFocus:t=>t.currentTarget.select()}),n.jsx("button",{type:"button",onClick:r,children:"Close"})]})}):null}const at="pwc:chat:sidebar-width",it=280,ot=200,ct=480,as=12,lt=e=>Math.max(ot,Math.min(ct,e)),is=()=>{if(typeof window>"u")return it;const e=Number(localStorage.getItem(at));return Number.isFinite(e)&&e>0?lt(e):it};function os({sessions:e,activeSessionId:r,loading:t,error:s,open:u,onClose:o,onNew:p,onNavigate:a,onRename:h,onDelete:L}){const[v,S]=d.useState(is),A=d.useRef(null),B=d.useRef(v),[O,k]=d.useState(null),[j,W]=d.useState(""),[U,se]=d.useState(null),[Q,w]=d.useState(!1),T=[...e].sort((m,I)=>Date.parse(I.updated_at)-Date.parse(m.updated_at)),C=T.filter((m,I)=>I{if(!U)return;const m=()=>se(null),I=i=>{i.key==="Escape"&&m()};return window.addEventListener("click",m),window.addEventListener("keydown",I),()=>{window.removeEventListener("click",m),window.removeEventListener("keydown",I)}},[U]);const $=m=>{k(m.id),W(m.title)},F=async m=>{const I=j.trim();I&&await h(m,I)&&k(null)},ne=(m,I,i)=>se({id:m,x:I,y:i}),ue=m=>{if(!A.current)return;const I=lt(A.current.width+m-A.current.x);B.current=I,S(I)},z=()=>{A.current&&(A.current=null,localStorage.setItem(at,String(B.current)))},J=m=>{const I=lt(m);B.current=I,S(I),localStorage.setItem(at,String(I))};return n.jsxs(n.Fragment,{children:[u&&n.jsx("div",{className:"chat-sidebar-backdrop","aria-hidden":"true",onClick:o}),n.jsxs("aside",{className:`chat-sidebar${u?"":" chat-sidebar-closed"}`,style:{"--chat-sidebar-width":`${v}px`},children:[n.jsxs("div",{className:"chat-sidebar-top",children:[n.jsxs("button",{type:"button",className:"chat-new-chat",onClick:()=>{De()&&p()},children:[n.jsx(Rr,{})," New chat"]}),n.jsx("button",{type:"button",className:"icon-btn",onClick:o,title:"Collapse sidebar",children:n.jsx(Kt,{})})]}),n.jsxs("nav",{className:"chat-sessions","aria-label":"Chat history",children:[t&&n.jsx("div",{className:"chat-sessions-empty",children:"Loading chats…"}),!t&&s&&n.jsx("div",{className:"chat-sessions-empty",children:s}),!t&&!s&&e.length===0&&n.jsx("div",{className:"chat-sessions-empty",children:"Conversations you start will show up here."}),Ir(_).map(m=>n.jsxs("div",{className:"chat-session-group",children:[n.jsx("div",{className:"chat-session-group-label",children:m.label}),m.items.map(I=>n.jsxs("div",{className:`chat-session${I.id===r?" chat-session-active":""}`,role:"button",tabIndex:0,onClick:()=>{De()&&a(I.id)},onKeyDown:i=>{if(i.key==="Enter"&&De()&&a(I.id),i.key==="F2"&&$(I),i.key==="ContextMenu"||i.shiftKey&&i.key==="F10"){i.preventDefault();const M=i.currentTarget.getBoundingClientRect();ne(I.id,M.right-150,M.bottom)}},onContextMenu:i=>{i.preventDefault(),ne(I.id,i.clientX,i.clientY)},children:[O===I.id?n.jsx("input",{className:"chat-session-title-input",value:j,autoFocus:!0,maxLength:80,onClick:i=>i.stopPropagation(),onChange:i=>W(i.target.value),onBlur:()=>void F(I.id),onKeyDown:i=>{i.stopPropagation(),i.key==="Enter"&&F(I.id),i.key==="Escape"&&k(null)}}):n.jsx("span",{className:"chat-session-title",children:I.title}),n.jsx("button",{type:"button",className:"chat-session-menu","aria-label":"Chat actions","aria-haspopup":"menu",title:"Chat actions",onClick:i=>{i.stopPropagation();const M=i.currentTarget.getBoundingClientRect();ne(I.id,M.right-150,M.bottom)},children:"⋯"}),n.jsx("button",{type:"button",className:"chat-session-delete","aria-label":"Delete conversation",onClick:i=>{i.stopPropagation(),De()&&L(I.id)},children:n.jsx(kr,{})})]},I.id))]},m.label)),V>0&&n.jsx("button",{type:"button",className:"chat-sessions-toggle","aria-expanded":Q,onClick:()=>w(m=>!m),children:Q?"Show less":`Show ${V} older ${V===1?"chat":"chats"}`})]}),n.jsx(Vr,{className:"chat-sidebar-tools",canNavigate:De}),n.jsx("div",{className:"chat-sidebar-resize-handle",role:"separator","aria-label":"Resize chat history","aria-orientation":"vertical","aria-valuemin":ot,"aria-valuemax":ct,"aria-valuenow":v,title:"Drag to resize; double-click to reset",tabIndex:0,onPointerDown:m=>{m.button===0&&(A.current={x:m.clientX,width:v},B.current=v,m.currentTarget.setPointerCapture(m.pointerId))},onPointerMove:m=>ue(m.clientX),onPointerUp:z,onPointerCancel:z,onLostPointerCapture:z,onDoubleClick:()=>J(it),onKeyDown:m=>{(m.key==="ArrowLeft"||m.key==="ArrowRight")&&(m.preventDefault(),J(v+(m.key==="ArrowRight"?10:-10))),(m.key==="Home"||m.key==="End")&&(m.preventDefault(),J(m.key==="Home"?ot:ct))}}),U&&n.jsx("div",{className:"chat-session-context-menu",role:"menu",style:{left:U.x,top:U.y},onClick:m=>m.stopPropagation(),children:n.jsx("button",{type:"button",role:"menuitem",autoFocus:!0,onClick:()=>{const m=e.find(I=>I.id===U.id);m&&$(m),se(null)},children:"Rename chat"})})]})]})}function cs({sessionId:e,busy:r,loading:t,hasPaperSelection:s=!1,onError:u}){const{toast:o}=Ht(),[p,a]=d.useState(!1),[h,L]=d.useState(""),v=async()=>{var S;if(!(r||p)&&!(s&&!window.confirm("This public link will include the selected paper passage. Anyone with the link can read that passage. Continue?"))){a(!0);try{const A=await Cr(e),B=new URL(A.public_path,window.location.origin).toString();try{if(!((S=navigator.clipboard)!=null&&S.writeText))throw new Error("Clipboard unavailable");await navigator.clipboard.writeText(B),o({className:"chat-share-toast",duration:5e3,title:"Public link copied to your clipboard",description:"Anyone with this link can see this conversation."})}catch{L(B)}}catch(A){const B=A instanceof Error?A.message:"Could not share this conversation";u(B),o({variant:"destructive",title:"Share failed",description:B})}finally{a(!1)}}};return n.jsxs(n.Fragment,{children:[n.jsxs("button",{type:"button",className:"chat-share-button",onClick:()=>void v(),disabled:r||p||t,"aria-label":"Share conversation",children:[p?n.jsx(Wt,{}):n.jsx(Qr,{"aria-hidden":"true"}),n.jsx("span",{children:"Share"})]}),n.jsx(ns,{url:h,onClose:()=>L("")})]})}const ls=({descriptor:e})=>{const r=xr(),{open:t,register:s,unregister:u}=r,o=rt.useRef(null),p=e.source_head??e.preview_head,a=rt.useMemo(()=>p?{kind:"artifact",schema_version:1,scope:"owner",artifact_id:e.artifact_id,version_id:p.version_id,identifier:"latex-paper",version:p.version,artifact_kind:"latex_paper",title:e.title,status:"ready",preview_mime:"application/pdf",source_language:"latex",total_bytes:0}:null,[e.artifact_id,e.title,p]),h=a?vr(a):null;return rt.useEffect(()=>{if(!(!a||!h))return s(a),o.current!==h&&(o.current=h,t(a)),()=>u(h)},[a,h,t,s,u]),null};function us({messages:e,refreshSessions:r,resetChat:t,restoreDraft:s}){const{toast:u}=Ht(),[o,p]=d.useState(null),a=()=>{const v=[...e].reverse().find(S=>S.role==="user");t(),s({text:(v==null?void 0:v.text)??"",paperMentions:(v==null?void 0:v.paperMentions)??[],...v!=null&&v.paperSelection?{paperSelection:v.paperSelection}:{}})};return{pending:o,archiveOld:async()=>{if(o===null){p("old");try{const v=await jr();if(await r(),v.archived_count===0){u({title:"No chats were archived",description:"There are no inactive chats older than 30 days."});return}a(),u({title:`${v.archived_count} ${v.archived_count===1?"chat":"chats"} archived`,description:"Your question is ready to send again."})}catch(v){u({variant:"destructive",title:"Could not archive old chats",description:v instanceof Error?v.message:"Try again."})}finally{p(null)}}},archiveOldest:async()=>{if(o===null){p("oldest");try{const v=await Ar();await r(),a(),u({title:`${v.archived_count} ${v.archived_count===1?"chat":"chats"} archived`,description:"Your question is ready to send again."})}catch(v){u({variant:"destructive",title:"Could not archive chats",description:v instanceof Error?v.message:"Try again."})}finally{p(null)}}}}}class ds{constructor(r,t=Tr){ee(this,"requestId");ee(this,"firstVisibleAt");ee(this,"streamStartReported",!1);ee(this,"firstVisibleReported",!1);ee(this,"terminalReported",!1);ee(this,"semanticReported",new Set);this.submittedAt=r,this.report=t}recordStreamStart(r,t){this.requestId=r,this.streamStartReported||(this.streamStartReported=!0,this.send({submission_to_stream_start_ms:Math.max(0,t-this.submittedAt)})),this.reportFirstVisible()}recordFirstVisible(r){this.firstVisibleAt===void 0&&(this.firstVisibleAt=r,this.reportFirstVisible())}recordSemantic(r,t){if(this.semanticReported.has(r))return;this.semanticReported.add(r);const s=Math.max(0,t-this.submittedAt);this.send(r==="reasoning"?{submission_to_first_reasoning_delta_ms:s}:r==="tool"?{submission_to_first_tool_call_ms:s}:{submission_to_first_answer_delta_ms:s})}recordTerminal(r){this.terminalReported||(this.terminalReported=!0,this.send({terminal_classification:r}))}reportFirstVisible(){!this.requestId||this.firstVisibleAt===void 0||this.firstVisibleReported||(this.firstVisibleReported=!0,this.send({submission_to_first_visible_delta_ms:Math.max(0,this.firstVisibleAt-this.submittedAt)}))}send(r){this.requestId&&this.report(this.requestId,r)}}const Qt="Preparing research workspace…",zt={preparing_workspace:"Preparing secure workspace…",starting_agent:"Starting research agent…",connecting_model:"Connecting to model…"},Gt=()=>({messages:[],sessionId:null,title:"",phase:"idle"});function Ft(e,r){for(let t=e.length-1;t>=0;t-=1)if(r(e[t]))return t;return-1}function Re(e){if(e.status!==Qt&&!Object.values(zt).includes(e.status))return e;const{status:r,...t}=e;return t}function te(e,r){if(!e.length)return e;const t=e.slice();return t[t.length-1]=r(t[t.length-1]),t}function Ae(e,r,t){return te(e,s=>{const u=Re(s),o=u.blocks??[];return{...u,blocks:o.map((p,a)=>r(p,a,o)?t(p):p)}})}function ps(e,r){switch(r.type){case"stream_start":return r.session_id?{...e,sessionId:r.session_id}:e;case"sandbox_start":case"sandbox_ready":case"workspace_ready":return e;case"lifecycle":return{...e,messages:te(e.messages,t=>{var s;return t.role==="assistant"&&t.streaming&&(((s=t.blocks)==null?void 0:s.length)??0)===0?{...t,status:zt[r.phase]}:t})};case"session_title_start":return{...e,title:""};case"session_title_delta":return{...e,title:`${e.title}${r.text}`.replace(/\s+/g," ").slice(0,80)};case"session_title_done":return{...e,title:r.title};case"compaction_status":return{...e,messages:te(e.messages,t=>({...t,compacting:!!(t.streaming&&r.state==="started")}))};case"reasoning_start":return{...e,messages:te(e.messages,t=>{const s=Re(t);return{...s,blocks:[...(s.blocks??[]).map(u=>u.kind==="reasoning"&&u.active?{...u,active:!1,open:!1}:u),{kind:"reasoning",text:"",active:!0,open:!0}]}})};case"reasoning_delta":return{...e,messages:Ae(e.messages,(t,s,u)=>t.kind==="reasoning"&&Ft(u,o=>o.kind==="reasoning")===s,t=>t.kind==="reasoning"?{...t,text:t.text+r.text}:t)};case"reasoning_end":return{...e,messages:te(e.messages,t=>{const s=t.blocks??[],u=Ft(s,a=>a.kind==="reasoning"&&a.active);if(u<0)return t;const o=s[u];if(o.kind!=="reasoning")return t;const p=s[u-1];return(p==null?void 0:p.kind)==="reasoning"&&p.text===o.text?{...t,blocks:s.filter((a,h)=>h!==u)}:{...t,blocks:s.map((a,h)=>h===u?{...o,active:!1,open:!1}:a)}})};case"tool_call":return{...e,messages:te(e.messages,t=>{const s=Re(t);return{...s,blocks:[...s.blocks??[],{kind:"tool",id:r.id,name:r.name,args:r.args,status:"running",open:!1}]}})};case"tool_call_start":return{...e,messages:te(e.messages,t=>{const s=Re(t);return{...s,blocks:[...s.blocks??[],{kind:"tool",schema_version:2,id:r.id,name:r.name,args:{},argumentText:"",argumentState:"streaming",arguments_redacted:r.redacted,status:"running",open:!1}]}})};case"tool_call_arguments_delta":return{...e,messages:Ae(e.messages,t=>t.kind==="tool"&&t.id===r.id,t=>t.kind==="tool"?{...t,args:r.partial_args,argumentText:r.snapshot?r.delta:`${t.argumentText??""}${r.delta}`,arguments_redacted:t.arguments_redacted||r.redacted}:t)};case"tool_call_arguments_done":return{...e,messages:Ae(e.messages,t=>t.kind==="tool"&&t.id===r.id,t=>t.kind==="tool"?{...t,args:r.args,argumentText:JSON.stringify(r.args),argumentState:"done",arguments_redacted:t.arguments_redacted||r.redacted}:t)};case"app_start":return{...e,messages:te(e.messages,t=>{const s=Re(t);return{...s,blocks:[...s.blocks??[],{kind:"app",schema_version:1,instance_id:r.instance_id,provider:r.provider,server:r.server,tool:r.tool,resource_uri:r.resource_uri,status:"loading",input:r.input,result:{content:[],structuredContent:{},isError:!1},csp:{},permissions:{clipboardWrite:!0},height:525}]}})};case"app_result":return{...e,messages:Ae(e.messages,t=>t.kind==="app"&&t.instance_id===r.id,t=>t.kind==="app"?{...t,status:r.status,result:r.result}:t)};case"tool_result":return{...e,messages:Ae(e.messages,t=>t.kind==="tool"&&t.id===r.id,t=>t.kind!=="tool"?t:r.status?{...t,schema_version:2,status:r.status,took_ms:r.took_ms,content:r.content,metadata:r.metadata,open:r.status!=="success"}:{...t,status:"done",hits:r.hits,took_ms:r.took_ms,results:r.results})};case"artifact_start":return{...e,messages:te(e.messages,t=>{const s=Re(t);return{...s,blocks:[...s.blocks??[],{kind:"artifact",schema_version:1,scope:"owner",publication_id:r.publication_id,identifier:r.identifier,artifact_kind:"posterly",title:r.title,status:"generating",phase:"publishing_poster"}]}})};case"artifact_ready":return{...e,messages:Ae(e.messages,t=>t.kind==="artifact"&&t.publication_id===r.publication_id,t=>t.kind==="artifact"?{...t,artifact_id:r.artifact_id,version_id:r.version_id,identifier:r.identifier,version:r.version,title:r.title,status:"ready",preview_mime:r.preview_mime,source_language:r.source_language,gate_status:r.gate_status,total_bytes:r.total_bytes,phase:void 0}:t)};case"artifact_error":return{...e,messages:Ae(e.messages,t=>t.kind==="artifact"&&t.publication_id===r.publication_id,t=>t.kind==="artifact"?{...t,status:"error",phase:void 0,error_code:r.code,error_message:r.message}:t)};case"answer_delta":return{...e,messages:te(e.messages,t=>{const s=Re(t),u=s.blocks??[],o=u.at(-1);return(o==null?void 0:o.kind)==="answer"&&!o.done?{...s,blocks:[...u.slice(0,-1),{...o,text:o.text+r.text}]}:{...s,blocks:[...u,{kind:"answer",text:r.text,done:!1}]}})};case"done":return{...e,phase:"complete",messages:te(e.messages,t=>({...t,streaming:!1,compacting:!1,followups:r.followups,finishReason:r.finish_reason,citations:r.citations,blocks:(t.blocks??[]).map(s=>s.kind==="answer"?{...s,done:!0}:s.kind==="reasoning"&&s.active?{...s,active:!1,open:!1}:s)}))};case"error":return{...e,phase:"failed",messages:te(e.messages,t=>({...t,streaming:!1,compacting:!1,error:r.message,errorCode:r.code,blocks:(t.blocks??[]).map(s=>s.kind==="reasoning"&&s.active?{...s,active:!1,open:!1}:s.kind==="tool"&&s.status==="running"?{...s,status:"error",open:!0}:s)}))};default:return e}}function fs(e){return te(e,r=>{if(r.role!=="assistant")return r;const t=(r.blocks??[]).flatMap(s=>s.kind==="tool"&&s.status==="running"?[{...s,status:"error",open:!0}]:s.kind==="reasoning"&&s.active?s.text?[{...s,active:!1,open:!1}]:[]:s.kind==="answer"?[{...s,done:!0}]:[s]);return{...r,blocks:t,streaming:!1,compacting:!1,finishReason:"stopped"}})}function hs(e,r){switch(r.type){case"start":return{messages:r.messages,sessionId:r.sessionId,title:"",phase:"streaming"};case"event":return ps(e,r.event);case"load":return{messages:r.messages,sessionId:r.sessionId,title:e.title,phase:"idle"};case"workspace_status":return{...e,messages:te(e.messages,t=>{var s;return t.role==="assistant"&&t.streaming&&(((s=t.blocks)==null?void 0:s.length)??0)===0&&!t.error?{...t,status:Qt}:t})};case"clear_workspace_status":return{...e,messages:te(e.messages,Re)};case"settle":return{...e,phase:"idle",messages:te(e.messages,t=>t.streaming?{...t,streaming:!1,compacting:!1}:t)};case"stop":return{...e,messages:fs(e.messages),phase:"stopped"};case"toggle_block":return{...e,messages:Jt(e.messages,r.messageId,r.blockIndex)};case"reset":return Gt()}}function Jt(e,r,t){return e.map(s=>{var u;return s.id!==r?s:{...s,blocks:(u=s.blocks)==null?void 0:u.map((o,p)=>p===t&&(o.kind==="reasoning"||o.kind==="tool")?{...o,open:!o.open}:o)}})}const Ee={minDelayMs:5,maxDelayMs:80,minRateCharsPerMs:.3,maxBufferedMs:400,arrivalRateTauMs:1e3,arrivalRateHeadroom:1.1,maxPendingChars:64},ms={now:()=>performance.now(),sleep:(e,r)=>new Promise(t=>{if(r!=null&&r.aborted||e<=0){t();return}const s=window.setTimeout(u,e);function u(){r==null||r.removeEventListener("abort",u),window.clearTimeout(s),t()}r==null||r.addEventListener("abort",u,{once:!0})})};function gs(e){return!["stream_start","sandbox_start","sandbox_ready","workspace_ready","session_title_start","session_title_delta","session_title_done"].includes(e.type)}function ys(e,r=!1,t=Ee.maxPendingChars){var u;if(!e)return{pieces:[],pending:""};if(r)return{pieces:[e],pending:""};const s=Intl.Segmenter;if(s){const p=[...new s(void 0,{granularity:"word"}).segment(e)].filter(h=>h.isWordLike);let a=0;if(p.length>1&&(a=p.at(-1).index),p.length&&/\s$/u.test(e)&&(a=e.length),a>0){const h=e.slice(0,a),L=[],S=[...new s(void 0,{granularity:"word"}).segment(h)].filter(A=>A.isWordLike);for(let A=0;AB&&L.push(h.slice(B,O))}return S.length||L.push(h),{pieces:L,pending:e.slice(a)}}}else{const o=[...e.matchAll(/\s+/gu)];if(o.length){const p=[];let a=0;for(const h of o){const L=h.index+h[0].length;p.push(e.slice(a,L)),a=L}return{pieces:p,pending:e.slice(a)}}}return e.length>=t?{pieces:[e.slice(0,t)],pending:e.slice(t)}:{pieces:[],pending:e}}function _s(e,r={}){const t={minDelayMs:r.minDelayMs??Ee.minDelayMs,maxDelayMs:r.maxDelayMs??Ee.maxDelayMs,minRateCharsPerMs:r.minRateCharsPerMs??Ee.minRateCharsPerMs,maxBufferedMs:r.maxBufferedMs??Ee.maxBufferedMs,arrivalRateTauMs:r.arrivalRateTauMs??Ee.arrivalRateTauMs,arrivalRateHeadroom:r.arrivalRateHeadroom??Ee.arrivalRateHeadroom,maxPendingChars:r.maxPendingChars??Ee.maxPendingChars},s=r.clock??ms,u=[];let o="",p=null,a=0,h=!0,L=!1,v=null,S=0,A=s.now(),B=!1;const O=()=>{v==null||v(),v=null},k=(w,T)=>{const C=w.type==="reasoning_delta"||w.type==="answer_delta"?w.text.length:0;u.push({kind:"event",event:w,arrivedAt:T,chars:C}),O()},j=w=>{if(!p||!o)return;const T=ys(o,w,t.maxPendingChars);for(const C of T.pieces)C&&k({type:p,text:C},a),a=s.now();o=T.pending,o||(p=null)},W=w=>{if(!h)return;const T=s.now();if(w.type==="reasoning_delta"||w.type==="answer_delta"){const C=w.type;if(!w.text)return;if(!B){B=!0,S+=w.text.length,A=T;const V=Array.from(w.text)[0];k({type:C,text:V},T);const $=w.text.slice(V.length);if($)for(p=C,o=$,a=T,j(!1);o.length>=t.maxPendingChars;)j(!1);return}p&&p!==C&&j(!0),p||(p=C,a=T),o+=w.text;const _=Math.max(0,T-A);for(S*=Math.exp(-_/t.arrivalRateTauMs),S+=w.text.length,A=T,j(!1);o.length>=t.maxPendingChars;)j(!1);return}gs(w)&&j(!0),k(w,T)},U=(async()=>{var w;try{for await(const T of e)W(T);h&&j(!0)}catch(T){h&&!((w=r.signal)!=null&&w.aborted)&&(j(!0),u.push({kind:"error",error:T,arrivedAt:s.now(),chars:0}))}finally{L=!0,O()}})(),se=()=>u.length||L?Promise.resolve():new Promise(w=>{v=w});return{events:async function*(){var T,C,_,V;let w=Number.NEGATIVE_INFINITY;try{for(;;){if(await se(),!u.length){if(L||!h)return;continue}const $=u[0];if($.kind==="error")throw u.shift(),$.error;if($.chars&&!((T=r.isHidden)!=null&&T.call(r))){const F=s.now(),ne=u.reduce((ae,ie)=>ae+ie.chars,0),ue=((C=u.find(ae=>ae.chars))==null?void 0:C.arrivedAt)??F,z=Math.max(0,t.maxBufferedMs-(F-ue)),J=S*Math.exp(-Math.max(0,F-A)/t.arrivalRateTauMs)/t.arrivalRateTauMs,m=z>0?ne/z:Number.POSITIVE_INFINITY,I=Math.max(t.minRateCharsPerMs,J*t.arrivalRateHeadroom,m),i=Math.min(t.maxDelayMs,Math.max(t.minDelayMs,$.chars/I)),M=Math.max(0,$.arrivedAt+t.maxBufferedMs-F),P=Math.max($.arrivedAt,w+Math.min(i,M));if(await s.sleep(Math.max(0,P-s.now()),r.signal),!h||(_=r.signal)!=null&&_.aborted)return}u.shift(),w=s.now(),yield $.event}}finally{h&&(h=!1,O(),await((V=e.return)==null?void 0:V.call(e,void 0))),await U}}(),takeAcceptedForStop(){var T;if(!h)return[];h=!1,p&&o&&(k({type:p,text:o},a),o="",p=null);const w=u.flatMap(C=>C.kind==="event"&&C.event.type!=="done"&&C.event.type!=="error"?[C.event]:[]);return u.length=0,O(),(T=e.return)==null||T.call(e,void 0),w}}}const Ot=[250,500,1e3],bs=(e,r)=>new Promise(t=>{const s=()=>{window.clearTimeout(u),r.removeEventListener("abort",s),t()},u=window.setTimeout(s,e);r.addEventListener("abort",s,{once:!0})});async function*ws(e,r){let t=e,s=0;for(;;){let u=!1;try{for await(const o of t)(o.type==="done"||o.type==="error")&&(u=!0),yield o;if(u||r.signal.aborted)return;throw new Tt}catch(o){r.onDisconnect();const p=r.getSessionId();if(r.signal.aborted||u||!(o instanceof Tt)||!p||s>=Ot.length)throw o;if(await bs(Ot[s],r.signal),r.signal.aborted)return;s+=1,t=Yt(p,{signal:r.signal,afterSequence:r.getAfterSequence(),onSequence:r.onSequence})}}}const qt=new Set(["openrouter_monthly_budget_exhausted","openrouter_unavailable","openrouter_byok_credential_invalid","openrouter_byok_billing_error","openrouter_byok_rate_limit","hf_inference_billing_exhausted"]),xs=new Set(["paper_context_unavailable","paper_mention_unavailable","paper_mentions_disabled","paper_selection_disabled","paper_selection_requires_reader","paper_selection_paper_mismatch","paper_selection_version_mismatch","paper_selection_page_invalid","paper_selection_too_large","chat_storage_quota_exceeded"]);class vs{constructor(){ee(this,"configuration");ee(this,"lifecycle",Gt());ee(this,"_busy",!1);ee(this,"_pendingCapacity",null);ee(this,"_sawStreamStart",!1);ee(this,"_providerExecuted",!1);ee(this,"_providerStatusChanged",!1);ee(this,"terminal","pending");ee(this,"rejection",null)}get busy(){return this._busy}get pendingCapacity(){return this._pendingCapacity}get sawStreamStart(){return this._sawStreamStart}get sawTerminalEvent(){return this.terminal==="complete"||this.terminal==="error"}get streamFailed(){return this.terminal==="error"||this.terminal==="transport_error"}get admissionRejected(){return this.rejection!==null}get shouldRefreshProvider(){return this._sawStreamStart&&this._providerExecuted||this._providerStatusChanged}finish(){this._busy=!1}queueCapacity(r){this._pendingCapacity=r}cancelCapacity(){this._pendingCapacity=null}projectSession(r){return this._busy&&r===this.sessionId?this.messages:null}get state(){return this.lifecycle}get messages(){return this.lifecycle.messages}get sessionId(){return this.lifecycle.sessionId}transition(r){return this.lifecycle=hs(this.lifecycle,r),this.lifecycle}start(r,t,s){this.configuration=s,this._busy=!0,this._sawStreamStart=this._providerExecuted=this._providerStatusChanged=!1,this.terminal="pending",this.rejection=null,this.transition({type:"start",messages:r,sessionId:t})}restore(r,t=this.sessionId){return this.transition({type:"load",messages:r,sessionId:t})}observe(r){return r.type==="stream_start"&&(this._sawStreamStart=!0,this._providerExecuted=r.provider_execution!==!1),(r.type==="done"||r.type==="error")&&(this.terminal=r.type==="done"?"complete":"error"),r.type==="error"&&qt.has(r.code??"")?(this._providerStatusChanged=!0,!0):!1}reject(r,t){const s=r instanceof nt?r.code:void 0,u=t&&s==="chat_not_busy"?"completed":s==="chat_temporarily_disabled"?"disabled":s==="chat_capacity"?"capacity":xs.has(s??"")?"draft":qt.has(s??"")?"provider":"network";return this.terminal=u==="completed"?"already_complete":"transport_error",this.rejection=u==="disabled"||u==="capacity"||u==="draft"?u:null,this._providerStatusChanged||(this._providerStatusChanged=u==="provider"),u}reset(){this._busy=!1,this._pendingCapacity=null,this.transition({type:"reset"})}}const Ss=750;function Es(e,r){for(let t=e.length-1;t>=0;t-=1)if(r(e[t]))return t;return-1}function Se(e){const r=d.useRef(e);return d.useLayoutEffect(()=>{r.current=e}),d.useCallback((...t)=>r.current(...t),[])}function Rs(e){const[r,t]=d.useState([]),[s,u]=d.useState(!1),[o,p]=d.useState(""),[a]=d.useState(()=>new vs),h=d.useRef(null),L=d.useRef(null),v=d.useRef(null),S=d.useRef(null),A=d.useRef(!1),B=d.useRef(null),O=d.useRef(null),k=d.useRef("cleared"),j=d.useRef(null),[W,U]=d.useState(null),[se,Q]=d.useState(null),w=d.useRef([]),T=d.useRef(null),C=d.useRef(!1),_=d.useRef(e),V=d.useRef(He()),$=d.useRef(0),F=d.useRef(0),ne=d.useRef(e.sessionId);if(ne.current!==e.sessionId){ne.current=e.sessionId;const c=a.projectSession(e.sessionId);c&&t(c),a.sessionId!==e.sessionId&&(F.current+=1,j.current=null)}_.current=e,w.current=r,d.useEffect(()=>()=>{var c;O.current!==null&&window.clearTimeout(O.current),(c=h.current)==null||c.abort(),L.current=null,v.current!==null&&cancelAnimationFrame(v.current),S.current!==null&&window.clearTimeout(S.current),a.cancelCapacity()},[a]),d.useEffect(()=>{a.busy||a.restore(a.messages,e.sessionId)},[e.sessionId,a]),d.useEffect(()=>{const c=a.projectSession(e.sessionId);C.current=c!==null,c&&(t(c),w.current=c)},[e.sessionId,a]);const ue=d.useMemo(()=>{const c={};for(const f of r)for(const E of f.blocks??[])if(E.kind==="tool")for(const b of E.results??[])c[b.route_id]=b;return c},[r]),z=()=>`m${++$.current}_${Date.now().toString(36)}`,J=(c,f=!0)=>{const E=a.state,b=a.transition(c),g=c.type==="event"&&c.event.type==="stream_start"?c.event.session_id:null;return g?_.current.onSessionId(g,E.sessionId,a.configuration):b.sessionId&&b.sessionId!==E.sessionId&&_.current.onSessionId(b.sessionId,E.sessionId,a.configuration),b.title!==E.title&&_.current.onTitle(b.title,b.sessionId),f&&(w.current=b.messages,t(b.messages)),b},m=()=>T.current===F.current||C.current,I=()=>{v.current!==null&&(cancelAnimationFrame(v.current),v.current=null),S.current!==null&&(window.clearTimeout(S.current),S.current=null)},i=()=>{I(),document.visibilityState!=="hidden"&&C.current&&(A.current=!1,w.current=a.messages,t(a.messages))},M=()=>{if(!C.current||document.visibilityState==="hidden"||v.current!==null||S.current!==null)return;const c=()=>{v.current=null,S.current=null,i()};typeof requestAnimationFrame=="function"?v.current=requestAnimationFrame(c):S.current=window.setTimeout(c,0)};d.useEffect(()=>{const c=()=>{document.visibilityState==="visible"&&A.current&&M()};return document.addEventListener("visibilitychange",c),()=>document.removeEventListener("visibilitychange",c)});const P=c=>{if(h.current!==c||(O.current!==null&&(window.clearTimeout(O.current),O.current=null),k.current==="cleared"))return;const f=k.current==="shown";k.current="cleared",f&&J({type:"clear_workspace_status"},m())},ae=(c,f)=>{O.current!==null&&window.clearTimeout(O.current),k.current="armed",O.current=window.setTimeout(()=>{O.current=null,!(k.current!=="armed"||h.current!==c||c.signal.aborted||F.current!==f)&&(k.current="shown",J({type:"workspace_status"},m()))},Ss)},ie=(c,f)=>{const E=j.current;!E||E.controller!==c||E.tracker.recordStreamStart(f,performance.now())},fe=(c,f)=>{const E=j.current;!E||E.controller!==c||E.tracker.recordTerminal(f)};d.useLayoutEffect(()=>{const c=j.current;if(!c)return;const f=r.at(-1);if((f==null?void 0:f.role)!=="assistant"||!(f.blocks??[]).some(g=>g.kind==="tool"||g.kind==="reasoning"&&!!g.text.trim()||g.kind==="answer"&&!!g.text.trim()))return;const b=performance.now();c.tracker.recordFirstVisible(b);for(const g of f.blocks??[])g.kind==="reasoning"&&g.text.trim()?c.tracker.recordSemantic("reasoning",b):g.kind==="tool"?c.tracker.recordSemantic("tool",b):g.kind==="answer"&&g.text.trim()&&c.tracker.recordSemantic("answer",b)},[r]);const ge=(c,f=!0)=>{J({type:"event",event:c},f)},Ke=async(c,f)=>{var g;const E=await(_.current.loadSession??ut)(c);let b=$t(E);return((g=B.current)==null?void 0:g.sessionId)===c&&(b=B.current.messages,B.current=null),F.current!==f&&!(T.current===f&&C.current&&_.current.sessionId===c)?null:(t(b),w.current=b,a.restore(b,c),b)},Ie=(c,f,E,b,g,H,K)=>{const y=++F.current;T.current=y,C.current=!0;const N=new AbortController;h.current=N;const he=c.text;return V.current=c,p(""),t(E),a.start(E,f.session_id,K??{model:_.current.initialModel,webSearchEnabled:!!f.web_search_enabled,reasoningEffort:f.reasoning_effort??Le}),u(!0),j.current=H?null:{controller:N,tracker:new ds(performance.now())},k.current="cleared",(async()=>{var X,G,_e,re,ve,qe;let oe=0;const ce=Y=>{Y>oe&&(oe=Y)};try{const Y=H?Yt(H,{signal:N.signal,onSequence:ce}):Nr(f,{signal:N.signal,onSequence:ce}),q=ws(Y,{signal:N.signal,getSessionId:()=>a.sessionId,onDisconnect:()=>{!N.signal.aborted&&h.current===N&&ge({type:"compaction_status",state:"finished"},m())},getAfterSequence:()=>oe,onSequence:ce}),Z=!H&&Ue()&&Dr(),pe=Z?_s(q,{signal:N.signal,isHidden:()=>document.visibilityState==="hidden"}):null;pe&&(L.current={controller:N,stream:pe});for await(const D of(pe==null?void 0:pe.events)??q){if(N.signal.aborted||h.current!==N)break;D.type==="paper_artifact"&&((G=(X=_.current).onPaperArtifact)==null||G.call(X,D,a.sessionId)),D.type==="stream_start"&&ie(N,D.request_id),D.type==="sandbox_start"&&ae(N,y),(D.type==="sandbox_ready"||D.type==="workspace_ready"||D.type==="lifecycle")&&P(N),(D.type==="reasoning_start"||D.type==="reasoning_delta"||D.type==="tool_call"||D.type==="tool_call_start"||D.type==="tool_call_arguments_delta"||D.type==="tool_call_arguments_done"||D.type==="app_start"||D.type==="app_result"||D.type==="artifact_start"||D.type==="artifact_ready"||D.type==="artifact_error"||D.type==="answer_delta"||D.type==="done"||D.type==="error")&&P(N),a.observe(D)&&m()&&_.current.onInterrupted(c),(D.type==="done"||D.type==="error")&&fe(N,D.type==="error"?"error":"complete");const ke=m(),$e=ke&&!(Z&&document.visibilityState==="hidden"),Ze=D.type==="reasoning_delta"||D.type==="answer_delta"||D.type==="tool_call_arguments_delta",Be=!["stream_start","sandbox_start","sandbox_ready","workspace_ready","session_title_start","session_title_delta","session_title_done","reasoning_delta","answer_delta","tool_call_arguments_delta"].includes(D.type);Z&&Be&&i(),Z&&Ze?(ge(D,!1),A.current||(A.current=ke),M()):(ge(D,$e),Z&&ke&&!$e&&(A.current=!0))}}catch(Y){if(!N.signal.aborted&&h.current===N){const q=a.reject(Y,!!H),Z=q==="completed";if(P(N),!Z)if(q==="disabled")Q({question:he,draft:c}),a.restore(b),F.current===y&&(t(b),w.current=b,p(""));else if(q==="capacity"){const pe=Y instanceof nt?Y.retryAfterSeconds??5:5,D={question:he,draft:c,request:f,optimistic:E,original:b,edit:g,retryAfterSeconds:pe,retryAt:Date.now()+pe*1e3};a.queueCapacity(D),U({question:he,draft:c,retryAt:D.retryAt,retryAfterSeconds:pe}),a.restore(b),F.current===y&&(t(b),w.current=b,p(""))}else fe(N,"network_error"),q==="draft"&&(m()&&_.current.onInterrupted(c),a.restore(b),F.current===y&&(t(b),w.current=b,p(Y instanceof Error?Y.message:"The assistant stream failed."))),q==="provider"&&m()&&_.current.onInterrupted(c);!Z&&!a.admissionRejected&&F.current===y&&ge({type:"error",message:Y instanceof Error?Y.message:"The assistant stream failed.",code:Y instanceof nt?Y.code:void 0})}}finally{if(h.current===N){if(((_e=L.current)==null?void 0:_e.controller)===N&&(i(),L.current=null),P(N),!a.sawTerminalEvent&&!N.signal.aborted&&fe(N,"network_error"),a.finish(),u(!1),a.admissionRejected)_.current.onSettled(f.session_id);else if(!N.signal.aborted){a.shouldRefreshProvider&&((ve=(re=_.current).onProviderTerminal)==null||ve.call(re));const Y=a.sessionId;if(g&&!a.sawStreamStart)a.restore(g.snapshot),F.current===y&&(t(g.snapshot),w.current=g.snapshot,p("Couldn’t resend this message. Your original conversation was restored."));else if(Y){F.current===y&&g&&(a.streamFailed||!a.sawTerminalEvent)&&(a.restore(g.snapshot),t(g.snapshot),w.current=g.snapshot);try{const q=await Ke(Y,y);q&&g&&q.some(Z=>Z.id===g.targetId)&&p("Couldn’t resend this message. Your original conversation was restored.")}catch{F.current===y&&J({type:"settle"})}}else F.current===y&&J({type:"settle"});(!h.current||h.current===N)&&_.current.onSettled(Y)}((qe=j.current)==null?void 0:qe.controller)===N&&(j.current=null)}}})(),!0},je=Se(c=>{var ce,X;const f=typeof c=="string"?He(c.trim()):c,E=f.text;if(!E||E.length>8e3||a.busy||a.pendingCapacity)return!1;const b=w.current,g=[...b].reverse().find(G=>G.role==="user"),H=g!=null&&g.status&&g.status!=="complete"&&g.revision?{replace_message_id:g.id,prior_revision:g.revision}:null,K={id:z(),role:"user",text:E,paperMentions:f.paperMentions,paperSelection:f.paperSelection},y={id:z(),role:"assistant",streaming:!0,blocks:[]},N=H&&g?Es(b,G=>G.id===g.id):-1,he=N<0?[...b,K,y]:[...b.slice(0,N),K,y],oe=(X=(ce=_.current).viewerContext)==null?void 0:X.call(ce);return Ie(f,{message:E,paper_mentions:f.paperMentions.map(({route_id:G,title:_e,start:re,end:ve})=>({route_id:G,title:_e,start:re,end:ve})),session_id:_.current.sessionId,client_message_id:crypto.randomUUID(),web_search_enabled:!!_.current.webSearchEnabled,reasoning_effort:_.current.reasoningEffort??Le,..._.current.primaryPaperRouteId?{primary_paper_route_id:_.current.primaryPaperRouteId}:{},...oe?{viewer_context:oe}:{},...f.paperSelection?{paper_selection:Mt(f.paperSelection)}:{},...!_.current.sessionId&&_.current.initialModel?{initial_model:_.current.initialModel}:{},...H??{}},he,b)}),xe=Se((c,f)=>{var ce,X;const E=typeof f=="string"?He(f.trim()):f,b=E.text;if(!b||b.length>8e3||a.busy||a.pendingCapacity)return!1;const g=w.current.slice(),H=g.findIndex(G=>G.id===c&&G.role==="user");if(H<0)return!1;const K=g[H];if(!_.current.sessionId||!K.revision)return!1;const y={id:K.id,role:"user",text:b,paperMentions:E.paperMentions,paperSelection:E.paperSelection,revision:K.revision+1,status:"generating"},N={id:z(),role:"assistant",streaming:!0,blocks:[]},he=[...g.slice(0,H),y,N],oe=(X=(ce=_.current).viewerContext)==null?void 0:X.call(ce);return Ie(E,{message:b,paper_mentions:E.paperMentions.map(({route_id:G,title:_e,start:re,end:ve})=>({route_id:G,title:_e,start:re,end:ve})),session_id:_.current.sessionId,client_message_id:crypto.randomUUID(),web_search_enabled:!!_.current.webSearchEnabled,reasoning_effort:_.current.reasoningEffort??Le,..._.current.primaryPaperRouteId?{primary_paper_route_id:_.current.primaryPaperRouteId}:{},...oe?{viewer_context:oe}:{},...E.paperSelection?{paper_selection:Mt(E.paperSelection)}:{},replace_message_id:K.id,prior_revision:K.revision},he,g,{targetId:K.id,snapshot:g})}),de=Se(()=>{const c=w.current.slice(),f=[...c].reverse().find(g=>g.role==="user");if(!_.current.sessionId||!(f!=null&&f.revision)||a.busy||a.pendingCapacity)return!1;const E=He(f.text??"Continue the interrupted response from saved progress."),b=[...c,{id:z(),role:"user",text:E.text,paperMentions:[]},{id:z(),role:"assistant",streaming:!0,blocks:[]}];return Ie(E,{message:E.text,session_id:_.current.sessionId,client_message_id:crypto.randomUUID(),retry_message_id:f.id,..._.current.primaryPaperRouteId?{primary_paper_route_id:_.current.primaryPaperRouteId}:{},web_search_enabled:!!_.current.webSearchEnabled,reasoning_effort:_.current.reasoningEffort??Le},b,c)}),Te=Se(()=>{const c=[...w.current].reverse().find(f=>f.role==="user");return c!=null&&c.text?xe(c.id,{text:c.text,paperMentions:c.paperMentions??[],...c.paperSelection?{paperSelection:c.paperSelection}:{}}):!1}),We=d.useCallback(()=>{a.cancelCapacity(),U(null)},[a]),ye=Se(()=>{const c=a.pendingCapacity;return!c||Date.now(){var K,y;if(!h.current)return;const c=h.current;P(c),fe(c,"stopped"),c.abort();const f=((K=L.current)==null?void 0:K.controller)===c?L.current.stream.takeAcceptedForStop():[];L.current=null;for(const N of f)ge(N,!1);i(),h.current=null,((y=j.current)==null?void 0:y.controller)===c&&(j.current=null),a.finish(),u(!1);const E=m(),b=J({type:"stop"},!1).messages;E&&(w.current=b,t(b),_.current.onInterrupted(V.current));const g=a.sessionId;g&&(B.current={sessionId:g,messages:b}),g&&Mr(g).catch(()=>{});const H=++F.current;window.setTimeout(()=>{g&&E&&F.current===H?Ke(g,H).catch(()=>{}).finally(()=>{h.current||_.current.onSettled(g)}):h.current||_.current.onSettled(g)},450)}),Ne=Se((c,f)=>{const E=C.current?a.transition({type:"toggle_block",messageId:c,blockIndex:f}).messages:Jt(w.current,c,f);w.current=E,t(E)}),Ye=d.useCallback(()=>{var c;F.current+=1,O.current!==null&&(window.clearTimeout(O.current),O.current=null),k.current="cleared",(c=h.current)==null||c.abort(),h.current=null,L.current=null,I(),A.current=!1,B.current=null,j.current=null,U(null),a.reset(),T.current=null,C.current=!1,t([]),u(!1),p("")},[a]),Oe=Se((c,f,E=!1,b)=>{var g;if(F.current+=1,O.current!==null&&(window.clearTimeout(O.current),O.current=null),k.current="cleared",I(),A.current=!1,j.current=null,a.cancelCapacity(),U(null),a.busy&&f!==void 0&&f===a.sessionId){C.current=!0,t(a.messages),w.current=a.messages,p("");return}if(C.current=!1,a.busy||((g=h.current)==null||g.abort(),h.current=null,T.current=null,C.current=!1),E&&f&&!a.busy){const H=[...c].reverse().find(K=>K.role==="user");if(H){const K={text:H.text??"",paperMentions:H.paperMentions??[],...H.paperSelection?{paperSelection:H.paperSelection}:{}},y=[...c,{id:`${H.id}-active`,role:"assistant",streaming:!0,blocks:[]}];Ie(K,{message:K.text,session_id:f,client_message_id:"reconnect",web_search_enabled:!!_.current.webSearchEnabled,reasoning_effort:_.current.reasoningEffort??Le},y,c,void 0,f,b);return}}t(c),w.current=c,a.busy||a.restore(c,f??_.current.sessionId),a.busy||u(!1),p("")});return{messages:r,busy:s,activeSessionId:s?a.sessionId:null,activeTitle:a.state.title,activeConfiguration:a.configuration,selectedBusy:s&&a.sessionId===e.sessionId,papers:ue,sessionError:o,capacityRequest:W,disabledRequest:se,send:je,editAndResend:xe,retryFromProgress:de,retryLatest:Te,retryCapacity:ye,cancelCapacity:We,dismissDisabled:()=>Q(null),stop:Me,toggleBlock:Ne,reset:Ye,load:Oe}}const Xt=["chat","openai","usage"],Is=90,Zt="pwc:chat:openai-credits-notice:dismissed";function ks(e=!0){return Pe({queryKey:Xt,queryFn:()=>Xe.getOpenAIUsage(),enabled:e,staleTime:3e4,retry:!1,refetchOnWindowFocus:!0})}function Cs(e,r,t){if(!e||r!=="openai"||e.used_percent["chatSessions",e],detail:(e,r)=>["chatSession",e,r]},Ts=e=>Vt({queryKey:Fe.list(e),queryFn:Lr,staleTime:0,refetchOnWindowFocus:!1,retry:!1}),Bt=(e,r)=>Vt({queryKey:Fe.detail(e,r),queryFn:()=>{if(!r)throw new Error("A saved conversation is required");return ut(r)},staleTime:0,refetchOnWindowFocus:!1,retry:!1}),me=He,Ms=["Summarize the main contributions","Explain in simple terms","Identify the main limitations"],Ns=()=>{const e=sessionStorage.getItem(Je);if(!e)return null;try{return Yr(JSON.parse(e),e)}catch{}return me(e)},Ds=({enabled:e,workspaceKey:r,children:t,onAskAiFix:s})=>e?n.jsx(Sr,{workspaceKey:r,onAskAiFix:s,children:t}):n.jsx(n.Fragment,{children:t}),Ls=({enabled:e,children:r})=>e?n.jsx(Er,{variant:"chat",children:r}):n.jsx(n.Fragment,{children:r}),Fs=({mode:e="general",routeSessionId:r,primaryPaper:t,currentPage:s,paperSelection:u,onPaperSelectionChange:o,onSessionId:p,onReaderSubmit:a,onReaderNewChat:h,onReaderClose:L})=>{var ht,mt,gt,yt,_t,bt,wt,xt,vt,St,Et,Rt,It,kt;const{sessionId:v}=lr(),S=r??(e==="general"?v:void 0),A=ur(),[B,O]=dr(),{user:k,isLoading:j}=Ut(),W=pr(),U=(k==null?void 0:k.hf_subject)??null,se=_r(),Q=Pe({queryKey:["chatAvailability"],queryFn:()=>Xe.getAvailability(),refetchInterval:3e4,retry:!1,enabled:Ue()&&!!k}),w=((ht=Q.data)==null?void 0:ht.status)==="paused"||e==="paper"&&((mt=Q.data)==null?void 0:mt.paper_reader_chat_enabled)===!1,T=Pe({...Ts(U),enabled:!!k&&!j}),C=T.data??[],[_,V]=d.useState(null),[$,F]=d.useState(""),ne=l=>{W.setQueryData(Fe.list(U),x=>l(x??[]))},ue=(l,x)=>{ne(R=>R.map(le=>le.id===l?{...le,...x}:le)),W.setQueryData(Fe.detail(U,l),R=>R&&{...R,...x})},z=d.useRef(Fr()),J=d.useRef(B.get("model")||((gt=z.current)==null?void 0:gt.model)),[m,I]=d.useState(se?Or:qr),[i,M]=d.useState(J.current||st),P=Br(m,i),ae=Pr(m,i),ie=P==="huggingface"&&!ae,fe=zr(!!(k&&P==="openrouter")),ge=ks(Ue()&&!!k&&P==="openai"),[Ke,Ie]=d.useState(()=>As()),je=Cs(ge.data,P,Ke),[xe,de]=d.useState(()=>me()),Te=Le,We=!!((yt=Q.data)!=null&&yt.web_search_available),[ye,Me]=d.useState(()=>{var x,R;const l=(x=B.get("q"))==null?void 0:x.trim();return l?me(l):((R=z.current)==null?void 0:R.draft)??me()}),Ne=d.useRef(!1),Ye=d.useRef(!1),Oe=d.useRef(!1),[c,f]=d.useState(()=>typeof window>"u"||window.innerWidth>900),E=d.useRef(new Set),b=d.useRef(S);b.current=S;const[g,H]=d.useState(void 0),K=d.useCallback(async()=>{await W.invalidateQueries({queryKey:Fe.list(U)})},[W,U]),y=Rs({sessionId:S??null,initialModel:i,webSearchEnabled:We,reasoningEffort:Te,primaryPaperRouteId:e==="paper"?t==null?void 0:t.routeId:void 0,viewerContext:e==="paper"&&s?()=>({page:Math.max(1,Math.min(1e4,s()))}):void 0,loadSession:async l=>{const x=await W.fetchQuery(Bt(U,l));return V(R=>(R==null?void 0:R.sessionId)===l?null:R),x},onSessionId:(l,x,R)=>{W.cancelQueries({queryKey:Fe.list(U)});const le=new Date().toISOString();ne(we=>we.some(Ce=>Ce.id===l)?we.map(Ce=>Ce.id===l?{...Ce,is_busy:!0}:Ce):[{id:l,title:"New chat",selected_model:(R==null?void 0:R.model)??i,created_at:le,updated_at:le,message_count:1,is_busy:!0,web_search_enabled:(R==null?void 0:R.webSearchEnabled)??We,reasoning_effort:(R==null?void 0:R.reasoningEffort)??Te},...we]),(b.current??null)===x&&l!==x&&(e==="paper"?p==null||p(l):A(`/chat/${l}`,{replace:!0}))},onTitle:(l,x)=>{x&&!E.current.has(x)&&ue(x,{title:l})},onSettled:l=>{l&&ue(l,{is_busy:!1}),W.invalidateQueries({queryKey:Xt}),K()},onProviderTerminal:()=>{W.invalidateQueries({queryKey:Gr})},onPaperArtifact:(l,x)=>{x&&V({sessionId:x,descriptor:l.descriptor})},onInterrupted:l=>{de(l),o==null||o(l.paperSelection)}}),N=y.send;d.useEffect(()=>{y.capacityRequest&&(de(y.capacityRequest.draft),o==null||o(y.capacityRequest.draft.paperSelection))},[y.capacityRequest,o]);const he=d.useCallback(l=>{sessionStorage.setItem(Je,JSON.stringify(l)),sessionStorage.setItem(Qe,i),sessionStorage.setItem(Hr,Te),sessionStorage.setItem(ze,"1"),sessionStorage.setItem(Ge,"1");const x=e==="paper"&&t?`/pdf/${t.routeId}`:b.current?`/chat/${b.current}`:"/chat";window.location.href=fr(x,ie)},[e,t,Te,i,ie]),oe=d.useCallback((l,x)=>{sessionStorage.setItem(Je,JSON.stringify(l)),sessionStorage.setItem(Qe,i),sessionStorage.removeItem(ze),sessionStorage.removeItem(Ge),Me(me()),de(l),o==null||o(l.paperSelection),F(x)},[o,i]),ce=d.useCallback(async l=>{const x=o?u?{...l,paperSelection:u}:{text:l.text,paperMentions:l.paperMentions}:l;if(!k){he(x);return}if(ie&&!Ye.current){if(Oe.current)return;Oe.current=!0;try{if(!(await Xe.getInferenceBilling()).connected){if(sessionStorage.getItem(Ge)==="1"){oe(x,"Hugging Face inference authorization was not completed. Your prompt is ready to retry.");return}he(x);return}Ye.current=!0}catch(R){oe(x,R instanceof Error?R.message:"Could not check Hugging Face authorization.");return}finally{Oe.current=!1}}if(sessionStorage.removeItem(ze),!N(x)){oe(x,"Your prompt was not sent. It is ready to retry.");return}sessionStorage.removeItem(Je),sessionStorage.removeItem(Qe),sessionStorage.removeItem(Ge),Ur(),z.current=null,de(me()),o==null||o(void 0),e==="paper"&&(a==null||a())},[he,e,o,a,u,oe,N,k,ie]);d.useEffect(()=>{if(j||!k)return;const l=sessionStorage.getItem(Qe);l&&M(l),Kr().then(le=>{if(I(le.items),!b.current){const we=J.current||l;M(we&&le.items.some(Ce=>Ce.id===we)?we:le.default_model)}});const x=Ns(),R=sessionStorage.getItem(ze)==="1";x&&(o==null||o(x.paperSelection),R?Me(x):de(x))},[j,o,K,k]);const X=y.selectedBusy,{load:G,activeConfiguration:_e}=y,re=Pe({...Bt(U,S??null),enabled:!!(S&&k&&!j&&!X),refetchOnMount:"always"}),ve=!j&&(!k||re.error instanceof hr&&re.error.status===404),qe=Pe({queryKey:["chatSessionPublicShare",S],queryFn:()=>Xe.getSessionPublicShare(S??""),enabled:e==="general"&&!!S&&ve,retry:!1}),Y=(_t=qe.data)==null?void 0:_t.public_path;d.useEffect(()=>{Y&&A(Y,{replace:!0})},[A,Y]);const q=re.data,Z=X||g===(S??null),pe=_&&_.sessionId===S?_.descriptor:q==null?void 0:q.latex_paper,D=(wt=(bt=[...(q==null?void 0:q.messages)??[]].reverse().find(l=>l.role==="user"&&l.viewer_context))==null?void 0:bt.viewer_context)==null?void 0:wt.page;d.useLayoutEffect(()=>{const l=S??null;if(g!==l){if(X){H(l);const x=_e;x&&x.model&&M(x.model);return}if(!l){G([],null),H(null);return}!q||re.isFetching||(H(l),G($t(q),l,q.is_busy,{model:q.selected_model,webSearchEnabled:q.web_search_enabled,reasoningEffort:q.reasoning_effort??"high"}),F(""),M(q.selected_model))}},[S,X,q,G,_e,re.isFetching,g]),d.useEffect(()=>{var le;if(j)return;const l=(le=B.get("q"))==null?void 0:le.trim();if(!l)return;Ne.current=!1;const x=B.get("model");x&&M(x),Me(me(l));const R=new URLSearchParams(B);R.delete("q"),R.delete("model"),O(R,{replace:!0})},[j,B,O]),d.useEffect(()=>{if(j||y.busy||!ye.text||Ne.current||k&&Q.isFetching||S&&!Z)return;const l=window.setTimeout(()=>{if(Ne.current)return;Ne.current=!0,ce(ye).finally(()=>Me(me()))},0);return()=>window.clearTimeout(l)},[j,Q.isFetching,y.busy,ye,S,Z,ce,k]),d.useEffect(()=>{const l=()=>{!k||y.busy||K()};return window.addEventListener("focus",l),()=>window.removeEventListener("focus",l)},[y.busy,K,k]);const ke=()=>{window.innerWidth<=900&&f(!1),G([],null),H(null),de(me()),o==null||o(void 0),e==="paper"?h==null||h():A("/chat")},$e=async(l,x)=>{try{const R=await Nt(l,{title:x});return E.current.add(l),ue(l,R),!0}catch(R){return F(R instanceof Error?R.message:"Rename failed"),!1}},Ze=async l=>{const x=y.busy&&l===y.activeSessionId;if(window.confirm(x?"Stop and delete this chat? This cannot be undone.":"Delete this chat? This cannot be undone.")){x&&y.stop();try{if(x){const R=Date.now()+3e3;for(;(await ut(l)).is_busy;){if(Date.now()>=R)throw new Error("Generation is still stopping. The chat was not deleted.");await new Promise(we=>window.setTimeout(we,150))}}await $r(l),l===S&&ke(),await K()}catch(R){F(R instanceof Error?R.message:"Delete failed")}}},Be=us({messages:y.messages,refreshSessions:K,resetChat:y.reset,restoreDraft:de}),er=async l=>{const x=i;if(M(l),!S)return!0;try{const R=await Nt(S,{selected_model:l});return ue(S,{selected_model:R.selected_model}),F(""),!0}catch(R){return M(x),F(R instanceof Error?R.message:"Model change failed"),!1}},tr=m.some(l=>l.id===st),rr=async()=>{await er(st)&&y.retryLatest()},sr=Xr(e==="general"),dt=C.map(l=>l.id===y.activeSessionId&&y.busy?{...l,is_busy:!0,title:E.current.has(l.id)?l.title:y.activeTitle||l.title}:l),be=dt.find(l=>l.id===S),et=(be==null?void 0:be.primary_paper)??(q==null?void 0:q.primary_paper),tt=y.messages.length===0,Ve=!!(S&&(j||k&&!Z&&!re.isError||qe.isFetching||Y)),pt=!Z&&!Ve&&((xt=re.error)==null?void 0:xt.message),nr=!!((vt=fe.data)!=null&&vt.fallback_enabled),ar=o?u?{...xe,paperSelection:u}:{text:xe.text,paperMentions:xe.paperMentions}:xe,ft={onSend:ce,busy:X,onStop:y.stop,draft:ar,onDraftChange:l=>{o?(de({text:l.text,paperMentions:l.paperMentions}),l.paperSelection!==u&&o(l.paperSelection)):de(l)},disabled:w||j||y.busy&&!X,describedBy:w?"chat-paused-description":void 0,paperMentionsEnabled:!!((St=Q.data)!=null&&St.paper_mentions_enabled),paperSelectionEnabled:((Et=Q.data)==null?void 0:Et.paper_reader_selection_enabled)===!0,paperArtifactsEnabled:e==="general"&&((Rt=Q.data)==null?void 0:Rt.paper_artifacts_enabled)===!0};return n.jsx(Ds,{enabled:e==="general",workspaceKey:S??"new-chat",onAskAiFix:l=>{ce(me(l))},children:n.jsxs("div",{className:`chat-page${e==="paper"?" chat-page--reader":""}`,style:{height:sr},children:[e==="general"&&n.jsx(os,{sessions:dt,activeSessionId:S,loading:T.isLoading,error:$||((It=T.error)==null?void 0:It.message)||"",open:c,onClose:()=>f(!1),onNew:ke,onNavigate:l=>{window.innerWidth<=900&&f(!1),A(`/chat/${l}`)},onRename:$e,onDelete:l=>void Ze(l)}),n.jsx(Ls,{enabled:e==="general",children:n.jsxs("section",{className:"chat-main","data-testid":"active-chat-pane",children:[n.jsxs("div",{className:"chat-topbar",children:[e==="general"&&!c&&n.jsx("button",{type:"button",className:"icon-btn",onClick:()=>f(!0),title:"Open sidebar",children:n.jsx(Kt,{})}),n.jsx("span",{className:"chat-topbar-title",children:Ve?(be==null?void 0:be.title)||"":(be==null?void 0:be.title)||(q==null?void 0:q.title)||(tt?"":"New chat")}),se&&n.jsx("span",{className:"chat-staging-badge",children:"Staging"}),e==="general"&&S&&et&&n.jsx(Ct,{className:"chat-reader-action",to:`/pdf/${et.route_id}`,onClick:l=>{if(!De()){l.preventDefault();return}const x=et.route_id;sessionStorage.setItem(`pwc:reader:session:${x}`,S),D&&sessionStorage.setItem(`pwc:reader:page:${x}`,String(D))},children:"Open reader"}),S&&Z&&!tt&&n.jsx(cs,{sessionId:S,busy:X,loading:Ve,hasPaperSelection:y.messages.some(l=>!!l.paperSelection),onError:F}),e==="paper"&&n.jsxs(mr,{children:[n.jsx(gr,{asChild:!0,children:n.jsx("button",{type:"button",className:"icon-btn chat-reader-icon-btn","aria-label":"Chat options",title:"Chat options",children:n.jsx(Jr,{"aria-hidden":"true"})})}),n.jsxs(yr,{align:"end",children:[n.jsx(At,{onSelect:ke,children:"New chat"}),n.jsx(At,{asChild:!0,children:n.jsx(Ct,{to:"/chat",children:"All chats"})})]})]}),e==="paper"&&L&&n.jsx("button",{type:"button",className:"icon-btn chat-reader-icon-btn",onClick:L,"aria-label":"Close chat",title:"Close chat",children:n.jsx(Pt,{"aria-hidden":"true"})})]}),je&&n.jsxs("div",{className:"chat-credits-notice",role:"status",children:[n.jsx("span",{children:je.message}),n.jsx("button",{type:"button",className:"chat-credits-notice-close","aria-label":"Dismiss credits notice",onClick:()=>{js(je.resetsAt),Ie(je.resetsAt)},children:"×"})]}),e==="general"&&pe&&n.jsx(ls,{descriptor:pe}),Ve&&!ye.text?n.jsxs("div",{className:"chat-session-loading",role:"status","aria-live":"polite",children:[n.jsx(Wt,{}),n.jsx("span",{children:"Loading conversation…"})]}):pt?n.jsxs("div",{className:"chat-session-load-error",role:"alert",children:[n.jsx("p",{children:pt}),n.jsx("button",{type:"button",onClick:()=>{re.refetch()},children:"Try again"})]}):tt&&!ye.text?n.jsx("div",{className:"chat-empty",children:n.jsxs("div",{className:"chat-empty-inner",children:[n.jsx("div",{className:"chat-empty-eyebrow",children:e==="paper"?"Paper chat":"Research chat"}),n.jsx("h1",{className:"chat-empty-title",children:e==="paper"?"Ask about this paper":n.jsxs(n.Fragment,{children:["Ask ",n.jsx("em",{children:"Papers With Code"})]})}),n.jsx("p",{className:"chat-empty-sub",children:e==="paper"?"Questions are grounded in the open paper. Add up to three other papers with @.":"Answers are grounded in a live hybrid search over papers, tasks, and benchmarks — with citations you can follow."}),se&&n.jsx("p",{className:"chat-staging-access-note",children:"This is a limited staging preview. Only approved Hugging Face users can start chats."}),n.jsx(Lt,{variant:"empty",composerProps:ft,provider:P,sponsored:ae,paused:w,error:y.sessionError,suggestions:e==="paper"?Ms:Wr})]})}):n.jsxs(n.Fragment,{children:[n.jsx(ts,{messages:y.messages,papers:y.papers,busy:X,queuedDraft:ye.text?ye:void 0,paperMentionsEnabled:!!((kt=Q.data)!=null&&kt.paper_mentions_enabled),archivePending:Be.pending,openRouterFallbackEnabled:nr,onToggleBlock:y.toggleBlock,onEditAndResend:y.editAndResend,onRetryFromProgress:y.retryFromProgress,onRetryWithLuna:tr?()=>void rr():void 0,onArchiveOld:()=>void Be.archiveOld(),onArchiveOldest:()=>void Be.archiveOldest()}),n.jsx(Lt,{variant:"followup",composerProps:ft,provider:P,sponsored:ae,paused:w,error:y.sessionError})]})]})}),y.capacityRequest&&n.jsx(rs,{retryAt:y.capacityRequest.retryAt,onCancel:y.cancelCapacity,onRetry:()=>{y.retryCapacity()&&(de(me()),o==null||o(void 0))}}),y.disabledRequest&&n.jsx(ss,{onClose:()=>{var x;const l=((x=y.disabledRequest)==null?void 0:x.draft)??xe;de(l),o==null||o(l.paperSelection),y.dismissDisabled(),Q.refetch()}})]})})},Os=e=>{const{user:r}=Ut();return n.jsx(Fs,{...e},(r==null?void 0:r.hf_subject)??"guest")},yn=()=>n.jsx(Os,{});export{Os as ChatExperience,yn as default}; diff --git a/assets/ConferenceDetailView-BNri44qz.js b/assets/ConferenceDetailView-BNri44qz.js deleted file mode 100644 index 71942afded73ffa87533a7a20efe9af45c61c8b6..0000000000000000000000000000000000000000 --- a/assets/ConferenceDetailView-BNri44qz.js +++ /dev/null @@ -1 +0,0 @@ -import{u as L,r as D,j as e,L as p}from"./index-D6jcIRWs.js";import{u as T}from"./useQuery-CUJUm4FY.js";import{M as F}from"./MarkdownText-B_D3IE_p.js";import{c as A}from"./catalog-PYrB8_bm.js";import{c as B,h as C,d as E}from"./colors-CLwl8a2d.js";import{S as f}from"./skeleton-BqkYFmXl.js";import{A as P,a as z}from"./alert-2MbxVzGL.js";import{s as M}from"./safeExternalHref-CkBrsh84.js";/* empty css */import"./PaperPreviewLink-fcJyP9H0.js";import"./index-uFGyKu5N.js";import"./index-yduEvk9Z.js";import"./katex-DkKDou_j.js";import"./hover-card-DPpv0l_x.js";import"./papers-DIIIPDpj.js";import"./useMutation-p6mN4h17.js";const R=a=>(a==null?void 0:a.trim().toLowerCase().replace(/[\s_]+/g,"-"))??"",W=(a,t)=>{if(!a)return null;const i=new Date(`${a}T00:00:00`),s=t?new Date(`${t}T00:00:00`):null,c=g=>g.toLocaleDateString("en-US",{month:"long",day:"numeric"}),m=i.getFullYear();return s&&s.getTime()!==i.getTime()?i.getMonth()===s.getMonth()?`${c(i).replace(/\d+$/,"").trim()} ${i.getDate()}–${s.getDate()}, ${m}`:`${c(i)} – ${c(s)}, ${m}`:`${c(i)}, ${m}`},te=()=>{var k,S,b,_,$,w;const{confSlug:a}=L(),t=T({queryKey:["conference-areas-with-tasks",a],queryFn:()=>A.conferenceAreasWithTasks(a),enabled:!!a,staleTime:10*60*1e3}),i=D.useMemo(()=>{if(!t.data)return[];const n={general:0,vision:1,video:2,language:3,audio:4,other:5},r=o=>n[R(o)]??999;return[...t.data.results].sort((o,l)=>{const d=r(o.name),x=r(l.name);return d!==x?d-x:o.name.localeCompare(l.name)})},[t.data]),s=(k=t.data)==null?void 0:k.conference,c=((S=t.data)==null?void 0:S.total_paper_count)??0,m=((b=t.data)==null?void 0:b.oral_paper_count)??0,g=((_=t.data)==null?void 0:_.spotlight_paper_count)??0,u=(($=t.data)==null?void 0:$.outstanding_paper_count)??0,j=((w=t.data)==null?void 0:w.best_paper_finalist_paper_count)??0,v=i.reduce((n,r)=>n+r.tasks.length,0);if(t.error)return e.jsx("div",{className:"page",children:e.jsx(P,{variant:"destructive",children:e.jsx(z,{children:"Failed to load conference. Please try again."})})});const y=s?W(s.start_date,s.end_date):null,N=s?[s.venue,s.location].filter(Boolean).join(", "):null,h=s==null?void 0:s.name;return e.jsxs("div",{className:"page",children:[e.jsxs("div",{className:s!=null&&s.image_url?"task-hero-grid":void 0,children:[e.jsxs("div",{children:[e.jsx("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--accent-text)",letterSpacing:"0.1em",marginBottom:8},children:"CONFERENCE"}),e.jsx("h1",{className:"feed-title",children:h??e.jsx(f,{className:"h-10 w-64 inline-block"})}),e.jsxs("div",{className:"feed-subtitle",style:{display:"flex",flexDirection:"column",gap:4},children:[y&&e.jsx("span",{children:y}),N&&e.jsx("span",{children:N}),(s==null?void 0:s.url)&&e.jsx("a",{href:M(s.url)??void 0,target:"_blank",rel:"noopener noreferrer",style:{color:"var(--accent-text)"},children:s.url.replace(/^https?:\/\//,"")}),(s==null?void 0:s.hf_url)&&e.jsxs("a",{className:"bm-action-btn",href:s.hf_url,target:"_blank",rel:"noopener noreferrer",style:{alignSelf:"flex-start",marginTop:4},children:[e.jsx("span",{"aria-hidden":"true",children:"🤗"})," View on Hugging Face"]})]}),(s==null?void 0:s.description)&&e.jsx(F,{className:"method-description",text:s.description})]}),(s==null?void 0:s.image_url)&&e.jsxs("figure",{className:"task-figure-card",children:[e.jsx("div",{className:"task-figure-img-wrap",children:e.jsx("img",{className:"task-figure-img",src:s.image_url,alt:h?`${h} visual`:"Conference visual",onError:n=>{var r,o;(o=(r=n.currentTarget.parentElement)==null?void 0:r.parentElement)==null||o.style.setProperty("display","none")}})}),e.jsxs("figcaption",{children:["Figure · ",h??"Conference",s.image_credit&&e.jsxs(e.Fragment,{children:[e.jsx("br",{}),e.jsx(F,{className:"task-image-credit",text:s.image_credit})]})]})]})]}),!t.isLoading&&c>0&&e.jsxs("section",{style:{marginTop:48,marginBottom:48},children:[e.jsxs("div",{style:{display:"flex",alignItems:"baseline",justifyContent:"space-between",flexWrap:"wrap",gap:"6px 24px",paddingBottom:12,borderBottom:"1px solid var(--hairline-strong)"},children:[e.jsxs("div",{children:[e.jsx("h2",{style:{fontFamily:"var(--serif)",fontSize:26,fontWeight:500,letterSpacing:"-0.02em",marginBottom:4},children:"Browse papers"}),e.jsx("div",{style:{fontFamily:"var(--serif)",fontStyle:"italic",fontSize:13,color:"var(--ink-soft)"},children:"All accepted papers, plus oral, spotlight, outstanding, and best paper finalists."})]}),e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",whiteSpace:"nowrap"},children:[c.toLocaleString()," papers"]})]}),e.jsxs("div",{className:"tag-grid",children:[e.jsxs(p,{to:`/conferences/${a}/all`,className:"tag-cell",children:[e.jsxs("div",{className:"name",children:[e.jsx("span",{className:"dot",style:{background:"var(--accent)"}}),"All papers"]}),e.jsx("div",{className:"meta",children:e.jsxs("span",{children:[c.toLocaleString()," papers"]})})]}),m>0&&e.jsxs(p,{to:`/conferences/${a}/oral`,className:"tag-cell",children:[e.jsxs("div",{className:"name",children:[e.jsx("span",{className:"dot",style:{background:"#fdbb02"}}),"Oral papers"]}),e.jsx("div",{className:"meta",children:e.jsxs("span",{children:[m.toLocaleString()," papers"]})})]}),g>0&&e.jsxs(p,{to:`/conferences/${a}/spotlight`,className:"tag-cell",children:[e.jsxs("div",{className:"name",children:[e.jsx("span",{className:"dot",style:{background:"#fdbb02"}}),"Spotlight papers"]}),e.jsx("div",{className:"meta",children:e.jsxs("span",{children:[g.toLocaleString()," papers"]})})]}),u>0&&e.jsxs(p,{to:`/conferences/${a}/outstanding`,className:"tag-cell",children:[e.jsxs("div",{className:"name",children:[e.jsx("span",{className:"dot",style:{background:"#c45c26"}}),"Outstanding papers"]}),e.jsx("div",{className:"meta",children:e.jsxs("span",{children:[u.toLocaleString()," papers"]})})]}),j>0&&e.jsxs(p,{to:`/conferences/${a}/best-paper-finalists`,className:"tag-cell",children:[e.jsxs("div",{className:"name",children:[e.jsx("span",{className:"dot",style:{background:"#c9a227"}}),"Best paper finalists"]}),e.jsx("div",{className:"meta",children:e.jsxs("span",{children:[j.toLocaleString()," papers"]})})]})]})]}),t.isLoading?e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:32},children:Array.from({length:4}).map((n,r)=>e.jsxs("div",{children:[e.jsx(f,{className:"h-8 w-1/3 mb-4"}),e.jsx("div",{className:"tag-grid",children:Array.from({length:6}).map((o,l)=>e.jsx(f,{className:"h-24"},l))})]},r))}):i.map(n=>{const r=n.tasks;if(r.length===0)return null;const o=r.reduce((l,d)=>l+(d.paper_count||0),0);return e.jsxs("section",{style:{marginBottom:48},children:[e.jsxs("div",{style:{display:"flex",alignItems:"baseline",justifyContent:"space-between",flexWrap:"wrap",gap:"6px 24px",paddingBottom:12,borderBottom:"1px solid var(--hairline-strong)"},children:[e.jsxs("div",{children:[e.jsx("h2",{style:{fontFamily:"var(--serif)",fontSize:26,fontWeight:500,letterSpacing:"-0.02em",marginBottom:4},children:n.name}),n.description&&e.jsx("div",{style:{fontFamily:"var(--serif)",fontStyle:"italic",fontSize:13,color:"var(--ink-soft)"},children:n.description})]}),e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",whiteSpace:"nowrap"},children:[r.length," ",r.length===1?"task":"tasks"," · ",o.toLocaleString()," papers"]})]}),e.jsx("div",{className:"tag-grid",children:r.map(l=>{const d=l.slug||"",x=B(C(d));return e.jsxs(p,{to:`/conferences/${a}/${d}`,className:"tag-cell",children:[e.jsxs("div",{className:"name",children:[e.jsx("span",{className:"dot",style:{background:x.dot}}),E(l.name,d)]}),e.jsx("div",{className:"meta",children:e.jsxs("span",{children:[(l.paper_count??0).toLocaleString()," papers"]})})]},l.id)})})]},n.id)}),v>0&&e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",marginTop:24},children:[v," tasks across ",i.filter(n=>n.tasks.length>0).length," areas."]})]})};export{te as default}; diff --git a/assets/ConferenceDetailView-CX4S54m2.js b/assets/ConferenceDetailView-CX4S54m2.js new file mode 100644 index 0000000000000000000000000000000000000000..349e79d3206dbd4fdcc7d517cd095c2643ec781a --- /dev/null +++ b/assets/ConferenceDetailView-CX4S54m2.js @@ -0,0 +1 @@ +import{u as y,r as k,j as e,L as h}from"./index-YwiKC6Po.js";import{u as _}from"./useQuery-DPH6Mb2w.js";import{a as f,A as S,b}from"./AreaSection-CfCNkiTd.js";import{M as j}from"./MarkdownText-C-8yLDus.js";import{c as A}from"./catalog-B15Yh5dN.js";import{i as C}from"./apiErrors-DBfE_SVR.js";import{s as E}from"./areas-Dvi8w2dp.js";import{c as F,h as L}from"./colors-BkWRhvFI.js";import{C as $}from"./conferenceListings-BnmhBx-_.js";import{f as T}from"./deadlines-BH32v7D1.js";import{d as w}from"./transform-CNg3rvXk.js";import{S as D}from"./skeleton-CXR1qouH.js";import{A as P,a as R}from"./alert-Cx5luC5D.js";import{s as B}from"./safeExternalHref-CkBrsh84.js";import K from"./NotFound-D8hwuoEl.js";/* empty css */import"./PaperPreviewLink-CKfmgBjs.js";import"./index-CoRCN2p0.js";import"./index-BM_xSDJM.js";import"./katex-DkKDou_j.js";import"./hover-card-BY9tUGxy.js";import"./paperQueryKeys-C5FMa4Oj.js";import"./curation-CkzNFTMJ.js";import"./useMutation-f6iDkf3w.js";const ce=()=>{var g,x;const{confSlug:o}=y(),t=_({queryKey:["conference-areas-with-tasks",o],queryFn:()=>A.conferenceAreasWithTasks(o),enabled:!!o,staleTime:10*60*1e3}),m=k.useMemo(()=>{var a;return E(((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(K,{});if(t.error)return e.jsx("div",{className:"page",children:e.jsx(P,{variant:"destructive",children:e.jsx(R,{children:"Failed to load conference. Please try again."})})});const p=s?T(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(D,{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(S,{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=F(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}}),w(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(b,{areas:m})]})};export{ce as default}; diff --git a/assets/ConferenceTaskView-BBbbnoRS.js b/assets/ConferenceTaskView-BBbbnoRS.js deleted file mode 100644 index b6ad350155be6b44db875d7e979b5c464e9d533a..0000000000000000000000000000000000000000 --- a/assets/ConferenceTaskView-BBbbnoRS.js +++ /dev/null @@ -1 +0,0 @@ -import{u as V,e as $,r as b,j as e,L as y,K as W}from"./index-D6jcIRWs.js";import{u as E}from"./useQuery-CUJUm4FY.js";import{P as G}from"./components-DO1X940E.js";import{P as J}from"./PaperFeedFilters-DNebHp4l.js";import{a as X,P as Y,b as Z}from"./PaperDateFilter-CPIqaHaq.js";import{M as g}from"./MarkdownText-B_D3IE_p.js";import{c as M}from"./catalog-PYrB8_bm.js";import{t as ee,d as se}from"./colors-CLwl8a2d.js";import{d as ae}from"./usePapers-BbCSwcVk.js";import{u as te}from"./useInfiniteScroll-Dm7JY_X4.js";import{S as re}from"./skeleton-BqkYFmXl.js";import{A as ne,a as ie}from"./alert-2MbxVzGL.js";import"./papers-DIIIPDpj.js";import"./AuthorAvatar-UMHOVOr9.js";import"./LatexTitle-D_92Jowu.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-DCjqGpW0.js";/* empty css */import"./PaperPreviewLink-fcJyP9H0.js";import"./index-uFGyKu5N.js";import"./index-yduEvk9Z.js";import"./katex-DkKDou_j.js";import"./hover-card-DPpv0l_x.js";import"./useMutation-p6mN4h17.js";import"./useInfiniteQuery-FXco4P1n.js";import"./useIntersectionObserver-3LTuEaFW.js";const oe=[["trending","trending"],["date_published","newest"],["citation_count","most cited"]],ce=t=>t==="trending"||t==="date_published"||t==="citation_count"?t:"trending",Oe=()=>{var A,F,L,T,B,O;const{confSlug:t,taskSlug:n}=V(),[i,u]=$(),S=ce(i.get("order_by")),w=i.get("has_code")==="true",k=i.get("has_hf_artifacts")==="true",f=X(i),z=a=>{const s=new URLSearchParams(i);s.set("order_by",a),u(s)},q=a=>{const s=new URLSearchParams(i);a?s.set("has_code","true"):s.delete("has_code"),u(s)},I=a=>{const s=new URLSearchParams(i);a?s.set("has_hf_artifacts","true"):s.delete("has_hf_artifacts"),u(s)},R=n==="all",P=n==="oral",_=n==="spotlight",l=n==="outstanding",d=n==="best-paper-finalists",x=l||d,p=R||P||_||l||d,K=p?void 0:n,Q=P?"oral":_?"spotlight":l?"outstanding":d?"best_paper_finalist":void 0,m=E({queryKey:["conference",t],queryFn:()=>M.getConference(t),enabled:!!t,staleTime:10*60*1e3}),j=E({queryKey:["task",n],queryFn:()=>M.getTask(n),enabled:!!n&&!p,staleTime:10*60*1e3}),c=ae({conferenceSlug:t||"",taskSlug:K,presentation:Q,page_size:12,order_by:S,order_dir:"desc",include_resources:!0,has_code:w,has_hf_artifacts:k,start_date:f.startDate,end_date:f.endDate,enabled:!!t}),U=te(c);b.useEffect(()=>{window.scrollTo(0,0)},[t,n]);const N=b.useMemo(()=>{var s;return(((s=c.data)==null?void 0:s.pages)??[]).flatMap(o=>o.results)},[c.data]),v=b.useMemo(()=>N.map(ee),[N]),h=R?"All papers":P?"Oral papers":_?"Spotlight papers":l?"Outstanding papers":d?"Best paper finalists":se(((A=j.data)==null?void 0:A.name)||n||"",((F=j.data)==null?void 0:F.slug)||n),C=((T=(L=c.data)==null?void 0:L.pages[0])==null?void 0:T.count)??((B=m.data)==null?void 0:B.paper_count)??0,r=j.data;return m.error||j.error||c.error?e.jsx("div",{className:"page",children:e.jsx(ne,{variant:"destructive",children:e.jsx(ie,{children:"Failed to load conference papers. Please try again."})})}):e.jsxs("div",{className:"page",children:[e.jsxs("nav",{className:"breadcrumb","aria-label":"Breadcrumb",children:[e.jsx(y,{to:"/",children:"Home"}),e.jsx("span",{children:" / "}),e.jsx(y,{to:"/conferences",children:"Conferences"}),e.jsx("span",{children:" / "}),e.jsx(y,{to:`/conferences/${t}`,children:((O=m.data)==null?void 0:O.name)??t}),e.jsx("span",{children:" / "}),e.jsx("span",{children:h})]}),e.jsxs("div",{className:!p&&(r!=null&&r.image_url)?"task-hero-grid":void 0,style:{marginTop:16,marginBottom:28},children:[e.jsxs("div",{children:[e.jsx("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--accent-text)",letterSpacing:"0.1em",marginBottom:8},children:p?"BROWSE PAPERS":"TASK"}),e.jsx("h1",{className:"domain-mega-title",children:h}),l&&t==="iclr-2026"&&e.jsx(g,{className:"task-explainer",text:"ICLR 2026 recognized two Outstanding Papers and one Honorable Mention. [Read the announcement](https://blog.iclr.cc/2026/04/23/announcing-the-iclr-2026-outstanding-papers/)."}),l&&t==="icml-2026"&&e.jsx(g,{className:"task-explainer",text:"ICML 2026 recognized two Outstanding Papers and five Honorable Mentions. [Read the announcement](https://blog.icml.cc/2026/07/05/announcing-the-icml-2026-awards/)."}),d&&t==="cvpr-2026"&&e.jsx(g,{className:"task-explainer",text:"CVPR 2026 recognized fifteen Best Paper Award finalists, including the winners. [Read the announcement](https://x.com/CVPR/status/2062912519522717978)."}),!p&&(r==null?void 0:r.description)&&e.jsx(g,{className:"task-explainer",text:r.description}),m.data&&e.jsxs("div",{className:"task-quickstats",style:{marginTop:12},children:[e.jsxs("span",{children:[e.jsx("span",{className:"num",children:C.toLocaleString()}),"PAPERS"]}),e.jsx("span",{children:m.data.name})]})]}),!p&&(r==null?void 0:r.image_url)&&e.jsxs("figure",{className:"task-figure-card",children:[e.jsx("div",{className:"task-figure-img-wrap",children:e.jsx("img",{className:"task-figure-img",src:r.image_url,alt:`${h} schematic`,onError:a=>{var s,o;(o=(s=a.currentTarget.parentElement)==null?void 0:s.parentElement)==null||o.style.setProperty("display","none")}})}),e.jsxs("figcaption",{children:["Figure · ",h,r.image_credit&&e.jsxs(e.Fragment,{children:[e.jsx("br",{}),e.jsx(g,{className:"task-image-credit",text:r.image_credit})]})]})]})]}),e.jsxs("div",{className:"task-section-head",children:[e.jsx("div",{className:"task-section-eyebrow",children:x?"Award papers":"Conference papers · sort below"}),e.jsxs("div",{className:"task-section-title",children:["Papers ",e.jsxs("span",{className:"meta",children:["[",C.toLocaleString(),"]"]})]})]}),e.jsxs("div",{className:"sort-bar",children:[e.jsxs("div",{className:"paper-feed-toolbar-controls",children:[!x&&e.jsx("div",{className:"sort-options",children:oe.map(([a,s])=>e.jsx("button",{className:`sort-btn ${S===a?"active":""}`,onClick:()=>z(a),children:s},a))}),e.jsx(J,{hasCode:w,hasHfArtifacts:k,onHasCodeChange:q,onHasHfArtifactsChange:I,showDivider:!x})]}),e.jsx(Y,{startDate:f.startDate,endDate:f.endDate,onChange:a=>u(Z(i,a))}),!x&&e.jsxs("div",{className:"results-count",children:[v.length," loaded in ",e.jsx("span",{children:h})]})]}),c.isLoading?e.jsx("div",{className:"paper-list",children:Array.from({length:4}).map((a,s)=>e.jsx(re,{className:"h-40 w-full"},s))}):v.length===0?e.jsx("div",{className:"no-results",children:"No papers found for this selection."}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"paper-list",children:v.map((a,s)=>{var H;const o=(H=N[s])==null?void 0:H.conference_award,D=o==="outstanding"?"Outstanding Paper":o==="honorable_mention"?"Honorable Mention":o==="best_paper_finalist"&&!d?"Best Paper Finalist":null;return e.jsxs(W.Fragment,{children:[D&&e.jsx("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--accent-text)",letterSpacing:"0.08em",marginBottom:8},children:D}),e.jsx(G,{paper:a,rank:s+1})]},a.id)})}),e.jsx("div",{ref:U,style:{height:1}}),c.isFetchingNextPage&&e.jsx("div",{style:{padding:"20px 0",textAlign:"center",color:"var(--ink-faint)"},children:"Loading more…"})]})]})};export{Oe as default}; diff --git a/assets/ConferenceTaskView-DvbWh5_R.js b/assets/ConferenceTaskView-DvbWh5_R.js new file mode 100644 index 0000000000000000000000000000000000000000..3dc53fd9a6e4e1d49e1faf71dabe0bd1017b271e --- /dev/null +++ b/assets/ConferenceTaskView-DvbWh5_R.js @@ -0,0 +1 @@ +import{u as S,r as F,j as e,L as x}from"./index-YwiKC6Po.js";import{u as _}from"./useQuery-DPH6Mb2w.js";import{u as T,b as R,a as L}from"./PaperFeed-kaLm5US2.js";import{M as g}from"./MarkdownText-C-8yLDus.js";import{c as A}from"./catalog-B15Yh5dN.js";import{p as M,a as q}from"./paperQueryKeys-C5FMa4Oj.js";import{i as E}from"./apiErrors-DBfE_SVR.js";import{C as B}from"./conferenceListings-BnmhBx-_.js";import{t as O,d as Q}from"./transform-CNg3rvXk.js";import{u as z}from"./usePapers-C1deOZKl.js";import{A as H,a as I}from"./alert-Cx5luC5D.js";import K from"./NotFound-D8hwuoEl.js";import"./PaperCard-FG-bEpJk.js";import"./AuthorAvatar-CoTET6B3.js";import"./SotaBadges-DiQuEzfo.js";import"./colors-BkWRhvFI.js";import"./Icon-DXQ4sjQk.js";import"./LatexTitle-DI6voLfI.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-D7ygxg37.js";import"./skeleton-CXR1qouH.js";import"./useIntersectionObserver-Dt36kyjs.js";/* empty css */import"./PaperPreviewLink-CKfmgBjs.js";import"./index-CoRCN2p0.js";import"./index-BM_xSDJM.js";import"./katex-DkKDou_j.js";import"./hover-card-BY9tUGxy.js";import"./useMutation-f6iDkf3w.js";import"./curation-CkzNFTMJ.js";import"./useInfiniteQuery-BEbL80ez.js";const $={"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)."},ye=()=>{var b,v,y,P,k,w;const{confSlug:t,taskSlug:n}=S(),p=T(),a=B.find(s=>s.slug===n),u=!!(a!=null&&a.award),i=_({queryKey:["conference",t],queryFn:()=>A.getConference(t),enabled:!!t,staleTime:10*60*1e3}),c=_({queryKey:["task",n],queryFn:()=>A.getTask(n),enabled:!!n&&!a,staleTime:10*60*1e3}),l=z([...M.feeds.conference,t,n,p.filters],s=>q.forConference(t,{...p.filters,task:a?void 0:n,presentation:a==null?void 0:a.presentation,page:s,page_size:12}),{enabled:!!t}),f=F.useMemo(()=>{var s;return((s=l.data)==null?void 0:s.pages.flatMap(o=>o.results))??[]},[l.data]),h=F.useMemo(()=>f.map(O),[f]),d=(a==null?void 0:a.label)??Q(((b=c.data)==null?void 0:b.name)||n||"",((v=c.data)==null?void 0:v.slug)||n),j=$[`${t}/${n}`],N=((P=(y=l.data)==null?void 0:y.pages[0])==null?void 0:P.count)??((k=i.data)==null?void 0:k.paper_count)??0,r=c.data;return E(i.error)||E(c.error)?e.jsx(K,{}):i.error||c.error||l.error?e.jsx("div",{className:"page",children:e.jsx(H,{variant:"destructive",children:e.jsx(I,{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&&(r!=null&&r.image_url)?"task-hero-grid":void 0,style:{marginTop:16,marginBottom:28},children:[e.jsxs("div",{children:[e.jsx("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--accent-text)",letterSpacing:"0.1em",marginBottom:8},children:a?"BROWSE PAPERS":"TASK"}),e.jsx("h1",{className:"domain-mega-title",children:d}),j&&e.jsx(g,{className:"task-explainer",text:j}),!a&&(r==null?void 0:r.description)&&e.jsx(g,{className:"task-explainer",text:r.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&&(r==null?void 0:r.image_url)&&e.jsxs("figure",{className:"task-figure-card",children:[e.jsx("div",{className:"task-figure-img-wrap",children:e.jsx("img",{className:"task-figure-img",src:r.image_url,alt:`${d} schematic`,onError:s=>{var o,m;(m=(o=s.currentTarget.parentElement)==null?void 0:o.parentElement)==null||m.style.setProperty("display","none")}})}),e.jsxs("figcaption",{children:["Figure · ",d,r.image_credit&&e.jsxs(e.Fragment,{children:[e.jsx("br",{}),e.jsx(g,{className:"task-image-credit",text:r.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(R,{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(L,{query:l,cards:h,empty:"No papers found for this selection.",cardHeader:s=>{var C;const o=(C=f[s])==null?void 0:C.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{ye as default}; diff --git a/assets/ConferencesIndexView-DF9D85K1.js b/assets/ConferencesIndexView-DF9D85K1.js deleted file mode 100644 index 8431c116a71ffb74615cb9f0e92a8c6492a3c727..0000000000000000000000000000000000000000 --- a/assets/ConferencesIndexView-DF9D85K1.js +++ /dev/null @@ -1 +0,0 @@ -import{r as p,j as e,L as d}from"./index-D6jcIRWs.js";import{u}from"./useQuery-CUJUm4FY.js";import{c as f}from"./catalog-PYrB8_bm.js";import{S as m}from"./skeleton-BqkYFmXl.js";import{A as h,a as g}from"./alert-2MbxVzGL.js";import{T as x}from"./TaxonomySuggestionTile-BLk1tYYE.js";import"./SignInToEditDialog-RzK54RAM.js";import"./button-Bzx0ccHH.js";import"./input-CCN-4hy4.js";import"./textarea-sXKODM3W.js";import"./searchable-select-B7z6Fcrr.js";import"./popover-DCjqGpW0.js";import"./dialog-vGFIbcd-.js";import"./search-CfTufeR7.js";import"./loader-circle-BuDrH29B.js";import"./useMutation-p6mN4h17.js";import"./submissions-DNa3tQdo.js";import"./plus-C4UQ62Q1.js";const j=(t,a)=>{if(!t)return null;const r=new Date(`${t}T00:00:00`),s=a?new Date(`${a}T00:00:00`):null,n=o=>o.toLocaleDateString("en-US",{month:"long",day:"numeric"}),i=r.getFullYear();return s&&s.getTime()!==r.getTime()?r.getMonth()===s.getMonth()?`${n(r).replace(/\d+$/,"").trim()} ${r.getDate()}–${s.getDate()}, ${i}`:`${n(r)} – ${n(s)}, ${i}`:`${n(r)}, ${i}`},v=t=>{var r;if(t.year!=null)return t.year;if(t.start_date)return Number(t.start_date.slice(0,4));const a=(r=t.slug.match(/-(\d{4})$/))==null?void 0:r[1];return a?Number(a):0},y=(t,a)=>{if(t.start_date&&a.start_date){const r=t.start_date.localeCompare(a.start_date);if(r!==0)return r}else{if(t.start_date)return-1;if(a.start_date)return 1}return t.name.localeCompare(a.name)},N={display:"flex",alignItems:"baseline",justifyContent:"space-between",flexWrap:"wrap",gap:"6px 24px",paddingBottom:12,borderBottom:"1px solid var(--hairline-strong)"},H=()=>{const t=u({queryKey:["conferences"],queryFn:()=>f.conferences(),staleTime:6e5}),a=p.useMemo(()=>{var s;if(!((s=t.data)!=null&&s.results))return null;const r={};return t.data.results.forEach(n=>{const i=v(n);(r[i]||(r[i]=[])).push(n)}),Object.values(r).forEach(n=>n.sort(y)),Object.keys(r).map(Number).sort((n,i)=>i-n).map(n=>({year:n,conferences:r[n]}))},[t.data]);return t.error?e.jsx("div",{className:"page",children:e.jsx(h,{variant:"destructive",children:e.jsx(g,{children:"Failed to load conferences. Please try again."})})}):e.jsxs("div",{className:"page",children:[e.jsx("div",{className:"feed-header",children:e.jsxs("div",{children:[e.jsxs("h1",{className:"feed-title",children:["All ",e.jsx("em",{children:"Conferences"})]}),e.jsx("div",{className:"feed-subtitle",children:"Browse accepted papers from major AI conferences, grouped by research area and task."}),e.jsxs("div",{className:"conference-deadlines-link",children:["Find deadlines for upcoming conferences"," ",e.jsx(d,{to:"/ai-deadlines",className:"underline underline-offset-2 hover:text-foreground",children:"here"}),". Conference information is based on"," ",e.jsx("a",{href:"https://huggingface.co/ai-conferences",target:"_blank",rel:"noreferrer",className:"underline underline-offset-2 hover:text-foreground",children:"Hugging Face AI Conferences"}),"."]})]})}),t.isLoading?e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:32},children:Array.from({length:2}).map((r,s)=>e.jsxs("div",{children:[e.jsx(m,{className:"h-8 w-24 mb-4"}),e.jsx("div",{className:"tag-grid",children:Array.from({length:3}).map((n,i)=>e.jsx(m,{className:"h-32"},i))})]},s))}):a==null?void 0:a.map(({year:r,conferences:s})=>{const n=s.reduce((o,l)=>o+(l.paper_count??0),0),i=r>0?String(r):"Unknown year";return e.jsxs("section",{style:{marginBottom:48},children:[e.jsxs("div",{style:N,children:[e.jsx("div",{children:e.jsx("h2",{style:{fontFamily:"var(--serif)",fontSize:26,fontWeight:500,letterSpacing:"-0.02em",marginBottom:4},children:i})}),e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",whiteSpace:"nowrap"},children:[s.length," ",s.length===1?"conference":"conferences"," ·"," ",n.toLocaleString()," papers"]})]}),e.jsxs("div",{className:"tag-grid",children:[s.map(o=>{const l=j(o.start_date,o.end_date),c=[o.venue,o.location].filter(Boolean).join(", ");return e.jsxs(d,{to:`/conferences/${o.slug}`,className:"tag-cell",children:[e.jsx("div",{className:"name",children:o.name}),e.jsxs("div",{className:"meta",style:{display:"flex",flexDirection:"column",gap:4},children:[l&&e.jsx("span",{children:l}),c&&e.jsx("span",{children:c}),e.jsxs("span",{children:[(o.paper_count??0).toLocaleString()," papers"]})]})]},o.id)}),e.jsx(x,{kind:"conference"})]})]},r)})]})};export{H as default}; diff --git a/assets/ConferencesIndexView-DUaazjEx.js b/assets/ConferencesIndexView-DUaazjEx.js new file mode 100644 index 0000000000000000000000000000000000000000..5097cd9c81d3350984554488a4851cadee35a6b3 --- /dev/null +++ b/assets/ConferencesIndexView-DUaazjEx.js @@ -0,0 +1 @@ +import{r as d,j as e,L as c}from"./index-YwiKC6Po.js";import{u as m}from"./useQuery-DPH6Mb2w.js";import{c as p}from"./catalog-B15Yh5dN.js";import{f as u}from"./deadlines-BH32v7D1.js";import{A as f,a as h}from"./alert-Cx5luC5D.js";import{A as x,a as g}from"./AreaSection-CfCNkiTd.js";import{T as j}from"./TaxonomySuggestionTile-4WqZSJGN.js";import"./skeleton-CXR1qouH.js";import"./SignInToEditDialog-DpqyyHCb.js";import"./button-B90pJJiy.js";import"./input-DEeEc0bH.js";import"./textarea-BPIMGf5w.js";import"./searchable-select-Bqfyxu17.js";import"./popover-D7ygxg37.js";import"./dialog-foxx0Wu6.js";import"./search-wcEXdf1i.js";import"./loader-circle-B0KtDERb.js";import"./useMutation-f6iDkf3w.js";import"./submissions-BJgYjF7O.js";import"./plus-Cfz0QbT1.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},N=(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)},R=()=>{const r=m({queryKey:["conferences"],queryFn:()=>p.conferences(),staleTime:6e5}),a=d.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(N)),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(f,{variant:"destructive",children:e.jsx(h,{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(x,{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(g,{title:t>0?String(t):"Unknown year",meta:`${i.length} ${i.length===1?"conference":"conferences"} · ${n.toLocaleString()} papers`,children:[i.map(s=>{const o=u(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(j,{kind:"conference"})]},t)})]})};export{R as default}; diff --git a/assets/CronDashboard-DZ_espzl.js b/assets/CronDashboard-DMMdAs4p.js similarity index 98% rename from assets/CronDashboard-DZ_espzl.js rename to assets/CronDashboard-DMMdAs4p.js index f5ecf91373da882d5c7e27344bba786545aecaa1..b5207eed1063825b4fbf3ae84801d0e80aa97e88 100644 --- a/assets/CronDashboard-DZ_espzl.js +++ b/assets/CronDashboard-DMMdAs4p.js @@ -1,4 +1,4 @@ -import{n as D,r as x,F as is,v as cs,j as e,t as ie,a8 as ls,R as ds,I as os,x as oe,P as ms,z as us,G as Re,B as $,f as xe,A as Te,L as pe,a as hs,m as xs}from"./index-D6jcIRWs.js";import{u as z}from"./useQuery-CUJUm4FY.js";import{u as L}from"./useMutation-p6mN4h17.js";import{t as ge,f as v,a as S,S as Ae,o as ue,C as g,b as f,c as N,d as P,e as j,g as C}from"./CronDashboard-B0sjsUM_.js";import{B as I}from"./badge-t4oak8yc.js";import{B as y}from"./button-Bzx0ccHH.js";import{C as ps,a as gs}from"./chevron-up-CQKUhZ0S.js";import{D as fe}from"./database-DKdKRr_t.js";import{T as js}from"./trending-up-DqN3HzZ5.js";import{A as ne}from"./activity-5IcAhZoH.js";import{F as Ne}from"./file-text-4G2I5_Zo.js";import{T as Ee,I as vs}from"./triangle-alert-Cypc2KaL.js";import{E as X}from"./external-link-C_yz2sXa.js";import{C as Y,R as be}from"./refresh-cw-Qmu3JZxd.js";import{L as R}from"./loader-circle-BuDrH29B.js";import{C as je}from"./circle-check-BZn9Lr76.js";import{c as E,A as _s}from"./codex-P8vYbo4B.js";import{u as fs}from"./useInfiniteQuery-FXco4P1n.js";import{p as Me}from"./paperEdits-DUTCoe5T.js";import{c as me}from"./catalog-PYrB8_bm.js";import{c as ye}from"./chat-ChnK8XDU.js";/** +import{n as D,r as x,E as is,v as cs,j as e,t as ie,a8 as ls,R as ds,I as os,x as oe,P as ms,z as us,F as Re,A as $,f as xe,J as Te,L as pe,a as hs,m as xs}from"./index-YwiKC6Po.js";import{u as z}from"./useQuery-DPH6Mb2w.js";import{u as L}from"./useMutation-f6iDkf3w.js";import{t as ge,f as v,a as S,S as Ae,o as ue,C as g,b as f,c as N,d as P,e as j,g as C}from"./CronDashboard-DcLcBHdd.js";import{B as I}from"./badge-CFf6CiSg.js";import{B as y}from"./button-B90pJJiy.js";import{C as ps,a as gs}from"./chevron-up-BXtxbTfV.js";import{D as fe}from"./database-2w-JFZSG.js";import{T as js}from"./trending-up-Sm0tkX5g.js";import{A as ne}from"./activity-95309hog.js";import{F as Ne}from"./file-text-Cijxx2XD.js";import{T as Ee,I as vs}from"./triangle-alert-BWObrJc7.js";import{E as X}from"./external-link-4bBJT0yO.js";import{C as Y,R as be}from"./refresh-cw-4AZFTXDl.js";import{L as R}from"./loader-circle-B0KtDERb.js";import{C as je}from"./circle-check-BPcHPjjB.js";import{c as E,A as _s}from"./codex-C9BvAdr-.js";import{u as fs}from"./useInfiniteQuery-BEbL80ez.js";import{p as Me}from"./paperEdits-B8a9u4Tx.js";import{c as me}from"./catalog-B15Yh5dN.js";import{c as ye}from"./chat-DHGOonJg.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/CronDashboard-B0sjsUM_.js b/assets/CronDashboard-DcLcBHdd.js similarity index 94% rename from assets/CronDashboard-B0sjsUM_.js rename to assets/CronDashboard-DcLcBHdd.js index 5c038f955693debf9a819df96f8232dc4a73de57..aec96f2981e30752ef7bee568130e66f0773642f 100644 --- a/assets/CronDashboard-B0sjsUM_.js +++ b/assets/CronDashboard-DcLcBHdd.js @@ -1,6 +1,6 @@ -import{n as c,r,j as a,B as n,a5 as u}from"./index-D6jcIRWs.js";/** +import{n as c,r,j as a,A as n,a5 as u}from"./index-YwiKC6Po.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const N=c("ShieldAlert",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]]),f=r.forwardRef(({className:o,...e},t)=>a.jsx("div",{ref:t,className:n("rounded-lg border bg-card text-card-foreground shadow-sm",o),...e}));f.displayName="Card";const m=r.forwardRef(({className:o,...e},t)=>a.jsx("div",{ref:t,className:n("flex flex-col space-y-1.5 p-6",o),...e}));m.displayName="CardHeader";const p=r.forwardRef(({className:o,...e},t)=>a.jsx("h3",{ref:t,className:n("text-2xl font-semibold leading-none tracking-tight",o),...e}));p.displayName="CardTitle";const l=r.forwardRef(({className:o,...e},t)=>a.jsx("p",{ref:t,className:n("text-sm text-muted-foreground",o),...e}));l.displayName="CardDescription";const h=r.forwardRef(({className:o,...e},t)=>a.jsx("div",{ref:t,className:n("p-6 pt-0",o),...e}));h.displayName="CardContent";const C=r.forwardRef(({className:o,...e},t)=>a.jsx("div",{ref:t,className:n("flex items-center p-6 pt-0",o),...e}));C.displayName="CardFooter";const b=o=>`cron-status--${o}`,x=o=>`$${o.toFixed(2)}`,w=o=>x(o/1e6);function M(o){if(!o)return"Never";const e=new Date(o);if(Number.isNaN(e.getTime()))return o;const t=Date.now()-e.getTime(),s=Math.floor(t/6e4),i=Math.floor(t/36e5),d=Math.floor(t/864e5);return s<1?"Just now":s<60?`${s}m ago`:i<24?`${i}h ago`:d<7?`${d}d ago`:e.toLocaleString("en-US",{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}class g{constructor(e){this.request=e}getCronStatus(e=!1){const t=e?"?force_refresh=true":"";return this.request(`/cron/status${t}`,{cache:"no-store"})}getPaperMarkdownJobs(){return this.request("/cron/paper-markdown-jobs",{cache:"no-store"})}getAutonomousOperations(){return this.request("/admin/autonomous-operations",{cache:"no-store"})}setAutonomousManualMode(e,t,s){return this.request("/admin/autonomous-operations/manual-mode",{method:"PATCH",body:JSON.stringify({enabled:e,expected_revision:t,confirmation:s})})}setAutonomousOperator(e,t,s,i){return this.request(`/admin/autonomous-operations/operators/${e}`,{method:"PATCH",body:JSON.stringify({enabled:t,expected_revision:s,confirmation:i})})}qualifyAutonomousChatBaseline(e,t,s){return this.request("/admin/autonomous-operations/chat-baseline",{method:"POST",body:JSON.stringify({sha:e,expected_revision:t,confirmation:s})})}}const q=new g(u);export{f as C,N as S,x as a,m as b,p as c,l as d,h as e,M as f,w as g,q as o,b as t}; + */const N=c("ShieldAlert",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]]),f=r.forwardRef(({className:o,...e},t)=>a.jsx("div",{ref:t,className:n("rounded-lg border bg-card text-card-foreground shadow-sm",o),...e}));f.displayName="Card";const m=r.forwardRef(({className:o,...e},t)=>a.jsx("div",{ref:t,className:n("flex flex-col space-y-1.5 p-6",o),...e}));m.displayName="CardHeader";const p=r.forwardRef(({className:o,...e},t)=>a.jsx("h3",{ref:t,className:n("text-2xl font-semibold leading-none tracking-tight",o),...e}));p.displayName="CardTitle";const l=r.forwardRef(({className:o,...e},t)=>a.jsx("p",{ref:t,className:n("text-sm text-muted-foreground",o),...e}));l.displayName="CardDescription";const h=r.forwardRef(({className:o,...e},t)=>a.jsx("div",{ref:t,className:n("p-6 pt-0",o),...e}));h.displayName="CardContent";const C=r.forwardRef(({className:o,...e},t)=>a.jsx("div",{ref:t,className:n("flex items-center p-6 pt-0",o),...e}));C.displayName="CardFooter";const b=o=>`cron-status--${o}`,x=o=>`$${o.toFixed(2)}`,w=o=>x(o/1e6);function M(o){if(!o)return"Never";const e=new Date(o);if(Number.isNaN(e.getTime()))return o;const t=Date.now()-e.getTime(),s=Math.floor(t/6e4),i=Math.floor(t/36e5),d=Math.floor(t/864e5);return s<1?"Just now":s<60?`${s}m ago`:i<24?`${i}h ago`:d<7?`${d}d ago`:e.toLocaleString("en-US",{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}class g{constructor(e){this.request=e}getCronStatus(e=!1){const t=e?"?force_refresh=true":"";return this.request(`/cron/status${t}`,{cache:"no-store"})}getPaperMarkdownJobs(){return this.request("/cron/paper-markdown-jobs",{cache:"no-store"})}getAutonomousOperations(){return this.request("/admin/autonomous-operations",{cache:"no-store"})}setAutonomousManualMode(e,t,s){return this.request("/admin/autonomous-operations/manual-mode",{method:"PATCH",body:JSON.stringify({enabled:e,expected_revision:t,confirmation:s})})}setAutonomousOperator(e,t,s,i){return this.request(`/admin/autonomous-operations/operators/${e}`,{method:"PATCH",body:JSON.stringify({enabled:t,expected_revision:s,confirmation:i})})}qualifyAutonomousChatBaseline(e,t,s){return this.request("/admin/autonomous-operations/chat-baseline",{method:"POST",body:JSON.stringify({sha:e,expected_revision:t,confirmation:s})})}}const A=new g(u);export{f as C,N as S,x as a,m as b,p as c,l as d,h as e,M as f,w as g,A as o,b as t}; diff --git a/assets/ExternalSourceEvalBadge-CimjRPVg.js b/assets/ExternalSourceEvalBadge-CimjRPVg.js new file mode 100644 index 0000000000000000000000000000000000000000..00e98660f9afbcb8119144994396069369195c45 --- /dev/null +++ b/assets/ExternalSourceEvalBadge-CimjRPVg.js @@ -0,0 +1 @@ +import{p as o}from"./curation-CkzNFTMJ.js";import{a5 as g,j as a,L as l}from"./index-YwiKC6Po.js";import{H as u,a as c,b as d}from"./hover-card-BY9tUGxy.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/ExternalSourceEvalBadge-DfhTt9yv.js b/assets/ExternalSourceEvalBadge-DfhTt9yv.js deleted file mode 100644 index f835687983ce11dc1a2887872ac8bd151f864f71..0000000000000000000000000000000000000000 --- a/assets/ExternalSourceEvalBadge-DfhTt9yv.js +++ /dev/null @@ -1 +0,0 @@ -import{c as o}from"./papers-DIIIPDpj.js";import{a5 as g,j as a,L as l}from"./index-D6jcIRWs.js";import{H as u,a as c,b as d}from"./hover-card-DPpv0l_x.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-CFzlAcol.js b/assets/FeedView-CFzlAcol.js new file mode 100644 index 0000000000000000000000000000000000000000..a4d4118c086153bc0aaefdea196db6f98ac52afc --- /dev/null +++ b/assets/FeedView-CFzlAcol.js @@ -0,0 +1 @@ +import{j as e,L as E,a as Se,b as Te,r as h,h as _e,C as Pe,c as be,d as Ce,e as Fe,f as Ee,i as Le,g as ne,k as ye,l as Ae}from"./index-YwiKC6Po.js";import{S as De}from"./sparkles-C3L7JDLC.js";import{u as R}from"./useQuery-DPH6Mb2w.js";import{D as Re,a as qe,b as Me}from"./dialog-foxx0Wu6.js";import{c as ee}from"./catalog-B15Yh5dN.js";import{T as pe,r as B}from"./research-5UpiU-ea.js";import{d as ie,t as Ie}from"./transform-CNg3rvXk.js";import{u as je,a as ve,s as Oe,b as He,r as he,c as me,d as $e}from"./researchTopic-CAL_T-Y-.js";import{P as ze}from"./plus-Cfz0QbT1.js";import{A as Ke}from"./arrow-right-CSx7rJG4.js";import{r as Be,P as Ue,w as Ge,a as Qe}from"./PaperFeed-kaLm5US2.js";import{M as We}from"./McpShowcase-Fj71TTNl.js";import{u as Xe,a as Ye,P as Ze,i as Ve,A as Je,b as es,S as $,c as ss,D as se,q as ts,d as as}from"./chatSessions-CdNQ1toA.js";import{c as os}from"./chat-DHGOonJg.js";import{u as ns}from"./usePapers-C1deOZKl.js";import{p as J,a as ge}from"./paperQueryKeys-C5FMa4Oj.js";import{S as te}from"./skeleton-CXR1qouH.js";import{A as ae,a as oe}from"./alert-Cx5luC5D.js";import"./useMutation-f6iDkf3w.js";import"./PaperCard-FG-bEpJk.js";import"./AuthorAvatar-CoTET6B3.js";import"./SotaBadges-DiQuEzfo.js";import"./colors-BkWRhvFI.js";import"./Icon-DXQ4sjQk.js";import"./LatexTitle-DI6voLfI.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-D7ygxg37.js";import"./useIntersectionObserver-Dt36kyjs.js";import"./AgentLogos-DhD8p5ds.js";import"./useInfiniteQuery-BEbL80ez.js";import"./curation-CkzNFTMJ.js";function is({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(De,{"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(E,{to:"/settings",children:"Settings"}),"."]})]})}const fe=16;function rs({open:r,onOpenChange:a}){return e.jsx(Re,{open:r,onOpenChange:a,children:e.jsx(qe,{className:"topic-dialog","aria-describedby":void 0,children:e.jsx(ls,{onDone:()=>a(!1)})})})}function ls({onDone:r}){var W,X,Y,Z,H,z,U;const{user:a}=Se(),m=Te(),l=R({queryKey:["research-topic",a==null?void 0:a.hf_subject],queryFn:B.topic,enabled:!!a}),s=R({queryKey:["research-follows",a==null?void 0:a.hf_subject],queryFn:B.follows,enabled:!!a}),w=R({queryKey:["trending-tasks-follow"],queryFn:()=>ee.trendingTasks({limit:fe,level:0}),staleTime:10*60*1e3}),y=R({queryKey:["trending-methods-follow"],queryFn:()=>ee.trendingMethods({limit:fe}),staleTime:10*60*1e3}),c=R({queryKey:["research-follow-suggestions"],queryFn:B.followSuggestions,staleTime:10*60*1e3}),j=(i=[])=>i.map(p=>({id:String(p.entity_id),name:p.name,image:p.image_url})),[k,L]=h.useState(null),[_,v]=h.useState([]),P=je(),M=ve(),b=((W=l.data)==null?void 0:W.text)??"",n=k??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=P.isPending||M.isPending,o=(i,p)=>{var N;return((N=s.data)==null?void 0:N.some(S=>S.kind===i&&String(S.entity_id)===p))??!1},g=(i,p)=>{var N;return((N=_.find(S=>S.kind===i&&S.id===p))==null?void 0:N.follow)??o(i,p)},f=_.filter(i=>i.follow!==o(i.kind,i.id)),F=!D&&(A||f.length>0),q=(i,p,N)=>v(S=>[...S.filter(G=>G.kind!==i||G.id!==p),{kind:i,id:p,name:N,follow:!g(i,p)}]),I=()=>{if(!F)return;if(!a){A&&Oe(d),f.length&&He(f),window.location.href=_e(`${m.pathname}${m.search}`);return}const i=[...f.length?[M.mutateAsync(f)]:[],...A?[P.mutateAsync(d)]:[]];Promise.allSettled(i).then(p=>{p.every(N=>N.status==="fulfilled")&&r()})},O=(i,p,N,S)=>{const V=[...(s.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=>!o(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(cs,{children:[V.map(x=>{const Q=g(p,x.id),K=p==="task"?ie(x.name,x.slug??void 0):x.name;return e.jsxs("button",{type:"button",className:"topic-dialog-chip","aria-pressed":Q,disabled:D,"data-suggested":"suggested"in x||void 0,onClick:()=>q(p,x.id,K),children:[Q?e.jsx(Pe,{"aria-hidden":"true"}):e.jsx(ze,{"aria-hidden":"true"}),(p==="author"||p==="organization")&&e.jsx(ds,{kind:p,name:K,src:x.image}),K]},x.id)}),S&&e.jsxs(E,{to:S.to,className:"topic-dialog-browse",children:[S.label,e.jsx(Ke,{"aria-hidden":"true"})]})]})]})};return e.jsxs("form",{className:"topic-dialog-form",onSubmit:i=>{i.preventDefault(),I()},children:[e.jsx(Me,{className:"topic-dialog-title",children:b||(Y=s.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:pe,"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(),I())}}),e.jsxs("span",{className:"research-topic-count",children:[n.length,"/",pe]})]}),O("Trending tasks","task",((Z=w.data)==null?void 0:Z.results)??[],{to:"/tasks",label:"Browse tasks"}),O("Trending methods","method",((H=y.data)==null?void 0:H.results)??[],{to:"/methods",label:"Browse methods"}),O("Benchmarks","benchmark",[],{to:"/tasks",label:"Browse benchmarks"}),O("Popular authors","author",j((z=c.data)==null?void 0:z.authors)),O("Popular organizations","organization",j((U=c.data)==null?void 0:U.organizations),{to:"/organizations",label:"Browse organizations"}),(P.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:()=>P.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:!F,children:f.some(i=>i.follow===!1)?"Save":f.length?"Follow":C?"Retry":b?"Update topic":"Follow"})]})]})}function cs({children:r}){const a=h.useRef(null);return h.useLayoutEffect(()=>{const m=a.current;if(!m)return;const l=()=>{const s=[...m.children],w=s.filter(c=>c.dataset.suggested);w.forEach(c=>{c.hidden=!1});const y=()=>new Set(s.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:a,className:"topic-dialog-chips",children:r})}function ds({kind:r,name:a,src:m}){const[l,s]=h.useState(!1);if(m&&!l)return e.jsx("img",{className:`topic-dialog-chip-image is-${r}`,src:m,alt:"",loading:"lazy",onError:()=>s(!0)});if(r!=="author")return null;const w=a.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 xe=45,us=1800,ps=25,hs=350,ms=r=>{const[a,m]=h.useState($[0].slice(0,1)),[l,s]=h.useState(0);return h.useEffect(()=>{var L,_;if(!r)return;if((_=(L=window.matchMedia)==null?void 0:L.call(window,"(prefers-reduced-motion: reduce)"))!=null&&_.matches){m($[0]),s(0);return}let w=0,y=1,c=!1,j;m($[0].slice(0,y)),s(0);const k=()=>{const v=$[w];if(!c){if(y+=1,m(v.slice(0,y)),y===v.length){c=!0,j=window.setTimeout(k,us);return}j=window.setTimeout(k,xe);return}if(y-=1,m(v.slice(0,y)),y===0){c=!1,w=(w+1)%$.length,s(w),j=window.setTimeout(k,hs);return}j=window.setTimeout(k,ps)};return j=window.setTimeout(k,xe),()=>window.clearTimeout(j)},[r]),{placeholder:a,prompt:$[l]}},gs=()=>{var D;const r=be(),a=ye(),[m,l]=h.useState({text:"",paperMentions:[]}),s=m.text,[w,y]=h.useState(0),[c,j]=h.useState(!1),[k,L]=h.useState(null),{placeholder:_,prompt:v}=ms(!s),P=h.useRef(null),M=R({queryKey:["chatAvailability"],queryFn:()=>os.getAvailability(),retry:!1,enabled:ne()}),b=ne()&&((D=M.data)==null?void 0:D.paper_mentions_enabled)!==!1,n=Xe({draft:m,onChange:l,enabled:b,textareaRef:P}),d=Ye(m,n.open),C=s?d.completion:v;h.useLayoutEffect(()=>{const o=P.current;if(!o)return;const g=()=>{if(o.style.height="auto",s){o.style.height=`${Math.min(ss(o),160)}px`;return}const f=o.placeholder,F=$.reduce((q,I)=>(o.placeholder=I,Math.max(q,o.scrollHeight)),0);o.placeholder=f,o.style.height=`${Math.min(F,160)}px`};return g(),window.addEventListener("resize",g),()=>window.removeEventListener("resize",g)},[s,C]);const A=async(o=m)=>{const g=o.text.trim();if(!(!g||c)){if(a){const f=new URLSearchParams({q:g,model:se}),F=`${Ae}?${f}`,q=window.open(F,"_blank");if(!q){L(F);return}q.opener=null,L(null),l({text:"",paperMentions:[]});return}j(!0),ts(o,se);try{const f=await as(se);r(`/chat/${f.id}`)}catch{r("/chat")}}};return e.jsxs(e.Fragment,{children:[!a&&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(Ze,{text:m.text,mentions:m.paperMentions,scrollTop:w,variant:"home",completion:s?C:""}),e.jsx("textarea",{ref:P,rows:1,value:s,placeholder:_,"aria-label":"Ask the assistant",disabled:c,onChange:o=>{n.updateText(o.target.value,o.target.selectionStart),d.trackCaret(o.target)},onSelect:o=>{n.refresh(o.currentTarget.selectionStart),d.trackCaret(o.currentTarget)},onClick:o=>{n.refresh(o.currentTarget.selectionStart),d.trackCaret(o.currentTarget)},onScroll:o=>y(o.currentTarget.scrollTop),onBlur:o=>{var g,f;(f=(g=o.relatedTarget)==null?void 0:g.closest)!=null&&f.call(g,".chat-paper-picker")||window.setTimeout(n.close,0)},onKeyDown:o=>{if(!n.keyDown(o)){if(Ve(o)&&C){o.preventDefault();const g=s+C;n.updateText(g,g.length),window.requestAnimationFrame(()=>{var f;return(f=P.current)==null?void 0:f.setSelectionRange(g.length,g.length)});return}o.key==="Enter"&&!o.shiftKey&&(o.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${s.trim()?" chat-send-on":""}`,onClick:()=>void A(),disabled:!s.trim()||c,"aria-label":"Ask the assistant",children:e.jsx(Je,{})})]}),k&&e.jsx("div",{className:"chat-paper-mention-message",role:"alert",children:e.jsx("a",{href:k,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(es,{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})]})]})},Ne={task:"Tasks",method:"Methods",benchmark:"Benchmarks",author:"Authors",organization:"Orgs"},fs=Object.keys(Ne),xs=30,we=40,ws=async r=>{const a=await r;return{results:a.results.map(m=>({paper:m})),next_page:a.next_page}},bs=({mode:r})=>{var Q,K,re,le,ce,de,ue;const a=r==="following",m=be(),l=Ce(),s=l==null?void 0:l.user,[w,y]=Fe(),c=Be(w,void 0,a?"month":"week"),j=t=>{const u=new URLSearchParams(w);u.delete("order_by"),u.delete("only");const T=u.toString();m(T?`${t}?${T}`:t)},k=t=>{const u=new URLSearchParams(w);t?u.set("only","topic"):u.delete("only");const T=u.toString();return T?`/following?${T}`:"/following"},L=R({queryKey:["top-tasks-sidebar"],queryFn:()=>ee.topTasks(8),staleTime:10*60*1e3}),_=R({queryKey:["trending-tasks-sidebar"],queryFn:()=>ee.trendingTasks({limit:8,level:0}),staleTime:10*60*1e3}),v=a&&w.get("only")==="topic",P={start_date:c.startDate,end_date:c.endDate},M={...c,topicOnly:v},b=ns(a?[...J.feeds.following,s==null?void 0:s.hf_subject,M]:[...r==="x"?J.feeds.xTrending:J.feeds.trending,P],async t=>{if(a){const T=await B.following(t,M),ke=T.length===we?t+we:null;return{results:T,next_page:ke}}const u={...P,page:t,page_size:xs,include_resources:!0};return ws(r==="x"?ge.xTrending(u):ge.list({...u,order_by:"trending",order_dir:"desc",latest_only:!0}))},{enabled:!a||!!s,initialPage:a?0:1}),n=R({queryKey:["research-follows",s==null?void 0:s.hf_subject],queryFn:B.follows,enabled:a&&!!s}),d=R({queryKey:["research-topic",s==null?void 0:s.hf_subject],queryFn:B.topic,enabled:a&&!!s,refetchInterval:t=>t.state.data&&["pending","running"].includes(t.state.data.status)?1e4:!1}),C=!!d.data&&["pending","running"].includes(d.data.status),A=d.data?d.data.label??d.data.text:"",[D,o]=h.useState(!1),g=Ee(),f=h.useRef(!1);h.useEffect(()=>{f.current&&!C&&g.invalidateQueries({queryKey:[...J.feeds.following,s==null?void 0:s.hf_subject]}),f.current=C},[C,g,s==null?void 0:s.hf_subject]);const F=a&&!!s&&((Q=n.data)==null?void 0:Q.length)===0&&d.isSuccess&&!d.data,q=a&&!(l!=null&&l.isLoading)&&!s||F,I=!!s||!Le(),[O,W]=h.useState(!1),[X]=h.useState(()=>!!he()||me().length>0),[Y,Z]=h.useState(!1);!O&&(d.data||(K=n.data)!=null&&K.length)&&W(!0),q&&!Y&&(Z(!0),I&&!O&&!X&&o(!0));const H=je(),{mutate:z}=H,U=h.useRef(!1);h.useEffect(()=>{var u;const t=he();!s||!d.isSuccess||!t||U.current||(U.current=!0,t===((u=d.data)==null?void 0:u.text)?$e():z(t))},[s,d.isSuccess,d.data,z]);const i=ve(),{mutate:p}=i,N=h.useRef(!1);h.useEffect(()=>{const t=me();!s||!t.length||N.current||(N.current=!0,p(t))},[s,p]);const S=h.useMemo(()=>fs.map(t=>{var u;return{kind:t,follows:a?((u=n.data)==null?void 0:u.filter(T=>T.kind===t))??[]:[]}}).filter(t=>t.follows.length>0),[a,n.data]),G=a&&(!!(l!=null&&l.isLoading)||!!s&&!F),V=h.useMemo(()=>{var t;return((t=b.data)==null?void 0:t.pages.flatMap(u=>u.results.map(T=>({...Ie(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:[G?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((t,u)=>e.jsx(te,{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(E,{to:k(!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:()=>o(!0),children:"edit"})]}),S.map(t=>e.jsxs("div",{className:"sidebar-follow-group",children:[e.jsx("span",{className:"sidebar-follow-kind",children:Ne[t.kind]}),t.follows.map(u=>e.jsx(E,{to:u.url,className:"sidebar-link sidebar-follow-link",children:e.jsx("span",{className:"sidebar-follow-name",children:u.name})},u.entity_id))]},t.kind))]}),e.jsx(E,{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((t,u)=>e.jsx(te,{className:"h-5 w-full"},u))}),e.jsxs("div",{className:"sidebar-links",children:[(re=L.data)==null?void 0:re.map(t=>e.jsxs(E,{to:`/tasks/${t.slug}`,className:"sidebar-link",children:[ie(t.name,t.slug),t.paper_count!=null&&e.jsx("span",{className:"count",children:t.paper_count})]},t.id)),e.jsx(E,{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"}),_.isLoading&&e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:Array.from({length:6}).map((t,u)=>e.jsx(te,{className:"h-5 w-full"},u))}),((ce=(le=_.data)==null?void 0:le.results)==null?void 0:ce.length)===0&&!_.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:(ue=(de=_.data)==null?void 0:de.results)==null?void 0:ue.map(t=>e.jsxs(E,{to:`/tasks/${t.slug}`,className:"sidebar-link",children:[ie(t.name,t.slug),e.jsxs("span",{className:"count",children:[t.share_lift.toFixed(1),"x"]})]},t.id))})]})]}),e.jsx(We,{})]}),e.jsxs("div",{className:"feed-main",children:[(ne()||ye())&&e.jsx("div",{className:"feed-chat",children:e.jsx(gs,{})}),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 ${a?"active":""}`,onClick:()=>j("/following"),children:"following"})]})}),e.jsx(Ue,{startDate:c.startDate,endDate:c.endDate,onChange:t=>y(Ge(w,t))})]}),x&&e.jsx(ae,{variant:"destructive",className:"mb-4",children:e.jsxs(oe,{children:["Failed to load papers. ",e.jsx("button",{type:"button",onClick:()=>void b.refetch(),children:"Try again"})]})}),H.isError&&H.variables&&e.jsx(ae,{variant:"destructive",className:"mb-4",children:e.jsxs(oe,{children:["Could not follow “",H.variables,"”. ",e.jsx("button",{type:"button",onClick:()=>z(H.variables),children:"Try again"})]})}),i.isError&&i.variables&&e.jsx(ae,{variant:"destructive",className:"mb-4",children:e.jsxs(oe,{children:["Could not follow ",i.variables.map(t=>t.name).join(", "),". ",e.jsx("button",{type:"button",onClick:()=>p(i.variables),children:"Try again"})]})}),a&&!!s&&d.isSuccess&&!n.isPending&&!F&&(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:()=>o(!0),children:"Follow a topic"})]})),a&&I&&e.jsx(rs,{open:D,onOpenChange:o}),v&&d.data&&e.jsxs("div",{className:"following-topic-note following-topic-filter",role:"status",children:["Showing only papers about “",A,"”."," ",e.jsx(E,{to:k(!1),children:"Show everything you follow"})]}),q?e.jsx(is,{onBuild:I?()=>o(!0):void 0}):e.jsx(Qe,{query:b,isLoading:b.isLoading||a&&!!(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:()=>o(!0),children:"edit your topic"}),"."]}):a?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(E,{to:"/tasks",children:"tasks"}),", ",e.jsx(E,{to:"/methods",children:"methods"}),", benchmark, author, or organization pages."]}):r==="x"?"No papers shared on X in this window.":"No papers in this window."})]})]})]})]})},Zs=({xTrending:r=!1})=>e.jsx(bs,{mode:r?"x":"trending"});export{gs as AskAssistant,bs as HomeFeed,Zs as default}; diff --git a/assets/FeedView-L-eiYDg9.js b/assets/FeedView-L-eiYDg9.js deleted file mode 100644 index 50e36c59118dc5bb719f686e419db493a804f164..0000000000000000000000000000000000000000 --- a/assets/FeedView-L-eiYDg9.js +++ /dev/null @@ -1 +0,0 @@ -import{j as e,L as D,a as Ce,b as Fe,r as h,h as Le,C as De,c as ve,d as Ae,e as Ee,f as Re,i as qe,g as oe,k as Ne,l as Me}from"./index-D6jcIRWs.js";import{S as Ie}from"./sparkles-r8uPx2-0.js";import{u as R}from"./useQuery-CUJUm4FY.js";import{D as He,a as Ke,b as Oe}from"./dialog-vGFIbcd-.js";import{c as se}from"./catalog-PYrB8_bm.js";import{T as ge,r as Q}from"./research-BggtGgC2.js";import{d as ne,t as fe}from"./colors-CLwl8a2d.js";import{u as ke,a as Se,s as $e,b as ze,r as xe,c as be,d as Be}from"./researchTopic-NFMcqCcs.js";import{P as Ue}from"./plus-C4UQ62Q1.js";import{A as Ge}from"./arrow-right-CFRHnFt4.js";import{P as Qe}from"./components-DO1X940E.js";import{M as Xe}from"./McpShowcase-CS9LZY9p.js";import{r as We,P as Ye,w as Ve}from"./PaperDateFilter-CPIqaHaq.js";import{u as Je,a as Ze,P as es,i as ss,A as ts,b as as,S as z,c as is,D as te,q as os,d as ns}from"./chatSessions-DByIWBno.js";import{c as rs}from"./chat-ChnK8XDU.js";import{u as ls}from"./usePapers-BbCSwcVk.js";import{p as cs,a as ds}from"./papers-DIIIPDpj.js";import{u as us}from"./useInfiniteScroll-Dm7JY_X4.js";import{S as $}from"./skeleton-BqkYFmXl.js";import{A as ae,a as ie}from"./alert-2MbxVzGL.js";import{u as we}from"./useInfiniteQuery-FXco4P1n.js";import"./useMutation-p6mN4h17.js";import"./AuthorAvatar-UMHOVOr9.js";import"./LatexTitle-D_92Jowu.js";import"./safeExternalHref-CkBrsh84.js";import"./AgentLogos-CFt_vIO2.js";import"./popover-DCjqGpW0.js";import"./useIntersectionObserver-3LTuEaFW.js";function ps({onBuild:i}){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."}),i&&e.jsxs("button",{type:"button",className:"research-topic-save following-intro-topic",onClick:i,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(D,{to:"/settings",children:"Settings"}),"."]})]})}const je=16;function hs({open:i,onOpenChange:r}){return e.jsx(He,{open:i,onOpenChange:r,children:e.jsx(Ke,{className:"topic-dialog","aria-describedby":void 0,children:e.jsx(ms,{onDone:()=>r(!1)})})})}function ms({onDone:i}){var B,X,W,Y,V,J,K;const{user:r}=Ce(),g=Fe(),d=R({queryKey:["research-topic",r==null?void 0:r.hf_subject],queryFn:Q.topic,enabled:!!r}),t=R({queryKey:["research-follows",r==null?void 0:r.hf_subject],queryFn:Q.follows,enabled:!!r}),b=R({queryKey:["trending-tasks-follow"],queryFn:()=>se.trendingTasks({limit:je,level:0}),staleTime:10*60*1e3}),j=R({queryKey:["trending-methods-follow"],queryFn:()=>se.trendingMethods({limit:je}),staleTime:10*60*1e3}),c=R({queryKey:["research-follow-suggestions"],queryFn:Q.followSuggestions,staleTime:10*60*1e3}),v=(n=[])=>n.map(p=>({id:String(p.entity_id),name:p.name,image:p.image_url})),[P,A]=h.useState(null),[T,F]=h.useState([]),_=ke(),q=Se(),w=((B=d.data)==null?void 0:B.text)??"",o=P??w,S=o.trim().replace(/\s+/g," "),N=((X=d.data)==null?void 0:X.status)==="failed"&&S===w,m=S.length>=3&&(S!==w||N),C=_.isPending||q.isPending,a=(n,p)=>{var y;return((y=t.data)==null?void 0:y.some(k=>k.kind===n&&String(k.entity_id)===p))??!1},f=(n,p)=>{var y;return((y=T.find(k=>k.kind===n&&k.id===p))==null?void 0:y.follow)??a(n,p)},u=T.filter(n=>n.follow!==a(n.kind,n.id)),E=!C&&(m||u.length>0),M=(n,p,y)=>F(k=>[...k.filter(U=>U.kind!==n||U.id!==p),{kind:n,id:p,name:y,follow:!f(n,p)}]),I=()=>{if(!E)return;if(!r){m&&$e(S),u.length&&ze(u),window.location.href=Le(`${g.pathname}${g.search}`);return}const n=[...u.length?[q.mutateAsync(u)]:[],...m?[_.mutateAsync(S)]:[]];Promise.allSettled(n).then(p=>{p.every(y=>y.status==="fulfilled")&&i()})},H=(n,p,y,k)=>{const Z=[...(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})),...y.filter(x=>!a(p,x.id)).map(x=>({...x,suggested:!0}))];return Z.length>0&&e.jsxs("div",{className:"topic-dialog-group",children:[e.jsx("h3",{children:n}),e.jsxs(gs,{children:[Z.map(x=>{const O=f(p,x.id),G=p==="task"?ne(x.name,x.slug??void 0):x.name;return e.jsxs("button",{type:"button",className:"topic-dialog-chip","aria-pressed":O,disabled:C,"data-suggested":"suggested"in x||void 0,onClick:()=>M(p,x.id,G),children:[O?e.jsx(De,{"aria-hidden":"true"}):e.jsx(Ue,{"aria-hidden":"true"}),(p==="author"||p==="organization")&&e.jsx(fs,{kind:p,name:G,src:x.image}),G]},x.id)}),k&&e.jsxs(D,{to:k.to,className:"topic-dialog-browse",children:[k.label,e.jsx(Ge,{"aria-hidden":"true"})]})]})]})};return e.jsxs("form",{className:"topic-dialog-form",onSubmit:n=>{n.preventDefault(),I()},children:[e.jsx(Oe,{className:"topic-dialog-title",children:w||(W=t.data)!=null&&W.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:ge,"aria-label":"Research topic",placeholder:"e.g. diffusion policies for robot manipulation, or speculative decoding for LLM inference",value:o,onChange:n=>A(n.target.value),onKeyDown:n=>{n.key==="Enter"&&!n.shiftKey&&!n.nativeEvent.isComposing&&(n.preventDefault(),I())}}),e.jsxs("span",{className:"research-topic-count",children:[o.length,"/",ge]})]}),H("Trending tasks","task",((Y=b.data)==null?void 0:Y.results)??[],{to:"/tasks",label:"Browse tasks"}),H("Trending methods","method",((V=j.data)==null?void 0:V.results)??[],{to:"/methods",label:"Browse methods"}),H("Benchmarks","benchmark",[],{to:"/tasks",label:"Browse benchmarks"}),H("Popular authors","author",v((J=c.data)==null?void 0:J.authors)),H("Popular organizations","organization",v((K=c.data)==null?void 0:K.organizations),{to:"/organizations",label:"Browse organizations"}),(_.error||q.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:[w&&e.jsx("button",{type:"button",className:"research-follow-action topic-dialog-remove",disabled:C,onClick:()=>_.mutate(null,{onSuccess:i}),children:"Remove topic"}),e.jsx("button",{type:"button",className:"research-follow-action",disabled:C,onClick:i,children:"Cancel"}),e.jsx("button",{type:"submit",className:"research-topic-save",disabled:!E,children:u.some(n=>n.follow===!1)?"Save":u.length?"Follow":N?"Retry":w?"Update topic":"Follow"})]})]})}function gs({children:i}){const r=h.useRef(null);return h.useLayoutEffect(()=>{const g=r.current;if(!g)return;const d=()=>{const t=[...g.children],b=t.filter(c=>c.dataset.suggested);b.forEach(c=>{c.hidden=!1});const j=()=>new Set(t.filter(c=>!c.hidden).map(c=>c.offsetTop)).size;for(let c=b.length-1;c>=0&&j()>2;c--)b[c].hidden=!0};return d(),window.addEventListener("resize",d),()=>window.removeEventListener("resize",d)}),e.jsx("div",{ref:r,className:"topic-dialog-chips",children:i})}function fs({kind:i,name:r,src:g}){const[d,t]=h.useState(!1);if(g&&!d)return e.jsx("img",{className:`topic-dialog-chip-image is-${i}`,src:g,alt:"",loading:"lazy",onError:()=>t(!0)});if(i!=="author")return null;const b=r.split(/\s+/).filter(Boolean).map(j=>j[0]).slice(0,2).join("").toUpperCase();return e.jsx("span",{className:"topic-dialog-chip-image is-author is-initials","aria-hidden":"true",children:b})}const ye=45,xs=1800,bs=25,ws=350,js=i=>{const[r,g]=h.useState(z[0].slice(0,1)),[d,t]=h.useState(0);return h.useEffect(()=>{var A,T;if(!i)return;if((T=(A=window.matchMedia)==null?void 0:A.call(window,"(prefers-reduced-motion: reduce)"))!=null&&T.matches){g(z[0]),t(0);return}let b=0,j=1,c=!1,v;g(z[0].slice(0,j)),t(0);const P=()=>{const F=z[b];if(!c){if(j+=1,g(F.slice(0,j)),j===F.length){c=!0,v=window.setTimeout(P,xs);return}v=window.setTimeout(P,ye);return}if(j-=1,g(F.slice(0,j)),j===0){c=!1,b=(b+1)%z.length,t(b),v=window.setTimeout(P,ws);return}v=window.setTimeout(P,bs)};return v=window.setTimeout(P,ye),()=>window.clearTimeout(v)},[i]),{placeholder:r,prompt:z[d]}},ys=()=>{var C;const i=ve(),r=Ne(),[g,d]=h.useState({text:"",paperMentions:[]}),t=g.text,[b,j]=h.useState(0),[c,v]=h.useState(!1),[P,A]=h.useState(null),{placeholder:T,prompt:F}=js(!t),_=h.useRef(null),q=R({queryKey:["chatAvailability"],queryFn:()=>rs.getAvailability(),retry:!1,enabled:oe()}),w=oe()&&((C=q.data)==null?void 0:C.paper_mentions_enabled)!==!1,o=Je({draft:g,onChange:d,enabled:w,textareaRef:_}),S=Ze(g,o.open),N=t?S.completion:F;h.useLayoutEffect(()=>{const a=_.current;if(!a)return;const f=()=>{if(a.style.height="auto",t){a.style.height=`${Math.min(is(a),160)}px`;return}const u=a.placeholder,E=z.reduce((M,I)=>(a.placeholder=I,Math.max(M,a.scrollHeight)),0);a.placeholder=u,a.style.height=`${Math.min(E,160)}px`};return f(),window.addEventListener("resize",f),()=>window.removeEventListener("resize",f)},[t,N]);const m=async(a=g)=>{const f=a.text.trim();if(!(!f||c)){if(r){const u=new URLSearchParams({q:f,model:te}),E=`${Me}?${u}`,M=window.open(E,"_blank");if(!M){A(E);return}M.opener=null,A(null),d({text:"",paperMentions:[]});return}v(!0),os(a,te);try{const u=await ns(te);i(`/chat/${u.id}`)}catch{i("/chat")}}};return e.jsxs(e.Fragment,{children:[!r&&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(es,{text:g.text,mentions:g.paperMentions,scrollTop:b,variant:"home",completion:t?N:""}),e.jsx("textarea",{ref:_,rows:1,value:t,placeholder:T,"aria-label":"Ask the assistant",disabled:c,onChange:a=>{o.updateText(a.target.value,a.target.selectionStart),S.trackCaret(a.target)},onSelect:a=>{o.refresh(a.currentTarget.selectionStart),S.trackCaret(a.currentTarget)},onClick:a=>{o.refresh(a.currentTarget.selectionStart),S.trackCaret(a.currentTarget)},onScroll:a=>j(a.currentTarget.scrollTop),onBlur:a=>{var f,u;(u=(f=a.relatedTarget)==null?void 0:f.closest)!=null&&u.call(f,".chat-paper-picker")||window.setTimeout(o.close,0)},onKeyDown:a=>{if(!o.keyDown(a)){if(ss(a)&&N){a.preventDefault();const f=t+N;o.updateText(f,f.length),window.requestAnimationFrame(()=>{var u;return(u=_.current)==null?void 0:u.setSelectionRange(f.length,f.length)});return}a.key==="Enter"&&!a.shiftKey&&(a.preventDefault(),m())}},role:w?"combobox":void 0,"aria-expanded":w?o.open:void 0,"aria-controls":o.open?o.pickerId:void 0,"aria-activedescendant":o.open&&o.results.length?`${o.optionIdPrefix}-${o.activeIndex}`:void 0,"aria-autocomplete":w?"list":void 0,"aria-describedby":o.message?"ask-home-paper-mention-message":void 0})]}),e.jsx("button",{type:"button",className:`chat-send${t.trim()?" chat-send-on":""}`,onClick:()=>void m(),disabled:!t.trim()||c,"aria-label":"Ask the assistant",children:e.jsx(ts,{})})]}),P&&e.jsx("div",{className:"chat-paper-mention-message",role:"alert",children:e.jsx("a",{href:P,target:"_blank",rel:"noreferrer",children:"Open this question on paperswithcode.co"})}),o.message&&e.jsx("div",{id:"ask-home-paper-mention-message",className:"chat-paper-mention-message",role:"alert",children:o.message}),e.jsx(as,{open:o.open,query:o.query,results:o.results,activeIndex:o.activeIndex,loading:o.loading,error:o.error,onSelect:o.select,id:o.pickerId,optionIdPrefix:o.optionIdPrefix})]})]})},Pe={task:"Tasks",method:"Methods",benchmark:"Benchmarks",author:"Authors",organization:"Orgs"},vs=Object.keys(Pe),Vs=({following:i=!1,xTrending:r=!1})=>{var le,ce,de,ue,pe,he,me;const g=ve(),d=Ae(),t=d==null?void 0:d.user,[b,j]=Ee(),c=We(b,void 0,i?"month":"week"),v=s=>{const l=new URLSearchParams(b);l.delete("order_by"),l.delete("only");const L=l.toString();g(L?`${s}?${L}`:s)},P=s=>{const l=new URLSearchParams(b);s?l.set("only","topic"):l.delete("only");const L=l.toString();return L?`/following?${L}`:"/following"},A=R({queryKey:["top-tasks-sidebar"],queryFn:()=>se.topTasks(8),staleTime:10*60*1e3}),T=R({queryKey:["trending-tasks-sidebar"],queryFn:()=>se.trendingTasks({limit:8,level:0}),staleTime:10*60*1e3}),F=ls({enabled:!i&&!r,page_size:30,order_by:"trending",order_dir:"desc",start_date:c.startDate,end_date:c.endDate,include_resources:!0}),_={start_date:c.startDate,end_date:c.endDate},q=we({queryKey:[...cs.feeds.xTrending,_],queryFn:({pageParam:s})=>ds.xTrending({..._,page:s,page_size:30,include_resources:!0}),initialPageParam:1,getNextPageParam:s=>s.next_page??void 0,enabled:r}),w=i&&b.get("only")==="topic",o={...c,topicOnly:w},S=we({queryKey:["research-feed",t==null?void 0:t.hf_subject,o],queryFn:({pageParam:s})=>Q.following(s,o),initialPageParam:0,getNextPageParam:(s,l)=>s.length===40?l.length*40:void 0,enabled:i&&!!t}),N=R({queryKey:["research-follows",t==null?void 0:t.hf_subject],queryFn:Q.follows,enabled:i&&!!t}),m=R({queryKey:["research-topic",t==null?void 0:t.hf_subject],queryFn:Q.topic,enabled:i&&!!t,refetchInterval:s=>s.state.data&&["pending","running"].includes(s.state.data.status)?1e4:!1}),C=!!m.data&&["pending","running"].includes(m.data.status),a=m.data?m.data.label??m.data.text:"",[f,u]=h.useState(!1),E=Re(),M=h.useRef(!1);h.useEffect(()=>{M.current&&!C&&E.invalidateQueries({queryKey:["research-feed",t==null?void 0:t.hf_subject]}),M.current=C},[C,E,t==null?void 0:t.hf_subject]);const I=i&&!!t&&((le=N.data)==null?void 0:le.length)===0&&m.isSuccess&&!m.data,H=i&&!(d!=null&&d.isLoading)&&!t||I,B=!!t||!qe(),[X,W]=h.useState(!1),[Y]=h.useState(()=>!!xe()||be().length>0),[V,J]=h.useState(!1);!X&&(m.data||(ce=N.data)!=null&&ce.length)&&W(!0),H&&!V&&(J(!0),B&&!X&&!Y&&u(!0));const K=ke(),{mutate:n}=K,p=h.useRef(!1);h.useEffect(()=>{var l;const s=xe();!t||!m.isSuccess||!s||p.current||(p.current=!0,s===((l=m.data)==null?void 0:l.text)?Be():n(s))},[t,m.isSuccess,m.data,n]);const y=Se(),{mutate:k}=y,U=h.useRef(!1);h.useEffect(()=>{const s=be();!t||!s.length||U.current||(U.current=!0,k(s))},[t,k]);const Z=h.useMemo(()=>vs.map(s=>{var l;return{kind:s,follows:i?((l=N.data)==null?void 0:l.filter(L=>L.kind===s))??[]:[]}}).filter(s=>s.follows.length>0),[i,N.data]),x=i&&(!!(d!=null&&d.isLoading)||!!t&&!I),O=i?S:r?q:F,G=h.useMemo(()=>{var s,l;return i?((s=S.data)==null?void 0:s.pages.flatMap(L=>L.map(ee=>({...fe(ee.paper),followReasons:ee.reasons}))))??[]:((l=r?q.data:F.data)==null?void 0:l.pages.flatMap(L=>L.results.map(ee=>({...fe(ee),followReasons:void 0}))))??[]},[i,r,S.data,q.data,F.data]),Te=us(O,"400px"),_e=O.isLoading||i&&(d==null?void 0:d.isLoading),re=O.error;return e.jsxs("div",{className:"page",children:[e.jsx("div",{className:"feed-header",children:e.jsxs("div",{children:[e.jsxs("h1",{className:"feed-title",children:["Trending ",e.jsx("em",{children:"Research"})]}),e.jsx("div",{className:"feed-subtitle",children:r?"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:[x?e.jsxs("div",{className:"sidebar-section sidebar-section-follows",children:[e.jsx("div",{className:"sidebar-label",children:"You follow"}),((d==null?void 0:d.isLoading)||N.isLoading)&&e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:Array.from({length:4}).map((s,l)=>e.jsx($,{className:"h-5 w-full"},l))}),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:[m.data&&e.jsxs("div",{className:`sidebar-follow-topic ${w?"active":""}`,children:[e.jsxs(D,{to:P(!w),className:"sidebar-link sidebar-follow-link",title:w?"Show papers from everything you follow":`Show only papers about “${m.data.text}”`,"aria-current":w?"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":f,onClick:()=>u(!0),children:"edit"})]}),Z.map(s=>e.jsxs("div",{className:"sidebar-follow-group",children:[e.jsx("span",{className:"sidebar-follow-kind",children:Pe[s.kind]}),s.follows.map(l=>e.jsx(D,{to:l.url,className:"sidebar-link sidebar-follow-link",children:e.jsx("span",{className:"sidebar-follow-name",children:l.name})},l.entity_id))]},s.kind))]}),e.jsx(D,{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"}),A.isLoading&&e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:Array.from({length:6}).map((s,l)=>e.jsx($,{className:"h-5 w-full"},l))}),e.jsxs("div",{className:"sidebar-links",children:[(de=A.data)==null?void 0:de.map(s=>e.jsxs(D,{to:`/tasks/${s.slug}`,className:"sidebar-link",children:[ne(s.name,s.slug),s.paper_count!=null&&e.jsx("span",{className:"count",children:s.paper_count})]},s.id)),e.jsx(D,{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"}),T.isLoading&&e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:Array.from({length:6}).map((s,l)=>e.jsx($,{className:"h-5 w-full"},l))}),((pe=(ue=T.data)==null?void 0:ue.results)==null?void 0:pe.length)===0&&!T.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:(me=(he=T.data)==null?void 0:he.results)==null?void 0:me.map(s=>e.jsxs(D,{to:`/tasks/${s.slug}`,className:"sidebar-link",children:[ne(s.name,s.slug),e.jsxs("span",{className:"count",children:[s.share_lift.toFixed(1),"x"]})]},s.id))})]})]}),e.jsx(Xe,{})]}),e.jsxs("div",{className:"feed-main",children:[(oe()||Ne())&&e.jsx("div",{className:"feed-chat",children:e.jsx(ys,{})}),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 ${i||r?"":"active"}`,onClick:()=>v("/"),children:"trending"}),e.jsx("button",{className:`sort-btn ${r?"active":""}`,onClick:()=>v("/x-trending"),children:"trending (X)"}),e.jsx("button",{className:`sort-btn ${i?"active":""}`,onClick:()=>v("/following"),children:"following"})]})}),e.jsx(Ye,{startDate:c.startDate,endDate:c.endDate,onChange:s=>j(Ve(b,s))})]}),re&&e.jsx(ae,{variant:"destructive",className:"mb-4",children:e.jsxs(ie,{children:["Failed to load papers. ",e.jsx("button",{type:"button",onClick:()=>void O.refetch(),children:"Try again"})]})}),K.isError&&K.variables&&e.jsx(ae,{variant:"destructive",className:"mb-4",children:e.jsxs(ie,{children:["Could not follow “",K.variables,"”. ",e.jsx("button",{type:"button",onClick:()=>n(K.variables),children:"Try again"})]})}),y.isError&&y.variables&&e.jsx(ae,{variant:"destructive",className:"mb-4",children:e.jsxs(ie,{children:["Could not follow ",y.variables.map(s=>s.name).join(", "),". ",e.jsx("button",{type:"button",onClick:()=>k(y.variables),children:"Try again"})]})}),i&&!!t&&m.isSuccess&&!N.isPending&&!I&&(m.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:()=>u(!0),children:"Follow a topic"})]})),i&&B&&e.jsx(hs,{open:f,onOpenChange:u}),w&&m.data&&e.jsxs("div",{className:"following-topic-note following-topic-filter",role:"status",children:["Showing only papers about “",a,"”."," ",e.jsx(D,{to:P(!1),children:"Show everything you follow"})]}),H?e.jsx(ps,{onBuild:B?()=>u(!0):void 0}):_e?e.jsx("div",{className:"paper-list",children:Array.from({length:6}).map((s,l)=>e.jsxs("div",{className:"paper-card",children:[e.jsx("div",{className:"paper-thumb-wrap",children:e.jsx($,{className:"paper-thumb-skeleton"})}),e.jsxs("div",{className:"paper-body",style:{flex:1,gap:12},children:[e.jsx($,{className:"h-6 w-3/4"}),e.jsx($,{className:"h-4 w-1/2"}),e.jsx($,{className:"h-12 w-full"})]})]},l))}):G.length===0?re?null:e.jsx("div",{className:"no-results",children:w?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:()=>u(!0),children:"edit your topic"}),"."]}):i?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(D,{to:"/tasks",children:"tasks"}),", ",e.jsx(D,{to:"/methods",children:"methods"}),", benchmark, author, or organization pages."]}):r?"No papers shared on X in this window.":"No papers in this window."}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"paper-list",children:G.map((s,l)=>e.jsx(Qe,{paper:s,rank:l+1,followReasons:s.followReasons},s.id))}),e.jsx("div",{ref:Te,style:{height:1}}),O.isFetchingNextPage&&e.jsx("div",{style:{padding:"20px 0",textAlign:"center",color:"var(--ink-faint)"},children:"Loading more…"})]})]})]})]})]})};export{ys as AskAssistant,Vs as default}; diff --git a/assets/FollowingView-BYs2N-nq.js b/assets/FollowingView-BYs2N-nq.js new file mode 100644 index 0000000000000000000000000000000000000000..fae284ce5c69a9723c163a9bdf5470e89480b77e --- /dev/null +++ b/assets/FollowingView-BYs2N-nq.js @@ -0,0 +1 @@ +import{j as o}from"./index-YwiKC6Po.js";import{HomeFeed as r}from"./FeedView-CFzlAcol.js";import"./sparkles-C3L7JDLC.js";import"./useQuery-DPH6Mb2w.js";import"./dialog-foxx0Wu6.js";import"./catalog-B15Yh5dN.js";import"./research-5UpiU-ea.js";import"./transform-CNg3rvXk.js";import"./researchTopic-CAL_T-Y-.js";import"./useMutation-f6iDkf3w.js";import"./plus-Cfz0QbT1.js";import"./arrow-right-CSx7rJG4.js";import"./PaperFeed-kaLm5US2.js";import"./PaperCard-FG-bEpJk.js";import"./AuthorAvatar-CoTET6B3.js";import"./SotaBadges-DiQuEzfo.js";import"./colors-BkWRhvFI.js";import"./Icon-DXQ4sjQk.js";import"./LatexTitle-DI6voLfI.js";import"./paperQueryKeys-C5FMa4Oj.js";import"./curation-CkzNFTMJ.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-D7ygxg37.js";import"./skeleton-CXR1qouH.js";import"./useIntersectionObserver-Dt36kyjs.js";import"./McpShowcase-Fj71TTNl.js";import"./AgentLogos-DhD8p5ds.js";import"./chatSessions-CdNQ1toA.js";import"./chat-DHGOonJg.js";import"./usePapers-C1deOZKl.js";import"./useInfiniteQuery-BEbL80ez.js";import"./alert-Cx5luC5D.js";function D(){return o.jsx(r,{mode:"following"})}export{D as default}; diff --git a/assets/FollowingView-CVyxNxmM.js b/assets/FollowingView-CVyxNxmM.js deleted file mode 100644 index cd6c15fb9d772c403a6bf0c8a754e3f5926aa627..0000000000000000000000000000000000000000 --- a/assets/FollowingView-CVyxNxmM.js +++ /dev/null @@ -1 +0,0 @@ -import{j as o}from"./index-D6jcIRWs.js";import r from"./FeedView-L-eiYDg9.js";import"./sparkles-r8uPx2-0.js";import"./useQuery-CUJUm4FY.js";import"./dialog-vGFIbcd-.js";import"./catalog-PYrB8_bm.js";import"./research-BggtGgC2.js";import"./colors-CLwl8a2d.js";import"./researchTopic-NFMcqCcs.js";import"./useMutation-p6mN4h17.js";import"./plus-C4UQ62Q1.js";import"./arrow-right-CFRHnFt4.js";import"./components-DO1X940E.js";import"./papers-DIIIPDpj.js";import"./AuthorAvatar-UMHOVOr9.js";import"./LatexTitle-D_92Jowu.js";import"./safeExternalHref-CkBrsh84.js";import"./McpShowcase-CS9LZY9p.js";import"./AgentLogos-CFt_vIO2.js";import"./PaperDateFilter-CPIqaHaq.js";import"./popover-DCjqGpW0.js";import"./chatSessions-DByIWBno.js";import"./chat-ChnK8XDU.js";import"./usePapers-BbCSwcVk.js";import"./useInfiniteQuery-FXco4P1n.js";import"./useInfiniteScroll-Dm7JY_X4.js";import"./useIntersectionObserver-3LTuEaFW.js";import"./skeleton-BqkYFmXl.js";import"./alert-2MbxVzGL.js";function B(){return o.jsx(r,{following:!0})}export{B as default}; diff --git a/assets/FrameworksIndexView-BxWPuGhr.js b/assets/FrameworksIndexView-BxWPuGhr.js deleted file mode 100644 index 13b03464b2ed7787a435717a61090eeff1041156..0000000000000000000000000000000000000000 --- a/assets/FrameworksIndexView-BxWPuGhr.js +++ /dev/null @@ -1 +0,0 @@ -import{c as d,j as e,L as o,K as m}from"./index-D6jcIRWs.js";import{u as p}from"./useQuery-CUJUm4FY.js";import{I as h}from"./components-DO1X940E.js";import{c as u}from"./catalog-PYrB8_bm.js";import{c as g,h as f}from"./colors-CLwl8a2d.js";import"./papers-DIIIPDpj.js";import"./AuthorAvatar-UMHOVOr9.js";import"./LatexTitle-D_92Jowu.js";import"./safeExternalHref-CkBrsh84.js";const x={gpu:"GPU",cpu:"CPU",apple:"Apple silicon"},j={display:"flex",alignItems:"baseline",justifyContent:"space-between",flexWrap:"wrap",gap:"6px 24px",paddingBottom:12,borderBottom:"1px solid var(--hairline-strong)"},k={fontFamily:"var(--serif)",fontSize:26,fontWeight:500,letterSpacing:"-0.02em",marginBottom:4},_={fontFamily:"var(--serif)",fontStyle:"italic",fontSize:13,color:"var(--ink-soft)"},v={fontFamily:"var(--mono)",fontSize:13,fontWeight:600,letterSpacing:"0.04em",textTransform:"uppercase",color:"var(--ink)",marginBottom:6},w=({platform:r})=>{const n=g(f(r));return e.jsx("span",{className:"framework-platform-chip",style:{background:n.bg,color:n.text},children:x[r]})},b=({framework:r})=>{const n=d(),l=`/papers?framework=${encodeURIComponent(r.slug)}`;return e.jsxs("article",{id:`framework-${r.slug}`,className:"framework-card framework-card-clickable",role:"link",tabIndex:0,"aria-label":`View papers implemented by ${r.name}`,onClick:a=>{a.target.closest("a, button")||n(l)},onKeyDown:a=>{a.target===a.currentTarget&&(a.key==="Enter"||a.key===" ")&&(a.preventDefault(),n(l))},children:[e.jsxs("div",{className:"framework-card-head",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"framework-card-name",children:r.name}),r.organization_name&&e.jsx("div",{className:"framework-card-org",children:r.organization_name})]}),r.platforms&&r.platforms.length>0&&e.jsx("div",{className:"framework-platform-row",children:r.platforms.map(a=>e.jsx(w,{platform:a},a))})]}),e.jsx("p",{className:"framework-card-desc",children:r.description}),r.when_to_use&&e.jsxs("div",{className:"framework-card-when",children:[e.jsx("span",{className:"framework-card-when-label",children:"When to use"}),r.when_to_use]}),(r.github_url||r.docs_url||r.introducing_paper_arxiv_id)&&e.jsxs("div",{className:"framework-card-links",children:[r.introducing_paper_arxiv_id&&e.jsx(o,{to:`/paper/${r.introducing_paper_arxiv_id}`,className:"framework-link",children:"Introducing paper"}),r.github_url&&r.paper_count>0&&e.jsxs(o,{to:l,className:"framework-link",children:["Implements ",r.paper_count," ",r.paper_count===1?"paper":"papers"]}),r.github_url&&r.paper_count===0&&e.jsx("span",{className:"framework-link framework-link-disabled","aria-disabled":"true",children:"Implements 0 papers"}),r.github_url&&e.jsxs("a",{href:r.github_url,target:"_blank",rel:"noopener noreferrer",className:"framework-link",children:[e.jsx(h,{name:"github",size:13}),"GitHub"]}),r.docs_url&&r.docs_url!==r.github_url&&e.jsx("a",{href:r.docs_url,target:"_blank",rel:"noopener noreferrer",className:"framework-link",children:"Docs"})]})]})},E=()=>{var a;const r=p({queryKey:["framework-catalog"],queryFn:()=>u.frameworkCatalog()}),n=((a=r.data)==null?void 0:a.domains)??[],l=n.reduce((i,s)=>i+s.categories.reduce((t,c)=>t+c.frameworks.length,0),0);return m.useEffect(()=>{var s;const i=window.location.hash.slice(1);i&&((s=document.getElementById(i))==null||s.scrollIntoView())},[r.data]),e.jsxs("div",{className:"page",children:[e.jsx("div",{className:"feed-header",children:e.jsxs("div",{children:[e.jsxs("h1",{className:"feed-title",children:["AI ",e.jsx("em",{children:"Frameworks"})]}),e.jsx("div",{className:"feed-subtitle",children:"Curated libraries and tools to run, serve, and train models — pick the right stack for your hardware and workload."})]})}),r.isLoading&&e.jsx("div",{className:"empty",children:"Loading frameworks…"}),r.isError&&e.jsx("div",{className:"empty",children:"Could not load frameworks."}),n.map(i=>e.jsxs("section",{style:{marginBottom:56},children:[e.jsxs("div",{style:j,children:[e.jsxs("div",{children:[e.jsx("h2",{style:k,children:i.name}),e.jsx("div",{style:_,children:i.description})]}),e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",whiteSpace:"nowrap"},children:[i.categories.length," ",i.categories.length===1?"category":"categories"," ·"," ",i.categories.reduce((s,t)=>s+t.frameworks.length,0)," frameworks"]})]}),i.categories.map(s=>e.jsxs("div",{className:"framework-category",children:[e.jsxs("div",{className:"framework-category-head",children:[e.jsxs("div",{children:[e.jsx("h3",{style:v,children:s.name}),s.description&&e.jsx("p",{className:"framework-category-blurb",children:s.description}),s.guide_url&&e.jsxs("a",{href:s.guide_url,target:"_blank",rel:"noopener noreferrer",className:"framework-guide-link",children:[s.guide_label??"Read guide"," →"]})]}),e.jsxs("div",{className:"framework-category-meta",children:[s.frameworks.length," ",s.frameworks.length===1?"framework":"frameworks"]})]}),e.jsx("div",{className:"framework-grid",children:s.frameworks.map(t=>e.jsx(b,{framework:t},t.slug))})]},s.slug))]},i.slug)),e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",marginTop:8},children:[l," frameworks across ",n.length," ",n.length===1?"domain":"domains",". More areas coming soon."]})]})};export{b as FrameworkCard,E as default}; diff --git a/assets/FrameworksIndexView-CqtIM7jE.js b/assets/FrameworksIndexView-CqtIM7jE.js new file mode 100644 index 0000000000000000000000000000000000000000..15f6f40d43137025b30df0662e742184b1c453cc --- /dev/null +++ b/assets/FrameworksIndexView-CqtIM7jE.js @@ -0,0 +1 @@ +import{c as d,j as e,L as c,K as m}from"./index-YwiKC6Po.js";import{u as h}from"./useQuery-DPH6Mb2w.js";import{I as p}from"./Icon-DXQ4sjQk.js";import{c as u}from"./catalog-B15Yh5dN.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"})]})]})},F=()=>{var a;const s=h({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 m.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,F as default}; diff --git a/assets/Icon-DXQ4sjQk.js b/assets/Icon-DXQ4sjQk.js new file mode 100644 index 0000000000000000000000000000000000000000..28e17a4b4ae5a1748ab0753adda73812b092fbe1 --- /dev/null +++ b/assets/Icon-DXQ4sjQk.js @@ -0,0 +1 @@ +import{j as o}from"./index-YwiKC6Po.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-D_92Jowu.js b/assets/LatexTitle-DI6voLfI.js similarity index 98% rename from assets/LatexTitle-D_92Jowu.js rename to assets/LatexTitle-DI6voLfI.js index c0ec4d7e0a89f65768d63dd535274c85bf95c7e7..f62e876fc6cae52b5a6276d0f89654d83cf3d8e3 100644 --- a/assets/LatexTitle-D_92Jowu.js +++ b/assets/LatexTitle-DI6voLfI.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,r as A,a0 as L}from"./index-D6jcIRWs.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,r as A,a0 as L}from"./index-YwiKC6Po.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-B_D3IE_p.js b/assets/MarkdownText-C-8yLDus.js similarity index 86% rename from assets/MarkdownText-B_D3IE_p.js rename to assets/MarkdownText-C-8yLDus.js index 348ee576626ee4e0737f8664b9bbb9b76d041d38..992d5765bb3e8fe48f680646974d45cf52969a22 100644 --- a/assets/MarkdownText-B_D3IE_p.js +++ b/assets/MarkdownText-C-8yLDus.js @@ -1 +1 @@ -import{o as c,j as s,L as u}from"./index-D6jcIRWs.js";/* empty css */import{r as p,a as m,P as d}from"./PaperPreviewLink-fcJyP9H0.js";import{M as h}from"./index-uFGyKu5N.js";import{r as f}from"./index-yduEvk9Z.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),o=/^[1-9]\d*$/.test(r);return!n&&!o?null:c(r)}const M=({text:e,className:a=""})=>s.jsx("div",{className:a,children:s.jsx(h,{remarkPlugins:[f,m],rehypePlugins:[p],components:{a:({href:t,children:r,node:n,...o})=>{const i=k(t);if(i){const l=I(i);return l?s.jsx(d,{routeId:l,to:i,...o,children:r}):s.jsx(u,{to:i,...o,children:r})}return s.jsx("a",{href:t,target:"_blank",rel:"noopener noreferrer",...o,children:r})}},children:e})});export{M,k as r}; +import{o as c,j as s,L as u}from"./index-YwiKC6Po.js";/* empty css */import{r as p,a as m,P as d}from"./PaperPreviewLink-CKfmgBjs.js";import{M as h}from"./index-CoRCN2p0.js";import{r as f}from"./index-BM_xSDJM.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),o=/^[1-9]\d*$/.test(r);return!n&&!o?null:c(r)}const M=({text:e,className:a=""})=>s.jsx("div",{className:a,children:s.jsx(h,{remarkPlugins:[f,m],rehypePlugins:[p],components:{a:({href:t,children:r,node:n,...o})=>{const i=k(t);if(i){const l=I(i);return l?s.jsx(d,{routeId:l,to:i,...o,children:r}):s.jsx(u,{to:i,...o,children:r})}return s.jsx("a",{href:t,target:"_blank",rel:"noopener noreferrer",...o,children:r})}},children:e})});export{M,k as r}; diff --git a/assets/McpShowcase-CS9LZY9p.js b/assets/McpShowcase-Fj71TTNl.js similarity index 84% rename from assets/McpShowcase-CS9LZY9p.js rename to assets/McpShowcase-Fj71TTNl.js index 1ab8badf9f67fdd536a498660f65c58c1a907b3e..071c5dca16f19457635bda3a39991acaf85bb2a1 100644 --- a/assets/McpShowcase-CS9LZY9p.js +++ b/assets/McpShowcase-Fj71TTNl.js @@ -1 +1 @@ -import{j as e,L as t}from"./index-D6jcIRWs.js";import{A as a}from"./AgentLogos-CFt_vIO2.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-YwiKC6Po.js";import{A as a}from"./AgentLogos-DhD8p5ds.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-Dg_zVuuF.js b/assets/McpView-CMm_vOrt.js similarity index 97% rename from assets/McpView-Dg_zVuuF.js rename to assets/McpView-CMm_vOrt.js index 13577cf4a9226d0d4e9772c3b10a17cc0c925015..032b56d61a354ca66e06256f8120c6b72f4a6249 100644 --- a/assets/McpView-Dg_zVuuF.js +++ b/assets/McpView-CMm_vOrt.js @@ -1,4 +1,4 @@ -import{n as b,K as h,j as e,C as x}from"./index-D6jcIRWs.js";import{u as j}from"./useQuery-CUJUm4FY.js";import{f,D as g}from"./latexPlainText-DI8YEXVe.js";import{q as y}from"./queryOptions-C9woPjwX.js";import{G as v}from"./github-B7D_19Qm.js";import{E as i}from"./external-link-C_yz2sXa.js";import{C as w}from"./copy-BmzqMihw.js";/** +import{n as b,K as h,j as e,C as x}from"./index-YwiKC6Po.js";import{u as j}from"./useQuery-DPH6Mb2w.js";import{f,D as g}from"./latexPlainText-DI8YEXVe.js";import{q as y}from"./queryOptions-C9woPjwX.js";import{G as v}from"./github-BZMCt7Ub.js";import{E as i}from"./external-link-4bBJT0yO.js";import{C as w}from"./copy-YHg6twss.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/MethodDetailView-CU5sbo2E.js b/assets/MethodDetailView-CU5sbo2E.js new file mode 100644 index 0000000000000000000000000000000000000000..a56a055833d9ee690a9b7b3ec35c91955e004f88 --- /dev/null +++ b/assets/MethodDetailView-CU5sbo2E.js @@ -0,0 +1 @@ +import{j as e,r as E,u as $,L as b}from"./index-YwiKC6Po.js";import{R as B}from"./ResearchFollowButton-BFXC8E3t.js";import{p as P,a as V}from"./paperQueryKeys-C5FMa4Oj.js";import{u as k}from"./useQuery-DPH6Mb2w.js";import{M as H}from"./SotaBadges-DiQuEzfo.js";import{u as q,b as Q,a as K}from"./PaperFeed-kaLm5US2.js";import{r as R,M as z}from"./MarkdownText-C-8yLDus.js";import{c as v}from"./catalog-B15Yh5dN.js";import{i as G}from"./apiErrors-DBfE_SVR.js";import{s as O}from"./slug-BpH-Nkvz.js";import{t as U}from"./transform-CNg3rvXk.js";import{u as W}from"./usePapers-C1deOZKl.js";import{S as _}from"./skeleton-CXR1qouH.js";import{A as Z,a as X}from"./alert-Cx5luC5D.js";import{s as Y}from"./safeExternalHref-CkBrsh84.js";import J from"./NotFound-D8hwuoEl.js";import"./useMutation-f6iDkf3w.js";import"./research-5UpiU-ea.js";import"./plus-Cfz0QbT1.js";import"./curation-CkzNFTMJ.js";import"./colors-BkWRhvFI.js";import"./PaperCard-FG-bEpJk.js";import"./AuthorAvatar-CoTET6B3.js";import"./Icon-DXQ4sjQk.js";import"./LatexTitle-DI6voLfI.js";import"./popover-D7ygxg37.js";import"./useIntersectionObserver-Dt36kyjs.js";/* empty css */import"./PaperPreviewLink-CKfmgBjs.js";import"./index-CoRCN2p0.js";import"./index-BM_xSDJM.js";import"./katex-DkKDou_j.js";import"./hover-card-BY9tUGxy.js";import"./useInfiniteQuery-BEbL80ez.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})]}),ee=()=>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"]})]}),te=()=>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₂) / τ"})]}),se=[["my-skill/",""],["├── SKILL.md","# Required: metadata + instructions"],["├── scripts/","# Optional: executable code"],["├── references/","# Optional: documentation"],["├── assets/","# Optional: templates, resources"],["└── ...","# Any additional files or directories"]],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:"Skill package layout"}),e.jsx("rect",{x:"28",y:"48",width:"304",height:"318",rx:"8",fill:"#FFFDF8",stroke:t.faint,strokeWidth:"1"}),se.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)})]}),re={attention:ee,"contrastive-learning":te,"agent-skills":ae},le=({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})]}),ie=({method:s})=>{const r=(s.slug||"").toLowerCase(),l=re[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(le,{method:s})})},N=720,w=138,x={top:8,right:10,bottom:25,left:36},A=56,ne=new Intl.DateTimeFormat("en",{month:"short",year:"2-digit",timeZone:"UTC"}),oe=new Intl.DateTimeFormat("en",{year:"numeric",timeZone:"UTC"}),M=s=>ne.format(new Date(`${s}T00:00:00Z`)),ce=(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(A/r)),o=Math.max(l,d),p=s-1,h=new Set([0,p]);for(let c=o;c=A&&h.add(c);return h},L=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}`},de=({history:s,methodName:r})=>{const[l,d]=E.useState(null),o=Math.max(1,...s.map(i=>i.paper_count)),p=N-x.left-x.right,h=w-x.top-x.bottom,c=s.length?p/s.length:p,a=Math.max(2,c*.68),g=ce(s.length,c),j=Array.from(new Set([0,Math.ceil(o/2),o])),f=l==null?null:s[l],y=f?L(f):null;return e.jsxs("div",{className:"method-usage-chart-wrap",children:[e.jsxs("svg",{className:"method-usage-chart",viewBox:`0 0 ${N} ${w}`,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:N-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,I=x.left+c*m+(c-a)/2,C=x.top+h-S,D=l===m,T=m===s.length-1,F=L(i);return e.jsxs("g",{className:`method-usage-bar${D?" is-active":""}${T?" is-current":""}`,tabIndex:0,role:"img","aria-label":`${M(i.start_date)}: ${i.paper_count} ${i.paper_count===1?"paper":"papers"}${F?`. ${F}`:""}`,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:I,y:C,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:w-11,textAnchor:"middle",children:s.length>48?oe.format(new Date(`${i.start_date}T00:00:00Z`)):M(i.start_date)},i.start_date):null)]}),f&&e.jsxs("div",{className:"method-usage-tooltip",role:"status",children:[e.jsx("strong",{children:M(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})]})]})},Re=()=>{var y,i,m;const{methodSlug:s}=$(),r=q(),l=k({queryKey:["method",s],queryFn:()=>v.getMethod(s),enabled:!!s,staleTime:10*60*1e3}),d=k({queryKey:["areas-all"],queryFn:()=>v.listAreas({page_size:50,ordering:"name"}),enabled:!!((y=l.data)!=null&&y.area_id),staleTime:10*60*1e3}),o=k({queryKey:["method-trend",s],queryFn:()=>v.methodTrend(s),enabled:!!s,staleTime:10*60*1e3}),p=W([...P.feeds.method,s,r.filters],u=>V.forMethod(s,{...r.filters,page:u,page_size:20,repository_limit:1}),{enabled:!!s}),h=k({queryKey:["related-methods",s],queryFn:()=>v.relatedMethods(s),enabled:!!s,staleTime:10*60*1e3}),c=E.useMemo(()=>{var u;return((u=p.data)==null?void 0:u.pages.flatMap(S=>S.results.map(U)))??[]},[p.data]);if(l.isLoading)return e.jsxs("div",{className:"page",children:[e.jsx(_,{className:"h-12 w-1/2 mb-4"}),e.jsx(_,{className:"h-64 w-full"})]});if(G(l.error))return e.jsx(J,{});if(l.error||!l.data)return e.jsx("div",{className:"page",children:e.jsx(Z,{variant:"destructive",children:e.jsx(X,{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=R(a.source_url),f=j?null:Y(a.source_url);return e.jsxs("div",{className:"page",children:[e.jsxs("div",{className:"breadcrumb",children:[e.jsx(b,{to:"/methods",children:"Methods"}),g&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"sep",children:"/"}),e.jsx(b,{to:`/methods#area-${O(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(B,{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(z,{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(b,{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(_,{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(de,{history:o.data.history,methodName:a.name})]}):null]}),e.jsxs("figure",{className:"method-figure-card",children:[e.jsx(ie,{method:a}),a.image_credit&&e.jsx("figcaption",{children:e.jsx(z,{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(H,{method:{slug:u.slug,name:u.name}},u.id))]}),e.jsx(Q,{feed:r,children:e.jsxs("div",{className:"results-count",children:[c.length," papers mentioning ",a.name]})}),e.jsx(K,{query:p,cards:c,empty:"No papers tagged with this method yet."})]})};export{Re as default}; diff --git a/assets/MethodDetailView-PtjfC1LZ.js b/assets/MethodDetailView-PtjfC1LZ.js deleted file mode 100644 index 4c3509734b89a164c484ac8256da83bc305968f5..0000000000000000000000000000000000000000 --- a/assets/MethodDetailView-PtjfC1LZ.js +++ /dev/null @@ -1 +0,0 @@ -import{j as e,r as I,u as q,e as K,L as D,ai as Q}from"./index-D6jcIRWs.js";import{R as O}from"./ResearchFollowButton-C2Bfd9dP.js";import{p as U,a as G}from"./papers-DIIIPDpj.js";import{u as w}from"./useQuery-CUJUm4FY.js";import{u as W}from"./useInfiniteQuery-FXco4P1n.js";import{M as Z,P as X}from"./components-DO1X940E.js";import{P as Y}from"./PaperFeedFilters-DNebHp4l.js";import{a as J,P as ee,b as te}from"./PaperDateFilter-CPIqaHaq.js";import{r as se,M as $}from"./MarkdownText-B_D3IE_p.js";import{c as M}from"./catalog-PYrB8_bm.js";import{s as ae}from"./slug-BpH-Nkvz.js";import{t as re}from"./colors-CLwl8a2d.js";import{u as ie}from"./useInfiniteScroll-Dm7JY_X4.js";import{S as F}from"./skeleton-BqkYFmXl.js";import{A as ne,a as le}from"./alert-2MbxVzGL.js";import{s as oe}from"./safeExternalHref-CkBrsh84.js";import"./useMutation-p6mN4h17.js";import"./research-BggtGgC2.js";import"./plus-C4UQ62Q1.js";import"./AuthorAvatar-UMHOVOr9.js";import"./LatexTitle-D_92Jowu.js";import"./popover-DCjqGpW0.js";/* empty css */import"./PaperPreviewLink-fcJyP9H0.js";import"./index-uFGyKu5N.js";import"./index-yduEvk9Z.js";import"./katex-DkKDou_j.js";import"./hover-card-DPpv0l_x.js";import"./useIntersectionObserver-3LTuEaFW.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"},o=({x:s,y:r,w:d,h:m,fill:g,stroke:u,label:x,fontSize:n=10})=>e.jsxs("g",{children:[e.jsx("rect",{x:s,y:r,width:d,height:m,rx:"3",ry:"3",fill:g,stroke:u,strokeWidth:"1"}),e.jsx("text",{x:s+d/2,y:r+m/2,fontSize:n,fontFamily:"var(--sans)",fill:t.ink,textAnchor:"middle",dominantBaseline:"middle",children:x})]}),ce=()=>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(o,{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(o,{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(o,{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(o,{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(o,{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(o,{x:100,y:270,w:40,h:24,fill:t.pink,stroke:t.pinkS,label:"Q",fontSize:13}),e.jsx(o,{x:160,y:270,w:40,h:24,fill:t.pink,stroke:t.pinkS,label:"K",fontSize:13}),e.jsx(o,{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"]})]}),de=()=>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(o,{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(o,{x:35,y:88,w:110,h:26,fill:t.yellow,stroke:t.yellowS,label:"Augment t₁",fontSize:11}),e.jsx(o,{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(o,{x:35,y:138,w:110,h:26,fill:t.orange,stroke:t.orangeS,label:"Encoder f",fontSize:11}),e.jsx(o,{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(o,{x:35,y:188,w:110,h:26,fill:t.purple,stroke:t.purpleS,label:"Projection g",fontSize:11}),e.jsx(o,{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(o,{x:35,y:238,w:110,h:26,fill:t.pink,stroke:t.pinkS,label:"z₁",fontSize:13}),e.jsx(o,{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₂) / τ"})]}),me=[["my-skill/",""],["├── SKILL.md","# Required: metadata + instructions"],["├── scripts/","# Optional: executable code"],["├── references/","# Optional: documentation"],["├── assets/","# Optional: templates, resources"],["└── ...","# Any additional files or directories"]],he=()=>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"}),me.map(([s,r],d)=>{const m=92+d*44;return e.jsxs("g",{children:[e.jsx("text",{x:"44",y:m,fontSize:"11",fontFamily:"var(--mono)",fill:t.ink,dominantBaseline:"middle",children:s}),r?e.jsx("text",{x:"138",y:m,fontSize:"8.5",fontFamily:"var(--mono)",fill:t.faint,dominantBaseline:"middle",children:r}):null]},s)})]}),xe={attention:ce,"contrastive-learning":de,"agent-skills":he},pe=({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(o,{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(o,{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(o,{x:80,y:250,w:200,h:50,fill:t.purple,stroke:t.purpleS,label:"Output",fontSize:12})]}),ue=({method:s})=>{const r=(s.slug||"").toLowerCase(),d=xe[r];if(d)return e.jsx("div",{className:"method-figure-svg method-figure-svg--schematic",children:e.jsx(d,{})});if(s.image_url){const m=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${m}`,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(pe,{method:s})})},P=720,C=138,p={top:8,right:10,bottom:25,left:36},H=56,fe=new Intl.DateTimeFormat("en",{month:"short",year:"2-digit",timeZone:"UTC"}),ge=new Intl.DateTimeFormat("en",{year:"numeric",timeZone:"UTC"}),L=s=>fe.format(new Date(`${s}T00:00:00Z`)),je=(s,r)=>{if(s===0)return new Set;const d=s>48?12:s>36?6:s>18?3:2,m=Math.max(1,Math.ceil(H/r)),g=Math.max(d,m),u=s-1,x=new Set([0,u]);for(let n=g;n=H&&x.add(n);return x},R=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}`},ye=({history:s,methodName:r})=>{const[d,m]=I.useState(null),g=Math.max(1,...s.map(l=>l.paper_count)),u=P-p.left-p.right,x=C-p.top-p.bottom,n=s.length?u/s.length:u,b=Math.max(2,n*.68),A=je(s.length,n),y=Array.from(new Set([0,Math.ceil(g/2),g])),j=d==null?null:s[d],f=j?R(j):null;return e.jsxs("div",{className:"method-usage-chart-wrap",children:[e.jsxs("svg",{className:"method-usage-chart",viewBox:`0 0 ${P} ${C}`,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"]}),y.map(l=>{const c=p.top+x-l/g*x;return e.jsxs("g",{children:[e.jsx("line",{className:"method-usage-gridline",x1:p.left,x2:P-p.right,y1:c,y2:c}),e.jsx("text",{className:"method-usage-y-label",x:p.left-8,y:c+3,textAnchor:"end",children:l})]},l)}),s.map((l,c)=>{const N=l.paper_count/g*x,S=l.paper_count>0?Math.max(1,N):0,z=p.left+n*c+(n-b)/2,a=p.top+x-S,v=d===c,k=c===s.length-1,_=R(l);return e.jsxs("g",{className:`method-usage-bar${v?" is-active":""}${k?" is-current":""}`,tabIndex:0,role:"img","aria-label":`${L(l.start_date)}: ${l.paper_count} ${l.paper_count===1?"paper":"papers"}${_?`. ${_}`:""}`,onMouseEnter:()=>m(c),onMouseLeave:()=>m(null),onFocus:()=>m(c),onBlur:()=>m(null),children:[e.jsx("rect",{className:"method-usage-bar-hit",x:p.left+n*c,y:p.top,width:n,height:x}),e.jsx("rect",{className:"method-usage-bar-mark",x:z,y:a,width:b,height:S,rx:"1.5"})]},l.start_date)}),s.map((l,c)=>A.has(c)?e.jsx("text",{className:"method-usage-x-label",x:p.left+n*(c+.5),y:C-11,textAnchor:"middle",children:s.length>48?ge.format(new Date(`${l.start_date}T00:00:00Z`)):L(l.start_date)},l.start_date):null)]}),j&&e.jsxs("div",{className:"method-usage-tooltip",role:"status",children:[e.jsx("strong",{children:L(j.start_date)}),e.jsxs("span",{children:[j.paper_count," ",j.paper_count===1?"paper":"papers",d===s.length-1?" · month to date":""]}),e.jsxs("span",{children:[(j.catalog_share??0).toFixed(2),"% of"," ",(j.catalog_paper_count??0).toLocaleString()," catalog papers"]}),f&&e.jsx("span",{children:f})]})]})},Se=[["trending","trending"],["new","newest"],["cited","most cited"]],Ze=()=>{var T,E,B;const{methodSlug:s}=q(),[r,d]=K(),[m,g]=I.useState("trending"),u=r.get("has_code")==="true",x=r.get("has_hf_artifacts")==="true",n=J(r),b=i=>{const h=new URLSearchParams(r);i?h.set("has_code","true"):h.delete("has_code"),d(h)},A=i=>{const h=new URLSearchParams(r);i?h.set("has_hf_artifacts","true"):h.delete("has_hf_artifacts"),d(h)},y=w({queryKey:["method",s],queryFn:()=>M.getMethod(s),enabled:!!s,staleTime:10*60*1e3}),j=w({queryKey:["areas-all"],queryFn:()=>M.listAreas({page_size:50,ordering:"name"}),enabled:!!((T=y.data)!=null&&T.area_id),staleTime:10*60*1e3}),f=w({queryKey:["method-trend",s],queryFn:()=>M.methodTrend(s),enabled:!!s,staleTime:10*60*1e3}),l=m==="trending"?"trending":m==="cited"?"citation_count":"date_published",c=W({queryKey:[...U.feeds.method,s,l,u,x,n.startDate,n.endDate],queryFn:({pageParam:i=1})=>G.forMethod(s,{page:i,page_size:20,order_by:l,order_dir:"desc",include_resources:!0,repository_limit:1,has_code:u,has_hf_artifacts:x,start_date:n.startDate,end_date:n.endDate}),getNextPageParam:i=>i.next_page,initialPageParam:1,enabled:!!s,staleTime:5*60*1e3,placeholderData:Q}),N=w({queryKey:["related-methods",s],queryFn:()=>M.relatedMethods(s),enabled:!!s,staleTime:10*60*1e3}),S=I.useMemo(()=>{var h;return(((h=c.data)==null?void 0:h.pages.flatMap(V=>V.results))||[]).map(re)},[c.data]),z=ie(c);if(y.isLoading)return e.jsxs("div",{className:"page",children:[e.jsx(F,{className:"h-12 w-1/2 mb-4"}),e.jsx(F,{className:"h-64 w-full"})]});if(y.error||!y.data)return e.jsx("div",{className:"page",children:e.jsx(ne,{variant:"destructive",children:e.jsx(le,{children:"Method not found."})})});const a=y.data,v=(E=j.data)==null?void 0:E.results.find(i=>i.id===a.area_id),k=se(a.source_url),_=k?null:oe(a.source_url);return e.jsxs("div",{className:"page",children:[e.jsxs("div",{className:"breadcrumb",children:[e.jsx(D,{to:"/methods",children:"Methods"}),v&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"sep",children:"/"}),e.jsx(D,{to:`/methods#area-${ae(v.name)}`,children:v.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(O,{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($,{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"}),k?e.jsxs(D,{className:"method-source-link",to:k,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("a",{className:"method-source-link",href:_,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()})]}),f.data&&e.jsxs("div",{className:"stat",children:[e.jsx("span",{className:"label",children:"Recent mentions"}),e.jsxs("span",{className:"value",children:[(f.data.recent_paper_count*30/f.data.recent_days).toFixed(1),e.jsx("small",{children:"/mo"})]}),!f.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})]})]}),f.isLoading?e.jsx(F,{className:"h-36 w-full method-trend-skeleton"}):f.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:f.data.recent_paper_count}),e.jsxs("span",{children:["papers / ",f.data.recent_days,"d"]})]})]}),e.jsx(ye,{history:f.data.history,methodName:a.name})]}):null]}),e.jsxs("figure",{className:"method-figure-card",children:[e.jsx(ue,{method:a}),a.image_credit&&e.jsx("figcaption",{children:e.jsx($,{className:"method-image-credit",text:a.image_credit})})]})]}),(((B=N.data)==null?void 0:B.results.length)??0)>0&&e.jsxs("div",{className:"filter-row",children:[e.jsx("span",{className:"label",children:"Related methods"}),N.data.results.map(i=>e.jsx(Z,{method:{slug:i.slug,name:i.name}},i.id))]}),e.jsxs("div",{className:"sort-bar",children:[e.jsxs("div",{className:"paper-feed-toolbar-controls",children:[e.jsx("div",{className:"sort-options",children:Se.map(([i,h])=>e.jsx("button",{className:`sort-btn ${m===i?"active":""}`,onClick:()=>g(i),children:h},i))}),e.jsx(Y,{hasCode:u,hasHfArtifacts:x,onHasCodeChange:b,onHasHfArtifactsChange:A})]}),e.jsx(ee,{startDate:n.startDate,endDate:n.endDate,onChange:i=>d(te(r,i))}),e.jsxs("div",{className:"results-count",children:[S.length," papers mentioning ",a.name]})]}),c.isLoading?e.jsx("div",{className:"paper-list",children:Array.from({length:4}).map((i,h)=>e.jsx(F,{className:"h-40 w-full"},h))}):S.length===0?e.jsx("div",{className:"no-results",children:"No papers tagged with this method yet."}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"paper-list",children:S.map((i,h)=>e.jsx(X,{paper:i,rank:h+1},i.id))}),e.jsx("div",{ref:z,style:{height:1}}),c.isFetchingNextPage&&e.jsx("div",{style:{padding:"20px 0",textAlign:"center",color:"var(--ink-faint)"},children:"Loading more…"})]})]})};export{Ze as default}; diff --git a/assets/MethodsIndexView-2d98MRig.js b/assets/MethodsIndexView-2d98MRig.js deleted file mode 100644 index 8e7bafd1cdd923b59eeae20788940ac9dcdc6a5a..0000000000000000000000000000000000000000 --- a/assets/MethodsIndexView-2d98MRig.js +++ /dev/null @@ -1,6 +0,0 @@ -import{n as _,r as d,j as e,L as v}from"./index-D6jcIRWs.js";import{u as c}from"./useQuery-CUJUm4FY.js";import{c as m}from"./catalog-PYrB8_bm.js";import{s as N}from"./slug-BpH-Nkvz.js";import{S as x}from"./skeleton-BqkYFmXl.js";import{A as w,a as F}from"./alert-2MbxVzGL.js";import{T as L}from"./TaxonomySuggestionTile-BLk1tYYE.js";import{T}from"./TaxonomyTrending-Dqu0dPfc.js";import"./SignInToEditDialog-RzK54RAM.js";import"./button-Bzx0ccHH.js";import"./input-CCN-4hy4.js";import"./textarea-sXKODM3W.js";import"./searchable-select-B7z6Fcrr.js";import"./popover-DCjqGpW0.js";import"./dialog-vGFIbcd-.js";import"./search-CfTufeR7.js";import"./loader-circle-BuDrH29B.js";import"./useMutation-p6mN4h17.js";import"./submissions-DNa3tQdo.js";import"./plus-C4UQ62Q1.js";import"./trending-up-DqN3HzZ5.js";/** - * @license lucide-react v0.462.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const M=_("Flame",[["path",{d:"M8.5 14.5A2.5 2.5 0 0 0 11 12c0-1.38-.5-2-1-3-1.072-2.143-.224-4.054 2-6 .5 2.5 2 4.9 4 6.5 2 1.6 3 3.5 3 5.5a7 7 0 1 1-14 0c0-1.153.433-2.294 1-3a2.5 2.5 0 0 0 2.5 2.5z",key:"96xj49"}]]),J=()=>{var p,h,u,g;const n=c({queryKey:["areas-all"],queryFn:()=>m.listAreas({page_size:50,ordering:"name"}),staleTime:6e5}),i=c({queryKey:["methods-all"],queryFn:async()=>(await m.methodIndex()).results,staleTime:10*60*1e3}),o=c({queryKey:["trending-methods-directory"],queryFn:()=>m.trendingMethods({limit:12}),staleTime:10*60*1e3}),f=d.useMemo(()=>{var r,t;const s=new Map((((r=n.data)==null?void 0:r.results)??[]).map(a=>[a.id,a.name]));return(t=o.data)==null?void 0:t.results.map(a=>({id:a.id,name:a.name,href:`/methods/${a.slug||a.id}`,areaName:a.area_id?s.get(a.area_id):void 0,recentPaperCount:a.recent_paper_count,shareLift:a.share_lift}))},[o.data,n.data]),l=d.useMemo(()=>{if(!i.data||!n.data)return null;const s={};return i.data.forEach(r=>{const t=r.area_id??"_unassigned";(s[t]||(s[t]=[])).push(r)}),Object.values(s).forEach(r=>r.sort((t,a)=>(a.trend_score||0)-(t.trend_score||0)||(a.paper_count||0)-(t.paper_count||0)||t.name.localeCompare(a.name))),s},[i.data,n.data]),y=d.useMemo(()=>{const s=(i.data||[]).filter(t=>(t.trend_score||0)>0).sort((t,a)=>(a.trend_score||0)-(t.trend_score||0)),r=Math.ceil(s.length*.25);return new Set(s.slice(0,r).map(t=>t.id))},[i.data]);return d.useEffect(()=>{var s;!n.data||!i.data||o.isLoading||!window.location.hash||(s=document.getElementById(window.location.hash.slice(1)))==null||s.scrollIntoView({block:"start"})},[n.data,i.data,o.isLoading]),n.error||i.error?e.jsx("div",{className:"page",children:e.jsx(w,{variant:"destructive",children:e.jsx(F,{children:"Failed to load methods."})})}):e.jsxs("div",{className:"page",children:[e.jsx("div",{className:"feed-header",children:e.jsxs("div",{children:[e.jsxs("h1",{className:"feed-title",children:["Methods ",e.jsx("em",{children:"library"})]}),e.jsx("div",{className:"feed-subtitle",children:"Common techniques used across AI research. Trend scores show papers using each method per 30 days, measured over the latest 90 days; the flame marks the top quartile."})]})}),e.jsx(T,{noun:"method",items:f,recentDays:(p=o.data)==null?void 0:p.recent_days,baselineDays:(h=o.data)==null?void 0:h.baseline_days,isLoading:o.isLoading,error:o.error,mono:!0}),n.isLoading||i.isLoading?e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:32},children:Array.from({length:4}).map((s,r)=>e.jsxs("div",{children:[e.jsx(x,{className:"h-8 w-1/3 mb-4"}),e.jsx("div",{className:"tag-grid",children:Array.from({length:8}).map((t,a)=>e.jsx(x,{className:"h-20"},a))})]},r))}):(g=(u=n.data)==null?void 0:u.results)==null?void 0:g.map(s=>{const r=(l==null?void 0:l[s.id])||[];if(r.length===0)return null;const t=r.reduce((a,j)=>a+(j.paper_count||0),0);return e.jsxs("section",{id:`area-${N(s.name)}`,style:{marginBottom:48,scrollMarginTop:80},children:[e.jsxs("div",{style:{display:"flex",alignItems:"baseline",justifyContent:"space-between",flexWrap:"wrap",gap:"6px 24px",paddingBottom:12,borderBottom:"1px solid var(--hairline-strong)"},children:[e.jsx("div",{children:e.jsx("h2",{style:{fontFamily:"var(--serif)",fontSize:26,fontWeight:500,letterSpacing:"-0.02em",marginBottom:4},children:s.name})}),e.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",whiteSpace:"nowrap"},children:[r.length," methods · ",t.toLocaleString()," papers"]})]}),e.jsxs("div",{className:"tag-grid",children:[r.map(a=>e.jsxs(v,{to:`/methods/${a.slug||a.id}`,className:"tag-cell",children:[e.jsxs("div",{className:"name",style:{fontFamily:"var(--mono)",fontSize:15},children:[a.name,y.has(a.id)&&e.jsx(M,{className:"method-trending-icon",size:15,"aria-label":"Top quartile by recent method mentions"})]}),e.jsxs("div",{className:"meta",children:[e.jsxs("span",{children:[(a.paper_count??0).toLocaleString()," papers"]}),(a.trend_score??0)>0&&e.jsxs(e.Fragment,{children:[e.jsx("span",{children:"·"}),e.jsxs("span",{className:"method-trend-score",children:[(a.trend_score??0).toFixed(1),"/mo"]})]}),a.introduced_year!=null&&e.jsxs(e.Fragment,{children:[e.jsx("span",{children:"·"}),e.jsx("span",{children:a.introduced_year})]})]})]},a.id)),e.jsx(L,{kind:"method"})]})]},s.id)})]})};export{J as default}; diff --git a/assets/MethodsIndexView-CS3VxsBJ.js b/assets/MethodsIndexView-CS3VxsBJ.js new file mode 100644 index 0000000000000000000000000000000000000000..6420a617a2ff4d2051ae88c5c0705fc2550c5066 --- /dev/null +++ b/assets/MethodsIndexView-CS3VxsBJ.js @@ -0,0 +1,6 @@ +import{n as y,r as c,j as s,L as f}from"./index-YwiKC6Po.js";import{u as l}from"./useQuery-DPH6Mb2w.js";import{c as m}from"./catalog-B15Yh5dN.js";import{s as _}from"./areas-Dvi8w2dp.js";import{s as v}from"./slug-BpH-Nkvz.js";import{A as N,a as L}from"./alert-Cx5luC5D.js";import{A as T,a as A}from"./AreaSection-CfCNkiTd.js";import{T as F}from"./TaxonomySuggestionTile-4WqZSJGN.js";import{u as M,T as q}from"./useHashScrollOnReady-BKkkyVVX.js";import"./skeleton-CXR1qouH.js";import"./SignInToEditDialog-DpqyyHCb.js";import"./button-B90pJJiy.js";import"./input-DEeEc0bH.js";import"./textarea-BPIMGf5w.js";import"./searchable-select-Bqfyxu17.js";import"./popover-D7ygxg37.js";import"./dialog-foxx0Wu6.js";import"./search-wcEXdf1i.js";import"./loader-circle-B0KtDERb.js";import"./useMutation-f6iDkf3w.js";import"./submissions-BJgYjF7O.js";import"./plus-Cfz0QbT1.js";import"./trending-up-Sm0tkX5g.js";/** + * @license lucide-react v0.462.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const S=y("Flame",[["path",{d:"M8.5 14.5A2.5 2.5 0 0 0 11 12c0-1.38-.5-2-1-3-1.072-2.143-.224-4.054 2-6 .5 2.5 2 4.9 4 6.5 2 1.6 3 3.5 3 5.5a7 7 0 1 1-14 0c0-1.153.433-2.294 1-3a2.5 2.5 0 0 0 2.5 2.5z",key:"96xj49"}]]),Z=()=>{var p,u,h;const n=l({queryKey:["areas-all"],queryFn:()=>m.listAreas({page_size:50,ordering:"name"}),staleTime:6e5}),i=l({queryKey:["methods-all"],queryFn:async()=>(await m.methodIndex()).results,staleTime:10*60*1e3}),o=l({queryKey:["trending-methods-directory"],queryFn:()=>m.trendingMethods({limit:12}),staleTime:10*60*1e3}),x=c.useMemo(()=>{var t,a;const r=new Map((((t=n.data)==null?void 0:t.results)??[]).map(e=>[e.id,e.name]));return(a=o.data)==null?void 0:a.results.map(e=>({id:e.id,name:e.name,href:`/methods/${e.slug||e.id}`,areaName:e.area_id?r.get(e.area_id):void 0,recentPaperCount:e.recent_paper_count,shareLift:e.share_lift}))},[o.data,n.data]),d=c.useMemo(()=>{if(!i.data||!n.data)return null;const r={};return i.data.forEach(t=>{const a=t.area_id??"_unassigned";(r[a]||(r[a]=[])).push(t)}),Object.values(r).forEach(t=>t.sort((a,e)=>(e.trend_score||0)-(a.trend_score||0)||(e.paper_count||0)-(a.paper_count||0)||a.name.localeCompare(e.name))),r},[i.data,n.data]),g=c.useMemo(()=>{const r=(i.data||[]).filter(a=>(a.trend_score||0)>0).sort((a,e)=>(e.trend_score||0)-(a.trend_score||0)),t=Math.ceil(r.length*.25);return new Set(r.slice(0,t).map(a=>a.id))},[i.data]);return M(!!n.data&&!!i.data&&!o.isLoading),n.error||i.error?s.jsx("div",{className:"page",children:s.jsx(N,{variant:"destructive",children:s.jsx(L,{children:"Failed to load methods."})})}):s.jsxs("div",{className:"page",children:[s.jsx("div",{className:"feed-header",children:s.jsxs("div",{children:[s.jsxs("h1",{className:"feed-title",children:["Methods ",s.jsx("em",{children:"library"})]}),s.jsx("div",{className:"feed-subtitle",children:"Common techniques used across AI research. Trend scores show papers using each method per 30 days, measured over the latest 90 days; the flame marks the top quartile."})]})}),s.jsx(q,{noun:"method",items:x,recentDays:(p=o.data)==null?void 0:p.recent_days,baselineDays:(u=o.data)==null?void 0:u.baseline_days,isLoading:o.isLoading,error:o.error,mono:!0}),n.isLoading||i.isLoading?s.jsx(T,{tiles:8,tileClassName:"h-20"}):_(((h=n.data)==null?void 0:h.results)??[]).map(r=>{const t=(d==null?void 0:d[r.id])||[];if(t.length===0)return null;const a=t.reduce((e,j)=>e+(j.paper_count||0),0);return s.jsxs(A,{id:`area-${v(r.name)}`,title:r.name,meta:`${t.length} methods · ${a.toLocaleString()} papers`,children:[t.map(e=>s.jsxs(f,{to:`/methods/${e.slug||e.id}`,className:"tag-cell",children:[s.jsxs("div",{className:"name",style:{fontFamily:"var(--mono)",fontSize:15},children:[e.name,g.has(e.id)&&s.jsx(S,{className:"method-trending-icon",size:15,"aria-label":"Top quartile by recent method mentions"})]}),s.jsxs("div",{className:"meta",children:[s.jsxs("span",{children:[(e.paper_count??0).toLocaleString()," papers"]}),(e.trend_score??0)>0&&s.jsxs(s.Fragment,{children:[s.jsx("span",{children:"·"}),s.jsxs("span",{className:"method-trend-score",children:[(e.trend_score??0).toFixed(1),"/mo"]})]}),e.introduced_year!=null&&s.jsxs(s.Fragment,{children:[s.jsx("span",{children:"·"}),s.jsx("span",{children:e.introduced_year})]})]})]},e.id)),s.jsx(F,{kind:"method"})]},r.id)})]})};export{Z as default}; diff --git a/assets/NotFound-BTsJlVc8.js b/assets/NotFound-D8hwuoEl.js similarity index 89% rename from assets/NotFound-BTsJlVc8.js rename to assets/NotFound-D8hwuoEl.js index f1c02c5a0b9ab1f2164775ce3a4bf7f3d022ae3b..cb4e073d90645f4c62e1ffe0c19acb0f9b3b917a 100644 --- a/assets/NotFound-BTsJlVc8.js +++ b/assets/NotFound-D8hwuoEl.js @@ -1 +1 @@ -import{b as o,r as s,j as t,L as a}from"./index-D6jcIRWs.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{b as o,r as s,j as t,L as a}from"./index-YwiKC6Po.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-DzcTqxNw.js b/assets/OrganizationContributionGraph-BZyCpVX4.js similarity index 94% rename from assets/OrganizationContributionGraph-DzcTqxNw.js rename to assets/OrganizationContributionGraph-BZyCpVX4.js index e627030c0615af9c01e5c9bdb2fdfc00edf25a07..b9d1ae32fc7f0a0c37d45d5c71c4a9b68016c31a 100644 --- a/assets/OrganizationContributionGraph-DzcTqxNw.js +++ b/assets/OrganizationContributionGraph-BZyCpVX4.js @@ -1 +1 @@ -import{r as b,j as o}from"./index-D6jcIRWs.js";import{u as z}from"./useQuery-CUJUm4FY.js";import{S as T}from"./skeleton-BqkYFmXl.js";import{c as w}from"./catalog-PYrB8_bm.js";const x=24*60*60*1e3,f=12,y=3,v=new Map([[1,"Mon"],[3,"Wed"],[5,"Fri"]]),$=n=>new Date(`${n}T00:00:00Z`),N=n=>n.toISOString().slice(0,10),_=(n,r)=>{if(n===0)return 0;const i=r.findIndex(s=>n<=s);return i===-1?4:i+1},D=n=>{const r=$(n.start_date),i=$(n.end_date),s=new Date(r.getTime()-r.getUTCDay()*x),h=new Date(i.getTime()+(6-i.getUTCDay())*x),p=new Map(n.results.map(e=>[e.date,e.paper_count])),u=n.results.map(e=>e.paper_count).sort((e,m)=>e-m),c=[.25,.5,.75].map(e=>u[Math.min(u.length-1,Math.floor(u.length*e))]??1),l=[];for(let e=s.getTime();e<=h.getTime();e+=x){const m=new Date(e),d=N(m),g=e>=r.getTime()&&e<=i.getTime(),C=g?p.get(d)??0:0;l.push({key:d,date:m,count:C,inRange:g,level:_(C,c)})}const t=l.length/7,a=[];let j=-1;for(let e=0;eg.inRange&&(e===0||g.date.getUTCDate()<=7));d&&d.date.getUTCMonth()!==j&&(j=d.date.getUTCMonth(),a.length>0&&e-a[a.length-1].column<3&&a.pop(),a.push({label:d.date.toLocaleString("en",{month:"short",timeZone:"UTC"}),column:e}))}return{days:l,months:a,weekCount:t}},L=({data:n,organizationName:r,title:i="Paper contributions",noun:s="paper"})=>{const h=b.useRef(null),{days:p,months:u,weekCount:c}=b.useMemo(()=>D(n),[n]),l=c*f+(c-1)*y;return b.useEffect(()=>{const t=h.current;t&&(t.scrollLeft=t.scrollWidth)},[c]),o.jsxs("section",{className:"organization-contributions","aria-labelledby":"organization-contributions-title",children:[o.jsxs("div",{className:"organization-contributions-header",children:[o.jsx("h2",{id:"organization-contributions-title",className:"organization-contributions-title",children:i}),o.jsxs("p",{className:"organization-contributions-summary",children:[n.total_count.toLocaleString()," ",n.total_count===1?s:`${s}s`," recorded in the last year"]})]}),o.jsx("div",{className:"organization-contributions-scroll",ref:h,children:o.jsxs("div",{className:"organization-contributions-plot",style:{width:l+34},role:"img","aria-label":`${r} recorded ${n.total_count} ${n.total_count===1?s:`${s}s`} in the last year`,children:[o.jsx("div",{className:"organization-contributions-weekdays","aria-hidden":"true",children:Array.from({length:7}).map((t,a)=>o.jsx("span",{children:v.get(a)??""},a))}),o.jsxs("div",{children:[o.jsx("div",{className:"organization-contributions-months",style:{width:l,gridTemplateColumns:`repeat(${c}, ${f}px)`},"aria-hidden":"true",children:u.map(t=>o.jsx("span",{style:{gridColumnStart:t.column+1},children:t.label},`${t.label}-${t.column}`))}),o.jsx("div",{className:"organization-contributions-grid",style:{width:l,gridTemplateColumns:`repeat(${c}, ${f}px)`},"aria-hidden":"true",children:p.map(t=>o.jsx("span",{className:`organization-contribution-cell ${t.inRange?`level-${t.level}`:"is-outside"}`,title:t.inRange?`${t.count} ${t.count===1?s:`${s}s`} on ${t.date.toLocaleDateString("en",{dateStyle:"long",timeZone:"UTC"})}`:void 0},t.key))})]})]})}),o.jsxs("div",{className:"organization-contributions-legend","aria-hidden":"true",children:[o.jsx("span",{children:"Fewer"}),[0,1,2,3,4].map(t=>o.jsx("span",{className:`organization-contribution-cell level-${t}`},t)),o.jsx("span",{children:"More"})]})]})},A=({organizationSlug:n,organizationName:r})=>{const i=z({queryKey:["organization-contributions",n],queryFn:()=>w.organizationContributions(n),staleTime:6e5});return i.isLoading?o.jsx(T,{className:"organization-contributions-skeleton"}):i.data?o.jsx(L,{data:i.data,organizationName:r}):null};export{L as C,A as O}; +import{r as b,j as o}from"./index-YwiKC6Po.js";import{u as z}from"./useQuery-DPH6Mb2w.js";import{S as T}from"./skeleton-CXR1qouH.js";import{c as w}from"./catalog-B15Yh5dN.js";const x=24*60*60*1e3,f=12,y=3,v=new Map([[1,"Mon"],[3,"Wed"],[5,"Fri"]]),$=n=>new Date(`${n}T00:00:00Z`),N=n=>n.toISOString().slice(0,10),_=(n,r)=>{if(n===0)return 0;const i=r.findIndex(s=>n<=s);return i===-1?4:i+1},D=n=>{const r=$(n.start_date),i=$(n.end_date),s=new Date(r.getTime()-r.getUTCDay()*x),h=new Date(i.getTime()+(6-i.getUTCDay())*x),p=new Map(n.results.map(e=>[e.date,e.paper_count])),u=n.results.map(e=>e.paper_count).sort((e,m)=>e-m),c=[.25,.5,.75].map(e=>u[Math.min(u.length-1,Math.floor(u.length*e))]??1),l=[];for(let e=s.getTime();e<=h.getTime();e+=x){const m=new Date(e),d=N(m),g=e>=r.getTime()&&e<=i.getTime(),C=g?p.get(d)??0:0;l.push({key:d,date:m,count:C,inRange:g,level:_(C,c)})}const t=l.length/7,a=[];let j=-1;for(let e=0;eg.inRange&&(e===0||g.date.getUTCDate()<=7));d&&d.date.getUTCMonth()!==j&&(j=d.date.getUTCMonth(),a.length>0&&e-a[a.length-1].column<3&&a.pop(),a.push({label:d.date.toLocaleString("en",{month:"short",timeZone:"UTC"}),column:e}))}return{days:l,months:a,weekCount:t}},L=({data:n,organizationName:r,title:i="Paper contributions",noun:s="paper"})=>{const h=b.useRef(null),{days:p,months:u,weekCount:c}=b.useMemo(()=>D(n),[n]),l=c*f+(c-1)*y;return b.useEffect(()=>{const t=h.current;t&&(t.scrollLeft=t.scrollWidth)},[c]),o.jsxs("section",{className:"organization-contributions","aria-labelledby":"organization-contributions-title",children:[o.jsxs("div",{className:"organization-contributions-header",children:[o.jsx("h2",{id:"organization-contributions-title",className:"organization-contributions-title",children:i}),o.jsxs("p",{className:"organization-contributions-summary",children:[n.total_count.toLocaleString()," ",n.total_count===1?s:`${s}s`," recorded in the last year"]})]}),o.jsx("div",{className:"organization-contributions-scroll",ref:h,children:o.jsxs("div",{className:"organization-contributions-plot",style:{width:l+34},role:"img","aria-label":`${r} recorded ${n.total_count} ${n.total_count===1?s:`${s}s`} in the last year`,children:[o.jsx("div",{className:"organization-contributions-weekdays","aria-hidden":"true",children:Array.from({length:7}).map((t,a)=>o.jsx("span",{children:v.get(a)??""},a))}),o.jsxs("div",{children:[o.jsx("div",{className:"organization-contributions-months",style:{width:l,gridTemplateColumns:`repeat(${c}, ${f}px)`},"aria-hidden":"true",children:u.map(t=>o.jsx("span",{style:{gridColumnStart:t.column+1},children:t.label},`${t.label}-${t.column}`))}),o.jsx("div",{className:"organization-contributions-grid",style:{width:l,gridTemplateColumns:`repeat(${c}, ${f}px)`},"aria-hidden":"true",children:p.map(t=>o.jsx("span",{className:`organization-contribution-cell ${t.inRange?`level-${t.level}`:"is-outside"}`,title:t.inRange?`${t.count} ${t.count===1?s:`${s}s`} on ${t.date.toLocaleDateString("en",{dateStyle:"long",timeZone:"UTC"})}`:void 0},t.key))})]})]})}),o.jsxs("div",{className:"organization-contributions-legend","aria-hidden":"true",children:[o.jsx("span",{children:"Fewer"}),[0,1,2,3,4].map(t=>o.jsx("span",{className:`organization-contribution-cell level-${t}`},t)),o.jsx("span",{children:"More"})]})]})},A=({organizationSlug:n,organizationName:r})=>{const i=z({queryKey:["organization-contributions",n],queryFn:()=>w.organizationContributions(n),staleTime:6e5});return i.isLoading?o.jsx(T,{className:"organization-contributions-skeleton"}):i.data?o.jsx(L,{data:i.data,organizationName:r}):null};export{L as C,A as O}; diff --git a/assets/OrganizationDetailView-BsHsK07O.js b/assets/OrganizationDetailView-BsHsK07O.js deleted file mode 100644 index 25dcb04689966b2d9a96a1f27cb0c8c0e264202c..0000000000000000000000000000000000000000 --- a/assets/OrganizationDetailView-BsHsK07O.js +++ /dev/null @@ -1 +0,0 @@ -import{u as t,j as r}from"./index-D6jcIRWs.js";import{O as i}from"./OrganizationPaperFeed-BsFHy5Y7.js";import m from"./NotFound-BTsJlVc8.js";import"./ResearchFollowButton-C2Bfd9dP.js";import"./useQuery-CUJUm4FY.js";import"./useMutation-p6mN4h17.js";import"./research-BggtGgC2.js";import"./plus-C4UQ62Q1.js";import"./components-DO1X940E.js";import"./papers-DIIIPDpj.js";import"./AuthorAvatar-UMHOVOr9.js";import"./LatexTitle-D_92Jowu.js";import"./colors-CLwl8a2d.js";import"./safeExternalHref-CkBrsh84.js";import"./MarkdownText-B_D3IE_p.js";/* empty css */import"./PaperPreviewLink-fcJyP9H0.js";import"./index-uFGyKu5N.js";import"./index-yduEvk9Z.js";import"./katex-DkKDou_j.js";import"./hover-card-DPpv0l_x.js";import"./OrganizationContributionGraph-DzcTqxNw.js";import"./skeleton-BqkYFmXl.js";import"./catalog-PYrB8_bm.js";import"./PaperFeedFilters-DNebHp4l.js";import"./PaperDateFilter-CPIqaHaq.js";import"./popover-DCjqGpW0.js";import"./alert-2MbxVzGL.js";import"./searchable-select-B7z6Fcrr.js";import"./button-Bzx0ccHH.js";import"./dialog-vGFIbcd-.js";import"./search-CfTufeR7.js";import"./loader-circle-BuDrH29B.js";import"./useInfiniteScroll-Dm7JY_X4.js";import"./useIntersectionObserver-3LTuEaFW.js";import"./usePapers-BbCSwcVk.js";import"./useInfiniteQuery-FXco4P1n.js";import"./organizationNames-BVKzYEBp.js";const L=()=>{const{orgSlug:o}=t();return o?r.jsx(i,{organizationSlug:o}):r.jsx(m,{})};export{L as default}; diff --git a/assets/OrganizationDetailView-C69MBUc4.js b/assets/OrganizationDetailView-C69MBUc4.js new file mode 100644 index 0000000000000000000000000000000000000000..455a505cef3362a8b508e81124ac6dbd6bdd9bfe --- /dev/null +++ b/assets/OrganizationDetailView-C69MBUc4.js @@ -0,0 +1 @@ +import{c as q,r as d,j as r,L as N,u as C}from"./index-YwiKC6Po.js";import{R as M}from"./ResearchFollowButton-BFXC8E3t.js";import{u as y}from"./useQuery-DPH6Mb2w.js";import{M as z}from"./MarkdownText-C-8yLDus.js";import{O as Q}from"./OrganizationContributionGraph-BZyCpVX4.js";import{u as I,b as E,a as K}from"./PaperFeed-kaLm5US2.js";import{A as R,a as G}from"./alert-Cx5luC5D.js";import{S as H}from"./searchable-select-Bqfyxu17.js";import{S as W}from"./skeleton-CXR1qouH.js";import{u as B}from"./usePapers-C1deOZKl.js";import{c as F}from"./catalog-B15Yh5dN.js";import{a as D,p as S}from"./paperQueryKeys-C5FMa4Oj.js";import{i as U}from"./apiErrors-DBfE_SVR.js";import{d as v,t as V}from"./transform-CNg3rvXk.js";import{o as Z,i as J}from"./organizationNames-BVKzYEBp.js";import L from"./NotFound-D8hwuoEl.js";import"./useMutation-f6iDkf3w.js";import"./research-5UpiU-ea.js";import"./plus-Cfz0QbT1.js";/* empty css */import"./PaperPreviewLink-CKfmgBjs.js";import"./index-CoRCN2p0.js";import"./index-BM_xSDJM.js";import"./katex-DkKDou_j.js";import"./hover-card-BY9tUGxy.js";import"./PaperCard-FG-bEpJk.js";import"./AuthorAvatar-CoTET6B3.js";import"./SotaBadges-DiQuEzfo.js";import"./colors-BkWRhvFI.js";import"./Icon-DXQ4sjQk.js";import"./LatexTitle-DI6voLfI.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-D7ygxg37.js";import"./useIntersectionObserver-Dt36kyjs.js";import"./button-B90pJJiy.js";import"./dialog-foxx0Wu6.js";import"./search-wcEXdf1i.js";import"./loader-circle-B0KtDERb.js";import"./useInfiniteQuery-BEbL80ez.js";import"./curation-CkzNFTMJ.js";const X=({organizationSlug:a,taskSlug:n})=>{var f,x,j,_,b;const k=q(),c=I(),{searchParams:$}=c,[w,h]=d.useState(!1),u=y({queryKey:["organization",a],queryFn:()=>F.getOrganization(a),staleTime:10*60*1e3}),l=y({queryKey:["organization-areas-with-tasks",a],queryFn:()=>F.organizationAreasWithTasks(a),staleTime:10*60*1e3}),p=B([...S.feeds.organization,a,n,c.filters],t=>D.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:v(s.name,s.slug)})))},[l.data]),i=g.find(t=>t.slug===n),O=d.useMemo(()=>{var t;return(((t=p.data)==null?void 0:t.pages)??[]).flatMap(o=>o.results.map(V))},[p.data]),e=u.data??((f=l.data)==null?void 0:f.organization),m=e?Z(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(U))return r.jsx(L,{});if(l.error||p.error)return r.jsx("div",{className:"page",children:r.jsx(R,{variant:"destructive",children:r.jsx(G,{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"}`}))},T=t=>{const o=t==="__all__"?`/orgs/${a}`:`/orgs/${a}/${t}`,s=$.toString();k({pathname:o,search:s?`?${s}`:""})};return r.jsxs("div",{className:"page",children:[r.jsxs("nav",{className:"breadcrumb","aria-label":"Breadcrumb",children:[r.jsx(N,{to:"/",children:"Home"}),r.jsx("span",{children:" / "}),r.jsx(N,{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:v(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&&J(e.name)?" organization-hero-title--long":""}`,children:[e!=null&&e.logo_url&&!w?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(W,{className:"h-12 w-64"})]}),e&&r.jsx(M,{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(z,{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(Q,{organizationSlug:a,organizationName:(e==null?void 0:e.name)??a})]}),r.jsx(E,{feed:c,style:{alignItems:"center",gap:16},leading:r.jsx("div",{style:{minWidth:260},children:r.jsx(H,{value:n??"__all__",onChange:T,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(K,{query:p,cards:O,showInstitution:!1,empty:(e==null?void 0:e.paper_count)===0?"No papers indexed yet":"No papers found for this selection."})]})},Ee=()=>{const{orgSlug:a,taskSlug:n}=C();return a?r.jsx(X,{organizationSlug:a,taskSlug:n}):r.jsx(L,{})};export{Ee as default}; diff --git a/assets/OrganizationPaperFeed-BsFHy5Y7.js b/assets/OrganizationPaperFeed-BsFHy5Y7.js deleted file mode 100644 index a714a8d2edc7134f2f1025e20d4c3c35bae3463d..0000000000000000000000000000000000000000 --- a/assets/OrganizationPaperFeed-BsFHy5Y7.js +++ /dev/null @@ -1 +0,0 @@ -import{c as z,e as B,r as u,j as e,L as A}from"./index-D6jcIRWs.js";import{R as E}from"./ResearchFollowButton-C2Bfd9dP.js";import{u as C}from"./useQuery-CUJUm4FY.js";import{P as Q}from"./components-DO1X940E.js";import{M as U}from"./MarkdownText-B_D3IE_p.js";import{O as G}from"./OrganizationContributionGraph-DzcTqxNw.js";import{P as K}from"./PaperFeedFilters-DNebHp4l.js";import{a as W,P as Z,b as J}from"./PaperDateFilter-CPIqaHaq.js";import{A as V,a as X}from"./alert-2MbxVzGL.js";import{S as Y}from"./searchable-select-B7z6Fcrr.js";import{S as $}from"./skeleton-BqkYFmXl.js";import{u as ee}from"./useInfiniteScroll-Dm7JY_X4.js";import{e as ae}from"./usePapers-BbCSwcVk.js";import{c as R}from"./catalog-PYrB8_bm.js";import{d as D,t as se}from"./colors-CLwl8a2d.js";import{o as re,i as te}from"./organizationNames-BVKzYEBp.js";import ne from"./NotFound-BTsJlVc8.js";const oe=[["trending","trending"],["date_published","newest"],["citation_count","most cited"]],ie=n=>n==="date_published"||n==="citation_count"?n:"trending",Pe=({organizationSlug:n,taskSlug:d})=>{var y,v,L,P,F,k,w,O;const T=z(),[o,p]=B(),[I,g]=u.useState(!1),f=ie(o.get("order_by")),_=o.get("has_code")==="true",x=o.get("has_hf_artifacts")==="true",h=W(o),j=C({queryKey:["organization",n],queryFn:()=>R.getOrganization(n),staleTime:10*60*1e3}),c=C({queryKey:["organization-areas-with-tasks",n],queryFn:()=>R.organizationAreasWithTasks(n),staleTime:10*60*1e3}),i=ae({organizationSlug:n,taskSlug:d,page_size:12,order_by:f,order_dir:"desc",include_resources:!0,has_code:_,has_hf_artifacts:x,start_date:h.startDate,end_date:h.endDate,enabled:!!n}),S=ee(i);u.useEffect(()=>{g(!1)},[n,d]);const b=u.useMemo(()=>{var s;return(((s=c.data)==null?void 0:s.results)??[]).flatMap(r=>r.tasks.filter(t=>!!t.slug).map(t=>({...t,slug:t.slug,label:D(t.name,t.slug)})))},[c.data]),l=b.find(s=>s.slug===d),N=u.useMemo(()=>{var s;return(((s=i.data)==null?void 0:s.pages)??[]).flatMap(r=>r.results.map(se))},[i.data]),a=j.data??((y=c.data)==null?void 0:y.organization),m=a?re(a):null,H=((L=(v=i.data)==null?void 0:v.pages[0])==null?void 0:L.count)??0;if(((P=j.error)==null?void 0:P.status)===404||((F=c.error)==null?void 0:F.status)===404||((k=i.error)==null?void 0:k.status)===404)return e.jsx(ne,{});if(c.error||i.error)return e.jsx("div",{className:"page",children:e.jsx(V,{variant:"destructive",children:e.jsx(X,{children:"Failed to load organization papers. Please try again."})})});const M=s=>{const r=s.trim().toLocaleLowerCase();return b.filter(t=>`${t.label} ${t.slug}`.toLocaleLowerCase().includes(r)).map(t=>({value:t.slug,label:t.label,description:`${t.paper_count.toLocaleString()} ${t.paper_count===1?"paper":"papers"}`}))},q=s=>{const r=s==="__all__"?`/orgs/${n}`:`/orgs/${n}/${s}`,t=o.toString();T({pathname:r,search:t?`?${t}`:""})};return e.jsxs("div",{className:"page",children:[e.jsxs("nav",{className:"breadcrumb","aria-label":"Breadcrumb",children:[e.jsx(A,{to:"/",children:"Home"}),e.jsx("span",{children:" / "}),e.jsx(A,{to:"/organizations",children:"Organizations"}),e.jsx("span",{children:" / "}),e.jsx("span",{children:(a==null?void 0:a.name)??n}),l&&e.jsxs(e.Fragment,{children:[e.jsx("span",{children:" / "}),e.jsx("span",{children:D(l.name,l.slug)})]})]}),e.jsxs("header",{className:"organization-hero",children:[e.jsxs("div",{className:"organization-hero-profile",children:[e.jsx("div",{className:"organizations-eyebrow",children:"ORGANIZATION"}),e.jsxs("h1",{className:`feed-title organization-hero-title${a&&!m&&te(a.name)?" organization-hero-title--long":""}`,children:[a!=null&&a.logo_url&&!I?e.jsx("img",{src:a.logo_url,alt:"",width:58,height:58,onError:()=>g(!0)}):a?e.jsx("span",{className:"organization-hero-monogram","aria-hidden":"true",children:(m??a.name).slice(0,1).toUpperCase()}):null,a?e.jsxs("span",{className:"organization-hero-name",children:[m??a.name,m&&e.jsx("span",{className:"organization-hero-full-name",children:a.name})]}):e.jsx($,{className:"h-12 w-64"})]}),a&&e.jsx(E,{kind:"organization",entityId:a.id}),a&&e.jsxs("div",{className:"feed-subtitle",children:[((w=a.paper_count)==null?void 0:w.toLocaleString())??0," papers",(a.organization_trending_score??0)>0&&a.trending_rank&&e.jsxs(e.Fragment,{children:[" · #",a.trending_rank," trending this month"]})]}),(a==null?void 0:a.description)&&e.jsx(U,{className:"method-description",text:a.description}),a&&e.jsxs("div",{className:"organization-hero-links",children:[a.website_url&&e.jsx("a",{href:a.website_url,target:"_blank",rel:"noreferrer",children:"Website ↗"}),a.hf_url&&e.jsx("a",{href:a.hf_url,target:"_blank",rel:"noreferrer",children:"Hugging Face ↗"}),a.github_url&&e.jsx("a",{href:a.github_url,target:"_blank",rel:"noreferrer",children:"GitHub ↗"})]})]}),e.jsx(G,{organizationSlug:n,organizationName:(a==null?void 0:a.name)??n})]}),e.jsxs("div",{className:"sort-bar",style:{alignItems:"center",gap:16},children:[e.jsx("div",{style:{minWidth:260},children:e.jsx(Y,{value:d??"__all__",onChange:q,placeholder:"All tasks",searchPlaceholder:"Search organization tasks...",emptyMessage:"No matching tasks.",ariaLabel:"Filter papers by task",selectedOption:l?{value:l.slug,label:l.label,description:`${l.paper_count.toLocaleString()} ${l.paper_count===1?"paper":"papers"}`}:{value:"__all__",label:"All tasks",description:`${((O=a==null?void 0:a.paper_count)==null?void 0:O.toLocaleString())??0} papers`},queryKey:["organization-task-options",n],queryFn:async s=>{var r;return[{value:"__all__",label:"All tasks",description:`${((r=a==null?void 0:a.paper_count)==null?void 0:r.toLocaleString())??0} papers`},...M(s)]},enabled:!c.isLoading,className:"h-[38px]"})}),e.jsxs("div",{className:"paper-feed-toolbar-controls",children:[e.jsx("div",{className:"sort-options",children:oe.map(([s,r])=>e.jsx("button",{type:"button",className:`sort-btn ${f===s?"active":""}`,onClick:()=>{const t=new URLSearchParams(o);s==="trending"?t.delete("order_by"):t.set("order_by",s),p(t)},children:r},s))}),e.jsx(K,{hasCode:_,hasHfArtifacts:x,onHasCodeChange:s=>{const r=new URLSearchParams(o);s?r.set("has_code","true"):r.delete("has_code"),p(r)},onHasHfArtifactsChange:s=>{const r=new URLSearchParams(o);s?r.set("has_hf_artifacts","true"):r.delete("has_hf_artifacts"),p(r)}})]}),e.jsx(Z,{startDate:h.startDate,endDate:h.endDate,onChange:s=>p(J(o,s))}),e.jsxs("div",{className:"results-count",children:[H.toLocaleString()," papers"]})]}),i.isLoading?e.jsx("div",{className:"paper-list",children:Array.from({length:4}).map((s,r)=>e.jsx($,{className:"h-40 w-full"},r))}):N.length===0?e.jsx("div",{className:"no-results",children:(a==null?void 0:a.paper_count)===0?"No papers indexed yet":"No papers found for this selection."}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"paper-list",children:N.map((s,r)=>e.jsx(Q,{paper:s,rank:r+1,showInstitution:!1},s.id))}),e.jsx("div",{ref:S,style:{height:1}}),i.isFetchingNextPage&&e.jsx("div",{style:{padding:"20px 0",textAlign:"center"},children:"Loading more…"})]})]})};export{Pe as O}; diff --git a/assets/OrganizationTaskView--dnePIkF.js b/assets/OrganizationTaskView--dnePIkF.js deleted file mode 100644 index fae460cc849ab01b3d634f2bdad76164e80eadfc..0000000000000000000000000000000000000000 --- a/assets/OrganizationTaskView--dnePIkF.js +++ /dev/null @@ -1 +0,0 @@ -import{u as i,j as t}from"./index-D6jcIRWs.js";import{O as m}from"./OrganizationPaperFeed-BsFHy5Y7.js";import p from"./NotFound-BTsJlVc8.js";import"./ResearchFollowButton-C2Bfd9dP.js";import"./useQuery-CUJUm4FY.js";import"./useMutation-p6mN4h17.js";import"./research-BggtGgC2.js";import"./plus-C4UQ62Q1.js";import"./components-DO1X940E.js";import"./papers-DIIIPDpj.js";import"./AuthorAvatar-UMHOVOr9.js";import"./LatexTitle-D_92Jowu.js";import"./colors-CLwl8a2d.js";import"./safeExternalHref-CkBrsh84.js";import"./MarkdownText-B_D3IE_p.js";/* empty css */import"./PaperPreviewLink-fcJyP9H0.js";import"./index-uFGyKu5N.js";import"./index-yduEvk9Z.js";import"./katex-DkKDou_j.js";import"./hover-card-DPpv0l_x.js";import"./OrganizationContributionGraph-DzcTqxNw.js";import"./skeleton-BqkYFmXl.js";import"./catalog-PYrB8_bm.js";import"./PaperFeedFilters-DNebHp4l.js";import"./PaperDateFilter-CPIqaHaq.js";import"./popover-DCjqGpW0.js";import"./alert-2MbxVzGL.js";import"./searchable-select-B7z6Fcrr.js";import"./button-Bzx0ccHH.js";import"./dialog-vGFIbcd-.js";import"./search-CfTufeR7.js";import"./loader-circle-BuDrH29B.js";import"./useInfiniteScroll-Dm7JY_X4.js";import"./useIntersectionObserver-3LTuEaFW.js";import"./usePapers-BbCSwcVk.js";import"./useInfiniteQuery-FXco4P1n.js";import"./organizationNames-BVKzYEBp.js";const L=()=>{const{orgSlug:o,taskSlug:r}=i();return o&&r?t.jsx(m,{organizationSlug:o,taskSlug:r}):t.jsx(p,{})};export{L as default}; diff --git a/assets/OrganizationsIndexView-C_uscBZY.js b/assets/OrganizationsIndexView-CbWS3zNq.js similarity index 96% rename from assets/OrganizationsIndexView-C_uscBZY.js rename to assets/OrganizationsIndexView-CbWS3zNq.js index 9ab5d1dfc3342d8818c4ccde730a1bdb22faa9a6..c646f9c02c55b753d0877f8dbcd39f622ed14fab 100644 --- a/assets/OrganizationsIndexView-C_uscBZY.js +++ b/assets/OrganizationsIndexView-CbWS3zNq.js @@ -1 +1 @@ -import{e as g,r as h,j as e,L as x}from"./index-D6jcIRWs.js";import{u}from"./useQuery-CUJUm4FY.js";import{A as j,a as y}from"./alert-2MbxVzGL.js";import{c as N}from"./catalog-PYrB8_bm.js";const f=n=>n==="papers"||n==="name"?n:"trending",_=({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)})})},S=()=>{const[n,d]=g(),i=f(n.get("sort")),c=n.get("q")??"",o=u({queryKey:["organizations","featured"],queryFn:()=>N.organizationIndex(),staleTime:10*60*1e3}),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)},m=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(j,{variant:"destructive",children:e.jsxs(y,{children:["Failed to load organizations."," ",e.jsx("button",{type:"button",onClick:()=>o.refetch(),children:"Try again"})]})}):m.length===0?e.jsxs("div",{className:"organizations-empty",children:["No organizations match “",c,"”."]}):e.jsx("div",{className:"organizations-grid",children:m.map(s=>{var r;const a=s.paper_count??0,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(x,{to:`/orgs/${s.slug}`,className:"organization-card","aria-label":a?`Browse ${a.toLocaleString()} ${s.name} papers`:`Browse ${s.name} papers`,children:[e.jsxs("div",{className:"organization-card-header",children:[e.jsx(_,{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{S as default}; +import{e as g,r as h,j as e,L as x}from"./index-YwiKC6Po.js";import{u}from"./useQuery-DPH6Mb2w.js";import{A as j,a as y}from"./alert-Cx5luC5D.js";import{c as N}from"./catalog-B15Yh5dN.js";const f=n=>n==="papers"||n==="name"?n:"trending",_=({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)})})},S=()=>{const[n,d]=g(),i=f(n.get("sort")),c=n.get("q")??"",o=u({queryKey:["organizations","featured"],queryFn:()=>N.organizationIndex(),staleTime:10*60*1e3}),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)},m=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(j,{variant:"destructive",children:e.jsxs(y,{children:["Failed to load organizations."," ",e.jsx("button",{type:"button",onClick:()=>o.refetch(),children:"Try again"})]})}):m.length===0?e.jsxs("div",{className:"organizations-empty",children:["No organizations match “",c,"”."]}):e.jsx("div",{className:"organizations-grid",children:m.map(s=>{var r;const a=s.paper_count??0,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(x,{to:`/orgs/${s.slug}`,className:"organization-card","aria-label":a?`Browse ${a.toLocaleString()} ${s.name} papers`:`Browse ${s.name} papers`,children:[e.jsxs("div",{className:"organization-card-header",children:[e.jsx(_,{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{S as default}; diff --git a/assets/PaperCard-FG-bEpJk.js b/assets/PaperCard-FG-bEpJk.js new file mode 100644 index 0000000000000000000000000000000000000000..13fbd6a0c25339f32d619abd6a76db24ca58089c --- /dev/null +++ b/assets/PaperCard-FG-bEpJk.js @@ -0,0 +1 @@ +import{f as v,K as g,j as a,L as d}from"./index-YwiKC6Po.js";import{A as M}from"./AuthorAvatar-CoTET6B3.js";import{P as y,S as L,T as Z,M as A}from"./SotaBadges-DiQuEzfo.js";import{I as k}from"./Icon-DXQ4sjQk.js";import{L as P,a as w}from"./LatexTitle-DI6voLfI.js";import{a as C,p as E}from"./paperQueryKeys-C5FMa4Oj.js";import{s as h}from"./safeExternalHref-CkBrsh84.js";const U=({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 $(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 K=({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)})})},O=({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:E.detail(s.id),queryFn:()=>C.get(s.id,!0),staleTime:10*60*1e3})},[s.id,m]),N=s.authors.slice(0,3).map((e,o)=>{var b,F;const f=(b=s.authorIds)==null?void 0:b[o],j=(F=s.authorHfProfiles)==null?void 0:F[o];return a.jsxs(g.Fragment,{children:[o>0&&", ",j&&a.jsx(M,{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(y,{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 ",$(i)]}),a.jsxs("h3",{className:"paper-title",children:[a.jsx(d,{to:u,onFocus:n,onMouseEnter:n,children:a.jsx(P,{title:s.title,highlight:r})}),l&&s.organizations.length>0&&a.jsx("span",{className:"paper-organization-logos",children:s.organizations.map(e=>a.jsx(K,{...e},e.slug))})]}),a.jsxs("div",{className:"paper-authors",children:[N,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(L,{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(Z,{slug:e},e)),x.map(e=>a.jsx(A,{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(k,{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(U,{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{O as P}; diff --git a/assets/PaperDateFilter-CPIqaHaq.js b/assets/PaperDateFilter-CPIqaHaq.js deleted file mode 100644 index 034d808138197d2e787f22fb38d7a4410a6079fa..0000000000000000000000000000000000000000 --- a/assets/PaperDateFilter-CPIqaHaq.js +++ /dev/null @@ -1 +0,0 @@ -import{r as p,j as n}from"./index-D6jcIRWs.js";import{P as q,a as G,b as Q}from"./popover-DCjqGpW0.js";const E=(e,t)=>{const a=new Date(t),s=new Date(a);return s.setUTCDate(a.getUTCDate()-(e==="week"?6:29)),{startDate:s.toISOString().slice(0,10),endDate:a.toISOString().slice(0,10)}},z=e=>({startDate:e.get("start_date")||void 0,endDate:e.get("end_date")||void 0}),oe=(e,t=new Date,a="week")=>{const s=z(e);if(s.startDate||s.endDate||e.get("time")==="all_time")return s;const c=new Date(Date.UTC(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()));return E(a,c)},J=(e,t)=>{const a=new URLSearchParams(e);return t.startDate?a.set("start_date",t.startDate):a.delete("start_date"),t.endDate?a.set("end_date",t.endDate):a.delete("end_date"),a.delete("time"),a},ie=(e,t)=>{const a=J(e,t);return!t.startDate&&!t.endDate&&a.set("time","all_time"),a},K=new Intl.DateTimeFormat("en",{month:"long",year:"numeric",timeZone:"UTC"}),O=new Intl.DateTimeFormat("en",{month:"short",timeZone:"UTC"}),L="(max-width: 640px)",X=()=>{const[e,t]=p.useState(()=>typeof window<"u"&&window.matchMedia(L).matches);return p.useEffect(()=>{const a=window.matchMedia(L),s=c=>t(c.matches);return t(a.matches),a.addEventListener("change",s),()=>a.removeEventListener("change",s)},[]),e},V=e=>e.toISOString().slice(0,10),b=e=>new Date(`${e}T00:00:00Z`),ee=()=>{const e=new Date;return new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()))},R=(e,t)=>new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth()+t,1)),M=e=>new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),1)),te=(e,t)=>new Date(Date.UTC(t,e.getUTCMonth(),1)),w=(e,t)=>e.startDate===t.startDate&&e.endDate===t.endDate,ae=(e,t)=>{const a=b(e),s=b(t),c=O.format(a),l=O.format(s),g=a.getUTCDate(),d=s.getUTCDate(),o=a.getUTCFullYear(),u=s.getUTCFullYear();return e===t?`${c} ${g}, ${o}`:o===u&&a.getUTCMonth()===s.getUTCMonth()?`${c} ${g}–${d}, ${o}`:o===u?`${c} ${g}–${l} ${d}, ${o}`:`${c} ${g}, ${o}–${l} ${d}, ${u}`},ne=e=>{const t=e.getUTCFullYear(),a=e.getUTCMonth(),s=new Date(Date.UTC(t,a,1)),c=(s.getUTCDay()+6)%7,l=new Date(s);return l.setUTCDate(s.getUTCDate()-c),Array.from({length:42},(g,d)=>{const o=new Date(l);return o.setUTCDate(l.getUTCDate()+d),{iso:V(o),day:o.getUTCDate(),outsideMonth:o.getUTCMonth()!==a}})},A=({month:e,today:t,startDate:a,endDate:s,onSelect:c,yearLabel:l,yearValue:g,onYearChange:d,secondary:o=!1})=>{const u=p.useMemo(()=>ne(e),[e]);return n.jsxs("section",{className:`paper-date-calendar${o?" paper-date-calendar-secondary":""}`,children:[n.jsxs("label",{className:"paper-date-year",children:[n.jsx("span",{children:l}),n.jsx("input",{type:"number",inputMode:"numeric",min:"1900",max:t.slice(0,4),step:"1",value:g,onChange:r=>d(r.target.value)})]}),n.jsx("h3",{children:K.format(e)}),n.jsx("div",{className:"paper-date-weekdays","aria-hidden":"true",children:["Mon","Tue","Wed","Thu","Fri","Sat","Sun"].map(r=>n.jsx("span",{children:r},r))}),n.jsx("div",{className:"paper-date-days",children:u.map(r=>{const h=r.iso===a||r.iso===s,T=!!(a&&s&&r.iso>a&&r.isot;return n.jsx("button",{type:"button","aria-label":r.iso,"aria-selected":h,disabled:m,className:["paper-date-day",r.outsideMonth?"outside":"",h?"selected":"",T?"in-range":"",r.iso===t?"today":""].filter(Boolean).join(" "),onClick:()=>c(r.iso),children:r.day},r.iso)})})]})},I=({calendar:e,onPrevious:t,onNext:a,secondary:s=!1})=>n.jsxs("div",{className:`paper-date-navigation-group${s?" paper-date-navigation-group-secondary":""}`,children:[n.jsx("button",{type:"button","aria-label":`Previous ${e} month`,onClick:t,children:"←"}),n.jsx("button",{type:"button","aria-label":`Next ${e} month`,onClick:a,children:"→"})]}),ce=({startDate:e,endDate:t,onChange:a,currentDate:s})=>{const c=X(),l=s?b(s):ee(),[g,d]=p.useState(!1),[o,u]=p.useState(),[r,h]=p.useState(),[T,m]=p.useState(()=>M(l)),[$,D]=p.useState(()=>R(M(l),1)),[H,y]=p.useState(()=>String(l.getUTCFullYear())),[B,U]=p.useState(()=>String(l.getUTCFullYear())),f={startDate:e,endDate:t},N=E("week",l),Y=E("month",l),P=V(l),v=!!(e&&t&&!w(f,N)&&!w(f,Y)),Z=()=>{u(e),h(t);const i=M(e?b(e):l),C=M(t?b(t):R(i,1));m(i),D(C),y(String(i.getUTCFullYear())),U(String(C.getUTCFullYear())),d(!0)},k=(i,C,F)=>{if(C(i),!/^\d{4}$/.test(i))return;const x=Number(i);x>=1900&&x<=l.getUTCFullYear()&&F(j=>te(j,x))},S=(i,C,F,x)=>{const j=R(i,C);F(j),x(String(j.getUTCFullYear()))},_=i=>{!o||r?(u(i),h(void 0)):i{a({}),d(!1)};return n.jsxs("div",{className:`paper-date-filter${c?" paper-date-filter-single-calendar":""}`,role:"group","aria-label":"Publication date",children:[n.jsx("button",{type:"button",className:`sort-btn sort-btn-time${w(f,N)?" active":""}`,onClick:()=>a(N),children:"Last Week"}),n.jsx("button",{type:"button",className:`sort-btn sort-btn-time${w(f,Y)?" active":""}`,onClick:()=>a(Y),children:"Last Month"}),n.jsx("button",{type:"button",className:`sort-btn sort-btn-time${!e&&!t?" active":""}`,onClick:()=>a({}),children:"All Time"}),n.jsxs(q,{open:g,onOpenChange:i=>{i?Z():d(!1)},children:[n.jsx(G,{asChild:!0,children:n.jsx("button",{type:"button",className:`sort-btn sort-btn-time${v?" active":""}`,"aria-label":v?"Change date range":"Select a range",children:v&&e&&t?ae(e,t):"Select a range"})}),n.jsxs(Q,{align:"end",className:`paper-date-popover${c?" paper-date-popover-single-calendar":""}`,role:"dialog","aria-label":"Select a date range",children:[n.jsxs("div",{className:"paper-date-popover-header",children:[n.jsx("h2",{children:"Select a date range"}),n.jsx("p",{children:"Choose an inclusive start and end publication date."})]}),n.jsxs("div",{className:"paper-date-navigation",children:[n.jsx(I,{calendar:"start",onPrevious:()=>S(T,-1,m,y),onNext:()=>S(T,1,m,y)}),!c&&n.jsx(I,{calendar:"end",onPrevious:()=>S($,-1,D,U),onNext:()=>S($,1,D,U),secondary:!0})]}),n.jsxs("div",{className:"paper-date-calendars",children:[n.jsx(A,{month:T,today:P,startDate:o,endDate:r,onSelect:_,yearLabel:c?"Year":"Start year",yearValue:H,onYearChange:i=>k(i,y,m)}),!c&&n.jsx(A,{month:$,today:P,startDate:o,endDate:r,onSelect:_,yearLabel:"End year",yearValue:B,onYearChange:i=>k(i,U,D),secondary:!0})]}),n.jsxs("div",{className:"paper-date-actions",children:[n.jsx("button",{type:"button",className:"paper-date-clear",onClick:W,children:"Clear range"}),n.jsxs("div",{children:[n.jsx("button",{type:"button",onClick:()=>d(!1),children:"Cancel"}),n.jsx("button",{type:"button",className:"paper-date-apply",disabled:!o||!r,onClick:()=>{o&&r&&a({startDate:o,endDate:r}),d(!1)},children:"Apply"})]})]})]})]})]})};export{ce as P,z as a,J as b,oe as r,ie as w}; diff --git a/assets/PaperDetailView-B-27QVn7.js b/assets/PaperDetailView-uLa9aL0s.js similarity index 97% rename from assets/PaperDetailView-B-27QVn7.js rename to assets/PaperDetailView-uLa9aL0s.js index d61773c780d6cf3d07e85fcd17158ef580d1246d..adf41759ffbdc2a9b8fe8059161c75fa413295a5 100644 --- a/assets/PaperDetailView-B-27QVn7.js +++ b/assets/PaperDetailView-uLa9aL0s.js @@ -1,4 +1,4 @@ -import{n as Nt,o as Xs,c as ns,p as se,q as Qs,r as m,j as e,C as he,f as ce,s as fe,P as is,t as Ne,v as os,w as Le,x as Ae,y as ls,z as Ct,B as Oe,X as St,D as Vs,L as me,E as Ws,F as Ys,R as Js,I as Zs,G as cs,J as ea,h as ta,T as sa,A as xt,g as aa,a as Ge,K as Ke,M as bt,i as ds,u as ra,N as zt,O as na,m as Ht,Q as ia,S as oa,U as la,V as ca,W as da,Y as ua}from"./index-D6jcIRWs.js";import{I as V,T as ma,M as ha,S as pa,a as fa}from"./components-DO1X940E.js";import{L as qe,a as jt}from"./LatexTitle-D_92Jowu.js";import{e as Xe,C as ga,E as xa}from"./ExternalSourceEvalBadge-DfhTt9yv.js";import{p as _e,a as Y}from"./papers-DIIIPDpj.js";import{s as ba,a as ja}from"./colors-CLwl8a2d.js";import{r as us,p as va}from"./paperReader-BIpQD5HO.js";import{u as te}from"./useQuery-CUJUm4FY.js";import{b as ya}from"./usePapers-BbCSwcVk.js";import{f as _a,D as wa}from"./latexPlainText-DI8YEXVe.js";import{s as we}from"./safeExternalHref-CkBrsh84.js";import{S as Ie}from"./skeleton-BqkYFmXl.js";import{A as ka,a as Na}from"./alert-2MbxVzGL.js";import{B as L}from"./button-Bzx0ccHH.js";import{D as ae,a as re,c as ne,b as ie,d as oe,e as de}from"./dialog-vGFIbcd-.js";import{A as Ca,a as Sa}from"./AgentLogos-CFt_vIO2.js";import{C as Ea}from"./copy-BmzqMihw.js";import{I as W}from"./input-CCN-4hy4.js";import{S as qt}from"./searchable-select-B7z6Fcrr.js";import{u as ee}from"./useMutation-p6mN4h17.js";import{c as ke}from"./catalog-PYrB8_bm.js";import{s as pe,p as Pa}from"./submissions-DNa3tQdo.js";import{i as ms,a as hs,r as ve}from"./queryInvalidation-BxCpTdQe.js";import{r as Mt,e as Ot}from"./evaluationQueryInvalidation-D5wBpmlA.js";import{S as Et,L as ue,a as $a}from"./SignInToEditDialog-RzK54RAM.js";import{L as le}from"./loader-circle-BuDrH29B.js";import{T as Te,n as et,g as Kt,C as Ra}from"./CatalogEntityPreviewLink-BhTSUN-X.js";import{D as Ia}from"./database-DKdKRr_t.js";import{P as Ue}from"./plus-C4UQ62Q1.js";import{u as ps}from"./index-DIg7XGE2.js";import{S as Fe}from"./search-CfTufeR7.js";import{B as fs}from"./badge-t4oak8yc.js";import{G as Gt}from"./globe-iw_Y78tU.js";import{G as Xt}from"./github-B7D_19Qm.js";import{c as tt,A as Aa}from"./codex-P8vYbo4B.js";import{M as Fa}from"./index-uFGyKu5N.js";import{r as La}from"./index-yduEvk9Z.js";import{u as Ta}from"./useIntersectionObserver-3LTuEaFW.js";import{S as Qt,s as Ua}from"./savedPapersAuth-aA59XSW3.js";import{o as Da}from"./organizationNames-BVKzYEBp.js";import{A as Ba}from"./AuthorAvatar-UMHOVOr9.js";import"./hover-card-DPpv0l_x.js";import"./useInfiniteQuery-FXco4P1n.js";import"./popover-DCjqGpW0.js";import"./textarea-sXKODM3W.js";/** +import{n as Nt,o as Xs,c as ns,p as se,q as Qs,r as m,j as e,C as he,f as ce,s as fe,P as is,t as Ne,v as os,w as Le,x as Ae,y as ls,z as Ct,A as Oe,X as St,B as Vs,L as me,D as Ws,E as Ys,R as Js,I as Zs,F as cs,G as ea,h as ta,T as sa,J as xt,g as aa,a as Ge,K as Ke,M as bt,i as ds,u as ra,N as zt,O as na,m as Ht,Q as ia,S as oa,U as la,V as ca,W as da,Y as ua}from"./index-YwiKC6Po.js";import{I as V}from"./Icon-DXQ4sjQk.js";import{T as ma,M as ha,S as pa,P as fa}from"./SotaBadges-DiQuEzfo.js";import{L as qe,a as jt}from"./LatexTitle-DI6voLfI.js";import{e as Xe,C as ga,E as xa}from"./ExternalSourceEvalBadge-CimjRPVg.js";import{p as _e,a as Y}from"./paperQueryKeys-C5FMa4Oj.js";import{s as ba,a as ja}from"./transform-CNg3rvXk.js";import{r as us,p as va}from"./paperReader-BIpQD5HO.js";import{u as te}from"./useQuery-DPH6Mb2w.js";import{a as ya}from"./usePapers-C1deOZKl.js";import{f as _a,D as wa}from"./latexPlainText-DI8YEXVe.js";import{s as we}from"./safeExternalHref-CkBrsh84.js";import{S as Ie}from"./skeleton-CXR1qouH.js";import{A as ka,a as Na}from"./alert-Cx5luC5D.js";import{B as L}from"./button-B90pJJiy.js";import{D as ae,a as re,c as ne,b as ie,d as oe,e as de}from"./dialog-foxx0Wu6.js";import{A as Ca,a as Sa}from"./AgentLogos-DhD8p5ds.js";import{C as Ea}from"./copy-YHg6twss.js";import{I as W}from"./input-DEeEc0bH.js";import{S as qt}from"./searchable-select-Bqfyxu17.js";import{u as ee}from"./useMutation-f6iDkf3w.js";import{c as ke}from"./catalog-B15Yh5dN.js";import{s as pe,p as Pa}from"./submissions-BJgYjF7O.js";import{i as ms,a as hs,r as ve}from"./queryInvalidation-Dgyv9_oM.js";import{r as Mt,e as Ot}from"./evaluationQueryInvalidation-CcSZ8CmA.js";import{S as Et,L as ue,a as $a}from"./SignInToEditDialog-DpqyyHCb.js";import{L as le}from"./loader-circle-B0KtDERb.js";import{T as Te,n as et,g as Kt,C as Ra}from"./CatalogEntityPreviewLink-Cv_oezOz.js";import{D as Ia}from"./database-2w-JFZSG.js";import{P as Ue}from"./plus-Cfz0QbT1.js";import{u as ps}from"./index-BaDZKp6X.js";import{S as Fe}from"./search-wcEXdf1i.js";import{B as fs}from"./badge-CFf6CiSg.js";import{G as Gt}from"./globe-DmMnSXeF.js";import{G as Xt}from"./github-BZMCt7Ub.js";import{c as tt,A as Aa}from"./codex-C9BvAdr-.js";import{M as Fa}from"./index-CoRCN2p0.js";import{r as La}from"./index-BM_xSDJM.js";import{u as Ta}from"./useIntersectionObserver-Dt36kyjs.js";import{S as Qt,s as Ua}from"./savedPapersAuth-k5u0Ozsk.js";import{o as Da}from"./organizationNames-BVKzYEBp.js";import{A as Ba}from"./AuthorAvatar-CoTET6B3.js";import"./colors-BkWRhvFI.js";import"./curation-CkzNFTMJ.js";import"./hover-card-BY9tUGxy.js";import"./useInfiniteQuery-BEbL80ez.js";import"./popover-D7ygxg37.js";import"./textarea-BPIMGf5w.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. @@ -26,4 +26,4 @@ import{n as Nt,o as Xs,c as ns,p as se,q as Qs,r as m,j as e,C as he,f as ce,s a year={{${n}}}, url={{${t.source_url||t.url_abs||""}}} }`;return{citationDisplay:l(s,`{{${a}}}`),citationCopy:l(t.title,`{${r}}`)}}function Ja(t,s,a){var S,b,k,$;const r={models:t.hf_models??[],datasets:t.hf_datasets??[],spaces:t.hf_spaces??[]},n=t.linked_hf_artifacts,l=t.hf_artifact_summary,o={models:[...(s==null?void 0:s.modelUrls)??[],...(n==null?void 0:n.models)??[]],datasets:[...(s==null?void 0:s.datasetUrls)??[],...(n==null?void 0:n.datasets)??[]],spaces:[...(s==null?void 0:s.spaceUrls)??[],...(n==null?void 0:n.spaces)??[]]},i={models:it(s==null?void 0:s.models,l==null?void 0:l.model_count),datasets:it(s==null?void 0:s.datasets,l==null?void 0:l.dataset_count),spaces:it(s==null?void 0:s.spaces,l==null?void 0:l.space_count)},u={models:rt(r.models,o.models,"Model"),datasets:rt(r.datasets,o.datasets,"Dataset"),spaces:rt(r.spaces,o.spaces,"Space")},g={models:u.models.map(({href:E})=>E),datasets:u.datasets.map(({href:E})=>E),spaces:u.spaces.map(({href:E})=>E)},f=((S=t.arxiv_id)==null?void 0:S.replace(/v\d+$/,""))??null,c=t.arxiv_id?{isLoading:a,paperHref:`https://huggingface.co/papers/${f}`,rows:[{label:"Models",href:lt(`https://huggingface.co/models?other=arxiv:${t.arxiv_id}`,r.models),count:nt(r.models,o.models,i.models),isLimited:s==null?void 0:s.isLimited,links:u.models},{label:"Datasets",href:lt(`https://huggingface.co/datasets?other=arxiv:${t.arxiv_id}`,r.datasets),count:nt(r.datasets,o.datasets,i.datasets),isLimited:s==null?void 0:s.isLimited,links:u.datasets},{label:"Spaces",href:lt(`https://huggingface.co/papers/${f}`,r.spaces),count:nt(r.spaces,o.spaces,i.spaces),isLimited:s==null?void 0:s.isLimited,links:u.spaces}],footer:`Cite arxiv.org/abs/${f} in a HF README to link it here.`}:{isLoading:!1,paperHref:null,rows:[{label:"Models",href:ot(r.models),count:r.models.length,links:u.models},{label:"Datasets",href:ot(r.datasets),count:r.datasets.length,links:u.datasets},{label:"Spaces",href:ot(r.spaces),count:r.spaces.length,links:u.spaces}],footer:null},x=(t.methods??[]).filter(({source_paper_id:E})=>E===t.id),_=t.introduced_benchmarks??[],j=t.introduced_frameworks??[],C=[x.length&&(x.length===1?"this method":"these methods"),_.length&&(_.length===1?"this benchmark":"these benchmarks"),j.length&&(j.length===1?"this framework":"these frameworks")].filter(E=>!!E);return{...Ya(t),allHfArtifactUrls:g,authorEntries:t.authors.map((E,v)=>{var d,h,w,A,z,M;return{name:E,id:((h=(d=t.author_links)==null?void 0:d[v])==null?void 0:h.id)??null,hf_username:((A=(w=t.author_links)==null?void 0:w[v])==null?void 0:A.hf_username)??null,hf_avatar_url:((M=(z=t.author_links)==null?void 0:z[v])==null?void 0:M.hf_avatar_url)??null}}),copyableRanks:Ma(t.leaderboard_ranks),hasIntroducedItems:C.length>0,hasLineageItems:!!((b=t.predecessor_papers)!=null&&b.length||(k=t.successor_papers)!=null&&k.length),hfArtifactViewer:c,hfPaperExists:!!(s!=null&&s.paperExists),introducedBenchmarks:_,introducedFrameworks:j,introducedMethods:x,introducedSummary:C.join(" and "),numPages:t.num_pages||null,paperSourceLabel:t.arxiv_id?`arXiv:${t.arxiv_id}`:"External resource",predecessorPapers:t.predecessor_papers??[],projectPages:(($=t.project_pages)==null?void 0:$.filter(({url:E})=>E).map(E=>({...E,safeHref:we(E.url)})))??[],repoSummary:ba(t.repositories),safeAbstractUrl:we(t.url_abs),safeConferenceUrl:we(t.conference_url_abs),safePdfUrl:we(t.url_pdf),successorPapers:t.successor_papers??[]}}const Za=["tldr","abstract","tasks","methods","results"];function er(t){if(!t)return{section:null,resultsTaskSlug:null};const[s,a]=t.split("?",2);if(!Za.includes(s))return{section:null,resultsTaskSlug:null};const r=s;return r!=="results"||!a?{section:r,resultsTaskSlug:null}:{section:r,resultsTaskSlug:new URLSearchParams(a).get("task")}}const bs=t=>`results-task-${t}`,tr=t=>`#results?task=${encodeURIComponent(t)}`;function sr(t,s){return t&&!!s}function ar({direct:t,paperId:s,refetchEvaluations:a,refetchPaper:r}){r(),a(),!(!t||!s)&&(Y.primeCurationState(s,!0).catch(()=>{}),Xe.primeCurationState(s,!0).catch(()=>{}))}function rr(t,s){const a=t?Xs(t):"",r=ns(),{toast:n}=se(),{preferences:l}=Qs(),o=ya(a,!!a),i=o.data,[u,g]=m.useState(!1);m.useEffect(()=>{!t||t===a||r(`/paper/${a}${window.location.search}${window.location.hash}`,{replace:!0})},[a,r,t]),m.useEffect(()=>{if(i!=null&&i.title)return document.title=i.page_title||_a(i.title),()=>{document.title=wa}},[i==null?void 0:i.page_title,i==null?void 0:i.title]),m.useEffect(()=>{if(g(!1),!(i!=null&&i.id))return;const E=window.setTimeout(()=>g(!0),0);return()=>window.clearTimeout(E)},[i==null?void 0:i.id]);const f=sr(u,i==null?void 0:i.id),c=Va(u?i==null?void 0:i.arxiv_id:void 0),x=Ka(i==null?void 0:i.id,f),_=te({queryKey:[..._e.feeds.versions,i==null?void 0:i.arxiv_id],queryFn:()=>Y.versions(i.arxiv_id.replace(/v\d+$/,"")),enabled:f&&!!(i!=null&&i.arxiv_id),staleTime:10*60*1e3}),j=te({queryKey:[..._e.feeds.related,i==null?void 0:i.id],queryFn:()=>Y.related(i.arxiv_id||i.id,4),enabled:f,staleTime:10*60*1e3});m.useEffect(()=>{const E=()=>{ar({direct:s==="direct",paperId:i==null?void 0:i.id,refetchEvaluations:x.refetch,refetchPaper:o.refetch}),n({title:"This section changed",description:"The latest state has been reloaded. Review your changes before submitting again.",variant:"destructive"})};return window.addEventListener("pwc:catalog-conflict",E),()=>window.removeEventListener("pwc:catalog-conflict",E)},[s,x.refetch,i==null?void 0:i.id,o.refetch,n]);const C=m.useMemo(()=>{const E=x.data;return!E||!l.hide_closed_source_evals?E:E.filter(v=>v.is_open!==!1)},[x.data,l.hide_closed_source_evals]),S=m.useMemo(()=>{if(!C)return[];const E=new Map;for(const v of C){const d=E.get(v.task_id);d?d.rows.push(v):E.set(v.task_id,{taskId:v.task_id,taskName:v.task_name||"—",taskSlug:v.task_slug,rows:[v]})}return[...E.values()]},[C]),b=m.useMemo(()=>S.map(({taskSlug:E})=>E??"").join("|"),[S]),k=m.useMemo(()=>i?Ja(i,c.data,c.isLoading):null,[c.data,c.isLoading,i]),$=m.useRef(!1);return m.useEffect(()=>{$.current=!1},[a]),m.useEffect(()=>{let E=0;const v=(h=!1,w=!1)=>{const{section:A,resultsTaskSlug:z}=er(window.location.hash.slice(1));if(!A||!i||A==="tldr"&&!i.tldr||A==="results"&&(!f||x.isLoading)||!h&&$.current)return;let M=A==="results"&&z?document.getElementById(bs(z)):document.getElementById(A);if(!M&&A==="results"&&z){if(S.some(({taskSlug:K})=>K===z))return;M=document.getElementById("results")}M&&(E=window.requestAnimationFrame(()=>{$.current=!0,M.scrollIntoView({block:"start",behavior:w?"smooth":"auto"})}))};v();const d=()=>{$.current=!1,v(!0,!0)};return window.addEventListener("hashchange",d),()=>{window.removeEventListener("hashchange",d),E&&window.cancelAnimationFrame(E)}},[S,x.isLoading,i,b,f]),{arxivId:a,evaluations:x.data,evaluationsByTask:S,evaluationsLoading:x.isLoading,hfLoading:c.isLoading,hfRepos:c.data,paper:i,paperError:o.error,paperLoading:o.isLoading,presentation:k,refetchEvaluations:x.refetch,refetchPaper:o.refetch,relatedQuery:j,versions:_.data??[],visibleEvaluations:C}}const nr={tasks:"tasks",methods:"methods",evaluations:"results",repositories:"repositories",project_pages:"project-pages",hf_artifacts:"hf-artifacts",organizations:"organizations",source_url:"source-url",x_threads:"x-threads"};function ir(t){return nr[t]??null}function or(){const[t,s]=m.useState(null),a=m.useCallback(n=>{s(n)},[]),r=m.useCallback((n,l)=>{s(o=>l?n:o===n?null:o)},[]);return{activeEditor:t,openEditor:a,setEditorOpen:r}}function lr({paperId:t}){const[s,a]=m.useState(!1),[r,n]=m.useState(!1),[l,o]=m.useState(!1),i=`Help me edit https://paperswithcode.co/paper/${t} using the public pwc CLI from https://github.com/huggingface/pwc-cli. Install or update the CLI following its README, then run pwc skills add to load its instructions. Run pwc auth login --paper ${t}; I will authorize this paper in my browser. Export with pwc paper edit export ${t} --output edits.json, make explicit operations for the corrections I request, and preview before submitting. For organization changes, use an organizations operation with payload {"organization_ids": [existing organization IDs]}; this replaces the paper’s organization links and publishes directly. Use existing organizations, benchmark and metric definitions, preserve unrelated entries, and cite source URLs where available. Never print or copy credentials. Ask me what to change if I have not specified it.`;return e.jsxs(e.Fragment,{children:[e.jsxs("button",{type:"button",className:"action-btn",title:"Edit this paper page with Claude, Codex, Cursor, or OpenCode",onClick:()=>{a(!1),n(!1),o(!0)},children:["Edit with your agent",e.jsx(Ca,{})]}),e.jsx(ae,{open:l,onOpenChange:o,children:e.jsxs(re,{className:"max-w-2xl",children:[e.jsxs(ne,{children:[e.jsx(ie,{children:"Edit this paper with your agent"}),e.jsx(oe,{children:"Spotted a missing code link, a wrong task, or a missing benchmark result? Your favorite coding agent can fix it for you."})]}),e.jsx(Sa,{}),e.jsxs("ol",{className:"list-decimal space-y-1 pl-5 text-sm text-muted-foreground",children:[e.jsx("li",{children:"Copy the prompt below."}),e.jsx("li",{children:"Paste it into Claude Code, Codex, Cursor, OpenCode, or another coding agent, and tell it what to change."}),e.jsxs("li",{children:["The agent installs the ",e.jsx("a",{className:"underline",href:"https://github.com/huggingface/pwc-cli",target:"_blank",rel:"noreferrer",children:"pwc CLI"}),", asks you to authorize this paper with your Hugging Face account, and previews the edits before submitting them."]})]}),e.jsx("textarea",{"aria-label":"Paper edit prompt",readOnly:!0,value:i,className:"h-48 w-full resize-none rounded border bg-muted/40 p-3 font-mono text-xs",onFocus:u=>u.currentTarget.select()}),r&&e.jsx("p",{role:"alert",className:"text-sm text-destructive",children:"Could not copy automatically. Select the prompt above and copy it manually."}),e.jsxs(L,{className:"justify-self-end",onClick:async()=>{try{await navigator.clipboard.writeText(i),a(!0),n(!1)}catch{n(!0)}},children:[s?e.jsx(he,{size:14}):e.jsx(Ea,{size:14}),s?"Prompt copied":"Copy prompt"]})]})})]})}function ge(t,{toast:s,queryClient:a,paperIds:r,queuedDescription:n}){if(t.status==="approved"){ms(a,r),hs(a),s({title:"Edit applied",description:"Your change is now live on this paper."});return}s({title:"Edit submitted for review",description:n})}function cr(t){return t.map(s=>{const a=s.best_metric||Object.keys(s.metrics)[0]||"";return{id:s.id,task_id:s.task_id,dataset_id:s.dataset_id,model_name:s.model_name||"",harness:s.harness||"",metric_name:a,metric_value:String(s.metrics[a]??""),original_metrics:{...s.metrics},original_metric_name:a,best_rank:s.best_rank!=null?String(s.best_rank):"",num_parameters:s.num_parameters!=null?String(s.num_parameters):"",hf_model_url:s.hf_model_url||"",is_open:s.is_open!==!1,operation:"unchanged"}})}function dr(t,s){const a={...t.original_metrics},r=a[t.original_metric_name];return t.original_metric_name!==s&&delete a[t.original_metric_name],a[s]=r!=null&&t.metric_value===String(r)?r:t.metric_value,a}function ur(t){const s=t==null?void 0:t.trim();return s?Number(s):void 0}function Vt(t){const s=t.trim();return s?Number(s):null}function ct(t){return t.trim()||null}function dt(t){return!!(t&&/^\d+$/.test(t.trim())&&Number.isSafeInteger(Number(t))&&Number(t)>0)}function js(t){const s=[];return t.forEach((a,r)=>{var o;if(!a.operation||a.operation==="unchanged")return;const n=(i,u)=>{s.push({rowIndex:r,field:i,message:u})};if(a.operation!=="create"&&!dt(a.id)&&n("id","This result has no valid evaluation ID. Reload the paper before editing it."),a.operation==="delete")return;dt(a.task_id)||n("task_id","Select a valid task."),dt(a.dataset_id)||n("dataset_id","Select a valid dataset.");const l=a.metric_name.trim();l?l!==a.original_metric_name&&Object.prototype.hasOwnProperty.call(a.original_metrics,l)&&n("metric_name",`Cannot rename a metric to "${l}": this evaluation already has that score.`):n("metric_name","Select a metric."),(o=a.best_rank)!=null&&o.trim()&&!Number.isSafeInteger(Number(a.best_rank))&&n("best_rank","Enter a whole-number rank."),a.num_parameters.trim()&&(!Number.isSafeInteger(Number(a.num_parameters))||Number(a.num_parameters)<0)&&n("num_parameters","Enter a non-negative whole-number parameter count."),a.metric_value.trim()||n("metric_value","Enter a metric value.")}),s}function mr(t,s){const a=js(t);return a.length?{valid:!1,errors:a}:{valid:!0,operations:hr(t,s)}}function hr(t,s){const a=[];for(const r of t){if(r.operation==="delete"){a.push({kind:"delete",evaluationId:Number(r.id)});continue}if(r.operation!=="create"&&r.operation!=="update")continue;const n=r.metric_name.trim(),l=s(r.task_id,r.dataset_id),o={task_id:Number(r.task_id),dataset_id:Number(r.dataset_id),metrics:dr(r,n),best_metric:n,is_open:r.is_open},i=r.model_name.trim(),u=ur(r.best_rank);if(r.operation==="create"){const g=Vt(r.num_parameters),f=ct(r.hf_model_url);a.push({kind:"create",data:{...o,...i?{model_name:i}:{},...l&&r.harness.trim()?{harness:r.harness.trim()}:{},...u!==void 0?{best_rank:u}:{},...g!==null?{num_parameters:g}:{},...f!==null?{hf_model_url:f}:{}}});continue}a.push({kind:"update",evaluationId:Number(r.id),data:{...o,...i?{model_name:i}:{},harness:l?ct(r.harness):null,...u!==void 0?{best_rank:u}:{},num_parameters:Vt(r.num_parameters),hf_model_url:ct(r.hf_model_url)}})}return a}function pr(t,s){return s.map(a=>a.kind==="delete"?{operation:"delete",evaluation_id:a.evaluationId}:{operation:a.kind,...a.kind==="update"?{evaluation_id:a.evaluationId}:{},payload:a.kind==="create"?{paper_id:t,...a.data}:a.data})}function fr(t){return t.map(s=>s.kind==="delete"?{op:"delete",evaluation_id:s.evaluationId}:s.kind==="update"?{op:"update",evaluation_id:s.evaluationId,data:s.data}:{op:"create",data:s.data})}function xe(t){const s=typeof window<"u"&&window.location.hostname==="staging.paperswithcode.co";return e.jsxs("div",{className:"rounded-md border border-amber-200 bg-amber-50 px-3 py-2 text-xs text-amber-900 dark:border-amber-900 dark:bg-amber-950/40 dark:text-amber-100",children:[e.jsx("p",{className:"font-medium",children:s?"Test-only: this change stays on staging.":"Your changes go live right away."}),e.jsx("p",{className:"mt-1 leading-snug",children:s?"This exercises staging-local pending behavior and is not queued for production review.":"Edits are applied immediately and reviewed afterwards. A few, such as links to unfamiliar sites, are held for an admin first."})]})}const ut=100;function gr(t){return(t??[]).some(s=>s.slug==="coding-agents"||s.name.trim().toLowerCase()==="coding agents")}function xr(t){const s=new Map;return t.forEach(a=>{a.task_id&&a.task_name&&s.set(a.task_id,{id:a.task_id,name:a.task_name,slug:a.task_slug,level:0})}),s}function br(t){const s=new Map;return t.forEach(a=>{a.dataset_id&&a.dataset_name&&s.set(a.dataset_id,{id:a.dataset_id,name:a.dataset_name,slug:a.dataset_slug})}),s}function Wt(t,s){return`${t}:${s}`}function jr({open:t,onOpenChange:s,paperId:a,arxivId:r,initialEvaluations:n,paperTasks:l,onSuccess:o,submitMode:i="direct",isAdmin:u=!1,isAuthor:g=!1}){const f=m.useId(),c=gr(l),[x,_]=m.useState([]),[j,C]=m.useState(!1),S=j?js(x):[],[b,k]=m.useState(null),[$,E]=m.useState(new Map),[v,d]=m.useState(new Map),h=ce(),{toast:w}=se(),A=m.useRef(!1),z=m.useRef(!1);m.useEffect(()=>{if(!t){C(!1),A.current=!1,z.current=!1;return}A.current||z.current||n.length!==0&&(A.current=!0,_(cr(n)),E(xr(n)),d(br(n)))},[t,n]);const M=m.useMemo(()=>Array.from(new Set(x.map(y=>y.task_id).filter(y=>y&&y!==""))),[x]),K=m.useMemo(()=>{const y=new Set;return x.forEach(N=>{N.task_id&&N.dataset_id&&y.add(Wt(N.task_id,N.dataset_id))}),Array.from(y)},[x]),G=te({queryKey:["datasets-by-tasks-for-eval-edit",M,t],queryFn:async()=>{const y={};return await Promise.all(M.map(async N=>{try{const F=await ke.listDatasets({task_id:parseInt(N),page_size:ut});y[N]=F.results}catch(F){console.error(`Error fetching datasets for task ${N}:`,F),y[N]=[]}})),y},enabled:t&&M.length>0});m.useEffect(()=>{G.data&&d(y=>{const N=new Map(y);return Object.values(G.data).forEach(F=>{F.forEach(T=>{N.set(T.id,T)})}),N})},[G.data]);const p=te({queryKey:["leaderboard-metrics-for-eval-edit",K,t],queryFn:async()=>{const y={};return await Promise.all(K.map(async N=>{const[F,T]=N.split(":");try{y[N]=await ke.leaderboardMetrics(T,F)}catch(Q){console.error(`Error fetching metrics for leaderboard ${N}:`,Q),y[N]=[]}})),y},enabled:t&&K.length>0}),R=async y=>{const N=await ke.listTasks({page_size:ut,...y?{q:y}:{}});return E(F=>{const T=new Map(F);return N.results.forEach(Q=>T.set(Q.id,Q)),T}),N.results.map(F=>{var T;return{value:F.id,label:F.name,description:(T=F.description)==null?void 0:T.slice(0,100)}})},I=y=>async N=>{const F=await ke.listDatasets({task_id:parseInt(y),page_size:ut,...N?{q:N}:{}});return d(T=>{const Q=new Map(T);return F.results.forEach(X=>Q.set(X.id,X)),Q}),F.results.map(T=>({value:T.id,label:T.name,description:T.full_name}))},U=(y,N)=>{if(!y||!N)return!1;const F=v.get(N);return!!(F!=null&&F.supports_harness)},D=(y,N,F)=>{var X;if(!y||!N)return[];const Q=(((X=p.data)==null?void 0:X[Wt(y,N)])||[]).map(B=>({value:B.metric_name,label:B.metric_name,description:B.metric_direction==="higher_is_better"?"Higher is better":"Lower is better"}));return F&&!Q.some(B=>B.value===F)&&Q.unshift({value:F,label:`${F} (legacy)`}),Q},H=ee({mutationFn:async({paperId:y,canonical:N})=>{if(!u&&i==="direct"&&N.length>50)throw new Error("Contributor evaluation batches are limited to 50 operations; contact an admin.");const F=Number.parseInt(y,10);if(i==="pending"){const T=await pe.submit({paper_id:F,edit_type:"evaluations",proposed_payload:{operations:fr(N)}});T.status==="approved"&&Mt(h,Ot(y,n,N,r)),ge(T,{toast:w,queryClient:h,paperIds:[y,r],queuedDescription:"Thanks! An admin will review your proposed evaluation changes shortly."})}else{const T=Ot(y,n,N,r);await Xe.batch(F,pr(F,N)),Mt(h,T)}},onSuccess:()=>{o==null||o(),s(!1)},onError:y=>{const N=fe(y,i==="pending"?"Failed to submit your edit. Please try again.":"Failed to update evaluations.");w({title:i==="pending"?"Could not submit edit":"Could not save evaluations",description:N,variant:"destructive"})}}),q=()=>{z.current=!0,_([...x,{task_id:"",dataset_id:"",model_name:"",harness:"",metric_name:"",metric_value:"",original_metrics:{},original_metric_name:"",best_rank:"",num_parameters:"",hf_model_url:"",is_open:!0,operation:"create"}])},J=y=>{if(z.current=!0,x[y].id){if(!window.confirm("Delete this evaluation? You will be asked to sign in again if your session is older than 15 minutes."))return;_(x.map((F,T)=>T===y?{...F,operation:"delete"}:F))}else _(x.filter((F,T)=>T!==y))},Z=(y,N,F)=>{z.current=!0,_(x.map((T,Q)=>{if(Q!==y||T[N]===F)return T;const X={...T,[N]:F};return(N==="task_id"||N==="dataset_id")&&(X.original_metrics={},X.original_metric_name="",X.metric_value="",X.best_rank=""),N==="task_id"&&(X.dataset_id="",X.metric_name="",X.harness=""),N==="dataset_id"&&(X.metric_name="",F&&!U(X.task_id,F)&&(X.harness="")),T.operation==="unchanged"&&(X.operation="update"),X}))},Ye=(y,N)=>{z.current=!0,_(x.map((F,T)=>{if(T!==y)return F;const Q={...F,is_open:N};return F.operation==="unchanged"&&(Q.operation="update"),Q}))},De=()=>{C(!0);const y=mr(x,U);if(y.valid){if(y.operations.length===0){w({title:"No changes to submit",description:"Your evaluation list matches the existing data."});return}H.mutate({paperId:a,canonical:y.operations})}},ye=(y,N)=>{const F=S.find(T=>T.rowIndex===y&&T.field===N);return F?e.jsx("p",{id:`${f}-${y}-${N}-error`,className:"text-xs text-destructive",children:F.message}):null};return e.jsxs(ae,{open:t,onOpenChange:s,children:[e.jsxs(re,{className:"max-w-6xl max-h-[800px]",children:[e.jsxs(ne,{children:[e.jsx(ie,{children:"Edit Evaluation Results"}),e.jsx(oe,{children:"Add, edit, or remove evaluation results for this paper. Each row represents a benchmark result."})]}),i==="pending"&&e.jsx(xe,{isAuthor:g}),S.length>0&&e.jsxs("div",{role:"alert",className:"text-sm text-destructive",children:["Fix the following errors before saving. No changes have been submitted.",e.jsx("ul",{children:S.map(y=>e.jsxs("li",{children:["Row ",x.slice(0,y.rowIndex+1).filter(N=>N.operation!=="delete").length,": ",y.message]},`${y.rowIndex}-${y.field}`))})]}),e.jsxs("div",{className:"py-4 overflow-y-auto max-h-[600px]",children:[x.filter(y=>y.operation!=="delete").length>0?e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full border-collapse",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-border",children:[e.jsx("th",{className:"text-left py-2 px-2 font-medium text-sm min-w-[180px]",children:"Task"}),e.jsx("th",{className:"text-left py-2 px-2 font-medium text-sm min-w-[180px]",children:"Dataset"}),e.jsx("th",{className:`text-left py-2 px-2 font-medium text-sm ${c?"min-w-[140px]":"min-w-[240px]"}`,children:"Model"}),c&&e.jsx("th",{className:"text-left py-2 px-2 font-medium text-sm min-w-[140px]",children:"Harness"}),e.jsx("th",{className:"text-left py-2 px-2 font-medium text-sm min-w-[140px]",children:"Metric"}),e.jsx("th",{className:"text-left py-2 px-2 font-medium text-sm",children:"Value"}),e.jsx("th",{className:"text-left py-2 px-2 font-medium text-sm",children:"Parameters"}),e.jsx("th",{className:"text-left py-2 px-2 font-medium text-sm min-w-[200px]",children:"HF model URL"}),e.jsx("th",{className:"text-left py-2 px-2 font-medium text-sm w-20",children:"Open source"}),e.jsx("th",{className:"text-left py-2 px-2 font-medium text-sm w-16",children:"Action"})]})}),e.jsx("tbody",{children:x.map((y,N)=>{if(y.operation==="delete")return null;const F=$.get(y.task_id),T=v.get(y.dataset_id),Q=D(y.task_id,y.dataset_id,y.metric_name),X=!!(y.task_id&&y.dataset_id)&&p.isFetching;return e.jsxs("tr",{className:"border-b border-border",children:[e.jsx("td",{className:"py-2 px-2",children:e.jsxs("div",{role:"group","aria-label":"Task","aria-describedby":`${f}-${N}-task_id-error`,children:[e.jsx(qt,{value:y.task_id,onChange:B=>Z(N,"task_id",B),placeholder:"Select task",searchPlaceholder:"Search tasks...",emptyMessage:"No tasks found.",selectedOption:F?{value:F.id,label:F.name}:null,queryKey:["eval-edit-task-search"],queryFn:R,enabled:t}),ye(N,"task_id")]})}),e.jsx("td",{className:"py-2 px-2",children:e.jsxs("div",{role:"group","aria-label":"Dataset","aria-describedby":`${f}-${N}-dataset_id-error`,children:[e.jsx(qt,{value:y.dataset_id,onChange:B=>Z(N,"dataset_id",B),placeholder:y.task_id?"Select dataset":"Select task first",searchPlaceholder:"Search datasets...",emptyMessage:y.task_id?"No datasets found for this task.":"Select a task first.",disabled:!y.task_id,selectedOption:T?{value:T.id,label:T.name}:null,queryKey:["eval-edit-dataset-search",y.task_id],queryFn:I(y.task_id),enabled:t&&!!y.task_id}),ye(N,"dataset_id")]})}),e.jsx("td",{className:"py-2 px-2",children:e.jsx(W,{type:"text",className:"w-full text-sm",placeholder:"Model name",value:y.model_name,onChange:B=>Z(N,"model_name",B.target.value)})}),c&&e.jsx("td",{className:"py-2 px-2",children:U(y.task_id,y.dataset_id)?e.jsx(W,{type:"text",className:"w-full text-sm",placeholder:"Claude Code, Terminus, ...",value:y.harness,onChange:B=>Z(N,"harness",B.target.value)}):e.jsx("span",{className:"text-xs text-muted-foreground",children:"Not supported"})}),e.jsxs("td",{className:"py-2 px-2",children:[!y.task_id||!y.dataset_id?e.jsx("span",{className:"text-xs text-muted-foreground",children:"Select task + dataset"}):X?e.jsxs("span",{className:"inline-flex items-center text-xs text-muted-foreground",children:[e.jsx(le,{className:"mr-1 h-3 w-3 animate-spin"}),"Loading metrics..."]}):Q.length>0?e.jsxs("select",{className:"w-full rounded-md border border-border bg-background px-2 py-1 text-sm",id:`${f}-${N}-metric_name`,"aria-invalid":S.some(B=>B.rowIndex===N&&B.field==="metric_name"),"aria-describedby":`${f}-${N}-metric_name-error`,value:y.metric_name,onChange:B=>Z(N,"metric_name",B.target.value),children:[e.jsx("option",{value:"",children:"Select metric"}),Q.map(B=>e.jsx("option",{value:B.value,children:B.label},B.value))]}):e.jsx("span",{className:"text-xs text-muted-foreground",children:"No configured metrics"}),ye(N,"metric_name")]}),e.jsxs("td",{className:"py-2 px-2",children:[e.jsx(W,{type:"text",className:"w-full text-sm",placeholder:"44.9",id:`${f}-${N}-metric_value`,"aria-invalid":S.some(B=>B.rowIndex===N&&B.field==="metric_value"),"aria-describedby":`${f}-${N}-metric_value-error`,value:y.metric_value,onChange:B=>Z(N,"metric_value",B.target.value)}),ye(N,"metric_value")]}),e.jsxs("td",{className:"py-2 px-2",children:[e.jsx(W,{type:"number",min:0,step:1,className:"w-full text-sm",placeholder:"e.g. 7000000000",id:`${f}-${N}-num_parameters`,"aria-invalid":S.some(B=>B.rowIndex===N&&B.field==="num_parameters"),"aria-describedby":`${f}-${N}-num_parameters-error`,value:y.num_parameters,onChange:B=>Z(N,"num_parameters",B.target.value),title:"Raw model parameter count (e.g. 7000000000 for a 7B model). Leave blank if unknown."}),ye(N,"num_parameters")]}),e.jsx("td",{className:"py-2 px-2",children:e.jsx(W,{type:"url",className:"w-full text-sm",placeholder:"https://huggingface.co/org/model",value:y.hf_model_url,onChange:B=>Z(N,"hf_model_url",B.target.value),title:"Hugging Face model page for this row (must start with https://huggingface.co/). Leave blank if none."})}),e.jsx("td",{className:"py-2 px-2 text-center",children:e.jsx("input",{type:"checkbox",className:"h-4 w-4 align-middle",checked:y.is_open,onChange:B=>Ye(N,B.target.checked),title:"Whether the evaluated model is open-source. Uncheck for closed-source models."})}),e.jsx("td",{className:"py-2 px-2",children:e.jsx(L,{variant:"ghost",size:"sm",onClick:()=>J(N),className:"h-8 w-8 p-0 text-destructive hover:text-destructive",title:y.id&&!u?"Only administrators can delete published results":"Remove row",disabled:!!y.id&&!u,children:e.jsx(Te,{className:"w-4 h-4"})})})]},N)})})]})}):e.jsxs("div",{className:"text-center py-8 text-muted-foreground",children:[e.jsx(Ia,{className:"w-12 h-12 mx-auto mb-3 opacity-30"}),e.jsx("p",{children:"No evaluation results yet"}),e.jsx("p",{className:"text-sm mt-2",children:'Click "Add Row" below to add a new evaluation'})]}),e.jsx("div",{className:"mt-4",children:e.jsxs(L,{variant:"outline",size:"sm",onClick:q,className:"flex items-center space-x-2",children:[e.jsx(Ue,{className:"w-4 h-4"}),e.jsx("span",{children:"Add Row"})]})})]}),e.jsxs(de,{children:[e.jsxs("div",{className:"flex flex-wrap gap-2 sm:mr-auto",children:[e.jsx(L,{variant:"ghost",onClick:()=>k("benchmark"),children:"Suggest a new benchmark"}),e.jsx(L,{variant:"ghost",onClick:()=>k("metric"),children:"Suggest a new metric"})]}),e.jsx(L,{variant:"outline",onClick:()=>s(!1),children:"Cancel"}),e.jsx(L,{onClick:De,disabled:H.isPending,children:H.isPending?e.jsxs(e.Fragment,{children:[e.jsx(le,{className:"w-4 h-4 mr-2 animate-spin"}),i==="pending"?"Submitting...":"Saving..."]}):e.jsxs(e.Fragment,{children:[e.jsx(he,{className:"w-4 h-4 mr-2"}),i==="pending"?"Submit for review":"Save Changes"]})})]})]}),e.jsx(Et,{open:b!==null,onOpenChange:y=>{y||k(null)},paperId:a,kind:b??"benchmark"})]})}const mt=[{key:"hf_models",label:"Models",placeholder:"https://huggingface.co/org/model"},{key:"hf_datasets",label:"Datasets",placeholder:"https://huggingface.co/datasets/org/data"},{key:"hf_spaces",label:"Spaces",placeholder:"https://huggingface.co/spaces/org/demo"}];function Yt(t){return t.map(s=>s.trim()).filter(Boolean)}function ht(t,s){const a=Yt(t).sort(),r=Yt(s).sort();return a.length!==r.length?!1:a.every((n,l)=>n===r[l])}function vr(t,s){return ht(t.hf_models,s.hf_models)&&ht(t.hf_datasets,s.hf_datasets)&&ht(t.hf_spaces,s.hf_spaces)}function yr({open:t,onOpenChange:s,paperId:a,arxivId:r,initialArtifacts:n,onSuccess:l,submitMode:o="direct",isAuthor:i=!1}){const[u,g]=m.useState(n),[f,c]=m.useState({hf_models:"",hf_datasets:"",hf_spaces:""}),x=ce(),{toast:_}=se(),j=m.useRef(!1);m.useEffect(()=>{if(!t){j.current=!1;return}j.current||(j.current=!0,g(n),c({hf_models:"",hf_datasets:"",hf_spaces:""}))},[t,n]);const C=ee({mutationFn:async({paperId:v,artifacts:d})=>{if(o==="pending"){const h=await pe.submit({paper_id:parseInt(v),edit_type:"hf_artifacts",proposed_payload:d});return ge(h,{toast:_,queryClient:x,paperIds:[v,r],queuedDescription:"Thanks! An admin will review your proposed Hugging Face artifact changes shortly."}),null}return Y.updateHfArtifacts(v,d)},onSuccess:v=>{if(o==="pending"){l==null||l(),s(!1),c({hf_models:"",hf_datasets:"",hf_spaces:""});return}v&&ve(x,v,[a,r]),l==null||l(),s(!1),c({hf_models:"",hf_datasets:"",hf_spaces:""})},onError:v=>{const d=fe(v,o==="pending"?"Failed to submit your edit. Please try again.":"Failed to update Hugging Face artifacts.");_({title:o==="pending"?"Could not submit edit":"Could not save Hugging Face artifacts",description:d,variant:"destructive"})}}),S=()=>{const v={hf_models:[...u.hf_models],hf_datasets:[...u.hf_datasets],hf_spaces:[...u.hf_spaces]};for(const{key:d}of mt){const h=f[d].trim();if(h){if(v[d].some(w=>w.trim()===h))return alert(`This ${d.replace("hf_","")} URL is already added`),null;v[d]=[...v[d],h]}}return v},b=v=>{const d=f[v].trim();if(d){if(u[v].some(h=>h.trim()===d)){alert(`This ${v.replace("hf_","")} URL is already added`);return}g(h=>({...h,[v]:[...h[v],d]})),c(h=>({...h,[v]:""}))}},k=(v,d)=>{g(h=>({...h,[v]:h[v].filter(w=>w!==d)}))},$=()=>{const v=S();if(v===null)return;const d=Object.keys(n).some(h=>n[h].some(w=>!v[h].includes(w)));o==="direct"&&d&&!window.confirm("Remove one or more Hugging Face artifact links?")||C.mutate({paperId:a,artifacts:v})},E=m.useMemo(()=>{const v={hf_models:[...u.hf_models],hf_datasets:[...u.hf_datasets],hf_spaces:[...u.hf_spaces]};for(const{key:d}of mt){const h=f[d].trim();if(h){if(v[d].some(w=>w.trim()===h))return!1;v[d]=[...v[d],h]}}return!vr(v,n)},[u,f,n]);return e.jsx(ae,{open:t,onOpenChange:s,children:e.jsxs(re,{className:"max-w-2xl max-h-[700px]",children:[e.jsxs(ne,{children:[e.jsx(ie,{children:"Edit Hugging Face Artifacts"}),e.jsx(oe,{children:"Add or remove linked Hugging Face models, datasets, and Spaces for this paper."})]}),o==="pending"&&e.jsx(xe,{isAuthor:i}),e.jsx("div",{className:"space-y-6 py-2 overflow-y-auto max-h-[460px]",children:mt.map(({key:v,label:d,placeholder:h})=>e.jsxs("div",{className:"space-y-2",children:[e.jsx("label",{className:"text-sm font-medium",children:d}),e.jsxs("div",{className:"flex space-x-2",children:[e.jsx(W,{type:"url",placeholder:h,value:f[v],onChange:w=>c(A=>({...A,[v]:w.target.value})),onKeyPress:w=>{w.key==="Enter"&&(w.preventDefault(),b(v))},className:"flex-1"}),e.jsxs(L,{onClick:()=>b(v),size:"sm",disabled:!f[v].trim(),children:[e.jsx(Ue,{className:"w-4 h-4 mr-1"}),"Add"]})]}),u[v].length>0?e.jsx("div",{className:"space-y-2",children:u[v].map(w=>e.jsxs("div",{className:"flex items-center space-x-2 p-3 bg-muted/30 rounded-lg hover:bg-muted/50 transition-colors",children:[e.jsx("span",{className:"text-sm font-medium text-paper-blue truncate flex-1",children:w}),e.jsx(L,{variant:"ghost",size:"sm",onClick:()=>k(v,w),className:"h-8 px-2 text-destructive hover:text-destructive",title:`Remove ${d.toLowerCase()} URL`,children:e.jsx(Te,{className:"w-4 h-4"})})]},w))}):e.jsxs("div",{className:"text-xs text-muted-foreground",children:["No ",d.toLowerCase()," linked yet."]})]},v))}),e.jsxs(de,{children:[e.jsx(L,{variant:"outline",onClick:()=>s(!1),children:"Cancel"}),e.jsx(L,{onClick:$,disabled:C.isPending||!E,children:C.isPending?e.jsxs(e.Fragment,{children:[e.jsx(le,{className:"w-4 h-4 mr-2 animate-spin"}),o==="pending"?"Submitting...":"Saving..."]}):e.jsxs(e.Fragment,{children:[e.jsx(he,{className:"w-4 h-4 mr-2"}),o==="pending"?"Submit for review":"Save Changes"]})})]})]})})}var Qe="Checkbox",[_r]=Ct(Qe),[wr,Pt]=_r(Qe);function kr(t){const{__scopeCheckbox:s,checked:a,children:r,defaultChecked:n,disabled:l,form:o,name:i,onCheckedChange:u,required:g,value:f="on",internal_do_not_use_render:c}=t,[x,_]=os({prop:a,defaultProp:n??!1,onChange:u,caller:Qe}),[j,C]=m.useState(null),[S,b]=m.useState(null),k=m.useRef(!1),$=j?!!o||!!j.closest("form"):!0,E={checked:x,disabled:l,setChecked:_,control:j,setControl:C,name:i,form:o,value:f,hasConsumerStoppedPropagationRef:k,required:g,defaultChecked:je(n)?!1:n,isFormControl:$,bubbleInput:S,setBubbleInput:b};return e.jsx(wr,{scope:s,...E,children:Nr(c)?c(E):r})}var vs="CheckboxTrigger",ys=m.forwardRef(({__scopeCheckbox:t,onKeyDown:s,onClick:a,...r},n)=>{const{control:l,value:o,disabled:i,checked:u,required:g,setControl:f,setChecked:c,hasConsumerStoppedPropagationRef:x,isFormControl:_,bubbleInput:j}=Pt(vs,t),C=Le(n,f),S=m.useRef(u);return m.useEffect(()=>{const b=l==null?void 0:l.form;if(b){const k=()=>c(S.current);return b.addEventListener("reset",k),()=>b.removeEventListener("reset",k)}},[l,c]),e.jsx(Ne.button,{type:"button",role:"checkbox","aria-checked":je(u)?"mixed":u,"aria-required":g,"data-state":Cs(u),"data-disabled":i?"":void 0,disabled:i,value:o,...r,ref:C,onKeyDown:Ae(s,b=>{b.key==="Enter"&&b.preventDefault()}),onClick:Ae(a,b=>{c(k=>je(k)?!0:!k),j&&_&&(x.current=b.isPropagationStopped(),x.current||b.stopPropagation())})})});ys.displayName=vs;var $t=m.forwardRef((t,s)=>{const{__scopeCheckbox:a,name:r,checked:n,defaultChecked:l,required:o,disabled:i,value:u,onCheckedChange:g,form:f,...c}=t;return e.jsx(kr,{__scopeCheckbox:a,checked:n,defaultChecked:l,disabled:i,required:o,onCheckedChange:g,name:r,form:f,value:u,internal_do_not_use_render:({isFormControl:x})=>e.jsxs(e.Fragment,{children:[e.jsx(ys,{...c,ref:s,__scopeCheckbox:a}),x&&e.jsx(Ns,{__scopeCheckbox:a})]})})});$t.displayName=Qe;var _s="CheckboxIndicator",ws=m.forwardRef((t,s)=>{const{__scopeCheckbox:a,forceMount:r,...n}=t,l=Pt(_s,a);return e.jsx(is,{present:r||je(l.checked)||l.checked===!0,children:e.jsx(Ne.span,{"data-state":Cs(l.checked),"data-disabled":l.disabled?"":void 0,...n,ref:s,style:{pointerEvents:"none",...t.style}})})});ws.displayName=_s;var ks="CheckboxBubbleInput",Ns=m.forwardRef(({__scopeCheckbox:t,...s},a)=>{const{control:r,hasConsumerStoppedPropagationRef:n,checked:l,defaultChecked:o,required:i,disabled:u,name:g,value:f,form:c,bubbleInput:x,setBubbleInput:_}=Pt(ks,t),j=Le(a,_),C=ps(l),S=ls(r);m.useEffect(()=>{const k=x;if(!k)return;const $=window.HTMLInputElement.prototype,v=Object.getOwnPropertyDescriptor($,"checked").set,d=!n.current;if(C!==l&&v){const h=new Event("click",{bubbles:d});k.indeterminate=je(l),v.call(k,je(l)?!1:l),k.dispatchEvent(h)}},[x,C,l,n]);const b=m.useRef(je(l)?!1:l);return e.jsx(Ne.input,{type:"checkbox","aria-hidden":!0,defaultChecked:o??b.current,required:i,disabled:u,name:g,value:f,form:c,...s,tabIndex:-1,ref:j,style:{...s.style,...S,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});Ns.displayName=ks;function Nr(t){return typeof t=="function"}function je(t){return t==="indeterminate"}function Cs(t){return je(t)?"indeterminate":t?"checked":"unchecked"}const Ve=m.forwardRef(({className:t,style:s,...a},r)=>e.jsx($t,{ref:r,className:Oe("peer h-4 w-4 shrink-0 rounded-sm ring-offset-background data-[state=checked]:!bg-black data-[state=checked]:!text-white focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",t),style:{border:"1px solid #000",...s},...a,children:e.jsx(ws,{className:Oe("flex items-center justify-center text-current"),children:e.jsx(he,{className:"h-4 w-4"})})}));Ve.displayName=$t.displayName;const Cr=250,Sr=100;function Er({open:t,onOpenChange:s,paperId:a,arxivId:r,initialMethodIds:n,initialMethods:l,onSuccess:o,submitMode:i="direct",isAuthor:u=!1}){const[g,f]=m.useState(n),[c,x]=m.useState(!1),[_,j]=m.useState(""),[C,S]=m.useState(""),[b,k]=m.useState(new Map),$=ce(),{toast:E}=se(),v=m.useRef(!1);m.useEffect(()=>{if(!t){v.current=!1;return}if(v.current)return;v.current=!0,f(n),j(""),S("");const p=new Map;(l||[]).forEach(R=>{const I=parseInt(R.id);Number.isNaN(I)||p.set(I,R)}),k(p)},[t,n,l]),m.useEffect(()=>{const p=window.setTimeout(()=>{S(_.trim())},Cr);return()=>window.clearTimeout(p)},[_]);const{data:d,isFetching:h}=te({queryKey:["methods-search",C],queryFn:()=>ke.listMethods({page_size:Sr,...C?{q:C}:{}}),enabled:t});m.useEffect(()=>{var p;(p=d==null?void 0:d.results)!=null&&p.length&&k(R=>{const I=new Map(R);return d.results.forEach(U=>{const D=parseInt(U.id);Number.isNaN(D)||I.set(D,U)}),I})},[d]);const w=m.useMemo(()=>{const p=(d==null?void 0:d.results)||[],R=new Set,I=[],U=(q,J)=>{!J||Number.isNaN(q)||R.has(q)||(I.push(J),R.add(q))},D=()=>g.forEach(q=>U(q,b.get(q))),H=()=>p.forEach(q=>U(parseInt(q.id),q));return C?(H(),D()):(D(),H()),I},[d,g,b,C]),A=ee({mutationFn:async({paperId:p,methodIds:R})=>{if(i==="pending"){const I=await pe.submit({paper_id:parseInt(p),edit_type:"methods",proposed_payload:{method_ids:R}});return ge(I,{toast:E,queryClient:$,paperIds:[p,r],queuedDescription:"Thanks! An admin will review your proposed method changes shortly."}),null}return Y.updateMethods(p,R)},onSuccess:p=>{if(i==="pending"){o==null||o(),s(!1);return}p&&ve($,p,[a,r]),E({title:"Methods updated",description:`Saved ${g.length} method${g.length===1?"":"s"} for this paper.`}),o==null||o(),s(!1)},onError:p=>{const R=fe(p,i==="pending"?"Failed to submit your edit. Please try again.":"Failed to update paper methods.");E({title:i==="pending"?"Could not submit edit":"Could not save methods",description:R,variant:"destructive"})}}),z=()=>{i==="direct"&&n.some(p=>!g.includes(p))&&!window.confirm("Remove one or more method links from this paper?")||A.mutate({paperId:a,methodIds:g})},M=m.useMemo(()=>{if(g.length!==n.length)return!0;const p=new Set(n);return g.some(R=>!p.has(R))},[g,n]),K=(p,R)=>{f(I=>R?I.includes(p)?I:[...I,p]:I.filter(U=>U!==p))},G=()=>j("");return e.jsxs(ae,{open:t,onOpenChange:s,children:[e.jsxs(re,{className:"max-w-2xl max-h-[600px]",children:[e.jsxs(ne,{children:[e.jsx(ie,{children:"Edit Paper Methods"}),e.jsx(oe,{children:"Select the methods and techniques used in this paper. You can select multiple methods."})]}),i==="pending"&&e.jsx(xe,{isAuthor:u}),e.jsxs("div",{className:"relative mb-4",children:[e.jsx(Fe,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground"}),e.jsx(W,{type:"text",placeholder:"Search methods...",value:_,onChange:p=>j(p.target.value),className:"pl-9 pr-9"}),_&&e.jsx("button",{type:"button",onClick:G,className:"absolute right-2 top-1/2 -translate-y-1/2 p-1 text-muted-foreground hover:text-foreground","aria-label":"Clear search",children:e.jsx(St,{className:"w-4 h-4"})})]}),e.jsx("div",{className:"py-4 overflow-y-auto max-h-[400px]",children:w.length>0?e.jsx("div",{className:"space-y-2",children:w.map(p=>{const R=parseInt(p.id),I=g.includes(R);return e.jsxs("div",{className:"flex items-center space-x-2 p-2 hover:bg-muted/50 rounded-md",children:[e.jsx(Ve,{id:`method-${p.id}`,checked:I,onCheckedChange:U=>K(R,U===!0),className:"!border !border-black data-[state=checked]:!bg-black data-[state=checked]:!text-white"}),e.jsxs("label",{htmlFor:`method-${p.id}`,className:"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 cursor-pointer flex-1",children:[p.name,p.full_name&&p.full_name!==p.name&&e.jsx("span",{className:"block text-xs text-muted-foreground font-normal",children:p.full_name}),p.description&&e.jsxs("span",{className:"block text-xs text-muted-foreground font-normal mt-1",children:[p.description.substring(0,100),p.description.length>100?"...":""]})]})]},p.id)})}):h?e.jsxs("div",{className:"text-center py-8 text-muted-foreground",children:[e.jsx(le,{className:"w-8 h-8 mx-auto mb-2 animate-spin"}),e.jsx("p",{children:"Loading methods..."})]}):e.jsxs("div",{className:"text-center py-8 text-muted-foreground",children:[e.jsx(Fe,{className:"w-8 h-8 mx-auto mb-2 opacity-50"}),e.jsx("p",{children:C?`No methods found matching "${C}"`:"No methods available"})]})}),e.jsxs(de,{children:[e.jsx(L,{variant:"ghost",className:"sm:mr-auto",onClick:()=>x(!0),children:"Suggest a new method"}),e.jsx(L,{variant:"outline",onClick:()=>s(!1),children:"Cancel"}),e.jsx(L,{onClick:z,disabled:A.isPending||!M,children:A.isPending?e.jsxs(e.Fragment,{children:[e.jsx(le,{className:"w-4 h-4 mr-2 animate-spin"}),i==="pending"?"Submitting...":"Saving..."]}):e.jsxs(e.Fragment,{children:[e.jsx(he,{className:"w-4 h-4 mr-2"}),i==="pending"?"Submit for review":"Save Changes"]})})]})]}),e.jsx(Et,{open:c,onOpenChange:x,paperId:a,kind:"method"})]})}const Ss=["image/jpeg","image/png","image/webp","image/gif"],Pr=2*1024*1024;function $r(t){return Ss.includes(t.type)?t.size>Pr?Promise.reject(new Error("Logo must be 2 MB or smaller.")):new Promise((s,a)=>{const r=new FileReader;r.onload=()=>s({file_name:t.name,mime_type:t.type,data_url:String(r.result)}),r.onerror=()=>a(new Error("Could not read that logo.")),r.readAsDataURL(t)}):Promise.reject(new Error("Choose a JPEG, PNG, WebP, or GIF logo."))}function Rr({paperId:t,initialName:s,onApplied:a,onUnsentChange:r}){const[n,l]=m.useState(s),[o,i]=m.useState(""),[u,g]=m.useState(""),[f,c]=m.useState(null),[x,_]=m.useState(""),j=ee({mutationFn:()=>pe.submit(Pa(Number(t),"new_organization",{name:n.trim(),...o.trim()?{hf_slug:o.trim()}:{},...u.trim()?{website_url:u.trim()}:{},...f?{image:f}:{}})),onSuccess:S=>{S.status==="approved"&&a(n.trim())}}),C=!j.isSuccess&&!!(o.trim()||u.trim()||f);return m.useEffect(()=>r(C),[r,C]),m.useEffect(()=>()=>r(!1),[r]),j.isSuccess?e.jsxs("p",{className:"rounded border p-3 text-sm",children:['Thanks! "',n.trim(),'" was submitted for review. Once an admin approves it, the organization is created and added to this paper.']}):e.jsxs("form",{className:"space-y-2 rounded border p-3",onSubmit:S=>{S.preventDefault(),j.mutate()},children:[e.jsx("p",{className:"text-sm font-medium",children:"Suggest a new organization"}),e.jsx(W,{"aria-label":"Organization name",placeholder:"Name",value:n,maxLength:200,onChange:S=>l(S.target.value)}),e.jsx(W,{"aria-label":"Hugging Face organization",placeholder:"Hugging Face organization (e.g. https://huggingface.co/PrimeIntellect)",value:o,onChange:S=>i(S.target.value)}),e.jsx(W,{"aria-label":"Website",type:"url",placeholder:"Website (e.g. https://www.primeintellect.ai)",value:u,onChange:S=>g(S.target.value)}),e.jsxs("label",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:["Logo (optional)",e.jsx("input",{"aria-label":"Logo",type:"file",accept:Ss.join(","),onChange:S=>{var k;const b=(k=S.target.files)==null?void 0:k[0];c(null),_(""),b&&$r(b).then(c,$=>_($.message))}})]}),f&&e.jsx("img",{src:f.data_url,alt:"Selected logo",className:"h-12 w-12 rounded border object-contain"}),x&&e.jsx("p",{className:"text-sm text-destructive",children:x}),e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[e.jsx("p",{className:"text-xs text-muted-foreground",children:"With a Hugging Face organization it is added right away; otherwise an admin reviews it."}),e.jsx(L,{type:"submit",variant:"outline",disabled:!n.trim()||!o.trim()&&!u.trim()||j.isPending,children:j.isPending?"Submitting...":"Submit organization"})]}),j.error&&e.jsx("p",{className:"text-sm text-destructive",children:fe(j.error,"Could not submit this organization.")})]})}const Ir=({open:t,onOpenChange:s,paperId:a,initialOrganizationIds:r,submitMode:n,isAuthor:l})=>{var b;const[o,i]=m.useState(r),[u,g]=m.useState(""),[f,c]=m.useState(!1),x=ce(),{toast:_}=se();m.useEffect(()=>{t&&(i(r),g(""))},[r,t]);const j=te({queryKey:["organizations","curation"],queryFn:()=>ke.organizations(!1),enabled:t}),C=m.useMemo(()=>{var E,v;const k=u.trim().toLocaleLowerCase();if(!k)return((E=j.data)==null?void 0:E.results)??[];const $=d=>d===k?0:d.startsWith(k)?1:d.split(/[^\p{L}\p{N}]+/u).some(h=>h.startsWith(k))?2:3;return(((v=j.data)==null?void 0:v.results)??[]).map(d=>({organization:d,name:d.name.toLocaleLowerCase()})).filter(({name:d})=>d.includes(k)).sort((d,h)=>$(d.name)-$(h.name)).map(({organization:d})=>d)},[(b=j.data)==null?void 0:b.results,u]),S=ee({mutationFn:async()=>{if(!(r.some($=>!o.includes($))&&!window.confirm("Remove one or more organizations from this paper? Destructive edits may require a fresh sign-in.")))if(n==="pending"){const $=await pe.submit({paper_id:Number(a),edit_type:"organizations",proposed_payload:{organization_ids:o}});return ge($,{toast:_,queryClient:x,paperIds:[a],queuedDescription:"Thanks! An admin will review your proposed organization changes shortly."}),null}else return Y.updateOrganizations(a,o)},onSuccess:k=>{k!==void 0&&(k&&ve(x,k,[a]),s(!1))}});return e.jsx(ae,{open:t,onOpenChange:s,children:e.jsxs(re,{children:[e.jsxs(ne,{children:[e.jsx(ie,{children:"Edit organizations"}),e.jsx(oe,{children:"Associate organizations with this paper. If one is missing, search for it and suggest it for review."})]}),n==="pending"&&e.jsx(xe,{isAuthor:l}),e.jsxs("div",{className:"relative",children:[e.jsx(Fe,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),e.jsx(W,{type:"search","aria-label":"Search organizations",placeholder:"Search organizations...",value:u,onChange:k=>g(k.target.value),className:"pl-9 pr-9"}),u&&e.jsx("button",{type:"button",onClick:()=>g(""),className:"absolute right-2 top-1/2 -translate-y-1/2 p-1 text-muted-foreground hover:text-foreground","aria-label":"Clear organization search",children:e.jsx(St,{className:"h-4 w-4"})})]}),e.jsxs("div",{className:"max-h-80 space-y-2 overflow-auto",children:[C.map(k=>{const $=Number(k.id);return e.jsxs("label",{className:"flex items-center gap-2 rounded border p-2",children:[e.jsx("input",{type:"checkbox",checked:o.includes($),onChange:E=>i(v=>E.target.checked?[...v,$]:v.filter(d=>d!==$))}),k.name]},k.id)}),!j.isLoading&&C.length===0&&e.jsx("p",{className:"py-8 text-center text-sm text-muted-foreground",children:u.trim()?`No organizations found matching "${u.trim()}"`:"No organizations available"})]}),!j.isLoading&&C.length===0&&u.trim()&&e.jsx(Rr,{paperId:a,initialName:u.trim(),onApplied:k=>{s(!1),_({title:"Organization added",description:`Added "${k}" to this paper.`}),ms(x,[a]),hs(x),x.invalidateQueries({queryKey:["organizations"]})},onUnsentChange:c},u.trim()),f&&e.jsx("p",{className:"text-sm text-muted-foreground",children:"Submit the organization above, or clear the search, before saving."}),e.jsxs(de,{children:[e.jsx(L,{variant:"outline",onClick:()=>s(!1),children:"Cancel"}),e.jsx(L,{onClick:()=>S.mutate(),disabled:S.isPending||f,children:n==="pending"?"Submit test edit":"Save changes"})]})]})})};function Ar({open:t,onOpenChange:s,paperId:a,arxivId:r,initialProjectPages:n,onSuccess:l,submitMode:o="direct",isAuthor:i=!1}){const[u,g]=m.useState(n),[f,c]=m.useState(""),x=ce(),{toast:_}=se(),j=m.useRef(!1);m.useEffect(()=>{if(!t){j.current=!1;return}j.current||(j.current=!0,g(n),c(""))},[t,n]);const C=ee({mutationFn:async({paperId:d,projectPages:h})=>{if(o==="pending"){const w=await pe.submit({paper_id:parseInt(d),edit_type:"project_pages",proposed_payload:{project_pages:h}});return ge(w,{toast:_,queryClient:x,paperIds:[d,r],queuedDescription:"Thanks! An admin will review your proposed project page changes shortly."}),null}return Y.updateProjectPages(d,h)},onSuccess:d=>{if(o==="pending"){l==null||l(),s(!1),c("");return}d&&ve(x,d,[a,r]),l==null||l(),s(!1),c("")},onError:d=>{const h=fe(d,o==="pending"?"Failed to submit your edit. Please try again.":"Failed to update project pages.");_({title:o==="pending"?"Could not submit edit":"Could not save project pages",description:h,variant:"destructive"})}}),S=()=>{const d=f.trim();return d?u.some(h=>h.url===d)?(alert("This project page URL is already added"),null):[...u,{url:d,is_official:!1}]:u},b=()=>{const d=S();d!==null&&d.length!==u.length&&(g(d),c(""))},k=d=>{g(u.filter(h=>h.url!==d))},$=d=>{g(u.map(h=>h.url===d?{...h,is_official:!h.is_official}:h))},E=()=>{const d=S();d!==null&&(o==="direct"&&n.some(h=>!d.some(w=>w.url===h.url))&&!window.confirm("Remove one or more project pages from this paper?")||C.mutate({paperId:a,projectPages:d}))},v=m.useMemo(()=>{const d=f.trim(),h=d?[...u,{url:d,is_official:!1}]:u;if(h.length!==n.length)return!0;const w=new Map(n.map(A=>[A.url.trim(),!!A.is_official]));return h.some(A=>{const z=w.get(A.url.trim());return z===void 0||z!==!!A.is_official})},[u,f,n]);return e.jsx(ae,{open:t,onOpenChange:s,children:e.jsxs(re,{className:"max-w-2xl max-h-[600px]",children:[e.jsxs(ne,{children:[e.jsx(ie,{children:"Edit Paper Project Pages"}),e.jsx(oe,{children:"Add or remove project page URLs (e.g. authors' demo or landing pages) associated with this paper. Mark pages as official if they are created by the paper authors."})]}),o==="pending"&&e.jsx(xe,{isAuthor:i}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("label",{className:"text-sm font-medium",children:"Add Project Page URL"}),e.jsxs("div",{className:"flex space-x-2",children:[e.jsx(W,{type:"url",placeholder:"https://example.com/project",value:f,onChange:d=>c(d.target.value),onKeyPress:d=>{d.key==="Enter"&&(d.preventDefault(),b())},className:"flex-1"}),e.jsxs(L,{onClick:b,size:"sm",disabled:!f.trim(),children:[e.jsx(Ue,{className:"w-4 h-4 mr-1"}),"Add"]})]})]}),e.jsx("div",{className:"py-4 overflow-y-auto max-h-[350px]",children:u.length>0?e.jsx("div",{className:"space-y-2",children:u.map((d,h)=>e.jsxs("div",{className:"flex items-center space-x-2 p-3 bg-muted/30 rounded-lg hover:bg-muted/50 transition-colors",children:[e.jsx(Gt,{className:"w-4 h-4 text-muted-foreground flex-shrink-0"}),e.jsx("div",{className:"flex-1 min-w-0",children:e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx("span",{className:"text-sm font-medium text-paper-blue truncate",children:d.url}),d.is_official&&e.jsx(fs,{variant:"secondary",className:"text-xs",children:"Official"})]})}),e.jsxs("div",{className:"flex items-center space-x-1",children:[e.jsxs(L,{variant:d.is_official?"default":"outline",size:"sm",onClick:()=>$(d.url),className:"h-8 px-2 text-xs",title:d.is_official?"Click to unmark as official (created by paper authors)":"Click to mark as official (created by paper authors)",children:[e.jsx(gs,{className:`w-3.5 h-3.5 mr-1 ${d.is_official?"fill-current":""}`}),d.is_official?"Official":"Mark official"]}),e.jsx(L,{variant:"ghost",size:"sm",onClick:()=>k(d.url),className:"h-8 px-2 text-destructive hover:text-destructive",title:"Remove project page",children:e.jsx(Te,{className:"w-4 h-4"})})]})]},h))}):e.jsxs("div",{className:"text-center py-8 text-muted-foreground",children:[e.jsx(Gt,{className:"w-8 h-8 mx-auto mb-2 opacity-50"}),e.jsx("p",{className:"text-sm",children:"No project pages added yet"}),e.jsx("p",{className:"text-xs mt-1",children:"Add a project page URL above to get started"})]})}),e.jsxs(de,{children:[e.jsx(L,{variant:"outline",onClick:()=>s(!1),children:"Cancel"}),e.jsx(L,{onClick:E,disabled:C.isPending||!v,children:C.isPending?e.jsxs(e.Fragment,{children:[e.jsx(le,{className:"w-4 h-4 mr-2 animate-spin"}),o==="pending"?"Submitting...":"Saving..."]}):e.jsxs(e.Fragment,{children:[e.jsx(he,{className:"w-4 h-4 mr-2"}),o==="pending"?"Submit for review":"Save Changes"]})})]})]})})}function Fr({open:t,onOpenChange:s,paperId:a,arxivId:r,initialRepositories:n,onSuccess:l,submitMode:o="direct",isAuthor:i=!1}){const[u,g]=m.useState(n),[f,c]=m.useState(""),x=ce(),{toast:_}=se(),j=m.useRef(!1);m.useEffect(()=>{if(!t){j.current=!1;return}j.current||(j.current=!0,g(n),c(""))},[t,n]);const C=ee({mutationFn:async({paperId:h,repositories:w})=>{if(o==="pending"){const A=await pe.submit({paper_id:parseInt(h),edit_type:"repositories",proposed_payload:{repositories:w}});return ge(A,{toast:_,queryClient:x,paperIds:[h,r],queuedDescription:"Thanks! An admin will review your proposed repository changes shortly."}),null}return Y.updateRepositories(h,w)},onSuccess:h=>{if(o==="pending"){l==null||l(),s(!1),c("");return}h&&ve(x,h,[a,r]),l==null||l(),s(!1),c("")},onError:h=>{const w=fe(h,o==="pending"?"Failed to submit your edit. Please try again.":"Failed to update paper repositories.");_({title:o==="pending"?"Could not submit edit":"Could not save repositories",description:w,variant:"destructive"})}}),S=h=>{const w=[];for(const A of h){const z=w.find(M=>Kt(M.url,A.url));if(z)z.is_official=z.is_official||A.is_official;else{const M=et(A.url);w.push({url:M??A.url.trim(),is_official:A.is_official})}}return w},b=()=>{const h=f.trim(),w=h?[...u,{url:h,is_official:!1}]:u;return h&&u.some(A=>Kt(A.url,h))?(alert("This repository URL is already added"),null):S(w)},k=()=>{const h=b();h!==null&&h.length!==u.length&&(g(h),c(""))},$=h=>{g(u.filter(w=>w.url!==h))},E=h=>{g(u.map(w=>w.url===h?{...w,is_official:!w.is_official}:w))},v=()=>{const h=b();h!==null&&(o==="direct"&&n.some(w=>!h.some(A=>A.url===w.url))&&!window.confirm("Remove one or more repositories from this paper?")||C.mutate({paperId:a,repositories:h}))},d=m.useMemo(()=>{const h=f.trim(),w=h?[...u,{url:h,is_official:!1}]:u;if(w.length!==n.length)return!0;const A=S(n),z=S(w);if(z.length!==A.length)return!0;const M=new Map(A.map(K=>[et(K.url)??K.url.trim(),!!K.is_official]));return z.some(K=>{const G=et(K.url)??K.url.trim(),p=M.get(G);return p===void 0||p!==!!K.is_official})},[u,f,n]);return e.jsx(ae,{open:t,onOpenChange:s,children:e.jsxs(re,{className:"max-w-2xl max-h-[600px]",children:[e.jsxs(ne,{children:[e.jsx(ie,{children:"Edit Paper Repositories"}),e.jsx(oe,{children:"Add or remove GitHub repository URLs associated with this paper. Mark repositories as official if they are created by the paper authors."})]}),o==="pending"&&e.jsx(xe,{isAuthor:i}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("label",{className:"text-sm font-medium",children:"Add Repository URL"}),e.jsxs("div",{className:"flex space-x-2",children:[e.jsx(W,{type:"url",placeholder:"https://github.com/owner/repo",value:f,onChange:h=>c(h.target.value),onKeyPress:h=>{h.key==="Enter"&&(h.preventDefault(),k())},className:"flex-1"}),e.jsxs(L,{onClick:k,size:"sm",disabled:!f.trim(),children:[e.jsx(Ue,{className:"w-4 h-4 mr-1"}),"Add"]})]})]}),e.jsx("div",{className:"py-4 overflow-y-auto max-h-[350px]",children:u.length>0?e.jsx("div",{className:"space-y-2",children:u.map((h,w)=>e.jsxs("div",{className:"flex items-center space-x-2 p-3 bg-muted/30 rounded-lg hover:bg-muted/50 transition-colors",children:[e.jsx(Xt,{className:"w-4 h-4 text-muted-foreground flex-shrink-0"}),e.jsx("div",{className:"flex-1 min-w-0",children:e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx("span",{className:"text-sm font-medium text-paper-blue truncate",children:h.url}),h.is_official&&e.jsx(fs,{variant:"secondary",className:"text-xs",children:"Official"})]})}),e.jsxs("div",{className:"flex items-center space-x-1",children:[e.jsxs(L,{variant:h.is_official?"default":"outline",size:"sm",onClick:()=>E(h.url),className:"h-8 px-2 text-xs",title:h.is_official?"Click to unmark as official (created by paper authors)":"Click to mark as official (created by paper authors)",children:[e.jsx(gs,{className:`w-3.5 h-3.5 mr-1 ${h.is_official?"fill-current":""}`}),h.is_official?"Official":"Mark official"]}),e.jsx(L,{variant:"ghost",size:"sm",onClick:()=>$(h.url),className:"h-8 px-2 text-destructive hover:text-destructive",title:"Remove repository",children:e.jsx(Te,{className:"w-4 h-4"})})]})]},w))}):e.jsxs("div",{className:"text-center py-8 text-muted-foreground",children:[e.jsx(Xt,{className:"w-8 h-8 mx-auto mb-2 opacity-50"}),e.jsx("p",{className:"text-sm",children:"No repositories added yet"}),e.jsx("p",{className:"text-xs mt-1",children:"Add a repository URL above to get started"})]})}),e.jsxs(de,{children:[e.jsx(L,{variant:"outline",onClick:()=>s(!1),children:"Cancel"}),e.jsx(L,{onClick:v,disabled:C.isPending||!d,children:C.isPending?e.jsxs(e.Fragment,{children:[e.jsx(le,{className:"w-4 h-4 mr-2 animate-spin"}),o==="pending"?"Submitting...":"Saving..."]}):e.jsxs(e.Fragment,{children:[e.jsx(he,{className:"w-4 h-4 mr-2"}),o==="pending"?"Submit for review":"Save Changes"]})})]})]})})}function Lr({open:t,onOpenChange:s,paperId:a,arxivId:r,initialUrl:n,onSuccess:l,submitMode:o="direct",isAuthor:i=!1}){const[u,g]=m.useState(n),f=ce(),{toast:c}=se(),x=m.useRef(!1);m.useEffect(()=>{if(!t){x.current=!1;return}x.current||(x.current=!0,g(n))},[t,n]);const _=ee({mutationFn:async({paperId:k,sourceUrl:$})=>{if(o==="pending"){const E=await pe.submit({paper_id:parseInt(k),edit_type:"source_url",proposed_payload:{source_url:$}});return ge(E,{toast:c,queryClient:f,paperIds:[k,r],queuedDescription:"Thanks! An admin will review your proposed source URL change shortly."}),null}return Y.updateSourceUrl(k,$)},onSuccess:k=>{if(o==="pending"){l==null||l(),s(!1);return}k&&ve(f,k,[a,r]),l==null||l(),s(!1)},onError:k=>{const $=fe(k,o==="pending"?"Failed to submit your edit. Please try again.":"Failed to update source URL.");c({title:o==="pending"?"Could not submit edit":"Could not save source URL",description:$,variant:"destructive"})}}),j=u.trim(),C=/^https?:\/\//i.test(j),S=j!==(n||"").trim(),b=()=>{C&&_.mutate({paperId:a,sourceUrl:j})};return e.jsx(ae,{open:t,onOpenChange:s,children:e.jsxs(re,{className:"max-w-2xl",children:[e.jsxs(ne,{children:[e.jsx(ie,{children:"Edit Source URL"}),e.jsxs(oe,{children:["Update the canonical URL for this external paper. This is the page the ",'"Source page"'," button links to. ArXiv papers cannot edit this field."]})]}),o==="pending"&&e.jsx(xe,{isAuthor:i}),e.jsxs("div",{className:"space-y-2 py-2",children:[e.jsx("label",{className:"text-sm font-medium",children:"Source URL"}),e.jsx(W,{type:"url",placeholder:"https://example.com/paper",value:u,onChange:k=>g(k.target.value),onKeyPress:k=>{k.key==="Enter"&&C&&S&&(k.preventDefault(),b())}}),!C&&j.length>0&&e.jsx("p",{className:"text-xs text-destructive",children:"URL must start with http:// or https://"})]}),e.jsxs(de,{children:[e.jsx(L,{variant:"outline",onClick:()=>s(!1),children:"Cancel"}),e.jsx(L,{onClick:b,disabled:_.isPending||!C||!S,children:_.isPending?e.jsxs(e.Fragment,{children:[e.jsx(le,{className:"w-4 h-4 mr-2 animate-spin"}),o==="pending"?"Submitting...":"Saving..."]}):e.jsxs(e.Fragment,{children:[e.jsx(he,{className:"w-4 h-4 mr-2"}),o==="pending"?"Submit for review":"Save Changes"]})})]})]})})}const Tr=250,Ur=100;function Dr({open:t,onOpenChange:s,paperId:a,arxivId:r,initialTaskIds:n,initialTasks:l,onSuccess:o,submitMode:i="direct",isAuthor:u=!1}){const[g,f]=m.useState(n),[c,x]=m.useState(!1),[_,j]=m.useState(""),[C,S]=m.useState(""),[b,k]=m.useState(new Map),$=ce(),{toast:E}=se(),v=m.useRef(!1);m.useEffect(()=>{if(!t){v.current=!1;return}if(v.current)return;v.current=!0,f(n),j(""),S("");const p=new Map;(l||[]).forEach(R=>{const I=parseInt(R.id);Number.isNaN(I)||p.set(I,R)}),k(p)},[t,n,l]),m.useEffect(()=>{const p=window.setTimeout(()=>{S(_.trim())},Tr);return()=>window.clearTimeout(p)},[_]);const{data:d,isFetching:h}=te({queryKey:["tasks-search",C],queryFn:()=>ke.listTasks({page_size:Ur,...C?{q:C}:{}}),enabled:t});m.useEffect(()=>{var p;(p=d==null?void 0:d.results)!=null&&p.length&&k(R=>{const I=new Map(R);return d.results.forEach(U=>{const D=parseInt(U.id);Number.isNaN(D)||I.set(D,U)}),I})},[d]);const w=m.useMemo(()=>{const p=(d==null?void 0:d.results)||[],R=new Set,I=[],U=(q,J)=>{!J||Number.isNaN(q)||R.has(q)||(I.push(J),R.add(q))},D=()=>g.forEach(q=>U(q,b.get(q))),H=()=>p.forEach(q=>U(parseInt(q.id),q));return C?(H(),D()):(D(),H()),I},[d,g,b,C]),A=ee({mutationFn:async({paperId:p,taskIds:R})=>{if(i==="pending"){const I=await pe.submit({paper_id:parseInt(p),edit_type:"tasks",proposed_payload:{task_ids:R}});return ge(I,{toast:E,queryClient:$,paperIds:[p,r],queuedDescription:"Thanks! An admin will review your proposed task changes shortly."}),null}return Y.updateTasks(p,R)},onMutate:async({taskIds:p})=>{if(i==="pending")return{snapshots:[]};const R=p.map(D=>b.get(D)).filter(D=>!!D).map(D=>({id:D.id,name:D.name,slug:D.slug})).sort((D,H)=>D.name.localeCompare(H.name)),I=Array.from(new Set([a,r].filter(D=>!!D)));await Promise.all(I.flatMap(D=>[$.cancelQueries({queryKey:_e.detail(D)}),$.cancelQueries({queryKey:_e.arxiv(D)})]));const U=[];return I.forEach(D=>{[_e.detail(D),_e.arxiv(D)].forEach(H=>{const q=$.getQueryData(H);U.push({key:H,data:q}),q&&$.setQueryData(H,{...q,tasks:R})})}),o==null||o(),s(!1),{snapshots:U}},onSuccess:(p,{taskIds:R})=>{if(i==="pending"){o==null||o(),s(!1);return}E({title:"Tasks updated",description:`Saved ${R.length} task${R.length===1?"":"s"} for this paper.`}),p&&ve($,p,[a,r])},onError:(p,R,I)=>{var D;(D=I==null?void 0:I.snapshots)==null||D.forEach(({key:H,data:q})=>{$.setQueryData(H,q)});const U=fe(p,i==="pending"?"Failed to submit your edit. Please try again.":"Failed to update paper tasks.");E({title:i==="pending"?"Could not submit edit":"Could not save tasks",description:U,variant:"destructive"})}}),z=()=>{i==="direct"&&n.some(p=>!g.includes(p))&&!window.confirm("Remove one or more task links from this paper?")||A.mutate({paperId:a,taskIds:g})},M=m.useMemo(()=>{if(g.length!==n.length)return!0;const p=new Set(n);return g.some(R=>!p.has(R))},[g,n]),K=(p,R)=>{f(I=>R?I.includes(p)?I:[...I,p]:I.filter(U=>U!==p))},G=()=>j("");return e.jsxs(ae,{open:t,onOpenChange:s,children:[e.jsxs(re,{className:"max-w-2xl max-h-[600px]",children:[e.jsxs(ne,{children:[e.jsx(ie,{children:"Edit Paper Tasks"}),e.jsx(oe,{children:"Select the tasks that this paper addresses. You can select multiple tasks."})]}),i==="pending"&&e.jsx(xe,{isAuthor:u}),e.jsxs("div",{className:"relative mb-4",children:[e.jsx(Fe,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground"}),e.jsx(W,{type:"text",placeholder:"Search tasks...",value:_,onChange:p=>j(p.target.value),className:"pl-9 pr-9"}),_&&e.jsx("button",{type:"button",onClick:G,className:"absolute right-2 top-1/2 -translate-y-1/2 p-1 text-muted-foreground hover:text-foreground","aria-label":"Clear search",children:e.jsx(St,{className:"w-4 h-4"})})]}),e.jsx("div",{className:"py-4 overflow-y-auto max-h-[400px]",children:w.length>0?e.jsx("div",{className:"space-y-2",children:w.map(p=>{const R=parseInt(p.id),I=g.includes(R);return e.jsxs("div",{className:"flex items-center space-x-2 p-2 hover:bg-muted/50 rounded-md",children:[e.jsx(Ve,{id:`task-${p.id}`,checked:I,onCheckedChange:U=>K(R,U===!0),className:"!border !border-black data-[state=checked]:!bg-black data-[state=checked]:!text-white"}),e.jsxs("label",{htmlFor:`task-${p.id}`,className:"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 cursor-pointer flex-1",children:[p.name,p.description&&e.jsxs("span",{className:"block text-xs text-muted-foreground font-normal mt-1",children:[p.description.substring(0,100),p.description.length>100?"...":""]})]})]},p.id)})}):h?e.jsxs("div",{className:"text-center py-8 text-muted-foreground",children:[e.jsx(le,{className:"w-8 h-8 mx-auto mb-2 animate-spin"}),e.jsx("p",{children:"Loading tasks..."})]}):e.jsxs("div",{className:"text-center py-8 text-muted-foreground",children:[e.jsx(Fe,{className:"w-8 h-8 mx-auto mb-2 opacity-50"}),e.jsx("p",{children:C?`No tasks found matching "${C}"`:"No tasks available"})]})}),e.jsxs(de,{children:[e.jsx(L,{variant:"ghost",className:"sm:mr-auto",onClick:()=>x(!0),children:"Suggest a new task"}),e.jsx(L,{variant:"outline",onClick:()=>s(!1),children:"Cancel"}),e.jsx(L,{onClick:z,disabled:A.isPending||!M,children:A.isPending?e.jsxs(e.Fragment,{children:[e.jsx(le,{className:"w-4 h-4 mr-2 animate-spin"}),i==="pending"?"Submitting...":"Saving..."]}):e.jsxs(e.Fragment,{children:[e.jsx(he,{className:"w-4 h-4 mr-2"}),i==="pending"?"Submit for review":"Save Changes"]})})]})]}),e.jsx(Et,{open:c,onOpenChange:x,paperId:a,kind:"task"})]})}const Jt=10,Br=/^https?:\/\/(?:www\.|mobile\.)?(?:x|twitter)\.com\/(?:[A-Za-z0-9_]{1,15}|i\/web|i)\/status(?:es)?\/(\d{1,25})(?:[/?#].*)?$/;function Ce(t){var s;return((s=Br.exec(t.trim()))==null?void 0:s[1])??null}function zr({open:t,onOpenChange:s,paperId:a,arxivId:r,initialUrls:n,submitMode:l="direct",isAuthor:o=!1}){const[i,u]=m.useState(n),[g,f]=m.useState(""),[c,x]=m.useState(null),_=ce(),{toast:j}=se(),C=m.useRef(!1);m.useEffect(()=>{if(!t){C.current=!1;return}C.current||(C.current=!0,u(n),f(""),x(null))},[t,n]);const S=ee({mutationFn:async d=>{if(l==="pending"){const h=await pe.submit({paper_id:parseInt(a),edit_type:"x_threads",proposed_payload:{x_threads:d}});return ge(h,{toast:j,queryClient:_,paperIds:[a,r],queuedDescription:"Thanks! An admin will review your proposed X threads shortly."}),null}return Y.updateXThreads(a,d)},onSuccess:d=>{l!=="pending"&&d&&ve(_,d,[a,r]),s(!1)},onError:d=>{j({title:l==="pending"?"Could not submit edit":"Could not save X threads",description:fe(d,l==="pending"?"Failed to submit your edit. Please try again.":"Failed to update X threads."),variant:"destructive"})}}),b=()=>{const d=g.trim();if(!d)return i;const h=Ce(d);return h?i.some(w=>Ce(w)===h)?(x("This post is already listed."),null):i.length>=Jt?(x(`A paper can link at most ${Jt} X threads.`),null):[...i,d]:(x("Paste a post URL such as https://x.com/user/status/123…"),null)},k=()=>{const d=b();d!==null&&(u(d),f(""),x(null))},$=(d,h)=>{const w=[...i];[w[d],w[d+h]]=[w[d+h],w[d]],u(w)},E=()=>{const d=b();d!==null&&(l==="direct"&&n.some(h=>!d.some(w=>Ce(w)===Ce(h)))&&!window.confirm("Remove one or more X threads from this paper?")||S.mutate(d))},v=m.useMemo(()=>(g.trim()?[...i,g.trim()]:i).map(Ce).join()!==n.map(Ce).join(),[i,g,n]);return e.jsx(ae,{open:t,onOpenChange:s,children:e.jsxs(re,{className:"max-w-2xl max-h-[600px]",children:[e.jsxs(ne,{children:[e.jsx(ie,{children:"Edit X threads"}),e.jsx(oe,{children:"Link posts on X (formerly Twitter) in which the authors introduce this paper. A preview of each post is shown on the paper page."})]}),l==="pending"&&e.jsx(xe,{isAuthor:o}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("label",{className:"text-sm font-medium",htmlFor:"x-thread-url",children:"Add X post URL"}),e.jsxs("div",{className:"flex space-x-2",children:[e.jsx(W,{id:"x-thread-url",type:"url",placeholder:"https://x.com/user/status/1234567890",value:g,onChange:d=>{f(d.target.value),x(null)},onKeyDown:d=>{d.key==="Enter"&&(d.preventDefault(),k())},"aria-invalid":!!c,className:"flex-1"}),e.jsxs(L,{onClick:k,size:"sm",disabled:!g.trim(),children:[e.jsx(Ue,{className:"w-4 h-4 mr-1"}),"Add"]})]}),c&&e.jsx("p",{className:"text-xs text-destructive",children:c})]}),e.jsx("div",{className:"py-4 overflow-y-auto max-h-[350px]",children:i.length>0?e.jsx("div",{className:"space-y-2",children:i.map((d,h)=>e.jsxs("div",{className:"flex items-center space-x-2 p-3 bg-muted/30 rounded-lg",children:[e.jsx("span",{className:"flex-1 min-w-0 truncate text-sm font-medium",children:d}),e.jsx(L,{variant:"ghost",size:"sm",className:"h-8 px-2",disabled:h===0,onClick:()=>$(h,-1),"aria-label":"Move up",children:e.jsx(Ha,{className:"w-4 h-4"})}),e.jsx(L,{variant:"ghost",size:"sm",className:"h-8 px-2",disabled:h===i.length-1,onClick:()=>$(h,1),"aria-label":"Move down",children:e.jsx(za,{className:"w-4 h-4"})}),e.jsx(L,{variant:"ghost",size:"sm",className:"h-8 px-2 text-destructive hover:text-destructive",onClick:()=>u(i.filter(w=>w!==d)),"aria-label":"Remove X thread",children:e.jsx(Te,{className:"w-4 h-4"})})]},d))}):e.jsx("p",{className:"text-center py-8 text-sm text-muted-foreground",children:"No X threads linked yet"})}),e.jsxs(de,{children:[e.jsx(L,{variant:"outline",onClick:()=>s(!1),children:"Cancel"}),e.jsx(L,{onClick:E,disabled:S.isPending||!v,children:S.isPending?e.jsxs(e.Fragment,{children:[e.jsx(le,{className:"w-4 h-4 mr-2 animate-spin"}),l==="pending"?"Submitting...":"Saving..."]}):e.jsxs(e.Fragment,{children:[e.jsx(he,{className:"w-4 h-4 mr-2"}),l==="pending"?"Submit for review":"Save Changes"]})})]})]})})}function Hr({activeEditor:t,arxivId:s,editSubmitMode:a,evaluations:r,isAdmin:n,isLinkedAuthor:l,onOpenChange:o,paper:i}){if(!t)return null;const u={open:!0,paperId:i.id,arxivId:s,submitMode:a,isAuthor:l},g=c=>x=>o(c,x);return{tasks:()=>{var c;return e.jsx(Dr,{...u,onOpenChange:g("tasks"),initialTaskIds:((c=i.tasks)==null?void 0:c.map(x=>Number(x.id)))??[],initialTasks:i.tasks??[]})},methods:()=>{var c;return e.jsx(Er,{...u,onOpenChange:g("methods"),initialMethodIds:((c=i.methods)==null?void 0:c.map(x=>Number(x.id)))??[],initialMethods:i.methods??[]})},repositories:()=>{var c;return e.jsx(Fr,{...u,onOpenChange:g("repositories"),initialRepositories:((c=i.repositories)==null?void 0:c.map(({url:x,is_official:_})=>({url:x,is_official:!!_})))??[]})},"project-pages":()=>{var c;return e.jsx(Ar,{...u,onOpenChange:g("project-pages"),initialProjectPages:((c=i.project_pages)==null?void 0:c.map(({url:x,is_official:_})=>({url:x,is_official:!!_})))??[]})},results:()=>e.jsx(jr,{...u,onOpenChange:g("results"),initialEvaluations:r,paperTasks:i.tasks??[],isAdmin:n}),"source-url":()=>e.jsx(Lr,{...u,onOpenChange:g("source-url"),initialUrl:i.source_url??i.url_abs??""}),"hf-artifacts":()=>e.jsx(yr,{...u,onOpenChange:g("hf-artifacts"),initialArtifacts:{hf_models:i.hf_models??[],hf_datasets:i.hf_datasets??[],hf_spaces:i.hf_spaces??[]}}),"x-threads":()=>{var c;return e.jsx(zr,{...u,onOpenChange:g("x-threads"),initialUrls:((c=i.x_threads)==null?void 0:c.map(({url:x})=>x))??[]})},organizations:()=>e.jsx(Ir,{open:!0,paperId:i.id,onOpenChange:g("organizations"),initialOrganizationIds:(i.organizations??[]).map(({id:c})=>Number(c)),submitMode:a,isAuthor:l})}[t]()}const qr={"add-evals":{trigger:"add evals",running:"adding evals…",complete:"add evals ✓",title:"Add evaluations with Codex",description:t=>e.jsxs(e.Fragment,{children:["Codex will run the repository’s add-evals skill for “",t,"”. It will import only paper-native results onto existing, metric-compatible leaderboards. Accepted rows are written directly to the live database."]}),notice:"Comparator rows, unknown benchmarks, and unconfigured metrics will be skipped. Jobs run one at a time in submission order.",progress:"Codex is researching the paper and validating results against the configured leaderboards.",action:"Run add-evals"},"enrich-paper":{trigger:"enrich paper",running:"enriching…",complete:"enriched ✓",title:"Enrich paper with Codex",description:t=>e.jsxs(e.Fragment,{children:["Codex will run the repository’s enrich-paper skill for “",t,"”. It will validate official code and project links, merge high-confidence taxonomy tags, and check the paper thumbnail. Accepted changes are written directly to the live database."]}),notice:"Uncertain URLs and missing taxonomy concepts will be reported rather than guessed. Jobs run one at a time in submission order.",progress:"Codex is validating artifacts, taxonomy tags, and thumbnail quality for this paper.",action:"Run enrich-paper"}},Zt=new Set(["queued","dispatching","running","awaiting_markdown"]);function Mr({report:t}){return e.jsx("div",{className:"min-w-0 max-h-[50vh] overflow-y-auto overflow-x-hidden rounded-md border bg-muted/40 p-4 text-sm leading-relaxed",children:e.jsx(Fa,{remarkPlugins:[La],components:{a:({children:s,...a})=>e.jsx("a",{...a,className:"break-all underline underline-offset-2",target:"_blank",rel:"noreferrer",children:s}),p:({children:s})=>e.jsx("p",{className:"mb-3 break-words last:mb-0",children:s}),ul:({children:s})=>e.jsx("ul",{className:"mb-3 list-disc space-y-1 pl-5 last:mb-0",children:s}),ol:({children:s})=>e.jsx("ol",{className:"mb-3 list-decimal space-y-1 pl-5 last:mb-0",children:s}),h1:({children:s})=>e.jsx("h3",{className:"mb-2 font-semibold",children:s}),h2:({children:s})=>e.jsx("h3",{className:"mb-2 font-semibold",children:s}),h3:({children:s})=>e.jsx("h3",{className:"mb-2 font-semibold",children:s}),code:({children:s})=>e.jsx("code",{className:"break-all rounded bg-background/80 px-1 py-0.5 font-mono text-xs",children:s}),pre:({children:s})=>e.jsx("pre",{className:"mb-3 max-w-full overflow-x-auto whitespace-pre-wrap break-words rounded bg-background/80 p-3 font-mono text-xs last:mb-0",children:s})},children:t})})}function Es({kind:t,paperId:s,paperTitle:a,triggerClassName:r,onComplete:n}){var h;const l=qr[t],o=ce(),[i,u]=m.useState(!1),[g,f]=m.useState(null),c=m.useRef(null),x=w=>["admin","codexPaperJob",t,w],_=te({queryKey:x(g),queryFn:()=>tt.getPaperJob(t,g),enabled:g!==null,refetchInterval:w=>{var z;const A=(z=w.state.data)==null?void 0:z.status;return A==="awaiting_markdown"?6e4:A&&Zt.has(A)?2e3:!1},retry:!1}),j=w=>{o.setQueryData(x(w.id),w),f(w.id)},C=ee({mutationFn:()=>tt.startPaperJob(t,s),onSuccess:j}),S=ee({mutationFn:w=>tt.cancelPaperJob(t,w),onSuccess:j}),b=g?_.data:void 0,k=(b==null?void 0:b.status)==="awaiting_markdown",$=b?Zt.has(b.status):!1,E=_.errorUpdatedAt>_.dataUpdatedAt?_.error:null,v=(h=C.error??S.error??E)==null?void 0:h.message;m.useEffect(()=>{(b==null?void 0:b.status)!=="completed"||c.current===b.id||(c.current=b.id,n())},[b,n]);const d=()=>{f(null),C.reset(),S.reset(),c.current=null};return e.jsxs(ae,{open:i,onOpenChange:u,children:[e.jsx("button",{type:"button",className:r,onClick:()=>u(!0),children:k?"waiting for Markdown…":$?l.running:(b==null?void 0:b.status)==="completed"?l.complete:l.trigger}),e.jsxs(re,{className:"max-h-[90vh] w-[calc(100vw-2rem)] min-w-0 max-w-2xl overflow-hidden",children:[e.jsxs(ne,{className:"min-w-0",children:[e.jsx(ie,{children:l.title}),e.jsx(oe,{children:l.description(a)})]}),b?e.jsxs("div",{className:"min-w-0 space-y-3 overflow-hidden",children:[e.jsxs("div",{className:"font-mono text-xs uppercase tracking-wide text-muted-foreground",children:["Status: ",b.status.replace("_"," ")]}),b.hf_job_url&&e.jsx("a",{className:"text-sm underline",href:b.hf_job_url,target:"_blank",rel:"noreferrer",children:"View Hugging Face Job"}),k&&e.jsxs("div",{className:"rounded-md border bg-muted/40 p-3 text-sm",children:[Aa," You can close this window and return."]}),$&&!k&&e.jsxs("div",{className:"rounded-md border bg-muted/40 p-3 text-sm",children:[b.status==="queued"?"This job is queued and will start after the current Codex job finishes.":l.progress," ","This can take several minutes; you can close this window and return."]}),b.report&&e.jsx(Mr,{report:b.report}),b.error&&!k&&e.jsx("div",{className:"rounded-md border border-destructive/40 bg-destructive/10 p-3 text-sm text-destructive",children:b.error})]}):e.jsx("div",{className:"rounded-md border bg-muted/40 p-3 text-sm text-muted-foreground",children:l.notice}),v&&e.jsx("div",{className:"rounded-md border border-destructive/40 bg-destructive/10 p-3 text-sm text-destructive",children:v}),e.jsxs(de,{children:[e.jsx(L,{variant:"outline",onClick:()=>u(!1),children:$?"Close":"Cancel"}),$&&b&&e.jsx(L,{variant:"outline",onClick:()=>S.mutate(b.id),children:"Cancel job"}),!b&&e.jsx(L,{onClick:()=>C.mutate(),disabled:C.isPending,children:C.isPending?"Starting…":l.action}),b&&!$&&e.jsx(L,{variant:"outline",onClick:d,children:"Run again"})]})]})]})}function Me({accent:t,id:s,label:a}){return e.jsxs("div",{className:"section-rule paper-section-anchor",id:s,children:[e.jsx("span",{children:e.jsx("a",{href:`#${s}`,className:"section-anchor-link",children:a})}),t]})}function Or({canCopyBadge:t,canEdit:s,evaluationsByTask:a,evaluationsLoading:r,isAdmin:n,onCopyBadge:l,onEdit:o,onRefresh:i,paper:u,visibleEvaluationCount:g}){return e.jsxs(e.Fragment,{children:[e.jsx(Me,{id:"results",label:"Results",accent:e.jsxs("span",{className:"accent",children:[g," benchmarks",t&&e.jsxs("button",{type:"button",className:"edit-link results-badge-copy",onClick:l,title:"Copy live leaderboard badges for your repository README",children:[e.jsx(V,{name:"copy",size:10})," Copy PwC badge"]}),n&&Vs()&&e.jsx(Es,{kind:"add-evals",triggerClassName:"edit-link",paperId:Number(u.id),paperTitle:u.title,onComplete:i}),s&&e.jsx("button",{type:"button",onClick:o,className:"edit-link",children:"edit"})]})}),r?e.jsx(Ie,{className:"h-32 w-full"}):a.length>0?a.map(f=>e.jsxs("div",{className:f.taskSlug?"paper-section-anchor":void 0,id:f.taskSlug?bs(f.taskSlug):void 0,children:[e.jsxs("div",{className:"section-rule",children:[e.jsx("span",{children:f.taskSlug?e.jsxs(e.Fragment,{children:[e.jsx(me,{to:`/tasks/${f.taskSlug}`,children:f.taskName}),e.jsx("a",{href:tr(f.taskSlug),className:"section-anchor-link results-task-permalink","aria-label":`Permalink to ${f.taskName} results on this paper`,title:"Link to this task's results",children:"#"})]}):f.taskName}),e.jsxs("span",{className:"accent",children:[f.rows.length," ",f.rows.length===1?"result":"results"]})]}),e.jsxs("table",{className:"results-table",children:[e.jsxs("colgroup",{children:[e.jsx("col",{style:{width:"28%"}}),e.jsx("col",{style:{width:"28%"}}),e.jsx("col",{style:{width:"14%"}}),e.jsx("col",{style:{width:"12%"}}),e.jsx("col",{style:{width:"8%"}}),e.jsx("col",{style:{width:"10%"}})]}),e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:"Benchmark"}),e.jsx("th",{children:"Model"}),e.jsx("th",{children:"Metric"}),e.jsx("th",{children:"Value"}),e.jsx("th",{children:"Rank"}),e.jsx("th",{children:"Compare"})]})}),e.jsx("tbody",{children:f.rows.map(c=>{var x;return e.jsxs("tr",{children:[e.jsx("td",{className:"benchmark",children:c.dataset_slug?e.jsx(me,{to:`/benchmark/${c.dataset_slug}`,children:c.dataset_name||"—"}):c.dataset_name||"—"}),e.jsxs("td",{className:"model",title:c.model_name||void 0,children:[c.hf_model_url?e.jsx("a",{href:c.hf_model_url,target:"_blank",rel:"noopener noreferrer",className:"model-hf-link",title:`Open ${c.model_name||"model"} on Hugging Face`,children:c.model_name||"—"}):c.model_name||"—",c.is_open===!1&&e.jsx(ga,{}),(c.external??c.is_external)&&e.jsx(xa,{sourceUrl:c.source_url||c.external_source_url||c.result_url})]}),e.jsx("td",{className:"metric",children:c.best_metric}),e.jsx("td",{className:"value",children:Ws((x=c.metrics)==null?void 0:x[c.best_metric||""])}),e.jsx("td",{className:"rank",children:c.best_rank!=null?`#${c.best_rank}`:"—"}),e.jsx("td",{className:"compare",children:c.dataset_slug&&e.jsx(me,{to:`/benchmark/${c.dataset_slug}?${[c.task_slug?`task=${encodeURIComponent(c.task_slug)}`:"",`eval=${encodeURIComponent(c.id)}`].filter(Boolean).join("&")}`,children:"Compare →"})})]},c.id)})})]})]},f.taskId)):e.jsx("p",{style:{fontFamily:"var(--mono)",fontSize:12,color:"var(--ink-faint)"},children:"No benchmark results recorded yet."})]})}var Rt="Radio",[Kr,Ps]=Ct(Rt),[Gr,Xr]=Kr(Rt),$s=m.forwardRef((t,s)=>{const{__scopeRadio:a,name:r,checked:n=!1,required:l,disabled:o,value:i="on",onCheck:u,form:g,...f}=t,[c,x]=m.useState(null),_=Le(s,S=>x(S)),j=m.useRef(!1),C=c?g||!!c.closest("form"):!0;return e.jsxs(Gr,{scope:a,checked:n,disabled:o,children:[e.jsx(Ne.button,{type:"button",role:"radio","aria-checked":n,"data-state":Fs(n),"data-disabled":o?"":void 0,disabled:o,value:i,...f,ref:_,onClick:Ae(t.onClick,S=>{n||u==null||u(),C&&(j.current=S.isPropagationStopped(),j.current||S.stopPropagation())})}),C&&e.jsx(As,{control:c,bubbles:!j.current,name:r,value:i,checked:n,required:l,disabled:o,form:g,style:{transform:"translateX(-100%)"}})]})});$s.displayName=Rt;var Rs="RadioIndicator",Is=m.forwardRef((t,s)=>{const{__scopeRadio:a,forceMount:r,...n}=t,l=Xr(Rs,a);return e.jsx(is,{present:r||l.checked,children:e.jsx(Ne.span,{"data-state":Fs(l.checked),"data-disabled":l.disabled?"":void 0,...n,ref:s})})});Is.displayName=Rs;var Qr="RadioBubbleInput",As=m.forwardRef(({__scopeRadio:t,control:s,checked:a,bubbles:r=!0,...n},l)=>{const o=m.useRef(null),i=Le(o,l),u=ps(a),g=ls(s);return m.useEffect(()=>{const f=o.current;if(!f)return;const c=window.HTMLInputElement.prototype,_=Object.getOwnPropertyDescriptor(c,"checked").set;if(u!==a&&_){const j=new Event("click",{bubbles:r});_.call(f,a),f.dispatchEvent(j)}},[u,a,r]),e.jsx(Ne.input,{type:"radio","aria-hidden":!0,defaultChecked:a,...n,tabIndex:-1,ref:i,style:{...n.style,...g,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});As.displayName=Qr;function Fs(t){return t?"checked":"unchecked"}var Vr=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],We="RadioGroup",[Wr]=Ct(We,[cs,Ps]),Ls=cs(),Ts=Ps(),[Yr,Jr]=Wr(We),Us=m.forwardRef((t,s)=>{const{__scopeRadioGroup:a,name:r,defaultValue:n,value:l,required:o=!1,disabled:i=!1,orientation:u,dir:g,loop:f=!0,onValueChange:c,...x}=t,_=Ls(a),j=Ys(g),[C,S]=os({prop:l,defaultProp:n??null,onChange:c,caller:We});return e.jsx(Yr,{scope:a,name:r,required:o,disabled:i,value:C,onValueChange:S,children:e.jsx(Js,{asChild:!0,..._,orientation:u,dir:j,loop:f,children:e.jsx(Ne.div,{role:"radiogroup","aria-required":o,"aria-orientation":u,"data-disabled":i?"":void 0,dir:j,...x,ref:s})})})});Us.displayName=We;var Ds="RadioGroupItem",Bs=m.forwardRef((t,s)=>{const{__scopeRadioGroup:a,disabled:r,...n}=t,l=Jr(Ds,a),o=l.disabled||r,i=Ls(a),u=Ts(a),g=m.useRef(null),f=Le(s,g),c=l.value===n.value,x=m.useRef(!1);return m.useEffect(()=>{const _=C=>{Vr.includes(C.key)&&(x.current=!0)},j=()=>x.current=!1;return document.addEventListener("keydown",_),document.addEventListener("keyup",j),()=>{document.removeEventListener("keydown",_),document.removeEventListener("keyup",j)}},[]),e.jsx(Zs,{asChild:!0,...i,focusable:!o,active:c,children:e.jsx($s,{disabled:o,required:l.required,checked:c,...u,...n,name:l.name,ref:f,onCheck:()=>l.onValueChange(n.value),onKeyDown:Ae(_=>{_.key==="Enter"&&_.preventDefault()}),onFocus:Ae(n.onFocus,()=>{var _;x.current&&((_=g.current)==null||_.click())})})})});Bs.displayName=Ds;var Zr="RadioGroupIndicator",zs=m.forwardRef((t,s)=>{const{__scopeRadioGroup:a,...r}=t,n=Ts(a);return e.jsx(Is,{...n,...r,ref:s})});zs.displayName=Zr;var Hs=Us,qs=Bs,en=zs;const vt=m.forwardRef(({className:t,...s},a)=>e.jsx(Hs,{className:Oe("grid gap-2",t),...s,ref:a}));vt.displayName=Hs.displayName;const Re=m.forwardRef(({className:t,...s},a)=>e.jsx(qs,{ref:a,className:Oe("aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",t),...s,children:e.jsx(en,{className:"flex items-center justify-center",children:e.jsx(ea,{className:"h-2.5 w-2.5 fill-current text-current"})})}));Re.displayName=qs.displayName;const tn={pdf:"PDF",model:"Model",dataset:"Dataset",space:"Space",github:"GitHub"},yt=/^[A-Za-z0-9][A-Za-z0-9._-]*$/,sn=/^[A-Za-z0-9][\w.-]*\/[A-Za-z0-9][\w.-]*$/,an=20,_t="copy_to_bucket";function rn(t){const s=t.trim();if(!sn.test(s))return null;const[a,r]=s.split("/");return`https://huggingface.co/buckets/${encodeURIComponent(a)}/${encodeURIComponent(r)}`}function wt(t){return`pwc:bucket-copy:${t}`}function nn(t){if(typeof window>"u"||new URL(window.location.href).searchParams.get(_t)!==t)return null;try{const a=window.sessionStorage.getItem(wt(t));if(!a)return null;const r=JSON.parse(a);return r.paperId!==t||typeof r.bucketId!="string"||!["new","existing"].includes(r.destinationMode)||!["public","private"].includes(r.visibility)||!Array.isArray(r.selectedIds)||r.selectedIds.some(n=>typeof n!="string")?null:r}catch{return null}}function on(t,s=an){if(s<1)throw new Error("Bucket copy batch size must be positive");const a=[];for(let r=0;r!yt.test(u)))return null;const o=l.join("/"),i=s==="model"?"":`${s}s/`;return{id:`${s}:${o}`,kind:s,label:o,url:`https://huggingface.co/${i}${o}`,source:`hf://${i}${o}/`,destination:`${s}s/${o}/`,repoId:o}}catch{return null}}function ln(t){try{const s=new URL(t);if(s.hostname!=="github.com"&&s.hostname!=="www.github.com")return null;const a=s.pathname.split("/").filter(Boolean);if(a.length<2)return null;const r=a[0],n=a[1].replace(/\.git$/,"");if(!yt.test(r)||!yt.test(n))return null;const l=`${r}/${n}`;return{id:`github:${l}`,kind:"github",label:l,url:`https://github.com/${l}`,source:`https://github.com/${l}.git`,destination:`github/${l}/`}}catch{return null}}function cn({githubUrls:t,hfModelUrls:s,hfDatasetUrls:a,hfSpaceUrls:r,paperId:n,pdfName:l,pdfUrl:o}){const i=[o?{id:"pdf",kind:"pdf",label:"Paper PDF",url:o,source:o,destination:`paper/${l||n}.pdf`}:null,...s.map(g=>pt(g,"model")),...a.map(g=>pt(g,"dataset")),...r.map(g=>pt(g,"space")),...t.map(ln)],u=new Set;return i.filter(g=>!g||u.has(g.id)?!1:(u.add(g.id),!0))}function dn(t,s,a){const r=["# Requires the Hugging Face CLI: https://huggingface.co/docs/huggingface_hub/guides/cli",`HF_BUCKET=${He(t.trim())}`];a.create&&r.push(`hf buckets create "$HF_BUCKET" --exist-ok${a.isPrivate?" --private":""}`);for(const o of s.filter(i=>i.kind!=="github"&&i.kind!=="pdf"))r.push(`hf cp ${He(o.source)} "hf://buckets/$HF_BUCKET/${o.destination}"`);const n=s.find(o=>o.kind==="pdf");n&&r.push('PWC_PDF="$(mktemp)"',`trap 'rm -f "$PWC_PDF"' EXIT`,`curl --fail --location ${He(n.source)} --output "$PWC_PDF"`,`hf cp "$PWC_PDF" "hf://buckets/$HF_BUCKET/${n.destination}"`);const l=s.filter(o=>o.kind==="github");if(l.length){r.push('PWC_COPY_DIR="$(mktemp -d)"',`trap 'rm -rf "$PWC_COPY_DIR"' EXIT`);for(const o of l){const i=`$PWC_COPY_DIR/${o.destination.replace(/\/$/,"")}`;r.push(`git clone --depth 1 -- ${He(o.source)} "${i}"`,`hf sync "${i}" "hf://buckets/$HF_BUCKET/${o.destination}" --exclude '.git/**'`)}}return r.join(` -`)}function un(t){return`${(t.split(/[:|–—]/,1)[0]||t).normalize("NFKD").replace(/[\u0300-\u036f]/g,"").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"").slice(0,48).replace(/-+$/g,"")||"paper"}-artifacts`}function mn(t){const{toast:s}=se(),a=m.useMemo(()=>cn({githubUrls:t.githubUrls,hfDatasetUrls:t.hfDatasetUrls,hfModelUrls:t.hfModelUrls,hfSpaceUrls:t.hfSpaceUrls,paperId:t.paperId,pdfName:t.pdfName,pdfUrl:t.pdfUrl}),[t.githubUrls,t.hfDatasetUrls,t.hfModelUrls,t.hfSpaceUrls,t.paperId,t.pdfName,t.pdfUrl]),r=m.useMemo(()=>nn(t.paperId),[t.paperId]),[n,l]=m.useState(!!r),[o,i]=m.useState((r==null?void 0:r.destinationMode)??"new"),[u,g]=m.useState((r==null?void 0:r.bucketId)??""),[f,c]=m.useState((r==null?void 0:r.visibility)??"public"),[x,_]=m.useState(()=>new Set((r==null?void 0:r.selectedIds)??a.map(p=>p.id))),[j,C]=m.useState(!1),[S,b]=m.useState(null),[k,$]=m.useState(!!r),E=a.filter(p=>x.has(p.id)),v=E.length===a.length,d=rn(u),h=d!==null,w=dn(u,E,{create:o==="new",isPrivate:f==="private"}),A=(p,R)=>{_(I=>{const U=new Set(I);return R?U.add(p):U.delete(p),U})},z=async()=>{try{await navigator.clipboard.writeText(w),s({title:"Bucket copy commands copied",description:"Run them in a terminal where the Hugging Face CLI is signed in."})}catch{s({title:"Copy failed",description:"Could not access the clipboard. Select and copy the commands manually.",variant:"destructive"})}},M=m.useCallback(()=>{const p=new URL(window.location.href);p.searchParams.set(_t,t.paperId),window.sessionStorage.setItem(wt(t.paperId),JSON.stringify({paperId:t.paperId,bucketId:u.trim(),destinationMode:o,visibility:f,selectedIds:Array.from(x)})),window.location.assign(ta(p.toString(),{authorizeBucket:!0,bucketCreate:o==="new"}))},[u,o,t.paperId,x,f]),K=m.useCallback(async()=>{if(!t.isSignedIn){M();return}C(!0);let p=0,R=0;try{const I=E.filter(H=>H.kind!=="pdf"&&H.kind!=="github"&&!!H.repoId).map(H=>({kind:H.kind,repo_id:H.repoId})),U=on(I);U.length||U.push([]);for(const[H,q]of U.entries()){b({current:H+1,total:U.length});const J=await Y.copyToBucket(t.paperId,{bucket_id:u.trim(),create:H===0&&o==="new",private:f==="private",include_pdf:H===0&&E.some(Z=>Z.kind==="pdf"),artifacts:q});p+=J.copied.length,R+=J.errors.length}const D=E.filter(H=>H.kind==="github").length;s({title:R?"Bucket copy partially completed":"Copied to bucket",description:[`${p} item${p===1?"":"s"} copied.`,R?`${R} item${R===1?"":"s"} failed.`:"",D?"Use the generated commands below to copy GitHub repositories.":""].filter(Boolean).join(" "),variant:R?"destructive":void 0,action:d?e.jsx(sa,{altText:"Open destination bucket",asChild:!0,children:e.jsx("a",{href:d,target:"_blank",rel:"noopener noreferrer",children:"Open bucket"})}):void 0}),!R&&!D&&l(!1)}catch(I){if(I instanceof xt&&I.code==="bucket_authorization_required"){M();return}s({title:p?"Bucket copy partially completed":"Bucket copy failed",description:p?`${p} item${p===1?"":"s"} copied before the request failed. You can retry or use the CLI commands below.`:I instanceof xt&&typeof I.detail=="string"?I.detail:"Hugging Face could not complete the copy. You can still use the CLI commands below.",variant:"destructive"})}finally{C(!1),b(null)}},[M,u,d,o,t.isSignedIn,t.paperId,E,s,f]);m.useEffect(()=>{if(!k||!t.isSignedIn)return;$(!1),window.sessionStorage.removeItem(wt(t.paperId));const p=new URL(window.location.href);p.searchParams.delete(_t),window.history.replaceState({},"",`${p.pathname}${p.search}${p.hash}`),K()},[K,t.isSignedIn,t.paperId,k]);const G=()=>{_(new Set(a.map(p=>p.id))),!u&&t.suggestedBucketId&&g(t.suggestedBucketId),l(!0)};return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"sidebar-card copy-to-bucket-card",children:[e.jsxs("button",{type:"button",className:"copy-to-bucket-trigger",onClick:G,children:[e.jsx("span",{className:"copy-to-bucket-arrow","aria-hidden":"true",children:"→"}),e.jsx("span",{className:"copy-to-bucket-title",children:"Copy to bucket"}),e.jsx("span",{className:"copy-to-bucket-new",children:"New"})]}),e.jsx("div",{className:"copy-to-bucket-meta",children:a.length?`${a.length} linked artifact${a.length===1?"":"s"}`:"No linked artifacts yet"})]}),e.jsx(ae,{open:n,onOpenChange:l,children:e.jsxs(re,{className:"max-h-[90vh] max-w-2xl grid-rows-[auto_minmax(0,1fr)_auto] overflow-hidden",children:[e.jsxs(ne,{children:[e.jsxs(ie,{className:"flex items-center gap-2",children:[e.jsx("span",{className:"copy-to-bucket-dialog-arrow","aria-hidden":"true",children:"→"}),"Copy to bucket"]}),e.jsx(oe,{children:"Keep your own copy of this paper's PDF, linked code, and Hugging Face artifacts. Hub repositories use Xet's server-side copy; GitHub repositories use the generated CLI fallback."})]}),e.jsx("div",{className:"-mx-6 min-h-0 overflow-y-auto px-6",children:a.length?e.jsxs("div",{className:"space-y-5",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(ue,{children:"Choose your destination"}),e.jsxs(vt,{value:o,onValueChange:p=>i(p),className:"grid grid-cols-2 gap-2",children:[e.jsxs(ue,{className:"bucket-choice",children:[e.jsx(Re,{value:"new"}),"New bucket"]}),e.jsxs(ue,{className:"bucket-choice",children:[e.jsx(Re,{value:"existing"}),"Existing bucket"]})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(ue,{htmlFor:"bucket-id",children:"Bucket name"}),e.jsx(W,{id:"bucket-id",value:u,onChange:p=>g(p.target.value),placeholder:t.suggestedBucketId||"username/paper-artifacts","aria-invalid":u.length>0&&!h}),e.jsxs("div",{className:"flex items-center justify-between gap-3 text-xs",children:[e.jsx("p",{className:"text-muted-foreground",children:"Use the full Hugging Face bucket ID: namespace/name."}),d&&e.jsxs("a",{href:d,target:"_blank",rel:"noopener noreferrer",className:"inline-flex shrink-0 items-center gap-1 underline underline-offset-4",children:["View bucket",e.jsx(V,{name:"external",size:10})]})]})]}),o==="new"&&e.jsxs("div",{className:"space-y-2",children:[e.jsx(ue,{children:"Bucket visibility"}),e.jsxs(vt,{value:f,onValueChange:p=>c(p),className:"flex gap-5",children:[e.jsxs(ue,{className:"flex items-center gap-2 font-normal",children:[e.jsx(Re,{value:"public"}),"Public"]}),e.jsxs(ue,{className:"flex items-center gap-2 font-normal",children:[e.jsx(Re,{value:"private"}),"Private"]})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center justify-between gap-3",children:[e.jsx(ue,{children:"Artifacts"}),e.jsx(L,{type:"button",variant:"outline",size:"sm",className:"h-7 px-2 text-xs",onClick:()=>_(v?new Set:new Set(a.map(p=>p.id))),children:v?"Deselect all":"Select all"})]}),e.jsx("div",{className:"bucket-artifact-list",children:a.map(p=>e.jsxs("div",{className:"bucket-artifact-row",children:[e.jsx(Ve,{id:`bucket-artifact-${p.id}`,checked:x.has(p.id),onCheckedChange:R=>A(p.id,R===!0)}),e.jsxs(ue,{htmlFor:`bucket-artifact-${p.id}`,className:"min-w-0 flex-1 cursor-pointer font-normal",children:[e.jsx("span",{className:"bucket-artifact-kind",children:tn[p.kind]}),e.jsx("span",{className:"bucket-artifact-name",children:p.label})]}),e.jsxs("a",{href:we(p.url)??void 0,target:"_blank",rel:"noopener noreferrer",className:"bucket-artifact-open",children:["Open",e.jsx(V,{name:"external",size:10})]})]},p.id))}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"The PDF and Hugging Face artifacts can be copied directly. GitHub repositories require the CLI workflow below."})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(ue,{htmlFor:"bucket-copy-commands",children:"CLI fallback"}),e.jsx("pre",{id:"bucket-copy-commands",className:"bucket-copy-commands h-[190px]",children:h?w:"Enter a bucket name above to prepare the copy commands."})]})]}):e.jsx("p",{className:"py-5 text-sm text-muted-foreground",children:"This paper does not have a linked GitHub repository or Hugging Face artifact to copy yet."})}),e.jsxs(de,{children:[e.jsx("a",{href:"https://huggingface.co/docs/huggingface_hub/en/guides/buckets",target:"_blank",rel:"noopener noreferrer",className:"mr-auto text-sm text-muted-foreground underline underline-offset-4",children:"About Hugging Face Buckets"}),e.jsxs(L,{type:"button",onClick:z,variant:"outline",disabled:!h||E.length===0,children:[e.jsx(V,{name:"copy",size:12}),"Copy commands"]}),e.jsx(L,{type:"button",onClick:K,disabled:j||t.isSignedIn&&(!h||!E.some(p=>p.kind!=="github")),children:j?S&&S.total>1?`Copying ${S.current}/${S.total}…`:"Copying…":t.isSignedIn?"Copy now":"Sign in & copy"})]})]})})]})}function hn({isLoading:t,papers:s}){return t?e.jsxs("div",{className:"sidebar-card","aria-busy":"true",children:[e.jsx("div",{className:"sidebar-card-title",children:"Related papers"}),e.jsx("div",{className:"related-meta",children:"Finding related work…"})]}):s!=null&&s.length?e.jsxs("div",{className:"sidebar-card",children:[e.jsx("div",{className:"sidebar-card-title",children:"Related papers"}),s.map(a=>e.jsxs(me,{to:`/paper/${a.arxiv_id||a.id}`,target:"_blank",rel:"noopener noreferrer",className:"related-paper",style:{textDecoration:"none",color:"inherit"},children:[e.jsx("div",{className:"related-title",children:e.jsx(qe,{title:a.title})}),e.jsxs("div",{className:"related-meta",children:[e.jsx("span",{children:a.arxiv_id?`arXiv:${a.arxiv_id}`:"External resource"}),a.citation_count!=null&&e.jsxs("span",{children:[a.citation_count.toLocaleString()," cites"]})]})]},a.id))]}):null}const pn=/(https?:\/\/[^\s]+)/g;function fn({size:t=12}){return e.jsx("svg",{width:t,height:t,viewBox:"0 0 24 24","aria-hidden":"true",focusable:"false",children:e.jsx("path",{fill:"currentColor",d:"M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z"})})}function es(t){return t>=1e6?`${(t/1e6).toFixed(1)}M`:t>=1e3?`${(t/1e3).toFixed(1)}k`:String(t)}function gn(t){return new Date(t).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"})}function xn({text:t}){return e.jsx("p",{className:"x-thread-text",children:t.split(pn).map((s,a)=>a%2===1?e.jsx("span",{className:"x-thread-link",children:s.replace(/^https?:\/\/(www\.)?/,"").replace(/\/$/,"")},a):e.jsx(m.Fragment,{children:s},a))})}function bn({thread:t}){const[s,a]=m.useState(!1);return!t.author_avatar_url||s?e.jsx("span",{className:"x-thread-avatar x-thread-avatar--fallback","aria-hidden":"true",children:t.author_name.charAt(0).toUpperCase()}):e.jsx("img",{className:"x-thread-avatar",src:t.author_avatar_url,alt:"",loading:"lazy",referrerPolicy:"no-referrer",onError:()=>a(!0)})}function jn(){var t;return((t=window.matchMedia)==null?void 0:t.call(window,"(prefers-reduced-motion: reduce)").matches)??!1}function vn({thread:t}){const[s,a]=m.useState(!1),[r,n]=m.useState(null),[l,o]=m.useState(!1),i=m.useRef(null),{targetRef:u,isIntersecting:g}=Ta({rootMargin:"200px"}),f=t.video_url;if(m.useEffect(()=>{if(!f||r||l||!g||jn())return;const x=new AbortController;return fetch(f,{referrerPolicy:"no-referrer",signal:x.signal}).then(_=>{if(!_.ok)throw new Error(`HTTP ${_.status}`);return _.blob()}).then(_=>n(URL.createObjectURL(_))).catch(()=>{x.signal.aborted||o(!0)}),()=>x.abort()},[f,r,l,g]),m.useEffect(()=>()=>{r&&URL.revokeObjectURL(r)},[r]),m.useEffect(()=>{const x=i.current;x&&(g?x.play().catch(()=>{}):x.pause())},[g,r]),!t.media_url||s)return null;const c=r&&!l;return e.jsx("div",{className:"x-thread-media",ref:u,children:c?e.jsx("video",{ref:i,src:r,poster:t.media_url,muted:!0,loop:!0,playsInline:!0,autoPlay:!0,"aria-label":"Video",onError:()=>o(!0)}):e.jsxs(e.Fragment,{children:[e.jsx("img",{src:t.media_url,alt:"",loading:"lazy",referrerPolicy:"no-referrer",onError:()=>a(!0)}),t.media_type==="video"&&e.jsx("span",{className:"x-thread-play","aria-label":"Video",children:"▶"})]})})}function yn({thread:t}){const s=we(t.url);return s?e.jsxs("a",{href:s,target:"_blank",rel:"noopener noreferrer",className:"x-thread",children:[e.jsxs("div",{className:"x-thread-header",children:[e.jsx(bn,{thread:t}),e.jsxs("span",{className:"x-thread-author",children:[e.jsx("span",{className:"x-thread-name",children:t.author_name}),e.jsxs("span",{className:"x-thread-handle",children:["@",t.author_handle]})]}),e.jsx("span",{className:"x-thread-logo",children:e.jsx(fn,{})})]}),e.jsx(xn,{text:t.text}),e.jsx(vn,{thread:t}),e.jsxs("div",{className:"x-thread-meta",children:[t.posted_at&&e.jsx("time",{dateTime:t.posted_at,children:gn(t.posted_at)}),t.like_count!=null&&e.jsxs("span",{children:["♥ ",es(t.like_count)]}),t.reply_count!=null&&t.reply_count>0&&e.jsxs("span",{children:[es(t.reply_count)," ",t.reply_count===1?"reply":"replies"]}),e.jsx("span",{className:"x-thread-read",children:"Read on X →"})]})]}):null}function _n({onEdit:t,threads:s}){return e.jsxs("div",{className:"sidebar-card",children:[e.jsxs("div",{className:"sidebar-card-title",children:[e.jsx("span",{children:"X threads"}),e.jsxs("span",{className:"badge",children:[s.length," post",s.length===1?"":"s",e.jsx("button",{type:"button",onClick:t,className:"edit-link",children:"edit"})]})]}),s.length>0?e.jsx("div",{className:"x-thread-list",children:s.map(a=>e.jsx(yn,{thread:a},a.tweet_id))}):e.jsx("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",padding:"6px 0"},children:"No author threads linked yet."})]})}const ft=3,ts=3;function wn(t){return t>=1e3?`${(t/1e3).toFixed(1)}k`:String(t)}function kn({allHfArtifactUrls:t,citationCopied:s,citationDisplay:a,hfArtifactViewer:r,onCopyCitation:n,onEditHfArtifacts:l,onEditRepositories:o,onEditXThreads:i,paper:u,relatedIsLoading:g,relatedPapers:f,user:c}){var S;const[x,_]=m.useState(!1),j=[...u.repositories??[]].sort((b,k)=>Number(k.is_official)-Number(b.is_official)||(k.num_stars||0)-(b.num_stars||0)),C=(x?j:j.slice(0,ft)).map(b=>({...b,safeHref:we(b.url)}));return e.jsxs("aside",{className:"detail-sidebar",children:[e.jsxs("div",{className:"sidebar-card",children:[e.jsxs("div",{className:"sidebar-card-title",children:[e.jsx("span",{children:"GitHub"}),e.jsxs("span",{className:"badge",children:[j.length," repo",j.length===1?"":"s",e.jsx("button",{type:"button",onClick:o,className:"edit-link",children:"edit"})]})]}),C.filter(({safeHref:b})=>b).map(b=>e.jsxs("a",{href:b.safeHref??void 0,target:"_blank",rel:"noopener noreferrer",className:"code-line",style:{textDecoration:"none"},children:[e.jsxs("span",{className:"code-line-repo",children:[e.jsx(V,{name:"github",size:12}),e.jsxs("span",{className:"code-line-repo-name",children:[b.owner,"/",b.name]}),b.is_official&&e.jsx("span",{className:"code-line-official",children:"· Official"})]}),e.jsxs("span",{className:"code-line-stars",children:["★ ",wn(b.num_stars)]})]},b.id)),j.length===0&&e.jsx("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",padding:"6px 0"},children:"No GitHub repositories linked yet."}),j.length>ft&&e.jsx("button",{type:"button",className:"bench-show-more",onClick:()=>_(b=>!b),children:x?"− show top 3":`+ show ${j.length-ft} more repos`})]}),e.jsx(Nn,{viewer:r,onEdit:l}),e.jsx(_n,{threads:u.x_threads??[],onEdit:i}),e.jsx(mn,{githubUrls:j.map(({url:b})=>b),hfModelUrls:t.models,hfDatasetUrls:t.datasets,hfSpaceUrls:t.spaces,paperId:u.id,pdfName:((S=u.arxiv_id)==null?void 0:S.replace("/","-"))||u.id,pdfUrl:u.url_pdf,isSignedIn:!!c,suggestedBucketId:c?`${c.username}/${un(u.title)}`:void 0}),e.jsx(hn,{isLoading:g,papers:f}),e.jsxs("div",{className:"sidebar-card",children:[e.jsxs("div",{className:"sidebar-card-title",children:[e.jsx("span",{children:"Citation"}),e.jsxs("button",{type:"button",className:"citation-copy-btn",onClick:n,"aria-label":"Copy citation to clipboard",title:"Copy citation to clipboard",children:[e.jsx(V,{name:"copy",size:11}),s?"Copied":"Copy"]})]}),e.jsx("pre",{style:{fontFamily:"var(--mono)",fontSize:10.5,lineHeight:1.5,color:"var(--ink-soft)",whiteSpace:"pre-wrap",wordBreak:"break-word",margin:0},children:a})]})]})}function Nn({onEdit:t,viewer:s}){return e.jsxs("div",{className:"sidebar-card",children:[e.jsxs("div",{className:"sidebar-card-title",children:[s.paperHref?e.jsx("a",{href:s.paperHref,target:"_blank",rel:"noopener noreferrer",style:{color:"inherit",textDecoration:"none"},children:"🤗 Hugging Face"}):e.jsx("span",{children:"🤗 Hugging Face"}),e.jsx("button",{type:"button",onClick:t,className:"edit-link",children:"edit"})]}),s.isLoading?e.jsx(Ie,{className:"h-16 w-full"}):e.jsxs(e.Fragment,{children:[s.rows.map(a=>e.jsx(Cn,{...a},a.label)),s.footer&&e.jsx("div",{style:{fontFamily:"var(--mono)",fontSize:10,color:"var(--ink-faint)",marginTop:12},children:s.footer})]})]})}function Cn({count:t,href:s,isLimited:a,label:r,links:n}){const[l,o]=m.useState(!1),i=((n==null?void 0:n.length)??0)>ts,u=l?n:n==null?void 0:n.slice(0,ts),g=t!=null?`${t}${a?"+":""}`:"—";return e.jsxs("div",{className:"hf-artifact-row",children:[e.jsxs("div",{className:"hf-artifact-row-header",children:[e.jsx("span",{children:r}),t?e.jsx("a",{href:s,target:"_blank",rel:"noopener noreferrer",className:"hf-artifact-count",children:g}):e.jsx("span",{className:"hf-artifact-count hf-artifact-count--empty",children:g})]}),u!=null&&u.length?e.jsxs("div",{className:"hf-artifact-links",children:[u.map(f=>e.jsx("a",{href:f.href,target:"_blank",rel:"noopener noreferrer",children:f.label},f.href)),i&&e.jsx("button",{type:"button",className:"hf-artifact-toggle","aria-expanded":l,onClick:()=>o(f=>!f),children:l?"Show fewer":`View all ${n.length}`})]}):null]})}function Sn({abstract:t,mentions:s}){const a=[];let r=0;for(const n of[...s].sort((l,o)=>l.start-o.start))n.startt.length||t.slice(n.start,n.end)===n.surface&&(a.push(e.jsx(jt,{text:t.slice(r,n.start)},`t${r}`)),a.push(e.jsx(Ra,{entity:{kind:n.entity_type,slug:n.slug},className:"abstract-entity-link",newTab:!1,initialPreview:n.preview?{name:n.preview.name,description:n.preview.description??null,imageUrl:n.preview.image_url??null,count:n.preview.count??null,detail:n.preview.detail??null}:void 0,children:n.surface},`m${n.start}`)),r=n.end);return a.push(e.jsx(jt,{text:t.slice(r)},`t${r}`)),e.jsx(e.Fragment,{children:a})}function En(t,s){const a=t.arxiv_id?` (arXiv:${t.arxiv_id.replace(/v\d+$/i,"")})`:"";return`About the paper "${t.title}"${a}: ${s}`}function Pn({paper:t,readerChatRoute:s}){const a=aa()&&!!(t.id&&t.abstract),r=t.suggested_questions,{data:n}=te({queryKey:["paper-suggested-questions",t.id],queryFn:()=>Y.suggestedQuestions(String(t.id)),enabled:a&&Array.isArray(r)&&r.length===0,staleTime:o=>{var i;return(i=o.state.data)!=null&&i.questions.length?1/0:0},retry:!1}),l=r!=null&&r.length?r:(n==null?void 0:n.questions)??[];return!a||l.length===0?null:e.jsx("ul",{className:"suggested-questions","aria-label":"Ask about this paper",children:l.map(o=>{const i=s?`${s}?q=${encodeURIComponent(o)}`:`/chat?q=${encodeURIComponent(En(t,o))}`;return e.jsx("li",{children:e.jsxs(me,{className:"suggested-question",to:i,onClick:s?()=>us(s):void 0,children:[e.jsx(V,{name:"chat",size:12}),e.jsx("span",{children:o})]})},o)})})}function $n({canEdit:t,onEditMethods:s,onEditTasks:a,paper:r,readerChatRoute:n}){var i,u,g;const l=r.abstract||"",[o]=m.useState(()=>window.location.hash==="#tldr");return e.jsxs(e.Fragment,{children:[e.jsx(Me,{id:"abstract",label:"Abstract"}),e.jsx("p",{className:"abstract-text",children:(i=r.abstract_mentions)!=null&&i.length?e.jsx(Sn,{abstract:l,mentions:r.abstract_mentions}):e.jsx(jt,{text:l})}),r.tldr&&e.jsxs("details",{className:"tldr-details paper-section-anchor",id:"tldr",open:o,children:[e.jsxs("summary",{children:[e.jsx("span",{className:"tldr-toggle-show",children:"Show TL;DR"}),e.jsx("span",{className:"tldr-toggle-hide",children:"Hide TL;DR"}),e.jsx("span",{className:"tldr-toggle-hint",children:"short summary"})]}),e.jsx("div",{className:"tldr-box",children:r.tldr})]}),e.jsx(Pn,{paper:r,readerChatRoute:n}),e.jsx(Me,{id:"tasks",label:"Tasks",accent:e.jsxs("span",{className:"accent",children:[((u=r.tasks)==null?void 0:u.length)||0," tagged",t&&e.jsx("button",{type:"button",onClick:a,className:"edit-link",children:"edit"})]})}),e.jsx("div",{className:"paper-tags",style:{marginBottom:8},children:(r.tasks??[]).map(f=>e.jsx(ma,{slug:f.slug||"",label:f.name},f.id))}),e.jsx(Me,{id:"methods",label:"Methods",accent:e.jsxs("span",{className:"accent",children:[((g=r.methods)==null?void 0:g.length)||0," used",t&&e.jsx("button",{type:"button",onClick:s,className:"edit-link",children:"edit"})]})}),e.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:6,marginBottom:8},children:(r.methods??[]).map(f=>e.jsx(ha,{method:f},f.id))})]})}const Se=["my-bookmark-ids"],kt="pwc:pending-bookmark";function ss(t){window.sessionStorage.setItem(kt,JSON.stringify(t)),window.location.assign(Ua(!0))}function Rn(){var r,n;const{user:t}=Ge(),s=te({queryKey:Se,queryFn:()=>bt.getBookmarkIds(),enabled:!!t,staleTime:60*1e3,refetchOnWindowFocus:!1}),a=Ke.useMemo(()=>{var l;return new Set(((l=s.data)==null?void 0:l.paper_ids)??[])},[(r=s.data)==null?void 0:r.paper_ids]);return{ids:((n=s.data)==null?void 0:n.paper_ids)??[],idSet:a,isLoading:s.isLoading,isError:s.isError}}function In(){const{user:t}=Ge(),s=ce(),a=ee({mutationFn:async({paperId:n,isBookmarked:l})=>{l?await bt.removeBookmark(n):await bt.addBookmark(n)},onMutate:async({paperId:n,isBookmarked:l})=>{await s.cancelQueries({queryKey:Se});const o=s.getQueryData(Se),i=typeof n=="string"?Number(n):n,u=(o==null?void 0:o.paper_ids)??[],g=l?u.filter(f=>f!==i):[i,...u.filter(f=>f!==i)];return s.setQueryData(Se,{paper_ids:g}),{previous:o}},onError:(n,l,o)=>{o!=null&&o.previous&&s.setQueryData(Se,o.previous),n instanceof xt&&n.code==="saved_papers_bucket_authorization_required"&&ss(l)},onSettled:()=>{s.invalidateQueries({queryKey:Se}),s.invalidateQueries({queryKey:[..._e.feeds.saved]})}});return Ke.useEffect(()=>{if(!t||a.isPending)return;const n=new URL(window.location.href);if(n.searchParams.get(Qt)!=="1")return;n.searchParams.delete(Qt),window.history.replaceState({},"",`${n.pathname}${n.search}${n.hash}`);const l=window.sessionStorage.getItem(kt);if(l){window.sessionStorage.removeItem(kt);try{const o=JSON.parse(l);(typeof o.paperId=="number"||typeof o.paperId=="string")&&typeof o.isBookmarked=="boolean"&&a.mutate(o)}catch{}}},[a,t]),{toggle:Ke.useCallback((n,l)=>{if(!t){if(ds())return;ss({paperId:n,isBookmarked:l});return}a.mutate({paperId:n,isBookmarked:l})},[a,t]),isPending:a.isPending}}const An=({paperId:t})=>{const{user:s}=Ge(),{idSet:a}=Rn(),{toggle:r,isPending:n}=In();if(ds())return null;const l=Number(t),o=!!s&&a.has(l),i=()=>{Number.isFinite(l)&&r(l,o)},u=s&&o?"Saved":"Save",g=s?o?"Remove from saved papers":"Save this paper":"Sign in with Hugging Face to save this paper";return e.jsxs("button",{type:"button",className:`action-btn${o?" is-saved":""}`,onClick:i,disabled:n,"aria-pressed":o,"aria-label":g,title:g,children:[e.jsx(V,{name:"bookmark",size:12}),u]})};function gt({children:t,showEdit:s=!1,onEdit:a,editAriaLabel:r}){return s?e.jsxs("span",{className:"action-btn-composite",children:[t,e.jsx("button",{type:"button",className:"action-btn-segment action-btn-edit",onClick:a,"aria-label":r,children:"edit"})]}):t}const Fn={tasks:"tasks",methods:"methods",results:"evaluation results",repositories:"GitHub repositories","project-pages":"project pages","hf-artifacts":"Hugging Face artifacts",organizations:"organizations","source-url":"source URL","x-threads":"X threads"};function as(t){if(!t)return"—";try{return new Date(t).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"})}catch{return"—"}}function rs(t,s){try{const a=new URL(t),n=a.pathname.replace(/\/$/,"").split("/").filter(Boolean).at(-1);return n?n.replace(/[-_]+/g," "):a.hostname.replace(/^www\./,"")}catch{return s}}const Ci=()=>{const{arxivId:t}=ra(),s=ns(),{toast:a}=se(),{user:r}=Ge(),n=(r==null?void 0:r.is_admin)??!1,l=!!r,o=qa(r),{arxivId:i,evaluations:u,evaluationsByTask:g,evaluationsLoading:f,paper:c,paperError:x,paperLoading:_,presentation:j,refetchEvaluations:C,refetchPaper:S,relatedQuery:b,versions:k,visibleEvaluations:$}=rr(t,o),[E,v]=m.useState(!1),{activeEditor:d,openEditor:h,setEditorOpen:w}=or();m.useEffect(()=>{o!=="direct"||!(c!=null&&c.id)||(d&&d!=="results"&&Y.primeCurationState(c.id).catch(()=>{}),d==="results"&&Xe.primeCurationState(c.id).catch(()=>{}))},[d,o,c==null?void 0:c.id]);const[A,z]=m.useState(null),M=m.useRef(!1);m.useEffect(()=>{if(!r||!c||M.current)return;const P=sessionStorage.getItem("pwc:fresh-auth-edit");if(!P)return;M.current=!0;const O=ir(P);if(!Y.freshAuthMutationDraft()){sessionStorage.removeItem("pwc:fresh-auth-edit"),O&&h(O);return}if(!window.confirm("You signed in again. Apply the saved destructive catalog edit now? The server will recheck the current catalog version before changing anything.")){a({title:"Edit kept locally",description:"Nothing was changed. Reload this paper when you are ready to confirm the saved edit."});return}Y.resumeFreshAuthMutation().then(()=>{a({title:"Edit applied",description:"The restored catalog edit was applied."}),window.location.reload()}).catch($e=>{a({variant:"destructive",title:"Could not apply the saved edit",description:$e instanceof Error?$e.message:"Please reload and review the edit again."})})},[h,c,a,r]);const K=m.useMemo(()=>{if(!r||!(c!=null&&c.author_links))return!1;const P=r.username.toLowerCase();return c.author_links.some(O=>!!O.hf_username&&O.hf_username.toLowerCase()===P)},[r,c==null?void 0:c.author_links]),G=P=>{if(!l){z(P);return}h(P)},[p,R]=m.useState("idle"),[I,U]=m.useState(null),[D,H]=m.useState(null),q=async()=>{if(i){R("indexing"),U(null),H(null);try{await Y.indexFromArxiv(i),a({title:"Indexed",description:"Paper added to database."}),setTimeout(()=>S(),1200),R("idle")}catch(P){const O=P;let be=O.message||"Failed to index paper";if(O.response)try{be=JSON.parse(O.response).detail||be}catch{be=O.response}U(be),(O.status===429||O.status===503)&&H("Try again later after arXiv has lifted the temporary limit."),R("idle")}}},J=(j==null?void 0:j.citationCopy)??"",Z=(j==null?void 0:j.copyableRanks)??[],[Ye,De]=m.useState(!1),ye=async()=>{if(J)try{await navigator.clipboard.writeText(J),De(!0),a({title:"Citation copied",description:"BibTeX entry copied to clipboard."}),window.setTimeout(()=>De(!1),1500)}catch{a({title:"Copy failed",description:"Could not access the clipboard. Please copy manually.",variant:"destructive"})}},y=async()=>{if(!c)return;const P=c.arxiv_id||c.id,O=Oa(P,Z);if(O)try{await navigator.clipboard.writeText(O),a({title:"PwC badges copied",description:"Each badge follows its current leaderboard result."})}catch{a({title:"Copy failed",description:"Could not access the clipboard. Please try again.",variant:"destructive"})}};if(_)return e.jsxs("div",{className:"page",children:[e.jsx(Ie,{className:"h-12 w-3/4 mb-4"}),e.jsx(Ie,{className:"h-6 w-1/3 mb-8"}),e.jsx(Ie,{className:"h-64 w-full"})]});if(x||!c)return e.jsxs("div",{className:"page",children:[e.jsxs("div",{className:"breadcrumb",children:[e.jsx(me,{to:"/papers",children:"Papers"}),e.jsx("span",{className:"sep",children:"/"}),e.jsxs("span",{style:{color:"var(--ink)"},children:["arXiv:",i]})]}),e.jsx("h1",{className:"detail-title",children:"Paper not indexed yet"}),e.jsxs("p",{style:{fontFamily:"var(--serif)",color:"var(--ink-soft)",marginTop:16,maxWidth:640},children:["We don't have ",e.jsxs("span",{style:{fontFamily:"var(--mono)"},children:["arXiv:",i]})," in the database. You can index it from arXiv right now."]}),I&&e.jsx(ka,{variant:"destructive",className:"mt-4 max-w-xl",children:e.jsxs(Na,{children:[e.jsx("div",{children:I}),D&&e.jsx("div",{className:"mt-2",children:D})]})}),e.jsxs("div",{className:"action-row",children:[n&&e.jsxs("button",{className:"action-btn",onClick:q,disabled:p==="indexing",children:[e.jsx(V,{name:"sparkle",size:12}),p==="indexing"?"Indexing…":"Index from arXiv"]}),e.jsx(L,{variant:"outline",onClick:()=>s("/papers"),children:"Browse Papers"})]})]});if(!j)return null;const{allHfArtifactUrls:N,authorEntries:F,citationDisplay:T,hasIntroducedItems:Q,hasLineageItems:X,hfArtifactViewer:B,introducedBenchmarks:Ms,introducedFrameworks:It,introducedMethods:Os,introducedSummary:Ks,numPages:At,paperSourceLabel:Ft,predecessorPapers:Je,projectPages:Ee,safeAbstractUrl:Be,safeConferenceUrl:Lt,safePdfUrl:Tt,successorPapers:Ze}=j,ze=12,Pe=va(c,i),Gs=Pe&&zt()&&na()&&(!Ht()||n)?Pe:null,Ut=c.organizations||[],Dt=P=>{const O=Da(P)??P.name;return e.jsx(me,{to:`/orgs/${P.slug}`,className:`detail-title-org${P.logo_url?" detail-title-org--logo":""}`,title:P.name,"aria-label":P.name,children:P.logo_url?e.jsx("img",{src:P.logo_url,alt:"",onError:be=>{var $e;($e=be.currentTarget.parentElement)==null||$e.classList.remove("detail-title-org--logo"),be.currentTarget.replaceWith(O)}}):O},P.id)},Bt=E||F.length<=ze?F:F.slice(0,ze);return e.jsxs("div",{className:"page",children:[e.jsxs("div",{className:"breadcrumb",children:[e.jsx(me,{to:"/",children:"Trending"}),e.jsx("span",{className:"sep",children:"/"}),c.arxiv_id&&Be?e.jsxs("a",{className:"breadcrumb-external",href:Be,target:"_blank",rel:"noopener noreferrer",title:"Open on arXiv",children:[Ft,e.jsx("span",{"aria-hidden":"true",children:"↗"})]}):e.jsx("span",{children:Ft})]}),e.jsxs("div",{className:"detail-grid",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"detail-hero",children:[e.jsxs("div",{className:"detail-hero-main",children:[e.jsxs("h1",{className:"detail-title",children:[e.jsx(qe,{title:c.title}),Ut.slice(0,-1).map(Dt),e.jsxs("span",{className:"detail-title-tail",children:[Ut.slice(-1).map(Dt),e.jsx("button",{type:"button",className:"detail-title-edit",onClick:()=>G("organizations"),title:"Edit organizations","aria-label":"Edit organizations",children:e.jsx(V,{name:"pencil",size:11})})]})]}),e.jsxs("div",{className:"detail-meta",children:[e.jsxs("span",{children:["Submitted ",as(c.published)]}),At&&e.jsxs(e.Fragment,{children:[e.jsx("span",{children:"·"}),e.jsxs("span",{children:[At," pages"]})]}),c.citation_count!=null&&e.jsxs(e.Fragment,{children:[e.jsx("span",{children:"·"}),e.jsxs("span",{children:[c.citation_count.toLocaleString()," citations"]})]}),(c.proceeding||c.conference_slug)&&e.jsxs(e.Fragment,{children:[e.jsx("span",{children:"·"}),c.conference_slug?e.jsx("a",{href:`/conferences/${c.conference_slug}`,target:"_blank",rel:"noopener noreferrer",style:{color:"var(--accent-text)"},children:(c.proceeding||c.conference_name||"").replace(/\s+\d{1,2}$/,"")}):e.jsx("span",{children:c.proceeding.replace(/\s+\d{1,2}$/,"")})]}),k.length>1&&e.jsxs(e.Fragment,{children:[e.jsx("span",{children:"·"}),e.jsx("select",{className:"version-select",value:c.version,onChange:P=>{const O=P.target.value;c.arxiv_id&&s(`/paper/${c.arxiv_id.replace(/v\d+$/,"")}${O?`?version=${O}`:""}`)},children:k.map(P=>e.jsxs("option",{value:P.version,children:[P.version," — ",as(P.published)]},P.version))})]})]}),e.jsxs("div",{className:"detail-authors",children:[Bt.map((P,O)=>e.jsxs(Ke.Fragment,{children:[P.hf_username&&e.jsx(Ba,{className:"detail-author-avatar",url:P.hf_avatar_url}),P.id?e.jsx(me,{to:`/authors/${P.id}`,children:P.name}):P.hf_username?e.jsx("a",{href:`https://huggingface.co/${P.hf_username}`,target:"_blank",rel:"noopener noreferrer",title:`@${P.hf_username} on Hugging Face`,children:P.name}):e.jsx("a",{children:P.name}),Oze&&e.jsx("button",{className:"show-more-authors",onClick:()=>v(P=>!P),style:{marginLeft:8,background:"none",border:"none",cursor:"pointer",color:"var(--accent-text)",fontFamily:"var(--mono)",fontSize:12},children:E?"show fewer":`+${c.authors.length-ze} more`})]}),e.jsxs("div",{className:"action-row",children:[Pe&&zt()&&(!Ht()||r!=null&&r.is_admin)?e.jsxs(me,{className:"action-btn",to:Pe,onClick:()=>us(Pe),children:[e.jsx(V,{name:"pdf",size:12})," Read paper",e.jsx("span",{className:"nav-new-badge","aria-hidden":"true",children:"New"})]}):Tt?e.jsxs("a",{className:"action-btn",href:Tt,target:"_blank",rel:"noopener noreferrer",children:[e.jsx(V,{name:"pdf",size:12})," View PDF"]}):null,Be&&c.source==="external"&&e.jsx(gt,{showEdit:!0,onEdit:()=>G("source-url"),editAriaLabel:"Edit source URL",children:e.jsxs("a",{className:"action-btn-segment action-btn-main",href:Be,target:"_blank",rel:"noopener noreferrer",children:[e.jsx(V,{name:"external",size:12})," Source page"]})}),Ee.length===1?e.jsx(gt,{showEdit:!0,onEdit:()=>G("project-pages"),editAriaLabel:"Edit project pages",children:e.jsxs("a",{className:"action-btn-segment action-btn-main",href:Ee[0].safeHref??void 0,target:"_blank",rel:"noopener noreferrer",children:[e.jsx(V,{name:"globe",size:12})," Project page"]})}):null,Ee.length>1?e.jsx(gt,{showEdit:!0,onEdit:()=>G("project-pages"),editAriaLabel:"Edit project pages",children:e.jsxs(ia,{children:[e.jsx(oa,{asChild:!0,children:e.jsxs("button",{type:"button",className:"action-btn-segment action-btn-main",children:[e.jsx(V,{name:"globe",size:12})," Project page"]})}),e.jsx(la,{align:"start",className:"project-page-menu",children:Ee.map((P,O)=>e.jsx(ca,{asChild:!0,children:P.safeHref?e.jsx("a",{href:P.safeHref,target:"_blank",rel:"noopener noreferrer",children:rs(P.url,`Project page ${O+1}`)}):e.jsx("span",{children:rs(P.url,`Project page ${O+1}`)})},P.url))})]})}):null,Ee.length===0&&l?e.jsxs("button",{type:"button",className:"action-btn",onClick:()=>G("project-pages"),title:"Add project page",children:[e.jsx(V,{name:"globe",size:12})," Add project page"]}):null,Lt&&e.jsxs("a",{className:"action-btn",href:Lt,target:"_blank",rel:"noopener noreferrer",children:[e.jsx(V,{name:"external",size:12})," Conference"]}),e.jsx(lr,{paperId:Number(c.id)}),n&&da()&&e.jsx(Es,{kind:"enrich-paper",triggerClassName:"action-btn",paperId:Number(c.id),paperTitle:c.title,onComplete:()=>void S()}),e.jsx(An,{paperId:c.id})]}),c.leaderboard_ranks&&c.leaderboard_ranks.length>0&&e.jsx(pa,{wrap:!0,paperHref:`/paper/${c.arxiv_id||c.id}`,ranks:ja(c.leaderboard_ranks)})]}),e.jsx("div",{className:"detail-hero-thumb detail-thumb-wrap",children:e.jsx(fa,{paperId:c.arxiv_id||c.id,title:c.title,thumbnailUrl:ua(c.thumbnail_url),priority:!0})})]}),Q&&e.jsxs("div",{className:`introduced-banner${It.length>0?" introduced-banner--framework":""}`,children:[e.jsx("span",{className:"introduced-label",children:"Introduced"}),e.jsxs("div",{className:"introduced-methods",children:[Os.map(P=>e.jsxs("button",{type:"button",className:"introduced-pill",onClick:()=>s(`/methods/${P.slug||P.id}`),children:[P.name,e.jsx("span",{className:"introduced-arrow",children:"→"})]},`method-${P.id}`)),Ms.map(P=>e.jsxs("button",{type:"button",className:"introduced-pill",onClick:()=>s(`/benchmark/${P.slug||P.id}`),children:[P.name,e.jsx("span",{className:"introduced-arrow",children:"→"})]},`benchmark-${P.id}`)),It.map(P=>e.jsxs("button",{type:"button",className:"introduced-pill",onClick:()=>s(`/frameworks#framework-${P.slug}`),children:[P.name,e.jsx("span",{className:"introduced-arrow",children:"→"})]},`framework-${P.slug}`))]}),e.jsxs("span",{className:"introduced-note",children:["This paper is the canonical source for ",Ks,"."]})]}),X&&e.jsxs("div",{className:"introduced-banner lineage-banner",children:[Ze.length>0&&e.jsxs("div",{className:"lineage-row",children:[e.jsx("span",{className:"introduced-label lineage-label",children:Ze.length===1?"Follow-up paper":"Follow-up papers"}),e.jsx("div",{className:"introduced-methods",children:Ze.map(P=>e.jsxs("button",{type:"button",className:"introduced-pill lineage-pill",onClick:()=>s(`/paper/${P.route_identifier}`),children:[e.jsx(qe,{title:P.title}),e.jsx("span",{className:"introduced-arrow",children:"→"})]},`successor-${P.id}`))})]}),Je.length>0&&e.jsxs("div",{className:"lineage-row",children:[e.jsx("span",{className:"introduced-label lineage-label",children:Je.length===1?"Predecessor paper":"Predecessor papers"}),e.jsx("div",{className:"introduced-methods",children:Je.map(P=>e.jsxs("button",{type:"button",className:"introduced-pill lineage-pill",onClick:()=>s(`/paper/${P.route_identifier}`),children:[e.jsx("span",{className:"introduced-arrow lineage-arrow-back",children:"←"}),e.jsx(qe,{title:P.title})]},`predecessor-${P.id}`))})]})]}),e.jsx($n,{canEdit:!0,onEditMethods:()=>G("methods"),onEditTasks:()=>G("tasks"),paper:c,readerChatRoute:Gs}),e.jsx(Or,{canCopyBadge:Z.length>0,canEdit:!0,evaluationsByTask:g,evaluationsLoading:f,isAdmin:n,onCopyBadge:y,onEdit:()=>G("results"),onRefresh:()=>void C(),paper:c,visibleEvaluationCount:($==null?void 0:$.length)??0})]}),e.jsx(kn,{allHfArtifactUrls:N,citationCopied:Ye,citationDisplay:T,hfArtifactViewer:B,onCopyCitation:ye,onEditHfArtifacts:()=>G("hf-artifacts"),onEditRepositories:()=>G("repositories"),onEditXThreads:()=>G("x-threads"),paper:c,relatedIsLoading:b.isLoading,relatedPapers:b.data,user:r})]}),e.jsx(Hr,{activeEditor:d,arxivId:i,editSubmitMode:o,evaluations:u??[],isAdmin:n,isLinkedAuthor:K,onOpenChange:w,paper:c}),e.jsx($a,{open:A!==null,onOpenChange:P=>{P||z(null)},sectionLabel:A?Fn[A]:"this paper",returnTo:typeof window<"u"?window.location.pathname:"/"})]})};export{Ci as default}; +`)}function un(t){return`${(t.split(/[:|–—]/,1)[0]||t).normalize("NFKD").replace(/[\u0300-\u036f]/g,"").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"").slice(0,48).replace(/-+$/g,"")||"paper"}-artifacts`}function mn(t){const{toast:s}=se(),a=m.useMemo(()=>cn({githubUrls:t.githubUrls,hfDatasetUrls:t.hfDatasetUrls,hfModelUrls:t.hfModelUrls,hfSpaceUrls:t.hfSpaceUrls,paperId:t.paperId,pdfName:t.pdfName,pdfUrl:t.pdfUrl}),[t.githubUrls,t.hfDatasetUrls,t.hfModelUrls,t.hfSpaceUrls,t.paperId,t.pdfName,t.pdfUrl]),r=m.useMemo(()=>nn(t.paperId),[t.paperId]),[n,l]=m.useState(!!r),[o,i]=m.useState((r==null?void 0:r.destinationMode)??"new"),[u,g]=m.useState((r==null?void 0:r.bucketId)??""),[f,c]=m.useState((r==null?void 0:r.visibility)??"public"),[x,_]=m.useState(()=>new Set((r==null?void 0:r.selectedIds)??a.map(p=>p.id))),[j,C]=m.useState(!1),[S,b]=m.useState(null),[k,$]=m.useState(!!r),E=a.filter(p=>x.has(p.id)),v=E.length===a.length,d=rn(u),h=d!==null,w=dn(u,E,{create:o==="new",isPrivate:f==="private"}),A=(p,R)=>{_(I=>{const U=new Set(I);return R?U.add(p):U.delete(p),U})},z=async()=>{try{await navigator.clipboard.writeText(w),s({title:"Bucket copy commands copied",description:"Run them in a terminal where the Hugging Face CLI is signed in."})}catch{s({title:"Copy failed",description:"Could not access the clipboard. Select and copy the commands manually.",variant:"destructive"})}},M=m.useCallback(()=>{const p=new URL(window.location.href);p.searchParams.set(_t,t.paperId),window.sessionStorage.setItem(wt(t.paperId),JSON.stringify({paperId:t.paperId,bucketId:u.trim(),destinationMode:o,visibility:f,selectedIds:Array.from(x)})),window.location.assign(ta(p.toString(),{authorizeBucket:!0,bucketCreate:o==="new"}))},[u,o,t.paperId,x,f]),K=m.useCallback(async()=>{if(!t.isSignedIn){M();return}C(!0);let p=0,R=0;try{const I=E.filter(H=>H.kind!=="pdf"&&H.kind!=="github"&&!!H.repoId).map(H=>({kind:H.kind,repo_id:H.repoId})),U=on(I);U.length||U.push([]);for(const[H,q]of U.entries()){b({current:H+1,total:U.length});const J=await Y.copyToBucket(t.paperId,{bucket_id:u.trim(),create:H===0&&o==="new",private:f==="private",include_pdf:H===0&&E.some(Z=>Z.kind==="pdf"),artifacts:q});p+=J.copied.length,R+=J.errors.length}const D=E.filter(H=>H.kind==="github").length;s({title:R?"Bucket copy partially completed":"Copied to bucket",description:[`${p} item${p===1?"":"s"} copied.`,R?`${R} item${R===1?"":"s"} failed.`:"",D?"Use the generated commands below to copy GitHub repositories.":""].filter(Boolean).join(" "),variant:R?"destructive":void 0,action:d?e.jsx(sa,{altText:"Open destination bucket",asChild:!0,children:e.jsx("a",{href:d,target:"_blank",rel:"noopener noreferrer",children:"Open bucket"})}):void 0}),!R&&!D&&l(!1)}catch(I){if(I instanceof xt&&I.code==="bucket_authorization_required"){M();return}s({title:p?"Bucket copy partially completed":"Bucket copy failed",description:p?`${p} item${p===1?"":"s"} copied before the request failed. You can retry or use the CLI commands below.`:I instanceof xt&&typeof I.detail=="string"?I.detail:"Hugging Face could not complete the copy. You can still use the CLI commands below.",variant:"destructive"})}finally{C(!1),b(null)}},[M,u,d,o,t.isSignedIn,t.paperId,E,s,f]);m.useEffect(()=>{if(!k||!t.isSignedIn)return;$(!1),window.sessionStorage.removeItem(wt(t.paperId));const p=new URL(window.location.href);p.searchParams.delete(_t),window.history.replaceState({},"",`${p.pathname}${p.search}${p.hash}`),K()},[K,t.isSignedIn,t.paperId,k]);const G=()=>{_(new Set(a.map(p=>p.id))),!u&&t.suggestedBucketId&&g(t.suggestedBucketId),l(!0)};return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"sidebar-card copy-to-bucket-card",children:[e.jsxs("button",{type:"button",className:"copy-to-bucket-trigger",onClick:G,children:[e.jsx("span",{className:"copy-to-bucket-arrow","aria-hidden":"true",children:"→"}),e.jsx("span",{className:"copy-to-bucket-title",children:"Copy to bucket"}),e.jsx("span",{className:"copy-to-bucket-new",children:"New"})]}),e.jsx("div",{className:"copy-to-bucket-meta",children:a.length?`${a.length} linked artifact${a.length===1?"":"s"}`:"No linked artifacts yet"})]}),e.jsx(ae,{open:n,onOpenChange:l,children:e.jsxs(re,{className:"max-h-[90vh] max-w-2xl grid-rows-[auto_minmax(0,1fr)_auto] overflow-hidden",children:[e.jsxs(ne,{children:[e.jsxs(ie,{className:"flex items-center gap-2",children:[e.jsx("span",{className:"copy-to-bucket-dialog-arrow","aria-hidden":"true",children:"→"}),"Copy to bucket"]}),e.jsx(oe,{children:"Keep your own copy of this paper's PDF, linked code, and Hugging Face artifacts. Hub repositories use Xet's server-side copy; GitHub repositories use the generated CLI fallback."})]}),e.jsx("div",{className:"-mx-6 min-h-0 overflow-y-auto px-6",children:a.length?e.jsxs("div",{className:"space-y-5",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(ue,{children:"Choose your destination"}),e.jsxs(vt,{value:o,onValueChange:p=>i(p),className:"grid grid-cols-2 gap-2",children:[e.jsxs(ue,{className:"bucket-choice",children:[e.jsx(Re,{value:"new"}),"New bucket"]}),e.jsxs(ue,{className:"bucket-choice",children:[e.jsx(Re,{value:"existing"}),"Existing bucket"]})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(ue,{htmlFor:"bucket-id",children:"Bucket name"}),e.jsx(W,{id:"bucket-id",value:u,onChange:p=>g(p.target.value),placeholder:t.suggestedBucketId||"username/paper-artifacts","aria-invalid":u.length>0&&!h}),e.jsxs("div",{className:"flex items-center justify-between gap-3 text-xs",children:[e.jsx("p",{className:"text-muted-foreground",children:"Use the full Hugging Face bucket ID: namespace/name."}),d&&e.jsxs("a",{href:d,target:"_blank",rel:"noopener noreferrer",className:"inline-flex shrink-0 items-center gap-1 underline underline-offset-4",children:["View bucket",e.jsx(V,{name:"external",size:10})]})]})]}),o==="new"&&e.jsxs("div",{className:"space-y-2",children:[e.jsx(ue,{children:"Bucket visibility"}),e.jsxs(vt,{value:f,onValueChange:p=>c(p),className:"flex gap-5",children:[e.jsxs(ue,{className:"flex items-center gap-2 font-normal",children:[e.jsx(Re,{value:"public"}),"Public"]}),e.jsxs(ue,{className:"flex items-center gap-2 font-normal",children:[e.jsx(Re,{value:"private"}),"Private"]})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center justify-between gap-3",children:[e.jsx(ue,{children:"Artifacts"}),e.jsx(L,{type:"button",variant:"outline",size:"sm",className:"h-7 px-2 text-xs",onClick:()=>_(v?new Set:new Set(a.map(p=>p.id))),children:v?"Deselect all":"Select all"})]}),e.jsx("div",{className:"bucket-artifact-list",children:a.map(p=>e.jsxs("div",{className:"bucket-artifact-row",children:[e.jsx(Ve,{id:`bucket-artifact-${p.id}`,checked:x.has(p.id),onCheckedChange:R=>A(p.id,R===!0)}),e.jsxs(ue,{htmlFor:`bucket-artifact-${p.id}`,className:"min-w-0 flex-1 cursor-pointer font-normal",children:[e.jsx("span",{className:"bucket-artifact-kind",children:tn[p.kind]}),e.jsx("span",{className:"bucket-artifact-name",children:p.label})]}),e.jsxs("a",{href:we(p.url)??void 0,target:"_blank",rel:"noopener noreferrer",className:"bucket-artifact-open",children:["Open",e.jsx(V,{name:"external",size:10})]})]},p.id))}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"The PDF and Hugging Face artifacts can be copied directly. GitHub repositories require the CLI workflow below."})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(ue,{htmlFor:"bucket-copy-commands",children:"CLI fallback"}),e.jsx("pre",{id:"bucket-copy-commands",className:"bucket-copy-commands h-[190px]",children:h?w:"Enter a bucket name above to prepare the copy commands."})]})]}):e.jsx("p",{className:"py-5 text-sm text-muted-foreground",children:"This paper does not have a linked GitHub repository or Hugging Face artifact to copy yet."})}),e.jsxs(de,{children:[e.jsx("a",{href:"https://huggingface.co/docs/huggingface_hub/en/guides/buckets",target:"_blank",rel:"noopener noreferrer",className:"mr-auto text-sm text-muted-foreground underline underline-offset-4",children:"About Hugging Face Buckets"}),e.jsxs(L,{type:"button",onClick:z,variant:"outline",disabled:!h||E.length===0,children:[e.jsx(V,{name:"copy",size:12}),"Copy commands"]}),e.jsx(L,{type:"button",onClick:K,disabled:j||t.isSignedIn&&(!h||!E.some(p=>p.kind!=="github")),children:j?S&&S.total>1?`Copying ${S.current}/${S.total}…`:"Copying…":t.isSignedIn?"Copy now":"Sign in & copy"})]})]})})]})}function hn({isLoading:t,papers:s}){return t?e.jsxs("div",{className:"sidebar-card","aria-busy":"true",children:[e.jsx("div",{className:"sidebar-card-title",children:"Related papers"}),e.jsx("div",{className:"related-meta",children:"Finding related work…"})]}):s!=null&&s.length?e.jsxs("div",{className:"sidebar-card",children:[e.jsx("div",{className:"sidebar-card-title",children:"Related papers"}),s.map(a=>e.jsxs(me,{to:`/paper/${a.arxiv_id||a.id}`,target:"_blank",rel:"noopener noreferrer",className:"related-paper",style:{textDecoration:"none",color:"inherit"},children:[e.jsx("div",{className:"related-title",children:e.jsx(qe,{title:a.title})}),e.jsxs("div",{className:"related-meta",children:[e.jsx("span",{children:a.arxiv_id?`arXiv:${a.arxiv_id}`:"External resource"}),a.citation_count!=null&&e.jsxs("span",{children:[a.citation_count.toLocaleString()," cites"]})]})]},a.id))]}):null}const pn=/(https?:\/\/[^\s]+)/g;function fn({size:t=12}){return e.jsx("svg",{width:t,height:t,viewBox:"0 0 24 24","aria-hidden":"true",focusable:"false",children:e.jsx("path",{fill:"currentColor",d:"M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z"})})}function es(t){return t>=1e6?`${(t/1e6).toFixed(1)}M`:t>=1e3?`${(t/1e3).toFixed(1)}k`:String(t)}function gn(t){return new Date(t).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"})}function xn({text:t}){return e.jsx("p",{className:"x-thread-text",children:t.split(pn).map((s,a)=>a%2===1?e.jsx("span",{className:"x-thread-link",children:s.replace(/^https?:\/\/(www\.)?/,"").replace(/\/$/,"")},a):e.jsx(m.Fragment,{children:s},a))})}function bn({thread:t}){const[s,a]=m.useState(!1);return!t.author_avatar_url||s?e.jsx("span",{className:"x-thread-avatar x-thread-avatar--fallback","aria-hidden":"true",children:t.author_name.charAt(0).toUpperCase()}):e.jsx("img",{className:"x-thread-avatar",src:t.author_avatar_url,alt:"",loading:"lazy",referrerPolicy:"no-referrer",onError:()=>a(!0)})}function jn(){var t;return((t=window.matchMedia)==null?void 0:t.call(window,"(prefers-reduced-motion: reduce)").matches)??!1}function vn({thread:t}){const[s,a]=m.useState(!1),[r,n]=m.useState(null),[l,o]=m.useState(!1),i=m.useRef(null),{targetRef:u,isIntersecting:g}=Ta({rootMargin:"200px"}),f=t.video_url;if(m.useEffect(()=>{if(!f||r||l||!g||jn())return;const x=new AbortController;return fetch(f,{referrerPolicy:"no-referrer",signal:x.signal}).then(_=>{if(!_.ok)throw new Error(`HTTP ${_.status}`);return _.blob()}).then(_=>n(URL.createObjectURL(_))).catch(()=>{x.signal.aborted||o(!0)}),()=>x.abort()},[f,r,l,g]),m.useEffect(()=>()=>{r&&URL.revokeObjectURL(r)},[r]),m.useEffect(()=>{const x=i.current;x&&(g?x.play().catch(()=>{}):x.pause())},[g,r]),!t.media_url||s)return null;const c=r&&!l;return e.jsx("div",{className:"x-thread-media",ref:u,children:c?e.jsx("video",{ref:i,src:r,poster:t.media_url,muted:!0,loop:!0,playsInline:!0,autoPlay:!0,"aria-label":"Video",onError:()=>o(!0)}):e.jsxs(e.Fragment,{children:[e.jsx("img",{src:t.media_url,alt:"",loading:"lazy",referrerPolicy:"no-referrer",onError:()=>a(!0)}),t.media_type==="video"&&e.jsx("span",{className:"x-thread-play","aria-label":"Video",children:"▶"})]})})}function yn({thread:t}){const s=we(t.url);return s?e.jsxs("a",{href:s,target:"_blank",rel:"noopener noreferrer",className:"x-thread",children:[e.jsxs("div",{className:"x-thread-header",children:[e.jsx(bn,{thread:t}),e.jsxs("span",{className:"x-thread-author",children:[e.jsx("span",{className:"x-thread-name",children:t.author_name}),e.jsxs("span",{className:"x-thread-handle",children:["@",t.author_handle]})]}),e.jsx("span",{className:"x-thread-logo",children:e.jsx(fn,{})})]}),e.jsx(xn,{text:t.text}),e.jsx(vn,{thread:t}),e.jsxs("div",{className:"x-thread-meta",children:[t.posted_at&&e.jsx("time",{dateTime:t.posted_at,children:gn(t.posted_at)}),t.like_count!=null&&e.jsxs("span",{children:["♥ ",es(t.like_count)]}),t.reply_count!=null&&t.reply_count>0&&e.jsxs("span",{children:[es(t.reply_count)," ",t.reply_count===1?"reply":"replies"]}),e.jsx("span",{className:"x-thread-read",children:"Read on X →"})]})]}):null}function _n({onEdit:t,threads:s}){return e.jsxs("div",{className:"sidebar-card",children:[e.jsxs("div",{className:"sidebar-card-title",children:[e.jsx("span",{children:"X threads"}),e.jsxs("span",{className:"badge",children:[s.length," post",s.length===1?"":"s",e.jsx("button",{type:"button",onClick:t,className:"edit-link",children:"edit"})]})]}),s.length>0?e.jsx("div",{className:"x-thread-list",children:s.map(a=>e.jsx(yn,{thread:a},a.tweet_id))}):e.jsx("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",padding:"6px 0"},children:"No author threads linked yet."})]})}const ft=3,ts=3;function wn(t){return t>=1e3?`${(t/1e3).toFixed(1)}k`:String(t)}function kn({allHfArtifactUrls:t,citationCopied:s,citationDisplay:a,hfArtifactViewer:r,onCopyCitation:n,onEditHfArtifacts:l,onEditRepositories:o,onEditXThreads:i,paper:u,relatedIsLoading:g,relatedPapers:f,user:c}){var S;const[x,_]=m.useState(!1),j=[...u.repositories??[]].sort((b,k)=>Number(k.is_official)-Number(b.is_official)||(k.num_stars||0)-(b.num_stars||0)),C=(x?j:j.slice(0,ft)).map(b=>({...b,safeHref:we(b.url)}));return e.jsxs("aside",{className:"detail-sidebar",children:[e.jsxs("div",{className:"sidebar-card",children:[e.jsxs("div",{className:"sidebar-card-title",children:[e.jsx("span",{children:"GitHub"}),e.jsxs("span",{className:"badge",children:[j.length," repo",j.length===1?"":"s",e.jsx("button",{type:"button",onClick:o,className:"edit-link",children:"edit"})]})]}),C.filter(({safeHref:b})=>b).map(b=>e.jsxs("a",{href:b.safeHref??void 0,target:"_blank",rel:"noopener noreferrer",className:"code-line",style:{textDecoration:"none"},children:[e.jsxs("span",{className:"code-line-repo",children:[e.jsx(V,{name:"github",size:12}),e.jsxs("span",{className:"code-line-repo-name",children:[b.owner,"/",b.name]}),b.is_official&&e.jsx("span",{className:"code-line-official",children:"· Official"})]}),e.jsxs("span",{className:"code-line-stars",children:["★ ",wn(b.num_stars)]})]},b.id)),j.length===0&&e.jsx("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",padding:"6px 0"},children:"No GitHub repositories linked yet."}),j.length>ft&&e.jsx("button",{type:"button",className:"bench-show-more",onClick:()=>_(b=>!b),children:x?"− show top 3":`+ show ${j.length-ft} more repos`})]}),e.jsx(Nn,{viewer:r,onEdit:l}),e.jsx(_n,{threads:u.x_threads??[],onEdit:i}),e.jsx(mn,{githubUrls:j.map(({url:b})=>b),hfModelUrls:t.models,hfDatasetUrls:t.datasets,hfSpaceUrls:t.spaces,paperId:u.id,pdfName:((S=u.arxiv_id)==null?void 0:S.replace("/","-"))||u.id,pdfUrl:u.url_pdf,isSignedIn:!!c,suggestedBucketId:c?`${c.username}/${un(u.title)}`:void 0}),e.jsx(hn,{isLoading:g,papers:f}),e.jsxs("div",{className:"sidebar-card",children:[e.jsxs("div",{className:"sidebar-card-title",children:[e.jsx("span",{children:"Citation"}),e.jsxs("button",{type:"button",className:"citation-copy-btn",onClick:n,"aria-label":"Copy citation to clipboard",title:"Copy citation to clipboard",children:[e.jsx(V,{name:"copy",size:11}),s?"Copied":"Copy"]})]}),e.jsx("pre",{style:{fontFamily:"var(--mono)",fontSize:10.5,lineHeight:1.5,color:"var(--ink-soft)",whiteSpace:"pre-wrap",wordBreak:"break-word",margin:0},children:a})]})]})}function Nn({onEdit:t,viewer:s}){return e.jsxs("div",{className:"sidebar-card",children:[e.jsxs("div",{className:"sidebar-card-title",children:[s.paperHref?e.jsx("a",{href:s.paperHref,target:"_blank",rel:"noopener noreferrer",style:{color:"inherit",textDecoration:"none"},children:"🤗 Hugging Face"}):e.jsx("span",{children:"🤗 Hugging Face"}),e.jsx("button",{type:"button",onClick:t,className:"edit-link",children:"edit"})]}),s.isLoading?e.jsx(Ie,{className:"h-16 w-full"}):e.jsxs(e.Fragment,{children:[s.rows.map(a=>e.jsx(Cn,{...a},a.label)),s.footer&&e.jsx("div",{style:{fontFamily:"var(--mono)",fontSize:10,color:"var(--ink-faint)",marginTop:12},children:s.footer})]})]})}function Cn({count:t,href:s,isLimited:a,label:r,links:n}){const[l,o]=m.useState(!1),i=((n==null?void 0:n.length)??0)>ts,u=l?n:n==null?void 0:n.slice(0,ts),g=t!=null?`${t}${a?"+":""}`:"—";return e.jsxs("div",{className:"hf-artifact-row",children:[e.jsxs("div",{className:"hf-artifact-row-header",children:[e.jsx("span",{children:r}),t?e.jsx("a",{href:s,target:"_blank",rel:"noopener noreferrer",className:"hf-artifact-count",children:g}):e.jsx("span",{className:"hf-artifact-count hf-artifact-count--empty",children:g})]}),u!=null&&u.length?e.jsxs("div",{className:"hf-artifact-links",children:[u.map(f=>e.jsx("a",{href:f.href,target:"_blank",rel:"noopener noreferrer",children:f.label},f.href)),i&&e.jsx("button",{type:"button",className:"hf-artifact-toggle","aria-expanded":l,onClick:()=>o(f=>!f),children:l?"Show fewer":`View all ${n.length}`})]}):null]})}function Sn({abstract:t,mentions:s}){const a=[];let r=0;for(const n of[...s].sort((l,o)=>l.start-o.start))n.startt.length||t.slice(n.start,n.end)===n.surface&&(a.push(e.jsx(jt,{text:t.slice(r,n.start)},`t${r}`)),a.push(e.jsx(Ra,{entity:{kind:n.entity_type,slug:n.slug},className:"abstract-entity-link",newTab:!1,initialPreview:n.preview?{name:n.preview.name,description:n.preview.description??null,imageUrl:n.preview.image_url??null,count:n.preview.count??null,detail:n.preview.detail??null}:void 0,children:n.surface},`m${n.start}`)),r=n.end);return a.push(e.jsx(jt,{text:t.slice(r)},`t${r}`)),e.jsx(e.Fragment,{children:a})}function En(t,s){const a=t.arxiv_id?` (arXiv:${t.arxiv_id.replace(/v\d+$/i,"")})`:"";return`About the paper "${t.title}"${a}: ${s}`}function Pn({paper:t,readerChatRoute:s}){const a=aa()&&!!(t.id&&t.abstract),r=t.suggested_questions,{data:n}=te({queryKey:["paper-suggested-questions",t.id],queryFn:()=>Y.suggestedQuestions(String(t.id)),enabled:a&&Array.isArray(r)&&r.length===0,staleTime:o=>{var i;return(i=o.state.data)!=null&&i.questions.length?1/0:0},retry:!1}),l=r!=null&&r.length?r:(n==null?void 0:n.questions)??[];return!a||l.length===0?null:e.jsx("ul",{className:"suggested-questions","aria-label":"Ask about this paper",children:l.map(o=>{const i=s?`${s}?q=${encodeURIComponent(o)}`:`/chat?q=${encodeURIComponent(En(t,o))}`;return e.jsx("li",{children:e.jsxs(me,{className:"suggested-question",to:i,onClick:s?()=>us(s):void 0,children:[e.jsx(V,{name:"chat",size:12}),e.jsx("span",{children:o})]})},o)})})}function $n({canEdit:t,onEditMethods:s,onEditTasks:a,paper:r,readerChatRoute:n}){var i,u,g;const l=r.abstract||"",[o]=m.useState(()=>window.location.hash==="#tldr");return e.jsxs(e.Fragment,{children:[e.jsx(Me,{id:"abstract",label:"Abstract"}),e.jsx("p",{className:"abstract-text",children:(i=r.abstract_mentions)!=null&&i.length?e.jsx(Sn,{abstract:l,mentions:r.abstract_mentions}):e.jsx(jt,{text:l})}),r.tldr&&e.jsxs("details",{className:"tldr-details paper-section-anchor",id:"tldr",open:o,children:[e.jsxs("summary",{children:[e.jsx("span",{className:"tldr-toggle-show",children:"Show TL;DR"}),e.jsx("span",{className:"tldr-toggle-hide",children:"Hide TL;DR"}),e.jsx("span",{className:"tldr-toggle-hint",children:"short summary"})]}),e.jsx("div",{className:"tldr-box",children:r.tldr})]}),e.jsx(Pn,{paper:r,readerChatRoute:n}),e.jsx(Me,{id:"tasks",label:"Tasks",accent:e.jsxs("span",{className:"accent",children:[((u=r.tasks)==null?void 0:u.length)||0," tagged",t&&e.jsx("button",{type:"button",onClick:a,className:"edit-link",children:"edit"})]})}),e.jsx("div",{className:"paper-tags",style:{marginBottom:8},children:(r.tasks??[]).map(f=>e.jsx(ma,{slug:f.slug||"",label:f.name},f.id))}),e.jsx(Me,{id:"methods",label:"Methods",accent:e.jsxs("span",{className:"accent",children:[((g=r.methods)==null?void 0:g.length)||0," used",t&&e.jsx("button",{type:"button",onClick:s,className:"edit-link",children:"edit"})]})}),e.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:6,marginBottom:8},children:(r.methods??[]).map(f=>e.jsx(ha,{method:f},f.id))})]})}const Se=["my-bookmark-ids"],kt="pwc:pending-bookmark";function ss(t){window.sessionStorage.setItem(kt,JSON.stringify(t)),window.location.assign(Ua(!0))}function Rn(){var r,n;const{user:t}=Ge(),s=te({queryKey:Se,queryFn:()=>bt.getBookmarkIds(),enabled:!!t,staleTime:60*1e3,refetchOnWindowFocus:!1}),a=Ke.useMemo(()=>{var l;return new Set(((l=s.data)==null?void 0:l.paper_ids)??[])},[(r=s.data)==null?void 0:r.paper_ids]);return{ids:((n=s.data)==null?void 0:n.paper_ids)??[],idSet:a,isLoading:s.isLoading,isError:s.isError}}function In(){const{user:t}=Ge(),s=ce(),a=ee({mutationFn:async({paperId:n,isBookmarked:l})=>{l?await bt.removeBookmark(n):await bt.addBookmark(n)},onMutate:async({paperId:n,isBookmarked:l})=>{await s.cancelQueries({queryKey:Se});const o=s.getQueryData(Se),i=typeof n=="string"?Number(n):n,u=(o==null?void 0:o.paper_ids)??[],g=l?u.filter(f=>f!==i):[i,...u.filter(f=>f!==i)];return s.setQueryData(Se,{paper_ids:g}),{previous:o}},onError:(n,l,o)=>{o!=null&&o.previous&&s.setQueryData(Se,o.previous),n instanceof xt&&n.code==="saved_papers_bucket_authorization_required"&&ss(l)},onSettled:()=>{s.invalidateQueries({queryKey:Se}),s.invalidateQueries({queryKey:[..._e.feeds.saved]})}});return Ke.useEffect(()=>{if(!t||a.isPending)return;const n=new URL(window.location.href);if(n.searchParams.get(Qt)!=="1")return;n.searchParams.delete(Qt),window.history.replaceState({},"",`${n.pathname}${n.search}${n.hash}`);const l=window.sessionStorage.getItem(kt);if(l){window.sessionStorage.removeItem(kt);try{const o=JSON.parse(l);(typeof o.paperId=="number"||typeof o.paperId=="string")&&typeof o.isBookmarked=="boolean"&&a.mutate(o)}catch{}}},[a,t]),{toggle:Ke.useCallback((n,l)=>{if(!t){if(ds())return;ss({paperId:n,isBookmarked:l});return}a.mutate({paperId:n,isBookmarked:l})},[a,t]),isPending:a.isPending}}const An=({paperId:t})=>{const{user:s}=Ge(),{idSet:a}=Rn(),{toggle:r,isPending:n}=In();if(ds())return null;const l=Number(t),o=!!s&&a.has(l),i=()=>{Number.isFinite(l)&&r(l,o)},u=s&&o?"Saved":"Save",g=s?o?"Remove from saved papers":"Save this paper":"Sign in with Hugging Face to save this paper";return e.jsxs("button",{type:"button",className:`action-btn${o?" is-saved":""}`,onClick:i,disabled:n,"aria-pressed":o,"aria-label":g,title:g,children:[e.jsx(V,{name:"bookmark",size:12}),u]})};function gt({children:t,showEdit:s=!1,onEdit:a,editAriaLabel:r}){return s?e.jsxs("span",{className:"action-btn-composite",children:[t,e.jsx("button",{type:"button",className:"action-btn-segment action-btn-edit",onClick:a,"aria-label":r,children:"edit"})]}):t}const Fn={tasks:"tasks",methods:"methods",results:"evaluation results",repositories:"GitHub repositories","project-pages":"project pages","hf-artifacts":"Hugging Face artifacts",organizations:"organizations","source-url":"source URL","x-threads":"X threads"};function as(t){if(!t)return"—";try{return new Date(t).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"})}catch{return"—"}}function rs(t,s){try{const a=new URL(t),n=a.pathname.replace(/\/$/,"").split("/").filter(Boolean).at(-1);return n?n.replace(/[-_]+/g," "):a.hostname.replace(/^www\./,"")}catch{return s}}const Pi=()=>{const{arxivId:t}=ra(),s=ns(),{toast:a}=se(),{user:r}=Ge(),n=(r==null?void 0:r.is_admin)??!1,l=!!r,o=qa(r),{arxivId:i,evaluations:u,evaluationsByTask:g,evaluationsLoading:f,paper:c,paperError:x,paperLoading:_,presentation:j,refetchEvaluations:C,refetchPaper:S,relatedQuery:b,versions:k,visibleEvaluations:$}=rr(t,o),[E,v]=m.useState(!1),{activeEditor:d,openEditor:h,setEditorOpen:w}=or();m.useEffect(()=>{o!=="direct"||!(c!=null&&c.id)||(d&&d!=="results"&&Y.primeCurationState(c.id).catch(()=>{}),d==="results"&&Xe.primeCurationState(c.id).catch(()=>{}))},[d,o,c==null?void 0:c.id]);const[A,z]=m.useState(null),M=m.useRef(!1);m.useEffect(()=>{if(!r||!c||M.current)return;const P=sessionStorage.getItem("pwc:fresh-auth-edit");if(!P)return;M.current=!0;const O=ir(P);if(!Y.freshAuthMutationDraft()){sessionStorage.removeItem("pwc:fresh-auth-edit"),O&&h(O);return}if(!window.confirm("You signed in again. Apply the saved destructive catalog edit now? The server will recheck the current catalog version before changing anything.")){a({title:"Edit kept locally",description:"Nothing was changed. Reload this paper when you are ready to confirm the saved edit."});return}Y.resumeFreshAuthMutation().then(()=>{a({title:"Edit applied",description:"The restored catalog edit was applied."}),window.location.reload()}).catch($e=>{a({variant:"destructive",title:"Could not apply the saved edit",description:$e instanceof Error?$e.message:"Please reload and review the edit again."})})},[h,c,a,r]);const K=m.useMemo(()=>{if(!r||!(c!=null&&c.author_links))return!1;const P=r.username.toLowerCase();return c.author_links.some(O=>!!O.hf_username&&O.hf_username.toLowerCase()===P)},[r,c==null?void 0:c.author_links]),G=P=>{if(!l){z(P);return}h(P)},[p,R]=m.useState("idle"),[I,U]=m.useState(null),[D,H]=m.useState(null),q=async()=>{if(i){R("indexing"),U(null),H(null);try{await Y.indexFromArxiv(i),a({title:"Indexed",description:"Paper added to database."}),setTimeout(()=>S(),1200),R("idle")}catch(P){const O=P;let be=O.message||"Failed to index paper";if(O.response)try{be=JSON.parse(O.response).detail||be}catch{be=O.response}U(be),(O.status===429||O.status===503)&&H("Try again later after arXiv has lifted the temporary limit."),R("idle")}}},J=(j==null?void 0:j.citationCopy)??"",Z=(j==null?void 0:j.copyableRanks)??[],[Ye,De]=m.useState(!1),ye=async()=>{if(J)try{await navigator.clipboard.writeText(J),De(!0),a({title:"Citation copied",description:"BibTeX entry copied to clipboard."}),window.setTimeout(()=>De(!1),1500)}catch{a({title:"Copy failed",description:"Could not access the clipboard. Please copy manually.",variant:"destructive"})}},y=async()=>{if(!c)return;const P=c.arxiv_id||c.id,O=Oa(P,Z);if(O)try{await navigator.clipboard.writeText(O),a({title:"PwC badges copied",description:"Each badge follows its current leaderboard result."})}catch{a({title:"Copy failed",description:"Could not access the clipboard. Please try again.",variant:"destructive"})}};if(_)return e.jsxs("div",{className:"page",children:[e.jsx(Ie,{className:"h-12 w-3/4 mb-4"}),e.jsx(Ie,{className:"h-6 w-1/3 mb-8"}),e.jsx(Ie,{className:"h-64 w-full"})]});if(x||!c)return e.jsxs("div",{className:"page",children:[e.jsxs("div",{className:"breadcrumb",children:[e.jsx(me,{to:"/papers",children:"Papers"}),e.jsx("span",{className:"sep",children:"/"}),e.jsxs("span",{style:{color:"var(--ink)"},children:["arXiv:",i]})]}),e.jsx("h1",{className:"detail-title",children:"Paper not indexed yet"}),e.jsxs("p",{style:{fontFamily:"var(--serif)",color:"var(--ink-soft)",marginTop:16,maxWidth:640},children:["We don't have ",e.jsxs("span",{style:{fontFamily:"var(--mono)"},children:["arXiv:",i]})," in the database. You can index it from arXiv right now."]}),I&&e.jsx(ka,{variant:"destructive",className:"mt-4 max-w-xl",children:e.jsxs(Na,{children:[e.jsx("div",{children:I}),D&&e.jsx("div",{className:"mt-2",children:D})]})}),e.jsxs("div",{className:"action-row",children:[n&&e.jsxs("button",{className:"action-btn",onClick:q,disabled:p==="indexing",children:[e.jsx(V,{name:"sparkle",size:12}),p==="indexing"?"Indexing…":"Index from arXiv"]}),e.jsx(L,{variant:"outline",onClick:()=>s("/papers"),children:"Browse Papers"})]})]});if(!j)return null;const{allHfArtifactUrls:N,authorEntries:F,citationDisplay:T,hasIntroducedItems:Q,hasLineageItems:X,hfArtifactViewer:B,introducedBenchmarks:Ms,introducedFrameworks:It,introducedMethods:Os,introducedSummary:Ks,numPages:At,paperSourceLabel:Ft,predecessorPapers:Je,projectPages:Ee,safeAbstractUrl:Be,safeConferenceUrl:Lt,safePdfUrl:Tt,successorPapers:Ze}=j,ze=12,Pe=va(c,i),Gs=Pe&&zt()&&na()&&(!Ht()||n)?Pe:null,Ut=c.organizations||[],Dt=P=>{const O=Da(P)??P.name;return e.jsx(me,{to:`/orgs/${P.slug}`,className:`detail-title-org${P.logo_url?" detail-title-org--logo":""}`,title:P.name,"aria-label":P.name,children:P.logo_url?e.jsx("img",{src:P.logo_url,alt:"",onError:be=>{var $e;($e=be.currentTarget.parentElement)==null||$e.classList.remove("detail-title-org--logo"),be.currentTarget.replaceWith(O)}}):O},P.id)},Bt=E||F.length<=ze?F:F.slice(0,ze);return e.jsxs("div",{className:"page",children:[e.jsxs("div",{className:"breadcrumb",children:[e.jsx(me,{to:"/",children:"Trending"}),e.jsx("span",{className:"sep",children:"/"}),c.arxiv_id&&Be?e.jsxs("a",{className:"breadcrumb-external",href:Be,target:"_blank",rel:"noopener noreferrer",title:"Open on arXiv",children:[Ft,e.jsx("span",{"aria-hidden":"true",children:"↗"})]}):e.jsx("span",{children:Ft})]}),e.jsxs("div",{className:"detail-grid",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"detail-hero",children:[e.jsxs("div",{className:"detail-hero-main",children:[e.jsxs("h1",{className:"detail-title",children:[e.jsx(qe,{title:c.title}),Ut.slice(0,-1).map(Dt),e.jsxs("span",{className:"detail-title-tail",children:[Ut.slice(-1).map(Dt),e.jsx("button",{type:"button",className:"detail-title-edit",onClick:()=>G("organizations"),title:"Edit organizations","aria-label":"Edit organizations",children:e.jsx(V,{name:"pencil",size:11})})]})]}),e.jsxs("div",{className:"detail-meta",children:[e.jsxs("span",{children:["Submitted ",as(c.published)]}),At&&e.jsxs(e.Fragment,{children:[e.jsx("span",{children:"·"}),e.jsxs("span",{children:[At," pages"]})]}),c.citation_count!=null&&e.jsxs(e.Fragment,{children:[e.jsx("span",{children:"·"}),e.jsxs("span",{children:[c.citation_count.toLocaleString()," citations"]})]}),(c.proceeding||c.conference_slug)&&e.jsxs(e.Fragment,{children:[e.jsx("span",{children:"·"}),c.conference_slug?e.jsx("a",{href:`/conferences/${c.conference_slug}`,target:"_blank",rel:"noopener noreferrer",style:{color:"var(--accent-text)"},children:(c.proceeding||c.conference_name||"").replace(/\s+\d{1,2}$/,"")}):e.jsx("span",{children:c.proceeding.replace(/\s+\d{1,2}$/,"")})]}),k.length>1&&e.jsxs(e.Fragment,{children:[e.jsx("span",{children:"·"}),e.jsx("select",{className:"version-select",value:c.version,onChange:P=>{const O=P.target.value;c.arxiv_id&&s(`/paper/${c.arxiv_id.replace(/v\d+$/,"")}${O?`?version=${O}`:""}`)},children:k.map(P=>e.jsxs("option",{value:P.version,children:[P.version," — ",as(P.published)]},P.version))})]})]}),e.jsxs("div",{className:"detail-authors",children:[Bt.map((P,O)=>e.jsxs(Ke.Fragment,{children:[P.hf_username&&e.jsx(Ba,{className:"detail-author-avatar",url:P.hf_avatar_url}),P.id?e.jsx(me,{to:`/authors/${P.id}`,children:P.name}):P.hf_username?e.jsx("a",{href:`https://huggingface.co/${P.hf_username}`,target:"_blank",rel:"noopener noreferrer",title:`@${P.hf_username} on Hugging Face`,children:P.name}):e.jsx("a",{children:P.name}),Oze&&e.jsx("button",{className:"show-more-authors",onClick:()=>v(P=>!P),style:{marginLeft:8,background:"none",border:"none",cursor:"pointer",color:"var(--accent-text)",fontFamily:"var(--mono)",fontSize:12},children:E?"show fewer":`+${c.authors.length-ze} more`})]}),e.jsxs("div",{className:"action-row",children:[Pe&&zt()&&(!Ht()||r!=null&&r.is_admin)?e.jsxs(me,{className:"action-btn",to:Pe,onClick:()=>us(Pe),children:[e.jsx(V,{name:"pdf",size:12})," Read paper",e.jsx("span",{className:"nav-new-badge","aria-hidden":"true",children:"New"})]}):Tt?e.jsxs("a",{className:"action-btn",href:Tt,target:"_blank",rel:"noopener noreferrer",children:[e.jsx(V,{name:"pdf",size:12})," View PDF"]}):null,Be&&c.source==="external"&&e.jsx(gt,{showEdit:!0,onEdit:()=>G("source-url"),editAriaLabel:"Edit source URL",children:e.jsxs("a",{className:"action-btn-segment action-btn-main",href:Be,target:"_blank",rel:"noopener noreferrer",children:[e.jsx(V,{name:"external",size:12})," Source page"]})}),Ee.length===1?e.jsx(gt,{showEdit:!0,onEdit:()=>G("project-pages"),editAriaLabel:"Edit project pages",children:e.jsxs("a",{className:"action-btn-segment action-btn-main",href:Ee[0].safeHref??void 0,target:"_blank",rel:"noopener noreferrer",children:[e.jsx(V,{name:"globe",size:12})," Project page"]})}):null,Ee.length>1?e.jsx(gt,{showEdit:!0,onEdit:()=>G("project-pages"),editAriaLabel:"Edit project pages",children:e.jsxs(ia,{children:[e.jsx(oa,{asChild:!0,children:e.jsxs("button",{type:"button",className:"action-btn-segment action-btn-main",children:[e.jsx(V,{name:"globe",size:12})," Project page"]})}),e.jsx(la,{align:"start",className:"project-page-menu",children:Ee.map((P,O)=>e.jsx(ca,{asChild:!0,children:P.safeHref?e.jsx("a",{href:P.safeHref,target:"_blank",rel:"noopener noreferrer",children:rs(P.url,`Project page ${O+1}`)}):e.jsx("span",{children:rs(P.url,`Project page ${O+1}`)})},P.url))})]})}):null,Ee.length===0&&l?e.jsxs("button",{type:"button",className:"action-btn",onClick:()=>G("project-pages"),title:"Add project page",children:[e.jsx(V,{name:"globe",size:12})," Add project page"]}):null,Lt&&e.jsxs("a",{className:"action-btn",href:Lt,target:"_blank",rel:"noopener noreferrer",children:[e.jsx(V,{name:"external",size:12})," Conference"]}),e.jsx(lr,{paperId:Number(c.id)}),n&&da()&&e.jsx(Es,{kind:"enrich-paper",triggerClassName:"action-btn",paperId:Number(c.id),paperTitle:c.title,onComplete:()=>void S()}),e.jsx(An,{paperId:c.id})]}),c.leaderboard_ranks&&c.leaderboard_ranks.length>0&&e.jsx(pa,{wrap:!0,paperHref:`/paper/${c.arxiv_id||c.id}`,ranks:ja(c.leaderboard_ranks)})]}),e.jsx("div",{className:"detail-hero-thumb detail-thumb-wrap",children:e.jsx(fa,{paperId:c.arxiv_id||c.id,title:c.title,thumbnailUrl:ua(c.thumbnail_url),priority:!0})})]}),Q&&e.jsxs("div",{className:`introduced-banner${It.length>0?" introduced-banner--framework":""}`,children:[e.jsx("span",{className:"introduced-label",children:"Introduced"}),e.jsxs("div",{className:"introduced-methods",children:[Os.map(P=>e.jsxs("button",{type:"button",className:"introduced-pill",onClick:()=>s(`/methods/${P.slug||P.id}`),children:[P.name,e.jsx("span",{className:"introduced-arrow",children:"→"})]},`method-${P.id}`)),Ms.map(P=>e.jsxs("button",{type:"button",className:"introduced-pill",onClick:()=>s(`/benchmark/${P.slug||P.id}`),children:[P.name,e.jsx("span",{className:"introduced-arrow",children:"→"})]},`benchmark-${P.id}`)),It.map(P=>e.jsxs("button",{type:"button",className:"introduced-pill",onClick:()=>s(`/frameworks#framework-${P.slug}`),children:[P.name,e.jsx("span",{className:"introduced-arrow",children:"→"})]},`framework-${P.slug}`))]}),e.jsxs("span",{className:"introduced-note",children:["This paper is the canonical source for ",Ks,"."]})]}),X&&e.jsxs("div",{className:"introduced-banner lineage-banner",children:[Ze.length>0&&e.jsxs("div",{className:"lineage-row",children:[e.jsx("span",{className:"introduced-label lineage-label",children:Ze.length===1?"Follow-up paper":"Follow-up papers"}),e.jsx("div",{className:"introduced-methods",children:Ze.map(P=>e.jsxs("button",{type:"button",className:"introduced-pill lineage-pill",onClick:()=>s(`/paper/${P.route_identifier}`),children:[e.jsx(qe,{title:P.title}),e.jsx("span",{className:"introduced-arrow",children:"→"})]},`successor-${P.id}`))})]}),Je.length>0&&e.jsxs("div",{className:"lineage-row",children:[e.jsx("span",{className:"introduced-label lineage-label",children:Je.length===1?"Predecessor paper":"Predecessor papers"}),e.jsx("div",{className:"introduced-methods",children:Je.map(P=>e.jsxs("button",{type:"button",className:"introduced-pill lineage-pill",onClick:()=>s(`/paper/${P.route_identifier}`),children:[e.jsx("span",{className:"introduced-arrow lineage-arrow-back",children:"←"}),e.jsx(qe,{title:P.title})]},`predecessor-${P.id}`))})]})]}),e.jsx($n,{canEdit:!0,onEditMethods:()=>G("methods"),onEditTasks:()=>G("tasks"),paper:c,readerChatRoute:Gs}),e.jsx(Or,{canCopyBadge:Z.length>0,canEdit:!0,evaluationsByTask:g,evaluationsLoading:f,isAdmin:n,onCopyBadge:y,onEdit:()=>G("results"),onRefresh:()=>void C(),paper:c,visibleEvaluationCount:($==null?void 0:$.length)??0})]}),e.jsx(kn,{allHfArtifactUrls:N,citationCopied:Ye,citationDisplay:T,hfArtifactViewer:B,onCopyCitation:ye,onEditHfArtifacts:()=>G("hf-artifacts"),onEditRepositories:()=>G("repositories"),onEditXThreads:()=>G("x-threads"),paper:c,relatedIsLoading:b.isLoading,relatedPapers:b.data,user:r})]}),e.jsx(Hr,{activeEditor:d,arxivId:i,editSubmitMode:o,evaluations:u??[],isAdmin:n,isLinkedAuthor:K,onOpenChange:w,paper:c}),e.jsx($a,{open:A!==null,onOpenChange:P=>{P||z(null)},sectionLabel:A?Fn[A]:"this paper",returnTo:typeof window<"u"?window.location.pathname:"/"})]})};export{Pi as default}; diff --git a/assets/PaperFeed-kaLm5US2.js b/assets/PaperFeed-kaLm5US2.js new file mode 100644 index 0000000000000000000000000000000000000000..87624ed56de276f1cb211d31329aa7a47b93288c --- /dev/null +++ b/assets/PaperFeed-kaLm5US2.js @@ -0,0 +1 @@ +import{r as u,j as t,e as q,K as J}from"./index-YwiKC6Po.js";import{P as X}from"./PaperCard-FG-bEpJk.js";import{P as ee,a as te,b as ae}from"./popover-D7ygxg37.js";import{I as se}from"./Icon-DXQ4sjQk.js";import{S as j}from"./skeleton-CXR1qouH.js";import{u as ne}from"./useIntersectionObserver-Dt36kyjs.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)),K=()=>{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?K():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]=q(),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(J.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/PaperFeedFilters-DNebHp4l.js b/assets/PaperFeedFilters-DNebHp4l.js deleted file mode 100644 index cef6e7d45c2bb8534ef1a5329a678d204ba362ee..0000000000000000000000000000000000000000 --- a/assets/PaperFeedFilters-DNebHp4l.js +++ /dev/null @@ -1 +0,0 @@ -import{j as e}from"./index-D6jcIRWs.js";import{I as n}from"./components-DO1X940E.js";const t=()=>e.jsxs("span",{className:"hf-resource-logo",children:[e.jsx("img",{className:"hf-resource-logo-black",src:"/hf-logo-monochrome-black.svg?v=20260729",alt:""}),e.jsx("img",{className:"hf-resource-logo-white",src:"/hf-logo-monochrome-white.svg?v=20260729",alt:""})]}),l=({checked:s,icon:a,label:r,onChange:o})=>e.jsxs("button",{type:"button",className:`paper-feed-filter ${s?"active":""}`,"aria-pressed":s,onClick:()=>o(!s),children:[e.jsxs("span",{className:"paper-feed-filter-content",children:[e.jsx("span",{className:"paper-feed-filter-icon","aria-hidden":"true",children:a}),r]}),s&&e.jsx("span",{className:"paper-feed-filter-check","aria-hidden":"true",children:"✓"})]}),h=({hasCode:s,hasHfArtifacts:a,onHasCodeChange:r,onHasHfArtifactsChange:o,showDivider:c=!0,showHasCode:i=!0})=>e.jsxs("div",{className:"paper-feed-resource-controls",role:"group","aria-label":"Resource filters",children:[c&&e.jsx("span",{className:"paper-feed-resource-divider","aria-hidden":"true"}),e.jsxs("div",{className:"paper-feed-filter-options",children:[i&&e.jsx(l,{checked:s,icon:e.jsx(n,{name:"github",size:14}),label:"Has code",onChange:r}),e.jsx(l,{checked:a,icon:e.jsx(t,{}),label:"Has artifacts",onChange:o})]})]});export{h as P}; diff --git a/assets/PaperPreviewLink-fcJyP9H0.js b/assets/PaperPreviewLink-CKfmgBjs.js similarity index 88% rename from assets/PaperPreviewLink-fcJyP9H0.js rename to assets/PaperPreviewLink-CKfmgBjs.js index d3c6bb5e427dda2ef9662c6636f12ad459960e28..e86091628935f05f65cb8898b71791548d687dc0 100644 --- a/assets/PaperPreviewLink-fcJyP9H0.js +++ b/assets/PaperPreviewLink-CKfmgBjs.js @@ -1,7 +1,7 @@ -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-uFGyKu5N.js";import{l as fe}from"./index-yduEvk9Z.js";import R from"./katex-DkKDou_j.js";import{j as p,K as A,Y as de,o as C,d as xe,f as ge,L as T,A as ye}from"./index-D6jcIRWs.js";import{u as we}from"./useQuery-CUJUm4FY.js";import{H as be,a as Ne,b as ve}from"./hover-card-DPpv0l_x.js";import{a as I,p as ke}from"./papers-DIIIPDpj.js";import{u as Fe}from"./useMutation-p6mN4h17.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-CoRCN2p0.js";import{l as fe}from"./index-BM_xSDJM.js";import R from"./katex-DkKDou_j.js";import{j as p,K as A,Y as de,o as C,d as xe,f as ge,L as T,J as ye}from"./index-YwiKC6Po.js";import{u as we}from"./useQuery-DPH6Mb2w.js";import{H as be,a as Ne,b as ve}from"./hover-card-BY9tUGxy.js";import{a as I,p as ke}from"./paperQueryKeys-C5FMa4Oj.js";import{u as Fe}from"./useMutation-f6iDkf3w.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+` -`)),d+=m.move(f),g(),d}function n(s,o,l){let a=s.value||"",c=1;for(t||c++;new RegExp("(^|[^$])"+"\\$".repeat(c)+"([^$]|$)").test(a);)c++;const m="$".repeat(c);/[^ \r\n]/.test(a)&&(/^[ \r\n]/.test(a)&&/[ \r\n]$/.test(a)||/^\$|\$$/.test(a))&&(a=" "+a+" ");let f=-1;for(;++fc&&(c=m):m&&(c!==void 0&&c>-1&&a.push(` +`)),d+=m.move(f),g(),d}function n(s,o,l){let a=s.value||"",c=1;for(t||c++;new RegExp("(^|[^$])"+"\\$".repeat(c)+"([^$]|$)").test(a);)c++;const m="$".repeat(c);/[^ \r\n]/.test(a)&&(/^[ \r\n]/.test(a)&&/[ \r\n]$/.test(a)||/^\$|\$$/.test(a))&&(a=" "+a+" ");let f=-1;for(;++fc&&(c=m):m&&(c!==void 0&&c>-1&&a.push(` `.repeat(c)||" "),c=-1,a.push(m))}return a.join("")}function re(e,t,r){return e.type==="element"?it(e,t,r):e.type==="text"?r.whitespace==="normal"?ie(e,r):at(e):[]}function it(e,t,r){const n=ae(e,r),i=e.children||[];let s=-1,o=[];if(nt(e))return o;let l,a;for(P(e)||W(e)&&V(t,e,W)?a=` -`:tt(e)?(l=2,a=2):ne(e)&&(l=1,a=1);++s({name:r.name,slug:r.slug??""}))}}function mt(e){if(!e.authors.length)return"";const t=e.authors.slice(0,3).join(", ");return e.authors.length>3?`${t}, et al.`:t}function ft(e){var r;if(e.conference)return e.conference;const t=(r=e.published)==null?void 0:r.slice(0,4);if(e.arxivId)return t?`arXiv ${t}`:"arXiv";if(e.sourceUrl)try{return new URL(e.sourceUrl).hostname.replace(/^www\./,"")}catch{}return t??"external"}const dt=({seed:e=0})=>p.jsxs("div",{className:"paper-preview-thumb","aria-hidden":"true","data-testid":"faux-paper-thumb",children:[p.jsxs("div",{className:"paper-preview-thumb-title",children:[p.jsx("span",{}),p.jsx("span",{})]}),p.jsx("div",{className:"paper-preview-thumb-auth"}),p.jsxs("div",{className:"paper-preview-thumb-cols",children:[p.jsx("div",{className:"paper-preview-thumb-col"}),p.jsx("div",{className:"paper-preview-thumb-col"})]}),p.jsx("div",{className:"paper-preview-thumb-fig",style:{top:62+e%3*8}})]}),xt=({thumbnailUrl:e,seed:t})=>{const[r,n]=A.useState(!1),i=de(e);return A.useEffect(()=>n(!1),[i]),!i||r?p.jsx(dt,{seed:t}):p.jsx("div",{className:"paper-preview-thumb paper-preview-thumb-real",children:p.jsx("img",{"data-testid":"paper-preview-image",src:i,alt:"",loading:"lazy",decoding:"async",onError:()=>n(!0)})})},Y=({data:e})=>{const t=e.routeId.split("").reduce((n,i)=>n+i.charCodeAt(0),0),r=mt(e);return p.jsxs("div",{className:"paper-preview-inner",children:[p.jsx(xt,{thumbnailUrl:e.thumbnailUrl,seed:t}),p.jsxs("div",{className:"paper-preview-meta",children:[p.jsx("div",{className:"paper-preview-title",children:e.title}),r&&p.jsx("div",{className:"paper-preview-auth",children:r}),p.jsxs("div",{className:"paper-preview-venue",children:[ft(e),e.arxivId&&p.jsxs(p.Fragment,{children:[" · arXiv:",e.arxivId]}),e.citationCount!=null&&p.jsxs(p.Fragment,{children:[" · ↑ ",e.citationCount.toLocaleString()]})]}),e.tasks.length>0&&p.jsx("div",{className:"paper-preview-tags",children:e.tasks.map(n=>p.jsx("span",{className:"paper-preview-tag",children:n.name},n.slug||n.name))})]})]})},M=e=>ke.preview(C(e)),gt=e=>e.arxiv_id??e.id,Z=200;function St(e,t=I){const r=new Set,n=async s=>{const o=new Map;for(const l of s)l.arxiv_id&&r.add(C(l.arxiv_id));for(let l=0;l{const o=s.filter(l=>{const a=C(l);return r.has(a)||e.getQueryData(M(a))?!1:(r.add(a),!0)});o.length&&n(o.map(l=>({key:l,arxiv_id:l}))).catch(()=>{})}}}const yt=/^(\d{4}\.\d{4,5}|[a-z-]+(\.[A-Z]{2})?\/\d{7})$/i,wt=({arxivId:e})=>{var i;const t=xe(),r=ge(),n=Fe({mutationFn:()=>I.submit({arxiv_id:e}),onSuccess:s=>{s.pending_review||r.invalidateQueries({queryKey:M(e)})}});return(i=n.data)!=null&&i.pending_review?p.jsxs("div",{className:"paper-preview-status paper-preview-index-request",children:[p.jsx("span",{children:"Indexing request queued for review."}),p.jsx(T,{to:"/submissions",target:"_blank",rel:"noopener noreferrer",children:"View submissions ↗"})]}):p.jsxs("div",{className:"paper-preview-status paper-preview-index-request",children:[p.jsx("span",{children:"Not indexed on Papers with Code yet."}),t!=null&&t.user?p.jsx("button",{type:"button",disabled:n.isPending,onClick:()=>n.mutate(),children:n.isPending?"Requesting…":"Request indexing"}):p.jsx(T,{to:`/submit?arxiv_id=${encodeURIComponent(e)}`,target:"_blank",rel:"noopener noreferrer",children:"Request indexing ↗"}),n.isError&&p.jsx("span",{role:"alert",children:n.error.message})]})},bt=()=>typeof window.matchMedia=="function"&&window.matchMedia("(hover: none), (pointer: coarse)").matches,Pt=({routeId:e,to:t,initialData:r,className:n,children:i,target:s,title:o,ariaLabel:l,onClick:a,previewFooter:c,cardOpensPaper:m=!1})=>{const f=C(e),[g,d]=A.useState(!1),x=!!(r!=null&&r.title.trim()),h=we({queryKey:M(f),queryFn:()=>I.get(f,!1),enabled:g&&!x,staleTime:5*60*1e3,gcTime:30*60*1e3,retry:!1}),y=r??(h.data?pt(h.data,f):void 0),v=h.error instanceof ye&&h.error.status===404&&yt.test(f),u=p.jsx(T,{className:n,to:t??`/paper/${f}`,target:s,title:o,"aria-label":l,onClick:k=>{d(!1),a==null||a(k)},rel:s==="_blank"?"noopener noreferrer":void 0,children:i});return p.jsxs(be,{open:g,onOpenChange:k=>{(!k||!bt())&&d(k)},openDelay:150,closeDelay:100,children:[p.jsx(Ne,{asChild:!0,children:u}),p.jsx(ve,{className:"paper-preview-pop",side:"bottom",align:"start",collisionPadding:12,children:y?p.jsxs(p.Fragment,{children:[m?p.jsx(T,{className:"paper-preview-card-link",to:`/paper/${encodeURIComponent(f)}`,target:"_blank",rel:"noopener noreferrer",onClick:()=>d(!1),children:p.jsx(Y,{data:y})}):p.jsx(Y,{data:y}),c==null?void 0:c(y)]}):v?p.jsx(wt,{arxivId:f}):h.isError?p.jsx("div",{className:"paper-preview-status",children:"Preview unavailable"}):p.jsx("div",{className:"paper-preview-status","aria-live":"polite",children:"Loading preview…"})})]})};export{Pt as P,Et as a,St as c,At as r}; +`:tt(e)?(l=2,a=2):ne(e)&&(l=1,a=1);++s({name:r.name,slug:r.slug??""}))}}function mt(e){if(!e.authors.length)return"";const t=e.authors.slice(0,3).join(", ");return e.authors.length>3?`${t}, et al.`:t}function ft(e){var r;if(e.conference)return e.conference;const t=(r=e.published)==null?void 0:r.slice(0,4);if(e.arxivId)return t?`arXiv ${t}`:"arXiv";if(e.sourceUrl)try{return new URL(e.sourceUrl).hostname.replace(/^www\./,"")}catch{}return t??"external"}const dt=({seed:e=0})=>p.jsxs("div",{className:"paper-preview-thumb","aria-hidden":"true","data-testid":"faux-paper-thumb",children:[p.jsxs("div",{className:"paper-preview-thumb-title",children:[p.jsx("span",{}),p.jsx("span",{})]}),p.jsx("div",{className:"paper-preview-thumb-auth"}),p.jsxs("div",{className:"paper-preview-thumb-cols",children:[p.jsx("div",{className:"paper-preview-thumb-col"}),p.jsx("div",{className:"paper-preview-thumb-col"})]}),p.jsx("div",{className:"paper-preview-thumb-fig",style:{top:62+e%3*8}})]}),xt=({thumbnailUrl:e,seed:t})=>{const[r,n]=A.useState(!1),i=de(e);return A.useEffect(()=>n(!1),[i]),!i||r?p.jsx(dt,{seed:t}):p.jsx("div",{className:"paper-preview-thumb paper-preview-thumb-real",children:p.jsx("img",{"data-testid":"paper-preview-image",src:i,alt:"",loading:"lazy",decoding:"async",onError:()=>n(!0)})})},Y=({data:e})=>{const t=e.routeId.split("").reduce((n,i)=>n+i.charCodeAt(0),0),r=mt(e);return p.jsxs("div",{className:"paper-preview-inner",children:[p.jsx(xt,{thumbnailUrl:e.thumbnailUrl,seed:t}),p.jsxs("div",{className:"paper-preview-meta",children:[p.jsx("div",{className:"paper-preview-title",children:e.title}),r&&p.jsx("div",{className:"paper-preview-auth",children:r}),p.jsxs("div",{className:"paper-preview-venue",children:[ft(e),e.arxivId&&p.jsxs(p.Fragment,{children:[" · arXiv:",e.arxivId]}),e.citationCount!=null&&p.jsxs(p.Fragment,{children:[" · ↑ ",e.citationCount.toLocaleString()]})]}),e.tasks.length>0&&p.jsx("div",{className:"paper-preview-tags",children:e.tasks.map(n=>p.jsx("span",{className:"paper-preview-tag",children:n.name},n.slug||n.name))})]})]})},M=e=>ke.preview(C(e)),gt=e=>e.arxiv_id??e.id,J=200;function St(e,t=I){const r=new Set,n=async s=>{const o=new Map;for(const l of s)l.arxiv_id&&r.add(C(l.arxiv_id));for(let l=0;l{const o=s.filter(l=>{const a=C(l);return r.has(a)||e.getQueryData(M(a))?!1:(r.add(a),!0)});o.length&&n(o.map(l=>({key:l,arxiv_id:l}))).catch(()=>{})}}}const yt=/^(\d{4}\.\d{4,5}|[a-z-]+(\.[A-Z]{2})?\/\d{7})$/i,wt=({arxivId:e})=>{var i;const t=xe(),r=ge(),n=Fe({mutationFn:()=>I.submit({arxiv_id:e}),onSuccess:s=>{s.pending_review||r.invalidateQueries({queryKey:M(e)})}});return(i=n.data)!=null&&i.pending_review?p.jsxs("div",{className:"paper-preview-status paper-preview-index-request",children:[p.jsx("span",{children:"Indexing request queued for review."}),p.jsx(T,{to:"/submissions",target:"_blank",rel:"noopener noreferrer",children:"View submissions ↗"})]}):p.jsxs("div",{className:"paper-preview-status paper-preview-index-request",children:[p.jsx("span",{children:"Not indexed on Papers with Code yet."}),t!=null&&t.user?p.jsx("button",{type:"button",disabled:n.isPending,onClick:()=>n.mutate(),children:n.isPending?"Requesting…":"Request indexing"}):p.jsx(T,{to:`/submit?arxiv_id=${encodeURIComponent(e)}`,target:"_blank",rel:"noopener noreferrer",children:"Request indexing ↗"}),n.isError&&p.jsx("span",{role:"alert",children:n.error.message})]})},bt=()=>typeof window.matchMedia=="function"&&window.matchMedia("(hover: none), (pointer: coarse)").matches,Pt=({routeId:e,to:t,initialData:r,className:n,children:i,target:s,title:o,ariaLabel:l,onClick:a,previewFooter:c,cardOpensPaper:m=!1})=>{const f=C(e),[g,d]=A.useState(!1),x=!!(r!=null&&r.title.trim()),h=we({queryKey:M(f),queryFn:()=>I.get(f,!1),enabled:g&&!x,staleTime:5*60*1e3,gcTime:30*60*1e3,retry:!1}),y=r??(h.data?pt(h.data,f):void 0),v=h.error instanceof ye&&h.error.status===404&&yt.test(f),u=p.jsx(T,{className:n,to:t??`/paper/${f}`,target:s,title:o,"aria-label":l,onClick:k=>{d(!1),a==null||a(k)},rel:s==="_blank"?"noopener noreferrer":void 0,children:i});return p.jsxs(be,{open:g,onOpenChange:k=>{(!k||!bt())&&d(k)},openDelay:150,closeDelay:100,children:[p.jsx(Ne,{asChild:!0,children:u}),p.jsx(ve,{className:"paper-preview-pop",side:"bottom",align:"start",collisionPadding:12,children:y?p.jsxs(p.Fragment,{children:[m?p.jsx(T,{className:"paper-preview-card-link",to:`/paper/${encodeURIComponent(f)}`,target:"_blank",rel:"noopener noreferrer",onClick:()=>d(!1),children:p.jsx(Y,{data:y})}):p.jsx(Y,{data:y}),c==null?void 0:c(y)]}):v?p.jsx(wt,{arxivId:f}):h.isError?p.jsx("div",{className:"paper-preview-status",children:"Preview unavailable"}):p.jsx("div",{className:"paper-preview-status","aria-live":"polite",children:"Loading preview…"})})]})};export{Pt as P,Et as a,St as c,At as r}; diff --git a/assets/PaperReaderView-CTxDY9uR.js b/assets/PaperReaderView-CTxDY9uR.js deleted file mode 100644 index f85c7dfb8fed61ca6cefc87b84bc2736a97156d4..0000000000000000000000000000000000000000 --- a/assets/PaperReaderView-CTxDY9uR.js +++ /dev/null @@ -1 +0,0 @@ -import{r as s,j as a,A as J,u as Se,c as Ue,o as De,Y as je,O as Oe,L as Y}from"./index-D6jcIRWs.js";import{u as ee}from"./useQuery-CUJUm4FY.js";import{u as Ve,R as Qe,A as Xe,c as Ye,d as Ze,a as Ge,P as Je,e as et}from"./ArtifactWorkspace-CUZCugRS.js";import{M as tt}from"./MarkdownText-B_D3IE_p.js";import{g as rt,b as at}from"./papers-DIIIPDpj.js";import{w as st,e as nt}from"./paperReader-BIpQD5HO.js";import{b as ot}from"./usePapers-BbCSwcVk.js";import{c as it}from"./chat-ChnK8XDU.js";import{s as te}from"./safeExternalHref-CkBrsh84.js";import{ChatExperience as ct}from"./ChatView-wJIPZ39W.js";import"./chatSessions-DByIWBno.js";/* empty css */import"./hover-card-DPpv0l_x.js";import"./CatalogEntityPreviewLink-BhTSUN-X.js";import"./catalog-PYrB8_bm.js";import"./github-B7D_19Qm.js";import"./file-text-4G2I5_Zo.js";import"./PaperPreviewLink-fcJyP9H0.js";import"./index-uFGyKu5N.js";import"./index-yduEvk9Z.js";import"./katex-DkKDou_j.js";import"./useMutation-p6mN4h17.js";import"./copy-BmzqMihw.js";import"./thumbs-up-BqRlVdvF.js";import"./arrow-left-IzGlownM.js";import"./external-link-C_yz2sXa.js";import"./plus-C4UQ62Q1.js";import"./search-CfTufeR7.js";import"./chevron-up-CQKUhZ0S.js";import"./AuthorAvatar-UMHOVOr9.js";import"./useInfiniteQuery-FXco4P1n.js";import"./McpShowcase-CS9LZY9p.js";import"./AgentLogos-CFt_vIO2.js";import"./share-2-DPo2j-OC.js";import"./openrouter-DrXWVMlM.js";import"./queryOptions-C9woPjwX.js";function lt(r){return r instanceof J&&r.status===422?"This page could not be turned into a readable paper.":r instanceof J&&r.status===503?"Paper content is still being prepared. Please try again later.":"The paper could not be loaded."}function dt({paperId:r,paperKey:i,paperTitle:o,paperHref:b,sourceUrl:d,resources:t,paperVersion:f="",selectionEnabled:v=!1,onReady:h,onPaperSelection:I,onPaperSelectionError:B}){const c=s.useRef(null),g=ee({queryKey:["paperWebMarkdown",r],queryFn:()=>rt(r),staleTime:5*6e4,retry:(w,j)=>w<2&&!(j instanceof J&&j.status<500),retryDelay:3e3}),x=g.isSuccess;s.useEffect(()=>{x&&(h==null||h())},[h,x]),Ve({enabled:v&&!!f&&x,pagesRoot:c,routeId:i,paperVersion:f,numPages:1,onSelect:I,onError:B});const S=g.data?st(g.data):"";return a.jsxs("div",{className:"pdf-viewer",children:[a.jsx(Qe,{paperTitle:o,paperHref:b,resources:t,label:"Paper controls",children:a.jsx("div",{className:"pdf-toolbar-controls",children:a.jsx("a",{href:d,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:g.isPending?a.jsx("div",{className:"pdf-loading",role:"status",children:"Preparing a readable version of this page…"}):g.isError?a.jsxs("div",{className:"pdf-error",role:"alert",children:[a.jsx("p",{children:lt(g.error)}),a.jsxs("div",{children:[a.jsx("button",{type:"button",onClick:()=>void g.refetch(),children:"Retry"})," ",a.jsx("a",{href:d,target:"_blank",rel:"noopener noreferrer",children:"Open original"})]})]}):a.jsxs("article",{ref:c,className:"reader-web-document","data-page":"1",children:[!S.startsWith("# ")&&a.jsx("h1",{children:o}),a.jsx(tt,{text:S})]})})})]})}const _e=66,ut=240,re="pwc:reader:split-ratio",L=r=>`pwc:reader:session:${r}`,Z=r=>`pwc:reader:assistant-collapsed:${r}`,Ce=r=>`pwc:reader:page:${r}`;function G(r){const i=Number(sessionStorage.getItem(Ce(r)));return Number.isInteger(i)&&i>0?i:1}function pt(){const r=Number(localStorage.getItem(re));return Number.isFinite(r)&&r>=45&&r<=75?r:_e}function ft(r){const i=te(r);if(!i)return null;const o=new URL(i);return(o.hostname==="arxiv.org"||o.hostname==="www.arxiv.org")&&o.pathname.startsWith("/pdf/")&&o.pathname.endsWith(".pdf")&&(o.pathname=o.pathname.slice(0,-4)),o.href}const mt=/^\/pdf\/(\d{4}\.\d{4,5}(?:v\d{1,3})?|[a-z]+(?:-[a-z]+)*(?:\.[A-Z]{2})?\/\d{7}(?:v\d{1,3})?)$/;function ht(r){const i=new URL(r),o=i.pathname.match(mt);return(i.hostname==="arxiv.org"||i.hostname==="www.arxiv.org")&&o&&!i.search?je(`/paper-assets/arxiv-pdf/${o[1]}`)??r:r}function gt(r){return new URL(r).hostname.replace(/^www\./,"")}function bt(r){if(!r)return{};const i={};for(const d of r.repositories??[]){if(!d.is_official)continue;const t=te(d.url);if(!t)continue;const f=new URL(t),v=f.pathname.split("/").filter(Boolean);if((f.hostname==="github.com"||f.hostname==="www.github.com")&&v.length>=2){i.repository={href:t,stars:d.num_stars||0};break}}const o=[...r.project_pages??[]].sort((d,t)=>Number(t.is_official)-Number(d.is_official));for(const d of o){const t=te(d.url);if(t){i.projectPage={href:t,label:gt(t)};break}}const b=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 b>0&&r.arxiv_id&&(i.huggingFace={href:`https://huggingface.co/papers/${r.arxiv_id.replace(/v\d+$/i,"")}`,count:b}),i}function vt(){var xe,Pe,we,ye,Re;const r=Ue(),{paperId:i}=Se(),o=De(i??"").replace(/v\d+$/i,""),b=ot(o,!!o),d=ee({queryKey:["chatAvailability"],queryFn:()=>it.getAvailability(),refetchInterval:3e4,retry:!1}),t=b.data,f=t?nt(t):null,v=f?null:(t==null?void 0:t.source)==="external"?je(`/paper-assets/external/${t.id}/paper.pdf`):ft(t==null?void 0:t.url_pdf),h=v&&(t==null?void 0:t.source)!=="external"?ht(v):v,I=bt(t),B=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]),c=((xe=t==null?void 0:t.arxiv_id)==null?void 0:xe.replace(/v\d+$/i,""))||o,g=s.useCallback(()=>r(`/paper/${c}`),[c,r]),[x,S]=s.useState(()=>sessionStorage.getItem(L(o))||void 0),[w,j]=s.useState(pt),[u,ae]=s.useState(()=>sessionStorage.getItem(Z(o))==="1"),[P,_]=s.useState("paper"),[H,C]=s.useState(),[ke,se]=s.useState(),[Ae,ne]=s.useState(!1),Ie=s.useCallback(()=>ne(!0),[]),[$e,y]=s.useState(""),[Ne,Ee]=s.useState(()=>G(o)),[k,Te]=s.useState(0),[oe,ie]=s.useState(!1),[Me,F]=s.useState(!1),$=s.useRef(null),q=s.useRef(null),N=s.useRef(null),ce=s.useRef(null),le=s.useRef(null),K=s.useRef(!1),E=s.useRef(!1),T=s.useRef(0),R=s.useRef(0),U=s.useRef(0),A=s.useRef(w),D=s.useRef(G(o)),O=s.useRef(t==null?void 0:t.version),de=Ye().reset,ue=s.useRef(`${o}:${x??"new"}`),p=k>=840;s.useEffect(()=>{const e=`${o}:${x??"new"}`;ue.current!==e&&(ue.current=e,de())},[x,de,o]),s.useEffect(()=>{t!=null&&t.version&&O.current&&t.version!==O.current&&(C(void 0),y("")),O.current=t==null?void 0:t.version},[t==null?void 0:t.version]),s.useEffect(()=>{window.clearTimeout(T.current),F(!1);const e=sessionStorage.getItem(L(o));S(e||void 0),ae(sessionStorage.getItem(Z(o))==="1"),_("paper"),ne(!1),C(void 0),se(void 0),y("");const n=G(o);D.current=n,Ee(n)},[o]),s.useEffect(()=>()=>{window.clearTimeout(T.current),cancelAnimationFrame(R.current)},[]),s.useLayoutEffect(()=>{const e=$.current;if(!e)return;const n=()=>Te(e.clientWidth);n();const l=new ResizeObserver(n);return l.observe(e),()=>l.disconnect()},[t]),s.useEffect(()=>{if(!t)return;document.title=`${t.title} — Papers With Code reader`;let e=document.querySelector('meta[name="robots"]');const n=!e;e||(e=document.createElement("meta"),e.name="robots",document.head.appendChild(e));const l=e.content;e.content="noindex, nofollow";let m=document.querySelector('link[rel="canonical"]');const qe=!m;m||(m=document.createElement("link"),m.rel="canonical",document.head.appendChild(m));const Ke=m.href;return m.href=`${window.location.origin}/paper/${c}`,()=>{document.title="Papers With Code",n?e==null||e.remove():e&&(e.content=l),qe?m==null||m.remove():m&&(m.href=Ke)}},[c,t]);const M=s.useCallback(e=>{if(!k)return Math.max(45,Math.min(75,e));const n=480/k*100,l=100-360/k*100;return Math.max(n,Math.min(l,e))},[k]);s.useEffect(()=>j(e=>{const n=M(e);return A.current=n,n}),[M]);const W=e=>{const n=M(e);A.current=n,j(n),localStorage.setItem(re,String(n))},pe=e=>{var l;const n=M(e);A.current=n,q.current&&(q.current.style.width=`${n}%`),N.current&&(N.current.style.width=`${100-n}%`),(l=ce.current)==null||l.setAttribute("aria-valuenow",String(Math.round(n)))},fe=e=>{U.current=e,!R.current&&(R.current=requestAnimationFrame(()=>{var l;R.current=0;const n=(l=$.current)==null?void 0:l.getBoundingClientRect();n!=null&&n.width&&pe((U.current-n.left)/n.width*100)}))},We=e=>{E.current=!0,ie(!0),e.currentTarget.setPointerCapture(e.pointerId),fe(e.clientX)},V=()=>{var e;if(E.current){if(R.current){cancelAnimationFrame(R.current),R.current=0;const n=(e=$.current)==null?void 0:e.getBoundingClientRect();n!=null&&n.width&&pe((U.current-n.left)/n.width*100)}E.current=!1,j(A.current),localStorage.setItem(re,String(A.current)),ie(!1)}},me=e=>{window.clearTimeout(T.current),F(!0),ae(e),sessionStorage.setItem(Z(o),e?"1":"0"),T.current=window.setTimeout(()=>F(!1),ut+40)},he=e=>{K.current=!0,me(e)};s.useEffect(()=>{var e;K.current&&(K.current=!1,(e=u?le.current:N.current)==null||e.focus())},[u]);const ze=e=>{S(e),sessionStorage.setItem(L(o),e)},Le=()=>{S(void 0),sessionStorage.removeItem(L(o)),C(void 0),y("")},ge=((Pe=d.data)==null?void 0:Pe.paper_reader_selection_enabled)===!0,be=e=>{C(e),y(`Selection from page ${e.page} added to chat`),p&&u&&me(!1)},Be=s.useCallback(e=>{C(e),e||y("")},[]),Q=((we=d.data)==null?void 0:we.paper_reader_citations_enabled)===!0&&!!h,z=ee({queryKey:["paper-layout",c],queryFn:()=>at(c),enabled:Q&&!!c,staleTime:5*6e4}).data,He=s.useMemo(()=>Q?{layout:z,open:e=>{const n=z?Ze(z,e):[];n.length&&(se(l=>({boxes:n,nonce:((l==null?void 0:l.nonce)??0)+1})),_("paper"))}}:null,[Q,z]),ve=Oe()&&((ye=d.data)==null?void 0:ye.paper_reader_chat_enabled)!==!1,X=!!(t&&ve&&!(f&&!Ae)),Fe=t&&ve&&!X?a.jsx("div",{className:"reader-chat-unavailable",role:"status",children:"Chat opens once the paper is ready."}):t&&X?a.jsx(ct,{mode:"paper",routeSessionId:x,primaryPaper:{id:t.id,routeId:c,title:t.title},currentPage:()=>D.current,paperSelection:H,onPaperSelectionChange:Be,onSessionId:ze,onReaderSubmit:()=>_("assistant"),onReaderNewChat:Le,onReaderClose:p?()=>he(!0):void 0}):a.jsx("div",{className:"reader-chat-unavailable",children:"Chat is not enabled for this preview."});return b.isLoading?a.jsx("div",{className:"reader-status",role:"status",children:"Loading paper…"}):b.error||!t?a.jsxs("div",{className:"reader-status",role:"alert",children:[a.jsx("p",{children:"Paper not found."}),a.jsx(Y,{to:"/papers",children:"Browse papers"})]}):((Re=d.data)==null?void 0:Re.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(Y,{to:`/paper/${c}`,children:"Back to paper"})]}):!h&&!f?a.jsxs("div",{className:"reader-status",role:"alert",children:[a.jsx("p",{children:"Native reading is unavailable for this resource."}),a.jsx(Y,{to:`/paper/${c}`,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":P==="paper",onClick:()=>_("paper"),children:"Paper"}),a.jsxs("button",{type:"button",role:"tab","aria-selected":P==="assistant","aria-label":H&&P!=="assistant"?"Chat, selection attached":"Chat",onClick:()=>_("assistant"),children:["Chat",H&&P!=="assistant"&&a.jsx("span",{className:"reader-tab-pending","aria-hidden":"true"})]})]}),a.jsx(Ge,{variant:"reader",children:a.jsxs("div",{ref:$,className:`reader-workspace${p?" is-desktop":" is-tabs"}${u?" is-assistant-collapsed":""}${oe?" is-resizing":""}`,"data-testid":"paper-chat-workspace",children:[a.jsx("section",{ref:q,className:`reader-paper-pane${!p&&P!=="paper"?" is-hidden":""}`,style:p?{width:u?"100%":`${w}%`}:void 0,role:"tabpanel","aria-label":"Paper","aria-hidden":!p&&P!=="paper",children:f?a.jsx(dt,{paperId:t.id,paperKey:c,paperTitle:t.title,paperHref:`/paper/${c}`,sourceUrl:f,resources:I,paperVersion:t.version,selectionEnabled:ge,onReady:Ie,onPaperSelection:be,onPaperSelectionError:y}):h&&a.jsx(Je,{url:h,downloadUrl:v??h,paperKey:c,paperTitle:t.title,paperHref:`/paper/${c}`,onClose:g,resources:I,initialPage:Ne,resizeActive:oe||Me,selectionEnabled:ge,paperVersion:t.version,authors:B,loadErrorMessage:t.source==="external"?"Paper content is still being prepared. Please try again later.":void 0,onPaperSelection:be,onPaperSelectionError:y,highlight:ke,onPageChange:e=>{D.current=e,sessionStorage.setItem(Ce(o),String(e))}})}),p&&!u&&a.jsx("div",{ref:ce,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(w),tabIndex:0,onPointerDown:We,onPointerMove:e=>{E.current&&fe(e.clientX)},onPointerUp:V,onPointerCancel:V,onLostPointerCapture:V,onDoubleClick:()=>W(_e),onKeyDown:e=>{(e.key==="ArrowLeft"||e.key==="ArrowRight")&&(e.preventDefault(),W(w+(e.key==="ArrowRight"?2:-2))),e.key==="Home"&&W(45),e.key==="End"&&W(75)}}),a.jsx("aside",{ref:N,id:"reader-chat-panel",className:`reader-assistant-pane${!p&&P!=="assistant"?" is-hidden":""}${p&&u?" is-collapsed":""}`,style:p?{width:u?0:`${100-w}%`}:void 0,role:"tabpanel","aria-label":"Chat","aria-hidden":!p&&P!=="assistant"||u,tabIndex:-1,children:a.jsx(et.Provider,{value:He,children:Fe})}),a.jsx("div",{className:"sr-only","aria-live":"polite",children:$e}),p&&(u||!X)&&a.jsx("button",{ref:le,type:"button",className:"reader-collapse-assistant","aria-controls":"reader-chat-panel","aria-expanded":!u,onClick:()=>he(!u),children:u?"Open chat":"Hide chat"})]})})]})}function ar(){const{paperId:r=""}=Se();return a.jsx(Xe,{workspaceKey:`reader:${r}`,children:a.jsx(vt,{})})}export{ar as default,bt as readerToolbarResources}; diff --git a/assets/PaperReaderView-D2y857wl.js b/assets/PaperReaderView-D2y857wl.js new file mode 100644 index 0000000000000000000000000000000000000000..90d35d4e311151b9bf63c77ae1a3457638ad7ee1 --- /dev/null +++ b/assets/PaperReaderView-D2y857wl.js @@ -0,0 +1 @@ +import{r as s,j as a,J as G,u as Se,c as Ue,o as De,Y as je,O as Oe,L as Y}from"./index-YwiKC6Po.js";import{u as ee}from"./useQuery-DPH6Mb2w.js";import{u as Ve,R as Qe,A as Xe,c as Ye,d as Je,a as Ze,P as Ge,e as et}from"./ArtifactWorkspace-BxDA6yNF.js";import{M as tt}from"./MarkdownText-C-8yLDus.js";import{g as rt,b as at}from"./paperQueryKeys-C5FMa4Oj.js";import{w as st,e as nt}from"./paperReader-BIpQD5HO.js";import{a as ot}from"./usePapers-C1deOZKl.js";import{c as it}from"./chat-DHGOonJg.js";import{s as te}from"./safeExternalHref-CkBrsh84.js";import{ChatExperience as ct}from"./ChatView-DsnEMREv.js";import"./chatSessions-CdNQ1toA.js";/* empty css */import"./hover-card-BY9tUGxy.js";import"./CatalogEntityPreviewLink-Cv_oezOz.js";import"./catalog-B15Yh5dN.js";import"./github-BZMCt7Ub.js";import"./file-text-Cijxx2XD.js";import"./PaperPreviewLink-CKfmgBjs.js";import"./index-CoRCN2p0.js";import"./index-BM_xSDJM.js";import"./katex-DkKDou_j.js";import"./useMutation-f6iDkf3w.js";import"./copy-YHg6twss.js";import"./thumbs-up-D9G2aLNB.js";import"./arrow-left-B08fyfNi.js";import"./external-link-4bBJT0yO.js";import"./plus-Cfz0QbT1.js";import"./search-wcEXdf1i.js";import"./chevron-up-BXtxbTfV.js";import"./AuthorAvatar-CoTET6B3.js";import"./curation-CkzNFTMJ.js";import"./useInfiniteQuery-BEbL80ez.js";import"./McpShowcase-Fj71TTNl.js";import"./AgentLogos-DhD8p5ds.js";import"./share-2-m8aPY8Vq.js";import"./openrouter-BT3NQ0bL.js";import"./queryOptions-C9woPjwX.js";function lt(r){return r instanceof G&&r.status===422?"This page could not be turned into a readable paper.":r instanceof G&&r.status===503?"Paper content is still being prepared. Please try again later.":"The paper could not be loaded."}function dt({paperId:r,paperKey:i,paperTitle:o,paperHref:b,sourceUrl:d,resources:t,paperVersion:f="",selectionEnabled:v=!1,onReady:h,onPaperSelection:I,onPaperSelectionError:B}){const c=s.useRef(null),g=ee({queryKey:["paperWebMarkdown",r],queryFn:()=>rt(r),staleTime:5*6e4,retry:(w,j)=>w<2&&!(j instanceof G&&j.status<500),retryDelay:3e3}),x=g.isSuccess;s.useEffect(()=>{x&&(h==null||h())},[h,x]),Ve({enabled:v&&!!f&&x,pagesRoot:c,routeId:i,paperVersion:f,numPages:1,onSelect:I,onError:B});const S=g.data?st(g.data):"";return a.jsxs("div",{className:"pdf-viewer",children:[a.jsx(Qe,{paperTitle:o,paperHref:b,resources:t,label:"Paper controls",children:a.jsx("div",{className:"pdf-toolbar-controls",children:a.jsx("a",{href:d,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:g.isPending?a.jsx("div",{className:"pdf-loading",role:"status",children:"Preparing a readable version of this page…"}):g.isError?a.jsxs("div",{className:"pdf-error",role:"alert",children:[a.jsx("p",{children:lt(g.error)}),a.jsxs("div",{children:[a.jsx("button",{type:"button",onClick:()=>void g.refetch(),children:"Retry"})," ",a.jsx("a",{href:d,target:"_blank",rel:"noopener noreferrer",children:"Open original"})]})]}):a.jsxs("article",{ref:c,className:"reader-web-document","data-page":"1",children:[!S.startsWith("# ")&&a.jsx("h1",{children:o}),a.jsx(tt,{text:S})]})})})]})}const _e=66,ut=240,re="pwc:reader:split-ratio",L=r=>`pwc:reader:session:${r}`,J=r=>`pwc:reader:assistant-collapsed:${r}`,Ce=r=>`pwc:reader:page:${r}`;function Z(r){const i=Number(sessionStorage.getItem(Ce(r)));return Number.isInteger(i)&&i>0?i:1}function pt(){const r=Number(localStorage.getItem(re));return Number.isFinite(r)&&r>=45&&r<=75?r:_e}function ft(r){const i=te(r);if(!i)return null;const o=new URL(i);return(o.hostname==="arxiv.org"||o.hostname==="www.arxiv.org")&&o.pathname.startsWith("/pdf/")&&o.pathname.endsWith(".pdf")&&(o.pathname=o.pathname.slice(0,-4)),o.href}const mt=/^\/pdf\/(\d{4}\.\d{4,5}(?:v\d{1,3})?|[a-z]+(?:-[a-z]+)*(?:\.[A-Z]{2})?\/\d{7}(?:v\d{1,3})?)$/;function ht(r){const i=new URL(r),o=i.pathname.match(mt);return(i.hostname==="arxiv.org"||i.hostname==="www.arxiv.org")&&o&&!i.search?je(`/paper-assets/arxiv-pdf/${o[1]}`)??r:r}function gt(r){return new URL(r).hostname.replace(/^www\./,"")}function bt(r){if(!r)return{};const i={};for(const d of r.repositories??[]){if(!d.is_official)continue;const t=te(d.url);if(!t)continue;const f=new URL(t),v=f.pathname.split("/").filter(Boolean);if((f.hostname==="github.com"||f.hostname==="www.github.com")&&v.length>=2){i.repository={href:t,stars:d.num_stars||0};break}}const o=[...r.project_pages??[]].sort((d,t)=>Number(t.is_official)-Number(d.is_official));for(const d of o){const t=te(d.url);if(t){i.projectPage={href:t,label:gt(t)};break}}const b=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 b>0&&r.arxiv_id&&(i.huggingFace={href:`https://huggingface.co/papers/${r.arxiv_id.replace(/v\d+$/i,"")}`,count:b}),i}function vt(){var xe,Pe,we,ye,Re;const r=Ue(),{paperId:i}=Se(),o=De(i??"").replace(/v\d+$/i,""),b=ot(o,!!o),d=ee({queryKey:["chatAvailability"],queryFn:()=>it.getAvailability(),refetchInterval:3e4,retry:!1}),t=b.data,f=t?nt(t):null,v=f?null:(t==null?void 0:t.source)==="external"?je(`/paper-assets/external/${t.id}/paper.pdf`):ft(t==null?void 0:t.url_pdf),h=v&&(t==null?void 0:t.source)!=="external"?ht(v):v,I=bt(t),B=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]),c=((xe=t==null?void 0:t.arxiv_id)==null?void 0:xe.replace(/v\d+$/i,""))||o,g=s.useCallback(()=>r(`/paper/${c}`),[c,r]),[x,S]=s.useState(()=>sessionStorage.getItem(L(o))||void 0),[w,j]=s.useState(pt),[u,ae]=s.useState(()=>sessionStorage.getItem(J(o))==="1"),[P,_]=s.useState("paper"),[H,C]=s.useState(),[ke,se]=s.useState(),[Ae,ne]=s.useState(!1),Ie=s.useCallback(()=>ne(!0),[]),[$e,y]=s.useState(""),[Ne,Ee]=s.useState(()=>Z(o)),[k,Te]=s.useState(0),[oe,ie]=s.useState(!1),[Me,F]=s.useState(!1),$=s.useRef(null),q=s.useRef(null),N=s.useRef(null),ce=s.useRef(null),le=s.useRef(null),K=s.useRef(!1),E=s.useRef(!1),T=s.useRef(0),R=s.useRef(0),U=s.useRef(0),A=s.useRef(w),D=s.useRef(Z(o)),O=s.useRef(t==null?void 0:t.version),de=Ye().reset,ue=s.useRef(`${o}:${x??"new"}`),p=k>=840;s.useEffect(()=>{const e=`${o}:${x??"new"}`;ue.current!==e&&(ue.current=e,de())},[x,de,o]),s.useEffect(()=>{t!=null&&t.version&&O.current&&t.version!==O.current&&(C(void 0),y("")),O.current=t==null?void 0:t.version},[t==null?void 0:t.version]),s.useEffect(()=>{window.clearTimeout(T.current),F(!1);const e=sessionStorage.getItem(L(o));S(e||void 0),ae(sessionStorage.getItem(J(o))==="1"),_("paper"),ne(!1),C(void 0),se(void 0),y("");const n=Z(o);D.current=n,Ee(n)},[o]),s.useEffect(()=>()=>{window.clearTimeout(T.current),cancelAnimationFrame(R.current)},[]),s.useLayoutEffect(()=>{const e=$.current;if(!e)return;const n=()=>Te(e.clientWidth);n();const l=new ResizeObserver(n);return l.observe(e),()=>l.disconnect()},[t]),s.useEffect(()=>{if(!t)return;document.title=`${t.title} — Papers With Code reader`;let e=document.querySelector('meta[name="robots"]');const n=!e;e||(e=document.createElement("meta"),e.name="robots",document.head.appendChild(e));const l=e.content;e.content="noindex, nofollow";let m=document.querySelector('link[rel="canonical"]');const qe=!m;m||(m=document.createElement("link"),m.rel="canonical",document.head.appendChild(m));const Ke=m.href;return m.href=`${window.location.origin}/paper/${c}`,()=>{document.title="Papers With Code",n?e==null||e.remove():e&&(e.content=l),qe?m==null||m.remove():m&&(m.href=Ke)}},[c,t]);const M=s.useCallback(e=>{if(!k)return Math.max(45,Math.min(75,e));const n=480/k*100,l=100-360/k*100;return Math.max(n,Math.min(l,e))},[k]);s.useEffect(()=>j(e=>{const n=M(e);return A.current=n,n}),[M]);const W=e=>{const n=M(e);A.current=n,j(n),localStorage.setItem(re,String(n))},pe=e=>{var l;const n=M(e);A.current=n,q.current&&(q.current.style.width=`${n}%`),N.current&&(N.current.style.width=`${100-n}%`),(l=ce.current)==null||l.setAttribute("aria-valuenow",String(Math.round(n)))},fe=e=>{U.current=e,!R.current&&(R.current=requestAnimationFrame(()=>{var l;R.current=0;const n=(l=$.current)==null?void 0:l.getBoundingClientRect();n!=null&&n.width&&pe((U.current-n.left)/n.width*100)}))},We=e=>{E.current=!0,ie(!0),e.currentTarget.setPointerCapture(e.pointerId),fe(e.clientX)},V=()=>{var e;if(E.current){if(R.current){cancelAnimationFrame(R.current),R.current=0;const n=(e=$.current)==null?void 0:e.getBoundingClientRect();n!=null&&n.width&&pe((U.current-n.left)/n.width*100)}E.current=!1,j(A.current),localStorage.setItem(re,String(A.current)),ie(!1)}},me=e=>{window.clearTimeout(T.current),F(!0),ae(e),sessionStorage.setItem(J(o),e?"1":"0"),T.current=window.setTimeout(()=>F(!1),ut+40)},he=e=>{K.current=!0,me(e)};s.useEffect(()=>{var e;K.current&&(K.current=!1,(e=u?le.current:N.current)==null||e.focus())},[u]);const ze=e=>{S(e),sessionStorage.setItem(L(o),e)},Le=()=>{S(void 0),sessionStorage.removeItem(L(o)),C(void 0),y("")},ge=((Pe=d.data)==null?void 0:Pe.paper_reader_selection_enabled)===!0,be=e=>{C(e),y(`Selection from page ${e.page} added to chat`),p&&u&&me(!1)},Be=s.useCallback(e=>{C(e),e||y("")},[]),Q=((we=d.data)==null?void 0:we.paper_reader_citations_enabled)===!0&&!!h,z=ee({queryKey:["paper-layout",c],queryFn:()=>at(c),enabled:Q&&!!c,staleTime:5*6e4}).data,He=s.useMemo(()=>Q?{layout:z,open:e=>{const n=z?Je(z,e):[];n.length&&(se(l=>({boxes:n,nonce:((l==null?void 0:l.nonce)??0)+1})),_("paper"))}}:null,[Q,z]),ve=Oe()&&((ye=d.data)==null?void 0:ye.paper_reader_chat_enabled)!==!1,X=!!(t&&ve&&!(f&&!Ae)),Fe=t&&ve&&!X?a.jsx("div",{className:"reader-chat-unavailable",role:"status",children:"Chat opens once the paper is ready."}):t&&X?a.jsx(ct,{mode:"paper",routeSessionId:x,primaryPaper:{id:t.id,routeId:c,title:t.title},currentPage:()=>D.current,paperSelection:H,onPaperSelectionChange:Be,onSessionId:ze,onReaderSubmit:()=>_("assistant"),onReaderNewChat:Le,onReaderClose:p?()=>he(!0):void 0}):a.jsx("div",{className:"reader-chat-unavailable",children:"Chat is not enabled for this preview."});return b.isLoading?a.jsx("div",{className:"reader-status",role:"status",children:"Loading paper…"}):b.error||!t?a.jsxs("div",{className:"reader-status",role:"alert",children:[a.jsx("p",{children:"Paper not found."}),a.jsx(Y,{to:"/papers",children:"Browse papers"})]}):((Re=d.data)==null?void 0:Re.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(Y,{to:`/paper/${c}`,children:"Back to paper"})]}):!h&&!f?a.jsxs("div",{className:"reader-status",role:"alert",children:[a.jsx("p",{children:"Native reading is unavailable for this resource."}),a.jsx(Y,{to:`/paper/${c}`,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":P==="paper",onClick:()=>_("paper"),children:"Paper"}),a.jsxs("button",{type:"button",role:"tab","aria-selected":P==="assistant","aria-label":H&&P!=="assistant"?"Chat, selection attached":"Chat",onClick:()=>_("assistant"),children:["Chat",H&&P!=="assistant"&&a.jsx("span",{className:"reader-tab-pending","aria-hidden":"true"})]})]}),a.jsx(Ze,{variant:"reader",children:a.jsxs("div",{ref:$,className:`reader-workspace${p?" is-desktop":" is-tabs"}${u?" is-assistant-collapsed":""}${oe?" is-resizing":""}`,"data-testid":"paper-chat-workspace",children:[a.jsx("section",{ref:q,className:`reader-paper-pane${!p&&P!=="paper"?" is-hidden":""}`,style:p?{width:u?"100%":`${w}%`}:void 0,role:"tabpanel","aria-label":"Paper","aria-hidden":!p&&P!=="paper",children:f?a.jsx(dt,{paperId:t.id,paperKey:c,paperTitle:t.title,paperHref:`/paper/${c}`,sourceUrl:f,resources:I,paperVersion:t.version,selectionEnabled:ge,onReady:Ie,onPaperSelection:be,onPaperSelectionError:y}):h&&a.jsx(Ge,{url:h,downloadUrl:v??h,paperKey:c,paperTitle:t.title,paperHref:`/paper/${c}`,onClose:g,resources:I,initialPage:Ne,resizeActive:oe||Me,selectionEnabled:ge,paperVersion:t.version,authors:B,loadErrorMessage:t.source==="external"?"Paper content is still being prepared. Please try again later.":void 0,onPaperSelection:be,onPaperSelectionError:y,highlight:ke,onPageChange:e=>{D.current=e,sessionStorage.setItem(Ce(o),String(e))}})}),p&&!u&&a.jsx("div",{ref:ce,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(w),tabIndex:0,onPointerDown:We,onPointerMove:e=>{E.current&&fe(e.clientX)},onPointerUp:V,onPointerCancel:V,onLostPointerCapture:V,onDoubleClick:()=>W(_e),onKeyDown:e=>{(e.key==="ArrowLeft"||e.key==="ArrowRight")&&(e.preventDefault(),W(w+(e.key==="ArrowRight"?2:-2))),e.key==="Home"&&W(45),e.key==="End"&&W(75)}}),a.jsx("aside",{ref:N,id:"reader-chat-panel",className:`reader-assistant-pane${!p&&P!=="assistant"?" is-hidden":""}${p&&u?" is-collapsed":""}`,style:p?{width:u?0:`${100-w}%`}:void 0,role:"tabpanel","aria-label":"Chat","aria-hidden":!p&&P!=="assistant"||u,tabIndex:-1,children:a.jsx(et.Provider,{value:He,children:Fe})}),a.jsx("div",{className:"sr-only","aria-live":"polite",children:$e}),p&&(u||!X)&&a.jsx("button",{ref:le,type:"button",className:"reader-collapse-assistant","aria-controls":"reader-chat-panel","aria-expanded":!u,onClick:()=>he(!u),children:u?"Open chat":"Hide chat"})]})})]})}function sr(){const{paperId:r=""}=Se();return a.jsx(Xe,{workspaceKey:`reader:${r}`,children:a.jsx(vt,{})})}export{sr as default,bt as readerToolbarResources}; diff --git a/assets/PapersListView-BNcDd1lQ.js b/assets/PapersListView-BNcDd1lQ.js deleted file mode 100644 index 95b8a23c8da803a13b0f125afe82fd521ae6dacf..0000000000000000000000000000000000000000 --- a/assets/PapersListView-BNcDd1lQ.js +++ /dev/null @@ -1 +0,0 @@ -import{e as V,r as g,A as X,j as e,L as j,g as J}from"./index-D6jcIRWs.js";import{I as G,T as W,P as Y}from"./components-DO1X940E.js";import{c as Z}from"./catalog-PYrB8_bm.js";import{t as ee,d as se}from"./colors-CLwl8a2d.js";import{u as re,a as ae}from"./usePapers-BbCSwcVk.js";import{u as te}from"./useDebounce-DLPbKAkz.js";import{u as ne}from"./useInfiniteScroll-Dm7JY_X4.js";import{S as _}from"./skeleton-BqkYFmXl.js";import{A as ie,a as oe}from"./alert-2MbxVzGL.js";import{u as ce}from"./useQuery-CUJUm4FY.js";import{P as le}from"./PaperFeedFilters-DNebHp4l.js";import{a as de,P as me,b as he}from"./PaperDateFilter-CPIqaHaq.js";import"./papers-DIIIPDpj.js";import"./AuthorAvatar-UMHOVOr9.js";import"./LatexTitle-D_92Jowu.js";import"./safeExternalHref-CkBrsh84.js";import"./useInfiniteQuery-FXco4P1n.js";import"./useIntersectionObserver-3LTuEaFW.js";import"./popover-DCjqGpW0.js";const N=360;function pe(r,o){const d=r.toLocaleLowerCase();return o.trim().split(/\s+/).filter(Boolean).reduce((c,t)=>{const l=d.indexOf(t.toLocaleLowerCase());return l>=0&&(c<0||l=0?t+1:o}function ue(r,o){if(r.length<=N)return r;const d=pe(r,o);if(d<0||d0?"…":""}${r.slice(c,t).trim()}${tnew Intl.NumberFormat("en",{notation:r>=1e3?"compact":"standard",maximumFractionDigits:1}).format(r),Be=()=>{var E,I,$,T,B,H,O,q,M;const[r,o]=V(),d=r.get("framework")||void 0,c=r.get("repository")||void 0,t=!!(d||c),l=r.get("search")||"",[F,C]=g.useState(l),p=te(F,300),n=!t&&l.trim().length>0;g.useEffect(()=>C(l),[l]),g.useEffect(()=>{if(p===l)return;const s=new URLSearchParams(r);p?s.set("search",p):s.delete("search"),o(s,{replace:!0})},[p]),g.useEffect(()=>{const s=r.get("order_by"),i=new URLSearchParams(r);n&&!["relevance","date_published","citation_count"].includes(s||"")?(i.set("order_by","relevance"),o(i,{replace:!0})):!n&&s==="relevance"&&(i.delete("order_by"),o(i,{replace:!0}))},[n,r,o]);const L=r.get("order_by"),x=L==="citation_count"?"cited":L==="date_published"?"new":n?"relevance":"trending",u=de(r),w=r.get("has_hf_artifacts")==="true",k=!t&&r.get("has_code")==="true",y=(s,i)=>{const h=new URLSearchParams(r);i?h.set(s,i):h.delete(s),o(h)},z=s=>{y("order_by",s==="cited"?"citation_count":s==="new"?"date_published":s)},b=re({page_size:20,order_by:x==="trending"?"trending":x==="cited"?"citation_count":"date_published",order_dir:"desc",search:t&&p||void 0,start_date:u.startDate,end_date:u.endDate,include_resources:!0,conference:r.get("conference")||void 0,latest_only:r.get("latest_only")!=="false",has_code:k,has_hf_artifacts:w,framework:d,repository:c,enabled:!n}),A=ae({q:p.trim(),order_by:x==="cited"?"citation_count":x==="new"?"date_published":"relevance",start_date:u.startDate,end_date:u.endDate,has_code:k,has_hf_artifacts:w,enabled:n}),m=n?A:b,D=ce({queryKey:["top-tasks-sidebar"],queryFn:()=>Z.topTasks(8),enabled:!t&&!n,staleTime:10*60*1e3}),v=g.useMemo(()=>{var i;return(((i=m.data)==null?void 0:i.pages.flatMap(h=>h.results))||[]).map(h=>{const S=ee(h);return n?{...S,abstract:ue(S.abstract,l)}:S})},[m.data,n,l]),Q=ne(m),f=(($=(I=(E=b.data)==null?void 0:E.pages)==null?void 0:I[0])==null?void 0:$.count)??0,a=(H=(B=(T=b.data)==null?void 0:T.pages)==null?void 0:B[0])==null?void 0:H.scope,P=(q=(O=A.data)==null?void 0:O.pages)==null?void 0:q.at(-1),R=d&&m.error instanceof X&&m.error.status===404,K=(a==null?void 0:a.kind)==="framework"?a.framework_name:a==null?void 0:a.repository;return e.jsxs("div",{className:"page",children:[(a==null?void 0:a.kind)==="framework"&&e.jsxs("nav",{className:"breadcrumb","aria-label":"Breadcrumb",children:[e.jsx(j,{to:"/",children:"Papers"}),e.jsx("span",{className:"sep",children:"/"}),e.jsx(j,{to:"/frameworks",children:"Frameworks"}),e.jsx("span",{className:"sep",children:"/"}),e.jsx("span",{style:{color:"var(--ink)"},children:a.framework_name})]}),e.jsxs("div",{className:"feed-header",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"feed-title",children:t?e.jsxs(e.Fragment,{children:["Papers implemented by ",e.jsx("em",{children:K||d||c})]}):n?e.jsxs(e.Fragment,{children:["Search results for ",e.jsxs("em",{children:["“",l,"”"]})]}):e.jsxs(e.Fragment,{children:["All ",e.jsx("em",{children:"Papers"})]})}),e.jsx("div",{className:"feed-subtitle",children:t?(a==null?void 0:a.kind)==="framework"?f>0&&`${f.toLocaleString()} papers.`:a!=null&&a.repository?e.jsxs(e.Fragment,{children:["GitHub repository ",e.jsx("strong",{children:a.repository}),". ",f>0&&`${f.toLocaleString()} papers.`]}):"Repository-scoped paper feed.":n?`${v.length} loaded from the most relevant results.`:e.jsxs(e.Fragment,{children:["Search the full corpus. ",f>0&&`${f.toLocaleString()} papers indexed.`]})}),t&&a&&e.jsxs("div",{className:"paper-feed-scope-links",children:[e.jsxs("div",{className:"paper-feed-primary-links",children:[a.github_url&&e.jsxs("a",{href:a.github_url,target:"_blank",rel:"noopener noreferrer",className:a.kind==="framework"?"task-framework-link":"framework-link",children:[e.jsx(G,{name:"github",size:13}),a.kind==="framework"?e.jsxs(e.Fragment,{children:[e.jsx("span",{children:a.repository||"GitHub"}),a.num_stars!=null&&e.jsxs("span",{className:"task-framework-link-stars",children:["★ ",ge(a.num_stars)]})]}):"GitHub"]}),a.kind==="framework"&&a.introducing_paper_arxiv_id&&e.jsx(j,{to:`/paper/${a.introducing_paper_arxiv_id}`,className:"framework-link",children:"Introducing paper"})]}),a.kind==="framework"&&a.recommended_tasks&&a.recommended_tasks.length>0&&e.jsx("div",{className:"paper-feed-task-tags",children:a.recommended_tasks.map(s=>s.slug?e.jsx(W,{slug:s.slug,label:s.name},s.id):null)})]})]}),e.jsx(me,{startDate:u.startDate,endDate:u.endDate,onChange:s=>o(he(r,s))})]}),e.jsx("div",{className:"papers-search-row",children:e.jsxs("div",{className:"papers-search-input-wrap",children:[e.jsx(G,{name:"search",size:14}),e.jsx("input",{className:"papers-search-input",placeholder:"Search title or abstract…",value:F,onChange:s=>C(s.target.value)})]})}),e.jsxs("div",{className:t||n?"papers-feed-layout-scoped":"layout-with-sidebar",children:[!t&&!n&&e.jsx("aside",{className:"sidebar",children:e.jsxs("div",{className:"sidebar-section",children:[e.jsx("div",{className:"sidebar-label",children:"Top Domains"}),D.isLoading&&e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:Array.from({length:6}).map((s,i)=>e.jsx(_,{className:"h-5 w-full"},i))}),e.jsx("div",{className:"sidebar-links",children:(M=D.data)==null?void 0:M.map(s=>e.jsxs(j,{to:`/tasks/${s.slug}`,className:"sidebar-link",children:[se(s.name,s.slug),s.paper_count!=null&&e.jsx("span",{className:"count",children:s.paper_count})]},s.id))})]})}),e.jsxs("div",{children:[e.jsxs("div",{className:"sort-bar",children:[e.jsxs("div",{className:"paper-feed-toolbar-controls",children:[e.jsx("div",{className:"sort-options",children:(n?xe:fe).map(([s,i])=>e.jsx("button",{className:`sort-btn ${x===s?"active":""}`,onClick:()=>z(s),children:i},s))}),e.jsx(le,{hasCode:k,hasHfArtifacts:w,onHasCodeChange:s=>y("has_code",s?"true":void 0),onHasHfArtifactsChange:s=>y("has_hf_artifacts",s?"true":void 0),showHasCode:!t})]}),e.jsxs("div",{className:"results-count",children:[v.length," loaded"]})]}),R?e.jsx("div",{className:"no-results",children:"Framework not found."}):m.error&&e.jsx(ie,{variant:"destructive",className:"mb-4",children:e.jsx(oe,{children:"Failed to load papers. Please try again."})}),!R&&(m.isLoading?e.jsx("div",{className:"paper-list",children:Array.from({length:6}).map((s,i)=>e.jsxs("div",{className:"paper-card",children:[e.jsx(_,{className:"h-[220px] w-[160px]"}),e.jsxs("div",{className:"paper-body",style:{flex:1,gap:12},children:[e.jsx(_,{className:"h-6 w-3/4"}),e.jsx(_,{className:"h-4 w-1/2"}),e.jsx(_,{className:"h-12 w-full"})]})]},i))}):v.length===0?e.jsxs("div",{className:"no-results",children:[e.jsx("p",{children:"No matching papers."}),n&&J()&&e.jsx(j,{to:`/chat?q=${encodeURIComponent(l.trim())}`,children:"Ask the assistant instead"})]}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"paper-list",children:v.map((s,i)=>e.jsx(Y,{paper:s,rank:i+1,highlightQuery:n?l:void 0},s.id))}),e.jsx("div",{ref:Q,style:{height:1}}),m.isFetchingNextPage&&e.jsx("div",{style:{padding:"20px 0",textAlign:"center",color:"var(--ink-faint)"},children:"Loading more…"}),!m.hasNextPage&&!m.isFetchingNextPage&&n&&e.jsx("div",{className:"search-results-end",children:P!=null&&P.cap_reached?"End of the top 100 results":"End of results"})]}))]})]})]})};export{Be as default}; diff --git a/assets/PapersListView-zhvzkmK9.js b/assets/PapersListView-zhvzkmK9.js new file mode 100644 index 0000000000000000000000000000000000000000..051859d05ca82b4c23b6028ca04d718af12fc876 --- /dev/null +++ b/assets/PapersListView-zhvzkmK9.js @@ -0,0 +1 @@ +import{r as f,j as e,L as x,g as K}from"./index-YwiKC6Po.js";import{T as V}from"./SotaBadges-DiQuEzfo.js";import{I as H}from"./Icon-DXQ4sjQk.js";import{u as X,P as J,b as W,c as Y,a as Z}from"./PaperFeed-kaLm5US2.js";import{c as ee}from"./catalog-B15Yh5dN.js";import{a as M,p as O}from"./paperQueryKeys-C5FMa4Oj.js";import{t as re,d as se}from"./transform-CNg3rvXk.js";import{u as z}from"./usePapers-C1deOZKl.js";import{u as ae}from"./useDebounce-BFugPTG4.js";import{S as te}from"./skeleton-CXR1qouH.js";import{A as ne,a as ie}from"./alert-Cx5luC5D.js";import{u as oe}from"./useQuery-DPH6Mb2w.js";import{i as le}from"./apiErrors-DBfE_SVR.js";import{f as ce}from"./frameworks-DDA0P4Tf.js";import"./colors-BkWRhvFI.js";import"./PaperCard-FG-bEpJk.js";import"./AuthorAvatar-CoTET6B3.js";import"./LatexTitle-DI6voLfI.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-D7ygxg37.js";import"./useIntersectionObserver-Dt36kyjs.js";import"./curation-CkzNFTMJ.js";import"./useInfiniteQuery-BEbL80ez.js";const g=360;function de(s,t){const c=s.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 me(s,t){if(s.length<=g)return s;const c=de(s,t);if(c<0||c0?"…":""}${s.slice(i,l).trim()}${l{var L,R,D,$,T,A,B,I,q;const s=X(),{searchParams:t,setSearchParams:c}=s,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=ae(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&&s.orderBy==="trending"?"relevance":s.orderBy,S=!o&&s.hasCode,P={...s.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=z([...O.feeds.infinite,P],a=>M.list({...P,page:a,page_size:20}),{enabled:!n}),_={q:h.trim(),order_by:j==="trending"?"relevance":j,start_date:s.dateRange.startDate,end_date:s.dateRange.endDate,has_code:S,has_hf_artifacts:s.hasHfArtifacts},C=z([...O.feeds.search,_],a=>M.searchFeed({..._,page:a,page_size:20,mode:"hybrid"}),{enabled:n&&_.q.length>0}),p=n?C:k,E=oe({queryKey:["top-tasks-sidebar"],queryFn:()=>ee.topTasks(8),enabled:!o&&!n,staleTime:10*60*1e3}),v=f.useMemo(()=>{var m;return(((m=p.data)==null?void 0:m.pages.flatMap(N=>N.results))||[]).map(N=>{const w=re(N);return n?{...w,abstract:me(w.abstract,d)}:w})},[p.data,n,d]),u=((D=(R=(L=k.data)==null?void 0:L.pages)==null?void 0:R[0])==null?void 0:D.count)??0,r=(A=(T=($=k.data)==null?void 0:$.pages)==null?void 0:T[0])==null?void 0:A.scope,y=(I=(B=C.data)==null?void 0:B.pages)==null?void 0:I.at(-1),Q=i&&le(p.error),U=(r==null?void 0:r.kind)==="framework"?r.framework_name:r==null?void 0:r.repository;return e.jsxs("div",{className:"page",children:[(r==null?void 0:r.kind)==="framework"&&e.jsxs("nav",{className:"breadcrumb","aria-label":"Breadcrumb",children:[e.jsx(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:r.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?(r==null?void 0:r.kind)==="framework"?u>0&&`${u.toLocaleString()} papers.`:r!=null&&r.repository?e.jsxs(e.Fragment,{children:["GitHub repository ",e.jsx("strong",{children:r.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&&r&&e.jsxs("div",{className:"paper-feed-scope-links",children:[e.jsxs("div",{className:"paper-feed-primary-links",children:[r.github_url&&e.jsxs("a",{href:r.github_url,target:"_blank",rel:"noopener noreferrer",className:r.kind==="framework"?"task-framework-link":"framework-link",children:[e.jsx(H,{name:"github",size:13}),r.kind==="framework"?e.jsxs(e.Fragment,{children:[e.jsx("span",{children:r.repository||"GitHub"}),r.num_stars!=null&&e.jsxs("span",{className:"task-framework-link-stars",children:["★ ",ce(r.num_stars)]})]}):"GitHub"]}),r.kind==="framework"&&r.introducing_paper_arxiv_id&&e.jsx(x,{to:`/paper/${r.introducing_paper_arxiv_id}`,className:"framework-link",children:"Introducing paper"})]}),r.kind==="framework"&&r.recommended_tasks&&r.recommended_tasks.length>0&&e.jsx("div",{className:"paper-feed-task-tags",children:r.recommended_tasks.map(a=>a.slug?e.jsx(V,{slug:a.slug,label:a.name},a.id):null)})]})]}),e.jsx(J,{startDate:s.dateRange.startDate,endDate:s.dateRange.endDate,onChange:s.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"}),E.isLoading&&e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:Array.from({length:6}).map((a,m)=>e.jsx(te,{className:"h-5 w-full"},m))}),e.jsx("div",{className:"sidebar-links",children:(q=E.data)==null?void 0:q.map(a=>e.jsxs(x,{to:`/tasks/${a.slug}`,className:"sidebar-link",children:[se(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(W,{feed:s,sorts:n?pe:Y,activeSort:j,showDateFilter:!1,showHasCode:!o,children:e.jsxs("div",{className:"results-count",children:[v.length," loaded"]})}),Q?e.jsx("div",{className:"no-results",children:"Framework not found."}):e.jsxs(e.Fragment,{children:[p.error&&e.jsx(ne,{variant:"destructive",className:"mb-4",children:e.jsx(ie,{children:"Failed to load papers. Please try again."})}),e.jsx(Z,{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&&K()&&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{Ae as default}; diff --git a/assets/PrivacyView-CwO81wLZ.js b/assets/PrivacyView-B0DBzRMW.js similarity index 99% rename from assets/PrivacyView-CwO81wLZ.js rename to assets/PrivacyView-B0DBzRMW.js index 4660cbc0e5c0a76e9e8c000bdc3e56c1c2c51b02..f104f41c1f33475fe0e77bb1380c1f92e7036454 100644 --- a/assets/PrivacyView-CwO81wLZ.js +++ b/assets/PrivacyView-B0DBzRMW.js @@ -1 +1 @@ -import{K as s,j as e}from"./index-D6jcIRWs.js";import{f as i,D as r}from"./latexPlainText-DI8YEXVe.js";const n=()=>(s.useEffect(()=>(document.title=i("Privacy Policy"),()=>{document.title=r}),[]),e.jsxs("article",{className:"page legal-page",children:[e.jsxs("header",{className:"legal-header",children:[e.jsx("p",{className:"legal-kicker",children:"Legal"}),e.jsx("h1",{children:"Privacy Policy"}),e.jsx("p",{className:"legal-effective-date",children:"Effective August 11, 2026"})]}),e.jsx("p",{children:"This Privacy Policy explains how Hugging Face, Inc. (“Hugging Face,” “we,” or “us”) collects, uses, and shares information when you use Papers With Code, including its website, research assistant, APIs, and related services (the “Service”)."}),e.jsxs("section",{children:[e.jsx("h2",{children:"1. Information we collect"}),e.jsx("h3",{children:"Information you provide"}),e.jsxs("ul",{children:[e.jsxs("li",{children:[e.jsx("strong",{children:"Account information."})," If you sign in with Hugging Face, we receive account identifiers and profile details needed to authenticate you, such as your user ID, username, and avatar. If you request contributor access, we also receive and retain the verified email address associated with your Hugging Face account so we can review and communicate about your request."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Contributions and preferences."})," We collect information you submit or save, such as paper submissions and edits, bookmarks, display preferences, feedback, and communications with us. Material you submit to a public research page may be publicly visible."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Research assistant content."})," We collect your questions, conversation history, generated answers, citations, tool calls and results, and feedback about answers. Chats are private to your account unless you choose to create a share link; anyone with that link may be able to view the shared chat."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Provider and billing information."})," If you enable a model provider, we process the authorization or API credentials needed to make requests on your behalf. Hugging Face or another provider processes its own billing information under its terms. Papers With Code does not collect your payment-card details."]})]}),e.jsx("h3",{children:"Information collected automatically"}),e.jsx("p",{children:"We collect technical and usage information such as IP address, browser and device type, operating system, pages or features used, dates and times, referring pages, request identifiers, cookies, logs, and diagnostic data. For research-assistant requests, this may include the selected model, token and cost details, latency, errors, and other operational metadata."}),e.jsx("h3",{children:"Research assistant tracing"}),e.jsxs("p",{children:["To evaluate, debug, secure, and improve the research assistant, we use Langfuse to record traces. A trace may contain the complete text of your question and the assistant's answer, as well as tool inputs, tool outputs, retrieved research material, model details, usage data, and related operational metadata.",e.jsx("strong",{children:" This trace content is not redacted before it is sent to Langfuse."})]}),e.jsx("p",{children:"Papers With Code is designed for questions about research literature. Do not put passwords, API keys, confidential information, health or financial data, or other sensitive personal information in research-assistant prompts."})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"2. How we use information"}),e.jsx("p",{children:"We use information to:"}),e.jsxs("ul",{children:[e.jsx("li",{children:"provide, personalize, maintain, and operate the Service;"}),e.jsx("li",{children:"authenticate users and keep accounts and the Service secure;"}),e.jsx("li",{children:"run research-assistant requests and preserve conversation history;"}),e.jsx("li",{children:"measure performance, troubleshoot failures, and improve quality;"}),e.jsx("li",{children:"review contributions, prevent abuse, and enforce applicable terms;"}),e.jsx("li",{children:"communicate with you and respond to requests; and"}),e.jsx("li",{children:"comply with law and protect users, Hugging Face, and the public."})]})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"3. How we share information"}),e.jsx("p",{children:"We may share information in these circumstances:"}),e.jsxs("ul",{children:[e.jsxs("li",{children:[e.jsx("strong",{children:"Service providers."})," Vendors process information for hosting, authentication, analytics, observability, security, and support. These include Hugging Face services, Langfuse for research-assistant tracing, Plausible for website analytics, and infrastructure providers."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Model providers."})," Research-assistant content is sent to the model provider you use, such as Hugging Face Inference Providers or OpenRouter, so it can generate a response. That provider's privacy terms also apply to its processing."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Public and shared content."})," Contributions intended for public pages are public. A chat is disclosed through the Service when you create and distribute a share link."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Legal, safety, and corporate events."})," We may disclose information when reasonably necessary to comply with law, protect rights and safety, investigate abuse, or complete a merger, acquisition, financing, or transfer of assets."]})]}),e.jsx("p",{children:"We do not sell your personal information."})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"4. Cookies and analytics"}),e.jsx("p",{children:"We use cookies and similar storage when needed for sign-in, security, preferences, and operation of the Service. We also use Plausible to understand aggregate website usage. You can control cookies through your browser, but disabling necessary cookies may prevent account features from working."})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"5. Legal bases"}),e.jsx("p",{children:"Where applicable law requires a legal basis, we process information as needed to perform our agreement with you, with your consent, to comply with legal obligations, and for legitimate interests such as operating, securing, and improving the Service. You may withdraw consent where consent is the basis for processing, without affecting earlier processing."})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"6. Retention and deletion"}),e.jsx("p",{children:"Private chats are retained until you delete them, subject to limits of 500 active chats and 100 MB of chat data per user. Archiving hides a chat and frees active-chat quota but does not delete it. You may deliberately share an unlisted snapshot; deleting its private chat removes the durable transcript, workspace reference, and share link after deletion is verified. No dedicated private-chat export format is currently offered."}),e.jsx("p",{children:"We keep information for as long as reasonably needed for the purposes described here, including providing the Service, maintaining security and audit records, resolving disputes, and meeting legal obligations. Retention periods vary by data type and service provider. You can delete individual chats in the Service. Deletion may not immediately remove information from backups, security logs, or third-party systems where limited retention is required."})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"7. Security and international transfers"}),e.jsx("p",{children:"We use reasonable administrative, technical, and organizational safeguards, but no internet service can guarantee absolute security. We and our service providers may process information in the United States and other countries, which may have different data-protection laws from your country. Where required, we use appropriate safeguards for international transfers."})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"8. Your privacy rights"}),e.jsx("p",{children:"Depending on where you live, you may have rights to access, correct, delete, or receive a copy of your personal information; object to or restrict processing; withdraw consent; or appeal a decision about a request. You may also have the right to complain to a data-protection authority. We may need to verify your identity before fulfilling a request."})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"9. Children"}),e.jsx("p",{children:"The Service is not directed to children under 13, and we do not knowingly collect personal information from children under 13. If you believe a child has provided personal information, please contact us."})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"10. Changes to this policy"}),e.jsx("p",{children:"We may update this policy as the Service changes. We will post the revised policy here and update its effective date. If a change is material, we will provide additional notice when appropriate."})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"11. Contact us"}),e.jsxs("p",{children:["For questions or privacy requests, contact"," ",e.jsx("a",{href:"mailto:privacy@huggingface.co",children:"privacy@huggingface.co"}),". Please do not include passwords, API keys, or other sensitive credentials in your message."]})]})]}));export{n as default}; +import{K as s,j as e}from"./index-YwiKC6Po.js";import{f as i,D as r}from"./latexPlainText-DI8YEXVe.js";const n=()=>(s.useEffect(()=>(document.title=i("Privacy Policy"),()=>{document.title=r}),[]),e.jsxs("article",{className:"page legal-page",children:[e.jsxs("header",{className:"legal-header",children:[e.jsx("p",{className:"legal-kicker",children:"Legal"}),e.jsx("h1",{children:"Privacy Policy"}),e.jsx("p",{className:"legal-effective-date",children:"Effective August 11, 2026"})]}),e.jsx("p",{children:"This Privacy Policy explains how Hugging Face, Inc. (“Hugging Face,” “we,” or “us”) collects, uses, and shares information when you use Papers With Code, including its website, research assistant, APIs, and related services (the “Service”)."}),e.jsxs("section",{children:[e.jsx("h2",{children:"1. Information we collect"}),e.jsx("h3",{children:"Information you provide"}),e.jsxs("ul",{children:[e.jsxs("li",{children:[e.jsx("strong",{children:"Account information."})," If you sign in with Hugging Face, we receive account identifiers and profile details needed to authenticate you, such as your user ID, username, and avatar. If you request contributor access, we also receive and retain the verified email address associated with your Hugging Face account so we can review and communicate about your request."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Contributions and preferences."})," We collect information you submit or save, such as paper submissions and edits, bookmarks, display preferences, feedback, and communications with us. Material you submit to a public research page may be publicly visible."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Research assistant content."})," We collect your questions, conversation history, generated answers, citations, tool calls and results, and feedback about answers. Chats are private to your account unless you choose to create a share link; anyone with that link may be able to view the shared chat."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Provider and billing information."})," If you enable a model provider, we process the authorization or API credentials needed to make requests on your behalf. Hugging Face or another provider processes its own billing information under its terms. Papers With Code does not collect your payment-card details."]})]}),e.jsx("h3",{children:"Information collected automatically"}),e.jsx("p",{children:"We collect technical and usage information such as IP address, browser and device type, operating system, pages or features used, dates and times, referring pages, request identifiers, cookies, logs, and diagnostic data. For research-assistant requests, this may include the selected model, token and cost details, latency, errors, and other operational metadata."}),e.jsx("h3",{children:"Research assistant tracing"}),e.jsxs("p",{children:["To evaluate, debug, secure, and improve the research assistant, we use Langfuse to record traces. A trace may contain the complete text of your question and the assistant's answer, as well as tool inputs, tool outputs, retrieved research material, model details, usage data, and related operational metadata.",e.jsx("strong",{children:" This trace content is not redacted before it is sent to Langfuse."})]}),e.jsx("p",{children:"Papers With Code is designed for questions about research literature. Do not put passwords, API keys, confidential information, health or financial data, or other sensitive personal information in research-assistant prompts."})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"2. How we use information"}),e.jsx("p",{children:"We use information to:"}),e.jsxs("ul",{children:[e.jsx("li",{children:"provide, personalize, maintain, and operate the Service;"}),e.jsx("li",{children:"authenticate users and keep accounts and the Service secure;"}),e.jsx("li",{children:"run research-assistant requests and preserve conversation history;"}),e.jsx("li",{children:"measure performance, troubleshoot failures, and improve quality;"}),e.jsx("li",{children:"review contributions, prevent abuse, and enforce applicable terms;"}),e.jsx("li",{children:"communicate with you and respond to requests; and"}),e.jsx("li",{children:"comply with law and protect users, Hugging Face, and the public."})]})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"3. How we share information"}),e.jsx("p",{children:"We may share information in these circumstances:"}),e.jsxs("ul",{children:[e.jsxs("li",{children:[e.jsx("strong",{children:"Service providers."})," Vendors process information for hosting, authentication, analytics, observability, security, and support. These include Hugging Face services, Langfuse for research-assistant tracing, Plausible for website analytics, and infrastructure providers."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Model providers."})," Research-assistant content is sent to the model provider you use, such as Hugging Face Inference Providers or OpenRouter, so it can generate a response. That provider's privacy terms also apply to its processing."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Public and shared content."})," Contributions intended for public pages are public. A chat is disclosed through the Service when you create and distribute a share link."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Legal, safety, and corporate events."})," We may disclose information when reasonably necessary to comply with law, protect rights and safety, investigate abuse, or complete a merger, acquisition, financing, or transfer of assets."]})]}),e.jsx("p",{children:"We do not sell your personal information."})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"4. Cookies and analytics"}),e.jsx("p",{children:"We use cookies and similar storage when needed for sign-in, security, preferences, and operation of the Service. We also use Plausible to understand aggregate website usage. You can control cookies through your browser, but disabling necessary cookies may prevent account features from working."})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"5. Legal bases"}),e.jsx("p",{children:"Where applicable law requires a legal basis, we process information as needed to perform our agreement with you, with your consent, to comply with legal obligations, and for legitimate interests such as operating, securing, and improving the Service. You may withdraw consent where consent is the basis for processing, without affecting earlier processing."})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"6. Retention and deletion"}),e.jsx("p",{children:"Private chats are retained until you delete them, subject to limits of 500 active chats and 100 MB of chat data per user. Archiving hides a chat and frees active-chat quota but does not delete it. You may deliberately share an unlisted snapshot; deleting its private chat removes the durable transcript, workspace reference, and share link after deletion is verified. No dedicated private-chat export format is currently offered."}),e.jsx("p",{children:"We keep information for as long as reasonably needed for the purposes described here, including providing the Service, maintaining security and audit records, resolving disputes, and meeting legal obligations. Retention periods vary by data type and service provider. You can delete individual chats in the Service. Deletion may not immediately remove information from backups, security logs, or third-party systems where limited retention is required."})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"7. Security and international transfers"}),e.jsx("p",{children:"We use reasonable administrative, technical, and organizational safeguards, but no internet service can guarantee absolute security. We and our service providers may process information in the United States and other countries, which may have different data-protection laws from your country. Where required, we use appropriate safeguards for international transfers."})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"8. Your privacy rights"}),e.jsx("p",{children:"Depending on where you live, you may have rights to access, correct, delete, or receive a copy of your personal information; object to or restrict processing; withdraw consent; or appeal a decision about a request. You may also have the right to complain to a data-protection authority. We may need to verify your identity before fulfilling a request."})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"9. Children"}),e.jsx("p",{children:"The Service is not directed to children under 13, and we do not knowingly collect personal information from children under 13. If you believe a child has provided personal information, please contact us."})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"10. Changes to this policy"}),e.jsx("p",{children:"We may update this policy as the Service changes. We will post the revised policy here and update its effective date. If a change is material, we will provide additional notice when appropriate."})]}),e.jsxs("section",{children:[e.jsx("h2",{children:"11. Contact us"}),e.jsxs("p",{children:["For questions or privacy requests, contact"," ",e.jsx("a",{href:"mailto:privacy@huggingface.co",children:"privacy@huggingface.co"}),". Please do not include passwords, API keys, or other sensitive credentials in your message."]})]})]}));export{n as default}; diff --git a/assets/RateLimitsView-ChUFO8Hr.js b/assets/RateLimitsView-JyYAwVUh.js similarity index 87% rename from assets/RateLimitsView-ChUFO8Hr.js rename to assets/RateLimitsView-JyYAwVUh.js index 7ac9f7f5a1da35379aa47cb90a9d8a0cf906aa7b..af29cc0c82c99b7b4a2e58c9d68e4bb133ffa8e9 100644 --- a/assets/RateLimitsView-ChUFO8Hr.js +++ b/assets/RateLimitsView-JyYAwVUh.js @@ -1 +1 @@ -import{j as e,M as t}from"./index-D6jcIRWs.js";import{u as s}from"./useQuery-CUJUm4FY.js";const n=()=>{const i=s({queryKey:["submission-rate-limit-policy"],queryFn:()=>t.getRateLimitPolicy()}).data;return e.jsxs("div",{className:"page",style:{maxWidth:760},children:[e.jsx("h1",{children:"Submission and rate-limit policy"}),i?e.jsxs(e.Fragment,{children:[e.jsxs("p",{children:["Each account may have up to ",i.active_pending," active submissions."]}),e.jsxs("p",{children:["New submissions are limited to ",i.subject_per_hour," per account and ",i.ip_per_hour," per source network in a rolling hour."]})]}):e.jsx("p",{children:"Loading current limits…"}),e.jsx("p",{children:"Duplicate, no-op, and idempotently replayed requests do not consume creation quota."}),e.jsx("p",{children:"Rate-limited responses use HTTP 429 with Retry-After, RateLimit, and RateLimit-Policy headers."}),e.jsx("p",{children:"Good-faith contributors who are blocked should contact the Papers with Code maintainers with their Hugging Face username."})]})};export{n as default}; +import{j as e,M as t}from"./index-YwiKC6Po.js";import{u as s}from"./useQuery-DPH6Mb2w.js";const n=()=>{const i=s({queryKey:["submission-rate-limit-policy"],queryFn:()=>t.getRateLimitPolicy()}).data;return e.jsxs("div",{className:"page",style:{maxWidth:760},children:[e.jsx("h1",{children:"Submission and rate-limit policy"}),i?e.jsxs(e.Fragment,{children:[e.jsxs("p",{children:["Each account may have up to ",i.active_pending," active submissions."]}),e.jsxs("p",{children:["New submissions are limited to ",i.subject_per_hour," per account and ",i.ip_per_hour," per source network in a rolling hour."]})]}):e.jsx("p",{children:"Loading current limits…"}),e.jsx("p",{children:"Duplicate, no-op, and idempotently replayed requests do not consume creation quota."}),e.jsx("p",{children:"Rate-limited responses use HTTP 429 with Retry-After, RateLimit, and RateLimit-Policy headers."}),e.jsx("p",{children:"Good-faith contributors who are blocked should contact the Papers with Code maintainers with their Hugging Face username."})]})};export{n as default}; diff --git a/assets/ResearchFollowButton-C2Bfd9dP.js b/assets/ResearchFollowButton-BFXC8E3t.js similarity index 89% rename from assets/ResearchFollowButton-C2Bfd9dP.js rename to assets/ResearchFollowButton-BFXC8E3t.js index 3302f599e2deaabddf1c5a4ed71d22cd4374312d..fd1046acd15d5ca72e8f986f7a94cb750a891d0a 100644 --- a/assets/ResearchFollowButton-C2Bfd9dP.js +++ b/assets/ResearchFollowButton-BFXC8E3t.js @@ -1 +1 @@ -import{d as y,b as F,f as N,r as S,i as v,j as e,h as C,C as L,L as c}from"./index-D6jcIRWs.js";import{u as G}from"./useQuery-CUJUm4FY.js";import{u as Q}from"./useMutation-p6mN4h17.js";import{r as m}from"./research-BggtGgC2.js";import{P as p}from"./plus-C4UQ62Q1.js";const j={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 _({kind:a,entityId:t}){var f;const l=y(),s=l==null?void 0:l.user,h=F(),n=N(),[x,g]=S.useState(null),u=`${a}:${t}`,d=["research-follows",s==null?void 0:s.hf_subject],r=G({queryKey:d,queryFn:m.follows,enabled:!!s}),o=((f=r.data)==null?void 0:f.some(w=>w.kind===a&&String(w.entity_id)===String(t)))??!1,i=Q({mutationFn:()=>m.setFollow(a,t,!o),onSuccess:async()=>{g(o?null:u),await n.invalidateQueries({queryKey:d}),await n.invalidateQueries({queryKey:["research-feed",s==null?void 0:s.hf_subject]}),await n.invalidateQueries({queryKey:["research-email",s==null?void 0:s.hf_subject]})}});if(!l||!s&&v())return null;if(!s)return e.jsxs("div",{className:"research-follow",children:[e.jsxs("a",{className:"research-follow-btn",href:C(h.pathname+h.search),children:[e.jsx(p,{"aria-hidden":"true"}),"Follow"]}),e.jsxs("span",{className:"research-follow-hint",children:["Sign in to ",j[a].toLowerCase(),"."]})]});const b=i.error||r.error;return e.jsxs("div",{className:"research-follow",children:[e.jsx("button",{type:"button",className:o?"research-follow-btn is-following":"research-follow-btn",disabled:r.isLoading||!!r.error||i.isPending,"aria-pressed":o,"aria-label":o?"Unfollow":"Follow",onClick:()=>i.mutate(),children:o?e.jsxs(e.Fragment,{children:[e.jsx(L,{"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(p,{"aria-hidden":"true"}),"Follow"]})}),b?e.jsx("span",{className:"research-follow-hint is-error",role:"alert",children:"Could not update follows. Please try again."}):o?x===u&&e.jsxs("span",{className:"research-follow-hint",role:"status",children:["Added to ",e.jsx(c,{to:"/following",children:"your Following feed"})," · ",e.jsx(c,{to:"/settings",children:"Manage in Settings"})]}):e.jsxs("span",{className:"research-follow-hint",children:[j[a]," in ",e.jsx(c,{to:"/following",children:"your Following feed"}),"."]})]})}export{_ as R}; +import{d as y,b as F,f as N,r as S,i as v,j as e,h as C,C as L,L as c}from"./index-YwiKC6Po.js";import{u as G}from"./useQuery-DPH6Mb2w.js";import{u as Q}from"./useMutation-f6iDkf3w.js";import{r as m}from"./research-5UpiU-ea.js";import{P as p}from"./plus-Cfz0QbT1.js";const j={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 _({kind:a,entityId:t}){var f;const l=y(),s=l==null?void 0:l.user,h=F(),n=N(),[x,g]=S.useState(null),u=`${a}:${t}`,d=["research-follows",s==null?void 0:s.hf_subject],r=G({queryKey:d,queryFn:m.follows,enabled:!!s}),o=((f=r.data)==null?void 0:f.some(w=>w.kind===a&&String(w.entity_id)===String(t)))??!1,i=Q({mutationFn:()=>m.setFollow(a,t,!o),onSuccess:async()=>{g(o?null:u),await n.invalidateQueries({queryKey:d}),await n.invalidateQueries({queryKey:["research-feed",s==null?void 0:s.hf_subject]}),await n.invalidateQueries({queryKey:["research-email",s==null?void 0:s.hf_subject]})}});if(!l||!s&&v())return null;if(!s)return e.jsxs("div",{className:"research-follow",children:[e.jsxs("a",{className:"research-follow-btn",href:C(h.pathname+h.search),children:[e.jsx(p,{"aria-hidden":"true"}),"Follow"]}),e.jsxs("span",{className:"research-follow-hint",children:["Sign in to ",j[a].toLowerCase(),"."]})]});const b=i.error||r.error;return e.jsxs("div",{className:"research-follow",children:[e.jsx("button",{type:"button",className:o?"research-follow-btn is-following":"research-follow-btn",disabled:r.isLoading||!!r.error||i.isPending,"aria-pressed":o,"aria-label":o?"Unfollow":"Follow",onClick:()=>i.mutate(),children:o?e.jsxs(e.Fragment,{children:[e.jsx(L,{"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(p,{"aria-hidden":"true"}),"Follow"]})}),b?e.jsx("span",{className:"research-follow-hint is-error",role:"alert",children:"Could not update follows. Please try again."}):o?x===u&&e.jsxs("span",{className:"research-follow-hint",role:"status",children:["Added to ",e.jsx(c,{to:"/following",children:"your Following feed"})," · ",e.jsx(c,{to:"/settings",children:"Manage in Settings"})]}):e.jsxs("span",{className:"research-follow-hint",children:[j[a]," in ",e.jsx(c,{to:"/following",children:"your Following feed"}),"."]})]})}export{_ as R}; diff --git a/assets/SavedPapersView-79-FOny-.js b/assets/SavedPapersView-79-FOny-.js deleted file mode 100644 index 13fd32b0ca8b9bb61eb05c4f6e0d21058b60910f..0000000000000000000000000000000000000000 --- a/assets/SavedPapersView-79-FOny-.js +++ /dev/null @@ -1 +0,0 @@ -import{a as g,A as v,j as e,H as x,L as j,M as b}from"./index-D6jcIRWs.js";import{p as f}from"./papers-DIIIPDpj.js";import{u as N}from"./useQuery-CUJUm4FY.js";import{T as k,P as y}from"./components-DO1X940E.js";import{S as r}from"./skeleton-BqkYFmXl.js";import{A as w,a as A}from"./alert-2MbxVzGL.js";import{t as B}from"./colors-CLwl8a2d.js";import{s as F}from"./savedPapersAuth-aA59XSW3.js";import"./AuthorAvatar-UMHOVOr9.js";import"./LatexTitle-D_92Jowu.js";import"./safeExternalHref-CkBrsh84.js";const Y=()=>{var o,l;const{user:i,isLoading:m}=g(),a=N({queryKey:[...f.feeds.saved],queryFn:()=>b.getBookmarks(),enabled:!!i,staleTime:30*1e3,refetchOnWindowFocus:!1}),c=a.error instanceof v&&a.error.code==="saved_papers_bucket_authorization_required",d=!!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(x,{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:[(o=a.data)!=null&&o.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(w,{variant:"destructive",className:"mb-4",children:e.jsx(A,{children:"Failed to load your saved papers. Please try again."})}):null,d&&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"})]}):d?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(j,{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(y,{paper:B(u),rank:++h},u.id))})]},`task-${t.id??"other"}-${s.id??"untagged"}`)})]},`area-${t.id??"other"}`))]})};export{Y as default}; diff --git a/assets/SavedPapersView-CWUM_gRn.js b/assets/SavedPapersView-CWUM_gRn.js new file mode 100644 index 0000000000000000000000000000000000000000..29ec7e89765b30bbf9106094c4edd2d3b89b02f3 --- /dev/null +++ b/assets/SavedPapersView-CWUM_gRn.js @@ -0,0 +1 @@ +import{a as g,J as v,j as e,H as x,L as j,M as b}from"./index-YwiKC6Po.js";import{p as f}from"./paperQueryKeys-C5FMa4Oj.js";import{u as N}from"./useQuery-DPH6Mb2w.js";import{P as k}from"./PaperCard-FG-bEpJk.js";import{T as y}from"./SotaBadges-DiQuEzfo.js";import{S as r}from"./skeleton-CXR1qouH.js";import{A as w,a as A}from"./alert-Cx5luC5D.js";import{t as B}from"./transform-CNg3rvXk.js";import{s as F}from"./savedPapersAuth-k5u0Ozsk.js";import"./curation-CkzNFTMJ.js";import"./AuthorAvatar-CoTET6B3.js";import"./Icon-DXQ4sjQk.js";import"./LatexTitle-DI6voLfI.js";import"./safeExternalHref-CkBrsh84.js";import"./colors-BkWRhvFI.js";const M=()=>{var d,l;const{user:i,isLoading:m}=g(),a=N({queryKey:[...f.feeds.saved],queryFn:()=>b.getBookmarks(),enabled:!!i,staleTime:30*1e3,refetchOnWindowFocus:!1}),c=a.error instanceof v&&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(x,{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(w,{variant:"destructive",className:"mb-4",children:e.jsx(A,{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(j,{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(y,{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(k,{paper:B(u),priority:h++<3},u.id))})]},`task-${t.id??"other"}-${s.id??"untagged"}`)})]},`area-${t.id??"other"}`))]})};export{M as default}; diff --git a/assets/SearchOverlay-BMTrmO5f.js b/assets/SearchOverlay-BMTrmO5f.js deleted file mode 100644 index fe49bd592430d87267cfb09db77d3423fb42d464..0000000000000000000000000000000000000000 --- a/assets/SearchOverlay-BMTrmO5f.js +++ /dev/null @@ -1 +0,0 @@ -import{r as z,c as O,K as M,g as B,j as e}from"./index-D6jcIRWs.js";import{p as H,a as R}from"./papers-DIIIPDpj.js";import{u as i}from"./useQuery-CUJUm4FY.js";import{L as U}from"./LatexTitle-D_92Jowu.js";import{c as x}from"./catalog-PYrB8_bm.js";import{u as Y}from"./useDebounce-DLPbKAkz.js";import{c as G,h as X,d as Z}from"./colors-CLwl8a2d.js";const V=10,S=6,W=350,v=3,cs=({open:t,onClose:h})=>{var A,C,w,K,P,Q;const f=z.useRef(null),$=O(),[c,D]=M.useState(""),a=Y(c,W),j=c.trim(),r=a.trim().length>=v,y=B();z.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,V),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=((K=F.data)==null?void 0:K.results)||[],p=((P=q.data)==null?void 0:P.results)||[],g=((Q=k.data)==null?void 0:Q.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(X(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:Z(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{cs as default}; diff --git a/assets/SearchOverlay-CzggQ3fk.js b/assets/SearchOverlay-CzggQ3fk.js new file mode 100644 index 0000000000000000000000000000000000000000..bc611e274fde17343373c76b539307fbd68a4f8a --- /dev/null +++ b/assets/SearchOverlay-CzggQ3fk.js @@ -0,0 +1 @@ +import{r as z,c as O,K as M,g as B,j as e}from"./index-YwiKC6Po.js";import{p as H,a as R}from"./paperQueryKeys-C5FMa4Oj.js";import{u as i}from"./useQuery-DPH6Mb2w.js";import{L as U}from"./LatexTitle-DI6voLfI.js";import{c as x}from"./catalog-B15Yh5dN.js";import{u as Y}from"./useDebounce-BFugPTG4.js";import{c as G,h as X}from"./colors-BkWRhvFI.js";import{d as Z}from"./transform-CNg3rvXk.js";import"./curation-CkzNFTMJ.js";const V=10,S=6,W=350,f=3,is=({open:t,onClose:h})=>{var A,C,w,K,P,Q;const v=z.useRef(null),$=O(),[c,D]=M.useState(""),a=Y(c,W),j=c.trim(),r=a.trim().length>=f,y=B();z.useEffect(()=>{var l;if(!t)return;(l=v.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,V),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)||[],m=((w=E.data)==null?void 0:w.results)||[],u=((K=F.data)==null?void 0:K.results)||[],p=((P=q.data)==null?void 0:P.results)||[],g=((Q=k.data)==null?void 0:Q.results)||[],I=k.isFetching||_.isFetching||b.isFetching||E.isFetching||F.isFetching||q.isFetching,L=o.length||g.length||d.length||m.length||u.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:v,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 ",f," 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(X(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:Z(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))]}),m.length>0&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"search-section-label",children:["Benchmarks · ",m.length]}),m.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))]}),u.length>0&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"search-section-label",children:["Authors · ",u.length]}),u.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>=f&&e.jsxs("button",{type:"button",className:"search-view-all-row",onClick:()=>n(`/papers?search=${encodeURIComponent(j)}`),children:["View all paper results for “",j,"”"]})]})]})})};export{is as default}; diff --git a/assets/SettingsView-BnRQHHDW.js b/assets/SettingsView-BurbOJNZ.js similarity index 96% rename from assets/SettingsView-BnRQHHDW.js rename to assets/SettingsView-BurbOJNZ.js index 67eb62008ab12d19f057c3c70c38c382b2e1c89e..904f76560b20b401aba9d321e71b4ccef3ef37f1 100644 --- a/assets/SettingsView-BnRQHHDW.js +++ b/assets/SettingsView-BurbOJNZ.js @@ -1,4 +1,4 @@ -import{n as C,a as T,b as le,r as A,j as e,L as q,f as Q,H as R,h as ce,q as de,au as he,g as ue,K as S,A as ne}from"./index-D6jcIRWs.js";import{u as O}from"./useQuery-CUJUm4FY.js";import{u as _}from"./useMutation-p6mN4h17.js";import{T as ee,r as M}from"./research-BggtGgC2.js";import{S as z}from"./switch-D_MyRbto.js";import{u as ge}from"./researchTopic-NFMcqCcs.js";import{S as me}from"./sparkles-r8uPx2-0.js";import{A as pe}from"./arrow-right-CFRHnFt4.js";import{T as fe}from"./trophy-CqWfBPLd.js";import{c as F}from"./chat-ChnK8XDU.js";import{f as ye,D as xe}from"./latexPlainText-DI8YEXVe.js";import{a as je,u as be,r as ve,O as Y}from"./openrouter-DrXWVMlM.js";import{E as se}from"./external-link-C_yz2sXa.js";import{M as we}from"./moon--2wi3KtT.js";import"./index-DIg7XGE2.js";/** +import{n as C,a as T,b as le,r as A,j as e,L as q,f as Q,H as R,h as ce,q as de,ap as he,g as ue,K as S,J as ne}from"./index-YwiKC6Po.js";import{u as O}from"./useQuery-DPH6Mb2w.js";import{u as _}from"./useMutation-f6iDkf3w.js";import{T as ee,r as M}from"./research-5UpiU-ea.js";import{S as z}from"./switch-Crqp0RkL.js";import{u as ge}from"./researchTopic-CAL_T-Y-.js";import{S as me}from"./sparkles-C3L7JDLC.js";import{A as pe}from"./arrow-right-CSx7rJG4.js";import{T as fe}from"./trophy-B60aAfG3.js";import{c as F}from"./chat-DHGOonJg.js";import{f as ye,D as xe}from"./latexPlainText-DI8YEXVe.js";import{a as je,u as be,r as ve,O as Y}from"./openrouter-BT3NQ0bL.js";import{E as se}from"./external-link-4bBJT0yO.js";import{M as we}from"./moon-DfjUzC9G.js";import"./index-BaDZKp6X.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. @@ -33,4 +33,4 @@ import{n as C,a as T,b as le,r as A,j as e,L as q,f as Q,H as R,h as ce,q as de, * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Ee=C("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]),Se={task:"task",method:"method",benchmark:"benchmark",author:"author",organization:"organization"};function Me(s){return s.status==="failed"?"We could not finish finding papers for this topic. Save it again to retry.":s.status==="done"?"Matching papers appear in your Following feed, and new ones are added every hour.":s.total?`Your feed shows the closest papers now. Refining matches: ${s.judged.toLocaleString()} of ${s.total.toLocaleString()} checked…`:"Your feed shows the closest papers now. Refining matches…"}function Oe(){var E,w,k;const{user:s}=T(),l=le(),h=A.useRef(null),j=["research-topic",s==null?void 0:s.hf_subject],d=O({queryKey:j,queryFn:M.topic,enabled:!!s,refetchInterval:i=>i.state.data&&["pending","running"].includes(i.state.data.status)?5e3:!1}),[f,y]=A.useState(null),a=ge(()=>y(null));if(A.useEffect(()=>{var i,N;l.hash==="#topic"&&d.isSuccess&&((i=h.current)==null||i.scrollIntoView({block:"center"}),(N=h.current)==null||N.focus())},[l.hash,d.isSuccess]),!s)return null;const c=((E=d.data)==null?void 0:E.text)??"",t=f??c,u=t.trim().replace(/\s+/g," "),g=((w=d.data)==null?void 0:w.status)==="failed"&&u===c,o=u.length>=3&&(u!==c||g),r=()=>{o&&!a.isPending&&a.mutate(u)};return e.jsxs("div",{className:"research-topic",id:"topic",children:[e.jsxs("h3",{className:"research-follow-group-title",children:[e.jsx(me,{"aria-hidden":"true"}),"Topic"]}),e.jsxs("p",{className:"settings-row-desc",children:["Describe the research you want to follow in your own words, for example"," ",e.jsx("em",{children:"real-time video generation"})," or ",e.jsx("em",{children:"speculative decoding for LLM inference"}),". A model reads every new paper and adds the ones that match to your Following feed."]}),d.isLoading?e.jsx("p",{className:"settings-billing-loading",children:"Loading your topic…"}):d.error?e.jsx("p",{className:"settings-token-error",role:"alert",children:"Could not load your topic."}):e.jsxs("form",{className:"research-topic-form",onSubmit:i=>{i.preventDefault(),r()},children:[e.jsx("textarea",{ref:h,className:"research-topic-input",rows:4,maxLength:ee,"aria-label":"Research topic",placeholder:"e.g. diffusion policies for robot manipulation",value:t,onChange:i=>y(i.target.value),onKeyDown:i=>{i.key==="Enter"&&!i.shiftKey&&!i.nativeEvent.isComposing&&(i.preventDefault(),r())}}),e.jsxs("div",{className:"research-topic-actions",children:[e.jsxs("span",{className:"research-topic-count",children:[t.length,"/",ee]}),c&&e.jsx("button",{type:"button",className:"research-follow-action",disabled:a.isPending,onClick:()=>a.mutate(null),children:"Remove"}),e.jsx("button",{type:"submit",className:"research-topic-save",disabled:a.isPending||!o,children:g?"Retry":c?"Update topic":"Follow topic"})]})]}),d.data&&e.jsx("p",{className:"research-email-status",role:"status",children:Me(d.data)}),(k=d.data)==null?void 0:k.suggestions.map(i=>e.jsxs("p",{className:"research-topic-suggestion",children:[e.jsx(q,{to:i.url,children:i.name})," is a ",Se[i.kind]," in the catalog. Following it as well adds every paper tagged with it."]},`${i.kind}:${i.entity_id}`)),a.error&&e.jsx("p",{className:"settings-token-error",role:"alert",children:"Could not save your topic. Please try again."})]})}const ae=[{kind:"task",label:"Tasks",icon:Ce,browse:"/tasks"},{kind:"method",label:"Methods",icon:Ne,browse:"/methods"},{kind:"benchmark",label:"Benchmarks",icon:fe},{kind:"author",label:"Authors",icon:Ee},{kind:"organization",label:"Organizations",icon:ke,browse:"/organizations"}],v=s=>`${s.kind}:${s.entity_id}`,Le=s=>new Date(s).toLocaleDateString(void 0,{month:"short",day:"numeric",year:"numeric"});function Pe({follows:s}){const{user:l}=T(),h=Q(),[j,d]=A.useState([]),f=_({mutationFn:({follow:c,enabled:t})=>M.setFollow(c.kind,c.entity_id,t),onSuccess:(c,{follow:t,enabled:u})=>{const g=["research-follows",l==null?void 0:l.hf_subject];h.setQueryData(g,o=>u?[...o??[],t]:(o??[]).filter(r=>v(r)!==v(t))),d(o=>[...o.filter(r=>v(r)!==v(t)),...u?[]:[t]]),h.invalidateQueries({queryKey:g}),h.invalidateQueries({queryKey:["research-feed",l==null?void 0:l.hf_subject]})}}),y=new Set(s.map(v)),a=[...s,...j.filter(c=>!y.has(v(c)))];return a.length?e.jsxs(e.Fragment,{children:[ae.map(({kind:c,label:t,icon:u})=>{const g=a.filter(o=>o.kind===c).sort((o,r)=>o.name.localeCompare(r.name));return g.length?e.jsxs("div",{className:"research-follow-group",children:[e.jsxs("h3",{className:"research-follow-group-title",children:[e.jsx(u,{"aria-hidden":"true"}),t]}),e.jsx("ul",{className:"research-follow-list",children:g.map(o=>{const r=y.has(v(o));return e.jsxs("li",{className:r?"research-follow-row":"research-follow-row is-unfollowed",children:[e.jsxs("div",{className:"research-follow-text",children:[e.jsx(q,{to:o.url,children:o.name}),e.jsx("span",{children:r?`Following since ${Le(o.created_at)}`:"Unfollowed"})]}),e.jsx("button",{type:"button",className:r?"research-follow-action":"research-follow-action is-refollow",disabled:f.isPending,"aria-label":`${r?"Unfollow":"Follow"} ${o.name}`,onClick:()=>f.mutate({follow:o,enabled:!r}),children:r?"Unfollow":"Follow again"})]},v(o))})})]},c):null}),f.error&&e.jsx("p",{className:"settings-token-error",role:"alert",children:"Could not update follows. Please try again."})]}):e.jsx(Ie,{})}function Ie(){return e.jsxs("div",{className:"research-follow-empty",children:[e.jsx("p",{children:e.jsx("strong",{children:"You are not following any tasks, methods, benchmarks, authors, or organizations yet."})}),e.jsx("p",{children:"Use the Follow button on any task, method, benchmark, author, or organization page."}),e.jsx("div",{className:"research-follow-browse",children:ae.filter(s=>s.browse).map(({kind:s,label:l,icon:h,browse:j})=>e.jsxs(q,{to:j,children:[e.jsx(h,{"aria-hidden":"true"}),"Browse ",l.toLowerCase()]},s))})]})}function Ae(){var t;const{user:s}=T(),l=Q(),h=O({queryKey:["research-follows",s==null?void 0:s.hf_subject],queryFn:M.follows,enabled:!!s}),j=["research-email",s==null?void 0:s.hf_subject],d=O({queryKey:j,queryFn:M.email,enabled:!!s}),f=_({mutationFn:M.setEmail,onSuccess:u=>l.setQueryData(j,u)}),y=((t=h.data)==null?void 0:t.length)??0,a=d.data,c=!!(a!=null&&a.email)&&!a.suppressed;return e.jsxs(e.Fragment,{children:[e.jsxs("section",{className:"settings-section","aria-labelledby":"research-following-heading",children:[e.jsxs("div",{className:"research-section-heading",children:[e.jsxs("h2",{className:"settings-section-title",id:"research-following-heading",children:["Following",y>0&&e.jsx("span",{className:"research-follow-count",children:y})]}),s&&e.jsxs(q,{className:"research-feed-link",to:"/following",children:["Open Following feed ",e.jsx(pe,{"aria-hidden":"true"})]})]}),e.jsx("p",{className:"settings-row-desc research-section-intro",children:"New papers and benchmark results from your topic and what you follow appear in your Following feed. Your topic and follows are private."}),s?h.isLoading?e.jsx("p",{className:"settings-billing-loading",children:"Loading follows…"}):h.error?e.jsx("p",{className:"settings-token-error",role:"alert",children:"Could not load your follows."}):e.jsxs(e.Fragment,{children:[e.jsx(Oe,{}),e.jsx(Pe,{follows:h.data??[]})]}):e.jsxs("div",{className:"settings-note",children:[e.jsx("span",{children:"Sign in to follow research and build your personal feed."}),e.jsx("div",{className:"settings-note-action",children:e.jsx(R,{returnTo:"/settings"})})]})]}),s&&e.jsxs("section",{className:"settings-section","aria-labelledby":"research-email-heading",children:[e.jsx("h2",{className:"settings-section-title",id:"research-email-heading",children:"Weekly research email"}),d.isLoading?e.jsx("p",{className:"settings-billing-loading",children:"Loading email preferences…"}):d.error||!a?e.jsx("p",{className:"settings-token-error",role:"alert",children:"Could not load email preferences."}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"settings-row",children:[e.jsxs("label",{className:"settings-row-text",htmlFor:"research-weekly-email",children:[e.jsx("span",{className:"settings-row-label",children:"Email me a weekly digest"}),e.jsx("span",{className:"settings-row-desc",children:"Up to 20 new papers and benchmark results matching your follows, sent Mondays at 08:00 UTC. No email is sent in weeks without new matches. On by default once you follow something; turn it off here or from any email."})]}),e.jsx(z,{id:"research-weekly-email",checked:a.enabled,disabled:f.isPending||!a.enabled&&!c,onCheckedChange:u=>f.mutate(u)})]}),e.jsxs("div",{className:"research-email-destination",children:[e.jsx(Fe,{"aria-hidden":"true"}),a.email?e.jsxs(e.Fragment,{children:[e.jsxs("span",{children:["Sending to ",e.jsx("strong",{children:a.email})]}),e.jsx("a",{href:ce("/settings",{collectEmail:!0}),children:"Refresh from Hugging Face"})]}):e.jsxs(e.Fragment,{children:[e.jsx("span",{children:"To receive it, allow access to the verified email on your Hugging Face account."}),e.jsx(R,{returnTo:"/settings",collectEmail:!0,label:"Allow email access"})]})]}),a.suppressed&&e.jsx("p",{className:"research-email-status is-warning",role:"status",children:"Delivery to this address is paused after a bounce or spam complaint."}),!a.delivery_ready&&e.jsx("p",{className:"research-email-status",role:"status",children:"Weekly emails have not launched yet. Your preference is saved and applies from launch."}),f.error&&e.jsx("p",{className:"settings-token-error",role:"alert",children:"Could not save your preference. Refresh your email from Hugging Face and try again."})]})]})]})}const Te="https://openrouter.ai/settings/keys";function qe(s,l){if(s instanceof ne){if(typeof s.detail=="string")return s.detail;if(typeof s.detail=="object"&&s.detail!==null&&"message"in s.detail&&typeof s.detail.message=="string")return s.detail.message}return s instanceof Error&&!s.message.startsWith("API request failed:")?s.message:l}const es=()=>{var Z;const{user:s,isLoading:l}=T(),{preferences:h,setHideClosedSourceEvals:j,canPersist:d,isLoading:f}=de(),{theme:y,setTheme:a}=he(),c=y??"system",t=ue(),[u,g]=S.useState(""),[o,r]=S.useState(""),[E,w]=S.useState(""),[k,i]=S.useState(""),N=Q(),L=O({queryKey:["chat","models","settings"],enabled:t&&!!s,queryFn:()=>F.getModels()}),D=new Set((((Z=L.data)==null?void 0:Z.items)??[]).map(n=>n.provider)),H=D.has("huggingface"),P=D.has("openrouter"),te=D.has("openai"),I=O({queryKey:["inference-billing",s==null?void 0:s.hf_subject],enabled:t&&!!s&&H,queryFn:()=>F.getInferenceBilling()}),x=I.data??null,U=je(t&&!!s&&P),W=be(t&&!!s&&P),m=U.data,b=W.data,p=m?ve(m.resets_at):null,ie=t&&!!s&&(L.isLoading||!L.isError&&(H&&I.isLoading||P&&(U.isLoading||W.isLoading))),oe=l||f||y===void 0||ie,V=_({mutationFn:n=>F.selectInferenceBillingAccount(n),onSuccess:n=>{N.setQueryData(["inference-billing",s==null?void 0:s.hf_subject],n),g("")},onError:n=>{g(n instanceof Error?n.message:"Could not change the billing account.")}}),re=I.isLoading||V.isPending,K=(n,B)=>{r(qe(n,B)),w(n instanceof ne?n.code??"":"")},$=_({mutationFn:n=>F.connectOpenRouterCredential(n),onSuccess:n=>{N.setQueryData(Y,n),i(""),r(""),w("")},onError:n=>K(n,"Could not connect the OpenRouter key.")}),G=_({mutationFn:n=>F.setOpenRouterFallback(n),onSuccess:n=>{N.setQueryData(Y,n),r(""),w("")},onError:n=>K(n,"Could not change paid fallback.")}),X=_({mutationFn:()=>F.disconnectOpenRouterCredential(),onSuccess:()=>{N.setQueryData(Y,{connected:!1,verified_at:null,fallback_enabled:!1}),r(""),w("")},onError:n=>K(n,"Could not disconnect the OpenRouter key.")});return S.useEffect(()=>(document.title=ye("Settings"),()=>{document.title=xe}),[]),e.jsxs("div",{className:"page",children:[e.jsx("div",{className:"feed-header",children:e.jsxs("div",{children:[e.jsx("h1",{className:"feed-title",children:e.jsx("em",{children:"Settings"})}),e.jsx("div",{className:"feed-subtitle",children:"Manage what you follow, your weekly email, and how papers are displayed."})]})}),oe?e.jsx("div",{className:"settings-page-loading",role:"status","aria-live":"polite",children:e.jsx("span",{className:"sr-only",children:"Loading settings…"})}):e.jsxs("div",{className:"settings-page-content",children:[e.jsx(Ae,{}),s&&e.jsxs("section",{className:"settings-section",children:[e.jsx("h2",{className:"settings-section-title",children:"Catalog access"}),e.jsx("div",{className:"settings-note settings-note-flush",children:e.jsxs("span",{children:["Role: ",e.jsx("strong",{children:s.role??"community member"}),"."," ",s.can_directly_edit_catalog?"You can apply catalog edits directly. Destructive changes require a recent sign-in.":"Your catalog suggestions are sent to the submissions queue for review.",s.is_admin?" You can also review submissions and use administrative maintenance tools.":" Submission review and maintenance tools remain admin-only."]})})]}),t&&e.jsxs("section",{className:"settings-section",children:[e.jsx("h2",{className:"settings-section-title",children:"Chat usage & billing"}),s?L.isError?e.jsx("div",{className:"settings-billing-loading",role:"alert",children:"Could not load the enabled chat providers."}):e.jsxs("div",{className:"settings-provider-grid",children:[H&&e.jsxs("section",{className:"settings-provider-card","aria-labelledby":"inference-providers-heading",children:[e.jsxs("div",{className:"settings-provider-heading",children:[e.jsxs("div",{children:[e.jsx("h3",{id:"inference-providers-heading",children:"Inference Providers"}),e.jsx("p",{children:"Hugging Face-billed model usage"})]}),(x==null?void 0:x.connected)&&e.jsx("span",{className:"settings-connected-badge",children:"Connected"})]}),I.isError?e.jsx("div",{className:"settings-billing-loading",role:"alert",children:"Hugging Face billing is currently unavailable."}):x!=null&&x.connected?e.jsxs("div",{className:"settings-billing",children:[e.jsx("div",{className:"settings-row-label",children:x.bill_to?`Organization · ${x.bill_to}`:`Personal account · @${s.username}`}),e.jsx("p",{className:"settings-row-desc",children:"Usage for Hugging Face Inference Providers is billed by Hugging Face to your selected account. Included Hugging Face usage is applied first; pay-as-you-go billing follows your Hugging Face plan and billing settings. Papers With Code does not fund, meter, or reset these credits."}),e.jsx("label",{className:"settings-token-label",htmlFor:"hf-billing-account",children:"Bill chat usage to"}),e.jsxs("select",{id:"hf-billing-account",className:"settings-billing-select",value:x.bill_to??"",onChange:n=>{g(""),V.mutate(n.target.value||null)},disabled:re,children:[e.jsxs("option",{value:"",children:["Personal account (@",s.username,")"]}),x.organizations.map(n=>e.jsxs("option",{value:n.name,children:[n.display_name," (",n.name,")"]},n.name))]}),u&&e.jsx("div",{className:"settings-token-error",children:u}),e.jsx("div",{className:"settings-billing-actions",children:e.jsxs("a",{className:"button button-primary",href:x.usage_url,target:"_blank",rel:"noreferrer",children:["View Hugging Face usage & billing ",e.jsx(se,{"aria-hidden":"true"})]})})]}):e.jsxs("div",{className:"settings-billing-connect",children:[e.jsx("p",{className:"settings-row-desc",children:"Reconnect with Hugging Face to authorize Inference Providers. Hugging Face bills your personal account or the organization you select."}),e.jsx("div",{className:"settings-billing-actions",children:e.jsx(R,{returnTo:"/settings",label:"Re-sign in with Hugging Face",authorizeInference:!0})})]})]}),P&&e.jsxs("section",{className:"settings-provider-card",id:"openrouter-byok","aria-labelledby":"openrouter-heading",children:[e.jsxs("div",{className:"settings-provider-heading",children:[e.jsxs("div",{children:[e.jsx("h3",{id:"openrouter-heading",children:"OpenRouter"}),e.jsx("p",{children:"Papers With Code-funded allowance and optional fallback"})]}),(b==null?void 0:b.connected)&&e.jsx("span",{className:"settings-connected-badge",children:"Key connected"})]}),e.jsx("p",{className:"settings-row-desc",children:"Papers With Code pays for these OpenRouter requests and provides free but limited monthly usage. Your own key is available as an optional fallback."}),m?e.jsxs("div",{className:"settings-usage-row",children:[e.jsxs("div",{className:"settings-usage-heading",children:[e.jsxs("div",{children:[e.jsx("div",{className:"settings-row-label",children:"Monthly OpenRouter usage"}),e.jsxs("div",{className:"settings-row-desc",children:["Resets ",p==null?void 0:p.local," ",e.jsxs("span",{"aria-label":"UTC reset time",children:["(",p==null?void 0:p.utc,")"]})]})]}),e.jsx("strong",{children:m.available?`${m.remaining_percent}% left`:"Unavailable"})]}),e.jsx("div",{className:"settings-usage-track",role:"progressbar","aria-label":`${m.remaining_percent}% remaining; resets ${p==null?void 0:p.local}; ${p==null?void 0:p.utc}`,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":m.remaining_percent,children:e.jsx("span",{style:{width:`${m.remaining_percent}%`}})}),!m.available&&e.jsxs("p",{className:"settings-limit-note",children:[m.unavailable_reason==="personal_allowance_exhausted"?"Your free monthly allowance is depleted.":`The shared OpenRouter credits are currently unavailable. ${m.remaining_percent}% of your personal allowance remains.`," DeepSeek V4 Flash is temporarily unavailable unless you enable your own key below."]})]}):e.jsx("div",{className:"settings-billing-loading",children:U.isError||m?"OpenRouter usage is currently unavailable.":"Checking OpenRouter usage…"}),e.jsxs("div",{className:"settings-byok-controls",children:[e.jsx("div",{className:"settings-row-label",children:"Provide your own OpenRouter API key"}),b!=null&&b.connected?e.jsxs(e.Fragment,{children:[e.jsxs("p",{className:"settings-row-desc",children:["Connected",b.verified_at?` · Last verified ${new Date(b.verified_at).toLocaleString()}`:"",". Your API key is stored securely using AES-256 encryption. It is never shown again."]}),e.jsxs("label",{className:"settings-fallback-control",children:[e.jsx(z,{checked:b.fallback_enabled,disabled:G.isPending,onCheckedChange:n=>G.mutate(!!n)}),e.jsxs("span",{children:[e.jsx("strong",{children:"Use my OpenRouter key when Papers With Code-funded OpenRouter access is unavailable"}),e.jsx("small",{children:"OpenRouter bills this usage to your own account. It is not covered by Papers With Code."})]})]}),e.jsx("p",{className:"settings-billing-help",children:"Disconnecting prevents new requests but cannot cancel a request already sent to OpenRouter."}),e.jsxs("div",{className:"settings-billing-actions",children:[e.jsx("button",{className:"button",type:"button",disabled:X.isPending,onClick:()=>X.mutate(),children:"Disconnect"}),e.jsxs("a",{className:"button",href:Te,target:"_blank",rel:"noreferrer",children:["Revoke or rotate at OpenRouter ",e.jsx(se,{"aria-hidden":"true"})]})]})]}):e.jsxs("form",{onSubmit:n=>{n.preventDefault(),k.trim()&&$.mutate(k.trim())},children:[e.jsx("label",{className:"settings-token-label",htmlFor:"openrouter-api-key",children:"OpenRouter API key"}),e.jsx("input",{id:"openrouter-api-key",type:"password",autoComplete:"off",value:k,onChange:n=>i(n.target.value),placeholder:"sk-or-…"}),e.jsx("p",{className:"settings-billing-help",children:"Connecting stores the key but does not authorize paid fallback. Enable billing separately after it is verified."}),e.jsx("div",{className:"settings-billing-actions",children:e.jsx("button",{className:"button button-primary",type:"submit",disabled:!k.trim()||$.isPending,children:$.isPending?"Verifying…":"Connect key"})})]}),o&&e.jsxs("div",{className:"settings-token-error",children:[e.jsx("p",{children:E==="fresh_auth_required"?"Your account is signed in, but adding or enabling an API key requires a Hugging Face sign-in from the last 15 minutes.":o}),E==="fresh_auth_required"&&e.jsx("div",{className:"settings-billing-actions",children:e.jsx(R,{returnTo:"/settings#openrouter-byok",label:"Re-authenticate with Hugging Face"})})]})]})]}),te&&e.jsx("div",{className:"settings-note settings-note-flush",role:"note",children:"Direct OpenAI usage is provided by Papers With Code. No OpenAI API key or billing account is required from you."})]}):e.jsxs("div",{className:"settings-note settings-note-flush",children:[e.jsx("span",{children:"Sign in to manage billing and credentials for the enabled chat providers."}),e.jsx("div",{className:"settings-note-action",children:e.jsx(R,{returnTo:"/settings",authorizeInference:!0})})]})]}),t&&e.jsxs("section",{className:"settings-section",children:[e.jsx("h2",{className:"settings-section-title",children:"Chat privacy & retention"}),e.jsx("div",{className:"settings-note settings-note-flush",children:e.jsx("span",{children:"Chats are private and retained until you delete them. You can keep up to 500 active chats and 100 MB of chat data. Archiving removes chats from the active list and frees active-chat quota, but does not delete them. Deleting a chat permanently removes its durable transcript, workspace reference, and any public share link after deletion is verified. You can deliberately share an unlisted snapshot, but no dedicated private-chat export format is currently offered."})})]}),e.jsxs("section",{className:"settings-section",children:[e.jsx("h2",{className:"settings-section-title",children:"Appearance"}),e.jsx("div",{className:"theme-options","aria-label":"Color theme",children:[{value:"system",label:"System",description:"Match your device",icon:Re},{value:"light",label:"Light",description:"Always use light mode",icon:_e},{value:"dark",label:"Dark",description:"Always use dark mode",icon:we}].map(n=>{const B=n.icon,J=c===n.value;return e.jsxs("button",{type:"button",className:`theme-option ${J?"is-selected":""}`,"aria-pressed":J,onClick:()=>a(n.value),children:[e.jsx(B,{"aria-hidden":"true"}),e.jsxs("span",{className:"theme-option-copy",children:[e.jsx("span",{className:"theme-option-label",children:n.label}),e.jsx("span",{className:"theme-option-desc",children:n.description})]})]},n.value)})})]}),e.jsxs("section",{className:"settings-section",children:[e.jsx("h2",{className:"settings-section-title",children:"Evaluations"}),e.jsxs("div",{className:"settings-row",children:[e.jsxs("label",{className:"settings-row-text",htmlFor:"hide-closed-source-evals",children:[e.jsx("span",{className:"settings-row-label",children:"Hide closed-source models"}),e.jsx("span",{className:"settings-row-desc",children:"When enabled, evaluations of closed-source models (proprietary APIs and unreleased flagship models) are hidden from benchmark leaderboards and paper result tables."})]}),e.jsx(z,{id:"hide-closed-source-evals",checked:h.hide_closed_source_evals,onCheckedChange:n=>{j(!!n)}})]}),!l&&!d&&!s&&e.jsxs("div",{className:"settings-note",children:[e.jsx("span",{children:"You are browsing as a guest, so this choice only applies to the current session. Sign in to save it to your account."}),e.jsx("div",{className:"settings-note-action",children:e.jsx(R,{returnTo:"/settings"})})]})]})]})]})};export{es as default}; + */const Ee=C("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]),Se={task:"task",method:"method",benchmark:"benchmark",author:"author",organization:"organization"};function Me(s){return s.status==="failed"?"We could not finish finding papers for this topic. Save it again to retry.":s.status==="done"?"Matching papers appear in your Following feed, and new ones are added every hour.":s.total?`Your feed shows the closest papers now. Refining matches: ${s.judged.toLocaleString()} of ${s.total.toLocaleString()} checked…`:"Your feed shows the closest papers now. Refining matches…"}function Oe(){var E,w,k;const{user:s}=T(),l=le(),h=A.useRef(null),j=["research-topic",s==null?void 0:s.hf_subject],d=O({queryKey:j,queryFn:M.topic,enabled:!!s,refetchInterval:i=>i.state.data&&["pending","running"].includes(i.state.data.status)?5e3:!1}),[f,y]=A.useState(null),a=ge(()=>y(null));if(A.useEffect(()=>{var i,N;l.hash==="#topic"&&d.isSuccess&&((i=h.current)==null||i.scrollIntoView({block:"center"}),(N=h.current)==null||N.focus())},[l.hash,d.isSuccess]),!s)return null;const c=((E=d.data)==null?void 0:E.text)??"",t=f??c,u=t.trim().replace(/\s+/g," "),g=((w=d.data)==null?void 0:w.status)==="failed"&&u===c,o=u.length>=3&&(u!==c||g),r=()=>{o&&!a.isPending&&a.mutate(u)};return e.jsxs("div",{className:"research-topic",id:"topic",children:[e.jsxs("h3",{className:"research-follow-group-title",children:[e.jsx(me,{"aria-hidden":"true"}),"Topic"]}),e.jsxs("p",{className:"settings-row-desc",children:["Describe the research you want to follow in your own words, for example"," ",e.jsx("em",{children:"real-time video generation"})," or ",e.jsx("em",{children:"speculative decoding for LLM inference"}),". A model reads every new paper and adds the ones that match to your Following feed."]}),d.isLoading?e.jsx("p",{className:"settings-billing-loading",children:"Loading your topic…"}):d.error?e.jsx("p",{className:"settings-token-error",role:"alert",children:"Could not load your topic."}):e.jsxs("form",{className:"research-topic-form",onSubmit:i=>{i.preventDefault(),r()},children:[e.jsx("textarea",{ref:h,className:"research-topic-input",rows:4,maxLength:ee,"aria-label":"Research topic",placeholder:"e.g. diffusion policies for robot manipulation",value:t,onChange:i=>y(i.target.value),onKeyDown:i=>{i.key==="Enter"&&!i.shiftKey&&!i.nativeEvent.isComposing&&(i.preventDefault(),r())}}),e.jsxs("div",{className:"research-topic-actions",children:[e.jsxs("span",{className:"research-topic-count",children:[t.length,"/",ee]}),c&&e.jsx("button",{type:"button",className:"research-follow-action",disabled:a.isPending,onClick:()=>a.mutate(null),children:"Remove"}),e.jsx("button",{type:"submit",className:"research-topic-save",disabled:a.isPending||!o,children:g?"Retry":c?"Update topic":"Follow topic"})]})]}),d.data&&e.jsx("p",{className:"research-email-status",role:"status",children:Me(d.data)}),(k=d.data)==null?void 0:k.suggestions.map(i=>e.jsxs("p",{className:"research-topic-suggestion",children:[e.jsx(q,{to:i.url,children:i.name})," is a ",Se[i.kind]," in the catalog. Following it as well adds every paper tagged with it."]},`${i.kind}:${i.entity_id}`)),a.error&&e.jsx("p",{className:"settings-token-error",role:"alert",children:"Could not save your topic. Please try again."})]})}const ae=[{kind:"task",label:"Tasks",icon:Ce,browse:"/tasks"},{kind:"method",label:"Methods",icon:Ne,browse:"/methods"},{kind:"benchmark",label:"Benchmarks",icon:fe},{kind:"author",label:"Authors",icon:Ee},{kind:"organization",label:"Organizations",icon:ke,browse:"/organizations"}],v=s=>`${s.kind}:${s.entity_id}`,Le=s=>new Date(s).toLocaleDateString(void 0,{month:"short",day:"numeric",year:"numeric"});function Pe({follows:s}){const{user:l}=T(),h=Q(),[j,d]=A.useState([]),f=_({mutationFn:({follow:c,enabled:t})=>M.setFollow(c.kind,c.entity_id,t),onSuccess:(c,{follow:t,enabled:u})=>{const g=["research-follows",l==null?void 0:l.hf_subject];h.setQueryData(g,o=>u?[...o??[],t]:(o??[]).filter(r=>v(r)!==v(t))),d(o=>[...o.filter(r=>v(r)!==v(t)),...u?[]:[t]]),h.invalidateQueries({queryKey:g}),h.invalidateQueries({queryKey:["research-feed",l==null?void 0:l.hf_subject]})}}),y=new Set(s.map(v)),a=[...s,...j.filter(c=>!y.has(v(c)))];return a.length?e.jsxs(e.Fragment,{children:[ae.map(({kind:c,label:t,icon:u})=>{const g=a.filter(o=>o.kind===c).sort((o,r)=>o.name.localeCompare(r.name));return g.length?e.jsxs("div",{className:"research-follow-group",children:[e.jsxs("h3",{className:"research-follow-group-title",children:[e.jsx(u,{"aria-hidden":"true"}),t]}),e.jsx("ul",{className:"research-follow-list",children:g.map(o=>{const r=y.has(v(o));return e.jsxs("li",{className:r?"research-follow-row":"research-follow-row is-unfollowed",children:[e.jsxs("div",{className:"research-follow-text",children:[e.jsx(q,{to:o.url,children:o.name}),e.jsx("span",{children:r?`Following since ${Le(o.created_at)}`:"Unfollowed"})]}),e.jsx("button",{type:"button",className:r?"research-follow-action":"research-follow-action is-refollow",disabled:f.isPending,"aria-label":`${r?"Unfollow":"Follow"} ${o.name}`,onClick:()=>f.mutate({follow:o,enabled:!r}),children:r?"Unfollow":"Follow again"})]},v(o))})})]},c):null}),f.error&&e.jsx("p",{className:"settings-token-error",role:"alert",children:"Could not update follows. Please try again."})]}):e.jsx(Ie,{})}function Ie(){return e.jsxs("div",{className:"research-follow-empty",children:[e.jsx("p",{children:e.jsx("strong",{children:"You are not following any tasks, methods, benchmarks, authors, or organizations yet."})}),e.jsx("p",{children:"Use the Follow button on any task, method, benchmark, author, or organization page."}),e.jsx("div",{className:"research-follow-browse",children:ae.filter(s=>s.browse).map(({kind:s,label:l,icon:h,browse:j})=>e.jsxs(q,{to:j,children:[e.jsx(h,{"aria-hidden":"true"}),"Browse ",l.toLowerCase()]},s))})]})}function Ae(){var t;const{user:s}=T(),l=Q(),h=O({queryKey:["research-follows",s==null?void 0:s.hf_subject],queryFn:M.follows,enabled:!!s}),j=["research-email",s==null?void 0:s.hf_subject],d=O({queryKey:j,queryFn:M.email,enabled:!!s}),f=_({mutationFn:M.setEmail,onSuccess:u=>l.setQueryData(j,u)}),y=((t=h.data)==null?void 0:t.length)??0,a=d.data,c=!!(a!=null&&a.email)&&!a.suppressed;return e.jsxs(e.Fragment,{children:[e.jsxs("section",{className:"settings-section","aria-labelledby":"research-following-heading",children:[e.jsxs("div",{className:"research-section-heading",children:[e.jsxs("h2",{className:"settings-section-title",id:"research-following-heading",children:["Following",y>0&&e.jsx("span",{className:"research-follow-count",children:y})]}),s&&e.jsxs(q,{className:"research-feed-link",to:"/following",children:["Open Following feed ",e.jsx(pe,{"aria-hidden":"true"})]})]}),e.jsx("p",{className:"settings-row-desc research-section-intro",children:"New papers and benchmark results from your topic and what you follow appear in your Following feed. Your topic and follows are private."}),s?h.isLoading?e.jsx("p",{className:"settings-billing-loading",children:"Loading follows…"}):h.error?e.jsx("p",{className:"settings-token-error",role:"alert",children:"Could not load your follows."}):e.jsxs(e.Fragment,{children:[e.jsx(Oe,{}),e.jsx(Pe,{follows:h.data??[]})]}):e.jsxs("div",{className:"settings-note",children:[e.jsx("span",{children:"Sign in to follow research and build your personal feed."}),e.jsx("div",{className:"settings-note-action",children:e.jsx(R,{returnTo:"/settings"})})]})]}),s&&e.jsxs("section",{className:"settings-section","aria-labelledby":"research-email-heading",children:[e.jsx("h2",{className:"settings-section-title",id:"research-email-heading",children:"Weekly research email"}),d.isLoading?e.jsx("p",{className:"settings-billing-loading",children:"Loading email preferences…"}):d.error||!a?e.jsx("p",{className:"settings-token-error",role:"alert",children:"Could not load email preferences."}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"settings-row",children:[e.jsxs("label",{className:"settings-row-text",htmlFor:"research-weekly-email",children:[e.jsx("span",{className:"settings-row-label",children:"Email me a weekly digest"}),e.jsx("span",{className:"settings-row-desc",children:"Up to 20 new papers and benchmark results matching your follows, sent Mondays at 08:00 UTC. No email is sent in weeks without new matches. On by default once you follow something; turn it off here or from any email."})]}),e.jsx(z,{id:"research-weekly-email",checked:a.enabled,disabled:f.isPending||!a.enabled&&!c,onCheckedChange:u=>f.mutate(u)})]}),e.jsxs("div",{className:"research-email-destination",children:[e.jsx(Fe,{"aria-hidden":"true"}),a.email?e.jsxs(e.Fragment,{children:[e.jsxs("span",{children:["Sending to ",e.jsx("strong",{children:a.email})]}),e.jsx("a",{href:ce("/settings",{collectEmail:!0}),children:"Refresh from Hugging Face"})]}):e.jsxs(e.Fragment,{children:[e.jsx("span",{children:"To receive it, allow access to the verified email on your Hugging Face account."}),e.jsx(R,{returnTo:"/settings",collectEmail:!0,label:"Allow email access"})]})]}),a.suppressed&&e.jsx("p",{className:"research-email-status is-warning",role:"status",children:"Delivery to this address is paused after a bounce or spam complaint."}),!a.delivery_ready&&e.jsx("p",{className:"research-email-status",role:"status",children:"Weekly emails have not launched yet. Your preference is saved and applies from launch."}),f.error&&e.jsx("p",{className:"settings-token-error",role:"alert",children:"Could not save your preference. Refresh your email from Hugging Face and try again."})]})]})]})}const Te="https://openrouter.ai/settings/keys";function qe(s,l){if(s instanceof ne){if(typeof s.detail=="string")return s.detail;if(typeof s.detail=="object"&&s.detail!==null&&"message"in s.detail&&typeof s.detail.message=="string")return s.detail.message}return s instanceof Error&&!s.message.startsWith("API request failed:")?s.message:l}const es=()=>{var J;const{user:s,isLoading:l}=T(),{preferences:h,setHideClosedSourceEvals:j,canPersist:d,isLoading:f}=de(),{theme:y,setTheme:a}=he(),c=y??"system",t=ue(),[u,g]=S.useState(""),[o,r]=S.useState(""),[E,w]=S.useState(""),[k,i]=S.useState(""),N=Q(),L=O({queryKey:["chat","models","settings"],enabled:t&&!!s,queryFn:()=>F.getModels()}),D=new Set((((J=L.data)==null?void 0:J.items)??[]).map(n=>n.provider)),H=D.has("huggingface"),P=D.has("openrouter"),te=D.has("openai"),I=O({queryKey:["inference-billing",s==null?void 0:s.hf_subject],enabled:t&&!!s&&H,queryFn:()=>F.getInferenceBilling()}),x=I.data??null,U=je(t&&!!s&&P),W=be(t&&!!s&&P),m=U.data,b=W.data,p=m?ve(m.resets_at):null,ie=t&&!!s&&(L.isLoading||!L.isError&&(H&&I.isLoading||P&&(U.isLoading||W.isLoading))),oe=l||f||y===void 0||ie,V=_({mutationFn:n=>F.selectInferenceBillingAccount(n),onSuccess:n=>{N.setQueryData(["inference-billing",s==null?void 0:s.hf_subject],n),g("")},onError:n=>{g(n instanceof Error?n.message:"Could not change the billing account.")}}),re=I.isLoading||V.isPending,K=(n,B)=>{r(qe(n,B)),w(n instanceof ne?n.code??"":"")},$=_({mutationFn:n=>F.connectOpenRouterCredential(n),onSuccess:n=>{N.setQueryData(Y,n),i(""),r(""),w("")},onError:n=>K(n,"Could not connect the OpenRouter key.")}),G=_({mutationFn:n=>F.setOpenRouterFallback(n),onSuccess:n=>{N.setQueryData(Y,n),r(""),w("")},onError:n=>K(n,"Could not change paid fallback.")}),X=_({mutationFn:()=>F.disconnectOpenRouterCredential(),onSuccess:()=>{N.setQueryData(Y,{connected:!1,verified_at:null,fallback_enabled:!1}),r(""),w("")},onError:n=>K(n,"Could not disconnect the OpenRouter key.")});return S.useEffect(()=>(document.title=ye("Settings"),()=>{document.title=xe}),[]),e.jsxs("div",{className:"page",children:[e.jsx("div",{className:"feed-header",children:e.jsxs("div",{children:[e.jsx("h1",{className:"feed-title",children:e.jsx("em",{children:"Settings"})}),e.jsx("div",{className:"feed-subtitle",children:"Manage what you follow, your weekly email, and how papers are displayed."})]})}),oe?e.jsx("div",{className:"settings-page-loading",role:"status","aria-live":"polite",children:e.jsx("span",{className:"sr-only",children:"Loading settings…"})}):e.jsxs("div",{className:"settings-page-content",children:[e.jsx(Ae,{}),s&&e.jsxs("section",{className:"settings-section",children:[e.jsx("h2",{className:"settings-section-title",children:"Catalog access"}),e.jsx("div",{className:"settings-note settings-note-flush",children:e.jsxs("span",{children:["Role: ",e.jsx("strong",{children:s.role??"community member"}),"."," ",s.can_directly_edit_catalog?"You can apply catalog edits directly. Destructive changes require a recent sign-in.":"Your catalog suggestions are sent to the submissions queue for review.",s.is_admin?" You can also review submissions and use administrative maintenance tools.":" Submission review and maintenance tools remain admin-only."]})})]}),t&&e.jsxs("section",{className:"settings-section",children:[e.jsx("h2",{className:"settings-section-title",children:"Chat usage & billing"}),s?L.isError?e.jsx("div",{className:"settings-billing-loading",role:"alert",children:"Could not load the enabled chat providers."}):e.jsxs("div",{className:"settings-provider-grid",children:[H&&e.jsxs("section",{className:"settings-provider-card","aria-labelledby":"inference-providers-heading",children:[e.jsxs("div",{className:"settings-provider-heading",children:[e.jsxs("div",{children:[e.jsx("h3",{id:"inference-providers-heading",children:"Inference Providers"}),e.jsx("p",{children:"Hugging Face-billed model usage"})]}),(x==null?void 0:x.connected)&&e.jsx("span",{className:"settings-connected-badge",children:"Connected"})]}),I.isError?e.jsx("div",{className:"settings-billing-loading",role:"alert",children:"Hugging Face billing is currently unavailable."}):x!=null&&x.connected?e.jsxs("div",{className:"settings-billing",children:[e.jsx("div",{className:"settings-row-label",children:x.bill_to?`Organization · ${x.bill_to}`:`Personal account · @${s.username}`}),e.jsx("p",{className:"settings-row-desc",children:"Usage for Hugging Face Inference Providers is billed by Hugging Face to your selected account. Included Hugging Face usage is applied first; pay-as-you-go billing follows your Hugging Face plan and billing settings. Papers With Code does not fund, meter, or reset these credits."}),e.jsx("label",{className:"settings-token-label",htmlFor:"hf-billing-account",children:"Bill chat usage to"}),e.jsxs("select",{id:"hf-billing-account",className:"settings-billing-select",value:x.bill_to??"",onChange:n=>{g(""),V.mutate(n.target.value||null)},disabled:re,children:[e.jsxs("option",{value:"",children:["Personal account (@",s.username,")"]}),x.organizations.map(n=>e.jsxs("option",{value:n.name,children:[n.display_name," (",n.name,")"]},n.name))]}),u&&e.jsx("div",{className:"settings-token-error",children:u}),e.jsx("div",{className:"settings-billing-actions",children:e.jsxs("a",{className:"button button-primary",href:x.usage_url,target:"_blank",rel:"noreferrer",children:["View Hugging Face usage & billing ",e.jsx(se,{"aria-hidden":"true"})]})})]}):e.jsxs("div",{className:"settings-billing-connect",children:[e.jsx("p",{className:"settings-row-desc",children:"Reconnect with Hugging Face to authorize Inference Providers. Hugging Face bills your personal account or the organization you select."}),e.jsx("div",{className:"settings-billing-actions",children:e.jsx(R,{returnTo:"/settings",label:"Re-sign in with Hugging Face",authorizeInference:!0})})]})]}),P&&e.jsxs("section",{className:"settings-provider-card",id:"openrouter-byok","aria-labelledby":"openrouter-heading",children:[e.jsxs("div",{className:"settings-provider-heading",children:[e.jsxs("div",{children:[e.jsx("h3",{id:"openrouter-heading",children:"OpenRouter"}),e.jsx("p",{children:"Papers With Code-funded allowance and optional fallback"})]}),(b==null?void 0:b.connected)&&e.jsx("span",{className:"settings-connected-badge",children:"Key connected"})]}),e.jsx("p",{className:"settings-row-desc",children:"Papers With Code pays for these OpenRouter requests and provides free but limited monthly usage. Your own key is available as an optional fallback."}),m?e.jsxs("div",{className:"settings-usage-row",children:[e.jsxs("div",{className:"settings-usage-heading",children:[e.jsxs("div",{children:[e.jsx("div",{className:"settings-row-label",children:"Monthly OpenRouter usage"}),e.jsxs("div",{className:"settings-row-desc",children:["Resets ",p==null?void 0:p.local," ",e.jsxs("span",{"aria-label":"UTC reset time",children:["(",p==null?void 0:p.utc,")"]})]})]}),e.jsx("strong",{children:m.available?`${m.remaining_percent}% left`:"Unavailable"})]}),e.jsx("div",{className:"settings-usage-track",role:"progressbar","aria-label":`${m.remaining_percent}% remaining; resets ${p==null?void 0:p.local}; ${p==null?void 0:p.utc}`,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":m.remaining_percent,children:e.jsx("span",{style:{width:`${m.remaining_percent}%`}})}),!m.available&&e.jsxs("p",{className:"settings-limit-note",children:[m.unavailable_reason==="personal_allowance_exhausted"?"Your free monthly allowance is depleted.":`The shared OpenRouter credits are currently unavailable. ${m.remaining_percent}% of your personal allowance remains.`," DeepSeek V4 Flash is temporarily unavailable unless you enable your own key below."]})]}):e.jsx("div",{className:"settings-billing-loading",children:U.isError||m?"OpenRouter usage is currently unavailable.":"Checking OpenRouter usage…"}),e.jsxs("div",{className:"settings-byok-controls",children:[e.jsx("div",{className:"settings-row-label",children:"Provide your own OpenRouter API key"}),b!=null&&b.connected?e.jsxs(e.Fragment,{children:[e.jsxs("p",{className:"settings-row-desc",children:["Connected",b.verified_at?` · Last verified ${new Date(b.verified_at).toLocaleString()}`:"",". Your API key is stored securely using AES-256 encryption. It is never shown again."]}),e.jsxs("label",{className:"settings-fallback-control",children:[e.jsx(z,{checked:b.fallback_enabled,disabled:G.isPending,onCheckedChange:n=>G.mutate(!!n)}),e.jsxs("span",{children:[e.jsx("strong",{children:"Use my OpenRouter key when Papers With Code-funded OpenRouter access is unavailable"}),e.jsx("small",{children:"OpenRouter bills this usage to your own account. It is not covered by Papers With Code."})]})]}),e.jsx("p",{className:"settings-billing-help",children:"Disconnecting prevents new requests but cannot cancel a request already sent to OpenRouter."}),e.jsxs("div",{className:"settings-billing-actions",children:[e.jsx("button",{className:"button",type:"button",disabled:X.isPending,onClick:()=>X.mutate(),children:"Disconnect"}),e.jsxs("a",{className:"button",href:Te,target:"_blank",rel:"noreferrer",children:["Revoke or rotate at OpenRouter ",e.jsx(se,{"aria-hidden":"true"})]})]})]}):e.jsxs("form",{onSubmit:n=>{n.preventDefault(),k.trim()&&$.mutate(k.trim())},children:[e.jsx("label",{className:"settings-token-label",htmlFor:"openrouter-api-key",children:"OpenRouter API key"}),e.jsx("input",{id:"openrouter-api-key",type:"password",autoComplete:"off",value:k,onChange:n=>i(n.target.value),placeholder:"sk-or-…"}),e.jsx("p",{className:"settings-billing-help",children:"Connecting stores the key but does not authorize paid fallback. Enable billing separately after it is verified."}),e.jsx("div",{className:"settings-billing-actions",children:e.jsx("button",{className:"button button-primary",type:"submit",disabled:!k.trim()||$.isPending,children:$.isPending?"Verifying…":"Connect key"})})]}),o&&e.jsxs("div",{className:"settings-token-error",children:[e.jsx("p",{children:E==="fresh_auth_required"?"Your account is signed in, but adding or enabling an API key requires a Hugging Face sign-in from the last 15 minutes.":o}),E==="fresh_auth_required"&&e.jsx("div",{className:"settings-billing-actions",children:e.jsx(R,{returnTo:"/settings#openrouter-byok",label:"Re-authenticate with Hugging Face"})})]})]})]}),te&&e.jsx("div",{className:"settings-note settings-note-flush",role:"note",children:"Direct OpenAI usage is provided by Papers With Code. No OpenAI API key or billing account is required from you."})]}):e.jsxs("div",{className:"settings-note settings-note-flush",children:[e.jsx("span",{children:"Sign in to manage billing and credentials for the enabled chat providers."}),e.jsx("div",{className:"settings-note-action",children:e.jsx(R,{returnTo:"/settings",authorizeInference:!0})})]})]}),t&&e.jsxs("section",{className:"settings-section",children:[e.jsx("h2",{className:"settings-section-title",children:"Chat privacy & retention"}),e.jsx("div",{className:"settings-note settings-note-flush",children:e.jsx("span",{children:"Chats are private and retained until you delete them. You can keep up to 500 active chats and 100 MB of chat data. Archiving removes chats from the active list and frees active-chat quota, but does not delete them. Deleting a chat permanently removes its durable transcript, workspace reference, and any public share link after deletion is verified. You can deliberately share an unlisted snapshot, but no dedicated private-chat export format is currently offered."})})]}),e.jsxs("section",{className:"settings-section",children:[e.jsx("h2",{className:"settings-section-title",children:"Appearance"}),e.jsx("div",{className:"theme-options","aria-label":"Color theme",children:[{value:"system",label:"System",description:"Match your device",icon:Re},{value:"light",label:"Light",description:"Always use light mode",icon:_e},{value:"dark",label:"Dark",description:"Always use dark mode",icon:we}].map(n=>{const B=n.icon,Z=c===n.value;return e.jsxs("button",{type:"button",className:`theme-option ${Z?"is-selected":""}`,"aria-pressed":Z,onClick:()=>a(n.value),children:[e.jsx(B,{"aria-hidden":"true"}),e.jsxs("span",{className:"theme-option-copy",children:[e.jsx("span",{className:"theme-option-label",children:n.label}),e.jsx("span",{className:"theme-option-desc",children:n.description})]})]},n.value)})})]}),e.jsxs("section",{className:"settings-section",children:[e.jsx("h2",{className:"settings-section-title",children:"Evaluations"}),e.jsxs("div",{className:"settings-row",children:[e.jsxs("label",{className:"settings-row-text",htmlFor:"hide-closed-source-evals",children:[e.jsx("span",{className:"settings-row-label",children:"Hide closed-source models"}),e.jsx("span",{className:"settings-row-desc",children:"When enabled, evaluations of closed-source models (proprietary APIs and unreleased flagship models) are hidden from benchmark leaderboards and paper result tables."})]}),e.jsx(z,{id:"hide-closed-source-evals",checked:h.hide_closed_source_evals,onCheckedChange:n=>{j(!!n)}})]}),!l&&!d&&!s&&e.jsxs("div",{className:"settings-note",children:[e.jsx("span",{children:"You are browsing as a guest, so this choice only applies to the current session. Sign in to save it to your account."}),e.jsx("div",{className:"settings-note-action",children:e.jsx(R,{returnTo:"/settings"})})]})]})]})]})};export{es as default}; diff --git a/assets/SharedChatView-C8jGkNjy.js b/assets/SharedChatView-C8jGkNjy.js new file mode 100644 index 0000000000000000000000000000000000000000..796a426dc30177bd0fb8e68d4f1ff2b8c81b4951 --- /dev/null +++ b/assets/SharedChatView-C8jGkNjy.js @@ -0,0 +1 @@ +import{u as f,c as x,r as h,j as e,m as g}from"./index-YwiKC6Po.js";import{u as v}from"./useQuery-DPH6Mb2w.js";import{A as j,a as b,C as y,U as S,b as k}from"./ArtifactWorkspace-BxDA6yNF.js";import{C as m,e as w,p as N,q as C,g as q}from"./chatSessions-CdNQ1toA.js";/* empty css */import"./hover-card-BY9tUGxy.js";import"./CatalogEntityPreviewLink-Cv_oezOz.js";import"./catalog-B15Yh5dN.js";import"./github-BZMCt7Ub.js";import"./file-text-Cijxx2XD.js";import"./PaperPreviewLink-CKfmgBjs.js";import"./index-CoRCN2p0.js";import"./index-BM_xSDJM.js";import"./katex-DkKDou_j.js";import"./paperQueryKeys-C5FMa4Oj.js";import"./curation-CkzNFTMJ.js";import"./useMutation-f6iDkf3w.js";import"./chat-DHGOonJg.js";import"./copy-YHg6twss.js";import"./thumbs-up-D9G2aLNB.js";import"./arrow-left-B08fyfNi.js";import"./external-link-4bBJT0yO.js";import"./plus-Cfz0QbT1.js";import"./search-wcEXdf1i.js";import"./chevron-up-BXtxbTfV.js";import"./AuthorAvatar-CoTET6B3.js";const _=({detail:i})=>{const[d,l]=h.useState(()=>N(i)),p=h.useMemo(()=>{const t={};for(const c of d)for(const n of c.blocks??[])if(n.kind==="tool")for(const r of n.results??[])t[r.route_id]=r;return t},[d]),u=(t,c)=>{l(n=>n.map(r=>{var a;return r.id!==t?r:{...r,blocks:(a=r.blocks)==null?void 0:a.map((s,o)=>o===c&&(s.kind==="reasoning"||s.kind==="tool")?{...s,open:!s.open}:s)}}))};return e.jsx("div",{className:"shared-chat-transcript",children:d.map(t=>t.role==="user"?e.jsx(S,{id:t.id,text:t.text??"",paperMentions:t.paperMentions??[],paperSelection:t.paperSelection},t.id):e.jsx(k,{msg:t,papers:p,onToggleBlock:u},t.id))})},te=()=>{const{shareId:i=""}=f(),d=x(),l=g(),[p,u]=h.useState(60),t=v({queryKey:["shared-chat",i],queryFn:()=>q(i),retry:(r,a)=>!(a instanceof m&&a.status===404)&&r<1});h.useEffect(()=>{const r=document.title,a=document.head.querySelector('meta[name="robots"]'),s=a==null?void 0:a.content,o=a??document.createElement("meta");return o.name="robots",o.content="noindex,nofollow",a||document.head.appendChild(o),document.title="Shared conversation",()=>{document.title=r,a?a.content=s??"":o.remove()}},[]),h.useLayoutEffect(()=>{const r=document.querySelector(".app-header");if(!r)return;const a=()=>u(r.offsetHeight);a();const s=new ResizeObserver(a);return s.observe(r),()=>s.disconnect()},[]);const c=r=>{C(r,void 0,{autoSend:!1}),d("/chat")},n=t.error instanceof m&&t.error.status===404;return t.isLoading?e.jsxs("div",{className:"shared-chat-state",role:"status",children:[e.jsx(w,{})," Loading shared conversation…"]}):n?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(j,{workspaceKey:`share:${i}:${t.data.updated_at}`,autoOpenOnMount:!0,children:e.jsxs("div",{className:"shared-chat-page",style:{height:`calc(100dvh - ${p}px)`},children:[e.jsxs("div",{className:"shared-chat-heading",children:[e.jsx("h1",{children:"Shared conversation"}),l&&e.jsx("span",{className:"chat-staging-badge",children:"Staging"})]}),e.jsx(b,{variant:"shared",children:e.jsxs("div",{className:"shared-chat-content","data-testid":"shared-conversation-pane",children:[e.jsx(_,{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."}),l&&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(y,{onSend:r=>c(r.text),placeholder:"Ask a new research question…"})]})]})})]})})};export{te as default}; diff --git a/assets/SharedChatView-DVE3k-Oa.js b/assets/SharedChatView-DVE3k-Oa.js deleted file mode 100644 index 15b15db3c46108f005ce67c0f319cf5b1315292b..0000000000000000000000000000000000000000 --- a/assets/SharedChatView-DVE3k-Oa.js +++ /dev/null @@ -1 +0,0 @@ -import{u as f,c as x,r as h,j as e,m as g}from"./index-D6jcIRWs.js";import{u as v}from"./useQuery-CUJUm4FY.js";import{A as j,a as b,C as y,U as S,b as k}from"./ArtifactWorkspace-CUZCugRS.js";import{C as m,e as w,p as N,q as C,g as q}from"./chatSessions-DByIWBno.js";/* empty css */import"./hover-card-DPpv0l_x.js";import"./CatalogEntityPreviewLink-BhTSUN-X.js";import"./catalog-PYrB8_bm.js";import"./github-B7D_19Qm.js";import"./file-text-4G2I5_Zo.js";import"./PaperPreviewLink-fcJyP9H0.js";import"./index-uFGyKu5N.js";import"./index-yduEvk9Z.js";import"./katex-DkKDou_j.js";import"./papers-DIIIPDpj.js";import"./useMutation-p6mN4h17.js";import"./chat-ChnK8XDU.js";import"./copy-BmzqMihw.js";import"./thumbs-up-BqRlVdvF.js";import"./arrow-left-IzGlownM.js";import"./external-link-C_yz2sXa.js";import"./plus-C4UQ62Q1.js";import"./search-CfTufeR7.js";import"./chevron-up-CQKUhZ0S.js";import"./AuthorAvatar-UMHOVOr9.js";const _=({detail:i})=>{const[d,l]=h.useState(()=>N(i)),p=h.useMemo(()=>{const t={};for(const c of d)for(const n of c.blocks??[])if(n.kind==="tool")for(const r of n.results??[])t[r.route_id]=r;return t},[d]),u=(t,c)=>{l(n=>n.map(r=>{var a;return r.id!==t?r:{...r,blocks:(a=r.blocks)==null?void 0:a.map((s,o)=>o===c&&(s.kind==="reasoning"||s.kind==="tool")?{...s,open:!s.open}:s)}}))};return e.jsx("div",{className:"shared-chat-transcript",children:d.map(t=>t.role==="user"?e.jsx(S,{id:t.id,text:t.text??"",paperMentions:t.paperMentions??[],paperSelection:t.paperSelection},t.id):e.jsx(k,{msg:t,papers:p,onToggleBlock:u},t.id))})},ee=()=>{const{shareId:i=""}=f(),d=x(),l=g(),[p,u]=h.useState(60),t=v({queryKey:["shared-chat",i],queryFn:()=>q(i),retry:(r,a)=>!(a instanceof m&&a.status===404)&&r<1});h.useEffect(()=>{const r=document.title,a=document.head.querySelector('meta[name="robots"]'),s=a==null?void 0:a.content,o=a??document.createElement("meta");return o.name="robots",o.content="noindex,nofollow",a||document.head.appendChild(o),document.title="Shared conversation",()=>{document.title=r,a?a.content=s??"":o.remove()}},[]),h.useLayoutEffect(()=>{const r=document.querySelector(".app-header");if(!r)return;const a=()=>u(r.offsetHeight);a();const s=new ResizeObserver(a);return s.observe(r),()=>s.disconnect()},[]);const c=r=>{C(r,void 0,{autoSend:!1}),d("/chat")},n=t.error instanceof m&&t.error.status===404;return t.isLoading?e.jsxs("div",{className:"shared-chat-state",role:"status",children:[e.jsx(w,{})," Loading shared conversation…"]}):n?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(j,{workspaceKey:`share:${i}:${t.data.updated_at}`,autoOpenOnMount:!0,children:e.jsxs("div",{className:"shared-chat-page",style:{height:`calc(100dvh - ${p}px)`},children:[e.jsxs("div",{className:"shared-chat-heading",children:[e.jsx("h1",{children:"Shared conversation"}),l&&e.jsx("span",{className:"chat-staging-badge",children:"Staging"})]}),e.jsx(b,{variant:"shared",children:e.jsxs("div",{className:"shared-chat-content","data-testid":"shared-conversation-pane",children:[e.jsx(_,{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."}),l&&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(y,{onSend:r=>c(r.text),placeholder:"Ask a new research question…"})]})]})})]})})};export{ee as default}; diff --git a/assets/SignInToEditDialog-RzK54RAM.js b/assets/SignInToEditDialog-DpqyyHCb.js similarity index 91% rename from assets/SignInToEditDialog-RzK54RAM.js rename to assets/SignInToEditDialog-DpqyyHCb.js index 8cad9a30511aa994e8d2ad6d9dddfc76f1eff442..4eeea07f312c112560697a2e050e3a27fcd8a494 100644 --- a/assets/SignInToEditDialog-RzK54RAM.js +++ b/assets/SignInToEditDialog-DpqyyHCb.js @@ -1,6 +1,6 @@ -import{n as be,r as a,j as e,a6 as je,B as fe,a7 as ye,p as Ne,s as we,X as Se,C as _e,H as ke}from"./index-D6jcIRWs.js";import{B as P}from"./button-Bzx0ccHH.js";import{I as u}from"./input-CCN-4hy4.js";import{T as Ce}from"./textarea-sXKODM3W.js";import{S as se}from"./searchable-select-B7z6Fcrr.js";import{D as ie,a as oe,c as le,b as ce,d as de,e as De}from"./dialog-vGFIbcd-.js";import{u as Ie}from"./useMutation-p6mN4h17.js";import{s as b,p as j}from"./submissions-DNa3tQdo.js";import{c as te}from"./catalog-PYrB8_bm.js";import{L as Ee}from"./loader-circle-BuDrH29B.js";/** +import{n as be,r as a,j as e,a6 as je,A as fe,a7 as ye,p as Ne,s as we,X as Se,C as _e,H as ke}from"./index-YwiKC6Po.js";import{B as P}from"./button-B90pJJiy.js";import{I as u}from"./input-DEeEc0bH.js";import{T as Ce}from"./textarea-BPIMGf5w.js";import{S as se}from"./searchable-select-Bqfyxu17.js";import{D as ie,a as oe,c as le,b as ce,d as de,e as De}from"./dialog-foxx0Wu6.js";import{u as Ie}from"./useMutation-f6iDkf3w.js";import{s as b,p as j}from"./submissions-BJgYjF7O.js";import{c as te}from"./catalog-B15Yh5dN.js";import{L as Ee}from"./loader-circle-B0KtDERb.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Me=be("ImagePlus",[["path",{d:"M16 5h6",key:"1vod17"}],["path",{d:"M19 2v6",key:"4bpg5p"}],["path",{d:"M21 11.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h7.5",key:"1ue2ih"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}]]);var Le=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Pe=Le.reduce((l,c)=>{const d=je(`Primitive.${c}`),t=a.forwardRef((o,f)=>{const{asChild:m,...y}=o,p=m?d:c;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),e.jsx(p,{...y,ref:f})});return t.displayName=`Primitive.${c}`,{...l,[c]:t}},{}),Fe="Label",ue=a.forwardRef((l,c)=>e.jsx(Pe.label,{...l,ref:c,onMouseDown:d=>{var o;d.target.closest("button, input, select, textarea")||((o=l.onMouseDown)==null||o.call(l,d),!d.defaultPrevented&&d.detail>1&&d.preventDefault())}}));ue.displayName=Fe;var me=ue;const Ae=ye("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),i=a.forwardRef(({className:l,...c},d)=>e.jsx(me,{ref:d,className:fe(Ae(),l),...c}));i.displayName=me.displayName;const ae=200,Be=2e3,Re=300,Te=500,re=1e3,Ge=2*1024*1024,ne=["image/jpeg","image/png","image/webp","image/gif"],He={task:"e.g. Long-context Retrieval",method:"e.g. Rotary Position Embedding",benchmark:"e.g. ImageNet (ReaL)",metric:"e.g. Top-5 Accuracy",conference:"e.g. International Conference on Machine Learning 2026"},Ue={task:"Briefly describe this task and what it covers.",method:"Briefly describe this method and what it covers.",benchmark:"Briefly describe this benchmark, the task it belongs to, and where it comes from.",metric:"Briefly describe this metric and whether higher or lower is better.",conference:"Briefly describe this conference, including its research focus and edition."};function Qe({open:l,onOpenChange:c,paperId:d,kind:t}){const[o,f]=a.useState(""),[m,y]=a.useState(""),[p,F]=a.useState(""),[A,B]=a.useState(""),[R,T]=a.useState(""),[G,H]=a.useState(""),[S,U]=a.useState(""),[x,_]=a.useState(null),[k,O]=a.useState(""),[C,V]=a.useState(""),[X,K]=a.useState(""),[D,z]=a.useState(""),[I,$]=a.useState(""),[E,q]=a.useState(""),[n,Y]=a.useState(null),[g,M]=a.useState(null),[J,W]=a.useState("higher_is_better"),[Q,h]=a.useState(""),N=a.useRef(null),{toast:Z}=Ne(),w=t,ge=t==="task"||t==="method";a.useEffect(()=>{l||(f(""),y(""),F(""),B(""),T(""),H(""),U(""),_(null),O(""),V(""),K(""),z(""),$(""),q(""),Y(null),M(null),W("higher_is_better"),h(""))},[l]);const ee=s=>{if(!s)return;if(h(""),!ne.includes(s.type)){h("Choose a JPEG, PNG, WebP, or GIF image.");return}if(s.size>Ge){h("Image must be 2 MB or smaller.");return}const r=new FileReader;r.onload=()=>{if(typeof r.result!="string"){h("Could not read that image.");return}_({file_name:s.name,mime_type:s.type,data_url:r.result})},r.onerror=()=>h("Could not read that image."),r.readAsDataURL(s)},he=s=>{s.preventDefault(),ee(s.dataTransfer.files[0])},pe=async s=>(await te.listTasks({page_size:100,...s?{q:s}:{}})).results.map(v=>({value:v.id,label:v.name})),xe=async s=>n?(await te.listDatasets({task_id:Number(n.value),page_size:100,...s?{q:s}:{}})).results.map(v=>({value:v.id,label:v.name})):[],L=Ie({mutationFn:async()=>{const s=d?parseInt(d):null,r=m.trim()||void 0;switch(t){case"task":return b.submit(j(s,"new_task",{name:o.trim(),description:r,image:x??void 0,image_credit:k.trim()||void 0,keywords:X.trim()||void 0,parent_id:D?Number(D):void 0,area_id:I?Number(I):void 0}));case"method":return b.submit(j(s,"new_method",{name:o.trim(),description:r,image:x??void 0,image_credit:k.trim()||void 0,source_url:C.trim()||void 0}));case"benchmark":return b.submit(j(s,"new_benchmark",{benchmark:o.trim(),task:E.trim(),description:m.trim()}));case"metric":return b.submit(j(s,"new_metric",{name:o.trim(),description:m.trim(),direction:J==="lower_is_better"?"lower_is_better":"higher_is_better",task_id:Number(n==null?void 0:n.value),dataset_id:Number(g==null?void 0:g.value)}));case"conference":return b.submit(j(s,"new_conference",{name:o.trim(),description:r,year:Number(p),start_date:A||void 0,end_date:R||void 0,venue:G.trim()||void 0,url:S.trim()}))}},onSuccess:()=>{Z({title:"Suggestion submitted for review",description:`Thanks! An admin will review your suggested ${w} shortly.`}),c(!1)},onError:s=>{const r=we(s,`Failed to submit your ${w} suggestion.`);Z({title:"Could not submit suggestion",description:r,variant:"destructive"})}}),ve=o.trim().length>0&&(t==="task"||t==="method"&&!!C.trim()||t==="conference"&&!!p&&!!S.trim()||t==="benchmark"&&!!E.trim()&&!!m.trim()||t==="metric"&&!!n&&!!g&&!!m.trim());return e.jsx(ie,{open:l,onOpenChange:c,children:e.jsxs(oe,{className:"max-w-lg max-h-[90vh] overflow-y-auto",children:[e.jsxs(le,{children:[e.jsxs(ce,{children:["Suggest a new ",w]}),e.jsxs(de,{children:["Propose a ",w," that isn't in the list yet. An admin will review the suggestion, but approval won't automatically change the catalog."]})]}),e.jsxs("div",{className:"space-y-4 py-2",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(i,{htmlFor:"suggest-name",children:t==="benchmark"?"Benchmark":"Name"}),e.jsx(u,{id:"suggest-name",value:o,maxLength:ae,placeholder:He[t],onChange:s=>f(s.target.value)})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs(i,{htmlFor:"suggest-description",children:["Description",t==="task"||t==="method"||t==="conference"?" (optional)":""]}),e.jsx(Ce,{id:"suggest-description",value:m,maxLength:Be,placeholder:Ue[t],onChange:s=>y(s.target.value)})]}),t==="task"&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(i,{htmlFor:"suggest-keywords",children:"Keywords (optional)"}),e.jsx(u,{id:"suggest-keywords",value:X,onChange:s=>K(s.target.value),placeholder:"comma-separated matching terms"})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[e.jsx(u,{type:"number",min:"1",value:D,onChange:s=>z(s.target.value),placeholder:"Parent task ID (optional)"}),e.jsx(u,{type:"number",min:"1",value:I,onChange:s=>$(s.target.value),placeholder:"Area ID (optional)"})]})]}),t==="benchmark"&&e.jsxs("div",{className:"space-y-2",children:[e.jsx(i,{htmlFor:"suggest-benchmark-task",children:"Task"}),e.jsx(u,{id:"suggest-benchmark-task",value:E,maxLength:ae,placeholder:"e.g. Deepfake Detection",onChange:s=>q(s.target.value)})]}),t==="metric"&&e.jsxs("div",{className:"space-y-3",children:[e.jsx(i,{children:"Intended leaderboard"}),e.jsxs("select",{"aria-label":"Metric direction",className:"w-full rounded-md border bg-background p-2",value:J,onChange:s=>W(s.target.value),children:[e.jsx("option",{value:"higher_is_better",children:"Higher is better"}),e.jsx("option",{value:"lower_is_better",children:"Lower is better"})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(i,{children:"Task"}),e.jsx(se,{value:(n==null?void 0:n.value)??"",onChange:(s,r)=>{Y(r),M(null)},selectedOption:n,placeholder:"Select task",searchPlaceholder:"Search tasks...",emptyMessage:"No tasks found.",errorMessage:"Could not load tasks. Try again.",queryKey:["suggest-metric-task-search"],queryFn:pe,ariaLabel:"Select task",className:"h-10"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(i,{children:"Benchmark"}),e.jsx(se,{value:(g==null?void 0:g.value)??"",onChange:(s,r)=>M(r),selectedOption:g,placeholder:n?"Select benchmark":"Select task first",searchPlaceholder:"Search benchmarks...",emptyMessage:"No benchmarks found for this task.",errorMessage:"Could not load benchmarks. Try again.",disabled:!n,queryKey:["suggest-metric-benchmark-search",n==null?void 0:n.value],queryFn:xe,enabled:!!n,ariaLabel:"Select benchmark",className:"h-10"})]})]})]}),ge&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(i,{children:"Image (optional)"}),e.jsx("input",{ref:N,className:"sr-only",type:"file",accept:ne.join(","),onChange:s=>{var r;return ee((r=s.target.files)==null?void 0:r[0])}}),x?e.jsxs("div",{className:"relative overflow-hidden rounded-md border border-border bg-muted/30",children:[e.jsx("img",{src:x.data_url,alt:"Selected suggestion",className:"max-h-48 w-full object-contain"}),e.jsxs(P,{type:"button",variant:"secondary",size:"sm",className:"absolute right-2 top-2 h-8 px-2",onClick:()=>{_(null),N.current&&(N.current.value="")},children:[e.jsx(Se,{className:"mr-1 h-4 w-4"}),"Remove"]}),e.jsx("div",{className:"truncate border-t border-border px-3 py-2 text-xs text-muted-foreground",children:x.file_name})]}):e.jsxs("button",{type:"button",className:"flex w-full flex-col items-center justify-center rounded-md border border-dashed border-border px-4 py-6 text-center text-sm text-muted-foreground transition-colors hover:border-foreground/50 hover:text-foreground",onClick:()=>{var s;return(s=N.current)==null?void 0:s.click()},onDragOver:s=>s.preventDefault(),onDrop:he,children:[e.jsx(Me,{className:"mb-2 h-6 w-6"}),e.jsx("span",{children:"Drop an image here, or click to choose one"}),e.jsx("span",{className:"mt-1 text-xs",children:"JPEG, PNG, WebP, or GIF · max 2 MB"})]}),Q&&e.jsx("p",{className:"text-sm text-destructive",role:"alert",children:Q})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(i,{htmlFor:"suggest-image-source",children:"Image source (optional)"}),e.jsx(u,{id:"suggest-image-source",value:k,maxLength:re,placeholder:"Creator, publication, or source URL",onChange:s=>O(s.target.value)})]}),t==="method"&&e.jsxs("div",{className:"space-y-2",children:[e.jsx(i,{htmlFor:"suggest-method-source",children:"Source URL (optional)"}),e.jsx(u,{id:"suggest-method-source",value:C,maxLength:re,placeholder:"https://arxiv.org/abs/...",onChange:s=>V(s.target.value)})]})]}),t==="conference"&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(i,{htmlFor:"suggest-year",children:"Edition year"}),e.jsx(u,{id:"suggest-year",type:"number",min:"1900",max:"2200",value:p,placeholder:"2026",onChange:s=>F(s.target.value)})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[e.jsxs("div",{children:[e.jsx(i,{htmlFor:"suggest-start-date",children:"Start date (optional)"}),e.jsx(u,{id:"suggest-start-date",type:"date",value:A,onChange:s=>B(s.target.value)})]}),e.jsxs("div",{children:[e.jsx(i,{htmlFor:"suggest-end-date",children:"End date (optional)"}),e.jsx(u,{id:"suggest-end-date",type:"date",value:R,onChange:s=>T(s.target.value)})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(i,{htmlFor:"suggest-venue",children:"Venue (optional)"}),e.jsx(u,{id:"suggest-venue",value:G,maxLength:Re,placeholder:"e.g. Vancouver Convention Centre, Canada",onChange:s=>H(s.target.value)})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(i,{htmlFor:"suggest-url",children:"URL (optional)"}),e.jsx(u,{id:"suggest-url",type:"url",inputMode:"url",value:S,maxLength:Te,placeholder:"https://example.org/conference",onChange:s=>U(s.target.value)})]})]})]}),e.jsxs(De,{children:[e.jsx(P,{variant:"outline",onClick:()=>c(!1),children:"Cancel"}),e.jsx(P,{onClick:()=>L.mutate(),disabled:L.isPending||!ve,children:L.isPending?e.jsxs(e.Fragment,{children:[e.jsx(Ee,{className:"w-4 h-4 mr-2 animate-spin"}),"Submitting..."]}):e.jsxs(e.Fragment,{children:[e.jsx(_e,{className:"w-4 h-4 mr-2"}),"Submit suggestion"]})})]})]})})}function Ze({open:l,onOpenChange:c,sectionLabel:d,returnTo:t,taxonomySuggestion:o=!1}){return e.jsx(ie,{open:l,onOpenChange:c,children:e.jsxs(oe,{className:"max-w-md",children:[e.jsxs(le,{children:[e.jsxs(ce,{children:["Sign in to ",o?"suggest":"edit"," ",d]}),e.jsx(de,{children:o?"Sign in with your Hugging Face account so an admin can review your suggestion.":"Anyone can suggest edits to a paper page. Sign in with your Hugging Face account first so an admin can review your submission."})]}),e.jsx("div",{className:"flex justify-center pt-2",children:e.jsx(ke,{returnTo:t})})]})})}export{i as L,Qe as S,Ze as a}; + */const Me=be("ImagePlus",[["path",{d:"M16 5h6",key:"1vod17"}],["path",{d:"M19 2v6",key:"4bpg5p"}],["path",{d:"M21 11.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h7.5",key:"1ue2ih"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}]]);var Le=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Pe=Le.reduce((l,c)=>{const d=je(`Primitive.${c}`),t=a.forwardRef((o,f)=>{const{asChild:m,...y}=o,p=m?d:c;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),e.jsx(p,{...y,ref:f})});return t.displayName=`Primitive.${c}`,{...l,[c]:t}},{}),Ae="Label",ue=a.forwardRef((l,c)=>e.jsx(Pe.label,{...l,ref:c,onMouseDown:d=>{var o;d.target.closest("button, input, select, textarea")||((o=l.onMouseDown)==null||o.call(l,d),!d.defaultPrevented&&d.detail>1&&d.preventDefault())}}));ue.displayName=Ae;var me=ue;const Fe=ye("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),i=a.forwardRef(({className:l,...c},d)=>e.jsx(me,{ref:d,className:fe(Fe(),l),...c}));i.displayName=me.displayName;const ae=200,Be=2e3,Re=300,Te=500,re=1e3,Ge=2*1024*1024,ne=["image/jpeg","image/png","image/webp","image/gif"],He={task:"e.g. Long-context Retrieval",method:"e.g. Rotary Position Embedding",benchmark:"e.g. ImageNet (ReaL)",metric:"e.g. Top-5 Accuracy",conference:"e.g. International Conference on Machine Learning 2026"},Ue={task:"Briefly describe this task and what it covers.",method:"Briefly describe this method and what it covers.",benchmark:"Briefly describe this benchmark, the task it belongs to, and where it comes from.",metric:"Briefly describe this metric and whether higher or lower is better.",conference:"Briefly describe this conference, including its research focus and edition."};function Qe({open:l,onOpenChange:c,paperId:d,kind:t}){const[o,f]=a.useState(""),[m,y]=a.useState(""),[p,A]=a.useState(""),[F,B]=a.useState(""),[R,T]=a.useState(""),[G,H]=a.useState(""),[S,U]=a.useState(""),[x,_]=a.useState(null),[k,O]=a.useState(""),[C,V]=a.useState(""),[X,K]=a.useState(""),[D,z]=a.useState(""),[I,$]=a.useState(""),[E,q]=a.useState(""),[n,Y]=a.useState(null),[g,M]=a.useState(null),[J,W]=a.useState("higher_is_better"),[Q,h]=a.useState(""),N=a.useRef(null),{toast:Z}=Ne(),w=t,ge=t==="task"||t==="method";a.useEffect(()=>{l||(f(""),y(""),A(""),B(""),T(""),H(""),U(""),_(null),O(""),V(""),K(""),z(""),$(""),q(""),Y(null),M(null),W("higher_is_better"),h(""))},[l]);const ee=s=>{if(!s)return;if(h(""),!ne.includes(s.type)){h("Choose a JPEG, PNG, WebP, or GIF image.");return}if(s.size>Ge){h("Image must be 2 MB or smaller.");return}const r=new FileReader;r.onload=()=>{if(typeof r.result!="string"){h("Could not read that image.");return}_({file_name:s.name,mime_type:s.type,data_url:r.result})},r.onerror=()=>h("Could not read that image."),r.readAsDataURL(s)},he=s=>{s.preventDefault(),ee(s.dataTransfer.files[0])},pe=async s=>(await te.listTasks({page_size:100,...s?{q:s}:{}})).results.map(v=>({value:v.id,label:v.name})),xe=async s=>n?(await te.listDatasets({task_id:Number(n.value),page_size:100,...s?{q:s}:{}})).results.map(v=>({value:v.id,label:v.name})):[],L=Ie({mutationFn:async()=>{const s=d?parseInt(d):null,r=m.trim()||void 0;switch(t){case"task":return b.submit(j(s,"new_task",{name:o.trim(),description:r,image:x??void 0,image_credit:k.trim()||void 0,keywords:X.trim()||void 0,parent_id:D?Number(D):void 0,area_id:I?Number(I):void 0}));case"method":return b.submit(j(s,"new_method",{name:o.trim(),description:r,image:x??void 0,image_credit:k.trim()||void 0,source_url:C.trim()||void 0}));case"benchmark":return b.submit(j(s,"new_benchmark",{benchmark:o.trim(),task:E.trim(),description:m.trim()}));case"metric":return b.submit(j(s,"new_metric",{name:o.trim(),description:m.trim(),direction:J==="lower_is_better"?"lower_is_better":"higher_is_better",task_id:Number(n==null?void 0:n.value),dataset_id:Number(g==null?void 0:g.value)}));case"conference":return b.submit(j(s,"new_conference",{name:o.trim(),description:r,year:Number(p),start_date:F||void 0,end_date:R||void 0,venue:G.trim()||void 0,url:S.trim()}))}},onSuccess:()=>{Z({title:"Suggestion submitted for review",description:`Thanks! An admin will review your suggested ${w} shortly.`}),c(!1)},onError:s=>{const r=we(s,`Failed to submit your ${w} suggestion.`);Z({title:"Could not submit suggestion",description:r,variant:"destructive"})}}),ve=o.trim().length>0&&(t==="task"||t==="method"&&!!C.trim()||t==="conference"&&!!p&&!!S.trim()||t==="benchmark"&&!!E.trim()&&!!m.trim()||t==="metric"&&!!n&&!!g&&!!m.trim());return e.jsx(ie,{open:l,onOpenChange:c,children:e.jsxs(oe,{className:"max-w-lg max-h-[90vh] overflow-y-auto",children:[e.jsxs(le,{children:[e.jsxs(ce,{children:["Suggest a new ",w]}),e.jsxs(de,{children:["Propose a ",w," that isn't in the list yet. An admin will review the suggestion, but approval won't automatically change the catalog."]})]}),e.jsxs("div",{className:"space-y-4 py-2",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(i,{htmlFor:"suggest-name",children:t==="benchmark"?"Benchmark":"Name"}),e.jsx(u,{id:"suggest-name",value:o,maxLength:ae,placeholder:He[t],onChange:s=>f(s.target.value)})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs(i,{htmlFor:"suggest-description",children:["Description",t==="task"||t==="method"||t==="conference"?" (optional)":""]}),e.jsx(Ce,{id:"suggest-description",value:m,maxLength:Be,placeholder:Ue[t],onChange:s=>y(s.target.value)})]}),t==="task"&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(i,{htmlFor:"suggest-keywords",children:"Keywords (optional)"}),e.jsx(u,{id:"suggest-keywords",value:X,onChange:s=>K(s.target.value),placeholder:"comma-separated matching terms"})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[e.jsx(u,{type:"number",min:"1",value:D,onChange:s=>z(s.target.value),placeholder:"Parent task ID (optional)"}),e.jsx(u,{type:"number",min:"1",value:I,onChange:s=>$(s.target.value),placeholder:"Area ID (optional)"})]})]}),t==="benchmark"&&e.jsxs("div",{className:"space-y-2",children:[e.jsx(i,{htmlFor:"suggest-benchmark-task",children:"Task"}),e.jsx(u,{id:"suggest-benchmark-task",value:E,maxLength:ae,placeholder:"e.g. Deepfake Detection",onChange:s=>q(s.target.value)})]}),t==="metric"&&e.jsxs("div",{className:"space-y-3",children:[e.jsx(i,{children:"Intended leaderboard"}),e.jsxs("select",{"aria-label":"Metric direction",className:"w-full rounded-md border bg-background p-2",value:J,onChange:s=>W(s.target.value),children:[e.jsx("option",{value:"higher_is_better",children:"Higher is better"}),e.jsx("option",{value:"lower_is_better",children:"Lower is better"})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(i,{children:"Task"}),e.jsx(se,{value:(n==null?void 0:n.value)??"",onChange:(s,r)=>{Y(r),M(null)},selectedOption:n,placeholder:"Select task",searchPlaceholder:"Search tasks...",emptyMessage:"No tasks found.",errorMessage:"Could not load tasks. Try again.",queryKey:["suggest-metric-task-search"],queryFn:pe,ariaLabel:"Select task",className:"h-10"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(i,{children:"Benchmark"}),e.jsx(se,{value:(g==null?void 0:g.value)??"",onChange:(s,r)=>M(r),selectedOption:g,placeholder:n?"Select benchmark":"Select task first",searchPlaceholder:"Search benchmarks...",emptyMessage:"No benchmarks found for this task.",errorMessage:"Could not load benchmarks. Try again.",disabled:!n,queryKey:["suggest-metric-benchmark-search",n==null?void 0:n.value],queryFn:xe,enabled:!!n,ariaLabel:"Select benchmark",className:"h-10"})]})]})]}),ge&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(i,{children:"Image (optional)"}),e.jsx("input",{ref:N,className:"sr-only",type:"file",accept:ne.join(","),onChange:s=>{var r;return ee((r=s.target.files)==null?void 0:r[0])}}),x?e.jsxs("div",{className:"relative overflow-hidden rounded-md border border-border bg-muted/30",children:[e.jsx("img",{src:x.data_url,alt:"Selected suggestion",className:"max-h-48 w-full object-contain"}),e.jsxs(P,{type:"button",variant:"secondary",size:"sm",className:"absolute right-2 top-2 h-8 px-2",onClick:()=>{_(null),N.current&&(N.current.value="")},children:[e.jsx(Se,{className:"mr-1 h-4 w-4"}),"Remove"]}),e.jsx("div",{className:"truncate border-t border-border px-3 py-2 text-xs text-muted-foreground",children:x.file_name})]}):e.jsxs("button",{type:"button",className:"flex w-full flex-col items-center justify-center rounded-md border border-dashed border-border px-4 py-6 text-center text-sm text-muted-foreground transition-colors hover:border-foreground/50 hover:text-foreground",onClick:()=>{var s;return(s=N.current)==null?void 0:s.click()},onDragOver:s=>s.preventDefault(),onDrop:he,children:[e.jsx(Me,{className:"mb-2 h-6 w-6"}),e.jsx("span",{children:"Drop an image here, or click to choose one"}),e.jsx("span",{className:"mt-1 text-xs",children:"JPEG, PNG, WebP, or GIF · max 2 MB"})]}),Q&&e.jsx("p",{className:"text-sm text-destructive",role:"alert",children:Q})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(i,{htmlFor:"suggest-image-source",children:"Image source (optional)"}),e.jsx(u,{id:"suggest-image-source",value:k,maxLength:re,placeholder:"Creator, publication, or source URL",onChange:s=>O(s.target.value)})]}),t==="method"&&e.jsxs("div",{className:"space-y-2",children:[e.jsx(i,{htmlFor:"suggest-method-source",children:"Source URL (optional)"}),e.jsx(u,{id:"suggest-method-source",value:C,maxLength:re,placeholder:"https://arxiv.org/abs/...",onChange:s=>V(s.target.value)})]})]}),t==="conference"&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(i,{htmlFor:"suggest-year",children:"Edition year"}),e.jsx(u,{id:"suggest-year",type:"number",min:"1900",max:"2200",value:p,placeholder:"2026",onChange:s=>A(s.target.value)})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[e.jsxs("div",{children:[e.jsx(i,{htmlFor:"suggest-start-date",children:"Start date (optional)"}),e.jsx(u,{id:"suggest-start-date",type:"date",value:F,onChange:s=>B(s.target.value)})]}),e.jsxs("div",{children:[e.jsx(i,{htmlFor:"suggest-end-date",children:"End date (optional)"}),e.jsx(u,{id:"suggest-end-date",type:"date",value:R,onChange:s=>T(s.target.value)})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(i,{htmlFor:"suggest-venue",children:"Venue (optional)"}),e.jsx(u,{id:"suggest-venue",value:G,maxLength:Re,placeholder:"e.g. Vancouver Convention Centre, Canada",onChange:s=>H(s.target.value)})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(i,{htmlFor:"suggest-url",children:"URL (optional)"}),e.jsx(u,{id:"suggest-url",type:"url",inputMode:"url",value:S,maxLength:Te,placeholder:"https://example.org/conference",onChange:s=>U(s.target.value)})]})]})]}),e.jsxs(De,{children:[e.jsx(P,{variant:"outline",onClick:()=>c(!1),children:"Cancel"}),e.jsx(P,{onClick:()=>L.mutate(),disabled:L.isPending||!ve,children:L.isPending?e.jsxs(e.Fragment,{children:[e.jsx(Ee,{className:"w-4 h-4 mr-2 animate-spin"}),"Submitting..."]}):e.jsxs(e.Fragment,{children:[e.jsx(_e,{className:"w-4 h-4 mr-2"}),"Submit suggestion"]})})]})]})})}function Ze({open:l,onOpenChange:c,sectionLabel:d,returnTo:t,taxonomySuggestion:o=!1}){return e.jsx(ie,{open:l,onOpenChange:c,children:e.jsxs(oe,{className:"max-w-md",children:[e.jsxs(le,{children:[e.jsxs(ce,{children:["Sign in to ",o?"suggest":"edit"," ",d]}),e.jsx(de,{children:o?"Sign in with your Hugging Face account so an admin can review your suggestion.":"Anyone can suggest edits to a paper page. Sign in with your Hugging Face account first so an admin can review your submission."})]}),e.jsx("div",{className:"flex justify-center pt-2",children:e.jsx(ke,{returnTo:t})})]})})}export{i as L,Qe as S,Ze as a}; diff --git a/assets/SotaBadges-DiQuEzfo.js b/assets/SotaBadges-DiQuEzfo.js new file mode 100644 index 0000000000000000000000000000000000000000..201de390bc867b620980d81a7733986b3fb0b832 --- /dev/null +++ b/assets/SotaBadges-DiQuEzfo.js @@ -0,0 +1 @@ +import{c as M,j as e,K as x,L as C}from"./index-YwiKC6Po.js";import{h as F,c as E}from"./colors-BkWRhvFI.js";import{d as A,h as P}from"./transform-CNg3rvXk.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"]})]})},K=({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,K as S,D as T}; diff --git a/assets/StagingAccessRequestView-BV2q1V1S.js b/assets/StagingAccessRequestView-DFeZrs_b.js similarity index 95% rename from assets/StagingAccessRequestView-BV2q1V1S.js rename to assets/StagingAccessRequestView-DFeZrs_b.js index e2846a7b055dc8bd28219a734bbb2b63e62a2c9a..2d2dcfc832a5862f4ddb7b60414c235728ea237e 100644 --- a/assets/StagingAccessRequestView-BV2q1V1S.js +++ b/assets/StagingAccessRequestView-DFeZrs_b.js @@ -1 +1 @@ -import{a as m,K as a,j as e,H as g,aY as p}from"./index-D6jcIRWs.js";import{C as j}from"./circle-check-BZn9Lr76.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,K as a,j as e,H as g,aX as p}from"./index-YwiKC6Po.js";import{C as j}from"./circle-check-BPcHPjjB.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-CfJfn_Cp.js b/assets/SubmissionsDashboard-6OF_L4gN.js similarity index 80% rename from assets/SubmissionsDashboard-CfJfn_Cp.js rename to assets/SubmissionsDashboard-6OF_L4gN.js index b1e1a99541a3583f72e605acbd452bee6b09ccde..9bd9084042c1b36e52f98c8b4c79296e47323312 100644 --- a/assets/SubmissionsDashboard-CfJfn_Cp.js +++ b/assets/SubmissionsDashboard-6OF_L4gN.js @@ -1,4 +1,4 @@ -var xe=s=>{throw TypeError(s)};var re=(s,t,n)=>t.has(s)||xe("Cannot "+n);var b=(s,t,n)=>(re(s,t,"read from private field"),n?n.call(s):t.get(s)),C=(s,t,n)=>t.has(s)?xe("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(s):t.set(s,n),k=(s,t,n,i)=>(re(s,t,"write to private field"),i?i.call(s,n):t.set(s,n),n),O=(s,t,n)=>(re(s,t,"access private method"),n);import{ay as Fe,aL as le,aB as Ae,aU as Ue,f as Ee,r as H,aD as Qe,n as Re,j as e,Y as Ce,B as I,K as w,p as Oe,s as z,aV as $e,aW as qe,aX as De}from"./index-D6jcIRWs.js";import{r as Le,e as ze}from"./evaluationQueryInvalidation-D5wBpmlA.js";import{a as Pe,p as Be}from"./papers-DIIIPDpj.js";import{i as je,a as ae}from"./queryInvalidation-BxCpTdQe.js";import{Q as Me,b as He,c as Ke,e as Je,d as We,f as Ge,s as ve,g as Ye,h as Ve,u as Te}from"./useQuery-CUJUm4FY.js";import{u as se}from"./useMutation-p6mN4h17.js";import{u as Xe}from"./useInfiniteQuery-FXco4P1n.js";import{c as U}from"./catalog-PYrB8_bm.js";import{s as D}from"./safeExternalHref-CkBrsh84.js";import{s as W}from"./submissions-DNa3tQdo.js";import{R as Ze,C as es}from"./refresh-cw-Qmu3JZxd.js";import{L as G}from"./loader-circle-BuDrH29B.js";import{C as ss}from"./circle-check-BZn9Lr76.js";function _e(s,t){const n=new Set(t);return s.filter(i=>!n.has(i))}function ts(s,t,n){const i=s.slice(0);return i[t]=n,i}var P,E,B,q,R,A,Y,V,X,Z,N,ce,de,Ie,ue,pe,he,Se,is=(Se=class extends Fe{constructor(t,n,i){super();C(this,N);C(this,P);C(this,E);C(this,B);C(this,q);C(this,R);C(this,A);C(this,Y);C(this,V);C(this,X);C(this,Z,[]);k(this,P,t),k(this,q,i),k(this,B,[]),k(this,R,[]),k(this,E,[]),this.setQueries(n)}onSubscribe(){this.listeners.size===1&&b(this,R).forEach(t=>{t.subscribe(n=>{O(this,N,pe).call(this,t,n)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,b(this,R).forEach(t=>{t.destroy()})}setQueries(t,n){k(this,B,t),k(this,q,n),le.batch(()=>{const i=b(this,R),r=O(this,N,ue).call(this,b(this,B));r.forEach(l=>l.observer.setOptions(l.defaultedQueryOptions));const o=r.map(l=>l.observer),a=o.map(l=>l.getCurrentResult()),u=i.length!==o.length,d=o.some((l,m)=>l!==i[m]),p=u||d,v=p?!0:a.some((l,m)=>{const c=b(this,E)[m];return!c||!Ae(l,c)});!p&&!v||(p&&(k(this,Z,r),k(this,R,o)),k(this,E,a),this.hasListeners()&&(p&&(_e(i,o).forEach(l=>{l.destroy()}),_e(o,i).forEach(l=>{l.subscribe(m=>{O(this,N,pe).call(this,l,m)})})),O(this,N,he).call(this)))})}getCurrentResult(){return b(this,E)}getQueries(){return b(this,R).map(t=>t.getCurrentQuery())}getObservers(){return b(this,R)}getOptimisticResult(t,n){const i=O(this,N,ue).call(this,t),r=i.map(a=>a.observer.getOptimisticResult(a.defaultedQueryOptions)),o=i.map(a=>a.defaultedQueryOptions.queryHash);return[r,a=>O(this,N,de).call(this,a??r,n,o),()=>O(this,N,ce).call(this,r,i)]}},P=new WeakMap,E=new WeakMap,B=new WeakMap,q=new WeakMap,R=new WeakMap,A=new WeakMap,Y=new WeakMap,V=new WeakMap,X=new WeakMap,Z=new WeakMap,N=new WeakSet,ce=function(t,n){return n.map((i,r)=>{const o=t[r];return i.defaultedQueryOptions.notifyOnChangeProps?o:i.observer.trackResult(o,a=>{n.forEach(u=>{u.observer.trackProp(a)})})})},de=function(t,n,i){if(n){const r=b(this,X),o=i!==void 0&&r!==void 0&&(r.length!==i.length||i.some((a,u)=>a!==r[u]));return(!b(this,A)||b(this,E)!==b(this,V)||o||n!==b(this,Y))&&(k(this,Y,n),k(this,V,b(this,E)),i!==void 0&&k(this,X,i),k(this,A,Ue(b(this,A),n(t)))),b(this,A)}return t},Ie=function(){var t;return((t=b(this,q))==null?void 0:t.combine)!==void 0&&b(this,R).some((n,i)=>{var r;return n.options.suspense&&((r=b(this,E)[i])==null?void 0:r.data)===void 0})},ue=function(t){const n=new Map;b(this,R).forEach(r=>{const o=r.options.queryHash;if(!o)return;const a=n.get(o);a?a.push(r):n.set(o,[r])});const i=[];return t.forEach(r=>{var d;const o=b(this,P).defaultQueryOptions(r),u=((d=n.get(o.queryHash))==null?void 0:d.shift())??new Me(b(this,P),o);i.push({defaultedQueryOptions:o,observer:u})}),i},pe=function(t,n){const i=b(this,R).indexOf(t);i!==-1&&(k(this,E,ts(b(this,E),i,n)),O(this,N,he).call(this))},he=function(){var t;if(this.hasListeners()){const n=O(this,N,ce).call(this,b(this,E),b(this,Z)),i=O(this,N,Ie).call(this),r=b(this,A),o=i?r:O(this,N,de).call(this,n,(t=b(this,q))==null?void 0:t.combine);(i||r!==o)&&le.batch(()=>{this.listeners.forEach(a=>{a(b(this,E))})})}},Se);function ie({queries:s,...t},n){const i=Ee(),r=He(),o=Ke(),a=H.useMemo(()=>s.map(x=>{const _=i.defaultQueryOptions(x);return _._optimisticResults=r?"isRestoring":"optimistic",_}),[s,i,r]);a.forEach(x=>{Je(x);const _=i.getQueryCache().get(x.queryHash);We(x,o,_)}),Ge(o);const[u]=H.useState(()=>new is(i,a,t)),[d,p,v]=u.getOptimisticResult(a,t.combine),l=!r&&t.subscribed!==!1;H.useSyncExternalStore(H.useCallback(x=>l?u.subscribe(le.batchCalls(x)):Qe,[u,l]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),H.useEffect(()=>{u.setQueries(a,t)},[a,t,u]);const c=d.some((x,_)=>ve(a[_],x))?d.flatMap((x,_)=>{const S=a[_];if(S&&ve(S,x)){const Q=new Me(i,S);return Ye(S,Q,o)}return[]}):[];if(c.length>0)throw Promise.all(c);const f=d.find((x,_)=>{const S=a[_];return S&&Ve({result:x,errorResetBoundary:o,throwOnError:S.throwOnError,query:i.getQueryCache().get(S.queryHash),suspense:S.suspense})});if(f!=null&&f.error)throw f.error;return p(v())}/** +var xe=s=>{throw TypeError(s)};var re=(s,t,n)=>t.has(s)||xe("Cannot "+n);var b=(s,t,n)=>(re(s,t,"read from private field"),n?n.call(s):t.get(s)),C=(s,t,n)=>t.has(s)?xe("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(s):t.set(s,n),k=(s,t,n,i)=>(re(s,t,"write to private field"),i?i.call(s,n):t.set(s,n),n),O=(s,t,n)=>(re(s,t,"access private method"),n);import{at as Ie,au as le,av as Fe,aw as Ue,f as Ee,r as H,ax as Qe,n as Re,j as e,Y as Ce,A,K as w,p as Oe,s as z,ay as $e,az as qe,aA as De}from"./index-YwiKC6Po.js";import{r as Le,e as ze}from"./evaluationQueryInvalidation-CcSZ8CmA.js";import{a as Pe,p as Be}from"./paperQueryKeys-C5FMa4Oj.js";import{i as je,a as ae}from"./queryInvalidation-Dgyv9_oM.js";import{Q as Me,a as He,b as Ke,e as Je,c as Ge,d as We,s as ve,f as Ye,g as Ve,u as Te}from"./useQuery-DPH6Mb2w.js";import{u as se}from"./useMutation-f6iDkf3w.js";import{u as Xe}from"./useInfiniteQuery-BEbL80ez.js";import{c as U}from"./catalog-B15Yh5dN.js";import{s as D}from"./safeExternalHref-CkBrsh84.js";import{s as G}from"./submissions-BJgYjF7O.js";import{R as Ze,C as es}from"./refresh-cw-4AZFTXDl.js";import{L as W}from"./loader-circle-B0KtDERb.js";import{C as ss}from"./circle-check-BPcHPjjB.js";import"./curation-CkzNFTMJ.js";function _e(s,t){const n=new Set(t);return s.filter(i=>!n.has(i))}function ts(s,t,n){const i=s.slice(0);return i[t]=n,i}var P,E,B,q,R,F,Y,V,X,Z,N,ce,de,Ae,ue,pe,he,Se,is=(Se=class extends Ie{constructor(t,n,i){super();C(this,N);C(this,P);C(this,E);C(this,B);C(this,q);C(this,R);C(this,F);C(this,Y);C(this,V);C(this,X);C(this,Z,[]);k(this,P,t),k(this,q,i),k(this,B,[]),k(this,R,[]),k(this,E,[]),this.setQueries(n)}onSubscribe(){this.listeners.size===1&&b(this,R).forEach(t=>{t.subscribe(n=>{O(this,N,pe).call(this,t,n)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,b(this,R).forEach(t=>{t.destroy()})}setQueries(t,n){k(this,B,t),k(this,q,n),le.batch(()=>{const i=b(this,R),r=O(this,N,ue).call(this,b(this,B));r.forEach(l=>l.observer.setOptions(l.defaultedQueryOptions));const o=r.map(l=>l.observer),a=o.map(l=>l.getCurrentResult()),u=i.length!==o.length,d=o.some((l,m)=>l!==i[m]),p=u||d,v=p?!0:a.some((l,m)=>{const c=b(this,E)[m];return!c||!Fe(l,c)});!p&&!v||(p&&(k(this,Z,r),k(this,R,o)),k(this,E,a),this.hasListeners()&&(p&&(_e(i,o).forEach(l=>{l.destroy()}),_e(o,i).forEach(l=>{l.subscribe(m=>{O(this,N,pe).call(this,l,m)})})),O(this,N,he).call(this)))})}getCurrentResult(){return b(this,E)}getQueries(){return b(this,R).map(t=>t.getCurrentQuery())}getObservers(){return b(this,R)}getOptimisticResult(t,n){const i=O(this,N,ue).call(this,t),r=i.map(a=>a.observer.getOptimisticResult(a.defaultedQueryOptions)),o=i.map(a=>a.defaultedQueryOptions.queryHash);return[r,a=>O(this,N,de).call(this,a??r,n,o),()=>O(this,N,ce).call(this,r,i)]}},P=new WeakMap,E=new WeakMap,B=new WeakMap,q=new WeakMap,R=new WeakMap,F=new WeakMap,Y=new WeakMap,V=new WeakMap,X=new WeakMap,Z=new WeakMap,N=new WeakSet,ce=function(t,n){return n.map((i,r)=>{const o=t[r];return i.defaultedQueryOptions.notifyOnChangeProps?o:i.observer.trackResult(o,a=>{n.forEach(u=>{u.observer.trackProp(a)})})})},de=function(t,n,i){if(n){const r=b(this,X),o=i!==void 0&&r!==void 0&&(r.length!==i.length||i.some((a,u)=>a!==r[u]));return(!b(this,F)||b(this,E)!==b(this,V)||o||n!==b(this,Y))&&(k(this,Y,n),k(this,V,b(this,E)),i!==void 0&&k(this,X,i),k(this,F,Ue(b(this,F),n(t)))),b(this,F)}return t},Ae=function(){var t;return((t=b(this,q))==null?void 0:t.combine)!==void 0&&b(this,R).some((n,i)=>{var r;return n.options.suspense&&((r=b(this,E)[i])==null?void 0:r.data)===void 0})},ue=function(t){const n=new Map;b(this,R).forEach(r=>{const o=r.options.queryHash;if(!o)return;const a=n.get(o);a?a.push(r):n.set(o,[r])});const i=[];return t.forEach(r=>{var d;const o=b(this,P).defaultQueryOptions(r),u=((d=n.get(o.queryHash))==null?void 0:d.shift())??new Me(b(this,P),o);i.push({defaultedQueryOptions:o,observer:u})}),i},pe=function(t,n){const i=b(this,R).indexOf(t);i!==-1&&(k(this,E,ts(b(this,E),i,n)),O(this,N,he).call(this))},he=function(){var t;if(this.hasListeners()){const n=O(this,N,ce).call(this,b(this,E),b(this,Z)),i=O(this,N,Ae).call(this),r=b(this,F),o=i?r:O(this,N,de).call(this,n,(t=b(this,q))==null?void 0:t.combine);(i||r!==o)&&le.batch(()=>{this.listeners.forEach(a=>{a(b(this,E))})})}},Se);function ie({queries:s,...t},n){const i=Ee(),r=He(),o=Ke(),a=H.useMemo(()=>s.map(x=>{const _=i.defaultQueryOptions(x);return _._optimisticResults=r?"isRestoring":"optimistic",_}),[s,i,r]);a.forEach(x=>{Je(x);const _=i.getQueryCache().get(x.queryHash);Ge(x,o,_)}),We(o);const[u]=H.useState(()=>new is(i,a,t)),[d,p,v]=u.getOptimisticResult(a,t.combine),l=!r&&t.subscribed!==!1;H.useSyncExternalStore(H.useCallback(x=>l?u.subscribe(le.batchCalls(x)):Qe,[u,l]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),H.useEffect(()=>{u.setQueries(a,t)},[a,t,u]);const c=d.some((x,_)=>ve(a[_],x))?d.flatMap((x,_)=>{const S=a[_];if(S&&ve(S,x)){const Q=new Me(i,S);return Ye(S,Q,o)}return[]}):[];if(c.length>0)throw Promise.all(c);const f=d.find((x,_)=>{const S=a[_];return S&&Ve({result:x,errorResetBoundary:o,throwOnError:S.throwOnError,query:i.getQueryCache().get(S.queryHash),suspense:S.suspense})});if(f!=null&&f.error)throw f.error;return p(v())}/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. @@ -8,4 +8,4 @@ var xe=s=>{throw TypeError(s)};var re=(s,t,n)=>t.has(s)||xe("Cannot "+n);var b=( * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const ns=Re("Undo2",[["path",{d:"M9 14 4 9l5-5",key:"102s5s"}],["path",{d:"M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11",key:"f3b9sd"}]]);function rs({currentPayload:s,proposedPayload:t}){const[n,i]=w.useState(!1);return e.jsxs("div",{className:"submission-raw-toggle",children:[e.jsx("button",{type:"button",className:"raw-json-btn",onClick:()=>i(r=>!r),children:n?"Hide raw JSON":"Show raw JSON"}),n&&e.jsxs("div",{className:"submission-json-grid",children:[e.jsx(me,{title:"Current payload",value:s??{}}),e.jsx(me,{title:"Proposed payload",value:t})]})]})}function me({title:s,value:t}){return e.jsxs("div",{className:"submission-json-block",children:[e.jsx("div",{className:"submission-diff-label",children:s}),e.jsx("pre",{children:JSON.stringify(t,null,2)})]})}function fe({currentItems:s,proposedIds:t,queryPrefix:n,fetchEntity:i,knownNames:r}){const o=w.useMemo(()=>Array.from(new Set([...s.map(c=>c.id),...t])).sort((c,f)=>c-f),[s,t]),a=ie({queries:i?o.map(c=>({queryKey:[n,String(c)],queryFn:()=>i(String(c)),staleTime:5*60*1e3})):[]}),u=w.useMemo(()=>{const c=new Map;return s.forEach(f=>c.set(f.id,f.name)),r==null||r.forEach((f,x)=>c.set(x,f)),a.forEach(f=>{const x=f.data;if(!x)return;const _=Number(x.id);Number.isFinite(_)&&c.set(_,x.name)}),c},[s,a,r]),d=new Set(s.map(c=>c.id)),p=new Set(t),v=o.filter(c=>d.has(c)&&!p.has(c)),l=o.filter(c=>!d.has(c)&&p.has(c)),m=(c,f)=>{const x=f==="current"&&v.includes(c),_=f==="proposed"&&l.includes(c);return e.jsx("span",{className:I("submission-diff-pill",x&&"removed",_&&"added"),children:u.get(c)??`#${c}`},c)};return e.jsxs("div",{className:"submission-diff-columns",children:[e.jsx(j,{title:"Currently tagged",children:s.length>0?s.map(c=>m(c.id,"current")):e.jsx(y,{children:"No current tags"})}),e.jsx(j,{title:"Will be tagged",children:t.length>0?t.map(c=>m(c,"proposed")):e.jsx(y,{children:"No proposed tags"})})]})}function as({currentItems:s,proposedIds:t}){var o;const n=Te({queryKey:["organizations","submission-diff"],queryFn:()=>U.organizations(),staleTime:3e5}),i=new Map(s.map(a=>[a.id,a.name]));(o=n.data)==null||o.results.forEach(a=>{const u=Number(a.id);Number.isFinite(u)&&i.set(u,a.name)});const r=s.map(a=>({...a,name:i.get(a.id)??a.name}));return e.jsx(fe,{currentItems:r,proposedIds:t,queryPrefix:"organization",knownNames:i})}function te({label:s,currentItems:t,proposedItems:n}){const i=new Map(t.map(a=>[a.url,a])),r=new Map(n.map(a=>[a.url,a])),o=Array.from(new Set([...i.keys(),...r.keys()])).sort();return o.length===0?e.jsxs(y,{children:["No ",s," in this submission."]}):e.jsx("div",{className:"submission-url-list",children:o.map(a=>{var m;const u=i.get(a),d=r.get(a),p=!u&&d,v=u&&!d,l=u&&d&&u.is_official!==d.is_official;return e.jsx("div",{className:I("submission-url-row",p&&"added",v&&"removed",l&&"changed"),children:e.jsxs("div",{className:"submission-url-content",children:[e.jsx("a",{href:D(a)??void 0,target:"_blank",rel:"noopener noreferrer",className:I("submission-url-link",v&&"removed"),children:a}),p&&e.jsx("span",{className:"submission-pill status approved",children:"Added"}),v&&e.jsx("span",{className:"submission-pill status rejected",children:"Removed"}),l&&e.jsxs("span",{className:"submission-pill changed",children:["Official: ",String(u.is_official)," ","->"," ",String(d.is_official)]}),((m=d??u)==null?void 0:m.is_official)&&e.jsx("span",{className:"submission-pill",children:"Official"})]})},a)})})}function os({currentPayload:s,proposedPayload:t}){const n=w.useMemo(()=>(s==null?void 0:s.evaluations)??[],[s]),i=t.operations,r=w.useMemo(()=>{const l=new Set;return n.forEach(m=>{m.task_id&&l.add(Number(m.task_id))}),i.forEach(m=>{const c=m.data;c!=null&&c.task_id&&l.add(Number(c.task_id))}),Array.from(l).filter(m=>Number.isFinite(m))},[n,i]),o=w.useMemo(()=>{const l=new Set;return n.forEach(m=>{m.dataset_id&&l.add(Number(m.dataset_id))}),i.forEach(m=>{const c=m.data;c!=null&&c.dataset_id&&l.add(Number(c.dataset_id))}),Array.from(l).filter(m=>Number.isFinite(m))},[n,i]),a=ie({queries:r.map(l=>({queryKey:["task",String(l)],queryFn:()=>U.getTask(String(l)),staleTime:5*60*1e3}))}),u=ie({queries:o.map(l=>({queryKey:["dataset",String(l)],queryFn:()=>U.getDataset(String(l)),staleTime:5*60*1e3}))}),d=w.useMemo(()=>{const l=new Map;return a.forEach(m=>{const c=m.data;if(!c)return;const f=Number(c.id);Number.isFinite(f)&&l.set(f,c.name)}),l},[a]),p=w.useMemo(()=>{const l=new Map;return u.forEach(m=>{const c=m.data;if(!c)return;const f=Number(c.id);Number.isFinite(f)&&l.set(f,c.name)}),l},[u]),v=new Map(n.filter(l=>l.id!=null).map(l=>[Number(l.id),l]));return i.length===0?e.jsx(y,{children:"No evaluation operations in this payload."}):e.jsx("div",{className:"submission-eval-list",children:i.map((l,m)=>{const c=l.evaluation_id?v.get(l.evaluation_id):void 0,x=(l.op==="update"?{...c,...l.data}:l.data??c)??{};return e.jsxs("div",{className:"submission-eval-op",children:[e.jsxs("div",{className:"submission-eval-op-header",children:[e.jsx("span",{className:I("submission-pill status",l.op==="create"&&"approved",l.op==="update"&&"changed",l.op==="delete"&&"rejected"),children:l.op??"unknown"}),l.evaluation_id&&e.jsxs("span",{className:"submission-meta",children:["Evaluation #",l.evaluation_id]})]}),l.op&&["create","update","delete"].includes(l.op)?e.jsx(ls,{evaluation:x,taskNames:d,datasetNames:p}):e.jsx(me,{title:"Unsupported operation",value:l})]},`${l.op}-${l.evaluation_id??m}`)})})}function ls({evaluation:s,taskNames:t,datasetNames:n}){const i=s.task_id?Number(s.task_id):void 0,r=s.dataset_id?Number(s.dataset_id):void 0,o=s.metrics??{};return e.jsxs("div",{className:"submission-eval-fields",children:[e.jsx(F,{label:"Task",value:i?t.get(i)??`#${i}`:null}),e.jsx(F,{label:"Dataset",value:r?n.get(r)??`#${r}`:null}),e.jsx(F,{label:"Model",value:s.model_name||null}),e.jsx(F,{label:"Harness",value:s.harness||null}),e.jsx(F,{label:"Best rank",value:s.best_rank??null}),e.jsx(F,{label:"Parameters",value:s.num_parameters??null}),e.jsx(F,{label:"HF model URL",value:s.hf_model_url||null}),e.jsx(F,{label:"Open source",value:s.is_open===void 0?null:s.is_open?"Yes":"No"}),e.jsxs("div",{className:"submission-eval-metrics",children:[e.jsx("div",{className:"submission-diff-label",children:"Metrics"}),Object.keys(o).length>0?e.jsx("div",{className:"submission-metric-list",children:Object.entries(o).map(([a,u])=>e.jsxs("span",{className:"submission-metric-pill",children:[a,": ",String(u)]},a))}):e.jsx(y,{children:"No metrics"})]})]})}function F({label:s,value:t}){return e.jsxs("div",{children:[e.jsx("div",{className:"submission-diff-label",children:s}),e.jsx("div",{className:"submission-field-value",children:t??e.jsx("span",{className:"submission-muted",children:"Not set"})})]})}function cs({currentPayload:s,proposedPayload:t}){const n=s==null?void 0:s.source_url,i=t.source_url;return e.jsxs("div",{className:"submission-diff-columns",children:[e.jsx(j,{title:"Current source URL",children:typeof n=="string"&&n?e.jsx("a",{className:"submission-url-link",href:D(n)??void 0,target:"_blank",rel:"noopener noreferrer",children:n}):e.jsx(y,{children:"No current URL"})}),e.jsx(j,{title:"Proposed source URL",children:typeof i=="string"&&i?e.jsx("a",{className:"submission-url-link",href:D(i)??void 0,target:"_blank",rel:"noopener noreferrer",children:i}):e.jsx(y,{children:"No proposed URL"})})]})}function Ne({url:s,empty:t}){return s?e.jsx("a",{className:"submission-url-link",href:D(s)??void 0,target:"_blank",rel:"noopener noreferrer",children:s}):e.jsx(y,{children:t})}function ds({proposedPayload:s}){var a;const{name:t,hf_slug:n,website_url:i,image:r}=s,o=r!=null&&r.url?Ce(r.url):(a=r==null?void 0:r.data_url)!=null&&a.startsWith("data:image/")?r.data_url:void 0;return e.jsxs("div",{className:"submission-diff-columns",children:[e.jsx(j,{title:"Suggested organization name",children:e.jsx("span",{className:"submission-diff-pill added",children:t})}),e.jsx(j,{title:"Hugging Face organization",children:e.jsx(Ne,{url:n?`https://huggingface.co/${n}`:void 0,empty:"No Hugging Face organization provided"})}),e.jsx(j,{title:"Website",children:e.jsx(Ne,{url:i,empty:"No website provided"})}),e.jsx(j,{title:"Logo",children:o?e.jsx("img",{src:o,alt:(r==null?void 0:r.file_name)??"Suggested logo",className:"max-h-32 max-w-full rounded-md border border-border object-contain"}):e.jsx(y,{children:"No logo provided"})})]})}function us({proposedPayload:s}){const{title:t,source_url:n,abstract:i="",date_published:r,authors:o}=s;return e.jsxs("div",{className:"submission-diff-columns",children:[e.jsx(j,{title:"Title",children:t?e.jsx("span",{className:"submission-field-value",children:t}):e.jsx(y,{children:"No title provided"})}),e.jsx(j,{title:"Publication date",children:r||e.jsx(y,{children:"No publication date provided"})}),e.jsx(j,{title:"Authors",children:o.length>0?o.map((a,u)=>e.jsx("span",{className:"submission-diff-pill added",children:a},`${a}-${u}`)):e.jsx(y,{children:"No authors provided"})}),e.jsx(j,{title:"Source URL",children:n?e.jsx("a",{className:"submission-url-link",href:D(n)??void 0,target:"_blank",rel:"noopener noreferrer",children:n}):e.jsx(y,{children:"No source URL provided"})}),e.jsx(j,{title:"Abstract",children:i?e.jsx("span",{className:"submission-field-value",children:i}):e.jsx(y,{children:"No abstract provided"})})]})}function K({kind:s,proposedPayload:t}){const n=typeof t.benchmark=="string"?t.benchmark:typeof t.name=="string"?t.name:"",i=typeof t.description=="string"?t.description:"",r=typeof t.year=="number"?t.year:null,o=typeof t.start_date=="string"?t.start_date:"",a=typeof t.end_date=="string"?t.end_date:"",u=typeof t.venue=="string"?t.venue:"",d=typeof t.url=="string"?t.url:"",p=t.image??{},v=typeof p.data_url=="string"&&p.data_url.startsWith("data:image/")?p.data_url:"",l=typeof p.url=="string"?Ce(p.url)??"":v,m=typeof p.file_name=="string"?p.file_name:"Suggested image",c=typeof t.image_credit=="string"?t.image_credit:"",f=typeof t.source_url=="string"?t.source_url:"";return e.jsxs("div",{className:"submission-diff-columns",children:[e.jsx(j,{title:`Suggested ${s} name`,children:n?e.jsx("span",{className:"submission-diff-pill added",children:n}):e.jsx(y,{children:"No name provided"})}),e.jsx(j,{title:"Description",children:i?e.jsx("span",{className:"submission-field-value",children:i}):e.jsx(y,{children:"No description provided"})}),(s==="task"||s==="method")&&e.jsxs(e.Fragment,{children:[e.jsx(j,{title:"Image",children:l?e.jsx("img",{src:l,alt:m,className:"max-h-64 max-w-full rounded-md border border-border object-contain"}):e.jsx(y,{children:"No image provided"})}),e.jsx(j,{title:"Image source",children:c||e.jsx(y,{children:"No image source provided"})})]}),s==="task"&&e.jsx(j,{title:"Placement and keywords",children:e.jsx("span",{className:"submission-field-value",children:JSON.stringify({parent_id:t.parent_id??null,area_id:t.area_id??null,keywords:t.keywords??null})})}),s==="benchmark"&&e.jsx(j,{title:"Task",children:e.jsx("span",{className:"submission-field-value",children:typeof t.task=="string"?t.task:JSON.stringify(t.task_ids??[])})}),s==="metric"&&e.jsx(j,{title:"Metric and leaderboard definition",children:e.jsx("span",{className:"submission-field-value",children:JSON.stringify({direction:t.direction,scale:t.scale,task_id:t.task_id,dataset_id:t.dataset_id})})}),s==="method"&&e.jsx(j,{title:"Source",children:f?f.startsWith("http://")||f.startsWith("https://")?e.jsx("a",{className:"submission-url-link",href:D(f)??void 0,target:"_blank",rel:"noopener noreferrer",children:f}):e.jsx("span",{className:"submission-field-value",children:f}):e.jsx(y,{children:"No source provided"})}),s==="conference"&&e.jsxs(e.Fragment,{children:[e.jsx(j,{title:"Edition and dates",children:r?`${r}${o?` · ${o}${a?` – ${a}`:""}`:""}`:e.jsx(y,{children:"No edition provided"})}),e.jsx(j,{title:"Venue",children:u||e.jsx(y,{children:"No venue provided"})}),e.jsx(j,{title:"URL",children:d?e.jsx("a",{className:"submission-url-link",href:D(d)??void 0,target:"_blank",rel:"noopener noreferrer",children:d}):e.jsx(y,{children:"No URL provided"})})]})]})}function j({title:s,children:t}){return e.jsxs("div",{className:"submission-diff-column",children:[e.jsx("div",{className:"submission-diff-label",children:s}),e.jsx("div",{className:"submission-diff-pills",children:t})]})}function y({children:s}){return e.jsx("span",{className:"submission-muted",children:s})}function ps({currentPayload:s,proposedPayload:t}){const n=s,i=[{key:"hf_models",label:"Models"},{key:"hf_datasets",label:"Datasets"},{key:"hf_spaces",label:"Spaces"}];return e.jsx("div",{className:"submission-hf-artifacts-diff",children:i.map(({key:r,label:o})=>{const a=(n==null?void 0:n[r])??[],u=t[r];return e.jsxs("div",{className:"submission-hf-artifacts-section",children:[e.jsx("div",{className:"submission-diff-label",children:o}),e.jsx(te,{label:o.toLowerCase(),currentItems:a.map(d=>({url:d,is_official:!1})),proposedItems:u.map(d=>({url:d,is_official:!1}))})]},r)})})}function hs(s){throw new Error(`Unhandled pending edit: ${JSON.stringify(s)}`)}function ms({edit:s}){var n,i,r,o,a,u;let t;switch(s.edit_type){case"tasks":t=e.jsx(fe,{currentItems:((n=s.current_payload)==null?void 0:n.tasks)??[],proposedIds:s.proposed_payload.task_ids,queryPrefix:"task",fetchEntity:U.getTask.bind(U)});break;case"methods":t=e.jsx(fe,{currentItems:((i=s.current_payload)==null?void 0:i.methods)??[],proposedIds:s.proposed_payload.method_ids,queryPrefix:"method",fetchEntity:U.getMethod.bind(U)});break;case"organizations":t=e.jsx(as,{currentItems:((r=s.current_payload)==null?void 0:r.organizations)??[],proposedIds:s.proposed_payload.organization_ids});break;case"repositories":t=e.jsx(te,{label:"repositories",currentItems:((o=s.current_payload)==null?void 0:o.repositories)??[],proposedItems:s.proposed_payload.repositories});break;case"project_pages":t=e.jsx(te,{label:"project pages",currentItems:((a=s.current_payload)==null?void 0:a.project_pages)??[],proposedItems:s.proposed_payload.project_pages});break;case"evaluations":t=e.jsx(os,{currentPayload:s.current_payload,proposedPayload:s.proposed_payload});break;case"source_url":t=e.jsx(cs,{currentPayload:s.current_payload,proposedPayload:s.proposed_payload});break;case"hf_artifacts":t=e.jsx(ps,{currentPayload:s.current_payload,proposedPayload:s.proposed_payload});break;case"x_threads":t=e.jsx(te,{label:"X threads",currentItems:(((u=s.current_payload)==null?void 0:u.x_threads)??[]).map(({url:d})=>({url:d,is_official:!1})),proposedItems:s.proposed_payload.x_threads.map(d=>({url:d,is_official:!1}))});break;case"new_task":t=e.jsx(K,{kind:"task",proposedPayload:s.proposed_payload});break;case"new_method":t=e.jsx(K,{kind:"method",proposedPayload:s.proposed_payload});break;case"new_benchmark":t=e.jsx(K,{kind:"benchmark",proposedPayload:s.proposed_payload});break;case"new_metric":t=e.jsx(K,{kind:"metric",proposedPayload:s.proposed_payload});break;case"new_conference":t=e.jsx(K,{kind:"conference",proposedPayload:s.proposed_payload});break;case"new_organization":t=e.jsx(ds,{proposedPayload:s.proposed_payload});break;case"new_external_paper":t=e.jsx(us,{proposedPayload:s.proposed_payload});break;default:hs(s)}return e.jsxs("div",{className:"submission-diff-body",children:[t,e.jsx(rs,{currentPayload:s.current_payload,proposedPayload:s.proposed_payload})]})}const ke=25,fs=["pending","approved","rejected","all"],gs=["all","tasks","methods","evaluations","repositories","project_pages","source_url","x_threads","hf_artifacts","organizations","new_task","new_method","new_benchmark","new_metric","new_conference","new_organization","new_external_paper"],oe=["pending","approved","rejected"],bs=new Set(["new_task","new_method","new_benchmark","new_metric","new_conference"]);function xs(s){return s.slice(0,2).toUpperCase()}function J(s){return s.replace(/_/g," ")}function js(s){return s==="new_external_paper"?"external paper":J(s)}const vs={new_task:{title:"New task",subtitle:"Task suggestion"},new_method:{title:"New method",subtitle:"Method suggestion"},new_benchmark:{title:"New benchmark",subtitle:"Benchmark suggestion"},new_metric:{title:"New metric",subtitle:"Metric suggestion"},new_conference:{title:"New conference",subtitle:"Conference suggestion"},new_organization:{title:"New organization",subtitle:"Organization suggestion"},new_external_paper:{title:"External paper",subtitle:"External paper submission"}};function we(s){if(!s)return"unknown time";const t=new Date(s);if(Number.isNaN(t.getTime()))return s;const n=Date.now()-t.getTime(),i=Math.floor(n/6e4),r=Math.floor(n/36e5),o=Math.floor(n/864e5);return i<1?"just now":i<60?`${i}m ago`:r<24?`${r}h ago`:o<14?`${o}d ago`:t.toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"})}function _s(s){return s==="approved"?"approved":s==="rejected"?"rejected":"pending"}function ys(s,t){return(s==null?void 0:s.arxiv_id)||(s==null?void 0:s.id)||String(t)}function Ns(s){return[...s].sort((t,n)=>new Date(n.created_at).getTime()-new Date(t.created_at).getTime())}async function ks(s,t,n,i){const r=await Promise.all(s.map(p=>W.list({status:p,edit_type:t==="all"?void 0:t,reviewed_by_kind:n?"auto":void 0,limit:ke,offset:i[p]??0}))),o=Ns(r.flatMap(p=>p.results)).slice(0,ke),a={};s.forEach((p,v)=>{const l=o.filter(m=>r[v].results.includes(m)).length;a[p]=(i[p]??0)+l});const u=r.reduce((p,v)=>p+v.count,0),d=s.reduce((p,v)=>p+(a[v]??0),0);return{count:u,results:o,nextOffsets:o.length>0&&d{n.invalidateQueries({queryKey:["pendingPaperEdits"]}),n.invalidateQueries({queryKey:["pendingPaperEdit",g.id]}),g.paper_id!=null&&g.edit_type!=="evaluations"&&je(n,[String(g.paper_id),t==null?void 0:t.arxiv_id])},[t==null?void 0:t.arxiv_id,n]),f=se({mutationFn:()=>W.approve(s.id),onSuccess:g=>{var ee;c(g),g.edit_type==="evaluations"&&g.paper_id!=null?Le(n,ze(String(g.paper_id),((ee=g.current_payload)==null?void 0:ee.evaluations)??[],g.proposed_payload.operations.map(L=>L.op==="create"?{kind:"create",data:L.data}:L.op==="update"?{kind:"update",evaluationId:L.evaluation_id,data:L.data}:{kind:"delete",evaluationId:L.evaluation_id}),(t==null?void 0:t.arxiv_id)??void 0)):g.paper_id!=null&&!a&&ae(n),i({title:"Submission approved",description:a?`Marked ${J(s.edit_type)} suggestion as approved. No catalog changes were applied.`:`Applied ${J(s.edit_type)} changes for ${p}.`})},onError:g=>{i({title:"Could not approve submission",description:z(g,"Approval failed. Please try again."),variant:"destructive"})}}),x=se({mutationFn:()=>W.reject(s.id),onSuccess:g=>{c(g),i({title:"Submission rejected",description:`Rejected ${J(s.edit_type)} changes for ${p}.`})},onError:g=>{i({title:"Could not reject submission",description:z(g,"Rejection failed. Please try again."),variant:"destructive"})}}),_=se({mutationFn:()=>U.rollbackEvent(s.catalog_event_id),onSuccess:()=>{n.invalidateQueries({queryKey:["pendingPaperEdits"]}),s.paper_id!=null&&(je(n,[String(s.paper_id),t==null?void 0:t.arxiv_id]),ae(n)),i({title:"Edit reverted",description:`Restored ${p} to its previous state.`})},onError:g=>{i({title:"Could not revert edit",description:z(g,"The paper changed after this edit, or it was already reverted."),variant:"destructive"})}}),S=se({mutationFn:g=>W.revertAutoApproved(s.hf_subject,{suspend:g}),onSuccess:g=>{n.invalidateQueries({queryKey:["pendingPaperEdits"]}),ae(n),i({title:`Reverted ${g.reverted} edits by @${s.hf_username}`,description:g.skipped.length?`${g.skipped.length} were skipped because the paper changed since.`:void 0})},onError:g=>{i({title:"Could not revert edits",description:z(g,"Bulk revert failed. Please try again."),variant:"destructive"})}}),Q=g=>{const ee=`Revert every edit @${s.hf_username} had auto-applied in the last 7 days${g?" and suspend the account":""}?`;window.confirm(ee)&&S.mutate(g)},h=s.reviewed_by_kind==="auto",T=h&&!!s.catalog_event_id,M=f.isPending,$=x.isPending,ge=M||$,ne=_.isPending||S.isPending;return e.jsxs("article",{id:`submission-${s.id}`,className:"submission-card",children:[e.jsxs("header",{className:"submission-card-header",children:[e.jsxs("div",{className:"submission-card-top",children:[e.jsxs("div",{children:[d?e.jsx("a",{href:`/paper/${encodeURIComponent(d)}`,target:"_blank",rel:"noopener noreferrer",className:"submission-title",children:p}):e.jsx("div",{className:"submission-title",children:p}),e.jsxs("div",{className:"submission-meta",children:[e.jsxs("span",{children:["#",s.id]}),e.jsx("span",{children:o?u.subtitle:`Paper #${s.paper_id}`}),e.jsx("span",{children:we(s.created_at)})]})]}),e.jsxs("div",{className:"submission-badges",children:[e.jsx("span",{className:"submission-pill",children:J(s.edit_type)}),h&&e.jsx("span",{className:"submission-pill",children:"Auto-applied"}),s.is_author&&e.jsx("span",{className:"submission-pill author",children:"Linked author"}),e.jsx("span",{className:I("submission-pill status",_s(s.status)),children:s.status})]})]}),e.jsxs("a",{href:`https://huggingface.co/${encodeURIComponent(s.hf_username)}`,target:"_blank",rel:"noopener noreferrer",className:"submission-user",children:[e.jsxs($e,{className:"h-6 w-6",children:[e.jsx(qe,{src:v,alt:s.hf_username}),e.jsx(De,{className:"text-[10px]",children:xs(s.hf_username)})]}),e.jsxs("span",{children:["@",s.hf_username]})]})]}),e.jsx("div",{className:"submission-diff",children:e.jsx(ms,{edit:s})}),s.conflict_payload&&e.jsxs("div",{className:"submission-empty submission-empty-warn",children:["Canonical state changed after this submission. Review the conflict before deciding.",e.jsx("pre",{children:JSON.stringify(s.conflict_payload,null,2)})]}),e.jsx("footer",{className:"submission-actions",children:l?e.jsx(e.Fragment,{children:e.jsxs("div",{className:"submission-action-buttons",children:[e.jsxs("button",{type:"button",onClick:()=>x.mutate(),disabled:ge,className:"submission-action-btn reject",children:[$?e.jsx(G,{className:"spin",size:14}):e.jsx(es,{size:14}),"Reject"]}),e.jsxs("button",{type:"button",onClick:()=>f.mutate(),disabled:ge,className:"submission-action-btn approve",children:[M?e.jsx(G,{className:"spin",size:14}):e.jsx(ss,{size:14}),"Approve"]})]})}):e.jsxs("div",{className:"submission-reviewed",children:[e.jsxs("span",{children:["Reviewed by ",e.jsx("strong",{children:s.reviewed_by||"unknown"}),s.reviewed_at?` ${we(s.reviewed_at)}`:""]}),s.admin_note&&e.jsxs("span",{children:["Admin note: ",e.jsx("strong",{children:s.admin_note})]}),m&&e.jsxs("span",{children:["Submitter-visible reason: ",e.jsx("strong",{children:s.user_review_reason})]}),T&&e.jsxs("div",{className:"submission-action-buttons",children:[e.jsxs("button",{type:"button",onClick:()=>_.mutate(),disabled:ne,className:"submission-action-btn reject",children:[_.isPending?e.jsx(G,{className:"spin",size:14}):e.jsx(ns,{size:14}),"Revert this edit"]}),s.hf_subject&&e.jsxs(e.Fragment,{children:[e.jsxs("button",{type:"button",onClick:()=>Q(!1),disabled:ne,className:"submission-action-btn reject",children:["Revert all by @",s.hf_username]}),e.jsx("button",{type:"button",onClick:()=>Q(!0),disabled:ne,className:"submission-action-btn reject",children:"Revert all and suspend"})]})]}),s.applied_payload&&e.jsxs("details",{children:[e.jsx("summary",{children:a?"Reviewed payload":"Applied payload"}),e.jsx("pre",{children:JSON.stringify(s.applied_payload,null,2)})]}),s.result_entity_type&&e.jsxs("span",{children:["Created/applied: ",e.jsxs("strong",{children:[s.result_entity_type," #",s.result_entity_id]})]})]})})]})}function Ds(){var S,Q;const{toast:s}=Oe(),[t,n]=w.useState("pending"),[i,r]=w.useState("all"),[o,a]=w.useState(!1),u=Te({queryKey:["pendingPaperEdits","counts",i,o],queryFn:async()=>{const h=i==="all"?void 0:i,T=await Promise.all(oe.map(M=>W.list({status:M,edit_type:h,reviewed_by_kind:o?"auto":void 0,limit:1,offset:0})));return Object.fromEntries(T.map((M,$)=>[oe[$],M.count]))},staleTime:30*1e3}),d=Xe({queryKey:["pendingPaperEdits",{status:t,editType:i,autoOnly:o}],queryFn:({pageParam:h})=>ks(t==="all"?oe:[t],i,o,h),initialPageParam:{},getNextPageParam:h=>h.nextOffsets??void 0,retry:!1}),p=w.useMemo(()=>{var h;return((h=d.data)==null?void 0:h.pages.flatMap(T=>T.results))??[]},[d.data]),v=w.useMemo(()=>Array.from(new Set(p.map(h=>h.paper_id).filter(h=>h!=null))).sort((h,T)=>h-T),[p]),l=ie({queries:v.map(h=>({queryKey:Be.summary(String(h)),queryFn:()=>Pe.get(String(h),!1),staleTime:5*60*1e3}))}),m=w.useMemo(()=>{const h=new Map;return l.forEach(T=>{const M=T.data;if(!M)return;const $=Number(M.id);Number.isFinite($)&&h.set($,M)}),h},[l]);w.useEffect(()=>{d.error&&s({title:"Could not load submissions",description:z(d.error,"Failed to load pending paper edits."),variant:"destructive"})},[d.error,s]);const c=u.data,f=c?c.pending+c.approved+c.rejected:void 0,x={pending:c==null?void 0:c.pending,approved:c==null?void 0:c.approved,rejected:c==null?void 0:c.rejected,all:f},_=((Q=(S=d.data)==null?void 0:S.pages[0])==null?void 0:Q.count)??0;return e.jsxs("div",{className:"page submissions-page",children:[e.jsxs("div",{className:"feed-header",children:[e.jsxs("div",{children:[e.jsxs("h1",{className:"feed-title",children:["Pending ",e.jsx("em",{children:"Edits"})]}),e.jsx("div",{className:"feed-subtitle",children:"Review submitted changes to paper metadata and benchmark results"})]}),e.jsxs("button",{type:"button",className:"feedback-link",onClick:()=>{u.refetch(),d.refetch()},disabled:d.isFetching||u.isFetching,children:[e.jsx(Ze,{className:I((d.isFetching||u.isFetching)&&"spin"),size:14}),"Refresh"]})]}),e.jsxs("div",{className:"submissions-filter-panel",children:[e.jsxs("div",{className:"submission-filter-block",children:[e.jsx("div",{className:"sidebar-label",children:"Status"}),e.jsxs("div",{className:"period-switch",children:[fs.map(h=>e.jsxs("button",{type:"button",className:I("period-btn",t===h&&"active"),onClick:()=>n(h),children:[h,x[h]!=null&&e.jsx("span",{className:"submission-count",children:x[h]})]},h)),e.jsx("button",{type:"button",className:I("period-btn",o&&"active"),onClick:()=>{a(h=>!h),o||n("approved")},children:"auto-applied only"})]})]}),e.jsxs("div",{className:"submission-filter-block",children:[e.jsx("div",{className:"sidebar-label",children:"Edit Type"}),e.jsx("div",{className:"sort-options submissions-type-options",children:gs.map(h=>e.jsx("button",{type:"button",className:I("sort-btn",i===h&&"active"),onClick:()=>r(h),children:js(h)},h))})]})]}),e.jsxs("div",{children:[e.jsx("div",{className:"sort-bar submissions-sort-bar",children:e.jsx("div",{children:e.jsx("div",{className:"sort-options",children:e.jsx("span",{className:"results-count",children:d.isFetching?"refreshing":`${_} submissions`})})})}),d.isLoading?e.jsxs("div",{className:"submission-loading",children:[e.jsx(G,{className:"spin",size:18}),e.jsx("span",{children:"Loading submissions..."})]}):d.isError?e.jsxs("div",{className:"submission-empty submission-empty-warn",role:"alert",children:[e.jsx(ye,{size:28}),e.jsx("h2",{children:"Could not display submissions."}),e.jsx("p",{children:z(d.error,"The submissions response was invalid.")})]}):p.length===0?e.jsxs("div",{className:"submission-empty",children:[e.jsx(ye,{size:28}),e.jsx("h2",{children:"No pending submissions."}),e.jsxs("p",{children:["The SQL and curl fallback is still documented in"," ",e.jsx("a",{href:"https://github.com/huggingface/paperswithcode/blob/main/docs/operations.md",target:"_blank",rel:"noopener noreferrer",children:"operations.md"}),"."]})]}):e.jsx("div",{className:"submission-list",children:p.map(h=>e.jsx(ws,{submission:h,paper:h.paper_id==null?void 0:m.get(h.paper_id)},h.id))}),p.length>0&&e.jsxs("div",{className:"submission-pagination",children:[e.jsxs("p",{children:["Showing ",p.length," of ",_," submissions"]}),d.hasNextPage&&e.jsxs("button",{type:"button",className:"feedback-link",onClick:()=>d.fetchNextPage(),disabled:d.isFetching,children:[d.isFetchingNextPage&&e.jsx(G,{className:"spin",size:14}),"Load more"]})]})]})]})}export{Ds as default}; + */const ns=Re("Undo2",[["path",{d:"M9 14 4 9l5-5",key:"102s5s"}],["path",{d:"M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11",key:"f3b9sd"}]]);function rs({currentPayload:s,proposedPayload:t}){const[n,i]=w.useState(!1);return e.jsxs("div",{className:"submission-raw-toggle",children:[e.jsx("button",{type:"button",className:"raw-json-btn",onClick:()=>i(r=>!r),children:n?"Hide raw JSON":"Show raw JSON"}),n&&e.jsxs("div",{className:"submission-json-grid",children:[e.jsx(me,{title:"Current payload",value:s??{}}),e.jsx(me,{title:"Proposed payload",value:t})]})]})}function me({title:s,value:t}){return e.jsxs("div",{className:"submission-json-block",children:[e.jsx("div",{className:"submission-diff-label",children:s}),e.jsx("pre",{children:JSON.stringify(t,null,2)})]})}function fe({currentItems:s,proposedIds:t,queryPrefix:n,fetchEntity:i,knownNames:r}){const o=w.useMemo(()=>Array.from(new Set([...s.map(c=>c.id),...t])).sort((c,f)=>c-f),[s,t]),a=ie({queries:i?o.map(c=>({queryKey:[n,String(c)],queryFn:()=>i(String(c)),staleTime:5*60*1e3})):[]}),u=w.useMemo(()=>{const c=new Map;return s.forEach(f=>c.set(f.id,f.name)),r==null||r.forEach((f,x)=>c.set(x,f)),a.forEach(f=>{const x=f.data;if(!x)return;const _=Number(x.id);Number.isFinite(_)&&c.set(_,x.name)}),c},[s,a,r]),d=new Set(s.map(c=>c.id)),p=new Set(t),v=o.filter(c=>d.has(c)&&!p.has(c)),l=o.filter(c=>!d.has(c)&&p.has(c)),m=(c,f)=>{const x=f==="current"&&v.includes(c),_=f==="proposed"&&l.includes(c);return e.jsx("span",{className:A("submission-diff-pill",x&&"removed",_&&"added"),children:u.get(c)??`#${c}`},c)};return e.jsxs("div",{className:"submission-diff-columns",children:[e.jsx(j,{title:"Currently tagged",children:s.length>0?s.map(c=>m(c.id,"current")):e.jsx(y,{children:"No current tags"})}),e.jsx(j,{title:"Will be tagged",children:t.length>0?t.map(c=>m(c,"proposed")):e.jsx(y,{children:"No proposed tags"})})]})}function as({currentItems:s,proposedIds:t}){var o;const n=Te({queryKey:["organizations","submission-diff"],queryFn:()=>U.organizations(),staleTime:3e5}),i=new Map(s.map(a=>[a.id,a.name]));(o=n.data)==null||o.results.forEach(a=>{const u=Number(a.id);Number.isFinite(u)&&i.set(u,a.name)});const r=s.map(a=>({...a,name:i.get(a.id)??a.name}));return e.jsx(fe,{currentItems:r,proposedIds:t,queryPrefix:"organization",knownNames:i})}function te({label:s,currentItems:t,proposedItems:n}){const i=new Map(t.map(a=>[a.url,a])),r=new Map(n.map(a=>[a.url,a])),o=Array.from(new Set([...i.keys(),...r.keys()])).sort();return o.length===0?e.jsxs(y,{children:["No ",s," in this submission."]}):e.jsx("div",{className:"submission-url-list",children:o.map(a=>{var m;const u=i.get(a),d=r.get(a),p=!u&&d,v=u&&!d,l=u&&d&&u.is_official!==d.is_official;return e.jsx("div",{className:A("submission-url-row",p&&"added",v&&"removed",l&&"changed"),children:e.jsxs("div",{className:"submission-url-content",children:[e.jsx("a",{href:D(a)??void 0,target:"_blank",rel:"noopener noreferrer",className:A("submission-url-link",v&&"removed"),children:a}),p&&e.jsx("span",{className:"submission-pill status approved",children:"Added"}),v&&e.jsx("span",{className:"submission-pill status rejected",children:"Removed"}),l&&e.jsxs("span",{className:"submission-pill changed",children:["Official: ",String(u.is_official)," ","->"," ",String(d.is_official)]}),((m=d??u)==null?void 0:m.is_official)&&e.jsx("span",{className:"submission-pill",children:"Official"})]})},a)})})}function os({currentPayload:s,proposedPayload:t}){const n=w.useMemo(()=>(s==null?void 0:s.evaluations)??[],[s]),i=t.operations,r=w.useMemo(()=>{const l=new Set;return n.forEach(m=>{m.task_id&&l.add(Number(m.task_id))}),i.forEach(m=>{const c=m.data;c!=null&&c.task_id&&l.add(Number(c.task_id))}),Array.from(l).filter(m=>Number.isFinite(m))},[n,i]),o=w.useMemo(()=>{const l=new Set;return n.forEach(m=>{m.dataset_id&&l.add(Number(m.dataset_id))}),i.forEach(m=>{const c=m.data;c!=null&&c.dataset_id&&l.add(Number(c.dataset_id))}),Array.from(l).filter(m=>Number.isFinite(m))},[n,i]),a=ie({queries:r.map(l=>({queryKey:["task",String(l)],queryFn:()=>U.getTask(String(l)),staleTime:5*60*1e3}))}),u=ie({queries:o.map(l=>({queryKey:["dataset",String(l)],queryFn:()=>U.getDataset(String(l)),staleTime:5*60*1e3}))}),d=w.useMemo(()=>{const l=new Map;return a.forEach(m=>{const c=m.data;if(!c)return;const f=Number(c.id);Number.isFinite(f)&&l.set(f,c.name)}),l},[a]),p=w.useMemo(()=>{const l=new Map;return u.forEach(m=>{const c=m.data;if(!c)return;const f=Number(c.id);Number.isFinite(f)&&l.set(f,c.name)}),l},[u]),v=new Map(n.filter(l=>l.id!=null).map(l=>[Number(l.id),l]));return i.length===0?e.jsx(y,{children:"No evaluation operations in this payload."}):e.jsx("div",{className:"submission-eval-list",children:i.map((l,m)=>{const c=l.evaluation_id?v.get(l.evaluation_id):void 0,x=(l.op==="update"?{...c,...l.data}:l.data??c)??{};return e.jsxs("div",{className:"submission-eval-op",children:[e.jsxs("div",{className:"submission-eval-op-header",children:[e.jsx("span",{className:A("submission-pill status",l.op==="create"&&"approved",l.op==="update"&&"changed",l.op==="delete"&&"rejected"),children:l.op??"unknown"}),l.evaluation_id&&e.jsxs("span",{className:"submission-meta",children:["Evaluation #",l.evaluation_id]})]}),l.op&&["create","update","delete"].includes(l.op)?e.jsx(ls,{evaluation:x,taskNames:d,datasetNames:p}):e.jsx(me,{title:"Unsupported operation",value:l})]},`${l.op}-${l.evaluation_id??m}`)})})}function ls({evaluation:s,taskNames:t,datasetNames:n}){const i=s.task_id?Number(s.task_id):void 0,r=s.dataset_id?Number(s.dataset_id):void 0,o=s.metrics??{};return e.jsxs("div",{className:"submission-eval-fields",children:[e.jsx(I,{label:"Task",value:i?t.get(i)??`#${i}`:null}),e.jsx(I,{label:"Dataset",value:r?n.get(r)??`#${r}`:null}),e.jsx(I,{label:"Model",value:s.model_name||null}),e.jsx(I,{label:"Harness",value:s.harness||null}),e.jsx(I,{label:"Best rank",value:s.best_rank??null}),e.jsx(I,{label:"Parameters",value:s.num_parameters??null}),e.jsx(I,{label:"HF model URL",value:s.hf_model_url||null}),e.jsx(I,{label:"Open source",value:s.is_open===void 0?null:s.is_open?"Yes":"No"}),e.jsxs("div",{className:"submission-eval-metrics",children:[e.jsx("div",{className:"submission-diff-label",children:"Metrics"}),Object.keys(o).length>0?e.jsx("div",{className:"submission-metric-list",children:Object.entries(o).map(([a,u])=>e.jsxs("span",{className:"submission-metric-pill",children:[a,": ",String(u)]},a))}):e.jsx(y,{children:"No metrics"})]})]})}function I({label:s,value:t}){return e.jsxs("div",{children:[e.jsx("div",{className:"submission-diff-label",children:s}),e.jsx("div",{className:"submission-field-value",children:t??e.jsx("span",{className:"submission-muted",children:"Not set"})})]})}function cs({currentPayload:s,proposedPayload:t}){const n=s==null?void 0:s.source_url,i=t.source_url;return e.jsxs("div",{className:"submission-diff-columns",children:[e.jsx(j,{title:"Current source URL",children:typeof n=="string"&&n?e.jsx("a",{className:"submission-url-link",href:D(n)??void 0,target:"_blank",rel:"noopener noreferrer",children:n}):e.jsx(y,{children:"No current URL"})}),e.jsx(j,{title:"Proposed source URL",children:typeof i=="string"&&i?e.jsx("a",{className:"submission-url-link",href:D(i)??void 0,target:"_blank",rel:"noopener noreferrer",children:i}):e.jsx(y,{children:"No proposed URL"})})]})}function Ne({url:s,empty:t}){return s?e.jsx("a",{className:"submission-url-link",href:D(s)??void 0,target:"_blank",rel:"noopener noreferrer",children:s}):e.jsx(y,{children:t})}function ds({proposedPayload:s}){var a;const{name:t,hf_slug:n,website_url:i,image:r}=s,o=r!=null&&r.url?Ce(r.url):(a=r==null?void 0:r.data_url)!=null&&a.startsWith("data:image/")?r.data_url:void 0;return e.jsxs("div",{className:"submission-diff-columns",children:[e.jsx(j,{title:"Suggested organization name",children:e.jsx("span",{className:"submission-diff-pill added",children:t})}),e.jsx(j,{title:"Hugging Face organization",children:e.jsx(Ne,{url:n?`https://huggingface.co/${n}`:void 0,empty:"No Hugging Face organization provided"})}),e.jsx(j,{title:"Website",children:e.jsx(Ne,{url:i,empty:"No website provided"})}),e.jsx(j,{title:"Logo",children:o?e.jsx("img",{src:o,alt:(r==null?void 0:r.file_name)??"Suggested logo",className:"max-h-32 max-w-full rounded-md border border-border object-contain"}):e.jsx(y,{children:"No logo provided"})})]})}function us({proposedPayload:s}){const{title:t,source_url:n,abstract:i="",date_published:r,authors:o}=s;return e.jsxs("div",{className:"submission-diff-columns",children:[e.jsx(j,{title:"Title",children:t?e.jsx("span",{className:"submission-field-value",children:t}):e.jsx(y,{children:"No title provided"})}),e.jsx(j,{title:"Publication date",children:r||e.jsx(y,{children:"No publication date provided"})}),e.jsx(j,{title:"Authors",children:o.length>0?o.map((a,u)=>e.jsx("span",{className:"submission-diff-pill added",children:a},`${a}-${u}`)):e.jsx(y,{children:"No authors provided"})}),e.jsx(j,{title:"Source URL",children:n?e.jsx("a",{className:"submission-url-link",href:D(n)??void 0,target:"_blank",rel:"noopener noreferrer",children:n}):e.jsx(y,{children:"No source URL provided"})}),e.jsx(j,{title:"Abstract",children:i?e.jsx("span",{className:"submission-field-value",children:i}):e.jsx(y,{children:"No abstract provided"})})]})}function K({kind:s,proposedPayload:t}){const n=typeof t.benchmark=="string"?t.benchmark:typeof t.name=="string"?t.name:"",i=typeof t.description=="string"?t.description:"",r=typeof t.year=="number"?t.year:null,o=typeof t.start_date=="string"?t.start_date:"",a=typeof t.end_date=="string"?t.end_date:"",u=typeof t.venue=="string"?t.venue:"",d=typeof t.url=="string"?t.url:"",p=t.image??{},v=typeof p.data_url=="string"&&p.data_url.startsWith("data:image/")?p.data_url:"",l=typeof p.url=="string"?Ce(p.url)??"":v,m=typeof p.file_name=="string"?p.file_name:"Suggested image",c=typeof t.image_credit=="string"?t.image_credit:"",f=typeof t.source_url=="string"?t.source_url:"";return e.jsxs("div",{className:"submission-diff-columns",children:[e.jsx(j,{title:`Suggested ${s} name`,children:n?e.jsx("span",{className:"submission-diff-pill added",children:n}):e.jsx(y,{children:"No name provided"})}),e.jsx(j,{title:"Description",children:i?e.jsx("span",{className:"submission-field-value",children:i}):e.jsx(y,{children:"No description provided"})}),(s==="task"||s==="method")&&e.jsxs(e.Fragment,{children:[e.jsx(j,{title:"Image",children:l?e.jsx("img",{src:l,alt:m,className:"max-h-64 max-w-full rounded-md border border-border object-contain"}):e.jsx(y,{children:"No image provided"})}),e.jsx(j,{title:"Image source",children:c||e.jsx(y,{children:"No image source provided"})})]}),s==="task"&&e.jsx(j,{title:"Placement and keywords",children:e.jsx("span",{className:"submission-field-value",children:JSON.stringify({parent_id:t.parent_id??null,area_id:t.area_id??null,keywords:t.keywords??null})})}),s==="benchmark"&&e.jsx(j,{title:"Task",children:e.jsx("span",{className:"submission-field-value",children:typeof t.task=="string"?t.task:JSON.stringify(t.task_ids??[])})}),s==="metric"&&e.jsx(j,{title:"Metric and leaderboard definition",children:e.jsx("span",{className:"submission-field-value",children:JSON.stringify({direction:t.direction,scale:t.scale,task_id:t.task_id,dataset_id:t.dataset_id})})}),s==="method"&&e.jsx(j,{title:"Source",children:f?f.startsWith("http://")||f.startsWith("https://")?e.jsx("a",{className:"submission-url-link",href:D(f)??void 0,target:"_blank",rel:"noopener noreferrer",children:f}):e.jsx("span",{className:"submission-field-value",children:f}):e.jsx(y,{children:"No source provided"})}),s==="conference"&&e.jsxs(e.Fragment,{children:[e.jsx(j,{title:"Edition and dates",children:r?`${r}${o?` · ${o}${a?` – ${a}`:""}`:""}`:e.jsx(y,{children:"No edition provided"})}),e.jsx(j,{title:"Venue",children:u||e.jsx(y,{children:"No venue provided"})}),e.jsx(j,{title:"URL",children:d?e.jsx("a",{className:"submission-url-link",href:D(d)??void 0,target:"_blank",rel:"noopener noreferrer",children:d}):e.jsx(y,{children:"No URL provided"})})]})]})}function j({title:s,children:t}){return e.jsxs("div",{className:"submission-diff-column",children:[e.jsx("div",{className:"submission-diff-label",children:s}),e.jsx("div",{className:"submission-diff-pills",children:t})]})}function y({children:s}){return e.jsx("span",{className:"submission-muted",children:s})}function ps({currentPayload:s,proposedPayload:t}){const n=s,i=[{key:"hf_models",label:"Models"},{key:"hf_datasets",label:"Datasets"},{key:"hf_spaces",label:"Spaces"}];return e.jsx("div",{className:"submission-hf-artifacts-diff",children:i.map(({key:r,label:o})=>{const a=(n==null?void 0:n[r])??[],u=t[r];return e.jsxs("div",{className:"submission-hf-artifacts-section",children:[e.jsx("div",{className:"submission-diff-label",children:o}),e.jsx(te,{label:o.toLowerCase(),currentItems:a.map(d=>({url:d,is_official:!1})),proposedItems:u.map(d=>({url:d,is_official:!1}))})]},r)})})}function hs(s){throw new Error(`Unhandled pending edit: ${JSON.stringify(s)}`)}function ms({edit:s}){var n,i,r,o,a,u;let t;switch(s.edit_type){case"tasks":t=e.jsx(fe,{currentItems:((n=s.current_payload)==null?void 0:n.tasks)??[],proposedIds:s.proposed_payload.task_ids,queryPrefix:"task",fetchEntity:U.getTask.bind(U)});break;case"methods":t=e.jsx(fe,{currentItems:((i=s.current_payload)==null?void 0:i.methods)??[],proposedIds:s.proposed_payload.method_ids,queryPrefix:"method",fetchEntity:U.getMethod.bind(U)});break;case"organizations":t=e.jsx(as,{currentItems:((r=s.current_payload)==null?void 0:r.organizations)??[],proposedIds:s.proposed_payload.organization_ids});break;case"repositories":t=e.jsx(te,{label:"repositories",currentItems:((o=s.current_payload)==null?void 0:o.repositories)??[],proposedItems:s.proposed_payload.repositories});break;case"project_pages":t=e.jsx(te,{label:"project pages",currentItems:((a=s.current_payload)==null?void 0:a.project_pages)??[],proposedItems:s.proposed_payload.project_pages});break;case"evaluations":t=e.jsx(os,{currentPayload:s.current_payload,proposedPayload:s.proposed_payload});break;case"source_url":t=e.jsx(cs,{currentPayload:s.current_payload,proposedPayload:s.proposed_payload});break;case"hf_artifacts":t=e.jsx(ps,{currentPayload:s.current_payload,proposedPayload:s.proposed_payload});break;case"x_threads":t=e.jsx(te,{label:"X threads",currentItems:(((u=s.current_payload)==null?void 0:u.x_threads)??[]).map(({url:d})=>({url:d,is_official:!1})),proposedItems:s.proposed_payload.x_threads.map(d=>({url:d,is_official:!1}))});break;case"new_task":t=e.jsx(K,{kind:"task",proposedPayload:s.proposed_payload});break;case"new_method":t=e.jsx(K,{kind:"method",proposedPayload:s.proposed_payload});break;case"new_benchmark":t=e.jsx(K,{kind:"benchmark",proposedPayload:s.proposed_payload});break;case"new_metric":t=e.jsx(K,{kind:"metric",proposedPayload:s.proposed_payload});break;case"new_conference":t=e.jsx(K,{kind:"conference",proposedPayload:s.proposed_payload});break;case"new_organization":t=e.jsx(ds,{proposedPayload:s.proposed_payload});break;case"new_external_paper":t=e.jsx(us,{proposedPayload:s.proposed_payload});break;default:hs(s)}return e.jsxs("div",{className:"submission-diff-body",children:[t,e.jsx(rs,{currentPayload:s.current_payload,proposedPayload:s.proposed_payload})]})}const ke=25,fs=["pending","approved","rejected","all"],gs=["all","tasks","methods","evaluations","repositories","project_pages","source_url","x_threads","hf_artifacts","organizations","new_task","new_method","new_benchmark","new_metric","new_conference","new_organization","new_external_paper"],oe=["pending","approved","rejected"],bs=new Set(["new_task","new_method","new_benchmark","new_metric","new_conference"]);function xs(s){return s.slice(0,2).toUpperCase()}function J(s){return s.replace(/_/g," ")}function js(s){return s==="new_external_paper"?"external paper":J(s)}const vs={new_task:{title:"New task",subtitle:"Task suggestion"},new_method:{title:"New method",subtitle:"Method suggestion"},new_benchmark:{title:"New benchmark",subtitle:"Benchmark suggestion"},new_metric:{title:"New metric",subtitle:"Metric suggestion"},new_conference:{title:"New conference",subtitle:"Conference suggestion"},new_organization:{title:"New organization",subtitle:"Organization suggestion"},new_external_paper:{title:"External paper",subtitle:"External paper submission"}};function we(s){if(!s)return"unknown time";const t=new Date(s);if(Number.isNaN(t.getTime()))return s;const n=Date.now()-t.getTime(),i=Math.floor(n/6e4),r=Math.floor(n/36e5),o=Math.floor(n/864e5);return i<1?"just now":i<60?`${i}m ago`:r<24?`${r}h ago`:o<14?`${o}d ago`:t.toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"})}function _s(s){return s==="approved"?"approved":s==="rejected"?"rejected":"pending"}function ys(s,t){return(s==null?void 0:s.arxiv_id)||(s==null?void 0:s.id)||String(t)}function Ns(s){return[...s].sort((t,n)=>new Date(n.created_at).getTime()-new Date(t.created_at).getTime())}async function ks(s,t,n,i){const r=await Promise.all(s.map(p=>G.list({status:p,edit_type:t==="all"?void 0:t,reviewed_by_kind:n?"auto":void 0,limit:ke,offset:i[p]??0}))),o=Ns(r.flatMap(p=>p.results)).slice(0,ke),a={};s.forEach((p,v)=>{const l=o.filter(m=>r[v].results.includes(m)).length;a[p]=(i[p]??0)+l});const u=r.reduce((p,v)=>p+v.count,0),d=s.reduce((p,v)=>p+(a[v]??0),0);return{count:u,results:o,nextOffsets:o.length>0&&d{n.invalidateQueries({queryKey:["pendingPaperEdits"]}),n.invalidateQueries({queryKey:["pendingPaperEdit",g.id]}),g.paper_id!=null&&g.edit_type!=="evaluations"&&je(n,[String(g.paper_id),t==null?void 0:t.arxiv_id])},[t==null?void 0:t.arxiv_id,n]),f=se({mutationFn:()=>G.approve(s.id),onSuccess:g=>{var ee;c(g),g.edit_type==="evaluations"&&g.paper_id!=null?Le(n,ze(String(g.paper_id),((ee=g.current_payload)==null?void 0:ee.evaluations)??[],g.proposed_payload.operations.map(L=>L.op==="create"?{kind:"create",data:L.data}:L.op==="update"?{kind:"update",evaluationId:L.evaluation_id,data:L.data}:{kind:"delete",evaluationId:L.evaluation_id}),(t==null?void 0:t.arxiv_id)??void 0)):g.paper_id!=null&&!a&&ae(n),i({title:"Submission approved",description:a?`Marked ${J(s.edit_type)} suggestion as approved. No catalog changes were applied.`:`Applied ${J(s.edit_type)} changes for ${p}.`})},onError:g=>{i({title:"Could not approve submission",description:z(g,"Approval failed. Please try again."),variant:"destructive"})}}),x=se({mutationFn:()=>G.reject(s.id),onSuccess:g=>{c(g),i({title:"Submission rejected",description:`Rejected ${J(s.edit_type)} changes for ${p}.`})},onError:g=>{i({title:"Could not reject submission",description:z(g,"Rejection failed. Please try again."),variant:"destructive"})}}),_=se({mutationFn:()=>U.rollbackEvent(s.catalog_event_id),onSuccess:()=>{n.invalidateQueries({queryKey:["pendingPaperEdits"]}),s.paper_id!=null&&(je(n,[String(s.paper_id),t==null?void 0:t.arxiv_id]),ae(n)),i({title:"Edit reverted",description:`Restored ${p} to its previous state.`})},onError:g=>{i({title:"Could not revert edit",description:z(g,"The paper changed after this edit, or it was already reverted."),variant:"destructive"})}}),S=se({mutationFn:g=>G.revertAutoApproved(s.hf_subject,{suspend:g}),onSuccess:g=>{n.invalidateQueries({queryKey:["pendingPaperEdits"]}),ae(n),i({title:`Reverted ${g.reverted} edits by @${s.hf_username}`,description:g.skipped.length?`${g.skipped.length} were skipped because the paper changed since.`:void 0})},onError:g=>{i({title:"Could not revert edits",description:z(g,"Bulk revert failed. Please try again."),variant:"destructive"})}}),Q=g=>{const ee=`Revert every edit @${s.hf_username} had auto-applied in the last 7 days${g?" and suspend the account":""}?`;window.confirm(ee)&&S.mutate(g)},h=s.reviewed_by_kind==="auto",T=h&&!!s.catalog_event_id,M=f.isPending,$=x.isPending,ge=M||$,ne=_.isPending||S.isPending;return e.jsxs("article",{id:`submission-${s.id}`,className:"submission-card",children:[e.jsxs("header",{className:"submission-card-header",children:[e.jsxs("div",{className:"submission-card-top",children:[e.jsxs("div",{children:[d?e.jsx("a",{href:`/paper/${encodeURIComponent(d)}`,target:"_blank",rel:"noopener noreferrer",className:"submission-title",children:p}):e.jsx("div",{className:"submission-title",children:p}),e.jsxs("div",{className:"submission-meta",children:[e.jsxs("span",{children:["#",s.id]}),e.jsx("span",{children:o?u.subtitle:`Paper #${s.paper_id}`}),e.jsx("span",{children:we(s.created_at)})]})]}),e.jsxs("div",{className:"submission-badges",children:[e.jsx("span",{className:"submission-pill",children:J(s.edit_type)}),h&&e.jsx("span",{className:"submission-pill",children:"Auto-applied"}),s.is_author&&e.jsx("span",{className:"submission-pill author",children:"Linked author"}),e.jsx("span",{className:A("submission-pill status",_s(s.status)),children:s.status})]})]}),e.jsxs("a",{href:`https://huggingface.co/${encodeURIComponent(s.hf_username)}`,target:"_blank",rel:"noopener noreferrer",className:"submission-user",children:[e.jsxs($e,{className:"h-6 w-6",children:[e.jsx(qe,{src:v,alt:s.hf_username}),e.jsx(De,{className:"text-[10px]",children:xs(s.hf_username)})]}),e.jsxs("span",{children:["@",s.hf_username]})]})]}),e.jsx("div",{className:"submission-diff",children:e.jsx(ms,{edit:s})}),s.conflict_payload&&e.jsxs("div",{className:"submission-empty submission-empty-warn",children:["Canonical state changed after this submission. Review the conflict before deciding.",e.jsx("pre",{children:JSON.stringify(s.conflict_payload,null,2)})]}),e.jsx("footer",{className:"submission-actions",children:l?e.jsx(e.Fragment,{children:e.jsxs("div",{className:"submission-action-buttons",children:[e.jsxs("button",{type:"button",onClick:()=>x.mutate(),disabled:ge,className:"submission-action-btn reject",children:[$?e.jsx(W,{className:"spin",size:14}):e.jsx(es,{size:14}),"Reject"]}),e.jsxs("button",{type:"button",onClick:()=>f.mutate(),disabled:ge,className:"submission-action-btn approve",children:[M?e.jsx(W,{className:"spin",size:14}):e.jsx(ss,{size:14}),"Approve"]})]})}):e.jsxs("div",{className:"submission-reviewed",children:[e.jsxs("span",{children:["Reviewed by ",e.jsx("strong",{children:s.reviewed_by||"unknown"}),s.reviewed_at?` ${we(s.reviewed_at)}`:""]}),s.admin_note&&e.jsxs("span",{children:["Admin note: ",e.jsx("strong",{children:s.admin_note})]}),m&&e.jsxs("span",{children:["Submitter-visible reason: ",e.jsx("strong",{children:s.user_review_reason})]}),T&&e.jsxs("div",{className:"submission-action-buttons",children:[e.jsxs("button",{type:"button",onClick:()=>_.mutate(),disabled:ne,className:"submission-action-btn reject",children:[_.isPending?e.jsx(W,{className:"spin",size:14}):e.jsx(ns,{size:14}),"Revert this edit"]}),s.hf_subject&&e.jsxs(e.Fragment,{children:[e.jsxs("button",{type:"button",onClick:()=>Q(!1),disabled:ne,className:"submission-action-btn reject",children:["Revert all by @",s.hf_username]}),e.jsx("button",{type:"button",onClick:()=>Q(!0),disabled:ne,className:"submission-action-btn reject",children:"Revert all and suspend"})]})]}),s.applied_payload&&e.jsxs("details",{children:[e.jsx("summary",{children:a?"Reviewed payload":"Applied payload"}),e.jsx("pre",{children:JSON.stringify(s.applied_payload,null,2)})]}),s.result_entity_type&&e.jsxs("span",{children:["Created/applied: ",e.jsxs("strong",{children:[s.result_entity_type," #",s.result_entity_id]})]})]})})]})}function Ls(){var S,Q;const{toast:s}=Oe(),[t,n]=w.useState("pending"),[i,r]=w.useState("all"),[o,a]=w.useState(!1),u=Te({queryKey:["pendingPaperEdits","counts",i,o],queryFn:async()=>{const h=i==="all"?void 0:i,T=await Promise.all(oe.map(M=>G.list({status:M,edit_type:h,reviewed_by_kind:o?"auto":void 0,limit:1,offset:0})));return Object.fromEntries(T.map((M,$)=>[oe[$],M.count]))},staleTime:30*1e3}),d=Xe({queryKey:["pendingPaperEdits",{status:t,editType:i,autoOnly:o}],queryFn:({pageParam:h})=>ks(t==="all"?oe:[t],i,o,h),initialPageParam:{},getNextPageParam:h=>h.nextOffsets??void 0,retry:!1}),p=w.useMemo(()=>{var h;return((h=d.data)==null?void 0:h.pages.flatMap(T=>T.results))??[]},[d.data]),v=w.useMemo(()=>Array.from(new Set(p.map(h=>h.paper_id).filter(h=>h!=null))).sort((h,T)=>h-T),[p]),l=ie({queries:v.map(h=>({queryKey:Be.summary(String(h)),queryFn:()=>Pe.get(String(h),!1),staleTime:5*60*1e3}))}),m=w.useMemo(()=>{const h=new Map;return l.forEach(T=>{const M=T.data;if(!M)return;const $=Number(M.id);Number.isFinite($)&&h.set($,M)}),h},[l]);w.useEffect(()=>{d.error&&s({title:"Could not load submissions",description:z(d.error,"Failed to load pending paper edits."),variant:"destructive"})},[d.error,s]);const c=u.data,f=c?c.pending+c.approved+c.rejected:void 0,x={pending:c==null?void 0:c.pending,approved:c==null?void 0:c.approved,rejected:c==null?void 0:c.rejected,all:f},_=((Q=(S=d.data)==null?void 0:S.pages[0])==null?void 0:Q.count)??0;return e.jsxs("div",{className:"page submissions-page",children:[e.jsxs("div",{className:"feed-header",children:[e.jsxs("div",{children:[e.jsxs("h1",{className:"feed-title",children:["Pending ",e.jsx("em",{children:"Edits"})]}),e.jsx("div",{className:"feed-subtitle",children:"Review submitted changes to paper metadata and benchmark results"})]}),e.jsxs("button",{type:"button",className:"feedback-link",onClick:()=>{u.refetch(),d.refetch()},disabled:d.isFetching||u.isFetching,children:[e.jsx(Ze,{className:A((d.isFetching||u.isFetching)&&"spin"),size:14}),"Refresh"]})]}),e.jsxs("div",{className:"submissions-filter-panel",children:[e.jsxs("div",{className:"submission-filter-block",children:[e.jsx("div",{className:"sidebar-label",children:"Status"}),e.jsxs("div",{className:"period-switch",children:[fs.map(h=>e.jsxs("button",{type:"button",className:A("period-btn",t===h&&"active"),onClick:()=>n(h),children:[h,x[h]!=null&&e.jsx("span",{className:"submission-count",children:x[h]})]},h)),e.jsx("button",{type:"button",className:A("period-btn",o&&"active"),onClick:()=>{a(h=>!h),o||n("approved")},children:"auto-applied only"})]})]}),e.jsxs("div",{className:"submission-filter-block",children:[e.jsx("div",{className:"sidebar-label",children:"Edit Type"}),e.jsx("div",{className:"sort-options submissions-type-options",children:gs.map(h=>e.jsx("button",{type:"button",className:A("sort-btn",i===h&&"active"),onClick:()=>r(h),children:js(h)},h))})]})]}),e.jsxs("div",{children:[e.jsx("div",{className:"sort-bar submissions-sort-bar",children:e.jsx("div",{children:e.jsx("div",{className:"sort-options",children:e.jsx("span",{className:"results-count",children:d.isFetching?"refreshing":`${_} submissions`})})})}),d.isLoading?e.jsxs("div",{className:"submission-loading",children:[e.jsx(W,{className:"spin",size:18}),e.jsx("span",{children:"Loading submissions..."})]}):d.isError?e.jsxs("div",{className:"submission-empty submission-empty-warn",role:"alert",children:[e.jsx(ye,{size:28}),e.jsx("h2",{children:"Could not display submissions."}),e.jsx("p",{children:z(d.error,"The submissions response was invalid.")})]}):p.length===0?e.jsxs("div",{className:"submission-empty",children:[e.jsx(ye,{size:28}),e.jsx("h2",{children:"No pending submissions."}),e.jsxs("p",{children:["The SQL and curl fallback is still documented in"," ",e.jsx("a",{href:"https://github.com/huggingface/paperswithcode/blob/main/docs/operations.md",target:"_blank",rel:"noopener noreferrer",children:"operations.md"}),"."]})]}):e.jsx("div",{className:"submission-list",children:p.map(h=>e.jsx(ws,{submission:h,paper:h.paper_id==null?void 0:m.get(h.paper_id)},h.id))}),p.length>0&&e.jsxs("div",{className:"submission-pagination",children:[e.jsxs("p",{children:["Showing ",p.length," of ",_," submissions"]}),d.hasNextPage&&e.jsxs("button",{type:"button",className:"feedback-link",onClick:()=>d.fetchNextPage(),disabled:d.isFetching,children:[d.isFetchingNextPage&&e.jsx(W,{className:"spin",size:14}),"Load more"]})]})]})]})}export{Ls as default}; diff --git a/assets/SubmitView-CCWdg0_v.js b/assets/SubmitView-CCWdg0_v.js new file mode 100644 index 0000000000000000000000000000000000000000..65c9abcd38394b9b8344ebdfa92ef3f11dca40c4 --- /dev/null +++ b/assets/SubmitView-CCWdg0_v.js @@ -0,0 +1 @@ +import{c as D,f as E,p as C,a as F,e as N,K as o,s as X,j as e,h as z}from"./index-YwiKC6Po.js";import{u as U}from"./useMutation-f6iDkf3w.js";import{A as O,a as q}from"./alert-Cx5luC5D.js";import{B as P}from"./button-B90pJJiy.js";import{I as h}from"./input-DEeEc0bH.js";import{T as B}from"./textarea-BPIMGf5w.js";import{a as H}from"./paperQueryKeys-C5FMa4Oj.js";import{a as M}from"./queryInvalidation-Dgyv9_oM.js";import"./curation-CkzNFTMJ.js";const S="pwc:paper-submit-draft",R={color:"var(--accent-text)",fontWeight:600,textDecoration:"underline",textUnderlineOffset:2},V=/^\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?V.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=>H.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}M(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(B,{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(q,{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/SubmitView-CQFDy941.js b/assets/SubmitView-CQFDy941.js deleted file mode 100644 index e3d86d8ac1b52a5c61202197cff1325a5db9f659..0000000000000000000000000000000000000000 --- a/assets/SubmitView-CQFDy941.js +++ /dev/null @@ -1 +0,0 @@ -import{c as D,f as E,p as C,a as F,e as N,K as o,s as X,j as e,h as z}from"./index-D6jcIRWs.js";import{u as U}from"./useMutation-p6mN4h17.js";import{A as O,a as q}from"./alert-2MbxVzGL.js";import{B as P}from"./button-Bzx0ccHH.js";import{I as h}from"./input-CCN-4hy4.js";import{T as B}from"./textarea-sXKODM3W.js";import{a as H}from"./papers-DIIIPDpj.js";import{a as M}from"./queryInvalidation-BxCpTdQe.js";const S="pwc:paper-submit-draft",R={color:"var(--accent-text)",fontWeight:600,textDecoration:"underline",textUnderlineOffset:2},V=/^\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?V.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},c=i.title.trim();c&&(s.title=c);const d=i.abstract.trim();d&&(s.abstract=d);const n=i.authors.split(/[,\n]/).map(p=>p.trim()).filter(Boolean);return n.length>0&&(s.authors=n),i.datePublished&&(s.date_published=i.datePublished),s}const ae=()=>{const l=D(),i=E(),{toast:r}=C(),{user:g,isLoading:s}=F(),[c]=N(),d=c.get("arxiv_id")??"",[n,p]=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);p(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=>H.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}M(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=>p(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(B,{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(q,{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{ae as default}; diff --git a/assets/TagBrowseView-BzhdvNbn.js b/assets/TagBrowseView-BzhdvNbn.js new file mode 100644 index 0000000000000000000000000000000000000000..5f1f587c9f156f31f1647dd4f69ee3fb1eacfc63 --- /dev/null +++ b/assets/TagBrowseView-BzhdvNbn.js @@ -0,0 +1 @@ +import{j as e,L as g,K as ce,u as le,c as oe,r as j,q as de,Y as me}from"./index-YwiKC6Po.js";import{R as he}from"./ResearchFollowButton-BFXC8E3t.js";import{u as K}from"./useQuery-DPH6Mb2w.js";import{M as pe}from"./SotaBadges-DiQuEzfo.js";import{u as ue,b as ge,a as be}from"./PaperFeed-kaLm5US2.js";import{A as L}from"./arrow-right-CSx7rJG4.js";import{B as xe}from"./BenchmarkTrendSparkline-BBLKxMdW.js";import{M as U}from"./MarkdownText-C-8yLDus.js";import{c as O}from"./catalog-B15Yh5dN.js";import{p as je,a as ke}from"./paperQueryKeys-C5FMa4Oj.js";import{i as _e}from"./apiErrors-DBfE_SVR.js";import{f as fe}from"./frameworks-DDA0P4Tf.js";import{s as Ne}from"./slug-BpH-Nkvz.js";import{d as N,t as we}from"./transform-CNg3rvXk.js";import{u as ve}from"./usePapers-C1deOZKl.js";import{S as P}from"./skeleton-CXR1qouH.js";import{A as ye,a as Se}from"./alert-Cx5luC5D.js";import Ee from"./NotFound-D8hwuoEl.js";import{T as Te}from"./trophy-B60aAfG3.js";import{G as $e}from"./github-BZMCt7Ub.js";import"./useMutation-f6iDkf3w.js";import"./research-5UpiU-ea.js";import"./plus-Cfz0QbT1.js";import"./colors-BkWRhvFI.js";import"./PaperCard-FG-bEpJk.js";import"./AuthorAvatar-CoTET6B3.js";import"./Icon-DXQ4sjQk.js";import"./LatexTitle-DI6voLfI.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-D7ygxg37.js";import"./useIntersectionObserver-Dt36kyjs.js";/* empty css */import"./PaperPreviewLink-CKfmgBjs.js";import"./index-CoRCN2p0.js";import"./index-BM_xSDJM.js";import"./katex-DkKDou_j.js";import"./hover-card-BY9tUGxy.js";import"./curation-CkzNFTMJ.js";import"./useInfiniteQuery-BEbL80ez.js";const Be=()=>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"})]})]}),W=n=>{const c=n.match(/\(([^()]*)\)\s*$/);return c?c[1].split(",").map(d=>d.trim()).filter(Boolean):[]};function Ce(n,c){const d=W(n);if(c===void 0)return"standard";const i=new Set(W(c).map(l=>l.toLowerCase())),m=d.filter(l=>!i.has(l.toLowerCase()));return m.length?m.join(", "):n}function Me(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,Fe=[{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"}],Ae=({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))]}),Pe=({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-${Ne(c.name)}`,children:c.name})]}),[...d].reverse().map(i=>e.jsxs(ce.Fragment,{children:[e.jsx("span",{className:"sep",children:"/"}),e.jsx(g,{to:`/tasks/${i.slug||i.id}`,children:N(i.name,i.slug)})]},i.id)),e.jsx("span",{className:"sep",children:"/"}),e.jsx("span",{style:{color:"var(--accent-text)"},children:N(n.name,n.slug)})]}),Re=({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:Fe.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)})})]})},Le=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}),ws=()=>{var z,V,G;const{taskSlug:n}=le(),c=oe(),d=ue(),{searchParams:i}=d,[m,l]=j.useState(!1),[x,k]=j.useState({}),[w,_]=j.useState(()=>new Set),{preferences:Y}=de(),T=(s,a)=>{const t=s||"";return a?`/benchmark/${t}?task=${encodeURIComponent(a)}`:`/benchmark/${t}`},v=Y.hide_closed_source_evals?!0:void 0,h=K({queryKey:["task-page",n,v],queryFn:()=>O.taskPage(n,{is_open:v}),enabled:!!n,staleTime:10*60*1e3});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,(z=h.data)==null?void 0:z.task.slug,i,n]);const I=K({queryKey:["task-benchmark-trends",n,v],queryFn:()=>O.trendingBenchmarks(n,{limit:100,min_recent_papers:0,is_open:v}),enabled:!!n,staleTime:10*60*1e3}),y=j.useMemo(()=>{var s;return Le(((s=h.data)==null?void 0:s.children)||[])},[h.data]),$=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]),f=ve([...je.feeds.task,n,d.filters],s=>ke.forTask(n,{...d.filters,page:s,page_size:20,repository_limit:1}),{enabled:!!n}),J=j.useMemo(()=>{var s;return((s=f.data)==null?void 0:s.pages.flatMap(a=>a.results.map(we)))??[]},[f.data]),B=j.useMemo(()=>{var a;const s={};return(a=f.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)},[f.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(_e(h.error))return e.jsx(Ee,{});if(h.error||!h.data)return e.jsx("div",{className:"page",children:e.jsx(ye,{variant:"destructive",children:e.jsx(Se,{children:"Task not found."})})});const o=h.data.task,X=h.data.parents||[],C=N(o.name,o.slug),M=(h.data.sisters||[]).filter(s=>s.id!==o.id),Z=h.data.recommended_frameworks||[],S=h.data.benchmarks||[],q=new Map(S.map(s=>[s.id,s])),ee=new Set(S.map(s=>s.id)),H=(((V=I.data)==null?void 0:V.results)||[]).filter(s=>ee.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:[]})),E=Me(F,s=>{var a;return(a=q.get(s.id))==null?void 0:a.parent_dataset_id}),se=m?E:E.slice(0,5),ae=E.slice(5).reduce((s,a)=>s+a.members.length,0),D=((G=I.data)==null?void 0:G.recent_days)||90,re=y.some(s=>($.get(s.id)||[]).length>0),ne=y.length>0,Q=F.length>0,te=(()=>{const s=new Set;return S.forEach(a=>s.add(a.id)),$.forEach(a=>a.forEach(t=>s.add(t.id))),s.size})(),ie=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(Pe,{task:o,area:h.data.area,parents:X}),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:C}),e.jsx(he,{kind:"task",entityId:o.id}),o.description&&e.jsx(U,{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:te}),"BENCHMARKS"]}),e.jsxs("span",{children:[e.jsxs("span",{className:"num",children:[B.length,"+"]}),"METHODS USED"]})]}),e.jsx(Ae,{frameworks:Z})]}),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:me(o.image_url)??void 0,alt:`${C} 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 · ",C,o.image_credit&&e.jsxs(e.Fragment,{children:[e.jsx("br",{}),e.jsx(U,{className:"task-image-credit",text:o.image_credit})]})]})]})]}),o.slug==="healthcare"&&e.jsx(Re,{task:o,relatedTasks:M}),o.slug==="robotics"&&e.jsx(Be,{}),e.jsxs("div",{className:"task-page-grid",style:{marginTop:28},children:[e.jsxs("div",{children:[Q&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"task-section-head",id:"benchmarks",children:[e.jsxs("div",{className:"task-section-eyebrow",children:[D,"-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"})]}),se.map(({key:s,members:a})=>{const t=a[0],b=p=>p===t?"standard":Ce(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(xe,{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"," /"," ",D,"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:T(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(Te,{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($e,{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:T(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)})]}),E.length>5&&e.jsx("button",{type:"button",className:"bench-show-more",onClick:()=>l(s=>!s),children:m?"− show top 5":`+ show ${ae} more benchmarks`})]}),ne&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"task-section-head",style:Q?{marginTop:36}:void 0,children:[e.jsx("div",{className:"task-section-eyebrow",children:re?"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=$.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:N(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(T(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:()=>ie(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(ge,{feed:d}),e.jsx(be,{query:f,cards:J,empty:"No papers in this task yet."})]}),e.jsxs("aside",{className:"task-side",children:[M.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"}),M.slice(0,8).map(s=>e.jsxs(g,{to:`/tasks/${s.slug||s.id}`,className:"side-link-row",children:[e.jsx("span",{children:N(s.name,s.slug)}),s.paper_count!=null&&e.jsx("span",{className:"count",children:s.paper_count.toLocaleString()})]},s.id))]}),B.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"}),B.map(s=>e.jsxs("div",{className:"side-method-row",children:[e.jsx(pe,{method:{slug:s.slug,name:s.name}}),e.jsxs("span",{className:"num",children:["·",s.count]})]},s.id))]})]})]})]})};export{Re as HealthcareMedicalAiHub,Ae as RecommendedFrameworkLinks,Pe as TaskBreadcrumb,ws as default}; diff --git a/assets/TagBrowseView-bMr8w4y6.js b/assets/TagBrowseView-bMr8w4y6.js deleted file mode 100644 index 976f04000998d3175fdc037613125ff782ee7a73..0000000000000000000000000000000000000000 --- a/assets/TagBrowseView-bMr8w4y6.js +++ /dev/null @@ -1 +0,0 @@ -import{j as e,L as g,K as ge,u as be,c as xe,e as je,r as k,q as ke,Y as _e}from"./index-D6jcIRWs.js";import{R as fe}from"./ResearchFollowButton-C2Bfd9dP.js";import{u as K}from"./useQuery-CUJUm4FY.js";import{P as Ne,M as we}from"./components-DO1X940E.js";import{A as L}from"./arrow-right-CFRHnFt4.js";import{B as ve}from"./BenchmarkTrendSparkline-BfAoxAzu.js";import{P as ye}from"./PaperFeedFilters-DNebHp4l.js";import{a as Se,P as Ce,b as Ee}from"./PaperDateFilter-CPIqaHaq.js";import{M as W}from"./MarkdownText-B_D3IE_p.js";import{c as Y}from"./catalog-PYrB8_bm.js";import{s as Te}from"./slug-BpH-Nkvz.js";import{d as N,t as Be}from"./colors-CLwl8a2d.js";import{c as Pe}from"./usePapers-BbCSwcVk.js";import{u as $e}from"./useInfiniteScroll-Dm7JY_X4.js";import{S as E}from"./skeleton-BqkYFmXl.js";import{A as Ae,a as Re}from"./alert-2MbxVzGL.js";import{T as Fe}from"./trophy-CqWfBPLd.js";import{G as Me}from"./github-B7D_19Qm.js";import"./useMutation-p6mN4h17.js";import"./research-BggtGgC2.js";import"./plus-C4UQ62Q1.js";import"./papers-DIIIPDpj.js";import"./AuthorAvatar-UMHOVOr9.js";import"./LatexTitle-D_92Jowu.js";import"./safeExternalHref-CkBrsh84.js";import"./popover-DCjqGpW0.js";/* empty css */import"./PaperPreviewLink-fcJyP9H0.js";import"./index-uFGyKu5N.js";import"./index-yduEvk9Z.js";import"./katex-DkKDou_j.js";import"./hover-card-DPpv0l_x.js";import"./useInfiniteQuery-FXco4P1n.js";import"./useIntersectionObserver-3LTuEaFW.js";const Le=()=>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"})]})]}),J=r=>{const c=r.match(/\(([^()]*)\)\s*$/);return c?c[1].split(",").map(l=>l.trim()).filter(Boolean):[]};function Ie(r,c){const l=J(r);if(c===void 0)return"standard";const i=new Set(J(c).map(o=>o.toLowerCase())),m=l.filter(o=>!i.has(o.toLowerCase()));return m.length?m.join(", "):r}function De(r,c){const l=new Map(r.map(o=>[o.id,o])),i=o=>{const b=new Set([o.id]);let x=o;for(;;){const w=c(x),f=w?l.get(w):void 0;if(!f)return x.id;if(b.has(f.id))return o.id;b.add(f.id),x=f}},m=new Map;return r.forEach(o=>{const b=i(o);m.set(b,[...m.get(b)||[],o])}),[...m].map(([o,b])=>({key:o,members:[l.get(o),...b.filter(x=>x.id!==o)]}))}const He=[["trending","trending"],["date_published","newest"],["citation_count","most cited"]],qe=r=>r==="trending"||r==="date_published"||r==="citation_count"?r:"trending",M=3,Oe=[{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"}],Ue=r=>new Intl.NumberFormat("en",{notation:r>=1e3?"compact":"standard",maximumFractionDigits:1}).format(r),ze=({frameworks:r})=>r.length===0?null:e.jsxs("div",{className:"task-framework-links",children:[e.jsx("span",{className:"task-framework-links-label",children:"Recommended frameworks"}),r.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:["★ ",Ue(c.num_stars)]})]},c.framework_id))]}),Ve=({task:r,area:c,parents:l})=>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-${Te(c.name)}`,children:c.name})]}),[...l].reverse().map(i=>e.jsxs(ge.Fragment,{children:[e.jsx("span",{className:"sep",children:"/"}),e.jsx(g,{to:`/tasks/${i.slug||i.id}`,children:N(i.name,i.slug)})]},i.id)),e.jsx("span",{className:"sep",children:"/"}),e.jsx("span",{style:{color:"var(--accent-text)"},children:N(r.name,r.slug)})]}),Ge=({task:r,relatedTasks:c})=>{const l=new Map([r,...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:Oe.map(i=>{const m=l.get(i.slug),o=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:o},i.slug):e.jsx(g,{to:i.href,className:"medical-ai-hub-card",children:o},i.slug)})})]})},Qe=r=>[...r].sort((c,l)=>{const i=c.slug==="classic-language-modeling",m=l.slug==="classic-language-modeling";return i!==m?i?1:-1:0}),Es=()=>{var V,G,Q;const{taskSlug:r}=be(),c=xe(),[l,i]=je(),m=qe(l.get("order_by")),o=l.get("has_code")==="true",b=l.get("has_hf_artifacts")==="true",x=Se(l),w=s=>{const a=new URLSearchParams(l);a.set("order_by",s),i(a)},f=s=>{const a=new URLSearchParams(l);s?a.set("has_code","true"):a.delete("has_code"),i(a)},X=s=>{const a=new URLSearchParams(l);s?a.set("has_hf_artifacts","true"):a.delete("has_hf_artifacts"),i(a)},[I,Z]=k.useState(!1),[ee,se]=k.useState({}),[ae,re]=k.useState(()=>new Set),{preferences:te}=ke(),T=(s,a)=>{const n=s||"";return a?`/benchmark/${n}?task=${encodeURIComponent(a)}`:`/benchmark/${n}`},v=te.hide_closed_source_evals?!0:void 0,h=K({queryKey:["task-page",r,v],queryFn:()=>Y.taskPage(r,{is_open:v}),enabled:!!r,staleTime:10*60*1e3});k.useEffect(()=>{var n;const s=(n=h.data)==null?void 0:n.task.slug;if(!r||!s||s===r)return;const a=l.toString();c(`/tasks/${s}${a?`?${a}`:""}`,{replace:!0})},[c,(V=h.data)==null?void 0:V.task.slug,l,r]);const D=K({queryKey:["task-benchmark-trends",r,v],queryFn:()=>Y.trendingBenchmarks(r,{limit:100,min_recent_papers:0,is_open:v}),enabled:!!r,staleTime:10*60*1e3}),y=k.useMemo(()=>{var s;return Qe(((s=h.data)==null?void 0:s.children)||[])},[h.data]),B=k.useMemo(()=>{var a;const s=new Map;return(((a=h.data)==null?void 0:a.subtask_benchmarks)||[]).forEach(n=>{s.set(n.subtask_id,n.benchmarks||[])}),s},[h.data]),_=Pe({taskId:r||"",page_size:20,order_by:m,order_dir:"desc",include_resources:!0,has_code:o,has_hf_artifacts:b,start_date:x.startDate,end_date:x.endDate,enabled:!!r}),H=k.useMemo(()=>{var a;return(((a=_.data)==null?void 0:a.pages.flatMap(n=>n.results))||[]).map(Be)},[_.data]),P=k.useMemo(()=>{var a;const s={};return(a=_.data)==null||a.pages.forEach(n=>n.results.forEach(j=>(j.methods||[]).forEach(u=>{const t=u.slug||u.id;s[t]||(s[t]={id:u.id,name:u.name,slug:u.slug||"",count:0}),s[t].count++}))),Object.values(s).sort((n,j)=>j.count-n.count).slice(0,8)},[_.data]),ne=$e(_);if(h.isLoading)return e.jsxs("div",{className:"page",children:[e.jsx(E,{className:"h-12 w-1/2 mb-4"}),e.jsx(E,{className:"h-6 w-1/3 mb-8"}),e.jsx(E,{className:"h-64 w-full"})]});if(h.error||!h.data)return e.jsx("div",{className:"page",children:e.jsx(Ae,{variant:"destructive",children:e.jsx(Re,{children:"Task not found."})})});const d=h.data.task,ie=h.data.parents||[],$=N(d.name,d.slug),A=(h.data.sisters||[]).filter(s=>s.id!==d.id),ce=h.data.recommended_frameworks||[],S=h.data.benchmarks||[],q=new Map(S.map(s=>[s.id,s])),le=new Set(S.map(s=>s.id)),O=(((G=D.data)==null?void 0:G.results)||[]).filter(s=>le.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}}),R=O.length?O: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:[]})),C=De(R,s=>{var a;return(a=q.get(s.id))==null?void 0:a.parent_dataset_id}),oe=I?C:C.slice(0,5),de=C.slice(5).reduce((s,a)=>s+a.members.length,0),U=((Q=D.data)==null?void 0:Q.recent_days)||90,me=y.some(s=>(B.get(s.id)||[]).length>0),he=y.length>0,z=R.length>0,pe=(()=>{const s=new Set;return S.forEach(a=>s.add(a.id)),B.forEach(a=>a.forEach(n=>s.add(n.id))),s.size})(),ue=s=>{re(a=>{const n=new Set(a);return n.has(s)?n.delete(s):n.add(s),n})};return e.jsxs("div",{className:"page",children:[e.jsx(Ve,{task:d,area:h.data.area,parents:ie}),e.jsxs("div",{className:d.image_url?`task-hero-grid${d.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:$}),e.jsx(fe,{kind:"task",entityId:d.id}),d.description&&e.jsx(W,{className:"task-explainer",text:d.description}),e.jsxs("div",{className:"task-quickstats",children:[e.jsxs("span",{children:[e.jsx("span",{className:"num",children:(d.paper_count??0).toLocaleString()}),"PAPERS"]}),e.jsxs("span",{children:[e.jsx("span",{className:"num",children:pe}),"BENCHMARKS"]}),e.jsxs("span",{children:[e.jsxs("span",{className:"num",children:[P.length,"+"]}),"METHODS USED"]})]}),e.jsx(ze,{frameworks:ce})]}),d.image_url&&e.jsxs("figure",{className:`task-figure-card${d.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:_e(d.image_url)??void 0,alt:`${$} schematic`,onError:s=>{var a,n;(n=(a=s.currentTarget.parentElement)==null?void 0:a.parentElement)==null||n.style.setProperty("display","none")}})}),e.jsxs("figcaption",{children:["Figure · ",$,d.image_credit&&e.jsxs(e.Fragment,{children:[e.jsx("br",{}),e.jsx(W,{className:"task-image-credit",text:d.image_credit})]})]})]})]}),d.slug==="healthcare"&&e.jsx(Ge,{task:d,relatedTasks:A}),d.slug==="robotics"&&e.jsx(Le,{}),e.jsxs("div",{className:"task-page-grid",style:{marginTop:28},children:[e.jsxs("div",{children:[z&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"task-section-head",id:"benchmarks",children:[e.jsxs("div",{className:"task-section-eyebrow",children:[U,"-day reporting activity · select a benchmark"]}),e.jsxs("div",{className:"task-section-title",children:["Benchmarks ",e.jsxs("span",{className:"meta",children:["[",R.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"})]}),oe.map(({key:s,members:a})=>{const n=a[0],j=p=>p===n?"standard":Ie(p.name,n.name),u=[n,...a.slice(1).sort((p,F)=>j(p).localeCompare(j(F),void 0,{sensitivity:"base"}))],t=u.find(p=>p.id===ee[s])??n;return e.jsxs("div",{className:"benchmark-trend-row",role:"row",children:[e.jsxs("div",{className:"benchmark-trend-cell",role:"cell",children:[e.jsx(ve,{history:t.history,benchmarkName:t.name}),e.jsxs("div",{className:"benchmark-trend-meta",children:[e.jsxs("span",{children:[e.jsx("strong",{children:t.recent_paper_count})," ",t.recent_paper_count===1?"paper":"papers"," /"," ",U,"d"]}),t.rate_change==null?t.recent_paper_count>0&&e.jsx("span",{className:"benchmark-trend-change is-new",children:"new"}):e.jsxs("span",{className:`benchmark-trend-change ${t.rate_change>=1?"is-up":"is-down"}`,children:[t.rate_change>=1?"↑":"↓"," ",t.rate_change.toFixed(1),"×"]})]})]}),e.jsxs("div",{className:"benchmark-trend-benchmark",role:"cell",children:[e.jsx(g,{className:"bench-row-name",to:T(t.slug||t.id,r),children:t.name}),u.length>1&&e.jsx("div",{className:"bench-row-variants",role:"group","aria-label":`Evaluation protocols for ${n.name}`,children:u.map(p=>e.jsx("button",{type:"button",className:"bench-row-variant","aria-pressed":p.id===t.id,title:p.name,onClick:()=>se(F=>({...F,[s]:p.id})),children:j(p)},p.id))}),e.jsx("div",{className:"bench-row-sub",children:e.jsxs("span",{children:[e.jsx("strong",{children:t.all_time_paper_count})," reporting papers"]})})]}),e.jsx("div",{className:"bench-row-best",role:"cell",children:t.best_model_name?e.jsxs(e.Fragment,{children:[e.jsx(Fe,{size:13,className:"bench-row-best-icon"}),e.jsx("span",{className:"bench-row-best-name",children:t.best_model_name})]}):e.jsx("span",{className:"bench-row-best-empty",children:"—"})}),e.jsx("div",{className:"bench-row-paper",role:"cell",children:t.best_paper_route&&t.best_paper_title?e.jsx(g,{to:`/paper/${encodeURIComponent(t.best_paper_route)}`,children:t.best_paper_title}):e.jsx("span",{className:"bench-row-best-empty",children:"—"})}),e.jsx("div",{className:"bench-row-code",role:"cell",children:t.best_code_url?e.jsx("a",{href:t.best_code_url,target:"_blank",rel:"noopener noreferrer","aria-label":`Code for ${t.best_paper_title||t.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:T(t.slug||t.id,r),"aria-label":`Compare ${t.best_model_name||"the best model"} with all results on ${t.name}`,children:[e.jsx("span",{children:"See all"}),e.jsx(L,{size:11,strokeWidth:2,"aria-hidden":"true"})]})})]},s)})]}),C.length>5&&e.jsx("button",{type:"button",className:"bench-show-more",onClick:()=>Z(s=>!s),children:I?"− show top 5":`+ show ${de} more benchmarks`})]}),he&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"task-section-head",style:z?{marginTop:36}:void 0,children:[e.jsx("div",{className:"task-section-eyebrow",children:me?"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)||[],n=ae.has(s.id),j=n?a:a.slice(0,M),u=a.length-M;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:N(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]`})]}),j.length>0?j.map((t,p)=>e.jsxs("div",{className:"bench-row",onClick:()=>c(T(t.slug||t.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:t.name}),e.jsx("div",{className:"bench-row-sub",children:t.paper_count!=null&&e.jsxs("span",{children:[e.jsx("strong",{children:t.paper_count})," ENTRIES"]})})]}),e.jsx("div",{className:"bench-row-arrow",children:"→"})]},t.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:()=>ue(s.id),children:n?`− show top ${M}`:`+ 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:["[",(d.paper_count??0).toLocaleString(),"]"]})]})]}),e.jsxs("div",{className:"sort-bar",children:[e.jsxs("div",{className:"paper-feed-toolbar-controls",children:[e.jsx("div",{className:"sort-options",children:He.map(([s,a])=>e.jsx("button",{className:`sort-btn ${m===s?"active":""}`,onClick:()=>w(s),children:a},s))}),e.jsx(ye,{hasCode:o,hasHfArtifacts:b,onHasCodeChange:f,onHasHfArtifactsChange:X})]}),e.jsx(Ce,{startDate:x.startDate,endDate:x.endDate,onChange:s=>i(Ee(l,s))})]}),_.isLoading?e.jsx("div",{className:"paper-list",children:Array.from({length:4}).map((s,a)=>e.jsx(E,{className:"h-40 w-full"},a))}):H.length===0?e.jsx("div",{className:"no-results",children:"No papers in this task yet."}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"paper-list",children:H.map((s,a)=>e.jsx(Ne,{paper:s,rank:a+1},s.id))}),e.jsx("div",{ref:ne,style:{height:1}}),_.isFetchingNextPage&&e.jsx("div",{style:{padding:"20px 0",textAlign:"center",color:"var(--ink-faint)"},children:"Loading more…"})]})]}),e.jsxs("aside",{className:"task-side",children:[A.length>0&&d.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"}),A.slice(0,8).map(s=>e.jsxs(g,{to:`/tasks/${s.slug||s.id}`,className:"side-link-row",children:[e.jsx("span",{children:N(s.name,s.slug)}),s.paper_count!=null&&e.jsx("span",{className:"count",children:s.paper_count.toLocaleString()})]},s.id))]}),P.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"}),P.map(s=>e.jsxs("div",{className:"side-method-row",children:[e.jsx(we,{method:{slug:s.slug,name:s.name}}),e.jsxs("span",{className:"num",children:["·",s.count]})]},s.id))]})]})]})]})};export{Ge as HealthcareMedicalAiHub,ze as RecommendedFrameworkLinks,Ve as TaskBreadcrumb,Es as default}; diff --git a/assets/TagsIndexView-CHjo-ug4.js b/assets/TagsIndexView-DJJJY-D1.js similarity index 72% rename from assets/TagsIndexView-CHjo-ug4.js rename to assets/TagsIndexView-DJJJY-D1.js index 3a98c2ff6846094ee5867f8e226ec7d01660c51c..5ce1f85ee27c24b8ccdb1f675610781e1880c968 100644 --- a/assets/TagsIndexView-CHjo-ug4.js +++ b/assets/TagsIndexView-DJJJY-D1.js @@ -1,596 +1,596 @@ -import{n as e,r as p,j as a,L as j}from"./index-D6jcIRWs.js";import{u as k}from"./useQuery-CUJUm4FY.js";import{c as l}from"./catalog-PYrB8_bm.js";import{c as v,h as u,d as f}from"./colors-CLwl8a2d.js";import{s as S}from"./slug-BpH-Nkvz.js";import{S as L}from"./search-CfTufeR7.js";import{I as C,T as V}from"./triangle-alert-Cypc2KaL.js";import{S as A}from"./share-2-DPo2j-OC.js";import{T as H}from"./trending-up-DqN3HzZ5.js";import{M as T}from"./moon--2wi3KtT.js";import{T as F}from"./thumbs-up-BqRlVdvF.js";import{D as Z}from"./database-DKdKRr_t.js";import{T as B}from"./trophy-CqWfBPLd.js";import{F as P}from"./file-text-4G2I5_Zo.js";import{A as N}from"./activity-5IcAhZoH.js";import{G as _}from"./globe-iw_Y78tU.js";import{S as E}from"./sparkles-r8uPx2-0.js";import{S as w}from"./skeleton-BqkYFmXl.js";import{A as I,a as D}from"./alert-2MbxVzGL.js";import{T as G}from"./TaxonomySuggestionTile-BLk1tYYE.js";import{T as W}from"./TaxonomyTrending-Dqu0dPfc.js";import"./SignInToEditDialog-RzK54RAM.js";import"./button-Bzx0ccHH.js";import"./input-CCN-4hy4.js";import"./textarea-sXKODM3W.js";import"./searchable-select-B7z6Fcrr.js";import"./popover-DCjqGpW0.js";import"./dialog-vGFIbcd-.js";import"./loader-circle-BuDrH29B.js";import"./useMutation-p6mN4h17.js";import"./submissions-DNa3tQdo.js";import"./plus-C4UQ62Q1.js";/** +import{n as e,r as x,j as a,L as q}from"./index-YwiKC6Po.js";import{u as s}from"./useQuery-DPH6Mb2w.js";import{c as p}from"./catalog-B15Yh5dN.js";import{c as g,h as v}from"./colors-BkWRhvFI.js";import{d as u}from"./transform-CNg3rvXk.js";import{s as z}from"./slug-BpH-Nkvz.js";import{S as j}from"./search-wcEXdf1i.js";import{I as L,T as S}from"./triangle-alert-BWObrJc7.js";import{S as C}from"./share-2-m8aPY8Vq.js";import{T as V}from"./trending-up-Sm0tkX5g.js";import{M as A}from"./moon-DfjUzC9G.js";import{T as H}from"./thumbs-up-D9G2aLNB.js";import{D as T}from"./database-2w-JFZSG.js";import{T as F}from"./trophy-B60aAfG3.js";import{F as Z}from"./file-text-Cijxx2XD.js";import{A as B}from"./activity-95309hog.js";import{G as P}from"./globe-DmMnSXeF.js";import{S as N}from"./sparkles-C3L7JDLC.js";import{A as D,a as G}from"./alert-Cx5luC5D.js";import{A as _,a as E,b as I}from"./AreaSection-CfCNkiTd.js";import{T as U}from"./TaxonomySuggestionTile-4WqZSJGN.js";import{u as W,T as Q}from"./useHashScrollOnReady-BKkkyVVX.js";import{s as R}from"./areas-Dvi8w2dp.js";import"./skeleton-CXR1qouH.js";import"./SignInToEditDialog-DpqyyHCb.js";import"./button-B90pJJiy.js";import"./input-DEeEc0bH.js";import"./textarea-BPIMGf5w.js";import"./searchable-select-Bqfyxu17.js";import"./popover-D7ygxg37.js";import"./dialog-foxx0Wu6.js";import"./loader-circle-B0KtDERb.js";import"./useMutation-f6iDkf3w.js";import"./submissions-BJgYjF7O.js";import"./plus-Cfz0QbT1.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const R=e("ArrowRightLeft",[["path",{d:"m16 3 4 4-4 4",key:"1x1c3m"}],["path",{d:"M20 7H4",key:"zbl0bi"}],["path",{d:"m8 21-4-4 4-4",key:"h9nckh"}],["path",{d:"M4 17h16",key:"g4d7ey"}]]);/** + */const $=e("ArrowRightLeft",[["path",{d:"m16 3 4 4-4 4",key:"1x1c3m"}],["path",{d:"M20 7H4",key:"zbl0bi"}],["path",{d:"m8 21-4-4 4-4",key:"h9nckh"}],["path",{d:"M4 17h16",key:"g4d7ey"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const U=e("ArrowUpFromDot",[["path",{d:"m5 9 7-7 7 7",key:"1hw5ic"}],["path",{d:"M12 16V2",key:"ywoabb"}],["circle",{cx:"12",cy:"21",r:"1",key:"o0uj5v"}]]);/** + */const K=e("ArrowUpFromDot",[["path",{d:"m5 9 7-7 7 7",key:"1hw5ic"}],["path",{d:"M12 16V2",key:"ywoabb"}],["circle",{cx:"12",cy:"21",r:"1",key:"o0uj5v"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Q=e("AudioLines",[["path",{d:"M2 10v3",key:"1fnikh"}],["path",{d:"M6 6v11",key:"11sgs0"}],["path",{d:"M10 3v18",key:"yhl04a"}],["path",{d:"M14 8v7",key:"3a1oy3"}],["path",{d:"M18 5v13",key:"123xd1"}],["path",{d:"M22 10v3",key:"154ddg"}]]);/** + */const O=e("AudioLines",[["path",{d:"M2 10v3",key:"1fnikh"}],["path",{d:"M6 6v11",key:"11sgs0"}],["path",{d:"M10 3v18",key:"yhl04a"}],["path",{d:"M14 8v7",key:"3a1oy3"}],["path",{d:"M18 5v13",key:"123xd1"}],["path",{d:"M22 10v3",key:"154ddg"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const K=e("AudioWaveform",[["path",{d:"M2 13a2 2 0 0 0 2-2V7a2 2 0 0 1 4 0v13a2 2 0 0 0 4 0V4a2 2 0 0 1 4 0v13a2 2 0 0 0 4 0v-4a2 2 0 0 1 2-2",key:"57tc96"}]]);/** + */const J=e("AudioWaveform",[["path",{d:"M2 13a2 2 0 0 0 2-2V7a2 2 0 0 1 4 0v13a2 2 0 0 0 4 0V4a2 2 0 0 1 4 0v13a2 2 0 0 0 4 0v-4a2 2 0 0 1 2-2",key:"57tc96"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const O=e("Axis3d",[["path",{d:"M4 4v16h16",key:"1s015l"}],["path",{d:"m4 20 7-7",key:"17qe9y"}]]);/** + */const X=e("Axis3d",[["path",{d:"M4 4v16h16",key:"1s015l"}],["path",{d:"m4 20 7-7",key:"17qe9y"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const $=e("BadgeCheck",[["path",{d:"M3.85 8.62a4 4 0 0 1 4.78-4.77 4 4 0 0 1 6.74 0 4 4 0 0 1 4.78 4.78 4 4 0 0 1 0 6.74 4 4 0 0 1-4.77 4.78 4 4 0 0 1-6.75 0 4 4 0 0 1-4.78-4.77 4 4 0 0 1 0-6.76Z",key:"3c2336"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/** + */const Y=e("BadgeCheck",[["path",{d:"M3.85 8.62a4 4 0 0 1 4.78-4.77 4 4 0 0 1 6.74 0 4 4 0 0 1 4.78 4.78 4 4 0 0 1 0 6.74 4 4 0 0 1-4.77 4.78 4 4 0 0 1-6.75 0 4 4 0 0 1-4.78-4.77 4 4 0 0 1 0-6.76Z",key:"3c2336"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const J=e("Bandage",[["path",{d:"M10 10.01h.01",key:"1e9xi7"}],["path",{d:"M10 14.01h.01",key:"ac23bv"}],["path",{d:"M14 10.01h.01",key:"2wfrvf"}],["path",{d:"M14 14.01h.01",key:"8tw8yn"}],["path",{d:"M18 6v11.5",key:"dkbidh"}],["path",{d:"M6 6v12",key:"vkc79e"}],["rect",{x:"2",y:"6",width:"20",height:"12",rx:"2",key:"1wpnh2"}]]);/** + */const e1=e("Bandage",[["path",{d:"M10 10.01h.01",key:"1e9xi7"}],["path",{d:"M10 14.01h.01",key:"ac23bv"}],["path",{d:"M14 10.01h.01",key:"2wfrvf"}],["path",{d:"M14 14.01h.01",key:"8tw8yn"}],["path",{d:"M18 6v11.5",key:"dkbidh"}],["path",{d:"M6 6v12",key:"vkc79e"}],["rect",{x:"2",y:"6",width:"20",height:"12",rx:"2",key:"1wpnh2"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const X=e("Bike",[["circle",{cx:"18.5",cy:"17.5",r:"3.5",key:"15x4ox"}],["circle",{cx:"5.5",cy:"17.5",r:"3.5",key:"1noe27"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["path",{d:"M12 17.5V14l-3-3 4-3 2 3h2",key:"1npguv"}]]);/** + */const a1=e("Bike",[["circle",{cx:"18.5",cy:"17.5",r:"3.5",key:"15x4ox"}],["circle",{cx:"5.5",cy:"17.5",r:"3.5",key:"1noe27"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["path",{d:"M12 17.5V14l-3-3 4-3 2 3h2",key:"1npguv"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Y=e("Blend",[["circle",{cx:"9",cy:"9",r:"7",key:"p2h5vp"}],["circle",{cx:"15",cy:"15",r:"7",key:"19ennj"}]]);/** + */const t1=e("Blend",[["circle",{cx:"9",cy:"9",r:"7",key:"p2h5vp"}],["circle",{cx:"15",cy:"15",r:"7",key:"19ennj"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const e1=e("Bone",[["path",{d:"M17 10c.7-.7 1.69 0 2.5 0a2.5 2.5 0 1 0 0-5 .5.5 0 0 1-.5-.5 2.5 2.5 0 1 0-5 0c0 .81.7 1.8 0 2.5l-7 7c-.7.7-1.69 0-2.5 0a2.5 2.5 0 0 0 0 5c.28 0 .5.22.5.5a2.5 2.5 0 1 0 5 0c0-.81-.7-1.8 0-2.5Z",key:"w610uw"}]]);/** + */const y1=e("Bone",[["path",{d:"M17 10c.7-.7 1.69 0 2.5 0a2.5 2.5 0 1 0 0-5 .5.5 0 0 1-.5-.5 2.5 2.5 0 1 0-5 0c0 .81.7 1.8 0 2.5l-7 7c-.7.7-1.69 0-2.5 0a2.5 2.5 0 0 0 0 5c.28 0 .5.22.5.5a2.5 2.5 0 1 0 5 0c0-.81-.7-1.8 0-2.5Z",key:"w610uw"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const a1=e("BotMessageSquare",[["path",{d:"M12 6V2H8",key:"1155em"}],["path",{d:"m8 18-4 4V8a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2Z",key:"w2lp3e"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M9 11v2",key:"1ueba0"}],["path",{d:"M15 11v2",key:"i11awn"}],["path",{d:"M20 12h2",key:"1q8mjw"}]]);/** + */const i1=e("BotMessageSquare",[["path",{d:"M12 6V2H8",key:"1155em"}],["path",{d:"m8 18-4 4V8a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2Z",key:"w2lp3e"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M9 11v2",key:"1ueba0"}],["path",{d:"M15 11v2",key:"i11awn"}],["path",{d:"M20 12h2",key:"1q8mjw"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const t1=e("Bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);/** + */const c1=e("Bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const i1=e("Box",[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]]);/** + */const h1=e("Box",[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const y1=e("Boxes",[["path",{d:"M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z",key:"lc1i9w"}],["path",{d:"m7 16.5-4.74-2.85",key:"1o9zyk"}],["path",{d:"m7 16.5 5-3",key:"va8pkn"}],["path",{d:"M7 16.5v5.17",key:"jnp8gn"}],["path",{d:"M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z",key:"8zsnat"}],["path",{d:"m17 16.5-5-3",key:"8arw3v"}],["path",{d:"m17 16.5 4.74-2.85",key:"8rfmw"}],["path",{d:"M17 16.5v5.17",key:"k6z78m"}],["path",{d:"M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z",key:"1xygjf"}],["path",{d:"M12 8 7.26 5.15",key:"1vbdud"}],["path",{d:"m12 8 4.74-2.85",key:"3rx089"}],["path",{d:"M12 13.5V8",key:"1io7kd"}]]);/** + */const n1=e("Boxes",[["path",{d:"M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z",key:"lc1i9w"}],["path",{d:"m7 16.5-4.74-2.85",key:"1o9zyk"}],["path",{d:"m7 16.5 5-3",key:"va8pkn"}],["path",{d:"M7 16.5v5.17",key:"jnp8gn"}],["path",{d:"M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z",key:"8zsnat"}],["path",{d:"m17 16.5-5-3",key:"8arw3v"}],["path",{d:"m17 16.5 4.74-2.85",key:"8rfmw"}],["path",{d:"M17 16.5v5.17",key:"k6z78m"}],["path",{d:"M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z",key:"1xygjf"}],["path",{d:"M12 8 7.26 5.15",key:"1vbdud"}],["path",{d:"m12 8 4.74-2.85",key:"3rx089"}],["path",{d:"M12 13.5V8",key:"1io7kd"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const n1=e("BrainCircuit",[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z",key:"l5xja"}],["path",{d:"M9 13a4.5 4.5 0 0 0 3-4",key:"10igwf"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M12 13h4",key:"1ku699"}],["path",{d:"M12 18h6a2 2 0 0 1 2 2v1",key:"105ag5"}],["path",{d:"M12 8h8",key:"1lhi5i"}],["path",{d:"M16 8V5a2 2 0 0 1 2-2",key:"u6izg6"}],["circle",{cx:"16",cy:"13",r:".5",key:"ry7gng"}],["circle",{cx:"18",cy:"3",r:".5",key:"1aiba7"}],["circle",{cx:"20",cy:"21",r:".5",key:"yhc1fs"}],["circle",{cx:"20",cy:"8",r:".5",key:"1e43v0"}]]);/** + */const d1=e("BrainCircuit",[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z",key:"l5xja"}],["path",{d:"M9 13a4.5 4.5 0 0 0 3-4",key:"10igwf"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M12 13h4",key:"1ku699"}],["path",{d:"M12 18h6a2 2 0 0 1 2 2v1",key:"105ag5"}],["path",{d:"M12 8h8",key:"1lhi5i"}],["path",{d:"M16 8V5a2 2 0 0 1 2-2",key:"u6izg6"}],["circle",{cx:"16",cy:"13",r:".5",key:"ry7gng"}],["circle",{cx:"18",cy:"3",r:".5",key:"1aiba7"}],["circle",{cx:"20",cy:"21",r:".5",key:"yhc1fs"}],["circle",{cx:"20",cy:"8",r:".5",key:"1e43v0"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const c1=e("Brain",[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z",key:"l5xja"}],["path",{d:"M12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z",key:"ep3f8r"}],["path",{d:"M15 13a4.5 4.5 0 0 1-3-4 4.5 4.5 0 0 1-3 4",key:"1p4c4q"}],["path",{d:"M17.599 6.5a3 3 0 0 0 .399-1.375",key:"tmeiqw"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M19.938 10.5a4 4 0 0 1 .585.396",key:"1qfode"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M19.967 17.484A4 4 0 0 1 18 18",key:"159ez6"}]]);/** + */const r1=e("Brain",[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z",key:"l5xja"}],["path",{d:"M12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z",key:"ep3f8r"}],["path",{d:"M15 13a4.5 4.5 0 0 1-3-4 4.5 4.5 0 0 1-3 4",key:"1p4c4q"}],["path",{d:"M17.599 6.5a3 3 0 0 0 .399-1.375",key:"tmeiqw"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M19.938 10.5a4 4 0 0 1 .585.396",key:"1qfode"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M19.967 17.484A4 4 0 0 1 18 18",key:"159ez6"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const h1=e("Brush",[["path",{d:"m9.06 11.9 8.07-8.06a2.85 2.85 0 1 1 4.03 4.03l-8.06 8.08",key:"1styjt"}],["path",{d:"M7.07 14.94c-1.66 0-3 1.35-3 3.02 0 1.33-2.5 1.52-2 2.02 1.08 1.1 2.49 2.02 4 2.02 2.2 0 4-1.8 4-4.04a3.01 3.01 0 0 0-3-3.02z",key:"z0l1mu"}]]);/** + */const o1=e("Brush",[["path",{d:"m9.06 11.9 8.07-8.06a2.85 2.85 0 1 1 4.03 4.03l-8.06 8.08",key:"1styjt"}],["path",{d:"M7.07 14.94c-1.66 0-3 1.35-3 3.02 0 1.33-2.5 1.52-2 2.02 1.08 1.1 2.49 2.02 4 2.02 2.2 0 4-1.8 4-4.04a3.01 3.01 0 0 0-3-3.02z",key:"z0l1mu"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const r1=e("Camera",[["path",{d:"M14.5 4h-5L7 7H4a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-3l-2.5-3z",key:"1tc9qg"}],["circle",{cx:"12",cy:"13",r:"3",key:"1vg3eu"}]]);/** + */const s1=e("Camera",[["path",{d:"M14.5 4h-5L7 7H4a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-3l-2.5-3z",key:"1tc9qg"}],["circle",{cx:"12",cy:"13",r:"3",key:"1vg3eu"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const o1=e("Captions",[["rect",{width:"18",height:"14",x:"3",y:"5",rx:"2",ry:"2",key:"12ruh7"}],["path",{d:"M7 15h4M15 15h2M7 11h2M13 11h4",key:"1ueiar"}]]);/** + */const p1=e("Captions",[["rect",{width:"18",height:"14",x:"3",y:"5",rx:"2",ry:"2",key:"12ruh7"}],["path",{d:"M7 15h4M15 15h2M7 11h2M13 11h4",key:"1ueiar"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const d1=e("Car",[["path",{d:"M19 17h2c.6 0 1-.4 1-1v-3c0-.9-.7-1.7-1.5-1.9C18.7 10.6 16 10 16 10s-1.3-1.4-2.2-2.3c-.5-.4-1.1-.7-1.8-.7H5c-.6 0-1.1.4-1.4.9l-1.4 2.9A3.7 3.7 0 0 0 2 12v4c0 .6.4 1 1 1h2",key:"5owen"}],["circle",{cx:"7",cy:"17",r:"2",key:"u2ysq9"}],["path",{d:"M9 17h6",key:"r8uit2"}],["circle",{cx:"17",cy:"17",r:"2",key:"axvx0g"}]]);/** + */const k1=e("Car",[["path",{d:"M19 17h2c.6 0 1-.4 1-1v-3c0-.9-.7-1.7-1.5-1.9C18.7 10.6 16 10 16 10s-1.3-1.4-2.2-2.3c-.5-.4-1.1-.7-1.8-.7H5c-.6 0-1.1.4-1.4.9l-1.4 2.9A3.7 3.7 0 0 0 2 12v4c0 .6.4 1 1 1h2",key:"5owen"}],["circle",{cx:"7",cy:"17",r:"2",key:"u2ysq9"}],["path",{d:"M9 17h6",key:"r8uit2"}],["circle",{cx:"17",cy:"17",r:"2",key:"axvx0g"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const s1=e("ChartLine",[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"m19 9-5 5-4-4-3 3",key:"2osh9i"}]]);/** + */const l1=e("ChartLine",[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"m19 9-5 5-4-4-3 3",key:"2osh9i"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const p1=e("CircleHelp",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/** + */const m1=e("CircleHelp",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const k1=e("Clapperboard",[["path",{d:"M20.2 6 3 11l-.9-2.4c-.3-1.1.3-2.2 1.3-2.5l13.5-4c1.1-.3 2.2.3 2.5 1.3Z",key:"1tn4o7"}],["path",{d:"m6.2 5.3 3.1 3.9",key:"iuk76l"}],["path",{d:"m12.4 3.4 3.1 4",key:"6hsd6n"}],["path",{d:"M3 11h18v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2Z",key:"ltgou9"}]]);/** + */const M1=e("Clapperboard",[["path",{d:"M20.2 6 3 11l-.9-2.4c-.3-1.1.3-2.2 1.3-2.5l13.5-4c1.1-.3 2.2.3 2.5 1.3Z",key:"1tn4o7"}],["path",{d:"m6.2 5.3 3.1 3.9",key:"iuk76l"}],["path",{d:"m12.4 3.4 3.1 4",key:"6hsd6n"}],["path",{d:"M3 11h18v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2Z",key:"ltgou9"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const l1=e("ContactRound",[["path",{d:"M16 2v2",key:"scm5qe"}],["path",{d:"M17.915 22a6 6 0 0 0-12 0",key:"suqz9p"}],["path",{d:"M8 2v2",key:"pbkmx"}],["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["rect",{x:"3",y:"4",width:"18",height:"18",rx:"2",key:"12vinp"}]]);/** + */const x1=e("ContactRound",[["path",{d:"M16 2v2",key:"scm5qe"}],["path",{d:"M17.915 22a6 6 0 0 0-12 0",key:"suqz9p"}],["path",{d:"M8 2v2",key:"pbkmx"}],["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["rect",{x:"3",y:"4",width:"18",height:"18",rx:"2",key:"12vinp"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const m1=e("Crosshair",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"22",x2:"18",y1:"12",y2:"12",key:"l9bcsi"}],["line",{x1:"6",x2:"2",y1:"12",y2:"12",key:"13hhkx"}],["line",{x1:"12",x2:"12",y1:"6",y2:"2",key:"10w3f3"}],["line",{x1:"12",x2:"12",y1:"22",y2:"18",key:"15g9kq"}]]);/** + */const g1=e("Crosshair",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"22",x2:"18",y1:"12",y2:"12",key:"l9bcsi"}],["line",{x1:"6",x2:"2",y1:"12",y2:"12",key:"13hhkx"}],["line",{x1:"12",x2:"12",y1:"6",y2:"2",key:"10w3f3"}],["line",{x1:"12",x2:"12",y1:"22",y2:"18",key:"15g9kq"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const M1=e("Cylinder",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5v14a9 3 0 0 0 18 0V5",key:"aqi0yr"}]]);/** + */const v1=e("Cylinder",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5v14a9 3 0 0 0 18 0V5",key:"aqi0yr"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const x1=e("Diff",[["path",{d:"M12 3v14",key:"7cf3v8"}],["path",{d:"M5 10h14",key:"elsbfy"}],["path",{d:"M5 21h14",key:"11awu3"}]]);/** + */const u1=e("Diff",[["path",{d:"M12 3v14",key:"7cf3v8"}],["path",{d:"M5 10h14",key:"elsbfy"}],["path",{d:"M5 21h14",key:"11awu3"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const g1=e("Dna",[["path",{d:"m10 16 1.5 1.5",key:"11lckj"}],["path",{d:"m14 8-1.5-1.5",key:"1ohn8i"}],["path",{d:"M15 2c-1.798 1.998-2.518 3.995-2.807 5.993",key:"80uv8i"}],["path",{d:"m16.5 10.5 1 1",key:"696xn5"}],["path",{d:"m17 6-2.891-2.891",key:"xu6p2f"}],["path",{d:"M2 15c6.667-6 13.333 0 20-6",key:"1pyr53"}],["path",{d:"m20 9 .891.891",key:"3xwk7g"}],["path",{d:"M3.109 14.109 4 15",key:"q76aoh"}],["path",{d:"m6.5 12.5 1 1",key:"cs35ky"}],["path",{d:"m7 18 2.891 2.891",key:"1sisit"}],["path",{d:"M9 22c1.798-1.998 2.518-3.995 2.807-5.993",key:"q3hbxp"}]]);/** + */const f1=e("Dna",[["path",{d:"m10 16 1.5 1.5",key:"11lckj"}],["path",{d:"m14 8-1.5-1.5",key:"1ohn8i"}],["path",{d:"M15 2c-1.798 1.998-2.518 3.995-2.807 5.993",key:"80uv8i"}],["path",{d:"m16.5 10.5 1 1",key:"696xn5"}],["path",{d:"m17 6-2.891-2.891",key:"xu6p2f"}],["path",{d:"M2 15c6.667-6 13.333 0 20-6",key:"1pyr53"}],["path",{d:"m20 9 .891.891",key:"3xwk7g"}],["path",{d:"M3.109 14.109 4 15",key:"q76aoh"}],["path",{d:"m6.5 12.5 1 1",key:"cs35ky"}],["path",{d:"m7 18 2.891 2.891",key:"1sisit"}],["path",{d:"M9 22c1.798-1.998 2.518-3.995 2.807-5.993",key:"q3hbxp"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const v1=e("Ear",[["path",{d:"M6 8.5a6.5 6.5 0 1 1 13 0c0 6-6 6-6 10a3.5 3.5 0 1 1-7 0",key:"1dfaln"}],["path",{d:"M15 8.5a2.5 2.5 0 0 0-5 0v1a2 2 0 1 1 0 4",key:"1qnva7"}]]);/** + */const w1=e("Ear",[["path",{d:"M6 8.5a6.5 6.5 0 1 1 13 0c0 6-6 6-6 10a3.5 3.5 0 1 1-7 0",key:"1dfaln"}],["path",{d:"M15 8.5a2.5 2.5 0 0 0-5 0v1a2 2 0 1 1 0 4",key:"1qnva7"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const u1=e("Earth",[["path",{d:"M21.54 15H17a2 2 0 0 0-2 2v4.54",key:"1djwo0"}],["path",{d:"M7 3.34V5a3 3 0 0 0 3 3a2 2 0 0 1 2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2c0-1.1.9-2 2-2h3.17",key:"1tzkfa"}],["path",{d:"M11 21.95V18a2 2 0 0 0-2-2a2 2 0 0 1-2-2v-1a2 2 0 0 0-2-2H2.05",key:"14pb5j"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/** + */const b1=e("Earth",[["path",{d:"M21.54 15H17a2 2 0 0 0-2 2v4.54",key:"1djwo0"}],["path",{d:"M7 3.34V5a3 3 0 0 0 3 3a2 2 0 0 1 2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2c0-1.1.9-2 2-2h3.17",key:"1tzkfa"}],["path",{d:"M11 21.95V18a2 2 0 0 0-2-2a2 2 0 0 1-2-2v-1a2 2 0 0 0-2-2H2.05",key:"14pb5j"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const f1=e("Eraser",[["path",{d:"m7 21-4.3-4.3c-1-1-1-2.5 0-3.4l9.6-9.6c1-1 2.5-1 3.4 0l5.6 5.6c1 1 1 2.5 0 3.4L13 21",key:"182aya"}],["path",{d:"M22 21H7",key:"t4ddhn"}],["path",{d:"m5 11 9 9",key:"1mo9qw"}]]);/** + */const q1=e("Eraser",[["path",{d:"m7 21-4.3-4.3c-1-1-1-2.5 0-3.4l9.6-9.6c1-1 2.5-1 3.4 0l5.6 5.6c1 1 1 2.5 0 3.4L13 21",key:"182aya"}],["path",{d:"M22 21H7",key:"t4ddhn"}],["path",{d:"m5 11 9 9",key:"1mo9qw"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const w1=e("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/** + */const z1=e("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const b1=e("FastForward",[["polygon",{points:"13 19 22 12 13 5 13 19",key:"587y9g"}],["polygon",{points:"2 19 11 12 2 5 2 19",key:"3pweh0"}]]);/** + */const j1=e("FastForward",[["polygon",{points:"13 19 22 12 13 5 13 19",key:"587y9g"}],["polygon",{points:"2 19 11 12 2 5 2 19",key:"3pweh0"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const z1=e("FileAudio",[["path",{d:"M17.5 22h.5a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v3",key:"rslqgf"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M2 19a2 2 0 1 1 4 0v1a2 2 0 1 1-4 0v-4a6 6 0 0 1 12 0v4a2 2 0 1 1-4 0v-1a2 2 0 1 1 4 0",key:"9f7x3i"}]]);/** + */const L1=e("FileAudio",[["path",{d:"M17.5 22h.5a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v3",key:"rslqgf"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M2 19a2 2 0 1 1 4 0v1a2 2 0 1 1-4 0v-4a6 6 0 0 1 12 0v4a2 2 0 1 1-4 0v-1a2 2 0 1 1 4 0",key:"9f7x3i"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const q1=e("FileImage",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["circle",{cx:"10",cy:"12",r:"2",key:"737tya"}],["path",{d:"m20 17-1.296-1.296a2.41 2.41 0 0 0-3.408 0L9 22",key:"wt3hpn"}]]);/** + */const S1=e("FileImage",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["circle",{cx:"10",cy:"12",r:"2",key:"737tya"}],["path",{d:"m20 17-1.296-1.296a2.41 2.41 0 0 0-3.408 0L9 22",key:"wt3hpn"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const j1=e("FileVideo",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"m10 11 5 3-5 3v-6Z",key:"7ntvm4"}]]);/** + */const C1=e("FileVideo",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"m10 11 5 3-5 3v-6Z",key:"7ntvm4"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const S1=e("Film",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M7 3v18",key:"bbkbws"}],["path",{d:"M3 7.5h4",key:"zfgn84"}],["path",{d:"M3 12h18",key:"1i2n21"}],["path",{d:"M3 16.5h4",key:"1230mu"}],["path",{d:"M17 3v18",key:"in4fa5"}],["path",{d:"M17 7.5h4",key:"myr1c1"}],["path",{d:"M17 16.5h4",key:"go4c1d"}]]);/** + */const V1=e("Film",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M7 3v18",key:"bbkbws"}],["path",{d:"M3 7.5h4",key:"zfgn84"}],["path",{d:"M3 12h18",key:"1i2n21"}],["path",{d:"M3 16.5h4",key:"1230mu"}],["path",{d:"M17 3v18",key:"in4fa5"}],["path",{d:"M17 7.5h4",key:"myr1c1"}],["path",{d:"M17 16.5h4",key:"go4c1d"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const L1=e("Fingerprint",[["path",{d:"M12 10a2 2 0 0 0-2 2c0 1.02-.1 2.51-.26 4",key:"1nerag"}],["path",{d:"M14 13.12c0 2.38 0 6.38-1 8.88",key:"o46ks0"}],["path",{d:"M17.29 21.02c.12-.6.43-2.3.5-3.02",key:"ptglia"}],["path",{d:"M2 12a10 10 0 0 1 18-6",key:"ydlgp0"}],["path",{d:"M2 16h.01",key:"1gqxmh"}],["path",{d:"M21.8 16c.2-2 .131-5.354 0-6",key:"drycrb"}],["path",{d:"M5 19.5C5.5 18 6 15 6 12a6 6 0 0 1 .34-2",key:"1tidbn"}],["path",{d:"M8.65 22c.21-.66.45-1.32.57-2",key:"13wd9y"}],["path",{d:"M9 6.8a6 6 0 0 1 9 5.2v2",key:"1fr1j5"}]]);/** + */const A1=e("Fingerprint",[["path",{d:"M12 10a2 2 0 0 0-2 2c0 1.02-.1 2.51-.26 4",key:"1nerag"}],["path",{d:"M14 13.12c0 2.38 0 6.38-1 8.88",key:"o46ks0"}],["path",{d:"M17.29 21.02c.12-.6.43-2.3.5-3.02",key:"ptglia"}],["path",{d:"M2 12a10 10 0 0 1 18-6",key:"ydlgp0"}],["path",{d:"M2 16h.01",key:"1gqxmh"}],["path",{d:"M21.8 16c.2-2 .131-5.354 0-6",key:"drycrb"}],["path",{d:"M5 19.5C5.5 18 6 15 6 12a6 6 0 0 1 .34-2",key:"1tidbn"}],["path",{d:"M8.65 22c.21-.66.45-1.32.57-2",key:"13wd9y"}],["path",{d:"M9 6.8a6 6 0 0 1 9 5.2v2",key:"1fr1j5"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const C1=e("Flashlight",[["path",{d:"M18 6c0 2-2 2-2 4v10a2 2 0 0 1-2 2h-4a2 2 0 0 1-2-2V10c0-2-2-2-2-4V2h12z",key:"1orkel"}],["line",{x1:"6",x2:"18",y1:"6",y2:"6",key:"1z11jq"}],["line",{x1:"12",x2:"12",y1:"12",y2:"12",key:"1f4yc1"}]]);/** + */const H1=e("Flashlight",[["path",{d:"M18 6c0 2-2 2-2 4v10a2 2 0 0 1-2 2h-4a2 2 0 0 1-2-2V10c0-2-2-2-2-4V2h12z",key:"1orkel"}],["line",{x1:"6",x2:"18",y1:"6",y2:"6",key:"1z11jq"}],["line",{x1:"12",x2:"12",y1:"12",y2:"12",key:"1f4yc1"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const V1=e("Footprints",[["path",{d:"M4 16v-2.38C4 11.5 2.97 10.5 3 8c.03-2.72 1.49-6 4.5-6C9.37 2 10 3.8 10 5.5c0 3.11-2 5.66-2 8.68V16a2 2 0 1 1-4 0Z",key:"1dudjm"}],["path",{d:"M20 20v-2.38c0-2.12 1.03-3.12 1-5.62-.03-2.72-1.49-6-4.5-6C14.63 6 14 7.8 14 9.5c0 3.11 2 5.66 2 8.68V20a2 2 0 1 0 4 0Z",key:"l2t8xc"}],["path",{d:"M16 17h4",key:"1dejxt"}],["path",{d:"M4 13h4",key:"1bwh8b"}]]);/** + */const T1=e("Footprints",[["path",{d:"M4 16v-2.38C4 11.5 2.97 10.5 3 8c.03-2.72 1.49-6 4.5-6C9.37 2 10 3.8 10 5.5c0 3.11-2 5.66-2 8.68V16a2 2 0 1 1-4 0Z",key:"1dudjm"}],["path",{d:"M20 20v-2.38c0-2.12 1.03-3.12 1-5.62-.03-2.72-1.49-6-4.5-6C14.63 6 14 7.8 14 9.5c0 3.11 2 5.66 2 8.68V20a2 2 0 1 0 4 0Z",key:"l2t8xc"}],["path",{d:"M16 17h4",key:"1dejxt"}],["path",{d:"M4 13h4",key:"1bwh8b"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const A1=e("GalleryHorizontalEnd",[["path",{d:"M2 7v10",key:"a2pl2d"}],["path",{d:"M6 5v14",key:"1kq3d7"}],["rect",{width:"12",height:"18",x:"10",y:"3",rx:"2",key:"13i7bc"}]]);/** + */const F1=e("GalleryHorizontalEnd",[["path",{d:"M2 7v10",key:"a2pl2d"}],["path",{d:"M6 5v14",key:"1kq3d7"}],["rect",{width:"12",height:"18",x:"10",y:"3",rx:"2",key:"13i7bc"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const H1=e("Gamepad2",[["line",{x1:"6",x2:"10",y1:"11",y2:"11",key:"1gktln"}],["line",{x1:"8",x2:"8",y1:"9",y2:"13",key:"qnk9ow"}],["line",{x1:"15",x2:"15.01",y1:"12",y2:"12",key:"krot7o"}],["line",{x1:"18",x2:"18.01",y1:"10",y2:"10",key:"1lcuu1"}],["path",{d:"M17.32 5H6.68a4 4 0 0 0-3.978 3.59c-.006.052-.01.101-.017.152C2.604 9.416 2 14.456 2 16a3 3 0 0 0 3 3c1 0 1.5-.5 2-1l1.414-1.414A2 2 0 0 1 9.828 16h4.344a2 2 0 0 1 1.414.586L17 18c.5.5 1 1 2 1a3 3 0 0 0 3-3c0-1.545-.604-6.584-.685-7.258-.007-.05-.011-.1-.017-.151A4 4 0 0 0 17.32 5z",key:"mfqc10"}]]);/** + */const Z1=e("Gamepad2",[["line",{x1:"6",x2:"10",y1:"11",y2:"11",key:"1gktln"}],["line",{x1:"8",x2:"8",y1:"9",y2:"13",key:"qnk9ow"}],["line",{x1:"15",x2:"15.01",y1:"12",y2:"12",key:"krot7o"}],["line",{x1:"18",x2:"18.01",y1:"10",y2:"10",key:"1lcuu1"}],["path",{d:"M17.32 5H6.68a4 4 0 0 0-3.978 3.59c-.006.052-.01.101-.017.152C2.604 9.416 2 14.456 2 16a3 3 0 0 0 3 3c1 0 1.5-.5 2-1l1.414-1.414A2 2 0 0 1 9.828 16h4.344a2 2 0 0 1 1.414.586L17 18c.5.5 1 1 2 1a3 3 0 0 0 3-3c0-1.545-.604-6.584-.685-7.258-.007-.05-.011-.1-.017-.151A4 4 0 0 0 17.32 5z",key:"mfqc10"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const T1=e("GitCompareArrows",[["circle",{cx:"5",cy:"6",r:"3",key:"1qnov2"}],["path",{d:"M12 6h5a2 2 0 0 1 2 2v7",key:"1yj91y"}],["path",{d:"m15 9-3-3 3-3",key:"1lwv8l"}],["circle",{cx:"19",cy:"18",r:"3",key:"1qljk2"}],["path",{d:"M12 18H7a2 2 0 0 1-2-2V9",key:"16sdep"}],["path",{d:"m9 15 3 3-3 3",key:"1m3kbl"}]]);/** + */const B1=e("GitCompareArrows",[["circle",{cx:"5",cy:"6",r:"3",key:"1qnov2"}],["path",{d:"M12 6h5a2 2 0 0 1 2 2v7",key:"1yj91y"}],["path",{d:"m15 9-3-3 3-3",key:"1lwv8l"}],["circle",{cx:"19",cy:"18",r:"3",key:"1qljk2"}],["path",{d:"M12 18H7a2 2 0 0 1-2-2V9",key:"16sdep"}],["path",{d:"m9 15 3 3-3 3",key:"1m3kbl"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const F1=e("Glasses",[["circle",{cx:"6",cy:"15",r:"4",key:"vux9w4"}],["circle",{cx:"18",cy:"15",r:"4",key:"18o8ve"}],["path",{d:"M14 15a2 2 0 0 0-2-2 2 2 0 0 0-2 2",key:"1ag4bs"}],["path",{d:"M2.5 13 5 7c.7-1.3 1.4-2 3-2",key:"1hm1gs"}],["path",{d:"M21.5 13 19 7c-.7-1.3-1.5-2-3-2",key:"1r31ai"}]]);/** + */const P1=e("Glasses",[["circle",{cx:"6",cy:"15",r:"4",key:"vux9w4"}],["circle",{cx:"18",cy:"15",r:"4",key:"18o8ve"}],["path",{d:"M14 15a2 2 0 0 0-2-2 2 2 0 0 0-2 2",key:"1ag4bs"}],["path",{d:"M2.5 13 5 7c.7-1.3 1.4-2 3-2",key:"1hm1gs"}],["path",{d:"M21.5 13 19 7c-.7-1.3-1.5-2-3-2",key:"1r31ai"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Z1=e("GraduationCap",[["path",{d:"M21.42 10.922a1 1 0 0 0-.019-1.838L12.83 5.18a2 2 0 0 0-1.66 0L2.6 9.08a1 1 0 0 0 0 1.832l8.57 3.908a2 2 0 0 0 1.66 0z",key:"j76jl0"}],["path",{d:"M22 10v6",key:"1lu8f3"}],["path",{d:"M6 12.5V16a6 3 0 0 0 12 0v-3.5",key:"1r8lef"}]]);/** + */const N1=e("GraduationCap",[["path",{d:"M21.42 10.922a1 1 0 0 0-.019-1.838L12.83 5.18a2 2 0 0 0-1.66 0L2.6 9.08a1 1 0 0 0 0 1.832l8.57 3.908a2 2 0 0 0 1.66 0z",key:"j76jl0"}],["path",{d:"M22 10v6",key:"1lu8f3"}],["path",{d:"M6 12.5V16a6 3 0 0 0 12 0v-3.5",key:"1r8lef"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const B1=e("Grid3x3",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M3 15h18",key:"5xshup"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"M15 3v18",key:"14nvp0"}]]);/** + */const D1=e("Grid3x3",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M3 15h18",key:"5xshup"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"M15 3v18",key:"14nvp0"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const P1=e("Hash",[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]]);/** + */const G1=e("Hash",[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const N1=e("Highlighter",[["path",{d:"m9 11-6 6v3h9l3-3",key:"1a3l36"}],["path",{d:"m22 12-4.6 4.6a2 2 0 0 1-2.8 0l-5.2-5.2a2 2 0 0 1 0-2.8L14 4",key:"14a9rk"}]]);/** + */const _1=e("Highlighter",[["path",{d:"m9 11-6 6v3h9l3-3",key:"1a3l36"}],["path",{d:"m22 12-4.6 4.6a2 2 0 0 1-2.8 0l-5.2-5.2a2 2 0 0 1 0-2.8L14 4",key:"14a9rk"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const _1=e("Infinity",[["path",{d:"M12 12c-2-2.67-4-4-6-4a4 4 0 1 0 0 8c2 0 4-1.33 6-4Zm0 0c2 2.67 4 4 6 4a4 4 0 0 0 0-8c-2 0-4 1.33-6 4Z",key:"1z0uae"}]]);/** + */const E1=e("Infinity",[["path",{d:"M12 12c-2-2.67-4-4-6-4a4 4 0 1 0 0 8c2 0 4-1.33 6-4Zm0 0c2 2.67 4 4 6 4a4 4 0 0 0 0-8c-2 0-4 1.33-6 4Z",key:"1z0uae"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const E1=e("Landmark",[["line",{x1:"3",x2:"21",y1:"22",y2:"22",key:"j8o0r"}],["line",{x1:"6",x2:"6",y1:"18",y2:"11",key:"10tf0k"}],["line",{x1:"10",x2:"10",y1:"18",y2:"11",key:"54lgf6"}],["line",{x1:"14",x2:"14",y1:"18",y2:"11",key:"380y"}],["line",{x1:"18",x2:"18",y1:"18",y2:"11",key:"1kevvc"}],["polygon",{points:"12 2 20 7 4 7",key:"jkujk7"}]]);/** + */const I1=e("Landmark",[["line",{x1:"3",x2:"21",y1:"22",y2:"22",key:"j8o0r"}],["line",{x1:"6",x2:"6",y1:"18",y2:"11",key:"10tf0k"}],["line",{x1:"10",x2:"10",y1:"18",y2:"11",key:"54lgf6"}],["line",{x1:"14",x2:"14",y1:"18",y2:"11",key:"380y"}],["line",{x1:"18",x2:"18",y1:"18",y2:"11",key:"1kevvc"}],["polygon",{points:"12 2 20 7 4 7",key:"jkujk7"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const I1=e("Languages",[["path",{d:"m5 8 6 6",key:"1wu5hv"}],["path",{d:"m4 14 6-6 2-3",key:"1k1g8d"}],["path",{d:"M2 5h12",key:"or177f"}],["path",{d:"M7 2h1",key:"1t2jsx"}],["path",{d:"m22 22-5-10-5 10",key:"don7ne"}],["path",{d:"M14 18h6",key:"1m8k6r"}]]);/** + */const U1=e("Languages",[["path",{d:"m5 8 6 6",key:"1wu5hv"}],["path",{d:"m4 14 6-6 2-3",key:"1k1g8d"}],["path",{d:"M2 5h12",key:"or177f"}],["path",{d:"M7 2h1",key:"1t2jsx"}],["path",{d:"m22 22-5-10-5 10",key:"don7ne"}],["path",{d:"M14 18h6",key:"1m8k6r"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const D1=e("Layers3",[["path",{d:"m12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83Z",key:"8b97xw"}],["path",{d:"m6.08 9.5-3.5 1.6a1 1 0 0 0 0 1.81l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9a1 1 0 0 0 0-1.83l-3.5-1.59",key:"1e5n1m"}],["path",{d:"m6.08 14.5-3.5 1.6a1 1 0 0 0 0 1.81l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9a1 1 0 0 0 0-1.83l-3.5-1.59",key:"1iwflc"}]]);/** + */const W1=e("Layers3",[["path",{d:"m12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83Z",key:"8b97xw"}],["path",{d:"m6.08 9.5-3.5 1.6a1 1 0 0 0 0 1.81l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9a1 1 0 0 0 0-1.83l-3.5-1.59",key:"1e5n1m"}],["path",{d:"m6.08 14.5-3.5 1.6a1 1 0 0 0 0 1.81l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9a1 1 0 0 0 0-1.83l-3.5-1.59",key:"1iwflc"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const G1=e("Layers",[["path",{d:"m12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83Z",key:"8b97xw"}],["path",{d:"m22 17.65-9.17 4.16a2 2 0 0 1-1.66 0L2 17.65",key:"dd6zsq"}],["path",{d:"m22 12.65-9.17 4.16a2 2 0 0 1-1.66 0L2 12.65",key:"ep9fru"}]]);/** + */const Q1=e("Layers",[["path",{d:"m12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83Z",key:"8b97xw"}],["path",{d:"m22 17.65-9.17 4.16a2 2 0 0 1-1.66 0L2 17.65",key:"dd6zsq"}],["path",{d:"m22 12.65-9.17 4.16a2 2 0 0 1-1.66 0L2 12.65",key:"ep9fru"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const W1=e("LayoutTemplate",[["rect",{width:"18",height:"7",x:"3",y:"3",rx:"1",key:"f1a2em"}],["rect",{width:"9",height:"7",x:"3",y:"14",rx:"1",key:"jqznyg"}],["rect",{width:"5",height:"7",x:"16",y:"14",rx:"1",key:"q5h2i8"}]]);/** + */const R1=e("LayoutTemplate",[["rect",{width:"18",height:"7",x:"3",y:"3",rx:"1",key:"f1a2em"}],["rect",{width:"9",height:"7",x:"3",y:"14",rx:"1",key:"jqznyg"}],["rect",{width:"5",height:"7",x:"16",y:"14",rx:"1",key:"q5h2i8"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const R1=e("Link2",[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]]);/** + */const $1=e("Link2",[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const U1=e("ListFilter",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M7 12h10",key:"b7w52i"}],["path",{d:"M10 18h4",key:"1ulq68"}]]);/** + */const K1=e("ListFilter",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M7 12h10",key:"b7w52i"}],["path",{d:"M10 18h4",key:"1ulq68"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Q1=e("ListMusic",[["path",{d:"M21 15V6",key:"h1cx4g"}],["path",{d:"M18.5 18a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5Z",key:"8saifv"}],["path",{d:"M12 12H3",key:"18klou"}],["path",{d:"M16 6H3",key:"1wxfjs"}],["path",{d:"M12 18H3",key:"11ftsu"}]]);/** + */const O1=e("ListMusic",[["path",{d:"M21 15V6",key:"h1cx4g"}],["path",{d:"M18.5 18a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5Z",key:"8saifv"}],["path",{d:"M12 12H3",key:"18klou"}],["path",{d:"M16 6H3",key:"1wxfjs"}],["path",{d:"M12 18H3",key:"11ftsu"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const K1=e("ListOrdered",[["path",{d:"M10 12h11",key:"6m4ad9"}],["path",{d:"M10 18h11",key:"11hvi2"}],["path",{d:"M10 6h11",key:"c7qv1k"}],["path",{d:"M4 10h2",key:"16xx2s"}],["path",{d:"M4 6h1v4",key:"cnovpq"}],["path",{d:"M6 18H4c0-1 2-2 2-3s-1-1.5-2-1",key:"m9a95d"}]]);/** + */const J1=e("ListOrdered",[["path",{d:"M10 12h11",key:"6m4ad9"}],["path",{d:"M10 18h11",key:"11hvi2"}],["path",{d:"M10 6h11",key:"c7qv1k"}],["path",{d:"M4 10h2",key:"16xx2s"}],["path",{d:"M4 6h1v4",key:"cnovpq"}],["path",{d:"M6 18H4c0-1 2-2 2-3s-1-1.5-2-1",key:"m9a95d"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const O1=e("LocateFixed",[["line",{x1:"2",x2:"5",y1:"12",y2:"12",key:"bvdh0s"}],["line",{x1:"19",x2:"22",y1:"12",y2:"12",key:"1tbv5k"}],["line",{x1:"12",x2:"12",y1:"2",y2:"5",key:"11lu5j"}],["line",{x1:"12",x2:"12",y1:"19",y2:"22",key:"x3vr5v"}],["circle",{cx:"12",cy:"12",r:"7",key:"fim9np"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/** + */const X1=e("LocateFixed",[["line",{x1:"2",x2:"5",y1:"12",y2:"12",key:"bvdh0s"}],["line",{x1:"19",x2:"22",y1:"12",y2:"12",key:"1tbv5k"}],["line",{x1:"12",x2:"12",y1:"2",y2:"5",key:"11lu5j"}],["line",{x1:"12",x2:"12",y1:"19",y2:"22",key:"x3vr5v"}],["circle",{cx:"12",cy:"12",r:"7",key:"fim9np"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const $1=e("MapPin",[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]]);/** + */const Y1=e("MapPin",[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const J1=e("Maximize2",[["polyline",{points:"15 3 21 3 21 9",key:"mznyad"}],["polyline",{points:"9 21 3 21 3 15",key:"1avn1i"}],["line",{x1:"21",x2:"14",y1:"3",y2:"10",key:"ota7mn"}],["line",{x1:"3",x2:"10",y1:"21",y2:"14",key:"1atl0r"}]]);/** + */const e2=e("Maximize2",[["polyline",{points:"15 3 21 3 21 9",key:"mznyad"}],["polyline",{points:"9 21 3 21 3 15",key:"1avn1i"}],["line",{x1:"21",x2:"14",y1:"3",y2:"10",key:"ota7mn"}],["line",{x1:"3",x2:"10",y1:"21",y2:"14",key:"1atl0r"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const X1=e("Merge",[["path",{d:"m8 6 4-4 4 4",key:"ybng9g"}],["path",{d:"M12 2v10.3a4 4 0 0 1-1.172 2.872L4 22",key:"1hyw0i"}],["path",{d:"m20 22-5-5",key:"1m27yz"}]]);/** + */const a2=e("Merge",[["path",{d:"m8 6 4-4 4 4",key:"ybng9g"}],["path",{d:"M12 2v10.3a4 4 0 0 1-1.172 2.872L4 22",key:"1hyw0i"}],["path",{d:"m20 22-5-5",key:"1m27yz"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Y1=e("MessageCircleQuestion",[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/** + */const t2=e("MessageCircleQuestion",[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const e2=e("MessageSquareQuote",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}],["path",{d:"M8 12a2 2 0 0 0 2-2V8H8",key:"1jfesj"}],["path",{d:"M14 12a2 2 0 0 0 2-2V8h-2",key:"1dq9mh"}]]);/** + */const y2=e("MessageSquareQuote",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}],["path",{d:"M8 12a2 2 0 0 0 2-2V8H8",key:"1jfesj"}],["path",{d:"M14 12a2 2 0 0 0 2-2V8h-2",key:"1dq9mh"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const a2=e("MessageSquareText",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}],["path",{d:"M13 8H7",key:"14i4kc"}],["path",{d:"M17 12H7",key:"16if0g"}]]);/** + */const i2=e("MessageSquareText",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}],["path",{d:"M13 8H7",key:"14i4kc"}],["path",{d:"M17 12H7",key:"16if0g"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const t2=e("MessagesSquare",[["path",{d:"M14 9a2 2 0 0 1-2 2H6l-4 4V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2z",key:"p1xzt8"}],["path",{d:"M18 9h2a2 2 0 0 1 2 2v11l-4-4h-6a2 2 0 0 1-2-2v-1",key:"1cx29u"}]]);/** + */const c2=e("MessagesSquare",[["path",{d:"M14 9a2 2 0 0 1-2 2H6l-4 4V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2z",key:"p1xzt8"}],["path",{d:"M18 9h2a2 2 0 0 1 2 2v11l-4-4h-6a2 2 0 0 1-2-2v-1",key:"1cx29u"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const i2=e("MicVocal",[["path",{d:"m11 7.601-5.994 8.19a1 1 0 0 0 .1 1.298l.817.818a1 1 0 0 0 1.314.087L15.09 12",key:"80a601"}],["path",{d:"M16.5 21.174C15.5 20.5 14.372 20 13 20c-2.058 0-3.928 2.356-6 2-2.072-.356-2.775-3.369-1.5-4.5",key:"j0ngtp"}],["circle",{cx:"16",cy:"7",r:"5",key:"d08jfb"}]]);/** + */const h2=e("MicVocal",[["path",{d:"m11 7.601-5.994 8.19a1 1 0 0 0 .1 1.298l.817.818a1 1 0 0 0 1.314.087L15.09 12",key:"80a601"}],["path",{d:"M16.5 21.174C15.5 20.5 14.372 20 13 20c-2.058 0-3.928 2.356-6 2-2.072-.356-2.775-3.369-1.5-4.5",key:"j0ngtp"}],["circle",{cx:"16",cy:"7",r:"5",key:"d08jfb"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const y2=e("Mic",[["path",{d:"M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z",key:"131961"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2",key:"1vc78b"}],["line",{x1:"12",x2:"12",y1:"19",y2:"22",key:"x3vr5v"}]]);/** + */const n2=e("Mic",[["path",{d:"M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z",key:"131961"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2",key:"1vc78b"}],["line",{x1:"12",x2:"12",y1:"19",y2:"22",key:"x3vr5v"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const n2=e("MonitorPlay",[["path",{d:"M10 7.75a.75.75 0 0 1 1.142-.638l3.664 2.249a.75.75 0 0 1 0 1.278l-3.664 2.25a.75.75 0 0 1-1.142-.64z",key:"1pctta"}],["path",{d:"M12 17v4",key:"1riwvh"}],["path",{d:"M8 21h8",key:"1ev6f3"}],["rect",{x:"2",y:"3",width:"20",height:"14",rx:"2",key:"x3v2xh"}]]);/** + */const d2=e("MonitorPlay",[["path",{d:"M10 7.75a.75.75 0 0 1 1.142-.638l3.664 2.249a.75.75 0 0 1 0 1.278l-3.664 2.25a.75.75 0 0 1-1.142-.64z",key:"1pctta"}],["path",{d:"M12 17v4",key:"1riwvh"}],["path",{d:"M8 21h8",key:"1ev6f3"}],["rect",{x:"2",y:"3",width:"20",height:"14",rx:"2",key:"x3v2xh"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const c2=e("Mountain",[["path",{d:"m8 3 4 8 5-5 5 15H2L8 3z",key:"otkl63"}]]);/** + */const r2=e("Mountain",[["path",{d:"m8 3 4 8 5-5 5 15H2L8 3z",key:"otkl63"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const h2=e("MousePointerClick",[["path",{d:"M14 4.1 12 6",key:"ita8i4"}],["path",{d:"m5.1 8-2.9-.8",key:"1go3kf"}],["path",{d:"m6 12-1.9 2",key:"mnht97"}],["path",{d:"M7.2 2.2 8 5.1",key:"1cfko1"}],["path",{d:"M9.037 9.69a.498.498 0 0 1 .653-.653l11 4.5a.5.5 0 0 1-.074.949l-4.349 1.041a1 1 0 0 0-.74.739l-1.04 4.35a.5.5 0 0 1-.95.074z",key:"s0h3yz"}]]);/** + */const o2=e("MousePointerClick",[["path",{d:"M14 4.1 12 6",key:"ita8i4"}],["path",{d:"m5.1 8-2.9-.8",key:"1go3kf"}],["path",{d:"m6 12-1.9 2",key:"mnht97"}],["path",{d:"M7.2 2.2 8 5.1",key:"1cfko1"}],["path",{d:"M9.037 9.69a.498.498 0 0 1 .653-.653l11 4.5a.5.5 0 0 1-.074.949l-4.349 1.041a1 1 0 0 0-.74.739l-1.04 4.35a.5.5 0 0 1-.95.074z",key:"s0h3yz"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const r2=e("Move3d",[["path",{d:"M5 3v16h16",key:"1mqmf9"}],["path",{d:"m5 19 6-6",key:"jh6hbb"}],["path",{d:"m2 6 3-3 3 3",key:"tkyvxa"}],["path",{d:"m18 16 3 3-3 3",key:"1d4glt"}]]);/** + */const s2=e("Move3d",[["path",{d:"M5 3v16h16",key:"1mqmf9"}],["path",{d:"m5 19 6-6",key:"jh6hbb"}],["path",{d:"m2 6 3-3 3 3",key:"tkyvxa"}],["path",{d:"m18 16 3 3-3 3",key:"1d4glt"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const o2=e("Music",[["path",{d:"M9 18V5l12-2v13",key:"1jmyc2"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["circle",{cx:"18",cy:"16",r:"3",key:"1hluhg"}]]);/** + */const p2=e("Music",[["path",{d:"M9 18V5l12-2v13",key:"1jmyc2"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["circle",{cx:"18",cy:"16",r:"3",key:"1hluhg"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const d2=e("Network",[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]]);/** + */const k2=e("Network",[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const s2=e("Newspaper",[["path",{d:"M4 22h16a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2H8a2 2 0 0 0-2 2v16a2 2 0 0 1-2 2Zm0 0a2 2 0 0 1-2-2v-9c0-1.1.9-2 2-2h2",key:"7pis2x"}],["path",{d:"M18 14h-8",key:"sponae"}],["path",{d:"M15 18h-5",key:"95g1m2"}],["path",{d:"M10 6h8v4h-8V6Z",key:"smlsk5"}]]);/** + */const l2=e("Newspaper",[["path",{d:"M4 22h16a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2H8a2 2 0 0 0-2 2v16a2 2 0 0 1-2 2Zm0 0a2 2 0 0 1-2-2v-9c0-1.1.9-2 2-2h2",key:"7pis2x"}],["path",{d:"M18 14h-8",key:"sponae"}],["path",{d:"M15 18h-5",key:"95g1m2"}],["path",{d:"M10 6h8v4h-8V6Z",key:"smlsk5"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const p2=e("Package",[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["path",{d:"m3.3 7 7.703 4.734a2 2 0 0 0 1.994 0L20.7 7",key:"yx3hmr"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]]);/** + */const m2=e("Package",[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["path",{d:"m3.3 7 7.703 4.734a2 2 0 0 0 1.994 0L20.7 7",key:"yx3hmr"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const k2=e("PaintBucket",[["path",{d:"m19 11-8-8-8.6 8.6a2 2 0 0 0 0 2.8l5.2 5.2c.8.8 2 .8 2.8 0L19 11Z",key:"irua1i"}],["path",{d:"m5 2 5 5",key:"1lls2c"}],["path",{d:"M2 13h15",key:"1hkzvu"}],["path",{d:"M22 20a2 2 0 1 1-4 0c0-1.6 1.7-2.4 2-4 .3 1.6 2 2.4 2 4Z",key:"xk76lq"}]]);/** + */const M2=e("PaintBucket",[["path",{d:"m19 11-8-8-8.6 8.6a2 2 0 0 0 0 2.8l5.2 5.2c.8.8 2 .8 2.8 0L19 11Z",key:"irua1i"}],["path",{d:"m5 2 5 5",key:"1lls2c"}],["path",{d:"M2 13h15",key:"1hkzvu"}],["path",{d:"M22 20a2 2 0 1 1-4 0c0-1.6 1.7-2.4 2-4 .3 1.6 2 2.4 2 4Z",key:"xk76lq"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const l2=e("Palette",[["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["path",{d:"M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10c.926 0 1.648-.746 1.648-1.688 0-.437-.18-.835-.437-1.125-.29-.289-.438-.652-.438-1.125a1.64 1.64 0 0 1 1.668-1.668h1.996c3.051 0 5.555-2.503 5.555-5.554C21.965 6.012 17.461 2 12 2z",key:"12rzf8"}]]);/** + */const x2=e("Palette",[["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["path",{d:"M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10c.926 0 1.648-.746 1.648-1.688 0-.437-.18-.835-.437-1.125-.29-.289-.438-.652-.438-1.125a1.64 1.64 0 0 1 1.668-1.668h1.996c3.051 0 5.555-2.503 5.555-5.554C21.965 6.012 17.461 2 12 2z",key:"12rzf8"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const m2=e("PersonStanding",[["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["path",{d:"m9 20 3-6 3 6",key:"se2kox"}],["path",{d:"m6 8 6 2 6-2",key:"4o3us4"}],["path",{d:"M12 10v4",key:"1kjpxc"}]]);/** + */const g2=e("PersonStanding",[["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["path",{d:"m9 20 3-6 3 6",key:"se2kox"}],["path",{d:"m6 8 6 2 6-2",key:"4o3us4"}],["path",{d:"M12 10v4",key:"1kjpxc"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const M2=e("PhoneCall",[["path",{d:"M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z",key:"foiqr5"}],["path",{d:"M14.05 2a9 9 0 0 1 8 7.94",key:"vmijpz"}],["path",{d:"M14.05 6A5 5 0 0 1 18 10",key:"13nbpp"}]]);/** + */const v2=e("PhoneCall",[["path",{d:"M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z",key:"foiqr5"}],["path",{d:"M14.05 2a9 9 0 0 1 8 7.94",key:"vmijpz"}],["path",{d:"M14.05 6A5 5 0 0 1 18 10",key:"13nbpp"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const x2=e("Popcorn",[["path",{d:"M18 8a2 2 0 0 0 0-4 2 2 0 0 0-4 0 2 2 0 0 0-4 0 2 2 0 0 0-4 0 2 2 0 0 0 0 4",key:"10td1f"}],["path",{d:"M10 22 9 8",key:"yjptiv"}],["path",{d:"m14 22 1-14",key:"8jwc8b"}],["path",{d:"M20 8c.5 0 .9.4.8 1l-2.6 12c-.1.5-.7 1-1.2 1H7c-.6 0-1.1-.4-1.2-1L3.2 9c-.1-.6.3-1 .8-1Z",key:"1qo33t"}]]);/** + */const u2=e("Popcorn",[["path",{d:"M18 8a2 2 0 0 0 0-4 2 2 0 0 0-4 0 2 2 0 0 0-4 0 2 2 0 0 0-4 0 2 2 0 0 0 0 4",key:"10td1f"}],["path",{d:"M10 22 9 8",key:"yjptiv"}],["path",{d:"m14 22 1-14",key:"8jwc8b"}],["path",{d:"M20 8c.5 0 .9.4.8 1l-2.6 12c-.1.5-.7 1-1.2 1H7c-.6 0-1.1-.4-1.2-1L3.2 9c-.1-.6.3-1 .8-1Z",key:"1qo33t"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const g2=e("Puzzle",[["path",{d:"M15.39 4.39a1 1 0 0 0 1.68-.474 2.5 2.5 0 1 1 3.014 3.015 1 1 0 0 0-.474 1.68l1.683 1.682a2.414 2.414 0 0 1 0 3.414L19.61 15.39a1 1 0 0 1-1.68-.474 2.5 2.5 0 1 0-3.014 3.015 1 1 0 0 1 .474 1.68l-1.683 1.682a2.414 2.414 0 0 1-3.414 0L8.61 19.61a1 1 0 0 0-1.68.474 2.5 2.5 0 1 1-3.014-3.015 1 1 0 0 0 .474-1.68l-1.683-1.682a2.414 2.414 0 0 1 0-3.414L4.39 8.61a1 1 0 0 1 1.68.474 2.5 2.5 0 1 0 3.014-3.015 1 1 0 0 1-.474-1.68l1.683-1.682a2.414 2.414 0 0 1 3.414 0z",key:"w46dr5"}]]);/** + */const f2=e("Puzzle",[["path",{d:"M15.39 4.39a1 1 0 0 0 1.68-.474 2.5 2.5 0 1 1 3.014 3.015 1 1 0 0 0-.474 1.68l1.683 1.682a2.414 2.414 0 0 1 0 3.414L19.61 15.39a1 1 0 0 1-1.68-.474 2.5 2.5 0 1 0-3.014 3.015 1 1 0 0 1 .474 1.68l-1.683 1.682a2.414 2.414 0 0 1-3.414 0L8.61 19.61a1 1 0 0 0-1.68.474 2.5 2.5 0 1 1-3.014-3.015 1 1 0 0 0 .474-1.68l-1.683-1.682a2.414 2.414 0 0 1 0-3.414L4.39 8.61a1 1 0 0 1 1.68.474 2.5 2.5 0 1 0 3.014-3.015 1 1 0 0 1-.474-1.68l1.683-1.682a2.414 2.414 0 0 1 3.414 0z",key:"w46dr5"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const v2=e("Rainbow",[["path",{d:"M22 17a10 10 0 0 0-20 0",key:"ozegv"}],["path",{d:"M6 17a6 6 0 0 1 12 0",key:"5giftw"}],["path",{d:"M10 17a2 2 0 0 1 4 0",key:"gnsikk"}]]);/** + */const w2=e("Rainbow",[["path",{d:"M22 17a10 10 0 0 0-20 0",key:"ozegv"}],["path",{d:"M6 17a6 6 0 0 1 12 0",key:"5giftw"}],["path",{d:"M10 17a2 2 0 0 1 4 0",key:"gnsikk"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const u2=e("SatelliteDish",[["path",{d:"M4 10a7.31 7.31 0 0 0 10 10Z",key:"1fzpp3"}],["path",{d:"m9 15 3-3",key:"88sc13"}],["path",{d:"M17 13a6 6 0 0 0-6-6",key:"15cc6u"}],["path",{d:"M21 13A10 10 0 0 0 11 3",key:"11nf8s"}]]);/** + */const b2=e("SatelliteDish",[["path",{d:"M4 10a7.31 7.31 0 0 0 10 10Z",key:"1fzpp3"}],["path",{d:"m9 15 3-3",key:"88sc13"}],["path",{d:"M17 13a6 6 0 0 0-6-6",key:"15cc6u"}],["path",{d:"M21 13A10 10 0 0 0 11 3",key:"11nf8s"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const f2=e("Satellite",[["path",{d:"M13 7 9 3 5 7l4 4",key:"vyckw6"}],["path",{d:"m17 11 4 4-4 4-4-4",key:"rchckc"}],["path",{d:"m8 12 4 4 6-6-4-4Z",key:"1sshf7"}],["path",{d:"m16 8 3-3",key:"x428zp"}],["path",{d:"M9 21a6 6 0 0 0-6-6",key:"1iajcf"}]]);/** + */const q2=e("Satellite",[["path",{d:"M13 7 9 3 5 7l4 4",key:"vyckw6"}],["path",{d:"m17 11 4 4-4 4-4-4",key:"rchckc"}],["path",{d:"m8 12 4 4 6-6-4-4Z",key:"1sshf7"}],["path",{d:"m16 8 3-3",key:"x428zp"}],["path",{d:"M9 21a6 6 0 0 0-6-6",key:"1iajcf"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const w2=e("ScanEye",[["path",{d:"M3 7V5a2 2 0 0 1 2-2h2",key:"aa7l1z"}],["path",{d:"M17 3h2a2 2 0 0 1 2 2v2",key:"4qcy5o"}],["path",{d:"M21 17v2a2 2 0 0 1-2 2h-2",key:"6vwrx8"}],["path",{d:"M7 21H5a2 2 0 0 1-2-2v-2",key:"ioqczr"}],["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["path",{d:"M18.944 12.33a1 1 0 0 0 0-.66 7.5 7.5 0 0 0-13.888 0 1 1 0 0 0 0 .66 7.5 7.5 0 0 0 13.888 0",key:"11ak4c"}]]);/** + */const z2=e("ScanEye",[["path",{d:"M3 7V5a2 2 0 0 1 2-2h2",key:"aa7l1z"}],["path",{d:"M17 3h2a2 2 0 0 1 2 2v2",key:"4qcy5o"}],["path",{d:"M21 17v2a2 2 0 0 1-2 2h-2",key:"6vwrx8"}],["path",{d:"M7 21H5a2 2 0 0 1-2-2v-2",key:"ioqczr"}],["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["path",{d:"M18.944 12.33a1 1 0 0 0 0-.66 7.5 7.5 0 0 0-13.888 0 1 1 0 0 0 0 .66 7.5 7.5 0 0 0 13.888 0",key:"11ak4c"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const b2=e("ScanFace",[["path",{d:"M3 7V5a2 2 0 0 1 2-2h2",key:"aa7l1z"}],["path",{d:"M17 3h2a2 2 0 0 1 2 2v2",key:"4qcy5o"}],["path",{d:"M21 17v2a2 2 0 0 1-2 2h-2",key:"6vwrx8"}],["path",{d:"M7 21H5a2 2 0 0 1-2-2v-2",key:"ioqczr"}],["path",{d:"M8 14s1.5 2 4 2 4-2 4-2",key:"1y1vjs"}],["path",{d:"M9 9h.01",key:"1q5me6"}],["path",{d:"M15 9h.01",key:"x1ddxp"}]]);/** + */const j2=e("ScanFace",[["path",{d:"M3 7V5a2 2 0 0 1 2-2h2",key:"aa7l1z"}],["path",{d:"M17 3h2a2 2 0 0 1 2 2v2",key:"4qcy5o"}],["path",{d:"M21 17v2a2 2 0 0 1-2 2h-2",key:"6vwrx8"}],["path",{d:"M7 21H5a2 2 0 0 1-2-2v-2",key:"ioqczr"}],["path",{d:"M8 14s1.5 2 4 2 4-2 4-2",key:"1y1vjs"}],["path",{d:"M9 9h.01",key:"1q5me6"}],["path",{d:"M15 9h.01",key:"x1ddxp"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const z2=e("ScanText",[["path",{d:"M3 7V5a2 2 0 0 1 2-2h2",key:"aa7l1z"}],["path",{d:"M17 3h2a2 2 0 0 1 2 2v2",key:"4qcy5o"}],["path",{d:"M21 17v2a2 2 0 0 1-2 2h-2",key:"6vwrx8"}],["path",{d:"M7 21H5a2 2 0 0 1-2-2v-2",key:"ioqczr"}],["path",{d:"M7 8h8",key:"1jbsf9"}],["path",{d:"M7 12h10",key:"b7w52i"}],["path",{d:"M7 16h6",key:"1vyc9m"}]]);/** + */const L2=e("ScanText",[["path",{d:"M3 7V5a2 2 0 0 1 2-2h2",key:"aa7l1z"}],["path",{d:"M17 3h2a2 2 0 0 1 2 2v2",key:"4qcy5o"}],["path",{d:"M21 17v2a2 2 0 0 1-2 2h-2",key:"6vwrx8"}],["path",{d:"M7 21H5a2 2 0 0 1-2-2v-2",key:"ioqczr"}],["path",{d:"M7 8h8",key:"1jbsf9"}],["path",{d:"M7 12h10",key:"b7w52i"}],["path",{d:"M7 16h6",key:"1vyc9m"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const q2=e("Scan",[["path",{d:"M3 7V5a2 2 0 0 1 2-2h2",key:"aa7l1z"}],["path",{d:"M17 3h2a2 2 0 0 1 2 2v2",key:"4qcy5o"}],["path",{d:"M21 17v2a2 2 0 0 1-2 2h-2",key:"6vwrx8"}],["path",{d:"M7 21H5a2 2 0 0 1-2-2v-2",key:"ioqczr"}]]);/** + */const S2=e("Scan",[["path",{d:"M3 7V5a2 2 0 0 1 2-2h2",key:"aa7l1z"}],["path",{d:"M17 3h2a2 2 0 0 1 2 2v2",key:"4qcy5o"}],["path",{d:"M21 17v2a2 2 0 0 1-2 2h-2",key:"6vwrx8"}],["path",{d:"M7 21H5a2 2 0 0 1-2-2v-2",key:"ioqczr"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const j2=e("Scissors",[["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M8.12 8.12 12 12",key:"1alkpv"}],["path",{d:"M20 4 8.12 15.88",key:"xgtan2"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M14.8 14.8 20 20",key:"ptml3r"}]]);/** + */const C2=e("Scissors",[["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M8.12 8.12 12 12",key:"1alkpv"}],["path",{d:"M20 4 8.12 15.88",key:"xgtan2"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M14.8 14.8 20 20",key:"ptml3r"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const S2=e("ScrollText",[["path",{d:"M15 12h-5",key:"r7krc0"}],["path",{d:"M15 8h-5",key:"1khuty"}],["path",{d:"M19 17V5a2 2 0 0 0-2-2H4",key:"zz82l3"}],["path",{d:"M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3",key:"1ph1d7"}]]);/** + */const V2=e("ScrollText",[["path",{d:"M15 12h-5",key:"r7krc0"}],["path",{d:"M15 8h-5",key:"1khuty"}],["path",{d:"M19 17V5a2 2 0 0 0-2-2H4",key:"zz82l3"}],["path",{d:"M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3",key:"1ph1d7"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const L2=e("Shapes",[["path",{d:"M8.3 10a.7.7 0 0 1-.626-1.079L11.4 3a.7.7 0 0 1 1.198-.043L16.3 8.9a.7.7 0 0 1-.572 1.1Z",key:"1bo67w"}],["rect",{x:"3",y:"14",width:"7",height:"7",rx:"1",key:"1bkyp8"}],["circle",{cx:"17.5",cy:"17.5",r:"3.5",key:"w3z12y"}]]);/** + */const A2=e("Shapes",[["path",{d:"M8.3 10a.7.7 0 0 1-.626-1.079L11.4 3a.7.7 0 0 1 1.198-.043L16.3 8.9a.7.7 0 0 1-.572 1.1Z",key:"1bo67w"}],["rect",{x:"3",y:"14",width:"7",height:"7",rx:"1",key:"1bkyp8"}],["circle",{cx:"17.5",cy:"17.5",r:"3.5",key:"w3z12y"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const C2=e("Sheet",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["line",{x1:"3",x2:"21",y1:"9",y2:"9",key:"1vqk6q"}],["line",{x1:"3",x2:"21",y1:"15",y2:"15",key:"o2sbyz"}],["line",{x1:"9",x2:"9",y1:"9",y2:"21",key:"1ib60c"}],["line",{x1:"15",x2:"15",y1:"9",y2:"21",key:"1n26ft"}]]);/** + */const H2=e("Sheet",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["line",{x1:"3",x2:"21",y1:"9",y2:"9",key:"1vqk6q"}],["line",{x1:"3",x2:"21",y1:"15",y2:"15",key:"o2sbyz"}],["line",{x1:"9",x2:"9",y1:"9",y2:"21",key:"1ib60c"}],["line",{x1:"15",x2:"15",y1:"9",y2:"21",key:"1n26ft"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const V2=e("ShieldCheck",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/** + */const T2=e("ShieldCheck",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const A2=e("Sigma",[["path",{d:"M18 7V5a1 1 0 0 0-1-1H6.5a.5.5 0 0 0-.4.8l4.5 6a2 2 0 0 1 0 2.4l-4.5 6a.5.5 0 0 0 .4.8H17a1 1 0 0 0 1-1v-2",key:"wuwx1p"}]]);/** + */const F2=e("Sigma",[["path",{d:"M18 7V5a1 1 0 0 0-1-1H6.5a.5.5 0 0 0-.4.8l4.5 6a2 2 0 0 1 0 2.4l-4.5 6a.5.5 0 0 0 .4.8H17a1 1 0 0 0 1-1v-2",key:"wuwx1p"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const H2=e("Signpost",[["path",{d:"M12 13v8",key:"1l5pq0"}],["path",{d:"M12 3v3",key:"1n5kay"}],["path",{d:"M18 6a2 2 0 0 1 1.387.56l2.307 2.22a1 1 0 0 1 0 1.44l-2.307 2.22A2 2 0 0 1 18 13H6a2 2 0 0 1-1.387-.56l-2.306-2.22a1 1 0 0 1 0-1.44l2.306-2.22A2 2 0 0 1 6 6z",key:"gqqp9m"}]]);/** + */const Z2=e("Signpost",[["path",{d:"M12 13v8",key:"1l5pq0"}],["path",{d:"M12 3v3",key:"1n5kay"}],["path",{d:"M18 6a2 2 0 0 1 1.387.56l2.307 2.22a1 1 0 0 1 0 1.44l-2.307 2.22A2 2 0 0 1 18 13H6a2 2 0 0 1-1.387-.56l-2.306-2.22a1 1 0 0 1 0-1.44l2.306-2.22A2 2 0 0 1 6 6z",key:"gqqp9m"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const T2=e("Siren",[["path",{d:"M7 18v-6a5 5 0 1 1 10 0v6",key:"pcx96s"}],["path",{d:"M5 21a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-1a2 2 0 0 0-2-2H7a2 2 0 0 0-2 2z",key:"1b4s83"}],["path",{d:"M21 12h1",key:"jtio3y"}],["path",{d:"M18.5 4.5 18 5",key:"g5sp9y"}],["path",{d:"M2 12h1",key:"1uaihz"}],["path",{d:"M12 2v1",key:"11qlp1"}],["path",{d:"m4.929 4.929.707.707",key:"1i51kw"}],["path",{d:"M12 12v6",key:"3ahymv"}]]);/** + */const B2=e("Siren",[["path",{d:"M7 18v-6a5 5 0 1 1 10 0v6",key:"pcx96s"}],["path",{d:"M5 21a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-1a2 2 0 0 0-2-2H7a2 2 0 0 0-2 2z",key:"1b4s83"}],["path",{d:"M21 12h1",key:"jtio3y"}],["path",{d:"M18.5 4.5 18 5",key:"g5sp9y"}],["path",{d:"M2 12h1",key:"1uaihz"}],["path",{d:"M12 2v1",key:"11qlp1"}],["path",{d:"m4.929 4.929.707.707",key:"1i51kw"}],["path",{d:"M12 12v6",key:"3ahymv"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const F2=e("SmilePlus",[["path",{d:"M22 11v1a10 10 0 1 1-9-10",key:"ew0xw9"}],["path",{d:"M8 14s1.5 2 4 2 4-2 4-2",key:"1y1vjs"}],["line",{x1:"9",x2:"9.01",y1:"9",y2:"9",key:"yxxnd0"}],["line",{x1:"15",x2:"15.01",y1:"9",y2:"9",key:"1p4y9e"}],["path",{d:"M16 5h6",key:"1vod17"}],["path",{d:"M19 2v6",key:"4bpg5p"}]]);/** + */const P2=e("SmilePlus",[["path",{d:"M22 11v1a10 10 0 1 1-9-10",key:"ew0xw9"}],["path",{d:"M8 14s1.5 2 4 2 4-2 4-2",key:"1y1vjs"}],["line",{x1:"9",x2:"9.01",y1:"9",y2:"9",key:"yxxnd0"}],["line",{x1:"15",x2:"15.01",y1:"9",y2:"9",key:"1p4y9e"}],["path",{d:"M16 5h6",key:"1vod17"}],["path",{d:"M19 2v6",key:"4bpg5p"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Z2=e("Smile",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 14s1.5 2 4 2 4-2 4-2",key:"1y1vjs"}],["line",{x1:"9",x2:"9.01",y1:"9",y2:"9",key:"yxxnd0"}],["line",{x1:"15",x2:"15.01",y1:"9",y2:"9",key:"1p4y9e"}]]);/** + */const N2=e("Smile",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 14s1.5 2 4 2 4-2 4-2",key:"1y1vjs"}],["line",{x1:"9",x2:"9.01",y1:"9",y2:"9",key:"yxxnd0"}],["line",{x1:"15",x2:"15.01",y1:"9",y2:"9",key:"1p4y9e"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const B2=e("Speech",[["path",{d:"M8.8 20v-4.1l1.9.2a2.3 2.3 0 0 0 2.164-2.1V8.3A5.37 5.37 0 0 0 2 8.25c0 2.8.656 3.054 1 4.55a5.77 5.77 0 0 1 .029 2.758L2 20",key:"11atix"}],["path",{d:"M19.8 17.8a7.5 7.5 0 0 0 .003-10.603",key:"yol142"}],["path",{d:"M17 15a3.5 3.5 0 0 0-.025-4.975",key:"ssbmkc"}]]);/** + */const D2=e("Speech",[["path",{d:"M8.8 20v-4.1l1.9.2a2.3 2.3 0 0 0 2.164-2.1V8.3A5.37 5.37 0 0 0 2 8.25c0 2.8.656 3.054 1 4.55a5.77 5.77 0 0 1 .029 2.758L2 20",key:"11atix"}],["path",{d:"M19.8 17.8a7.5 7.5 0 0 0 .003-10.603",key:"yol142"}],["path",{d:"M17 15a3.5 3.5 0 0 0-.025-4.975",key:"ssbmkc"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const P2=e("Spline",[["circle",{cx:"19",cy:"5",r:"2",key:"mhkx31"}],["circle",{cx:"5",cy:"19",r:"2",key:"v8kfzx"}],["path",{d:"M5 17A12 12 0 0 1 17 5",key:"1okkup"}]]);/** + */const G2=e("Spline",[["circle",{cx:"19",cy:"5",r:"2",key:"mhkx31"}],["circle",{cx:"5",cy:"19",r:"2",key:"v8kfzx"}],["path",{d:"M5 17A12 12 0 0 1 17 5",key:"1okkup"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const N2=e("SquareTerminal",[["path",{d:"m7 11 2-2-2-2",key:"1lz0vl"}],["path",{d:"M11 13h4",key:"1p7l4v"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}]]);/** + */const _2=e("SquareTerminal",[["path",{d:"m7 11 2-2-2-2",key:"1lz0vl"}],["path",{d:"M11 13h4",key:"1p7l4v"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const _2=e("Stethoscope",[["path",{d:"M11 2v2",key:"1539x4"}],["path",{d:"M5 2v2",key:"1yf1q8"}],["path",{d:"M5 3H4a2 2 0 0 0-2 2v4a6 6 0 0 0 12 0V5a2 2 0 0 0-2-2h-1",key:"rb5t3r"}],["path",{d:"M8 15a6 6 0 0 0 12 0v-3",key:"x18d4x"}],["circle",{cx:"20",cy:"10",r:"2",key:"ts1r5v"}]]);/** + */const E2=e("Stethoscope",[["path",{d:"M11 2v2",key:"1539x4"}],["path",{d:"M5 2v2",key:"1yf1q8"}],["path",{d:"M5 3H4a2 2 0 0 0-2 2v4a6 6 0 0 0 12 0V5a2 2 0 0 0-2-2h-1",key:"rb5t3r"}],["path",{d:"M8 15a6 6 0 0 0 12 0v-3",key:"x18d4x"}],["circle",{cx:"20",cy:"10",r:"2",key:"ts1r5v"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const E2=e("SwitchCamera",[["path",{d:"M11 19H4a2 2 0 0 1-2-2V7a2 2 0 0 1 2-2h5",key:"mtk2lu"}],["path",{d:"M13 5h7a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2h-5",key:"120jsl"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}],["path",{d:"m18 22-3-3 3-3",key:"kgdoj7"}],["path",{d:"m6 2 3 3-3 3",key:"1fnbkv"}]]);/** + */const I2=e("SwitchCamera",[["path",{d:"M11 19H4a2 2 0 0 1-2-2V7a2 2 0 0 1 2-2h5",key:"mtk2lu"}],["path",{d:"M13 5h7a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2h-5",key:"120jsl"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}],["path",{d:"m18 22-3-3 3-3",key:"kgdoj7"}],["path",{d:"m6 2 3 3-3 3",key:"1fnbkv"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const I2=e("Table",[["path",{d:"M12 3v18",key:"108xh3"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M3 15h18",key:"5xshup"}]]);/** + */const U2=e("Table",[["path",{d:"M12 3v18",key:"108xh3"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M3 15h18",key:"5xshup"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const D2=e("Tag",[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]]);/** + */const W2=e("Tag",[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const G2=e("Tags",[["path",{d:"m15 5 6.3 6.3a2.4 2.4 0 0 1 0 3.4L17 19",key:"1cbfv1"}],["path",{d:"M9.586 5.586A2 2 0 0 0 8.172 5H3a1 1 0 0 0-1 1v5.172a2 2 0 0 0 .586 1.414L8.29 18.29a2.426 2.426 0 0 0 3.42 0l3.58-3.58a2.426 2.426 0 0 0 0-3.42z",key:"135mg7"}],["circle",{cx:"6.5",cy:"9.5",r:".5",fill:"currentColor",key:"5pm5xn"}]]);/** + */const Q2=e("Tags",[["path",{d:"m15 5 6.3 6.3a2.4 2.4 0 0 1 0 3.4L17 19",key:"1cbfv1"}],["path",{d:"M9.586 5.586A2 2 0 0 0 8.172 5H3a1 1 0 0 0-1 1v5.172a2 2 0 0 0 .586 1.414L8.29 18.29a2.426 2.426 0 0 0 3.42 0l3.58-3.58a2.426 2.426 0 0 0 0-3.42z",key:"135mg7"}],["circle",{cx:"6.5",cy:"9.5",r:".5",fill:"currentColor",key:"5pm5xn"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const W2=e("TextSelect",[["path",{d:"M5 3a2 2 0 0 0-2 2",key:"y57alp"}],["path",{d:"M19 3a2 2 0 0 1 2 2",key:"18rm91"}],["path",{d:"M21 19a2 2 0 0 1-2 2",key:"1j7049"}],["path",{d:"M5 21a2 2 0 0 1-2-2",key:"sbafld"}],["path",{d:"M9 3h1",key:"1yesri"}],["path",{d:"M9 21h1",key:"15o7lz"}],["path",{d:"M14 3h1",key:"1ec4yj"}],["path",{d:"M14 21h1",key:"v9vybs"}],["path",{d:"M3 9v1",key:"1r0deq"}],["path",{d:"M21 9v1",key:"mxsmne"}],["path",{d:"M3 14v1",key:"vnatye"}],["path",{d:"M21 14v1",key:"169vum"}],["line",{x1:"7",x2:"15",y1:"8",y2:"8",key:"1758g8"}],["line",{x1:"7",x2:"17",y1:"12",y2:"12",key:"197423"}],["line",{x1:"7",x2:"13",y1:"16",y2:"16",key:"37cgm6"}]]);/** + */const R2=e("TextSelect",[["path",{d:"M5 3a2 2 0 0 0-2 2",key:"y57alp"}],["path",{d:"M19 3a2 2 0 0 1 2 2",key:"18rm91"}],["path",{d:"M21 19a2 2 0 0 1-2 2",key:"1j7049"}],["path",{d:"M5 21a2 2 0 0 1-2-2",key:"sbafld"}],["path",{d:"M9 3h1",key:"1yesri"}],["path",{d:"M9 21h1",key:"15o7lz"}],["path",{d:"M14 3h1",key:"1ec4yj"}],["path",{d:"M14 21h1",key:"v9vybs"}],["path",{d:"M3 9v1",key:"1r0deq"}],["path",{d:"M21 9v1",key:"mxsmne"}],["path",{d:"M3 14v1",key:"vnatye"}],["path",{d:"M21 14v1",key:"169vum"}],["line",{x1:"7",x2:"15",y1:"8",y2:"8",key:"1758g8"}],["line",{x1:"7",x2:"17",y1:"12",y2:"12",key:"197423"}],["line",{x1:"7",x2:"13",y1:"16",y2:"16",key:"37cgm6"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const R2=e("Type",[["polyline",{points:"4 7 4 4 20 4 20 7",key:"1nosan"}],["line",{x1:"9",x2:"15",y1:"20",y2:"20",key:"swin9y"}],["line",{x1:"12",x2:"12",y1:"4",y2:"20",key:"1tx1rr"}]]);/** + */const $2=e("Type",[["polyline",{points:"4 7 4 4 20 4 20 7",key:"1nosan"}],["line",{x1:"9",x2:"15",y1:"20",y2:"20",key:"swin9y"}],["line",{x1:"12",x2:"12",y1:"4",y2:"20",key:"1tx1rr"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const U2=e("UserCheck",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["polyline",{points:"16 11 18 13 22 9",key:"1pwet4"}]]);/** + */const K2=e("UserCheck",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["polyline",{points:"16 11 18 13 22 9",key:"1pwet4"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Q2=e("UserSearch",[["circle",{cx:"10",cy:"7",r:"4",key:"e45bow"}],["path",{d:"M10.3 15H7a4 4 0 0 0-4 4v2",key:"3bnktk"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["path",{d:"m21 21-1.9-1.9",key:"1g2n9r"}]]);/** + */const O2=e("UserSearch",[["circle",{cx:"10",cy:"7",r:"4",key:"e45bow"}],["path",{d:"M10.3 15H7a4 4 0 0 0-4 4v2",key:"3bnktk"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["path",{d:"m21 21-1.9-1.9",key:"1g2n9r"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const K2=e("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]);/** + */const J2=e("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const O2=e("VenetianMask",[["path",{d:"M18 11c-1.5 0-2.5.5-3 2",key:"1fod00"}],["path",{d:"M4 6a2 2 0 0 0-2 2v4a5 5 0 0 0 5 5 8 8 0 0 1 5 2 8 8 0 0 1 5-2 5 5 0 0 0 5-5V8a2 2 0 0 0-2-2h-3a8 8 0 0 0-5 2 8 8 0 0 0-5-2z",key:"d70hit"}],["path",{d:"M6 11c1.5 0 2.5.5 3 2",key:"136fht"}]]);/** + */const X2=e("VenetianMask",[["path",{d:"M18 11c-1.5 0-2.5.5-3 2",key:"1fod00"}],["path",{d:"M4 6a2 2 0 0 0-2 2v4a5 5 0 0 0 5 5 8 8 0 0 1 5 2 8 8 0 0 1 5-2 5 5 0 0 0 5-5V8a2 2 0 0 0-2-2h-3a8 8 0 0 0-5 2 8 8 0 0 0-5-2z",key:"d70hit"}],["path",{d:"M6 11c1.5 0 2.5.5 3 2",key:"136fht"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const $2=e("Vibrate",[["path",{d:"m2 8 2 2-2 2 2 2-2 2",key:"sv1b1"}],["path",{d:"m22 8-2 2 2 2-2 2 2 2",key:"101i4y"}],["rect",{width:"8",height:"14",x:"8",y:"5",rx:"1",key:"1oyrl4"}]]);/** + */const Y2=e("Vibrate",[["path",{d:"m2 8 2 2-2 2 2 2-2 2",key:"sv1b1"}],["path",{d:"m22 8-2 2 2 2-2 2 2 2",key:"101i4y"}],["rect",{width:"8",height:"14",x:"8",y:"5",rx:"1",key:"1oyrl4"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const J2=e("Video",[["path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",key:"ftymec"}],["rect",{x:"2",y:"6",width:"14",height:"12",rx:"2",key:"158x01"}]]);/** + */const ee=e("Video",[["path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",key:"ftymec"}],["rect",{x:"2",y:"6",width:"14",height:"12",rx:"2",key:"158x01"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const X2=e("WandSparkles",[["path",{d:"m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72",key:"ul74o6"}],["path",{d:"m14 7 3 3",key:"1r5n42"}],["path",{d:"M5 6v4",key:"ilb8ba"}],["path",{d:"M19 14v4",key:"blhpug"}],["path",{d:"M10 2v2",key:"7u0qdc"}],["path",{d:"M7 8H3",key:"zfb6yr"}],["path",{d:"M21 16h-4",key:"1cnmox"}],["path",{d:"M11 3H9",key:"1obp7u"}]]);/** + */const ae=e("WandSparkles",[["path",{d:"m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72",key:"ul74o6"}],["path",{d:"m14 7 3 3",key:"1r5n42"}],["path",{d:"M5 6v4",key:"ilb8ba"}],["path",{d:"M19 14v4",key:"blhpug"}],["path",{d:"M10 2v2",key:"7u0qdc"}],["path",{d:"M7 8H3",key:"zfb6yr"}],["path",{d:"M21 16h-4",key:"1cnmox"}],["path",{d:"M11 3H9",key:"1obp7u"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Y2=e("Wind",[["path",{d:"M12.8 19.6A2 2 0 1 0 14 16H2",key:"148xed"}],["path",{d:"M17.5 8a2.5 2.5 0 1 1 2 4H2",key:"1u4tom"}],["path",{d:"M9.8 4.4A2 2 0 1 1 11 8H2",key:"75valh"}]]);/** + */const te=e("Wind",[["path",{d:"M12.8 19.6A2 2 0 1 0 14 16H2",key:"148xed"}],["path",{d:"M17.5 8a2.5 2.5 0 1 1 2 4H2",key:"1u4tom"}],["path",{d:"M9.8 4.4A2 2 0 1 1 11 8H2",key:"75valh"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const ee=e("Wrench",[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z",key:"cbrjhi"}]]);/** + */const ye=e("Wrench",[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z",key:"cbrjhi"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const ae=e("ZoomIn",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"11",x2:"11",y1:"8",y2:"14",key:"1vmskp"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]]),b={"audio-editing":j2,"audio-classification":Q1,"audio-compression":z1,"audio-generation":K,"audio-understanding":v1,"automatic-music-transcription":o2,"automatic-speech-recognition":y2,"full-duplex-spoken-dialogue":M2,"sound-event-detection":T2,"speaker-diarization":K2,"speaker-verification":U2,"speech-enhancement":Q,"speech-translation":R,"spoken-language-identification":_,"text-to-speech":B2,"voice-activity-detection":N,"voice-cloning":i2,agents:a1,"anomaly-detection":V,"autonomous-driving":d1,"classic-reinforcement-learning":H1,"coding-agents":N2,"computer-use-agents":h2,"continual-learning":_1,"deepfake-detection":O2,"document-understanding":P,"embedding-models":O,"emotion-recognition":Z2,"language-modeling":a2,math:A2,"membership-inference":L1,"multimodal-sentiment-analysis":F2,ocr:z2,"omni-models":Y,"open-set-recognition":p1,"pseudo-labelling":D2,reasoning:c1,"reinforcement-learning":B,"remote-sensing":u2,robotics:t1,"scene-text-recognition":H2,"trajectory-prediction":P2,"world-models":u1,"dialogue-state-tracking":t2,"entity-typing":G2,"fake-news-detection":s2,"machine-translation":I1,"named-entity-recognition":N1,"part-of-speech-tagging":R2,"question-answering":Y1,"relation-extraction":R1,summarization:S2,"table-question-answering":I2,"text-classification":U1,"text-reranking":K1,"text-to-sql":Z,biology:g1,"brain-computer-interface":n1,"graph-machine-learning":d2,healthcare:_2,"knowledge-tracing":Z1,"motion-sensing":$2,"recommendation-systems":F,"sleep-stage-classification":T,"tabular-learning":C2,"time-series-classification":s1,"time-series-forecasting":H,"action-recognition":X,"cross-view-object-correspondence":E2,"object-tracking":m1,"video-classification":k1,"video-compression":j1,"video-editing":S1,"video-frame-interpolation":A1,"video-generation":J2,"video-matting":G1,"video-quality-assessment":$,"video-restoration":ee,"video-segmentation":g2,"video-summarization":b1,"video-super-resolution":J1,"video-text-retrieval":n2,"video-understanding":x2,"visual-speech-recognition":o1,"point-tracking":O1,"3d-generation":i1,"3d-instance-segmentation":y1,"3d-object-detection":p2,"3d-scene-graph-generation":A,"3d-semantic-segmentation":D1,"3d-tracking":r2,"3d-understanding":M1,"camera-pose-estimation":r1,"change-detection":x1,"depth-estimation":c2,"document-layout-analysis":W1,"earth-observation":f2,"face-anti-spoofing":V2,"face-recognition":b2,"face-verification":l1,"gaze-estimation":w1,"hyperspectral-image-classification":v2,"image-captioning":e2,"image-classification":C,"image-compression":q1,"image-editing":h1,"image-fusion":X1,"image-generation":l2,"image-inpainting":k2,"image-matching":T1,"image-matting":f1,"image-registration":B1,"image-restoration":J,"image-retrieval":L,"image-segmentation":L2,"image-super-resolution":ae,"image-to-image-translation":X2,"image-understanding":w2,"medical-imaging":e1,"motion-generation":V1,"object-counting":P1,"object-detection":q2,"optical-flow":Y2,"person-re-identification":Q2,"pose-estimation":m2,"saliency-detection":C1,"scene-text-detection":W2,"stereo-matching":F1,"surface-normal-estimation":U,"visual-grounding":$1,"visual-place-recognition":E1};function z(y,h){return b[y.toLowerCase()]??b[(h==null?void 0:h.toLowerCase())??""]??E}const te=y=>(y==null?void 0:y.trim().toLowerCase().replace(/[\s_]+/g,"-"))??"",Ze=()=>{var x,g;const y=k({queryKey:["areas-with-tasks"],queryFn:()=>l.areasWithTasks(),staleTime:6e5}),h=k({queryKey:["trending-tasks-directory"],queryFn:()=>l.trendingTasks({limit:12,min_recent_papers:10}),staleTime:10*60*1e3}),m=k({queryKey:["areas-all"],queryFn:()=>l.listAreas({page_size:50,ordering:"name"}),staleTime:10*60*1e3}),q=p.useMemo(()=>{var o,c,r;const i=new Map((((o=m.data)==null?void 0:o.results)??[]).map(t=>[t.id,t.name])),n=new Map((((c=y.data)==null?void 0:c.results)??[]).flatMap(t=>t.tasks.map(s=>[s.id,s.slug])));return(r=h.data)==null?void 0:r.results.map(t=>({id:t.id,name:f(t.name,t.slug),href:`/tasks/${t.slug}`,icon:z(t.slug??"",t.parent_id?n.get(t.parent_id):void 0),iconColor:v(u(t.slug??"")).dot,areaName:t.area_id?i.get(t.area_id):void 0,recentPaperCount:t.recent_paper_count,shareLift:t.share_lift}))},[h.data,m.data,y.data]),d=p.useMemo(()=>{if(!y.data)return[];const i={general:0,vision:1,video:2,language:3,audio:4,other:5},n=o=>i[te(o)]??999;return[...y.data.results].sort((o,c)=>{const r=n(o.name),t=n(c.name);return r!==t?r-t:o.name.localeCompare(c.name)})},[y.data]);p.useEffect(()=>{var i;!y.data||h.isLoading||!window.location.hash||(i=document.getElementById(window.location.hash.slice(1)))==null||i.scrollIntoView({block:"start"})},[y.data,h.isLoading]);const M=p.useMemo(()=>d.reduce((i,n)=>i+n.tasks.length,0),[d]);return y.error?a.jsx("div",{className:"page",children:a.jsx(I,{variant:"destructive",children:a.jsx(D,{children:"Failed to load taxonomy. Please try again."})})}):a.jsxs("div",{className:"page",children:[a.jsx("div",{className:"feed-header",children:a.jsxs("div",{children:[a.jsxs("h1",{className:"feed-title",children:["All ",a.jsx("em",{children:"Domains"})]}),a.jsx("div",{className:"feed-subtitle",children:"Browse research by area. Click any task to see trending work."})]})}),a.jsx(W,{noun:"task",items:q,recentDays:(x=h.data)==null?void 0:x.recent_days,baselineDays:(g=h.data)==null?void 0:g.baseline_days,isLoading:h.isLoading,error:h.error}),y.isLoading?a.jsx("div",{style:{display:"flex",flexDirection:"column",gap:32},children:Array.from({length:4}).map((i,n)=>a.jsxs("div",{children:[a.jsx(w,{className:"h-8 w-1/3 mb-4"}),a.jsx("div",{className:"tag-grid",children:Array.from({length:6}).map((o,c)=>a.jsx(w,{className:"h-24"},c))})]},n))}):d.map(i=>{const n=i.tasks;if(n.length===0)return null;const o=n.reduce((c,r)=>c+(r.paper_count||0),0);return a.jsxs("section",{id:`area-${S(i.name)}`,style:{marginBottom:48,scrollMarginTop:80},children:[a.jsxs("div",{style:{display:"flex",alignItems:"baseline",justifyContent:"space-between",flexWrap:"wrap",gap:"6px 24px",paddingBottom:12,borderBottom:"1px solid var(--hairline-strong)"},children:[a.jsxs("div",{children:[a.jsx("h2",{style:{fontFamily:"var(--serif)",fontSize:26,fontWeight:500,letterSpacing:"-0.02em",marginBottom:4},children:i.name}),i.description&&a.jsx("div",{style:{fontFamily:"var(--serif)",fontStyle:"italic",fontSize:13,color:"var(--ink-soft)"},children:i.description})]}),a.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",whiteSpace:"nowrap"},children:[n.length," ",n.length===1?"task":"tasks"," · ",o.toLocaleString()," papers"]})]}),a.jsxs("div",{className:"tag-grid",children:[n.map(c=>{const r=c.slug||"",t=v(u(r)),s=z(r);return a.jsxs(j,{to:`/tasks/${r}`,className:"tag-cell",children:[a.jsxs("div",{className:"name",children:[a.jsx("span",{className:"task-icon",style:{color:t.dot},children:a.jsx(s,{size:16,strokeWidth:2,"aria-hidden":"true"})}),f(c.name,r)]}),a.jsx("div",{className:"meta",children:a.jsxs("span",{children:[(c.paper_count??0).toLocaleString()," papers"]})})]},c.id)}),a.jsx(G,{kind:"task"})]})]},i.id)}),M>0&&a.jsxs("div",{style:{fontFamily:"var(--mono)",fontSize:11,color:"var(--ink-faint)",marginTop:24},children:[M," tasks across ",d.filter(i=>i.tasks.length>0).length," areas."]})]})};export{Ze as default}; + */const ie=e("ZoomIn",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"11",x2:"11",y1:"8",y2:"14",key:"1vmskp"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]]),f={"audio-editing":C2,"audio-classification":O1,"audio-compression":L1,"audio-generation":J,"audio-understanding":w1,"automatic-music-transcription":p2,"automatic-speech-recognition":n2,"full-duplex-spoken-dialogue":v2,"sound-event-detection":B2,"speaker-diarization":J2,"speaker-verification":K2,"speech-enhancement":O,"speech-translation":$,"spoken-language-identification":P,"text-to-speech":D2,"voice-activity-detection":B,"voice-cloning":h2,agents:i1,"anomaly-detection":S,"autonomous-driving":k1,"classic-reinforcement-learning":Z1,"coding-agents":_2,"computer-use-agents":o2,"continual-learning":E1,"deepfake-detection":X2,"document-understanding":Z,"embedding-models":X,"emotion-recognition":N2,"language-modeling":i2,math:F2,"membership-inference":A1,"multimodal-sentiment-analysis":P2,ocr:L2,"omni-models":t1,"open-set-recognition":m1,"pseudo-labelling":W2,reasoning:r1,"reinforcement-learning":F,"remote-sensing":b2,robotics:c1,"scene-text-recognition":Z2,"trajectory-prediction":G2,"world-models":b1,"dialogue-state-tracking":c2,"entity-typing":Q2,"fake-news-detection":l2,"machine-translation":U1,"named-entity-recognition":_1,"part-of-speech-tagging":$2,"question-answering":t2,"relation-extraction":$1,summarization:V2,"table-question-answering":U2,"text-classification":K1,"text-reranking":J1,"text-to-sql":T,biology:f1,"brain-computer-interface":d1,"graph-machine-learning":k2,healthcare:E2,"knowledge-tracing":N1,"motion-sensing":Y2,"recommendation-systems":H,"sleep-stage-classification":A,"tabular-learning":H2,"time-series-classification":l1,"time-series-forecasting":V,"action-recognition":a1,"cross-view-object-correspondence":I2,"object-tracking":g1,"video-classification":M1,"video-compression":C1,"video-editing":V1,"video-frame-interpolation":F1,"video-generation":ee,"video-matting":Q1,"video-quality-assessment":Y,"video-restoration":ye,"video-segmentation":f2,"video-summarization":j1,"video-super-resolution":e2,"video-text-retrieval":d2,"video-understanding":u2,"visual-speech-recognition":p1,"point-tracking":X1,"3d-generation":h1,"3d-instance-segmentation":n1,"3d-object-detection":m2,"3d-scene-graph-generation":C,"3d-semantic-segmentation":W1,"3d-tracking":s2,"3d-understanding":v1,"camera-pose-estimation":s1,"change-detection":u1,"depth-estimation":r2,"document-layout-analysis":R1,"earth-observation":q2,"face-anti-spoofing":T2,"face-recognition":j2,"face-verification":x1,"gaze-estimation":z1,"hyperspectral-image-classification":w2,"image-captioning":y2,"image-classification":L,"image-compression":S1,"image-editing":o1,"image-fusion":a2,"image-generation":x2,"image-inpainting":M2,"image-matching":B1,"image-matting":q1,"image-registration":D1,"image-restoration":e1,"image-retrieval":j,"image-segmentation":A2,"image-super-resolution":ie,"image-to-image-translation":ae,"image-understanding":z2,"medical-imaging":y1,"motion-generation":T1,"object-counting":G1,"object-detection":S2,"optical-flow":te,"person-re-identification":O2,"pose-estimation":g2,"saliency-detection":H1,"scene-text-detection":R2,"stereo-matching":P1,"surface-normal-estimation":K,"visual-grounding":Y1,"visual-place-recognition":I1};function w(c,y){return f[c.toLowerCase()]??f[(y==null?void 0:y.toLowerCase())??""]??N}const Ge=()=>{var m,M;const c=s({queryKey:["areas-with-tasks"],queryFn:()=>p.areasWithTasks(),staleTime:6e5}),y=s({queryKey:["trending-tasks-directory"],queryFn:()=>p.trendingTasks({limit:12,min_recent_papers:10}),staleTime:10*60*1e3}),k=s({queryKey:["areas-all"],queryFn:()=>p.listAreas({page_size:50,ordering:"name"}),staleTime:10*60*1e3}),b=x.useMemo(()=>{var r,h,n;const i=new Map((((r=k.data)==null?void 0:r.results)??[]).map(t=>[t.id,t.name])),d=new Map((((h=c.data)==null?void 0:h.results)??[]).flatMap(t=>t.tasks.map(o=>[o.id,o.slug])));return(n=y.data)==null?void 0:n.results.map(t=>({id:t.id,name:u(t.name,t.slug),href:`/tasks/${t.slug}`,icon:w(t.slug??"",t.parent_id?d.get(t.parent_id):void 0),iconColor:g(v(t.slug??"")).dot,areaName:t.area_id?i.get(t.area_id):void 0,recentPaperCount:t.recent_paper_count,shareLift:t.share_lift}))},[y.data,k.data,c.data]),l=x.useMemo(()=>{var i;return R(((i=c.data)==null?void 0:i.results)??[])},[c.data]);return W(!!c.data&&!y.isLoading),c.error?a.jsx("div",{className:"page",children:a.jsx(D,{variant:"destructive",children:a.jsx(G,{children:"Failed to load taxonomy. Please try again."})})}):a.jsxs("div",{className:"page",children:[a.jsx("div",{className:"feed-header",children:a.jsxs("div",{children:[a.jsxs("h1",{className:"feed-title",children:["All ",a.jsx("em",{children:"Domains"})]}),a.jsx("div",{className:"feed-subtitle",children:"Browse research by area. Click any task to see trending work."})]})}),a.jsx(Q,{noun:"task",items:b,recentDays:(m=y.data)==null?void 0:m.recent_days,baselineDays:(M=y.data)==null?void 0:M.baseline_days,isLoading:y.isLoading,error:y.error}),c.isLoading?a.jsx(_,{tiles:6,tileClassName:"h-24"}):l.map(i=>{const d=i.tasks;if(d.length===0)return null;const r=d.reduce((h,n)=>h+(n.paper_count||0),0);return a.jsxs(E,{id:`area-${z(i.name)}`,title:i.name,description:i.description,meta:`${d.length} ${d.length===1?"task":"tasks"} · ${r.toLocaleString()} papers`,children:[d.map(h=>{const n=h.slug||"",t=g(v(n)),o=w(n);return a.jsxs(q,{to:`/tasks/${n}`,className:"tag-cell",children:[a.jsxs("div",{className:"name",children:[a.jsx("span",{className:"task-icon",style:{color:t.dot},children:a.jsx(o,{size:16,strokeWidth:2,"aria-hidden":"true"})}),u(h.name,n)]}),a.jsx("div",{className:"meta",children:a.jsxs("span",{children:[(h.paper_count??0).toLocaleString()," papers"]})})]},h.id)}),a.jsx(U,{kind:"task"})]},i.id)}),a.jsx(I,{areas:l})]})};export{Ge as default}; diff --git a/assets/TaxonomySuggestionTile-BLk1tYYE.js b/assets/TaxonomySuggestionTile-4WqZSJGN.js similarity index 76% rename from assets/TaxonomySuggestionTile-BLk1tYYE.js rename to assets/TaxonomySuggestionTile-4WqZSJGN.js index ad9e0784d1bf4cc04a49f0b36470be953a53c4df..47faeaf2c19668898f316ca707f617b19437c72c 100644 --- a/assets/TaxonomySuggestionTile-BLk1tYYE.js +++ b/assets/TaxonomySuggestionTile-4WqZSJGN.js @@ -1 +1 @@ -import{a as u,r as t,j as e}from"./index-D6jcIRWs.js";import{S as c,a as m}from"./SignInToEditDialog-RzK54RAM.js";import{P as p}from"./plus-C4UQ62Q1.js";function j({kind:s}){const{user:a}=u(),[i,n]=t.useState(!1),[r,o]=t.useState(!1),l=`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"}),l]}),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:r,onOpenChange:o,sectionLabel:`${s}s`,returnTo:typeof window<"u"?window.location.pathname:`/${s}s`,taxonomySuggestion:!0})]})}export{j as T}; +import{a as u,r as t,j as e}from"./index-YwiKC6Po.js";import{S as c,a as m}from"./SignInToEditDialog-DpqyyHCb.js";import{P as p}from"./plus-Cfz0QbT1.js";function j({kind:s}){const{user:a}=u(),[i,n]=t.useState(!1),[r,o]=t.useState(!1),l=`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"}),l]}),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:r,onOpenChange:o,sectionLabel:`${s}s`,returnTo:typeof window<"u"?window.location.pathname:`/${s}s`,taxonomySuggestion:!0})]})}export{j as T}; diff --git a/assets/TaxonomyTrending-Dqu0dPfc.js b/assets/TaxonomyTrending-Dqu0dPfc.js deleted file mode 100644 index e8a53490fc83f0125d29509b1fcda5c426850fc7..0000000000000000000000000000000000000000 --- a/assets/TaxonomyTrending-Dqu0dPfc.js +++ /dev/null @@ -1 +0,0 @@ -import{j as a,L as h}from"./index-D6jcIRWs.js";import{S as x}from"./skeleton-BqkYFmXl.js";import{A as p,a as j}from"./alert-2MbxVzGL.js";import{T as o}from"./trending-up-DqN3HzZ5.js";const y=({noun:n,items:e,recentDays:i=30,baselineDays:t=180,isLoading:d,error:l,mono:c})=>!d&&!l&&!(e!=null&&e.length)?null:a.jsxs("section",{id:"trending",className:"taxonomy-trending","aria-label":`Trending ${n}s`,children:[a.jsxs("div",{className:"taxonomy-trending-header",children:[a.jsxs("h2",{children:[a.jsx(o,{size:22,"aria-hidden":"true"}),"Trending"]}),a.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 ",t," days."]})]}),l?a.jsx(p,{variant:"destructive",children:a.jsxs(j,{children:["Failed to load trending ",n,"s."]})}):d?a.jsx("div",{className:"tag-grid",children:Array.from({length:6}).map((s,r)=>a.jsx(x,{className:"h-20"},r))}):a.jsx("div",{className:"tag-grid",children:e==null?void 0:e.map((s,r)=>a.jsxs(h,{to:s.href,className:"tag-cell",children:[a.jsxs("div",{className:"name",style:c?{fontFamily:"var(--mono)",fontSize:15}:void 0,children:[a.jsx("span",{className:"taxonomy-trending-rank",children:r+1}),s.icon&&a.jsx("span",{className:"task-icon",style:{color:s.iconColor},children:a.jsx(s.icon,{size:16,strokeWidth:2,"aria-hidden":"true"})}),s.name]}),a.jsxs("div",{className:"meta taxonomy-trending-meta",children:[s.areaName&&a.jsxs(a.Fragment,{children:[a.jsx("span",{children:s.areaName}),a.jsx("span",{children:"·"})]}),a.jsxs("span",{children:[s.recentPaperCount.toLocaleString()," papers / ",i,"d"]}),a.jsx("span",{children:"·"}),a.jsxs("span",{className:"method-trend-score taxonomy-trending-lift",title:`Share of recent papers is ${s.shareLift.toFixed(1)}× its baseline share`,children:[a.jsx(o,{size:12,"aria-hidden":"true"}),s.shareLift.toFixed(1),"×"]})]})]},s.id))})]});export{y as T}; diff --git a/assets/TrendsView-BJILFDZ6.js b/assets/TrendsView-BJILFDZ6.js deleted file mode 100644 index 0da7dd2d35343bab418dc174ab6d307f3af51762..0000000000000000000000000000000000000000 --- a/assets/TrendsView-BJILFDZ6.js +++ /dev/null @@ -1 +0,0 @@ -import{a5 as I,K as X,j as e}from"./index-D6jcIRWs.js";import{u as G}from"./useQuery-CUJUm4FY.js";import{A as J,a as E}from"./alert-2MbxVzGL.js";import{S as P}from"./skeleton-BqkYFmXl.js";class K{constructor(r){this.request=r}trends(){return this.request("/stats/trends")}}const Q=new K(I),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)}`},V=()=>Q.trends(),f=980,j=400,x=62,B=26,g=30,Y=58,u=f-x-B,A=j-g-Y,v=g+A,Z=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]=X.useState(null),i=r.length,b=l[l.length-1],d=n=>x+u*(i===1?0:n/(i-1)),p=n=>g+A*(1-n/b);if(i===0)return null;const R=r.map((n,h)=>[d(h),p(n.percent)]),F=Z(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*f,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 ${f} ${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:f-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 ${g+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:g,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)/f*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))})]})]})]})},$={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},re=()=>{const t=G({queryKey:["research-trends"],queryFn:V,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(E,{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{re as default}; diff --git a/assets/TrendsView-CW281bBi.js b/assets/TrendsView-CW281bBi.js new file mode 100644 index 0000000000000000000000000000000000000000..97f35eacc965cc3679a29fdf047178004bf7a816 --- /dev/null +++ b/assets/TrendsView-CW281bBi.js @@ -0,0 +1 @@ +import{K as I,j as e,a5 as X}from"./index-YwiKC6Po.js";import{u as G}from"./useQuery-DPH6Mb2w.js";import{A as J,a as E}from"./alert-Cx5luC5D.js";import{S as P}from"./skeleton-CXR1qouH.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)}`},f=980,j=400,x=62,B=26,g=30,K=58,u=f-x-B,A=j-g-K,v=g+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=>g+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*f,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 ${f} ${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:f-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 ${g+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:g,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)/f*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 V{constructor(r){this.request=r}trends(){return this.request("/stats/trends")}}const Y=new V(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},ne=()=>{const t=G({queryKey:["research-trends"],queryFn:()=>Y.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(E,{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{ne as default}; diff --git a/assets/UserProfileView-CrBLP1Jk.js b/assets/UserProfileView-jtJ9PNjL.js similarity index 86% rename from assets/UserProfileView-CrBLP1Jk.js rename to assets/UserProfileView-jtJ9PNjL.js index d2969c5cbd230c83e0b77ae15fc1cc87880ad453..33b9e13527b9704c3423367868d0f61f3f2d8155 100644 --- a/assets/UserProfileView-CrBLP1Jk.js +++ b/assets/UserProfileView-jtJ9PNjL.js @@ -1 +1 @@ -import{aQ as n,u as i,j as e,ah as o}from"./index-D6jcIRWs.js";import{u as d}from"./useQuery-CUJUm4FY.js";import{C as l}from"./OrganizationContributionGraph-DzcTqxNw.js";import"./skeleton-BqkYFmXl.js";import"./catalog-PYrB8_bm.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}}},j=()=>{const{username:s=""}=i(),a=d({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(o,{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{j as default}; +import{aO as n,u as i,j as e,ah as o}from"./index-YwiKC6Po.js";import{u as d}from"./useQuery-DPH6Mb2w.js";import{C as l}from"./OrganizationContributionGraph-BZyCpVX4.js";import"./skeleton-CXR1qouH.js";import"./catalog-B15Yh5dN.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}}},j=()=>{const{username:s=""}=i(),a=d({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(o,{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{j as default}; diff --git a/assets/activity-5IcAhZoH.js b/assets/activity-95309hog.js similarity index 89% rename from assets/activity-5IcAhZoH.js rename to assets/activity-95309hog.js index 742841b0480693c164c328ed8621cd39daed5ec9..c2cf73aaab8087c988fbe65f82be183882709acd 100644 --- a/assets/activity-5IcAhZoH.js +++ b/assets/activity-95309hog.js @@ -1,4 +1,4 @@ -import{n as t}from"./index-D6jcIRWs.js";/** +import{n as t}from"./index-YwiKC6Po.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/alert-2MbxVzGL.js b/assets/alert-Cx5luC5D.js similarity index 92% rename from assets/alert-2MbxVzGL.js rename to assets/alert-Cx5luC5D.js index 301dfa849663d31f4471c158c511e93f3e962b52..dfdcd3794a6a7746433b86b8b486e37c5964b98e 100644 --- a/assets/alert-2MbxVzGL.js +++ b/assets/alert-Cx5luC5D.js @@ -1 +1 @@ -import{r as a,j as s,B as l,a7 as i}from"./index-D6jcIRWs.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=a.forwardRef(({className:e,variant:t,...r},d)=>s.jsx("div",{ref:d,role:"alert",className:l(o({variant:t}),e),...r}));n.displayName="Alert";const v=a.forwardRef(({className:e,...t},r)=>s.jsx("h5",{ref:r,className:l("mb-1 font-medium leading-none tracking-tight",e),...t}));v.displayName="AlertTitle";const c=a.forwardRef(({className:e,...t},r)=>s.jsx("div",{ref:r,className:l("text-sm [&_p]:leading-relaxed",e),...t}));c.displayName="AlertDescription";export{n as A,c as a}; +import{r as a,j as s,A as l,a7 as i}from"./index-YwiKC6Po.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=a.forwardRef(({className:e,variant:t,...r},d)=>s.jsx("div",{ref:d,role:"alert",className:l(o({variant:t}),e),...r}));n.displayName="Alert";const v=a.forwardRef(({className:e,...t},r)=>s.jsx("h5",{ref:r,className:l("mb-1 font-medium leading-none tracking-tight",e),...t}));v.displayName="AlertTitle";const c=a.forwardRef(({className:e,...t},r)=>s.jsx("div",{ref:r,className:l("text-sm [&_p]:leading-relaxed",e),...t}));c.displayName="AlertDescription";export{n as A,c as a}; diff --git a/assets/apiErrors-DBfE_SVR.js b/assets/apiErrors-DBfE_SVR.js new file mode 100644 index 0000000000000000000000000000000000000000..53251202776fb471f248f46c297c026e39326467 --- /dev/null +++ b/assets/apiErrors-DBfE_SVR.js @@ -0,0 +1 @@ +import{J as s}from"./index-YwiKC6Po.js";const i=o=>o instanceof s&&o.status===404;export{i}; diff --git a/assets/areas-Dvi8w2dp.js b/assets/areas-Dvi8w2dp.js new file mode 100644 index 0000000000000000000000000000000000000000..b5a3cbe99377b2d8c4443d72b63b3cc2224ff441 --- /dev/null +++ b/assets/areas-Dvi8w2dp.js @@ -0,0 +1 @@ +const r={general:0,vision:1,video:2,language:3,audio:4,other:5},n=e=>r[e.trim().toLowerCase().replace(/[\s_]+/g,"-")]??999,s=e=>[...e].sort((a,o)=>n(a.name)-n(o.name)||a.name.localeCompare(o.name));export{s}; diff --git a/assets/arrow-left-IzGlownM.js b/assets/arrow-left-B08fyfNi.js similarity index 86% rename from assets/arrow-left-IzGlownM.js rename to assets/arrow-left-B08fyfNi.js index 2764467a06d5608f33c227f0c971168065d214ec..5ce67e70c2ef8cf8d754afa43c402356f61bb178 100644 --- a/assets/arrow-left-IzGlownM.js +++ b/assets/arrow-left-B08fyfNi.js @@ -1,4 +1,4 @@ -import{n as e}from"./index-D6jcIRWs.js";/** +import{n as e}from"./index-YwiKC6Po.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/arrow-right-CFRHnFt4.js b/assets/arrow-right-CSx7rJG4.js similarity index 86% rename from assets/arrow-right-CFRHnFt4.js rename to assets/arrow-right-CSx7rJG4.js index 35f3140d77186f721cb2c0141993bfc843a2d2f9..232ae976d26fb39c12991e25a5e810dfc6c8523c 100644 --- a/assets/arrow-right-CFRHnFt4.js +++ b/assets/arrow-right-CSx7rJG4.js @@ -1,4 +1,4 @@ -import{n as r}from"./index-D6jcIRWs.js";/** +import{n as r}from"./index-YwiKC6Po.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/badge-t4oak8yc.js b/assets/badge-CFf6CiSg.js similarity index 90% rename from assets/badge-t4oak8yc.js rename to assets/badge-CFf6CiSg.js index d9ae8aa0b1157f4f25648feb74d9e9b10cffeef3..ba0e6aef6e335def07672591768d2adcd2d0ee49 100644 --- a/assets/badge-t4oak8yc.js +++ b/assets/badge-CFf6CiSg.js @@ -1 +1 @@ -import{j as n,B as o,a7 as a}from"./index-D6jcIRWs.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,A as o,a7 as a}from"./index-YwiKC6Po.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-Bzx0ccHH.js b/assets/button-B90pJJiy.js similarity index 89% rename from assets/button-Bzx0ccHH.js rename to assets/button-B90pJJiy.js index b439e4abf0da1f3bd720161d2a3e160af6bd05e3..8932e396fdde22080ade356aa5900dac5c892f47 100644 --- a/assets/button-Bzx0ccHH.js +++ b/assets/button-B90pJJiy.js @@ -1 +1 @@ -import{r as a,j as d,ax as u,B as c,a7 as f}from"./index-D6jcIRWs.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{r as a,j as d,as as u,A as c,a7 as f}from"./index-YwiKC6Po.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-PYrB8_bm.js b/assets/catalog-B15Yh5dN.js similarity index 97% rename from assets/catalog-PYrB8_bm.js rename to assets/catalog-B15Yh5dN.js index 24c1707cd414575a516ddbd6492971f38151980c..1bb31ded82f18bff5106275927a2f3af302ee427 100644 --- a/assets/catalog-PYrB8_bm.js +++ b/assets/catalog-B15Yh5dN.js @@ -1 +1 @@ -import{a5 as o}from"./index-D6jcIRWs.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{a5 as o}from"./index-YwiKC6Po.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-ChnK8XDU.js b/assets/chat-DHGOonJg.js similarity index 97% rename from assets/chat-ChnK8XDU.js rename to assets/chat-DHGOonJg.js index 1cc748172ed3a53595f75d792d84fb48d288b393..723e69e78230005cf83a68905e79ed54e485e958 100644 --- a/assets/chat-ChnK8XDU.js +++ b/assets/chat-DHGOonJg.js @@ -1 +1 @@ -import{a5 as n,aw as r}from"./index-D6jcIRWs.js";class o{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 r(`/chat/latency/${encodeURIComponent(e)}`,{method:"POST",keepalive:!0,body:JSON.stringify(t)})}reportFeedback(e,t,s){return this.request(`/chat/messages/${encodeURIComponent(e)}/feedback`,{method:"POST",body:JSON.stringify({value:t,...s?{comment:s}:{}})})}stream(e,t){return r("/chat/stream",{method:"POST",headers:{Accept:"text/event-stream"},body:JSON.stringify(e),signal:t})}resumeStream(e,t,s){return r(`/chat/sessions/${encodeURIComponent(e)}/stream`,{method:"GET",headers:{Accept:"text/event-stream",...s&&s>0?{"Last-Event-ID":String(s)}:{}},signal:t})}}const h=new o(n);export{h as c}; +import{a5 as n,ar as r}from"./index-YwiKC6Po.js";class o{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 r(`/chat/latency/${encodeURIComponent(e)}`,{method:"POST",keepalive:!0,body:JSON.stringify(t)})}reportFeedback(e,t,s){return this.request(`/chat/messages/${encodeURIComponent(e)}/feedback`,{method:"POST",body:JSON.stringify({value:t,...s?{comment:s}:{}})})}stream(e,t){return r("/chat/stream",{method:"POST",headers:{Accept:"text/event-stream"},body:JSON.stringify(e),signal:t})}resumeStream(e,t,s){return r(`/chat/sessions/${encodeURIComponent(e)}/stream`,{method:"GET",headers:{Accept:"text/event-stream",...s&&s>0?{"Last-Event-ID":String(s)}:{}},signal:t})}}const h=new o(n);export{h as c}; diff --git a/assets/chatSessions-DByIWBno.js b/assets/chatSessions-CdNQ1toA.js similarity index 91% rename from assets/chatSessions-DByIWBno.js rename to assets/chatSessions-CdNQ1toA.js index 226b269ec1f2ab573dd99dd4f9ff47254ae673bc..71c4ad2ef766b1f1348bab40eae48ca8834a6ad5 100644 --- a/assets/chatSessions-DByIWBno.js +++ b/assets/chatSessions-CdNQ1toA.js @@ -1,14 +1,14 @@ -import{j as h,K as f,A as ee,a4 as Oe}from"./index-D6jcIRWs.js";import{u as te}from"./useQuery-CUJUm4FY.js";import{c as m}from"./chat-ChnK8XDU.js";import{a as be}from"./papers-DIIIPDpj.js";const Qe=({light:e})=>h.jsx("span",{className:`chat-spinner${e?" chat-spinner-light":""}`}),Je=({open:e})=>h.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:h.jsx("path",{d:"m6 9 6 6 6-6"})}),Ze=()=>h.jsxs("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[h.jsx("circle",{cx:"12",cy:"12",r:"9"}),h.jsx("path",{d:"m9 12 2 2 4-4"})]}),et=({size:e=14})=>h.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[h.jsx("circle",{cx:"11",cy:"11",r:"7"}),h.jsx("path",{d:"m21 21-4.3-4.3"})]}),tt=()=>h.jsx("svg",{width:"17",height:"17",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.2",children:h.jsx("path",{d:"M12 19V5M5 12l7-7 7 7"})}),rt=()=>h.jsx("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:h.jsx("path",{d:"M12 5v14M5 12h14"})}),nt=()=>h.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",children:[h.jsx("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"}),h.jsx("path",{d:"M9 4v16"})]}),at=()=>h.jsx("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:h.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"})}),ot=({text:e,mentions:t,scrollTop:n=0,variant:r="composer",completion:a=""})=>{const i=[];let s=0;for(const o of[...t].sort((u,d)=>u.start-d.start)){const u=e.slice(o.start,o.end),d=u===o.title||u===`@${o.title}`;o.starte.length||!d||(i.push(e.slice(s,o.start)),i.push(h.jsx("span",{className:`chat-paper-inline-highlight${o.unavailable?" is-unavailable":""}`,"data-paper-route-id":o.route_id,children:u},o.key)),s=o.end)}return i.push(e.slice(s)),a&&i.push(h.jsx("span",{className:"chat-prompt-completion",children:a},"completion")),e.endsWith(` +import{j as h,K as f,J as ee,a4 as Oe}from"./index-YwiKC6Po.js";import{u as te}from"./useQuery-DPH6Mb2w.js";import{c as m}from"./chat-DHGOonJg.js";import{a as be}from"./paperQueryKeys-C5FMa4Oj.js";const Je=({light:e})=>h.jsx("span",{className:`chat-spinner${e?" chat-spinner-light":""}`}),Qe=({open:e})=>h.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:h.jsx("path",{d:"m6 9 6 6 6-6"})}),Ze=()=>h.jsxs("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[h.jsx("circle",{cx:"12",cy:"12",r:"9"}),h.jsx("path",{d:"m9 12 2 2 4-4"})]}),et=({size:e=14})=>h.jsxs("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[h.jsx("circle",{cx:"11",cy:"11",r:"7"}),h.jsx("path",{d:"m21 21-4.3-4.3"})]}),tt=()=>h.jsx("svg",{width:"17",height:"17",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.2",children:h.jsx("path",{d:"M12 19V5M5 12l7-7 7 7"})}),rt=()=>h.jsx("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:h.jsx("path",{d:"M12 5v14M5 12h14"})}),nt=()=>h.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",children:[h.jsx("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"}),h.jsx("path",{d:"M9 4v16"})]}),at=()=>h.jsx("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:h.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"})}),ot=({text:e,mentions:t,scrollTop:n=0,variant:r="composer",completion:a=""})=>{const i=[];let s=0;for(const o of[...t].sort((u,d)=>u.start-d.start)){const u=e.slice(o.start,o.end),d=u===o.title||u===`@${o.title}`;o.starte.length||!d||(i.push(e.slice(s,o.start)),i.push(h.jsx("span",{className:`chat-paper-inline-highlight${o.unavailable?" is-unavailable":""}`,"data-paper-route-id":o.route_id,children:u},o.key)),s=o.end)}return i.push(e.slice(s)),a&&i.push(h.jsx("span",{className:"chat-prompt-completion",children:a},"completion")),e.endsWith(` `)&&i.push("​"),h.jsx("div",{"aria-hidden":"true",className:`chat-paper-highlight-layer chat-paper-highlight-layer-${r}`,children:h.jsx("div",{style:{transform:`translateY(-${n}px)`},children:i})})},st=({open:e,query:t,results:n,activeIndex:r,loading:a,error:i,onSelect:s,id:o="chat-paper-picker",optionIdPrefix:u="chat-paper-option"})=>{if(!e)return null;const d=t.trim()?a?"Searching papers…":i?"Paper search is unavailable":n.length?`${n.length} paper${n.length===1?"":"s"} found`:"No papers found":"Type to search papers";return h.jsxs("div",{className:"chat-paper-picker",id:o,role:"listbox","aria-label":"Paper results",children:[h.jsx("div",{className:"chat-paper-picker-status",role:"status","aria-live":"polite",children:d}),n.map((p,l)=>{const O=p.arxiv_id||p.id,k=p.arxiv_id||(()=>{try{return p.source_url?new URL(p.source_url).hostname:"External resource"}catch{return"External resource"}})();return h.jsxs("button",{type:"button",id:`${u}-${l}`,role:"option","aria-selected":l===r,className:`chat-paper-option${l===r?" is-active":""}`,onMouseDown:P=>{P.preventDefault(),s(p)},children:[h.jsx("span",{className:"chat-paper-option-title",children:p.title}),h.jsx("span",{className:"chat-paper-option-meta",children:k})]},O)})]})},Te=["What are decision models?","Find relevant papers on RLVR","What's the state-of-the-art for real-time object detection?"],Ee=[...Te,"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 "],Ce=3,Re=4,xe=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"]),ke=new RegExp(`(?:^|(?<=[\\s("'“‘]))(?=\\S)`,"g"),Ae=e=>{const t=e.toLowerCase(),n=Ee.find(r=>r.length>e.length&&r.toLowerCase().startsWith(t));return n?n.slice(e.length):""},De=(e,t)=>{const n=[...e.matchAll(ke)].map(r=>r.index??0);for(const r of n.slice(-4)){const a=e.slice(r),i=a.toLowerCase(),s=/\s/.test(a);if(a.length<(s?Ce:Re)||!s&&xe.has(i))continue;const o=t.find(u=>u.length>a.length&&u.toLowerCase().startsWith(i));if(o)return o.slice(a.length)}return""},Le=(e,t)=>!e.trim()||/\s$/.test(e)?"":Ae(e)||De(e,t);function it(e,t=!1){var p;const n=e.text,[r,a]=f.useState(null),i=te({queryKey:["chatAutocompleteVocabulary"],queryFn:()=>m.getAutocompleteVocabulary(),enabled:n.length>0,staleTime:1/0,gcTime:1/0,retry:!1}),s=(r==null?void 0:r.text)===n?r.atEnd:!0,o=e.paperMentions.some(l=>l.end===n.length);return{completion:!t&&s&&!o?Le(n,((p=i.data)==null?void 0:p.names)??[]):"",trackCaret:l=>a({text:l.value,atEnd:l.selectionStart===l.selectionEnd&&l.selectionEnd===l.value.length})}}const ct=e=>e.key==="Tab"&&!e.shiftKey&&!e.altKey&&!e.ctrlKey&&!e.metaKey&&!e.nativeEvent.isComposing,lt=e=>{var n;const t=(n=e.parentElement)==null?void 0:n.querySelector(".chat-paper-highlight-layer");return Math.max(e.scrollHeight,(t==null?void 0:t.scrollHeight)??0)},re=8e3,ne=16384,ae=1e4,E={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 oe(e){return new TextEncoder().encode(e).length}function se(e){return e.replace(/\r\n/g,` `).replace(/\r/g,` -`).replace(/\u00a0/g," ").replace(/[^\S\n]+/g," ").trim()}function ut(e){return`${e.routeId}\0${e.paperVersion}\0${e.page}\0${e.text}`}function dt(e){return{route_id:e.routeId,paper_version:e.paperVersion,page:e.page,text:e.text}}function L(e="",t){return t?{text:e,paperMentions:[],paperSelection:t}:{text:e,paperMentions:[]}}function V(e,t,n){return e.paperSelection?{text:t,paperMentions:n,paperSelection:e.paperSelection}:{text:t,paperMentions:n}}function Pe(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 n=t.page;if(typeof n!="number"||!Number.isInteger(n)||n<1||n>ae||typeof t.text!="string")return;const r=se(t.text);if(r&&!(r.length>re)&&!(oe(r)>ne))return{routeId:t.routeId.trim(),paperVersion:t.paperVersion.trim(),page:n,text:r}}function Ie(e,t){if(typeof e=="string")return L(e);if(!e||typeof e!="object")return t===void 0?null:L(t);const n=e;if(typeof n.text!="string"||!Array.isArray(n.paperMentions))return t===void 0?null:L(t);const r=Pe(n.paperSelection);return r?{text:n.text,paperMentions:n.paperMentions,paperSelection:r}:{text:n.text,paperMentions:n.paperMentions}}function ie(e){return e?e instanceof Element?e:e.parentElement:null}function $(e,t){const n=ie(e);if(!n||!t.contains(n)||!n.closest(".textLayer, .reader-web-document"))return null;const r=n.closest(".pdf-page[data-page], .reader-web-document[data-page]");if(!r||!t.contains(r))return null;const a=Number(r.dataset.page);return!Number.isInteger(a)||a<1||a>ae?null:a}function ht(e){const{selection:t,pagesRoot:n,routeId:r,paperVersion:a,numPages:i}=e;if(!n||!t||t.rangeCount!==1)return t&&t.rangeCount>1?{ok:!1,error:E.crossPage}:{ok:!1,error:null};const s=t.getRangeAt(0);if(s.collapsed)return{ok:!1,error:null};const o=$(s.startContainer,n),u=$(s.endContainer,n),d=ie(s.commonAncestorContainer);if(!d||!n.contains(d))return{ok:!1,error:E.outside};if(o===null||u===null)return{ok:!1,error:E.outside};if(o!==u)return{ok:!1,error:E.crossPage};if(i&&(o<1||o>i))return{ok:!1,error:E.crossPage};const p=t.toString(),l=se(p);return l?l.length>re||oe(l)>ne?{ok:!1,error:E.tooLarge}:{ok:!0,selection:{routeId:r,paperVersion:a,page:o,text:l}}:{ok:!1,error:E.crossPage}}const Ne=10,Me=3;function B(e,t){const r=e.slice(0,t).lastIndexOf("@");if(r<0)return null;const a=r>0?e[r-1]:"";if(a&&/[\p{L}\p{M}\p{N}_@]/u.test(a))return null;const i=e.slice(r+1,t);return/[\n\r@]/.test(i)?null:{start:r,end:t,query:i}}function K(e,t,n){let r=0;for(;ro.end<=r?[o]:o.start>=i?[{...o,start:o.start+s,end:o.end+s}]:[])}function pt({draft:e,onChange:t,enabled:n,textareaRef:r}){var q;const a=`chat-paper-picker-${f.useId().replace(/:/g,"")}`,i=`${a}-option`,[s,o]=f.useState(null),[u,d]=f.useState(""),[p,l]=f.useState(0),[O,k]=f.useState(""),P=f.useRef(new Set);f.useEffect(()=>{n||o(null)},[n]),f.useEffect(()=>{const c=window.setTimeout(()=>d((s==null?void 0:s.query.trim())??""),150);return()=>window.clearTimeout(c)},[s==null?void 0:s.query]);const R=te({queryKey:["chat-paper-mention-search",u.toLowerCase()],queryFn:({signal:c})=>be.search(u,1,10,"hybrid",c),enabled:n&&!!s&&u.length>=1,staleTime:3e4,refetchOnWindowFocus:!1,retry:!1}),_=f.useMemo(()=>{var c;return((c=R.data)==null?void 0:c.results)??[]},[(q=R.data)==null?void 0:q.results]);f.useEffect(()=>l(0),[u]),f.useEffect(()=>{var c;(c=document.getElementById(`${i}-${p}`))==null||c.scrollIntoView({block:"nearest"})},[p,i]);const _e=f.useCallback(c=>{var w;if(!n){o(null);return}const g=c??((w=r.current)==null?void 0:w.selectionStart)??e.text.length;if(e.paperMentions.some(b=>g>b.start&&g<=b.end)){o(null);return}o(B(e.text,g))},[e.paperMentions,e.text,n,r]),we=f.useCallback((c,g)=>{var A;const w=K(e.text,c,e.paperMentions),b=V(e,c,w);t(b);const T=g??((A=r.current)==null?void 0:A.selectionStart)??c.length;n&&!w.some(D=>T>D.start&&T<=D.end)?o(B(c,T)):o(null)},[e,n,t,r]),j=f.useCallback(c=>{if(!s)return!1;const g=c.arxiv_id||c.id,w=new Set(e.paperMentions.map(x=>x.route_id));if(e.paperMentions.length>=Ne)return k("A message can contain at most 10 paper mentions."),!1;if(!w.has(g)&&w.size>=Me)return k("A message can attach at most 3 distinct papers."),!1;const b=c.title,T=e.text.slice(s.end),A=T.length===0,D=e.text.slice(0,s.start)+b+(A?" ":"")+T,Se=K(e.text,D,e.paperMentions),H={key:crypto.randomUUID(),route_id:g,title:c.title,source:c.source==="external"?"external":"arxiv",start:s.start,end:s.start+b.length};return t(V(e,D,[...Se,H].sort((x,I)=>x.start-I.start))),o(null),k(""),window.requestAnimationFrame(()=>{var I,U;const x=H.end+(A||T.startsWith(" ")?1:0);(I=r.current)==null||I.focus(),(U=r.current)==null||U.setSelectionRange(x,x)}),P.current.has(g)||(P.current.add(g),m.prewarmPaperContext(g).catch(()=>{})),!0},[s,e,t,r]),ve=f.useCallback(c=>!s||c.nativeEvent.isComposing?!1:c.key==="Tab"?(o(null),!1):c.key==="Escape"?(c.preventDefault(),o(null),!0):c.key==="ArrowDown"||c.key==="ArrowUp"?(c.preventDefault(),_.length&&l(g=>c.key==="ArrowDown"?(g+1)%_.length:(g-1+_.length)%_.length),!0):c.key==="Home"&&_.length?(c.preventDefault(),l(0),!0):c.key==="End"&&_.length?(c.preventDefault(),l(_.length-1),!0):c.key==="Enter"&&!c.shiftKey?(c.preventDefault(),_[p]?j(_[p]):R.isFetching||o(null),!0):!1,[s,p,_,R.isFetching,j]);return{open:!!s,query:(s==null?void 0:s.query)??"",results:_,activeIndex:p,loading:R.isFetching,error:R.isError,message:O,pickerId:a,optionIdPrefix:i,updateText:we,refresh:_e,select:j,keyDown:ve,close:()=>o(null)}}const y=(e,t)=>new Promise(n=>{const r=setTimeout(a,e);function a(){t==null||t.removeEventListener("abort",a),clearTimeout(r),n()}t==null||t.addEventListener("abort",a)}),v=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}),S={name:"Object Detection",slug:"object-detection"},C={name:"Real-Time Object Detection",slug:"real-time-object-detection"},Ye={"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:v({arxiv_id:"2502.12524",authors:[{name:"Y. Tian"},{name:"Q. Ye"},{name:"D. Doermann"}],published:"2025-02-18",citation_count:412,tasks:[S,C],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:v({arxiv_id:"2407.17140",authors:[{name:"W. Lv"},{name:"Y. Zhao"},{name:"J. Chang"}],published:"2024-07-24",citation_count:268,tasks:[S,C],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:v({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:[S,C],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:v({arxiv_id:"2406.03459",authors:[{name:"Q. Chen"},{name:"X. Su"},{name:"X. Zhang"}],published:"2024-06-05",citation_count:94,tasks:[S,C],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:v({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:[S,C],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:v({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:[S,C],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:v({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"},S],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:v({source:"external",source_url:"https://docs.ultralytics.com/models/",authors:[{name:"Ultralytics"}],published:"2025-01-02",tasks:[S,C],repositories:[{url:"https://github.com/ultralytics/ultralytics",stars:46e3}],project_pages:[{url:"https://docs.ultralytics.com"}]})}},ce=e=>e.map(t=>Ye[t]),G=ce(["2502.12524","2407.17140","2410.13842","2406.03459","2304.08069","2405.14458","2401.17270","158342"]),z=ce(["2410.13842","2502.12524","2407.17140","2405.14458","2304.08069"]),X="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.",Q="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.",J=`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. +`).replace(/\u00a0/g," ").replace(/[^\S\n]+/g," ").trim()}function ut(e){return`${e.routeId}\0${e.paperVersion}\0${e.page}\0${e.text}`}function dt(e){return{route_id:e.routeId,paper_version:e.paperVersion,page:e.page,text:e.text}}function L(e="",t){return t?{text:e,paperMentions:[],paperSelection:t}:{text:e,paperMentions:[]}}function V(e,t,n){return e.paperSelection?{text:t,paperMentions:n,paperSelection:e.paperSelection}:{text:t,paperMentions:n}}function Pe(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 n=t.page;if(typeof n!="number"||!Number.isInteger(n)||n<1||n>ae||typeof t.text!="string")return;const r=se(t.text);if(r&&!(r.length>re)&&!(oe(r)>ne))return{routeId:t.routeId.trim(),paperVersion:t.paperVersion.trim(),page:n,text:r}}function Ie(e,t){if(typeof e=="string")return L(e);if(!e||typeof e!="object")return t===void 0?null:L(t);const n=e;if(typeof n.text!="string"||!Array.isArray(n.paperMentions))return t===void 0?null:L(t);const r=Pe(n.paperSelection);return r?{text:n.text,paperMentions:n.paperMentions,paperSelection:r}:{text:n.text,paperMentions:n.paperMentions}}function ie(e){return e?e instanceof Element?e:e.parentElement:null}function $(e,t){const n=ie(e);if(!n||!t.contains(n)||!n.closest(".textLayer, .reader-web-document"))return null;const r=n.closest(".pdf-page[data-page], .reader-web-document[data-page]");if(!r||!t.contains(r))return null;const a=Number(r.dataset.page);return!Number.isInteger(a)||a<1||a>ae?null:a}function ht(e){const{selection:t,pagesRoot:n,routeId:r,paperVersion:a,numPages:i}=e;if(!n||!t||t.rangeCount!==1)return t&&t.rangeCount>1?{ok:!1,error:E.crossPage}:{ok:!1,error:null};const s=t.getRangeAt(0);if(s.collapsed)return{ok:!1,error:null};const o=$(s.startContainer,n),u=$(s.endContainer,n),d=ie(s.commonAncestorContainer);if(!d||!n.contains(d))return{ok:!1,error:E.outside};if(o===null||u===null)return{ok:!1,error:E.outside};if(o!==u)return{ok:!1,error:E.crossPage};if(i&&(o<1||o>i))return{ok:!1,error:E.crossPage};const p=t.toString(),l=se(p);return l?l.length>re||oe(l)>ne?{ok:!1,error:E.tooLarge}:{ok:!0,selection:{routeId:r,paperVersion:a,page:o,text:l}}:{ok:!1,error:E.crossPage}}const Ne=10,Me=3;function B(e,t){const r=e.slice(0,t).lastIndexOf("@");if(r<0)return null;const a=r>0?e[r-1]:"";if(a&&/[\p{L}\p{M}\p{N}_@]/u.test(a))return null;const i=e.slice(r+1,t);return/[\n\r@]/.test(i)?null:{start:r,end:t,query:i}}function K(e,t,n){let r=0;for(;ro.end<=r?[o]:o.start>=i?[{...o,start:o.start+s,end:o.end+s}]:[])}function pt({draft:e,onChange:t,enabled:n,textareaRef:r}){var q;const a=`chat-paper-picker-${f.useId().replace(/:/g,"")}`,i=`${a}-option`,[s,o]=f.useState(null),[u,d]=f.useState(""),[p,l]=f.useState(0),[O,k]=f.useState(""),P=f.useRef(new Set);f.useEffect(()=>{n||o(null)},[n]),f.useEffect(()=>{const c=window.setTimeout(()=>d((s==null?void 0:s.query.trim())??""),150);return()=>window.clearTimeout(c)},[s==null?void 0:s.query]);const R=te({queryKey:["chat-paper-mention-search",u.toLowerCase()],queryFn:({signal:c})=>be.search(u,1,10,"hybrid",c),enabled:n&&!!s&&u.length>=1,staleTime:3e4,refetchOnWindowFocus:!1,retry:!1}),_=f.useMemo(()=>{var c;return((c=R.data)==null?void 0:c.results)??[]},[(q=R.data)==null?void 0:q.results]);f.useEffect(()=>l(0),[u]),f.useEffect(()=>{var c;(c=document.getElementById(`${i}-${p}`))==null||c.scrollIntoView({block:"nearest"})},[p,i]);const _e=f.useCallback(c=>{var w;if(!n){o(null);return}const g=c??((w=r.current)==null?void 0:w.selectionStart)??e.text.length;if(e.paperMentions.some(b=>g>b.start&&g<=b.end)){o(null);return}o(B(e.text,g))},[e.paperMentions,e.text,n,r]),we=f.useCallback((c,g)=>{var A;const w=K(e.text,c,e.paperMentions),b=V(e,c,w);t(b);const T=g??((A=r.current)==null?void 0:A.selectionStart)??c.length;n&&!w.some(D=>T>D.start&&T<=D.end)?o(B(c,T)):o(null)},[e,n,t,r]),j=f.useCallback(c=>{if(!s)return!1;const g=c.arxiv_id||c.id,w=new Set(e.paperMentions.map(x=>x.route_id));if(e.paperMentions.length>=Ne)return k("A message can contain at most 10 paper mentions."),!1;if(!w.has(g)&&w.size>=Me)return k("A message can attach at most 3 distinct papers."),!1;const b=c.title,T=e.text.slice(s.end),A=T.length===0,D=e.text.slice(0,s.start)+b+(A?" ":"")+T,Se=K(e.text,D,e.paperMentions),H={key:crypto.randomUUID(),route_id:g,title:c.title,source:c.source==="external"?"external":"arxiv",start:s.start,end:s.start+b.length};return t(V(e,D,[...Se,H].sort((x,I)=>x.start-I.start))),o(null),k(""),window.requestAnimationFrame(()=>{var I,U;const x=H.end+(A||T.startsWith(" ")?1:0);(I=r.current)==null||I.focus(),(U=r.current)==null||U.setSelectionRange(x,x)}),P.current.has(g)||(P.current.add(g),m.prewarmPaperContext(g).catch(()=>{})),!0},[s,e,t,r]),ve=f.useCallback(c=>!s||c.nativeEvent.isComposing?!1:c.key==="Tab"?(o(null),!1):c.key==="Escape"?(c.preventDefault(),o(null),!0):c.key==="ArrowDown"||c.key==="ArrowUp"?(c.preventDefault(),_.length&&l(g=>c.key==="ArrowDown"?(g+1)%_.length:(g-1+_.length)%_.length),!0):c.key==="Home"&&_.length?(c.preventDefault(),l(0),!0):c.key==="End"&&_.length?(c.preventDefault(),l(_.length-1),!0):c.key==="Enter"&&!c.shiftKey?(c.preventDefault(),_[p]?j(_[p]):R.isFetching||o(null),!0):!1,[s,p,_,R.isFetching,j]);return{open:!!s,query:(s==null?void 0:s.query)??"",results:_,activeIndex:p,loading:R.isFetching,error:R.isError,message:O,pickerId:a,optionIdPrefix:i,updateText:we,refresh:_e,select:j,keyDown:ve,close:()=>o(null)}}const y=(e,t)=>new Promise(n=>{const r=setTimeout(a,e);function a(){t==null||t.removeEventListener("abort",a),clearTimeout(r),n()}t==null||t.addEventListener("abort",a)}),v=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}),S={name:"Object Detection",slug:"object-detection"},C={name:"Real-Time Object Detection",slug:"real-time-object-detection"},Ye={"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:v({arxiv_id:"2502.12524",authors:[{name:"Y. Tian"},{name:"Q. Ye"},{name:"D. Doermann"}],published:"2025-02-18",citation_count:412,tasks:[S,C],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:v({arxiv_id:"2407.17140",authors:[{name:"W. Lv"},{name:"Y. Zhao"},{name:"J. Chang"}],published:"2024-07-24",citation_count:268,tasks:[S,C],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:v({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:[S,C],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:v({arxiv_id:"2406.03459",authors:[{name:"Q. Chen"},{name:"X. Su"},{name:"X. Zhang"}],published:"2024-06-05",citation_count:94,tasks:[S,C],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:v({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:[S,C],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:v({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:[S,C],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:v({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"},S],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:v({source:"external",source_url:"https://docs.ultralytics.com/models/",authors:[{name:"Ultralytics"}],published:"2025-01-02",tasks:[S,C],repositories:[{url:"https://github.com/ultralytics/ultralytics",stars:46e3}],project_pages:[{url:"https://docs.ultralytics.com"}]})}},ce=e=>e.map(t=>Ye[t]),G=ce(["2502.12524","2407.17140","2410.13842","2406.03459","2304.08069","2405.14458","2401.17270","158342"]),z=ce(["2410.13842","2502.12524","2407.17140","2405.14458","2304.08069"]),X="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.",J="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.",Q=`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. **At the fast / edge end**, [YOLOv12](paper:2502.12524) is the current leader. Its area-attention design pushes attention into the YOLO backbone without the usual latency hit — YOLOv12-N reaches 40.6 mAP at ~1.6 ms on a T4, roughly +1.5 mAP over [YOLOv10](paper:2405.14458) at matched speed. [YOLOv10](paper:2405.14458) is still very relevant because it made the YOLO head NMS-free, cutting real end-to-end latency. **At the high-accuracy end**, the transformer detectors win. [D-FINE](paper:2410.13842) currently holds the accuracy-latency Pareto front, reporting 55.8 mAP by reformulating box regression as fine-grained distribution refinement with self-distillation. It builds on [RT-DETRv2](paper:2407.17140), which hardened the [original RT-DETR](paper:2304.08069) recipe (the paper that first showed DETRs beating YOLOs in real time) with training-only “bag-of-freebies” that add no inference cost. -**My recommendation:** for edge or high-FPS deployment, start with [YOLOv12](paper:2502.12524) — the [Ultralytics framework](paper:158342) has ready-made checkpoints and export paths. If you have GPU headroom and want maximum accuracy while staying real-time, use [D-FINE](paper:2410.13842) or [RT-DETRv2](paper:2407.17140). And if you need open-vocabulary detection rather than fixed COCO classes, [YOLO-World](paper:2401.17270) is the one to look at.`,je=["How do these compare on edge devices like Jetson?","Show me open-vocabulary detectors","What about small-object detection?"];async function*Fe(e,t){const n=()=>(t==null?void 0:t.aborted)===!0,r=e.trim().slice(0,90)||"state-of-the-art real-time object detection";if(yield{type:"stream_start",request_id:"req_mock",session_id:null},await y(350,t),!n()){yield{type:"reasoning_start"};for(let a=0;a{const t=String("0").trim().toLowerCase();return t==="1"||t==="true"||t==="yes"},ft=()=>!0;class F extends Error{constructor(t,n,r,a){super(t),this.code=n,this.status=r,this.retryAfterSeconds=a,this.name="ChatStreamError"}}class Z extends Error{constructor(t="The assistant stream was interrupted."){super(t),this.name="ChatTransportError"}}function mt(e,t){if(ue())try{m.reportLatency(e,t).catch(()=>{})}catch{}}function gt(e,t={}){return ue()?We(e,t):Fe(e.message,t.signal)}function yt(e,t={}){return qe(e,t)}async function*We(e,t){try{const n=await m.stream(e,t.signal);yield*he(n,t)}catch(n){throw de(n)}}async function*qe(e,t){try{const n=await m.resumeStream(e,t.signal,t.afterSequence);yield*he(n,t)}catch(n){throw de(n)}}function de(e){return e instanceof F||e instanceof Z?e:e instanceof SyntaxError?new F("The assistant returned an invalid stream event.","invalid_stream_event"):new Z(e instanceof Error?e.message:"The assistant stream was interrupted.")}function He(e){let t=null,n="message";const r=[];for(const a of e.split(` +**My recommendation:** for edge or high-FPS deployment, start with [YOLOv12](paper:2502.12524) — the [Ultralytics framework](paper:158342) has ready-made checkpoints and export paths. If you have GPU headroom and want maximum accuracy while staying real-time, use [D-FINE](paper:2410.13842) or [RT-DETRv2](paper:2407.17140). And if you need open-vocabulary detection rather than fixed COCO classes, [YOLO-World](paper:2401.17270) is the one to look at.`,je=["How do these compare on edge devices like Jetson?","Show me open-vocabulary detectors","What about small-object detection?"];async function*Fe(e,t){const n=()=>(t==null?void 0:t.aborted)===!0,r=e.trim().slice(0,90)||"state-of-the-art real-time object detection";if(yield{type:"stream_start",request_id:"req_mock",session_id:null},await y(350,t),!n()){yield{type:"reasoning_start"};for(let a=0;a{const t=String("0").trim().toLowerCase();return t==="1"||t==="true"||t==="yes"},ft=()=>!0;class F extends Error{constructor(t,n,r,a){super(t),this.code=n,this.status=r,this.retryAfterSeconds=a,this.name="ChatStreamError"}}class Z extends Error{constructor(t="The assistant stream was interrupted."){super(t),this.name="ChatTransportError"}}function mt(e,t){if(ue())try{m.reportLatency(e,t).catch(()=>{})}catch{}}function gt(e,t={}){return ue()?We(e,t):Fe(e.message,t.signal)}function yt(e,t={}){return qe(e,t)}async function*We(e,t){try{const n=await m.stream(e,t.signal);yield*he(n,t)}catch(n){throw de(n)}}async function*qe(e,t){try{const n=await m.resumeStream(e,t.signal,t.afterSequence);yield*he(n,t)}catch(n){throw de(n)}}function de(e){return e instanceof F||e instanceof Z?e:e instanceof SyntaxError?new F("The assistant returned an invalid stream event.","invalid_stream_event"):new Z(e instanceof Error?e.message:"The assistant stream was interrupted.")}function He(e){let t=null,n="message";const r=[];for(const a of e.split(` `))if(a.startsWith("id:")){const i=a.slice(3).trim();/^[1-9]\d*$/.test(i)&&(t=Number(i))}else a.startsWith("event:")?n=a.slice(6).trimStart():a.startsWith("data:")&&r.push(a.slice(5).trimStart());return{sequence:t,event:n,data:r.join(` `)}}async function*he(e,t){var s;if(!e.ok||!e.body){const o=e.ok?null:new ee(e,await e.text());o&&Oe(o);const u=o==null?void 0:o.detail,d=typeof u=="object"&&u!==null?u:null,p=e.status===403&&!u,l=Number(e.headers.get("Retry-After")),O=Number.isFinite(l)&&l>=0?Math.min(300,Math.ceil(l)):void 0;throw new F(p?"Chat on staging is limited to approved Hugging Face users. Sign in with an approved account and try again.":(o==null?void 0:o.message)||`Chat stream failed (${e.status})`,d&&"code"in d&&typeof d.code=="string"?d.code:p?"staging_access_required":void 0,e.status,O)}const n=e.body.getReader(),r=new TextDecoder;let a="",i=t.afterSequence&&t.afterSequence>0?t.afterSequence:0;try{for(;;){const{done:o,value:u}=await n.read();if(o)break;a+=r.decode(u,{stream:!0});let d;for(;(d=a.indexOf(` -`))!==-1;){const p=a.slice(0,d);a=a.slice(d+2);const l=He(p);if(!l.data||l.data==="[DONE]"||l.sequence!==null&&l.sequence<=i)continue;const O=JSON.parse(l.data);l.sequence!==null&&(i=l.sequence,(s=t.onSequence)==null||s.call(t,l.sequence)),yield O}}}finally{n.releaseLock()}}const W="pwc:chat-oauth-draft",N="pwc:chat-oauth-model",M="pwc:chat-oauth-auto-send",Ue="pwc:chat-oauth-attempted",Y="pwc:chat-reasoning-effort";function _t(e,t,n={}){const r=typeof e=="string"?e:e.text,a=r.length-r.trimStart().length,i=r.trim();if(!i)return;const s=a+i.length,o=typeof e=="string"?[]:e.paperMentions.filter(d=>d.start>=a&&d.end<=s).map(d=>({...d,start:d.start-a,end:d.end-a})),u={text:i,paperMentions:o,...typeof e!="string"&&e.paperSelection?{paperSelection:e.paperSelection}:{}};sessionStorage.setItem(W,u.paperMentions.length||u.paperSelection?JSON.stringify(u):i),n.autoSend===!1?sessionStorage.removeItem(M):sessionStorage.setItem(M,"1"),t?sessionStorage.setItem(N,t):sessionStorage.removeItem(N),sessionStorage.setItem(Y,n.reasoningEffort??le)}function wt(){var r;if(typeof window>"u"||sessionStorage.getItem(M)!=="1")return null;const e=(r=sessionStorage.getItem(W))==null?void 0:r.trim();if(!e)return null;let t=L(e);try{t=Ie(JSON.parse(e),e)??L(e)}catch{}const n=t.text.trim();return n?{prompt:n,draft:{...t,text:n},model:sessionStorage.getItem(N),reasoningEffort:["low","medium","high","max"].includes(sessionStorage.getItem(Y)??"")?sessionStorage.getItem(Y):"low"}:null}function vt(){sessionStorage.removeItem(W),sessionStorage.removeItem(N),sessionStorage.removeItem(M),sessionStorage.removeItem(Ue),sessionStorage.removeItem(Y)}const pe="gpt-5.6-luna@openai",Ve="deepseek-ai/DeepSeek-V4-Flash-0731",$e="openai/gpt-5.6-luna",fe="deepseek-ai/DeepSeek-V4.1-Flash-1017";function St(e,t){var n;return((n=e.find(r=>r.id===t))==null?void 0:n.provider)??(t===$e?"openrouter":t===pe?"openai":"huggingface")}function Ot(e,t){const n=e.find(r=>r.id===t);return n?n.sponsored===!0:t===fe}const bt=[{id:pe,label:"GPT-6 Luna",provider:"openai"},{id:fe,label:"DeepSeek V4.1 Flash",provider:"huggingface",sponsored:!0}],Tt=[{id:Ve,label:"DeepSeek V4 Flash",provider:"huggingface"},{id:"moonshotai/Kimi-K3",label:"Kimi K3",provider:"huggingface"},{id:"gpt-5.6-luna@openrouter",label:"GPT-5.6 Luna",provider:"openrouter"},{id:"gpt-5.6-luna@openai",label:"GPT-6 Luna (Direct)",provider:"openai"}];class Be extends Error{constructor(t,n){super(t),this.status=n}}async function Et(){const e=[];let t=null;do{const n=await m.listSessions(t);e.push(...n.items),t=n.next_cursor}while(t&&e.length<100);return e}function Ct(e,t=le){return m.createSession(e,t)}function Rt(e){return m.getSession(e)}function xt(e,t){return m.updateSession(e,t)}function kt(e){return m.removeSession(e)}function At(){return m.archiveOldChats()}function Dt(){return m.archiveOldestChats()}function Lt(e){return m.cancelSession(e)}function Pt(e){return m.createOrRefreshShare(e)}async function It(e){try{return await m.getSharedChat(e)}catch(t){throw t instanceof ee?new Be(t.message,t.status):t}}async function Nt(){return m.getModels()}function me(e,t){return e.display_blocks.length===0&&e.content?[{kind:"answer",text:e.content,done:!0}]:ge(e.display_blocks,t)}function ge(e,t){const n=e.map(r=>r.kind==="reasoning"?{...r,active:!1,open:!1}:r.kind==="tool"?{...r,status:r.status==="running"?"error":r.status,open:t&&(r.status==="error"||r.status==="denied"||r.status==="running")}:r.kind==="app"?{...r,schema_version:1,result:r.result??{content:[],structuredContent:{},isError:!1},csp:r.csp??{},permissions:r.permissions??{clipboardWrite:!0},height:r.height||525,public_fork:!!r.public_fork}:r.kind==="artifact"?{...r}:{...r,done:!0});return n.filter((r,a)=>{const i=n[a-1];return!(r.kind==="reasoning"&&(i==null?void 0:i.kind)==="reasoning"&&r.text===i.text)})}function ye(e){if(e!=null&&e.text)return{routeId:e.route_id,paperVersion:e.paper_version,page:e.page,text:e.text}}function Mt(e){const t=r=>r==="hf_inference_billing_exhausted"?"Hugging Face could not bill this request. Your included credits may be exhausted; enable or review pay-as-you-go billing in Settings.":r==="hf_inference_credential_expired"?"Your Hugging Face Inference Providers authorization is missing or expired. Re-sign in with Hugging Face to continue.":r==="provider_rate_limit"?"The selected model is temporarily rate-limited. Try again shortly.":r==="provider_timeout"?"The model provider timed out. Try again shortly.":r==="openrouter_monthly_budget_exhausted"?"The remaining shared Papers With Code OpenRouter allowance was not enough to continue this response.":r==="openrouter_staging_funding_disabled"?"Shared staging credits have ended because chat is now live on paperswithcode.co. Continue there with your included monthly allowance.":r==="openrouter_unavailable"?"OpenRouter is currently unavailable. However, you can still bring your own key in Settings.":r==="openrouter_byok_credential_invalid"?"Your OpenRouter API key is no longer valid. Reconnect it in Settings, then try again.":r==="openrouter_byok_billing_error"?"Your OpenRouter key is connected, but OpenRouter rejected billing for the account behind it. A key spending limit is not an account credit balance. Add credits or enable pay-as-you-go in OpenRouter, then try again.":r==="openrouter_byok_rate_limit"?"Your OpenRouter API key is temporarily rate-limited.":r==="openai_budget_exhausted"?"The Papers With Code direct OpenAI allowance is exhausted. Select another model or try again later.":r==="context_too_large"?"This conversation is too large for the selected model. Start a new chat or shorten the context.":["provider_error","provider_unavailable"].includes(r??"")?"The model provider failed before completing the response. You can edit and retry your question.":r==="persistence_error"?"The response could not be saved. You can edit and retry your question.":r==="transcript_mirror_error"?"The conversation could not be saved. Please try again in a new chat.":r==="external_worker_lost"?"The assistant worker lost contact before the response could be saved. You can edit and retry your question.":"The response did not complete. You can edit and retry your question.",n=r=>r==null||["cancelled","interrupted","stopped"].includes(r);return e.messages.flatMap(r=>{if(r.role==="assistant")return[{id:r.id,role:"assistant",blocks:me(r,!0),followups:r.followups,citations:r.citations,finishReason:r.finish_reason??void 0,streaming:!1}];const a={id:r.id,role:"user",text:r.content,paperMentions:(r.paper_mentions??[]).map(s=>({...s,key:s.occurrence_id})),paperSelection:ye(r.paper_selection),revision:r.revision,status:r.status,error:r.status==="complete"?void 0:r.error_code||r.status};if(!["error","interrupted"].includes(r.status))return[a];const i=r.status==="interrupted"&&n(r.error_code);return[a,{id:`${r.id}-${r.status==="interrupted"?"interrupted":"error"}`,role:"assistant",blocks:ge(r.display_blocks,!0),streaming:!1,finishReason:i?"stopped":void 0,error:i?void 0:t(r.error_code),errorCode:i?void 0:r.error_code??void 0}]})}function Yt(e){return e.messages.map(t=>t.role==="user"?{id:t.id,role:"user",text:t.content,paperMentions:(t.paper_mentions??[]).map(n=>({...n,key:n.occurrence_id})),paperSelection:ye(t.paper_selection)}:{id:t.id,role:"assistant",blocks:me(t,!1),citations:t.citations,finishReason:t.finish_reason??void 0,error:t.error??void 0,streaming:!1})}function jt(e){const t=Date.now(),n=new Date().setHours(0,0,0,0),r=[{label:"Today",items:[]},{label:"Previous 7 Days",items:[]},{label:"Previous 30 Days",items:[]},{label:"Older",items:[]}];for(const a of[...e].sort((i,s)=>Date.parse(s.updated_at)-Date.parse(i.updated_at))){const i=Date.parse(a.updated_at),s=t-i;i>=n?r[0].items.push(a):s<7*864e5?r[1].items.push(a):s<30*864e5?r[2].items.push(a):r[3].items.push(a)}return r.filter(a=>a.items.length>0)}export{Ze as $,tt as A,ft as B,Be as C,pe as D,Rt as E,Mt as F,Et as G,wt as H,Tt as I,bt as J,St as K,Ot as L,W as M,N,Y as O,ot as P,M as Q,Ue as R,Te as S,at as T,vt as U,Nt as V,Ie as W,xt as X,kt as Y,ht as Z,ut as _,it as a,Je as a0,et as a1,st as b,lt as c,Ct as d,Qe as e,ue as f,It as g,rt as h,ct as i,nt as j,jt as k,Pt as l,Dt as m,At as n,Z as o,Yt as p,_t as q,mt as r,yt as s,F as t,pt as u,L as v,le as w,Lt as x,dt as y,gt as z}; +`))!==-1;){const p=a.slice(0,d);a=a.slice(d+2);const l=He(p);if(!l.data||l.data==="[DONE]"||l.sequence!==null&&l.sequence<=i)continue;const O=JSON.parse(l.data);l.sequence!==null&&(i=l.sequence,(s=t.onSequence)==null||s.call(t,l.sequence)),yield O}}}finally{n.releaseLock()}}const W="pwc:chat-oauth-draft",N="pwc:chat-oauth-model",M="pwc:chat-oauth-auto-send",Ue="pwc:chat-oauth-attempted",Y="pwc:chat-reasoning-effort";function _t(e,t,n={}){const r=typeof e=="string"?e:e.text,a=r.length-r.trimStart().length,i=r.trim();if(!i)return;const s=a+i.length,o=typeof e=="string"?[]:e.paperMentions.filter(d=>d.start>=a&&d.end<=s).map(d=>({...d,start:d.start-a,end:d.end-a})),u={text:i,paperMentions:o,...typeof e!="string"&&e.paperSelection?{paperSelection:e.paperSelection}:{}};sessionStorage.setItem(W,u.paperMentions.length||u.paperSelection?JSON.stringify(u):i),n.autoSend===!1?sessionStorage.removeItem(M):sessionStorage.setItem(M,"1"),t?sessionStorage.setItem(N,t):sessionStorage.removeItem(N),sessionStorage.setItem(Y,n.reasoningEffort??le)}function wt(){var r;if(typeof window>"u"||sessionStorage.getItem(M)!=="1")return null;const e=(r=sessionStorage.getItem(W))==null?void 0:r.trim();if(!e)return null;let t=L(e);try{t=Ie(JSON.parse(e),e)??L(e)}catch{}const n=t.text.trim();return n?{prompt:n,draft:{...t,text:n},model:sessionStorage.getItem(N),reasoningEffort:["low","medium","high","max"].includes(sessionStorage.getItem(Y)??"")?sessionStorage.getItem(Y):"low"}:null}function vt(){sessionStorage.removeItem(W),sessionStorage.removeItem(N),sessionStorage.removeItem(M),sessionStorage.removeItem(Ue),sessionStorage.removeItem(Y)}const pe="gpt-5.6-luna@openai",Ve="deepseek-ai/DeepSeek-V4-Flash-0731",$e="openai/gpt-5.6-luna",fe="deepseek-ai/DeepSeek-V4.1-Flash-1017";function St(e,t){var n;return((n=e.find(r=>r.id===t))==null?void 0:n.provider)??(t===$e?"openrouter":t===pe?"openai":"huggingface")}function Ot(e,t){const n=e.find(r=>r.id===t);return n?n.sponsored===!0:t===fe}const bt=[{id:pe,label:"GPT-6 Luna",provider:"openai"},{id:fe,label:"DeepSeek V4.1 Flash",provider:"huggingface",sponsored:!0}],Tt=[{id:Ve,label:"DeepSeek V4 Flash",provider:"huggingface"},{id:"moonshotai/Kimi-K3",label:"Kimi K3",provider:"huggingface"},{id:"gpt-5.6-luna@openrouter",label:"GPT-5.6 Luna",provider:"openrouter"},{id:"gpt-5.6-luna@openai",label:"GPT-6 Luna (Direct)",provider:"openai"}];class Be extends Error{constructor(t,n){super(t),this.status=n}}async function Et(){const e=[];let t=null;do{const n=await m.listSessions(t);e.push(...n.items),t=n.next_cursor}while(t&&e.length<100);return e}function Ct(e,t=le){return m.createSession(e,t)}function Rt(e){return m.getSession(e)}function xt(e,t){return m.updateSession(e,t)}function kt(e){return m.removeSession(e)}function At(){return m.archiveOldChats()}function Dt(){return m.archiveOldestChats()}function Lt(e){return m.cancelSession(e)}function Pt(e){return m.createOrRefreshShare(e)}async function It(e){try{return await m.getSharedChat(e)}catch(t){throw t instanceof ee?new Be(t.message,t.status):t}}async function Nt(){return m.getModels()}function me(e,t){return e.display_blocks.length===0&&e.content?[{kind:"answer",text:e.content,done:!0}]:ge(e.display_blocks,t)}function ge(e,t){const n=e.map(r=>r.kind==="reasoning"?{...r,active:!1,open:!1}:r.kind==="tool"?{...r,status:r.status==="running"?"error":r.status,open:t&&(r.status==="error"||r.status==="denied"||r.status==="running")}:r.kind==="app"?{...r,schema_version:1,result:r.result??{content:[],structuredContent:{},isError:!1},csp:r.csp??{},permissions:r.permissions??{clipboardWrite:!0},height:r.height||525,public_fork:!!r.public_fork}:r.kind==="artifact"?{...r}:{...r,done:!0});return n.filter((r,a)=>{const i=n[a-1];return!(r.kind==="reasoning"&&(i==null?void 0:i.kind)==="reasoning"&&r.text===i.text)})}function ye(e){if(e!=null&&e.text)return{routeId:e.route_id,paperVersion:e.paper_version,page:e.page,text:e.text}}function Mt(e){const t=r=>r==="hf_inference_billing_exhausted"?"Hugging Face could not bill this request. Your included credits may be exhausted; enable or review pay-as-you-go billing in Settings.":r==="hf_inference_credential_expired"?"Your Hugging Face Inference Providers authorization is missing or expired. Re-sign in with Hugging Face to continue.":r==="provider_rate_limit"?"The selected model is temporarily rate-limited. Try again shortly.":r==="provider_timeout"?"The model provider timed out. Try again shortly.":r==="openrouter_monthly_budget_exhausted"?"The remaining shared Papers With Code OpenRouter allowance was not enough to continue this response.":r==="openrouter_staging_funding_disabled"?"Shared staging credits have ended because chat is now live on paperswithcode.co. Continue there with your included monthly allowance.":r==="openrouter_unavailable"?"OpenRouter is currently unavailable. However, you can still bring your own key in Settings.":r==="openrouter_byok_credential_invalid"?"Your OpenRouter API key is no longer valid. Reconnect it in Settings, then try again.":r==="openrouter_byok_billing_error"?"Your OpenRouter key is connected, but OpenRouter rejected billing for the account behind it. A key spending limit is not an account credit balance. Add credits or enable pay-as-you-go in OpenRouter, then try again.":r==="openrouter_byok_rate_limit"?"Your OpenRouter API key is temporarily rate-limited.":r==="openai_budget_exhausted"?"The Papers With Code direct OpenAI allowance is exhausted. Select another model or try again later.":r==="context_too_large"?"This conversation is too large for the selected model. Start a new chat or shorten the context.":["provider_error","provider_unavailable"].includes(r??"")?"The model provider failed before completing the response. You can edit and retry your question.":r==="persistence_error"?"The response could not be saved. You can edit and retry your question.":r==="transcript_mirror_error"?"The conversation could not be saved. Please try again in a new chat.":r==="external_worker_lost"?"The assistant worker lost contact before the response could be saved. You can edit and retry your question.":"The response did not complete. You can edit and retry your question.",n=r=>r==null||["cancelled","interrupted","stopped"].includes(r);return e.messages.flatMap(r=>{if(r.role==="assistant")return[{id:r.id,role:"assistant",blocks:me(r,!0),followups:r.followups,citations:r.citations,finishReason:r.finish_reason??void 0,streaming:!1}];const a={id:r.id,role:"user",text:r.content,paperMentions:(r.paper_mentions??[]).map(s=>({...s,key:s.occurrence_id})),paperSelection:ye(r.paper_selection),revision:r.revision,status:r.status,error:r.status==="complete"?void 0:r.error_code||r.status};if(!["error","interrupted"].includes(r.status))return[a];const i=r.status==="interrupted"&&n(r.error_code);return[a,{id:`${r.id}-${r.status==="interrupted"?"interrupted":"error"}`,role:"assistant",blocks:ge(r.display_blocks,!0),streaming:!1,finishReason:i?"stopped":void 0,error:i?void 0:t(r.error_code),errorCode:i?void 0:r.error_code??void 0}]})}function Yt(e){return e.messages.map(t=>t.role==="user"?{id:t.id,role:"user",text:t.content,paperMentions:(t.paper_mentions??[]).map(n=>({...n,key:n.occurrence_id})),paperSelection:ye(t.paper_selection)}:{id:t.id,role:"assistant",blocks:me(t,!1),citations:t.citations,finishReason:t.finish_reason??void 0,error:t.error??void 0,streaming:!1})}function jt(e){const t=Date.now(),n=new Date().setHours(0,0,0,0),r=[{label:"Today",items:[]},{label:"Previous 7 Days",items:[]},{label:"Previous 30 Days",items:[]},{label:"Older",items:[]}];for(const a of[...e].sort((i,s)=>Date.parse(s.updated_at)-Date.parse(i.updated_at))){const i=Date.parse(a.updated_at),s=t-i;i>=n?r[0].items.push(a):s<7*864e5?r[1].items.push(a):s<30*864e5?r[2].items.push(a):r[3].items.push(a)}return r.filter(a=>a.items.length>0)}export{Ze as $,tt as A,ft as B,Be as C,pe as D,Rt as E,Mt as F,Et as G,wt as H,Tt as I,bt as J,St as K,Ot as L,W as M,N,Y as O,ot as P,M as Q,Ue as R,Te as S,at as T,vt as U,Nt as V,Ie as W,xt as X,kt as Y,ht as Z,ut as _,it as a,Qe as a0,et as a1,st as b,lt as c,Ct as d,Je as e,ue as f,It as g,rt as h,ct as i,nt as j,jt as k,Pt as l,Dt as m,At as n,Z as o,Yt as p,_t as q,mt as r,yt as s,F as t,pt as u,L as v,le as w,Lt as x,dt as y,gt as z}; diff --git a/assets/chevron-up-CQKUhZ0S.js b/assets/chevron-up-BXtxbTfV.js similarity index 91% rename from assets/chevron-up-CQKUhZ0S.js rename to assets/chevron-up-BXtxbTfV.js index 604d7d6f5bc7036e80753a5444d3bac2ae5c44ca..ca2699da91fe4c3bcfedbd3b145b61edf721e633 100644 --- a/assets/chevron-up-CQKUhZ0S.js +++ b/assets/chevron-up-BXtxbTfV.js @@ -1,4 +1,4 @@ -import{n as o}from"./index-D6jcIRWs.js";/** +import{n as o}from"./index-YwiKC6Po.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/circle-check-BZn9Lr76.js b/assets/circle-check-BPcHPjjB.js similarity index 87% rename from assets/circle-check-BZn9Lr76.js rename to assets/circle-check-BPcHPjjB.js index 88b4fd069dab5c1754911da2c3661c052d399188..25e7c39cc1e5daede0ef18775c5fd13cbe79f80e 100644 --- a/assets/circle-check-BZn9Lr76.js +++ b/assets/circle-check-BPcHPjjB.js @@ -1,4 +1,4 @@ -import{n as c}from"./index-D6jcIRWs.js";/** +import{n as c}from"./index-YwiKC6Po.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/codex-P8vYbo4B.js b/assets/codex-C9BvAdr-.js similarity index 95% rename from assets/codex-P8vYbo4B.js rename to assets/codex-C9BvAdr-.js index 44f427e2ae2696073a3343831f0dcc31aa140a6d..b72710c4f2c068547ac45c8de99b707ddd1e43f0 100644 --- a/assets/codex-P8vYbo4B.js +++ b/assets/codex-C9BvAdr-.js @@ -1 +1 @@ -import{a5 as i,$ as c}from"./index-D6jcIRWs.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{a5 as i,$ as c}from"./index-YwiKC6Po.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/colors-BkWRhvFI.js b/assets/colors-BkWRhvFI.js new file mode 100644 index 0000000000000000000000000000000000000000..fed2187b9135b3fde6f7bef892dff80ce244e62c --- /dev/null +++ b/assets/colors-BkWRhvFI.js @@ -0,0 +1 @@ +function l(t){let o=2166136261;const h=t||"";for(let c=0;c{const a=S(),g=B(t),l=I(g),f=i=>{if(i.stopPropagation(),r){r(t);return}a(`/tasks/${t}`)};return e.jsxs("span",{className:"tag-chip",style:{background:l.bg,color:l.text},onClick:f,children:[e.jsx("span",{className:"dot",style:{background:l.dot}}),D(s||G(t),t)]})},O=({method:t,onClick:s})=>{const r=S(),a=t.slug||t.id||"";if(!a)return null;const g=l=>{if(l.stopPropagation(),s){s(a);return}r(`/methods/${a}`)};return e.jsx("span",{className:"method-chip",onClick:g,children:t.name})},$={1:"SOTA 🏆",2:"#2",3:"#3"},w=({units:t,paperHref:s})=>{const r=m.useRef(null),a=m.useRef(null),[g,l]=m.useState(t.length);if(m.useLayoutEffect(()=>{const n=r.current,u=a.current;if(!n||!u||t.length===0)return;const x=h=>(u.textContent=h,u.scrollWidth),j=()=>{const h=n.clientWidth;if(h<=0)return;let c=0,d=0;for(const L of t){const p=x(L.measureText);if(c+p<=h)c+=p,d+=1;else break}if(d0&&c+x(` · +${t.length-d} more`)>h;)d-=1,c-=x(t[d].measureText);d===0&&(d=1)}l(d)};j();const o=new ResizeObserver(j);return o.observe(n),()=>o.disconnect()},[t]),t.length===0)return null;const f=t.slice(0,Math.max(1,Math.min(g,t.length))),i=t.length-f.length;return e.jsxs("div",{className:"paper-sota",ref:r,children:[e.jsx("span",{ref:a,className:"paper-sota-measure","aria-hidden":"true"}),f.map((n,u)=>e.jsxs(m.Fragment,{children:[n.isGroupStart?e.jsxs(e.Fragment,{children:[u>0&&e.jsx("span",{className:"paper-sota-sep",children:" · "}),e.jsx("span",{className:`paper-sota-label${n.rank===1?" paper-sota-label--sota":""}`,children:$[n.rank]}),e.jsx("span",{className:"paper-sota-on",children:" on "})]}):e.jsx("span",{className:"paper-sota-sep",children:", "}),n.href?e.jsx(y,{to:n.href,className:"paper-sota-name",onClick:x=>x.stopPropagation(),children:n.name}):e.jsx("span",{className:"paper-sota-name",children:n.name})]},`${n.href||n.name}-${u}`)),i>0&&e.jsxs(y,{to:`${s}#results`,className:"paper-sota-more",onClick:n=>n.stopPropagation(),children:[" · +",i," more"]})]})},U=({ranks:t,paperHref:s,wrap:r=!1})=>{const a=m.useMemo(()=>{const l=[];let f=!0;for(const i of[1,2,3]){const n=t.filter(u=>u.rank===i);n.forEach((u,x)=>{const j=x===0,o=j?`${f?"":" · "}${$[i]} on `:", ";l.push({name:u.name,href:u.href,rank:i,isGroupStart:j,measureText:o+u.name})}),n.length>0&&(f=!1)}return l},[t]),g=m.useMemo(()=>[1,2,3].map(l=>t.filter(i=>i.rank===l).map((i,n)=>({name:i.name,href:i.href,rank:l,isGroupStart:n===0,measureText:(n===0?`${$[l]} on `:", ")+i.name}))).filter(l=>l.length>0),[t]);return r?g.length===0?null:e.jsx("div",{className:"paper-sota-stack",children:g.map(l=>e.jsx(w,{units:l,paperHref:s},l[0].rank))}):a.length===0?null:e.jsx(w,{units:a,paperHref:s})},_=({name:t,size:s=14})=>{const r={search:e.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:e.jsx("path",{d:"M8 3l5 6H3l5-6z",fill:"currentColor"}),arrowLeft:e.jsx("path",{d:"M9 3l-4 5 4 5",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"}),arrowRight:e.jsx("path",{d:"M7 3l4 5-4 5",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"}),external:e.jsx("path",{d:"M5 3h-2v8h8v-2M9 3h3v3M7 9l5-5",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"}),github:e.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:e.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:e.jsx("path",{d:"M4 2h8v12l-4-3-4 3V2z",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinejoin:"round"}),chart:e.jsx("path",{d:"M2 13h12M3 11l3-4 3 2 4-5",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"}),chat:e.jsx("path",{d:"M3 3h10v7H7l-3 3v-3H3V3z",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinejoin:"round"}),pdf:e.jsx("path",{d:"M5 2h5l3 3v9H5V2z",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinejoin:"round"}),copy:e.jsx("path",{d:"M5 5h7v8H5V5zM3 3h7v2M3 3v8h2",stroke:"currentColor",strokeWidth:"1.2",fill:"none",strokeLinejoin:"round"}),sparkle:e.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:e.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:e.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:e.jsx("path",{d:"M2 4h12M2 8h12M2 12h12",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"}),close:e.jsx("path",{d:"M3 3l10 10M13 3L3 13",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round"}),pencil:e.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 e.jsx("svg",{className:s===11?"icon-sm":"icon",viewBox:"0 0 16 16",width:s,height:s,children:r[t]})},V=({size:t=16})=>e.jsxs("svg",{className:"hf-logo",width:t,height:t,viewBox:"0 0 95 88",fill:"none","aria-hidden":"true",focusable:"false",children:[e.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"}),e.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"}),e.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"}),e.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"}),e.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"}),e.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"}),e.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"}),e.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"}),e.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"})]}),q=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)},Y=({paperId:t})=>{const s=q(t),r=160,a=220,g=[.85+s()*.1,.55+s()*.25],l=.45+s()*.3,f=[],i=9+Math.floor(s()*3);for(let M=0;M.3,u=Math.floor(s()*3),x=[],j=6+Math.floor(s()*3);for(let M=0;Me.jsx("rect",{x:c+(r-c*2)*(1-M)/2,y:A+v*2.4,width:(r-c*2)*M,height:1.4,fill:h,rx:.3},`t${v}`)),e.jsx("rect",{x:c+(r-c*2)*(1-l)/2,y:z,width:(r-c*2)*l,height:.9,fill:o,opacity:.7,rx:.2}),e.jsx("rect",{x:c,y:W,width:6,height:1,fill:h,opacity:.6}),f.map((M,v)=>{const C=k+v*2.1;return C>a-c-1?null:e.jsx("rect",{x:L,y:C,width:d*M,height:.8,fill:o,opacity:.55,rx:.2},`l${v}`)}),n&&e.jsxs("g",{children:[e.jsx("rect",{x:p,y:k,width:d,height:14,fill:"#F0EBE0",stroke:o,strokeWidth:.3,opacity:.9}),u===0&&e.jsx("g",{stroke:h,strokeWidth:.4,fill:"none",opacity:.6,children:e.jsx("polyline",{points:`${p+2},${k+11} ${p+6},${k+8} ${p+10},${k+9} ${p+14},${k+5} ${p+18},${k+6} ${p+22},${k+3}`})}),u===1&&e.jsxs("g",{opacity:.55,children:[e.jsx("circle",{cx:p+d/2,cy:k+7,r:3.5,fill:h}),e.jsx("rect",{x:p+2,y:k+11,width:d-4,height:1.5,fill:o})]}),u===2&&e.jsxs("g",{opacity:.55,children:[e.jsx("rect",{x:p+3,y:k+5,width:d-6,height:1,fill:h}),e.jsx("rect",{x:p+6,y:k+8,width:d-12,height:.8,fill:h})]})]}),x.map((M,v)=>{const C=k+(n?16:0)+v*2.1;return C>a-c-1?null:e.jsx("rect",{x:p,y:C,width:d*M,height:.8,fill:o,opacity:.55,rx:.2},`r${v}`)})]})})},Q=({paperId:t,title:s,thumbnailUrl:r,priority:a=!1})=>{const[g,l]=m.useState(!1),[f,i]=m.useState(0),[n,u]=m.useState(a),x=m.useRef(null);m.useEffect(()=>{l(!1),i(0)},[r]);const j=m.useMemo(()=>{if(!r)return null;if(f===0)return r;const o=r.includes("?")?"&":"?";return`${r}${o}retry=${f}`},[r,f]);return m.useEffect(()=>{if(a||n)return;const o=x.current;if(!o)return;const h=new IntersectionObserver(([c])=>{c.isIntersecting&&(u(!0),h.disconnect())},{rootMargin:"250px"});return h.observe(o),()=>h.disconnect()},[a,n]),r&&!g?e.jsx("div",{ref:x,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)&&j&&e.jsx("img",{src:j,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(f<1){i(o=>o+1);return}l(!0)}},j)}):e.jsx(Y,{paperId:t})};function J(t){const s=[...new Set(t.map(a=>a.replace(/ \(subtask\)$/,"")))],r=s.length>3?[...s.slice(0,2),`${s.length-2} more`]:s;return r.length>1?`${r.slice(0,-1).join(", ")} and ${r[r.length-1]}`:r[0]}const X="language-modeling";function F(t){return t?t.toLowerCase().replace(/\(.*?\)/g," ").replace(/[^a-z]+/g," ").replace(/\bllm\b/g," ").replace(/\s+/g," ").trim().replace(/s$/,""):""}function ee(t){return F(t.slug)==="large language model"||F(t.name)==="large language model"}function te(t){return t.tags.includes(X)?t.methods.filter(s=>!ee(s)):t.methods}const se=({name:t,slug:s,logoUrl:r})=>{const[a,g]=m.useState(!1);return!r||a?null:e.jsx(y,{to:`/orgs/${s}`,className:"paper-organization-logo","aria-label":`View ${t} organization`,title:t,children:e.jsx("img",{src:r,alt:"",onError:()=>g(!0)})})},he=({paper:t,rank:s,showInstitution:r=!0,onClickTag:a,highlightQuery:g,followReasons:l})=>{const f=E(),i=`/paper/${t.id}`,n=m.useCallback(()=>{f.prefetchQuery({queryKey:T.detail(t.id),queryFn:()=>R.get(t.id,!0),staleTime:10*60*1e3})},[t.id,f]),u=t.authors.slice(0,3).map((o,h)=>{var L,p;const c=(L=t.authorIds)==null?void 0:L[h],d=(p=t.authorHfProfiles)==null?void 0:p[h];return e.jsxs(m.Fragment,{children:[h>0&&", ",d&&e.jsx(P,{className:"paper-card-author-avatar",url:d.avatarUrl}),c?e.jsx(y,{to:`/authors/${c}`,children:o}):o]},h)}),x=t.authors.length,j=te(t);return e.jsxs("article",{className:"paper-card",children:[s!=null&&e.jsx(y,{to:i,className:"paper-thumb-wrap",onFocus:n,onMouseEnter:n,children:e.jsx(Q,{paperId:t.id,title:t.title,thumbnailUrl:t.thumbnailUrl,priority:s<=3})}),e.jsxs("div",{className:"paper-body",children:[e.jsxs("div",{className:"paper-body-main",children:[l&&l.length>0&&e.jsxs("div",{className:"paper-follow-reason",children:["Because you follow ",J(l)]}),e.jsxs("h3",{className:"paper-title",children:[e.jsx(y,{to:i,onFocus:n,onMouseEnter:n,children:e.jsx(H,{title:t.title,highlight:g})}),r&&t.organizations.length>0&&e.jsx("span",{className:"paper-organization-logos",children:t.organizations.map(o=>e.jsx(se,{...o},o.slug))})]}),e.jsxs("div",{className:"paper-authors",children:[u,x>3&&e.jsxs("span",{children:[", ","+",x-3," authors"]}),t.date&&e.jsxs(e.Fragment,{children:[x>0?" · ":"",e.jsx("span",{children:t.date})]}),t.citations>0&&e.jsxs(e.Fragment,{children:[x>0||t.date?" · ":"",e.jsxs("span",{children:[t.citations.toLocaleString()," citations"]})]})]}),t.abstract&&e.jsx("p",{className:"paper-abstract",children:e.jsx(Z,{text:t.abstract,highlight:g})}),t.sotaRanks.length>0&&e.jsx(U,{ranks:t.sotaRanks,paperHref:i}),(t.tags.length>0||j.length>0)&&e.jsxs("div",{className:"paper-tags paper-tags--clamped",children:[t.tags.map(o=>e.jsx(K,{slug:o,onClick:a},o)),j.map(o=>e.jsx(O,{method:o},o.id||o.slug||o.name))]})]}),(t.githubUrl||t.hfUrl)&&e.jsxs("div",{className:"paper-resources",children:[N(t.githubUrl)&&e.jsxs("a",{className:"paper-resource is-link",href:N(t.githubUrl)??void 0,target:"_blank",rel:"noopener noreferrer","aria-label":"Open GitHub repository",onClick:o=>o.stopPropagation(),children:[e.jsx(_,{name:"github",size:20}),t.velocity24h!=null&&t.velocity24h>0&&e.jsxs("span",{className:"resource-stat",children:[e.jsxs("span",{className:"resource-value",children:[e.jsx("span",{className:"gh-rate-arrow",children:"↑"}),re(t.velocity24h)]}),e.jsx("span",{className:"resource-label",children:"stars / hr"})]})]}),N(t.hfUrl)&&t.hfKind&&e.jsxs("a",{className:"paper-resource is-link",href:N(t.hfUrl)??void 0,target:"_blank",rel:"noopener noreferrer","aria-label":`Open Hugging Face ${t.hfKind}`,onClick:o=>o.stopPropagation(),children:[e.jsx(V,{size:20}),e.jsxs("span",{className:"resource-stat",children:[e.jsx("span",{className:"resource-value",children:t.hfCount}),e.jsx("span",{className:"resource-label",children:t.hfKind})]})]})]})]})]})};function re(t){return t.toFixed(1)}export{_ as I,O as M,he as P,U as S,K as T,Q as a}; diff --git a/assets/conferenceListings-BnmhBx-_.js b/assets/conferenceListings-BnmhBx-_.js new file mode 100644 index 0000000000000000000000000000000000000000..ff42cbc3c2a2241404e6a4e18df614ec28b3947d --- /dev/null +++ b/assets/conferenceListings-BnmhBx-_.js @@ -0,0 +1 @@ +const t=[{slug:"all",label:"All papers",dotColor:"var(--accent)",countKey:"total_paper_count"},{slug:"oral",label:"Oral papers",presentation:"oral",dotColor:"#fdbb02",countKey:"oral_paper_count"},{slug:"spotlight",label:"Spotlight papers",presentation:"spotlight",dotColor:"#fdbb02",countKey:"spotlight_paper_count"},{slug:"outstanding",label:"Outstanding papers",presentation:"outstanding",award:!0,dotColor:"#c45c26",countKey:"outstanding_paper_count"},{slug:"best-paper-finalists",label:"Best paper finalists",presentation:"best_paper_finalist",award:!0,dotColor:"#c9a227",countKey:"best_paper_finalist_paper_count"}];export{t as C}; diff --git a/assets/copy-BmzqMihw.js b/assets/copy-YHg6twss.js similarity index 89% rename from assets/copy-BmzqMihw.js rename to assets/copy-YHg6twss.js index cb33c97283a3441571155ee1afb769b6b035780a..c9206f49135d1821f0a9c24dfbf404be4b5dac55 100644 --- a/assets/copy-BmzqMihw.js +++ b/assets/copy-YHg6twss.js @@ -1,4 +1,4 @@ -import{n as e}from"./index-D6jcIRWs.js";/** +import{n as e}from"./index-YwiKC6Po.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/curation-CkzNFTMJ.js b/assets/curation-CkzNFTMJ.js new file mode 100644 index 0000000000000000000000000000000000000000..ce397596953a11efdc91a877343b5712ba0882cd --- /dev/null +++ b/assets/curation-CkzNFTMJ.js @@ -0,0 +1 @@ +var p=Object.defineProperty;var f=(n,e,t)=>e in n?p(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var c=(n,e,t)=>f(n,typeof e!="symbol"?e+"":e,t);import{J as l,aW as w,a5 as v}from"./index-YwiKC6Po.js";const u="pwc:fresh-auth-mutation";function g(n){if(typeof window>"u")return;sessionStorage.setItem("pwc:fresh-auth-edit",n);const e=w("/api/v1/auth/hf/login");window.location.assign(`${e}?return_to=${encodeURIComponent(window.location.href)}`)}class y{constructor(e,t=g){c(this,"paperLoads",new Map);c(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(([i,m])=>h.set(i,m));const d={...a,headers:h};try{const i=await this.request(t,d);return this.clearAttempt(d),i}catch(i){throw i instanceof l&&i.status===401&&i.code==="fresh_auth_required"?(this.saveFreshAuthMutation(e,t,s,d),this.recoverFreshAuth(e)):i instanceof l&&i.status===409&&(this.clearAttempt(d),typeof window<"u"&&window.dispatchEvent(new CustomEvent("pwc:catalog-conflict",{detail:{endpoint:t}}))),i}}freshAuthMutationDraft(){const e=sessionStorage.getItem(u);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(u),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(u),sessionStorage.removeItem("pwc:fresh-auth-edit"),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(u,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 A=new y(v);export{A as p}; diff --git a/assets/database-DKdKRr_t.js b/assets/database-2w-JFZSG.js similarity index 89% rename from assets/database-DKdKRr_t.js rename to assets/database-2w-JFZSG.js index b2152b11c3fed864a56dc93c5e5305f9863c199b..6ae55f06f867710ea6192f79bb63dee79fd4f832 100644 --- a/assets/database-DKdKRr_t.js +++ b/assets/database-2w-JFZSG.js @@ -1,4 +1,4 @@ -import{n as e}from"./index-D6jcIRWs.js";/** +import{n as e}from"./index-YwiKC6Po.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/deadlines-BH32v7D1.js b/assets/deadlines-BH32v7D1.js new file mode 100644 index 0000000000000000000000000000000000000000..d5f7c1a3396bac4c0d9267a3c44e0830d7a2da1a --- /dev/null +++ b/assets/deadlines-BH32v7D1.js @@ -0,0 +1 @@ +const d=864e5,i={urgent:"#c0392b",soon:"#b9770e",normal:"#3f7d3f",passed:"var(--ink-faint)"},g=n=>n.split("-").map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join(" "),l=new Set(["machine-learning","computer-vision","natural-language-processing","data-mining","robotics","computer-graphics","human-computer-interaction","web-search","signal-processing","representation-learning","reinforcement-learning","optimization-methods","large-language-models","information-retrieval","speech","mathematics"]),m=n=>n.trim().toLowerCase().replace(/\s+/g,"-"),h=n=>Array.from(new Set((n.tags??[]).map(m).filter(t=>l.has(t)))),f=n=>new Date(n).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}),D=(n,t)=>{if(!n)return null;const e=new Date(`${n}T00:00:00`),a=t?new Date(`${t}T00:00:00`):null,o=s=>s.toLocaleDateString("en-US",{month:"long",day:"numeric"}),r=e.getFullYear();return a&&a.getTime()!==e.getTime()?e.getMonth()===a.getMonth()?`${o(e).replace(/\d+$/,"").trim()} ${e.getDate()}–${a.getDate()}, ${r}`:`${o(e)} – ${o(a)}, ${r}`:`${o(e)}, ${r}`},c=n=>[...n.deadlines??[]].sort((t,e)=>new Date(t.deadline_at).getTime()-new Date(e.deadline_at).getTime()),p=(n,t)=>c(n).find(e=>new Date(e.deadline_at).getTime()>t)??null,M=n=>{const t=c(n);return t.length?t[t.length-1]:null},$=(n,t)=>{const e=n-t;if(e<=0)return"Deadline passed";const a=Math.floor(e/864e5);if(a>=1){const s=Math.floor((e-a*864e5)/36e5);return`in ${a}d ${s}h`}const o=Math.floor(e/(1e3*60*60));return o>=1?`in ${o}h`:`in ${Math.max(1,Math.floor(e/(1e3*60)))}m`},S=(n,t)=>{const e=n-t;if(e<=0)return"Deadline passed";const a=Math.floor(e/864e5),o=Math.floor(e%864e5/(1e3*60*60)),r=Math.floor(e%(1e3*60*60)/(1e3*60)),s=Math.floor(e%(1e3*60)/1e3);return`${a}d ${o}h ${r}m ${s}s`},w=(n,t)=>{if(n==null)return i.passed;const e=(n-t)/864e5;return e<=0?i.passed:e<=7?i.urgent:e<=30?i.soon:i.normal};export{d as D,f as a,M as b,h as c,$ as d,D as f,g as l,p as n,S as p,c as s,w as u}; diff --git a/assets/dialog-vGFIbcd-.js b/assets/dialog-foxx0Wu6.js similarity index 93% rename from assets/dialog-vGFIbcd-.js rename to assets/dialog-foxx0Wu6.js index 42a9aa518482f5b95e427714fc4355a6063d66e4..d22f3a6faff2c6adb9bab1ded39b91a2c0bed330 100644 --- a/assets/dialog-vGFIbcd-.js +++ b/assets/dialog-foxx0Wu6.js @@ -1 +1 @@ -import{a9 as f,r as l,j as t,aa as p,ac as d,ae as g,X as x,B as o,ab as n,af as i,ag as r}from"./index-D6jcIRWs.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{a9 as f,r as l,j as t,aa as p,ac as d,ae as g,X as x,A as o,ab as n,af as i,ag as r}from"./index-YwiKC6Po.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-D5wBpmlA.js b/assets/evaluationQueryInvalidation-CcSZ8CmA.js similarity index 96% rename from assets/evaluationQueryInvalidation-D5wBpmlA.js rename to assets/evaluationQueryInvalidation-CcSZ8CmA.js index f7cb3411477bf3d0e5c99a8ed47a9201e25931ec..d34d9317ebb8a0c78160e1072b97f52c914eca8a 100644 --- a/assets/evaluationQueryInvalidation-D5wBpmlA.js +++ b/assets/evaluationQueryInvalidation-CcSZ8CmA.js @@ -1 +1 @@ -import{i as S,a as k}from"./queryInvalidation-BxCpTdQe.js";function h(d,s,i,n){const o=new Set(i.flatMap(t=>t.kind==="create"?[]:[String(t.evaluationId)]));return{paperId:d,arxivId:n,contexts:[...s.filter(t=>t.id!==void 0&&o.has(String(t.id))),...i.flatMap(t=>t.kind==="delete"?[]:[t.data])]}}function _(d,s){const i=new Set(s.contexts.flatMap(a=>a.dataset_id==null?[]:[String(a.dataset_id)])),n=new Set(s.contexts.flatMap(a=>a.task_id==null?[]:[String(a.task_id)])),o=new Set([s.paperId]),t=new Set;s.arxivId&&t.add(s.arxivId);const f=new Set(s.contexts.map(a=>`${a.task_id}:${a.dataset_id}`)),p=d.getQueryCache().findAll({predicate:a=>a.queryKey[0]==="dataset-evals"||a.queryKey[0]==="evaluations"&&a.queryKey[1]==="paper"});for(const a of p)for(const r of a.state.data??[])f.has(`${r.task_id}:${r.dataset_id}`)&&(o.add(String(r.paper_id)),r.paper_arxiv_id&&t.add(r.paper_arxiv_id));S(d,[...o,...t]),k(d),d.invalidateQueries({predicate:a=>a.queryKey[0]==="evaluations"&&a.queryKey[1]==="paper"&&o.has(String(a.queryKey[2]))}),d.invalidateQueries({predicate:a=>{const[r,l]=a.queryKey;switch(r){case"dataset-evals":case"dataset-tasks":return i.has(String(l));case"dataset":{const e=a.state.data;return i.has(String(l))||!!(e&&i.has(String(e.id)))}case"task-page":{const e=a.state.data;return n.has(String(l))||!!(e&&(n.has(String(e.task.id))||e.subtask_benchmarks.some(c=>n.has(String(c.subtask_id)))||e.benchmarks.some(c=>i.has(String(c.id)))||e.subtask_benchmarks.some(c=>c.benchmarks.some(u=>i.has(String(u.id))))))}case"task-benchmark-trends":{const e=a.state.data;return n.has(String(l))||!!(e&&n.has(String(e.task_id)))}default:return!1}}})}export{h as e,_ as r}; +import{i as S,a as k}from"./queryInvalidation-Dgyv9_oM.js";function h(d,s,i,n){const o=new Set(i.flatMap(t=>t.kind==="create"?[]:[String(t.evaluationId)]));return{paperId:d,arxivId:n,contexts:[...s.filter(t=>t.id!==void 0&&o.has(String(t.id))),...i.flatMap(t=>t.kind==="delete"?[]:[t.data])]}}function _(d,s){const i=new Set(s.contexts.flatMap(a=>a.dataset_id==null?[]:[String(a.dataset_id)])),n=new Set(s.contexts.flatMap(a=>a.task_id==null?[]:[String(a.task_id)])),o=new Set([s.paperId]),t=new Set;s.arxivId&&t.add(s.arxivId);const f=new Set(s.contexts.map(a=>`${a.task_id}:${a.dataset_id}`)),p=d.getQueryCache().findAll({predicate:a=>a.queryKey[0]==="dataset-evals"||a.queryKey[0]==="evaluations"&&a.queryKey[1]==="paper"});for(const a of p)for(const r of a.state.data??[])f.has(`${r.task_id}:${r.dataset_id}`)&&(o.add(String(r.paper_id)),r.paper_arxiv_id&&t.add(r.paper_arxiv_id));S(d,[...o,...t]),k(d),d.invalidateQueries({predicate:a=>a.queryKey[0]==="evaluations"&&a.queryKey[1]==="paper"&&o.has(String(a.queryKey[2]))}),d.invalidateQueries({predicate:a=>{const[r,l]=a.queryKey;switch(r){case"dataset-evals":case"dataset-tasks":return i.has(String(l));case"dataset":{const e=a.state.data;return i.has(String(l))||!!(e&&i.has(String(e.id)))}case"task-page":{const e=a.state.data;return n.has(String(l))||!!(e&&(n.has(String(e.task.id))||e.subtask_benchmarks.some(c=>n.has(String(c.subtask_id)))||e.benchmarks.some(c=>i.has(String(c.id)))||e.subtask_benchmarks.some(c=>c.benchmarks.some(u=>i.has(String(u.id))))))}case"task-benchmark-trends":{const e=a.state.data;return n.has(String(l))||!!(e&&n.has(String(e.task_id)))}default:return!1}}})}export{h as e,_ as r}; diff --git a/assets/external-link-C_yz2sXa.js b/assets/external-link-4bBJT0yO.js similarity index 89% rename from assets/external-link-C_yz2sXa.js rename to assets/external-link-4bBJT0yO.js index 17a6b6c7477a8ef347e95fd723c2c29abfd3a607..b11f14af1c370fdb6132949233395cf08cb1f816 100644 --- a/assets/external-link-C_yz2sXa.js +++ b/assets/external-link-4bBJT0yO.js @@ -1,4 +1,4 @@ -import{n as a}from"./index-D6jcIRWs.js";/** +import{n as a}from"./index-YwiKC6Po.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/file-text-4G2I5_Zo.js b/assets/file-text-Cijxx2XD.js similarity index 91% rename from assets/file-text-4G2I5_Zo.js rename to assets/file-text-Cijxx2XD.js index 08eec40c0c6ba2e8fd026b58274a89969094b4ca..816d2fc25283fe69bdb013e38a74804d97374d75 100644 --- a/assets/file-text-4G2I5_Zo.js +++ b/assets/file-text-Cijxx2XD.js @@ -1,4 +1,4 @@ -import{n as e}from"./index-D6jcIRWs.js";/** +import{n as e}from"./index-YwiKC6Po.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/frameworks-DDA0P4Tf.js b/assets/frameworks-DDA0P4Tf.js new file mode 100644 index 0000000000000000000000000000000000000000..ae797f93fad11d989890e70db86a2f496190e40b --- /dev/null +++ b/assets/frameworks-DDA0P4Tf.js @@ -0,0 +1 @@ +const a={gpu:"GPU",cpu:"CPU",apple:"Apple silicon"},o=t=>new Intl.NumberFormat("en",{notation:t>=1e3?"compact":"standard",maximumFractionDigits:1}).format(t);export{a as P,o as f}; diff --git a/assets/github-B7D_19Qm.js b/assets/github-BZMCt7Ub.js similarity index 92% rename from assets/github-B7D_19Qm.js rename to assets/github-BZMCt7Ub.js index 6ab14880b9e5a92486a128539f833fd6a9b1ebce..bb697e463b83c62368c3f2d335578b63ef661ea0 100644 --- a/assets/github-B7D_19Qm.js +++ b/assets/github-BZMCt7Ub.js @@ -1,4 +1,4 @@ -import{n as c}from"./index-D6jcIRWs.js";/** +import{n as c}from"./index-YwiKC6Po.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/globe-iw_Y78tU.js b/assets/globe-DmMnSXeF.js similarity index 89% rename from assets/globe-iw_Y78tU.js rename to assets/globe-DmMnSXeF.js index 0c1a0fb117921a85f56dd098cbb128a687ea7675..28892157115e93d50ba8573a7883d09721ee7533 100644 --- a/assets/globe-iw_Y78tU.js +++ b/assets/globe-DmMnSXeF.js @@ -1,4 +1,4 @@ -import{n as e}from"./index-D6jcIRWs.js";/** +import{n as e}from"./index-YwiKC6Po.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/hover-card-DPpv0l_x.js b/assets/hover-card-BY9tUGxy.js similarity index 67% rename from assets/hover-card-DPpv0l_x.js rename to assets/hover-card-BY9tUGxy.js index 09104253dedddd9c4c2da07dee69d33f06086153..8e4670f16522c0c590c8624d5038be13776be65d 100644 --- a/assets/hover-card-DPpv0l_x.js +++ b/assets/hover-card-BY9tUGxy.js @@ -1 +1 @@ -import{r as n,v as M,j as c,aj as F,ak as I,t as U,x as l,al as T,P as O,am as $,z,w as B,ar as W,as as G,at as K,B as V}from"./index-D6jcIRWs.js";var E,b="HoverCard",[y]=z(b,[T]),g=T(),[q,S]=y(b),N=e=>{const{__scopeHoverCard:o,children:r,open:s,defaultOpen:a,onOpenChange:i,openDelay:f=700,closeDelay:v=300}=e,d=g(o),C=n.useRef(0),u=n.useRef(0),h=n.useRef(!1),p=n.useRef(!1),[m,t]=M({prop:s,defaultProp:a??!1,onChange:i,caller:b}),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]),k=n.useCallback(()=>t(!1),[t]);return n.useEffect(()=>()=>{clearTimeout(C.current),clearTimeout(u.current)},[]),c.jsx(q,{scope:o,open:m,onOpenChange:t,onOpen:x,onClose:P,onDismiss:k,hasSelectionRef:h,isPointerDownOnContentRef:p,children:c.jsx(F,{...d,children:r})})};N.displayName=b;var _="HoverCardTrigger",D=n.forwardRef((e,o)=>{const{__scopeHoverCard:r,...s}=e,a=S(_,r),i=g(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,w(a.onOpen)),onPointerLeave:l(e.onPointerLeave,w(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,w(i.onOpen)),onPointerLeave:l(e.onPointerLeave,w(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=g(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=g(r);return c.jsx(K,{...a,...s,ref:o})});Z.displayName=Y;function w(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:V("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{r as n,v as M,j as i,ai as F,aj as I,t as U,x as l,ak as T,P as O,al as $,z,w as W,am as B,an as G,ao as K,A as V}from"./index-YwiKC6Po.js";var E,b="HoverCard",[y]=z(b,[T]),g=T(),[q,S]=y(b),N=e=>{const{__scopeHoverCard:o,children:r,open:s,defaultOpen:a,onOpenChange:c,openDelay:f=700,closeDelay:v=300}=e,d=g(o),C=n.useRef(0),u=n.useRef(0),h=n.useRef(!1),p=n.useRef(!1),[m,t]=M({prop:s,defaultProp:a??!1,onChange:c,caller:b}),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]),k=n.useCallback(()=>t(!1),[t]);return n.useEffect(()=>()=>{clearTimeout(C.current),clearTimeout(u.current)},[]),i.jsx(q,{scope:o,open:m,onOpenChange:t,onOpen:x,onClose:P,onDismiss:k,hasSelectionRef:h,isPointerDownOnContentRef:p,children:i.jsx(F,{...d,children:r})})};N.displayName=b;var _="HoverCardTrigger",D=n.forwardRef((e,o)=>{const{__scopeHoverCard:r,...s}=e,a=S(_,r),c=g(r);return i.jsx(I,{asChild:!0,...c,children:i.jsx(U.a,{"data-state":a.open?"open":"closed",...s,ref:o,onPointerEnter:l(e.onPointerEnter,w(a.onOpen)),onPointerLeave:l(e.onPointerLeave,w(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,c=S(H,o);return i.jsx(J,{scope:o,forceMount:r,children:i.jsx(O,{present:r||c.open,children:i.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,c=S(R,e.__scopeHoverCard);return i.jsx(O,{present:s||c.open,children:i.jsx(X,{"data-state":c.open?"open":"closed",...a,onPointerEnter:l(e.onPointerEnter,w(c.onOpen)),onPointerLeave:l(e.onPointerLeave,w(c.onClose)),ref:o})})});A.displayName=R;var X=n.forwardRef((e,o)=>{const{__scopeHoverCard:r,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:c,onInteractOutside:f,...v}=e,d=S(R,r),C=g(r),u=n.useRef(null),h=W(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"))}),i.jsx(B,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:f,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:l(c,t=>{t.preventDefault()}),onDismiss:d.onDismiss,children:i.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=g(r);return i.jsx(K,{...a,...s,ref:o})});Z.displayName=Y;function w(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,ie=oe,ne=n.forwardRef(({className:e,align:o="center",sideOffset:r=4,...s},a)=>i.jsx(re,{children:i.jsx(L,{ref:a,align:o,sideOffset:r,className:V("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,ie as a,ne as b}; diff --git a/assets/index-yduEvk9Z.js b/assets/index-BM_xSDJM.js similarity index 99% rename from assets/index-yduEvk9Z.js rename to assets/index-BM_xSDJM.js index 89848550797030f98804caeb67263a39b30ad1b2..524da544e5aa51f6d7f538560262bf3c2288a21b 100644 --- a/assets/index-yduEvk9Z.js +++ b/assets/index-BM_xSDJM.js @@ -1,4 +1,4 @@ -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-uFGyKu5N.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?` +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-CoRCN2p0.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(;++i(e.current.value!==r&&(e.current.previous=e.current.value,e.current.value=r),e.current.previous),[r])}export{o as u}; +import{r as u}from"./index-YwiKC6Po.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/index-Ccbp5caV.css b/assets/index-Ccbp5caV.css new file mode 100644 index 0000000000000000000000000000000000000000..eb86f2336b669f768e76716cf5af60ec56e18fef --- /dev/null +++ b/assets/index-Ccbp5caV.css @@ -0,0 +1 @@ +@import"https://fonts.googleapis.com/css2?family=Newsreader:ital,opsz,wght@0,6..72,400;0,6..72,500;0,6..72,600;0,6..72,700;1,6..72,400&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap";*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}:root{--background: 0 0% 100%;--foreground: 222.2 84% 4.9%;--card: 0 0% 100%;--card-foreground: 222.2 84% 4.9%;--popover: 0 0% 100%;--popover-foreground: 222.2 84% 4.9%;--primary: 222.2 47.4% 11.2%;--primary-foreground: 210 40% 98%;--secondary: 210 40% 96.1%;--secondary-foreground: 222.2 47.4% 11.2%;--muted: 210 40% 96.1%;--muted-foreground: 215.4 16.3% 46.9%;--accent-tw: 210 40% 96.1%;--accent-foreground: 222.2 47.4% 11.2%;--destructive: 0 84.2% 60.2%;--destructive-foreground: 210 40% 98%;--border: 214.3 31.8% 91.4%;--input: 214.3 31.8% 91.4%;--ring: 222.2 84% 4.9%;--radius: .5rem}.dark{--background: 36 13% 7%;--foreground: 40 27% 93%;--card: 36 12% 10%;--card-foreground: 40 27% 93%;--popover: 36 12% 10%;--popover-foreground: 40 27% 93%;--primary: 40 27% 93%;--primary-foreground: 36 13% 7%;--secondary: 34 11% 15%;--secondary-foreground: 40 27% 93%;--muted: 34 11% 15%;--muted-foreground: 36 10% 64%;--accent-tw: 216 22% 20%;--accent-foreground: 213 38% 79%;--destructive: 0 63% 42%;--destructive-foreground: 40 27% 93%;--border: 35 11% 20%;--input: 35 11% 20%;--ring: 213 38% 67%}[data-shadcn] *{border-color:hsl(var(--border))}.\!container{width:100%!important;margin-right:auto!important;margin-left:auto!important;padding-right:2rem!important;padding-left:2rem!important}.container{width:100%;margin-right:auto;margin-left:auto;padding-right:2rem;padding-left:2rem}@media (min-width: 1400px){.\!container{max-width:1400px!important}.container{max-width:1400px}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.\!visible{visibility:visible!important}.visible{visibility:visible}.invisible{visibility:hidden}.collapse{visibility:collapse}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{top:0;right:0;bottom:0;left:0}.left-2{left:.5rem}.left-3{left:.75rem}.left-\[50\%\]{left:50%}.right-2{right:.5rem}.right-4{right:1rem}.top-0{top:0}.top-1\/2{top:50%}.top-2{top:.5rem}.top-3{top:.75rem}.top-4{top:1rem}.top-\[50\%\]{top:50%}.z-50{z-index:50}.z-\[100\]{z-index:100}.z-\[60\]{z-index:60}.-mx-1{margin-left:-.25rem;margin-right:-.25rem}.-mx-6{margin-left:-1.5rem;margin-right:-1.5rem}.mx-auto{margin-left:auto;margin-right:auto}.my-1{margin-top:.25rem;margin-bottom:.25rem}.mb-1{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-5{margin-bottom:1.25rem}.mb-6{margin-bottom:1.5rem}.mb-8{margin-bottom:2rem}.ml-1{margin-left:.25rem}.ml-3{margin-left:.75rem}.ml-auto{margin-left:auto}.mr-1{margin-right:.25rem}.mr-2{margin-right:.5rem}.mr-3{margin-right:.75rem}.mr-4{margin-right:1rem}.mr-auto{margin-right:auto}.mt-1{margin-top:.25rem}.mt-10{margin-top:2.5rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.mt-8{margin-top:2rem}.line-clamp-3{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3}.\!block{display:block!important}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.\!table{display:table!important}.table{display:table}.grid{display:grid}.contents{display:contents}.hidden{display:none}.aspect-square{aspect-ratio:1 / 1}.h-10{height:2.5rem}.h-11{height:2.75rem}.h-12{height:3rem}.h-16{height:4rem}.h-2{height:.5rem}.h-2\.5{height:.625rem}.h-20{height:5rem}.h-24{height:6rem}.h-3{height:.75rem}.h-3\.5{height:.875rem}.h-32{height:8rem}.h-36{height:9rem}.h-4{height:1rem}.h-40{height:10rem}.h-44{height:11rem}.h-48{height:12rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-64{height:16rem}.h-7{height:1.75rem}.h-8{height:2rem}.h-9{height:2.25rem}.h-\[18px\]{height:18px}.h-\[190px\]{height:190px}.h-\[220px\]{height:220px}.h-\[38px\]{height:38px}.h-auto{height:auto}.h-full{height:100%}.h-px{height:1px}.max-h-32{max-height:8rem}.max-h-40{max-height:10rem}.max-h-48{max-height:12rem}.max-h-52{max-height:13rem}.max-h-64{max-height:16rem}.max-h-80{max-height:20rem}.max-h-\[300px\]{max-height:300px}.max-h-\[350px\]{max-height:350px}.max-h-\[400px\]{max-height:400px}.max-h-\[460px\]{max-height:460px}.max-h-\[50vh\]{max-height:50vh}.max-h-\[600px\]{max-height:600px}.max-h-\[700px\]{max-height:700px}.max-h-\[800px\]{max-height:800px}.max-h-\[90vh\]{max-height:90vh}.max-h-\[min\(300px\,calc\(var\(--radix-popover-content-available-height\)-2\.75rem\)\)\]{max-height:min(300px,calc(var(--radix-popover-content-available-height) - 2.75rem))}.max-h-\[var\(--radix-popover-content-available-height\)\]{max-height:var(--radix-popover-content-available-height)}.max-h-screen{max-height:100vh}.min-h-0{min-height:0px}.min-h-\[80px\]{min-height:80px}.w-1\/2{width:50%}.w-1\/3{width:33.333333%}.w-10{width:2.5rem}.w-11{width:2.75rem}.w-12{width:3rem}.w-16{width:4rem}.w-2{width:.5rem}.w-2\.5{width:.625rem}.w-20{width:5rem}.w-3{width:.75rem}.w-3\.5{width:.875rem}.w-3\/4{width:75%}.w-36{width:9rem}.w-4{width:1rem}.w-5{width:1.25rem}.w-56{width:14rem}.w-6{width:1.5rem}.w-64{width:16rem}.w-72{width:18rem}.w-8{width:2rem}.w-\[160px\]{width:160px}.w-\[18px\]{width:18px}.w-\[calc\(100vw-2rem\)\]{width:calc(100vw - 2rem)}.w-\[var\(--radix-popover-trigger-width\)\]{width:var(--radix-popover-trigger-width)}.w-auto{width:auto}.w-fit{width:-moz-fit-content;width:fit-content}.w-full{width:100%}.min-w-0{min-width:0px}.min-w-\[140px\]{min-width:140px}.min-w-\[180px\]{min-width:180px}.min-w-\[200px\]{min-width:200px}.min-w-\[240px\]{min-width:240px}.min-w-\[260px\]{min-width:260px}.min-w-\[8rem\]{min-width:8rem}.max-w-2xl{max-width:42rem}.max-w-6xl{max-width:72rem}.max-w-7xl{max-width:80rem}.max-w-\[260px\]{max-width:260px}.max-w-\[280px\]{max-width:280px}.max-w-\[360px\]{max-width:360px}.max-w-full{max-width:100%}.max-w-lg{max-width:32rem}.max-w-md{max-width:28rem}.max-w-xl{max-width:36rem}.flex-1{flex:1 1 0%}.flex-shrink-0{flex-shrink:0}.shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.caption-bottom{caption-side:bottom}.border-collapse{border-collapse:collapse}.-translate-y-1\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-\[-50\%\]{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-\[-50\%\]{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-default{cursor:default}.cursor-pointer{cursor:pointer}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.resize-none{resize:none}.resize{resize:both}.list-decimal{list-style-type:decimal}.list-disc{list-style-type:disc}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-rows-\[auto_minmax\(0\,1fr\)_auto\]{grid-template-rows:auto minmax(0,1fr) auto}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-0\.5{gap:.125rem}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-5{gap:1.25rem}.gap-x-4{-moz-column-gap:1rem;column-gap:1rem}.gap-y-1{row-gap:.25rem}.space-x-1>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.25rem * var(--tw-space-x-reverse));margin-left:calc(.25rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(1rem * var(--tw-space-x-reverse));margin-left:calc(1rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-1\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.375rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.375rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.25rem * var(--tw-space-y-reverse))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem * var(--tw-space-y-reverse))}.justify-self-end{justify-self:end}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.overscroll-contain{overscroll-behavior:contain}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) - 2px)}.rounded-sm{border-radius:calc(var(--radius) - 4px)}.\!border{border-width:1px!important}.border{border-width:1px}.border-2{border-width:2px}.border-b{border-bottom-width:1px}.border-t{border-top-width:1px}.border-dashed{border-style:dashed}.\!border-black{--tw-border-opacity: 1 !important;border-color:rgb(0 0 0 / var(--tw-border-opacity, 1))!important}.border-amber-200{--tw-border-opacity: 1;border-color:rgb(253 230 138 / var(--tw-border-opacity, 1))}.border-amber-500{--tw-border-opacity: 1;border-color:rgb(245 158 11 / var(--tw-border-opacity, 1))}.border-border{border-color:hsl(var(--border))}.border-destructive{border-color:hsl(var(--destructive))}.border-destructive\/40{border-color:hsl(var(--destructive) / .4)}.border-destructive\/50{border-color:hsl(var(--destructive) / .5)}.border-input{border-color:hsl(var(--input))}.border-primary{border-color:hsl(var(--primary))}.border-red-500{--tw-border-opacity: 1;border-color:rgb(239 68 68 / var(--tw-border-opacity, 1))}.border-transparent{border-color:transparent}.bg-accent{background-color:hsl(var(--accent-tw))}.bg-amber-100{--tw-bg-opacity: 1;background-color:rgb(254 243 199 / var(--tw-bg-opacity, 1))}.bg-amber-50{--tw-bg-opacity: 1;background-color:rgb(255 251 235 / var(--tw-bg-opacity, 1))}.bg-background{background-color:hsl(var(--background))}.bg-background\/80{background-color:hsl(var(--background) / .8)}.bg-black\/80{background-color:#000c}.bg-blue-100{--tw-bg-opacity: 1;background-color:rgb(219 234 254 / var(--tw-bg-opacity, 1))}.bg-border{background-color:hsl(var(--border))}.bg-card{background-color:hsl(var(--card))}.bg-destructive{background-color:hsl(var(--destructive))}.bg-destructive\/10{background-color:hsl(var(--destructive) / .1)}.bg-muted{background-color:hsl(var(--muted))}.bg-muted\/30{background-color:hsl(var(--muted) / .3)}.bg-muted\/40{background-color:hsl(var(--muted) / .4)}.bg-muted\/50{background-color:hsl(var(--muted) / .5)}.bg-popover{background-color:hsl(var(--popover))}.bg-primary{background-color:hsl(var(--primary))}.bg-red-50\/50{background-color:#fef2f280}.bg-secondary{background-color:hsl(var(--secondary))}.bg-transparent{background-color:transparent}.fill-current{fill:currentColor}.object-contain{-o-object-fit:contain;object-fit:contain}.p-0{padding:0}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-8{padding-left:2rem;padding-right:2rem}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-10{padding-top:2.5rem;padding-bottom:2.5rem}.py-12{padding-top:3rem;padding-bottom:3rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-5{padding-top:1.25rem;padding-bottom:1.25rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.py-8{padding-top:2rem;padding-bottom:2rem}.pb-2{padding-bottom:.5rem}.pl-4{padding-left:1rem}.pl-5{padding-left:1.25rem}.pl-8{padding-left:2rem}.pl-9{padding-left:2.25rem}.pr-16{padding-right:4rem}.pr-2{padding-right:.5rem}.pr-9{padding-right:2.25rem}.pt-0{padding-top:0}.pt-2{padding-top:.5rem}.pt-6{padding-top:1.5rem}.text-left{text-align:left}.text-center{text-align:center}.align-top{vertical-align:top}.align-middle{vertical-align:middle}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-\[10px\]{font-size:10px}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.lowercase{text-transform:lowercase}.capitalize{text-transform:capitalize}.italic{font-style:italic}.leading-none{line-height:1}.leading-relaxed{line-height:1.625}.leading-snug{line-height:1.375}.leading-tight{line-height:1.25}.tracking-tight{letter-spacing:-.025em}.tracking-wide{letter-spacing:.025em}.tracking-widest{letter-spacing:.1em}.text-amber-900{--tw-text-opacity: 1;color:rgb(120 53 15 / var(--tw-text-opacity, 1))}.text-blue-900{--tw-text-opacity: 1;color:rgb(30 58 138 / var(--tw-text-opacity, 1))}.text-card-foreground{color:hsl(var(--card-foreground))}.text-current{color:currentColor}.text-destructive{color:hsl(var(--destructive))}.text-destructive-foreground{color:hsl(var(--destructive-foreground))}.text-foreground{color:hsl(var(--foreground))}.text-muted-foreground{color:hsl(var(--muted-foreground))}.text-popover-foreground{color:hsl(var(--popover-foreground))}.text-primary{color:hsl(var(--primary))}.text-primary-foreground{color:hsl(var(--primary-foreground))}.text-red-700{--tw-text-opacity: 1;color:rgb(185 28 28 / var(--tw-text-opacity, 1))}.text-secondary-foreground{color:hsl(var(--secondary-foreground))}.underline{text-decoration-line:underline}.underline-offset-2{text-underline-offset:2px}.underline-offset-4{text-underline-offset:4px}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-30{opacity:.3}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.opacity-90{opacity:.9}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.ring-0{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-offset-background{--tw-ring-offset-color: hsl(var(--background))}.blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.drop-shadow{--tw-drop-shadow: drop-shadow(0 1px 2px rgb(0 0 0 / .1)) drop-shadow(0 1px 1px rgb(0 0 0 / .06));filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-200{transition-duration:.2s}@keyframes enter{0%{opacity:var(--tw-enter-opacity, 1);transform:translate3d(var(--tw-enter-translate-x, 0),var(--tw-enter-translate-y, 0),0) scale3d(var(--tw-enter-scale, 1),var(--tw-enter-scale, 1),var(--tw-enter-scale, 1)) rotate(var(--tw-enter-rotate, 0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity, 1);transform:translate3d(var(--tw-exit-translate-x, 0),var(--tw-exit-translate-y, 0),0) scale3d(var(--tw-exit-scale, 1),var(--tw-exit-scale, 1),var(--tw-exit-scale, 1)) rotate(var(--tw-exit-rotate, 0))}}.duration-200{animation-duration:.2s}.\!running{animation-play-state:running!important}.running{animation-play-state:running}.paused{animation-play-state:paused}.file\:border-0::file-selector-button{border-width:0px}.file\:bg-transparent::file-selector-button{background-color:transparent}.file\:text-sm::file-selector-button{font-size:.875rem;line-height:1.25rem}.file\:font-medium::file-selector-button{font-weight:500}.file\:text-foreground::file-selector-button{color:hsl(var(--foreground))}.placeholder\:text-muted-foreground::-moz-placeholder{color:hsl(var(--muted-foreground))}.placeholder\:text-muted-foreground::placeholder{color:hsl(var(--muted-foreground))}.last\:mb-0:last-child{margin-bottom:0}.hover\:border-foreground\/50:hover{border-color:hsl(var(--foreground) / .5)}.hover\:bg-accent:hover{background-color:hsl(var(--accent-tw))}.hover\:bg-destructive\/80:hover{background-color:hsl(var(--destructive) / .8)}.hover\:bg-destructive\/90:hover{background-color:hsl(var(--destructive) / .9)}.hover\:bg-muted:hover{background-color:hsl(var(--muted))}.hover\:bg-muted\/50:hover{background-color:hsl(var(--muted) / .5)}.hover\:bg-primary\/80:hover{background-color:hsl(var(--primary) / .8)}.hover\:bg-primary\/90:hover{background-color:hsl(var(--primary) / .9)}.hover\:bg-secondary:hover{background-color:hsl(var(--secondary))}.hover\:bg-secondary\/80:hover{background-color:hsl(var(--secondary) / .8)}.hover\:text-accent-foreground:hover{color:hsl(var(--accent-foreground))}.hover\:text-destructive:hover{color:hsl(var(--destructive))}.hover\:text-foreground:hover{color:hsl(var(--foreground))}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-100:hover{opacity:1}.focus\:bg-accent:focus{background-color:hsl(var(--accent-tw))}.focus\:text-accent-foreground:focus{color:hsl(var(--accent-foreground))}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-ring:focus{--tw-ring-color: hsl(var(--ring))}.focus\:ring-offset-2:focus{--tw-ring-offset-width: 2px}.focus-visible\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\:ring-2:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-visible\:ring-ring:focus-visible{--tw-ring-color: hsl(var(--ring))}.focus-visible\:ring-offset-2:focus-visible{--tw-ring-offset-width: 2px}.focus-visible\:ring-offset-background:focus-visible{--tw-ring-offset-color: hsl(var(--background))}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-50:disabled{opacity:.5}.group.destructive .group-\[\.destructive\]\:border-muted\/40{border-color:hsl(var(--muted) / .4)}.group.destructive .group-\[\.destructive\]\:text-destructive-foreground{color:hsl(var(--destructive-foreground))}.group.destructive .group-\[\.destructive\]\:hover\:border-destructive\/30:hover{border-color:hsl(var(--destructive) / .3)}.group.destructive .group-\[\.destructive\]\:hover\:bg-destructive:hover{background-color:hsl(var(--destructive))}.group.destructive .group-\[\.destructive\]\:hover\:bg-destructive-foreground\/10:hover{background-color:hsl(var(--destructive-foreground) / .1)}.group.destructive .group-\[\.destructive\]\:hover\:text-destructive-foreground:hover{color:hsl(var(--destructive-foreground))}.group.destructive .group-\[\.destructive\]\:focus\:ring-destructive:focus{--tw-ring-color: hsl(var(--destructive))}.group.destructive .group-\[\.destructive\]\:focus\:ring-destructive-foreground:focus{--tw-ring-color: hsl(var(--destructive-foreground))}.peer:disabled~.peer-disabled\:cursor-not-allowed{cursor:not-allowed}.peer:disabled~.peer-disabled\:opacity-70{opacity:.7}.data-\[disabled\=true\]\:pointer-events-none[data-disabled=true],.data-\[disabled\]\:pointer-events-none[data-disabled]{pointer-events:none}.data-\[state\=checked\]\:translate-x-5[data-state=checked]{--tw-translate-x: 1.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[state\=unchecked\]\:translate-x-0[data-state=unchecked],.data-\[swipe\=cancel\]\:translate-x-0[data-swipe=cancel]{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[swipe\=end\]\:translate-x-\[var\(--radix-toast-swipe-end-x\)\][data-swipe=end]{--tw-translate-x: var(--radix-toast-swipe-end-x);transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[swipe\=move\]\:translate-x-\[var\(--radix-toast-swipe-move-x\)\][data-swipe=move]{--tw-translate-x: var(--radix-toast-swipe-move-x);transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[selected\=\'true\'\]\:bg-accent[data-selected=true]{background-color:hsl(var(--accent-tw))}.data-\[state\=active\]\:bg-background[data-state=active]{background-color:hsl(var(--background))}.data-\[state\=checked\]\:\!bg-black[data-state=checked]{--tw-bg-opacity: 1 !important;background-color:rgb(0 0 0 / var(--tw-bg-opacity, 1))!important}.data-\[state\=checked\]\:bg-primary[data-state=checked]{background-color:hsl(var(--primary))}.data-\[state\=open\]\:bg-accent[data-state=open]{background-color:hsl(var(--accent-tw))}.data-\[state\=selected\]\:bg-muted[data-state=selected]{background-color:hsl(var(--muted))}.data-\[state\=unchecked\]\:bg-input[data-state=unchecked]{background-color:hsl(var(--input))}.data-\[selected\=true\]\:text-accent-foreground[data-selected=true]{color:hsl(var(--accent-foreground))}.data-\[state\=active\]\:text-foreground[data-state=active]{color:hsl(var(--foreground))}.data-\[state\=checked\]\:\!text-white[data-state=checked]{--tw-text-opacity: 1 !important;color:rgb(255 255 255 / var(--tw-text-opacity, 1))!important}.data-\[state\=open\]\:text-muted-foreground[data-state=open]{color:hsl(var(--muted-foreground))}.data-\[disabled\=true\]\:opacity-50[data-disabled=true],.data-\[disabled\]\:opacity-50[data-disabled]{opacity:.5}.data-\[state\=active\]\:shadow-sm[data-state=active]{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.data-\[swipe\=move\]\:transition-none[data-swipe=move]{transition-property:none}.data-\[state\=open\]\:animate-in[data-state=open]{animation-name:enter;animation-duration:.15s;--tw-enter-opacity: initial;--tw-enter-scale: initial;--tw-enter-rotate: initial;--tw-enter-translate-x: initial;--tw-enter-translate-y: initial}.data-\[state\=closed\]\:animate-out[data-state=closed],.data-\[swipe\=end\]\:animate-out[data-swipe=end]{animation-name:exit;animation-duration:.15s;--tw-exit-opacity: initial;--tw-exit-scale: initial;--tw-exit-rotate: initial;--tw-exit-translate-x: initial;--tw-exit-translate-y: initial}.data-\[state\=closed\]\:fade-out-0[data-state=closed]{--tw-exit-opacity: 0}.data-\[state\=closed\]\:fade-out-80[data-state=closed]{--tw-exit-opacity: .8}.data-\[state\=open\]\:fade-in-0[data-state=open]{--tw-enter-opacity: 0}.data-\[state\=closed\]\:zoom-out-95[data-state=closed]{--tw-exit-scale: .95}.data-\[state\=open\]\:zoom-in-95[data-state=open]{--tw-enter-scale: .95}.data-\[side\=bottom\]\:slide-in-from-top-2[data-side=bottom]{--tw-enter-translate-y: -.5rem}.data-\[side\=left\]\:slide-in-from-right-2[data-side=left]{--tw-enter-translate-x: .5rem}.data-\[side\=right\]\:slide-in-from-left-2[data-side=right]{--tw-enter-translate-x: -.5rem}.data-\[side\=top\]\:slide-in-from-bottom-2[data-side=top]{--tw-enter-translate-y: .5rem}.data-\[state\=closed\]\:slide-out-to-left-1\/2[data-state=closed]{--tw-exit-translate-x: -50%}.data-\[state\=closed\]\:slide-out-to-right-full[data-state=closed]{--tw-exit-translate-x: 100%}.data-\[state\=closed\]\:slide-out-to-top-\[48\%\][data-state=closed]{--tw-exit-translate-y: -48%}.data-\[state\=open\]\:slide-in-from-left-1\/2[data-state=open]{--tw-enter-translate-x: -50%}.data-\[state\=open\]\:slide-in-from-top-\[48\%\][data-state=open]{--tw-enter-translate-y: -48%}.data-\[state\=open\]\:slide-in-from-top-full[data-state=open]{--tw-enter-translate-y: -100%}.dark\:block:is(.dark *){display:block}.dark\:hidden:is(.dark *){display:none}.dark\:border-amber-900:is(.dark *){--tw-border-opacity: 1;border-color:rgb(120 53 15 / var(--tw-border-opacity, 1))}.dark\:border-destructive:is(.dark *){border-color:hsl(var(--destructive))}.dark\:bg-amber-950\/40:is(.dark *){background-color:#451a0366}.dark\:text-amber-100:is(.dark *){--tw-text-opacity: 1;color:rgb(254 243 199 / var(--tw-text-opacity, 1))}@media (min-width: 640px){.sm\:bottom-0{bottom:0}.sm\:right-0{right:0}.sm\:top-auto{top:auto}.sm\:mr-auto{margin-right:auto}.sm\:w-auto{width:auto}.sm\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.sm\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.sm\:flex-row{flex-direction:row}.sm\:flex-col{flex-direction:column}.sm\:justify-end{justify-content:flex-end}.sm\:space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.sm\:rounded-lg{border-radius:var(--radius)}.sm\:px-6{padding-left:1.5rem;padding-right:1.5rem}.sm\:text-left{text-align:left}.data-\[state\=open\]\:sm\:slide-in-from-bottom-full[data-state=open]{--tw-enter-translate-y: 100%}}@media (min-width: 768px){.md\:col-span-2{grid-column:span 2 / span 2}.md\:max-w-\[420px\]{max-width:420px}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.md\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.md\:grid-cols-\[1fr_1fr_auto\]{grid-template-columns:1fr 1fr auto}.md\:text-sm{font-size:.875rem;line-height:1.25rem}}@media (min-width: 1024px){.lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.lg\:grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}.lg\:grid-cols-8{grid-template-columns:repeat(8,minmax(0,1fr))}.lg\:px-8{padding-left:2rem;padding-right:2rem}}@media (min-width: 1280px){.xl\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.xl\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}}.\[\&\:has\(\[role\=checkbox\]\)\]\:pr-0:has([role=checkbox]){padding-right:0}.\[\&\>svg\+div\]\:translate-y-\[-3px\]>svg+div{--tw-translate-y: -3px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.\[\&\>svg\]\:absolute>svg{position:absolute}.\[\&\>svg\]\:left-4>svg{left:1rem}.\[\&\>svg\]\:top-4>svg{top:1rem}.\[\&\>svg\]\:text-destructive>svg{color:hsl(var(--destructive))}.\[\&\>svg\]\:text-foreground>svg{color:hsl(var(--foreground))}.\[\&\>svg\~\*\]\:pl-7>svg~*{padding-left:1.75rem}.\[\&\>tr\]\:last\:border-b-0:last-child>tr{border-bottom-width:0px}.\[\&_\[cmdk-group-heading\]\]\:px-2 [cmdk-group-heading]{padding-left:.5rem;padding-right:.5rem}.\[\&_\[cmdk-group-heading\]\]\:py-1\.5 [cmdk-group-heading]{padding-top:.375rem;padding-bottom:.375rem}.\[\&_\[cmdk-group-heading\]\]\:text-xs [cmdk-group-heading]{font-size:.75rem;line-height:1rem}.\[\&_\[cmdk-group-heading\]\]\:font-medium [cmdk-group-heading]{font-weight:500}.\[\&_\[cmdk-group-heading\]\]\:text-muted-foreground [cmdk-group-heading]{color:hsl(var(--muted-foreground))}.\[\&_\[cmdk-group\]\:not\(\[hidden\]\)_\~\[cmdk-group\]\]\:pt-0 [cmdk-group]:not([hidden])~[cmdk-group]{padding-top:0}.\[\&_\[cmdk-group\]\]\:px-2 [cmdk-group]{padding-left:.5rem;padding-right:.5rem}.\[\&_\[cmdk-input-wrapper\]_svg\]\:h-5 [cmdk-input-wrapper] svg{height:1.25rem}.\[\&_\[cmdk-input-wrapper\]_svg\]\:w-5 [cmdk-input-wrapper] svg{width:1.25rem}.\[\&_\[cmdk-input\]\]\:h-12 [cmdk-input]{height:3rem}.\[\&_\[cmdk-item\]\]\:px-2 [cmdk-item]{padding-left:.5rem;padding-right:.5rem}.\[\&_\[cmdk-item\]\]\:py-3 [cmdk-item]{padding-top:.75rem;padding-bottom:.75rem}.\[\&_\[cmdk-item\]_svg\]\:h-5 [cmdk-item] svg{height:1.25rem}.\[\&_\[cmdk-item\]_svg\]\:w-5 [cmdk-item] svg{width:1.25rem}.\[\&_p\]\:leading-relaxed p{line-height:1.625}.\[\&_svg\]\:pointer-events-none svg{pointer-events:none}.\[\&_svg\]\:size-4 svg{width:1rem;height:1rem}.\[\&_svg\]\:shrink-0 svg{flex-shrink:0}.\[\&_tr\:last-child\]\:border-0 tr:last-child{border-width:0px}.\[\&_tr\]\:border-b tr{border-bottom-width:1px}:root{--bg: #FAF8F4;--bg-elevated: #FFFFFF;--bg-subtle: #F2EFE8;--ink: #1A1814;--ink-soft: #5A554C;--ink-faint: #8E8678;--hairline: #E4DFD4;--hairline-strong: #C8C2B3;--accent: oklch(.45 .08 250);--accent-soft: oklch(.92 .03 250);--accent-text: oklch(.35 .1 250);--warn: oklch(.55 .12 30);--positive-bg: oklch(.96 .03 145);--positive-text: oklch(.34 .1 145);--positive-border: oklch(.86 .06 145);--negative-bg: oklch(.96 .03 25);--negative-text: oklch(.4 .12 25);--negative-border: oklch(.86 .06 25);--highlight-bg: oklch(.97 .04 70);--highlight-text: oklch(.42 .1 60);--highlight-border: oklch(.85 .07 70);--info-bg: oklch(.97 .04 230);--info-text: oklch(.42 .1 240);--info-border: oklch(.86 .07 230);--trend-code: #33639E;--trend-hf: #AA7D24;--app-leading-column-width: 280px;--serif: "Newsreader", Georgia, serif;--sans: "Inter", -apple-system, sans-serif;--mono: "JetBrains Mono", ui-monospace, monospace;color-scheme:light}.dark{--bg: #11100E;--bg-elevated: #1A1815;--bg-subtle: #24211D;--ink: #F3EFE7;--ink-soft: #B9B2A6;--ink-faint: #989084;--hairline: #332F29;--hairline-strong: #514A40;--accent: oklch(.72 .09 250);--accent-soft: oklch(.28 .04 250);--accent-text: oklch(.8 .08 250);--warn: oklch(.72 .12 30);--positive-bg: oklch(.25 .035 145);--positive-text: oklch(.79 .1 145);--positive-border: oklch(.43 .06 145);--negative-bg: oklch(.25 .04 25);--negative-text: oklch(.79 .1 25);--negative-border: oklch(.43 .06 25);--highlight-bg: oklch(.27 .04 70);--highlight-text: oklch(.82 .1 70);--highlight-border: oklch(.46 .07 70);--info-bg: oklch(.25 .04 230);--info-text: oklch(.8 .08 235);--info-border: oklch(.43 .07 230);--trend-code: #5C8FD6;--trend-hf: #B3831F;color-scheme:dark}*{box-sizing:border-box;margin:0;padding:0}html,body{background:var(--bg);color:var(--ink);font-family:var(--sans);font-size:14px;line-height:1.5;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}a{color:inherit;text-decoration:none}button{font-family:inherit;cursor:pointer;border:none;background:none;color:inherit}.app-header{border-bottom:1px solid var(--hairline);background:var(--bg);position:sticky;top:0;z-index:50}.app-header-inner{max-width:calc(50vw + 640px);margin:0 auto;padding:14px 32px;display:flex;align-items:center;gap:8px;min-width:0}.site-announcement{position:relative;min-height:28px;padding:5px 52px 6px;border-top:1px solid var(--hairline);background:var(--bg-subtle);color:var(--ink-soft);font-size:12px;line-height:16px;text-align:center}.site-announcement a{color:var(--accent-text);font-weight:600;text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:2px}.site-announcement a:hover{color:var(--ink)}.site-announcement-close{position:absolute;top:50%;right:20px;display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;padding:0;border:0;border-radius:4px;background:transparent;color:var(--ink-soft);cursor:pointer;transform:translateY(-50%)}.site-announcement-close:hover{background:var(--hairline);color:var(--ink)}.site-announcement-close:focus-visible{outline:2px solid var(--accent-text);outline-offset:1px}.brand{display:flex;align-items:baseline;gap:10px;font-family:var(--serif);cursor:pointer}.brand-mark{width:22px;height:22px;background:var(--ink);position:relative;align-self:center;flex-shrink:0}.brand-mark:after{content:"";position:absolute;top:4px;left:4px;right:4px;bottom:4px;background:var(--bg)}.brand-mark:before{content:"";position:absolute;top:8px;left:8px;width:6px;height:6px;background:var(--ink);z-index:1}.brand-name{font-size:20px;font-weight:600;letter-spacing:-.02em;white-space:nowrap}.brand-name em{font-style:italic;font-weight:400;color:var(--ink-soft)}.nav{display:flex;gap:24px;margin-left:8px;flex-shrink:0;position:relative}@media (min-width: 901px){.app-header-inner{max-width:none;padding-left:0}.brand{width:var(--app-leading-column-width);flex:none;justify-content:center}.nav{margin-left:0}}.nav{margin-right:16px}@media (max-width: 1440px){.nav-item:nth-last-child(-n+3){display:none}}@media (max-width: 1200px){.nav{gap:18px}.nav-item:nth-child(n+4){display:none}}@media (max-width: 920px){.search-trigger kbd{display:none}}.nav-item{font-size:13px;color:var(--ink-soft);padding:4px 0;transition:color .15s}.nav-indicator{position:absolute;bottom:0;left:0;height:1px;background:var(--ink);pointer-events:none;will-change:transform,width}.nav-indicator-ready{transition:transform .22s cubic-bezier(.4,0,.2,1),width .22s cubic-bezier(.4,0,.2,1),opacity .12s ease}.nav-item-with-badge{display:inline-flex;align-items:center;gap:5px}.nav-new-badge{display:inline-flex;align-items:center;min-height:17px;padding:1px 5px;border-radius:5px;background:#dfe7ff;color:#1458e8;font-size:9px;font-weight:700;line-height:1;letter-spacing:.02em;text-transform:uppercase}.nav-item:hover,.nav-item.active{color:var(--ink)}@media (prefers-reduced-motion: reduce){.nav-indicator-ready{transition:none}}.header-spacer{flex:1}.search-trigger{display:flex;align-items:center;gap:8px;height:32px;margin-right:4px;padding:0 6px 0 11px;border:1px solid var(--hairline);border-radius:8px;background:var(--bg-elevated);font-size:13px;color:var(--ink-faint);width:260px;min-width:32px;flex-shrink:1;transition:border-color .15s,box-shadow .15s;overflow:hidden;container-type:inline-size}@container (max-width: 160px){.search-trigger kbd{display:none}}@container (max-width: 80px){.search-trigger>:not(svg){display:none}.search-trigger>svg{margin-inline:auto;translate:-2.5px 0}}.search-trigger>span:not(:first-child){white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}.search-trigger:hover{border-color:var(--hairline-strong);box-shadow:0 1px 2px #1a18140f}.search-trigger kbd{flex:none;margin-left:auto;font-family:var(--mono);font-size:10.5px;white-space:nowrap;line-height:18px;padding:0 5px;border:1px solid var(--hairline);border-radius:4px;background:var(--bg-subtle);color:var(--ink-faint)}.icon-btn{width:32px;height:32px;display:flex;align-items:center;justify-content:center;border:1px solid var(--hairline);border-radius:6px;background:var(--bg-elevated);transition:border-color .15s}.icon-btn:hover{border-color:var(--hairline-strong)}.app-header .icon-btn,.app-header .header-feedback-link{flex:none;border-color:transparent;background:transparent;color:var(--ink-soft);transition:background .15s,color .15s}.app-header .icon-btn:hover,.app-header .header-feedback-link:hover,.app-header .icon-btn.active{border-color:transparent;background:var(--bg-subtle);color:var(--ink)}.app-header .header-feedback-link{padding:0 10px}.hf-signin-btn{display:inline-flex;align-items:center;gap:8px;max-width:100%;min-height:32px;padding:5px 12px;border:1px solid var(--hairline);border-radius:6px;background:var(--bg-elevated);font-size:13px;color:var(--ink);line-height:20px;white-space:normal;overflow-wrap:anywhere;transition:border-color .15s,background .15s}.hf-signin-btn>img{flex-shrink:0}.app-header .hf-signin-btn{flex-shrink:0;white-space:nowrap;overflow-wrap:normal}.hf-signin-btn:hover{border-color:var(--hairline-strong);background:var(--bg-subtle)}.user-avatar-btn{display:inline-flex;flex:none;align-items:center;justify-content:center;width:32px;height:32px;border:1px solid var(--hairline);border-radius:999px;background:var(--bg-elevated);padding:0;overflow:hidden;transition:border-color .15s}.user-avatar-btn:hover{border-color:var(--hairline-strong)}.user-avatar-btn:focus-visible{outline:2px solid var(--hairline-strong);outline-offset:2px}.page{max-width:calc(50vw + 640px);margin:0 auto;padding:32px}.site-footer{border-top:1px solid var(--hairline);color:var(--ink-faint);font-size:12px}.site-footer-inner{display:flex;flex-wrap:wrap;gap:14px;max-width:calc(50vw + 640px);margin:0 auto;padding:20px 32px 28px}.site-footer a{color:var(--ink-soft)}.site-footer a:hover{color:var(--ink)}.layout-with-sidebar{display:grid;grid-template-columns:220px 1fr;gap:48px;align-items:start}.sidebar{position:sticky;top:100px}.sidebar-section{margin-bottom:28px}.sidebar-label{font-family:var(--mono);font-size:10px;letter-spacing:.1em;text-transform:uppercase;color:var(--ink-faint);margin-bottom:12px}.sidebar-link{display:block;font-size:13px;color:var(--ink-soft);padding:5px 0;border-bottom:1px dotted transparent;transition:color .15s}.sidebar-link:hover{color:var(--ink)}.sidebar-link.active{color:var(--ink);font-weight:500}.sidebar-link .count{font-family:var(--mono);font-size:11px;color:var(--ink-faint);margin-left:6px}.sidebar-link-more{margin-top:8px;font-style:italic}.breadcrumb{display:flex;align-items:center;gap:8px;font-family:var(--mono);font-size:11px;color:var(--ink-faint);margin-bottom:24px}.breadcrumb a{color:var(--ink-soft)}.breadcrumb a:hover{color:var(--ink)}.breadcrumb .sep{color:var(--hairline-strong)}.breadcrumb a.breadcrumb-external{display:inline-flex;gap:3px;color:var(--accent-text);text-decoration:underline;text-decoration-color:color-mix(in srgb,var(--accent-text) 40%,transparent);text-underline-offset:3px}.breadcrumb a.breadcrumb-external:hover{text-decoration-color:currentColor}.detail-title{font-family:var(--serif);font-size:38px;font-weight:500;line-height:1.15;letter-spacing:-.02em;margin-bottom:16px;text-wrap:balance}.detail-title-org{display:inline-block;max-width:24ch;overflow:hidden;margin-left:.6em;font-family:var(--mono);font-size:13px;line-height:1.4;letter-spacing:0;color:var(--accent-text);text-overflow:ellipsis;white-space:nowrap;vertical-align:.3em}.detail-title-org--logo{display:inline-flex;align-items:center;justify-content:center;max-width:none;margin-left:.3em;font-size:inherit;width:.8em;height:.8em;border-radius:4px;overflow:hidden;vertical-align:-.05em}.detail-title-org--logo img{width:100%;height:100%;-o-object-fit:contain;object-fit:contain}.detail-title-tail{white-space:nowrap}.detail-title-edit{display:inline-flex;align-items:center;justify-content:center;width:18px;height:18px;margin-left:.2em;padding:0;border:0;border-radius:50%;background:transparent;color:var(--ink-faint);vertical-align:baseline;cursor:pointer;transition:color .15s}.detail-title-edit:hover{color:var(--ink)}.detail-title-org--logo+.detail-title-edit{position:relative;width:.42em;height:.42em;margin-left:-.24em;vertical-align:-.1em;border:1px solid var(--hairline);background:var(--bg-elevated)}.detail-title-org--logo+.detail-title-edit .icon-sm{width:65%;height:65%}.action-btn{display:inline-flex;align-items:center;gap:6px;padding:7px 12px;border:1px solid var(--hairline);border-radius:6px;background:var(--bg-elevated);font-size:12px;font-weight:500;color:var(--ink);transition:all .15s}.action-btn:hover{border-color:var(--ink)}.action-btn.primary{background:var(--ink);color:var(--bg);border-color:var(--ink)}.action-btn.primary:hover{background:color-mix(in oklch,var(--ink) 88%,var(--accent))}.no-results{padding:80px 0;text-align:center;font-family:var(--serif);color:var(--ink-faint);font-style:italic}.icon{width:14px;height:14px;flex-shrink:0}.icon-sm{width:11px;height:11px;flex-shrink:0}html{scroll-behavior:smooth}::-moz-selection{background:var(--accent-soft);color:var(--accent-text)}::selection{background:var(--accent-soft);color:var(--accent-text)}.mobile-menu-btn,.mobile-search-btn{display:none;width:36px;height:36px;align-items:center;justify-content:center;border-radius:4px;flex-shrink:0}.mobile-menu-btn:hover,.mobile-search-btn:hover{background:var(--bg-subtle)}.mobile-nav-drawer{position:fixed;top:0;right:0;bottom:0;left:0;background:#1a181466;z-index:100;display:flex;justify-content:flex-end}.mobile-nav-panel{width:min(320px,80vw);background:var(--bg-elevated);border-left:1px solid var(--hairline-strong);padding:16px 24px max(32px,env(safe-area-inset-bottom));display:flex;flex-direction:column;gap:4px;height:100%;min-height:0;overscroll-behavior-y:contain;overflow-y:auto;box-shadow:-8px 0 24px #0000000f}.mobile-nav-close{align-self:flex-end;min-width:44px;min-height:44px}.mobile-nav-link{flex-shrink:0;font-family:var(--serif);font-size:17px;padding:12px 4px;color:var(--ink);border-bottom:1px solid var(--hairline)}.mobile-nav-link-with-badge{display:flex;align-items:center;gap:6px}.mobile-nav-link.active{color:var(--accent-text);font-style:italic}.mobile-nav-search{display:flex;align-items:center;gap:10px;width:100%;font-family:var(--sans);font-size:14px;color:var(--ink-faint);background:var(--bg-subtle);border:1px solid var(--hairline);border-radius:6px;padding:10px 12px;margin-bottom:8px;text-align:left}.mobile-nav-search:hover{border-color:var(--hairline-strong);color:var(--ink)}@media (max-width: 980px){.nav,.search-trigger,.app-header .header-feedback-link{display:none}.mobile-menu-btn,.mobile-search-btn{display:inline-flex}}@media (max-width: 640px){.app-header-inner,.brand{gap:8px}.brand-mark{width:20px;height:20px}.brand-name{font-size:18px}.header-bookmark-btn,.header-github-btn{display:none}.app-header .hf-signin-btn{width:36px;height:36px;padding:0;gap:0;justify-content:center;flex-shrink:0}.app-header .hf-signin-btn>span{display:none}}@media (max-width: 880px){.app-header-inner{padding:14px 16px;gap:12px}.page{padding:24px 16px}.layout-with-sidebar{grid-template-columns:minmax(0,1fr);gap:24px}.layout-with-sidebar .sidebar{position:static;top:auto}.layout-with-sidebar .sidebar-section{min-width:0;margin-bottom:0}.layout-with-sidebar .sidebar-links{display:flex;gap:8px;margin:0 -16px;padding:0 16px 2px;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:none}.layout-with-sidebar .sidebar-links::-webkit-scrollbar{display:none}.layout-with-sidebar .sidebar-links .sidebar-link{flex:0 0 auto;margin:0;padding:6px 12px;border:1px solid var(--hairline);border-radius:999px;background:var(--bg-elevated);white-space:nowrap}.detail-title{font-size:28px}}@media (max-width: 640px){.app-header-inner{padding:12px 14px;gap:8px}.page{padding:20px 14px}.layout-with-sidebar .sidebar-links{margin:0 -14px;padding:0 14px 2px}.detail-title{font-size:24px}.brand-name{font-size:17px}}.access-request-page{min-height:100vh;min-height:100svh;display:grid;place-items:center;padding:32px 20px;background:radial-gradient(circle at 50% 8%,color-mix(in srgb,var(--accent-soft) 60%,transparent),transparent 42%),var(--bg)}.access-request-card{width:min(100%,470px);padding:38px;border:1px solid var(--hairline);border-radius:12px;background:color-mix(in srgb,var(--bg-elevated) 94%,transparent);box-shadow:0 20px 60px #1a181414}.access-request-brand{display:inline-flex;align-items:center;gap:10px;margin-bottom:42px;font-family:var(--serif)}.access-request-heading h1,.access-request-success h1{margin-bottom:12px;font-family:var(--serif);font-size:clamp(36px,8vw,48px);font-weight:500;line-height:1;letter-spacing:-.035em}.access-request-heading>p:last-child,.access-request-success p,.access-request-signin>p{color:var(--ink-soft);font-size:15px;line-height:1.65}.access-request-eyebrow{margin-bottom:10px;color:var(--accent-text);font-size:11px;font-weight:700;letter-spacing:.12em;text-transform:uppercase}.access-request-form,.access-request-signin{margin-top:30px}.access-request-form label{display:block;margin-bottom:8px;font-size:12px;font-weight:600}.access-request-input-wrap{display:flex;align-items:center;border:1px solid var(--hairline-strong);border-radius:7px;background:var(--bg);color:var(--ink-faint);transition:border-color .15s,box-shadow .15s}.access-request-input-wrap:focus-within{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-soft)}.access-request-input-wrap>span{padding-left:13px;font-size:15px}.access-request-input-wrap input{width:100%;padding:11px 13px 11px 3px;border:0;outline:0;background:transparent;color:var(--ink);font:500 14px var(--sans)}.access-request-verified{margin-top:7px;color:var(--ink-faint);font-size:11px}.access-request-submit{width:100%;margin-top:20px;padding:12px 18px;border-radius:7px;background:var(--ink);color:var(--bg);font-size:13px;font-weight:600;transition:opacity .15s,transform .15s}.access-request-submit:hover:not(:disabled){transform:translateY(-1px)}.access-request-submit:disabled{cursor:wait;opacity:.6}.access-request-error{margin-top:12px;color:var(--negative-text);font-size:12px}.access-request-status{margin-top:30px;color:var(--ink-soft)}.access-request-signin .hf-signin-btn{margin-top:18px}.access-request-success svg{margin-bottom:24px;color:var(--positive-text)}@media (max-width: 520px){.access-request-card{padding:28px 24px}.access-request-brand{margin-bottom:34px}}.legal-page{max-width:880px;padding-bottom:72px;color:var(--ink-soft);font-family:var(--sans);font-size:15px;line-height:1.7}.legal-header{margin-bottom:34px;padding-bottom:24px;border-bottom:1px solid var(--hairline)}.legal-kicker{margin:0 0 6px;color:var(--accent-text);font-size:11px;font-weight:700;letter-spacing:.1em;text-transform:uppercase}.legal-header h1{margin:0;color:var(--ink);font-family:var(--serif);font-size:clamp(38px,6vw,56px);font-weight:500;letter-spacing:-.025em;line-height:1.05}.legal-effective-date{margin:12px 0 0;color:var(--ink-faint)}.legal-page section{margin-top:34px}.legal-page h2{margin:0 0 10px;color:var(--ink);font-family:var(--serif);font-size:25px;font-weight:600;line-height:1.25}.legal-page h3{margin:22px 0 6px;color:var(--ink);font-size:15px;font-weight:700}.legal-page p{margin:0 0 14px}.legal-page ul{margin:8px 0 16px;padding-left:22px}.legal-page li{margin:7px 0}.legal-page a{color:var(--accent-text);text-decoration:underline}.legal-page strong{color:var(--ink)}.feed-header{display:flex;align-items:flex-end;justify-content:space-between;margin-bottom:32px;gap:24px;flex-wrap:wrap}.feed-title{font-family:var(--serif);font-size:44px;font-weight:500;letter-spacing:-.025em;line-height:1}.feed-title em{font-style:italic;font-weight:400;color:var(--accent)}.feed-subtitle{font-size:13px;color:var(--ink-soft);margin-top:8px;font-family:var(--serif);font-style:italic}.conference-deadlines-link{font-size:16px;color:var(--ink-soft);margin-top:12px}.trend-chart{margin:0;width:100%}.trend-chart-visual{position:relative;min-width:0}.trend-chart-table{margin-top:10px}.feedback-link{display:inline-flex;align-items:center;height:32px;padding:0 12px;border:1px solid var(--hairline);border-radius:6px;background:var(--bg-elevated);color:var(--ink-soft);font-size:13px;font-weight:500;white-space:nowrap;transition:border-color .15s,color .15s,background .15s}.feedback-link:hover{border-color:var(--hairline-strong);background:var(--bg-subtle);color:var(--ink)}.period-switch{display:flex;align-items:center;gap:2px;background:var(--bg-elevated);border:1px solid var(--hairline);border-radius:6px;padding:3px}.period-btn{padding:5px 12px;font-size:12px;font-weight:500;color:var(--ink-soft);border-radius:4px;transition:all .15s}.period-btn.active{background:var(--ink);color:var(--bg)}.period-btn:not(.active):hover{background:var(--bg-subtle);color:var(--ink)}.date-nav{display:flex;align-items:center;gap:12px;font-family:var(--mono);font-size:12px;color:var(--ink-soft)}.date-nav button{width:26px;height:26px;border:1px solid var(--hairline);border-radius:4px;display:flex;align-items:center;justify-content:center;background:var(--bg-elevated)}.date-nav button:hover{background:var(--bg-subtle)}.paper-list{display:flex;flex-direction:column}.paper-card{display:grid;grid-template-columns:170px 1fr;gap:28px;padding:24px 0;border-bottom:1px solid var(--hairline);align-items:stretch}.paper-thumb-wrap{transition:transform .15s;display:flex;align-items:flex-end;justify-content:flex-start}.paper-thumb-wrap:hover{transform:translateY(-2px)}.paper-thumb-skeleton{width:160px;height:220px}.paper-card:first-child{padding-top:0}.paper-rank{font-family:var(--serif);font-size:32px;font-weight:500;color:var(--ink-faint);font-feature-settings:"tnum";line-height:.9;font-style:italic}.paper-body{min-width:0;display:flex;align-items:stretch;gap:28px}.paper-body-main{min-width:0;flex:1}.paper-resources{display:flex;flex-direction:column;justify-content:center;align-items:center;gap:18px;flex:0 0 auto;width:92px;border-left:1px solid var(--hairline);padding-left:20px}.paper-resource{display:flex;flex-direction:column;align-items:center;gap:4px;color:inherit}a.paper-resource.is-link{text-decoration:none;cursor:pointer;border-radius:4px;transition:transform .15s}a.paper-resource.is-link:hover{transform:translateY(-1px)}a.paper-resource.is-link:hover .resource-value{text-decoration:underline;text-underline-offset:2px}a.paper-resource.is-link:focus-visible{outline:2px solid var(--ink);outline-offset:2px}.paper-resource .resource-stat{display:flex;flex-direction:column;align-items:center;gap:2px}.paper-resource .resource-value{display:inline-flex;align-items:center;gap:3px;font-family:var(--mono);font-size:14px;color:var(--ink);font-weight:500;font-variant-numeric:tabular-nums;letter-spacing:-.01em}.paper-resource .resource-label{font-family:var(--mono);font-size:10px;letter-spacing:.06em;text-transform:uppercase;color:var(--ink-faint)}.paper-resource .gh-rate-arrow{color:var(--accent-text);font-size:13px;transform:translateY(-.5px)}.paper-meta-line{display:flex;align-items:center;gap:12px;font-family:var(--mono);font-size:11px;color:var(--ink-faint);margin-bottom:6px}.paper-meta-line .sep{color:var(--hairline-strong)}.paper-follow-reason{font-size:12px;color:var(--ink-faint);margin-bottom:4px}.paper-title{font-family:var(--serif);font-size:22px;font-weight:500;line-height:1.2;letter-spacing:-.015em;margin-bottom:6px;color:var(--ink);cursor:pointer;text-wrap:pretty}.paper-title:hover{color:var(--accent-text)}.paper-organization-logos{display:inline-flex;align-items:center;gap:4px;margin-left:7px;vertical-align:-4px}.paper-organization-logo{display:inline-grid;width:24px;height:24px;flex:0 0 24px;place-items:center;overflow:hidden;border:1px solid var(--hairline);border-radius:4px;background:var(--bg)}.paper-organization-logo:hover{border-color:var(--hairline-strong)}.paper-organization-logo img{width:100%;height:100%;padding:2px;-o-object-fit:contain;object-fit:contain}.paper-authors{font-size:13px;color:var(--ink-soft);margin-bottom:10px;font-family:var(--serif)}.paper-card-author-avatar{width:16px;height:16px;margin-right:4px;vertical-align:-3px}.paper-authors a{color:inherit;text-decoration:none}.paper-authors a:hover{color:var(--accent-text);text-decoration:underline;text-underline-offset:2px}.paper-abstract{font-size:13.5px;color:var(--ink-soft);line-height:1.55;max-height:4.65em;margin-bottom:12px;font-family:var(--serif);text-wrap:pretty;display:-webkit-box;line-clamp:3;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}.paper-title mark,.paper-abstract mark{background:color-mix(in srgb,var(--accent) 24%,transparent);color:inherit;border-radius:2px;padding:0 1px}.search-results-end{padding:24px 0;text-align:center;color:var(--ink-faint);font:11px var(--mono)}.paper-tags{display:flex;flex-wrap:wrap;gap:6px}.paper-tags--clamped{--tag-row-height: 26px;max-height:calc(var(--tag-row-height) * 2 + 6px);overflow:hidden}.paper-sota{position:relative;white-space:nowrap;overflow:hidden;margin-bottom:12px;font-family:var(--mono);font-size:12px;line-height:1.6}.paper-sota-stack{margin-top:16px;padding-top:16px;border-top:1px solid var(--hairline)}.paper-sota-stack .paper-sota{margin-bottom:4px}.paper-sota-stack .paper-sota:last-child{margin-bottom:0}.paper-sota-measure{position:absolute;left:-9999px;top:0;visibility:hidden;white-space:pre;pointer-events:none}.paper-sota-label{font-weight:500;color:var(--ink-faint)}.paper-sota-label--sota{color:#b8860b}.paper-sota-sep,.paper-sota-on{color:var(--ink-faint)}.paper-sota-name{color:var(--accent-text)}.paper-sota-name:hover{text-decoration:underline}.paper-sota-more{font-size:11px;color:var(--ink-faint);cursor:pointer}.paper-sota-more:hover{color:var(--accent-text);text-decoration:underline}.paper-stats{display:flex;flex-direction:column;align-items:flex-end;gap:8px;font-family:var(--mono);font-size:11px;color:var(--ink-soft)}.upvote-btn{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:8px 14px;border:1px solid var(--hairline);border-radius:6px;background:var(--bg-elevated);font-family:var(--mono);font-size:13px;font-weight:500;min-width:56px;transition:all .15s}.upvote-btn:hover{border-color:var(--ink)}.upvote-btn.upvoted{background:var(--accent-soft);border-color:var(--accent);color:var(--accent-text)}.upvote-btn .arrow{font-size:9px;line-height:1;margin-bottom:2px}.upvote-btn .count{font-feature-settings:"tnum"}.stat-line{display:flex;align-items:center;gap:5px}.sort-bar{display:flex;align-items:center;justify-content:space-between;padding-bottom:16px;border-bottom:1px solid var(--hairline);margin-bottom:16px}.sort-options{display:flex;gap:4px}.sort-btn{padding:4px 10px;font-family:var(--mono);font-size:11px;font-weight:500;letter-spacing:.02em;color:var(--ink-soft);border-radius:4px;transition:all .15s;text-transform:lowercase}.sort-btn.active{background:var(--ink);color:var(--bg)}.sort-btn:not(.active):hover{background:var(--bg-subtle);color:var(--ink)}.paper-feed-toolbar-controls,.paper-feed-resource-controls,.paper-feed-filter-options{display:flex;align-items:center}.paper-feed-toolbar-controls{gap:14px;flex-wrap:wrap}.paper-feed-resource-controls{gap:10px}.paper-feed-resource-divider{width:1px;height:22px;background:var(--hairline)}.paper-feed-filter-options{gap:6px;flex-wrap:wrap}.paper-feed-filter{display:inline-flex;align-items:center;gap:6px;min-height:30px;padding:5px 10px;border:1px solid var(--hairline);border-radius:999px;background:var(--bg);color:var(--ink-soft);font-family:var(--mono);font-size:11px;letter-spacing:.01em;cursor:pointer;transition:border-color .15s,background .15s,color .15s}.paper-feed-filter-content{display:inline-flex;align-items:center;gap:6px}.paper-feed-filter:hover{border-color:var(--ink-faint);color:var(--ink)}.paper-feed-filter.active{border-color:var(--ink);background:var(--ink);color:var(--bg)}.paper-feed-filter:focus-visible{outline:2px solid var(--ink);outline-offset:2px}.paper-feed-filter-icon{display:inline-flex;color:currentColor;filter:grayscale(1)}.hf-resource-logo{position:relative;display:inline-flex;width:15px;height:15px}.hf-resource-logo img{position:absolute;top:0;right:0;bottom:0;left:0;display:block;width:15px;height:15px}.hf-resource-logo-white,.paper-feed-filter.active .hf-resource-logo-black{visibility:hidden}.paper-feed-filter.active .hf-resource-logo-white{visibility:visible}.paper-feed-filter-check{display:inline-flex;align-items:center;justify-content:center;width:17px;height:17px;border-radius:50%;background:color-mix(in srgb,var(--bg) 18%,transparent);color:currentColor;font-size:10px;line-height:1}.home-feed-sort-bar{flex-wrap:wrap;row-gap:10px}.results-count{font-family:var(--mono);font-size:11px;color:var(--ink-faint)}.paper-feed-scope-links{margin-top:12px;display:flex;flex-direction:column;align-items:flex-start;gap:8px}.paper-feed-primary-links,.paper-feed-task-tags{display:flex;flex-wrap:wrap;align-items:center;gap:10px}.papers-feed-layout-scoped{display:block}.paper-thumb{display:none}.papers-search-row{display:flex;margin-top:12px;margin-bottom:24px}.papers-search-input-wrap{display:flex;align-items:center;gap:8px;border:1px solid var(--hairline-strong);background:var(--bg-elevated);padding:10px 14px;border-radius:4px;flex:1;max-width:600px;color:var(--ink-faint)}.papers-search-input-wrap:focus-within{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-soft)}.papers-search-input{flex:1;border:none;outline:none;background:transparent;font-family:var(--sans);font-size:14px;color:var(--ink)}.papers-search-input::-moz-placeholder{color:var(--ink-faint)}.papers-search-input::placeholder{color:var(--ink-faint)}@media (max-width: 880px){.feed-title{font-size:32px}.paper-card{grid-template-columns:120px 1fr;gap:16px;padding:20px 0}.paper-body{flex-direction:column;align-items:stretch;gap:12px}.paper-resources{width:auto;flex-direction:row;align-items:center;justify-content:flex-start;gap:24px;border-left:none;border-top:1px solid var(--hairline);padding-left:0;padding-top:12px}.paper-resource{flex-direction:row;gap:8px}.paper-resource .resource-stat{align-items:flex-start}}@media (min-width: 641px) and (max-width: 880px){.paper-thumb-wrap{min-width:0;align-items:flex-start}.paper-thumb-wrap>div{width:100%!important;max-width:120px;height:auto!important;aspect-ratio:160 / 220}.paper-thumb-wrap>div>img,.paper-thumb-wrap>div>svg{width:100%!important;height:100%!important}.paper-thumb-skeleton{width:100%;max-width:120px;height:auto;aspect-ratio:160 / 220}}@media (max-width: 640px){.feed-header{margin-bottom:24px;gap:16px}.feed-title{font-size:26px}.paper-card{grid-template-columns:1fr;gap:12px}.paper-resources{border-top:none;padding-top:0}.paper-thumb-wrap{align-self:flex-start}.paper-card:has(>.paper-thumb-wrap){grid-template-columns:84px minmax(0,1fr);grid-template-rows:auto auto 1fr;-moz-column-gap:14px;column-gap:14px;row-gap:0}.paper-card:has(>.paper-thumb-wrap)>.paper-body,.paper-card:has(>.paper-thumb-wrap) .paper-body-main{display:contents}.paper-card>.paper-thumb-wrap{grid-column:1;grid-row:1 / 4;margin-bottom:12px}.paper-card>.paper-thumb-wrap>div{width:84px!important;height:auto!important;aspect-ratio:160 / 220}.paper-card>.paper-thumb-wrap>div>img,.paper-card>.paper-thumb-wrap>div>svg{width:100%!important;height:100%!important}.paper-card:has(>.paper-thumb-wrap) .paper-follow-reason,.paper-card:has(>.paper-thumb-wrap) .paper-title,.paper-card:has(>.paper-thumb-wrap) .paper-authors{grid-column:2;align-self:start}.paper-card:has(>.paper-thumb-wrap) .paper-abstract,.paper-card:has(>.paper-thumb-wrap) .paper-sota,.paper-card:has(>.paper-thumb-wrap) .paper-tags,.paper-card:has(>.paper-thumb-wrap) .paper-resources{grid-column:1 / -1}.paper-card:has(>.paper-thumb-wrap) .paper-resources{margin-top:12px}.paper-title{font-size:19px}.paper-abstract{max-height:6.2em;-webkit-line-clamp:4;line-clamp:4}}.sort-options-time{margin-left:auto}.sort-btn-time{text-transform:none}@media (max-width: 900px){.sort-bar{flex-wrap:wrap;gap:8px}.sort-options-time{margin-left:0}}@media (max-width: 560px){.paper-feed-resource-divider{display:none}.paper-feed-resource-controls{gap:0}}.paper-date-filter{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:4px}.paper-date-popover{width:min(760px,calc(100vw - 32px));max-width:760px;padding:14px 18px;max-height:calc(100vh - 24px);overflow-y:auto}.paper-date-popover-header{margin-bottom:8px}.paper-date-popover-header h2{margin:0;font-family:var(--serif);font-size:21px}.paper-date-popover-header p{margin:5px 0 0;color:var(--ink-soft)}.paper-date-navigation{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:36px;margin-bottom:-38px;pointer-events:none;position:relative;z-index:1}.paper-date-navigation-group{display:flex;justify-content:space-between}.paper-date-navigation button{pointer-events:auto}.paper-date-navigation button,.paper-date-actions button{border:1px solid var(--hairline);border-radius:6px;background:var(--bg-elevated);color:var(--ink);padding:7px 11px;font:inherit;cursor:pointer}.paper-date-calendars{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:36px}.paper-date-year{display:flex;align-items:center;justify-content:center;gap:8px;margin-bottom:6px;color:var(--ink-soft);font-size:13px;font-weight:600}.paper-date-year input{width:5.5rem;border:1px solid var(--hairline);border-radius:5px;background:var(--bg-elevated);color:var(--ink);padding:5px 7px;font:inherit}.paper-date-year input:focus-visible{outline:2px solid var(--accent);outline-offset:1px}.paper-date-calendar h3{margin:0 0 10px;text-align:center;font-family:var(--serif);font-size:17px}.paper-date-weekdays,.paper-date-days{display:grid;grid-template-columns:repeat(7,minmax(0,1fr))}.paper-date-weekdays span{padding:3px 0 4px;color:var(--ink-faint);text-align:center;font-size:11px;font-weight:600}.paper-date-day{width:28px;height:28px;justify-self:center;border:0;border-radius:999px;background:transparent;color:var(--ink);font:inherit;cursor:pointer}.paper-date-day:hover:not(:disabled),.paper-date-day:focus-visible{background:var(--bg-subtle);outline:2px solid var(--accent);outline-offset:-2px}.paper-date-day.in-range{border-radius:0;background:color-mix(in srgb,var(--accent) 14%,transparent)}.paper-date-day.selected{background:var(--accent);color:#fff;font-weight:700}.paper-date-day.today:not(.selected){box-shadow:inset 0 0 0 1px var(--accent)}.paper-date-day:disabled{color:var(--ink-faint);cursor:not-allowed;opacity:.42}.paper-date-day.outside{visibility:hidden}.paper-date-actions{display:flex;align-items:center;justify-content:space-between;gap:12px;padding-top:10px;border-top:1px solid var(--hairline)}.paper-date-actions>div{display:flex;gap:8px}.paper-date-actions .paper-date-clear{border-color:transparent;color:var(--ink-soft)}.paper-date-actions .paper-date-apply{border-color:var(--accent);background:var(--accent);color:#fff}.paper-date-actions button:disabled{cursor:not-allowed;opacity:.45}.paper-date-filter-single-calendar{justify-content:flex-start}.paper-date-popover-single-calendar{width:calc(100vw - 20px);padding:20px 14px}.paper-date-popover-single-calendar .paper-date-calendars,.paper-date-popover-single-calendar .paper-date-navigation{display:block}.paper-date-popover-single-calendar .paper-date-day{width:36px;height:36px}.conference-award-label{font-family:var(--mono);font-size:11px;color:var(--accent-text);letter-spacing:.08em;margin-bottom:8px}.organization-hero{display:grid;grid-template-columns:minmax(260px,.34fr) minmax(0,1fr);align-items:center;gap:48px;margin:24px 0 32px}.organization-hero-profile{min-width:0}.organization-hero-title{display:flex;align-items:center;gap:14px}.organization-hero-title img{flex:none;-o-object-fit:contain;object-fit:contain}.feed-title.organization-hero-title--long{font-size:30px;line-height:1.1}.organization-hero-name{min-width:0}.organization-hero-full-name{display:block;margin-top:8px;color:var(--ink-soft);font-size:18px;letter-spacing:-.01em;line-height:1.25}.organization-hero-monogram{display:grid;flex:none;place-items:center;width:58px;height:58px;border:1px solid var(--hairline);border-radius:6px;background:var(--bg-elevated);color:var(--accent-text);font-size:30px;line-height:1}.organization-hero-links{display:flex;flex-wrap:wrap;gap:12px;margin-top:12px}.organization-contributions{width:100%;min-width:0}.organization-contributions-header{margin-bottom:12px}.organization-contributions-title{font-family:var(--serif);font-size:20px;font-weight:600;line-height:1.2}.organization-contributions-summary{margin-top:3px;color:var(--ink-soft);font-size:12px}.organization-contributions-legend{display:flex;align-items:center;justify-content:flex-start;gap:4px;margin-top:8px;color:var(--ink-faint);font-family:var(--mono);font-size:10px;white-space:nowrap}.organization-contributions-legend span:first-child{margin-right:3px}.organization-contributions-legend span:last-child{margin-left:3px}.organization-contributions-scroll{width:calc(100% + 34px);max-width:none;margin-left:-34px;overflow-x:auto;padding:2px 0;scrollbar-width:thin;scrollbar-color:var(--hairline-strong) transparent}.organization-contributions-plot{display:grid;grid-template-columns:25px auto;gap:9px;margin:0}.organization-contributions-weekdays{display:grid;grid-template-rows:repeat(7,12px);gap:3px;padding-top:24px;color:var(--ink-faint);font-family:var(--mono);font-size:9px;line-height:12px;text-align:right}.organization-contributions-months{display:grid;gap:3px;height:20px;color:var(--ink-faint);font-family:var(--mono);font-size:9px;line-height:12px}.organization-contributions-months span{grid-row:1;white-space:nowrap}.organization-contributions-grid{display:grid;grid-template-rows:repeat(7,12px);grid-auto-flow:column;gap:3px}.organization-contribution-cell{display:block;width:12px;height:12px;border:1px solid color-mix(in srgb,var(--hairline) 78%,transparent);border-radius:2px;background:var(--bg-subtle)}.organization-contribution-cell.level-1{border-color:color-mix(in srgb,var(--positive-border) 60%,transparent);background:color-mix(in srgb,var(--positive-bg) 65%,var(--positive-border))}.organization-contribution-cell.level-2{border-color:transparent;background:color-mix(in srgb,var(--positive-text) 35%,var(--positive-bg))}.organization-contribution-cell.level-3{border-color:transparent;background:color-mix(in srgb,var(--positive-text) 60%,var(--positive-bg))}.organization-contribution-cell.level-4{border-color:transparent;background:var(--positive-text)}.organization-contribution-cell.is-outside{visibility:hidden}.organization-contributions-skeleton{width:100%;height:154px;border-radius:6px}@media (max-width: 960px){.organization-hero{grid-template-columns:1fr;align-items:start;gap:28px}.organization-contributions-plot{margin:0 auto}.organization-contributions-scroll{width:100%;max-width:100%;margin-left:0}.organization-contributions-legend{justify-content:center;width:min(100%,826px);margin:8px auto 0}}@media (max-width: 640px){.organization-hero{margin-bottom:28px}.feed-title.organization-hero-title--long{font-size:22px}.organization-hero-full-name{font-size:15px}.organization-contributions{max-width:calc(100vw - 28px)}}.author-hero{margin:8px 0 20px}.author-hero-title{display:flex;align-items:center;gap:20px}.author-avatar{display:block;width:96px;height:96px}@media (max-width: 640px){.author-avatar{width:64px;height:64px}}.author-photo{display:flex;flex:none;flex-direction:column;align-items:center;gap:4px;max-width:120px;margin:0}.author-photo figcaption{color:var(--ink-soft);font-size:10px;line-height:1.3;text-align:center}.author-photo figcaption a{color:inherit}.author-hero .feed-subtitle a{color:var(--accent-text);text-decoration:none}.author-hero .feed-subtitle a:hover{text-decoration:underline;text-underline-offset:2px}.tag-chip{display:inline-flex;align-items:center;gap:5px;padding:3px 9px;font-family:var(--mono);font-size:11px;font-weight:500;border-radius:4px;cursor:pointer;transition:filter .15s,transform .15s;white-space:nowrap;border:1px solid transparent}.tag-chip:hover{filter:brightness(.96);transform:translateY(-1px)}.tag-chip .dot{width:5px;height:5px;border-radius:50%}.paper-tags--clamped .tag-chip{line-height:16px}.tag-hero{padding:48px 0 32px;border-bottom:1px solid var(--hairline);margin-bottom:32px}.tag-hero-eyebrow{font-family:var(--mono);font-size:11px;letter-spacing:.12em;text-transform:uppercase;color:var(--ink-faint);margin-bottom:12px;display:flex;align-items:center;gap:8px}.tag-hero-title{font-family:var(--serif);font-size:56px;font-weight:500;letter-spacing:-.025em;line-height:1;margin-bottom:16px;overflow-wrap:break-word}.tag-hero-meta{display:flex;gap:32px;margin-top:24px;font-family:var(--mono);font-size:12px;color:var(--ink-soft)}.tag-hero-meta .stat{display:flex;flex-direction:column;gap:4px}.tag-hero-meta .stat .label{font-size:10px;letter-spacing:.1em;text-transform:uppercase;color:var(--ink-faint)}.tag-hero-meta .stat .value{font-family:var(--serif);font-size:22px;font-weight:500;color:var(--ink)}.tag-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:0;border-top:1px solid var(--hairline)}.tag-cell{padding:20px 24px;border-bottom:1px solid var(--hairline);border-right:1px solid var(--hairline);cursor:pointer;transition:background .15s;display:flex;flex-direction:column;gap:8px}.tag-cell:nth-child(3n){border-right:none}.tag-cell:hover{background:var(--bg-elevated)}.tag-cell .name{font-family:var(--serif);font-size:18px;font-weight:500;display:flex;align-items:center;gap:8px}.tag-cell .name .dot{width:8px;height:8px;border-radius:50%}.tag-cell .name .task-icon{flex:none;display:inline-flex;align-items:center;justify-content:center;width:30px;height:30px;border-radius:9px;background:color-mix(in oklch,currentColor 14%,transparent);transition:transform .2s ease}.tag-cell:hover .name .task-icon{transform:rotate(-8deg) scale(1.1)}.tag-cell .meta{font-family:var(--mono);font-size:11px;color:var(--ink-faint);display:flex;gap:12px}.taxonomy-trending{margin-bottom:48px;scroll-margin-top:80px}.taxonomy-trending-header{padding-bottom:12px;border-bottom:1px solid var(--hairline-strong)}.taxonomy-trending-header h2{display:flex;align-items:center;gap:10px;margin-bottom:4px;font-family:var(--serif);font-size:26px;font-weight:500;letter-spacing:-.02em}.taxonomy-trending-header h2 svg{color:var(--accent-text)}.taxonomy-trending-note{margin:0;font-family:var(--serif);font-style:italic;font-size:13px;color:var(--ink-soft)}.taxonomy-trending-rank{min-width:1.6em;font-family:var(--mono);font-size:11px;font-style:normal;color:var(--ink-faint)}.taxonomy-trending-meta{flex-wrap:wrap}.taxonomy-trending-lift{display:inline-flex;align-items:center;gap:3px}.tag-hero-meta .stat .value small{margin-left:2px;font-family:var(--mono);font-size:10px;font-weight:500;color:var(--ink-faint)}.framework-category{margin-top:32px}.framework-category-head{display:flex;align-items:flex-start;justify-content:space-between;gap:24px;margin-bottom:16px}.framework-category-blurb{font-family:var(--serif);font-size:14px;line-height:1.55;color:var(--ink-soft);max-width:720px;margin:0}.framework-category-meta{font-family:var(--mono);font-size:11px;color:var(--ink-faint);white-space:nowrap}.framework-guide-link{display:inline-block;margin-top:8px;font-family:var(--mono);font-size:11px;color:var(--accent-text);text-decoration:none}.framework-guide-link:hover{text-decoration:underline}.framework-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:14px}.framework-card{border:1px solid var(--hairline);background:var(--bg-elevated);border-radius:6px;padding:18px 22px;scroll-margin-top:24px;display:flex;flex-direction:column;gap:12px;transition:border-color .15s}.framework-card:hover{border-color:var(--ink)}.framework-card-clickable{cursor:pointer}.framework-card-clickable:focus-visible{border-color:var(--ink);outline:2px solid var(--accent);outline-offset:2px}.framework-card-head{display:flex;justify-content:space-between;align-items:flex-start;gap:16px}.framework-card-name{font-family:var(--serif);font-size:20px;font-weight:500;letter-spacing:-.01em;margin:0;color:var(--ink)}.framework-card-org{font-family:var(--mono);font-size:11px;color:var(--ink-faint);margin-top:4px}.framework-platform-row{display:flex;flex-wrap:wrap;gap:6px;justify-content:flex-end}.framework-platform-chip{font-family:var(--mono);font-size:10px;letter-spacing:.03em;text-transform:uppercase;padding:3px 8px;border-radius:3px;white-space:nowrap}.framework-card-desc{font-family:var(--sans);font-size:14px;line-height:1.55;color:var(--ink-soft);margin:0}.framework-card-when{font-family:var(--serif);font-style:italic;font-size:13px;line-height:1.5;color:var(--ink-soft);padding-top:4px;border-top:1px solid var(--hairline)}.framework-card-when-label{display:block;font-family:var(--mono);font-size:10px;font-style:normal;letter-spacing:.06em;text-transform:uppercase;color:var(--ink-faint);margin-bottom:4px}.framework-card-links{display:flex;flex-wrap:wrap;gap:10px;margin-top:auto}.framework-link{display:inline-flex;align-items:center;gap:6px;font-family:var(--mono);font-size:11px;color:var(--accent-text);text-decoration:none;padding:4px 10px;border:1px solid var(--hairline);border-radius:4px;transition:border-color .15s,background .15s}.framework-link:hover{border-color:var(--ink);background:var(--bg-subtle)}.framework-link-disabled,.framework-link-disabled:hover{color:var(--ink-faint);background:transparent;border-color:var(--hairline);cursor:not-allowed}@media (max-width: 880px){.tag-grid{grid-template-columns:repeat(2,1fr)}.tag-cell:nth-child(3n){border-right:1px solid var(--hairline)}.tag-cell:nth-child(2n){border-right:none}.framework-category-head{flex-direction:column;gap:8px}.framework-card-head{flex-direction:column;gap:10px}.framework-platform-row{justify-content:flex-start}.tag-hero-title{font-size:40px}}@media (max-width: 640px){.tag-hero{padding:32px 0 24px;margin-bottom:24px}.tag-hero-title{font-size:30px}.tag-grid{grid-template-columns:1fr}.tag-cell{padding:16px;border-right:none!important}.framework-grid{grid-template-columns:1fr}.tag-hero-meta{gap:20px;flex-wrap:wrap}}.area-section{margin-bottom:48px;scroll-margin-top:80px}.area-section-head{display:flex;align-items:baseline;justify-content:space-between;flex-wrap:wrap;gap:6px 24px;padding-bottom:12px;border-bottom:1px solid var(--hairline-strong)}.area-section-title{font-family:var(--serif);font-size:26px;font-weight:500;letter-spacing:-.02em;margin-bottom:4px}.area-section-description{font-family:var(--serif);font-style:italic;font-size:13px;color:var(--ink-soft)}.area-section-meta,.area-directory-footer{font-family:var(--mono);font-size:11px;color:var(--ink-faint)}.area-section-meta{white-space:nowrap}.area-directory-footer{margin-top:24px}.area-directory-skeleton{display:flex;flex-direction:column;gap:32px}.task-hero-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(320px,480px);gap:48px;align-items:start}@media (min-width: 1200px){.task-hero-grid--wide{grid-template-columns:minmax(0,1fr) minmax(320px,720px)}}.task-figure-card{background:var(--bg-elevated);border:1px solid var(--hairline);border-radius:6px;padding:16px 16px 12px;margin:0;box-shadow:0 1px #00000005}.task-figure-img-wrap{width:100%;background:var(--bg);border-radius:4px;overflow:hidden;line-height:0}.task-figure-img{width:100%;height:auto;display:block}.task-figure-card--compact .task-figure-img{width:50%;margin:0 auto}.task-figure-card figcaption{font-family:var(--serif);font-style:italic;font-size:12px;color:var(--ink-faint);text-align:center;margin-top:10px;border-top:1px solid var(--hairline);padding-top:10px}.task-image-credit{color:var(--ink-faint);font-family:var(--mono);font-size:10px;font-style:normal}.task-image-credit p{margin:0}.task-image-credit a{color:inherit;text-decoration:underline;text-underline-offset:2px}.task-image-credit a:hover{color:var(--accent-text)}@media (max-width: 900px){.task-hero-grid{grid-template-columns:1fr;gap:24px}}.taxonomy-suggestion-cell{-webkit-appearance:none;-moz-appearance:none;appearance:none;width:100%;border-top:0;border-left:0;background:transparent;color:var(--ink-soft);text-align:left}.taxonomy-suggestion-cell .name{font-style:italic}.taxonomy-suggestion-icon{width:14px;height:14px}.task-page-grid{display:grid;grid-template-columns:1fr 260px;gap:56px;align-items:start}.task-featured-collection{display:grid;grid-template-columns:1fr auto;gap:4px 24px;align-items:center;margin-top:32px;padding:18px 24px;border:1px solid var(--hairline);border-left:3px solid var(--accent);border-radius:6px;background:var(--bg-elevated);color:var(--ink);text-decoration:none;transition:border-color .15s}.task-featured-collection:hover{border-color:var(--accent)}.task-featured-collection-eyebrow{grid-column:1;font-family:var(--mono);font-size:10px;font-weight:600;letter-spacing:.12em;text-transform:uppercase;color:var(--accent-text)}.task-featured-collection strong{grid-column:1;font-family:var(--serif);font-size:22px;line-height:1.2}.task-featured-collection-description{grid-column:1;color:var(--ink-soft);font-size:14px;line-height:1.45}.task-featured-collection-meta{grid-column:2;grid-row:1 / span 3;display:inline-flex;align-items:center;gap:6px;font-family:var(--mono);font-size:11px;letter-spacing:.08em;text-transform:uppercase;color:var(--accent-text);white-space:nowrap}.medical-ai-hub{margin-top:32px;padding:24px;border:1px solid var(--hairline);border-top:3px solid var(--accent);border-radius:6px;background:var(--bg-elevated)}.medical-ai-hub-heading>span,.medical-ai-hub-card-eyebrow{display:block;font-family:var(--mono);font-size:10px;font-weight:600;letter-spacing:.12em;text-transform:uppercase;color:var(--accent-text)}.medical-ai-hub-heading h2{margin:6px 0 4px;font-family:var(--serif);font-size:26px;line-height:1.2;color:var(--ink)}.medical-ai-hub-heading p{margin:0;color:var(--ink-soft);font-size:14px}.medical-ai-hub-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-top:20px}.medical-ai-hub-card{display:flex;min-width:0;min-height:176px;flex-direction:column;padding:16px;border:1px solid var(--hairline);border-radius:5px;background:var(--bg);color:var(--ink);text-decoration:none;transition:border-color .15s,transform .15s}.medical-ai-hub-card:hover{border-color:var(--accent);transform:translateY(-2px)}.medical-ai-hub-card strong{margin-top:10px;font-family:var(--serif);font-size:18px;line-height:1.2}.medical-ai-hub-card-description{margin-top:8px;color:var(--ink-soft);font-size:13px;line-height:1.45}.medical-ai-hub-card-meta{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:auto;padding-top:16px;font-family:var(--mono);font-size:10px;letter-spacing:.04em;text-transform:uppercase;color:var(--ink-faint)}.task-explainer{font-family:var(--serif);font-size:17px;line-height:1.55;color:var(--ink);max-width:720px;margin-top:16px;margin-bottom:28px;text-wrap:pretty}.task-explainer p{margin:0 0 12px}.task-explainer p:last-child{margin-bottom:0}.task-explainer a{color:var(--accent-text);text-decoration:underline;text-underline-offset:2px;text-decoration-thickness:1px}.task-explainer a:hover{color:var(--accent)}.task-explainer strong{color:var(--ink);font-weight:600}.task-explainer em{font-style:italic}.task-explainer code{font-family:var(--mono);font-size:.9em;background:var(--bg-elevated);padding:1px 5px;border-radius:3px}.task-quickstats{display:flex;gap:28px;font-family:var(--mono);font-size:11px;color:var(--ink-faint);letter-spacing:.05em;padding-bottom:14px;margin-bottom:0;border-bottom:1px solid var(--accent)}.task-quickstats .num{color:var(--ink);font-weight:600;font-size:12px;margin-right:5px;font-feature-settings:"tnum"}.task-framework-links{display:flex;flex-wrap:wrap;align-items:center;gap:8px 12px;margin-top:14px}.task-framework-links-label{font-family:var(--mono);font-size:10px;letter-spacing:.12em;text-transform:uppercase;color:var(--ink-faint);font-weight:600}.task-framework-link{display:inline-flex;align-items:center;gap:6px;font-family:var(--mono);font-size:12px;color:var(--ink);text-decoration:none;padding:4px 10px;border:1px solid var(--hairline);border-radius:999px;background:var(--bg-elevated);transition:color .15s,border-color .15s}.task-framework-link:hover{color:var(--accent-text);border-color:var(--accent)}.task-framework-link-stars{color:var(--ink-faint);font-size:11px}.task-side{position:sticky;top:100px;font-size:13px}.side-block{margin-bottom:28px}.side-block-num{font-family:var(--mono);font-size:10px;color:var(--accent-text);letter-spacing:.1em;margin-bottom:4px}.side-block-label{font-family:var(--mono);font-size:12px;letter-spacing:.12em;text-transform:uppercase;color:var(--ink);font-weight:600;padding-bottom:8px;border-bottom:1px solid var(--hairline);margin-bottom:10px}.side-link-row{display:flex;justify-content:space-between;align-items:baseline;padding:5px 0;cursor:pointer;font-family:var(--serif);font-size:14px}.side-link-row:hover{color:var(--accent-text)}.side-link-row .count{font-family:var(--mono);font-size:11px;color:var(--ink-faint)}.side-domain-pill{font-family:var(--mono);font-size:11px;color:var(--accent-text);padding:6px 0}.side-method-row{display:flex;justify-content:space-between;align-items:center;padding:4px 0}.side-method-row .num{font-family:var(--mono);font-size:10.5px;color:var(--ink-faint)}.task-section-head{scroll-margin-top:96px;margin-top:28px;margin-bottom:14px}.task-section-eyebrow{font-family:var(--mono);font-size:10px;letter-spacing:.12em;text-transform:uppercase;color:var(--accent-text);margin-bottom:6px}.task-section-title{font-family:var(--mono);font-size:18px;font-weight:600;color:var(--ink);letter-spacing:.04em;text-transform:uppercase;display:flex;align-items:baseline;gap:10px}.task-section-title .meta{font-family:var(--mono);font-size:11px;color:var(--ink-faint);font-weight:400;letter-spacing:.05em;text-transform:none}.subtask-section{margin-bottom:24px}.subtask-section+.subtask-section{margin-top:8px}.subtask-head{display:flex;align-items:baseline;gap:10px;margin:18px 0 10px}.subtask-head-name{font-family:var(--mono);font-size:14px;font-weight:600;color:var(--ink);letter-spacing:.04em;text-transform:uppercase;text-decoration:none;transition:color .15s}.subtask-head-name:hover{color:var(--accent-text)}.subtask-head-meta{font-family:var(--mono);font-size:11px;color:var(--ink-faint);letter-spacing:.05em}.subtask-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;align-items:start}.subtask-grid .subtask-section{margin-bottom:0;border:1px solid var(--hairline);background:var(--bg-elevated);border-radius:6px;padding:12px 14px 10px}.subtask-grid .subtask-section+.subtask-section{margin-top:0}.subtask-grid .subtask-head{margin:0 0 8px;padding-bottom:8px;border-bottom:1px solid var(--hairline)}.subtask-grid .subtask-head-name{font-size:12px}.subtask-grid .subtask-head-meta{font-size:10px}.subtask-summary{display:flex;flex-direction:column;gap:7px;min-height:86px;color:var(--ink-soft);text-decoration:none;font-family:var(--mono);font-size:10px;line-height:1.4;letter-spacing:.05em;text-transform:uppercase}.subtask-summary:hover{color:var(--ink)}.subtask-summary-desc{display:-webkit-box;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:3;font-family:var(--serif);font-size:13px;line-height:1.35;letter-spacing:0;text-transform:none;color:var(--ink-soft)}.subtask-grid .bench-row{display:grid;grid-template-columns:22px 1fr 16px;gap:10px;align-items:center;border:0;background:transparent;border-radius:0;padding:8px 0;margin-bottom:0;border-bottom:1px dashed var(--hairline);transition:none}.subtask-grid .bench-row:last-of-type{border-bottom:0}.subtask-grid .bench-row:hover{border-color:transparent}.subtask-grid .bench-row:hover .bench-row-name{color:var(--accent-text)}.subtask-grid .bench-row-num{font-size:10px}.subtask-grid .bench-row-name{font-size:13.5px;margin-bottom:2px;line-height:1.2}.subtask-grid .bench-row-sub{font-size:9.5px;letter-spacing:.06em}.subtask-grid .bench-row-arrow{font-size:14px}.subtask-grid .bench-show-more{font-size:10px;padding:6px 0 0;margin-top:2px}.bench-card{border:1px solid var(--hairline);background:var(--bg-elevated);border-radius:6px;padding:18px 22px;margin-bottom:14px;cursor:pointer;transition:border-color .15s}.bench-card:hover{border-color:var(--ink)}.bench-head{display:flex;justify-content:space-between;align-items:baseline;margin-bottom:14px;gap:16px}.bench-name{font-family:var(--mono);font-size:14px;font-weight:600;letter-spacing:.02em;text-transform:uppercase;color:var(--ink)}.bench-sub{font-family:var(--mono);font-size:10px;letter-spacing:.1em;text-transform:uppercase;color:var(--ink-faint);margin-top:4px}.bench-sota-value{font-family:var(--serif);font-size:36px;font-weight:500;color:var(--accent);font-feature-settings:"tnum";line-height:1}.bench-sota-tag{font-family:var(--mono);font-size:10px;letter-spacing:.08em;text-transform:uppercase;color:var(--ink-faint);text-align:right;margin-top:4px}.bench-task-tag{font-family:var(--mono);font-size:10px;letter-spacing:.08em;text-transform:uppercase;color:var(--accent-text)}.domain-mega-title{font-family:var(--mono);font-size:56px;font-weight:600;letter-spacing:-.01em;line-height:1;text-transform:uppercase;margin-bottom:0;color:var(--ink);overflow-wrap:break-word}.benchmark-trend-table{border-top:1px solid var(--hairline)}.benchmark-trend-head,.benchmark-trend-row{display:grid;grid-template-columns:124px minmax(150px,.8fr) minmax(150px,.9fr) minmax(200px,1.3fr) 44px 78px;gap:20px;align-items:center}.benchmark-trend-head{padding:9px 16px;border-bottom:1px solid var(--hairline);font-family:var(--mono);font-size:9.5px;font-weight:600;letter-spacing:.1em;text-transform:uppercase;color:var(--ink-faint)}.benchmark-trend-row{min-height:92px;padding:12px 16px;border-bottom:1px solid var(--hairline);background:transparent;transition:background .15s,border-color .15s}.benchmark-trend-row:hover{background:var(--bg-elevated);border-color:var(--hairline-strong)}.benchmark-trend-row:hover .bench-row-name{color:var(--accent-text)}.benchmark-trend-cell{min-width:0}.benchmark-trend-sparkline{display:block;width:112px;height:42px;overflow:visible}.benchmark-trend-axis{stroke:var(--hairline-strong);stroke-width:.8;stroke-dasharray:1.5 2.5;vector-effect:non-scaling-stroke}.benchmark-trend-area{fill:var(--accent-soft);opacity:.68}.benchmark-trend-line{fill:none;stroke:var(--accent);stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round;vector-effect:non-scaling-stroke}.benchmark-trend-dot{fill:var(--bg-elevated);stroke:var(--accent);stroke-width:1.8;vector-effect:non-scaling-stroke}.benchmark-trend-point{cursor:crosshair;outline:none}.benchmark-trend-point-hit{fill:transparent}.benchmark-trend-point-mark{fill:var(--bg-elevated);stroke:var(--accent);stroke-width:1.25;opacity:0;transition:opacity .12s,r .12s;vector-effect:non-scaling-stroke}.benchmark-trend-point:hover .benchmark-trend-point-mark,.benchmark-trend-point:focus .benchmark-trend-point-mark{opacity:1;r:2.3px}.benchmark-trend-tooltip rect{fill:var(--ink);opacity:.94}.benchmark-trend-tooltip text{fill:var(--bg);font-family:var(--mono);font-size:3.2px;letter-spacing:.01em}.benchmark-trend-tooltip .benchmark-trend-tooltip-value{font-weight:700}.benchmark-trend-meta{display:flex;align-items:center;gap:6px;margin-top:3px;font-family:var(--mono);font-size:8.5px;letter-spacing:.035em;color:var(--ink-faint);white-space:nowrap}.benchmark-trend-meta strong{color:var(--ink-soft);font-weight:600}.benchmark-trend-change{padding:1px 4px;border-radius:999px;font-size:8px;font-weight:600}.benchmark-trend-change.is-up,.benchmark-trend-change.is-new{color:var(--positive-text);background:var(--positive-bg)}.benchmark-trend-change.is-down{color:var(--negative-text);background:var(--negative-bg)}.benchmark-trend-benchmark{min-width:0}.benchmark-trend-row .bench-row-name{display:block;margin-bottom:5px}.benchmark-trend-row .bench-row-best{width:100%;justify-content:flex-start;text-align:left}.bench-row-best-empty{color:var(--ink-faint);font-family:var(--mono)}.bench-row-paper{min-width:0;font-family:var(--serif);font-size:14px;line-height:1.35}.bench-row-paper a{color:var(--accent-text)}.bench-row-paper a:hover{text-decoration:underline}.bench-row-code{display:flex;justify-content:center}.bench-row-code a{display:inline-flex;color:var(--ink-soft);transition:color .15s,transform .15s}.bench-row-code a:hover{color:var(--accent-text);transform:translateY(-1px)}.bench-row-compare{display:flex;justify-content:center}.bench-row-compare a{display:inline-flex;align-items:center;justify-content:center;gap:5px;min-height:30px;padding:0 10px;border:1px solid var(--accent);border-radius:999px;color:var(--accent-text);font-family:var(--mono);font-size:9px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;white-space:nowrap;transition:color .15s,background .15s}.bench-row-compare a svg{transition:transform .15s}.bench-row-compare a:hover{color:var(--bg);background:var(--accent)}.bench-row-compare a:hover svg{transform:translate(2px)}.bench-row-compare a:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.bench-row{display:grid;grid-template-columns:36px 1fr auto 28px;gap:18px;align-items:center;padding:16px 18px;border:1px solid var(--hairline);background:var(--bg-elevated);border-radius:6px;margin-bottom:8px;cursor:pointer;transition:border-color .15s,transform .15s}.bench-row:hover{border-color:var(--ink)}.bench-row:hover .bench-row-arrow{color:var(--accent-text);transform:translate(3px)}.bench-row-num{font-family:var(--mono);font-size:11px;color:var(--ink-faint);letter-spacing:.05em;font-feature-settings:"tnum"}.bench-row-name{font-family:var(--serif);font-size:18px;font-weight:500;color:var(--ink);letter-spacing:-.005em;margin-bottom:4px}.bench-row-sub{display:flex;align-items:center;gap:8px;font-family:var(--mono);font-size:10px;letter-spacing:.08em;text-transform:uppercase;color:var(--ink-faint)}.bench-row-sub strong{color:var(--ink-soft);font-weight:600}.bench-row-variants{display:flex;flex-wrap:wrap;gap:4px;margin:2px 0 6px}.bench-row-variant{font-family:var(--mono);font-size:9.5px;letter-spacing:.02em;white-space:nowrap;padding:1px 5px;border:1px solid var(--hairline);border-radius:3px;background:transparent;color:var(--ink-faint);cursor:pointer;transition:border-color .15s,color .15s}.bench-row-variant:hover{border-color:var(--ink);color:var(--ink)}.bench-row-variant[aria-pressed=true]{border-color:var(--accent);color:var(--accent-text)}.bench-row-variant:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.bench-row-sub .dot-sep{color:var(--hairline-strong)}.bench-row-sota{text-align:right}.bench-row-sota-value{font-family:var(--serif);font-size:22px;font-weight:500;color:var(--accent-text);font-feature-settings:"tnum";line-height:1}.bench-row-sota-tag{font-family:var(--mono);font-size:9.5px;letter-spacing:.08em;text-transform:uppercase;color:var(--ink-faint);margin-top:4px}.bench-row-arrow{font-family:var(--serif);font-size:18px;color:var(--hairline-strong);text-align:center;transition:color .15s,transform .15s}.bench-row-best{display:flex;align-items:center;justify-content:flex-end;gap:6px;max-width:240px;text-align:right}.bench-row-best-icon{color:var(--accent-text);flex:0 0 auto}.bench-row-best-name{font-family:var(--serif);font-size:14px;color:var(--ink-soft);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.bench-show-more{font-family:var(--mono);font-size:11px;letter-spacing:.05em;color:var(--ink-faint);background:transparent;border:0;padding:8px 2px 2px;margin-top:4px;cursor:pointer;text-transform:lowercase;transition:color .15s}.bench-show-more:hover{color:var(--accent-text)}.bm-action-btn{display:inline-flex;align-items:center;gap:8px;padding:8px 14px;border:1px solid var(--hairline);border-radius:6px;background:var(--bg-elevated);font-family:var(--sans);font-size:13px;font-style:normal;color:var(--ink);cursor:pointer;transition:border-color .15s}.bm-action-btn:hover{border-color:var(--ink)}.bm-action-btn svg{display:block}@media (max-width: 880px){.task-page-grid{grid-template-columns:1fr;gap:32px}.task-side{position:static;top:auto;order:-1}.subtask-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.medical-ai-hub-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.domain-mega-title{font-size:40px}.bench-row{grid-template-columns:28px 1fr auto;gap:12px;padding:14px}.bench-row>.bench-row-arrow{display:none}.bench-row-best{max-width:130px}.bench-row-best-name{font-size:12.5px}.benchmark-trend-head,.benchmark-trend-row{grid-template-columns:112px minmax(130px,.8fr) minmax(120px,.8fr) minmax(160px,1.2fr) 36px 72px;gap:14px}.benchmark-trend-sparkline{width:104px}}@media (max-width: 640px){.domain-mega-title{font-size:30px}.subtask-grid{grid-template-columns:1fr}.medical-ai-hub{padding:18px}.task-featured-collection{grid-template-columns:1fr;padding:16px 18px}.task-featured-collection-meta{grid-column:1;grid-row:auto;margin-top:8px}.medical-ai-hub-grid{grid-template-columns:1fr}.medical-ai-hub-card{min-height:0}.benchmark-trend-head{display:none}.benchmark-trend-row{grid-template-columns:100px minmax(0,1fr) 28px;grid-template-areas:"trend benchmark code" "trend best code" "trend paper paper" "trend compare compare";gap:4px 12px;min-height:120px;padding:12px 4px}.benchmark-trend-cell{grid-area:trend}.benchmark-trend-benchmark{grid-area:benchmark}.benchmark-trend-row .bench-row-best{grid-area:best;justify-content:flex-start;max-width:none;text-align:left}.benchmark-trend-row .bench-row-paper{grid-area:paper}.benchmark-trend-row .bench-row-code{grid-area:code}.benchmark-trend-row .bench-row-compare{grid-area:compare;justify-content:flex-start;margin-top:4px}.bench-row-compare a{min-height:26px;padding:0 9px;font-size:8.5px}.benchmark-trend-sparkline{width:96px}.benchmark-trend-meta{flex-wrap:wrap;gap:3px;white-space:normal}.task-quickstats{flex-wrap:wrap;gap:16px}}.paper-meta-line .arxiv-id{color:var(--accent-text)}.paper-authors .institution{font-style:italic;color:var(--ink-faint)}.paper-tags--clamped .method-chip{line-height:16px}.method-hero-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(360px,560px);gap:48px;align-items:start}.tag-hero.method-hero-grid{padding:8px 0 28px;margin-bottom:24px}.method-hero-grid .tag-hero-eyebrow{margin-bottom:8px}.method-hero-grid .research-follow{margin:12px 0 10px}.method-hero-grid .tag-hero-meta{margin-top:20px}.method-hero-grid--wide-figure{grid-template-columns:minmax(0,1fr) minmax(480px,640px)}.method-figure-card{background:var(--bg-elevated);border:1px solid var(--hairline);border-radius:6px;padding:16px 16px 12px;margin:0;box-shadow:0 1px #00000005;align-self:start}.method-figure-svg{width:100%;display:block}.method-figure-svg--schematic{aspect-ratio:360 / 420}.method-figure-img{width:100%;height:auto;display:block}.method-figure-svg--compact .method-figure-img{width:50%;margin:0 auto}.method-figure-svg--scaled-80 .method-figure-img{width:80%;margin:0 auto}.method-figure-card figcaption{font-family:var(--serif);font-style:italic;font-size:12px;color:var(--ink-faint);text-align:center;margin-top:10px;border-top:1px solid var(--hairline);padding-top:10px}.method-image-credit{color:var(--ink-faint);font-family:var(--mono);font-size:10px;font-style:normal}.method-image-credit p{margin:0}.method-image-credit a{color:inherit;text-decoration:underline;text-underline-offset:2px}.method-image-credit a:hover{color:var(--accent-text)}.method-description{font-family:var(--serif);font-size:17px;color:var(--ink-soft);max-width:720px;line-height:1.6;margin-top:12px;text-wrap:pretty}.method-description p{margin:0 0 12px}.method-description p:last-child{margin-bottom:0}.method-description a{color:var(--accent-text);text-decoration:underline;text-underline-offset:2px;text-decoration-thickness:1px}.method-description a:hover{color:var(--accent)}.method-description strong{color:var(--ink);font-weight:600}.method-description code{font-family:var(--mono);font-size:.9em;background:var(--bg-elevated);padding:1px 5px;border-radius:3px}.method-description ul,.method-description ol{padding-left:22px;margin:0 0 12px}.method-description ul{list-style-type:disc}.method-description ol{list-style-type:decimal}.method-description li{margin-bottom:4px}.method-description .katex-display{margin:14px 0;overflow-x:auto;overflow-y:hidden;padding:4px 0}.method-description .katex{font-size:1em}.method-source{margin-top:18px;display:flex;flex-direction:column;gap:6px;max-width:720px}.method-source-label{font-family:var(--mono);font-size:10px;letter-spacing:.14em;text-transform:uppercase;color:var(--ink-faint)}.method-source-link{display:flex;flex-direction:column;gap:2px;padding:12px 14px;background:var(--bg-elevated);border:1px solid var(--hairline);border-left:3px solid var(--accent-text);border-radius:3px;cursor:pointer;transition:background .12s,border-color .12s;text-decoration:none}.method-source-link:not(.is-static):hover{background:var(--bg-subtle);border-color:var(--hairline-strong);border-left-color:var(--accent)}.method-source-link.is-static{cursor:default}.method-source-title{font-family:var(--serif);font-size:17px;font-weight:500;color:var(--ink);letter-spacing:-.005em}.method-source-link:not(.is-static):hover .method-source-title{text-decoration:underline;text-underline-offset:3px;text-decoration-thickness:1px}.method-source-meta{font-family:var(--mono);font-size:11px;color:var(--ink-faint)}@media (max-width: 1024px){.method-hero-grid{grid-template-columns:1fr;gap:24px}.method-figure-card{max-width:560px}.method-hero-grid--wide-figure .method-figure-card{max-width:640px}}.method-hero-title{font-family:var(--mono);font-size:40px;margin-bottom:0;letter-spacing:-.01em}.method-trending-icon{flex:0 0 auto;color:var(--accent-text);fill:color-mix(in srgb,var(--accent-text) 18%,transparent)}.method-trend-score{color:var(--accent-text);font-weight:600}.method-trend-panel{margin-top:20px;padding-top:14px;border-top:1px solid var(--hairline-strong)}.method-trend-header{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;margin-bottom:4px}.method-trend-eyebrow{margin-bottom:5px;font-family:var(--mono);font-size:10px;letter-spacing:.1em;text-transform:uppercase;color:var(--accent-text)}.method-trend-header p{margin:3px 0 0;font-family:var(--mono);font-size:11px;color:var(--ink-faint)}.method-trend-summary{display:flex;flex-direction:column;align-items:flex-end;flex:0 0 auto;font-family:var(--mono);font-size:10px;color:var(--ink-faint)}.method-trend-summary>strong{font-family:var(--serif);font-size:19px;font-weight:500;line-height:1;color:var(--ink)}.method-usage-chart-wrap{position:relative;width:100%}.method-usage-chart{display:block;width:100%;height:auto;overflow:visible}.method-usage-gridline{stroke:var(--hairline);stroke-width:1}.method-usage-y-label,.method-usage-x-label{fill:var(--ink-faint);font-family:var(--mono);font-size:9px}.method-usage-bar-hit{fill:transparent}.method-usage-bar-mark{fill:color-mix(in srgb,var(--accent-text) 48%,var(--bg));transition:fill .12s}.method-usage-bar.is-current .method-usage-bar-mark{opacity:.55}.method-usage-bar:hover .method-usage-bar-mark,.method-usage-bar:focus .method-usage-bar-mark,.method-usage-bar.is-active .method-usage-bar-mark{fill:var(--accent-text)}.method-usage-bar:focus{outline:none}.method-usage-tooltip{position:absolute;top:4px;right:8px;display:flex;gap:8px;padding:5px 8px;border:1px solid var(--hairline-strong);background:var(--bg);font-family:var(--mono);font-size:10px;color:var(--ink-soft);pointer-events:none}.method-trend-skeleton{margin-top:20px}.method-trend-note{margin:6px 0 0;color:var(--ink-faint);font-family:var(--mono);font-size:10px}@media (max-width: 640px){.method-trend-header{flex-direction:column;gap:12px}.method-trend-summary{align-items:flex-start}}.method-chip{display:inline-flex;align-items:center;padding:4px 10px;font-family:var(--mono);font-size:11px;font-weight:500;color:var(--ink);background:var(--bg-elevated);border:1px solid var(--hairline);border-radius:4px;cursor:pointer;transition:all .15s;white-space:nowrap}.method-chip:hover{border-color:var(--ink);background:var(--bg-subtle)}.side-method-row .method-chip{font-size:10.5px;padding:3px 8px}@media (max-width: 880px){.method-hero-title{font-size:34px}}@media (max-width: 640px){.method-hero-title{font-size:30px}}.filter-row{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin-bottom:24px;padding:12px 16px;border:1px solid var(--hairline);border-radius:8px;background:var(--bg-elevated)}.filter-row .label{margin-right:8px;color:var(--ink-faint);font-family:var(--mono);font-size:10px;letter-spacing:.1em;text-transform:uppercase}.search-overlay{position:fixed;top:0;right:0;bottom:0;left:0;background:#1a181466;-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px);z-index:100;display:flex;align-items:flex-start;justify-content:center;padding-top:100px}.search-modal{width:640px;max-width:calc(100vw - 32px);background:var(--bg);border:1px solid var(--hairline-strong);border-radius:12px;box-shadow:0 20px 60px #00000026;overflow:hidden}.search-modal-input{width:100%;padding:18px 20px;font-size:16px;font-family:var(--serif);border:none;background:transparent;outline:none;border-bottom:1px solid var(--hairline);color:var(--ink)}.search-modal-input::-moz-placeholder{color:var(--ink-faint);font-style:italic}.search-modal-input::placeholder{color:var(--ink-faint);font-style:italic}.search-results{max-height:480px;overflow-y:auto;padding:8px}.search-empty{padding:32px;text-align:center;color:var(--ink-faint);font-family:var(--serif);font-style:italic}.search-section-label{font-family:var(--mono);font-size:10px;letter-spacing:.12em;text-transform:uppercase;color:var(--ink-faint);padding:10px 12px 6px}.search-result{display:flex;flex-direction:column;padding:10px 12px;border-radius:6px;cursor:pointer;gap:4px}.search-result:hover,.search-result.focused{background:var(--bg-subtle)}.search-result-title{font-family:var(--serif);font-size:14.5px;font-weight:500;line-height:1.3}.search-result-meta{font-family:var(--mono);font-size:10.5px;color:var(--ink-faint);display:flex;gap:10px}.search-result-tag{display:flex;align-items:center;gap:8px;padding:8px 12px;border-radius:6px;cursor:pointer}.search-result-tag:hover,.search-result-tag.focused{background:var(--bg-subtle)}.search-result-tag .name{font-family:var(--mono);font-size:12px}.search-result-tag .handle{font-family:var(--mono);font-size:10px;color:var(--ink-faint)}.search-result-tag .logo{width:16px;height:16px;border-radius:3px;-o-object-fit:contain;object-fit:contain;flex:none}.search-result-tag .count{margin-left:auto;font-family:var(--mono);font-size:10px;color:var(--ink-faint)}.search-view-all-row{width:100%;border:0;border-top:1px solid var(--hairline);background:var(--bg-subtle);color:var(--accent-text);padding:12px;text-align:left;font:600 11px var(--mono);cursor:pointer}.search-view-all-row:hover,.search-view-all-row:focus-visible{background:var(--bg-subtle);outline:2px solid var(--accent);outline-offset:-2px}@media (max-width: 640px){.search-modal-input{font-size:16px;padding:14px 16px}}.search-ask-row{display:flex;align-items:center;gap:10px;width:100%;padding:10px 12px;border-radius:6px;text-align:left;color:var(--ink)}.search-ask-row:hover{background:var(--bg-subtle)}.search-ask-chip{display:inline-flex;align-items:center;font-family:var(--mono);font-size:10.5px;color:var(--accent-text);background:var(--accent-soft);border-radius:5px;padding:2px 7px;flex:none}.search-ask-text{flex:1;min-width:0;font-family:var(--serif);font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.search-ask-row kbd{font-family:var(--sans);font-size:11px;color:var(--ink-faint);border:1px solid var(--hairline);border-radius:5px;padding:1px 6px}.search-empty-sub{display:block;margin-top:10px;font-family:var(--sans);font-style:normal;font-size:12px;color:var(--ink-faint)}.settings-page-content,.settings-page-loading{min-height:min(680px,calc(100vh - 180px))}.settings-section{border:1px solid var(--hairline);border-radius:10px;padding:20px 22px;margin-top:8px;max-width:760px}.settings-section-title{font-size:12px;font-weight:600;text-transform:uppercase;letter-spacing:.06em;color:var(--ink-faint);margin:0 0 14px}.settings-note.settings-note-flush{margin-top:0;padding-top:0;border-top:0}.settings-billing-loading{color:var(--ink-soft);font-size:13px}.settings-billing,.settings-billing-connect{display:flex;flex-direction:column;gap:14px}.settings-provider-grid{display:grid;gap:14px}.settings-provider-card{display:flex;flex-direction:column;gap:14px;padding:16px;border:1px solid var(--hairline);border-radius:8px;background:var(--bg-subtle)}.settings-provider-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}.settings-provider-heading h3{margin:0;color:var(--ink);font-size:16px;font-weight:650}.settings-provider-heading p{margin:3px 0 0;color:var(--ink-soft);font-size:12px}.settings-usage-row{display:flex;flex-direction:column;gap:9px;padding:13px;border:1px solid var(--hairline);border-radius:7px;background:var(--bg-elevated)}.settings-usage-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}.settings-usage-heading strong{flex-shrink:0;color:var(--ink);font-size:14px}.settings-usage-track{height:7px;overflow:hidden;border-radius:999px;background:var(--hairline)}.settings-usage-track>span{display:block;height:100%;border-radius:inherit;background:var(--accent)}.settings-limit-note{margin:0;color:var(--danger, #b42318);font-size:12px;line-height:1.45}.settings-byok-controls{display:flex;flex-direction:column;gap:10px;padding-top:2px}.settings-byok-controls form{display:flex;flex-direction:column;gap:10px}.settings-byok-controls input{width:100%;border:1px solid var(--hairline-strong);border-radius:7px;padding:10px 12px;color:var(--ink);background:var(--bg-elevated);font:inherit}.settings-fallback-control{display:flex;align-items:flex-start;gap:11px;cursor:pointer}.settings-fallback-control>span{display:flex;flex-direction:column;gap:4px}.settings-fallback-control strong{color:var(--ink);font-size:12px;line-height:1.4}.settings-fallback-control small{color:var(--ink-soft);font-size:11px;line-height:1.45}.settings-plan-row{display:flex;justify-content:space-between;align-items:flex-start;gap:20px}.settings-connected-badge{border-radius:999px;padding:4px 9px;color:var(--accent-text);background:var(--accent-soft);font-size:11px;font-weight:600}.settings-billing-help{color:var(--ink-soft);font-size:11px;margin:0;line-height:1.5}.settings-billing-actions{display:flex;flex-wrap:wrap;gap:8px}.settings-billing-actions .button{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:34px;padding:7px 11px;border:1px solid var(--hairline-strong);border-radius:7px;color:var(--ink);background:var(--bg-elevated);font-size:12px;font-weight:600;text-decoration:none}.settings-billing-actions .button:hover{background:var(--bg-subtle)}.settings-billing-actions .button-primary{border-color:var(--accent);color:var(--accent-text);background:var(--accent-soft)}.settings-billing-actions .button:disabled{cursor:not-allowed;opacity:.55}.settings-billing-actions svg{width:12px;height:12px}.settings-token-label{color:var(--ink);font-size:12px;font-weight:600;margin-bottom:-8px}.settings-billing-connect input{width:100%;border:1px solid var(--hairline-strong);border-radius:7px;padding:10px 12px;color:var(--ink);background:var(--bg-elevated);font:inherit}.settings-billing-select{width:100%;min-height:42px;padding:9px 34px 9px 12px;border:1px solid var(--border);border-radius:7px;background:var(--bg-elevated);color:var(--ink);font:inherit}.settings-billing-select:focus{outline:2px solid var(--accent);outline-offset:1px}.settings-billing-select:disabled{cursor:wait;opacity:.7}.settings-billing-connect input:focus{border-color:var(--accent);outline:2px solid var(--accent-soft)}.settings-token-error{color:var(--danger, #b42318);font-size:12px}.theme-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.theme-option{display:flex;align-items:flex-start;gap:10px;min-width:0;padding:12px;border:1px solid var(--hairline);border-radius:7px;background:var(--bg-elevated);color:var(--ink-soft);text-align:left;transition:background .15s,border-color .15s,color .15s}.theme-option:hover{border-color:var(--hairline-strong);background:var(--bg-subtle);color:var(--ink)}.theme-option.is-selected{border-color:var(--accent);background:var(--accent-soft);color:var(--accent-text)}.theme-option:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.theme-option>svg{width:16px;height:16px;margin-top:1px;flex-shrink:0}.theme-option-copy{display:flex;flex-direction:column;gap:2px;min-width:0}.theme-option-label{color:var(--ink);font-size:13px;font-weight:600}.theme-option-desc{color:var(--ink-soft);font-size:11px;line-height:1.35}.theme-option.is-selected .theme-option-label,.theme-option.is-selected .theme-option-desc{color:var(--accent-text)}.settings-row{display:flex;align-items:flex-start;justify-content:space-between;gap:24px}.settings-row-text{display:flex;flex-direction:column;gap:4px;cursor:pointer}.settings-row-label{font-size:15px;font-weight:500;color:var(--ink)}.settings-row-desc{font-size:13px;color:var(--ink-soft);line-height:1.5;max-width:460px}.settings-note{margin-top:16px;padding-top:16px;border-top:1px solid var(--hairline);font-size:13px;color:var(--ink-soft);line-height:1.5}.settings-note-action{margin-top:10px}.research-section-heading{display:flex;align-items:baseline;justify-content:space-between;gap:16px}.research-section-heading .settings-section-title{display:inline-flex;align-items:center;gap:8px}.research-follow-count{border-radius:999px;padding:1px 7px;color:var(--ink-soft);background:var(--bg-subtle);font-size:11px;letter-spacing:0}.research-feed-link{display:inline-flex;align-items:center;gap:5px;flex-shrink:0;color:var(--accent-text);font-size:13px;font-weight:600;text-decoration:none}.research-feed-link:hover{text-decoration:underline;text-underline-offset:2px}.research-feed-link svg{width:14px;height:14px}.research-section-intro{margin:-6px 0 6px}.research-follow-group{margin-top:16px}.research-follow-group-title{display:flex;align-items:center;gap:6px;margin:0 0 6px;color:var(--ink-soft);font-size:12px;font-weight:600}.research-follow-group-title svg{width:14px;height:14px}.research-follow-list{margin:0;padding:0;list-style:none;border:1px solid var(--hairline);border-radius:8px;background:var(--bg-elevated)}.research-follow-row{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:52px;padding:8px 8px 8px 14px}.research-follow-row+.research-follow-row{border-top:1px solid var(--hairline)}.research-follow-text{display:flex;flex-direction:column;gap:1px;min-width:0}.research-follow-text a{overflow:hidden;color:var(--ink);font-size:14px;font-weight:500;text-overflow:ellipsis;white-space:nowrap;text-decoration:none}.research-follow-text a:hover{color:var(--accent-text);text-decoration:underline;text-underline-offset:2px}.research-follow-text span{color:var(--ink-faint);font-size:12px}.research-follow-row.is-unfollowed .research-follow-text a{color:var(--ink-faint);text-decoration:line-through}.research-follow-action{flex-shrink:0;min-height:30px;padding:5px 10px;border:1px solid transparent;border-radius:6px;color:var(--ink-soft);background:transparent;font-size:12px;font-weight:600}.research-follow-action:hover{border-color:var(--hairline-strong);color:var(--danger, #b42318);background:var(--bg-subtle)}.research-follow-action.is-refollow{border-color:var(--accent);color:var(--accent-text);background:var(--accent-soft)}.research-follow-action:disabled{cursor:wait;opacity:.55}.research-follow-action:focus-visible{outline:2px solid var(--accent);outline-offset:1px}.research-follow-empty{margin-top:14px;padding:18px;border:1px dashed var(--hairline-strong);border-radius:8px;color:var(--ink-soft);font-size:13px;line-height:1.5}.research-follow-empty p{margin:0}.research-follow-empty strong{color:var(--ink);font-weight:600}.research-follow-browse{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}.research-follow-browse a{display:inline-flex;align-items:center;gap:6px;padding:6px 10px;border:1px solid var(--hairline-strong);border-radius:7px;color:var(--ink);background:var(--bg-elevated);font-size:12px;font-weight:600;text-decoration:none}.research-follow-browse a:hover{background:var(--bg-subtle)}.research-follow-browse svg{width:13px;height:13px}.research-email-destination{display:flex;flex-wrap:wrap;align-items:center;gap:8px 10px;margin-top:16px;padding:10px 12px;border:1px solid var(--hairline);border-radius:8px;color:var(--ink-soft);background:var(--bg-subtle);font-size:13px}.research-email-destination>svg{width:15px;height:15px;flex-shrink:0}.research-email-destination strong{color:var(--ink);font-weight:600;overflow-wrap:anywhere}.research-email-destination>span{flex:1 1 220px}.research-email-destination a{color:var(--accent-text);font-size:12px;font-weight:600;text-decoration:none}.research-email-destination a:hover{text-decoration:underline;text-underline-offset:2px}.research-email-status{margin:10px 0 0;color:var(--ink-soft);font-size:12px;line-height:1.5}.research-email-status.is-warning{color:var(--danger, #b42318)}.closed-eval-tooltip-link,.external-eval-tooltip-link{font-weight:600;text-decoration:underline;text-underline-offset:2px}@media (max-width: 640px){.theme-options{grid-template-columns:1fr}}.research-follow{display:flex;flex-wrap:wrap;align-items:center;gap:6px 12px;margin:14px 0 18px}.research-follow-btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-width:112px;min-height:36px;padding:7px 16px 7px 13px;border:1px solid var(--accent);border-radius:999px;color:var(--bg);background:var(--accent);font-family:var(--sans);font-size:14px;font-weight:600;line-height:1;text-decoration:none;cursor:pointer;box-shadow:0 1px 2px #00000014;transition:background .15s,border-color .15s,color .15s,filter .15s}.research-follow-btn:hover{filter:brightness(1.1)}.research-follow-btn:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.research-follow-btn:disabled{cursor:wait;opacity:.6}.research-follow-btn svg{width:16px;height:16px;flex-shrink:0}.research-follow-btn.is-following{border-color:var(--hairline-strong);color:var(--ink);background:var(--bg-elevated);box-shadow:none}.research-follow-btn.is-following svg{color:var(--accent-text)}.research-follow-label-hover{display:none}@media (hover: hover){.research-follow-btn.is-following:hover{filter:none;border-color:var(--danger, #b42318);color:var(--danger, #b42318)}.research-follow-btn.is-following:hover svg,.research-follow-btn.is-following:hover .research-follow-label{display:none}.research-follow-btn.is-following:hover .research-follow-label-hover{display:inline}}.research-follow-hint{color:var(--ink-soft);font-family:var(--sans);font-size:13px;line-height:1.4}.research-follow-hint a{color:var(--accent-text);font-weight:600;text-decoration:none}.research-follow-hint a:hover{text-decoration:underline;text-underline-offset:2px}.research-follow-hint.is-error{color:var(--danger, #b42318)}.following-intro{max-width:720px;margin:8px auto 32px;padding:28px 30px;border:1px solid var(--hairline);border-radius:12px;background:var(--bg-elevated)}.following-intro h2{margin:0;color:var(--ink);font-family:var(--serif);font-size:26px;font-weight:500;line-height:1.2}.following-intro-lead{margin:10px 0 0;color:var(--ink-soft);font-size:15px;line-height:1.55}.following-intro-topic{display:inline-flex;align-items:center;gap:6px;margin:18px 0 0;min-height:36px;padding:7px 16px;font-size:14px}.following-intro-topic svg{width:15px;height:15px}.following-intro-note{margin:10px 0 0;color:var(--ink-faint);font-size:13px}.following-intro-note a{color:var(--accent-text)}@media (max-width: 640px){.following-intro{padding:22px 18px}}.sidebar-follow-link{display:flex;align-items:center;gap:12px;padding:6px 0}.sidebar-follow-kind{flex:0 0 76px;padding:3px 0;border-radius:6px;color:var(--accent-text);background:var(--accent-soft);font-family:var(--mono);font-size:10px;letter-spacing:.1em;text-align:center;text-transform:uppercase}.sidebar-follow-name{min-width:0;overflow:hidden;color:var(--ink);font-size:14px;text-overflow:ellipsis;white-space:nowrap}.sidebar-follow-link:hover .sidebar-follow-name{text-decoration:underline;text-underline-offset:2px}.sidebar-follow-group{display:flex;flex-direction:column;align-items:flex-start;margin-top:10px}.sidebar-follow-group .sidebar-follow-kind{flex:none;width:76px;margin-bottom:2px}@media (max-width: 880px){.sidebar-follow-link{gap:8px}.sidebar-follow-kind{flex:none;padding:1px 6px}.sidebar-follow-group{display:contents}.sidebar-follow-group .sidebar-follow-kind{width:auto;margin:0;align-self:center}}.sidebar-follow-topic{display:flex;align-items:center;gap:8px}.sidebar-follow-topic .sidebar-follow-link{flex:1;min-width:0}@media (min-width: 881px){.sidebar-follow-link{align-items:flex-start}.sidebar-follow-name{overflow:visible;overflow-wrap:anywhere;white-space:normal;line-height:1.4}.sidebar-follow-topic{align-items:flex-start}.sidebar-follow-topic .sidebar-follow-link{flex-wrap:wrap;row-gap:6px}.sidebar-follow-topic .sidebar-follow-name{flex-basis:100%}.sidebar-follow-topic .sidebar-follow-edit{padding-top:7px}}.sidebar-follow-topic.active .sidebar-follow-kind{color:var(--accent-soft);background:var(--accent-text)}.sidebar-follow-topic.active .sidebar-follow-name{font-weight:600}.sidebar-follow-edit,.no-results .link-button{padding:0;font:inherit}.sidebar-follow-edit{margin-left:auto;color:var(--ink-faint);font-size:12px}.sidebar-follow-edit:hover{color:var(--ink)}.sidebar-follow-manage{display:inline-block;margin-top:8px;color:var(--ink-faint);font-size:12px}.sidebar-follow-manage:hover{color:var(--ink)}.research-topic{margin:4px 0 20px}.research-topic .settings-row-desc{margin:4px 0 10px}.research-topic-form{display:flex;flex-direction:column;gap:8px}.research-topic-input{width:100%;padding:10px 12px;border:1px solid var(--hairline-strong, var(--hairline));border-radius:8px;color:var(--ink);background:var(--bg-elevated);font:inherit;font-size:14px;line-height:1.45;resize:vertical}.research-topic-input:focus{outline:2px solid var(--accent-soft);border-color:var(--accent-text)}.research-topic-actions{display:flex;align-items:center;gap:8px}.research-topic-count{margin-right:auto;color:var(--ink-faint);font-family:var(--mono);font-size:11px}.research-topic-save{min-height:30px;padding:5px 12px;border:0;border-radius:6px;color:#fff;background:var(--accent-text);font-size:12px;font-weight:600}.research-topic-save:disabled{opacity:.45;cursor:default}.research-topic-suggestion{margin:6px 0 0;color:var(--ink-soft);font-size:13px}.topic-dialog{max-width:640px;max-height:calc(100vh - 32px);overflow-y:auto}.topic-dialog-form{display:flex;flex-direction:column;gap:18px}.topic-dialog-title{font-family:var(--serif);font-size:24px;font-weight:500;color:var(--ink)}.topic-dialog-group{display:flex;flex-direction:column;gap:8px}.topic-dialog-group h3{margin:0;color:var(--ink-faint);font-family:var(--sans);font-size:12px;font-weight:600;letter-spacing:.06em;text-transform:uppercase}.topic-dialog-hint{margin:0;color:var(--ink-soft);font-size:13px}.topic-dialog .research-topic-input{min-height:112px;font-size:15px}.topic-dialog .research-topic-count{align-self:flex-end;margin:0}.topic-dialog-chips{display:flex;flex-wrap:wrap;gap:8px}.topic-dialog-chips>[hidden]{display:none}.topic-dialog-chip{display:inline-flex;align-items:center;gap:5px;padding:4px 11px 4px 9px;border:1px solid var(--hairline);border-radius:999px;color:var(--ink-soft);background:transparent;font-size:13px}.topic-dialog-chip svg{width:13px;height:13px}.topic-dialog-chip-image{flex:none;width:20px;height:20px;margin:-2px 1px -2px 0;box-sizing:border-box;border:1px solid var(--hairline);background:#fff}.topic-dialog-chip-image.is-author{border-radius:50%;-o-object-fit:cover;object-fit:cover}.topic-dialog-chip-image.is-organization{border-radius:5px;padding:2px;-o-object-fit:contain;object-fit:contain}.topic-dialog-chip-image.is-initials{display:inline-flex;align-items:center;justify-content:center;color:var(--ink-soft);background:var(--hairline);font-size:9px;font-weight:600;letter-spacing:.02em}.topic-dialog-chip[aria-pressed=false]:hover:not(:disabled){border-color:var(--accent-text);color:var(--accent-text)}.topic-dialog-chip[aria-pressed=true]{border-color:var(--accent-text);color:#fff;background:var(--accent-text)}.topic-dialog-chip[aria-pressed=true]:hover:not(:disabled){opacity:.85}.topic-dialog-chip:disabled{cursor:default;opacity:.6}.topic-dialog-browse{display:inline-flex;align-items:center;gap:4px;padding:4px;color:var(--accent-text);font-size:13px;text-decoration:none}.topic-dialog-browse:hover{text-decoration:underline}.topic-dialog-browse svg{width:13px;height:13px}.topic-dialog-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px}.topic-dialog-remove{margin-right:auto}.topic-dialog-actions .research-topic-save{min-height:36px;padding:7px 18px;font-size:14px}.following-topic-note{margin:0 0 16px;padding:10px 14px;border-radius:8px;color:var(--ink-soft);background:var(--accent-soft);font-size:13px}.reader-route-shell{height:100dvh;min-height:0;display:flex;flex-direction:column;overflow:hidden}.reader-route-shell>.app-header{position:static;flex:0 0 auto}.reader-route-content{min-height:0;flex:1}.paper-reader-shell{height:100%;min-height:0;display:flex;flex-direction:column;background:var(--bg);color:var(--ink);overflow:hidden}.reader-workspace{position:relative;min-height:0;flex:1;display:flex;overflow:hidden}.reader-paper-pane,.reader-assistant-pane{min-width:0;min-height:0;display:flex;flex-direction:column;overflow:hidden}.reader-paper-pane{background:#fff;transition:width .24s cubic-bezier(.22,1,.36,1)}.reader-assistant-pane{visibility:visible;background:var(--bg);opacity:1;transform:translate(0);transition:width .24s cubic-bezier(.22,1,.36,1),opacity .18s ease,transform .24s cubic-bezier(.22,1,.36,1),visibility 0s}.reader-assistant-pane:focus{outline:none}.reader-assistant-pane.is-collapsed{visibility:hidden;opacity:0;transform:translate(28px);pointer-events:none;transition:width .24s cubic-bezier(.22,1,.36,1),opacity .14s ease,transform .24s cubic-bezier(.22,1,.36,1),visibility 0s linear .24s}.reader-workspace.is-resizing{cursor:col-resize;-webkit-user-select:none;-moz-user-select:none;user-select:none}.reader-workspace.is-resizing .reader-paper-pane,.reader-workspace.is-resizing .reader-assistant-pane{transition:none}.reader-resize-handle{position:relative;z-index:5;width:1px;flex:0 0 1px;cursor:col-resize;background:var(--hairline-strong);touch-action:none;outline:none}.reader-resize-handle:before{content:"";position:absolute;top:0;right:-8px;bottom:0;left:0}.reader-resize-handle:focus-visible{box-shadow:0 0 0 2px var(--accent)}.reader-collapse-assistant{position:absolute;z-index:8;top:0;right:16px;height:48px;display:flex;align-items:center;border:0;padding:0;background:transparent;color:var(--ink);font-size:12px;line-height:1.5}.reader-workspace.is-assistant-collapsed .pdf-toolbar{padding-right:96px}.reader-tabs{height:40px;flex:0 0 auto;display:flex;border-bottom:1px solid var(--border);background:var(--surface)}.reader-tabs button{flex:1;border:0;border-bottom:2px solid transparent;background:transparent;color:var(--ink-muted)}.reader-tabs button[aria-selected=true]{border-bottom-color:var(--accent);color:var(--ink);font-weight:600}.reader-tab-pending{display:inline-block;width:7px;height:7px;margin-left:6px;border-radius:50%;background:var(--accent);vertical-align:1px}@media (forced-colors: active){.reader-tab-pending{border:1px solid ButtonText}}.reader-workspace .is-hidden{position:absolute!important;top:0;right:0;bottom:0;left:0;width:100%!important;visibility:hidden;pointer-events:none}.reader-workspace.is-tabs>.reader-paper-pane,.reader-workspace.is-tabs>.reader-assistant-pane{width:100%}.reader-status{min-height:100dvh;display:grid;place-content:center;gap:12px;text-align:center}.reader-chat-unavailable{height:100%;display:grid;place-content:center;color:var(--ink-muted);padding:24px;text-align:center}.pdf-viewer{min-height:0;flex:1;display:flex;flex-direction:column}.pdf-toolbar{position:relative;min-height:48px;flex:0 0 auto;display:flex;align-items:center;gap:16px;padding:7px 10px 7px var(--reader-title-inset, 32px);border-bottom:1px solid var(--hairline);background:var(--bg);color:var(--ink);font-size:12px}.pdf-toolbar-paper{min-width:0;flex:1;display:flex;align-items:center;gap:10px;overflow:hidden}.pdf-toolbar .pdf-toolbar-back{flex:0 0 auto;height:28px;display:inline-flex;align-items:center;gap:4px;margin-left:-8px;border-radius:6px;padding:0 8px 0 6px;color:var(--ink-soft);font-weight:500;text-decoration:none;white-space:nowrap}.pdf-toolbar .pdf-toolbar-back:hover{background:var(--bg-subtle);color:var(--ink);text-decoration:none}.pdf-toolbar-title{min-width:0;overflow:hidden;color:var(--ink);font-size:14px;font-weight:600;letter-spacing:-.005em;text-overflow:ellipsis;white-space:nowrap}.pdf-toolbar-title:hover{color:var(--accent-text);text-decoration:underline;text-underline-offset:3px}.pdf-toolbar .pdf-toolbar-resource{flex:0 0 auto;height:24px;display:inline-flex;align-items:center;gap:5px;border:1px solid var(--hairline);border-radius:999px;padding:0 9px;background:var(--bg-elevated);color:var(--ink-soft);font-size:11px;font-variant-numeric:tabular-nums;text-decoration:none;white-space:nowrap}.pdf-toolbar .pdf-toolbar-resource:hover{border-color:var(--hairline-strong);color:var(--ink);text-decoration:none}.pdf-toolbar-controls{flex:0 0 auto;display:flex;align-items:center;gap:8px}.pdf-toolbar-group{height:30px;display:flex;align-items:center;gap:1px;border:1px solid var(--hairline);border-radius:8px;padding:1px;background:var(--bg-elevated)}.pdf-toolbar button,.pdf-toolbar-controls a{min-height:30px;display:inline-flex;align-items:center;justify-content:center;gap:6px;border:1px solid var(--hairline);border-radius:8px;padding:0 10px;background:var(--bg-elevated);color:var(--ink);font-weight:500;text-decoration:none}.pdf-toolbar button:hover:not(:disabled),.pdf-toolbar-controls a:hover{border-color:var(--hairline-strong);background:var(--bg-subtle)}.pdf-toolbar .pdf-toolbar-group button{width:26px;min-height:26px;height:26px;border:0;border-radius:6px;padding:0;background:transparent;color:var(--ink-soft)}.pdf-toolbar .pdf-toolbar-group button:hover:not(:disabled){background:var(--bg-subtle);color:var(--ink)}.pdf-toolbar-search svg{color:var(--ink-soft)}.pdf-toolbar button[aria-expanded=true]{border-color:var(--hairline-strong);background:var(--bg-subtle)}.pdf-toolbar button:focus-visible,.pdf-toolbar a:focus-visible,.pdf-toolbar input:focus-visible,.pdf-search-controls input:focus-visible{outline:2px solid var(--accent);outline-offset:1px}.pdf-toolbar button:disabled{cursor:default;opacity:.35}.pdf-page-form{display:flex;align-items:baseline;gap:3px;padding:0 4px;color:var(--ink-soft);font-variant-numeric:tabular-nums;white-space:nowrap}.pdf-page-form input{width:30px;height:22px;-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield;border:1px solid transparent;border-radius:5px;padding:0 2px;background:var(--bg-subtle);color:var(--ink);font:inherit;font-weight:500;text-align:center}.pdf-page-form input:hover,.pdf-page-form input:focus{border-color:var(--hairline-strong);background:var(--bg)}.pdf-page-form input::-webkit-inner-spin-button,.pdf-page-form input::-webkit-outer-spin-button{margin:0;-webkit-appearance:none;-moz-appearance:none;appearance:none}.pdf-zoom-value{width:46px;height:22px;border:1px solid transparent;border-radius:5px;padding:0 2px;background:transparent;color:var(--ink);text-align:center;font:inherit;font-weight:500;font-variant-numeric:tabular-nums}.pdf-zoom-value:hover,.pdf-zoom-value:focus{border-color:var(--hairline-strong);background:var(--bg)}.pdf-search-controls{position:absolute;z-index:10;right:8px;top:calc(100% + 5px);display:flex;align-items:center;gap:5px;padding:7px;border:1px solid var(--hairline);border-radius:6px;background:var(--bg-elevated);box-shadow:0 5px 20px #0003}.pdf-search-controls input{width:min(260px,45vw);min-height:30px;border:1px solid var(--hairline);border-radius:4px;padding:4px 7px;background:var(--bg);color:var(--ink)}.pdf-search-controls span{min-width:70px;color:var(--ink-soft);text-align:center}.pdf-search-controls button{display:inline-flex;align-items:center;justify-content:center}.pdf-citation-steps{position:absolute;z-index:10;top:8px;left:50%;display:flex;align-items:center;gap:4px;padding:5px 5px 5px 12px;border:1px solid var(--hairline);border-radius:8px;background:var(--bg-elevated);color:var(--ink);box-shadow:0 5px 20px #0003;font-size:13px;transform:translate(-50%);animation:pdf-citation-steps-in .14s ease-out}.pdf-citation-steps span{margin-right:4px;color:var(--ink-soft);font-variant-numeric:tabular-nums;white-space:nowrap}.pdf-citation-steps button{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border:0;border-radius:5px;background:transparent;color:var(--ink);cursor:pointer}.pdf-citation-steps button:hover{background:var(--hairline)}.pdf-citation-steps button:focus-visible{outline:2px solid var(--accent);outline-offset:1px}@keyframes pdf-citation-steps-in{0%{opacity:0;transform:translate(-50%,-6px)}}@media (prefers-reduced-motion: reduce){.pdf-citation-steps{animation:none}}.pdf-scroll-frame{position:relative;min-height:0;flex:1;display:flex;flex-direction:column}.pdf-scroll{min-height:0;flex:1;overflow:auto;overscroll-behavior:contain;background:#fff;scrollbar-color:var(--ink-faint) var(--bg-subtle);scrollbar-gutter:stable}.pdf-scroll::-webkit-scrollbar{width:12px;height:12px}.pdf-scroll::-webkit-scrollbar-track{background:var(--bg-subtle)}.pdf-scroll::-webkit-scrollbar-thumb{border:3px solid var(--bg-subtle);border-radius:999px;background:var(--ink-faint)}.pdf-pages{display:flex;width:-moz-max-content;width:max-content;min-width:100%;flex-direction:column;align-items:center;gap:8px;zoom:var(--pdf-live-scale, 1)}.pdf-page{position:relative;background:#fff}.pdf-page-layer{zoom:var(--pdf-layer-scale, 1)}.pdf-page-layer.is-pending{position:absolute;top:0;left:0;visibility:hidden;pointer-events:none}.pdf-page .react-pdf__Page{margin:0}.pdf-page-snapshot{position:absolute;top:0;right:0;bottom:0;left:0;z-index:2;width:100%;height:100%;pointer-events:none}.pdf-page .textLayer ::-moz-selection{background:#2d7dff4d;color:transparent}.pdf-page .textLayer ::selection{background:#2d7dff4d;color:transparent}.pdf-search-highlight{border-radius:1px;background:#2d7dff57;color:inherit;box-shadow:0 0 0 1px #2d7dff2e}.pdf-search-highlight.is-active{background:#1c68ef85;box-shadow:0 0 0 1px #1c68ef57}.pdf-citation-highlight{position:absolute;z-index:3;border-radius:3px;pointer-events:none;background:#ffc40047;box-shadow:0 0 0 2px #ffaa00b3;animation:pdf-citation-flash 4s ease-out forwards}@keyframes pdf-citation-flash{0%,10%{opacity:0}18%,70%{opacity:1}to{opacity:0}}.pdf-citation-highlight.is-brief{animation:pdf-citation-flash-brief 1.8s ease-out forwards}@keyframes pdf-citation-flash-brief{0%{opacity:0}12%,65%{opacity:1}to{opacity:0}}@media (prefers-reduced-motion: reduce){.pdf-citation-highlight{animation:pdf-citation-flash 4s step-end forwards}.pdf-citation-highlight.is-brief{animation:pdf-citation-flash-brief 1.8s step-end forwards}}.pdf-outline{position:absolute;z-index:9;top:0;right:14px;bottom:0;display:flex;align-items:center;pointer-events:none}.pdf-outline-rail{display:flex;flex-direction:column;align-items:flex-end;justify-content:center;gap:5px;max-height:100%;overflow:hidden;border:0;width:56px;padding:12px 6px 12px 0;background:transparent;cursor:pointer;pointer-events:auto;touch-action:none}.pdf-outline-rail:focus-visible{outline:2px solid var(--accent);outline-offset:-2px;border-radius:6px}.pdf-outline-tick{--pop: 0;--tick-width: 18px;display:block;width:calc(var(--tick-width) + var(--pop) * (34px - var(--tick-width)));height:2px;border-radius:1px;background:var(--ink-faint);transform:scaleY(calc(1 + var(--pop)));transition:background .12s ease,width .18s cubic-bezier(.34,1.56,.64,1),transform .18s cubic-bezier(.34,1.56,.64,1)}.pdf-outline-tick.level-1{--tick-width: 10px}.pdf-outline-tick.is-active{--tick-width: 22px;background:var(--accent)}.pdf-outline-tick.is-scrubbed{background:var(--accent)}.pdf-outline-scrub-label{position:absolute;right:calc(100% - 4px);max-width:min(260px,60vw);overflow:hidden;padding:6px 12px;border:1px solid var(--hairline);border-radius:999px;background:var(--bg-elevated);color:var(--ink);box-shadow:0 6px 20px #0003;font-size:13px;font-weight:600;line-height:1.3;text-overflow:ellipsis;white-space:nowrap;pointer-events:none;transform:translateY(-50%);transition:top 90ms ease;animation:pdf-outline-label-in .16s cubic-bezier(.34,1.56,.64,1)}@keyframes pdf-outline-label-in{0%{opacity:0;transform:translate(8px,-50%) scale(.9)}}.pdf-outline-panel{position:absolute;right:100%;top:50%;width:min(320px,60vw);max-height:min(70vh,100%);overflow-y:auto;margin-right:-6px;padding:10px 6px;border:1px solid var(--hairline);border-radius:12px;background:var(--bg-elevated);color:var(--ink);box-shadow:0 8px 28px #0003;font-size:14px;line-height:1.35;opacity:0;visibility:hidden;transform:translate(6px,-50%);transition:opacity .12s ease,transform .12s ease,visibility 0s linear .12s;pointer-events:none}.pdf-outline:hover .pdf-outline-panel,.pdf-outline:focus-within .pdf-outline-panel,.pdf-outline.is-pinned .pdf-outline-panel{opacity:1;visibility:visible;transform:translateY(-50%);transition-delay:0s;pointer-events:auto}.pdf-outline-panel ol{margin:0;padding:0;list-style:none}.pdf-outline-panel li.level-1 a{padding-left:32px;font-size:13px;color:var(--ink-soft)}.pdf-outline-panel a{display:block;padding:7px 16px;border-radius:6px;color:var(--ink-muted);text-decoration:none;overflow-wrap:anywhere}.pdf-outline-panel a:hover{background:var(--bg-subtle);color:var(--ink);text-decoration:none}.pdf-outline-panel a.is-scrubbed{background:var(--bg-subtle);color:var(--ink);box-shadow:inset 3px 0 0 var(--accent)}.pdf-outline-panel a:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}.pdf-outline-panel a[aria-current=location]{color:var(--accent-text);font-weight:600}@media (hover: none){.pdf-outline:hover:not(.is-pinned) .pdf-outline-panel{opacity:0;visibility:hidden;pointer-events:none}}@media (forced-colors: active){.pdf-outline-tick{background:ButtonText}.pdf-outline-tick.is-active{background:Highlight}}@media (prefers-reduced-motion: reduce){.pdf-outline-panel,.pdf-outline-tick,.pdf-outline-scrub-label{transition:none;animation:none}}.pdf-loading,.pdf-error{min-height:50vh;display:grid;place-content:center;color:var(--ink);text-align:center;padding:24px}.pdf-error a,.pdf-error button{color:inherit}.chat-page--reader .chat-main{min-width:0}.chat-page--reader .chat-topbar{min-height:48px;gap:4px;padding:7px 4px 7px 20px}.chat-page--reader .chat-share-button,.chat-page--reader .chat-topbar-title{margin-right:8px}.chat-reader-icon-btn{width:28px;height:28px}.chat-reader-icon-btn svg{width:15px;height:15px}.chat-page--reader .chat-empty-inner{width:min(100%,560px);padding-inline:16px}.chat-page--reader .chat-examples{width:min(100%,300px);margin-inline:auto;flex-direction:column;align-items:stretch}.chat-page--reader .chat-example{width:100%}.chat-reader-action{border:0;background:transparent;color:var(--accent-text);text-decoration:none;font-size:12px;white-space:nowrap}@media (max-width: 880px){.chat-page--reader .chat-topbar{padding-right:16px}.pdf-toolbar{padding-left:16px}}@media (max-width: 640px){.chat-page--reader .chat-topbar{padding-right:14px}.pdf-zoom-value{display:none}.pdf-toolbar{gap:8px;overflow-x:auto;padding-left:14px}.pdf-toolbar-paper{min-width:150px}.pdf-toolbar-search span{display:none}.pdf-toolbar .pdf-toolbar-search{width:30px;padding:0}}@media (forced-colors: active){.reader-resize-handle,.pdf-toolbar button,.pdf-toolbar a{border:1px solid ButtonText}}@media (prefers-reduced-motion: reduce){.paper-reader-shell *{scroll-behavior:auto!important}.reader-paper-pane,.reader-assistant-pane{transition-duration:.01ms!important}}.pdf-page .linkAnnotation>.pdf-paper-preview-link{position:absolute;top:0;right:0;bottom:0;left:0;display:block;width:100%;height:100%}.pdf-bibliography-link{position:absolute;z-index:2;border-radius:3px}.pdf-bibliography-link>.pdf-paper-preview-link{position:absolute;top:0;right:0;bottom:0;left:0;display:block;border-radius:inherit}.pdf-bibliography-link:hover,.pdf-bibliography-link:focus-within{background:#2563eb14}.pdf-author-link{position:absolute;z-index:2;border-radius:3px}.pdf-author-link>a{position:absolute;top:-1px;right:-2px;bottom:-1px;left:-2px;display:block;border-radius:inherit}.pdf-author-link:hover,.pdf-author-link:focus-within{background:#2563eb1a}.pdf-author-card{display:flex;align-items:center;gap:12px;padding:14px;color:inherit;text-decoration:none}.pdf-author-card:hover .paper-preview-title{color:var(--accent)}.pdf-author-card:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}.pdf-author-card-avatar{width:44px;height:44px;flex:none}.pdf-author-card-meta{min-width:0}.pdf-author-card-meta .paper-preview-title{margin-bottom:2px}.paper-preview-card-link{display:block;color:inherit;text-decoration:none}.paper-preview-card-link:hover .paper-preview-title{color:var(--accent)}.paper-preview-card-link:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}.pdf-paper-preview-actions{display:flex;justify-content:space-between;gap:12px;padding:10px 14px;border-top:1px solid var(--hairline);font-size:12px}.pdf-paper-preview-actions a,.pdf-paper-preview-actions button{color:var(--accent)}.pdf-paper-preview-actions button{border:0;background:transparent;cursor:pointer;padding:0;font:inherit}.pdf-paper-preview-actions a:focus-visible,.pdf-paper-preview-actions button:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.reader-web-document{max-width:760px;margin:0 auto;padding:32px 28px 64px;color:#1a1a1a;font-size:16px;line-height:1.65;overflow-wrap:anywhere}.reader-web-document h1{margin:0 0 20px;font-size:28px;line-height:1.25}.reader-web-document h2{margin:32px 0 12px;font-size:22px;line-height:1.3}.reader-web-document h3{margin:24px 0 8px;font-size:18px}.reader-web-document img{max-width:100%;height:auto}.reader-web-document pre{overflow-x:auto;padding:12px;border-radius:6px;background:#f4f4f5;font-size:13px}.reader-web-document table{display:block;max-width:100%;overflow-x:auto;border-collapse:collapse;font-size:14px}.reader-web-document th,.reader-web-document td{padding:6px 10px;border:1px solid #e4e4e7}.reader-web-document a{color:#1c68ef}.reader-web-document ::-moz-selection{background:#2d7dff4d}.reader-web-document ::selection{background:#2d7dff4d}@media (max-width: 640px){.reader-web-document{padding:20px 16px 48px;font-size:15px}}.saved-area-section{margin-top:28px}.saved-area-section:first-of-type{margin-top:4px}.saved-area-heading{font-family:var(--serif);font-size:22px;font-weight:500;color:var(--ink);margin:0 0 6px;padding-bottom:6px;border-bottom:1px solid var(--hairline-strong)}.saved-task-block{margin-top:16px}.saved-task-row{display:flex;align-items:center;gap:10px;margin-bottom:6px}.saved-task-count{font-size:12px;color:var(--ink-faint)}.saved-signin-panel{display:flex;justify-content:center;padding:80px 0}.saved-bucket-migration{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:24px;padding:14px 16px;border:1px solid var(--info-border);border-radius:6px;background:var(--info-bg);color:var(--info-text)}.saved-bucket-migration p{max-width:760px;font-size:13px;line-height:1.5}.saved-bucket-migration .hf-signin-btn{flex-shrink:0;max-width:100%;height:auto;min-height:36px;padding:8px 12px;white-space:normal;overflow-wrap:anywhere}@media (max-width: 700px){.saved-bucket-migration{align-items:flex-start;flex-direction:column}}.action-btn.is-saved{background:var(--ink);color:var(--bg);border-color:var(--ink)}.action-btn.is-saved:hover{background:color-mix(in oklch,var(--ink) 88%,var(--accent))}.ask-home-new{max-width:640px;margin:0 auto 6px;padding-left:9px;color:var(--ink-faint);font-size:14px;font-weight:700}.ask-home{position:relative;max-width:640px;margin:0 auto 36px;background:var(--bg-elevated);border:1px solid var(--hairline);border-radius:14px;box-shadow:0 1px 2px #1e1c140a,0 12px 34px -18px #1e1c1447;padding:8px}.ask-home-row{display:flex;align-items:flex-end;gap:8px}.ask-home-row>.chat-send{flex:none;margin:0 2px 2px 0}.ask-home-textarea-wrap{position:relative;flex:1;min-width:0}.ask-home textarea{position:relative;z-index:1;display:block;width:100%;border:0;outline:0;resize:none;background:transparent;font-family:var(--serif);font-size:17px;line-height:1.45;color:transparent;caret-color:var(--ink);padding:8px 12px}.ask-home textarea::-moz-placeholder{color:var(--ink-faint)}.ask-home textarea::placeholder{color:var(--ink-faint)}.feed-sidebar{display:flex;flex-direction:column;min-height:calc(100dvh - 250px)}.feed-sidebar>.sidebar-section-tools{margin-top:auto;margin-bottom:0}@media (max-width: 880px){.layout-with-sidebar>.sidebar,.layout-with-sidebar>.feed-main{display:contents}.feed-chat{order:1}.sidebar-section-top-domains{order:2}.sidebar-section-trending-domains{order:3}.sidebar-section-follows{order:2}.feed-content{order:4}.sidebar-section-tools{order:5}.feed-sidebar>.sidebar-section-tools{margin-top:0}.feed-content:has(>.following-intro){display:contents}.feed-content:has(>.following-intro)>*{order:4}.feed-content:has(>.following-intro)>.following-intro{order:0;margin:0}}.sidebar-tools-mcp{width:100%;justify-content:space-between;padding:10px 14px;font-size:15px;font-weight:600}.sidebar-tools-mcp:hover{border-color:var(--ink-faint)}.sidebar-tools-copy{font-size:12px;line-height:1.5;color:var(--ink-faint);margin:10px 0 0}.sidebar-tools-copy a{color:var(--ink-soft);text-decoration:underline;text-decoration-style:dotted}.sidebar-tools-copy code{font-family:var(--mono);font-size:11px}.submission-loading,.submission-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;min-height:240px;padding:32px;text-align:center;color:var(--ink-faint)}.submission-loading{min-height:160px;flex-direction:row;font-family:var(--mono);font-size:12px}.submission-empty h1,.submission-empty h2{font-family:var(--serif);font-weight:500;color:var(--ink)}.submission-empty p{max-width:460px;color:var(--ink-soft)}.submission-empty a{color:var(--accent-text);text-decoration:underline}.submission-empty-warn{border:1px solid var(--hairline);border-radius:8px;background:var(--bg-elevated)}.chat-page{position:relative;display:flex;overflow:hidden;background:var(--bg)}.chat-main{flex:1;display:flex;flex-direction:column;min-width:0;background:var(--bg)}.chat-topbar{display:flex;align-items:center;gap:14px;padding:10px 24px;border-bottom:1px solid var(--hairline)}.chat-topbar .icon-btn{flex:none;border-color:transparent;background:transparent;color:var(--ink-soft);transition:background .15s,color .15s}.chat-topbar .icon-btn:hover,.chat-topbar .icon-btn[data-state=open]{background:var(--bg-subtle);color:var(--ink)}.chat-topbar-title{flex:1;min-width:0;font-family:var(--serif);font-size:15px;font-weight:500;letter-spacing:-.005em;color:var(--ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.chat-empty{flex:1;display:flex;align-items:flex-start;justify-content:center;padding:40px 24px;overflow-y:auto}.chat-empty-inner{max-width:680px;width:100%;margin-block:auto;text-align:center}.chat-empty-eyebrow{font-family:var(--mono);font-size:11px;letter-spacing:.16em;text-transform:uppercase;color:var(--ink-faint);margin-bottom:18px}.chat-empty-title{font-family:var(--serif);font-weight:500;font-size:44px;line-height:1.05;letter-spacing:-.02em;margin-bottom:14px}.chat-empty-title em{font-style:italic;font-weight:400;color:var(--accent)}.chat-empty-sub{font-family:var(--serif);font-size:16px;line-height:1.5;color:var(--ink-soft);max-width:520px;margin:0 auto 26px;text-wrap:pretty}.chat-staging-access-note{max-width:560px;margin:-12px auto 18px;color:var(--ink-soft);font-size:13px;line-height:1.45}.chat-staging-badge{flex:none;border:1px solid color-mix(in oklch,var(--accent) 36%,var(--hairline));border-radius:999px;padding:3px 7px;color:var(--accent-text);background:color-mix(in oklch,var(--accent) 7%,var(--bg-elevated));font-family:var(--mono);font-size:10px;font-weight:700;letter-spacing:.08em;line-height:1;text-transform:uppercase}.chat-examples{display:flex;flex-wrap:wrap;gap:10px;justify-content:center;margin-top:24px}.chat-example{font-family:var(--serif);font-size:14px;color:var(--ink-soft);background:var(--bg-elevated);border:1px solid var(--hairline);border-radius:999px;padding:8px 16px;transition:border-color .15s,color .15s}.chat-example:hover{border-color:var(--hairline-strong);color:var(--ink)}.chat-paper-inline-highlight{color:var(--accent-text);text-decoration-line:underline;text-decoration-color:color-mix(in oklch,var(--accent) 40%,transparent);text-decoration-thickness:1px;text-underline-offset:2px}.chat-paper-inline-highlight.is-unavailable{color:var(--negative-text);text-decoration-color:var(--negative-border)}@media (max-width: 900px){.chat-empty-title{font-size:34px}}@media (forced-colors: active){.chat-paper-inline-highlight{outline:1px solid CanvasText}}@media (max-width: 560px){.chat-topbar{padding-inline:14px}}.chat-credits-notice{position:relative;display:flex;align-items:center;justify-content:center;min-height:28px;padding:5px 52px 6px;border-bottom:1px solid var(--hairline);background:var(--bg-subtle);color:var(--ink-soft);font-size:12px;line-height:16px;text-align:center}.chat-credits-notice-close{position:absolute;top:50%;right:20px;display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;padding:0;border:0;border-radius:4px;background:transparent;color:var(--ink-soft);font-size:16px;line-height:1;cursor:pointer;transform:translateY(-50%)}.chat-credits-notice-close:hover{background:var(--hairline);color:var(--ink)}.chat-credits-notice-close:focus-visible{outline:2px solid var(--accent-text);outline-offset:1px}.chat-sidebar{position:relative;width:var(--chat-sidebar-width, var(--app-leading-column-width));flex:none;background:var(--bg-subtle);border-right:1px solid var(--hairline);display:flex;flex-direction:column;transition:margin-left .2s ease}.chat-sidebar-backdrop{display:none}.chat-sidebar-resize-handle{position:absolute;top:0;right:-4px;bottom:0;z-index:2;width:8px;cursor:col-resize;touch-action:none}.chat-sidebar-resize-handle:after{content:"";position:absolute;top:0;right:3px;bottom:0;left:3px;background:var(--hairline-strong);opacity:0;transition:opacity .15s}.chat-sidebar-resize-handle:hover:after,.chat-sidebar-resize-handle:focus-visible:after{opacity:1}.chat-sidebar-resize-handle:focus-visible{outline:2px solid var(--link);outline-offset:-3px}.chat-sidebar-closed{margin-left:calc(-1 * (var(--chat-sidebar-width, var(--app-leading-column-width)) + 1px))}.chat-sidebar-top{display:flex;align-items:center;gap:8px;padding:14px 12px 8px}.chat-sidebar-top .icon-btn{flex:none}.chat-new-chat{flex:1;display:flex;align-items:center;justify-content:center;gap:8px;padding:9px;background:var(--bg-elevated);border:1px solid var(--hairline);border-radius:8px;font-size:13px;font-weight:500;color:var(--ink);transition:border-color .15s}.chat-new-chat:hover{border-color:var(--hairline-strong)}.chat-sessions{flex:1;overflow-y:auto;padding:4px 8px 20px}.chat-sessions-empty{padding:18px 10px;font-family:var(--serif);font-style:italic;font-size:13px;color:var(--ink-faint)}.chat-session-group{margin-top:14px}.chat-sessions-toggle{margin-top:6px;padding:7px 10px;border-radius:7px;font-family:var(--mono);font-size:11px;color:var(--ink-faint)}.chat-sessions-toggle:hover{background:var(--hairline);color:var(--ink)}.chat-sidebar-tools{flex:none;margin:0;padding:14px 16px 16px;border-top:1px solid var(--hairline)}.chat-session-group-label{font-family:var(--mono);font-size:10px;letter-spacing:.12em;text-transform:uppercase;color:var(--ink-faint);padding:6px 10px}.chat-session{display:flex;align-items:center;gap:6px;width:100%;text-align:left;padding:7px 10px;border-radius:7px;font-size:13px;color:var(--ink-soft);transition:background .12s,color .12s}.chat-session:hover{background:var(--hairline);color:var(--ink)}.chat-session-active{background:var(--hairline);color:var(--ink);font-weight:500}.chat-session-title{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.chat-session-delete{display:inline-flex;align-items:center;color:var(--ink-faint);padding:2px;border-radius:4px;flex:none}.chat-session-delete:hover{color:var(--negative-text)}.chat-session-menu{display:inline-flex;border:0;background:transparent;color:inherit;cursor:pointer;padding:0 3px;font-size:17px;line-height:1}@media (hover: hover) and (pointer: fine){.chat-session-delete,.chat-session-menu{display:none}.chat-session:hover .chat-session-delete,.chat-session:hover .chat-session-menu,.chat-session:focus-within .chat-session-delete,.chat-session:focus-within .chat-session-menu{display:inline-flex}}.chat-session-title-input{min-width:0;flex:1;border:1px solid var(--border);border-radius:4px;background:var(--surface);color:var(--ink);font:inherit;padding:2px 4px}.chat-session-context-menu{position:fixed;z-index:1000;width:150px;padding:4px;border:1px solid var(--border);border-radius:7px;background:var(--surface);box-shadow:0 8px 24px #00000029}.chat-session-context-menu button{width:100%;border:0;border-radius:4px;background:transparent;color:var(--ink);padding:7px 9px;text-align:left;cursor:pointer}.chat-session-context-menu button:hover,.chat-session-context-menu button:focus{background:var(--hairline)}.chat-session-loading,.chat-session-load-error{flex:1;display:flex;align-items:center;justify-content:center;gap:10px;color:var(--ink-soft);font-family:var(--serif);font-size:14px}.chat-session-load-error{flex-direction:column}.chat-session-load-error p{margin:0}.chat-session-load-error button{border:1px solid var(--border);border-radius:5px;padding:7px 12px;background:var(--surface);color:var(--ink);cursor:pointer}.chat-session-load-error button:hover{background:var(--bg-subtle)}@media (max-width: 900px){.chat-sidebar{position:absolute;top:0;bottom:0;left:0;z-index:60;box-shadow:0 0 40px #0003;width:var(--app-leading-column-width)}.chat-sidebar-backdrop{display:block;position:absolute;top:0;right:0;bottom:0;left:0;z-index:59}.chat-sidebar-resize-handle{display:none}.chat-sidebar-closed{margin-left:0;transform:translate(-101%);box-shadow:none}}.chat-share-button{flex:none;display:inline-flex;align-items:center;gap:6px;height:32px;padding:0 12px 0 10px;border:1px solid var(--hairline);border-radius:8px;background:var(--bg-elevated);color:var(--ink);font-size:13px;font-weight:500;transition:border-color .15s,box-shadow .15s}.chat-share-button:hover:not(:disabled){border-color:var(--hairline-strong);box-shadow:0 1px 2px #1a18140f}.chat-share-button:disabled{cursor:not-allowed;opacity:.55}.chat-share-button:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.chat-share-button svg{width:14px;height:14px;color:var(--ink-soft)}.chat-share-toast{position:fixed;top:18px;left:50%;width:min(420px,calc(100vw - 32px));transform:translate(-50%)}.chat-share-dialog-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:110;display:grid;place-items:center;padding:20px;background:#0000006b}.chat-share-dialog{width:min(520px,100%);padding:22px;border:1px solid var(--hairline-strong);border-radius:12px;background:var(--bg-elevated);box-shadow:0 18px 60px #00000038}.chat-share-dialog h2{margin:0 0 8px;font-family:var(--serif);font-size:21px}.chat-share-dialog p{margin:0 0 14px;color:var(--ink-soft)}.chat-share-dialog input{width:100%;padding:9px 10px;border:1px solid var(--hairline-strong);border-radius:7px;background:var(--bg);color:var(--ink);font-family:var(--mono);font-size:12px}.chat-share-dialog input:focus{outline:2px solid var(--accent);outline-offset:2px}.chat-share-dialog button{display:block;margin:16px 0 0 auto;padding:7px 14px;border-radius:7px;background:var(--accent);color:#fff;font-weight:600}@media (max-width: 560px){.chat-share-button{width:34px;padding:6px;justify-content:center}.chat-share-button span{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}}.chat-capacity-dialog-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:120;display:grid;place-items:center;padding:20px;background:#0000007a}.chat-capacity-dialog{width:min(500px,100%);padding:24px;border:1px solid var(--hairline-strong);border-radius:12px;background:var(--bg-elevated);box-shadow:0 18px 60px #0000003d}.chat-capacity-dialog h2{margin:0 0 9px;font-family:var(--serif);font-size:22px}.chat-capacity-dialog p{margin:0;color:var(--ink-soft);line-height:1.5}.chat-capacity-countdown{min-height:24px;padding-top:12px;font-size:13px}.chat-capacity-dialog-actions{display:flex;justify-content:flex-end;gap:9px;margin-top:20px}.chat-capacity-dialog-actions button{padding:8px 14px;border-radius:7px;font-weight:600}.chat-capacity-cancel{border:1px solid var(--hairline-strong);background:var(--bg);color:var(--ink)}.chat-capacity-retry{background:var(--accent);color:#fff}.chat-capacity-retry:disabled{cursor:not-allowed;opacity:.5}.chat-capacity-dialog-actions button:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.chat-paused-banner{margin-bottom:.75rem;border:1px solid var(--border);border-radius:.65rem;background:var(--muted);padding:.7rem .85rem;color:var(--muted-foreground);font-size:.875rem;line-height:1.4}.chat-composer-error{margin-bottom:.75rem;border:1px solid color-mix(in oklch,#c33 35%,var(--hairline));border-radius:.65rem;background:color-mix(in oklch,#c33 8%,var(--bg-elevated));padding:.7rem .85rem;color:var(--ink);font-size:.875rem;line-height:1.4}.chat-billing-notice{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px;margin:0 0 10px;padding:9px 11px;border:1px solid color-mix(in oklch,var(--accent) 24%,var(--hairline));border-radius:9px;color:var(--ink-soft);background:color-mix(in oklch,var(--accent) 5%,var(--bg-elevated));font-size:12px;line-height:1.4}.chat-billing-notice a{flex:none;color:var(--accent-text);font-weight:600;text-decoration:none}.chat-billing-notice a:hover{text-decoration:underline}.chat-billing-notice-actions{display:flex;align-items:center;gap:10px;flex:none}.chat-billing-notice-dismiss{display:inline-flex;align-items:center;justify-content:center;width:26px;height:26px;padding:0;border:0;border-radius:6px;color:var(--ink-soft);background:transparent;cursor:pointer}.chat-billing-notice-dismiss:hover{color:var(--ink);background:color-mix(in oklch,var(--ink) 7%,transparent)}.chat-billing-notice-dismiss:focus-visible{outline:2px solid var(--accent);outline-offset:1px}.ask-home>.chat-paper-picker{top:calc(100% + 6px);bottom:auto}.chat-empty .chat-composer{text-align:left}.chat-composer-wrap{border-top:1px solid var(--hairline);background:var(--bg);padding:14px 28px 16px}.chat-composer-inner{max-width:820px;margin:0 auto}.chat-composer{position:relative;background:var(--bg-elevated);border:1px solid var(--hairline);border-radius:14px;box-shadow:0 1px 2px #1e1c140a,0 10px 30px -20px #1e1c144d;padding:6px}.chat-composer-textarea-wrap{position:relative}.chat-paper-highlight-layer{position:absolute;z-index:0;top:0;right:0;bottom:0;left:0;box-sizing:border-box;overflow:hidden;pointer-events:none;color:transparent}.chat-paper-highlight-layer>div{min-height:100%;white-space:pre-wrap;overflow-wrap:break-word;word-break:break-word;color:var(--ink)}.chat-paper-highlight-layer-composer{padding:12px 12px 4px;font-family:var(--serif);font-size:16px;line-height:1.45}.chat-paper-highlight-layer-editor{padding:9px 11px;font-family:var(--serif);font-size:16px;line-height:1.45}.chat-paper-highlight-layer-home{padding:8px 12px;font-family:var(--serif);font-size:17px;line-height:1.45}.chat-prompt-completion{color:var(--ink-faint)}.chat-paper-picker{position:absolute;z-index:50;left:8px;bottom:calc(100% + 6px);width:min(560px,calc(100vw - 48px));max-height:384px;overflow-y:auto;border:1px solid var(--hairline-strong);border-radius:11px;background:var(--bg-elevated);box-shadow:0 16px 38px -16px #1e1c1473}.chat-slash-command{position:absolute;z-index:50;left:8px;bottom:calc(100% + 6px);display:flex;width:min(560px,calc(100vw - 48px));min-height:52px;align-items:center;gap:10px;padding:9px 12px;border:1px solid var(--hairline-strong);border-radius:11px;color:var(--ink);background:var(--bg-elevated);box-shadow:0 16px 38px -16px #1e1c1473;text-align:left}.chat-slash-command:hover{background:var(--accent-soft)}.chat-slash-command span{color:var(--ink-faint);font-size:12px}.chat-paper-picker-status{padding:10px 12px;color:var(--ink-faint);font-size:12px}.chat-paper-option{display:flex;width:100%;min-height:64px;flex-direction:column;justify-content:center;gap:3px;padding:9px 12px;border:0;border-top:1px solid var(--hairline);color:var(--ink);background:transparent;text-align:left}.chat-paper-option.is-active,.chat-paper-option:hover{background:var(--accent-soft)}.chat-paper-option-title{font-family:var(--serif);font-size:14px;line-height:1.25}.chat-paper-option-meta{color:var(--ink-faint);font-family:var(--mono);font-size:10.5px}.chat-paper-mention-message{padding:3px 12px;color:var(--negative-text);font-size:11.5px}.chat-inline-paper-mention{display:inline}.chat-inline-paper-mention svg{display:inline-block;margin-right:3px;color:var(--accent-text);vertical-align:-.12em}.chat-inline-paper-link{color:var(--accent-text);font-weight:600;text-decoration-line:underline;text-decoration-color:color-mix(in oklch,var(--accent) 40%,transparent);text-decoration-thickness:1px;text-underline-offset:2px}.chat-inline-paper-link:hover{text-decoration-color:var(--accent-text)}.chat-user-link{cursor:pointer;color:var(--accent-text);text-decoration-line:underline;text-decoration-color:color-mix(in oklch,var(--accent) 40%,transparent);text-decoration-thickness:1px;text-underline-offset:2px}.chat-user-link:hover{text-decoration-color:var(--accent-text)}.chat-composer textarea{position:relative;z-index:1;width:100%;border:0;outline:0;resize:none;background:transparent;font-family:var(--serif);font-size:16px;line-height:1.45;color:transparent;caret-color:var(--ink);padding:12px 12px 4px}.chat-composer textarea::-moz-placeholder{color:var(--ink-faint)}.chat-composer textarea::placeholder{color:var(--ink-faint)}.chat-composer-row{display:flex;align-items:center;justify-content:space-between;padding:2px 6px 4px}.chat-composer-tools{display:flex;align-items:center;flex-wrap:wrap;gap:12px}.chat-composer-hint{font-size:11.5px;color:var(--ink-faint)}.chat-composer-foot{display:flex;align-items:center;justify-content:center;gap:6px;text-align:center;font-size:11.5px;color:var(--ink-faint);margin-top:9px}.chat-provider-attribution{white-space:nowrap}.chat-send{display:flex;align-items:center;justify-content:center;width:38px;height:38px;border-radius:10px;background:var(--hairline);color:var(--bg-elevated);cursor:not-allowed;transition:background .15s;flex:none}.chat-send-on{background:var(--ink);cursor:pointer}.chat-send-on:hover{background:color-mix(in oklch,var(--ink) 88%,var(--accent))}@media (max-width: 900px){.chat-composer-wrap{padding:12px 16px 14px}.chat-composer-foot,.chat-composer-hint{display:none}}@media (prefers-reduced-motion: reduce){.chat-paper-option{scroll-behavior:auto}}@media (forced-colors: active){.chat-paper-option.is-active,.chat-inline-paper-link{outline:1px solid CanvasText}.chat-paper-selection,.chat-paper-selection-remove,.chat-paper-selection-toggle{border:1px solid ButtonText}}.chat-paper-selection{margin:6px 6px 0;padding:8px 10px;border:1px solid var(--hairline);border-radius:10px;background:var(--bg-subtle);text-align:left}.chat-paper-selection-header{display:flex;align-items:center;justify-content:space-between;gap:8px}.chat-paper-selection-label{color:var(--ink-soft);font-size:11px;font-weight:600;letter-spacing:.02em;text-transform:uppercase}.chat-paper-selection-actions{display:flex;align-items:center;gap:6px}.chat-paper-selection-toggle,.chat-paper-selection-remove{border:0;padding:2px 6px;background:transparent;color:var(--accent-text);font-size:11.5px}.chat-paper-selection-quote{display:-webkit-box;max-height:4.35em;margin:6px 0 0;overflow:hidden;color:var(--ink);font-family:var(--serif);font-size:13px;line-height:1.45;white-space:pre-wrap;-webkit-box-orient:vertical;-webkit-line-clamp:3}.chat-paper-selection-quote.is-expanded{display:block;max-height:8.5em;overflow:auto;-webkit-line-clamp:unset}.chat-paper-selection-disabled{padding:4px 12px 0;color:var(--negative-text);font-size:11.5px}.chat-paper-link{color:var(--accent-text);border-bottom:1px solid color-mix(in oklch,var(--accent-text) 35%,transparent);white-space:normal}.chat-paper-link:hover{border-bottom-color:var(--accent-text)}.chat-hf-link:after{content:" 🤗";font-size:.85em;white-space:nowrap}.chat-github-link{color:var(--accent-text);border-bottom:1px solid color-mix(in oklch,var(--accent-text) 35%,transparent)}.chat-github-link:hover{border-bottom-color:var(--accent-text)}.chat-github-link svg{display:inline-block;width:1em;height:1em;margin-right:.3em;vertical-align:-.14em}.chat-external-link{color:var(--accent-text);text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:2px}.chat-external-link:hover{text-decoration-thickness:2px}.chat-web-citation{color:var(--accent-text);text-decoration:underline;text-decoration-style:dotted;text-underline-offset:2px}.chat-external-paper-citation{color:var(--chat-link);text-decoration:underline;text-decoration-color:color-mix(in srgb,var(--chat-link) 35%,transparent);text-underline-offset:2px}.external-paper-preview-pop.external-paper-preview-pop{width:min(390px,calc(100vw - 24px));padding:0;overflow:hidden;border-color:var(--chat-border);background:var(--chat-surface);color:var(--chat-text)}.external-paper-preview-card{padding:14px}.external-paper-preview-source{display:flex;gap:6px;margin-bottom:7px;color:var(--chat-muted);font-size:12px}.external-paper-preview-card strong{display:block;color:var(--chat-text);font-size:14px;line-height:1.35}.external-paper-preview-card p{margin:7px 0 0;color:var(--chat-muted);font-size:12px;line-height:1.45;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:4;overflow:hidden}.external-paper-preview-authors{-webkit-line-clamp:2!important}.external-paper-preview-citations{display:block;margin-top:9px;color:var(--chat-muted);font-size:11px}.web-preview-pop.web-preview-pop{width:min(360px,calc(100vw - 24px));padding:0;overflow:hidden;border:1px solid var(--hairline);border-radius:12px;background:var(--bg-elevated);color:var(--ink);box-shadow:0 14px 44px -12px #1e1c1466}.web-preview-card{display:flex;flex-direction:column}.web-preview-image{display:block;width:100%;height:174px;-o-object-fit:cover;object-fit:cover;background:var(--bg-subtle);border-bottom:1px solid var(--hairline)}.web-preview-meta{padding:13px 14px 14px;min-width:0}.web-preview-source{display:flex;align-items:center;gap:5px;margin-bottom:6px;color:var(--ink-faint);font-size:11px}.web-preview-source img{width:14px;height:14px;border-radius:3px}.web-preview-meta strong{display:block;font-family:var(--serif);font-size:15px;font-weight:500;line-height:1.3}.web-preview-meta p{display:-webkit-box;overflow:hidden;margin:7px 0 0;color:var(--ink-soft);font-size:12px;line-height:1.4;-webkit-box-orient:vertical;-webkit-line-clamp:3}.paper-preview-pop.paper-preview-pop{width:min(344px,calc(100vw - 24px));padding:0;border:1px solid var(--hairline);border-radius:12px;background:var(--bg-elevated);color:var(--ink);box-shadow:0 14px 44px -12px #1e1c1466;overflow:hidden}.paper-preview-inner{display:flex;gap:14px;padding:14px}.paper-preview-meta{min-width:0;flex:1}.paper-preview-title{font-family:var(--serif);font-weight:500;font-size:15px;line-height:1.25;margin-bottom:5px}.paper-preview-auth{font-size:12px;color:var(--ink-soft);line-height:1.35}.paper-preview-venue{font-size:11.5px;color:var(--ink-faint);margin-top:3px;font-variant-numeric:tabular-nums}.paper-preview-tags{display:flex;flex-wrap:wrap;gap:5px;margin:9px 0}.paper-preview-tag{font-size:10.5px;font-family:var(--mono);background:var(--positive-bg);color:var(--positive-text);border-radius:5px;padding:2px 7px}.paper-preview-status{min-height:48px;padding:14px;display:flex;align-items:center;color:var(--ink-soft);font-size:12px}.paper-preview-index-request{flex-wrap:wrap;gap:6px 12px}.paper-preview-index-request a,.paper-preview-index-request button{color:var(--accent);font:inherit;border:0;background:transparent;padding:0;cursor:pointer}.paper-preview-index-request button:disabled{color:var(--ink-soft);cursor:default}.paper-preview-index-request a:focus-visible,.paper-preview-index-request button:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.paper-preview-index-request [role=alert]{flex-basis:100%;color:var(--negative-text, var(--ink-soft))}.paper-preview-thumb{position:relative;width:96px;height:124px;flex:none;background:var(--bg-elevated);border:1px solid var(--hairline);border-radius:3px;box-shadow:0 1px 3px #1e1c1414;overflow:hidden;padding:11px 10px}.paper-preview-thumb-real{padding:0}.paper-preview-thumb-real img{display:block;width:100%;height:100%;-o-object-fit:contain;object-fit:contain}.paper-preview-thumb-title{display:flex;flex-direction:column;align-items:center;gap:3px;margin-bottom:8px}.paper-preview-thumb-title span{height:3px;background:var(--ink);border-radius:2px}.paper-preview-thumb-title span:first-child{width:70%}.paper-preview-thumb-title span:last-child{width:52%}.paper-preview-thumb-auth{height:2px;width:40%;margin:0 auto 9px;background:var(--ink-faint);border-radius:2px}.paper-preview-thumb-cols{display:flex;gap:7px}.paper-preview-thumb-col{flex:1;height:74px;background:repeating-linear-gradient(var(--hairline-strong) 0 2px,transparent 2px 5px);opacity:.7}.paper-preview-thumb-fig{position:absolute;left:14px;right:14px;height:22px;background:var(--bg-subtle);border:1px solid var(--hairline);border-radius:2px}.hf-preview-pop.hf-preview-pop{width:min(172px,calc(100vw - 24px));padding:0;border:1px solid var(--hairline);border-radius:12px;background:var(--bg-elevated);color:var(--ink);box-shadow:0 14px 44px -12px #1e1c1466;overflow:hidden}.hf-preview-card{display:grid}.hf-preview-image,.hf-preview-fallback{display:block;width:100%;aspect-ratio:2 / 1;-o-object-fit:cover;object-fit:cover;background:var(--bg-subtle)}.hf-preview-fallback{display:grid;place-items:center;font-size:48px;background:radial-gradient(circle at 70% 35%,rgba(84,104,255,.4),transparent 45%),linear-gradient(135deg,#0f6d79,#d18a48)}.hf-preview-meta{display:grid;gap:3px;padding:12px 14px 14px}.hf-preview-meta strong{overflow-wrap:anywhere;font-size:14px}.hf-preview-kind,.hf-preview-meta>span:last-child{color:var(--ink-faint);font-size:11.5px}.github-preview-pop.github-preview-pop{width:min(344px,calc(100vw - 24px));padding:0;border:1px solid var(--hairline);border-radius:12px;background:var(--bg-elevated);color:var(--ink);box-shadow:0 14px 44px -12px #1e1c1466;overflow:hidden}.github-preview-card{display:flex;gap:14px;padding:14px}.github-preview-image,.github-preview-fallback{display:block;width:72px;height:72px;flex:none;-o-object-fit:cover;object-fit:cover;border-radius:12px;background:var(--bg-subtle)}.github-preview-fallback{display:grid;place-items:center;color:#fff;background:linear-gradient(135deg,#24292f,#57606a)}.github-preview-fallback svg{width:36px;height:36px}.github-preview-meta{display:grid;gap:3px;min-width:0}.github-preview-meta strong{overflow-wrap:anywhere;font-size:14px}.github-preview-kind,.github-preview-meta>span:last-child{color:var(--ink-faint);font-size:11.5px}.github-preview-description{display:-webkit-box;overflow:hidden;color:var(--ink-soft);font-size:12px;line-height:1.35;-webkit-box-orient:vertical;-webkit-line-clamp:2}.github-preview-stats{font-variant-numeric:tabular-nums}.catalog-preview-pop.catalog-preview-pop{width:min(320px,calc(100vw - 24px));padding:0;border:1px solid var(--hairline);border-radius:12px;background:var(--bg-elevated);color:var(--ink);box-shadow:0 14px 44px -12px #1e1c1466;overflow:hidden}.catalog-preview-card{display:grid}.catalog-preview-image{display:block;width:100%;aspect-ratio:2 / 1;-o-object-fit:cover;object-fit:cover;background:var(--bg-subtle);border-bottom:1px solid var(--hairline)}.catalog-preview-meta{display:grid;gap:3px;padding:12px 14px 14px}.catalog-preview-meta strong{font-family:var(--serif);font-weight:500;font-size:15px;line-height:1.25}.catalog-preview-meta p{display:-webkit-box;overflow:hidden;margin:3px 0 0;color:var(--ink-soft);font-size:12px;line-height:1.4;-webkit-box-orient:vertical;-webkit-line-clamp:3}.catalog-preview-kind,.catalog-preview-stats{color:var(--ink-faint);font-size:11.5px;font-variant-numeric:tabular-nums}.catalog-preview-stats{margin-top:4px}.chat-pdf-citation{position:relative;display:inline-flex;align-items:center;gap:4px;margin:0 1px;padding:1px 8px;border:1px solid color-mix(in oklch,var(--accent-text) 30%,transparent);border-radius:999px;background:color-mix(in oklch,var(--accent-text) 7%,transparent);color:var(--accent-text);font:inherit;font-size:.86em;line-height:1.5;vertical-align:baseline;cursor:pointer}.chat-pdf-citation:hover,.chat-pdf-citation:focus-visible{border-color:var(--accent-text)}.chat-pdf-citation>svg{width:.95em;height:.95em;flex:none}.chat-pdf-citation-preview{position:absolute;bottom:calc(100% + 6px);left:0;z-index:20;display:none;width:min(320px,70vw);padding:8px 10px;border:1px solid var(--hairline);border-radius:8px;background:var(--bg-elevated);color:var(--ink);box-shadow:0 14px 44px -12px #1e1c1466;font-size:.92em;line-height:1.45;text-align:left;white-space:normal}.chat-pdf-citation-preview.is-below{top:calc(100% + 6px);bottom:auto}.chat-pdf-citation-preview strong{display:block;margin-bottom:2px;color:var(--ink-faint);font-weight:600}.chat-pdf-citation:hover .chat-pdf-citation-preview,.chat-pdf-citation:focus-visible .chat-pdf-citation-preview{display:block}.chat-pdf-sources{margin-top:10px;color:var(--ink-faint);font-size:.88em}.chat-pdf-sources summary{cursor:pointer;width:-moz-fit-content;width:fit-content}.chat-pdf-sources ol{margin:6px 0 0;padding-left:1.4em}.chat-pdf-sources li{margin:3px 0}.chat-pdf-sources button{display:flex;gap:8px;width:100%;padding:0;border:0;background:none;color:var(--ink);font:inherit;text-align:left;cursor:pointer}.chat-pdf-sources button:hover>span:last-child{text-decoration:underline}.chat-pdf-sources-page{flex:none;color:var(--accent-text);font-variant-numeric:tabular-nums}.chat-artifact-card{width:min(100%,620px);display:flex;gap:14px;align-items:stretch;padding:0;overflow:hidden;text-align:left;color:var(--chat-text, #182230);background:#fff;border:1px solid #d8dee8;border-radius:14px;box-shadow:0 5px 18px #0f172a12}button.chat-artifact-card{cursor:pointer}.chat-artifact-card.is-selected{border-color:var(--accent);box-shadow:0 0 0 2px color-mix(in oklch,var(--accent) 22%,transparent)}.chat-artifact-card>img{width:190px;aspect-ratio:5 / 3;-o-object-fit:cover;object-fit:cover;background:#eef1f5}.chat-artifact-card-copy{display:flex;min-width:0;flex:1;flex-direction:column;justify-content:center;gap:7px;padding:14px 14px 14px 0}.chat-artifact-card-copy strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.chat-artifact-kicker{display:flex;align-items:center;gap:6px;color:#637083;font-size:12px}.chat-artifact-kicker svg{width:14px;height:14px}.chat-artifact-gate{width:-moz-fit-content;width:fit-content;padding:3px 8px;border-radius:999px;color:#11643b;background:#e7f7ee;font-size:11px;font-weight:650}.chat-artifact-gate-warnings{color:#7a4a00;background:#fff3d6}.chat-artifact-gate-failed{color:#9b2c2c;background:#fee9e7}.chat-artifact-generating,.chat-artifact-error{align-items:center;padding:16px}.chat-artifact-generating span:not(.chat-artifact-pulse),.chat-artifact-error span{display:flex;flex-direction:column;gap:3px}.chat-artifact-generating small,.chat-artifact-error small{color:#687386}.chat-artifact-error{border-color:#efb7b1}.chat-artifact-error>svg{width:24px;color:#b3372d}.chat-artifact-pulse{width:22px;height:22px;border:3px solid #d7dde8;border-top-color:#5367d9;border-radius:50%;animation:chat-artifact-spin .8s linear infinite}@keyframes chat-artifact-spin{to{transform:rotate(360deg)}}.chat-artifact-workspace{position:relative;min-width:0;min-height:0;flex:1;display:flex;overflow:hidden}.chat-artifact-workspace-content{min-width:0;min-height:0;flex:1;display:flex;overflow:hidden}.chat-artifact-workspace-chat>.chat-artifact-workspace-content>.chat-main{width:100%}.chat-artifact-workspace-shared{min-height:0}.chat-artifact-workspace-shared>.chat-artifact-workspace-content{overflow:auto}.chat-artifact-workspace-reader{height:100%}.chat-artifact-workspace-reader>.chat-artifact-workspace-content>.reader-workspace{width:100%}.chat-artifact-workspace-pane{min-width:0;min-height:0;flex:none;display:flex;overflow:hidden}.chat-artifact-resize-handle{position:relative;z-index:7;width:1px;flex:0 0 1px;cursor:col-resize;background:var(--hairline-strong);touch-action:none;outline:none}.chat-artifact-resize-handle:before{content:"";position:absolute;top:0;right:-8px;bottom:0;left:-8px}.chat-artifact-resize-handle:focus-visible{box-shadow:0 0 0 2px var(--accent)}.chat-artifact-panel{width:100%;height:100%;min-width:0;min-height:0;display:grid;grid-template-rows:auto auto minmax(0,1fr) auto;overflow:hidden;color:var(--ink);background:#f6f7f9;border-left:1px solid var(--hairline)}.chat-artifact-panel.is-dialog{position:fixed;z-index:1200;top:0;right:0;bottom:0;left:0;border:0}.chat-artifact-panel.is-reader-fallback{position:absolute}.chat-artifact-panel header{display:flex;align-items:center;justify-content:space-between;padding:16px 20px;background:#fff;border-bottom:1px solid #dce1e8}.chat-artifact-panel header span{color:#6d7788;font-size:12px;text-transform:uppercase;letter-spacing:.06em}.chat-artifact-panel h2{margin:2px 0 0;font-size:18px}.chat-artifact-panel header button{display:grid;place-items:center;width:36px;height:36px;border:0;border-radius:8px;background:transparent;cursor:pointer}.chat-paper-status{margin:4px 0 0;color:#687386;font-size:12px}.chat-artifact-header-actions{display:flex;align-items:center;gap:6px}.chat-artifact-header-actions>button:first-child{width:auto;min-height:36px;padding:7px 10px;border:1px solid #cfd6e4;color:#253143;background:#fff;font-size:12px}.chat-artifact-version{display:flex;align-items:center;gap:7px;margin-left:auto;margin-right:8px;color:#687386;font-size:12px}.chat-artifact-version select{padding:6px 8px;border:1px solid #cfd6e4;border-radius:7px;background:#fff}.chat-artifact-panel>nav{position:sticky;z-index:1;top:0;display:flex;gap:4px;padding:8px 18px 0;background:#fff}.chat-artifact-panel nav button{padding:9px 14px;border:0;border-bottom:2px solid transparent;color:#667085;background:transparent;cursor:pointer}.chat-artifact-panel nav button.active{color:#273a91;border-bottom-color:#5367d9;font-weight:650}.chat-artifact-panel button:focus-visible,.chat-artifact-panel a:focus-visible,.chat-artifact-panel input:focus-visible,.latex-source-editor .cm-content:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.chat-artifact-panel-body{min-height:0;display:grid;place-items:center;overflow:auto;padding:20px}.chat-artifact-panel-body>.pdf-viewer{align-self:stretch;justify-self:stretch;width:100%;height:100%}.chat-artifact-panel-body>img{max-width:100%;max-height:100%;-o-object-fit:contain;object-fit:contain;background:#fff;box-shadow:0 4px 22px #0f172a1f}.chat-artifact-panel-body>pre{align-self:stretch;justify-self:stretch;overflow:auto;margin:0;padding:18px;color:#d8dee9;background:#18202c;border-radius:10px;font-size:12px;white-space:pre-wrap}.chat-artifact-source-workspace{width:100%;height:100%;min-height:0;display:flex;overflow:hidden;border-radius:10px;background:#18202c}.chat-artifact-source-workspace>nav{width:min(180px,28%);flex:none;display:flex;flex-direction:column;overflow:auto;padding:10px;border-right:1px solid #ffffff24}.chat-artifact-source-workspace>nav button{overflow:hidden;border:0;padding:7px 8px;color:#aeb8c8;background:transparent;text-align:left;text-overflow:ellipsis;white-space:nowrap}.chat-artifact-source-workspace>nav button[aria-pressed=true]{color:#fff;background:#ffffff14}.chat-artifact-source-workspace>pre{min-width:0;flex:1;overflow:auto;margin:0;padding:18px;color:#d8dee9;font-size:12px;white-space:pre-wrap}.latex-editor-column{min-width:0;flex:1;display:flex;flex-direction:column;color:#d8dee9}.latex-source-editor{min-width:0;min-height:0;flex:1;overflow:auto}.latex-source-editor .cm-editor{height:100%;min-height:320px;font-size:13px}.latex-source-editor .cm-scroller{overflow:auto;font-family:ui-monospace,SFMono-Regular,Menlo,monospace}.latex-file-action{display:flex;align-items:center;gap:6px;margin-top:8px}.latex-file-action svg,.latex-file-buttons svg{width:14px;height:14px}.latex-file-buttons{display:flex;gap:8px;padding:8px;border-top:1px solid #ffffff24}.latex-file-buttons button,.chat-artifact-actions button{display:inline-flex;align-items:center;gap:7px;border:0;border-radius:7px;padding:8px 10px;cursor:pointer}.chat-artifact-actions button:disabled{cursor:not-allowed;opacity:.55}.chat-artifact-panel footer{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;padding:14px 20px;background:#fff;border-top:1px solid #dce1e8}.chat-artifact-metadata{display:flex;min-width:0;flex-direction:column;gap:3px;color:#687386;font-size:12px}.chat-artifact-metadata strong{color:#253143}.chat-artifact-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:8px}.chat-artifact-actions a{display:inline-flex;align-items:center;gap:5px;padding:8px 10px;color:#263b94;border:1px solid #cfd6e4;border-radius:8px;text-decoration:none;font-size:12px;font-weight:600}.chat-artifact-actions svg{width:14px;height:14px}.paper-pdf-toolbar{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px;width:100%;padding:8px;border-bottom:1px solid #dce1e8;background:#fff}.paper-pdf-toolbar-group{display:flex;align-items:center;gap:6px}.paper-pdf-toolbar button,.paper-pdf-toolbar input,.paper-pdf-toolbar a{min-height:32px;border:1px solid #cfd6e4;border-radius:7px;padding:5px 8px;color:#253143;background:#fff;font-size:12px;text-decoration:none}.paper-pdf-toolbar input{width:56px}.paper-pdf-toolbar button:disabled{cursor:not-allowed;opacity:.55}@media (max-width: 700px){.chat-artifact-card>img{width:120px}.chat-artifact-panel{width:100vw;height:100dvh}.chat-artifact-panel footer{align-items:stretch;flex-direction:column}.chat-artifact-actions{justify-content:flex-start}.chat-artifact-panel header{padding:12px 14px}.chat-artifact-header-actions>button:first-child{padding-inline:8px}.paper-pdf-toolbar{align-items:flex-start;flex-direction:column}}@media (forced-colors: active){.chat-artifact-resize-handle,.chat-artifact-card.is-selected{border:1px solid ButtonText}}@media (prefers-reduced-motion: reduce){.chat-artifact-pulse{animation-duration:.01ms}}.chat-ghost-link{color:var(--ink-soft);font-size:13px;padding:6px 10px;border-radius:6px}.chat-ghost-link:hover{color:var(--ink);background:var(--bg-subtle)}.chat-conversation-viewport{position:relative;display:flex;flex-direction:column;flex:1;min-height:0}.chat-conversation{flex:1;min-height:0;overflow-y:auto}.chat-jump-latest{position:absolute;bottom:12px;left:50%;transform:translate(-50%);border:1px solid var(--border);border-radius:20px;padding:8px 14px;background:var(--bg);color:var(--ink);box-shadow:0 2px 8px #0000001f;white-space:nowrap;cursor:pointer}.chat-conversation-inner{max-width:820px;margin:0 auto;padding:30px 28px 40px}.chat-msg{margin-bottom:26px}.chat-msg-user{display:flex;justify-content:flex-end}.chat-user-message-wrap{display:flex;flex-direction:column;align-items:flex-end;max-width:74%}.chat-bubble{background:var(--accent-soft);color:var(--ink);border:1px solid color-mix(in oklch,var(--accent-soft) 70%,var(--hairline));border-radius:16px 16px 4px;padding:12px 18px;font-family:var(--serif);font-size:16px;line-height:1.45;max-width:100%;white-space:pre-wrap;overflow-wrap:anywhere;-webkit-user-select:text;-moz-user-select:text;user-select:text;cursor:text}.chat-bubble::-moz-selection,.chat-bubble *::-moz-selection{background:var(--accent);color:var(--bg)}.chat-bubble::selection,.chat-bubble *::selection{background:var(--accent);color:var(--bg)}.chat-user-actions{display:flex;justify-content:flex-end;gap:2px;min-height:30px;padding:4px 2px 0;opacity:0;transform:translateY(-2px);transition:opacity .14s ease,transform .14s ease;-webkit-user-select:none;-moz-user-select:none;user-select:none}.chat-msg-user:hover .chat-user-actions,.chat-msg-user:focus-within .chat-user-actions{opacity:1;transform:translateY(0)}.chat-user-action{width:28px;height:28px;display:inline-flex;align-items:center;justify-content:center;border:1px solid transparent;border-radius:999px;color:var(--ink-soft);background:transparent}.chat-user-action:hover{color:var(--ink);background:var(--bg-elevated);border-color:var(--hairline)}.chat-user-action:focus-visible{outline:2px solid var(--accent);outline-offset:2px;opacity:1}.chat-user-action svg{width:14px;height:14px}.chat-inline-editor{width:min(620px,74%);min-width:min(360px,100%);padding:12px;border:1px solid color-mix(in oklch,var(--accent) 45%,var(--hairline));border-radius:16px 16px 4px;background:var(--accent-soft);box-shadow:0 8px 28px #00000014}.chat-inline-editor-textarea{position:relative;z-index:1;display:block;width:100%;min-height:72px;padding:8px 10px;resize:none;border:1px solid var(--hairline-strong);border-radius:10px;color:var(--ink);background:transparent;font-family:var(--serif);font-size:16px;line-height:1.45;white-space:pre-wrap}.chat-inline-editor-textarea-wrap{position:relative;background:var(--bg-elevated);border-radius:10px}.chat-inline-editor-textarea-wrap .chat-inline-editor-textarea{color:transparent;caret-color:var(--ink)}.chat-inline-editor-textarea:focus{outline:2px solid var(--accent);outline-offset:1px}.chat-inline-editor-notice{margin:8px 2px 0;color:var(--ink-soft);font-size:12.5px;line-height:1.4}.chat-inline-editor-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:10px}.chat-inline-editor-actions button{min-height:34px;padding:6px 14px;border:1px solid var(--hairline-strong);border-radius:999px;color:var(--ink);background:var(--bg-elevated);font-size:13px;font-weight:600}.chat-inline-editor-actions button:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.chat-inline-editor-actions .chat-inline-editor-send{color:#fff;border-color:var(--accent);background:var(--accent)}.chat-inline-editor-actions button:disabled{cursor:not-allowed;opacity:.5}.chat-msg-blocks{display:flex;flex-direction:column;gap:14px}.chat-waiting{min-height:20px;display:flex;align-items:center;font-size:13px;font-weight:600}.chat-thinking{color:transparent;background:linear-gradient(100deg,var(--ink-faint) 30%,var(--accent-text) 50%,var(--ink-faint) 70%);background-size:220% 100%;background-clip:text;-webkit-background-clip:text;animation:chat-thinking-glow 1.8s ease-in-out infinite}@keyframes chat-thinking-glow{0%{background-position:100% 0}to{background-position:-100% 0}}@media (prefers-reduced-motion: reduce){.chat-thinking{color:var(--accent-text);background:none;animation:none}}.chat-reason-live{border:1px solid var(--hairline);border-left:2px solid var(--accent);background:var(--bg-elevated);border-radius:10px;padding:14px 16px}.chat-reason-live-head{display:flex;align-items:center;gap:9px;font-size:12.5px;font-weight:600;color:var(--accent-text)}.chat-reason-live-body{margin-top:9px;font-family:var(--serif);font-size:14.5px;line-height:1.6;color:var(--ink-soft)}.chat-reason-done{border:1px solid var(--hairline);border-radius:10px;background:var(--bg-elevated);overflow:hidden}.chat-reason-done-head{display:flex;align-items:center;gap:9px;width:100%;padding:11px 15px;font-size:13px;color:var(--ink-soft);font-weight:500;text-align:left}.chat-reason-done-head svg:first-child{color:var(--positive-text);flex:none}.chat-reason-done-head .chat-chev{margin-left:auto}.chat-reason-done-head:hover{color:var(--ink)}.chat-reason-done-body{padding:2px 16px 16px 39px;font-family:var(--serif);font-size:14px;line-height:1.65;color:var(--ink-soft)}.chat-answer.chat-reason-markdown{padding-top:0;padding-right:0;padding-bottom:0;font-size:inherit;line-height:inherit;color:inherit;white-space:normal}.chat-answer.chat-reason-live-body{padding-left:23px}.chat-answer.chat-reason-done-body{padding:2px 16px 16px 39px}.chat-tool{border:1px solid var(--hairline);border-radius:10px;background:var(--bg-elevated);overflow:hidden}.chat-tool-running{border-color:color-mix(in oklch,var(--accent) 35%,var(--hairline))}.chat-tool-failed{border-color:color-mix(in oklch,#b42318 55%,var(--hairline))}.chat-tool-failed .chat-tool-status{color:#b42318;font-weight:600}.chat-tool-head{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;padding:11px 15px;text-align:left}.chat-tool-head:disabled{cursor:default}.chat-tool-head-left{display:flex;align-items:center;gap:9px;min-width:0}.chat-tool-head-left>svg{color:var(--accent-text);flex:none}.chat-tool-name{font-family:var(--mono);font-size:12px;font-weight:600;color:var(--ink);background:var(--bg-subtle);border:1px solid var(--hairline);border-radius:5px;padding:2px 7px;flex:none}.chat-tool-query{font-family:var(--serif);font-style:italic;font-size:13.5px;color:var(--ink-soft);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.chat-tool-head-right{display:flex;align-items:center;gap:10px;flex:none}.chat-tool-status{font-size:11.5px;color:var(--ink-soft);font-variant-numeric:tabular-nums}.chat-tool-body{padding:4px 16px 16px;border-top:1px solid var(--hairline)}.chat-tool-args{margin:12px 0 4px}.chat-tool-label{display:block;font-family:var(--mono);font-size:10px;letter-spacing:.1em;text-transform:uppercase;color:var(--ink-faint);margin-bottom:6px}.chat-tool-args pre{margin:0;background:var(--bg-subtle);border:1px solid var(--hairline);border-radius:8px;padding:10px 12px;font-family:var(--mono);font-size:11.5px;line-height:1.5;color:var(--ink-soft);overflow-x:auto}.chat-tool-results-label{margin-top:16px}.chat-tool-output-head{display:flex;align-items:center;justify-content:space-between;margin-top:14px}.chat-tool-output-head .chat-tool-label{margin-bottom:0}.chat-tool-copy{color:var(--accent-text);font-family:var(--mono);font-size:11px}.chat-tool-output{max-height:320px;margin:7px 0 0;overflow:auto;white-space:pre;-moz-tab-size:4;-o-tab-size:4;tab-size:4;border:1px solid var(--hairline);border-radius:8px;background:var(--bg-subtle);padding:11px 12px;color:var(--ink);font-family:var(--mono);font-size:11.5px;line-height:1.5}.chat-tool-truncated{margin-top:7px;color:var(--ink-faint);font-size:11px}.chat-mcp-app{border:1px solid var(--chat-border, #d8d8de);border-radius:12px;overflow:hidden;background:var(--chat-surface, #fff)}.chat-mcp-app>header{display:flex;justify-content:flex-end;padding:8px 10px 0}.chat-mcp-app button{border:0;border-radius:6px;background:#eef1f5;padding:5px 8px;cursor:pointer}.chat-mcp-app iframe{display:block;width:100%;border:0;background:#fff;aspect-ratio:4 / 3}.chat-mcp-loading,.chat-mcp-error{min-height:180px;aspect-ratio:4 / 3;display:grid;place-items:center;padding:18px;color:#52606d;text-align:center}.chat-mcp-error{gap:12px}.chat-mcp-app-fullscreen{position:fixed;top:16px;right:16px;bottom:16px;left:16px;z-index:1000}.chat-mcp-app-fullscreen iframe{height:calc(100vh - 72px)!important;aspect-ratio:auto}.chat-tool-results{list-style:none;margin:0;padding:0}.chat-hit{padding:11px 0;border-top:1px solid var(--hairline)}.chat-hit:first-child{border-top:0}.chat-hit-top{display:flex;align-items:baseline;gap:12px}.chat-hit-title{font-family:var(--serif);font-size:14.5px;font-weight:600;color:var(--accent-text);flex:1;line-height:1.3}.chat-hit-title:hover{text-decoration:underline}.chat-hit-meta{font-size:12px;color:var(--ink-faint);margin-top:2px}.chat-hit-truncated{color:var(--ink-faint);font-style:italic}.chat-hit-snippet{font-family:var(--serif);font-size:13.5px;line-height:1.5;color:var(--ink-soft);margin-top:5px;text-wrap:pretty}.chat-answer{font-family:var(--serif);font-size:16.5px;line-height:1.65;color:var(--ink);text-wrap:pretty;padding:2px}.chat-answer>:first-child{margin-top:0}.chat-answer>:last-child{margin-bottom:0}.chat-answer p{margin:0 0 .9em}.chat-answer h1,.chat-answer h2,.chat-answer h3,.chat-answer h4{font-family:var(--sans);font-weight:600;line-height:1.3;margin:1.35em 0 .5em}.chat-answer h1{font-size:1.45em}.chat-answer h2{font-size:1.25em}.chat-answer h3{font-size:1.08em}.chat-answer h4{font-size:1em}.chat-answer ul,.chat-answer ol{margin:0 0 .9em;padding-left:1.5em}.chat-answer ul{list-style-type:disc}.chat-answer ol{list-style-type:decimal}.chat-answer ul ul{list-style-type:circle}.chat-answer ul ul ul{list-style-type:square}.chat-answer li{margin:.2em 0}.chat-answer li>p{margin:0}.chat-answer blockquote{margin:0 0 .9em;padding-left:1em;border-left:3px solid var(--hairline-strong);color:var(--ink-soft)}.chat-answer code{font-family:var(--mono);font-size:.84em;background:var(--bg-subtle);border:1px solid var(--hairline);border-radius:4px;padding:.1em .3em}.chat-answer pre{margin:0 0 1em;padding:12px 14px;overflow-x:auto;background:var(--bg-subtle);border:1px solid var(--hairline);border-radius:8px;line-height:1.5}.chat-answer pre code{background:none;border:0;padding:0}.chat-answer table{display:block;width:-moz-max-content;width:max-content;max-width:100%;overflow-x:auto;border-collapse:collapse;margin:0 0 1em;font-family:var(--sans);font-size:.88em}.chat-answer th,.chat-answer td{border:1px solid var(--hairline);padding:6px 10px;text-align:left}.chat-answer th{background:var(--bg-subtle);font-weight:600}.chat-answer hr{border:0;border-top:1px solid var(--hairline);margin:1.25em 0}.chat-answer input[type=checkbox]{margin-right:.4em}.chat-answer strong{font-weight:600}.chat-error{display:flex;flex-wrap:wrap;align-items:flex-start;justify-content:space-between;gap:12px;border:1px solid var(--negative-border);background:var(--negative-bg);color:var(--negative-text);border-radius:10px;padding:12px 16px;font-size:13.5px;overflow-wrap:anywhere}.chat-error>span:first-child{flex:1 1 280px;min-width:0}.chat-finish-note{font-family:var(--serif);font-style:italic;font-size:13px;color:var(--ink-faint)}.chat-feedback{display:flex;align-items:center;gap:4px;min-height:30px;margin-top:8px;color:var(--ink-faint);font-size:12px}.chat-feedback-label{margin-right:2px}.chat-feedback-action{width:28px;height:28px;display:inline-flex;align-items:center;justify-content:center;border:1px solid transparent;border-radius:999px;color:var(--ink-soft);background:transparent}.chat-feedback-action:hover:not(:disabled),.chat-feedback-action-selected{color:var(--accent-text);background:var(--accent-soft);border-color:color-mix(in oklch,var(--accent) 35%,var(--hairline))}.chat-feedback-action:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.chat-feedback-action:disabled{cursor:wait}.chat-feedback-action svg{width:14px;height:14px}.chat-feedback-error{color:var(--negative-text);margin-left:4px}.chat-feedback-panel{width:min(460px,100%);margin-top:8px;padding:16px;border:1px solid var(--hairline);border-radius:12px;background:var(--bg-elevated);box-shadow:0 10px 30px #0000001a}.chat-feedback-panel-title{color:var(--ink);font-size:15px;font-weight:600}.chat-feedback-panel-label{display:block;margin-top:4px;color:var(--ink-soft);font-size:13px}.chat-feedback-comment{display:block;width:100%;min-height:92px;margin-top:12px;padding:10px 12px;resize:vertical;border:1px solid var(--hairline-strong);border-radius:8px;color:var(--ink);background:var(--bg);font:14px/1.45 var(--sans)}.chat-feedback-comment:focus{border-color:var(--accent);outline:2px solid color-mix(in oklch,var(--accent) 25%,transparent);outline-offset:1px}.chat-feedback-panel-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:12px}.chat-feedback-panel-actions button{min-width:72px;padding:8px 14px;border-radius:8px;font:600 13px var(--sans)}.chat-feedback-skip{border:1px solid transparent;color:var(--ink-soft);background:transparent}.chat-feedback-submit{border:1px solid var(--ink);color:var(--bg);background:var(--ink)}.chat-feedback-panel-actions button:disabled{cursor:wait;opacity:.65}.chat-error a,.chat-error button{flex:none;max-width:100%;color:var(--accent-text);font-weight:600;text-decoration:none}.chat-error button{border:0;padding:0;background:transparent;cursor:pointer;font:inherit;text-align:left;white-space:normal}.chat-error button:disabled{cursor:wait;opacity:.65}.chat-error-actions{display:flex;flex:0 1 auto;min-width:0;max-width:100%;flex-wrap:wrap;justify-content:flex-start;gap:8px 16px}.chat-error a:hover,.chat-error button:hover:not(:disabled){text-decoration:underline}@media (max-width: 900px){.chat-user-message-wrap{max-width:90%}.chat-inline-editor{width:90%;min-width:0}.chat-conversation-inner{padding:22px 16px 32px}}@media (max-width: 560px){.shared-chat-content .chat-user-message-wrap{max-width:88%}}@media (hover: none),(pointer: coarse){.chat-user-actions{opacity:1;transform:none}}.chat-compaction-status{flex-direction:column;align-items:flex-start}.chat-compaction-explanation{margin-top:4px;color:var(--ink-faint);font-weight:400}.chat-caret{display:inline-block;width:7px;height:1.05em;background:var(--accent);margin-left:1px;vertical-align:text-bottom;animation:chat-blink 1s steps(1) infinite}@keyframes chat-blink{50%{opacity:0}}.chat-chev{transition:transform .18s;color:var(--ink-faint)}.chat-chev-open{transform:rotate(180deg)}.chat-spinner{width:14px;height:14px;border:2px solid color-mix(in oklch,var(--accent) 25%,transparent);border-top-color:var(--accent);border-radius:50%;display:inline-block;animation:chat-spin .7s linear infinite;flex:none}.chat-spinner-light{border-color:#fff6;border-top-color:#fff}@keyframes chat-spin{to{transform:rotate(360deg)}}.shared-chat-page{min-height:0;display:flex;flex-direction:column;overflow:hidden;background:var(--bg)}.shared-chat-heading{flex:none;border-bottom:1px solid var(--hairline);display:flex;align-items:center;gap:10px}.shared-chat-heading h1{max-width:calc(50vw + 640px);margin:0 auto;padding:13px 32px;color:var(--ink);font-family:var(--serif);font-size:20px;font-weight:600;line-height:1.1}.shared-chat-content{width:min(876px,100%);margin:0 auto;padding:34px 28px 64px}.shared-chat-transcript{padding:0 0 26px}.shared-chat-attribution{display:flex;flex-wrap:wrap;justify-content:center;gap:5px 12px;color:var(--ink-faint);font-size:12px;line-height:1.5}.shared-chat-attribution a{color:inherit;font-weight:600;text-decoration:none}.shared-chat-attribution a:hover{color:var(--accent-text);text-decoration:underline}.shared-chat-fresh{margin-top:26px;padding-top:28px;border-top:1px solid var(--hairline)}.shared-chat-fresh h2{margin:0 0 6px;font-family:var(--serif);font-size:21px;font-weight:600}.shared-chat-fresh>p{margin:0 0 16px;color:var(--ink-soft);font-family:var(--serif)}.shared-chat-access-note{margin:-6px 0 16px;padding:10px 12px;border:1px solid color-mix(in oklch,var(--accent) 24%,var(--hairline));border-radius:9px;color:var(--ink-soft);background:color-mix(in oklch,var(--accent) 5%,var(--bg-elevated));font-size:13px;line-height:1.45}.shared-chat-access-note a{color:var(--accent-text);font-weight:600}.shared-chat-state{min-height:55vh;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;padding:48px 24px;text-align:center;color:var(--ink-soft)}.shared-chat-state h1{margin:0;color:var(--ink);font-family:var(--serif);font-size:27px}.shared-chat-state p{margin:0}.shared-chat-state button{margin-top:8px;padding:7px 13px;border:1px solid var(--hairline-strong);border-radius:7px;background:var(--bg-elevated);color:var(--ink)}@media (max-width: 900px){.shared-chat-heading h1{padding-inline:16px}}@media (max-width: 640px){.shared-chat-heading h1{padding-inline:14px}}@media (max-width: 560px){.shared-chat-content{padding:26px 16px 48px}} diff --git a/assets/index-uFGyKu5N.js b/assets/index-CoRCN2p0.js similarity index 99% rename from assets/index-uFGyKu5N.js rename to assets/index-CoRCN2p0.js index 4252cadcd7300477a5c2f575a7e91e43c6fd01b9..6bb49ee795a4413901a564b26dd433b7146ca39a 100644 --- a/assets/index-uFGyKu5N.js +++ b/assets/index-CoRCN2p0.js @@ -1,4 +1,4 @@ -import{av as We,_ as Ot,j as Ze}from"./index-D6jcIRWs.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{aq as We,_ as Ot,j as Ze}from"./index-YwiKC6Po.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;++Fi.map(i=>d[i]); +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/AuthorizePaperEditView-BxV6NPKV.js","assets/useQuery-DPH6Mb2w.js","assets/useMutation-f6iDkf3w.js","assets/button-B90pJJiy.js","assets/paperEdits-B8a9u4Tx.js","assets/FollowingView-BYs2N-nq.js","assets/FeedView-CFzlAcol.js","assets/sparkles-C3L7JDLC.js","assets/dialog-foxx0Wu6.js","assets/catalog-B15Yh5dN.js","assets/research-5UpiU-ea.js","assets/transform-CNg3rvXk.js","assets/researchTopic-CAL_T-Y-.js","assets/plus-Cfz0QbT1.js","assets/arrow-right-CSx7rJG4.js","assets/PaperFeed-kaLm5US2.js","assets/PaperCard-FG-bEpJk.js","assets/AuthorAvatar-CoTET6B3.js","assets/AuthorAvatar-o5W6pl_W.css","assets/SotaBadges-DiQuEzfo.js","assets/colors-BkWRhvFI.js","assets/Icon-DXQ4sjQk.js","assets/LatexTitle-DI6voLfI.js","assets/paperQueryKeys-C5FMa4Oj.js","assets/curation-CkzNFTMJ.js","assets/safeExternalHref-CkBrsh84.js","assets/popover-D7ygxg37.js","assets/skeleton-CXR1qouH.js","assets/useIntersectionObserver-Dt36kyjs.js","assets/McpShowcase-Fj71TTNl.js","assets/AgentLogos-DhD8p5ds.js","assets/chatSessions-CdNQ1toA.js","assets/chat-DHGOonJg.js","assets/usePapers-C1deOZKl.js","assets/useInfiniteQuery-BEbL80ez.js","assets/alert-Cx5luC5D.js","assets/ChatView-DsnEMREv.js","assets/ArtifactWorkspace-BxDA6yNF.js","assets/hover-card-BY9tUGxy.js","assets/CatalogEntityPreviewLink-Cv_oezOz.js","assets/github-BZMCt7Ub.js","assets/file-text-Cijxx2XD.js","assets/PaperPreviewLink-CKfmgBjs.js","assets/index-CoRCN2p0.js","assets/index-BM_xSDJM.js","assets/katex-DkKDou_j.js","assets/copy-YHg6twss.js","assets/thumbs-up-D9G2aLNB.js","assets/arrow-left-B08fyfNi.js","assets/external-link-4bBJT0yO.js","assets/search-wcEXdf1i.js","assets/chevron-up-BXtxbTfV.js","assets/ArtifactWorkspace-Lr_OJaUk.css","assets/katex-wklAmtGL.css","assets/share-2-m8aPY8Vq.js","assets/openrouter-BT3NQ0bL.js","assets/queryOptions-C9woPjwX.js","assets/SharedChatView-C8jGkNjy.js","assets/PapersListView-zhvzkmK9.js","assets/useDebounce-BFugPTG4.js","assets/apiErrors-DBfE_SVR.js","assets/frameworks-DDA0P4Tf.js","assets/PaperDetailView-uLa9aL0s.js","assets/ExternalSourceEvalBadge-CimjRPVg.js","assets/ExternalSourceEvalBadge-CWUQ52cV.css","assets/paperReader-BIpQD5HO.js","assets/latexPlainText-DI8YEXVe.js","assets/input-DEeEc0bH.js","assets/searchable-select-Bqfyxu17.js","assets/loader-circle-B0KtDERb.js","assets/submissions-BJgYjF7O.js","assets/queryInvalidation-Dgyv9_oM.js","assets/evaluationQueryInvalidation-CcSZ8CmA.js","assets/SignInToEditDialog-DpqyyHCb.js","assets/textarea-BPIMGf5w.js","assets/database-2w-JFZSG.js","assets/index-BaDZKp6X.js","assets/badge-CFf6CiSg.js","assets/globe-DmMnSXeF.js","assets/codex-C9BvAdr-.js","assets/savedPapersAuth-k5u0Ozsk.js","assets/organizationNames-BVKzYEBp.js","assets/PaperDetailView-CUWCgV3F.css","assets/PaperReaderView-D2y857wl.js","assets/MarkdownText-C-8yLDus.js","assets/TagsIndexView-DJJJY-D1.js","assets/slug-BpH-Nkvz.js","assets/triangle-alert-BWObrJc7.js","assets/trending-up-Sm0tkX5g.js","assets/moon-DfjUzC9G.js","assets/trophy-B60aAfG3.js","assets/activity-95309hog.js","assets/AreaSection-CfCNkiTd.js","assets/TaxonomySuggestionTile-4WqZSJGN.js","assets/useHashScrollOnReady-BKkkyVVX.js","assets/areas-Dvi8w2dp.js","assets/TagBrowseView-BzhdvNbn.js","assets/ResearchFollowButton-BFXC8E3t.js","assets/BenchmarkTrendSparkline-BBLKxMdW.js","assets/NotFound-D8hwuoEl.js","assets/MethodsIndexView-CS3VxsBJ.js","assets/FrameworksIndexView-CqtIM7jE.js","assets/TrendsView-CW281bBi.js","assets/ConferencesIndexView-DUaazjEx.js","assets/deadlines-BH32v7D1.js","assets/AiDeadlinesView-BWqSvLms.js","assets/switch-Crqp0RkL.js","assets/ConferenceDetailView-CX4S54m2.js","assets/conferenceListings-BnmhBx-_.js","assets/ConferenceTaskView-DvbWh5_R.js","assets/OrganizationsIndexView-CbWS3zNq.js","assets/OrganizationsIndexView-CJnrfIkP.css","assets/OrganizationDetailView-C69MBUc4.js","assets/OrganizationContributionGraph-BZyCpVX4.js","assets/AuthorDetailView-ETu8URv_.js","assets/MethodDetailView-CU5sbo2E.js","assets/BenchmarkDetailView-CzOCvqTF.js","assets/BenchmarkDetailView-CXxK75GR.css","assets/SavedPapersView-CWUM_gRn.js","assets/SettingsView-BurbOJNZ.js","assets/PrivacyView-B0DBzRMW.js","assets/ApiDocsView-Bb326kAF.js","assets/ApiDocsView-DPuMdYvY.css","assets/McpView-CMm_vOrt.js","assets/McpView-EGeqkP46.css","assets/SubmitView-CCWdg0_v.js","assets/CronDashboard-DMMdAs4p.js","assets/CronDashboard-DcLcBHdd.js","assets/CronDashboard-DwChfW9h.css","assets/refresh-cw-4AZFTXDl.js","assets/circle-check-BPcHPjjB.js","assets/AutonomousOperations-epH5w9S2.js","assets/SubmissionsDashboard-6OF_L4gN.js","assets/SubmissionsDashboard-BTmvDoLW.css","assets/UserProfileView-jtJ9PNjL.js","assets/RateLimitsView-JyYAwVUh.js","assets/AstraForRoboticsView-CqbM4y2W.js","assets/AstraForRoboticsView-C_lTF_XB.css","assets/SearchOverlay-CzggQ3fk.js","assets/StagingAccessRequestView-DFeZrs_b.js"])))=>i.map(i=>d[i]); var rk=Object.defineProperty;var zg=t=>{throw TypeError(t)};var ik=(t,e,n)=>e in t?rk(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var wr=(t,e,n)=>ik(t,typeof e!="symbol"?e+"":e,n),hd=(t,e,n)=>e.has(t)||zg("Cannot "+n);var A=(t,e,n)=>(hd(t,e,"read from private field"),n?n.call(t):e.get(t)),le=(t,e,n)=>e.has(t)?zg("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),ee=(t,e,n,r)=>(hd(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n),nt=(t,e,n)=>(hd(t,e,"access private method"),n);var al=(t,e,n,r)=>({set _(i){ee(t,e,i,n)},get _(){return A(t,e,r)}});function sk(t,e){for(var n=0;nr[i]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.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 c3=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function k0(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var P0={exports:{}},Cc={},R0={exports:{}},ae={};/** * @license React * react.production.min.js @@ -67,7 +67,7 @@ Error generating stack: `+s.message+` * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function hc(){return hc=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&(n[i]=t[i]);return n}function RM(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function TM(t,e){return t.button===0&&(!e||e==="_self")&&!RM(t)}function yp(t){return t===void 0&&(t=""),new URLSearchParams(typeof t=="string"||Array.isArray(t)||t instanceof URLSearchParams?t:Object.keys(t).reduce((e,n)=>{let r=t[n];return e.concat(Array.isArray(r)?r.map(i=>[n,i]):[[n,r]])},[]))}function IM(t,e){let n=yp(t);return e&&e.forEach((r,i)=>{n.has(i)||e.getAll(i).forEach(s=>{n.append(i,s)})}),n}const OM=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],MM=["aria-current","caseSensitive","className","end","style","to","viewTransition","children"],AM="6";try{window.__reactRouterVersion=AM}catch{}const NM=g.createContext({isTransitioning:!1}),$M="startTransition",pc=kc[$M];function FM(t){let{basename:e,children:n,future:r,window:i}=t,s=g.useRef();s.current==null&&(s.current=LO({window:i,v5Compat:!0}));let o=s.current,[a,l]=g.useState({action:o.action,location:o.location}),{v7_startTransition:u}=r||{},c=g.useCallback(d=>{u&&pc?pc(()=>l(d)):l(d)},[l,u]);return g.useLayoutEffect(()=>o.listen(c),[o,c]),g.useEffect(()=>qE(r),[r]),g.createElement(HE,{basename:e,children:n,location:a.location,navigationType:a.action,navigator:o,future:r})}function LM(t){let{basename:e,children:n,future:r,window:i}=t,s=g.useRef();s.current==null&&(s.current=jO({window:i,v5Compat:!0}));let o=s.current,[a,l]=g.useState({action:o.action,location:o.location}),{v7_startTransition:u}=r||{},c=g.useCallback(d=>{u&&pc?pc(()=>l(d)):l(d)},[l,u]);return g.useLayoutEffect(()=>o.listen(c),[o,c]),g.useEffect(()=>qE(r),[r]),g.createElement(HE,{basename:e,children:n,location:a.location,navigationType:a.action,navigator:o,future:r})}const jM=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",DM=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,mn=g.forwardRef(function(e,n){let{onClick:r,relative:i,reloadDocument:s,replace:o,state:a,target:l,to:u,preventScrollReset:c,viewTransition:d}=e,f=WE(e,OM),{basename:_}=g.useContext(vr),m,p=!1;if(typeof u=="string"&&DM.test(u)&&(m=u,jM))try{let x=new URL(window.location.href),b=u.startsWith("//")?new URL(x.protocol+u):new URL(u),E=uo(b.pathname,_);b.origin===x.origin&&E!=null?u=E+b.search+b.hash:p=!0}catch{}let y=uM(u,{relative:i}),h=UM(u,{replace:o,state:a,target:l,preventScrollReset:c,relative:i,viewTransition:d});function v(x){r&&r(x),x.defaultPrevented||h(x)}return g.createElement("a",hc({},f,{href:m||y,onClick:p||s?r:v,ref:n,target:l}))}),is=g.forwardRef(function(e,n){let{"aria-current":r="page",caseSensitive:i=!1,className:s="",end:o=!1,style:a,to:l,viewTransition:u,children:c}=e,d=WE(e,MM),f=Qc(l,{relative:d.relative}),_=an(),m=g.useContext(LE),{navigator:p,basename:y}=g.useContext(vr),h=m!=null&&VM(f)&&u===!0,v=p.encodeLocation?p.encodeLocation(f).pathname:f.pathname,x=_.pathname,b=m&&m.navigation&&m.navigation.location?m.navigation.location.pathname:null;i||(x=x.toLowerCase(),b=b?b.toLowerCase():null,v=v.toLowerCase()),b&&y&&(b=uo(b,y)||b);const E=v!=="/"&&v.endsWith("/")?v.length-1:v.length;let S=x===v||!o&&x.startsWith(v)&&x.charAt(E)==="/",k=b!=null&&(b===v||!o&&b.startsWith(v)&&b.charAt(v.length)==="/"),C={isActive:S,isPending:k,isTransitioning:h},R=S?r:void 0,P;typeof s=="function"?P=s(C):P=[s,S?"active":null,k?"pending":null,h?"transitioning":null].filter(Boolean).join(" ");let $=typeof a=="function"?a(C):a;return g.createElement(mn,hc({},d,{"aria-current":R,className:P,ref:n,style:$,to:l,viewTransition:u}),typeof c=="function"?c(C):c)});var _p;(function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmit="useSubmit",t.UseSubmitFetcher="useSubmitFetcher",t.UseFetcher="useFetcher",t.useViewTransitionState="useViewTransitionState"})(_p||(_p={}));var x_;(function(t){t.UseFetcher="useFetcher",t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"})(x_||(x_={}));function zM(t){let e=g.useContext(Gc);return e||je(!1),e}function UM(t,e){let{target:n,replace:r,state:i,preventScrollReset:s,relative:o,viewTransition:a}=e===void 0?{}:e,l=tg(),u=an(),c=Qc(t,{relative:o});return g.useCallback(d=>{if(TM(d,n)){d.preventDefault();let f=r!==void 0?r:ja(u)===ja(c);l(t,{replace:f,state:i,preventScrollReset:s,relative:o,viewTransition:a})}},[u,l,c,r,i,n,t,s,o,a])}function f3(t){let e=g.useRef(yp(t)),n=g.useRef(!1),r=an(),i=g.useMemo(()=>IM(r.search,n.current?null:e.current),[r.search]),s=tg(),o=g.useCallback((a,l)=>{const u=yp(typeof a=="function"?a(i):a);n.current=!0,s("?"+u,l)},[s,i]);return[i,o]}function VM(t,e){e===void 0&&(e={});let n=g.useContext(NM);n==null&&je(!1);let{basename:r}=zM(_p.useViewTransitionState),i=Qc(t,{relative:e.relative});if(!n.isTransitioning)return!1;let s=uo(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=uo(n.nextLocation.pathname,r)||n.nextLocation.pathname;return gp(i.pathname,o)!=null||gp(i.pathname,s)!=null}var Yc=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Ci,Ar,zs,m0,BM=(m0=class extends Yc{constructor(){super();le(this,Ci);le(this,Ar);le(this,zs);ee(this,zs,e=>{if(typeof window<"u"&&window.addEventListener){const n=()=>e();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){A(this,Ar)||this.setEventListener(A(this,zs))}onUnsubscribe(){var e;this.hasListeners()||((e=A(this,Ar))==null||e.call(this),ee(this,Ar,void 0))}setEventListener(e){var n;ee(this,zs,e),(n=A(this,Ar))==null||n.call(this),ee(this,Ar,e(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(e){A(this,Ci)!==e&&(ee(this,Ci,e),this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(n=>{n(e)})}isFocused(){var e;return typeof A(this,Ci)=="boolean"?A(this,Ci):((e=globalThis.document)==null?void 0:e.visibilityState)!=="hidden"}},Ci=new WeakMap,Ar=new WeakMap,zs=new WeakMap,m0),GE=new BM,qM={setTimeout:(t,e)=>setTimeout(t,e),clearTimeout:t=>clearTimeout(t),setInterval:(t,e)=>setInterval(t,e),clearInterval:t=>clearInterval(t)},Nr,jp,y0,HM=(y0=class{constructor(){le(this,Nr,qM);le(this,jp,!1)}setTimeoutProvider(t){ee(this,Nr,t)}setTimeout(t,e){return A(this,Nr).setTimeout(t,e)}clearTimeout(t){A(this,Nr).clearTimeout(t)}setInterval(t,e){return A(this,Nr).setInterval(t,e)}clearInterval(t){A(this,Nr).clearInterval(t)}},Nr=new WeakMap,jp=new WeakMap,y0),wp=new HM;function WM(t){setTimeout(t,0)}var GM=typeof window>"u"||"Deno"in globalThis;function hn(){}function KM(t,e){return typeof t=="function"?t(e):t}function QM(t){return typeof t=="number"&&t>=0&&t!==1/0}function YM(t,e){return Math.max(t+(e||0)-Date.now(),0)}function xp(t,e){return typeof t=="function"?t(e):t}function XM(t,e){return typeof t=="function"?t(e):t}function b_(t,e){const{type:n="all",exact:r,fetchStatus:i,predicate:s,queryKey:o,stale:a}=t;if(o){if(r){if(e.queryHash!==ng(o,e.options))return!1}else if(!Ua(e.queryKey,o))return!1}if(n!=="all"){const l=e.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof a=="boolean"&&e.isStale()!==a||i&&i!==e.state.fetchStatus||s&&!s(e))}function E_(t,e){const{exact:n,status:r,predicate:i,mutationKey:s}=t;if(s){if(!e.options.mutationKey)return!1;if(n){if(za(e.options.mutationKey)!==za(s))return!1}else if(!Ua(e.options.mutationKey,s))return!1}return!(r&&e.state.status!==r||i&&!i(e))}function ng(t,e){return((e==null?void 0:e.queryKeyHashFn)||za)(t)}function za(t){return JSON.stringify(t,(e,n)=>bp(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function Ua(t,e){return t===e?!0:typeof t!=typeof e?!1:t&&e&&typeof t=="object"&&typeof e=="object"?Object.keys(e).every(n=>Ua(t[n],e[n])):!1}var JM=Object.prototype.hasOwnProperty;function KE(t,e,n=0){if(t===e)return t;if(n>500)return e;const r=S_(t)&&S_(e);if(!r&&!(bp(t)&&bp(e)))return e;const s=(r?t:Object.keys(t)).length,o=r?e:Object.keys(e),a=o.length,l=r?new Array(a):{};let u=0;for(let c=0;c{wp.setTimeout(e,t)})}function eA(t,e,n){return typeof n.structuralSharing=="function"?n.structuralSharing(t,e):n.structuralSharing!==!1?KE(t,e):e}function p3(t){return t}function tA(t,e,n=0){const r=[...t,e];return n&&r.length>n?r.slice(1):r}function nA(t,e,n=0){const r=[e,...t];return n&&r.length>n?r.slice(0,-1):r}var rg=Symbol();function QE(t,e){return!t.queryFn&&(e!=null&&e.initialPromise)?()=>e.initialPromise:!t.queryFn||t.queryFn===rg?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}function v3(t,e){return typeof t=="function"?t(...e):!!t}function rA(t,e,n){let r=!1,i;return Object.defineProperty(t,"signal",{enumerable:!0,get:()=>(i??(i=e()),r||(r=!0,i.aborted?n():i.addEventListener("abort",n,{once:!0})),i)}),t}var YE=(()=>{let t=()=>GM;return{isServer(){return t()},setIsServer(e){t=e}}})();function iA(){let t,e;const n=new Promise((i,s)=>{t=i,e=s});n.status="pending",n.catch(()=>{});function r(i){Object.assign(n,i),delete n.resolve,delete n.reject}return n.resolve=i=>{r({status:"fulfilled",value:i}),t(i)},n.reject=i=>{r({status:"rejected",reason:i}),e(i)},n}var sA=WM;function oA(){let t=[],e=0,n=a=>{a()},r=a=>{a()},i=sA;const s=a=>{e?t.push(a):i(()=>{n(a)})},o=()=>{const a=t;t=[],a.length&&i(()=>{r(()=>{a.forEach(l=>{n(l)})})})};return{batch:a=>{let l;e++;try{l=a()}finally{e--,e||o()}return l},batchCalls:a=>(...l)=>{s(()=>{a(...l)})},schedule:s,setNotifyFunction:a=>{n=a},setBatchNotifyFunction:a=>{r=a},setScheduler:a=>{i=a}}}var wt=oA(),Us,$r,Vs,_0,aA=(_0=class extends Yc{constructor(){super();le(this,Us,!0);le(this,$r);le(this,Vs);ee(this,Vs,e=>{if(typeof window<"u"&&window.addEventListener){const n=()=>e(!0),r=()=>e(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){A(this,$r)||this.setEventListener(A(this,Vs))}onUnsubscribe(){var e;this.hasListeners()||((e=A(this,$r))==null||e.call(this),ee(this,$r,void 0))}setEventListener(e){var n;ee(this,Vs,e),(n=A(this,$r))==null||n.call(this),ee(this,$r,e(this.setOnline.bind(this)))}setOnline(e){A(this,Us)!==e&&(ee(this,Us,e),this.listeners.forEach(r=>{r(e)}))}isOnline(){return A(this,Us)}},Us=new WeakMap,$r=new WeakMap,Vs=new WeakMap,_0),vc=new aA;function lA(t){return Math.min(1e3*2**t,3e4)}function XE(t){return(t??"online")==="online"?vc.isOnline():!0}var Ep=class extends Error{constructor(t){super("CancelledError"),this.revert=t==null?void 0:t.revert,this.silent=t==null?void 0:t.silent}};function JE(t){let e=!1,n=0,r;const i=iA(),s=()=>i.status!=="pending",o=p=>{var y;if(!s()){const h=new Ep(p);f(h),(y=t.onCancel)==null||y.call(t,h)}},a=()=>{e=!0},l=()=>{e=!1},u=()=>GE.isFocused()&&(t.networkMode==="always"||vc.isOnline())&&t.canRun(),c=()=>XE(t.networkMode)&&t.canRun(),d=p=>{s()||(r==null||r(),i.resolve(p))},f=p=>{s()||(r==null||r(),i.reject(p))},_=()=>new Promise(p=>{var y;r=h=>{(s()||u())&&p(h)},(y=t.onPause)==null||y.call(t)}).then(()=>{var p;r=void 0,s()||(p=t.onContinue)==null||p.call(t)}),m=()=>{if(s())return;let p;const y=n===0?t.initialPromise:void 0;try{p=y??t.fn()}catch(h){p=Promise.reject(h)}Promise.resolve(p).then(d).catch(h=>{var S;if(s())return;const v=t.retry??(YE.isServer()?0:3),x=t.retryDelay??lA,b=typeof x=="function"?x(n,h):x,E=v===!0||typeof v=="number"&&nu()?void 0:_()).then(()=>{e?f(h):m()})})};return{promise:i,status:()=>i.status,cancel:o,continue:()=>(r==null||r(),i),cancelRetry:a,continueRetry:l,canStart:c,start:()=>(c()?m():_().then(m),i)}}var ki,w0,ZE=(w0=class{constructor(){le(this,ki)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),QM(this.gcTime)&&ee(this,ki,wp.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(YE.isServer()?1/0:5*60*1e3))}clearGcTimeout(){A(this,ki)!==void 0&&(wp.clearTimeout(A(this,ki)),ee(this,ki,void 0))}},ki=new WeakMap,w0);function uA(t){return{onFetch:(e,n)=>{var c,d,f,_,m;const r=e.options,i=(f=(d=(c=e.fetchOptions)==null?void 0:c.meta)==null?void 0:d.fetchMore)==null?void 0:f.direction,s=((_=e.state.data)==null?void 0:_.pages)||[],o=((m=e.state.data)==null?void 0:m.pageParams)||[];let a={pages:[],pageParams:[]},l=0;const u=async()=>{let p=!1;const y=x=>{rA(x,()=>e.signal,()=>p=!0)},h=QE(e.options,e.fetchOptions),v=async(x,b,E)=>{if(p)return Promise.reject(e.signal.reason);if(b==null&&x.pages.length)return Promise.resolve(x);const k=(()=>{const $={client:e.client,queryKey:e.queryKey,pageParam:b,direction:E?"backward":"forward",meta:e.options.meta};return y($),$})(),C=await h(k),{maxPages:R}=e.options,P=E?nA:tA;return{pages:P(x.pages,C,R),pageParams:P(x.pageParams,b,R)}};if(i&&s.length){const x=i==="backward",b=x?eS:Sp,E={pages:s,pageParams:o},S=b(r,E);a=await v(E,S,x)}else{const x=t??s.length;do{const b=l===0?o[0]??r.initialPageParam:Sp(r,a);if(l>0&&b==null)break;a=await v(a,b),l++}while(l{var p,y;return(y=(p=e.options).persister)==null?void 0:y.call(p,u,{client:e.client,queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},n)}:e.fetchFn=u}}}function Sp(t,{pages:e,pageParams:n}){const r=e.length-1;return e.length>0?t.getNextPageParam(e[r],e,n[r],n):void 0}function eS(t,{pages:e,pageParams:n}){var r;return e.length>0?(r=t.getPreviousPageParam)==null?void 0:r.call(t,e[0],e,n[0],n):void 0}function g3(t,e){return e?Sp(t,e)!=null:!1}function m3(t,e){return!e||!t.getPreviousPageParam?!1:eS(t,e)!=null}var Bs,Pi,qs,Yt,Ri,Je,Wa,Ti,jt,tS,Kn,x0,cA=(x0=class extends ZE{constructor(e){super();le(this,jt);le(this,Bs);le(this,Pi);le(this,qs);le(this,Yt);le(this,Ri);le(this,Je);le(this,Wa);le(this,Ti);ee(this,Ti,!1),ee(this,Wa,e.defaultOptions),this.setOptions(e.options),this.observers=[],ee(this,Ri,e.client),ee(this,Yt,A(this,Ri).getQueryCache()),this.queryKey=e.queryKey,this.queryHash=e.queryHash,ee(this,Pi,P_(this.options)),this.state=e.state??A(this,Pi),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return A(this,Bs)}get promise(){var e;return(e=A(this,Je))==null?void 0:e.promise}setOptions(e){if(this.options={...A(this,Wa),...e},e!=null&&e._type&&ee(this,Bs,e._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=P_(this.options);n.data!==void 0&&(this.setState(k_(n.data,n.dataUpdatedAt)),ee(this,Pi,n))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&A(this,Yt).remove(this)}setData(e,n){const r=eA(this.state.data,e,this.options);return nt(this,jt,Kn).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(e){nt(this,jt,Kn).call(this,{type:"setState",state:e})}cancel(e){var r,i;const n=(r=A(this,Je))==null?void 0:r.promise;return(i=A(this,Je))==null||i.cancel(e),n?n.then(hn).catch(hn):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return A(this,Pi)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>XM(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===rg||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>xp(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!YM(this.state.dataUpdatedAt,e)}onFocus(){var n;const e=this.observers.find(r=>r.shouldFetchOnWindowFocus());e==null||e.refetch({cancelRefetch:!1}),(n=A(this,Je))==null||n.continue()}onOnline(){var n;const e=this.observers.find(r=>r.shouldFetchOnReconnect());e==null||e.refetch({cancelRefetch:!1}),(n=A(this,Je))==null||n.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),A(this,Yt).notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(n=>n!==e),this.observers.length||(A(this,Je)&&(A(this,Ti)||nt(this,jt,tS).call(this)?A(this,Je).cancel({revert:!0}):A(this,Je).cancelRetry()),this.scheduleGc()),A(this,Yt).notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||nt(this,jt,Kn).call(this,{type:"invalidate"})}async fetch(e,n){var u,c,d,f,_,m,p,y,h,v,x;if(this.state.fetchStatus!=="idle"&&((u=A(this,Je))==null?void 0:u.status())!=="rejected"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(A(this,Je))return A(this,Je).continueRetry(),A(this,Je).promise}if(e&&this.setOptions(e),!this.options.queryFn){const b=this.observers.find(E=>E.options.queryFn);b&&this.setOptions(b.options)}const r=new AbortController,i=b=>{Object.defineProperty(b,"signal",{enumerable:!0,get:()=>(ee(this,Ti,!0),r.signal)})},s=()=>{const b=QE(this.options,n),S=(()=>{const k={client:A(this,Ri),queryKey:this.queryKey,meta:this.meta};return i(k),k})();return ee(this,Ti,!1),this.options.persister?this.options.persister(b,S,this):b(S)},a=(()=>{const b={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:A(this,Ri),state:this.state,fetchFn:s};return i(b),b})(),l=A(this,Bs)==="infinite"?uA(this.options.pages):this.options.behavior;l==null||l.onFetch(a,this),ee(this,qs,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((c=a.fetchOptions)==null?void 0:c.meta))&&nt(this,jt,Kn).call(this,{type:"fetch",meta:(d=a.fetchOptions)==null?void 0:d.meta}),ee(this,Je,JE({initialPromise:n==null?void 0:n.initialPromise,fn:a.fetchFn,onCancel:b=>{b instanceof Ep&&b.revert&&this.setState({...A(this,qs),fetchStatus:"idle"}),r.abort()},onFail:(b,E)=>{nt(this,jt,Kn).call(this,{type:"failed",failureCount:b,error:E})},onPause:()=>{nt(this,jt,Kn).call(this,{type:"pause"})},onContinue:()=>{nt(this,jt,Kn).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0}));try{const b=await A(this,Je).start();if(b===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(b),(_=(f=A(this,Yt).config).onSuccess)==null||_.call(f,b,this),(p=(m=A(this,Yt).config).onSettled)==null||p.call(m,b,this.state.error,this),b}catch(b){if(b instanceof Ep){if(b.silent)return A(this,Je).promise;if(b.revert){if(this.state.data===void 0)throw b;return this.state.data}}throw nt(this,jt,Kn).call(this,{type:"error",error:b}),(h=(y=A(this,Yt).config).onError)==null||h.call(y,b,this),(x=(v=A(this,Yt).config).onSettled)==null||x.call(v,this.state.data,b,this),b}finally{this.scheduleGc()}}},Bs=new WeakMap,Pi=new WeakMap,qs=new WeakMap,Yt=new WeakMap,Ri=new WeakMap,Je=new WeakMap,Wa=new WeakMap,Ti=new WeakMap,jt=new WeakSet,tS=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},Kn=function(e){const n=r=>{switch(e.type){case"failed":return{...r,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...dA(r.data,this.options),fetchMeta:e.meta??null};case"success":const i={...r,...k_(e.data,e.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return ee(this,qs,e.manual?i:void 0),i;case"error":const s=e.error;return{...r,error:s,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...e.state}}};this.state=n(this.state),wt.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),A(this,Yt).notify({query:this,type:"updated",action:e})})},x0);function dA(t,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:XE(e.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}function k_(t,e){return{data:t,dataUpdatedAt:e??Date.now(),error:null,isInvalidated:!1,status:"success"}}function P_(t){const e=typeof t.initialData=="function"?t.initialData():t.initialData,n=e!==void 0,r=n?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var Ga,On,dt,Ii,Mn,Pr,b0,fA=(b0=class extends ZE{constructor(e){super();le(this,Mn);le(this,Ga);le(this,On);le(this,dt);le(this,Ii);ee(this,Ga,e.client),this.mutationId=e.mutationId,ee(this,dt,e.mutationCache),ee(this,On,[]),this.state=e.state||hA(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){A(this,On).includes(e)||(A(this,On).push(e),this.clearGcTimeout(),A(this,dt).notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){ee(this,On,A(this,On).filter(n=>n!==e)),this.scheduleGc(),A(this,dt).notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){A(this,On).length||(this.state.status==="pending"?this.scheduleGc():A(this,dt).remove(this))}continue(){var e;return((e=A(this,Ii))==null?void 0:e.continue())??this.execute(this.state.variables)}async execute(e){var o,a,l,u,c,d,f,_,m,p,y,h,v,x,b,E,S,k;const n=()=>{nt(this,Mn,Pr).call(this,{type:"continue"})},r={client:A(this,Ga),meta:this.options.meta,mutationKey:this.options.mutationKey};ee(this,Ii,JE({fn:()=>this.options.mutationFn?this.options.mutationFn(e,r):Promise.reject(new Error("No mutationFn found")),onFail:(C,R)=>{nt(this,Mn,Pr).call(this,{type:"failed",failureCount:C,error:R})},onPause:()=>{nt(this,Mn,Pr).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>A(this,dt).canRun(this)}));const i=this.state.status==="pending",s=!A(this,Ii).canStart();try{if(i)n();else{nt(this,Mn,Pr).call(this,{type:"pending",variables:e,isPaused:s}),A(this,dt).config.onMutate&&await A(this,dt).config.onMutate(e,this,r);const R=await((a=(o=this.options).onMutate)==null?void 0:a.call(o,e,r));R!==this.state.context&&nt(this,Mn,Pr).call(this,{type:"pending",context:R,variables:e,isPaused:s})}const C=await A(this,Ii).start();return await((u=(l=A(this,dt).config).onSuccess)==null?void 0:u.call(l,C,e,this.state.context,this,r)),await((d=(c=this.options).onSuccess)==null?void 0:d.call(c,C,e,this.state.context,r)),await((_=(f=A(this,dt).config).onSettled)==null?void 0:_.call(f,C,null,this.state.variables,this.state.context,this,r)),await((p=(m=this.options).onSettled)==null?void 0:p.call(m,C,null,e,this.state.context,r)),nt(this,Mn,Pr).call(this,{type:"success",data:C}),C}catch(C){try{await((h=(y=A(this,dt).config).onError)==null?void 0:h.call(y,C,e,this.state.context,this,r))}catch(R){Promise.reject(R)}try{await((x=(v=this.options).onError)==null?void 0:x.call(v,C,e,this.state.context,r))}catch(R){Promise.reject(R)}try{await((E=(b=A(this,dt).config).onSettled)==null?void 0:E.call(b,void 0,C,this.state.variables,this.state.context,this,r))}catch(R){Promise.reject(R)}try{await((k=(S=this.options).onSettled)==null?void 0:k.call(S,void 0,C,e,this.state.context,r))}catch(R){Promise.reject(R)}throw nt(this,Mn,Pr).call(this,{type:"error",error:C}),C}finally{A(this,dt).runNext(this)}}},Ga=new WeakMap,On=new WeakMap,dt=new WeakMap,Ii=new WeakMap,Mn=new WeakSet,Pr=function(e){const n=r=>{switch(e.type){case"failed":return{...r,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...r,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:e.error,failureCount:r.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=n(this.state),wt.batch(()=>{A(this,On).forEach(r=>{r.onMutationUpdate(e)}),A(this,dt).notify({mutation:this,type:"updated",action:e})})},b0);function hA(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var er,pn,Ka,E0,pA=(E0=class extends Yc{constructor(e={}){super();le(this,er);le(this,pn);le(this,Ka);this.config=e,ee(this,er,new Set),ee(this,pn,new Map),ee(this,Ka,0)}build(e,n,r){const i=new fA({client:e,mutationCache:this,mutationId:++al(this,Ka)._,options:e.defaultMutationOptions(n),state:r});return this.add(i),i}add(e){A(this,er).add(e);const n=Ll(e);if(typeof n=="string"){const r=A(this,pn).get(n);r?r.push(e):A(this,pn).set(n,[e])}this.notify({type:"added",mutation:e})}remove(e){if(A(this,er).delete(e)){const n=Ll(e);if(typeof n=="string"){const r=A(this,pn).get(n);if(r)if(r.length>1){const i=r.indexOf(e);i!==-1&&r.splice(i,1)}else r[0]===e&&A(this,pn).delete(n)}}this.notify({type:"removed",mutation:e})}canRun(e){const n=Ll(e);if(typeof n=="string"){const r=A(this,pn).get(n),i=r==null?void 0:r.find(s=>s.state.status==="pending");return!i||i===e}else return!0}runNext(e){var r;const n=Ll(e);if(typeof n=="string"){const i=(r=A(this,pn).get(n))==null?void 0:r.find(s=>s!==e&&s.state.isPaused);return(i==null?void 0:i.continue())??Promise.resolve()}else return Promise.resolve()}clear(){wt.batch(()=>{A(this,er).forEach(e=>{this.notify({type:"removed",mutation:e})}),A(this,er).clear(),A(this,pn).clear()})}getAll(){return Array.from(A(this,er))}find(e){const n={exact:!0,...e};return this.getAll().find(r=>E_(n,r))}findAll(e={}){return this.getAll().filter(n=>E_(e,n))}notify(e){wt.batch(()=>{this.listeners.forEach(n=>{n(e)})})}resumePausedMutations(){const e=this.getAll().filter(n=>n.state.isPaused);return wt.batch(()=>Promise.all(e.map(n=>n.continue().catch(hn))))}},er=new WeakMap,pn=new WeakMap,Ka=new WeakMap,E0);function Ll(t){var e;return(e=t.options.scope)==null?void 0:e.id}var An,S0,vA=(S0=class extends Yc{constructor(e={}){super();le(this,An);this.config=e,ee(this,An,new Map)}build(e,n,r){const i=n.queryKey,s=n.queryHash??ng(i,n);let o=this.get(s);return o||(o=new cA({client:e,queryKey:i,queryHash:s,options:e.defaultQueryOptions(n),state:r,defaultOptions:e.getQueryDefaults(i)}),this.add(o)),o}add(e){A(this,An).has(e.queryHash)||(A(this,An).set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const n=A(this,An).get(e.queryHash);n&&(e.destroy(),n===e&&A(this,An).delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){wt.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return A(this,An).get(e)}getAll(){return[...A(this,An).values()]}find(e){const n={exact:!0,...e};return this.getAll().find(r=>b_(n,r))}findAll(e={}){const n=this.getAll();return Object.keys(e).length>0?n.filter(r=>b_(e,r)):n}notify(e){wt.batch(()=>{this.listeners.forEach(n=>{n(e)})})}onFocus(){wt.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){wt.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},An=new WeakMap,S0),Ue,Fr,Lr,Hs,Ws,jr,Gs,Ks,C0,gA=(C0=class{constructor(t={}){le(this,Ue);le(this,Fr);le(this,Lr);le(this,Hs);le(this,Ws);le(this,jr);le(this,Gs);le(this,Ks);ee(this,Ue,t.queryCache||new vA),ee(this,Fr,t.mutationCache||new pA),ee(this,Lr,t.defaultOptions||{}),ee(this,Hs,new Map),ee(this,Ws,new Map),ee(this,jr,0)}mount(){al(this,jr)._++,A(this,jr)===1&&(ee(this,Gs,GE.subscribe(async t=>{t&&(await this.resumePausedMutations(),A(this,Ue).onFocus())})),ee(this,Ks,vc.subscribe(async t=>{t&&(await this.resumePausedMutations(),A(this,Ue).onOnline())})))}unmount(){var t,e;al(this,jr)._--,A(this,jr)===0&&((t=A(this,Gs))==null||t.call(this),ee(this,Gs,void 0),(e=A(this,Ks))==null||e.call(this),ee(this,Ks,void 0))}isFetching(t){return A(this,Ue).findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return A(this,Fr).findAll({...t,status:"pending"}).length}getQueryData(t){var n;const e=this.defaultQueryOptions({queryKey:t});return(n=A(this,Ue).get(e.queryHash))==null?void 0:n.state.data}ensureQueryData(t){const e=this.defaultQueryOptions(t),n=A(this,Ue).build(this,e),r=n.state.data;return r===void 0?this.fetchQuery(t):(t.revalidateIfStale&&n.isStaleByTime(xp(e.staleTime,n))&&this.prefetchQuery(e),Promise.resolve(r))}getQueriesData(t){return A(this,Ue).findAll(t).map(({queryKey:e,state:n})=>{const r=n.data;return[e,r]})}setQueryData(t,e,n){const r=this.defaultQueryOptions({queryKey:t}),i=A(this,Ue).get(r.queryHash),s=i==null?void 0:i.state.data,o=KM(e,s);if(o!==void 0)return A(this,Ue).build(this,r).setData(o,{...n,manual:!0})}setQueriesData(t,e,n){return wt.batch(()=>A(this,Ue).findAll(t).map(({queryKey:r})=>[r,this.setQueryData(r,e,n)]))}getQueryState(t){var n;const e=this.defaultQueryOptions({queryKey:t});return(n=A(this,Ue).get(e.queryHash))==null?void 0:n.state}removeQueries(t){const e=A(this,Ue);wt.batch(()=>{e.findAll(t).forEach(n=>{e.remove(n)})})}resetQueries(t,e){const n=A(this,Ue);return wt.batch(()=>(n.findAll(t).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...t},e)))}cancelQueries(t,e={}){const n={revert:!0,...e},r=wt.batch(()=>A(this,Ue).findAll(t).map(i=>i.cancel(n)));return Promise.all(r).then(hn).catch(hn)}invalidateQueries(t,e={}){return wt.batch(()=>(A(this,Ue).findAll(t).forEach(n=>{n.invalidate()}),(t==null?void 0:t.refetchType)==="none"?Promise.resolve():this.refetchQueries({...t,type:(t==null?void 0:t.refetchType)??(t==null?void 0:t.type)??"active"},e)))}refetchQueries(t,e={}){const n={...e,cancelRefetch:e.cancelRefetch??!0},r=wt.batch(()=>A(this,Ue).findAll(t).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let s=i.fetch(void 0,n);return n.throwOnError||(s=s.catch(hn)),i.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(r).then(hn)}fetchQuery(t){const e=this.defaultQueryOptions(t);e.retry===void 0&&(e.retry=!1);const n=A(this,Ue).build(this,e);return n.isStaleByTime(xp(e.staleTime,n))?n.fetch(e):Promise.resolve(n.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(hn).catch(hn)}fetchInfiniteQuery(t){return t._type="infinite",this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(hn).catch(hn)}ensureInfiniteQueryData(t){return t._type="infinite",this.ensureQueryData(t)}resumePausedMutations(){return vc.isOnline()?A(this,Fr).resumePausedMutations():Promise.resolve()}getQueryCache(){return A(this,Ue)}getMutationCache(){return A(this,Fr)}getDefaultOptions(){return A(this,Lr)}setDefaultOptions(t){ee(this,Lr,t)}setQueryDefaults(t,e){A(this,Hs).set(za(t),{queryKey:t,defaultOptions:e})}getQueryDefaults(t){const e=[...A(this,Hs).values()],n={};return e.forEach(r=>{Ua(t,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(t,e){A(this,Ws).set(za(t),{mutationKey:t,defaultOptions:e})}getMutationDefaults(t){const e=[...A(this,Ws).values()],n={};return e.forEach(r=>{Ua(t,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(t){if(t._defaulted)return t;const e={...A(this,Lr).queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return e.queryHash||(e.queryHash=ng(e.queryKey,e)),e.refetchOnReconnect===void 0&&(e.refetchOnReconnect=e.networkMode!=="always"),e.throwOnError===void 0&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode="offlineFirst"),e.queryFn===rg&&(e.enabled=!1),e}defaultMutationOptions(t){return t!=null&&t._defaulted?t:{...A(this,Lr).mutations,...(t==null?void 0:t.mutationKey)&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){A(this,Ue).clear(),A(this,Fr).clear()}},Ue=new WeakMap,Fr=new WeakMap,Lr=new WeakMap,Hs=new WeakMap,Ws=new WeakMap,jr=new WeakMap,Gs=new WeakMap,Ks=new WeakMap,C0),nS=g.createContext(void 0),mA=t=>{const e=g.useContext(nS);if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},yA=({client:t,children:e})=>(g.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),w.jsx(nS.Provider,{value:t,children:e}));function J(t,e,{checkForDefaultPrevented:n=!0}={}){return function(i){if(t==null||t(i),n===!1||!i.defaultPrevented)return e==null?void 0:e(i)}}function R_(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function oi(...t){return e=>{let n=!1;const r=t.map(i=>{const s=R_(i,e);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let i=0;i{const{children:o,...a}=s,l=g.useMemo(()=>a,Object.values(a));return w.jsx(n.Provider,{value:l,children:o})};r.displayName=t+"Provider";function i(s){const o=g.useContext(n);if(o)return o;if(e!==void 0)return e;throw new Error(`\`${s}\` must be used within \`${t}\``)}return[r,i]}function Wi(t,e=[]){let n=[];function r(s,o){const a=g.createContext(o),l=n.length;n=[...n,o];const u=d=>{var h;const{scope:f,children:_,...m}=d,p=((h=f==null?void 0:f[t])==null?void 0:h[l])||a,y=g.useMemo(()=>m,Object.values(m));return w.jsx(p.Provider,{value:y,children:_})};u.displayName=s+"Provider";function c(d,f){var p;const _=((p=f==null?void 0:f[t])==null?void 0:p[l])||a,m=g.useContext(_);if(m)return m;if(o!==void 0)return o;throw new Error(`\`${d}\` must be used within \`${s}\``)}return[u,c]}const i=()=>{const s=n.map(o=>g.createContext(o));return function(a){const l=(a==null?void 0:a[t])||s;return g.useMemo(()=>({[`__scope${t}`]:{...a,[t]:l}}),[a,l])}};return i.scopeName=t,[r,wA(i,...e)]}function wA(...t){const e=t[0];if(t.length===1)return e;const n=()=>{const r=t.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const o=r.reduce((a,{useScope:l,scopeName:u})=>{const d=l(s)[`__scope${u}`];return{...a,...d}},{});return g.useMemo(()=>({[`__scope${e.scopeName}`]:o}),[o])}};return n.scopeName=e.scopeName,n}var on=globalThis!=null&&globalThis.document?g.useLayoutEffect:()=>{},xA=kc[" useId ".trim().toString()]||(()=>{}),bA=0;function Fs(t){const[e,n]=g.useState(xA());return on(()=>{n(r=>r??String(bA++))},[t]),e?`radix-${e}`:""}var EA=kc[" useInsertionEffect ".trim().toString()]||on;function Xc({prop:t,defaultProp:e,onChange:n=()=>{},caller:r}){const[i,s,o]=SA({defaultProp:e,onChange:n}),a=t!==void 0,l=a?t:i;{const c=g.useRef(t!==void 0);g.useEffect(()=>{const d=c.current;d!==a&&console.warn(`${r} is changing from ${d?"controlled":"uncontrolled"} to ${a?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),c.current=a},[a,r])}const u=g.useCallback(c=>{var d;if(a){const f=CA(c)?c(t):c;f!==t&&((d=o.current)==null||d.call(o,f))}else s(c)},[a,t,s,o]);return[l,u]}function SA({defaultProp:t,onChange:e}){const[n,r]=g.useState(t),i=g.useRef(n),s=g.useRef(e);return EA(()=>{s.current=e},[e]),g.useEffect(()=>{var o;i.current!==n&&((o=s.current)==null||o.call(s,n),i.current=n)},[n,i]),[n,r,s]}function CA(t){return typeof t=="function"}function kA(t){const e=PA(t),n=g.forwardRef((r,i)=>{const{children:s,...o}=r,a=g.Children.toArray(s),l=a.find(TA);if(l){const u=l.props.children,c=a.map(d=>d===l?g.Children.count(u)>1?g.Children.only(null):g.isValidElement(u)?u.props.children:null:d);return w.jsx(e,{...o,ref:i,children:g.isValidElement(u)?g.cloneElement(u,void 0,c):null})}return w.jsx(e,{...o,ref:i,children:s})});return n.displayName=`${t}.Slot`,n}function PA(t){const e=g.forwardRef((n,r)=>{const{children:i,...s}=n;if(g.isValidElement(i)){const o=OA(i),a=IA(s,i.props);return i.type!==g.Fragment&&(a.ref=r?oi(r,o):o),g.cloneElement(i,a)}return g.Children.count(i)>1?g.Children.only(null):null});return e.displayName=`${t}.SlotClone`,e}var RA=Symbol("radix.slottable");function TA(t){return g.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===RA}function IA(t,e){const n={...e};for(const r in e){const i=t[r],s=e[r];/^on[A-Z]/.test(r)?i&&s?n[r]=(...a)=>{const l=s(...a);return i(...a),l}:i&&(n[r]=i):r==="style"?n[r]={...i,...s}:r==="className"&&(n[r]=[i,s].filter(Boolean).join(" "))}return{...t,...n}}function OA(t){var r,i;let e=(r=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:r.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(i=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:i.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}var MA=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Ee=MA.reduce((t,e)=>{const n=kA(`Primitive.${e}`),r=g.forwardRef((i,s)=>{const{asChild:o,...a}=i,l=o?n:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),w.jsx(l,{...a,ref:s})});return r.displayName=`Primitive.${e}`,{...t,[e]:r}},{});function ig(t,e){t&&el.flushSync(()=>t.dispatchEvent(e))}function Ft(t){const e=g.useRef(t);return g.useEffect(()=>{e.current=t}),g.useMemo(()=>(...n)=>{var r;return(r=e.current)==null?void 0:r.call(e,...n)},[])}function AA(t,e=globalThis==null?void 0:globalThis.document){const n=Ft(t);g.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return e.addEventListener("keydown",r,{capture:!0}),()=>e.removeEventListener("keydown",r,{capture:!0})},[n,e])}var NA="DismissableLayer",Cp="dismissableLayer.update",$A="dismissableLayer.pointerDownOutside",FA="dismissableLayer.focusOutside",T_,rS=g.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Jc=g.forwardRef((t,e)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:s,onInteractOutside:o,onDismiss:a,...l}=t,u=g.useContext(rS),[c,d]=g.useState(null),f=(c==null?void 0:c.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,_]=g.useState({}),m=Xe(e,k=>d(k)),p=Array.from(u.layers),[y]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),h=p.indexOf(y),v=c?p.indexOf(c):-1,x=u.layersWithOutsidePointerEventsDisabled.size>0,b=v>=h,E=jA(k=>{const C=k.target,R=[...u.branches].some(P=>P.contains(C));!b||R||(i==null||i(k),o==null||o(k),k.defaultPrevented||a==null||a())},f),S=DA(k=>{const C=k.target;[...u.branches].some(P=>P.contains(C))||(s==null||s(k),o==null||o(k),k.defaultPrevented||a==null||a())},f);return AA(k=>{v===u.layers.size-1&&(r==null||r(k),!k.defaultPrevented&&a&&(k.preventDefault(),a()))},f),g.useEffect(()=>{if(c)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(T_=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(c)),u.layers.add(c),I_(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=T_)}},[c,f,n,u]),g.useEffect(()=>()=>{c&&(u.layers.delete(c),u.layersWithOutsidePointerEventsDisabled.delete(c),I_())},[c,u]),g.useEffect(()=>{const k=()=>_({});return document.addEventListener(Cp,k),()=>document.removeEventListener(Cp,k)},[]),w.jsx(Ee.div,{...l,ref:m,style:{pointerEvents:x?b?"auto":"none":void 0,...t.style},onFocusCapture:J(t.onFocusCapture,S.onFocusCapture),onBlurCapture:J(t.onBlurCapture,S.onBlurCapture),onPointerDownCapture:J(t.onPointerDownCapture,E.onPointerDownCapture)})});Jc.displayName=NA;var LA="DismissableLayerBranch",iS=g.forwardRef((t,e)=>{const n=g.useContext(rS),r=g.useRef(null),i=Xe(e,r);return g.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),w.jsx(Ee.div,{...t,ref:i})});iS.displayName=LA;function jA(t,e=globalThis==null?void 0:globalThis.document){const n=Ft(t),r=g.useRef(!1),i=g.useRef(()=>{});return g.useEffect(()=>{const s=a=>{if(a.target&&!r.current){let l=function(){sS($A,n,u,{discrete:!0})};const u={originalEvent:a};a.pointerType==="touch"?(e.removeEventListener("click",i.current),i.current=l,e.addEventListener("click",i.current,{once:!0})):l()}else e.removeEventListener("click",i.current);r.current=!1},o=window.setTimeout(()=>{e.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(o),e.removeEventListener("pointerdown",s),e.removeEventListener("click",i.current)}},[e,n]),{onPointerDownCapture:()=>r.current=!0}}function DA(t,e=globalThis==null?void 0:globalThis.document){const n=Ft(t),r=g.useRef(!1);return g.useEffect(()=>{const i=s=>{s.target&&!r.current&&sS(FA,n,{originalEvent:s},{discrete:!1})};return e.addEventListener("focusin",i),()=>e.removeEventListener("focusin",i)},[e,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function I_(){const t=new CustomEvent(Cp);document.dispatchEvent(t)}function sS(t,e,n,{discrete:r}){const i=n.originalEvent.target,s=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:n});e&&i.addEventListener(t,e,{once:!0}),r?ig(i,s):i.dispatchEvent(s)}var zA=Jc,UA=iS,xf="focusScope.autoFocusOnMount",bf="focusScope.autoFocusOnUnmount",O_={bubbles:!1,cancelable:!0},VA="FocusScope",sg=g.forwardRef((t,e)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:s,...o}=t,[a,l]=g.useState(null),u=Ft(i),c=Ft(s),d=g.useRef(null),f=Xe(e,p=>l(p)),_=g.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;g.useEffect(()=>{if(r){let p=function(x){if(_.paused||!a)return;const b=x.target;a.contains(b)?d.current=b:Rr(d.current,{select:!0})},y=function(x){if(_.paused||!a)return;const b=x.relatedTarget;b!==null&&(a.contains(b)||Rr(d.current,{select:!0}))},h=function(x){if(document.activeElement===document.body)for(const E of x)E.removedNodes.length>0&&Rr(a)};document.addEventListener("focusin",p),document.addEventListener("focusout",y);const v=new MutationObserver(h);return a&&v.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",p),document.removeEventListener("focusout",y),v.disconnect()}}},[r,a,_.paused]),g.useEffect(()=>{if(a){A_.add(_);const p=document.activeElement;if(!a.contains(p)){const h=new CustomEvent(xf,O_);a.addEventListener(xf,u),a.dispatchEvent(h),h.defaultPrevented||(BA(KA(oS(a)),{select:!0}),document.activeElement===p&&Rr(a))}return()=>{a.removeEventListener(xf,u),setTimeout(()=>{const h=new CustomEvent(bf,O_);a.addEventListener(bf,c),a.dispatchEvent(h),h.defaultPrevented||Rr(p??document.body,{select:!0}),a.removeEventListener(bf,c),A_.remove(_)},0)}}},[a,u,c,_]);const m=g.useCallback(p=>{if(!n&&!r||_.paused)return;const y=p.key==="Tab"&&!p.altKey&&!p.ctrlKey&&!p.metaKey,h=document.activeElement;if(y&&h){const v=p.currentTarget,[x,b]=qA(v);x&&b?!p.shiftKey&&h===b?(p.preventDefault(),n&&Rr(x,{select:!0})):p.shiftKey&&h===x&&(p.preventDefault(),n&&Rr(b,{select:!0})):h===v&&p.preventDefault()}},[n,r,_.paused]);return w.jsx(Ee.div,{tabIndex:-1,...o,ref:f,onKeyDown:m})});sg.displayName=VA;function BA(t,{select:e=!1}={}){const n=document.activeElement;for(const r of t)if(Rr(r,{select:e}),document.activeElement!==n)return}function qA(t){const e=oS(t),n=M_(e,t),r=M_(e.reverse(),t);return[n,r]}function oS(t){const e=[],n=document.createTreeWalker(t,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();)e.push(n.currentNode);return e}function M_(t,e){for(const n of t)if(!HA(n,{upTo:e}))return n}function HA(t,{upTo:e}){if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(e!==void 0&&t===e)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}function WA(t){return t instanceof HTMLInputElement&&"select"in t}function Rr(t,{select:e=!1}={}){if(t&&t.focus){const n=document.activeElement;t.focus({preventScroll:!0}),t!==n&&WA(t)&&e&&t.select()}}var A_=GA();function GA(){let t=[];return{add(e){const n=t[0];e!==n&&(n==null||n.pause()),t=N_(t,e),t.unshift(e)},remove(e){var n;t=N_(t,e),(n=t[0])==null||n.resume()}}}function N_(t,e){const n=[...t],r=n.indexOf(e);return r!==-1&&n.splice(r,1),n}function KA(t){return t.filter(e=>e.tagName!=="A")}var QA="Portal",Zc=g.forwardRef((t,e)=>{var a;const{container:n,...r}=t,[i,s]=g.useState(!1);on(()=>s(!0),[]);const o=n||i&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return o?OR.createPortal(w.jsx(Ee.div,{...r,ref:e}),o):null});Zc.displayName=QA;function YA(t,e){return g.useReducer((n,r)=>e[n][r]??n,t)}var gr=t=>{const{present:e,children:n}=t,r=XA(e),i=typeof n=="function"?n({present:r.isPresent}):g.Children.only(n),s=Xe(r.ref,JA(i));return typeof n=="function"||r.isPresent?g.cloneElement(i,{ref:s}):null};gr.displayName="Presence";function XA(t){const[e,n]=g.useState(),r=g.useRef(null),i=g.useRef(t),s=g.useRef("none"),o=t?"mounted":"unmounted",[a,l]=YA(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return g.useEffect(()=>{const u=jl(r.current);s.current=a==="mounted"?u:"none"},[a]),on(()=>{const u=r.current,c=i.current;if(c!==t){const f=s.current,_=jl(u);t?l("MOUNT"):_==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(c&&f!==_?"ANIMATION_OUT":"UNMOUNT"),i.current=t}},[t,l]),on(()=>{if(e){let u;const c=e.ownerDocument.defaultView??window,d=_=>{const p=jl(r.current).includes(CSS.escape(_.animationName));if(_.target===e&&p&&(l("ANIMATION_END"),!i.current)){const y=e.style.animationFillMode;e.style.animationFillMode="forwards",u=c.setTimeout(()=>{e.style.animationFillMode==="forwards"&&(e.style.animationFillMode=y)})}},f=_=>{_.target===e&&(s.current=jl(r.current))};return e.addEventListener("animationstart",f),e.addEventListener("animationcancel",d),e.addEventListener("animationend",d),()=>{c.clearTimeout(u),e.removeEventListener("animationstart",f),e.removeEventListener("animationcancel",d),e.removeEventListener("animationend",d)}}else l("ANIMATION_END")},[e,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:g.useCallback(u=>{r.current=u?getComputedStyle(u):null,n(u)},[])}}function jl(t){return(t==null?void 0:t.animationName)||"none"}function JA(t){var r,i;let e=(r=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:r.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(i=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:i.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}var Ef=0;function aS(){g.useEffect(()=>{const t=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",t[0]??$_()),document.body.insertAdjacentElement("beforeend",t[1]??$_()),Ef++,()=>{Ef===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),Ef--}},[])}function $_(){const t=document.createElement("span");return t.setAttribute("data-radix-focus-guard",""),t.tabIndex=0,t.style.outline="none",t.style.opacity="0",t.style.position="fixed",t.style.pointerEvents="none",t}var Fn=function(){return Fn=Object.assign||function(e){for(var n,r=1,i=arguments.length;r"u")return vN;var e=gN(t),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:e[0],top:e[1],right:e[2],gap:Math.max(0,r-n+e[2]-e[0])}},yN=dS(),Ls="data-scroll-locked",_N=function(t,e,n,r){var i=t.left,s=t.top,o=t.right,a=t.gap;return n===void 0&&(n="margin"),` + */function hc(){return hc=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&(n[i]=t[i]);return n}function RM(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function TM(t,e){return t.button===0&&(!e||e==="_self")&&!RM(t)}function yp(t){return t===void 0&&(t=""),new URLSearchParams(typeof t=="string"||Array.isArray(t)||t instanceof URLSearchParams?t:Object.keys(t).reduce((e,n)=>{let r=t[n];return e.concat(Array.isArray(r)?r.map(i=>[n,i]):[[n,r]])},[]))}function IM(t,e){let n=yp(t);return e&&e.forEach((r,i)=>{n.has(i)||e.getAll(i).forEach(s=>{n.append(i,s)})}),n}const OM=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],MM=["aria-current","caseSensitive","className","end","style","to","viewTransition","children"],AM="6";try{window.__reactRouterVersion=AM}catch{}const NM=g.createContext({isTransitioning:!1}),$M="startTransition",pc=kc[$M];function FM(t){let{basename:e,children:n,future:r,window:i}=t,s=g.useRef();s.current==null&&(s.current=LO({window:i,v5Compat:!0}));let o=s.current,[a,l]=g.useState({action:o.action,location:o.location}),{v7_startTransition:u}=r||{},c=g.useCallback(d=>{u&&pc?pc(()=>l(d)):l(d)},[l,u]);return g.useLayoutEffect(()=>o.listen(c),[o,c]),g.useEffect(()=>qE(r),[r]),g.createElement(HE,{basename:e,children:n,location:a.location,navigationType:a.action,navigator:o,future:r})}function LM(t){let{basename:e,children:n,future:r,window:i}=t,s=g.useRef();s.current==null&&(s.current=jO({window:i,v5Compat:!0}));let o=s.current,[a,l]=g.useState({action:o.action,location:o.location}),{v7_startTransition:u}=r||{},c=g.useCallback(d=>{u&&pc?pc(()=>l(d)):l(d)},[l,u]);return g.useLayoutEffect(()=>o.listen(c),[o,c]),g.useEffect(()=>qE(r),[r]),g.createElement(HE,{basename:e,children:n,location:a.location,navigationType:a.action,navigator:o,future:r})}const jM=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",DM=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,mn=g.forwardRef(function(e,n){let{onClick:r,relative:i,reloadDocument:s,replace:o,state:a,target:l,to:u,preventScrollReset:c,viewTransition:d}=e,f=WE(e,OM),{basename:_}=g.useContext(vr),m,p=!1;if(typeof u=="string"&&DM.test(u)&&(m=u,jM))try{let x=new URL(window.location.href),b=u.startsWith("//")?new URL(x.protocol+u):new URL(u),E=uo(b.pathname,_);b.origin===x.origin&&E!=null?u=E+b.search+b.hash:p=!0}catch{}let y=uM(u,{relative:i}),h=UM(u,{replace:o,state:a,target:l,preventScrollReset:c,relative:i,viewTransition:d});function v(x){r&&r(x),x.defaultPrevented||h(x)}return g.createElement("a",hc({},f,{href:m||y,onClick:p||s?r:v,ref:n,target:l}))}),is=g.forwardRef(function(e,n){let{"aria-current":r="page",caseSensitive:i=!1,className:s="",end:o=!1,style:a,to:l,viewTransition:u,children:c}=e,d=WE(e,MM),f=Qc(l,{relative:d.relative}),_=an(),m=g.useContext(LE),{navigator:p,basename:y}=g.useContext(vr),h=m!=null&&VM(f)&&u===!0,v=p.encodeLocation?p.encodeLocation(f).pathname:f.pathname,x=_.pathname,b=m&&m.navigation&&m.navigation.location?m.navigation.location.pathname:null;i||(x=x.toLowerCase(),b=b?b.toLowerCase():null,v=v.toLowerCase()),b&&y&&(b=uo(b,y)||b);const E=v!=="/"&&v.endsWith("/")?v.length-1:v.length;let S=x===v||!o&&x.startsWith(v)&&x.charAt(E)==="/",k=b!=null&&(b===v||!o&&b.startsWith(v)&&b.charAt(v.length)==="/"),C={isActive:S,isPending:k,isTransitioning:h},R=S?r:void 0,P;typeof s=="function"?P=s(C):P=[s,S?"active":null,k?"pending":null,h?"transitioning":null].filter(Boolean).join(" ");let $=typeof a=="function"?a(C):a;return g.createElement(mn,hc({},d,{"aria-current":R,className:P,ref:n,style:$,to:l,viewTransition:u}),typeof c=="function"?c(C):c)});var _p;(function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmit="useSubmit",t.UseSubmitFetcher="useSubmitFetcher",t.UseFetcher="useFetcher",t.useViewTransitionState="useViewTransitionState"})(_p||(_p={}));var x_;(function(t){t.UseFetcher="useFetcher",t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"})(x_||(x_={}));function zM(t){let e=g.useContext(Gc);return e||je(!1),e}function UM(t,e){let{target:n,replace:r,state:i,preventScrollReset:s,relative:o,viewTransition:a}=e===void 0?{}:e,l=tg(),u=an(),c=Qc(t,{relative:o});return g.useCallback(d=>{if(TM(d,n)){d.preventDefault();let f=r!==void 0?r:ja(u)===ja(c);l(t,{replace:f,state:i,preventScrollReset:s,relative:o,viewTransition:a})}},[u,l,c,r,i,n,t,s,o,a])}function f3(t){let e=g.useRef(yp(t)),n=g.useRef(!1),r=an(),i=g.useMemo(()=>IM(r.search,n.current?null:e.current),[r.search]),s=tg(),o=g.useCallback((a,l)=>{const u=yp(typeof a=="function"?a(i):a);n.current=!0,s("?"+u,l)},[s,i]);return[i,o]}function VM(t,e){e===void 0&&(e={});let n=g.useContext(NM);n==null&&je(!1);let{basename:r}=zM(_p.useViewTransitionState),i=Qc(t,{relative:e.relative});if(!n.isTransitioning)return!1;let s=uo(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=uo(n.nextLocation.pathname,r)||n.nextLocation.pathname;return gp(i.pathname,o)!=null||gp(i.pathname,s)!=null}var Yc=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Ci,Ar,zs,m0,BM=(m0=class extends Yc{constructor(){super();le(this,Ci);le(this,Ar);le(this,zs);ee(this,zs,e=>{if(typeof window<"u"&&window.addEventListener){const n=()=>e();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){A(this,Ar)||this.setEventListener(A(this,zs))}onUnsubscribe(){var e;this.hasListeners()||((e=A(this,Ar))==null||e.call(this),ee(this,Ar,void 0))}setEventListener(e){var n;ee(this,zs,e),(n=A(this,Ar))==null||n.call(this),ee(this,Ar,e(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(e){A(this,Ci)!==e&&(ee(this,Ci,e),this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(n=>{n(e)})}isFocused(){var e;return typeof A(this,Ci)=="boolean"?A(this,Ci):((e=globalThis.document)==null?void 0:e.visibilityState)!=="hidden"}},Ci=new WeakMap,Ar=new WeakMap,zs=new WeakMap,m0),GE=new BM,qM={setTimeout:(t,e)=>setTimeout(t,e),clearTimeout:t=>clearTimeout(t),setInterval:(t,e)=>setInterval(t,e),clearInterval:t=>clearInterval(t)},Nr,jp,y0,HM=(y0=class{constructor(){le(this,Nr,qM);le(this,jp,!1)}setTimeoutProvider(t){ee(this,Nr,t)}setTimeout(t,e){return A(this,Nr).setTimeout(t,e)}clearTimeout(t){A(this,Nr).clearTimeout(t)}setInterval(t,e){return A(this,Nr).setInterval(t,e)}clearInterval(t){A(this,Nr).clearInterval(t)}},Nr=new WeakMap,jp=new WeakMap,y0),wp=new HM;function WM(t){setTimeout(t,0)}var GM=typeof window>"u"||"Deno"in globalThis;function hn(){}function KM(t,e){return typeof t=="function"?t(e):t}function QM(t){return typeof t=="number"&&t>=0&&t!==1/0}function YM(t,e){return Math.max(t+(e||0)-Date.now(),0)}function xp(t,e){return typeof t=="function"?t(e):t}function XM(t,e){return typeof t=="function"?t(e):t}function b_(t,e){const{type:n="all",exact:r,fetchStatus:i,predicate:s,queryKey:o,stale:a}=t;if(o){if(r){if(e.queryHash!==ng(o,e.options))return!1}else if(!Ua(e.queryKey,o))return!1}if(n!=="all"){const l=e.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof a=="boolean"&&e.isStale()!==a||i&&i!==e.state.fetchStatus||s&&!s(e))}function E_(t,e){const{exact:n,status:r,predicate:i,mutationKey:s}=t;if(s){if(!e.options.mutationKey)return!1;if(n){if(za(e.options.mutationKey)!==za(s))return!1}else if(!Ua(e.options.mutationKey,s))return!1}return!(r&&e.state.status!==r||i&&!i(e))}function ng(t,e){return((e==null?void 0:e.queryKeyHashFn)||za)(t)}function za(t){return JSON.stringify(t,(e,n)=>bp(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function Ua(t,e){return t===e?!0:typeof t!=typeof e?!1:t&&e&&typeof t=="object"&&typeof e=="object"?Object.keys(e).every(n=>Ua(t[n],e[n])):!1}var JM=Object.prototype.hasOwnProperty;function KE(t,e,n=0){if(t===e)return t;if(n>500)return e;const r=S_(t)&&S_(e);if(!r&&!(bp(t)&&bp(e)))return e;const s=(r?t:Object.keys(t)).length,o=r?e:Object.keys(e),a=o.length,l=r?new Array(a):{};let u=0;for(let c=0;c{wp.setTimeout(e,t)})}function eA(t,e,n){return typeof n.structuralSharing=="function"?n.structuralSharing(t,e):n.structuralSharing!==!1?KE(t,e):e}function tA(t,e,n=0){const r=[...t,e];return n&&r.length>n?r.slice(1):r}function nA(t,e,n=0){const r=[e,...t];return n&&r.length>n?r.slice(0,-1):r}var rg=Symbol();function QE(t,e){return!t.queryFn&&(e!=null&&e.initialPromise)?()=>e.initialPromise:!t.queryFn||t.queryFn===rg?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}function p3(t,e){return typeof t=="function"?t(...e):!!t}function rA(t,e,n){let r=!1,i;return Object.defineProperty(t,"signal",{enumerable:!0,get:()=>(i??(i=e()),r||(r=!0,i.aborted?n():i.addEventListener("abort",n,{once:!0})),i)}),t}var YE=(()=>{let t=()=>GM;return{isServer(){return t()},setIsServer(e){t=e}}})();function iA(){let t,e;const n=new Promise((i,s)=>{t=i,e=s});n.status="pending",n.catch(()=>{});function r(i){Object.assign(n,i),delete n.resolve,delete n.reject}return n.resolve=i=>{r({status:"fulfilled",value:i}),t(i)},n.reject=i=>{r({status:"rejected",reason:i}),e(i)},n}var sA=WM;function oA(){let t=[],e=0,n=a=>{a()},r=a=>{a()},i=sA;const s=a=>{e?t.push(a):i(()=>{n(a)})},o=()=>{const a=t;t=[],a.length&&i(()=>{r(()=>{a.forEach(l=>{n(l)})})})};return{batch:a=>{let l;e++;try{l=a()}finally{e--,e||o()}return l},batchCalls:a=>(...l)=>{s(()=>{a(...l)})},schedule:s,setNotifyFunction:a=>{n=a},setBatchNotifyFunction:a=>{r=a},setScheduler:a=>{i=a}}}var wt=oA(),Us,$r,Vs,_0,aA=(_0=class extends Yc{constructor(){super();le(this,Us,!0);le(this,$r);le(this,Vs);ee(this,Vs,e=>{if(typeof window<"u"&&window.addEventListener){const n=()=>e(!0),r=()=>e(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){A(this,$r)||this.setEventListener(A(this,Vs))}onUnsubscribe(){var e;this.hasListeners()||((e=A(this,$r))==null||e.call(this),ee(this,$r,void 0))}setEventListener(e){var n;ee(this,Vs,e),(n=A(this,$r))==null||n.call(this),ee(this,$r,e(this.setOnline.bind(this)))}setOnline(e){A(this,Us)!==e&&(ee(this,Us,e),this.listeners.forEach(r=>{r(e)}))}isOnline(){return A(this,Us)}},Us=new WeakMap,$r=new WeakMap,Vs=new WeakMap,_0),vc=new aA;function lA(t){return Math.min(1e3*2**t,3e4)}function XE(t){return(t??"online")==="online"?vc.isOnline():!0}var Ep=class extends Error{constructor(t){super("CancelledError"),this.revert=t==null?void 0:t.revert,this.silent=t==null?void 0:t.silent}};function JE(t){let e=!1,n=0,r;const i=iA(),s=()=>i.status!=="pending",o=p=>{var y;if(!s()){const h=new Ep(p);f(h),(y=t.onCancel)==null||y.call(t,h)}},a=()=>{e=!0},l=()=>{e=!1},u=()=>GE.isFocused()&&(t.networkMode==="always"||vc.isOnline())&&t.canRun(),c=()=>XE(t.networkMode)&&t.canRun(),d=p=>{s()||(r==null||r(),i.resolve(p))},f=p=>{s()||(r==null||r(),i.reject(p))},_=()=>new Promise(p=>{var y;r=h=>{(s()||u())&&p(h)},(y=t.onPause)==null||y.call(t)}).then(()=>{var p;r=void 0,s()||(p=t.onContinue)==null||p.call(t)}),m=()=>{if(s())return;let p;const y=n===0?t.initialPromise:void 0;try{p=y??t.fn()}catch(h){p=Promise.reject(h)}Promise.resolve(p).then(d).catch(h=>{var S;if(s())return;const v=t.retry??(YE.isServer()?0:3),x=t.retryDelay??lA,b=typeof x=="function"?x(n,h):x,E=v===!0||typeof v=="number"&&nu()?void 0:_()).then(()=>{e?f(h):m()})})};return{promise:i,status:()=>i.status,cancel:o,continue:()=>(r==null||r(),i),cancelRetry:a,continueRetry:l,canStart:c,start:()=>(c()?m():_().then(m),i)}}var ki,w0,ZE=(w0=class{constructor(){le(this,ki)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),QM(this.gcTime)&&ee(this,ki,wp.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(YE.isServer()?1/0:5*60*1e3))}clearGcTimeout(){A(this,ki)!==void 0&&(wp.clearTimeout(A(this,ki)),ee(this,ki,void 0))}},ki=new WeakMap,w0);function uA(t){return{onFetch:(e,n)=>{var c,d,f,_,m;const r=e.options,i=(f=(d=(c=e.fetchOptions)==null?void 0:c.meta)==null?void 0:d.fetchMore)==null?void 0:f.direction,s=((_=e.state.data)==null?void 0:_.pages)||[],o=((m=e.state.data)==null?void 0:m.pageParams)||[];let a={pages:[],pageParams:[]},l=0;const u=async()=>{let p=!1;const y=x=>{rA(x,()=>e.signal,()=>p=!0)},h=QE(e.options,e.fetchOptions),v=async(x,b,E)=>{if(p)return Promise.reject(e.signal.reason);if(b==null&&x.pages.length)return Promise.resolve(x);const k=(()=>{const $={client:e.client,queryKey:e.queryKey,pageParam:b,direction:E?"backward":"forward",meta:e.options.meta};return y($),$})(),C=await h(k),{maxPages:R}=e.options,P=E?nA:tA;return{pages:P(x.pages,C,R),pageParams:P(x.pageParams,b,R)}};if(i&&s.length){const x=i==="backward",b=x?eS:Sp,E={pages:s,pageParams:o},S=b(r,E);a=await v(E,S,x)}else{const x=t??s.length;do{const b=l===0?o[0]??r.initialPageParam:Sp(r,a);if(l>0&&b==null)break;a=await v(a,b),l++}while(l{var p,y;return(y=(p=e.options).persister)==null?void 0:y.call(p,u,{client:e.client,queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},n)}:e.fetchFn=u}}}function Sp(t,{pages:e,pageParams:n}){const r=e.length-1;return e.length>0?t.getNextPageParam(e[r],e,n[r],n):void 0}function eS(t,{pages:e,pageParams:n}){var r;return e.length>0?(r=t.getPreviousPageParam)==null?void 0:r.call(t,e[0],e,n[0],n):void 0}function v3(t,e){return e?Sp(t,e)!=null:!1}function g3(t,e){return!e||!t.getPreviousPageParam?!1:eS(t,e)!=null}var Bs,Pi,qs,Yt,Ri,Je,Wa,Ti,jt,tS,Kn,x0,cA=(x0=class extends ZE{constructor(e){super();le(this,jt);le(this,Bs);le(this,Pi);le(this,qs);le(this,Yt);le(this,Ri);le(this,Je);le(this,Wa);le(this,Ti);ee(this,Ti,!1),ee(this,Wa,e.defaultOptions),this.setOptions(e.options),this.observers=[],ee(this,Ri,e.client),ee(this,Yt,A(this,Ri).getQueryCache()),this.queryKey=e.queryKey,this.queryHash=e.queryHash,ee(this,Pi,P_(this.options)),this.state=e.state??A(this,Pi),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return A(this,Bs)}get promise(){var e;return(e=A(this,Je))==null?void 0:e.promise}setOptions(e){if(this.options={...A(this,Wa),...e},e!=null&&e._type&&ee(this,Bs,e._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=P_(this.options);n.data!==void 0&&(this.setState(k_(n.data,n.dataUpdatedAt)),ee(this,Pi,n))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&A(this,Yt).remove(this)}setData(e,n){const r=eA(this.state.data,e,this.options);return nt(this,jt,Kn).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(e){nt(this,jt,Kn).call(this,{type:"setState",state:e})}cancel(e){var r,i;const n=(r=A(this,Je))==null?void 0:r.promise;return(i=A(this,Je))==null||i.cancel(e),n?n.then(hn).catch(hn):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return A(this,Pi)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>XM(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===rg||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>xp(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!YM(this.state.dataUpdatedAt,e)}onFocus(){var n;const e=this.observers.find(r=>r.shouldFetchOnWindowFocus());e==null||e.refetch({cancelRefetch:!1}),(n=A(this,Je))==null||n.continue()}onOnline(){var n;const e=this.observers.find(r=>r.shouldFetchOnReconnect());e==null||e.refetch({cancelRefetch:!1}),(n=A(this,Je))==null||n.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),A(this,Yt).notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(n=>n!==e),this.observers.length||(A(this,Je)&&(A(this,Ti)||nt(this,jt,tS).call(this)?A(this,Je).cancel({revert:!0}):A(this,Je).cancelRetry()),this.scheduleGc()),A(this,Yt).notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||nt(this,jt,Kn).call(this,{type:"invalidate"})}async fetch(e,n){var u,c,d,f,_,m,p,y,h,v,x;if(this.state.fetchStatus!=="idle"&&((u=A(this,Je))==null?void 0:u.status())!=="rejected"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(A(this,Je))return A(this,Je).continueRetry(),A(this,Je).promise}if(e&&this.setOptions(e),!this.options.queryFn){const b=this.observers.find(E=>E.options.queryFn);b&&this.setOptions(b.options)}const r=new AbortController,i=b=>{Object.defineProperty(b,"signal",{enumerable:!0,get:()=>(ee(this,Ti,!0),r.signal)})},s=()=>{const b=QE(this.options,n),S=(()=>{const k={client:A(this,Ri),queryKey:this.queryKey,meta:this.meta};return i(k),k})();return ee(this,Ti,!1),this.options.persister?this.options.persister(b,S,this):b(S)},a=(()=>{const b={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:A(this,Ri),state:this.state,fetchFn:s};return i(b),b})(),l=A(this,Bs)==="infinite"?uA(this.options.pages):this.options.behavior;l==null||l.onFetch(a,this),ee(this,qs,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((c=a.fetchOptions)==null?void 0:c.meta))&&nt(this,jt,Kn).call(this,{type:"fetch",meta:(d=a.fetchOptions)==null?void 0:d.meta}),ee(this,Je,JE({initialPromise:n==null?void 0:n.initialPromise,fn:a.fetchFn,onCancel:b=>{b instanceof Ep&&b.revert&&this.setState({...A(this,qs),fetchStatus:"idle"}),r.abort()},onFail:(b,E)=>{nt(this,jt,Kn).call(this,{type:"failed",failureCount:b,error:E})},onPause:()=>{nt(this,jt,Kn).call(this,{type:"pause"})},onContinue:()=>{nt(this,jt,Kn).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0}));try{const b=await A(this,Je).start();if(b===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(b),(_=(f=A(this,Yt).config).onSuccess)==null||_.call(f,b,this),(p=(m=A(this,Yt).config).onSettled)==null||p.call(m,b,this.state.error,this),b}catch(b){if(b instanceof Ep){if(b.silent)return A(this,Je).promise;if(b.revert){if(this.state.data===void 0)throw b;return this.state.data}}throw nt(this,jt,Kn).call(this,{type:"error",error:b}),(h=(y=A(this,Yt).config).onError)==null||h.call(y,b,this),(x=(v=A(this,Yt).config).onSettled)==null||x.call(v,this.state.data,b,this),b}finally{this.scheduleGc()}}},Bs=new WeakMap,Pi=new WeakMap,qs=new WeakMap,Yt=new WeakMap,Ri=new WeakMap,Je=new WeakMap,Wa=new WeakMap,Ti=new WeakMap,jt=new WeakSet,tS=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},Kn=function(e){const n=r=>{switch(e.type){case"failed":return{...r,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...dA(r.data,this.options),fetchMeta:e.meta??null};case"success":const i={...r,...k_(e.data,e.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return ee(this,qs,e.manual?i:void 0),i;case"error":const s=e.error;return{...r,error:s,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...e.state}}};this.state=n(this.state),wt.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),A(this,Yt).notify({query:this,type:"updated",action:e})})},x0);function dA(t,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:XE(e.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}function k_(t,e){return{data:t,dataUpdatedAt:e??Date.now(),error:null,isInvalidated:!1,status:"success"}}function P_(t){const e=typeof t.initialData=="function"?t.initialData():t.initialData,n=e!==void 0,r=n?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var Ga,On,dt,Ii,Mn,Pr,b0,fA=(b0=class extends ZE{constructor(e){super();le(this,Mn);le(this,Ga);le(this,On);le(this,dt);le(this,Ii);ee(this,Ga,e.client),this.mutationId=e.mutationId,ee(this,dt,e.mutationCache),ee(this,On,[]),this.state=e.state||hA(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){A(this,On).includes(e)||(A(this,On).push(e),this.clearGcTimeout(),A(this,dt).notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){ee(this,On,A(this,On).filter(n=>n!==e)),this.scheduleGc(),A(this,dt).notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){A(this,On).length||(this.state.status==="pending"?this.scheduleGc():A(this,dt).remove(this))}continue(){var e;return((e=A(this,Ii))==null?void 0:e.continue())??this.execute(this.state.variables)}async execute(e){var o,a,l,u,c,d,f,_,m,p,y,h,v,x,b,E,S,k;const n=()=>{nt(this,Mn,Pr).call(this,{type:"continue"})},r={client:A(this,Ga),meta:this.options.meta,mutationKey:this.options.mutationKey};ee(this,Ii,JE({fn:()=>this.options.mutationFn?this.options.mutationFn(e,r):Promise.reject(new Error("No mutationFn found")),onFail:(C,R)=>{nt(this,Mn,Pr).call(this,{type:"failed",failureCount:C,error:R})},onPause:()=>{nt(this,Mn,Pr).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>A(this,dt).canRun(this)}));const i=this.state.status==="pending",s=!A(this,Ii).canStart();try{if(i)n();else{nt(this,Mn,Pr).call(this,{type:"pending",variables:e,isPaused:s}),A(this,dt).config.onMutate&&await A(this,dt).config.onMutate(e,this,r);const R=await((a=(o=this.options).onMutate)==null?void 0:a.call(o,e,r));R!==this.state.context&&nt(this,Mn,Pr).call(this,{type:"pending",context:R,variables:e,isPaused:s})}const C=await A(this,Ii).start();return await((u=(l=A(this,dt).config).onSuccess)==null?void 0:u.call(l,C,e,this.state.context,this,r)),await((d=(c=this.options).onSuccess)==null?void 0:d.call(c,C,e,this.state.context,r)),await((_=(f=A(this,dt).config).onSettled)==null?void 0:_.call(f,C,null,this.state.variables,this.state.context,this,r)),await((p=(m=this.options).onSettled)==null?void 0:p.call(m,C,null,e,this.state.context,r)),nt(this,Mn,Pr).call(this,{type:"success",data:C}),C}catch(C){try{await((h=(y=A(this,dt).config).onError)==null?void 0:h.call(y,C,e,this.state.context,this,r))}catch(R){Promise.reject(R)}try{await((x=(v=this.options).onError)==null?void 0:x.call(v,C,e,this.state.context,r))}catch(R){Promise.reject(R)}try{await((E=(b=A(this,dt).config).onSettled)==null?void 0:E.call(b,void 0,C,this.state.variables,this.state.context,this,r))}catch(R){Promise.reject(R)}try{await((k=(S=this.options).onSettled)==null?void 0:k.call(S,void 0,C,e,this.state.context,r))}catch(R){Promise.reject(R)}throw nt(this,Mn,Pr).call(this,{type:"error",error:C}),C}finally{A(this,dt).runNext(this)}}},Ga=new WeakMap,On=new WeakMap,dt=new WeakMap,Ii=new WeakMap,Mn=new WeakSet,Pr=function(e){const n=r=>{switch(e.type){case"failed":return{...r,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...r,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:e.error,failureCount:r.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=n(this.state),wt.batch(()=>{A(this,On).forEach(r=>{r.onMutationUpdate(e)}),A(this,dt).notify({mutation:this,type:"updated",action:e})})},b0);function hA(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var er,pn,Ka,E0,pA=(E0=class extends Yc{constructor(e={}){super();le(this,er);le(this,pn);le(this,Ka);this.config=e,ee(this,er,new Set),ee(this,pn,new Map),ee(this,Ka,0)}build(e,n,r){const i=new fA({client:e,mutationCache:this,mutationId:++al(this,Ka)._,options:e.defaultMutationOptions(n),state:r});return this.add(i),i}add(e){A(this,er).add(e);const n=Ll(e);if(typeof n=="string"){const r=A(this,pn).get(n);r?r.push(e):A(this,pn).set(n,[e])}this.notify({type:"added",mutation:e})}remove(e){if(A(this,er).delete(e)){const n=Ll(e);if(typeof n=="string"){const r=A(this,pn).get(n);if(r)if(r.length>1){const i=r.indexOf(e);i!==-1&&r.splice(i,1)}else r[0]===e&&A(this,pn).delete(n)}}this.notify({type:"removed",mutation:e})}canRun(e){const n=Ll(e);if(typeof n=="string"){const r=A(this,pn).get(n),i=r==null?void 0:r.find(s=>s.state.status==="pending");return!i||i===e}else return!0}runNext(e){var r;const n=Ll(e);if(typeof n=="string"){const i=(r=A(this,pn).get(n))==null?void 0:r.find(s=>s!==e&&s.state.isPaused);return(i==null?void 0:i.continue())??Promise.resolve()}else return Promise.resolve()}clear(){wt.batch(()=>{A(this,er).forEach(e=>{this.notify({type:"removed",mutation:e})}),A(this,er).clear(),A(this,pn).clear()})}getAll(){return Array.from(A(this,er))}find(e){const n={exact:!0,...e};return this.getAll().find(r=>E_(n,r))}findAll(e={}){return this.getAll().filter(n=>E_(e,n))}notify(e){wt.batch(()=>{this.listeners.forEach(n=>{n(e)})})}resumePausedMutations(){const e=this.getAll().filter(n=>n.state.isPaused);return wt.batch(()=>Promise.all(e.map(n=>n.continue().catch(hn))))}},er=new WeakMap,pn=new WeakMap,Ka=new WeakMap,E0);function Ll(t){var e;return(e=t.options.scope)==null?void 0:e.id}var An,S0,vA=(S0=class extends Yc{constructor(e={}){super();le(this,An);this.config=e,ee(this,An,new Map)}build(e,n,r){const i=n.queryKey,s=n.queryHash??ng(i,n);let o=this.get(s);return o||(o=new cA({client:e,queryKey:i,queryHash:s,options:e.defaultQueryOptions(n),state:r,defaultOptions:e.getQueryDefaults(i)}),this.add(o)),o}add(e){A(this,An).has(e.queryHash)||(A(this,An).set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const n=A(this,An).get(e.queryHash);n&&(e.destroy(),n===e&&A(this,An).delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){wt.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return A(this,An).get(e)}getAll(){return[...A(this,An).values()]}find(e){const n={exact:!0,...e};return this.getAll().find(r=>b_(n,r))}findAll(e={}){const n=this.getAll();return Object.keys(e).length>0?n.filter(r=>b_(e,r)):n}notify(e){wt.batch(()=>{this.listeners.forEach(n=>{n(e)})})}onFocus(){wt.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){wt.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},An=new WeakMap,S0),Ue,Fr,Lr,Hs,Ws,jr,Gs,Ks,C0,gA=(C0=class{constructor(t={}){le(this,Ue);le(this,Fr);le(this,Lr);le(this,Hs);le(this,Ws);le(this,jr);le(this,Gs);le(this,Ks);ee(this,Ue,t.queryCache||new vA),ee(this,Fr,t.mutationCache||new pA),ee(this,Lr,t.defaultOptions||{}),ee(this,Hs,new Map),ee(this,Ws,new Map),ee(this,jr,0)}mount(){al(this,jr)._++,A(this,jr)===1&&(ee(this,Gs,GE.subscribe(async t=>{t&&(await this.resumePausedMutations(),A(this,Ue).onFocus())})),ee(this,Ks,vc.subscribe(async t=>{t&&(await this.resumePausedMutations(),A(this,Ue).onOnline())})))}unmount(){var t,e;al(this,jr)._--,A(this,jr)===0&&((t=A(this,Gs))==null||t.call(this),ee(this,Gs,void 0),(e=A(this,Ks))==null||e.call(this),ee(this,Ks,void 0))}isFetching(t){return A(this,Ue).findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return A(this,Fr).findAll({...t,status:"pending"}).length}getQueryData(t){var n;const e=this.defaultQueryOptions({queryKey:t});return(n=A(this,Ue).get(e.queryHash))==null?void 0:n.state.data}ensureQueryData(t){const e=this.defaultQueryOptions(t),n=A(this,Ue).build(this,e),r=n.state.data;return r===void 0?this.fetchQuery(t):(t.revalidateIfStale&&n.isStaleByTime(xp(e.staleTime,n))&&this.prefetchQuery(e),Promise.resolve(r))}getQueriesData(t){return A(this,Ue).findAll(t).map(({queryKey:e,state:n})=>{const r=n.data;return[e,r]})}setQueryData(t,e,n){const r=this.defaultQueryOptions({queryKey:t}),i=A(this,Ue).get(r.queryHash),s=i==null?void 0:i.state.data,o=KM(e,s);if(o!==void 0)return A(this,Ue).build(this,r).setData(o,{...n,manual:!0})}setQueriesData(t,e,n){return wt.batch(()=>A(this,Ue).findAll(t).map(({queryKey:r})=>[r,this.setQueryData(r,e,n)]))}getQueryState(t){var n;const e=this.defaultQueryOptions({queryKey:t});return(n=A(this,Ue).get(e.queryHash))==null?void 0:n.state}removeQueries(t){const e=A(this,Ue);wt.batch(()=>{e.findAll(t).forEach(n=>{e.remove(n)})})}resetQueries(t,e){const n=A(this,Ue);return wt.batch(()=>(n.findAll(t).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...t},e)))}cancelQueries(t,e={}){const n={revert:!0,...e},r=wt.batch(()=>A(this,Ue).findAll(t).map(i=>i.cancel(n)));return Promise.all(r).then(hn).catch(hn)}invalidateQueries(t,e={}){return wt.batch(()=>(A(this,Ue).findAll(t).forEach(n=>{n.invalidate()}),(t==null?void 0:t.refetchType)==="none"?Promise.resolve():this.refetchQueries({...t,type:(t==null?void 0:t.refetchType)??(t==null?void 0:t.type)??"active"},e)))}refetchQueries(t,e={}){const n={...e,cancelRefetch:e.cancelRefetch??!0},r=wt.batch(()=>A(this,Ue).findAll(t).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let s=i.fetch(void 0,n);return n.throwOnError||(s=s.catch(hn)),i.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(r).then(hn)}fetchQuery(t){const e=this.defaultQueryOptions(t);e.retry===void 0&&(e.retry=!1);const n=A(this,Ue).build(this,e);return n.isStaleByTime(xp(e.staleTime,n))?n.fetch(e):Promise.resolve(n.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(hn).catch(hn)}fetchInfiniteQuery(t){return t._type="infinite",this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(hn).catch(hn)}ensureInfiniteQueryData(t){return t._type="infinite",this.ensureQueryData(t)}resumePausedMutations(){return vc.isOnline()?A(this,Fr).resumePausedMutations():Promise.resolve()}getQueryCache(){return A(this,Ue)}getMutationCache(){return A(this,Fr)}getDefaultOptions(){return A(this,Lr)}setDefaultOptions(t){ee(this,Lr,t)}setQueryDefaults(t,e){A(this,Hs).set(za(t),{queryKey:t,defaultOptions:e})}getQueryDefaults(t){const e=[...A(this,Hs).values()],n={};return e.forEach(r=>{Ua(t,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(t,e){A(this,Ws).set(za(t),{mutationKey:t,defaultOptions:e})}getMutationDefaults(t){const e=[...A(this,Ws).values()],n={};return e.forEach(r=>{Ua(t,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(t){if(t._defaulted)return t;const e={...A(this,Lr).queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return e.queryHash||(e.queryHash=ng(e.queryKey,e)),e.refetchOnReconnect===void 0&&(e.refetchOnReconnect=e.networkMode!=="always"),e.throwOnError===void 0&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode="offlineFirst"),e.queryFn===rg&&(e.enabled=!1),e}defaultMutationOptions(t){return t!=null&&t._defaulted?t:{...A(this,Lr).mutations,...(t==null?void 0:t.mutationKey)&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){A(this,Ue).clear(),A(this,Fr).clear()}},Ue=new WeakMap,Fr=new WeakMap,Lr=new WeakMap,Hs=new WeakMap,Ws=new WeakMap,jr=new WeakMap,Gs=new WeakMap,Ks=new WeakMap,C0),nS=g.createContext(void 0),mA=t=>{const e=g.useContext(nS);if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},yA=({client:t,children:e})=>(g.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),w.jsx(nS.Provider,{value:t,children:e}));function J(t,e,{checkForDefaultPrevented:n=!0}={}){return function(i){if(t==null||t(i),n===!1||!i.defaultPrevented)return e==null?void 0:e(i)}}function R_(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function oi(...t){return e=>{let n=!1;const r=t.map(i=>{const s=R_(i,e);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let i=0;i{const{children:o,...a}=s,l=g.useMemo(()=>a,Object.values(a));return w.jsx(n.Provider,{value:l,children:o})};r.displayName=t+"Provider";function i(s){const o=g.useContext(n);if(o)return o;if(e!==void 0)return e;throw new Error(`\`${s}\` must be used within \`${t}\``)}return[r,i]}function Wi(t,e=[]){let n=[];function r(s,o){const a=g.createContext(o),l=n.length;n=[...n,o];const u=d=>{var h;const{scope:f,children:_,...m}=d,p=((h=f==null?void 0:f[t])==null?void 0:h[l])||a,y=g.useMemo(()=>m,Object.values(m));return w.jsx(p.Provider,{value:y,children:_})};u.displayName=s+"Provider";function c(d,f){var p;const _=((p=f==null?void 0:f[t])==null?void 0:p[l])||a,m=g.useContext(_);if(m)return m;if(o!==void 0)return o;throw new Error(`\`${d}\` must be used within \`${s}\``)}return[u,c]}const i=()=>{const s=n.map(o=>g.createContext(o));return function(a){const l=(a==null?void 0:a[t])||s;return g.useMemo(()=>({[`__scope${t}`]:{...a,[t]:l}}),[a,l])}};return i.scopeName=t,[r,wA(i,...e)]}function wA(...t){const e=t[0];if(t.length===1)return e;const n=()=>{const r=t.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const o=r.reduce((a,{useScope:l,scopeName:u})=>{const d=l(s)[`__scope${u}`];return{...a,...d}},{});return g.useMemo(()=>({[`__scope${e.scopeName}`]:o}),[o])}};return n.scopeName=e.scopeName,n}var on=globalThis!=null&&globalThis.document?g.useLayoutEffect:()=>{},xA=kc[" useId ".trim().toString()]||(()=>{}),bA=0;function Fs(t){const[e,n]=g.useState(xA());return on(()=>{n(r=>r??String(bA++))},[t]),e?`radix-${e}`:""}var EA=kc[" useInsertionEffect ".trim().toString()]||on;function Xc({prop:t,defaultProp:e,onChange:n=()=>{},caller:r}){const[i,s,o]=SA({defaultProp:e,onChange:n}),a=t!==void 0,l=a?t:i;{const c=g.useRef(t!==void 0);g.useEffect(()=>{const d=c.current;d!==a&&console.warn(`${r} is changing from ${d?"controlled":"uncontrolled"} to ${a?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),c.current=a},[a,r])}const u=g.useCallback(c=>{var d;if(a){const f=CA(c)?c(t):c;f!==t&&((d=o.current)==null||d.call(o,f))}else s(c)},[a,t,s,o]);return[l,u]}function SA({defaultProp:t,onChange:e}){const[n,r]=g.useState(t),i=g.useRef(n),s=g.useRef(e);return EA(()=>{s.current=e},[e]),g.useEffect(()=>{var o;i.current!==n&&((o=s.current)==null||o.call(s,n),i.current=n)},[n,i]),[n,r,s]}function CA(t){return typeof t=="function"}function kA(t){const e=PA(t),n=g.forwardRef((r,i)=>{const{children:s,...o}=r,a=g.Children.toArray(s),l=a.find(TA);if(l){const u=l.props.children,c=a.map(d=>d===l?g.Children.count(u)>1?g.Children.only(null):g.isValidElement(u)?u.props.children:null:d);return w.jsx(e,{...o,ref:i,children:g.isValidElement(u)?g.cloneElement(u,void 0,c):null})}return w.jsx(e,{...o,ref:i,children:s})});return n.displayName=`${t}.Slot`,n}function PA(t){const e=g.forwardRef((n,r)=>{const{children:i,...s}=n;if(g.isValidElement(i)){const o=OA(i),a=IA(s,i.props);return i.type!==g.Fragment&&(a.ref=r?oi(r,o):o),g.cloneElement(i,a)}return g.Children.count(i)>1?g.Children.only(null):null});return e.displayName=`${t}.SlotClone`,e}var RA=Symbol("radix.slottable");function TA(t){return g.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===RA}function IA(t,e){const n={...e};for(const r in e){const i=t[r],s=e[r];/^on[A-Z]/.test(r)?i&&s?n[r]=(...a)=>{const l=s(...a);return i(...a),l}:i&&(n[r]=i):r==="style"?n[r]={...i,...s}:r==="className"&&(n[r]=[i,s].filter(Boolean).join(" "))}return{...t,...n}}function OA(t){var r,i;let e=(r=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:r.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(i=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:i.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}var MA=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Ee=MA.reduce((t,e)=>{const n=kA(`Primitive.${e}`),r=g.forwardRef((i,s)=>{const{asChild:o,...a}=i,l=o?n:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),w.jsx(l,{...a,ref:s})});return r.displayName=`Primitive.${e}`,{...t,[e]:r}},{});function ig(t,e){t&&el.flushSync(()=>t.dispatchEvent(e))}function Ft(t){const e=g.useRef(t);return g.useEffect(()=>{e.current=t}),g.useMemo(()=>(...n)=>{var r;return(r=e.current)==null?void 0:r.call(e,...n)},[])}function AA(t,e=globalThis==null?void 0:globalThis.document){const n=Ft(t);g.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return e.addEventListener("keydown",r,{capture:!0}),()=>e.removeEventListener("keydown",r,{capture:!0})},[n,e])}var NA="DismissableLayer",Cp="dismissableLayer.update",$A="dismissableLayer.pointerDownOutside",FA="dismissableLayer.focusOutside",T_,rS=g.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Jc=g.forwardRef((t,e)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:s,onInteractOutside:o,onDismiss:a,...l}=t,u=g.useContext(rS),[c,d]=g.useState(null),f=(c==null?void 0:c.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,_]=g.useState({}),m=Xe(e,k=>d(k)),p=Array.from(u.layers),[y]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),h=p.indexOf(y),v=c?p.indexOf(c):-1,x=u.layersWithOutsidePointerEventsDisabled.size>0,b=v>=h,E=jA(k=>{const C=k.target,R=[...u.branches].some(P=>P.contains(C));!b||R||(i==null||i(k),o==null||o(k),k.defaultPrevented||a==null||a())},f),S=DA(k=>{const C=k.target;[...u.branches].some(P=>P.contains(C))||(s==null||s(k),o==null||o(k),k.defaultPrevented||a==null||a())},f);return AA(k=>{v===u.layers.size-1&&(r==null||r(k),!k.defaultPrevented&&a&&(k.preventDefault(),a()))},f),g.useEffect(()=>{if(c)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(T_=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(c)),u.layers.add(c),I_(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=T_)}},[c,f,n,u]),g.useEffect(()=>()=>{c&&(u.layers.delete(c),u.layersWithOutsidePointerEventsDisabled.delete(c),I_())},[c,u]),g.useEffect(()=>{const k=()=>_({});return document.addEventListener(Cp,k),()=>document.removeEventListener(Cp,k)},[]),w.jsx(Ee.div,{...l,ref:m,style:{pointerEvents:x?b?"auto":"none":void 0,...t.style},onFocusCapture:J(t.onFocusCapture,S.onFocusCapture),onBlurCapture:J(t.onBlurCapture,S.onBlurCapture),onPointerDownCapture:J(t.onPointerDownCapture,E.onPointerDownCapture)})});Jc.displayName=NA;var LA="DismissableLayerBranch",iS=g.forwardRef((t,e)=>{const n=g.useContext(rS),r=g.useRef(null),i=Xe(e,r);return g.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),w.jsx(Ee.div,{...t,ref:i})});iS.displayName=LA;function jA(t,e=globalThis==null?void 0:globalThis.document){const n=Ft(t),r=g.useRef(!1),i=g.useRef(()=>{});return g.useEffect(()=>{const s=a=>{if(a.target&&!r.current){let l=function(){sS($A,n,u,{discrete:!0})};const u={originalEvent:a};a.pointerType==="touch"?(e.removeEventListener("click",i.current),i.current=l,e.addEventListener("click",i.current,{once:!0})):l()}else e.removeEventListener("click",i.current);r.current=!1},o=window.setTimeout(()=>{e.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(o),e.removeEventListener("pointerdown",s),e.removeEventListener("click",i.current)}},[e,n]),{onPointerDownCapture:()=>r.current=!0}}function DA(t,e=globalThis==null?void 0:globalThis.document){const n=Ft(t),r=g.useRef(!1);return g.useEffect(()=>{const i=s=>{s.target&&!r.current&&sS(FA,n,{originalEvent:s},{discrete:!1})};return e.addEventListener("focusin",i),()=>e.removeEventListener("focusin",i)},[e,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function I_(){const t=new CustomEvent(Cp);document.dispatchEvent(t)}function sS(t,e,n,{discrete:r}){const i=n.originalEvent.target,s=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:n});e&&i.addEventListener(t,e,{once:!0}),r?ig(i,s):i.dispatchEvent(s)}var zA=Jc,UA=iS,xf="focusScope.autoFocusOnMount",bf="focusScope.autoFocusOnUnmount",O_={bubbles:!1,cancelable:!0},VA="FocusScope",sg=g.forwardRef((t,e)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:s,...o}=t,[a,l]=g.useState(null),u=Ft(i),c=Ft(s),d=g.useRef(null),f=Xe(e,p=>l(p)),_=g.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;g.useEffect(()=>{if(r){let p=function(x){if(_.paused||!a)return;const b=x.target;a.contains(b)?d.current=b:Rr(d.current,{select:!0})},y=function(x){if(_.paused||!a)return;const b=x.relatedTarget;b!==null&&(a.contains(b)||Rr(d.current,{select:!0}))},h=function(x){if(document.activeElement===document.body)for(const E of x)E.removedNodes.length>0&&Rr(a)};document.addEventListener("focusin",p),document.addEventListener("focusout",y);const v=new MutationObserver(h);return a&&v.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",p),document.removeEventListener("focusout",y),v.disconnect()}}},[r,a,_.paused]),g.useEffect(()=>{if(a){A_.add(_);const p=document.activeElement;if(!a.contains(p)){const h=new CustomEvent(xf,O_);a.addEventListener(xf,u),a.dispatchEvent(h),h.defaultPrevented||(BA(KA(oS(a)),{select:!0}),document.activeElement===p&&Rr(a))}return()=>{a.removeEventListener(xf,u),setTimeout(()=>{const h=new CustomEvent(bf,O_);a.addEventListener(bf,c),a.dispatchEvent(h),h.defaultPrevented||Rr(p??document.body,{select:!0}),a.removeEventListener(bf,c),A_.remove(_)},0)}}},[a,u,c,_]);const m=g.useCallback(p=>{if(!n&&!r||_.paused)return;const y=p.key==="Tab"&&!p.altKey&&!p.ctrlKey&&!p.metaKey,h=document.activeElement;if(y&&h){const v=p.currentTarget,[x,b]=qA(v);x&&b?!p.shiftKey&&h===b?(p.preventDefault(),n&&Rr(x,{select:!0})):p.shiftKey&&h===x&&(p.preventDefault(),n&&Rr(b,{select:!0})):h===v&&p.preventDefault()}},[n,r,_.paused]);return w.jsx(Ee.div,{tabIndex:-1,...o,ref:f,onKeyDown:m})});sg.displayName=VA;function BA(t,{select:e=!1}={}){const n=document.activeElement;for(const r of t)if(Rr(r,{select:e}),document.activeElement!==n)return}function qA(t){const e=oS(t),n=M_(e,t),r=M_(e.reverse(),t);return[n,r]}function oS(t){const e=[],n=document.createTreeWalker(t,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();)e.push(n.currentNode);return e}function M_(t,e){for(const n of t)if(!HA(n,{upTo:e}))return n}function HA(t,{upTo:e}){if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(e!==void 0&&t===e)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}function WA(t){return t instanceof HTMLInputElement&&"select"in t}function Rr(t,{select:e=!1}={}){if(t&&t.focus){const n=document.activeElement;t.focus({preventScroll:!0}),t!==n&&WA(t)&&e&&t.select()}}var A_=GA();function GA(){let t=[];return{add(e){const n=t[0];e!==n&&(n==null||n.pause()),t=N_(t,e),t.unshift(e)},remove(e){var n;t=N_(t,e),(n=t[0])==null||n.resume()}}}function N_(t,e){const n=[...t],r=n.indexOf(e);return r!==-1&&n.splice(r,1),n}function KA(t){return t.filter(e=>e.tagName!=="A")}var QA="Portal",Zc=g.forwardRef((t,e)=>{var a;const{container:n,...r}=t,[i,s]=g.useState(!1);on(()=>s(!0),[]);const o=n||i&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return o?OR.createPortal(w.jsx(Ee.div,{...r,ref:e}),o):null});Zc.displayName=QA;function YA(t,e){return g.useReducer((n,r)=>e[n][r]??n,t)}var gr=t=>{const{present:e,children:n}=t,r=XA(e),i=typeof n=="function"?n({present:r.isPresent}):g.Children.only(n),s=Xe(r.ref,JA(i));return typeof n=="function"||r.isPresent?g.cloneElement(i,{ref:s}):null};gr.displayName="Presence";function XA(t){const[e,n]=g.useState(),r=g.useRef(null),i=g.useRef(t),s=g.useRef("none"),o=t?"mounted":"unmounted",[a,l]=YA(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return g.useEffect(()=>{const u=jl(r.current);s.current=a==="mounted"?u:"none"},[a]),on(()=>{const u=r.current,c=i.current;if(c!==t){const f=s.current,_=jl(u);t?l("MOUNT"):_==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(c&&f!==_?"ANIMATION_OUT":"UNMOUNT"),i.current=t}},[t,l]),on(()=>{if(e){let u;const c=e.ownerDocument.defaultView??window,d=_=>{const p=jl(r.current).includes(CSS.escape(_.animationName));if(_.target===e&&p&&(l("ANIMATION_END"),!i.current)){const y=e.style.animationFillMode;e.style.animationFillMode="forwards",u=c.setTimeout(()=>{e.style.animationFillMode==="forwards"&&(e.style.animationFillMode=y)})}},f=_=>{_.target===e&&(s.current=jl(r.current))};return e.addEventListener("animationstart",f),e.addEventListener("animationcancel",d),e.addEventListener("animationend",d),()=>{c.clearTimeout(u),e.removeEventListener("animationstart",f),e.removeEventListener("animationcancel",d),e.removeEventListener("animationend",d)}}else l("ANIMATION_END")},[e,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:g.useCallback(u=>{r.current=u?getComputedStyle(u):null,n(u)},[])}}function jl(t){return(t==null?void 0:t.animationName)||"none"}function JA(t){var r,i;let e=(r=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:r.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(i=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:i.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}var Ef=0;function aS(){g.useEffect(()=>{const t=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",t[0]??$_()),document.body.insertAdjacentElement("beforeend",t[1]??$_()),Ef++,()=>{Ef===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),Ef--}},[])}function $_(){const t=document.createElement("span");return t.setAttribute("data-radix-focus-guard",""),t.tabIndex=0,t.style.outline="none",t.style.opacity="0",t.style.position="fixed",t.style.pointerEvents="none",t}var Fn=function(){return Fn=Object.assign||function(e){for(var n,r=1,i=arguments.length;r"u")return vN;var e=gN(t),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:e[0],top:e[1],right:e[2],gap:Math.max(0,r-n+e[2]-e[0])}},yN=dS(),Ls="data-scroll-locked",_N=function(t,e,n,r){var i=t.left,s=t.top,o=t.right,a=t.gap;return n===void 0&&(n="margin"),` .`.concat(eN,` { overflow: hidden `).concat(r,`; padding-right: `).concat(a,"px ").concat(r,`; @@ -107,11 +107,11 @@ Error generating stack: `+s.message+` `)},L_=function(){var t=parseInt(document.body.getAttribute(Ls)||"0",10);return isFinite(t)?t:0},wN=function(){g.useEffect(function(){return document.body.setAttribute(Ls,(L_()+1).toString()),function(){var t=L_()-1;t<=0?document.body.removeAttribute(Ls):document.body.setAttribute(Ls,t.toString())}},[])},xN=function(t){var e=t.noRelative,n=t.noImportant,r=t.gapMode,i=r===void 0?"margin":r;wN();var s=g.useMemo(function(){return mN(i)},[i]);return g.createElement(yN,{styles:_N(s,!e,i,n?"":"!important")})},kp=!1;if(typeof window<"u")try{var Dl=Object.defineProperty({},"passive",{get:function(){return kp=!0,!0}});window.addEventListener("test",Dl,Dl),window.removeEventListener("test",Dl,Dl)}catch{kp=!1}var ss=kp?{passive:!1}:!1,bN=function(t){return t.tagName==="TEXTAREA"},fS=function(t,e){if(!(t instanceof Element))return!1;var n=window.getComputedStyle(t);return n[e]!=="hidden"&&!(n.overflowY===n.overflowX&&!bN(t)&&n[e]==="visible")},EN=function(t){return fS(t,"overflowY")},SN=function(t){return fS(t,"overflowX")},j_=function(t,e){var n=e.ownerDocument,r=e;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var i=hS(t,r);if(i){var s=pS(t,r),o=s[1],a=s[2];if(o>a)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},CN=function(t){var e=t.scrollTop,n=t.scrollHeight,r=t.clientHeight;return[e,n,r]},kN=function(t){var e=t.scrollLeft,n=t.scrollWidth,r=t.clientWidth;return[e,n,r]},hS=function(t,e){return t==="v"?EN(e):SN(e)},pS=function(t,e){return t==="v"?CN(e):kN(e)},PN=function(t,e){return t==="h"&&e==="rtl"?-1:1},RN=function(t,e,n,r,i){var s=PN(t,window.getComputedStyle(e).direction),o=s*r,a=n.target,l=e.contains(a),u=!1,c=o>0,d=0,f=0;do{if(!a)break;var _=pS(t,a),m=_[0],p=_[1],y=_[2],h=p-y-s*m;(m||h)&&hS(t,a)&&(d+=h,f+=m);var v=a.parentNode;a=v&&v.nodeType===Node.DOCUMENT_FRAGMENT_NODE?v.host:v}while(!l&&a!==document.body||l&&(e.contains(a)||e===a));return(c&&Math.abs(d)<1||!c&&Math.abs(f)<1)&&(u=!0),u},zl=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},D_=function(t){return[t.deltaX,t.deltaY]},z_=function(t){return t&&"current"in t?t.current:t},TN=function(t,e){return t[0]===e[0]&&t[1]===e[1]},IN=function(t){return` .block-interactivity-`.concat(t,` {pointer-events: none;} .allow-interactivity-`).concat(t,` {pointer-events: all;} -`)},ON=0,os=[];function MN(t){var e=g.useRef([]),n=g.useRef([0,0]),r=g.useRef(),i=g.useState(ON++)[0],s=g.useState(dS)[0],o=g.useRef(t);g.useEffect(function(){o.current=t},[t]),g.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(i));var p=ZA([t.lockRef.current],(t.shards||[]).map(z_),!0).filter(Boolean);return p.forEach(function(y){return y.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),p.forEach(function(y){return y.classList.remove("allow-interactivity-".concat(i))})}}},[t.inert,t.lockRef.current,t.shards]);var a=g.useCallback(function(p,y){if("touches"in p&&p.touches.length===2||p.type==="wheel"&&p.ctrlKey)return!o.current.allowPinchZoom;var h=zl(p),v=n.current,x="deltaX"in p?p.deltaX:v[0]-h[0],b="deltaY"in p?p.deltaY:v[1]-h[1],E,S=p.target,k=Math.abs(x)>Math.abs(b)?"h":"v";if("touches"in p&&k==="h"&&S.type==="range")return!1;var C=window.getSelection(),R=C&&C.anchorNode,P=R?R===S||R.contains(S):!1;if(P)return!1;var $=j_(k,S);if(!$)return!0;if($?E=k:(E=k==="v"?"h":"v",$=j_(k,S)),!$)return!1;if(!r.current&&"changedTouches"in p&&(x||b)&&(r.current=E),!E)return!0;var O=r.current||E;return RN(O,y,p,O==="h"?x:b)},[]),l=g.useCallback(function(p){var y=p;if(!(!os.length||os[os.length-1]!==s)){var h="deltaY"in y?D_(y):zl(y),v=e.current.filter(function(E){return E.name===y.type&&(E.target===y.target||y.target===E.shadowParent)&&TN(E.delta,h)})[0];if(v&&v.should){y.cancelable&&y.preventDefault();return}if(!v){var x=(o.current.shards||[]).map(z_).filter(Boolean).filter(function(E){return E.contains(y.target)}),b=x.length>0?a(y,x[0]):!o.current.noIsolation;b&&y.cancelable&&y.preventDefault()}}},[]),u=g.useCallback(function(p,y,h,v){var x={name:p,delta:y,target:h,should:v,shadowParent:AN(h)};e.current.push(x),setTimeout(function(){e.current=e.current.filter(function(b){return b!==x})},1)},[]),c=g.useCallback(function(p){n.current=zl(p),r.current=void 0},[]),d=g.useCallback(function(p){u(p.type,D_(p),p.target,a(p,t.lockRef.current))},[]),f=g.useCallback(function(p){u(p.type,zl(p),p.target,a(p,t.lockRef.current))},[]);g.useEffect(function(){return os.push(s),t.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener("wheel",l,ss),document.addEventListener("touchmove",l,ss),document.addEventListener("touchstart",c,ss),function(){os=os.filter(function(p){return p!==s}),document.removeEventListener("wheel",l,ss),document.removeEventListener("touchmove",l,ss),document.removeEventListener("touchstart",c,ss)}},[]);var _=t.removeScrollBar,m=t.inert;return g.createElement(g.Fragment,null,m?g.createElement(s,{styles:IN(i)}):null,_?g.createElement(xN,{noRelative:t.noRelative,gapMode:t.gapMode}):null)}function AN(t){for(var e=null;t!==null;)t instanceof ShadowRoot&&(e=t.host,t=t.host),t=t.parentNode;return e}const NN=lN(cS,MN);var og=g.forwardRef(function(t,e){return g.createElement(ed,Fn({},t,{ref:e,sideCar:NN}))});og.classNames=ed.classNames;var $N=function(t){if(typeof document>"u")return null;var e=Array.isArray(t)?t[0]:t;return e.ownerDocument.body},as=new WeakMap,Ul=new WeakMap,Vl={},Pf=0,vS=function(t){return t&&(t.host||vS(t.parentNode))},FN=function(t,e){return e.map(function(n){if(t.contains(n))return n;var r=vS(n);return r&&t.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",t,". Doing nothing"),null)}).filter(function(n){return!!n})},LN=function(t,e,n,r){var i=FN(e,Array.isArray(t)?t:[t]);Vl[n]||(Vl[n]=new WeakMap);var s=Vl[n],o=[],a=new Set,l=new Set(i),u=function(d){!d||a.has(d)||(a.add(d),u(d.parentNode))};i.forEach(u);var c=function(d){!d||l.has(d)||Array.prototype.forEach.call(d.children,function(f){if(a.has(f))c(f);else try{var _=f.getAttribute(r),m=_!==null&&_!=="false",p=(as.get(f)||0)+1,y=(s.get(f)||0)+1;as.set(f,p),s.set(f,y),o.push(f),p===1&&m&&Ul.set(f,!0),y===1&&f.setAttribute(n,"true"),m||f.setAttribute(r,"true")}catch(h){console.error("aria-hidden: cannot operate on ",f,h)}})};return c(e),a.clear(),Pf++,function(){o.forEach(function(d){var f=as.get(d)-1,_=s.get(d)-1;as.set(d,f),s.set(d,_),f||(Ul.has(d)||d.removeAttribute(r),Ul.delete(d)),_||d.removeAttribute(n)}),Pf--,Pf||(as=new WeakMap,as=new WeakMap,Ul=new WeakMap,Vl={})}},gS=function(t,e,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(t)?t:[t]),i=$N(t);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live], script"))),LN(r,i,n,"aria-hidden")):function(){return null}};function jN(t){const e=DN(t),n=g.forwardRef((r,i)=>{const{children:s,...o}=r,a=g.Children.toArray(s),l=a.find(UN);if(l){const u=l.props.children,c=a.map(d=>d===l?g.Children.count(u)>1?g.Children.only(null):g.isValidElement(u)?u.props.children:null:d);return w.jsx(e,{...o,ref:i,children:g.isValidElement(u)?g.cloneElement(u,void 0,c):null})}return w.jsx(e,{...o,ref:i,children:s})});return n.displayName=`${t}.Slot`,n}function DN(t){const e=g.forwardRef((n,r)=>{const{children:i,...s}=n;if(g.isValidElement(i)){const o=BN(i),a=VN(s,i.props);return i.type!==g.Fragment&&(a.ref=r?oi(r,o):o),g.cloneElement(i,a)}return g.Children.count(i)>1?g.Children.only(null):null});return e.displayName=`${t}.SlotClone`,e}var zN=Symbol("radix.slottable");function UN(t){return g.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===zN}function VN(t,e){const n={...e};for(const r in e){const i=t[r],s=e[r];/^on[A-Z]/.test(r)?i&&s?n[r]=(...a)=>{const l=s(...a);return i(...a),l}:i&&(n[r]=i):r==="style"?n[r]={...i,...s}:r==="className"&&(n[r]=[i,s].filter(Boolean).join(" "))}return{...t,...n}}function BN(t){var r,i;let e=(r=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:r.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(i=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:i.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}var td="Dialog",[mS]=Wi(td),[qN,Sn]=mS(td),yS=t=>{const{__scopeDialog:e,children:n,open:r,defaultOpen:i,onOpenChange:s,modal:o=!0}=t,a=g.useRef(null),l=g.useRef(null),[u,c]=Xc({prop:r,defaultProp:i??!1,onChange:s,caller:td});return w.jsx(qN,{scope:e,triggerRef:a,contentRef:l,contentId:Fs(),titleId:Fs(),descriptionId:Fs(),open:u,onOpenChange:c,onOpenToggle:g.useCallback(()=>c(d=>!d),[c]),modal:o,children:n})};yS.displayName=td;var _S="DialogTrigger",wS=g.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,i=Sn(_S,n),s=Xe(e,i.triggerRef);return w.jsx(Ee.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":ug(i.open),...r,ref:s,onClick:J(t.onClick,i.onOpenToggle)})});wS.displayName=_S;var ag="DialogPortal",[HN,xS]=mS(ag,{forceMount:void 0}),bS=t=>{const{__scopeDialog:e,forceMount:n,children:r,container:i}=t,s=Sn(ag,e);return w.jsx(HN,{scope:e,forceMount:n,children:g.Children.map(r,o=>w.jsx(gr,{present:n||s.open,children:w.jsx(Zc,{asChild:!0,container:i,children:o})}))})};bS.displayName=ag;var gc="DialogOverlay",ES=g.forwardRef((t,e)=>{const n=xS(gc,t.__scopeDialog),{forceMount:r=n.forceMount,...i}=t,s=Sn(gc,t.__scopeDialog);return s.modal?w.jsx(gr,{present:r||s.open,children:w.jsx(GN,{...i,ref:e})}):null});ES.displayName=gc;var WN=jN("DialogOverlay.RemoveScroll"),GN=g.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,i=Sn(gc,n);return w.jsx(og,{as:WN,allowPinchZoom:!0,shards:[i.contentRef],children:w.jsx(Ee.div,{"data-state":ug(i.open),...r,ref:e,style:{pointerEvents:"auto",...r.style}})})}),Ui="DialogContent",SS=g.forwardRef((t,e)=>{const n=xS(Ui,t.__scopeDialog),{forceMount:r=n.forceMount,...i}=t,s=Sn(Ui,t.__scopeDialog);return w.jsx(gr,{present:r||s.open,children:s.modal?w.jsx(KN,{...i,ref:e}):w.jsx(QN,{...i,ref:e})})});SS.displayName=Ui;var KN=g.forwardRef((t,e)=>{const n=Sn(Ui,t.__scopeDialog),r=g.useRef(null),i=Xe(e,n.contentRef,r);return g.useEffect(()=>{const s=r.current;if(s)return gS(s)},[]),w.jsx(CS,{...t,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:J(t.onCloseAutoFocus,s=>{var o;s.preventDefault(),(o=n.triggerRef.current)==null||o.focus()}),onPointerDownOutside:J(t.onPointerDownOutside,s=>{const o=s.detail.originalEvent,a=o.button===0&&o.ctrlKey===!0;(o.button===2||a)&&s.preventDefault()}),onFocusOutside:J(t.onFocusOutside,s=>s.preventDefault())})}),QN=g.forwardRef((t,e)=>{const n=Sn(Ui,t.__scopeDialog),r=g.useRef(!1),i=g.useRef(!1);return w.jsx(CS,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var o,a;(o=t.onCloseAutoFocus)==null||o.call(t,s),s.defaultPrevented||(r.current||(a=n.triggerRef.current)==null||a.focus(),s.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:s=>{var l,u;(l=t.onInteractOutside)==null||l.call(t,s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const o=s.target;((u=n.triggerRef.current)==null?void 0:u.contains(o))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&i.current&&s.preventDefault()}})}),CS=g.forwardRef((t,e)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:s,...o}=t,a=Sn(Ui,n),l=g.useRef(null),u=Xe(e,l);return aS(),w.jsxs(w.Fragment,{children:[w.jsx(sg,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:s,children:w.jsx(Jc,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":ug(a.open),...o,ref:u,onDismiss:()=>a.onOpenChange(!1)})}),w.jsxs(w.Fragment,{children:[w.jsx(YN,{titleId:a.titleId}),w.jsx(JN,{contentRef:l,descriptionId:a.descriptionId})]})]})}),lg="DialogTitle",kS=g.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,i=Sn(lg,n);return w.jsx(Ee.h2,{id:i.titleId,...r,ref:e})});kS.displayName=lg;var PS="DialogDescription",RS=g.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,i=Sn(PS,n);return w.jsx(Ee.p,{id:i.descriptionId,...r,ref:e})});RS.displayName=PS;var TS="DialogClose",IS=g.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,i=Sn(TS,n);return w.jsx(Ee.button,{type:"button",...r,ref:e,onClick:J(t.onClick,()=>i.onOpenChange(!1))})});IS.displayName=TS;function ug(t){return t?"open":"closed"}var OS="DialogTitleWarning",[y3,MS]=_A(OS,{contentName:Ui,titleName:lg,docsSlug:"dialog"}),YN=({titleId:t})=>{const e=MS(OS),n=`\`${e.contentName}\` requires a \`${e.titleName}\` for the component to be accessible for screen reader users. +`)},ON=0,os=[];function MN(t){var e=g.useRef([]),n=g.useRef([0,0]),r=g.useRef(),i=g.useState(ON++)[0],s=g.useState(dS)[0],o=g.useRef(t);g.useEffect(function(){o.current=t},[t]),g.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(i));var p=ZA([t.lockRef.current],(t.shards||[]).map(z_),!0).filter(Boolean);return p.forEach(function(y){return y.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),p.forEach(function(y){return y.classList.remove("allow-interactivity-".concat(i))})}}},[t.inert,t.lockRef.current,t.shards]);var a=g.useCallback(function(p,y){if("touches"in p&&p.touches.length===2||p.type==="wheel"&&p.ctrlKey)return!o.current.allowPinchZoom;var h=zl(p),v=n.current,x="deltaX"in p?p.deltaX:v[0]-h[0],b="deltaY"in p?p.deltaY:v[1]-h[1],E,S=p.target,k=Math.abs(x)>Math.abs(b)?"h":"v";if("touches"in p&&k==="h"&&S.type==="range")return!1;var C=window.getSelection(),R=C&&C.anchorNode,P=R?R===S||R.contains(S):!1;if(P)return!1;var $=j_(k,S);if(!$)return!0;if($?E=k:(E=k==="v"?"h":"v",$=j_(k,S)),!$)return!1;if(!r.current&&"changedTouches"in p&&(x||b)&&(r.current=E),!E)return!0;var O=r.current||E;return RN(O,y,p,O==="h"?x:b)},[]),l=g.useCallback(function(p){var y=p;if(!(!os.length||os[os.length-1]!==s)){var h="deltaY"in y?D_(y):zl(y),v=e.current.filter(function(E){return E.name===y.type&&(E.target===y.target||y.target===E.shadowParent)&&TN(E.delta,h)})[0];if(v&&v.should){y.cancelable&&y.preventDefault();return}if(!v){var x=(o.current.shards||[]).map(z_).filter(Boolean).filter(function(E){return E.contains(y.target)}),b=x.length>0?a(y,x[0]):!o.current.noIsolation;b&&y.cancelable&&y.preventDefault()}}},[]),u=g.useCallback(function(p,y,h,v){var x={name:p,delta:y,target:h,should:v,shadowParent:AN(h)};e.current.push(x),setTimeout(function(){e.current=e.current.filter(function(b){return b!==x})},1)},[]),c=g.useCallback(function(p){n.current=zl(p),r.current=void 0},[]),d=g.useCallback(function(p){u(p.type,D_(p),p.target,a(p,t.lockRef.current))},[]),f=g.useCallback(function(p){u(p.type,zl(p),p.target,a(p,t.lockRef.current))},[]);g.useEffect(function(){return os.push(s),t.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener("wheel",l,ss),document.addEventListener("touchmove",l,ss),document.addEventListener("touchstart",c,ss),function(){os=os.filter(function(p){return p!==s}),document.removeEventListener("wheel",l,ss),document.removeEventListener("touchmove",l,ss),document.removeEventListener("touchstart",c,ss)}},[]);var _=t.removeScrollBar,m=t.inert;return g.createElement(g.Fragment,null,m?g.createElement(s,{styles:IN(i)}):null,_?g.createElement(xN,{noRelative:t.noRelative,gapMode:t.gapMode}):null)}function AN(t){for(var e=null;t!==null;)t instanceof ShadowRoot&&(e=t.host,t=t.host),t=t.parentNode;return e}const NN=lN(cS,MN);var og=g.forwardRef(function(t,e){return g.createElement(ed,Fn({},t,{ref:e,sideCar:NN}))});og.classNames=ed.classNames;var $N=function(t){if(typeof document>"u")return null;var e=Array.isArray(t)?t[0]:t;return e.ownerDocument.body},as=new WeakMap,Ul=new WeakMap,Vl={},Pf=0,vS=function(t){return t&&(t.host||vS(t.parentNode))},FN=function(t,e){return e.map(function(n){if(t.contains(n))return n;var r=vS(n);return r&&t.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",t,". Doing nothing"),null)}).filter(function(n){return!!n})},LN=function(t,e,n,r){var i=FN(e,Array.isArray(t)?t:[t]);Vl[n]||(Vl[n]=new WeakMap);var s=Vl[n],o=[],a=new Set,l=new Set(i),u=function(d){!d||a.has(d)||(a.add(d),u(d.parentNode))};i.forEach(u);var c=function(d){!d||l.has(d)||Array.prototype.forEach.call(d.children,function(f){if(a.has(f))c(f);else try{var _=f.getAttribute(r),m=_!==null&&_!=="false",p=(as.get(f)||0)+1,y=(s.get(f)||0)+1;as.set(f,p),s.set(f,y),o.push(f),p===1&&m&&Ul.set(f,!0),y===1&&f.setAttribute(n,"true"),m||f.setAttribute(r,"true")}catch(h){console.error("aria-hidden: cannot operate on ",f,h)}})};return c(e),a.clear(),Pf++,function(){o.forEach(function(d){var f=as.get(d)-1,_=s.get(d)-1;as.set(d,f),s.set(d,_),f||(Ul.has(d)||d.removeAttribute(r),Ul.delete(d)),_||d.removeAttribute(n)}),Pf--,Pf||(as=new WeakMap,as=new WeakMap,Ul=new WeakMap,Vl={})}},gS=function(t,e,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(t)?t:[t]),i=$N(t);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live], script"))),LN(r,i,n,"aria-hidden")):function(){return null}};function jN(t){const e=DN(t),n=g.forwardRef((r,i)=>{const{children:s,...o}=r,a=g.Children.toArray(s),l=a.find(UN);if(l){const u=l.props.children,c=a.map(d=>d===l?g.Children.count(u)>1?g.Children.only(null):g.isValidElement(u)?u.props.children:null:d);return w.jsx(e,{...o,ref:i,children:g.isValidElement(u)?g.cloneElement(u,void 0,c):null})}return w.jsx(e,{...o,ref:i,children:s})});return n.displayName=`${t}.Slot`,n}function DN(t){const e=g.forwardRef((n,r)=>{const{children:i,...s}=n;if(g.isValidElement(i)){const o=BN(i),a=VN(s,i.props);return i.type!==g.Fragment&&(a.ref=r?oi(r,o):o),g.cloneElement(i,a)}return g.Children.count(i)>1?g.Children.only(null):null});return e.displayName=`${t}.SlotClone`,e}var zN=Symbol("radix.slottable");function UN(t){return g.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===zN}function VN(t,e){const n={...e};for(const r in e){const i=t[r],s=e[r];/^on[A-Z]/.test(r)?i&&s?n[r]=(...a)=>{const l=s(...a);return i(...a),l}:i&&(n[r]=i):r==="style"?n[r]={...i,...s}:r==="className"&&(n[r]=[i,s].filter(Boolean).join(" "))}return{...t,...n}}function BN(t){var r,i;let e=(r=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:r.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(i=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:i.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}var td="Dialog",[mS]=Wi(td),[qN,Sn]=mS(td),yS=t=>{const{__scopeDialog:e,children:n,open:r,defaultOpen:i,onOpenChange:s,modal:o=!0}=t,a=g.useRef(null),l=g.useRef(null),[u,c]=Xc({prop:r,defaultProp:i??!1,onChange:s,caller:td});return w.jsx(qN,{scope:e,triggerRef:a,contentRef:l,contentId:Fs(),titleId:Fs(),descriptionId:Fs(),open:u,onOpenChange:c,onOpenToggle:g.useCallback(()=>c(d=>!d),[c]),modal:o,children:n})};yS.displayName=td;var _S="DialogTrigger",wS=g.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,i=Sn(_S,n),s=Xe(e,i.triggerRef);return w.jsx(Ee.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":ug(i.open),...r,ref:s,onClick:J(t.onClick,i.onOpenToggle)})});wS.displayName=_S;var ag="DialogPortal",[HN,xS]=mS(ag,{forceMount:void 0}),bS=t=>{const{__scopeDialog:e,forceMount:n,children:r,container:i}=t,s=Sn(ag,e);return w.jsx(HN,{scope:e,forceMount:n,children:g.Children.map(r,o=>w.jsx(gr,{present:n||s.open,children:w.jsx(Zc,{asChild:!0,container:i,children:o})}))})};bS.displayName=ag;var gc="DialogOverlay",ES=g.forwardRef((t,e)=>{const n=xS(gc,t.__scopeDialog),{forceMount:r=n.forceMount,...i}=t,s=Sn(gc,t.__scopeDialog);return s.modal?w.jsx(gr,{present:r||s.open,children:w.jsx(GN,{...i,ref:e})}):null});ES.displayName=gc;var WN=jN("DialogOverlay.RemoveScroll"),GN=g.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,i=Sn(gc,n);return w.jsx(og,{as:WN,allowPinchZoom:!0,shards:[i.contentRef],children:w.jsx(Ee.div,{"data-state":ug(i.open),...r,ref:e,style:{pointerEvents:"auto",...r.style}})})}),Ui="DialogContent",SS=g.forwardRef((t,e)=>{const n=xS(Ui,t.__scopeDialog),{forceMount:r=n.forceMount,...i}=t,s=Sn(Ui,t.__scopeDialog);return w.jsx(gr,{present:r||s.open,children:s.modal?w.jsx(KN,{...i,ref:e}):w.jsx(QN,{...i,ref:e})})});SS.displayName=Ui;var KN=g.forwardRef((t,e)=>{const n=Sn(Ui,t.__scopeDialog),r=g.useRef(null),i=Xe(e,n.contentRef,r);return g.useEffect(()=>{const s=r.current;if(s)return gS(s)},[]),w.jsx(CS,{...t,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:J(t.onCloseAutoFocus,s=>{var o;s.preventDefault(),(o=n.triggerRef.current)==null||o.focus()}),onPointerDownOutside:J(t.onPointerDownOutside,s=>{const o=s.detail.originalEvent,a=o.button===0&&o.ctrlKey===!0;(o.button===2||a)&&s.preventDefault()}),onFocusOutside:J(t.onFocusOutside,s=>s.preventDefault())})}),QN=g.forwardRef((t,e)=>{const n=Sn(Ui,t.__scopeDialog),r=g.useRef(!1),i=g.useRef(!1);return w.jsx(CS,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var o,a;(o=t.onCloseAutoFocus)==null||o.call(t,s),s.defaultPrevented||(r.current||(a=n.triggerRef.current)==null||a.focus(),s.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:s=>{var l,u;(l=t.onInteractOutside)==null||l.call(t,s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const o=s.target;((u=n.triggerRef.current)==null?void 0:u.contains(o))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&i.current&&s.preventDefault()}})}),CS=g.forwardRef((t,e)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:s,...o}=t,a=Sn(Ui,n),l=g.useRef(null),u=Xe(e,l);return aS(),w.jsxs(w.Fragment,{children:[w.jsx(sg,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:s,children:w.jsx(Jc,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":ug(a.open),...o,ref:u,onDismiss:()=>a.onOpenChange(!1)})}),w.jsxs(w.Fragment,{children:[w.jsx(YN,{titleId:a.titleId}),w.jsx(JN,{contentRef:l,descriptionId:a.descriptionId})]})]})}),lg="DialogTitle",kS=g.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,i=Sn(lg,n);return w.jsx(Ee.h2,{id:i.titleId,...r,ref:e})});kS.displayName=lg;var PS="DialogDescription",RS=g.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,i=Sn(PS,n);return w.jsx(Ee.p,{id:i.descriptionId,...r,ref:e})});RS.displayName=PS;var TS="DialogClose",IS=g.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,i=Sn(TS,n);return w.jsx(Ee.button,{type:"button",...r,ref:e,onClick:J(t.onClick,()=>i.onOpenChange(!1))})});IS.displayName=TS;function ug(t){return t?"open":"closed"}var OS="DialogTitleWarning",[m3,MS]=_A(OS,{contentName:Ui,titleName:lg,docsSlug:"dialog"}),YN=({titleId:t})=>{const e=MS(OS),n=`\`${e.contentName}\` requires a \`${e.titleName}\` for the component to be accessible for screen reader users. If you want to hide the \`${e.titleName}\`, you can wrap it with our VisuallyHidden component. -For more information, see https://radix-ui.com/primitives/docs/components/${e.docsSlug}`;return g.useEffect(()=>{t&&(document.getElementById(t)||console.error(n))},[n,t]),null},XN="DialogDescriptionWarning",JN=({contentRef:t,descriptionId:e})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${MS(XN).contentName}}.`;return g.useEffect(()=>{var s;const i=(s=t.current)==null?void 0:s.getAttribute("aria-describedby");e&&i&&(document.getElementById(e)||console.warn(r))},[r,t,e]),null},ZN=yS,e$=wS,t$=bS,n$=ES,r$=SS,i$=kS,_3=RS,s$=IS;const U_=t=>t.endsWith("/")?t.slice(0,-1):t;function Gi(t){return["1","true","yes"].includes(String(t??"").trim().toLowerCase())}function cg(){const t="https://paperswithcode.co".trim();if(!t)return"";try{const e=t.startsWith("http")?new URL(t):new URL(t,typeof window<"u"?window.location.origin:"http://localhost");return U_(e.origin)}catch{return U_(t)}}function o$(t){const e=t.startsWith("/")?t:`/${t}`,n=cg();return n?`${n}${e}`:e}function dg(t){const e=t.startsWith("/")?t:`/${t}`;return o$(e)}function AS(t,e={}){const n=dg("/api/v1/auth/hf/login"),i=new URL(n,window.location.origin).origin===window.location.origin?t:new URL(t,window.location.origin).toString(),s=new URLSearchParams({return_to:i});return e.authorizeInference&&s.set("authorize_inference","true"),e.collectEmail&&s.set("collect_email","true"),e.authorizeBucket&&s.set("authorize_bucket","true"),e.bucketCreate&&s.set("bucket_create","true"),`${n}?${s.toString()}`}function a$(){return dg("/admin-dashboard")}function w3(t){if(!t)return null;if(t.startsWith("http://")||t.startsWith("https://")||t.startsWith("data:")||t.startsWith("blob:")||t.startsWith("//"))return t;if(t.startsWith("/")){const e=cg();return e?`${e}${t}`:t}return t}function yo(){return Gi("1")}function Va(){return Gi("0")}const l$="https://paperswithcode.co/chat";function u$(){return yo()&&!Va()}function c$(){return Gi(void 0)}function x3(){return Va()&&Gi(void 0)}function b3(){return Gi("0")}function E3(){return Gi("0")}function S3(){return typeof window<"u"&&window.location.hostname==="staging.paperswithcode.co"}function d$(){return Gi("1")}const f$="/hf-logo.svg?v=20260513b",V_=({size:t=14})=>w.jsx("img",{src:f$,alt:"",width:Math.round(t*95/88),height:t,"aria-hidden":"true",draggable:!1,style:{display:"block"}});function C3(t,e=!1){return AS(t,{authorizeInference:e})}const NS=({returnTo:t,compact:e=!1,label:n="Sign in",authorizeInference:r=!1,collectEmail:i=!1})=>{if(yo())return null;const s=()=>{window.location.href=AS(t,{authorizeInference:r,collectEmail:i})};return e?w.jsx("button",{type:"button",className:"icon-btn","aria-label":"Sign in with Hugging Face",title:"Sign in with Hugging Face",onClick:s,children:w.jsx(V_,{size:16})}):w.jsxs("button",{type:"button",className:"hf-signin-btn",onClick:s,"aria-label":"Sign in with Hugging Face",children:[w.jsx(V_,{size:18}),w.jsx("span",{children:n})]})};function h$(t,e=[]){let n=[];function r(s,o){const a=g.createContext(o);a.displayName=s+"Context";const l=n.length;n=[...n,o];const u=d=>{var h;const{scope:f,children:_,...m}=d,p=((h=f==null?void 0:f[t])==null?void 0:h[l])||a,y=g.useMemo(()=>m,Object.values(m));return w.jsx(p.Provider,{value:y,children:_})};u.displayName=s+"Provider";function c(d,f){var p;const _=((p=f==null?void 0:f[t])==null?void 0:p[l])||a,m=g.useContext(_);if(m)return m;if(o!==void 0)return o;throw new Error(`\`${d}\` must be used within \`${s}\``)}return[u,c]}const i=()=>{const s=n.map(o=>g.createContext(o));return function(a){const l=(a==null?void 0:a[t])||s;return g.useMemo(()=>({[`__scope${t}`]:{...a,[t]:l}}),[a,l])}};return i.scopeName=t,[r,p$(i,...e)]}function p$(...t){const e=t[0];if(t.length===1)return e;const n=()=>{const r=t.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const o=r.reduce((a,{useScope:l,scopeName:u})=>{const d=l(s)[`__scope${u}`];return{...a,...d}},{});return g.useMemo(()=>({[`__scope${e.scopeName}`]:o}),[o])}};return n.scopeName=e.scopeName,n}var v$=Symbol.for("react.lazy"),mc=kc[" use ".trim().toString()];function g$(t){return typeof t=="object"&&t!==null&&"then"in t}function $S(t){return t!=null&&typeof t=="object"&&"$$typeof"in t&&t.$$typeof===v$&&"_payload"in t&&g$(t._payload)}function FS(t){const e=m$(t),n=g.forwardRef((r,i)=>{let{children:s,...o}=r;$S(s)&&typeof mc=="function"&&(s=mc(s._payload));const a=g.Children.toArray(s),l=a.find(_$);if(l){const u=l.props.children,c=a.map(d=>d===l?g.Children.count(u)>1?g.Children.only(null):g.isValidElement(u)?u.props.children:null:d);return w.jsx(e,{...o,ref:i,children:g.isValidElement(u)?g.cloneElement(u,void 0,c):null})}return w.jsx(e,{...o,ref:i,children:s})});return n.displayName=`${t}.Slot`,n}var k3=FS("Slot");function m$(t){const e=g.forwardRef((n,r)=>{let{children:i,...s}=n;if($S(i)&&typeof mc=="function"&&(i=mc(i._payload)),g.isValidElement(i)){const o=x$(i),a=w$(s,i.props);return i.type!==g.Fragment&&(a.ref=r?oi(r,o):o),g.cloneElement(i,a)}return g.Children.count(i)>1?g.Children.only(null):null});return e.displayName=`${t}.SlotClone`,e}var y$=Symbol("radix.slottable");function _$(t){return g.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===y$}function w$(t,e){const n={...e};for(const r in e){const i=t[r],s=e[r];/^on[A-Z]/.test(r)?i&&s?n[r]=(...a)=>{const l=s(...a);return i(...a),l}:i&&(n[r]=i):r==="style"?n[r]={...i,...s}:r==="className"&&(n[r]=[i,s].filter(Boolean).join(" "))}return{...t,...n}}function x$(t){var r,i;let e=(r=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:r.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(i=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:i.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}var b$=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],fg=b$.reduce((t,e)=>{const n=FS(`Primitive.${e}`),r=g.forwardRef((i,s)=>{const{asChild:o,...a}=i,l=o?n:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),w.jsx(l,{...a,ref:s})});return r.displayName=`Primitive.${e}`,{...t,[e]:r}},{}),LS={exports:{}},jS={};/** +For more information, see https://radix-ui.com/primitives/docs/components/${e.docsSlug}`;return g.useEffect(()=>{t&&(document.getElementById(t)||console.error(n))},[n,t]),null},XN="DialogDescriptionWarning",JN=({contentRef:t,descriptionId:e})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${MS(XN).contentName}}.`;return g.useEffect(()=>{var s;const i=(s=t.current)==null?void 0:s.getAttribute("aria-describedby");e&&i&&(document.getElementById(e)||console.warn(r))},[r,t,e]),null},ZN=yS,e$=wS,t$=bS,n$=ES,r$=SS,i$=kS,y3=RS,s$=IS;const U_=t=>t.endsWith("/")?t.slice(0,-1):t;function Gi(t){return["1","true","yes"].includes(String(t??"").trim().toLowerCase())}function cg(){const t="https://paperswithcode.co".trim();if(!t)return"";try{const e=t.startsWith("http")?new URL(t):new URL(t,typeof window<"u"?window.location.origin:"http://localhost");return U_(e.origin)}catch{return U_(t)}}function o$(t){const e=t.startsWith("/")?t:`/${t}`,n=cg();return n?`${n}${e}`:e}function dg(t){const e=t.startsWith("/")?t:`/${t}`;return o$(e)}function AS(t,e={}){const n=dg("/api/v1/auth/hf/login"),i=new URL(n,window.location.origin).origin===window.location.origin?t:new URL(t,window.location.origin).toString(),s=new URLSearchParams({return_to:i});return e.authorizeInference&&s.set("authorize_inference","true"),e.collectEmail&&s.set("collect_email","true"),e.authorizeBucket&&s.set("authorize_bucket","true"),e.bucketCreate&&s.set("bucket_create","true"),`${n}?${s.toString()}`}function a$(){return dg("/admin-dashboard")}function _3(t){if(!t)return null;if(t.startsWith("http://")||t.startsWith("https://")||t.startsWith("data:")||t.startsWith("blob:")||t.startsWith("//"))return t;if(t.startsWith("/")){const e=cg();return e?`${e}${t}`:t}return t}function yo(){return Gi("1")}function Va(){return Gi("0")}const l$="https://paperswithcode.co/chat";function u$(){return yo()&&!Va()}function c$(){return Gi(void 0)}function w3(){return Va()&&Gi(void 0)}function x3(){return Gi("0")}function b3(){return Gi("0")}function E3(){return typeof window<"u"&&window.location.hostname==="staging.paperswithcode.co"}function d$(){return Gi("1")}const f$="/hf-logo.svg?v=20260513b",V_=({size:t=14})=>w.jsx("img",{src:f$,alt:"",width:Math.round(t*95/88),height:t,"aria-hidden":"true",draggable:!1,style:{display:"block"}});function S3(t,e=!1){return AS(t,{authorizeInference:e})}const NS=({returnTo:t,compact:e=!1,label:n="Sign in",authorizeInference:r=!1,collectEmail:i=!1})=>{if(yo())return null;const s=()=>{window.location.href=AS(t,{authorizeInference:r,collectEmail:i})};return e?w.jsx("button",{type:"button",className:"icon-btn","aria-label":"Sign in with Hugging Face",title:"Sign in with Hugging Face",onClick:s,children:w.jsx(V_,{size:16})}):w.jsxs("button",{type:"button",className:"hf-signin-btn",onClick:s,"aria-label":"Sign in with Hugging Face",children:[w.jsx(V_,{size:18}),w.jsx("span",{children:n})]})};function h$(t,e=[]){let n=[];function r(s,o){const a=g.createContext(o);a.displayName=s+"Context";const l=n.length;n=[...n,o];const u=d=>{var h;const{scope:f,children:_,...m}=d,p=((h=f==null?void 0:f[t])==null?void 0:h[l])||a,y=g.useMemo(()=>m,Object.values(m));return w.jsx(p.Provider,{value:y,children:_})};u.displayName=s+"Provider";function c(d,f){var p;const _=((p=f==null?void 0:f[t])==null?void 0:p[l])||a,m=g.useContext(_);if(m)return m;if(o!==void 0)return o;throw new Error(`\`${d}\` must be used within \`${s}\``)}return[u,c]}const i=()=>{const s=n.map(o=>g.createContext(o));return function(a){const l=(a==null?void 0:a[t])||s;return g.useMemo(()=>({[`__scope${t}`]:{...a,[t]:l}}),[a,l])}};return i.scopeName=t,[r,p$(i,...e)]}function p$(...t){const e=t[0];if(t.length===1)return e;const n=()=>{const r=t.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const o=r.reduce((a,{useScope:l,scopeName:u})=>{const d=l(s)[`__scope${u}`];return{...a,...d}},{});return g.useMemo(()=>({[`__scope${e.scopeName}`]:o}),[o])}};return n.scopeName=e.scopeName,n}var v$=Symbol.for("react.lazy"),mc=kc[" use ".trim().toString()];function g$(t){return typeof t=="object"&&t!==null&&"then"in t}function $S(t){return t!=null&&typeof t=="object"&&"$$typeof"in t&&t.$$typeof===v$&&"_payload"in t&&g$(t._payload)}function FS(t){const e=m$(t),n=g.forwardRef((r,i)=>{let{children:s,...o}=r;$S(s)&&typeof mc=="function"&&(s=mc(s._payload));const a=g.Children.toArray(s),l=a.find(_$);if(l){const u=l.props.children,c=a.map(d=>d===l?g.Children.count(u)>1?g.Children.only(null):g.isValidElement(u)?u.props.children:null:d);return w.jsx(e,{...o,ref:i,children:g.isValidElement(u)?g.cloneElement(u,void 0,c):null})}return w.jsx(e,{...o,ref:i,children:s})});return n.displayName=`${t}.Slot`,n}var C3=FS("Slot");function m$(t){const e=g.forwardRef((n,r)=>{let{children:i,...s}=n;if($S(i)&&typeof mc=="function"&&(i=mc(i._payload)),g.isValidElement(i)){const o=x$(i),a=w$(s,i.props);return i.type!==g.Fragment&&(a.ref=r?oi(r,o):o),g.cloneElement(i,a)}return g.Children.count(i)>1?g.Children.only(null):null});return e.displayName=`${t}.SlotClone`,e}var y$=Symbol("radix.slottable");function _$(t){return g.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===y$}function w$(t,e){const n={...e};for(const r in e){const i=t[r],s=e[r];/^on[A-Z]/.test(r)?i&&s?n[r]=(...a)=>{const l=s(...a);return i(...a),l}:i&&(n[r]=i):r==="style"?n[r]={...i,...s}:r==="className"&&(n[r]=[i,s].filter(Boolean).join(" "))}return{...t,...n}}function x$(t){var r,i;let e=(r=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:r.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(i=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:i.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}var b$=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],fg=b$.reduce((t,e)=>{const n=FS(`Primitive.${e}`),r=g.forwardRef((i,s)=>{const{asChild:o,...a}=i,l=o?n:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),w.jsx(l,{...a,ref:s})});return r.displayName=`Primitive.${e}`,{...t,[e]:r}},{}),LS={exports:{}},jS={};/** * @license React * use-sync-external-store-shim.production.js * @@ -119,7 +119,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${e.do * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var fo=g;function E$(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var S$=typeof Object.is=="function"?Object.is:E$,C$=fo.useState,k$=fo.useEffect,P$=fo.useLayoutEffect,R$=fo.useDebugValue;function T$(t,e){var n=e(),r=C$({inst:{value:n,getSnapshot:e}}),i=r[0].inst,s=r[1];return P$(function(){i.value=n,i.getSnapshot=e,Rf(i)&&s({inst:i})},[t,n,e]),k$(function(){return Rf(i)&&s({inst:i}),t(function(){Rf(i)&&s({inst:i})})},[t]),R$(n),n}function Rf(t){var e=t.getSnapshot;t=t.value;try{var n=e();return!S$(t,n)}catch{return!0}}function I$(t,e){return e()}var O$=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?I$:T$;jS.useSyncExternalStore=fo.useSyncExternalStore!==void 0?fo.useSyncExternalStore:O$;LS.exports=jS;var M$=LS.exports;function A$(){return M$.useSyncExternalStore(N$,()=>!0,()=>!1)}function N$(){return()=>{}}var hg="Avatar",[$$]=h$(hg),[F$,DS]=$$(hg),zS=g.forwardRef((t,e)=>{const{__scopeAvatar:n,...r}=t,[i,s]=g.useState("idle");return w.jsx(F$,{scope:n,imageLoadingStatus:i,onImageLoadingStatusChange:s,children:w.jsx(fg.span,{...r,ref:e})})});zS.displayName=hg;var US="AvatarImage",VS=g.forwardRef((t,e)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:i=()=>{},...s}=t,o=DS(US,n),a=L$(r,s),l=Ft(u=>{i(u),o.onImageLoadingStatusChange(u)});return on(()=>{a!=="idle"&&l(a)},[a,l]),a==="loaded"?w.jsx(fg.img,{...s,ref:e,src:r}):null});VS.displayName=US;var BS="AvatarFallback",qS=g.forwardRef((t,e)=>{const{__scopeAvatar:n,delayMs:r,...i}=t,s=DS(BS,n),[o,a]=g.useState(r===void 0);return g.useEffect(()=>{if(r!==void 0){const l=window.setTimeout(()=>a(!0),r);return()=>window.clearTimeout(l)}},[r]),o&&s.imageLoadingStatus!=="loaded"?w.jsx(fg.span,{...i,ref:e}):null});qS.displayName=BS;function B_(t,e){return t?e?(t.src!==e&&(t.src=e),t.complete&&t.naturalWidth>0?"loaded":"loading"):"error":"idle"}function L$(t,{referrerPolicy:e,crossOrigin:n}){const r=A$(),i=g.useRef(null),s=r?(i.current||(i.current=new window.Image),i.current):null,[o,a]=g.useState(()=>B_(s,t));return on(()=>{a(B_(s,t))},[s,t]),on(()=>{const l=d=>()=>{a(d)};if(!s)return;const u=l("loaded"),c=l("error");return s.addEventListener("load",u),s.addEventListener("error",c),e&&(s.referrerPolicy=e),typeof n=="string"&&(s.crossOrigin=n),()=>{s.removeEventListener("load",u),s.removeEventListener("error",c)}},[s,n,e]),o}var HS=zS,WS=VS,GS=qS;function KS(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var i=t.length;for(e=0;e{const e=z$(t),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=t;return{getClassGroupId:o=>{const a=o.split(pg);return a[0]===""&&a.length!==1&&a.shift(),YS(a,e)||D$(o)},getConflictingClassGroupIds:(o,a)=>{const l=n[o]||[];return a&&r[o]?[...l,...r[o]]:l}}},YS=(t,e)=>{var o;if(t.length===0)return e.classGroupId;const n=t[0],r=e.nextPart.get(n),i=r?YS(t.slice(1),r):void 0;if(i)return i;if(e.validators.length===0)return;const s=t.join(pg);return(o=e.validators.find(({validator:a})=>a(s)))==null?void 0:o.classGroupId},q_=/^\[(.+)\]$/,D$=t=>{if(q_.test(t)){const e=q_.exec(t)[1],n=e==null?void 0:e.substring(0,e.indexOf(":"));if(n)return"arbitrary.."+n}},z$=t=>{const{theme:e,prefix:n}=t,r={nextPart:new Map,validators:[]};return V$(Object.entries(t.classGroups),n).forEach(([s,o])=>{Pp(o,r,s,e)}),r},Pp=(t,e,n,r)=>{t.forEach(i=>{if(typeof i=="string"){const s=i===""?e:H_(e,i);s.classGroupId=n;return}if(typeof i=="function"){if(U$(i)){Pp(i(r),e,n,r);return}e.validators.push({validator:i,classGroupId:n});return}Object.entries(i).forEach(([s,o])=>{Pp(o,H_(e,s),n,r)})})},H_=(t,e)=>{let n=t;return e.split(pg).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},U$=t=>t.isThemeGetter,V$=(t,e)=>e?t.map(([n,r])=>{const i=r.map(s=>typeof s=="string"?e+s:typeof s=="object"?Object.fromEntries(Object.entries(s).map(([o,a])=>[e+o,a])):s);return[n,i]}):t,B$=t=>{if(t<1)return{get:()=>{},set:()=>{}};let e=0,n=new Map,r=new Map;const i=(s,o)=>{n.set(s,o),e++,e>t&&(e=0,r=n,n=new Map)};return{get(s){let o=n.get(s);if(o!==void 0)return o;if((o=r.get(s))!==void 0)return i(s,o),o},set(s,o){n.has(s)?n.set(s,o):i(s,o)}}},XS="!",q$=t=>{const{separator:e,experimentalParseClassName:n}=t,r=e.length===1,i=e[0],s=e.length,o=a=>{const l=[];let u=0,c=0,d;for(let y=0;yc?d-c:void 0;return{modifiers:l,hasImportantModifier:_,baseClassName:m,maybePostfixModifierPosition:p}};return n?a=>n({className:a,parseClassName:o}):o},H$=t=>{if(t.length<=1)return t;const e=[];let n=[];return t.forEach(r=>{r[0]==="["?(e.push(...n.sort(),r),n=[]):n.push(r)}),e.push(...n.sort()),e},W$=t=>({cache:B$(t.cacheSize),parseClassName:q$(t),...j$(t)}),G$=/\s+/,K$=(t,e)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i}=e,s=[],o=t.trim().split(G$);let a="";for(let l=o.length-1;l>=0;l-=1){const u=o[l],{modifiers:c,hasImportantModifier:d,baseClassName:f,maybePostfixModifierPosition:_}=n(u);let m=!!_,p=r(m?f.substring(0,_):f);if(!p){if(!m){a=u+(a.length>0?" "+a:a);continue}if(p=r(f),!p){a=u+(a.length>0?" "+a:a);continue}m=!1}const y=H$(c).join(":"),h=d?y+XS:y,v=h+p;if(s.includes(v))continue;s.push(v);const x=i(p,m);for(let b=0;b0?" "+a:a)}return a};function Q$(){let t=0,e,n,r="";for(;t{if(typeof t=="string")return t;let e,n="";for(let r=0;rd(c),t());return n=W$(u),r=n.cache.get,i=n.cache.set,s=a,a(l)}function a(l){const u=r(l);if(u)return u;const c=K$(l,n);return i(l,c),c}return function(){return s(Q$.apply(null,arguments))}}const Re=t=>{const e=n=>n[t]||[];return e.isThemeGetter=!0,e},ZS=/^\[(?:([a-z-]+):)?(.+)\]$/i,X$=/^\d+\/\d+$/,J$=new Set(["px","full","screen"]),Z$=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,eF=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,tF=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,nF=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,rF=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Wn=t=>js(t)||J$.has(t)||X$.test(t),Sr=t=>_o(t,"length",dF),js=t=>!!t&&!Number.isNaN(Number(t)),Tf=t=>_o(t,"number",js),zo=t=>!!t&&Number.isInteger(Number(t)),iF=t=>t.endsWith("%")&&js(t.slice(0,-1)),re=t=>ZS.test(t),Cr=t=>Z$.test(t),sF=new Set(["length","size","percentage"]),oF=t=>_o(t,sF,e1),aF=t=>_o(t,"position",e1),lF=new Set(["image","url"]),uF=t=>_o(t,lF,hF),cF=t=>_o(t,"",fF),Uo=()=>!0,_o=(t,e,n)=>{const r=ZS.exec(t);return r?r[1]?typeof e=="string"?r[1]===e:e.has(r[1]):n(r[2]):!1},dF=t=>eF.test(t)&&!tF.test(t),e1=()=>!1,fF=t=>nF.test(t),hF=t=>rF.test(t),pF=()=>{const t=Re("colors"),e=Re("spacing"),n=Re("blur"),r=Re("brightness"),i=Re("borderColor"),s=Re("borderRadius"),o=Re("borderSpacing"),a=Re("borderWidth"),l=Re("contrast"),u=Re("grayscale"),c=Re("hueRotate"),d=Re("invert"),f=Re("gap"),_=Re("gradientColorStops"),m=Re("gradientColorStopPositions"),p=Re("inset"),y=Re("margin"),h=Re("opacity"),v=Re("padding"),x=Re("saturate"),b=Re("scale"),E=Re("sepia"),S=Re("skew"),k=Re("space"),C=Re("translate"),R=()=>["auto","contain","none"],P=()=>["auto","hidden","clip","visible","scroll"],$=()=>["auto",re,e],O=()=>[re,e],U=()=>["",Wn,Sr],L=()=>["auto",js,re],H=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],q=()=>["solid","dashed","dotted","double","none"],K=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],I=()=>["start","end","center","between","around","evenly","stretch"],M=()=>["","0",re],B=()=>["auto","avoid","all","avoid-page","page","left","right","column"],G=()=>[js,re];return{cacheSize:500,separator:":",theme:{colors:[Uo],spacing:[Wn,Sr],blur:["none","",Cr,re],brightness:G(),borderColor:[t],borderRadius:["none","","full",Cr,re],borderSpacing:O(),borderWidth:U(),contrast:G(),grayscale:M(),hueRotate:G(),invert:M(),gap:O(),gradientColorStops:[t],gradientColorStopPositions:[iF,Sr],inset:$(),margin:$(),opacity:G(),padding:O(),saturate:G(),scale:G(),sepia:M(),skew:G(),space:O(),translate:O()},classGroups:{aspect:[{aspect:["auto","square","video",re]}],container:["container"],columns:[{columns:[Cr]}],"break-after":[{"break-after":B()}],"break-before":[{"break-before":B()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...H(),re]}],overflow:[{overflow:P()}],"overflow-x":[{"overflow-x":P()}],"overflow-y":[{"overflow-y":P()}],overscroll:[{overscroll:R()}],"overscroll-x":[{"overscroll-x":R()}],"overscroll-y":[{"overscroll-y":R()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[p]}],"inset-x":[{"inset-x":[p]}],"inset-y":[{"inset-y":[p]}],start:[{start:[p]}],end:[{end:[p]}],top:[{top:[p]}],right:[{right:[p]}],bottom:[{bottom:[p]}],left:[{left:[p]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",zo,re]}],basis:[{basis:$()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",re]}],grow:[{grow:M()}],shrink:[{shrink:M()}],order:[{order:["first","last","none",zo,re]}],"grid-cols":[{"grid-cols":[Uo]}],"col-start-end":[{col:["auto",{span:["full",zo,re]},re]}],"col-start":[{"col-start":L()}],"col-end":[{"col-end":L()}],"grid-rows":[{"grid-rows":[Uo]}],"row-start-end":[{row:["auto",{span:[zo,re]},re]}],"row-start":[{"row-start":L()}],"row-end":[{"row-end":L()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",re]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",re]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal",...I()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...I(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...I(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[v]}],px:[{px:[v]}],py:[{py:[v]}],ps:[{ps:[v]}],pe:[{pe:[v]}],pt:[{pt:[v]}],pr:[{pr:[v]}],pb:[{pb:[v]}],pl:[{pl:[v]}],m:[{m:[y]}],mx:[{mx:[y]}],my:[{my:[y]}],ms:[{ms:[y]}],me:[{me:[y]}],mt:[{mt:[y]}],mr:[{mr:[y]}],mb:[{mb:[y]}],ml:[{ml:[y]}],"space-x":[{"space-x":[k]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[k]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",re,e]}],"min-w":[{"min-w":[re,e,"min","max","fit"]}],"max-w":[{"max-w":[re,e,"none","full","min","max","fit","prose",{screen:[Cr]},Cr]}],h:[{h:[re,e,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[re,e,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[re,e,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[re,e,"auto","min","max","fit"]}],"font-size":[{text:["base",Cr,Sr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Tf]}],"font-family":[{font:[Uo]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",re]}],"line-clamp":[{"line-clamp":["none",js,Tf]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Wn,re]}],"list-image":[{"list-image":["none",re]}],"list-style-type":[{list:["none","disc","decimal",re]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[t]}],"placeholder-opacity":[{"placeholder-opacity":[h]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[t]}],"text-opacity":[{"text-opacity":[h]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...q(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Wn,Sr]}],"underline-offset":[{"underline-offset":["auto",Wn,re]}],"text-decoration-color":[{decoration:[t]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:O()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",re]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",re]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[h]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...H(),aF]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",oF]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},uF]}],"bg-color":[{bg:[t]}],"gradient-from-pos":[{from:[m]}],"gradient-via-pos":[{via:[m]}],"gradient-to-pos":[{to:[m]}],"gradient-from":[{from:[_]}],"gradient-via":[{via:[_]}],"gradient-to":[{to:[_]}],rounded:[{rounded:[s]}],"rounded-s":[{"rounded-s":[s]}],"rounded-e":[{"rounded-e":[s]}],"rounded-t":[{"rounded-t":[s]}],"rounded-r":[{"rounded-r":[s]}],"rounded-b":[{"rounded-b":[s]}],"rounded-l":[{"rounded-l":[s]}],"rounded-ss":[{"rounded-ss":[s]}],"rounded-se":[{"rounded-se":[s]}],"rounded-ee":[{"rounded-ee":[s]}],"rounded-es":[{"rounded-es":[s]}],"rounded-tl":[{"rounded-tl":[s]}],"rounded-tr":[{"rounded-tr":[s]}],"rounded-br":[{"rounded-br":[s]}],"rounded-bl":[{"rounded-bl":[s]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[h]}],"border-style":[{border:[...q(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[h]}],"divide-style":[{divide:q()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-s":[{"border-s":[i]}],"border-color-e":[{"border-e":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["",...q()]}],"outline-offset":[{"outline-offset":[Wn,re]}],"outline-w":[{outline:[Wn,Sr]}],"outline-color":[{outline:[t]}],"ring-w":[{ring:U()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[t]}],"ring-opacity":[{"ring-opacity":[h]}],"ring-offset-w":[{"ring-offset":[Wn,Sr]}],"ring-offset-color":[{"ring-offset":[t]}],shadow:[{shadow:["","inner","none",Cr,cF]}],"shadow-color":[{shadow:[Uo]}],opacity:[{opacity:[h]}],"mix-blend":[{"mix-blend":[...K(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":K()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Cr,re]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[c]}],invert:[{invert:[d]}],saturate:[{saturate:[x]}],sepia:[{sepia:[E]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[c]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[h]}],"backdrop-saturate":[{"backdrop-saturate":[x]}],"backdrop-sepia":[{"backdrop-sepia":[E]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[o]}],"border-spacing-x":[{"border-spacing-x":[o]}],"border-spacing-y":[{"border-spacing-y":[o]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",re]}],duration:[{duration:G()}],ease:[{ease:["linear","in","out","in-out",re]}],delay:[{delay:G()}],animate:[{animate:["none","spin","ping","pulse","bounce",re]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[b]}],"scale-x":[{"scale-x":[b]}],"scale-y":[{"scale-y":[b]}],rotate:[{rotate:[zo,re]}],"translate-x":[{"translate-x":[C]}],"translate-y":[{"translate-y":[C]}],"skew-x":[{"skew-x":[S]}],"skew-y":[{"skew-y":[S]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",re]}],accent:[{accent:["auto",t]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",re]}],"caret-color":[{caret:[t]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":O()}],"scroll-mx":[{"scroll-mx":O()}],"scroll-my":[{"scroll-my":O()}],"scroll-ms":[{"scroll-ms":O()}],"scroll-me":[{"scroll-me":O()}],"scroll-mt":[{"scroll-mt":O()}],"scroll-mr":[{"scroll-mr":O()}],"scroll-mb":[{"scroll-mb":O()}],"scroll-ml":[{"scroll-ml":O()}],"scroll-p":[{"scroll-p":O()}],"scroll-px":[{"scroll-px":O()}],"scroll-py":[{"scroll-py":O()}],"scroll-ps":[{"scroll-ps":O()}],"scroll-pe":[{"scroll-pe":O()}],"scroll-pt":[{"scroll-pt":O()}],"scroll-pr":[{"scroll-pr":O()}],"scroll-pb":[{"scroll-pb":O()}],"scroll-pl":[{"scroll-pl":O()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",re]}],fill:[{fill:[t,"none"]}],"stroke-w":[{stroke:[Wn,Sr,Tf]}],stroke:[{stroke:[t,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},vF=Y$(pF);function at(...t){return vF(QS(t))}function P3(t){const e=t.trim(),n=e.match(/^(\d{4})-(\d{4,5})(v\d+)?$/);if(n)return`${n[1]}.${n[2]}`;const r=e.match(/^(\d{4}\.\d{4,5})(v\d+)$/);return r?r[1]:e}function R3(t){if(t==null||t==="")return"—";const e=typeof t=="string"?parseFloat(t):t;return Number.isFinite(e)?Math.abs(e)>=100?Bl(e,0):Math.abs(e)>=10?Bl(e,1):Math.abs(e)<1?Bl(e,3):Bl(e,2):String(t)}function Bl(t,e){const n=String(Math.abs(t));if(n.includes("e"))return t.toFixed(e);const r=+`${Math.round(+`${n}e${e}`)}e-${e}`;return(t<0?-r:r).toFixed(e)}const t1=g.forwardRef(({className:t,...e},n)=>w.jsx(HS,{ref:n,className:at("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",t),...e}));t1.displayName=HS.displayName;const n1=g.forwardRef(({className:t,...e},n)=>w.jsx(WS,{ref:n,className:at("aspect-square h-full w-full",t),...e}));n1.displayName=WS.displayName;const r1=g.forwardRef(({className:t,...e},n)=>w.jsx(GS,{ref:n,className:at("flex h-full w-full items-center justify-center rounded-full bg-muted",t),...e}));r1.displayName=GS.displayName;function W_(t){const e=gF(t),n=g.forwardRef((r,i)=>{const{children:s,...o}=r,a=g.Children.toArray(s),l=a.find(yF);if(l){const u=l.props.children,c=a.map(d=>d===l?g.Children.count(u)>1?g.Children.only(null):g.isValidElement(u)?u.props.children:null:d);return w.jsx(e,{...o,ref:i,children:g.isValidElement(u)?g.cloneElement(u,void 0,c):null})}return w.jsx(e,{...o,ref:i,children:s})});return n.displayName=`${t}.Slot`,n}function gF(t){const e=g.forwardRef((n,r)=>{const{children:i,...s}=n;if(g.isValidElement(i)){const o=wF(i),a=_F(s,i.props);return i.type!==g.Fragment&&(a.ref=r?oi(r,o):o),g.cloneElement(i,a)}return g.Children.count(i)>1?g.Children.only(null):null});return e.displayName=`${t}.SlotClone`,e}var mF=Symbol("radix.slottable");function yF(t){return g.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===mF}function _F(t,e){const n={...e};for(const r in e){const i=t[r],s=e[r];/^on[A-Z]/.test(r)?i&&s?n[r]=(...a)=>{const l=s(...a);return i(...a),l}:i&&(n[r]=i):r==="style"?n[r]={...i,...s}:r==="className"&&(n[r]=[i,s].filter(Boolean).join(" "))}return{...t,...n}}function wF(t){var r,i;let e=(r=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:r.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(i=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:i.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}function vg(t){const e=t+"CollectionProvider",[n,r]=Wi(e),[i,s]=n(e,{collectionRef:{current:null},itemMap:new Map}),o=p=>{const{scope:y,children:h}=p,v=V.useRef(null),x=V.useRef(new Map).current;return w.jsx(i,{scope:y,itemMap:x,collectionRef:v,children:h})};o.displayName=e;const a=t+"CollectionSlot",l=W_(a),u=V.forwardRef((p,y)=>{const{scope:h,children:v}=p,x=s(a,h),b=Xe(y,x.collectionRef);return w.jsx(l,{ref:b,children:v})});u.displayName=a;const c=t+"CollectionItemSlot",d="data-radix-collection-item",f=W_(c),_=V.forwardRef((p,y)=>{const{scope:h,children:v,...x}=p,b=V.useRef(null),E=Xe(y,b),S=s(c,h);return V.useEffect(()=>(S.itemMap.set(b,{ref:b,...x}),()=>void S.itemMap.delete(b))),w.jsx(f,{[d]:"",ref:E,children:v})});_.displayName=c;function m(p){const y=s(t+"CollectionConsumer",p);return V.useCallback(()=>{const v=y.collectionRef.current;if(!v)return[];const x=Array.from(v.querySelectorAll(`[${d}]`));return Array.from(y.itemMap.values()).sort((S,k)=>x.indexOf(S.ref.current)-x.indexOf(k.ref.current))},[y.collectionRef,y.itemMap])}return[{Provider:o,Slot:u,ItemSlot:_},m,r]}var xF=g.createContext(void 0);function i1(t){const e=g.useContext(xF);return t||e||"ltr"}const bF=["top","right","bottom","left"],ti=Math.min,zt=Math.max,yc=Math.round,ql=Math.floor,Un=t=>({x:t,y:t}),EF={left:"right",right:"left",bottom:"top",top:"bottom"};function Rp(t,e,n){return zt(t,ti(e,n))}function fr(t,e){return typeof t=="function"?t(e):t}function hr(t){return t.split("-")[0]}function wo(t){return t.split("-")[1]}function gg(t){return t==="x"?"y":"x"}function mg(t){return t==="y"?"height":"width"}function jn(t){const e=t[0];return e==="t"||e==="b"?"y":"x"}function yg(t){return gg(jn(t))}function SF(t,e,n){n===void 0&&(n=!1);const r=wo(t),i=yg(t),s=mg(i);let o=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(o=_c(o)),[o,_c(o)]}function CF(t){const e=_c(t);return[Tp(t),e,Tp(e)]}function Tp(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}const G_=["left","right"],K_=["right","left"],kF=["top","bottom"],PF=["bottom","top"];function RF(t,e,n){switch(t){case"top":case"bottom":return n?e?K_:G_:e?G_:K_;case"left":case"right":return e?kF:PF;default:return[]}}function TF(t,e,n,r){const i=wo(t);let s=RF(hr(t),n==="start",r);return i&&(s=s.map(o=>o+"-"+i),e&&(s=s.concat(s.map(Tp)))),s}function _c(t){const e=hr(t);return EF[e]+t.slice(e.length)}function IF(t){return{top:0,right:0,bottom:0,left:0,...t}}function s1(t){return typeof t!="number"?IF(t):{top:t,right:t,bottom:t,left:t}}function wc(t){const{x:e,y:n,width:r,height:i}=t;return{width:r,height:i,top:n,left:e,right:e+r,bottom:n+i,x:e,y:n}}function Q_(t,e,n){let{reference:r,floating:i}=t;const s=jn(e),o=yg(e),a=mg(o),l=hr(e),u=s==="y",c=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[a]/2-i[a]/2;let _;switch(l){case"top":_={x:c,y:r.y-i.height};break;case"bottom":_={x:c,y:r.y+r.height};break;case"right":_={x:r.x+r.width,y:d};break;case"left":_={x:r.x-i.width,y:d};break;default:_={x:r.x,y:r.y}}switch(wo(e)){case"start":_[o]-=f*(n&&u?-1:1);break;case"end":_[o]+=f*(n&&u?-1:1);break}return _}async function OF(t,e){var n;e===void 0&&(e={});const{x:r,y:i,platform:s,rects:o,elements:a,strategy:l}=t,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:f=!1,padding:_=0}=fr(e,t),m=s1(_),y=a[f?d==="floating"?"reference":"floating":d],h=wc(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(y)))==null||n?y:y.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:u,rootBoundary:c,strategy:l})),v=d==="floating"?{x:r,y:i,width:o.floating.width,height:o.floating.height}:o.reference,x=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),b=await(s.isElement==null?void 0:s.isElement(x))?await(s.getScale==null?void 0:s.getScale(x))||{x:1,y:1}:{x:1,y:1},E=wc(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:v,offsetParent:x,strategy:l}):v);return{top:(h.top-E.top+m.top)/b.y,bottom:(E.bottom-h.bottom+m.bottom)/b.y,left:(h.left-E.left+m.left)/b.x,right:(E.right-h.right+m.right)/b.x}}const MF=50,AF=async(t,e,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:s=[],platform:o}=n,a=o.detectOverflow?o:{...o,detectOverflow:OF},l=await(o.isRTL==null?void 0:o.isRTL(e));let u=await o.getElementRects({reference:t,floating:e,strategy:i}),{x:c,y:d}=Q_(u,r,l),f=r,_=0;const m={};for(let p=0;p({name:"arrow",options:t,async fn(e){const{x:n,y:r,placement:i,rects:s,platform:o,elements:a,middlewareData:l}=e,{element:u,padding:c=0}=fr(t,e)||{};if(u==null)return{};const d=s1(c),f={x:n,y:r},_=yg(i),m=mg(_),p=await o.getDimensions(u),y=_==="y",h=y?"top":"left",v=y?"bottom":"right",x=y?"clientHeight":"clientWidth",b=s.reference[m]+s.reference[_]-f[_]-s.floating[m],E=f[_]-s.reference[_],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(u));let k=S?S[x]:0;(!k||!await(o.isElement==null?void 0:o.isElement(S)))&&(k=a.floating[x]||s.floating[m]);const C=b/2-E/2,R=k/2-p[m]/2-1,P=ti(d[h],R),$=ti(d[v],R),O=P,U=k-p[m]-$,L=k/2-p[m]/2+C,H=Rp(O,L,U),q=!l.arrow&&wo(i)!=null&&L!==H&&s.reference[m]/2-(LL<=0)){var $,O;const L=((($=s.flip)==null?void 0:$.index)||0)+1,H=k[L];if(H&&(!(d==="alignment"?v!==jn(H):!1)||P.every(I=>jn(I.placement)===v?I.overflows[0]>0:!0)))return{data:{index:L,overflows:P},reset:{placement:H}};let q=(O=P.filter(K=>K.overflows[0]<=0).sort((K,I)=>K.overflows[1]-I.overflows[1])[0])==null?void 0:O.placement;if(!q)switch(_){case"bestFit":{var U;const K=(U=P.filter(I=>{if(S){const M=jn(I.placement);return M===v||M==="y"}return!0}).map(I=>[I.placement,I.overflows.filter(M=>M>0).reduce((M,B)=>M+B,0)]).sort((I,M)=>I[1]-M[1])[0])==null?void 0:U[0];K&&(q=K);break}case"initialPlacement":q=a;break}if(i!==q)return{reset:{placement:q}}}return{}}}};function Y_(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function X_(t){return bF.some(e=>t[e]>=0)}const FF=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:n,platform:r}=e,{strategy:i="referenceHidden",...s}=fr(t,e);switch(i){case"referenceHidden":{const o=await r.detectOverflow(e,{...s,elementContext:"reference"}),a=Y_(o,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:X_(a)}}}case"escaped":{const o=await r.detectOverflow(e,{...s,altBoundary:!0}),a=Y_(o,n.floating);return{data:{escapedOffsets:a,escaped:X_(a)}}}default:return{}}}}},o1=new Set(["left","top"]);async function LF(t,e){const{placement:n,platform:r,elements:i}=t,s=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=hr(n),a=wo(n),l=jn(n)==="y",u=o1.has(o)?-1:1,c=s&&l?-1:1,d=fr(e,t);let{mainAxis:f,crossAxis:_,alignmentAxis:m}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&typeof m=="number"&&(_=a==="end"?m*-1:m),l?{x:_*c,y:f*u}:{x:f*u,y:_*c}}const jF=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,r;const{x:i,y:s,placement:o,middlewareData:a}=e,l=await LF(e,t);return o===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:i+l.x,y:s+l.y,data:{...l,placement:o}}}}},DF=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:r,placement:i,platform:s}=e,{mainAxis:o=!0,crossAxis:a=!1,limiter:l={fn:h=>{let{x:v,y:x}=h;return{x:v,y:x}}},...u}=fr(t,e),c={x:n,y:r},d=await s.detectOverflow(e,u),f=jn(hr(i)),_=gg(f);let m=c[_],p=c[f];if(o){const h=_==="y"?"top":"left",v=_==="y"?"bottom":"right",x=m+d[h],b=m-d[v];m=Rp(x,m,b)}if(a){const h=f==="y"?"top":"left",v=f==="y"?"bottom":"right",x=p+d[h],b=p-d[v];p=Rp(x,p,b)}const y=l.fn({...e,[_]:m,[f]:p});return{...y,data:{x:y.x-n,y:y.y-r,enabled:{[_]:o,[f]:a}}}}}},zF=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:n,y:r,placement:i,rects:s,middlewareData:o}=e,{offset:a=0,mainAxis:l=!0,crossAxis:u=!0}=fr(t,e),c={x:n,y:r},d=jn(i),f=gg(d);let _=c[f],m=c[d];const p=fr(a,e),y=typeof p=="number"?{mainAxis:p,crossAxis:0}:{mainAxis:0,crossAxis:0,...p};if(l){const x=f==="y"?"height":"width",b=s.reference[f]-s.floating[x]+y.mainAxis,E=s.reference[f]+s.reference[x]-y.mainAxis;_E&&(_=E)}if(u){var h,v;const x=f==="y"?"width":"height",b=o1.has(hr(i)),E=s.reference[d]-s.floating[x]+(b&&((h=o.offset)==null?void 0:h[d])||0)+(b?0:y.crossAxis),S=s.reference[d]+s.reference[x]+(b?0:((v=o.offset)==null?void 0:v[d])||0)-(b?y.crossAxis:0);mS&&(m=S)}return{[f]:_,[d]:m}}}},UF=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var n,r;const{placement:i,rects:s,platform:o,elements:a}=e,{apply:l=()=>{},...u}=fr(t,e),c=await o.detectOverflow(e,u),d=hr(i),f=wo(i),_=jn(i)==="y",{width:m,height:p}=s.floating;let y,h;d==="top"||d==="bottom"?(y=d,h=f===(await(o.isRTL==null?void 0:o.isRTL(a.floating))?"start":"end")?"left":"right"):(h=d,y=f==="end"?"top":"bottom");const v=p-c.top-c.bottom,x=m-c.left-c.right,b=ti(p-c[y],v),E=ti(m-c[h],x),S=!e.middlewareData.shift;let k=b,C=E;if((n=e.middlewareData.shift)!=null&&n.enabled.x&&(C=x),(r=e.middlewareData.shift)!=null&&r.enabled.y&&(k=v),S&&!f){const P=zt(c.left,0),$=zt(c.right,0),O=zt(c.top,0),U=zt(c.bottom,0);_?C=m-2*(P!==0||$!==0?P+$:zt(c.left,c.right)):k=p-2*(O!==0||U!==0?O+U:zt(c.top,c.bottom))}await l({...e,availableWidth:C,availableHeight:k});const R=await o.getDimensions(a.floating);return m!==R.width||p!==R.height?{reset:{rects:!0}}:{}}}};function nd(){return typeof window<"u"}function xo(t){return a1(t)?(t.nodeName||"").toLowerCase():"#document"}function Ht(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Bn(t){var e;return(e=(a1(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function a1(t){return nd()?t instanceof Node||t instanceof Ht(t).Node:!1}function bn(t){return nd()?t instanceof Element||t instanceof Ht(t).Element:!1}function mr(t){return nd()?t instanceof HTMLElement||t instanceof Ht(t).HTMLElement:!1}function J_(t){return!nd()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof Ht(t).ShadowRoot}function nl(t){const{overflow:e,overflowX:n,overflowY:r,display:i}=En(t);return/auto|scroll|overlay|hidden|clip/.test(e+r+n)&&i!=="inline"&&i!=="contents"}function VF(t){return/^(table|td|th)$/.test(xo(t))}function rd(t){try{if(t.matches(":popover-open"))return!0}catch{}try{return t.matches(":modal")}catch{return!1}}const BF=/transform|translate|scale|rotate|perspective|filter/,qF=/paint|layout|strict|content/,fi=t=>!!t&&t!=="none";let If;function _g(t){const e=bn(t)?En(t):t;return fi(e.transform)||fi(e.translate)||fi(e.scale)||fi(e.rotate)||fi(e.perspective)||!wg()&&(fi(e.backdropFilter)||fi(e.filter))||BF.test(e.willChange||"")||qF.test(e.contain||"")}function HF(t){let e=ni(t);for(;mr(e)&&!ho(e);){if(_g(e))return e;if(rd(e))return null;e=ni(e)}return null}function wg(){return If==null&&(If=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),If}function ho(t){return/^(html|body|#document)$/.test(xo(t))}function En(t){return Ht(t).getComputedStyle(t)}function id(t){return bn(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function ni(t){if(xo(t)==="html")return t;const e=t.assignedSlot||t.parentNode||J_(t)&&t.host||Bn(t);return J_(e)?e.host:e}function l1(t){const e=ni(t);return ho(e)?t.ownerDocument?t.ownerDocument.body:t.body:mr(e)&&nl(e)?e:l1(e)}function Ba(t,e,n){var r;e===void 0&&(e=[]),n===void 0&&(n=!0);const i=l1(t),s=i===((r=t.ownerDocument)==null?void 0:r.body),o=Ht(i);if(s){const a=Ip(o);return e.concat(o,o.visualViewport||[],nl(i)?i:[],a&&n?Ba(a):[])}else return e.concat(i,Ba(i,[],n))}function Ip(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function u1(t){const e=En(t);let n=parseFloat(e.width)||0,r=parseFloat(e.height)||0;const i=mr(t),s=i?t.offsetWidth:n,o=i?t.offsetHeight:r,a=yc(n)!==s||yc(r)!==o;return a&&(n=s,r=o),{width:n,height:r,$:a}}function xg(t){return bn(t)?t:t.contextElement}function Ds(t){const e=xg(t);if(!mr(e))return Un(1);const n=e.getBoundingClientRect(),{width:r,height:i,$:s}=u1(e);let o=(s?yc(n.width):n.width)/r,a=(s?yc(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const WF=Un(0);function c1(t){const e=Ht(t);return!wg()||!e.visualViewport?WF:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function GF(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==Ht(t)?!1:e}function Vi(t,e,n,r){e===void 0&&(e=!1),n===void 0&&(n=!1);const i=t.getBoundingClientRect(),s=xg(t);let o=Un(1);e&&(r?bn(r)&&(o=Ds(r)):o=Ds(t));const a=GF(s,n,r)?c1(s):Un(0);let l=(i.left+a.x)/o.x,u=(i.top+a.y)/o.y,c=i.width/o.x,d=i.height/o.y;if(s){const f=Ht(s),_=r&&bn(r)?Ht(r):r;let m=f,p=Ip(m);for(;p&&r&&_!==m;){const y=Ds(p),h=p.getBoundingClientRect(),v=En(p),x=h.left+(p.clientLeft+parseFloat(v.paddingLeft))*y.x,b=h.top+(p.clientTop+parseFloat(v.paddingTop))*y.y;l*=y.x,u*=y.y,c*=y.x,d*=y.y,l+=x,u+=b,m=Ht(p),p=Ip(m)}}return wc({width:c,height:d,x:l,y:u})}function sd(t,e){const n=id(t).scrollLeft;return e?e.left+n:Vi(Bn(t)).left+n}function d1(t,e){const n=t.getBoundingClientRect(),r=n.left+e.scrollLeft-sd(t,n),i=n.top+e.scrollTop;return{x:r,y:i}}function KF(t){let{elements:e,rect:n,offsetParent:r,strategy:i}=t;const s=i==="fixed",o=Bn(r),a=e?rd(e.floating):!1;if(r===o||a&&s)return n;let l={scrollLeft:0,scrollTop:0},u=Un(1);const c=Un(0),d=mr(r);if((d||!d&&!s)&&((xo(r)!=="body"||nl(o))&&(l=id(r)),d)){const _=Vi(r);u=Ds(r),c.x=_.x+r.clientLeft,c.y=_.y+r.clientTop}const f=o&&!d&&!s?d1(o,l):Un(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+c.x+f.x,y:n.y*u.y-l.scrollTop*u.y+c.y+f.y}}function QF(t){return Array.from(t.getClientRects())}function YF(t){const e=Bn(t),n=id(t),r=t.ownerDocument.body,i=zt(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),s=zt(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight);let o=-n.scrollLeft+sd(t);const a=-n.scrollTop;return En(r).direction==="rtl"&&(o+=zt(e.clientWidth,r.clientWidth)-i),{width:i,height:s,x:o,y:a}}const Z_=25;function XF(t,e){const n=Ht(t),r=Bn(t),i=n.visualViewport;let s=r.clientWidth,o=r.clientHeight,a=0,l=0;if(i){s=i.width,o=i.height;const c=wg();(!c||c&&e==="fixed")&&(a=i.offsetLeft,l=i.offsetTop)}const u=sd(r);if(u<=0){const c=r.ownerDocument,d=c.body,f=getComputedStyle(d),_=c.compatMode==="CSS1Compat"&&parseFloat(f.marginLeft)+parseFloat(f.marginRight)||0,m=Math.abs(r.clientWidth-d.clientWidth-_);m<=Z_&&(s-=m)}else u<=Z_&&(s+=u);return{width:s,height:o,x:a,y:l}}function JF(t,e){const n=Vi(t,!0,e==="fixed"),r=n.top+t.clientTop,i=n.left+t.clientLeft,s=mr(t)?Ds(t):Un(1),o=t.clientWidth*s.x,a=t.clientHeight*s.y,l=i*s.x,u=r*s.y;return{width:o,height:a,x:l,y:u}}function e0(t,e,n){let r;if(e==="viewport")r=XF(t,n);else if(e==="document")r=YF(Bn(t));else if(bn(e))r=JF(e,n);else{const i=c1(t);r={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return wc(r)}function f1(t,e){const n=ni(t);return n===e||!bn(n)||ho(n)?!1:En(n).position==="fixed"||f1(n,e)}function ZF(t,e){const n=e.get(t);if(n)return n;let r=Ba(t,[],!1).filter(a=>bn(a)&&xo(a)!=="body"),i=null;const s=En(t).position==="fixed";let o=s?ni(t):t;for(;bn(o)&&!ho(o);){const a=En(o),l=_g(o);!l&&a.position==="fixed"&&(i=null),(s?!l&&!i:!l&&a.position==="static"&&!!i&&(i.position==="absolute"||i.position==="fixed")||nl(o)&&!l&&f1(t,o))?r=r.filter(c=>c!==o):i=a,o=ni(o)}return e.set(t,r),r}function eL(t){let{element:e,boundary:n,rootBoundary:r,strategy:i}=t;const o=[...n==="clippingAncestors"?rd(e)?[]:ZF(e,this._c):[].concat(n),r],a=e0(e,o[0],i);let l=a.top,u=a.right,c=a.bottom,d=a.left;for(let f=1;f{o(!1,1e-7)},1e3)}k===1&&!p1(u,t.getBoundingClientRect())&&o(),b=!1}try{n=new IntersectionObserver(E,{...x,root:i.ownerDocument})}catch{n=new IntersectionObserver(E,x)}n.observe(t)}return o(!0),s}function aL(t,e,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,u=xg(t),c=i||s?[...u?Ba(u):[],...e?Ba(e):[]]:[];c.forEach(h=>{i&&h.addEventListener("scroll",n,{passive:!0}),s&&h.addEventListener("resize",n)});const d=u&&a?oL(u,n):null;let f=-1,_=null;o&&(_=new ResizeObserver(h=>{let[v]=h;v&&v.target===u&&_&&e&&(_.unobserve(e),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var x;(x=_)==null||x.observe(e)})),n()}),u&&!l&&_.observe(u),e&&_.observe(e));let m,p=l?Vi(t):null;l&&y();function y(){const h=Vi(t);p&&!p1(p,h)&&n(),p=h,m=requestAnimationFrame(y)}return n(),()=>{var h;c.forEach(v=>{i&&v.removeEventListener("scroll",n),s&&v.removeEventListener("resize",n)}),d==null||d(),(h=_)==null||h.disconnect(),_=null,l&&cancelAnimationFrame(m)}}const lL=jF,uL=DF,cL=$F,dL=UF,fL=FF,n0=NF,hL=zF,pL=(t,e,n)=>{const r=new Map,i={platform:sL,...n},s={...i.platform,_c:r};return AF(t,e,{...i,platform:s})};var vL=typeof document<"u",gL=function(){},hu=vL?g.useLayoutEffect:gL;function xc(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let n,r,i;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(n=t.length,n!==e.length)return!1;for(r=n;r--!==0;)if(!xc(t[r],e[r]))return!1;return!0}if(i=Object.keys(t),n=i.length,n!==Object.keys(e).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(e,i[r]))return!1;for(r=n;r--!==0;){const s=i[r];if(!(s==="_owner"&&t.$$typeof)&&!xc(t[s],e[s]))return!1}return!0}return t!==t&&e!==e}function v1(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function r0(t,e){const n=v1(t);return Math.round(e*n)/n}function Mf(t){const e=g.useRef(t);return hu(()=>{e.current=t}),e}function mL(t){t===void 0&&(t={});const{placement:e="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:s,floating:o}={},transform:a=!0,whileElementsMounted:l,open:u}=t,[c,d]=g.useState({x:0,y:0,strategy:n,placement:e,middlewareData:{},isPositioned:!1}),[f,_]=g.useState(r);xc(f,r)||_(r);const[m,p]=g.useState(null),[y,h]=g.useState(null),v=g.useCallback(I=>{I!==S.current&&(S.current=I,p(I))},[]),x=g.useCallback(I=>{I!==k.current&&(k.current=I,h(I))},[]),b=s||m,E=o||y,S=g.useRef(null),k=g.useRef(null),C=g.useRef(c),R=l!=null,P=Mf(l),$=Mf(i),O=Mf(u),U=g.useCallback(()=>{if(!S.current||!k.current)return;const I={placement:e,strategy:n,middleware:f};$.current&&(I.platform=$.current),pL(S.current,k.current,I).then(M=>{const B={...M,isPositioned:O.current!==!1};L.current&&!xc(C.current,B)&&(C.current=B,el.flushSync(()=>{d(B)}))})},[f,e,n,$,O]);hu(()=>{u===!1&&C.current.isPositioned&&(C.current.isPositioned=!1,d(I=>({...I,isPositioned:!1})))},[u]);const L=g.useRef(!1);hu(()=>(L.current=!0,()=>{L.current=!1}),[]),hu(()=>{if(b&&(S.current=b),E&&(k.current=E),b&&E){if(P.current)return P.current(b,E,U);U()}},[b,E,U,P,R]);const H=g.useMemo(()=>({reference:S,floating:k,setReference:v,setFloating:x}),[v,x]),q=g.useMemo(()=>({reference:b,floating:E}),[b,E]),K=g.useMemo(()=>{const I={position:n,left:0,top:0};if(!q.floating)return I;const M=r0(q.floating,c.x),B=r0(q.floating,c.y);return a?{...I,transform:"translate("+M+"px, "+B+"px)",...v1(q.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:M,top:B}},[n,a,q.floating,c.x,c.y]);return g.useMemo(()=>({...c,update:U,refs:H,elements:q,floatingStyles:K}),[c,U,H,q,K])}const yL=t=>{function e(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:t,fn(n){const{element:r,padding:i}=typeof t=="function"?t(n):t;return r&&e(r)?r.current!=null?n0({element:r.current,padding:i}).fn(n):{}:r?n0({element:r,padding:i}).fn(n):{}}}},_L=(t,e)=>{const n=lL(t);return{name:n.name,fn:n.fn,options:[t,e]}},wL=(t,e)=>{const n=uL(t);return{name:n.name,fn:n.fn,options:[t,e]}},xL=(t,e)=>({fn:hL(t).fn,options:[t,e]}),bL=(t,e)=>{const n=cL(t);return{name:n.name,fn:n.fn,options:[t,e]}},EL=(t,e)=>{const n=dL(t);return{name:n.name,fn:n.fn,options:[t,e]}},SL=(t,e)=>{const n=fL(t);return{name:n.name,fn:n.fn,options:[t,e]}},CL=(t,e)=>{const n=yL(t);return{name:n.name,fn:n.fn,options:[t,e]}};var kL="Arrow",g1=g.forwardRef((t,e)=>{const{children:n,width:r=10,height:i=5,...s}=t;return w.jsx(Ee.svg,{...s,ref:e,width:r,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:t.asChild?n:w.jsx("polygon",{points:"0,0 30,0 15,10"})})});g1.displayName=kL;var PL=g1;function RL(t){const[e,n]=g.useState(void 0);return on(()=>{if(t){n({width:t.offsetWidth,height:t.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const s=i[0];let o,a;if("borderBoxSize"in s){const l=s.borderBoxSize,u=Array.isArray(l)?l[0]:l;o=u.inlineSize,a=u.blockSize}else o=t.offsetWidth,a=t.offsetHeight;n({width:o,height:a})});return r.observe(t,{box:"border-box"}),()=>r.unobserve(t)}else n(void 0)},[t]),e}var bg="Popper",[m1,y1]=Wi(bg),[TL,_1]=m1(bg),w1=t=>{const{__scopePopper:e,children:n}=t,[r,i]=g.useState(null);return w.jsx(TL,{scope:e,anchor:r,onAnchorChange:i,children:n})};w1.displayName=bg;var x1="PopperAnchor",b1=g.forwardRef((t,e)=>{const{__scopePopper:n,virtualRef:r,...i}=t,s=_1(x1,n),o=g.useRef(null),a=Xe(e,o),l=g.useRef(null);return g.useEffect(()=>{const u=l.current;l.current=(r==null?void 0:r.current)||o.current,u!==l.current&&s.onAnchorChange(l.current)}),r?null:w.jsx(Ee.div,{...i,ref:a})});b1.displayName=x1;var Eg="PopperContent",[IL,OL]=m1(Eg),E1=g.forwardRef((t,e)=>{var ze,ve,Ae,kt,yr,gt;const{__scopePopper:n,side:r="bottom",sideOffset:i=0,align:s="center",alignOffset:o=0,arrowPadding:a=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:c=0,sticky:d="partial",hideWhenDetached:f=!1,updatePositionStrategy:_="optimized",onPlaced:m,...p}=t,y=_1(Eg,n),[h,v]=g.useState(null),x=Xe(e,Ge=>v(Ge)),[b,E]=g.useState(null),S=RL(b),k=(S==null?void 0:S.width)??0,C=(S==null?void 0:S.height)??0,R=r+(s!=="center"?"-"+s:""),P=typeof c=="number"?c:{top:0,right:0,bottom:0,left:0,...c},$=Array.isArray(u)?u:[u],O=$.length>0,U={padding:P,boundary:$.filter(AL),altBoundary:O},{refs:L,floatingStyles:H,placement:q,isPositioned:K,middlewareData:I}=mL({strategy:"fixed",placement:R,whileElementsMounted:(...Ge)=>aL(...Ge,{animationFrame:_==="always"}),elements:{reference:y.anchor},middleware:[_L({mainAxis:i+C,alignmentAxis:o}),l&&wL({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?xL():void 0,...U}),l&&bL({...U}),EL({...U,apply:({elements:Ge,rects:ai,availableWidth:Yi,availableHeight:Pt})=>{const{width:Xi,height:_r}=ai.reference,ln=Ge.floating.style;ln.setProperty("--radix-popper-available-width",`${Yi}px`),ln.setProperty("--radix-popper-available-height",`${Pt}px`),ln.setProperty("--radix-popper-anchor-width",`${Xi}px`),ln.setProperty("--radix-popper-anchor-height",`${_r}px`)}}),b&&CL({element:b,padding:a}),NL({arrowWidth:k,arrowHeight:C}),f&&SL({strategy:"referenceHidden",...U})]}),[M,B]=k1(q),G=Ft(m);on(()=>{K&&(G==null||G())},[K,G]);const Z=(ze=I.arrow)==null?void 0:ze.x,se=(ve=I.arrow)==null?void 0:ve.y,ce=((Ae=I.arrow)==null?void 0:Ae.centerOffset)!==0,[_e,Se]=g.useState();return on(()=>{h&&Se(window.getComputedStyle(h).zIndex)},[h]),w.jsx("div",{ref:L.setFloating,"data-radix-popper-content-wrapper":"",style:{...H,transform:K?H.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:_e,"--radix-popper-transform-origin":[(kt=I.transformOrigin)==null?void 0:kt.x,(yr=I.transformOrigin)==null?void 0:yr.y].join(" "),...((gt=I.hide)==null?void 0:gt.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:w.jsx(IL,{scope:n,placedSide:M,onArrowChange:E,arrowX:Z,arrowY:se,shouldHideArrow:ce,children:w.jsx(Ee.div,{"data-side":M,"data-align":B,...p,ref:x,style:{...p.style,animation:K?void 0:"none"}})})})});E1.displayName=Eg;var S1="PopperArrow",ML={top:"bottom",right:"left",bottom:"top",left:"right"},C1=g.forwardRef(function(e,n){const{__scopePopper:r,...i}=e,s=OL(S1,r),o=ML[s.placedSide];return w.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:w.jsx(PL,{...i,ref:n,style:{...i.style,display:"block"}})})});C1.displayName=S1;function AL(t){return t!==null}var NL=t=>({name:"transformOrigin",options:t,fn(e){var y,h,v;const{placement:n,rects:r,middlewareData:i}=e,o=((y=i.arrow)==null?void 0:y.centerOffset)!==0,a=o?0:t.arrowWidth,l=o?0:t.arrowHeight,[u,c]=k1(n),d={start:"0%",center:"50%",end:"100%"}[c],f=(((h=i.arrow)==null?void 0:h.x)??0)+a/2,_=(((v=i.arrow)==null?void 0:v.y)??0)+l/2;let m="",p="";return u==="bottom"?(m=o?d:`${f}px`,p=`${-l}px`):u==="top"?(m=o?d:`${f}px`,p=`${r.floating.height+l}px`):u==="right"?(m=`${-l}px`,p=o?d:`${_}px`):u==="left"&&(m=`${r.floating.width+l}px`,p=o?d:`${_}px`),{data:{x:m,y:p}}}});function k1(t){const[e,n="center"]=t.split("-");return[e,n]}var $L=w1,FL=b1,LL=E1,jL=C1,Af="rovingFocusGroup.onEntryFocus",DL={bubbles:!1,cancelable:!0},rl="RovingFocusGroup",[Op,P1,zL]=vg(rl),[UL,R1]=Wi(rl,[zL]),[VL,BL]=UL(rl),T1=g.forwardRef((t,e)=>w.jsx(Op.Provider,{scope:t.__scopeRovingFocusGroup,children:w.jsx(Op.Slot,{scope:t.__scopeRovingFocusGroup,children:w.jsx(qL,{...t,ref:e})})}));T1.displayName=rl;var qL=g.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:s,currentTabStopId:o,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:l,onEntryFocus:u,preventScrollOnEntryFocus:c=!1,...d}=t,f=g.useRef(null),_=Xe(e,f),m=i1(s),[p,y]=Xc({prop:o,defaultProp:a??null,onChange:l,caller:rl}),[h,v]=g.useState(!1),x=Ft(u),b=P1(n),E=g.useRef(!1),[S,k]=g.useState(0);return g.useEffect(()=>{const C=f.current;if(C)return C.addEventListener(Af,x),()=>C.removeEventListener(Af,x)},[x]),w.jsx(VL,{scope:n,orientation:r,dir:m,loop:i,currentTabStopId:p,onItemFocus:g.useCallback(C=>y(C),[y]),onItemShiftTab:g.useCallback(()=>v(!0),[]),onFocusableItemAdd:g.useCallback(()=>k(C=>C+1),[]),onFocusableItemRemove:g.useCallback(()=>k(C=>C-1),[]),children:w.jsx(Ee.div,{tabIndex:h||S===0?-1:0,"data-orientation":r,...d,ref:_,style:{outline:"none",...t.style},onMouseDown:J(t.onMouseDown,()=>{E.current=!0}),onFocus:J(t.onFocus,C=>{const R=!E.current;if(C.target===C.currentTarget&&R&&!h){const P=new CustomEvent(Af,DL);if(C.currentTarget.dispatchEvent(P),!P.defaultPrevented){const $=b().filter(q=>q.focusable),O=$.find(q=>q.active),U=$.find(q=>q.id===p),H=[O,U,...$].filter(Boolean).map(q=>q.ref.current);M1(H,c)}}E.current=!1}),onBlur:J(t.onBlur,()=>v(!1))})})}),I1="RovingFocusGroupItem",O1=g.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:s,children:o,...a}=t,l=Fs(),u=s||l,c=BL(I1,n),d=c.currentTabStopId===u,f=P1(n),{onFocusableItemAdd:_,onFocusableItemRemove:m,currentTabStopId:p}=c;return g.useEffect(()=>{if(r)return _(),()=>m()},[r,_,m]),w.jsx(Op.ItemSlot,{scope:n,id:u,focusable:r,active:i,children:w.jsx(Ee.span,{tabIndex:d?0:-1,"data-orientation":c.orientation,...a,ref:e,onMouseDown:J(t.onMouseDown,y=>{r?c.onItemFocus(u):y.preventDefault()}),onFocus:J(t.onFocus,()=>c.onItemFocus(u)),onKeyDown:J(t.onKeyDown,y=>{if(y.key==="Tab"&&y.shiftKey){c.onItemShiftTab();return}if(y.target!==y.currentTarget)return;const h=GL(y,c.orientation,c.dir);if(h!==void 0){if(y.metaKey||y.ctrlKey||y.altKey||y.shiftKey)return;y.preventDefault();let x=f().filter(b=>b.focusable).map(b=>b.ref.current);if(h==="last")x.reverse();else if(h==="prev"||h==="next"){h==="prev"&&x.reverse();const b=x.indexOf(y.currentTarget);x=c.loop?KL(x,b+1):x.slice(b+1)}setTimeout(()=>M1(x))}}),children:typeof o=="function"?o({isCurrentTabStop:d,hasTabStop:p!=null}):o})})});O1.displayName=I1;var HL={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function WL(t,e){return e!=="rtl"?t:t==="ArrowLeft"?"ArrowRight":t==="ArrowRight"?"ArrowLeft":t}function GL(t,e,n){const r=WL(t.key,n);if(!(e==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(e==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return HL[r]}function M1(t,e=!1){const n=document.activeElement;for(const r of t)if(r===n||(r.focus({preventScroll:e}),document.activeElement!==n))return}function KL(t,e){return t.map((n,r)=>t[(e+r)%t.length])}var QL=T1,YL=O1;function XL(t){const e=JL(t),n=g.forwardRef((r,i)=>{const{children:s,...o}=r,a=g.Children.toArray(s),l=a.find(ej);if(l){const u=l.props.children,c=a.map(d=>d===l?g.Children.count(u)>1?g.Children.only(null):g.isValidElement(u)?u.props.children:null:d);return w.jsx(e,{...o,ref:i,children:g.isValidElement(u)?g.cloneElement(u,void 0,c):null})}return w.jsx(e,{...o,ref:i,children:s})});return n.displayName=`${t}.Slot`,n}function JL(t){const e=g.forwardRef((n,r)=>{const{children:i,...s}=n;if(g.isValidElement(i)){const o=nj(i),a=tj(s,i.props);return i.type!==g.Fragment&&(a.ref=r?oi(r,o):o),g.cloneElement(i,a)}return g.Children.count(i)>1?g.Children.only(null):null});return e.displayName=`${t}.SlotClone`,e}var ZL=Symbol("radix.slottable");function ej(t){return g.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===ZL}function tj(t,e){const n={...e};for(const r in e){const i=t[r],s=e[r];/^on[A-Z]/.test(r)?i&&s?n[r]=(...a)=>{const l=s(...a);return i(...a),l}:i&&(n[r]=i):r==="style"?n[r]={...i,...s}:r==="className"&&(n[r]=[i,s].filter(Boolean).join(" "))}return{...t,...n}}function nj(t){var r,i;let e=(r=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:r.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(i=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:i.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}var Mp=["Enter"," "],rj=["ArrowDown","PageUp","Home"],A1=["ArrowUp","PageDown","End"],ij=[...rj,...A1],sj={ltr:[...Mp,"ArrowRight"],rtl:[...Mp,"ArrowLeft"]},oj={ltr:["ArrowLeft"],rtl:["ArrowRight"]},il="Menu",[qa,aj,lj]=vg(il),[Ki,N1]=Wi(il,[lj,y1,R1]),od=y1(),$1=R1(),[uj,Qi]=Ki(il),[cj,sl]=Ki(il),F1=t=>{const{__scopeMenu:e,open:n=!1,children:r,dir:i,onOpenChange:s,modal:o=!0}=t,a=od(e),[l,u]=g.useState(null),c=g.useRef(!1),d=Ft(s),f=i1(i);return g.useEffect(()=>{const _=()=>{c.current=!0,document.addEventListener("pointerdown",m,{capture:!0,once:!0}),document.addEventListener("pointermove",m,{capture:!0,once:!0})},m=()=>c.current=!1;return document.addEventListener("keydown",_,{capture:!0}),()=>{document.removeEventListener("keydown",_,{capture:!0}),document.removeEventListener("pointerdown",m,{capture:!0}),document.removeEventListener("pointermove",m,{capture:!0})}},[]),w.jsx($L,{...a,children:w.jsx(uj,{scope:e,open:n,onOpenChange:d,content:l,onContentChange:u,children:w.jsx(cj,{scope:e,onClose:g.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:c,dir:f,modal:o,children:r})})})};F1.displayName=il;var dj="MenuAnchor",Sg=g.forwardRef((t,e)=>{const{__scopeMenu:n,...r}=t,i=od(n);return w.jsx(FL,{...i,...r,ref:e})});Sg.displayName=dj;var Cg="MenuPortal",[fj,L1]=Ki(Cg,{forceMount:void 0}),j1=t=>{const{__scopeMenu:e,forceMount:n,children:r,container:i}=t,s=Qi(Cg,e);return w.jsx(fj,{scope:e,forceMount:n,children:w.jsx(gr,{present:n||s.open,children:w.jsx(Zc,{asChild:!0,container:i,children:r})})})};j1.displayName=Cg;var nn="MenuContent",[hj,kg]=Ki(nn),D1=g.forwardRef((t,e)=>{const n=L1(nn,t.__scopeMenu),{forceMount:r=n.forceMount,...i}=t,s=Qi(nn,t.__scopeMenu),o=sl(nn,t.__scopeMenu);return w.jsx(qa.Provider,{scope:t.__scopeMenu,children:w.jsx(gr,{present:r||s.open,children:w.jsx(qa.Slot,{scope:t.__scopeMenu,children:o.modal?w.jsx(pj,{...i,ref:e}):w.jsx(vj,{...i,ref:e})})})})}),pj=g.forwardRef((t,e)=>{const n=Qi(nn,t.__scopeMenu),r=g.useRef(null),i=Xe(e,r);return g.useEffect(()=>{const s=r.current;if(s)return gS(s)},[]),w.jsx(Pg,{...t,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:J(t.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),vj=g.forwardRef((t,e)=>{const n=Qi(nn,t.__scopeMenu);return w.jsx(Pg,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),gj=XL("MenuContent.ScrollLock"),Pg=g.forwardRef((t,e)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:s,onCloseAutoFocus:o,disableOutsidePointerEvents:a,onEntryFocus:l,onEscapeKeyDown:u,onPointerDownOutside:c,onFocusOutside:d,onInteractOutside:f,onDismiss:_,disableOutsideScroll:m,...p}=t,y=Qi(nn,n),h=sl(nn,n),v=od(n),x=$1(n),b=aj(n),[E,S]=g.useState(null),k=g.useRef(null),C=Xe(e,k,y.onContentChange),R=g.useRef(0),P=g.useRef(""),$=g.useRef(0),O=g.useRef(null),U=g.useRef("right"),L=g.useRef(0),H=m?og:g.Fragment,q=m?{as:gj,allowPinchZoom:!0}:void 0,K=M=>{var ze,ve;const B=P.current+M,G=b().filter(Ae=>!Ae.disabled),Z=document.activeElement,se=(ze=G.find(Ae=>Ae.ref.current===Z))==null?void 0:ze.textValue,ce=G.map(Ae=>Ae.textValue),_e=Rj(ce,B,se),Se=(ve=G.find(Ae=>Ae.textValue===_e))==null?void 0:ve.ref.current;(function Ae(kt){P.current=kt,window.clearTimeout(R.current),kt!==""&&(R.current=window.setTimeout(()=>Ae(""),1e3))})(B),Se&&setTimeout(()=>Se.focus())};g.useEffect(()=>()=>window.clearTimeout(R.current),[]),aS();const I=g.useCallback(M=>{var G,Z;return U.current===((G=O.current)==null?void 0:G.side)&&Ij(M,(Z=O.current)==null?void 0:Z.area)},[]);return w.jsx(hj,{scope:n,searchRef:P,onItemEnter:g.useCallback(M=>{I(M)&&M.preventDefault()},[I]),onItemLeave:g.useCallback(M=>{var B;I(M)||((B=k.current)==null||B.focus(),S(null))},[I]),onTriggerLeave:g.useCallback(M=>{I(M)&&M.preventDefault()},[I]),pointerGraceTimerRef:$,onPointerGraceIntentChange:g.useCallback(M=>{O.current=M},[]),children:w.jsx(H,{...q,children:w.jsx(sg,{asChild:!0,trapped:i,onMountAutoFocus:J(s,M=>{var B;M.preventDefault(),(B=k.current)==null||B.focus({preventScroll:!0})}),onUnmountAutoFocus:o,children:w.jsx(Jc,{asChild:!0,disableOutsidePointerEvents:a,onEscapeKeyDown:u,onPointerDownOutside:c,onFocusOutside:d,onInteractOutside:f,onDismiss:_,children:w.jsx(QL,{asChild:!0,...x,dir:h.dir,orientation:"vertical",loop:r,currentTabStopId:E,onCurrentTabStopIdChange:S,onEntryFocus:J(l,M=>{h.isUsingKeyboardRef.current||M.preventDefault()}),preventScrollOnEntryFocus:!0,children:w.jsx(LL,{role:"menu","aria-orientation":"vertical","data-state":tC(y.open),"data-radix-menu-content":"",dir:h.dir,...v,...p,ref:C,style:{outline:"none",...p.style},onKeyDown:J(p.onKeyDown,M=>{const G=M.target.closest("[data-radix-menu-content]")===M.currentTarget,Z=M.ctrlKey||M.altKey||M.metaKey,se=M.key.length===1;G&&(M.key==="Tab"&&M.preventDefault(),!Z&&se&&K(M.key));const ce=k.current;if(M.target!==ce||!ij.includes(M.key))return;M.preventDefault();const Se=b().filter(ze=>!ze.disabled).map(ze=>ze.ref.current);A1.includes(M.key)&&Se.reverse(),kj(Se)}),onBlur:J(t.onBlur,M=>{M.currentTarget.contains(M.target)||(window.clearTimeout(R.current),P.current="")}),onPointerMove:J(t.onPointerMove,Ha(M=>{const B=M.target,G=L.current!==M.clientX;if(M.currentTarget.contains(B)&&G){const Z=M.clientX>L.current?"right":"left";U.current=Z,L.current=M.clientX}}))})})})})})})});D1.displayName=nn;var mj="MenuGroup",Rg=g.forwardRef((t,e)=>{const{__scopeMenu:n,...r}=t;return w.jsx(Ee.div,{role:"group",...r,ref:e})});Rg.displayName=mj;var yj="MenuLabel",z1=g.forwardRef((t,e)=>{const{__scopeMenu:n,...r}=t;return w.jsx(Ee.div,{...r,ref:e})});z1.displayName=yj;var bc="MenuItem",i0="menu.itemSelect",ad=g.forwardRef((t,e)=>{const{disabled:n=!1,onSelect:r,...i}=t,s=g.useRef(null),o=sl(bc,t.__scopeMenu),a=kg(bc,t.__scopeMenu),l=Xe(e,s),u=g.useRef(!1),c=()=>{const d=s.current;if(!n&&d){const f=new CustomEvent(i0,{bubbles:!0,cancelable:!0});d.addEventListener(i0,_=>r==null?void 0:r(_),{once:!0}),ig(d,f),f.defaultPrevented?u.current=!1:o.onClose()}};return w.jsx(U1,{...i,ref:l,disabled:n,onClick:J(t.onClick,c),onPointerDown:d=>{var f;(f=t.onPointerDown)==null||f.call(t,d),u.current=!0},onPointerUp:J(t.onPointerUp,d=>{var f;u.current||(f=d.currentTarget)==null||f.click()}),onKeyDown:J(t.onKeyDown,d=>{const f=a.searchRef.current!=="";n||f&&d.key===" "||Mp.includes(d.key)&&(d.currentTarget.click(),d.preventDefault())})})});ad.displayName=bc;var U1=g.forwardRef((t,e)=>{const{__scopeMenu:n,disabled:r=!1,textValue:i,...s}=t,o=kg(bc,n),a=$1(n),l=g.useRef(null),u=Xe(e,l),[c,d]=g.useState(!1),[f,_]=g.useState("");return g.useEffect(()=>{const m=l.current;m&&_((m.textContent??"").trim())},[s.children]),w.jsx(qa.ItemSlot,{scope:n,disabled:r,textValue:i??f,children:w.jsx(YL,{asChild:!0,...a,focusable:!r,children:w.jsx(Ee.div,{role:"menuitem","data-highlighted":c?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...s,ref:u,onPointerMove:J(t.onPointerMove,Ha(m=>{r?o.onItemLeave(m):(o.onItemEnter(m),m.defaultPrevented||m.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:J(t.onPointerLeave,Ha(m=>o.onItemLeave(m))),onFocus:J(t.onFocus,()=>d(!0)),onBlur:J(t.onBlur,()=>d(!1))})})})}),_j="MenuCheckboxItem",V1=g.forwardRef((t,e)=>{const{checked:n=!1,onCheckedChange:r,...i}=t;return w.jsx(G1,{scope:t.__scopeMenu,checked:n,children:w.jsx(ad,{role:"menuitemcheckbox","aria-checked":Ec(n)?"mixed":n,...i,ref:e,"data-state":Ig(n),onSelect:J(i.onSelect,()=>r==null?void 0:r(Ec(n)?!0:!n),{checkForDefaultPrevented:!1})})})});V1.displayName=_j;var B1="MenuRadioGroup",[wj,xj]=Ki(B1,{value:void 0,onValueChange:()=>{}}),q1=g.forwardRef((t,e)=>{const{value:n,onValueChange:r,...i}=t,s=Ft(r);return w.jsx(wj,{scope:t.__scopeMenu,value:n,onValueChange:s,children:w.jsx(Rg,{...i,ref:e})})});q1.displayName=B1;var H1="MenuRadioItem",W1=g.forwardRef((t,e)=>{const{value:n,...r}=t,i=xj(H1,t.__scopeMenu),s=n===i.value;return w.jsx(G1,{scope:t.__scopeMenu,checked:s,children:w.jsx(ad,{role:"menuitemradio","aria-checked":s,...r,ref:e,"data-state":Ig(s),onSelect:J(r.onSelect,()=>{var o;return(o=i.onValueChange)==null?void 0:o.call(i,n)},{checkForDefaultPrevented:!1})})})});W1.displayName=H1;var Tg="MenuItemIndicator",[G1,bj]=Ki(Tg,{checked:!1}),K1=g.forwardRef((t,e)=>{const{__scopeMenu:n,forceMount:r,...i}=t,s=bj(Tg,n);return w.jsx(gr,{present:r||Ec(s.checked)||s.checked===!0,children:w.jsx(Ee.span,{...i,ref:e,"data-state":Ig(s.checked)})})});K1.displayName=Tg;var Ej="MenuSeparator",Q1=g.forwardRef((t,e)=>{const{__scopeMenu:n,...r}=t;return w.jsx(Ee.div,{role:"separator","aria-orientation":"horizontal",...r,ref:e})});Q1.displayName=Ej;var Sj="MenuArrow",Y1=g.forwardRef((t,e)=>{const{__scopeMenu:n,...r}=t,i=od(n);return w.jsx(jL,{...i,...r,ref:e})});Y1.displayName=Sj;var Cj="MenuSub",[T3,X1]=Ki(Cj),Yo="MenuSubTrigger",J1=g.forwardRef((t,e)=>{const n=Qi(Yo,t.__scopeMenu),r=sl(Yo,t.__scopeMenu),i=X1(Yo,t.__scopeMenu),s=kg(Yo,t.__scopeMenu),o=g.useRef(null),{pointerGraceTimerRef:a,onPointerGraceIntentChange:l}=s,u={__scopeMenu:t.__scopeMenu},c=g.useCallback(()=>{o.current&&window.clearTimeout(o.current),o.current=null},[]);return g.useEffect(()=>c,[c]),g.useEffect(()=>{const d=a.current;return()=>{window.clearTimeout(d),l(null)}},[a,l]),w.jsx(Sg,{asChild:!0,...u,children:w.jsx(U1,{id:i.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":i.contentId,"data-state":tC(n.open),...t,ref:oi(e,i.onTriggerChange),onClick:d=>{var f;(f=t.onClick)==null||f.call(t,d),!(t.disabled||d.defaultPrevented)&&(d.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:J(t.onPointerMove,Ha(d=>{s.onItemEnter(d),!d.defaultPrevented&&!t.disabled&&!n.open&&!o.current&&(s.onPointerGraceIntentChange(null),o.current=window.setTimeout(()=>{n.onOpenChange(!0),c()},100))})),onPointerLeave:J(t.onPointerLeave,Ha(d=>{var _,m;c();const f=(_=n.content)==null?void 0:_.getBoundingClientRect();if(f){const p=(m=n.content)==null?void 0:m.dataset.side,y=p==="right",h=y?-5:5,v=f[y?"left":"right"],x=f[y?"right":"left"];s.onPointerGraceIntentChange({area:[{x:d.clientX+h,y:d.clientY},{x:v,y:f.top},{x,y:f.top},{x,y:f.bottom},{x:v,y:f.bottom}],side:p}),window.clearTimeout(a.current),a.current=window.setTimeout(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(d),d.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:J(t.onKeyDown,d=>{var _;const f=s.searchRef.current!=="";t.disabled||f&&d.key===" "||sj[r.dir].includes(d.key)&&(n.onOpenChange(!0),(_=n.content)==null||_.focus(),d.preventDefault())})})})});J1.displayName=Yo;var Z1="MenuSubContent",eC=g.forwardRef((t,e)=>{const n=L1(nn,t.__scopeMenu),{forceMount:r=n.forceMount,...i}=t,s=Qi(nn,t.__scopeMenu),o=sl(nn,t.__scopeMenu),a=X1(Z1,t.__scopeMenu),l=g.useRef(null),u=Xe(e,l);return w.jsx(qa.Provider,{scope:t.__scopeMenu,children:w.jsx(gr,{present:r||s.open,children:w.jsx(qa.Slot,{scope:t.__scopeMenu,children:w.jsx(Pg,{id:a.contentId,"aria-labelledby":a.triggerId,...i,ref:u,align:"start",side:o.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:c=>{var d;o.isUsingKeyboardRef.current&&((d=l.current)==null||d.focus()),c.preventDefault()},onCloseAutoFocus:c=>c.preventDefault(),onFocusOutside:J(t.onFocusOutside,c=>{c.target!==a.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:J(t.onEscapeKeyDown,c=>{o.onClose(),c.preventDefault()}),onKeyDown:J(t.onKeyDown,c=>{var _;const d=c.currentTarget.contains(c.target),f=oj[o.dir].includes(c.key);d&&f&&(s.onOpenChange(!1),(_=a.trigger)==null||_.focus(),c.preventDefault())})})})})})});eC.displayName=Z1;function tC(t){return t?"open":"closed"}function Ec(t){return t==="indeterminate"}function Ig(t){return Ec(t)?"indeterminate":t?"checked":"unchecked"}function kj(t){const e=document.activeElement;for(const n of t)if(n===e||(n.focus(),document.activeElement!==e))return}function Pj(t,e){return t.map((n,r)=>t[(e+r)%t.length])}function Rj(t,e,n){const i=e.length>1&&Array.from(e).every(u=>u===e[0])?e[0]:e,s=n?t.indexOf(n):-1;let o=Pj(t,Math.max(s,0));i.length===1&&(o=o.filter(u=>u!==n));const l=o.find(u=>u.toLowerCase().startsWith(i.toLowerCase()));return l!==n?l:void 0}function Tj(t,e){const{x:n,y:r}=t;let i=!1;for(let s=0,o=e.length-1;sr!=f>r&&n<(d-u)*(r-c)/(f-c)+u&&(i=!i)}return i}function Ij(t,e){if(!e)return!1;const n={x:t.clientX,y:t.clientY};return Tj(n,e)}function Ha(t){return e=>e.pointerType==="mouse"?t(e):void 0}var Oj=F1,Mj=Sg,Aj=j1,Nj=D1,$j=Rg,Fj=z1,Lj=ad,jj=V1,Dj=q1,zj=W1,Uj=K1,Vj=Q1,Bj=Y1,qj=J1,Hj=eC,ld="DropdownMenu",[Wj]=Wi(ld,[N1]),Ct=N1(),[Gj,nC]=Wj(ld),rC=t=>{const{__scopeDropdownMenu:e,children:n,dir:r,open:i,defaultOpen:s,onOpenChange:o,modal:a=!0}=t,l=Ct(e),u=g.useRef(null),[c,d]=Xc({prop:i,defaultProp:s??!1,onChange:o,caller:ld});return w.jsx(Gj,{scope:e,triggerId:Fs(),triggerRef:u,contentId:Fs(),open:c,onOpenChange:d,onOpenToggle:g.useCallback(()=>d(f=>!f),[d]),modal:a,children:w.jsx(Oj,{...l,open:c,onOpenChange:d,dir:r,modal:a,children:n})})};rC.displayName=ld;var iC="DropdownMenuTrigger",sC=g.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...i}=t,s=nC(iC,n),o=Ct(n);return w.jsx(Mj,{asChild:!0,...o,children:w.jsx(Ee.button,{type:"button",id:s.triggerId,"aria-haspopup":"menu","aria-expanded":s.open,"aria-controls":s.open?s.contentId:void 0,"data-state":s.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...i,ref:oi(e,s.triggerRef),onPointerDown:J(t.onPointerDown,a=>{!r&&a.button===0&&a.ctrlKey===!1&&(s.onOpenToggle(),s.open||a.preventDefault())}),onKeyDown:J(t.onKeyDown,a=>{r||(["Enter"," "].includes(a.key)&&s.onOpenToggle(),a.key==="ArrowDown"&&s.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(a.key)&&a.preventDefault())})})})});sC.displayName=iC;var Kj="DropdownMenuPortal",oC=t=>{const{__scopeDropdownMenu:e,...n}=t,r=Ct(e);return w.jsx(Aj,{...r,...n})};oC.displayName=Kj;var aC="DropdownMenuContent",lC=g.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,i=nC(aC,n),s=Ct(n),o=g.useRef(!1);return w.jsx(Nj,{id:i.contentId,"aria-labelledby":i.triggerId,...s,...r,ref:e,onCloseAutoFocus:J(t.onCloseAutoFocus,a=>{var l;o.current||(l=i.triggerRef.current)==null||l.focus(),o.current=!1,a.preventDefault()}),onInteractOutside:J(t.onInteractOutside,a=>{const l=a.detail.originalEvent,u=l.button===0&&l.ctrlKey===!0,c=l.button===2||u;(!i.modal||c)&&(o.current=!0)}),style:{...t.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});lC.displayName=aC;var Qj="DropdownMenuGroup",Yj=g.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,i=Ct(n);return w.jsx($j,{...i,...r,ref:e})});Yj.displayName=Qj;var Xj="DropdownMenuLabel",uC=g.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,i=Ct(n);return w.jsx(Fj,{...i,...r,ref:e})});uC.displayName=Xj;var Jj="DropdownMenuItem",cC=g.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,i=Ct(n);return w.jsx(Lj,{...i,...r,ref:e})});cC.displayName=Jj;var Zj="DropdownMenuCheckboxItem",dC=g.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,i=Ct(n);return w.jsx(jj,{...i,...r,ref:e})});dC.displayName=Zj;var eD="DropdownMenuRadioGroup",tD=g.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,i=Ct(n);return w.jsx(Dj,{...i,...r,ref:e})});tD.displayName=eD;var nD="DropdownMenuRadioItem",fC=g.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,i=Ct(n);return w.jsx(zj,{...i,...r,ref:e})});fC.displayName=nD;var rD="DropdownMenuItemIndicator",hC=g.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,i=Ct(n);return w.jsx(Uj,{...i,...r,ref:e})});hC.displayName=rD;var iD="DropdownMenuSeparator",pC=g.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,i=Ct(n);return w.jsx(Vj,{...i,...r,ref:e})});pC.displayName=iD;var sD="DropdownMenuArrow",oD=g.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,i=Ct(n);return w.jsx(Bj,{...i,...r,ref:e})});oD.displayName=sD;var aD="DropdownMenuSubTrigger",vC=g.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,i=Ct(n);return w.jsx(qj,{...i,...r,ref:e})});vC.displayName=aD;var lD="DropdownMenuSubContent",gC=g.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,i=Ct(n);return w.jsx(Hj,{...i,...r,ref:e,style:{...t.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});gC.displayName=lD;var uD=rC,cD=sC,dD=oC,mC=lC,yC=uC,_C=cC,wC=dC,xC=fC,bC=hC,EC=pC,SC=vC,CC=gC;/** + */var fo=g;function E$(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var S$=typeof Object.is=="function"?Object.is:E$,C$=fo.useState,k$=fo.useEffect,P$=fo.useLayoutEffect,R$=fo.useDebugValue;function T$(t,e){var n=e(),r=C$({inst:{value:n,getSnapshot:e}}),i=r[0].inst,s=r[1];return P$(function(){i.value=n,i.getSnapshot=e,Rf(i)&&s({inst:i})},[t,n,e]),k$(function(){return Rf(i)&&s({inst:i}),t(function(){Rf(i)&&s({inst:i})})},[t]),R$(n),n}function Rf(t){var e=t.getSnapshot;t=t.value;try{var n=e();return!S$(t,n)}catch{return!0}}function I$(t,e){return e()}var O$=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?I$:T$;jS.useSyncExternalStore=fo.useSyncExternalStore!==void 0?fo.useSyncExternalStore:O$;LS.exports=jS;var M$=LS.exports;function A$(){return M$.useSyncExternalStore(N$,()=>!0,()=>!1)}function N$(){return()=>{}}var hg="Avatar",[$$]=h$(hg),[F$,DS]=$$(hg),zS=g.forwardRef((t,e)=>{const{__scopeAvatar:n,...r}=t,[i,s]=g.useState("idle");return w.jsx(F$,{scope:n,imageLoadingStatus:i,onImageLoadingStatusChange:s,children:w.jsx(fg.span,{...r,ref:e})})});zS.displayName=hg;var US="AvatarImage",VS=g.forwardRef((t,e)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:i=()=>{},...s}=t,o=DS(US,n),a=L$(r,s),l=Ft(u=>{i(u),o.onImageLoadingStatusChange(u)});return on(()=>{a!=="idle"&&l(a)},[a,l]),a==="loaded"?w.jsx(fg.img,{...s,ref:e,src:r}):null});VS.displayName=US;var BS="AvatarFallback",qS=g.forwardRef((t,e)=>{const{__scopeAvatar:n,delayMs:r,...i}=t,s=DS(BS,n),[o,a]=g.useState(r===void 0);return g.useEffect(()=>{if(r!==void 0){const l=window.setTimeout(()=>a(!0),r);return()=>window.clearTimeout(l)}},[r]),o&&s.imageLoadingStatus!=="loaded"?w.jsx(fg.span,{...i,ref:e}):null});qS.displayName=BS;function B_(t,e){return t?e?(t.src!==e&&(t.src=e),t.complete&&t.naturalWidth>0?"loaded":"loading"):"error":"idle"}function L$(t,{referrerPolicy:e,crossOrigin:n}){const r=A$(),i=g.useRef(null),s=r?(i.current||(i.current=new window.Image),i.current):null,[o,a]=g.useState(()=>B_(s,t));return on(()=>{a(B_(s,t))},[s,t]),on(()=>{const l=d=>()=>{a(d)};if(!s)return;const u=l("loaded"),c=l("error");return s.addEventListener("load",u),s.addEventListener("error",c),e&&(s.referrerPolicy=e),typeof n=="string"&&(s.crossOrigin=n),()=>{s.removeEventListener("load",u),s.removeEventListener("error",c)}},[s,n,e]),o}var HS=zS,WS=VS,GS=qS;function KS(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var i=t.length;for(e=0;e{const e=z$(t),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=t;return{getClassGroupId:o=>{const a=o.split(pg);return a[0]===""&&a.length!==1&&a.shift(),YS(a,e)||D$(o)},getConflictingClassGroupIds:(o,a)=>{const l=n[o]||[];return a&&r[o]?[...l,...r[o]]:l}}},YS=(t,e)=>{var o;if(t.length===0)return e.classGroupId;const n=t[0],r=e.nextPart.get(n),i=r?YS(t.slice(1),r):void 0;if(i)return i;if(e.validators.length===0)return;const s=t.join(pg);return(o=e.validators.find(({validator:a})=>a(s)))==null?void 0:o.classGroupId},q_=/^\[(.+)\]$/,D$=t=>{if(q_.test(t)){const e=q_.exec(t)[1],n=e==null?void 0:e.substring(0,e.indexOf(":"));if(n)return"arbitrary.."+n}},z$=t=>{const{theme:e,prefix:n}=t,r={nextPart:new Map,validators:[]};return V$(Object.entries(t.classGroups),n).forEach(([s,o])=>{Pp(o,r,s,e)}),r},Pp=(t,e,n,r)=>{t.forEach(i=>{if(typeof i=="string"){const s=i===""?e:H_(e,i);s.classGroupId=n;return}if(typeof i=="function"){if(U$(i)){Pp(i(r),e,n,r);return}e.validators.push({validator:i,classGroupId:n});return}Object.entries(i).forEach(([s,o])=>{Pp(o,H_(e,s),n,r)})})},H_=(t,e)=>{let n=t;return e.split(pg).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},U$=t=>t.isThemeGetter,V$=(t,e)=>e?t.map(([n,r])=>{const i=r.map(s=>typeof s=="string"?e+s:typeof s=="object"?Object.fromEntries(Object.entries(s).map(([o,a])=>[e+o,a])):s);return[n,i]}):t,B$=t=>{if(t<1)return{get:()=>{},set:()=>{}};let e=0,n=new Map,r=new Map;const i=(s,o)=>{n.set(s,o),e++,e>t&&(e=0,r=n,n=new Map)};return{get(s){let o=n.get(s);if(o!==void 0)return o;if((o=r.get(s))!==void 0)return i(s,o),o},set(s,o){n.has(s)?n.set(s,o):i(s,o)}}},XS="!",q$=t=>{const{separator:e,experimentalParseClassName:n}=t,r=e.length===1,i=e[0],s=e.length,o=a=>{const l=[];let u=0,c=0,d;for(let y=0;yc?d-c:void 0;return{modifiers:l,hasImportantModifier:_,baseClassName:m,maybePostfixModifierPosition:p}};return n?a=>n({className:a,parseClassName:o}):o},H$=t=>{if(t.length<=1)return t;const e=[];let n=[];return t.forEach(r=>{r[0]==="["?(e.push(...n.sort(),r),n=[]):n.push(r)}),e.push(...n.sort()),e},W$=t=>({cache:B$(t.cacheSize),parseClassName:q$(t),...j$(t)}),G$=/\s+/,K$=(t,e)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i}=e,s=[],o=t.trim().split(G$);let a="";for(let l=o.length-1;l>=0;l-=1){const u=o[l],{modifiers:c,hasImportantModifier:d,baseClassName:f,maybePostfixModifierPosition:_}=n(u);let m=!!_,p=r(m?f.substring(0,_):f);if(!p){if(!m){a=u+(a.length>0?" "+a:a);continue}if(p=r(f),!p){a=u+(a.length>0?" "+a:a);continue}m=!1}const y=H$(c).join(":"),h=d?y+XS:y,v=h+p;if(s.includes(v))continue;s.push(v);const x=i(p,m);for(let b=0;b0?" "+a:a)}return a};function Q$(){let t=0,e,n,r="";for(;t{if(typeof t=="string")return t;let e,n="";for(let r=0;rd(c),t());return n=W$(u),r=n.cache.get,i=n.cache.set,s=a,a(l)}function a(l){const u=r(l);if(u)return u;const c=K$(l,n);return i(l,c),c}return function(){return s(Q$.apply(null,arguments))}}const Re=t=>{const e=n=>n[t]||[];return e.isThemeGetter=!0,e},ZS=/^\[(?:([a-z-]+):)?(.+)\]$/i,X$=/^\d+\/\d+$/,J$=new Set(["px","full","screen"]),Z$=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,eF=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,tF=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,nF=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,rF=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Wn=t=>js(t)||J$.has(t)||X$.test(t),Sr=t=>_o(t,"length",dF),js=t=>!!t&&!Number.isNaN(Number(t)),Tf=t=>_o(t,"number",js),zo=t=>!!t&&Number.isInteger(Number(t)),iF=t=>t.endsWith("%")&&js(t.slice(0,-1)),re=t=>ZS.test(t),Cr=t=>Z$.test(t),sF=new Set(["length","size","percentage"]),oF=t=>_o(t,sF,e1),aF=t=>_o(t,"position",e1),lF=new Set(["image","url"]),uF=t=>_o(t,lF,hF),cF=t=>_o(t,"",fF),Uo=()=>!0,_o=(t,e,n)=>{const r=ZS.exec(t);return r?r[1]?typeof e=="string"?r[1]===e:e.has(r[1]):n(r[2]):!1},dF=t=>eF.test(t)&&!tF.test(t),e1=()=>!1,fF=t=>nF.test(t),hF=t=>rF.test(t),pF=()=>{const t=Re("colors"),e=Re("spacing"),n=Re("blur"),r=Re("brightness"),i=Re("borderColor"),s=Re("borderRadius"),o=Re("borderSpacing"),a=Re("borderWidth"),l=Re("contrast"),u=Re("grayscale"),c=Re("hueRotate"),d=Re("invert"),f=Re("gap"),_=Re("gradientColorStops"),m=Re("gradientColorStopPositions"),p=Re("inset"),y=Re("margin"),h=Re("opacity"),v=Re("padding"),x=Re("saturate"),b=Re("scale"),E=Re("sepia"),S=Re("skew"),k=Re("space"),C=Re("translate"),R=()=>["auto","contain","none"],P=()=>["auto","hidden","clip","visible","scroll"],$=()=>["auto",re,e],O=()=>[re,e],U=()=>["",Wn,Sr],L=()=>["auto",js,re],H=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],q=()=>["solid","dashed","dotted","double","none"],K=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],I=()=>["start","end","center","between","around","evenly","stretch"],M=()=>["","0",re],B=()=>["auto","avoid","all","avoid-page","page","left","right","column"],G=()=>[js,re];return{cacheSize:500,separator:":",theme:{colors:[Uo],spacing:[Wn,Sr],blur:["none","",Cr,re],brightness:G(),borderColor:[t],borderRadius:["none","","full",Cr,re],borderSpacing:O(),borderWidth:U(),contrast:G(),grayscale:M(),hueRotate:G(),invert:M(),gap:O(),gradientColorStops:[t],gradientColorStopPositions:[iF,Sr],inset:$(),margin:$(),opacity:G(),padding:O(),saturate:G(),scale:G(),sepia:M(),skew:G(),space:O(),translate:O()},classGroups:{aspect:[{aspect:["auto","square","video",re]}],container:["container"],columns:[{columns:[Cr]}],"break-after":[{"break-after":B()}],"break-before":[{"break-before":B()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...H(),re]}],overflow:[{overflow:P()}],"overflow-x":[{"overflow-x":P()}],"overflow-y":[{"overflow-y":P()}],overscroll:[{overscroll:R()}],"overscroll-x":[{"overscroll-x":R()}],"overscroll-y":[{"overscroll-y":R()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[p]}],"inset-x":[{"inset-x":[p]}],"inset-y":[{"inset-y":[p]}],start:[{start:[p]}],end:[{end:[p]}],top:[{top:[p]}],right:[{right:[p]}],bottom:[{bottom:[p]}],left:[{left:[p]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",zo,re]}],basis:[{basis:$()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",re]}],grow:[{grow:M()}],shrink:[{shrink:M()}],order:[{order:["first","last","none",zo,re]}],"grid-cols":[{"grid-cols":[Uo]}],"col-start-end":[{col:["auto",{span:["full",zo,re]},re]}],"col-start":[{"col-start":L()}],"col-end":[{"col-end":L()}],"grid-rows":[{"grid-rows":[Uo]}],"row-start-end":[{row:["auto",{span:[zo,re]},re]}],"row-start":[{"row-start":L()}],"row-end":[{"row-end":L()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",re]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",re]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal",...I()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...I(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...I(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[v]}],px:[{px:[v]}],py:[{py:[v]}],ps:[{ps:[v]}],pe:[{pe:[v]}],pt:[{pt:[v]}],pr:[{pr:[v]}],pb:[{pb:[v]}],pl:[{pl:[v]}],m:[{m:[y]}],mx:[{mx:[y]}],my:[{my:[y]}],ms:[{ms:[y]}],me:[{me:[y]}],mt:[{mt:[y]}],mr:[{mr:[y]}],mb:[{mb:[y]}],ml:[{ml:[y]}],"space-x":[{"space-x":[k]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[k]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",re,e]}],"min-w":[{"min-w":[re,e,"min","max","fit"]}],"max-w":[{"max-w":[re,e,"none","full","min","max","fit","prose",{screen:[Cr]},Cr]}],h:[{h:[re,e,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[re,e,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[re,e,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[re,e,"auto","min","max","fit"]}],"font-size":[{text:["base",Cr,Sr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Tf]}],"font-family":[{font:[Uo]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",re]}],"line-clamp":[{"line-clamp":["none",js,Tf]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Wn,re]}],"list-image":[{"list-image":["none",re]}],"list-style-type":[{list:["none","disc","decimal",re]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[t]}],"placeholder-opacity":[{"placeholder-opacity":[h]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[t]}],"text-opacity":[{"text-opacity":[h]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...q(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Wn,Sr]}],"underline-offset":[{"underline-offset":["auto",Wn,re]}],"text-decoration-color":[{decoration:[t]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:O()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",re]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",re]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[h]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...H(),aF]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",oF]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},uF]}],"bg-color":[{bg:[t]}],"gradient-from-pos":[{from:[m]}],"gradient-via-pos":[{via:[m]}],"gradient-to-pos":[{to:[m]}],"gradient-from":[{from:[_]}],"gradient-via":[{via:[_]}],"gradient-to":[{to:[_]}],rounded:[{rounded:[s]}],"rounded-s":[{"rounded-s":[s]}],"rounded-e":[{"rounded-e":[s]}],"rounded-t":[{"rounded-t":[s]}],"rounded-r":[{"rounded-r":[s]}],"rounded-b":[{"rounded-b":[s]}],"rounded-l":[{"rounded-l":[s]}],"rounded-ss":[{"rounded-ss":[s]}],"rounded-se":[{"rounded-se":[s]}],"rounded-ee":[{"rounded-ee":[s]}],"rounded-es":[{"rounded-es":[s]}],"rounded-tl":[{"rounded-tl":[s]}],"rounded-tr":[{"rounded-tr":[s]}],"rounded-br":[{"rounded-br":[s]}],"rounded-bl":[{"rounded-bl":[s]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[h]}],"border-style":[{border:[...q(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[h]}],"divide-style":[{divide:q()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-s":[{"border-s":[i]}],"border-color-e":[{"border-e":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["",...q()]}],"outline-offset":[{"outline-offset":[Wn,re]}],"outline-w":[{outline:[Wn,Sr]}],"outline-color":[{outline:[t]}],"ring-w":[{ring:U()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[t]}],"ring-opacity":[{"ring-opacity":[h]}],"ring-offset-w":[{"ring-offset":[Wn,Sr]}],"ring-offset-color":[{"ring-offset":[t]}],shadow:[{shadow:["","inner","none",Cr,cF]}],"shadow-color":[{shadow:[Uo]}],opacity:[{opacity:[h]}],"mix-blend":[{"mix-blend":[...K(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":K()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Cr,re]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[c]}],invert:[{invert:[d]}],saturate:[{saturate:[x]}],sepia:[{sepia:[E]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[c]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[h]}],"backdrop-saturate":[{"backdrop-saturate":[x]}],"backdrop-sepia":[{"backdrop-sepia":[E]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[o]}],"border-spacing-x":[{"border-spacing-x":[o]}],"border-spacing-y":[{"border-spacing-y":[o]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",re]}],duration:[{duration:G()}],ease:[{ease:["linear","in","out","in-out",re]}],delay:[{delay:G()}],animate:[{animate:["none","spin","ping","pulse","bounce",re]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[b]}],"scale-x":[{"scale-x":[b]}],"scale-y":[{"scale-y":[b]}],rotate:[{rotate:[zo,re]}],"translate-x":[{"translate-x":[C]}],"translate-y":[{"translate-y":[C]}],"skew-x":[{"skew-x":[S]}],"skew-y":[{"skew-y":[S]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",re]}],accent:[{accent:["auto",t]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",re]}],"caret-color":[{caret:[t]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":O()}],"scroll-mx":[{"scroll-mx":O()}],"scroll-my":[{"scroll-my":O()}],"scroll-ms":[{"scroll-ms":O()}],"scroll-me":[{"scroll-me":O()}],"scroll-mt":[{"scroll-mt":O()}],"scroll-mr":[{"scroll-mr":O()}],"scroll-mb":[{"scroll-mb":O()}],"scroll-ml":[{"scroll-ml":O()}],"scroll-p":[{"scroll-p":O()}],"scroll-px":[{"scroll-px":O()}],"scroll-py":[{"scroll-py":O()}],"scroll-ps":[{"scroll-ps":O()}],"scroll-pe":[{"scroll-pe":O()}],"scroll-pt":[{"scroll-pt":O()}],"scroll-pr":[{"scroll-pr":O()}],"scroll-pb":[{"scroll-pb":O()}],"scroll-pl":[{"scroll-pl":O()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",re]}],fill:[{fill:[t,"none"]}],"stroke-w":[{stroke:[Wn,Sr,Tf]}],stroke:[{stroke:[t,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},vF=Y$(pF);function at(...t){return vF(QS(t))}function k3(t){const e=t.trim(),n=e.match(/^(\d{4})-(\d{4,5})(v\d+)?$/);if(n)return`${n[1]}.${n[2]}`;const r=e.match(/^(\d{4}\.\d{4,5})(v\d+)$/);return r?r[1]:e}function P3(t){if(t==null||t==="")return"—";const e=typeof t=="string"?parseFloat(t):t;return Number.isFinite(e)?Math.abs(e)>=100?Bl(e,0):Math.abs(e)>=10?Bl(e,1):Math.abs(e)<1?Bl(e,3):Bl(e,2):String(t)}function Bl(t,e){const n=String(Math.abs(t));if(n.includes("e"))return t.toFixed(e);const r=+`${Math.round(+`${n}e${e}`)}e-${e}`;return(t<0?-r:r).toFixed(e)}const t1=g.forwardRef(({className:t,...e},n)=>w.jsx(HS,{ref:n,className:at("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",t),...e}));t1.displayName=HS.displayName;const n1=g.forwardRef(({className:t,...e},n)=>w.jsx(WS,{ref:n,className:at("aspect-square h-full w-full",t),...e}));n1.displayName=WS.displayName;const r1=g.forwardRef(({className:t,...e},n)=>w.jsx(GS,{ref:n,className:at("flex h-full w-full items-center justify-center rounded-full bg-muted",t),...e}));r1.displayName=GS.displayName;function W_(t){const e=gF(t),n=g.forwardRef((r,i)=>{const{children:s,...o}=r,a=g.Children.toArray(s),l=a.find(yF);if(l){const u=l.props.children,c=a.map(d=>d===l?g.Children.count(u)>1?g.Children.only(null):g.isValidElement(u)?u.props.children:null:d);return w.jsx(e,{...o,ref:i,children:g.isValidElement(u)?g.cloneElement(u,void 0,c):null})}return w.jsx(e,{...o,ref:i,children:s})});return n.displayName=`${t}.Slot`,n}function gF(t){const e=g.forwardRef((n,r)=>{const{children:i,...s}=n;if(g.isValidElement(i)){const o=wF(i),a=_F(s,i.props);return i.type!==g.Fragment&&(a.ref=r?oi(r,o):o),g.cloneElement(i,a)}return g.Children.count(i)>1?g.Children.only(null):null});return e.displayName=`${t}.SlotClone`,e}var mF=Symbol("radix.slottable");function yF(t){return g.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===mF}function _F(t,e){const n={...e};for(const r in e){const i=t[r],s=e[r];/^on[A-Z]/.test(r)?i&&s?n[r]=(...a)=>{const l=s(...a);return i(...a),l}:i&&(n[r]=i):r==="style"?n[r]={...i,...s}:r==="className"&&(n[r]=[i,s].filter(Boolean).join(" "))}return{...t,...n}}function wF(t){var r,i;let e=(r=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:r.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(i=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:i.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}function vg(t){const e=t+"CollectionProvider",[n,r]=Wi(e),[i,s]=n(e,{collectionRef:{current:null},itemMap:new Map}),o=p=>{const{scope:y,children:h}=p,v=V.useRef(null),x=V.useRef(new Map).current;return w.jsx(i,{scope:y,itemMap:x,collectionRef:v,children:h})};o.displayName=e;const a=t+"CollectionSlot",l=W_(a),u=V.forwardRef((p,y)=>{const{scope:h,children:v}=p,x=s(a,h),b=Xe(y,x.collectionRef);return w.jsx(l,{ref:b,children:v})});u.displayName=a;const c=t+"CollectionItemSlot",d="data-radix-collection-item",f=W_(c),_=V.forwardRef((p,y)=>{const{scope:h,children:v,...x}=p,b=V.useRef(null),E=Xe(y,b),S=s(c,h);return V.useEffect(()=>(S.itemMap.set(b,{ref:b,...x}),()=>void S.itemMap.delete(b))),w.jsx(f,{[d]:"",ref:E,children:v})});_.displayName=c;function m(p){const y=s(t+"CollectionConsumer",p);return V.useCallback(()=>{const v=y.collectionRef.current;if(!v)return[];const x=Array.from(v.querySelectorAll(`[${d}]`));return Array.from(y.itemMap.values()).sort((S,k)=>x.indexOf(S.ref.current)-x.indexOf(k.ref.current))},[y.collectionRef,y.itemMap])}return[{Provider:o,Slot:u,ItemSlot:_},m,r]}var xF=g.createContext(void 0);function i1(t){const e=g.useContext(xF);return t||e||"ltr"}const bF=["top","right","bottom","left"],ti=Math.min,zt=Math.max,yc=Math.round,ql=Math.floor,Un=t=>({x:t,y:t}),EF={left:"right",right:"left",bottom:"top",top:"bottom"};function Rp(t,e,n){return zt(t,ti(e,n))}function fr(t,e){return typeof t=="function"?t(e):t}function hr(t){return t.split("-")[0]}function wo(t){return t.split("-")[1]}function gg(t){return t==="x"?"y":"x"}function mg(t){return t==="y"?"height":"width"}function jn(t){const e=t[0];return e==="t"||e==="b"?"y":"x"}function yg(t){return gg(jn(t))}function SF(t,e,n){n===void 0&&(n=!1);const r=wo(t),i=yg(t),s=mg(i);let o=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(o=_c(o)),[o,_c(o)]}function CF(t){const e=_c(t);return[Tp(t),e,Tp(e)]}function Tp(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}const G_=["left","right"],K_=["right","left"],kF=["top","bottom"],PF=["bottom","top"];function RF(t,e,n){switch(t){case"top":case"bottom":return n?e?K_:G_:e?G_:K_;case"left":case"right":return e?kF:PF;default:return[]}}function TF(t,e,n,r){const i=wo(t);let s=RF(hr(t),n==="start",r);return i&&(s=s.map(o=>o+"-"+i),e&&(s=s.concat(s.map(Tp)))),s}function _c(t){const e=hr(t);return EF[e]+t.slice(e.length)}function IF(t){return{top:0,right:0,bottom:0,left:0,...t}}function s1(t){return typeof t!="number"?IF(t):{top:t,right:t,bottom:t,left:t}}function wc(t){const{x:e,y:n,width:r,height:i}=t;return{width:r,height:i,top:n,left:e,right:e+r,bottom:n+i,x:e,y:n}}function Q_(t,e,n){let{reference:r,floating:i}=t;const s=jn(e),o=yg(e),a=mg(o),l=hr(e),u=s==="y",c=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[a]/2-i[a]/2;let _;switch(l){case"top":_={x:c,y:r.y-i.height};break;case"bottom":_={x:c,y:r.y+r.height};break;case"right":_={x:r.x+r.width,y:d};break;case"left":_={x:r.x-i.width,y:d};break;default:_={x:r.x,y:r.y}}switch(wo(e)){case"start":_[o]-=f*(n&&u?-1:1);break;case"end":_[o]+=f*(n&&u?-1:1);break}return _}async function OF(t,e){var n;e===void 0&&(e={});const{x:r,y:i,platform:s,rects:o,elements:a,strategy:l}=t,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:f=!1,padding:_=0}=fr(e,t),m=s1(_),y=a[f?d==="floating"?"reference":"floating":d],h=wc(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(y)))==null||n?y:y.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:u,rootBoundary:c,strategy:l})),v=d==="floating"?{x:r,y:i,width:o.floating.width,height:o.floating.height}:o.reference,x=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),b=await(s.isElement==null?void 0:s.isElement(x))?await(s.getScale==null?void 0:s.getScale(x))||{x:1,y:1}:{x:1,y:1},E=wc(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:v,offsetParent:x,strategy:l}):v);return{top:(h.top-E.top+m.top)/b.y,bottom:(E.bottom-h.bottom+m.bottom)/b.y,left:(h.left-E.left+m.left)/b.x,right:(E.right-h.right+m.right)/b.x}}const MF=50,AF=async(t,e,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:s=[],platform:o}=n,a=o.detectOverflow?o:{...o,detectOverflow:OF},l=await(o.isRTL==null?void 0:o.isRTL(e));let u=await o.getElementRects({reference:t,floating:e,strategy:i}),{x:c,y:d}=Q_(u,r,l),f=r,_=0;const m={};for(let p=0;p({name:"arrow",options:t,async fn(e){const{x:n,y:r,placement:i,rects:s,platform:o,elements:a,middlewareData:l}=e,{element:u,padding:c=0}=fr(t,e)||{};if(u==null)return{};const d=s1(c),f={x:n,y:r},_=yg(i),m=mg(_),p=await o.getDimensions(u),y=_==="y",h=y?"top":"left",v=y?"bottom":"right",x=y?"clientHeight":"clientWidth",b=s.reference[m]+s.reference[_]-f[_]-s.floating[m],E=f[_]-s.reference[_],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(u));let k=S?S[x]:0;(!k||!await(o.isElement==null?void 0:o.isElement(S)))&&(k=a.floating[x]||s.floating[m]);const C=b/2-E/2,R=k/2-p[m]/2-1,P=ti(d[h],R),$=ti(d[v],R),O=P,U=k-p[m]-$,L=k/2-p[m]/2+C,H=Rp(O,L,U),q=!l.arrow&&wo(i)!=null&&L!==H&&s.reference[m]/2-(LL<=0)){var $,O;const L=((($=s.flip)==null?void 0:$.index)||0)+1,H=k[L];if(H&&(!(d==="alignment"?v!==jn(H):!1)||P.every(I=>jn(I.placement)===v?I.overflows[0]>0:!0)))return{data:{index:L,overflows:P},reset:{placement:H}};let q=(O=P.filter(K=>K.overflows[0]<=0).sort((K,I)=>K.overflows[1]-I.overflows[1])[0])==null?void 0:O.placement;if(!q)switch(_){case"bestFit":{var U;const K=(U=P.filter(I=>{if(S){const M=jn(I.placement);return M===v||M==="y"}return!0}).map(I=>[I.placement,I.overflows.filter(M=>M>0).reduce((M,B)=>M+B,0)]).sort((I,M)=>I[1]-M[1])[0])==null?void 0:U[0];K&&(q=K);break}case"initialPlacement":q=a;break}if(i!==q)return{reset:{placement:q}}}return{}}}};function Y_(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function X_(t){return bF.some(e=>t[e]>=0)}const FF=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:n,platform:r}=e,{strategy:i="referenceHidden",...s}=fr(t,e);switch(i){case"referenceHidden":{const o=await r.detectOverflow(e,{...s,elementContext:"reference"}),a=Y_(o,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:X_(a)}}}case"escaped":{const o=await r.detectOverflow(e,{...s,altBoundary:!0}),a=Y_(o,n.floating);return{data:{escapedOffsets:a,escaped:X_(a)}}}default:return{}}}}},o1=new Set(["left","top"]);async function LF(t,e){const{placement:n,platform:r,elements:i}=t,s=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=hr(n),a=wo(n),l=jn(n)==="y",u=o1.has(o)?-1:1,c=s&&l?-1:1,d=fr(e,t);let{mainAxis:f,crossAxis:_,alignmentAxis:m}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&typeof m=="number"&&(_=a==="end"?m*-1:m),l?{x:_*c,y:f*u}:{x:f*u,y:_*c}}const jF=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,r;const{x:i,y:s,placement:o,middlewareData:a}=e,l=await LF(e,t);return o===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:i+l.x,y:s+l.y,data:{...l,placement:o}}}}},DF=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:r,placement:i,platform:s}=e,{mainAxis:o=!0,crossAxis:a=!1,limiter:l={fn:h=>{let{x:v,y:x}=h;return{x:v,y:x}}},...u}=fr(t,e),c={x:n,y:r},d=await s.detectOverflow(e,u),f=jn(hr(i)),_=gg(f);let m=c[_],p=c[f];if(o){const h=_==="y"?"top":"left",v=_==="y"?"bottom":"right",x=m+d[h],b=m-d[v];m=Rp(x,m,b)}if(a){const h=f==="y"?"top":"left",v=f==="y"?"bottom":"right",x=p+d[h],b=p-d[v];p=Rp(x,p,b)}const y=l.fn({...e,[_]:m,[f]:p});return{...y,data:{x:y.x-n,y:y.y-r,enabled:{[_]:o,[f]:a}}}}}},zF=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:n,y:r,placement:i,rects:s,middlewareData:o}=e,{offset:a=0,mainAxis:l=!0,crossAxis:u=!0}=fr(t,e),c={x:n,y:r},d=jn(i),f=gg(d);let _=c[f],m=c[d];const p=fr(a,e),y=typeof p=="number"?{mainAxis:p,crossAxis:0}:{mainAxis:0,crossAxis:0,...p};if(l){const x=f==="y"?"height":"width",b=s.reference[f]-s.floating[x]+y.mainAxis,E=s.reference[f]+s.reference[x]-y.mainAxis;_E&&(_=E)}if(u){var h,v;const x=f==="y"?"width":"height",b=o1.has(hr(i)),E=s.reference[d]-s.floating[x]+(b&&((h=o.offset)==null?void 0:h[d])||0)+(b?0:y.crossAxis),S=s.reference[d]+s.reference[x]+(b?0:((v=o.offset)==null?void 0:v[d])||0)-(b?y.crossAxis:0);mS&&(m=S)}return{[f]:_,[d]:m}}}},UF=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var n,r;const{placement:i,rects:s,platform:o,elements:a}=e,{apply:l=()=>{},...u}=fr(t,e),c=await o.detectOverflow(e,u),d=hr(i),f=wo(i),_=jn(i)==="y",{width:m,height:p}=s.floating;let y,h;d==="top"||d==="bottom"?(y=d,h=f===(await(o.isRTL==null?void 0:o.isRTL(a.floating))?"start":"end")?"left":"right"):(h=d,y=f==="end"?"top":"bottom");const v=p-c.top-c.bottom,x=m-c.left-c.right,b=ti(p-c[y],v),E=ti(m-c[h],x),S=!e.middlewareData.shift;let k=b,C=E;if((n=e.middlewareData.shift)!=null&&n.enabled.x&&(C=x),(r=e.middlewareData.shift)!=null&&r.enabled.y&&(k=v),S&&!f){const P=zt(c.left,0),$=zt(c.right,0),O=zt(c.top,0),U=zt(c.bottom,0);_?C=m-2*(P!==0||$!==0?P+$:zt(c.left,c.right)):k=p-2*(O!==0||U!==0?O+U:zt(c.top,c.bottom))}await l({...e,availableWidth:C,availableHeight:k});const R=await o.getDimensions(a.floating);return m!==R.width||p!==R.height?{reset:{rects:!0}}:{}}}};function nd(){return typeof window<"u"}function xo(t){return a1(t)?(t.nodeName||"").toLowerCase():"#document"}function Ht(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Bn(t){var e;return(e=(a1(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function a1(t){return nd()?t instanceof Node||t instanceof Ht(t).Node:!1}function bn(t){return nd()?t instanceof Element||t instanceof Ht(t).Element:!1}function mr(t){return nd()?t instanceof HTMLElement||t instanceof Ht(t).HTMLElement:!1}function J_(t){return!nd()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof Ht(t).ShadowRoot}function nl(t){const{overflow:e,overflowX:n,overflowY:r,display:i}=En(t);return/auto|scroll|overlay|hidden|clip/.test(e+r+n)&&i!=="inline"&&i!=="contents"}function VF(t){return/^(table|td|th)$/.test(xo(t))}function rd(t){try{if(t.matches(":popover-open"))return!0}catch{}try{return t.matches(":modal")}catch{return!1}}const BF=/transform|translate|scale|rotate|perspective|filter/,qF=/paint|layout|strict|content/,fi=t=>!!t&&t!=="none";let If;function _g(t){const e=bn(t)?En(t):t;return fi(e.transform)||fi(e.translate)||fi(e.scale)||fi(e.rotate)||fi(e.perspective)||!wg()&&(fi(e.backdropFilter)||fi(e.filter))||BF.test(e.willChange||"")||qF.test(e.contain||"")}function HF(t){let e=ni(t);for(;mr(e)&&!ho(e);){if(_g(e))return e;if(rd(e))return null;e=ni(e)}return null}function wg(){return If==null&&(If=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),If}function ho(t){return/^(html|body|#document)$/.test(xo(t))}function En(t){return Ht(t).getComputedStyle(t)}function id(t){return bn(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function ni(t){if(xo(t)==="html")return t;const e=t.assignedSlot||t.parentNode||J_(t)&&t.host||Bn(t);return J_(e)?e.host:e}function l1(t){const e=ni(t);return ho(e)?t.ownerDocument?t.ownerDocument.body:t.body:mr(e)&&nl(e)?e:l1(e)}function Ba(t,e,n){var r;e===void 0&&(e=[]),n===void 0&&(n=!0);const i=l1(t),s=i===((r=t.ownerDocument)==null?void 0:r.body),o=Ht(i);if(s){const a=Ip(o);return e.concat(o,o.visualViewport||[],nl(i)?i:[],a&&n?Ba(a):[])}else return e.concat(i,Ba(i,[],n))}function Ip(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function u1(t){const e=En(t);let n=parseFloat(e.width)||0,r=parseFloat(e.height)||0;const i=mr(t),s=i?t.offsetWidth:n,o=i?t.offsetHeight:r,a=yc(n)!==s||yc(r)!==o;return a&&(n=s,r=o),{width:n,height:r,$:a}}function xg(t){return bn(t)?t:t.contextElement}function Ds(t){const e=xg(t);if(!mr(e))return Un(1);const n=e.getBoundingClientRect(),{width:r,height:i,$:s}=u1(e);let o=(s?yc(n.width):n.width)/r,a=(s?yc(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const WF=Un(0);function c1(t){const e=Ht(t);return!wg()||!e.visualViewport?WF:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function GF(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==Ht(t)?!1:e}function Vi(t,e,n,r){e===void 0&&(e=!1),n===void 0&&(n=!1);const i=t.getBoundingClientRect(),s=xg(t);let o=Un(1);e&&(r?bn(r)&&(o=Ds(r)):o=Ds(t));const a=GF(s,n,r)?c1(s):Un(0);let l=(i.left+a.x)/o.x,u=(i.top+a.y)/o.y,c=i.width/o.x,d=i.height/o.y;if(s){const f=Ht(s),_=r&&bn(r)?Ht(r):r;let m=f,p=Ip(m);for(;p&&r&&_!==m;){const y=Ds(p),h=p.getBoundingClientRect(),v=En(p),x=h.left+(p.clientLeft+parseFloat(v.paddingLeft))*y.x,b=h.top+(p.clientTop+parseFloat(v.paddingTop))*y.y;l*=y.x,u*=y.y,c*=y.x,d*=y.y,l+=x,u+=b,m=Ht(p),p=Ip(m)}}return wc({width:c,height:d,x:l,y:u})}function sd(t,e){const n=id(t).scrollLeft;return e?e.left+n:Vi(Bn(t)).left+n}function d1(t,e){const n=t.getBoundingClientRect(),r=n.left+e.scrollLeft-sd(t,n),i=n.top+e.scrollTop;return{x:r,y:i}}function KF(t){let{elements:e,rect:n,offsetParent:r,strategy:i}=t;const s=i==="fixed",o=Bn(r),a=e?rd(e.floating):!1;if(r===o||a&&s)return n;let l={scrollLeft:0,scrollTop:0},u=Un(1);const c=Un(0),d=mr(r);if((d||!d&&!s)&&((xo(r)!=="body"||nl(o))&&(l=id(r)),d)){const _=Vi(r);u=Ds(r),c.x=_.x+r.clientLeft,c.y=_.y+r.clientTop}const f=o&&!d&&!s?d1(o,l):Un(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+c.x+f.x,y:n.y*u.y-l.scrollTop*u.y+c.y+f.y}}function QF(t){return Array.from(t.getClientRects())}function YF(t){const e=Bn(t),n=id(t),r=t.ownerDocument.body,i=zt(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),s=zt(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight);let o=-n.scrollLeft+sd(t);const a=-n.scrollTop;return En(r).direction==="rtl"&&(o+=zt(e.clientWidth,r.clientWidth)-i),{width:i,height:s,x:o,y:a}}const Z_=25;function XF(t,e){const n=Ht(t),r=Bn(t),i=n.visualViewport;let s=r.clientWidth,o=r.clientHeight,a=0,l=0;if(i){s=i.width,o=i.height;const c=wg();(!c||c&&e==="fixed")&&(a=i.offsetLeft,l=i.offsetTop)}const u=sd(r);if(u<=0){const c=r.ownerDocument,d=c.body,f=getComputedStyle(d),_=c.compatMode==="CSS1Compat"&&parseFloat(f.marginLeft)+parseFloat(f.marginRight)||0,m=Math.abs(r.clientWidth-d.clientWidth-_);m<=Z_&&(s-=m)}else u<=Z_&&(s+=u);return{width:s,height:o,x:a,y:l}}function JF(t,e){const n=Vi(t,!0,e==="fixed"),r=n.top+t.clientTop,i=n.left+t.clientLeft,s=mr(t)?Ds(t):Un(1),o=t.clientWidth*s.x,a=t.clientHeight*s.y,l=i*s.x,u=r*s.y;return{width:o,height:a,x:l,y:u}}function e0(t,e,n){let r;if(e==="viewport")r=XF(t,n);else if(e==="document")r=YF(Bn(t));else if(bn(e))r=JF(e,n);else{const i=c1(t);r={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return wc(r)}function f1(t,e){const n=ni(t);return n===e||!bn(n)||ho(n)?!1:En(n).position==="fixed"||f1(n,e)}function ZF(t,e){const n=e.get(t);if(n)return n;let r=Ba(t,[],!1).filter(a=>bn(a)&&xo(a)!=="body"),i=null;const s=En(t).position==="fixed";let o=s?ni(t):t;for(;bn(o)&&!ho(o);){const a=En(o),l=_g(o);!l&&a.position==="fixed"&&(i=null),(s?!l&&!i:!l&&a.position==="static"&&!!i&&(i.position==="absolute"||i.position==="fixed")||nl(o)&&!l&&f1(t,o))?r=r.filter(c=>c!==o):i=a,o=ni(o)}return e.set(t,r),r}function eL(t){let{element:e,boundary:n,rootBoundary:r,strategy:i}=t;const o=[...n==="clippingAncestors"?rd(e)?[]:ZF(e,this._c):[].concat(n),r],a=e0(e,o[0],i);let l=a.top,u=a.right,c=a.bottom,d=a.left;for(let f=1;f{o(!1,1e-7)},1e3)}k===1&&!p1(u,t.getBoundingClientRect())&&o(),b=!1}try{n=new IntersectionObserver(E,{...x,root:i.ownerDocument})}catch{n=new IntersectionObserver(E,x)}n.observe(t)}return o(!0),s}function aL(t,e,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,u=xg(t),c=i||s?[...u?Ba(u):[],...e?Ba(e):[]]:[];c.forEach(h=>{i&&h.addEventListener("scroll",n,{passive:!0}),s&&h.addEventListener("resize",n)});const d=u&&a?oL(u,n):null;let f=-1,_=null;o&&(_=new ResizeObserver(h=>{let[v]=h;v&&v.target===u&&_&&e&&(_.unobserve(e),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var x;(x=_)==null||x.observe(e)})),n()}),u&&!l&&_.observe(u),e&&_.observe(e));let m,p=l?Vi(t):null;l&&y();function y(){const h=Vi(t);p&&!p1(p,h)&&n(),p=h,m=requestAnimationFrame(y)}return n(),()=>{var h;c.forEach(v=>{i&&v.removeEventListener("scroll",n),s&&v.removeEventListener("resize",n)}),d==null||d(),(h=_)==null||h.disconnect(),_=null,l&&cancelAnimationFrame(m)}}const lL=jF,uL=DF,cL=$F,dL=UF,fL=FF,n0=NF,hL=zF,pL=(t,e,n)=>{const r=new Map,i={platform:sL,...n},s={...i.platform,_c:r};return AF(t,e,{...i,platform:s})};var vL=typeof document<"u",gL=function(){},hu=vL?g.useLayoutEffect:gL;function xc(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let n,r,i;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(n=t.length,n!==e.length)return!1;for(r=n;r--!==0;)if(!xc(t[r],e[r]))return!1;return!0}if(i=Object.keys(t),n=i.length,n!==Object.keys(e).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(e,i[r]))return!1;for(r=n;r--!==0;){const s=i[r];if(!(s==="_owner"&&t.$$typeof)&&!xc(t[s],e[s]))return!1}return!0}return t!==t&&e!==e}function v1(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function r0(t,e){const n=v1(t);return Math.round(e*n)/n}function Mf(t){const e=g.useRef(t);return hu(()=>{e.current=t}),e}function mL(t){t===void 0&&(t={});const{placement:e="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:s,floating:o}={},transform:a=!0,whileElementsMounted:l,open:u}=t,[c,d]=g.useState({x:0,y:0,strategy:n,placement:e,middlewareData:{},isPositioned:!1}),[f,_]=g.useState(r);xc(f,r)||_(r);const[m,p]=g.useState(null),[y,h]=g.useState(null),v=g.useCallback(I=>{I!==S.current&&(S.current=I,p(I))},[]),x=g.useCallback(I=>{I!==k.current&&(k.current=I,h(I))},[]),b=s||m,E=o||y,S=g.useRef(null),k=g.useRef(null),C=g.useRef(c),R=l!=null,P=Mf(l),$=Mf(i),O=Mf(u),U=g.useCallback(()=>{if(!S.current||!k.current)return;const I={placement:e,strategy:n,middleware:f};$.current&&(I.platform=$.current),pL(S.current,k.current,I).then(M=>{const B={...M,isPositioned:O.current!==!1};L.current&&!xc(C.current,B)&&(C.current=B,el.flushSync(()=>{d(B)}))})},[f,e,n,$,O]);hu(()=>{u===!1&&C.current.isPositioned&&(C.current.isPositioned=!1,d(I=>({...I,isPositioned:!1})))},[u]);const L=g.useRef(!1);hu(()=>(L.current=!0,()=>{L.current=!1}),[]),hu(()=>{if(b&&(S.current=b),E&&(k.current=E),b&&E){if(P.current)return P.current(b,E,U);U()}},[b,E,U,P,R]);const H=g.useMemo(()=>({reference:S,floating:k,setReference:v,setFloating:x}),[v,x]),q=g.useMemo(()=>({reference:b,floating:E}),[b,E]),K=g.useMemo(()=>{const I={position:n,left:0,top:0};if(!q.floating)return I;const M=r0(q.floating,c.x),B=r0(q.floating,c.y);return a?{...I,transform:"translate("+M+"px, "+B+"px)",...v1(q.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:M,top:B}},[n,a,q.floating,c.x,c.y]);return g.useMemo(()=>({...c,update:U,refs:H,elements:q,floatingStyles:K}),[c,U,H,q,K])}const yL=t=>{function e(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:t,fn(n){const{element:r,padding:i}=typeof t=="function"?t(n):t;return r&&e(r)?r.current!=null?n0({element:r.current,padding:i}).fn(n):{}:r?n0({element:r,padding:i}).fn(n):{}}}},_L=(t,e)=>{const n=lL(t);return{name:n.name,fn:n.fn,options:[t,e]}},wL=(t,e)=>{const n=uL(t);return{name:n.name,fn:n.fn,options:[t,e]}},xL=(t,e)=>({fn:hL(t).fn,options:[t,e]}),bL=(t,e)=>{const n=cL(t);return{name:n.name,fn:n.fn,options:[t,e]}},EL=(t,e)=>{const n=dL(t);return{name:n.name,fn:n.fn,options:[t,e]}},SL=(t,e)=>{const n=fL(t);return{name:n.name,fn:n.fn,options:[t,e]}},CL=(t,e)=>{const n=yL(t);return{name:n.name,fn:n.fn,options:[t,e]}};var kL="Arrow",g1=g.forwardRef((t,e)=>{const{children:n,width:r=10,height:i=5,...s}=t;return w.jsx(Ee.svg,{...s,ref:e,width:r,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:t.asChild?n:w.jsx("polygon",{points:"0,0 30,0 15,10"})})});g1.displayName=kL;var PL=g1;function RL(t){const[e,n]=g.useState(void 0);return on(()=>{if(t){n({width:t.offsetWidth,height:t.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const s=i[0];let o,a;if("borderBoxSize"in s){const l=s.borderBoxSize,u=Array.isArray(l)?l[0]:l;o=u.inlineSize,a=u.blockSize}else o=t.offsetWidth,a=t.offsetHeight;n({width:o,height:a})});return r.observe(t,{box:"border-box"}),()=>r.unobserve(t)}else n(void 0)},[t]),e}var bg="Popper",[m1,y1]=Wi(bg),[TL,_1]=m1(bg),w1=t=>{const{__scopePopper:e,children:n}=t,[r,i]=g.useState(null);return w.jsx(TL,{scope:e,anchor:r,onAnchorChange:i,children:n})};w1.displayName=bg;var x1="PopperAnchor",b1=g.forwardRef((t,e)=>{const{__scopePopper:n,virtualRef:r,...i}=t,s=_1(x1,n),o=g.useRef(null),a=Xe(e,o),l=g.useRef(null);return g.useEffect(()=>{const u=l.current;l.current=(r==null?void 0:r.current)||o.current,u!==l.current&&s.onAnchorChange(l.current)}),r?null:w.jsx(Ee.div,{...i,ref:a})});b1.displayName=x1;var Eg="PopperContent",[IL,OL]=m1(Eg),E1=g.forwardRef((t,e)=>{var ze,ve,Ae,kt,yr,gt;const{__scopePopper:n,side:r="bottom",sideOffset:i=0,align:s="center",alignOffset:o=0,arrowPadding:a=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:c=0,sticky:d="partial",hideWhenDetached:f=!1,updatePositionStrategy:_="optimized",onPlaced:m,...p}=t,y=_1(Eg,n),[h,v]=g.useState(null),x=Xe(e,Ge=>v(Ge)),[b,E]=g.useState(null),S=RL(b),k=(S==null?void 0:S.width)??0,C=(S==null?void 0:S.height)??0,R=r+(s!=="center"?"-"+s:""),P=typeof c=="number"?c:{top:0,right:0,bottom:0,left:0,...c},$=Array.isArray(u)?u:[u],O=$.length>0,U={padding:P,boundary:$.filter(AL),altBoundary:O},{refs:L,floatingStyles:H,placement:q,isPositioned:K,middlewareData:I}=mL({strategy:"fixed",placement:R,whileElementsMounted:(...Ge)=>aL(...Ge,{animationFrame:_==="always"}),elements:{reference:y.anchor},middleware:[_L({mainAxis:i+C,alignmentAxis:o}),l&&wL({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?xL():void 0,...U}),l&&bL({...U}),EL({...U,apply:({elements:Ge,rects:ai,availableWidth:Yi,availableHeight:Pt})=>{const{width:Xi,height:_r}=ai.reference,ln=Ge.floating.style;ln.setProperty("--radix-popper-available-width",`${Yi}px`),ln.setProperty("--radix-popper-available-height",`${Pt}px`),ln.setProperty("--radix-popper-anchor-width",`${Xi}px`),ln.setProperty("--radix-popper-anchor-height",`${_r}px`)}}),b&&CL({element:b,padding:a}),NL({arrowWidth:k,arrowHeight:C}),f&&SL({strategy:"referenceHidden",...U})]}),[M,B]=k1(q),G=Ft(m);on(()=>{K&&(G==null||G())},[K,G]);const Z=(ze=I.arrow)==null?void 0:ze.x,se=(ve=I.arrow)==null?void 0:ve.y,ce=((Ae=I.arrow)==null?void 0:Ae.centerOffset)!==0,[_e,Se]=g.useState();return on(()=>{h&&Se(window.getComputedStyle(h).zIndex)},[h]),w.jsx("div",{ref:L.setFloating,"data-radix-popper-content-wrapper":"",style:{...H,transform:K?H.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:_e,"--radix-popper-transform-origin":[(kt=I.transformOrigin)==null?void 0:kt.x,(yr=I.transformOrigin)==null?void 0:yr.y].join(" "),...((gt=I.hide)==null?void 0:gt.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:w.jsx(IL,{scope:n,placedSide:M,onArrowChange:E,arrowX:Z,arrowY:se,shouldHideArrow:ce,children:w.jsx(Ee.div,{"data-side":M,"data-align":B,...p,ref:x,style:{...p.style,animation:K?void 0:"none"}})})})});E1.displayName=Eg;var S1="PopperArrow",ML={top:"bottom",right:"left",bottom:"top",left:"right"},C1=g.forwardRef(function(e,n){const{__scopePopper:r,...i}=e,s=OL(S1,r),o=ML[s.placedSide];return w.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:w.jsx(PL,{...i,ref:n,style:{...i.style,display:"block"}})})});C1.displayName=S1;function AL(t){return t!==null}var NL=t=>({name:"transformOrigin",options:t,fn(e){var y,h,v;const{placement:n,rects:r,middlewareData:i}=e,o=((y=i.arrow)==null?void 0:y.centerOffset)!==0,a=o?0:t.arrowWidth,l=o?0:t.arrowHeight,[u,c]=k1(n),d={start:"0%",center:"50%",end:"100%"}[c],f=(((h=i.arrow)==null?void 0:h.x)??0)+a/2,_=(((v=i.arrow)==null?void 0:v.y)??0)+l/2;let m="",p="";return u==="bottom"?(m=o?d:`${f}px`,p=`${-l}px`):u==="top"?(m=o?d:`${f}px`,p=`${r.floating.height+l}px`):u==="right"?(m=`${-l}px`,p=o?d:`${_}px`):u==="left"&&(m=`${r.floating.width+l}px`,p=o?d:`${_}px`),{data:{x:m,y:p}}}});function k1(t){const[e,n="center"]=t.split("-");return[e,n]}var $L=w1,FL=b1,LL=E1,jL=C1,Af="rovingFocusGroup.onEntryFocus",DL={bubbles:!1,cancelable:!0},rl="RovingFocusGroup",[Op,P1,zL]=vg(rl),[UL,R1]=Wi(rl,[zL]),[VL,BL]=UL(rl),T1=g.forwardRef((t,e)=>w.jsx(Op.Provider,{scope:t.__scopeRovingFocusGroup,children:w.jsx(Op.Slot,{scope:t.__scopeRovingFocusGroup,children:w.jsx(qL,{...t,ref:e})})}));T1.displayName=rl;var qL=g.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:s,currentTabStopId:o,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:l,onEntryFocus:u,preventScrollOnEntryFocus:c=!1,...d}=t,f=g.useRef(null),_=Xe(e,f),m=i1(s),[p,y]=Xc({prop:o,defaultProp:a??null,onChange:l,caller:rl}),[h,v]=g.useState(!1),x=Ft(u),b=P1(n),E=g.useRef(!1),[S,k]=g.useState(0);return g.useEffect(()=>{const C=f.current;if(C)return C.addEventListener(Af,x),()=>C.removeEventListener(Af,x)},[x]),w.jsx(VL,{scope:n,orientation:r,dir:m,loop:i,currentTabStopId:p,onItemFocus:g.useCallback(C=>y(C),[y]),onItemShiftTab:g.useCallback(()=>v(!0),[]),onFocusableItemAdd:g.useCallback(()=>k(C=>C+1),[]),onFocusableItemRemove:g.useCallback(()=>k(C=>C-1),[]),children:w.jsx(Ee.div,{tabIndex:h||S===0?-1:0,"data-orientation":r,...d,ref:_,style:{outline:"none",...t.style},onMouseDown:J(t.onMouseDown,()=>{E.current=!0}),onFocus:J(t.onFocus,C=>{const R=!E.current;if(C.target===C.currentTarget&&R&&!h){const P=new CustomEvent(Af,DL);if(C.currentTarget.dispatchEvent(P),!P.defaultPrevented){const $=b().filter(q=>q.focusable),O=$.find(q=>q.active),U=$.find(q=>q.id===p),H=[O,U,...$].filter(Boolean).map(q=>q.ref.current);M1(H,c)}}E.current=!1}),onBlur:J(t.onBlur,()=>v(!1))})})}),I1="RovingFocusGroupItem",O1=g.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:s,children:o,...a}=t,l=Fs(),u=s||l,c=BL(I1,n),d=c.currentTabStopId===u,f=P1(n),{onFocusableItemAdd:_,onFocusableItemRemove:m,currentTabStopId:p}=c;return g.useEffect(()=>{if(r)return _(),()=>m()},[r,_,m]),w.jsx(Op.ItemSlot,{scope:n,id:u,focusable:r,active:i,children:w.jsx(Ee.span,{tabIndex:d?0:-1,"data-orientation":c.orientation,...a,ref:e,onMouseDown:J(t.onMouseDown,y=>{r?c.onItemFocus(u):y.preventDefault()}),onFocus:J(t.onFocus,()=>c.onItemFocus(u)),onKeyDown:J(t.onKeyDown,y=>{if(y.key==="Tab"&&y.shiftKey){c.onItemShiftTab();return}if(y.target!==y.currentTarget)return;const h=GL(y,c.orientation,c.dir);if(h!==void 0){if(y.metaKey||y.ctrlKey||y.altKey||y.shiftKey)return;y.preventDefault();let x=f().filter(b=>b.focusable).map(b=>b.ref.current);if(h==="last")x.reverse();else if(h==="prev"||h==="next"){h==="prev"&&x.reverse();const b=x.indexOf(y.currentTarget);x=c.loop?KL(x,b+1):x.slice(b+1)}setTimeout(()=>M1(x))}}),children:typeof o=="function"?o({isCurrentTabStop:d,hasTabStop:p!=null}):o})})});O1.displayName=I1;var HL={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function WL(t,e){return e!=="rtl"?t:t==="ArrowLeft"?"ArrowRight":t==="ArrowRight"?"ArrowLeft":t}function GL(t,e,n){const r=WL(t.key,n);if(!(e==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(e==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return HL[r]}function M1(t,e=!1){const n=document.activeElement;for(const r of t)if(r===n||(r.focus({preventScroll:e}),document.activeElement!==n))return}function KL(t,e){return t.map((n,r)=>t[(e+r)%t.length])}var QL=T1,YL=O1;function XL(t){const e=JL(t),n=g.forwardRef((r,i)=>{const{children:s,...o}=r,a=g.Children.toArray(s),l=a.find(ej);if(l){const u=l.props.children,c=a.map(d=>d===l?g.Children.count(u)>1?g.Children.only(null):g.isValidElement(u)?u.props.children:null:d);return w.jsx(e,{...o,ref:i,children:g.isValidElement(u)?g.cloneElement(u,void 0,c):null})}return w.jsx(e,{...o,ref:i,children:s})});return n.displayName=`${t}.Slot`,n}function JL(t){const e=g.forwardRef((n,r)=>{const{children:i,...s}=n;if(g.isValidElement(i)){const o=nj(i),a=tj(s,i.props);return i.type!==g.Fragment&&(a.ref=r?oi(r,o):o),g.cloneElement(i,a)}return g.Children.count(i)>1?g.Children.only(null):null});return e.displayName=`${t}.SlotClone`,e}var ZL=Symbol("radix.slottable");function ej(t){return g.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===ZL}function tj(t,e){const n={...e};for(const r in e){const i=t[r],s=e[r];/^on[A-Z]/.test(r)?i&&s?n[r]=(...a)=>{const l=s(...a);return i(...a),l}:i&&(n[r]=i):r==="style"?n[r]={...i,...s}:r==="className"&&(n[r]=[i,s].filter(Boolean).join(" "))}return{...t,...n}}function nj(t){var r,i;let e=(r=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:r.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(i=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:i.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}var Mp=["Enter"," "],rj=["ArrowDown","PageUp","Home"],A1=["ArrowUp","PageDown","End"],ij=[...rj,...A1],sj={ltr:[...Mp,"ArrowRight"],rtl:[...Mp,"ArrowLeft"]},oj={ltr:["ArrowLeft"],rtl:["ArrowRight"]},il="Menu",[qa,aj,lj]=vg(il),[Ki,N1]=Wi(il,[lj,y1,R1]),od=y1(),$1=R1(),[uj,Qi]=Ki(il),[cj,sl]=Ki(il),F1=t=>{const{__scopeMenu:e,open:n=!1,children:r,dir:i,onOpenChange:s,modal:o=!0}=t,a=od(e),[l,u]=g.useState(null),c=g.useRef(!1),d=Ft(s),f=i1(i);return g.useEffect(()=>{const _=()=>{c.current=!0,document.addEventListener("pointerdown",m,{capture:!0,once:!0}),document.addEventListener("pointermove",m,{capture:!0,once:!0})},m=()=>c.current=!1;return document.addEventListener("keydown",_,{capture:!0}),()=>{document.removeEventListener("keydown",_,{capture:!0}),document.removeEventListener("pointerdown",m,{capture:!0}),document.removeEventListener("pointermove",m,{capture:!0})}},[]),w.jsx($L,{...a,children:w.jsx(uj,{scope:e,open:n,onOpenChange:d,content:l,onContentChange:u,children:w.jsx(cj,{scope:e,onClose:g.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:c,dir:f,modal:o,children:r})})})};F1.displayName=il;var dj="MenuAnchor",Sg=g.forwardRef((t,e)=>{const{__scopeMenu:n,...r}=t,i=od(n);return w.jsx(FL,{...i,...r,ref:e})});Sg.displayName=dj;var Cg="MenuPortal",[fj,L1]=Ki(Cg,{forceMount:void 0}),j1=t=>{const{__scopeMenu:e,forceMount:n,children:r,container:i}=t,s=Qi(Cg,e);return w.jsx(fj,{scope:e,forceMount:n,children:w.jsx(gr,{present:n||s.open,children:w.jsx(Zc,{asChild:!0,container:i,children:r})})})};j1.displayName=Cg;var nn="MenuContent",[hj,kg]=Ki(nn),D1=g.forwardRef((t,e)=>{const n=L1(nn,t.__scopeMenu),{forceMount:r=n.forceMount,...i}=t,s=Qi(nn,t.__scopeMenu),o=sl(nn,t.__scopeMenu);return w.jsx(qa.Provider,{scope:t.__scopeMenu,children:w.jsx(gr,{present:r||s.open,children:w.jsx(qa.Slot,{scope:t.__scopeMenu,children:o.modal?w.jsx(pj,{...i,ref:e}):w.jsx(vj,{...i,ref:e})})})})}),pj=g.forwardRef((t,e)=>{const n=Qi(nn,t.__scopeMenu),r=g.useRef(null),i=Xe(e,r);return g.useEffect(()=>{const s=r.current;if(s)return gS(s)},[]),w.jsx(Pg,{...t,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:J(t.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),vj=g.forwardRef((t,e)=>{const n=Qi(nn,t.__scopeMenu);return w.jsx(Pg,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),gj=XL("MenuContent.ScrollLock"),Pg=g.forwardRef((t,e)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:s,onCloseAutoFocus:o,disableOutsidePointerEvents:a,onEntryFocus:l,onEscapeKeyDown:u,onPointerDownOutside:c,onFocusOutside:d,onInteractOutside:f,onDismiss:_,disableOutsideScroll:m,...p}=t,y=Qi(nn,n),h=sl(nn,n),v=od(n),x=$1(n),b=aj(n),[E,S]=g.useState(null),k=g.useRef(null),C=Xe(e,k,y.onContentChange),R=g.useRef(0),P=g.useRef(""),$=g.useRef(0),O=g.useRef(null),U=g.useRef("right"),L=g.useRef(0),H=m?og:g.Fragment,q=m?{as:gj,allowPinchZoom:!0}:void 0,K=M=>{var ze,ve;const B=P.current+M,G=b().filter(Ae=>!Ae.disabled),Z=document.activeElement,se=(ze=G.find(Ae=>Ae.ref.current===Z))==null?void 0:ze.textValue,ce=G.map(Ae=>Ae.textValue),_e=Rj(ce,B,se),Se=(ve=G.find(Ae=>Ae.textValue===_e))==null?void 0:ve.ref.current;(function Ae(kt){P.current=kt,window.clearTimeout(R.current),kt!==""&&(R.current=window.setTimeout(()=>Ae(""),1e3))})(B),Se&&setTimeout(()=>Se.focus())};g.useEffect(()=>()=>window.clearTimeout(R.current),[]),aS();const I=g.useCallback(M=>{var G,Z;return U.current===((G=O.current)==null?void 0:G.side)&&Ij(M,(Z=O.current)==null?void 0:Z.area)},[]);return w.jsx(hj,{scope:n,searchRef:P,onItemEnter:g.useCallback(M=>{I(M)&&M.preventDefault()},[I]),onItemLeave:g.useCallback(M=>{var B;I(M)||((B=k.current)==null||B.focus(),S(null))},[I]),onTriggerLeave:g.useCallback(M=>{I(M)&&M.preventDefault()},[I]),pointerGraceTimerRef:$,onPointerGraceIntentChange:g.useCallback(M=>{O.current=M},[]),children:w.jsx(H,{...q,children:w.jsx(sg,{asChild:!0,trapped:i,onMountAutoFocus:J(s,M=>{var B;M.preventDefault(),(B=k.current)==null||B.focus({preventScroll:!0})}),onUnmountAutoFocus:o,children:w.jsx(Jc,{asChild:!0,disableOutsidePointerEvents:a,onEscapeKeyDown:u,onPointerDownOutside:c,onFocusOutside:d,onInteractOutside:f,onDismiss:_,children:w.jsx(QL,{asChild:!0,...x,dir:h.dir,orientation:"vertical",loop:r,currentTabStopId:E,onCurrentTabStopIdChange:S,onEntryFocus:J(l,M=>{h.isUsingKeyboardRef.current||M.preventDefault()}),preventScrollOnEntryFocus:!0,children:w.jsx(LL,{role:"menu","aria-orientation":"vertical","data-state":tC(y.open),"data-radix-menu-content":"",dir:h.dir,...v,...p,ref:C,style:{outline:"none",...p.style},onKeyDown:J(p.onKeyDown,M=>{const G=M.target.closest("[data-radix-menu-content]")===M.currentTarget,Z=M.ctrlKey||M.altKey||M.metaKey,se=M.key.length===1;G&&(M.key==="Tab"&&M.preventDefault(),!Z&&se&&K(M.key));const ce=k.current;if(M.target!==ce||!ij.includes(M.key))return;M.preventDefault();const Se=b().filter(ze=>!ze.disabled).map(ze=>ze.ref.current);A1.includes(M.key)&&Se.reverse(),kj(Se)}),onBlur:J(t.onBlur,M=>{M.currentTarget.contains(M.target)||(window.clearTimeout(R.current),P.current="")}),onPointerMove:J(t.onPointerMove,Ha(M=>{const B=M.target,G=L.current!==M.clientX;if(M.currentTarget.contains(B)&&G){const Z=M.clientX>L.current?"right":"left";U.current=Z,L.current=M.clientX}}))})})})})})})});D1.displayName=nn;var mj="MenuGroup",Rg=g.forwardRef((t,e)=>{const{__scopeMenu:n,...r}=t;return w.jsx(Ee.div,{role:"group",...r,ref:e})});Rg.displayName=mj;var yj="MenuLabel",z1=g.forwardRef((t,e)=>{const{__scopeMenu:n,...r}=t;return w.jsx(Ee.div,{...r,ref:e})});z1.displayName=yj;var bc="MenuItem",i0="menu.itemSelect",ad=g.forwardRef((t,e)=>{const{disabled:n=!1,onSelect:r,...i}=t,s=g.useRef(null),o=sl(bc,t.__scopeMenu),a=kg(bc,t.__scopeMenu),l=Xe(e,s),u=g.useRef(!1),c=()=>{const d=s.current;if(!n&&d){const f=new CustomEvent(i0,{bubbles:!0,cancelable:!0});d.addEventListener(i0,_=>r==null?void 0:r(_),{once:!0}),ig(d,f),f.defaultPrevented?u.current=!1:o.onClose()}};return w.jsx(U1,{...i,ref:l,disabled:n,onClick:J(t.onClick,c),onPointerDown:d=>{var f;(f=t.onPointerDown)==null||f.call(t,d),u.current=!0},onPointerUp:J(t.onPointerUp,d=>{var f;u.current||(f=d.currentTarget)==null||f.click()}),onKeyDown:J(t.onKeyDown,d=>{const f=a.searchRef.current!=="";n||f&&d.key===" "||Mp.includes(d.key)&&(d.currentTarget.click(),d.preventDefault())})})});ad.displayName=bc;var U1=g.forwardRef((t,e)=>{const{__scopeMenu:n,disabled:r=!1,textValue:i,...s}=t,o=kg(bc,n),a=$1(n),l=g.useRef(null),u=Xe(e,l),[c,d]=g.useState(!1),[f,_]=g.useState("");return g.useEffect(()=>{const m=l.current;m&&_((m.textContent??"").trim())},[s.children]),w.jsx(qa.ItemSlot,{scope:n,disabled:r,textValue:i??f,children:w.jsx(YL,{asChild:!0,...a,focusable:!r,children:w.jsx(Ee.div,{role:"menuitem","data-highlighted":c?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...s,ref:u,onPointerMove:J(t.onPointerMove,Ha(m=>{r?o.onItemLeave(m):(o.onItemEnter(m),m.defaultPrevented||m.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:J(t.onPointerLeave,Ha(m=>o.onItemLeave(m))),onFocus:J(t.onFocus,()=>d(!0)),onBlur:J(t.onBlur,()=>d(!1))})})})}),_j="MenuCheckboxItem",V1=g.forwardRef((t,e)=>{const{checked:n=!1,onCheckedChange:r,...i}=t;return w.jsx(G1,{scope:t.__scopeMenu,checked:n,children:w.jsx(ad,{role:"menuitemcheckbox","aria-checked":Ec(n)?"mixed":n,...i,ref:e,"data-state":Ig(n),onSelect:J(i.onSelect,()=>r==null?void 0:r(Ec(n)?!0:!n),{checkForDefaultPrevented:!1})})})});V1.displayName=_j;var B1="MenuRadioGroup",[wj,xj]=Ki(B1,{value:void 0,onValueChange:()=>{}}),q1=g.forwardRef((t,e)=>{const{value:n,onValueChange:r,...i}=t,s=Ft(r);return w.jsx(wj,{scope:t.__scopeMenu,value:n,onValueChange:s,children:w.jsx(Rg,{...i,ref:e})})});q1.displayName=B1;var H1="MenuRadioItem",W1=g.forwardRef((t,e)=>{const{value:n,...r}=t,i=xj(H1,t.__scopeMenu),s=n===i.value;return w.jsx(G1,{scope:t.__scopeMenu,checked:s,children:w.jsx(ad,{role:"menuitemradio","aria-checked":s,...r,ref:e,"data-state":Ig(s),onSelect:J(r.onSelect,()=>{var o;return(o=i.onValueChange)==null?void 0:o.call(i,n)},{checkForDefaultPrevented:!1})})})});W1.displayName=H1;var Tg="MenuItemIndicator",[G1,bj]=Ki(Tg,{checked:!1}),K1=g.forwardRef((t,e)=>{const{__scopeMenu:n,forceMount:r,...i}=t,s=bj(Tg,n);return w.jsx(gr,{present:r||Ec(s.checked)||s.checked===!0,children:w.jsx(Ee.span,{...i,ref:e,"data-state":Ig(s.checked)})})});K1.displayName=Tg;var Ej="MenuSeparator",Q1=g.forwardRef((t,e)=>{const{__scopeMenu:n,...r}=t;return w.jsx(Ee.div,{role:"separator","aria-orientation":"horizontal",...r,ref:e})});Q1.displayName=Ej;var Sj="MenuArrow",Y1=g.forwardRef((t,e)=>{const{__scopeMenu:n,...r}=t,i=od(n);return w.jsx(jL,{...i,...r,ref:e})});Y1.displayName=Sj;var Cj="MenuSub",[R3,X1]=Ki(Cj),Yo="MenuSubTrigger",J1=g.forwardRef((t,e)=>{const n=Qi(Yo,t.__scopeMenu),r=sl(Yo,t.__scopeMenu),i=X1(Yo,t.__scopeMenu),s=kg(Yo,t.__scopeMenu),o=g.useRef(null),{pointerGraceTimerRef:a,onPointerGraceIntentChange:l}=s,u={__scopeMenu:t.__scopeMenu},c=g.useCallback(()=>{o.current&&window.clearTimeout(o.current),o.current=null},[]);return g.useEffect(()=>c,[c]),g.useEffect(()=>{const d=a.current;return()=>{window.clearTimeout(d),l(null)}},[a,l]),w.jsx(Sg,{asChild:!0,...u,children:w.jsx(U1,{id:i.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":i.contentId,"data-state":tC(n.open),...t,ref:oi(e,i.onTriggerChange),onClick:d=>{var f;(f=t.onClick)==null||f.call(t,d),!(t.disabled||d.defaultPrevented)&&(d.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:J(t.onPointerMove,Ha(d=>{s.onItemEnter(d),!d.defaultPrevented&&!t.disabled&&!n.open&&!o.current&&(s.onPointerGraceIntentChange(null),o.current=window.setTimeout(()=>{n.onOpenChange(!0),c()},100))})),onPointerLeave:J(t.onPointerLeave,Ha(d=>{var _,m;c();const f=(_=n.content)==null?void 0:_.getBoundingClientRect();if(f){const p=(m=n.content)==null?void 0:m.dataset.side,y=p==="right",h=y?-5:5,v=f[y?"left":"right"],x=f[y?"right":"left"];s.onPointerGraceIntentChange({area:[{x:d.clientX+h,y:d.clientY},{x:v,y:f.top},{x,y:f.top},{x,y:f.bottom},{x:v,y:f.bottom}],side:p}),window.clearTimeout(a.current),a.current=window.setTimeout(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(d),d.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:J(t.onKeyDown,d=>{var _;const f=s.searchRef.current!=="";t.disabled||f&&d.key===" "||sj[r.dir].includes(d.key)&&(n.onOpenChange(!0),(_=n.content)==null||_.focus(),d.preventDefault())})})})});J1.displayName=Yo;var Z1="MenuSubContent",eC=g.forwardRef((t,e)=>{const n=L1(nn,t.__scopeMenu),{forceMount:r=n.forceMount,...i}=t,s=Qi(nn,t.__scopeMenu),o=sl(nn,t.__scopeMenu),a=X1(Z1,t.__scopeMenu),l=g.useRef(null),u=Xe(e,l);return w.jsx(qa.Provider,{scope:t.__scopeMenu,children:w.jsx(gr,{present:r||s.open,children:w.jsx(qa.Slot,{scope:t.__scopeMenu,children:w.jsx(Pg,{id:a.contentId,"aria-labelledby":a.triggerId,...i,ref:u,align:"start",side:o.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:c=>{var d;o.isUsingKeyboardRef.current&&((d=l.current)==null||d.focus()),c.preventDefault()},onCloseAutoFocus:c=>c.preventDefault(),onFocusOutside:J(t.onFocusOutside,c=>{c.target!==a.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:J(t.onEscapeKeyDown,c=>{o.onClose(),c.preventDefault()}),onKeyDown:J(t.onKeyDown,c=>{var _;const d=c.currentTarget.contains(c.target),f=oj[o.dir].includes(c.key);d&&f&&(s.onOpenChange(!1),(_=a.trigger)==null||_.focus(),c.preventDefault())})})})})})});eC.displayName=Z1;function tC(t){return t?"open":"closed"}function Ec(t){return t==="indeterminate"}function Ig(t){return Ec(t)?"indeterminate":t?"checked":"unchecked"}function kj(t){const e=document.activeElement;for(const n of t)if(n===e||(n.focus(),document.activeElement!==e))return}function Pj(t,e){return t.map((n,r)=>t[(e+r)%t.length])}function Rj(t,e,n){const i=e.length>1&&Array.from(e).every(u=>u===e[0])?e[0]:e,s=n?t.indexOf(n):-1;let o=Pj(t,Math.max(s,0));i.length===1&&(o=o.filter(u=>u!==n));const l=o.find(u=>u.toLowerCase().startsWith(i.toLowerCase()));return l!==n?l:void 0}function Tj(t,e){const{x:n,y:r}=t;let i=!1;for(let s=0,o=e.length-1;sr!=f>r&&n<(d-u)*(r-c)/(f-c)+u&&(i=!i)}return i}function Ij(t,e){if(!e)return!1;const n={x:t.clientX,y:t.clientY};return Tj(n,e)}function Ha(t){return e=>e.pointerType==="mouse"?t(e):void 0}var Oj=F1,Mj=Sg,Aj=j1,Nj=D1,$j=Rg,Fj=z1,Lj=ad,jj=V1,Dj=q1,zj=W1,Uj=K1,Vj=Q1,Bj=Y1,qj=J1,Hj=eC,ld="DropdownMenu",[Wj]=Wi(ld,[N1]),Ct=N1(),[Gj,nC]=Wj(ld),rC=t=>{const{__scopeDropdownMenu:e,children:n,dir:r,open:i,defaultOpen:s,onOpenChange:o,modal:a=!0}=t,l=Ct(e),u=g.useRef(null),[c,d]=Xc({prop:i,defaultProp:s??!1,onChange:o,caller:ld});return w.jsx(Gj,{scope:e,triggerId:Fs(),triggerRef:u,contentId:Fs(),open:c,onOpenChange:d,onOpenToggle:g.useCallback(()=>d(f=>!f),[d]),modal:a,children:w.jsx(Oj,{...l,open:c,onOpenChange:d,dir:r,modal:a,children:n})})};rC.displayName=ld;var iC="DropdownMenuTrigger",sC=g.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...i}=t,s=nC(iC,n),o=Ct(n);return w.jsx(Mj,{asChild:!0,...o,children:w.jsx(Ee.button,{type:"button",id:s.triggerId,"aria-haspopup":"menu","aria-expanded":s.open,"aria-controls":s.open?s.contentId:void 0,"data-state":s.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...i,ref:oi(e,s.triggerRef),onPointerDown:J(t.onPointerDown,a=>{!r&&a.button===0&&a.ctrlKey===!1&&(s.onOpenToggle(),s.open||a.preventDefault())}),onKeyDown:J(t.onKeyDown,a=>{r||(["Enter"," "].includes(a.key)&&s.onOpenToggle(),a.key==="ArrowDown"&&s.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(a.key)&&a.preventDefault())})})})});sC.displayName=iC;var Kj="DropdownMenuPortal",oC=t=>{const{__scopeDropdownMenu:e,...n}=t,r=Ct(e);return w.jsx(Aj,{...r,...n})};oC.displayName=Kj;var aC="DropdownMenuContent",lC=g.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,i=nC(aC,n),s=Ct(n),o=g.useRef(!1);return w.jsx(Nj,{id:i.contentId,"aria-labelledby":i.triggerId,...s,...r,ref:e,onCloseAutoFocus:J(t.onCloseAutoFocus,a=>{var l;o.current||(l=i.triggerRef.current)==null||l.focus(),o.current=!1,a.preventDefault()}),onInteractOutside:J(t.onInteractOutside,a=>{const l=a.detail.originalEvent,u=l.button===0&&l.ctrlKey===!0,c=l.button===2||u;(!i.modal||c)&&(o.current=!0)}),style:{...t.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});lC.displayName=aC;var Qj="DropdownMenuGroup",Yj=g.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,i=Ct(n);return w.jsx($j,{...i,...r,ref:e})});Yj.displayName=Qj;var Xj="DropdownMenuLabel",uC=g.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,i=Ct(n);return w.jsx(Fj,{...i,...r,ref:e})});uC.displayName=Xj;var Jj="DropdownMenuItem",cC=g.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,i=Ct(n);return w.jsx(Lj,{...i,...r,ref:e})});cC.displayName=Jj;var Zj="DropdownMenuCheckboxItem",dC=g.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,i=Ct(n);return w.jsx(jj,{...i,...r,ref:e})});dC.displayName=Zj;var eD="DropdownMenuRadioGroup",tD=g.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,i=Ct(n);return w.jsx(Dj,{...i,...r,ref:e})});tD.displayName=eD;var nD="DropdownMenuRadioItem",fC=g.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,i=Ct(n);return w.jsx(zj,{...i,...r,ref:e})});fC.displayName=nD;var rD="DropdownMenuItemIndicator",hC=g.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,i=Ct(n);return w.jsx(Uj,{...i,...r,ref:e})});hC.displayName=rD;var iD="DropdownMenuSeparator",pC=g.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,i=Ct(n);return w.jsx(Vj,{...i,...r,ref:e})});pC.displayName=iD;var sD="DropdownMenuArrow",oD=g.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,i=Ct(n);return w.jsx(Bj,{...i,...r,ref:e})});oD.displayName=sD;var aD="DropdownMenuSubTrigger",vC=g.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,i=Ct(n);return w.jsx(qj,{...i,...r,ref:e})});vC.displayName=aD;var lD="DropdownMenuSubContent",gC=g.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,i=Ct(n);return w.jsx(Hj,{...i,...r,ref:e,style:{...t.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});gC.displayName=lD;var uD=rC,cD=sC,dD=oC,mC=lC,yC=uC,_C=cC,wC=dC,xC=fC,bC=hC,EC=pC,SC=vC,CC=gC;/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. @@ -159,4 +159,4 @@ For more information, see https://radix-ui.com/primitives/docs/components/${e.do * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const yD=ud("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),_D=uD,wD=cD,xD=g.forwardRef(({className:t,inset:e,children:n,...r},i)=>w.jsxs(SC,{ref:i,className:at("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",e&&"pl-8",t),...r,children:[n,w.jsx(gD,{className:"ml-auto h-4 w-4"})]}));xD.displayName=SC.displayName;const bD=g.forwardRef(({className:t,...e},n)=>w.jsx(CC,{ref:n,className:at("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",t),...e}));bD.displayName=CC.displayName;const PC=g.forwardRef(({className:t,sideOffset:e=4,...n},r)=>w.jsx(dD,{children:w.jsx(mC,{ref:r,sideOffset:e,className:at("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",t),...n})}));PC.displayName=mC.displayName;const Qn=g.forwardRef(({className:t,inset:e,...n},r)=>w.jsx(_C,{ref:r,className:at("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",e&&"pl-8",t),...n}));Qn.displayName=_C.displayName;const ED=g.forwardRef(({className:t,children:e,checked:n,...r},i)=>w.jsxs(wC,{ref:i,className:at("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",t),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(bC,{children:w.jsx(vD,{className:"h-4 w-4"})})}),e]}));ED.displayName=wC.displayName;const SD=g.forwardRef(({className:t,children:e,...n},r)=>w.jsxs(xC,{ref:r,className:at("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",t),...n,children:[w.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:w.jsx(bC,{children:w.jsx(mD,{className:"h-2 w-2 fill-current"})})}),e]}));SD.displayName=xC.displayName;const RC=g.forwardRef(({className:t,inset:e,...n},r)=>w.jsx(yC,{ref:r,className:at("px-2 py-1.5 text-sm font-semibold",e&&"pl-8",t),...n}));RC.displayName=yC.displayName;const Ap=g.forwardRef(({className:t,...e},n)=>w.jsx(EC,{ref:n,className:at("-mx-1 my-1 h-px bg-muted",t),...e}));Ap.displayName=EC.displayName;function CD(t){const n=(t.name||t.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 kD=({user:t,onLogout:e})=>w.jsxs(_D,{children:[w.jsx(wD,{asChild:!0,children:w.jsx("button",{type:"button",className:"user-avatar-btn","aria-label":`Account menu for ${t.username}`,children:w.jsxs(t1,{className:"h-8 w-8",children:[t.avatar_url&&w.jsx(n1,{src:t.avatar_url,alt:t.username}),w.jsx(r1,{className:"text-xs",children:CD(t)})]})})}),w.jsxs(PC,{align:"end",className:"w-56",children:[w.jsxs(RC,{className:"flex flex-col gap-0.5 py-2",children:[w.jsx("span",{className:"text-sm font-medium leading-tight",children:t.name||t.username}),w.jsxs("span",{className:"text-xs font-normal text-muted-foreground",children:["@",t.username]}),t.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"}),t.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(Ap,{}),w.jsx(Qn,{asChild:!0,children:w.jsx("a",{href:`https://huggingface.co/${encodeURIComponent(t.username)}`,target:"_blank",rel:"noopener noreferrer",children:"Hugging Face profile"})}),w.jsx(Qn,{asChild:!0,children:w.jsx(mn,{to:"/frameworks",children:"Frameworks"})}),w.jsx(Qn,{asChild:!0,children:w.jsx(mn,{to:"/trends",children:"Trends"})}),t.is_admin&&w.jsxs(w.Fragment,{children:[w.jsx(Qn,{asChild:!0,children:w.jsx(mn,{to:"/admin-dashboard",children:"Admin dashboard"})}),w.jsx(Qn,{asChild:!0,children:w.jsx(mn,{to:"/submissions",children:"Review submissions"})})]}),w.jsx(Qn,{asChild:!0,children:w.jsx(mn,{to:`/${encodeURIComponent(t.username)}`,children:"My contributions"})}),w.jsx(Qn,{asChild:!0,children:w.jsx(mn,{to:"/settings",children:"Settings"})}),w.jsx(Ap,{}),w.jsx(Qn,{onSelect:n=>{n.preventDefault(),e()},children:"Log out"})]})]}),PD=!1;class cd extends Error{constructor(n,r){var i;super(`API request failed: ${n.status} ${n.statusText}`);wr(this,"status");wr(this,"statusText");wr(this,"response");wr(this,"detail");wr(this,"code");wr(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 I3(t,e){return t instanceof cd?t.displayMessage||e:typeof t=="object"&&t!==null&&"message"in t&&typeof t.message=="string"&&t.message||e}class RD{constructor(e){this.baseUrl=e}async fetch(e,n){const r=`${this.baseUrl}${e}`;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(e,n){const r=await this.fetch(e,n);if(!r.ok){const i=new cd(r,await r.text());throw console.error("[API] Error response:",i.response),i}return r}async request(e,n){const r=await this.fetchOk(e,n);return r.status===204?void 0:await r.json()}}function TD(t){t instanceof cd&&t.status===401&&t.code!=="fresh_auth_required"&&t.code!=="saved_papers_bucket_authorization_required"&&typeof window<"u"&&window.dispatchEvent(new CustomEvent("pwc:auth-stale"))}async function TC(t){try{return await t()}catch(e){throw TD(e),e}}const Og=new RD(`${cg()}/api/v1`),ID=(t,e)=>Og.fetch(t,e),O3=(t,e)=>TC(()=>Og.fetchOk(t,e)),Sc=(t,e)=>TC(()=>Og.request(t,e));async function M3(t,e){try{return await Sc(t,e)}catch(n){if(n instanceof cd&&n.status===404)return null;throw n}}const s0={async getCurrentUser(){if(yo())return null;const t=await ID("/auth/me",{cache:"no-store"});return t.status===401||!t.ok?null:t.json()},async logout(){await Sc("/auth/logout",{method:"POST"})},async requestStagingAccess(){await Sc("/staging-access-request",{method:"POST"})}},Mg=V.createContext(null),o0="pwc:auth-stale",OD=({children:t})=>{const[e,n]=V.useState(null),[r,i]=V.useState(!0),s=mA(),o=V.useRef(null),a=V.useCallback(async()=>{i(!0);const c=await s0.getCurrentUser();n(c),i(!1)},[]),l=V.useCallback(async()=>{const c=dg("/api/v1/auth/logout");if(new URL(c,window.location.origin).origin!==window.location.origin){const d=document.createElement("form");d.method="POST",d.action=`${c}?return_to=${encodeURIComponent(window.location.href)}`,document.body.appendChild(d),d.submit();return}await s0.logout(),n(null)},[]);V.useEffect(()=>{a()},[a]),V.useEffect(()=>{},[e]),V.useEffect(()=>{o.current&&!e&&s.resetQueries(),o.current=e},[s,e]),V.useEffect(()=>{const c=()=>{n(null)};return window.addEventListener(o0,c),()=>window.removeEventListener(o0,c)},[]);const u=V.useMemo(()=>({user:e,isLoading:r,refresh:a,logout:l}),[e,r,a,l]);return w.jsx(Mg.Provider,{value:u,children:t})};function Ag(){const t=V.useContext(Mg);if(!t)throw new Error("useAuth must be used inside an ");return t}function A3(){return V.useContext(Mg)}const kr=({name:t,size:e=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:e===11?"icon-sm":"icon",viewBox:"0 0 16 16",width:e,height:e,children:n[t]})},a0="https://github.com/huggingface/paperswithcode-feedback/issues",l0="https://github.com/huggingface/paperswithcode",MD="https://paperswithcode.co/following",u0="pwc:announcement:following-feed:v1:dismissed",Nf=[{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}],AD=()=>{if(typeof navigator>"u")return!1;const t=navigator.userAgentData,e=(t==null?void 0:t.platform)||navigator.platform||navigator.userAgent||"";return/Mac|iPhone|iPad|iPod/i.test(e)},ND=()=>{const[t,e]=V.useState(!1);return V.useEffect(()=>{e(AD())},[]),w.jsx("kbd",{children:t?"⌘K":"Ctrl K"})},$D=({onOpenSearch:t})=>{const[e,n]=V.useState(!1),[r,i]=V.useState(()=>localStorage.getItem(u0)!=="1"),s=V.useRef(null),o=V.useRef(null),a=()=>n(!1),{user:l,logout:u}=Ag(),c=an(),d=c.pathname.startsWith("/pdf/"),f=`${c.pathname}${c.search}`||"/",_=yo(),m=Va()?{to:"/chat",label:"Chat",end:!1,badge:"New"}:u$()?{to:"/chat",label:"Chat",end:!1,badge:"New",href:l$}:null,p=m?[Nf[0],m,...Nf.slice(1)]:Nf;return V.useLayoutEffect(()=>{var S;const y=s.current,h=o.current;if(!y||!h)return;let v=!1;const x=()=>{if(v)return;const k=y.querySelector(".nav-item.active"),C=(k==null?void 0:k.offsetWidth)??0;h.style.width=`${C}px`,h.style.transform=`translateX(${(k==null?void 0:k.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(ZN,{open:e,onOpenChange:n,children:[w.jsxs("header",{className:"app-header",children:[w.jsxs("div",{className:"app-header-inner",children:[w.jsxs(is,{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(is,{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:a0,target:"_blank",rel:"noreferrer",children:"Submit feedback"}),w.jsx("a",{className:"icon-btn header-github-btn",href:l0,target:"_blank",rel:"noreferrer","aria-label":"GitHub repository",title:"GitHub repository",children:w.jsx(kr,{name:"github",size:14})}),w.jsxs("button",{className:"search-trigger","aria-label":"Search papers, authors, domains",onClick:t,children:[w.jsx(kr,{name:"search",size:13}),w.jsx("span",{children:"Search papers, authors, domains…"}),w.jsx(ND,{})]}),w.jsx("button",{className:"icon-btn mobile-search-btn","aria-label":"Search",onClick:t,children:w.jsx(kr,{name:"search",size:14})}),!_&&w.jsx(is,{to:"/saved",className:"icon-btn header-bookmark-btn","aria-label":"Saved papers",title:"Saved papers",children:w.jsx(kr,{name:"bookmark",size:13})}),_?null:l?w.jsx(kD,{user:l,onLogout:u}):w.jsx(NS,{returnTo:f}),w.jsx(e$,{asChild:!0,children:w.jsx("button",{className:"icon-btn mobile-menu-btn","aria-label":"Open menu",children:w.jsx(kr,{name:"menu",size:14})})})]}),!d&&r&&w.jsxs("div",{className:"site-announcement",role:"status",children:[w.jsx("span",{children:"New: "}),_?w.jsx("a",{href:MD,target:"_blank",rel:"noreferrer",children:"following feed"}):w.jsx(mn,{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(u0,"1"),i(!1)},children:w.jsx(kr,{name:"close",size:11})})]})]}),w.jsx(t$,{children:w.jsx(n$,{className:"mobile-nav-drawer",children:w.jsxs(r$,{className:"mobile-nav-panel","aria-describedby":void 0,children:[w.jsx(i$,{className:"sr-only",children:"Navigation menu"}),w.jsx(s$,{className:"icon-btn mobile-nav-close","aria-label":"Close menu",children:w.jsx(kr,{name:"close",size:14})}),w.jsxs("button",{type:"button",className:"mobile-nav-link mobile-nav-search",onClick:()=>{a(),t()},children:[w.jsx(kr,{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(is,{to:y,end:v,className:E,onClick:a,children:S},y)}),w.jsx("a",{className:"mobile-nav-link",href:a0,target:"_blank",rel:"noreferrer",onClick:a,children:"Submit feedback"}),w.jsx("a",{className:"mobile-nav-link",href:l0,target:"_blank",rel:"noreferrer",onClick:a,children:"GitHub"}),!_&&w.jsx(is,{to:"/saved",className:"mobile-nav-link",onClick:a,children:"Saved papers"}),!_&&(l==null?void 0:l.is_admin)&&w.jsx(is,{to:"/admin-dashboard",className:"mobile-nav-link",onClick:a,children:"Admin dashboard"})]})})})]})},FD=()=>{const{pathname:t}=an();return t==="/chat"||t.startsWith("/chat/")||t.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(mn,{to:"/docs/api",children:"API"}),w.jsx(mn,{to:"/mcp",children:"MCP"}),w.jsx(mn,{to:"/privacy",children:"Privacy"}),w.jsx("a",{href:"https://github.com/huggingface/paperswithcode-feedback/issues",target:"_blank",rel:"noreferrer",children:"Feedback"})]})})},LD=1,jD=1e6;let $f=0;function DD(){return $f=($f+1)%Number.MAX_SAFE_INTEGER,$f.toString()}const Ff=new Map,c0=t=>{if(Ff.has(t))return;const e=setTimeout(()=>{Ff.delete(t),fa({type:"REMOVE_TOAST",toastId:t})},jD);Ff.set(t,e)},zD=(t,e)=>{switch(e.type){case"ADD_TOAST":return{...t,toasts:[e.toast,...t.toasts].slice(0,LD)};case"UPDATE_TOAST":return{...t,toasts:t.toasts.map(n=>n.id===e.toast.id?{...n,...e.toast}:n)};case"DISMISS_TOAST":{const{toastId:n}=e;return n?c0(n):t.toasts.forEach(r=>{c0(r.id)}),{...t,toasts:t.toasts.map(r=>r.id===n||n===void 0?{...r,open:!1}:r)}}case"REMOVE_TOAST":return e.toastId===void 0?{...t,toasts:[]}:{...t,toasts:t.toasts.filter(n=>n.id!==e.toastId)}}},pu=[];let vu={toasts:[]};function fa(t){vu=zD(vu,t),pu.forEach(e=>{e(vu)})}function UD({...t}){const e=DD(),n=i=>fa({type:"UPDATE_TOAST",toast:{...i,id:e}}),r=()=>fa({type:"DISMISS_TOAST",toastId:e});return fa({type:"ADD_TOAST",toast:{...t,id:e,open:!0,onOpenChange:i=>{i||r()}}}),{id:e,dismiss:r,update:n}}function VD(){const[t,e]=g.useState(vu);return g.useEffect(()=>(pu.push(e),()=>{const n=pu.indexOf(e);n>-1&&pu.splice(n,1)}),[t]),{...t,toast:UD,dismiss:n=>fa({type:"DISMISS_TOAST",toastId:n})}}var BD=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"}),qD="VisuallyHidden",Ng=g.forwardRef((t,e)=>w.jsx(Ee.span,{...t,ref:e,style:{...BD,...t.style}}));Ng.displayName=qD;var $g="ToastProvider",[Fg,HD,WD]=vg("Toast"),[IC]=Wi("Toast",[WD]),[GD,dd]=IC($g),OC=t=>{const{__scopeToast:e,label:n="Notification",duration:r=5e3,swipeDirection:i="right",swipeThreshold:s=50,children:o}=t,[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 \`${$g}\`. Expected non-empty \`string\`.`),w.jsx(Fg.Provider,{scope:e,children:w.jsx(GD,{scope:e,label:n,duration:r,swipeDirection:i,swipeThreshold:s,toastCount:u,viewport:a,onViewportChange:l,onToastAdd:g.useCallback(()=>c(_=>_+1),[]),onToastRemove:g.useCallback(()=>c(_=>_-1),[]),isFocusedToastEscapeKeyDownRef:d,isClosePausedRef:f,children:o})})};OC.displayName=$g;var MC="ToastViewport",KD=["F8"],Np="toast.viewportPause",$p="toast.viewportResume",AC=g.forwardRef((t,e)=>{const{__scopeToast:n,hotkey:r=KD,label:i="Notifications ({hotkey})",...s}=t,o=dd(MC,n),a=HD(n),l=g.useRef(null),u=g.useRef(null),c=g.useRef(null),d=g.useRef(null),f=Xe(e,d,o.onViewportChange),_=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),m=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(m&&y&&h){const v=()=>{if(!o.isClosePausedRef.current){const S=new CustomEvent(Np);h.dispatchEvent(S),o.isClosePausedRef.current=!0}},x=()=>{if(o.isClosePausedRef.current){const S=new CustomEvent($p);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)}}},[m,o.isClosePausedRef]);const p=g.useCallback(({tabbingDirection:y})=>{const v=a().map(x=>{const b=x.ref.current,E=[b,...a2(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,k;const x=v.altKey||v.ctrlKey||v.metaKey;if(v.key==="Tab"&&!x){const C=document.activeElement,R=v.shiftKey;if(v.target===y&&R){(E=u.current)==null||E.focus();return}const O=p({tabbingDirection:R?"backwards":"forwards"}),U=O.findIndex(L=>L===C);Lf(O.slice(U+1))?v.preventDefault():R?(S=u.current)==null||S.focus():(k=c.current)==null||k.focus()}};return y.addEventListener("keydown",h),()=>y.removeEventListener("keydown",h)}},[a,p]),w.jsxs(UA,{ref:l,role:"region","aria-label":i.replace("{hotkey}",_),tabIndex:-1,style:{pointerEvents:m?void 0:"none"},children:[m&&w.jsx(Fp,{ref:u,onFocusFromOutsideViewport:()=>{const y=p({tabbingDirection:"forwards"});Lf(y)}}),w.jsx(Fg.Slot,{scope:n,children:w.jsx(Ee.ol,{tabIndex:-1,...s,ref:f})}),m&&w.jsx(Fp,{ref:c,onFocusFromOutsideViewport:()=>{const y=p({tabbingDirection:"backwards"});Lf(y)}})]})});AC.displayName=MC;var NC="ToastFocusProxy",Fp=g.forwardRef((t,e)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...i}=t,s=dd(NC,n);return w.jsx(Ng,{tabIndex:0,...i,ref:e,style:{position:"fixed"},onFocus:o=>{var u;const a=o.relatedTarget;!((u=s.viewport)!=null&&u.contains(a))&&r()}})});Fp.displayName=NC;var ol="Toast",QD="toast.swipeStart",YD="toast.swipeMove",XD="toast.swipeCancel",JD="toast.swipeEnd",$C=g.forwardRef((t,e)=>{const{forceMount:n,open:r,defaultOpen:i,onOpenChange:s,...o}=t,[a,l]=Xc({prop:r,defaultProp:i??!0,onChange:s,caller:ol});return w.jsx(gr,{present:n||a,children:w.jsx(t2,{open:a,...o,ref:e,onClose:()=>l(!1),onPause:Ft(t.onPause),onResume:Ft(t.onResume),onSwipeStart:J(t.onSwipeStart,u=>{u.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:J(t.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:J(t.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:J(t.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)})})})});$C.displayName=ol;var[ZD,e2]=IC(ol,{onClose(){}}),t2=g.forwardRef((t,e)=>{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}=t,p=dd(ol,n),[y,h]=g.useState(null),v=Xe(e,L=>h(L)),x=g.useRef(null),b=g.useRef(null),E=i||p.duration,S=g.useRef(0),k=g.useRef(E),C=g.useRef(0),{onToastAdd:R,onToastRemove:P}=p,$=Ft(()=>{var H;(y==null?void 0:y.contains(document.activeElement))&&((H=p.viewport)==null||H.focus()),o()}),O=g.useCallback(L=>{!L||L===1/0||(window.clearTimeout(C.current),S.current=new Date().getTime(),C.current=window.setTimeout($,L))},[$]);g.useEffect(()=>{const L=p.viewport;if(L){const H=()=>{O(k.current),u==null||u()},q=()=>{const K=new Date().getTime()-S.current;k.current=k.current-K,window.clearTimeout(C.current),l==null||l()};return L.addEventListener(Np,q),L.addEventListener($p,H),()=>{L.removeEventListener(Np,q),L.removeEventListener($p,H)}}},[p.viewport,E,l,u,O]),g.useEffect(()=>{s&&!p.isClosePausedRef.current&&O(E)},[s,E,p.isClosePausedRef,O]),g.useEffect(()=>(R(),()=>P()),[R,P]);const U=g.useMemo(()=>y?VC(y):null,[y]);return p.viewport?w.jsxs(w.Fragment,{children:[U&&w.jsx(n2,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite",children:U}),w.jsx(ZD,{scope:n,onClose:$,children:el.createPortal(w.jsx(Fg.ItemSlot,{scope:n,children:w.jsx(zA,{asChild:!0,onEscapeKeyDown:J(a,()=>{p.isFocusedToastEscapeKeyDownRef.current||$(),p.isFocusedToastEscapeKeyDownRef.current=!1}),children:w.jsx(Ee.li,{tabIndex:0,"data-state":s?"open":"closed","data-swipe-direction":p.swipeDirection,...m,ref:v,style:{userSelect:"none",touchAction:"none",...t.style},onKeyDown:J(t.onKeyDown,L=>{L.key==="Escape"&&(a==null||a(L.nativeEvent),L.nativeEvent.defaultPrevented||(p.isFocusedToastEscapeKeyDownRef.current=!0,$()))}),onPointerDown:J(t.onPointerDown,L=>{L.button===0&&(x.current={x:L.clientX,y:L.clientY})}),onPointerMove:J(t.onPointerMove,L=>{if(!x.current)return;const H=L.clientX-x.current.x,q=L.clientY-x.current.y,K=!!b.current,I=["left","right"].includes(p.swipeDirection),M=["left","up"].includes(p.swipeDirection)?Math.min:Math.max,B=I?M(0,H):0,G=I?0:M(0,q),Z=L.pointerType==="touch"?10:2,se={x:B,y:G},ce={originalEvent:L,delta:se};K?(b.current=se,Hl(YD,d,ce,{discrete:!1})):d0(se,p.swipeDirection,Z)?(b.current=se,Hl(QD,c,ce,{discrete:!1}),L.target.setPointerCapture(L.pointerId)):(Math.abs(H)>Z||Math.abs(q)>Z)&&(x.current=null)}),onPointerUp:J(t.onPointerUp,L=>{const H=b.current,q=L.target;if(q.hasPointerCapture(L.pointerId)&&q.releasePointerCapture(L.pointerId),b.current=null,x.current=null,H){const K=L.currentTarget,I={originalEvent:L,delta:H};d0(H,p.swipeDirection,p.swipeThreshold)?Hl(JD,_,I,{discrete:!0}):Hl(XD,f,I,{discrete:!0}),K.addEventListener("click",M=>M.preventDefault(),{once:!0})}})})})}),p.viewport)})]}):null}),n2=t=>{const{__scopeToast:e,children:n,...r}=t,i=dd(ol,e),[s,o]=g.useState(!1),[a,l]=g.useState(!1);return s2(()=>o(!0)),g.useEffect(()=>{const u=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(u)},[]),a?null:w.jsx(Zc,{asChild:!0,children:w.jsx(Ng,{...r,children:s&&w.jsxs(w.Fragment,{children:[i.label," ",n]})})})},r2="ToastTitle",FC=g.forwardRef((t,e)=>{const{__scopeToast:n,...r}=t;return w.jsx(Ee.div,{...r,ref:e})});FC.displayName=r2;var i2="ToastDescription",LC=g.forwardRef((t,e)=>{const{__scopeToast:n,...r}=t;return w.jsx(Ee.div,{...r,ref:e})});LC.displayName=i2;var jC="ToastAction",DC=g.forwardRef((t,e)=>{const{altText:n,...r}=t;return n.trim()?w.jsx(UC,{altText:n,asChild:!0,children:w.jsx(Lg,{...r,ref:e})}):(console.error(`Invalid prop \`altText\` supplied to \`${jC}\`. Expected non-empty \`string\`.`),null)});DC.displayName=jC;var zC="ToastClose",Lg=g.forwardRef((t,e)=>{const{__scopeToast:n,...r}=t,i=e2(zC,n);return w.jsx(UC,{asChild:!0,children:w.jsx(Ee.button,{type:"button",...r,ref:e,onClick:J(t.onClick,i.onClose)})})});Lg.displayName=zC;var UC=g.forwardRef((t,e)=>{const{__scopeToast:n,altText:r,...i}=t;return w.jsx(Ee.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...i,ref:e})});function VC(t){const e=[];return Array.from(t.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&e.push(r.textContent),o2(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&&e.push(o)}else e.push(...VC(r))}}),e}function Hl(t,e,n,{discrete:r}){const i=n.originalEvent.currentTarget,s=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:n});e&&i.addEventListener(t,e,{once:!0}),r?ig(i,s):i.dispatchEvent(s)}var d0=(t,e,n=0)=>{const r=Math.abs(t.x),i=Math.abs(t.y),s=r>i;return e==="left"||e==="right"?s&&r>n:!s&&i>n};function s2(t=()=>{}){const e=Ft(t);on(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(e)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[e])}function o2(t){return t.nodeType===t.ELEMENT_NODE}function a2(t){const e=[],n=document.createTreeWalker(t,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();)e.push(n.currentNode);return e}function Lf(t){const e=document.activeElement;return t.some(n=>n===e?!0:(n.focus(),document.activeElement!==e))}var l2=OC,BC=AC,qC=$C,HC=FC,WC=LC,GC=DC,KC=Lg;const f0=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,h0=QS,u2=(t,e)=>n=>{var r;if((e==null?void 0:e.variants)==null)return h0(t,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:i,defaultVariants:s}=e,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=f0(c)||f0(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=e==null||(r=e.compoundVariants)===null||r===void 0?void 0:r.reduce((u,c)=>{let{class:d,className:f,..._}=c;return Object.entries(_).every(m=>{let[p,y]=m;return Array.isArray(y)?y.includes({...s,...a}[p]):{...s,...a}[p]===y})?[...u,d,f]:u},[]);return h0(t,o,l,n==null?void 0:n.class,n==null?void 0:n.className)},c2=l2,QC=g.forwardRef(({className:t,...e},n)=>w.jsx(BC,{ref:n,className:at("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]",t),...e}));QC.displayName=BC.displayName;const d2=u2("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"}}),YC=g.forwardRef(({className:t,variant:e,...n},r)=>w.jsx(qC,{ref:r,className:at(d2({variant:e}),t),...n}));YC.displayName=qC.displayName;const f2=g.forwardRef(({className:t,...e},n)=>w.jsx(GC,{ref:n,className:at("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",t),...e}));f2.displayName=GC.displayName;const XC=g.forwardRef(({className:t,...e},n)=>w.jsx(KC,{ref:n,className:at("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",t),"aria-label":"Dismiss notification","toast-close":"",...e,children:w.jsx(yD,{className:"h-4 w-4"})}));XC.displayName=KC.displayName;const JC=g.forwardRef(({className:t,...e},n)=>w.jsx(HC,{ref:n,className:at("text-sm font-semibold",t),...e}));JC.displayName=HC.displayName;const ZC=g.forwardRef(({className:t,...e},n)=>w.jsx(WC,{ref:n,className:at("text-sm opacity-90",t),...e}));ZC.displayName=WC.displayName;function h2(){const{toasts:t}=VD();return w.jsxs(c2,{children:[t.map(function({id:e,title:n,description:r,action:i,...s}){return w.jsxs(YC,{...s,children:[w.jsxs("div",{className:"grid gap-1",children:[n&&w.jsx(JC,{children:n}),r&&w.jsx(ZC,{children:r})]}),i,w.jsx(XC,{})]},e)}),w.jsx(QC,{})]})}function p2(){const{pathname:t,hash:e}=an();g.useLayoutEffect(()=>{e||window.scrollTo({top:0,left:0,behavior:"instant"})},[t,e])}class v2{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 p0=new v2(Sc),jf={hide_closed_source_evals:!1},ek=V.createContext(null),g2=({children:t})=>{const{user:e}=Ag(),[n,r]=V.useState(jf),[i,s]=V.useState(!1);V.useEffect(()=>{let l=!1;if(!e){r(jf);return}return s(!0),p0.getPreferences().then(u=>{l||r(u)}).catch(()=>{l||r(jf)}).finally(()=>{l||s(!1)}),()=>{l=!0}},[e]);const o=V.useCallback(async l=>{const u={...n,hide_closed_source_evals:l};if(r(u),!!e)try{const c=await p0.updatePreferences(u);r(c)}catch{r(n)}},[n,e]),a=V.useMemo(()=>({preferences:n,canPersist:!!e,isLoading:i,setHideClosedSourceEvals:o}),[n,e,i,o]);return w.jsx(ek.Provider,{value:a,children:t})};function N3(){const t=V.useContext(ek);if(!t)throw new Error("usePreferences must be used inside a ");return t}const tk=d$(),m2=tk?LM:FM;if(!tk&&typeof window<"u"){const t=window.location.hash;t.startsWith("#/")&&!t.startsWith("#//")&&window.history.replaceState(null,"",t.slice(1))}const y2=V.lazy(()=>oe(()=>import("./AuthorizePaperEditView-mMhbmAG2.js"),__vite__mapDeps([0,1,2,3,4]))),_2=V.lazy(()=>oe(()=>import("./FollowingView-CVyxNxmM.js"),__vite__mapDeps([5,6,7,1,8,9,10,11,12,2,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32]))),v0=V.lazy(()=>oe(()=>import("./FeedView-L-eiYDg9.js"),__vite__mapDeps([6,7,1,8,9,10,11,12,2,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32]))),w2=V.lazy(()=>oe(()=>import("./ChatView-wJIPZ39W.js"),__vite__mapDeps([33,1,34,25,26,16,35,36,9,37,38,39,40,41,42,2,43,44,45,46,13,47,48,17,18,49,50,21,22,51,52,53]))),x2=V.lazy(()=>oe(()=>import("./SharedChatView-DVE3k-Oa.js"),__vite__mapDeps([54,1,34,25,26,16,35,36,9,37,38,39,40,41,42,2,43,44,45,46,13,47,48,17,18,49,50]))),b2=V.lazy(()=>oe(()=>import("./PapersListView-BNcDd1lQ.js"),__vite__mapDeps([55,15,16,17,18,19,11,20,9,27,1,28,56,29,30,31,32,57,23,24]))),E2=V.lazy(()=>oe(()=>import("./PaperDetailView-B-27QVn7.js"),__vite__mapDeps([58,15,16,17,18,19,11,20,59,35,60,61,1,27,28,62,31,32,3,8,22,43,63,64,24,47,65,2,9,66,67,68,69,70,36,71,13,72,73,74,37,75,40,41,30,76,77,78]))),S2=V.lazy(()=>oe(()=>import("./PaperReaderView-CTxDY9uR.js"),__vite__mapDeps([79,1,34,25,26,16,35,36,9,37,38,39,40,41,42,2,43,44,45,46,13,47,48,17,18,49,50,80,61,20,27,28,33,21,22,51,52,53]))),C2=V.lazy(()=>oe(()=>import("./TagsIndexView-CHjo-ug4.js"),__vite__mapDeps([81,1,9,11,82,47,83,51,84,85,44,71,86,38,87,74,7,31,32,88,69,3,63,70,64,24,8,65,2,66,13,89]))),k2=V.lazy(()=>oe(()=>import("./TagBrowseView-bMr8w4y6.js"),__vite__mapDeps([90,91,1,2,10,13,15,16,17,18,19,11,20,14,92,57,23,24,80,39,40,41,42,35,50,9,82,27,28,29,30,31,32,86,37]))),P2=V.lazy(()=>oe(()=>import("./MethodsIndexView-2d98MRig.js"),__vite__mapDeps([93,1,9,82,31,32,88,69,3,63,70,64,24,8,47,65,2,66,13,89,84]))),R2=V.lazy(()=>oe(()=>import("./FrameworksIndexView-BxWPuGhr.js"),__vite__mapDeps([94,1,15,16,17,18,19,11,20,9]))),T2=V.lazy(()=>oe(()=>import("./TrendsView-BJILFDZ6.js"),__vite__mapDeps([95,1,32,31]))),I2=V.lazy(()=>oe(()=>import("./ConferencesIndexView-DF9D85K1.js"),__vite__mapDeps([96,1,9,31,32,88,69,3,63,70,64,24,8,47,65,2,66,13]))),O2=V.lazy(()=>oe(()=>import("./AiDeadlinesView-DJLyTAgt.js"),__vite__mapDeps([97,1,9,98,72,31,32,20,8]))),M2=V.lazy(()=>oe(()=>import("./ConferenceDetailView-BNri44qz.js"),__vite__mapDeps([99,1,80,39,40,41,42,35,16,2,50,9,11,31,32,20]))),A2=V.lazy(()=>oe(()=>import("./ConferenceTaskView-BBbbnoRS.js"),__vite__mapDeps([100,1,15,16,17,18,19,11,20,57,23,24,80,39,40,41,42,35,2,50,9,27,28,29,30,31,32]))),N2=V.lazy(()=>oe(()=>import("./OrganizationsIndexView-C_uscBZY.js"),__vite__mapDeps([101,1,32,9,102]))),$2=V.lazy(()=>oe(()=>import("./OrganizationDetailView-BsHsK07O.js"),__vite__mapDeps([103,104,91,1,2,10,13,15,16,17,18,19,11,20,80,39,40,41,42,35,50,105,31,9,57,23,24,32,64,3,8,47,65,29,30,27,28,77,106]))),F2=V.lazy(()=>oe(()=>import("./OrganizationTaskView--dnePIkF.js"),__vite__mapDeps([107,104,91,1,2,10,13,15,16,17,18,19,11,20,80,39,40,41,42,35,50,105,31,9,57,23,24,32,64,3,8,47,65,29,30,27,28,77,106]))),L2=V.lazy(()=>oe(()=>import("./AuthorDetailView-BsVP0aHv.js"),__vite__mapDeps([108,1,15,16,17,18,19,11,20,23,24,57,91,2,10,13,32,31,29,30,27,28,106]))),j2=V.lazy(()=>oe(()=>import("./MethodDetailView-PtjfC1LZ.js"),__vite__mapDeps([109,91,1,2,10,13,16,28,15,17,18,19,11,20,57,23,24,80,39,40,41,42,35,50,9,82,29,30,31,32]))),D2=V.lazy(()=>oe(()=>import("./BenchmarkDetailView-DGAxl02Y.js"),__vite__mapDeps([110,91,1,2,10,13,9,59,16,35,20,60,19,98,72,15,17,18,11,31,32,92,82,111]))),z2=V.lazy(()=>oe(()=>import("./SavedPapersView-79-FOny-.js"),__vite__mapDeps([112,16,1,15,17,18,19,11,20,31,32,76]))),U2=V.lazy(()=>oe(()=>import("./SettingsView-BnRQHHDW.js"),__vite__mapDeps([113,1,2,10,98,72,12,7,14,86,26,62,52,46,85]))),V2=V.lazy(()=>oe(()=>import("./PrivacyView-CwO81wLZ.js"),__vite__mapDeps([114,62]))),B2=V.lazy(()=>oe(()=>import("./ApiDocsView-D3iY1sSs.js"),__vite__mapDeps([115,1,40,116]))),q2=V.lazy(()=>oe(()=>import("./McpView-Dg_zVuuF.js"),__vite__mapDeps([117,1,62,53,37,46,43,118]))),H2=V.lazy(()=>oe(()=>import("./SubmitView-CQFDy941.js"),__vite__mapDeps([119,2,32,3,63,70,16,67]))),W2=V.lazy(()=>oe(()=>import("./CronDashboard-DZ_espzl.js"),__vite__mapDeps([120,1,2,121,122,73,3,48,71,84,87,38,83,46,123,65,124,75,28,4,9,26]))),G2=V.lazy(()=>oe(()=>import("./AutonomousOperations-BNbcighz.js"),__vite__mapDeps([125,1,2,121,122,73,3,63,87,45]))),K2=V.lazy(()=>oe(()=>import("./SubmissionsDashboard-CfJfn_Cp.js"),__vite__mapDeps([126,68,67,16,1,2,28,9,20,66,123,65,124,127]))),Q2=V.lazy(()=>oe(()=>import("./UserProfileView-CrBLP1Jk.js"),__vite__mapDeps([128,1,105,31,9]))),Y2=V.lazy(()=>oe(()=>import("./RateLimitsView-ChUFO8Hr.js"),__vite__mapDeps([129,1]))),X2=V.lazy(()=>oe(()=>import("./AstraForRoboticsView-CEJJvKPe.js"),__vite__mapDeps([130,15,16,17,18,19,11,20,57,32,31,29,30,27,1,28,62,131]))),Df=V.lazy(()=>oe(()=>import("./NotFound-BTsJlVc8.js"),[])),J2=V.lazy(()=>oe(()=>import("./SearchOverlay-BMTrmO5f.js"),__vite__mapDeps([132,16,1,19,9,56,11]))),Z2=V.lazy(()=>oe(()=>import("./StagingAccessRequestView-BV2q1V1S.js"),__vite__mapDeps([133,124]))),nk=()=>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}})]})]}),e3=new gA({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:1}}}),t3=()=>{const{arxivId:t}=zE();return w.jsx(co,{to:t?`/paper/${t}`:"/papers",replace:!0})},n3=()=>{const{taskSlug:t}=zE();return w.jsx(co,{to:t?`/tasks/${t}`:"/tasks",replace:!0})},r3=({element:t})=>yo()?w.jsx(co,{to:"/",replace:!0}):w.jsx(w.Fragment,{children:t}),Lp=({element:t})=>{const{user:e,isLoading:n}=Ag(),r=an();return yo()?w.jsx(co,{to:"/",replace:!0}):n?w.jsx("div",{className:"page",children:w.jsx("div",{className:"submission-loading",children:w.jsx("span",{children:"Checking admin session..."})})}):e?e.is_admin?w.jsx(w.Fragment,{children:t}):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 @",e.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(NS,{returnTo:`${r.pathname}${r.search}`})]})})},i3=()=>{const t=a$(),e=typeof window<"u"&&new URL(t,window.location.origin).origin!==window.location.origin;return V.useEffect(()=>{e&&window.location.replace(t)},[t,e]),e?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:t,children:"Continue"})]})}):w.jsx(Lp,{element:w.jsx(W2,{})})},g0=({reader:t=!1})=>{const[e,n]=V.useState(!1),{pathname:r}=an();V.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($D,{onOpenSearch:()=>n(!0)}),s=w.jsx(OE,{resetKey:r,children:w.jsx(V.Suspense,{fallback:w.jsx(nk,{}),children:w.jsx(kM,{})})}),o=e&&w.jsx(V.Suspense,{fallback:null,children:w.jsx(J2,{open:e,onClose:()=>n(!1)})});return t?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(FD,{}),o]})},s3=()=>(p2(),V.useLayoutEffect(()=>{var t;(t=document.getElementById("initial-discovery-footer"))==null||t.remove()},[]),w.jsxs(PM,{children:[w.jsx(ne,{path:"/request-access",element:w.jsx(V.Suspense,{fallback:w.jsx(nk,{}),children:w.jsx(Z2,{})})}),w.jsx(ne,{element:w.jsx(g0,{reader:!0}),children:w.jsx(ne,{path:"/pdf/:paperId",element:c$()?w.jsx(S2,{}):w.jsx(Df,{})})}),w.jsxs(ne,{element:w.jsx(g0,{}),children:[w.jsx(ne,{path:"/",element:w.jsx(v0,{})}),w.jsx(ne,{path:"/following",element:w.jsx(_2,{})}),w.jsx(ne,{path:"/x-trending",element:w.jsx(v0,{xTrending:!0})}),w.jsx(ne,{path:"/chat/:sessionId?",element:Va()?w.jsx(w2,{}):w.jsx(co,{to:"/",replace:!0})}),w.jsx(ne,{path:"/share/:shareId",element:Va()?w.jsx(x2,{}):w.jsx(Df,{})}),w.jsx(ne,{path:"/papers",element:w.jsx(b2,{})}),w.jsx(ne,{path:"/papers/:arxivId",element:w.jsx(t3,{})}),w.jsx(ne,{path:"/paper/:arxivId",element:w.jsx(E2,{})}),w.jsx(ne,{path:"/tasks",element:w.jsx(C2,{})}),w.jsx(ne,{path:"/tasks/:taskSlug",element:w.jsx(k2,{})}),w.jsx(ne,{path:"/task/:taskSlug",element:w.jsx(n3,{})}),w.jsx(ne,{path:"/methods",element:w.jsx(P2,{})}),w.jsx(ne,{path:"/methods/:methodSlug",element:w.jsx(j2,{})}),w.jsx(ne,{path:"/frameworks",element:w.jsx(R2,{})}),w.jsx(ne,{path:"/trends",element:w.jsx(T2,{})}),w.jsx(ne,{path:"/conferences",element:w.jsx(I2,{})}),w.jsx(ne,{path:"/ai-deadlines",element:w.jsx(O2,{})}),w.jsx(ne,{path:"/conferences/:confSlug",element:w.jsx(M2,{})}),w.jsx(ne,{path:"/conferences/:confSlug/:taskSlug",element:w.jsx(A2,{})}),w.jsx(ne,{path:"/organizations",element:w.jsx(N2,{})}),w.jsx(ne,{path:"/orgs/:orgSlug",element:w.jsx($2,{})}),w.jsx(ne,{path:"/orgs/:orgSlug/:taskSlug",element:w.jsx(F2,{})}),w.jsx(ne,{path:"/authors/:authorId",element:w.jsx(L2,{})}),w.jsx(ne,{path:"/benchmark/:datasetSlug",element:w.jsx(D2,{})}),w.jsx(ne,{path:"/authorize-paper-edit/:authorizationId",element:w.jsx(y2,{})}),w.jsx(ne,{path:"/submit",element:w.jsx(H2,{})}),w.jsx(ne,{path:"/saved",element:w.jsx(r3,{element:w.jsx(z2,{})})}),w.jsx(ne,{path:"/settings",element:w.jsx(U2,{})}),w.jsx(ne,{path:"/privacy",element:w.jsx(V2,{})}),w.jsx(ne,{path:"/docs/api",element:w.jsx(B2,{})}),w.jsx(ne,{path:"/mcp",element:w.jsx(q2,{})}),w.jsx(ne,{path:"/admin-dashboard",element:w.jsx(i3,{})}),w.jsx(ne,{path:"/autonomous-operations",element:w.jsx(Lp,{element:w.jsx(G2,{})})}),w.jsx(ne,{path:"/cron-dashboard",element:w.jsx(co,{to:"/admin-dashboard",replace:!0})}),w.jsx(ne,{path:"/submissions",element:w.jsx(Lp,{element:w.jsx(K2,{})})}),w.jsx(ne,{path:"/rate-limits",element:w.jsx(Y2,{})}),w.jsx(ne,{path:"/astra-for-robotics",element:w.jsx(X2,{})}),w.jsx(ne,{path:"/:username",element:w.jsx(Q2,{})}),w.jsx(ne,{path:"*",element:w.jsx(Df,{})})]})]})),o3=()=>w.jsx(yA,{client:e3,children:w.jsx(OD,{children:w.jsxs(g2,{children:[w.jsx(m2,{children:w.jsx(s3,{})}),w.jsx(h2,{}),!1]})})});NO();const a3=w.jsx(NR,{attribute:"class",defaultTheme:"system",enableSystem:!0,disableTransitionOnChange:!0,storageKey:"pwc-theme",children:w.jsx(OE,{children:w.jsx(o3,{})})}),l3=Dx(document.getElementById("root"));l3.render(w.jsx(V.StrictMode,{children:a3}));export{o$ as $,cd as A,at as B,vD as C,b3 as D,R3 as E,i1 as F,R1 as G,NS as H,YL as I,mD as J,V as K,mn as L,p0 as M,c$ as N,x3 as O,gr as P,_D as Q,QL as R,wD as S,f2 as T,PC as U,Qn as V,E3 as W,yD as X,w3 as Y,C3 as Z,k0 as _,Ag as a,oe as a0,QS as a1,gD as a2,el as a3,TD as a4,Sc as a5,FS as a6,u2 as a7,Fs as a8,ZN as a9,XM as aA,h3 as aB,xp as aC,hn as aD,YE as aE,QM as aF,YM as aG,wp as aH,GE as aI,dA as aJ,eA as aK,wt as aL,v3 as aM,za as aN,hA as aO,dg as aP,O3 as aQ,M3 as aR,m3 as aS,g3 as aT,KE as aU,t1 as aV,n1 as aW,r1 as aX,s0 as aY,t$ as aa,n$ as ab,r$ as ac,oi as ad,s$ as ae,i$ as af,_3 as ag,co as ah,p3 as ai,$L as aj,FL as ak,y1 as al,Zc as am,gS as an,og as ao,aS as ap,sg as aq,Jc as ar,LL as as,jL as at,d3 as au,c3 as av,ID as aw,k3 as ax,Yc as ay,iA as az,an as b,tg as c,A3 as d,f3 as e,mA as f,Va as g,AS as h,yo as i,w as j,u$ as k,l$ as l,S3 as m,ud as n,P3 as o,VD as p,N3 as q,g as r,I3 as s,Ee as t,zE as u,Xc as v,Xe as w,J as x,RL as y,Wi as z}; + */const yD=ud("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),_D=uD,wD=cD,xD=g.forwardRef(({className:t,inset:e,children:n,...r},i)=>w.jsxs(SC,{ref:i,className:at("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",e&&"pl-8",t),...r,children:[n,w.jsx(gD,{className:"ml-auto h-4 w-4"})]}));xD.displayName=SC.displayName;const bD=g.forwardRef(({className:t,...e},n)=>w.jsx(CC,{ref:n,className:at("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",t),...e}));bD.displayName=CC.displayName;const PC=g.forwardRef(({className:t,sideOffset:e=4,...n},r)=>w.jsx(dD,{children:w.jsx(mC,{ref:r,sideOffset:e,className:at("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",t),...n})}));PC.displayName=mC.displayName;const Qn=g.forwardRef(({className:t,inset:e,...n},r)=>w.jsx(_C,{ref:r,className:at("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",e&&"pl-8",t),...n}));Qn.displayName=_C.displayName;const ED=g.forwardRef(({className:t,children:e,checked:n,...r},i)=>w.jsxs(wC,{ref:i,className:at("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",t),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(bC,{children:w.jsx(vD,{className:"h-4 w-4"})})}),e]}));ED.displayName=wC.displayName;const SD=g.forwardRef(({className:t,children:e,...n},r)=>w.jsxs(xC,{ref:r,className:at("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",t),...n,children:[w.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:w.jsx(bC,{children:w.jsx(mD,{className:"h-2 w-2 fill-current"})})}),e]}));SD.displayName=xC.displayName;const RC=g.forwardRef(({className:t,inset:e,...n},r)=>w.jsx(yC,{ref:r,className:at("px-2 py-1.5 text-sm font-semibold",e&&"pl-8",t),...n}));RC.displayName=yC.displayName;const Ap=g.forwardRef(({className:t,...e},n)=>w.jsx(EC,{ref:n,className:at("-mx-1 my-1 h-px bg-muted",t),...e}));Ap.displayName=EC.displayName;function CD(t){const n=(t.name||t.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 kD=({user:t,onLogout:e})=>w.jsxs(_D,{children:[w.jsx(wD,{asChild:!0,children:w.jsx("button",{type:"button",className:"user-avatar-btn","aria-label":`Account menu for ${t.username}`,children:w.jsxs(t1,{className:"h-8 w-8",children:[t.avatar_url&&w.jsx(n1,{src:t.avatar_url,alt:t.username}),w.jsx(r1,{className:"text-xs",children:CD(t)})]})})}),w.jsxs(PC,{align:"end",className:"w-56",children:[w.jsxs(RC,{className:"flex flex-col gap-0.5 py-2",children:[w.jsx("span",{className:"text-sm font-medium leading-tight",children:t.name||t.username}),w.jsxs("span",{className:"text-xs font-normal text-muted-foreground",children:["@",t.username]}),t.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"}),t.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(Ap,{}),w.jsx(Qn,{asChild:!0,children:w.jsx("a",{href:`https://huggingface.co/${encodeURIComponent(t.username)}`,target:"_blank",rel:"noopener noreferrer",children:"Hugging Face profile"})}),w.jsx(Qn,{asChild:!0,children:w.jsx(mn,{to:"/frameworks",children:"Frameworks"})}),w.jsx(Qn,{asChild:!0,children:w.jsx(mn,{to:"/trends",children:"Trends"})}),t.is_admin&&w.jsxs(w.Fragment,{children:[w.jsx(Qn,{asChild:!0,children:w.jsx(mn,{to:"/admin-dashboard",children:"Admin dashboard"})}),w.jsx(Qn,{asChild:!0,children:w.jsx(mn,{to:"/submissions",children:"Review submissions"})})]}),w.jsx(Qn,{asChild:!0,children:w.jsx(mn,{to:`/${encodeURIComponent(t.username)}`,children:"My contributions"})}),w.jsx(Qn,{asChild:!0,children:w.jsx(mn,{to:"/settings",children:"Settings"})}),w.jsx(Ap,{}),w.jsx(Qn,{onSelect:n=>{n.preventDefault(),e()},children:"Log out"})]})]}),PD=!1;class cd extends Error{constructor(n,r){var i;super(`API request failed: ${n.status} ${n.statusText}`);wr(this,"status");wr(this,"statusText");wr(this,"response");wr(this,"detail");wr(this,"code");wr(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 T3(t,e){return t instanceof cd?t.displayMessage||e:typeof t=="object"&&t!==null&&"message"in t&&typeof t.message=="string"&&t.message||e}class RD{constructor(e){this.baseUrl=e}async fetch(e,n){const r=`${this.baseUrl}${e}`;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(e,n){const r=await this.fetch(e,n);if(!r.ok){const i=new cd(r,await r.text());throw console.error("[API] Error response:",i.response),i}return r}async request(e,n){const r=await this.fetchOk(e,n);return r.status===204?void 0:await r.json()}}function TD(t){t instanceof cd&&t.status===401&&t.code!=="fresh_auth_required"&&t.code!=="saved_papers_bucket_authorization_required"&&typeof window<"u"&&window.dispatchEvent(new CustomEvent("pwc:auth-stale"))}async function TC(t){try{return await t()}catch(e){throw TD(e),e}}const Og=new RD(`${cg()}/api/v1`),ID=(t,e)=>Og.fetch(t,e),I3=(t,e)=>TC(()=>Og.fetchOk(t,e)),Sc=(t,e)=>TC(()=>Og.request(t,e));async function O3(t,e){try{return await Sc(t,e)}catch(n){if(n instanceof cd&&n.status===404)return null;throw n}}const s0={async getCurrentUser(){if(yo())return null;const t=await ID("/auth/me",{cache:"no-store"});return t.status===401||!t.ok?null:t.json()},async logout(){await Sc("/auth/logout",{method:"POST"})},async requestStagingAccess(){await Sc("/staging-access-request",{method:"POST"})}},Mg=V.createContext(null),o0="pwc:auth-stale",OD=({children:t})=>{const[e,n]=V.useState(null),[r,i]=V.useState(!0),s=mA(),o=V.useRef(null),a=V.useCallback(async()=>{i(!0);const c=await s0.getCurrentUser();n(c),i(!1)},[]),l=V.useCallback(async()=>{const c=dg("/api/v1/auth/logout");if(new URL(c,window.location.origin).origin!==window.location.origin){const d=document.createElement("form");d.method="POST",d.action=`${c}?return_to=${encodeURIComponent(window.location.href)}`,document.body.appendChild(d),d.submit();return}await s0.logout(),n(null)},[]);V.useEffect(()=>{a()},[a]),V.useEffect(()=>{},[e]),V.useEffect(()=>{o.current&&!e&&s.resetQueries(),o.current=e},[s,e]),V.useEffect(()=>{const c=()=>{n(null)};return window.addEventListener(o0,c),()=>window.removeEventListener(o0,c)},[]);const u=V.useMemo(()=>({user:e,isLoading:r,refresh:a,logout:l}),[e,r,a,l]);return w.jsx(Mg.Provider,{value:u,children:t})};function Ag(){const t=V.useContext(Mg);if(!t)throw new Error("useAuth must be used inside an ");return t}function M3(){return V.useContext(Mg)}const kr=({name:t,size:e=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:e===11?"icon-sm":"icon",viewBox:"0 0 16 16",width:e,height:e,children:n[t]})},a0="https://github.com/huggingface/paperswithcode-feedback/issues",l0="https://github.com/huggingface/paperswithcode",MD="https://paperswithcode.co/following",u0="pwc:announcement:following-feed:v1:dismissed",Nf=[{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}],AD=()=>{if(typeof navigator>"u")return!1;const t=navigator.userAgentData,e=(t==null?void 0:t.platform)||navigator.platform||navigator.userAgent||"";return/Mac|iPhone|iPad|iPod/i.test(e)},ND=()=>{const[t,e]=V.useState(!1);return V.useEffect(()=>{e(AD())},[]),w.jsx("kbd",{children:t?"⌘K":"Ctrl K"})},$D=({onOpenSearch:t})=>{const[e,n]=V.useState(!1),[r,i]=V.useState(()=>localStorage.getItem(u0)!=="1"),s=V.useRef(null),o=V.useRef(null),a=()=>n(!1),{user:l,logout:u}=Ag(),c=an(),d=c.pathname.startsWith("/pdf/"),f=`${c.pathname}${c.search}`||"/",_=yo(),m=Va()?{to:"/chat",label:"Chat",end:!1,badge:"New"}:u$()?{to:"/chat",label:"Chat",end:!1,badge:"New",href:l$}:null,p=m?[Nf[0],m,...Nf.slice(1)]:Nf;return V.useLayoutEffect(()=>{var S;const y=s.current,h=o.current;if(!y||!h)return;let v=!1;const x=()=>{if(v)return;const k=y.querySelector(".nav-item.active"),C=(k==null?void 0:k.offsetWidth)??0;h.style.width=`${C}px`,h.style.transform=`translateX(${(k==null?void 0:k.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(ZN,{open:e,onOpenChange:n,children:[w.jsxs("header",{className:"app-header",children:[w.jsxs("div",{className:"app-header-inner",children:[w.jsxs(is,{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(is,{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:a0,target:"_blank",rel:"noreferrer",children:"Submit feedback"}),w.jsx("a",{className:"icon-btn header-github-btn",href:l0,target:"_blank",rel:"noreferrer","aria-label":"GitHub repository",title:"GitHub repository",children:w.jsx(kr,{name:"github",size:14})}),w.jsxs("button",{className:"search-trigger","aria-label":"Search papers, authors, domains",onClick:t,children:[w.jsx(kr,{name:"search",size:13}),w.jsx("span",{children:"Search papers, authors, domains…"}),w.jsx(ND,{})]}),w.jsx("button",{className:"icon-btn mobile-search-btn","aria-label":"Search",onClick:t,children:w.jsx(kr,{name:"search",size:14})}),!_&&w.jsx(is,{to:"/saved",className:"icon-btn header-bookmark-btn","aria-label":"Saved papers",title:"Saved papers",children:w.jsx(kr,{name:"bookmark",size:13})}),_?null:l?w.jsx(kD,{user:l,onLogout:u}):w.jsx(NS,{returnTo:f}),w.jsx(e$,{asChild:!0,children:w.jsx("button",{className:"icon-btn mobile-menu-btn","aria-label":"Open menu",children:w.jsx(kr,{name:"menu",size:14})})})]}),!d&&r&&w.jsxs("div",{className:"site-announcement",role:"status",children:[w.jsx("span",{children:"New: "}),_?w.jsx("a",{href:MD,target:"_blank",rel:"noreferrer",children:"following feed"}):w.jsx(mn,{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(u0,"1"),i(!1)},children:w.jsx(kr,{name:"close",size:11})})]})]}),w.jsx(t$,{children:w.jsx(n$,{className:"mobile-nav-drawer",children:w.jsxs(r$,{className:"mobile-nav-panel","aria-describedby":void 0,children:[w.jsx(i$,{className:"sr-only",children:"Navigation menu"}),w.jsx(s$,{className:"icon-btn mobile-nav-close","aria-label":"Close menu",children:w.jsx(kr,{name:"close",size:14})}),w.jsxs("button",{type:"button",className:"mobile-nav-link mobile-nav-search",onClick:()=>{a(),t()},children:[w.jsx(kr,{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(is,{to:y,end:v,className:E,onClick:a,children:S},y)}),w.jsx("a",{className:"mobile-nav-link",href:a0,target:"_blank",rel:"noreferrer",onClick:a,children:"Submit feedback"}),w.jsx("a",{className:"mobile-nav-link",href:l0,target:"_blank",rel:"noreferrer",onClick:a,children:"GitHub"}),!_&&w.jsx(is,{to:"/saved",className:"mobile-nav-link",onClick:a,children:"Saved papers"}),!_&&(l==null?void 0:l.is_admin)&&w.jsx(is,{to:"/admin-dashboard",className:"mobile-nav-link",onClick:a,children:"Admin dashboard"})]})})})]})},FD=()=>{const{pathname:t}=an();return t==="/chat"||t.startsWith("/chat/")||t.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(mn,{to:"/docs/api",children:"API"}),w.jsx(mn,{to:"/mcp",children:"MCP"}),w.jsx(mn,{to:"/privacy",children:"Privacy"}),w.jsx("a",{href:"https://github.com/huggingface/paperswithcode-feedback/issues",target:"_blank",rel:"noreferrer",children:"Feedback"})]})})},LD=1,jD=1e6;let $f=0;function DD(){return $f=($f+1)%Number.MAX_SAFE_INTEGER,$f.toString()}const Ff=new Map,c0=t=>{if(Ff.has(t))return;const e=setTimeout(()=>{Ff.delete(t),fa({type:"REMOVE_TOAST",toastId:t})},jD);Ff.set(t,e)},zD=(t,e)=>{switch(e.type){case"ADD_TOAST":return{...t,toasts:[e.toast,...t.toasts].slice(0,LD)};case"UPDATE_TOAST":return{...t,toasts:t.toasts.map(n=>n.id===e.toast.id?{...n,...e.toast}:n)};case"DISMISS_TOAST":{const{toastId:n}=e;return n?c0(n):t.toasts.forEach(r=>{c0(r.id)}),{...t,toasts:t.toasts.map(r=>r.id===n||n===void 0?{...r,open:!1}:r)}}case"REMOVE_TOAST":return e.toastId===void 0?{...t,toasts:[]}:{...t,toasts:t.toasts.filter(n=>n.id!==e.toastId)}}},pu=[];let vu={toasts:[]};function fa(t){vu=zD(vu,t),pu.forEach(e=>{e(vu)})}function UD({...t}){const e=DD(),n=i=>fa({type:"UPDATE_TOAST",toast:{...i,id:e}}),r=()=>fa({type:"DISMISS_TOAST",toastId:e});return fa({type:"ADD_TOAST",toast:{...t,id:e,open:!0,onOpenChange:i=>{i||r()}}}),{id:e,dismiss:r,update:n}}function VD(){const[t,e]=g.useState(vu);return g.useEffect(()=>(pu.push(e),()=>{const n=pu.indexOf(e);n>-1&&pu.splice(n,1)}),[t]),{...t,toast:UD,dismiss:n=>fa({type:"DISMISS_TOAST",toastId:n})}}var BD=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"}),qD="VisuallyHidden",Ng=g.forwardRef((t,e)=>w.jsx(Ee.span,{...t,ref:e,style:{...BD,...t.style}}));Ng.displayName=qD;var $g="ToastProvider",[Fg,HD,WD]=vg("Toast"),[IC]=Wi("Toast",[WD]),[GD,dd]=IC($g),OC=t=>{const{__scopeToast:e,label:n="Notification",duration:r=5e3,swipeDirection:i="right",swipeThreshold:s=50,children:o}=t,[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 \`${$g}\`. Expected non-empty \`string\`.`),w.jsx(Fg.Provider,{scope:e,children:w.jsx(GD,{scope:e,label:n,duration:r,swipeDirection:i,swipeThreshold:s,toastCount:u,viewport:a,onViewportChange:l,onToastAdd:g.useCallback(()=>c(_=>_+1),[]),onToastRemove:g.useCallback(()=>c(_=>_-1),[]),isFocusedToastEscapeKeyDownRef:d,isClosePausedRef:f,children:o})})};OC.displayName=$g;var MC="ToastViewport",KD=["F8"],Np="toast.viewportPause",$p="toast.viewportResume",AC=g.forwardRef((t,e)=>{const{__scopeToast:n,hotkey:r=KD,label:i="Notifications ({hotkey})",...s}=t,o=dd(MC,n),a=HD(n),l=g.useRef(null),u=g.useRef(null),c=g.useRef(null),d=g.useRef(null),f=Xe(e,d,o.onViewportChange),_=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),m=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(m&&y&&h){const v=()=>{if(!o.isClosePausedRef.current){const S=new CustomEvent(Np);h.dispatchEvent(S),o.isClosePausedRef.current=!0}},x=()=>{if(o.isClosePausedRef.current){const S=new CustomEvent($p);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)}}},[m,o.isClosePausedRef]);const p=g.useCallback(({tabbingDirection:y})=>{const v=a().map(x=>{const b=x.ref.current,E=[b,...a2(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,k;const x=v.altKey||v.ctrlKey||v.metaKey;if(v.key==="Tab"&&!x){const C=document.activeElement,R=v.shiftKey;if(v.target===y&&R){(E=u.current)==null||E.focus();return}const O=p({tabbingDirection:R?"backwards":"forwards"}),U=O.findIndex(L=>L===C);Lf(O.slice(U+1))?v.preventDefault():R?(S=u.current)==null||S.focus():(k=c.current)==null||k.focus()}};return y.addEventListener("keydown",h),()=>y.removeEventListener("keydown",h)}},[a,p]),w.jsxs(UA,{ref:l,role:"region","aria-label":i.replace("{hotkey}",_),tabIndex:-1,style:{pointerEvents:m?void 0:"none"},children:[m&&w.jsx(Fp,{ref:u,onFocusFromOutsideViewport:()=>{const y=p({tabbingDirection:"forwards"});Lf(y)}}),w.jsx(Fg.Slot,{scope:n,children:w.jsx(Ee.ol,{tabIndex:-1,...s,ref:f})}),m&&w.jsx(Fp,{ref:c,onFocusFromOutsideViewport:()=>{const y=p({tabbingDirection:"backwards"});Lf(y)}})]})});AC.displayName=MC;var NC="ToastFocusProxy",Fp=g.forwardRef((t,e)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...i}=t,s=dd(NC,n);return w.jsx(Ng,{tabIndex:0,...i,ref:e,style:{position:"fixed"},onFocus:o=>{var u;const a=o.relatedTarget;!((u=s.viewport)!=null&&u.contains(a))&&r()}})});Fp.displayName=NC;var ol="Toast",QD="toast.swipeStart",YD="toast.swipeMove",XD="toast.swipeCancel",JD="toast.swipeEnd",$C=g.forwardRef((t,e)=>{const{forceMount:n,open:r,defaultOpen:i,onOpenChange:s,...o}=t,[a,l]=Xc({prop:r,defaultProp:i??!0,onChange:s,caller:ol});return w.jsx(gr,{present:n||a,children:w.jsx(t2,{open:a,...o,ref:e,onClose:()=>l(!1),onPause:Ft(t.onPause),onResume:Ft(t.onResume),onSwipeStart:J(t.onSwipeStart,u=>{u.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:J(t.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:J(t.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:J(t.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)})})})});$C.displayName=ol;var[ZD,e2]=IC(ol,{onClose(){}}),t2=g.forwardRef((t,e)=>{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}=t,p=dd(ol,n),[y,h]=g.useState(null),v=Xe(e,L=>h(L)),x=g.useRef(null),b=g.useRef(null),E=i||p.duration,S=g.useRef(0),k=g.useRef(E),C=g.useRef(0),{onToastAdd:R,onToastRemove:P}=p,$=Ft(()=>{var H;(y==null?void 0:y.contains(document.activeElement))&&((H=p.viewport)==null||H.focus()),o()}),O=g.useCallback(L=>{!L||L===1/0||(window.clearTimeout(C.current),S.current=new Date().getTime(),C.current=window.setTimeout($,L))},[$]);g.useEffect(()=>{const L=p.viewport;if(L){const H=()=>{O(k.current),u==null||u()},q=()=>{const K=new Date().getTime()-S.current;k.current=k.current-K,window.clearTimeout(C.current),l==null||l()};return L.addEventListener(Np,q),L.addEventListener($p,H),()=>{L.removeEventListener(Np,q),L.removeEventListener($p,H)}}},[p.viewport,E,l,u,O]),g.useEffect(()=>{s&&!p.isClosePausedRef.current&&O(E)},[s,E,p.isClosePausedRef,O]),g.useEffect(()=>(R(),()=>P()),[R,P]);const U=g.useMemo(()=>y?VC(y):null,[y]);return p.viewport?w.jsxs(w.Fragment,{children:[U&&w.jsx(n2,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite",children:U}),w.jsx(ZD,{scope:n,onClose:$,children:el.createPortal(w.jsx(Fg.ItemSlot,{scope:n,children:w.jsx(zA,{asChild:!0,onEscapeKeyDown:J(a,()=>{p.isFocusedToastEscapeKeyDownRef.current||$(),p.isFocusedToastEscapeKeyDownRef.current=!1}),children:w.jsx(Ee.li,{tabIndex:0,"data-state":s?"open":"closed","data-swipe-direction":p.swipeDirection,...m,ref:v,style:{userSelect:"none",touchAction:"none",...t.style},onKeyDown:J(t.onKeyDown,L=>{L.key==="Escape"&&(a==null||a(L.nativeEvent),L.nativeEvent.defaultPrevented||(p.isFocusedToastEscapeKeyDownRef.current=!0,$()))}),onPointerDown:J(t.onPointerDown,L=>{L.button===0&&(x.current={x:L.clientX,y:L.clientY})}),onPointerMove:J(t.onPointerMove,L=>{if(!x.current)return;const H=L.clientX-x.current.x,q=L.clientY-x.current.y,K=!!b.current,I=["left","right"].includes(p.swipeDirection),M=["left","up"].includes(p.swipeDirection)?Math.min:Math.max,B=I?M(0,H):0,G=I?0:M(0,q),Z=L.pointerType==="touch"?10:2,se={x:B,y:G},ce={originalEvent:L,delta:se};K?(b.current=se,Hl(YD,d,ce,{discrete:!1})):d0(se,p.swipeDirection,Z)?(b.current=se,Hl(QD,c,ce,{discrete:!1}),L.target.setPointerCapture(L.pointerId)):(Math.abs(H)>Z||Math.abs(q)>Z)&&(x.current=null)}),onPointerUp:J(t.onPointerUp,L=>{const H=b.current,q=L.target;if(q.hasPointerCapture(L.pointerId)&&q.releasePointerCapture(L.pointerId),b.current=null,x.current=null,H){const K=L.currentTarget,I={originalEvent:L,delta:H};d0(H,p.swipeDirection,p.swipeThreshold)?Hl(JD,_,I,{discrete:!0}):Hl(XD,f,I,{discrete:!0}),K.addEventListener("click",M=>M.preventDefault(),{once:!0})}})})})}),p.viewport)})]}):null}),n2=t=>{const{__scopeToast:e,children:n,...r}=t,i=dd(ol,e),[s,o]=g.useState(!1),[a,l]=g.useState(!1);return s2(()=>o(!0)),g.useEffect(()=>{const u=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(u)},[]),a?null:w.jsx(Zc,{asChild:!0,children:w.jsx(Ng,{...r,children:s&&w.jsxs(w.Fragment,{children:[i.label," ",n]})})})},r2="ToastTitle",FC=g.forwardRef((t,e)=>{const{__scopeToast:n,...r}=t;return w.jsx(Ee.div,{...r,ref:e})});FC.displayName=r2;var i2="ToastDescription",LC=g.forwardRef((t,e)=>{const{__scopeToast:n,...r}=t;return w.jsx(Ee.div,{...r,ref:e})});LC.displayName=i2;var jC="ToastAction",DC=g.forwardRef((t,e)=>{const{altText:n,...r}=t;return n.trim()?w.jsx(UC,{altText:n,asChild:!0,children:w.jsx(Lg,{...r,ref:e})}):(console.error(`Invalid prop \`altText\` supplied to \`${jC}\`. Expected non-empty \`string\`.`),null)});DC.displayName=jC;var zC="ToastClose",Lg=g.forwardRef((t,e)=>{const{__scopeToast:n,...r}=t,i=e2(zC,n);return w.jsx(UC,{asChild:!0,children:w.jsx(Ee.button,{type:"button",...r,ref:e,onClick:J(t.onClick,i.onClose)})})});Lg.displayName=zC;var UC=g.forwardRef((t,e)=>{const{__scopeToast:n,altText:r,...i}=t;return w.jsx(Ee.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...i,ref:e})});function VC(t){const e=[];return Array.from(t.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&e.push(r.textContent),o2(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&&e.push(o)}else e.push(...VC(r))}}),e}function Hl(t,e,n,{discrete:r}){const i=n.originalEvent.currentTarget,s=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:n});e&&i.addEventListener(t,e,{once:!0}),r?ig(i,s):i.dispatchEvent(s)}var d0=(t,e,n=0)=>{const r=Math.abs(t.x),i=Math.abs(t.y),s=r>i;return e==="left"||e==="right"?s&&r>n:!s&&i>n};function s2(t=()=>{}){const e=Ft(t);on(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(e)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[e])}function o2(t){return t.nodeType===t.ELEMENT_NODE}function a2(t){const e=[],n=document.createTreeWalker(t,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();)e.push(n.currentNode);return e}function Lf(t){const e=document.activeElement;return t.some(n=>n===e?!0:(n.focus(),document.activeElement!==e))}var l2=OC,BC=AC,qC=$C,HC=FC,WC=LC,GC=DC,KC=Lg;const f0=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,h0=QS,u2=(t,e)=>n=>{var r;if((e==null?void 0:e.variants)==null)return h0(t,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:i,defaultVariants:s}=e,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=f0(c)||f0(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=e==null||(r=e.compoundVariants)===null||r===void 0?void 0:r.reduce((u,c)=>{let{class:d,className:f,..._}=c;return Object.entries(_).every(m=>{let[p,y]=m;return Array.isArray(y)?y.includes({...s,...a}[p]):{...s,...a}[p]===y})?[...u,d,f]:u},[]);return h0(t,o,l,n==null?void 0:n.class,n==null?void 0:n.className)},c2=l2,QC=g.forwardRef(({className:t,...e},n)=>w.jsx(BC,{ref:n,className:at("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]",t),...e}));QC.displayName=BC.displayName;const d2=u2("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"}}),YC=g.forwardRef(({className:t,variant:e,...n},r)=>w.jsx(qC,{ref:r,className:at(d2({variant:e}),t),...n}));YC.displayName=qC.displayName;const f2=g.forwardRef(({className:t,...e},n)=>w.jsx(GC,{ref:n,className:at("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",t),...e}));f2.displayName=GC.displayName;const XC=g.forwardRef(({className:t,...e},n)=>w.jsx(KC,{ref:n,className:at("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",t),"aria-label":"Dismiss notification","toast-close":"",...e,children:w.jsx(yD,{className:"h-4 w-4"})}));XC.displayName=KC.displayName;const JC=g.forwardRef(({className:t,...e},n)=>w.jsx(HC,{ref:n,className:at("text-sm font-semibold",t),...e}));JC.displayName=HC.displayName;const ZC=g.forwardRef(({className:t,...e},n)=>w.jsx(WC,{ref:n,className:at("text-sm opacity-90",t),...e}));ZC.displayName=WC.displayName;function h2(){const{toasts:t}=VD();return w.jsxs(c2,{children:[t.map(function({id:e,title:n,description:r,action:i,...s}){return w.jsxs(YC,{...s,children:[w.jsxs("div",{className:"grid gap-1",children:[n&&w.jsx(JC,{children:n}),r&&w.jsx(ZC,{children:r})]}),i,w.jsx(XC,{})]},e)}),w.jsx(QC,{})]})}function p2(){const{pathname:t,hash:e}=an();g.useLayoutEffect(()=>{e||window.scrollTo({top:0,left:0,behavior:"instant"})},[t,e])}class v2{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 p0=new v2(Sc),jf={hide_closed_source_evals:!1},ek=V.createContext(null),g2=({children:t})=>{const{user:e}=Ag(),[n,r]=V.useState(jf),[i,s]=V.useState(!1);V.useEffect(()=>{let l=!1;if(!e){r(jf);return}return s(!0),p0.getPreferences().then(u=>{l||r(u)}).catch(()=>{l||r(jf)}).finally(()=>{l||s(!1)}),()=>{l=!0}},[e]);const o=V.useCallback(async l=>{const u={...n,hide_closed_source_evals:l};if(r(u),!!e)try{const c=await p0.updatePreferences(u);r(c)}catch{r(n)}},[n,e]),a=V.useMemo(()=>({preferences:n,canPersist:!!e,isLoading:i,setHideClosedSourceEvals:o}),[n,e,i,o]);return w.jsx(ek.Provider,{value:a,children:t})};function A3(){const t=V.useContext(ek);if(!t)throw new Error("usePreferences must be used inside a ");return t}const tk=d$(),m2=tk?LM:FM;if(!tk&&typeof window<"u"){const t=window.location.hash;t.startsWith("#/")&&!t.startsWith("#//")&&window.history.replaceState(null,"",t.slice(1))}const y2=V.lazy(()=>oe(()=>import("./AuthorizePaperEditView-BxV6NPKV.js"),__vite__mapDeps([0,1,2,3,4]))),_2=V.lazy(()=>oe(()=>import("./FollowingView-BYs2N-nq.js"),__vite__mapDeps([5,6,7,1,8,9,10,11,12,2,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35]))),v0=V.lazy(()=>oe(()=>import("./FeedView-CFzlAcol.js"),__vite__mapDeps([6,7,1,8,9,10,11,12,2,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35]))),w2=V.lazy(()=>oe(()=>import("./ChatView-DsnEMREv.js"),__vite__mapDeps([36,1,37,31,32,23,24,38,39,9,40,41,42,43,44,45,2,46,47,48,49,13,50,51,17,18,52,53,29,30,54,55,56]))),x2=V.lazy(()=>oe(()=>import("./SharedChatView-C8jGkNjy.js"),__vite__mapDeps([57,1,37,31,32,23,24,38,39,9,40,41,42,43,44,45,2,46,47,48,49,13,50,51,17,18,52,53]))),b2=V.lazy(()=>oe(()=>import("./PapersListView-zhvzkmK9.js"),__vite__mapDeps([58,19,20,11,21,15,16,17,18,22,23,24,25,26,27,28,9,33,1,34,59,35,60,61]))),E2=V.lazy(()=>oe(()=>import("./PaperDetailView-uLa9aL0s.js"),__vite__mapDeps([62,21,19,20,11,22,63,24,38,25,64,23,65,1,33,34,66,27,35,3,8,30,46,67,68,26,50,69,2,9,70,71,72,73,74,39,75,13,76,77,78,40,79,43,44,28,80,81,17,18,82]))),S2=V.lazy(()=>oe(()=>import("./PaperReaderView-D2y857wl.js"),__vite__mapDeps([83,1,37,31,32,23,24,38,39,9,40,41,42,43,44,45,2,46,47,48,49,13,50,51,17,18,52,53,84,65,25,33,34,36,29,30,54,55,56]))),C2=V.lazy(()=>oe(()=>import("./TagsIndexView-DJJJY-D1.js"),__vite__mapDeps([85,1,9,20,11,86,50,87,54,88,89,47,75,90,41,91,78,7,35,92,27,93,73,3,67,74,68,26,8,69,2,70,13,94,95]))),k2=V.lazy(()=>oe(()=>import("./TagBrowseView-BzhdvNbn.js"),__vite__mapDeps([96,97,1,2,10,13,19,20,11,15,16,17,18,21,22,23,24,25,26,27,28,14,98,84,42,43,44,45,38,53,9,60,61,86,33,34,35,99,90,40]))),P2=V.lazy(()=>oe(()=>import("./MethodsIndexView-CS3VxsBJ.js"),__vite__mapDeps([100,1,9,95,86,35,92,27,93,73,3,67,74,68,26,8,50,69,2,70,13,94,88]))),R2=V.lazy(()=>oe(()=>import("./FrameworksIndexView-CqtIM7jE.js"),__vite__mapDeps([101,1,21,9,20,61]))),T2=V.lazy(()=>oe(()=>import("./TrendsView-CW281bBi.js"),__vite__mapDeps([102,1,35,27]))),I2=V.lazy(()=>oe(()=>import("./ConferencesIndexView-DUaazjEx.js"),__vite__mapDeps([103,1,9,104,35,92,27,93,73,3,67,74,68,26,8,50,69,2,70,13]))),O2=V.lazy(()=>oe(()=>import("./AiDeadlinesView-BWqSvLms.js"),__vite__mapDeps([105,1,9,106,76,27,35,25,8,104]))),M2=V.lazy(()=>oe(()=>import("./ConferenceDetailView-CX4S54m2.js"),__vite__mapDeps([107,1,92,27,84,42,43,44,45,38,23,24,2,53,9,60,95,20,108,104,11,35,25,99]))),A2=V.lazy(()=>oe(()=>import("./ConferenceTaskView-DvbWh5_R.js"),__vite__mapDeps([109,1,15,16,17,18,19,20,11,21,22,23,24,25,26,27,28,84,42,43,44,45,38,2,53,9,60,108,33,34,35,99]))),N2=V.lazy(()=>oe(()=>import("./OrganizationsIndexView-CbWS3zNq.js"),__vite__mapDeps([110,1,35,9,111]))),$2=V.lazy(()=>oe(()=>import("./OrganizationDetailView-C69MBUc4.js"),__vite__mapDeps([112,97,1,2,10,13,84,42,43,44,45,38,23,24,53,113,27,9,15,16,17,18,19,20,11,21,22,25,26,28,35,68,3,8,50,69,33,34,60,81,99]))),F2=V.lazy(()=>oe(()=>import("./OrganizationDetailView-C69MBUc4.js"),__vite__mapDeps([112,97,1,2,10,13,84,42,43,44,45,38,23,24,53,113,27,9,15,16,17,18,19,20,11,21,22,25,26,28,35,68,3,8,50,69,33,34,60,81,99]))),L2=V.lazy(()=>oe(()=>import("./AuthorDetailView-ETu8URv_.js"),__vite__mapDeps([114,1,17,18,15,16,19,20,11,21,22,23,24,25,26,27,28,97,2,10,13,35,33,34,60,99]))),j2=V.lazy(()=>oe(()=>import("./MethodDetailView-CU5sbo2E.js"),__vite__mapDeps([115,97,1,2,10,13,23,24,19,20,11,15,16,17,18,21,22,25,26,27,28,84,42,43,44,45,38,53,9,60,86,33,34,35,99]))),D2=V.lazy(()=>oe(()=>import("./BenchmarkDetailView-CzOCvqTF.js"),__vite__mapDeps([116,97,1,2,10,13,9,63,24,38,25,64,22,106,76,21,27,35,98,86,60,99,117]))),z2=V.lazy(()=>oe(()=>import("./SavedPapersView-CWUM_gRn.js"),__vite__mapDeps([118,23,24,1,16,17,18,19,20,11,21,22,25,27,35,80]))),U2=V.lazy(()=>oe(()=>import("./SettingsView-BurbOJNZ.js"),__vite__mapDeps([119,1,2,10,106,76,12,7,14,90,32,66,55,49,89]))),V2=V.lazy(()=>oe(()=>import("./PrivacyView-B0DBzRMW.js"),__vite__mapDeps([120,66]))),B2=V.lazy(()=>oe(()=>import("./ApiDocsView-Bb326kAF.js"),__vite__mapDeps([121,1,43,122]))),q2=V.lazy(()=>oe(()=>import("./McpView-CMm_vOrt.js"),__vite__mapDeps([123,1,66,56,40,49,46,124]))),H2=V.lazy(()=>oe(()=>import("./SubmitView-CCWdg0_v.js"),__vite__mapDeps([125,2,35,3,67,74,23,24,71]))),W2=V.lazy(()=>oe(()=>import("./CronDashboard-DMMdAs4p.js"),__vite__mapDeps([126,1,2,127,128,77,3,51,75,88,91,41,87,49,129,69,130,79,34,4,9,32]))),G2=V.lazy(()=>oe(()=>import("./AutonomousOperations-epH5w9S2.js"),__vite__mapDeps([131,1,2,127,128,77,3,67,91,48]))),K2=V.lazy(()=>oe(()=>import("./SubmissionsDashboard-6OF_L4gN.js"),__vite__mapDeps([132,72,71,23,24,1,2,34,9,25,70,129,69,130,133]))),Q2=V.lazy(()=>oe(()=>import("./UserProfileView-jtJ9PNjL.js"),__vite__mapDeps([134,1,113,27,9]))),Y2=V.lazy(()=>oe(()=>import("./RateLimitsView-JyYAwVUh.js"),__vite__mapDeps([135,1]))),X2=V.lazy(()=>oe(()=>import("./AstraForRoboticsView-CqbM4y2W.js"),__vite__mapDeps([136,15,16,17,18,19,20,11,21,22,23,24,25,26,27,28,35,33,1,34,66,137]))),Df=V.lazy(()=>oe(()=>import("./NotFound-D8hwuoEl.js"),[])),J2=V.lazy(()=>oe(()=>import("./SearchOverlay-CzggQ3fk.js"),__vite__mapDeps([138,23,24,1,22,9,59,20,11]))),Z2=V.lazy(()=>oe(()=>import("./StagingAccessRequestView-DFeZrs_b.js"),__vite__mapDeps([139,130]))),nk=()=>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}})]})]}),e3=new gA({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:1}}}),t3=()=>{const{arxivId:t}=zE();return w.jsx(co,{to:t?`/paper/${t}`:"/papers",replace:!0})},n3=()=>{const{taskSlug:t}=zE();return w.jsx(co,{to:t?`/tasks/${t}`:"/tasks",replace:!0})},r3=({element:t})=>yo()?w.jsx(co,{to:"/",replace:!0}):w.jsx(w.Fragment,{children:t}),Lp=({element:t})=>{const{user:e,isLoading:n}=Ag(),r=an();return yo()?w.jsx(co,{to:"/",replace:!0}):n?w.jsx("div",{className:"page",children:w.jsx("div",{className:"submission-loading",children:w.jsx("span",{children:"Checking admin session..."})})}):e?e.is_admin?w.jsx(w.Fragment,{children:t}):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 @",e.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(NS,{returnTo:`${r.pathname}${r.search}`})]})})},i3=()=>{const t=a$(),e=typeof window<"u"&&new URL(t,window.location.origin).origin!==window.location.origin;return V.useEffect(()=>{e&&window.location.replace(t)},[t,e]),e?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:t,children:"Continue"})]})}):w.jsx(Lp,{element:w.jsx(W2,{})})},g0=({reader:t=!1})=>{const[e,n]=V.useState(!1),{pathname:r}=an();V.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($D,{onOpenSearch:()=>n(!0)}),s=w.jsx(OE,{resetKey:r,children:w.jsx(V.Suspense,{fallback:w.jsx(nk,{}),children:w.jsx(kM,{})})}),o=e&&w.jsx(V.Suspense,{fallback:null,children:w.jsx(J2,{open:e,onClose:()=>n(!1)})});return t?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(FD,{}),o]})},s3=()=>(p2(),V.useLayoutEffect(()=>{var t;(t=document.getElementById("initial-discovery-footer"))==null||t.remove()},[]),w.jsxs(PM,{children:[w.jsx(ne,{path:"/request-access",element:w.jsx(V.Suspense,{fallback:w.jsx(nk,{}),children:w.jsx(Z2,{})})}),w.jsx(ne,{element:w.jsx(g0,{reader:!0}),children:w.jsx(ne,{path:"/pdf/:paperId",element:c$()?w.jsx(S2,{}):w.jsx(Df,{})})}),w.jsxs(ne,{element:w.jsx(g0,{}),children:[w.jsx(ne,{path:"/",element:w.jsx(v0,{})}),w.jsx(ne,{path:"/following",element:w.jsx(_2,{})}),w.jsx(ne,{path:"/x-trending",element:w.jsx(v0,{xTrending:!0})}),w.jsx(ne,{path:"/chat/:sessionId?",element:Va()?w.jsx(w2,{}):w.jsx(co,{to:"/",replace:!0})}),w.jsx(ne,{path:"/share/:shareId",element:Va()?w.jsx(x2,{}):w.jsx(Df,{})}),w.jsx(ne,{path:"/papers",element:w.jsx(b2,{})}),w.jsx(ne,{path:"/papers/:arxivId",element:w.jsx(t3,{})}),w.jsx(ne,{path:"/paper/:arxivId",element:w.jsx(E2,{})}),w.jsx(ne,{path:"/tasks",element:w.jsx(C2,{})}),w.jsx(ne,{path:"/tasks/:taskSlug",element:w.jsx(k2,{})}),w.jsx(ne,{path:"/task/:taskSlug",element:w.jsx(n3,{})}),w.jsx(ne,{path:"/methods",element:w.jsx(P2,{})}),w.jsx(ne,{path:"/methods/:methodSlug",element:w.jsx(j2,{})}),w.jsx(ne,{path:"/frameworks",element:w.jsx(R2,{})}),w.jsx(ne,{path:"/trends",element:w.jsx(T2,{})}),w.jsx(ne,{path:"/conferences",element:w.jsx(I2,{})}),w.jsx(ne,{path:"/ai-deadlines",element:w.jsx(O2,{})}),w.jsx(ne,{path:"/conferences/:confSlug",element:w.jsx(M2,{})}),w.jsx(ne,{path:"/conferences/:confSlug/:taskSlug",element:w.jsx(A2,{})}),w.jsx(ne,{path:"/organizations",element:w.jsx(N2,{})}),w.jsx(ne,{path:"/orgs/:orgSlug",element:w.jsx($2,{})}),w.jsx(ne,{path:"/orgs/:orgSlug/:taskSlug",element:w.jsx(F2,{})}),w.jsx(ne,{path:"/authors/:authorId",element:w.jsx(L2,{})}),w.jsx(ne,{path:"/benchmark/:datasetSlug",element:w.jsx(D2,{})}),w.jsx(ne,{path:"/authorize-paper-edit/:authorizationId",element:w.jsx(y2,{})}),w.jsx(ne,{path:"/submit",element:w.jsx(H2,{})}),w.jsx(ne,{path:"/saved",element:w.jsx(r3,{element:w.jsx(z2,{})})}),w.jsx(ne,{path:"/settings",element:w.jsx(U2,{})}),w.jsx(ne,{path:"/privacy",element:w.jsx(V2,{})}),w.jsx(ne,{path:"/docs/api",element:w.jsx(B2,{})}),w.jsx(ne,{path:"/mcp",element:w.jsx(q2,{})}),w.jsx(ne,{path:"/admin-dashboard",element:w.jsx(i3,{})}),w.jsx(ne,{path:"/autonomous-operations",element:w.jsx(Lp,{element:w.jsx(G2,{})})}),w.jsx(ne,{path:"/cron-dashboard",element:w.jsx(co,{to:"/admin-dashboard",replace:!0})}),w.jsx(ne,{path:"/submissions",element:w.jsx(Lp,{element:w.jsx(K2,{})})}),w.jsx(ne,{path:"/rate-limits",element:w.jsx(Y2,{})}),w.jsx(ne,{path:"/astra-for-robotics",element:w.jsx(X2,{})}),w.jsx(ne,{path:"/:username",element:w.jsx(Q2,{})}),w.jsx(ne,{path:"*",element:w.jsx(Df,{})})]})]})),o3=()=>w.jsx(yA,{client:e3,children:w.jsx(OD,{children:w.jsxs(g2,{children:[w.jsx(m2,{children:w.jsx(s3,{})}),w.jsx(h2,{}),!1]})})});NO();const a3=w.jsx(NR,{attribute:"class",defaultTheme:"system",enableSystem:!0,disableTransitionOnChange:!0,storageKey:"pwc-theme",children:w.jsx(OE,{children:w.jsx(o3,{})})}),l3=Dx(document.getElementById("root"));l3.render(w.jsx(V.StrictMode,{children:a3}));export{o$ as $,at as A,x3 as B,vD as C,P3 as D,i1 as E,R1 as F,mD as G,NS as H,YL as I,cd as J,V as K,mn as L,p0 as M,c$ as N,w3 as O,gr as P,_D as Q,QL as R,wD as S,f2 as T,PC as U,Qn as V,b3 as W,yD as X,_3 as Y,S3 as Z,k0 as _,Ag as a,oe as a0,QS as a1,gD as a2,el as a3,TD as a4,Sc as a5,FS as a6,u2 as a7,Fs as a8,ZN as a9,r1 as aA,za as aB,hA as aC,p3 as aD,iA as aE,XM as aF,xp as aG,YE as aH,QM as aI,YM as aJ,wp as aK,GE as aL,dA as aM,eA as aN,I3 as aO,O3 as aP,gS as aQ,og as aR,aS,sg as aT,g3 as aU,v3 as aV,dg as aW,s0 as aX,t$ as aa,n$ as ab,r$ as ac,oi as ad,s$ as ae,i$ as af,y3 as ag,co as ah,$L as ai,FL as aj,y1 as ak,Zc as al,Jc as am,LL as an,jL as ao,d3 as ap,c3 as aq,ID as ar,C3 as as,Yc as at,wt as au,h3 as av,KE as aw,hn as ax,t1 as ay,n1 as az,an as b,tg as c,M3 as d,f3 as e,mA as f,Va as g,AS as h,yo as i,w as j,u$ as k,l$ as l,E3 as m,ud as n,k3 as o,VD as p,A3 as q,g as r,T3 as s,Ee as t,zE as u,Xc as v,Xe as w,J as x,RL as y,Wi as z}; diff --git a/assets/index-cqXA1kVH.css b/assets/index-cqXA1kVH.css deleted file mode 100644 index 225fbeaef5e1034fdb79ed9b1e9471c832471d98..0000000000000000000000000000000000000000 --- a/assets/index-cqXA1kVH.css +++ /dev/null @@ -1 +0,0 @@ -@import"https://fonts.googleapis.com/css2?family=Newsreader:ital,opsz,wght@0,6..72,400;0,6..72,500;0,6..72,600;0,6..72,700;1,6..72,400&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap";*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}:root{--background: 0 0% 100%;--foreground: 222.2 84% 4.9%;--card: 0 0% 100%;--card-foreground: 222.2 84% 4.9%;--popover: 0 0% 100%;--popover-foreground: 222.2 84% 4.9%;--primary: 222.2 47.4% 11.2%;--primary-foreground: 210 40% 98%;--secondary: 210 40% 96.1%;--secondary-foreground: 222.2 47.4% 11.2%;--muted: 210 40% 96.1%;--muted-foreground: 215.4 16.3% 46.9%;--accent-tw: 210 40% 96.1%;--accent-foreground: 222.2 47.4% 11.2%;--destructive: 0 84.2% 60.2%;--destructive-foreground: 210 40% 98%;--border: 214.3 31.8% 91.4%;--input: 214.3 31.8% 91.4%;--ring: 222.2 84% 4.9%;--radius: .5rem}.dark{--background: 36 13% 7%;--foreground: 40 27% 93%;--card: 36 12% 10%;--card-foreground: 40 27% 93%;--popover: 36 12% 10%;--popover-foreground: 40 27% 93%;--primary: 40 27% 93%;--primary-foreground: 36 13% 7%;--secondary: 34 11% 15%;--secondary-foreground: 40 27% 93%;--muted: 34 11% 15%;--muted-foreground: 36 10% 64%;--accent-tw: 216 22% 20%;--accent-foreground: 213 38% 79%;--destructive: 0 63% 42%;--destructive-foreground: 40 27% 93%;--border: 35 11% 20%;--input: 35 11% 20%;--ring: 213 38% 67%}[data-shadcn] *{border-color:hsl(var(--border))}.\!container{width:100%!important;margin-right:auto!important;margin-left:auto!important;padding-right:2rem!important;padding-left:2rem!important}.container{width:100%;margin-right:auto;margin-left:auto;padding-right:2rem;padding-left:2rem}@media (min-width: 1400px){.\!container{max-width:1400px!important}.container{max-width:1400px}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.\!visible{visibility:visible!important}.visible{visibility:visible}.invisible{visibility:hidden}.collapse{visibility:collapse}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{top:0;right:0;bottom:0;left:0}.left-2{left:.5rem}.left-3{left:.75rem}.left-\[50\%\]{left:50%}.right-2{right:.5rem}.right-4{right:1rem}.top-0{top:0}.top-1\/2{top:50%}.top-2{top:.5rem}.top-3{top:.75rem}.top-4{top:1rem}.top-\[50\%\]{top:50%}.z-50{z-index:50}.z-\[100\]{z-index:100}.z-\[60\]{z-index:60}.-mx-1{margin-left:-.25rem;margin-right:-.25rem}.-mx-6{margin-left:-1.5rem;margin-right:-1.5rem}.mx-auto{margin-left:auto;margin-right:auto}.my-1{margin-top:.25rem;margin-bottom:.25rem}.mb-1{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-5{margin-bottom:1.25rem}.mb-6{margin-bottom:1.5rem}.mb-8{margin-bottom:2rem}.ml-1{margin-left:.25rem}.ml-3{margin-left:.75rem}.ml-auto{margin-left:auto}.mr-1{margin-right:.25rem}.mr-2{margin-right:.5rem}.mr-3{margin-right:.75rem}.mr-4{margin-right:1rem}.mr-auto{margin-right:auto}.mt-1{margin-top:.25rem}.mt-10{margin-top:2.5rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.mt-8{margin-top:2rem}.line-clamp-3{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3}.\!block{display:block!important}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.\!table{display:table!important}.table{display:table}.grid{display:grid}.contents{display:contents}.hidden{display:none}.aspect-square{aspect-ratio:1 / 1}.h-10{height:2.5rem}.h-11{height:2.75rem}.h-12{height:3rem}.h-16{height:4rem}.h-2{height:.5rem}.h-2\.5{height:.625rem}.h-20{height:5rem}.h-24{height:6rem}.h-3{height:.75rem}.h-3\.5{height:.875rem}.h-32{height:8rem}.h-36{height:9rem}.h-4{height:1rem}.h-40{height:10rem}.h-44{height:11rem}.h-48{height:12rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-64{height:16rem}.h-7{height:1.75rem}.h-8{height:2rem}.h-9{height:2.25rem}.h-\[18px\]{height:18px}.h-\[190px\]{height:190px}.h-\[220px\]{height:220px}.h-\[38px\]{height:38px}.h-auto{height:auto}.h-full{height:100%}.h-px{height:1px}.max-h-32{max-height:8rem}.max-h-40{max-height:10rem}.max-h-48{max-height:12rem}.max-h-52{max-height:13rem}.max-h-64{max-height:16rem}.max-h-80{max-height:20rem}.max-h-\[300px\]{max-height:300px}.max-h-\[350px\]{max-height:350px}.max-h-\[400px\]{max-height:400px}.max-h-\[460px\]{max-height:460px}.max-h-\[50vh\]{max-height:50vh}.max-h-\[600px\]{max-height:600px}.max-h-\[700px\]{max-height:700px}.max-h-\[800px\]{max-height:800px}.max-h-\[90vh\]{max-height:90vh}.max-h-\[min\(300px\,calc\(var\(--radix-popover-content-available-height\)-2\.75rem\)\)\]{max-height:min(300px,calc(var(--radix-popover-content-available-height) - 2.75rem))}.max-h-\[var\(--radix-popover-content-available-height\)\]{max-height:var(--radix-popover-content-available-height)}.max-h-screen{max-height:100vh}.min-h-0{min-height:0px}.min-h-\[80px\]{min-height:80px}.w-1\/2{width:50%}.w-1\/3{width:33.333333%}.w-10{width:2.5rem}.w-11{width:2.75rem}.w-12{width:3rem}.w-16{width:4rem}.w-2{width:.5rem}.w-2\.5{width:.625rem}.w-20{width:5rem}.w-24{width:6rem}.w-3{width:.75rem}.w-3\.5{width:.875rem}.w-3\/4{width:75%}.w-36{width:9rem}.w-4{width:1rem}.w-5{width:1.25rem}.w-56{width:14rem}.w-6{width:1.5rem}.w-64{width:16rem}.w-72{width:18rem}.w-8{width:2rem}.w-\[160px\]{width:160px}.w-\[18px\]{width:18px}.w-\[calc\(100vw-2rem\)\]{width:calc(100vw - 2rem)}.w-\[var\(--radix-popover-trigger-width\)\]{width:var(--radix-popover-trigger-width)}.w-auto{width:auto}.w-fit{width:-moz-fit-content;width:fit-content}.w-full{width:100%}.min-w-0{min-width:0px}.min-w-\[140px\]{min-width:140px}.min-w-\[180px\]{min-width:180px}.min-w-\[200px\]{min-width:200px}.min-w-\[240px\]{min-width:240px}.min-w-\[260px\]{min-width:260px}.min-w-\[8rem\]{min-width:8rem}.max-w-2xl{max-width:42rem}.max-w-6xl{max-width:72rem}.max-w-7xl{max-width:80rem}.max-w-\[260px\]{max-width:260px}.max-w-\[280px\]{max-width:280px}.max-w-\[360px\]{max-width:360px}.max-w-full{max-width:100%}.max-w-lg{max-width:32rem}.max-w-md{max-width:28rem}.max-w-xl{max-width:36rem}.flex-1{flex:1 1 0%}.flex-shrink-0{flex-shrink:0}.shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.caption-bottom{caption-side:bottom}.border-collapse{border-collapse:collapse}.-translate-y-1\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-\[-50\%\]{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-\[-50\%\]{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-default{cursor:default}.cursor-pointer{cursor:pointer}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.resize-none{resize:none}.resize{resize:both}.list-decimal{list-style-type:decimal}.list-disc{list-style-type:disc}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-rows-\[auto_minmax\(0\,1fr\)_auto\]{grid-template-rows:auto minmax(0,1fr) auto}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-0\.5{gap:.125rem}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-5{gap:1.25rem}.gap-x-4{-moz-column-gap:1rem;column-gap:1rem}.gap-y-1{row-gap:.25rem}.space-x-1>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.25rem * var(--tw-space-x-reverse));margin-left:calc(.25rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(1rem * var(--tw-space-x-reverse));margin-left:calc(1rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-1\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.375rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.375rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.25rem * var(--tw-space-y-reverse))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem * var(--tw-space-y-reverse))}.justify-self-end{justify-self:end}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.overscroll-contain{overscroll-behavior:contain}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) - 2px)}.rounded-sm{border-radius:calc(var(--radius) - 4px)}.\!border{border-width:1px!important}.border{border-width:1px}.border-2{border-width:2px}.border-b{border-bottom-width:1px}.border-t{border-top-width:1px}.border-dashed{border-style:dashed}.\!border-black{--tw-border-opacity: 1 !important;border-color:rgb(0 0 0 / var(--tw-border-opacity, 1))!important}.border-amber-200{--tw-border-opacity: 1;border-color:rgb(253 230 138 / var(--tw-border-opacity, 1))}.border-amber-500{--tw-border-opacity: 1;border-color:rgb(245 158 11 / var(--tw-border-opacity, 1))}.border-border{border-color:hsl(var(--border))}.border-destructive{border-color:hsl(var(--destructive))}.border-destructive\/40{border-color:hsl(var(--destructive) / .4)}.border-destructive\/50{border-color:hsl(var(--destructive) / .5)}.border-input{border-color:hsl(var(--input))}.border-primary{border-color:hsl(var(--primary))}.border-red-500{--tw-border-opacity: 1;border-color:rgb(239 68 68 / var(--tw-border-opacity, 1))}.border-transparent{border-color:transparent}.bg-accent{background-color:hsl(var(--accent-tw))}.bg-amber-100{--tw-bg-opacity: 1;background-color:rgb(254 243 199 / var(--tw-bg-opacity, 1))}.bg-amber-50{--tw-bg-opacity: 1;background-color:rgb(255 251 235 / var(--tw-bg-opacity, 1))}.bg-background{background-color:hsl(var(--background))}.bg-background\/80{background-color:hsl(var(--background) / .8)}.bg-black\/80{background-color:#000c}.bg-blue-100{--tw-bg-opacity: 1;background-color:rgb(219 234 254 / var(--tw-bg-opacity, 1))}.bg-border{background-color:hsl(var(--border))}.bg-card{background-color:hsl(var(--card))}.bg-destructive{background-color:hsl(var(--destructive))}.bg-destructive\/10{background-color:hsl(var(--destructive) / .1)}.bg-muted{background-color:hsl(var(--muted))}.bg-muted\/30{background-color:hsl(var(--muted) / .3)}.bg-muted\/40{background-color:hsl(var(--muted) / .4)}.bg-muted\/50{background-color:hsl(var(--muted) / .5)}.bg-popover{background-color:hsl(var(--popover))}.bg-primary{background-color:hsl(var(--primary))}.bg-red-50\/50{background-color:#fef2f280}.bg-secondary{background-color:hsl(var(--secondary))}.bg-transparent{background-color:transparent}.fill-current{fill:currentColor}.object-contain{-o-object-fit:contain;object-fit:contain}.p-0{padding:0}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-8{padding-left:2rem;padding-right:2rem}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-10{padding-top:2.5rem;padding-bottom:2.5rem}.py-12{padding-top:3rem;padding-bottom:3rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-5{padding-top:1.25rem;padding-bottom:1.25rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.py-8{padding-top:2rem;padding-bottom:2rem}.pb-2{padding-bottom:.5rem}.pl-4{padding-left:1rem}.pl-5{padding-left:1.25rem}.pl-8{padding-left:2rem}.pl-9{padding-left:2.25rem}.pr-16{padding-right:4rem}.pr-2{padding-right:.5rem}.pr-9{padding-right:2.25rem}.pt-0{padding-top:0}.pt-2{padding-top:.5rem}.pt-6{padding-top:1.5rem}.text-left{text-align:left}.text-center{text-align:center}.align-top{vertical-align:top}.align-middle{vertical-align:middle}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-\[10px\]{font-size:10px}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.lowercase{text-transform:lowercase}.capitalize{text-transform:capitalize}.italic{font-style:italic}.leading-none{line-height:1}.leading-relaxed{line-height:1.625}.leading-snug{line-height:1.375}.leading-tight{line-height:1.25}.tracking-tight{letter-spacing:-.025em}.tracking-wide{letter-spacing:.025em}.tracking-widest{letter-spacing:.1em}.text-amber-900{--tw-text-opacity: 1;color:rgb(120 53 15 / var(--tw-text-opacity, 1))}.text-blue-900{--tw-text-opacity: 1;color:rgb(30 58 138 / var(--tw-text-opacity, 1))}.text-card-foreground{color:hsl(var(--card-foreground))}.text-current{color:currentColor}.text-destructive{color:hsl(var(--destructive))}.text-destructive-foreground{color:hsl(var(--destructive-foreground))}.text-foreground{color:hsl(var(--foreground))}.text-muted-foreground{color:hsl(var(--muted-foreground))}.text-popover-foreground{color:hsl(var(--popover-foreground))}.text-primary{color:hsl(var(--primary))}.text-primary-foreground{color:hsl(var(--primary-foreground))}.text-red-700{--tw-text-opacity: 1;color:rgb(185 28 28 / var(--tw-text-opacity, 1))}.text-secondary-foreground{color:hsl(var(--secondary-foreground))}.underline{text-decoration-line:underline}.underline-offset-2{text-underline-offset:2px}.underline-offset-4{text-underline-offset:4px}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-30{opacity:.3}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.opacity-90{opacity:.9}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.ring-0{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-offset-background{--tw-ring-offset-color: hsl(var(--background))}.blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.drop-shadow{--tw-drop-shadow: drop-shadow(0 1px 2px rgb(0 0 0 / .1)) drop-shadow(0 1px 1px rgb(0 0 0 / .06));filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-200{transition-duration:.2s}@keyframes enter{0%{opacity:var(--tw-enter-opacity, 1);transform:translate3d(var(--tw-enter-translate-x, 0),var(--tw-enter-translate-y, 0),0) scale3d(var(--tw-enter-scale, 1),var(--tw-enter-scale, 1),var(--tw-enter-scale, 1)) rotate(var(--tw-enter-rotate, 0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity, 1);transform:translate3d(var(--tw-exit-translate-x, 0),var(--tw-exit-translate-y, 0),0) scale3d(var(--tw-exit-scale, 1),var(--tw-exit-scale, 1),var(--tw-exit-scale, 1)) rotate(var(--tw-exit-rotate, 0))}}.duration-200{animation-duration:.2s}.\!running{animation-play-state:running!important}.running{animation-play-state:running}.paused{animation-play-state:paused}.file\:border-0::file-selector-button{border-width:0px}.file\:bg-transparent::file-selector-button{background-color:transparent}.file\:text-sm::file-selector-button{font-size:.875rem;line-height:1.25rem}.file\:font-medium::file-selector-button{font-weight:500}.file\:text-foreground::file-selector-button{color:hsl(var(--foreground))}.placeholder\:text-muted-foreground::-moz-placeholder{color:hsl(var(--muted-foreground))}.placeholder\:text-muted-foreground::placeholder{color:hsl(var(--muted-foreground))}.last\:mb-0:last-child{margin-bottom:0}.hover\:border-foreground\/50:hover{border-color:hsl(var(--foreground) / .5)}.hover\:bg-accent:hover{background-color:hsl(var(--accent-tw))}.hover\:bg-destructive\/80:hover{background-color:hsl(var(--destructive) / .8)}.hover\:bg-destructive\/90:hover{background-color:hsl(var(--destructive) / .9)}.hover\:bg-muted:hover{background-color:hsl(var(--muted))}.hover\:bg-muted\/50:hover{background-color:hsl(var(--muted) / .5)}.hover\:bg-primary\/80:hover{background-color:hsl(var(--primary) / .8)}.hover\:bg-primary\/90:hover{background-color:hsl(var(--primary) / .9)}.hover\:bg-secondary:hover{background-color:hsl(var(--secondary))}.hover\:bg-secondary\/80:hover{background-color:hsl(var(--secondary) / .8)}.hover\:text-accent-foreground:hover{color:hsl(var(--accent-foreground))}.hover\:text-destructive:hover{color:hsl(var(--destructive))}.hover\:text-foreground:hover{color:hsl(var(--foreground))}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-100:hover{opacity:1}.focus\:bg-accent:focus{background-color:hsl(var(--accent-tw))}.focus\:text-accent-foreground:focus{color:hsl(var(--accent-foreground))}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-ring:focus{--tw-ring-color: hsl(var(--ring))}.focus\:ring-offset-2:focus{--tw-ring-offset-width: 2px}.focus-visible\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\:ring-2:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus-visible\:ring-ring:focus-visible{--tw-ring-color: hsl(var(--ring))}.focus-visible\:ring-offset-2:focus-visible{--tw-ring-offset-width: 2px}.focus-visible\:ring-offset-background:focus-visible{--tw-ring-offset-color: hsl(var(--background))}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-50:disabled{opacity:.5}.group.destructive .group-\[\.destructive\]\:border-muted\/40{border-color:hsl(var(--muted) / .4)}.group.destructive .group-\[\.destructive\]\:text-destructive-foreground{color:hsl(var(--destructive-foreground))}.group.destructive .group-\[\.destructive\]\:hover\:border-destructive\/30:hover{border-color:hsl(var(--destructive) / .3)}.group.destructive .group-\[\.destructive\]\:hover\:bg-destructive:hover{background-color:hsl(var(--destructive))}.group.destructive .group-\[\.destructive\]\:hover\:bg-destructive-foreground\/10:hover{background-color:hsl(var(--destructive-foreground) / .1)}.group.destructive .group-\[\.destructive\]\:hover\:text-destructive-foreground:hover{color:hsl(var(--destructive-foreground))}.group.destructive .group-\[\.destructive\]\:focus\:ring-destructive:focus{--tw-ring-color: hsl(var(--destructive))}.group.destructive .group-\[\.destructive\]\:focus\:ring-destructive-foreground:focus{--tw-ring-color: hsl(var(--destructive-foreground))}.peer:disabled~.peer-disabled\:cursor-not-allowed{cursor:not-allowed}.peer:disabled~.peer-disabled\:opacity-70{opacity:.7}.data-\[disabled\=true\]\:pointer-events-none[data-disabled=true],.data-\[disabled\]\:pointer-events-none[data-disabled]{pointer-events:none}.data-\[state\=checked\]\:translate-x-5[data-state=checked]{--tw-translate-x: 1.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[state\=unchecked\]\:translate-x-0[data-state=unchecked],.data-\[swipe\=cancel\]\:translate-x-0[data-swipe=cancel]{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[swipe\=end\]\:translate-x-\[var\(--radix-toast-swipe-end-x\)\][data-swipe=end]{--tw-translate-x: var(--radix-toast-swipe-end-x);transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[swipe\=move\]\:translate-x-\[var\(--radix-toast-swipe-move-x\)\][data-swipe=move]{--tw-translate-x: var(--radix-toast-swipe-move-x);transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[selected\=\'true\'\]\:bg-accent[data-selected=true]{background-color:hsl(var(--accent-tw))}.data-\[state\=active\]\:bg-background[data-state=active]{background-color:hsl(var(--background))}.data-\[state\=checked\]\:\!bg-black[data-state=checked]{--tw-bg-opacity: 1 !important;background-color:rgb(0 0 0 / var(--tw-bg-opacity, 1))!important}.data-\[state\=checked\]\:bg-primary[data-state=checked]{background-color:hsl(var(--primary))}.data-\[state\=open\]\:bg-accent[data-state=open]{background-color:hsl(var(--accent-tw))}.data-\[state\=selected\]\:bg-muted[data-state=selected]{background-color:hsl(var(--muted))}.data-\[state\=unchecked\]\:bg-input[data-state=unchecked]{background-color:hsl(var(--input))}.data-\[selected\=true\]\:text-accent-foreground[data-selected=true]{color:hsl(var(--accent-foreground))}.data-\[state\=active\]\:text-foreground[data-state=active]{color:hsl(var(--foreground))}.data-\[state\=checked\]\:\!text-white[data-state=checked]{--tw-text-opacity: 1 !important;color:rgb(255 255 255 / var(--tw-text-opacity, 1))!important}.data-\[state\=open\]\:text-muted-foreground[data-state=open]{color:hsl(var(--muted-foreground))}.data-\[disabled\=true\]\:opacity-50[data-disabled=true],.data-\[disabled\]\:opacity-50[data-disabled]{opacity:.5}.data-\[state\=active\]\:shadow-sm[data-state=active]{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.data-\[swipe\=move\]\:transition-none[data-swipe=move]{transition-property:none}.data-\[state\=open\]\:animate-in[data-state=open]{animation-name:enter;animation-duration:.15s;--tw-enter-opacity: initial;--tw-enter-scale: initial;--tw-enter-rotate: initial;--tw-enter-translate-x: initial;--tw-enter-translate-y: initial}.data-\[state\=closed\]\:animate-out[data-state=closed],.data-\[swipe\=end\]\:animate-out[data-swipe=end]{animation-name:exit;animation-duration:.15s;--tw-exit-opacity: initial;--tw-exit-scale: initial;--tw-exit-rotate: initial;--tw-exit-translate-x: initial;--tw-exit-translate-y: initial}.data-\[state\=closed\]\:fade-out-0[data-state=closed]{--tw-exit-opacity: 0}.data-\[state\=closed\]\:fade-out-80[data-state=closed]{--tw-exit-opacity: .8}.data-\[state\=open\]\:fade-in-0[data-state=open]{--tw-enter-opacity: 0}.data-\[state\=closed\]\:zoom-out-95[data-state=closed]{--tw-exit-scale: .95}.data-\[state\=open\]\:zoom-in-95[data-state=open]{--tw-enter-scale: .95}.data-\[side\=bottom\]\:slide-in-from-top-2[data-side=bottom]{--tw-enter-translate-y: -.5rem}.data-\[side\=left\]\:slide-in-from-right-2[data-side=left]{--tw-enter-translate-x: .5rem}.data-\[side\=right\]\:slide-in-from-left-2[data-side=right]{--tw-enter-translate-x: -.5rem}.data-\[side\=top\]\:slide-in-from-bottom-2[data-side=top]{--tw-enter-translate-y: .5rem}.data-\[state\=closed\]\:slide-out-to-left-1\/2[data-state=closed]{--tw-exit-translate-x: -50%}.data-\[state\=closed\]\:slide-out-to-right-full[data-state=closed]{--tw-exit-translate-x: 100%}.data-\[state\=closed\]\:slide-out-to-top-\[48\%\][data-state=closed]{--tw-exit-translate-y: -48%}.data-\[state\=open\]\:slide-in-from-left-1\/2[data-state=open]{--tw-enter-translate-x: -50%}.data-\[state\=open\]\:slide-in-from-top-\[48\%\][data-state=open]{--tw-enter-translate-y: -48%}.data-\[state\=open\]\:slide-in-from-top-full[data-state=open]{--tw-enter-translate-y: -100%}.dark\:block:is(.dark *){display:block}.dark\:hidden:is(.dark *){display:none}.dark\:border-amber-900:is(.dark *){--tw-border-opacity: 1;border-color:rgb(120 53 15 / var(--tw-border-opacity, 1))}.dark\:border-destructive:is(.dark *){border-color:hsl(var(--destructive))}.dark\:bg-amber-950\/40:is(.dark *){background-color:#451a0366}.dark\:text-amber-100:is(.dark *){--tw-text-opacity: 1;color:rgb(254 243 199 / var(--tw-text-opacity, 1))}@media (min-width: 640px){.sm\:bottom-0{bottom:0}.sm\:right-0{right:0}.sm\:top-auto{top:auto}.sm\:mr-auto{margin-right:auto}.sm\:w-auto{width:auto}.sm\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.sm\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.sm\:flex-row{flex-direction:row}.sm\:flex-col{flex-direction:column}.sm\:justify-end{justify-content:flex-end}.sm\:space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.sm\:rounded-lg{border-radius:var(--radius)}.sm\:px-6{padding-left:1.5rem;padding-right:1.5rem}.sm\:text-left{text-align:left}.data-\[state\=open\]\:sm\:slide-in-from-bottom-full[data-state=open]{--tw-enter-translate-y: 100%}}@media (min-width: 768px){.md\:col-span-2{grid-column:span 2 / span 2}.md\:max-w-\[420px\]{max-width:420px}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.md\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.md\:grid-cols-\[1fr_1fr_auto\]{grid-template-columns:1fr 1fr auto}.md\:text-sm{font-size:.875rem;line-height:1.25rem}}@media (min-width: 1024px){.lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.lg\:grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}.lg\:grid-cols-8{grid-template-columns:repeat(8,minmax(0,1fr))}.lg\:px-8{padding-left:2rem;padding-right:2rem}}@media (min-width: 1280px){.xl\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.xl\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}}.\[\&\:has\(\[role\=checkbox\]\)\]\:pr-0:has([role=checkbox]){padding-right:0}.\[\&\>svg\+div\]\:translate-y-\[-3px\]>svg+div{--tw-translate-y: -3px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.\[\&\>svg\]\:absolute>svg{position:absolute}.\[\&\>svg\]\:left-4>svg{left:1rem}.\[\&\>svg\]\:top-4>svg{top:1rem}.\[\&\>svg\]\:text-destructive>svg{color:hsl(var(--destructive))}.\[\&\>svg\]\:text-foreground>svg{color:hsl(var(--foreground))}.\[\&\>svg\~\*\]\:pl-7>svg~*{padding-left:1.75rem}.\[\&\>tr\]\:last\:border-b-0:last-child>tr{border-bottom-width:0px}.\[\&_\[cmdk-group-heading\]\]\:px-2 [cmdk-group-heading]{padding-left:.5rem;padding-right:.5rem}.\[\&_\[cmdk-group-heading\]\]\:py-1\.5 [cmdk-group-heading]{padding-top:.375rem;padding-bottom:.375rem}.\[\&_\[cmdk-group-heading\]\]\:text-xs [cmdk-group-heading]{font-size:.75rem;line-height:1rem}.\[\&_\[cmdk-group-heading\]\]\:font-medium [cmdk-group-heading]{font-weight:500}.\[\&_\[cmdk-group-heading\]\]\:text-muted-foreground [cmdk-group-heading]{color:hsl(var(--muted-foreground))}.\[\&_\[cmdk-group\]\:not\(\[hidden\]\)_\~\[cmdk-group\]\]\:pt-0 [cmdk-group]:not([hidden])~[cmdk-group]{padding-top:0}.\[\&_\[cmdk-group\]\]\:px-2 [cmdk-group]{padding-left:.5rem;padding-right:.5rem}.\[\&_\[cmdk-input-wrapper\]_svg\]\:h-5 [cmdk-input-wrapper] svg{height:1.25rem}.\[\&_\[cmdk-input-wrapper\]_svg\]\:w-5 [cmdk-input-wrapper] svg{width:1.25rem}.\[\&_\[cmdk-input\]\]\:h-12 [cmdk-input]{height:3rem}.\[\&_\[cmdk-item\]\]\:px-2 [cmdk-item]{padding-left:.5rem;padding-right:.5rem}.\[\&_\[cmdk-item\]\]\:py-3 [cmdk-item]{padding-top:.75rem;padding-bottom:.75rem}.\[\&_\[cmdk-item\]_svg\]\:h-5 [cmdk-item] svg{height:1.25rem}.\[\&_\[cmdk-item\]_svg\]\:w-5 [cmdk-item] svg{width:1.25rem}.\[\&_p\]\:leading-relaxed p{line-height:1.625}.\[\&_svg\]\:pointer-events-none svg{pointer-events:none}.\[\&_svg\]\:size-4 svg{width:1rem;height:1rem}.\[\&_svg\]\:shrink-0 svg{flex-shrink:0}.\[\&_tr\:last-child\]\:border-0 tr:last-child{border-width:0px}.\[\&_tr\]\:border-b tr{border-bottom-width:1px}:root{--bg: #FAF8F4;--bg-elevated: #FFFFFF;--bg-subtle: #F2EFE8;--ink: #1A1814;--ink-soft: #5A554C;--ink-faint: #8E8678;--hairline: #E4DFD4;--hairline-strong: #C8C2B3;--accent: oklch(.45 .08 250);--accent-soft: oklch(.92 .03 250);--accent-text: oklch(.35 .1 250);--warn: oklch(.55 .12 30);--positive-bg: oklch(.96 .03 145);--positive-text: oklch(.34 .1 145);--positive-border: oklch(.86 .06 145);--negative-bg: oklch(.96 .03 25);--negative-text: oklch(.4 .12 25);--negative-border: oklch(.86 .06 25);--highlight-bg: oklch(.97 .04 70);--highlight-text: oklch(.42 .1 60);--highlight-border: oklch(.85 .07 70);--info-bg: oklch(.97 .04 230);--info-text: oklch(.42 .1 240);--info-border: oklch(.86 .07 230);--trend-code: #33639E;--trend-hf: #AA7D24;--app-leading-column-width: 280px;--serif: "Newsreader", Georgia, serif;--sans: "Inter", -apple-system, sans-serif;--mono: "JetBrains Mono", ui-monospace, monospace;color-scheme:light}.dark{--bg: #11100E;--bg-elevated: #1A1815;--bg-subtle: #24211D;--ink: #F3EFE7;--ink-soft: #B9B2A6;--ink-faint: #989084;--hairline: #332F29;--hairline-strong: #514A40;--accent: oklch(.72 .09 250);--accent-soft: oklch(.28 .04 250);--accent-text: oklch(.8 .08 250);--warn: oklch(.72 .12 30);--positive-bg: oklch(.25 .035 145);--positive-text: oklch(.79 .1 145);--positive-border: oklch(.43 .06 145);--negative-bg: oklch(.25 .04 25);--negative-text: oklch(.79 .1 25);--negative-border: oklch(.43 .06 25);--highlight-bg: oklch(.27 .04 70);--highlight-text: oklch(.82 .1 70);--highlight-border: oklch(.46 .07 70);--info-bg: oklch(.25 .04 230);--info-text: oklch(.8 .08 235);--info-border: oklch(.43 .07 230);--trend-code: #5C8FD6;--trend-hf: #B3831F;color-scheme:dark}*{box-sizing:border-box;margin:0;padding:0}html,body{background:var(--bg);color:var(--ink);font-family:var(--sans);font-size:14px;line-height:1.5;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}a{color:inherit;text-decoration:none}button{font-family:inherit;cursor:pointer;border:none;background:none;color:inherit}.app-header{border-bottom:1px solid var(--hairline);background:var(--bg);position:sticky;top:0;z-index:50}.app-header-inner{max-width:calc(50vw + 640px);margin:0 auto;padding:14px 32px;display:flex;align-items:center;gap:8px;min-width:0}.site-announcement{position:relative;min-height:28px;padding:5px 52px 6px;border-top:1px solid var(--hairline);background:var(--bg-subtle);color:var(--ink-soft);font-size:12px;line-height:16px;text-align:center}.site-announcement a{color:var(--accent-text);font-weight:600;text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:2px}.site-announcement a:hover{color:var(--ink)}.site-announcement-close{position:absolute;top:50%;right:20px;display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;padding:0;border:0;border-radius:4px;background:transparent;color:var(--ink-soft);cursor:pointer;transform:translateY(-50%)}.site-announcement-close:hover{background:var(--hairline);color:var(--ink)}.site-announcement-close:focus-visible{outline:2px solid var(--accent-text);outline-offset:1px}.brand{display:flex;align-items:baseline;gap:10px;font-family:var(--serif);cursor:pointer}.brand-mark{width:22px;height:22px;background:var(--ink);position:relative;align-self:center;flex-shrink:0}.brand-mark:after{content:"";position:absolute;top:4px;left:4px;right:4px;bottom:4px;background:var(--bg)}.brand-mark:before{content:"";position:absolute;top:8px;left:8px;width:6px;height:6px;background:var(--ink);z-index:1}.brand-name{font-size:20px;font-weight:600;letter-spacing:-.02em;white-space:nowrap}.brand-name em{font-style:italic;font-weight:400;color:var(--ink-soft)}.nav{display:flex;gap:24px;margin-left:8px;flex-shrink:0;position:relative}@media (min-width: 901px){.app-header-inner{max-width:none;padding-left:0}.brand{width:var(--app-leading-column-width);flex:none;justify-content:center}.nav{margin-left:0}}.nav{margin-right:16px}@media (max-width: 1440px){.nav-item:nth-last-child(-n+3){display:none}}@media (max-width: 1200px){.nav{gap:18px}.nav-item:nth-child(n+4){display:none}}@media (max-width: 920px){.search-trigger kbd{display:none}}.nav-item{font-size:13px;color:var(--ink-soft);padding:4px 0;transition:color .15s}.nav-indicator{position:absolute;bottom:0;left:0;height:1px;background:var(--ink);pointer-events:none;will-change:transform,width}.nav-indicator-ready{transition:transform .22s cubic-bezier(.4,0,.2,1),width .22s cubic-bezier(.4,0,.2,1),opacity .12s ease}.nav-item-with-badge{display:inline-flex;align-items:center;gap:5px}.nav-new-badge{display:inline-flex;align-items:center;min-height:17px;padding:1px 5px;border-radius:5px;background:#dfe7ff;color:#1458e8;font-size:9px;font-weight:700;line-height:1;letter-spacing:.02em;text-transform:uppercase}.nav-item:hover,.nav-item.active{color:var(--ink)}@media (prefers-reduced-motion: reduce){.nav-indicator-ready{transition:none}}.header-spacer{flex:1}.search-trigger{display:flex;align-items:center;gap:8px;height:32px;margin-right:4px;padding:0 6px 0 11px;border:1px solid var(--hairline);border-radius:8px;background:var(--bg-elevated);font-size:13px;color:var(--ink-faint);width:260px;min-width:32px;flex-shrink:1;transition:border-color .15s,box-shadow .15s;overflow:hidden;container-type:inline-size}@container (max-width: 160px){.search-trigger kbd{display:none}}@container (max-width: 80px){.search-trigger>:not(svg){display:none}.search-trigger>svg{margin-inline:auto;translate:-2.5px 0}}.search-trigger>span:not(:first-child){white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}.search-trigger:hover{border-color:var(--hairline-strong);box-shadow:0 1px 2px #1a18140f}.search-trigger kbd{flex:none;margin-left:auto;font-family:var(--mono);font-size:10.5px;white-space:nowrap;line-height:18px;padding:0 5px;border:1px solid var(--hairline);border-radius:4px;background:var(--bg-subtle);color:var(--ink-faint)}.icon-btn{width:32px;height:32px;display:flex;align-items:center;justify-content:center;border:1px solid var(--hairline);border-radius:6px;background:var(--bg-elevated);transition:border-color .15s}.icon-btn:hover{border-color:var(--hairline-strong)}.app-header .icon-btn,.app-header .header-feedback-link{flex:none;border-color:transparent;background:transparent;color:var(--ink-soft);transition:background .15s,color .15s}.app-header .icon-btn:hover,.app-header .header-feedback-link:hover,.app-header .icon-btn.active{border-color:transparent;background:var(--bg-subtle);color:var(--ink)}.app-header .header-feedback-link{padding:0 10px}.hf-signin-btn{display:inline-flex;align-items:center;gap:8px;max-width:100%;min-height:32px;padding:5px 12px;border:1px solid var(--hairline);border-radius:6px;background:var(--bg-elevated);font-size:13px;color:var(--ink);line-height:20px;white-space:normal;overflow-wrap:anywhere;transition:border-color .15s,background .15s}.hf-signin-btn>img{flex-shrink:0}.app-header .hf-signin-btn{flex-shrink:0;white-space:nowrap;overflow-wrap:normal}.hf-signin-btn:hover{border-color:var(--hairline-strong);background:var(--bg-subtle)}.user-avatar-btn{display:inline-flex;flex:none;align-items:center;justify-content:center;width:32px;height:32px;border:1px solid var(--hairline);border-radius:999px;background:var(--bg-elevated);padding:0;overflow:hidden;transition:border-color .15s}.user-avatar-btn:hover{border-color:var(--hairline-strong)}.user-avatar-btn:focus-visible{outline:2px solid var(--hairline-strong);outline-offset:2px}.page{max-width:calc(50vw + 640px);margin:0 auto;padding:32px}.site-footer{border-top:1px solid var(--hairline);color:var(--ink-faint);font-size:12px}.site-footer-inner{display:flex;flex-wrap:wrap;gap:14px;max-width:calc(50vw + 640px);margin:0 auto;padding:20px 32px 28px}.site-footer a{color:var(--ink-soft)}.site-footer a:hover{color:var(--ink)}.layout-with-sidebar{display:grid;grid-template-columns:220px 1fr;gap:48px;align-items:start}.sidebar{position:sticky;top:100px}.sidebar-section{margin-bottom:28px}.sidebar-label{font-family:var(--mono);font-size:10px;letter-spacing:.1em;text-transform:uppercase;color:var(--ink-faint);margin-bottom:12px}.sidebar-link{display:block;font-size:13px;color:var(--ink-soft);padding:5px 0;border-bottom:1px dotted transparent;transition:color .15s}.sidebar-link:hover{color:var(--ink)}.sidebar-link.active{color:var(--ink);font-weight:500}.sidebar-link .count{font-family:var(--mono);font-size:11px;color:var(--ink-faint);margin-left:6px}.sidebar-link-more{margin-top:8px;font-style:italic}.breadcrumb{display:flex;align-items:center;gap:8px;font-family:var(--mono);font-size:11px;color:var(--ink-faint);margin-bottom:24px}.breadcrumb a{color:var(--ink-soft)}.breadcrumb a:hover{color:var(--ink)}.breadcrumb .sep{color:var(--hairline-strong)}.breadcrumb a.breadcrumb-external{display:inline-flex;gap:3px;color:var(--accent-text);text-decoration:underline;text-decoration-color:color-mix(in srgb,var(--accent-text) 40%,transparent);text-underline-offset:3px}.breadcrumb a.breadcrumb-external:hover{text-decoration-color:currentColor}.detail-title{font-family:var(--serif);font-size:38px;font-weight:500;line-height:1.15;letter-spacing:-.02em;margin-bottom:16px;text-wrap:balance}.detail-title-org{display:inline-block;max-width:24ch;overflow:hidden;margin-left:.6em;font-family:var(--mono);font-size:13px;line-height:1.4;letter-spacing:0;color:var(--accent-text);text-overflow:ellipsis;white-space:nowrap;vertical-align:.3em}.detail-title-org--logo{display:inline-flex;align-items:center;justify-content:center;max-width:none;margin-left:.3em;font-size:inherit;width:.8em;height:.8em;border-radius:4px;overflow:hidden;vertical-align:-.05em}.detail-title-org--logo img{width:100%;height:100%;-o-object-fit:contain;object-fit:contain}.detail-title-tail{white-space:nowrap}.detail-title-edit{display:inline-flex;align-items:center;justify-content:center;width:18px;height:18px;margin-left:.2em;padding:0;border:0;border-radius:50%;background:transparent;color:var(--ink-faint);vertical-align:baseline;cursor:pointer;transition:color .15s}.detail-title-edit:hover{color:var(--ink)}.detail-title-org--logo+.detail-title-edit{position:relative;width:.42em;height:.42em;margin-left:-.24em;vertical-align:-.1em;border:1px solid var(--hairline);background:var(--bg-elevated)}.detail-title-org--logo+.detail-title-edit .icon-sm{width:65%;height:65%}.action-btn{display:inline-flex;align-items:center;gap:6px;padding:7px 12px;border:1px solid var(--hairline);border-radius:6px;background:var(--bg-elevated);font-size:12px;font-weight:500;color:var(--ink);transition:all .15s}.action-btn:hover{border-color:var(--ink)}.action-btn.primary{background:var(--ink);color:var(--bg);border-color:var(--ink)}.action-btn.primary:hover{background:color-mix(in oklch,var(--ink) 88%,var(--accent))}.no-results{padding:80px 0;text-align:center;font-family:var(--serif);color:var(--ink-faint);font-style:italic}.icon{width:14px;height:14px;flex-shrink:0}.icon-sm{width:11px;height:11px;flex-shrink:0}html{scroll-behavior:smooth}::-moz-selection{background:var(--accent-soft);color:var(--accent-text)}::selection{background:var(--accent-soft);color:var(--accent-text)}.mobile-menu-btn,.mobile-search-btn{display:none;width:36px;height:36px;align-items:center;justify-content:center;border-radius:4px;flex-shrink:0}.mobile-menu-btn:hover,.mobile-search-btn:hover{background:var(--bg-subtle)}.mobile-nav-drawer{position:fixed;top:0;right:0;bottom:0;left:0;background:#1a181466;z-index:100;display:flex;justify-content:flex-end}.mobile-nav-panel{width:min(320px,80vw);background:var(--bg-elevated);border-left:1px solid var(--hairline-strong);padding:16px 24px max(32px,env(safe-area-inset-bottom));display:flex;flex-direction:column;gap:4px;height:100%;min-height:0;overscroll-behavior-y:contain;overflow-y:auto;box-shadow:-8px 0 24px #0000000f}.mobile-nav-close{align-self:flex-end;min-width:44px;min-height:44px}.mobile-nav-link{flex-shrink:0;font-family:var(--serif);font-size:17px;padding:12px 4px;color:var(--ink);border-bottom:1px solid var(--hairline)}.mobile-nav-link-with-badge{display:flex;align-items:center;gap:6px}.mobile-nav-link.active{color:var(--accent-text);font-style:italic}.mobile-nav-search{display:flex;align-items:center;gap:10px;width:100%;font-family:var(--sans);font-size:14px;color:var(--ink-faint);background:var(--bg-subtle);border:1px solid var(--hairline);border-radius:6px;padding:10px 12px;margin-bottom:8px;text-align:left}.mobile-nav-search:hover{border-color:var(--hairline-strong);color:var(--ink)}@media (max-width: 980px){.nav,.search-trigger,.app-header .header-feedback-link{display:none}.mobile-menu-btn,.mobile-search-btn{display:inline-flex}}@media (max-width: 640px){.app-header-inner,.brand{gap:8px}.brand-mark{width:20px;height:20px}.brand-name{font-size:18px}.header-bookmark-btn,.header-github-btn{display:none}.app-header .hf-signin-btn{width:36px;height:36px;padding:0;gap:0;justify-content:center;flex-shrink:0}.app-header .hf-signin-btn>span{display:none}}@media (max-width: 880px){.app-header-inner{padding:14px 16px;gap:12px}.page{padding:24px 16px}.layout-with-sidebar{grid-template-columns:minmax(0,1fr);gap:24px}.layout-with-sidebar .sidebar{position:static;top:auto}.layout-with-sidebar .sidebar-section{min-width:0;margin-bottom:0}.layout-with-sidebar .sidebar-links{display:flex;gap:8px;margin:0 -16px;padding:0 16px 2px;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:none}.layout-with-sidebar .sidebar-links::-webkit-scrollbar{display:none}.layout-with-sidebar .sidebar-links .sidebar-link{flex:0 0 auto;margin:0;padding:6px 12px;border:1px solid var(--hairline);border-radius:999px;background:var(--bg-elevated);white-space:nowrap}.detail-title{font-size:28px}}@media (max-width: 640px){.app-header-inner{padding:12px 14px;gap:8px}.page{padding:20px 14px}.layout-with-sidebar .sidebar-links{margin:0 -14px;padding:0 14px 2px}.detail-title{font-size:24px}.brand-name{font-size:17px}}.access-request-page{min-height:100vh;min-height:100svh;display:grid;place-items:center;padding:32px 20px;background:radial-gradient(circle at 50% 8%,color-mix(in srgb,var(--accent-soft) 60%,transparent),transparent 42%),var(--bg)}.access-request-card{width:min(100%,470px);padding:38px;border:1px solid var(--hairline);border-radius:12px;background:color-mix(in srgb,var(--bg-elevated) 94%,transparent);box-shadow:0 20px 60px #1a181414}.access-request-brand{display:inline-flex;align-items:center;gap:10px;margin-bottom:42px;font-family:var(--serif)}.access-request-heading h1,.access-request-success h1{margin-bottom:12px;font-family:var(--serif);font-size:clamp(36px,8vw,48px);font-weight:500;line-height:1;letter-spacing:-.035em}.access-request-heading>p:last-child,.access-request-success p,.access-request-signin>p{color:var(--ink-soft);font-size:15px;line-height:1.65}.access-request-eyebrow{margin-bottom:10px;color:var(--accent-text);font-size:11px;font-weight:700;letter-spacing:.12em;text-transform:uppercase}.access-request-form,.access-request-signin{margin-top:30px}.access-request-form label{display:block;margin-bottom:8px;font-size:12px;font-weight:600}.access-request-input-wrap{display:flex;align-items:center;border:1px solid var(--hairline-strong);border-radius:7px;background:var(--bg);color:var(--ink-faint);transition:border-color .15s,box-shadow .15s}.access-request-input-wrap:focus-within{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-soft)}.access-request-input-wrap>span{padding-left:13px;font-size:15px}.access-request-input-wrap input{width:100%;padding:11px 13px 11px 3px;border:0;outline:0;background:transparent;color:var(--ink);font:500 14px var(--sans)}.access-request-verified{margin-top:7px;color:var(--ink-faint);font-size:11px}.access-request-submit{width:100%;margin-top:20px;padding:12px 18px;border-radius:7px;background:var(--ink);color:var(--bg);font-size:13px;font-weight:600;transition:opacity .15s,transform .15s}.access-request-submit:hover:not(:disabled){transform:translateY(-1px)}.access-request-submit:disabled{cursor:wait;opacity:.6}.access-request-error{margin-top:12px;color:var(--negative-text);font-size:12px}.access-request-status{margin-top:30px;color:var(--ink-soft)}.access-request-signin .hf-signin-btn{margin-top:18px}.access-request-success svg{margin-bottom:24px;color:var(--positive-text)}@media (max-width: 520px){.access-request-card{padding:28px 24px}.access-request-brand{margin-bottom:34px}}.legal-page{max-width:880px;padding-bottom:72px;color:var(--ink-soft);font-family:var(--sans);font-size:15px;line-height:1.7}.legal-header{margin-bottom:34px;padding-bottom:24px;border-bottom:1px solid var(--hairline)}.legal-kicker{margin:0 0 6px;color:var(--accent-text);font-size:11px;font-weight:700;letter-spacing:.1em;text-transform:uppercase}.legal-header h1{margin:0;color:var(--ink);font-family:var(--serif);font-size:clamp(38px,6vw,56px);font-weight:500;letter-spacing:-.025em;line-height:1.05}.legal-effective-date{margin:12px 0 0;color:var(--ink-faint)}.legal-page section{margin-top:34px}.legal-page h2{margin:0 0 10px;color:var(--ink);font-family:var(--serif);font-size:25px;font-weight:600;line-height:1.25}.legal-page h3{margin:22px 0 6px;color:var(--ink);font-size:15px;font-weight:700}.legal-page p{margin:0 0 14px}.legal-page ul{margin:8px 0 16px;padding-left:22px}.legal-page li{margin:7px 0}.legal-page a{color:var(--accent-text);text-decoration:underline}.legal-page strong{color:var(--ink)}.feed-header{display:flex;align-items:flex-end;justify-content:space-between;margin-bottom:32px;gap:24px;flex-wrap:wrap}.feed-title{font-family:var(--serif);font-size:44px;font-weight:500;letter-spacing:-.025em;line-height:1}.feed-title em{font-style:italic;font-weight:400;color:var(--accent)}.feed-subtitle{font-size:13px;color:var(--ink-soft);margin-top:8px;font-family:var(--serif);font-style:italic}.conference-deadlines-link{font-size:16px;color:var(--ink-soft);margin-top:12px}.trend-chart{margin:0;width:100%}.trend-chart-visual{position:relative;min-width:0}.trend-chart-table{margin-top:10px}.feedback-link{display:inline-flex;align-items:center;height:32px;padding:0 12px;border:1px solid var(--hairline);border-radius:6px;background:var(--bg-elevated);color:var(--ink-soft);font-size:13px;font-weight:500;white-space:nowrap;transition:border-color .15s,color .15s,background .15s}.feedback-link:hover{border-color:var(--hairline-strong);background:var(--bg-subtle);color:var(--ink)}.period-switch{display:flex;align-items:center;gap:2px;background:var(--bg-elevated);border:1px solid var(--hairline);border-radius:6px;padding:3px}.period-btn{padding:5px 12px;font-size:12px;font-weight:500;color:var(--ink-soft);border-radius:4px;transition:all .15s}.period-btn.active{background:var(--ink);color:var(--bg)}.period-btn:not(.active):hover{background:var(--bg-subtle);color:var(--ink)}.date-nav{display:flex;align-items:center;gap:12px;font-family:var(--mono);font-size:12px;color:var(--ink-soft)}.date-nav button{width:26px;height:26px;border:1px solid var(--hairline);border-radius:4px;display:flex;align-items:center;justify-content:center;background:var(--bg-elevated)}.date-nav button:hover{background:var(--bg-subtle)}.paper-list{display:flex;flex-direction:column}.paper-card{display:grid;grid-template-columns:170px 1fr;gap:28px;padding:24px 0;border-bottom:1px solid var(--hairline);align-items:stretch}.paper-thumb-wrap{transition:transform .15s;display:flex;align-items:flex-end;justify-content:flex-start}.paper-thumb-wrap:hover{transform:translateY(-2px)}.paper-thumb-skeleton{width:160px;height:220px}.paper-card:first-child{padding-top:0}.paper-rank{font-family:var(--serif);font-size:32px;font-weight:500;color:var(--ink-faint);font-feature-settings:"tnum";line-height:.9;font-style:italic}.paper-body{min-width:0;display:flex;align-items:stretch;gap:28px}.paper-body-main{min-width:0;flex:1}.paper-resources{display:flex;flex-direction:column;justify-content:center;align-items:center;gap:18px;flex:0 0 auto;width:92px;border-left:1px solid var(--hairline);padding-left:20px}.paper-resource{display:flex;flex-direction:column;align-items:center;gap:4px;color:inherit}a.paper-resource.is-link{text-decoration:none;cursor:pointer;border-radius:4px;transition:transform .15s}a.paper-resource.is-link:hover{transform:translateY(-1px)}a.paper-resource.is-link:hover .resource-value{text-decoration:underline;text-underline-offset:2px}a.paper-resource.is-link:focus-visible{outline:2px solid var(--ink);outline-offset:2px}.paper-resource .resource-stat{display:flex;flex-direction:column;align-items:center;gap:2px}.paper-resource .resource-value{display:inline-flex;align-items:center;gap:3px;font-family:var(--mono);font-size:14px;color:var(--ink);font-weight:500;font-variant-numeric:tabular-nums;letter-spacing:-.01em}.paper-resource .resource-label{font-family:var(--mono);font-size:10px;letter-spacing:.06em;text-transform:uppercase;color:var(--ink-faint)}.paper-resource .gh-rate-arrow{color:var(--accent-text);font-size:13px;transform:translateY(-.5px)}.paper-meta-line{display:flex;align-items:center;gap:12px;font-family:var(--mono);font-size:11px;color:var(--ink-faint);margin-bottom:6px}.paper-meta-line .sep{color:var(--hairline-strong)}.paper-follow-reason{font-size:12px;color:var(--ink-faint);margin-bottom:4px}.paper-title{font-family:var(--serif);font-size:22px;font-weight:500;line-height:1.2;letter-spacing:-.015em;margin-bottom:6px;color:var(--ink);cursor:pointer;text-wrap:pretty}.paper-title:hover{color:var(--accent-text)}.paper-organization-logos{display:inline-flex;align-items:center;gap:4px;margin-left:7px;vertical-align:-4px}.paper-organization-logo{display:inline-grid;width:24px;height:24px;flex:0 0 24px;place-items:center;overflow:hidden;border:1px solid var(--hairline);border-radius:4px;background:var(--bg)}.paper-organization-logo:hover{border-color:var(--hairline-strong)}.paper-organization-logo img{width:100%;height:100%;padding:2px;-o-object-fit:contain;object-fit:contain}.paper-authors{font-size:13px;color:var(--ink-soft);margin-bottom:10px;font-family:var(--serif)}.paper-card-author-avatar{width:16px;height:16px;margin-right:4px;vertical-align:-3px}.paper-authors a{color:inherit;text-decoration:none}.paper-authors a:hover{color:var(--accent-text);text-decoration:underline;text-underline-offset:2px}.paper-abstract{font-size:13.5px;color:var(--ink-soft);line-height:1.55;max-height:4.65em;margin-bottom:12px;font-family:var(--serif);text-wrap:pretty;display:-webkit-box;line-clamp:3;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}.paper-title mark,.paper-abstract mark{background:color-mix(in srgb,var(--accent) 24%,transparent);color:inherit;border-radius:2px;padding:0 1px}.search-results-end{padding:24px 0;text-align:center;color:var(--ink-faint);font:11px var(--mono)}.paper-tags{display:flex;flex-wrap:wrap;gap:6px}.paper-tags--clamped{--tag-row-height: 26px;max-height:calc(var(--tag-row-height) * 2 + 6px);overflow:hidden}.paper-sota{position:relative;white-space:nowrap;overflow:hidden;margin-bottom:12px;font-family:var(--mono);font-size:12px;line-height:1.6}.paper-sota-stack{margin-top:16px;padding-top:16px;border-top:1px solid var(--hairline)}.paper-sota-stack .paper-sota{margin-bottom:4px}.paper-sota-stack .paper-sota:last-child{margin-bottom:0}.paper-sota-measure{position:absolute;left:-9999px;top:0;visibility:hidden;white-space:pre;pointer-events:none}.paper-sota-label{font-weight:500;color:var(--ink-faint)}.paper-sota-label--sota{color:#b8860b}.paper-sota-sep,.paper-sota-on{color:var(--ink-faint)}.paper-sota-name{color:var(--accent-text)}.paper-sota-name:hover{text-decoration:underline}.paper-sota-more{font-size:11px;color:var(--ink-faint);cursor:pointer}.paper-sota-more:hover{color:var(--accent-text);text-decoration:underline}.paper-stats{display:flex;flex-direction:column;align-items:flex-end;gap:8px;font-family:var(--mono);font-size:11px;color:var(--ink-soft)}.upvote-btn{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:8px 14px;border:1px solid var(--hairline);border-radius:6px;background:var(--bg-elevated);font-family:var(--mono);font-size:13px;font-weight:500;min-width:56px;transition:all .15s}.upvote-btn:hover{border-color:var(--ink)}.upvote-btn.upvoted{background:var(--accent-soft);border-color:var(--accent);color:var(--accent-text)}.upvote-btn .arrow{font-size:9px;line-height:1;margin-bottom:2px}.upvote-btn .count{font-feature-settings:"tnum"}.stat-line{display:flex;align-items:center;gap:5px}.sort-bar{display:flex;align-items:center;justify-content:space-between;padding-bottom:16px;border-bottom:1px solid var(--hairline);margin-bottom:16px}.sort-options{display:flex;gap:4px}.sort-btn{padding:4px 10px;font-family:var(--mono);font-size:11px;font-weight:500;letter-spacing:.02em;color:var(--ink-soft);border-radius:4px;transition:all .15s;text-transform:lowercase}.sort-btn.active{background:var(--ink);color:var(--bg)}.sort-btn:not(.active):hover{background:var(--bg-subtle);color:var(--ink)}.paper-feed-toolbar-controls,.paper-feed-resource-controls,.paper-feed-filter-options{display:flex;align-items:center}.paper-feed-toolbar-controls{gap:14px;flex-wrap:wrap}.paper-feed-resource-controls{gap:10px}.paper-feed-resource-divider{width:1px;height:22px;background:var(--hairline)}.paper-feed-filter-options{gap:6px;flex-wrap:wrap}.paper-feed-filter{display:inline-flex;align-items:center;gap:6px;min-height:30px;padding:5px 10px;border:1px solid var(--hairline);border-radius:999px;background:var(--bg);color:var(--ink-soft);font-family:var(--mono);font-size:11px;letter-spacing:.01em;cursor:pointer;transition:border-color .15s,background .15s,color .15s}.paper-feed-filter-content{display:inline-flex;align-items:center;gap:6px}.paper-feed-filter:hover{border-color:var(--ink-faint);color:var(--ink)}.paper-feed-filter.active{border-color:var(--ink);background:var(--ink);color:var(--bg)}.paper-feed-filter:focus-visible{outline:2px solid var(--ink);outline-offset:2px}.paper-feed-filter-icon{display:inline-flex;color:currentColor;filter:grayscale(1)}.hf-resource-logo{position:relative;display:inline-flex;width:15px;height:15px}.hf-resource-logo img{position:absolute;top:0;right:0;bottom:0;left:0;display:block;width:15px;height:15px}.hf-resource-logo-white,.paper-feed-filter.active .hf-resource-logo-black{visibility:hidden}.paper-feed-filter.active .hf-resource-logo-white{visibility:visible}.paper-feed-filter-check{display:inline-flex;align-items:center;justify-content:center;width:17px;height:17px;border-radius:50%;background:color-mix(in srgb,var(--bg) 18%,transparent);color:currentColor;font-size:10px;line-height:1}.home-feed-sort-bar{flex-wrap:wrap;row-gap:10px}.results-count{font-family:var(--mono);font-size:11px;color:var(--ink-faint)}.paper-feed-scope-links{margin-top:12px;display:flex;flex-direction:column;align-items:flex-start;gap:8px}.paper-feed-primary-links,.paper-feed-task-tags{display:flex;flex-wrap:wrap;align-items:center;gap:10px}.papers-feed-layout-scoped{display:block}.paper-thumb{display:none}.papers-search-row{display:flex;margin-top:12px;margin-bottom:24px}.papers-search-input-wrap{display:flex;align-items:center;gap:8px;border:1px solid var(--hairline-strong);background:var(--bg-elevated);padding:10px 14px;border-radius:4px;flex:1;max-width:600px;color:var(--ink-faint)}.papers-search-input-wrap:focus-within{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-soft)}.papers-search-input{flex:1;border:none;outline:none;background:transparent;font-family:var(--sans);font-size:14px;color:var(--ink)}.papers-search-input::-moz-placeholder{color:var(--ink-faint)}.papers-search-input::placeholder{color:var(--ink-faint)}@media (max-width: 880px){.feed-title{font-size:32px}.paper-card{grid-template-columns:120px 1fr;gap:16px;padding:20px 0}.paper-body{flex-direction:column;align-items:stretch;gap:12px}.paper-resources{width:auto;flex-direction:row;align-items:center;justify-content:flex-start;gap:24px;border-left:none;border-top:1px solid var(--hairline);padding-left:0;padding-top:12px}.paper-resource{flex-direction:row;gap:8px}.paper-resource .resource-stat{align-items:flex-start}}@media (min-width: 641px) and (max-width: 880px){.paper-thumb-wrap{min-width:0;align-items:flex-start}.paper-thumb-wrap>div{width:100%!important;max-width:120px;height:auto!important;aspect-ratio:160 / 220}.paper-thumb-wrap>div>img,.paper-thumb-wrap>div>svg{width:100%!important;height:100%!important}.paper-thumb-skeleton{width:100%;max-width:120px;height:auto;aspect-ratio:160 / 220}}@media (max-width: 640px){.feed-header{margin-bottom:24px;gap:16px}.feed-title{font-size:26px}.paper-card{grid-template-columns:1fr;gap:12px}.paper-resources{border-top:none;padding-top:0}.paper-thumb-wrap{align-self:flex-start}.paper-card:has(>.paper-thumb-wrap){grid-template-columns:84px minmax(0,1fr);grid-template-rows:auto auto 1fr;-moz-column-gap:14px;column-gap:14px;row-gap:0}.paper-card:has(>.paper-thumb-wrap)>.paper-body,.paper-card:has(>.paper-thumb-wrap) .paper-body-main{display:contents}.paper-card>.paper-thumb-wrap{grid-column:1;grid-row:1 / 4;margin-bottom:12px}.paper-card>.paper-thumb-wrap>div{width:84px!important;height:auto!important;aspect-ratio:160 / 220}.paper-card>.paper-thumb-wrap>div>img,.paper-card>.paper-thumb-wrap>div>svg{width:100%!important;height:100%!important}.paper-card:has(>.paper-thumb-wrap) .paper-follow-reason,.paper-card:has(>.paper-thumb-wrap) .paper-title,.paper-card:has(>.paper-thumb-wrap) .paper-authors{grid-column:2;align-self:start}.paper-card:has(>.paper-thumb-wrap) .paper-abstract,.paper-card:has(>.paper-thumb-wrap) .paper-sota,.paper-card:has(>.paper-thumb-wrap) .paper-tags,.paper-card:has(>.paper-thumb-wrap) .paper-resources{grid-column:1 / -1}.paper-card:has(>.paper-thumb-wrap) .paper-resources{margin-top:12px}.paper-title{font-size:19px}.paper-abstract{max-height:6.2em;-webkit-line-clamp:4;line-clamp:4}}.sort-options-time{margin-left:auto}.sort-btn-time{text-transform:none}@media (max-width: 900px){.sort-bar{flex-wrap:wrap;gap:8px}.sort-options-time{margin-left:0}}@media (max-width: 560px){.paper-feed-resource-divider{display:none}.paper-feed-resource-controls{gap:0}}.paper-date-filter{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:4px}.paper-date-popover{width:min(760px,calc(100vw - 32px));max-width:760px;padding:14px 18px;max-height:calc(100vh - 24px);overflow-y:auto}.paper-date-popover-header{margin-bottom:8px}.paper-date-popover-header h2{margin:0;font-family:var(--serif);font-size:21px}.paper-date-popover-header p{margin:5px 0 0;color:var(--ink-soft)}.paper-date-navigation{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:36px;margin-bottom:-38px;pointer-events:none;position:relative;z-index:1}.paper-date-navigation-group{display:flex;justify-content:space-between}.paper-date-navigation button{pointer-events:auto}.paper-date-navigation button,.paper-date-actions button{border:1px solid var(--hairline);border-radius:6px;background:var(--bg-elevated);color:var(--ink);padding:7px 11px;font:inherit;cursor:pointer}.paper-date-calendars{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:36px}.paper-date-year{display:flex;align-items:center;justify-content:center;gap:8px;margin-bottom:6px;color:var(--ink-soft);font-size:13px;font-weight:600}.paper-date-year input{width:5.5rem;border:1px solid var(--hairline);border-radius:5px;background:var(--bg-elevated);color:var(--ink);padding:5px 7px;font:inherit}.paper-date-year input:focus-visible{outline:2px solid var(--accent);outline-offset:1px}.paper-date-calendar h3{margin:0 0 10px;text-align:center;font-family:var(--serif);font-size:17px}.paper-date-weekdays,.paper-date-days{display:grid;grid-template-columns:repeat(7,minmax(0,1fr))}.paper-date-weekdays span{padding:3px 0 4px;color:var(--ink-faint);text-align:center;font-size:11px;font-weight:600}.paper-date-day{width:28px;height:28px;justify-self:center;border:0;border-radius:999px;background:transparent;color:var(--ink);font:inherit;cursor:pointer}.paper-date-day:hover:not(:disabled),.paper-date-day:focus-visible{background:var(--bg-subtle);outline:2px solid var(--accent);outline-offset:-2px}.paper-date-day.in-range{border-radius:0;background:color-mix(in srgb,var(--accent) 14%,transparent)}.paper-date-day.selected{background:var(--accent);color:#fff;font-weight:700}.paper-date-day.today:not(.selected){box-shadow:inset 0 0 0 1px var(--accent)}.paper-date-day:disabled{color:var(--ink-faint);cursor:not-allowed;opacity:.42}.paper-date-day.outside{visibility:hidden}.paper-date-actions{display:flex;align-items:center;justify-content:space-between;gap:12px;padding-top:10px;border-top:1px solid var(--hairline)}.paper-date-actions>div{display:flex;gap:8px}.paper-date-actions .paper-date-clear{border-color:transparent;color:var(--ink-soft)}.paper-date-actions .paper-date-apply{border-color:var(--accent);background:var(--accent);color:#fff}.paper-date-actions button:disabled{cursor:not-allowed;opacity:.45}.paper-date-filter-single-calendar{justify-content:flex-start}.paper-date-popover-single-calendar{width:calc(100vw - 20px);padding:20px 14px}.paper-date-popover-single-calendar .paper-date-calendars,.paper-date-popover-single-calendar .paper-date-navigation{display:block}.paper-date-popover-single-calendar .paper-date-day{width:36px;height:36px}.organization-hero{display:grid;grid-template-columns:minmax(260px,.34fr) minmax(0,1fr);align-items:center;gap:48px;margin:24px 0 32px}.organization-hero-profile{min-width:0}.organization-hero-title{display:flex;align-items:center;gap:14px}.organization-hero-title img{flex:none;-o-object-fit:contain;object-fit:contain}.feed-title.organization-hero-title--long{font-size:30px;line-height:1.1}.organization-hero-name{min-width:0}.organization-hero-full-name{display:block;margin-top:8px;color:var(--ink-soft);font-size:18px;letter-spacing:-.01em;line-height:1.25}.organization-hero-monogram{display:grid;flex:none;place-items:center;width:58px;height:58px;border:1px solid var(--hairline);border-radius:6px;background:var(--bg-elevated);color:var(--accent-text);font-size:30px;line-height:1}.organization-hero-links{display:flex;flex-wrap:wrap;gap:12px;margin-top:12px}.organization-contributions{width:100%;min-width:0}.organization-contributions-header{margin-bottom:12px}.organization-contributions-title{font-family:var(--serif);font-size:20px;font-weight:600;line-height:1.2}.organization-contributions-summary{margin-top:3px;color:var(--ink-soft);font-size:12px}.organization-contributions-legend{display:flex;align-items:center;justify-content:flex-start;gap:4px;margin-top:8px;color:var(--ink-faint);font-family:var(--mono);font-size:10px;white-space:nowrap}.organization-contributions-legend span:first-child{margin-right:3px}.organization-contributions-legend span:last-child{margin-left:3px}.organization-contributions-scroll{width:calc(100% + 34px);max-width:none;margin-left:-34px;overflow-x:auto;padding:2px 0;scrollbar-width:thin;scrollbar-color:var(--hairline-strong) transparent}.organization-contributions-plot{display:grid;grid-template-columns:25px auto;gap:9px;margin:0}.organization-contributions-weekdays{display:grid;grid-template-rows:repeat(7,12px);gap:3px;padding-top:24px;color:var(--ink-faint);font-family:var(--mono);font-size:9px;line-height:12px;text-align:right}.organization-contributions-months{display:grid;gap:3px;height:20px;color:var(--ink-faint);font-family:var(--mono);font-size:9px;line-height:12px}.organization-contributions-months span{grid-row:1;white-space:nowrap}.organization-contributions-grid{display:grid;grid-template-rows:repeat(7,12px);grid-auto-flow:column;gap:3px}.organization-contribution-cell{display:block;width:12px;height:12px;border:1px solid color-mix(in srgb,var(--hairline) 78%,transparent);border-radius:2px;background:var(--bg-subtle)}.organization-contribution-cell.level-1{border-color:color-mix(in srgb,var(--positive-border) 60%,transparent);background:color-mix(in srgb,var(--positive-bg) 65%,var(--positive-border))}.organization-contribution-cell.level-2{border-color:transparent;background:color-mix(in srgb,var(--positive-text) 35%,var(--positive-bg))}.organization-contribution-cell.level-3{border-color:transparent;background:color-mix(in srgb,var(--positive-text) 60%,var(--positive-bg))}.organization-contribution-cell.level-4{border-color:transparent;background:var(--positive-text)}.organization-contribution-cell.is-outside{visibility:hidden}.organization-contributions-skeleton{width:100%;height:154px;border-radius:6px}@media (max-width: 960px){.organization-hero{grid-template-columns:1fr;align-items:start;gap:28px}.organization-contributions-plot{margin:0 auto}.organization-contributions-scroll{width:100%;max-width:100%;margin-left:0}.organization-contributions-legend{justify-content:center;width:min(100%,826px);margin:8px auto 0}}@media (max-width: 640px){.organization-hero{margin-bottom:28px}.feed-title.organization-hero-title--long{font-size:22px}.organization-hero-full-name{font-size:15px}.organization-contributions{max-width:calc(100vw - 28px)}}.author-hero{margin:8px 0 20px}.author-hero-title{display:flex;align-items:center;gap:20px}.author-avatar{display:block;width:96px;height:96px}@media (max-width: 640px){.author-avatar{width:64px;height:64px}}.author-photo{display:flex;flex:none;flex-direction:column;align-items:center;gap:4px;max-width:120px;margin:0}.author-photo figcaption{color:var(--ink-soft);font-size:10px;line-height:1.3;text-align:center}.author-photo figcaption a{color:inherit}.author-hero .feed-subtitle a{color:var(--accent-text);text-decoration:none}.author-hero .feed-subtitle a:hover{text-decoration:underline;text-underline-offset:2px}.tag-chip{display:inline-flex;align-items:center;gap:5px;padding:3px 9px;font-family:var(--mono);font-size:11px;font-weight:500;border-radius:4px;cursor:pointer;transition:filter .15s,transform .15s;white-space:nowrap;border:1px solid transparent}.tag-chip:hover{filter:brightness(.96);transform:translateY(-1px)}.tag-chip .dot{width:5px;height:5px;border-radius:50%}.paper-tags--clamped .tag-chip{line-height:16px}.tag-hero{padding:48px 0 32px;border-bottom:1px solid var(--hairline);margin-bottom:32px}.tag-hero-eyebrow{font-family:var(--mono);font-size:11px;letter-spacing:.12em;text-transform:uppercase;color:var(--ink-faint);margin-bottom:12px;display:flex;align-items:center;gap:8px}.tag-hero-title{font-family:var(--serif);font-size:56px;font-weight:500;letter-spacing:-.025em;line-height:1;margin-bottom:16px;overflow-wrap:break-word}.tag-hero-meta{display:flex;gap:32px;margin-top:24px;font-family:var(--mono);font-size:12px;color:var(--ink-soft)}.tag-hero-meta .stat{display:flex;flex-direction:column;gap:4px}.tag-hero-meta .stat .label{font-size:10px;letter-spacing:.1em;text-transform:uppercase;color:var(--ink-faint)}.tag-hero-meta .stat .value{font-family:var(--serif);font-size:22px;font-weight:500;color:var(--ink)}.tag-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:0;border-top:1px solid var(--hairline)}.tag-cell{padding:20px 24px;border-bottom:1px solid var(--hairline);border-right:1px solid var(--hairline);cursor:pointer;transition:background .15s;display:flex;flex-direction:column;gap:8px}.tag-cell:nth-child(3n){border-right:none}.tag-cell:hover{background:var(--bg-elevated)}.tag-cell .name{font-family:var(--serif);font-size:18px;font-weight:500;display:flex;align-items:center;gap:8px}.tag-cell .name .dot{width:8px;height:8px;border-radius:50%}.tag-cell .name .task-icon{flex:none;display:inline-flex;align-items:center;justify-content:center;width:30px;height:30px;border-radius:9px;background:color-mix(in oklch,currentColor 14%,transparent);transition:transform .2s ease}.tag-cell:hover .name .task-icon{transform:rotate(-8deg) scale(1.1)}.tag-cell .meta{font-family:var(--mono);font-size:11px;color:var(--ink-faint);display:flex;gap:12px}.taxonomy-trending{margin-bottom:48px;scroll-margin-top:80px}.taxonomy-trending-header{padding-bottom:12px;border-bottom:1px solid var(--hairline-strong)}.taxonomy-trending-header h2{display:flex;align-items:center;gap:10px;margin-bottom:4px;font-family:var(--serif);font-size:26px;font-weight:500;letter-spacing:-.02em}.taxonomy-trending-header h2 svg{color:var(--accent-text)}.taxonomy-trending-note{margin:0;font-family:var(--serif);font-style:italic;font-size:13px;color:var(--ink-soft)}.taxonomy-trending-rank{min-width:1.6em;font-family:var(--mono);font-size:11px;font-style:normal;color:var(--ink-faint)}.taxonomy-trending-meta{flex-wrap:wrap}.taxonomy-trending-lift{display:inline-flex;align-items:center;gap:3px}.tag-hero-meta .stat .value small{margin-left:2px;font-family:var(--mono);font-size:10px;font-weight:500;color:var(--ink-faint)}.framework-category{margin-top:32px}.framework-category-head{display:flex;align-items:flex-start;justify-content:space-between;gap:24px;margin-bottom:16px}.framework-category-blurb{font-family:var(--serif);font-size:14px;line-height:1.55;color:var(--ink-soft);max-width:720px;margin:0}.framework-category-meta{font-family:var(--mono);font-size:11px;color:var(--ink-faint);white-space:nowrap}.framework-guide-link{display:inline-block;margin-top:8px;font-family:var(--mono);font-size:11px;color:var(--accent-text);text-decoration:none}.framework-guide-link:hover{text-decoration:underline}.framework-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:14px}.framework-card{border:1px solid var(--hairline);background:var(--bg-elevated);border-radius:6px;padding:18px 22px;scroll-margin-top:24px;display:flex;flex-direction:column;gap:12px;transition:border-color .15s}.framework-card:hover{border-color:var(--ink)}.framework-card-clickable{cursor:pointer}.framework-card-clickable:focus-visible{border-color:var(--ink);outline:2px solid var(--accent);outline-offset:2px}.framework-card-head{display:flex;justify-content:space-between;align-items:flex-start;gap:16px}.framework-card-name{font-family:var(--serif);font-size:20px;font-weight:500;letter-spacing:-.01em;margin:0;color:var(--ink)}.framework-card-org{font-family:var(--mono);font-size:11px;color:var(--ink-faint);margin-top:4px}.framework-platform-row{display:flex;flex-wrap:wrap;gap:6px;justify-content:flex-end}.framework-platform-chip{font-family:var(--mono);font-size:10px;letter-spacing:.03em;text-transform:uppercase;padding:3px 8px;border-radius:3px;white-space:nowrap}.framework-card-desc{font-family:var(--sans);font-size:14px;line-height:1.55;color:var(--ink-soft);margin:0}.framework-card-when{font-family:var(--serif);font-style:italic;font-size:13px;line-height:1.5;color:var(--ink-soft);padding-top:4px;border-top:1px solid var(--hairline)}.framework-card-when-label{display:block;font-family:var(--mono);font-size:10px;font-style:normal;letter-spacing:.06em;text-transform:uppercase;color:var(--ink-faint);margin-bottom:4px}.framework-card-links{display:flex;flex-wrap:wrap;gap:10px;margin-top:auto}.framework-link{display:inline-flex;align-items:center;gap:6px;font-family:var(--mono);font-size:11px;color:var(--accent-text);text-decoration:none;padding:4px 10px;border:1px solid var(--hairline);border-radius:4px;transition:border-color .15s,background .15s}.framework-link:hover{border-color:var(--ink);background:var(--bg-subtle)}.framework-link-disabled,.framework-link-disabled:hover{color:var(--ink-faint);background:transparent;border-color:var(--hairline);cursor:not-allowed}@media (max-width: 880px){.tag-grid{grid-template-columns:repeat(2,1fr)}.tag-cell:nth-child(3n){border-right:1px solid var(--hairline)}.tag-cell:nth-child(2n){border-right:none}.framework-category-head{flex-direction:column;gap:8px}.framework-card-head{flex-direction:column;gap:10px}.framework-platform-row{justify-content:flex-start}.tag-hero-title{font-size:40px}}@media (max-width: 640px){.tag-hero{padding:32px 0 24px;margin-bottom:24px}.tag-hero-title{font-size:30px}.tag-grid{grid-template-columns:1fr}.tag-cell{padding:16px;border-right:none!important}.framework-grid{grid-template-columns:1fr}.tag-hero-meta{gap:20px;flex-wrap:wrap}}.task-hero-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(320px,480px);gap:48px;align-items:start}@media (min-width: 1200px){.task-hero-grid--wide{grid-template-columns:minmax(0,1fr) minmax(320px,720px)}}.task-figure-card{background:var(--bg-elevated);border:1px solid var(--hairline);border-radius:6px;padding:16px 16px 12px;margin:0;box-shadow:0 1px #00000005}.task-figure-img-wrap{width:100%;background:var(--bg);border-radius:4px;overflow:hidden;line-height:0}.task-figure-img{width:100%;height:auto;display:block}.task-figure-card--compact .task-figure-img{width:50%;margin:0 auto}.task-figure-card figcaption{font-family:var(--serif);font-style:italic;font-size:12px;color:var(--ink-faint);text-align:center;margin-top:10px;border-top:1px solid var(--hairline);padding-top:10px}.task-image-credit{color:var(--ink-faint);font-family:var(--mono);font-size:10px;font-style:normal}.task-image-credit p{margin:0}.task-image-credit a{color:inherit;text-decoration:underline;text-underline-offset:2px}.task-image-credit a:hover{color:var(--accent-text)}@media (max-width: 900px){.task-hero-grid{grid-template-columns:1fr;gap:24px}}.taxonomy-suggestion-cell{-webkit-appearance:none;-moz-appearance:none;appearance:none;width:100%;border-top:0;border-left:0;background:transparent;color:var(--ink-soft);text-align:left}.taxonomy-suggestion-cell .name{font-style:italic}.taxonomy-suggestion-icon{width:14px;height:14px}.task-page-grid{display:grid;grid-template-columns:1fr 260px;gap:56px;align-items:start}.task-featured-collection{display:grid;grid-template-columns:1fr auto;gap:4px 24px;align-items:center;margin-top:32px;padding:18px 24px;border:1px solid var(--hairline);border-left:3px solid var(--accent);border-radius:6px;background:var(--bg-elevated);color:var(--ink);text-decoration:none;transition:border-color .15s}.task-featured-collection:hover{border-color:var(--accent)}.task-featured-collection-eyebrow{grid-column:1;font-family:var(--mono);font-size:10px;font-weight:600;letter-spacing:.12em;text-transform:uppercase;color:var(--accent-text)}.task-featured-collection strong{grid-column:1;font-family:var(--serif);font-size:22px;line-height:1.2}.task-featured-collection-description{grid-column:1;color:var(--ink-soft);font-size:14px;line-height:1.45}.task-featured-collection-meta{grid-column:2;grid-row:1 / span 3;display:inline-flex;align-items:center;gap:6px;font-family:var(--mono);font-size:11px;letter-spacing:.08em;text-transform:uppercase;color:var(--accent-text);white-space:nowrap}.medical-ai-hub{margin-top:32px;padding:24px;border:1px solid var(--hairline);border-top:3px solid var(--accent);border-radius:6px;background:var(--bg-elevated)}.medical-ai-hub-heading>span,.medical-ai-hub-card-eyebrow{display:block;font-family:var(--mono);font-size:10px;font-weight:600;letter-spacing:.12em;text-transform:uppercase;color:var(--accent-text)}.medical-ai-hub-heading h2{margin:6px 0 4px;font-family:var(--serif);font-size:26px;line-height:1.2;color:var(--ink)}.medical-ai-hub-heading p{margin:0;color:var(--ink-soft);font-size:14px}.medical-ai-hub-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-top:20px}.medical-ai-hub-card{display:flex;min-width:0;min-height:176px;flex-direction:column;padding:16px;border:1px solid var(--hairline);border-radius:5px;background:var(--bg);color:var(--ink);text-decoration:none;transition:border-color .15s,transform .15s}.medical-ai-hub-card:hover{border-color:var(--accent);transform:translateY(-2px)}.medical-ai-hub-card strong{margin-top:10px;font-family:var(--serif);font-size:18px;line-height:1.2}.medical-ai-hub-card-description{margin-top:8px;color:var(--ink-soft);font-size:13px;line-height:1.45}.medical-ai-hub-card-meta{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:auto;padding-top:16px;font-family:var(--mono);font-size:10px;letter-spacing:.04em;text-transform:uppercase;color:var(--ink-faint)}.task-explainer{font-family:var(--serif);font-size:17px;line-height:1.55;color:var(--ink);max-width:720px;margin-top:16px;margin-bottom:28px;text-wrap:pretty}.task-explainer p{margin:0 0 12px}.task-explainer p:last-child{margin-bottom:0}.task-explainer a{color:var(--accent-text);text-decoration:underline;text-underline-offset:2px;text-decoration-thickness:1px}.task-explainer a:hover{color:var(--accent)}.task-explainer strong{color:var(--ink);font-weight:600}.task-explainer em{font-style:italic}.task-explainer code{font-family:var(--mono);font-size:.9em;background:var(--bg-elevated);padding:1px 5px;border-radius:3px}.task-quickstats{display:flex;gap:28px;font-family:var(--mono);font-size:11px;color:var(--ink-faint);letter-spacing:.05em;padding-bottom:14px;margin-bottom:0;border-bottom:1px solid var(--accent)}.task-quickstats .num{color:var(--ink);font-weight:600;font-size:12px;margin-right:5px;font-feature-settings:"tnum"}.task-framework-links{display:flex;flex-wrap:wrap;align-items:center;gap:8px 12px;margin-top:14px}.task-framework-links-label{font-family:var(--mono);font-size:10px;letter-spacing:.12em;text-transform:uppercase;color:var(--ink-faint);font-weight:600}.task-framework-link{display:inline-flex;align-items:center;gap:6px;font-family:var(--mono);font-size:12px;color:var(--ink);text-decoration:none;padding:4px 10px;border:1px solid var(--hairline);border-radius:999px;background:var(--bg-elevated);transition:color .15s,border-color .15s}.task-framework-link:hover{color:var(--accent-text);border-color:var(--accent)}.task-framework-link-stars{color:var(--ink-faint);font-size:11px}.task-side{position:sticky;top:100px;font-size:13px}.side-block{margin-bottom:28px}.side-block-num{font-family:var(--mono);font-size:10px;color:var(--accent-text);letter-spacing:.1em;margin-bottom:4px}.side-block-label{font-family:var(--mono);font-size:12px;letter-spacing:.12em;text-transform:uppercase;color:var(--ink);font-weight:600;padding-bottom:8px;border-bottom:1px solid var(--hairline);margin-bottom:10px}.side-link-row{display:flex;justify-content:space-between;align-items:baseline;padding:5px 0;cursor:pointer;font-family:var(--serif);font-size:14px}.side-link-row:hover{color:var(--accent-text)}.side-link-row .count{font-family:var(--mono);font-size:11px;color:var(--ink-faint)}.side-domain-pill{font-family:var(--mono);font-size:11px;color:var(--accent-text);padding:6px 0}.side-method-row{display:flex;justify-content:space-between;align-items:center;padding:4px 0}.side-method-row .num{font-family:var(--mono);font-size:10.5px;color:var(--ink-faint)}.task-section-head{scroll-margin-top:96px;margin-top:28px;margin-bottom:14px}.task-section-eyebrow{font-family:var(--mono);font-size:10px;letter-spacing:.12em;text-transform:uppercase;color:var(--accent-text);margin-bottom:6px}.task-section-title{font-family:var(--mono);font-size:18px;font-weight:600;color:var(--ink);letter-spacing:.04em;text-transform:uppercase;display:flex;align-items:baseline;gap:10px}.task-section-title .meta{font-family:var(--mono);font-size:11px;color:var(--ink-faint);font-weight:400;letter-spacing:.05em;text-transform:none}.subtask-section{margin-bottom:24px}.subtask-section+.subtask-section{margin-top:8px}.subtask-head{display:flex;align-items:baseline;gap:10px;margin:18px 0 10px}.subtask-head-name{font-family:var(--mono);font-size:14px;font-weight:600;color:var(--ink);letter-spacing:.04em;text-transform:uppercase;text-decoration:none;transition:color .15s}.subtask-head-name:hover{color:var(--accent-text)}.subtask-head-meta{font-family:var(--mono);font-size:11px;color:var(--ink-faint);letter-spacing:.05em}.subtask-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;align-items:start}.subtask-grid .subtask-section{margin-bottom:0;border:1px solid var(--hairline);background:var(--bg-elevated);border-radius:6px;padding:12px 14px 10px}.subtask-grid .subtask-section+.subtask-section{margin-top:0}.subtask-grid .subtask-head{margin:0 0 8px;padding-bottom:8px;border-bottom:1px solid var(--hairline)}.subtask-grid .subtask-head-name{font-size:12px}.subtask-grid .subtask-head-meta{font-size:10px}.subtask-summary{display:flex;flex-direction:column;gap:7px;min-height:86px;color:var(--ink-soft);text-decoration:none;font-family:var(--mono);font-size:10px;line-height:1.4;letter-spacing:.05em;text-transform:uppercase}.subtask-summary:hover{color:var(--ink)}.subtask-summary-desc{display:-webkit-box;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:3;font-family:var(--serif);font-size:13px;line-height:1.35;letter-spacing:0;text-transform:none;color:var(--ink-soft)}.subtask-grid .bench-row{display:grid;grid-template-columns:22px 1fr 16px;gap:10px;align-items:center;border:0;background:transparent;border-radius:0;padding:8px 0;margin-bottom:0;border-bottom:1px dashed var(--hairline);transition:none}.subtask-grid .bench-row:last-of-type{border-bottom:0}.subtask-grid .bench-row:hover{border-color:transparent}.subtask-grid .bench-row:hover .bench-row-name{color:var(--accent-text)}.subtask-grid .bench-row-num{font-size:10px}.subtask-grid .bench-row-name{font-size:13.5px;margin-bottom:2px;line-height:1.2}.subtask-grid .bench-row-sub{font-size:9.5px;letter-spacing:.06em}.subtask-grid .bench-row-arrow{font-size:14px}.subtask-grid .bench-show-more{font-size:10px;padding:6px 0 0;margin-top:2px}.bench-card{border:1px solid var(--hairline);background:var(--bg-elevated);border-radius:6px;padding:18px 22px;margin-bottom:14px;cursor:pointer;transition:border-color .15s}.bench-card:hover{border-color:var(--ink)}.bench-head{display:flex;justify-content:space-between;align-items:baseline;margin-bottom:14px;gap:16px}.bench-name{font-family:var(--mono);font-size:14px;font-weight:600;letter-spacing:.02em;text-transform:uppercase;color:var(--ink)}.bench-sub{font-family:var(--mono);font-size:10px;letter-spacing:.1em;text-transform:uppercase;color:var(--ink-faint);margin-top:4px}.bench-sota-value{font-family:var(--serif);font-size:36px;font-weight:500;color:var(--accent);font-feature-settings:"tnum";line-height:1}.bench-sota-tag{font-family:var(--mono);font-size:10px;letter-spacing:.08em;text-transform:uppercase;color:var(--ink-faint);text-align:right;margin-top:4px}.bench-task-tag{font-family:var(--mono);font-size:10px;letter-spacing:.08em;text-transform:uppercase;color:var(--accent-text)}.domain-mega-title{font-family:var(--mono);font-size:56px;font-weight:600;letter-spacing:-.01em;line-height:1;text-transform:uppercase;margin-bottom:0;color:var(--ink);overflow-wrap:break-word}.benchmark-trend-table{border-top:1px solid var(--hairline)}.benchmark-trend-head,.benchmark-trend-row{display:grid;grid-template-columns:124px minmax(150px,.8fr) minmax(150px,.9fr) minmax(200px,1.3fr) 44px 78px;gap:20px;align-items:center}.benchmark-trend-head{padding:9px 16px;border-bottom:1px solid var(--hairline);font-family:var(--mono);font-size:9.5px;font-weight:600;letter-spacing:.1em;text-transform:uppercase;color:var(--ink-faint)}.benchmark-trend-row{min-height:92px;padding:12px 16px;border-bottom:1px solid var(--hairline);background:transparent;transition:background .15s,border-color .15s}.benchmark-trend-row:hover{background:var(--bg-elevated);border-color:var(--hairline-strong)}.benchmark-trend-row:hover .bench-row-name{color:var(--accent-text)}.benchmark-trend-cell{min-width:0}.benchmark-trend-sparkline{display:block;width:112px;height:42px;overflow:visible}.benchmark-trend-axis{stroke:var(--hairline-strong);stroke-width:.8;stroke-dasharray:1.5 2.5;vector-effect:non-scaling-stroke}.benchmark-trend-area{fill:var(--accent-soft);opacity:.68}.benchmark-trend-line{fill:none;stroke:var(--accent);stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round;vector-effect:non-scaling-stroke}.benchmark-trend-dot{fill:var(--bg-elevated);stroke:var(--accent);stroke-width:1.8;vector-effect:non-scaling-stroke}.benchmark-trend-point{cursor:crosshair;outline:none}.benchmark-trend-point-hit{fill:transparent}.benchmark-trend-point-mark{fill:var(--bg-elevated);stroke:var(--accent);stroke-width:1.25;opacity:0;transition:opacity .12s,r .12s;vector-effect:non-scaling-stroke}.benchmark-trend-point:hover .benchmark-trend-point-mark,.benchmark-trend-point:focus .benchmark-trend-point-mark{opacity:1;r:2.3px}.benchmark-trend-tooltip rect{fill:var(--ink);opacity:.94}.benchmark-trend-tooltip text{fill:var(--bg);font-family:var(--mono);font-size:3.2px;letter-spacing:.01em}.benchmark-trend-tooltip .benchmark-trend-tooltip-value{font-weight:700}.benchmark-trend-meta{display:flex;align-items:center;gap:6px;margin-top:3px;font-family:var(--mono);font-size:8.5px;letter-spacing:.035em;color:var(--ink-faint);white-space:nowrap}.benchmark-trend-meta strong{color:var(--ink-soft);font-weight:600}.benchmark-trend-change{padding:1px 4px;border-radius:999px;font-size:8px;font-weight:600}.benchmark-trend-change.is-up,.benchmark-trend-change.is-new{color:var(--positive-text);background:var(--positive-bg)}.benchmark-trend-change.is-down{color:var(--negative-text);background:var(--negative-bg)}.benchmark-trend-benchmark{min-width:0}.benchmark-trend-row .bench-row-name{display:block;margin-bottom:5px}.benchmark-trend-row .bench-row-best{width:100%;justify-content:flex-start;text-align:left}.bench-row-best-empty{color:var(--ink-faint);font-family:var(--mono)}.bench-row-paper{min-width:0;font-family:var(--serif);font-size:14px;line-height:1.35}.bench-row-paper a{color:var(--accent-text)}.bench-row-paper a:hover{text-decoration:underline}.bench-row-code{display:flex;justify-content:center}.bench-row-code a{display:inline-flex;color:var(--ink-soft);transition:color .15s,transform .15s}.bench-row-code a:hover{color:var(--accent-text);transform:translateY(-1px)}.bench-row-compare{display:flex;justify-content:center}.bench-row-compare a{display:inline-flex;align-items:center;justify-content:center;gap:5px;min-height:30px;padding:0 10px;border:1px solid var(--accent);border-radius:999px;color:var(--accent-text);font-family:var(--mono);font-size:9px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;white-space:nowrap;transition:color .15s,background .15s}.bench-row-compare a svg{transition:transform .15s}.bench-row-compare a:hover{color:var(--bg);background:var(--accent)}.bench-row-compare a:hover svg{transform:translate(2px)}.bench-row-compare a:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.bench-row{display:grid;grid-template-columns:36px 1fr auto 28px;gap:18px;align-items:center;padding:16px 18px;border:1px solid var(--hairline);background:var(--bg-elevated);border-radius:6px;margin-bottom:8px;cursor:pointer;transition:border-color .15s,transform .15s}.bench-row:hover{border-color:var(--ink)}.bench-row:hover .bench-row-arrow{color:var(--accent-text);transform:translate(3px)}.bench-row-num{font-family:var(--mono);font-size:11px;color:var(--ink-faint);letter-spacing:.05em;font-feature-settings:"tnum"}.bench-row-name{font-family:var(--serif);font-size:18px;font-weight:500;color:var(--ink);letter-spacing:-.005em;margin-bottom:4px}.bench-row-sub{display:flex;align-items:center;gap:8px;font-family:var(--mono);font-size:10px;letter-spacing:.08em;text-transform:uppercase;color:var(--ink-faint)}.bench-row-sub strong{color:var(--ink-soft);font-weight:600}.bench-row-variants{display:flex;flex-wrap:wrap;gap:4px;margin:2px 0 6px}.bench-row-variant{font-family:var(--mono);font-size:9.5px;letter-spacing:.02em;white-space:nowrap;padding:1px 5px;border:1px solid var(--hairline);border-radius:3px;background:transparent;color:var(--ink-faint);cursor:pointer;transition:border-color .15s,color .15s}.bench-row-variant:hover{border-color:var(--ink);color:var(--ink)}.bench-row-variant[aria-pressed=true]{border-color:var(--accent);color:var(--accent-text)}.bench-row-variant:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.bench-row-sub .dot-sep{color:var(--hairline-strong)}.bench-row-sota{text-align:right}.bench-row-sota-value{font-family:var(--serif);font-size:22px;font-weight:500;color:var(--accent-text);font-feature-settings:"tnum";line-height:1}.bench-row-sota-tag{font-family:var(--mono);font-size:9.5px;letter-spacing:.08em;text-transform:uppercase;color:var(--ink-faint);margin-top:4px}.bench-row-arrow{font-family:var(--serif);font-size:18px;color:var(--hairline-strong);text-align:center;transition:color .15s,transform .15s}.bench-row-best{display:flex;align-items:center;justify-content:flex-end;gap:6px;max-width:240px;text-align:right}.bench-row-best-icon{color:var(--accent-text);flex:0 0 auto}.bench-row-best-name{font-family:var(--serif);font-size:14px;color:var(--ink-soft);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.bench-show-more{font-family:var(--mono);font-size:11px;letter-spacing:.05em;color:var(--ink-faint);background:transparent;border:0;padding:8px 2px 2px;margin-top:4px;cursor:pointer;text-transform:lowercase;transition:color .15s}.bench-show-more:hover{color:var(--accent-text)}.bm-action-btn{display:inline-flex;align-items:center;gap:8px;padding:8px 14px;border:1px solid var(--hairline);border-radius:6px;background:var(--bg-elevated);font-family:var(--sans);font-size:13px;font-style:normal;color:var(--ink);cursor:pointer;transition:border-color .15s}.bm-action-btn:hover{border-color:var(--ink)}.bm-action-btn svg{display:block}@media (max-width: 880px){.task-page-grid{grid-template-columns:1fr;gap:32px}.task-side{position:static;top:auto;order:-1}.subtask-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.medical-ai-hub-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.domain-mega-title{font-size:40px}.bench-row{grid-template-columns:28px 1fr auto;gap:12px;padding:14px}.bench-row>.bench-row-arrow{display:none}.bench-row-best{max-width:130px}.bench-row-best-name{font-size:12.5px}.benchmark-trend-head,.benchmark-trend-row{grid-template-columns:112px minmax(130px,.8fr) minmax(120px,.8fr) minmax(160px,1.2fr) 36px 72px;gap:14px}.benchmark-trend-sparkline{width:104px}}@media (max-width: 640px){.domain-mega-title{font-size:30px}.subtask-grid{grid-template-columns:1fr}.medical-ai-hub{padding:18px}.task-featured-collection{grid-template-columns:1fr;padding:16px 18px}.task-featured-collection-meta{grid-column:1;grid-row:auto;margin-top:8px}.medical-ai-hub-grid{grid-template-columns:1fr}.medical-ai-hub-card{min-height:0}.benchmark-trend-head{display:none}.benchmark-trend-row{grid-template-columns:100px minmax(0,1fr) 28px;grid-template-areas:"trend benchmark code" "trend best code" "trend paper paper" "trend compare compare";gap:4px 12px;min-height:120px;padding:12px 4px}.benchmark-trend-cell{grid-area:trend}.benchmark-trend-benchmark{grid-area:benchmark}.benchmark-trend-row .bench-row-best{grid-area:best;justify-content:flex-start;max-width:none;text-align:left}.benchmark-trend-row .bench-row-paper{grid-area:paper}.benchmark-trend-row .bench-row-code{grid-area:code}.benchmark-trend-row .bench-row-compare{grid-area:compare;justify-content:flex-start;margin-top:4px}.bench-row-compare a{min-height:26px;padding:0 9px;font-size:8.5px}.benchmark-trend-sparkline{width:96px}.benchmark-trend-meta{flex-wrap:wrap;gap:3px;white-space:normal}.task-quickstats{flex-wrap:wrap;gap:16px}}.paper-meta-line .arxiv-id{color:var(--accent-text)}.paper-authors .institution{font-style:italic;color:var(--ink-faint)}.paper-tags--clamped .method-chip{line-height:16px}.method-hero-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(360px,560px);gap:48px;align-items:start}.tag-hero.method-hero-grid{padding:8px 0 28px;margin-bottom:24px}.method-hero-grid .tag-hero-eyebrow{margin-bottom:8px}.method-hero-grid .research-follow{margin:12px 0 10px}.method-hero-grid .tag-hero-meta{margin-top:20px}.method-hero-grid--wide-figure{grid-template-columns:minmax(0,1fr) minmax(480px,640px)}.method-figure-card{background:var(--bg-elevated);border:1px solid var(--hairline);border-radius:6px;padding:16px 16px 12px;margin:0;box-shadow:0 1px #00000005;align-self:start}.method-figure-svg{width:100%;display:block}.method-figure-svg--schematic{aspect-ratio:360 / 420}.method-figure-img{width:100%;height:auto;display:block}.method-figure-svg--compact .method-figure-img{width:50%;margin:0 auto}.method-figure-svg--scaled-80 .method-figure-img{width:80%;margin:0 auto}.method-figure-card figcaption{font-family:var(--serif);font-style:italic;font-size:12px;color:var(--ink-faint);text-align:center;margin-top:10px;border-top:1px solid var(--hairline);padding-top:10px}.method-image-credit{color:var(--ink-faint);font-family:var(--mono);font-size:10px;font-style:normal}.method-image-credit p{margin:0}.method-image-credit a{color:inherit;text-decoration:underline;text-underline-offset:2px}.method-image-credit a:hover{color:var(--accent-text)}.method-description{font-family:var(--serif);font-size:17px;color:var(--ink-soft);max-width:720px;line-height:1.6;margin-top:12px;text-wrap:pretty}.method-description p{margin:0 0 12px}.method-description p:last-child{margin-bottom:0}.method-description a{color:var(--accent-text);text-decoration:underline;text-underline-offset:2px;text-decoration-thickness:1px}.method-description a:hover{color:var(--accent)}.method-description strong{color:var(--ink);font-weight:600}.method-description code{font-family:var(--mono);font-size:.9em;background:var(--bg-elevated);padding:1px 5px;border-radius:3px}.method-description ul,.method-description ol{padding-left:22px;margin:0 0 12px}.method-description ul{list-style-type:disc}.method-description ol{list-style-type:decimal}.method-description li{margin-bottom:4px}.method-description .katex-display{margin:14px 0;overflow-x:auto;overflow-y:hidden;padding:4px 0}.method-description .katex{font-size:1em}.method-source{margin-top:18px;display:flex;flex-direction:column;gap:6px;max-width:720px}.method-source-label{font-family:var(--mono);font-size:10px;letter-spacing:.14em;text-transform:uppercase;color:var(--ink-faint)}.method-source-link{display:flex;flex-direction:column;gap:2px;padding:12px 14px;background:var(--bg-elevated);border:1px solid var(--hairline);border-left:3px solid var(--accent-text);border-radius:3px;cursor:pointer;transition:background .12s,border-color .12s;text-decoration:none}.method-source-link:not(.is-static):hover{background:var(--bg-subtle);border-color:var(--hairline-strong);border-left-color:var(--accent)}.method-source-link.is-static{cursor:default}.method-source-title{font-family:var(--serif);font-size:17px;font-weight:500;color:var(--ink);letter-spacing:-.005em}.method-source-link:not(.is-static):hover .method-source-title{text-decoration:underline;text-underline-offset:3px;text-decoration-thickness:1px}.method-source-meta{font-family:var(--mono);font-size:11px;color:var(--ink-faint)}@media (max-width: 1024px){.method-hero-grid{grid-template-columns:1fr;gap:24px}.method-figure-card{max-width:560px}.method-hero-grid--wide-figure .method-figure-card{max-width:640px}}.method-hero-title{font-family:var(--mono);font-size:40px;margin-bottom:0;letter-spacing:-.01em}.method-trending-icon{flex:0 0 auto;color:var(--accent-text);fill:color-mix(in srgb,var(--accent-text) 18%,transparent)}.method-trend-score{color:var(--accent-text);font-weight:600}.method-trend-panel{margin-top:20px;padding-top:14px;border-top:1px solid var(--hairline-strong)}.method-trend-header{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;margin-bottom:4px}.method-trend-eyebrow{margin-bottom:5px;font-family:var(--mono);font-size:10px;letter-spacing:.1em;text-transform:uppercase;color:var(--accent-text)}.method-trend-header p{margin:3px 0 0;font-family:var(--mono);font-size:11px;color:var(--ink-faint)}.method-trend-summary{display:flex;flex-direction:column;align-items:flex-end;flex:0 0 auto;font-family:var(--mono);font-size:10px;color:var(--ink-faint)}.method-trend-summary>strong{font-family:var(--serif);font-size:19px;font-weight:500;line-height:1;color:var(--ink)}.method-usage-chart-wrap{position:relative;width:100%}.method-usage-chart{display:block;width:100%;height:auto;overflow:visible}.method-usage-gridline{stroke:var(--hairline);stroke-width:1}.method-usage-y-label,.method-usage-x-label{fill:var(--ink-faint);font-family:var(--mono);font-size:9px}.method-usage-bar-hit{fill:transparent}.method-usage-bar-mark{fill:color-mix(in srgb,var(--accent-text) 48%,var(--bg));transition:fill .12s}.method-usage-bar.is-current .method-usage-bar-mark{opacity:.55}.method-usage-bar:hover .method-usage-bar-mark,.method-usage-bar:focus .method-usage-bar-mark,.method-usage-bar.is-active .method-usage-bar-mark{fill:var(--accent-text)}.method-usage-bar:focus{outline:none}.method-usage-tooltip{position:absolute;top:4px;right:8px;display:flex;gap:8px;padding:5px 8px;border:1px solid var(--hairline-strong);background:var(--bg);font-family:var(--mono);font-size:10px;color:var(--ink-soft);pointer-events:none}.method-trend-skeleton{margin-top:20px}.method-trend-note{margin:6px 0 0;color:var(--ink-faint);font-family:var(--mono);font-size:10px}@media (max-width: 640px){.method-trend-header{flex-direction:column;gap:12px}.method-trend-summary{align-items:flex-start}}.method-chip{display:inline-flex;align-items:center;padding:4px 10px;font-family:var(--mono);font-size:11px;font-weight:500;color:var(--ink);background:var(--bg-elevated);border:1px solid var(--hairline);border-radius:4px;cursor:pointer;transition:all .15s;white-space:nowrap}.method-chip:hover{border-color:var(--ink);background:var(--bg-subtle)}.side-method-row .method-chip{font-size:10.5px;padding:3px 8px}@media (max-width: 880px){.method-hero-title{font-size:34px}}@media (max-width: 640px){.method-hero-title{font-size:30px}}.filter-row{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin-bottom:24px;padding:12px 16px;border:1px solid var(--hairline);border-radius:8px;background:var(--bg-elevated)}.filter-row .label{margin-right:8px;color:var(--ink-faint);font-family:var(--mono);font-size:10px;letter-spacing:.1em;text-transform:uppercase}.search-overlay{position:fixed;top:0;right:0;bottom:0;left:0;background:#1a181466;-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px);z-index:100;display:flex;align-items:flex-start;justify-content:center;padding-top:100px}.search-modal{width:640px;max-width:calc(100vw - 32px);background:var(--bg);border:1px solid var(--hairline-strong);border-radius:12px;box-shadow:0 20px 60px #00000026;overflow:hidden}.search-modal-input{width:100%;padding:18px 20px;font-size:16px;font-family:var(--serif);border:none;background:transparent;outline:none;border-bottom:1px solid var(--hairline);color:var(--ink)}.search-modal-input::-moz-placeholder{color:var(--ink-faint);font-style:italic}.search-modal-input::placeholder{color:var(--ink-faint);font-style:italic}.search-results{max-height:480px;overflow-y:auto;padding:8px}.search-empty{padding:32px;text-align:center;color:var(--ink-faint);font-family:var(--serif);font-style:italic}.search-section-label{font-family:var(--mono);font-size:10px;letter-spacing:.12em;text-transform:uppercase;color:var(--ink-faint);padding:10px 12px 6px}.search-result{display:flex;flex-direction:column;padding:10px 12px;border-radius:6px;cursor:pointer;gap:4px}.search-result:hover,.search-result.focused{background:var(--bg-subtle)}.search-result-title{font-family:var(--serif);font-size:14.5px;font-weight:500;line-height:1.3}.search-result-meta{font-family:var(--mono);font-size:10.5px;color:var(--ink-faint);display:flex;gap:10px}.search-result-tag{display:flex;align-items:center;gap:8px;padding:8px 12px;border-radius:6px;cursor:pointer}.search-result-tag:hover,.search-result-tag.focused{background:var(--bg-subtle)}.search-result-tag .name{font-family:var(--mono);font-size:12px}.search-result-tag .handle{font-family:var(--mono);font-size:10px;color:var(--ink-faint)}.search-result-tag .logo{width:16px;height:16px;border-radius:3px;-o-object-fit:contain;object-fit:contain;flex:none}.search-result-tag .count{margin-left:auto;font-family:var(--mono);font-size:10px;color:var(--ink-faint)}.search-view-all-row{width:100%;border:0;border-top:1px solid var(--hairline);background:var(--bg-subtle);color:var(--accent-text);padding:12px;text-align:left;font:600 11px var(--mono);cursor:pointer}.search-view-all-row:hover,.search-view-all-row:focus-visible{background:var(--bg-subtle);outline:2px solid var(--accent);outline-offset:-2px}@media (max-width: 640px){.search-modal-input{font-size:16px;padding:14px 16px}}.search-ask-row{display:flex;align-items:center;gap:10px;width:100%;padding:10px 12px;border-radius:6px;text-align:left;color:var(--ink)}.search-ask-row:hover{background:var(--bg-subtle)}.search-ask-chip{display:inline-flex;align-items:center;font-family:var(--mono);font-size:10.5px;color:var(--accent-text);background:var(--accent-soft);border-radius:5px;padding:2px 7px;flex:none}.search-ask-text{flex:1;min-width:0;font-family:var(--serif);font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.search-ask-row kbd{font-family:var(--sans);font-size:11px;color:var(--ink-faint);border:1px solid var(--hairline);border-radius:5px;padding:1px 6px}.search-empty-sub{display:block;margin-top:10px;font-family:var(--sans);font-style:normal;font-size:12px;color:var(--ink-faint)}.settings-page-content,.settings-page-loading{min-height:min(680px,calc(100vh - 180px))}.settings-section{border:1px solid var(--hairline);border-radius:10px;padding:20px 22px;margin-top:8px;max-width:760px}.settings-section-title{font-size:12px;font-weight:600;text-transform:uppercase;letter-spacing:.06em;color:var(--ink-faint);margin:0 0 14px}.settings-note.settings-note-flush{margin-top:0;padding-top:0;border-top:0}.settings-billing-loading{color:var(--ink-soft);font-size:13px}.settings-billing,.settings-billing-connect{display:flex;flex-direction:column;gap:14px}.settings-provider-grid{display:grid;gap:14px}.settings-provider-card{display:flex;flex-direction:column;gap:14px;padding:16px;border:1px solid var(--hairline);border-radius:8px;background:var(--bg-subtle)}.settings-provider-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}.settings-provider-heading h3{margin:0;color:var(--ink);font-size:16px;font-weight:650}.settings-provider-heading p{margin:3px 0 0;color:var(--ink-soft);font-size:12px}.settings-usage-row{display:flex;flex-direction:column;gap:9px;padding:13px;border:1px solid var(--hairline);border-radius:7px;background:var(--bg-elevated)}.settings-usage-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}.settings-usage-heading strong{flex-shrink:0;color:var(--ink);font-size:14px}.settings-usage-track{height:7px;overflow:hidden;border-radius:999px;background:var(--hairline)}.settings-usage-track>span{display:block;height:100%;border-radius:inherit;background:var(--accent)}.settings-limit-note{margin:0;color:var(--danger, #b42318);font-size:12px;line-height:1.45}.settings-byok-controls{display:flex;flex-direction:column;gap:10px;padding-top:2px}.settings-byok-controls form{display:flex;flex-direction:column;gap:10px}.settings-byok-controls input{width:100%;border:1px solid var(--hairline-strong);border-radius:7px;padding:10px 12px;color:var(--ink);background:var(--bg-elevated);font:inherit}.settings-fallback-control{display:flex;align-items:flex-start;gap:11px;cursor:pointer}.settings-fallback-control>span{display:flex;flex-direction:column;gap:4px}.settings-fallback-control strong{color:var(--ink);font-size:12px;line-height:1.4}.settings-fallback-control small{color:var(--ink-soft);font-size:11px;line-height:1.45}.settings-plan-row{display:flex;justify-content:space-between;align-items:flex-start;gap:20px}.settings-connected-badge{border-radius:999px;padding:4px 9px;color:var(--accent-text);background:var(--accent-soft);font-size:11px;font-weight:600}.settings-billing-help{color:var(--ink-soft);font-size:11px;margin:0;line-height:1.5}.settings-billing-actions{display:flex;flex-wrap:wrap;gap:8px}.settings-billing-actions .button{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:34px;padding:7px 11px;border:1px solid var(--hairline-strong);border-radius:7px;color:var(--ink);background:var(--bg-elevated);font-size:12px;font-weight:600;text-decoration:none}.settings-billing-actions .button:hover{background:var(--bg-subtle)}.settings-billing-actions .button-primary{border-color:var(--accent);color:var(--accent-text);background:var(--accent-soft)}.settings-billing-actions .button:disabled{cursor:not-allowed;opacity:.55}.settings-billing-actions svg{width:12px;height:12px}.settings-token-label{color:var(--ink);font-size:12px;font-weight:600;margin-bottom:-8px}.settings-billing-connect input{width:100%;border:1px solid var(--hairline-strong);border-radius:7px;padding:10px 12px;color:var(--ink);background:var(--bg-elevated);font:inherit}.settings-billing-select{width:100%;min-height:42px;padding:9px 34px 9px 12px;border:1px solid var(--border);border-radius:7px;background:var(--bg-elevated);color:var(--ink);font:inherit}.settings-billing-select:focus{outline:2px solid var(--accent);outline-offset:1px}.settings-billing-select:disabled{cursor:wait;opacity:.7}.settings-billing-connect input:focus{border-color:var(--accent);outline:2px solid var(--accent-soft)}.settings-token-error{color:var(--danger, #b42318);font-size:12px}.theme-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.theme-option{display:flex;align-items:flex-start;gap:10px;min-width:0;padding:12px;border:1px solid var(--hairline);border-radius:7px;background:var(--bg-elevated);color:var(--ink-soft);text-align:left;transition:background .15s,border-color .15s,color .15s}.theme-option:hover{border-color:var(--hairline-strong);background:var(--bg-subtle);color:var(--ink)}.theme-option.is-selected{border-color:var(--accent);background:var(--accent-soft);color:var(--accent-text)}.theme-option:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.theme-option>svg{width:16px;height:16px;margin-top:1px;flex-shrink:0}.theme-option-copy{display:flex;flex-direction:column;gap:2px;min-width:0}.theme-option-label{color:var(--ink);font-size:13px;font-weight:600}.theme-option-desc{color:var(--ink-soft);font-size:11px;line-height:1.35}.theme-option.is-selected .theme-option-label,.theme-option.is-selected .theme-option-desc{color:var(--accent-text)}.settings-row{display:flex;align-items:flex-start;justify-content:space-between;gap:24px}.settings-row-text{display:flex;flex-direction:column;gap:4px;cursor:pointer}.settings-row-label{font-size:15px;font-weight:500;color:var(--ink)}.settings-row-desc{font-size:13px;color:var(--ink-soft);line-height:1.5;max-width:460px}.settings-note{margin-top:16px;padding-top:16px;border-top:1px solid var(--hairline);font-size:13px;color:var(--ink-soft);line-height:1.5}.settings-note-action{margin-top:10px}.research-section-heading{display:flex;align-items:baseline;justify-content:space-between;gap:16px}.research-section-heading .settings-section-title{display:inline-flex;align-items:center;gap:8px}.research-follow-count{border-radius:999px;padding:1px 7px;color:var(--ink-soft);background:var(--bg-subtle);font-size:11px;letter-spacing:0}.research-feed-link{display:inline-flex;align-items:center;gap:5px;flex-shrink:0;color:var(--accent-text);font-size:13px;font-weight:600;text-decoration:none}.research-feed-link:hover{text-decoration:underline;text-underline-offset:2px}.research-feed-link svg{width:14px;height:14px}.research-section-intro{margin:-6px 0 6px}.research-follow-group{margin-top:16px}.research-follow-group-title{display:flex;align-items:center;gap:6px;margin:0 0 6px;color:var(--ink-soft);font-size:12px;font-weight:600}.research-follow-group-title svg{width:14px;height:14px}.research-follow-list{margin:0;padding:0;list-style:none;border:1px solid var(--hairline);border-radius:8px;background:var(--bg-elevated)}.research-follow-row{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:52px;padding:8px 8px 8px 14px}.research-follow-row+.research-follow-row{border-top:1px solid var(--hairline)}.research-follow-text{display:flex;flex-direction:column;gap:1px;min-width:0}.research-follow-text a{overflow:hidden;color:var(--ink);font-size:14px;font-weight:500;text-overflow:ellipsis;white-space:nowrap;text-decoration:none}.research-follow-text a:hover{color:var(--accent-text);text-decoration:underline;text-underline-offset:2px}.research-follow-text span{color:var(--ink-faint);font-size:12px}.research-follow-row.is-unfollowed .research-follow-text a{color:var(--ink-faint);text-decoration:line-through}.research-follow-action{flex-shrink:0;min-height:30px;padding:5px 10px;border:1px solid transparent;border-radius:6px;color:var(--ink-soft);background:transparent;font-size:12px;font-weight:600}.research-follow-action:hover{border-color:var(--hairline-strong);color:var(--danger, #b42318);background:var(--bg-subtle)}.research-follow-action.is-refollow{border-color:var(--accent);color:var(--accent-text);background:var(--accent-soft)}.research-follow-action:disabled{cursor:wait;opacity:.55}.research-follow-action:focus-visible{outline:2px solid var(--accent);outline-offset:1px}.research-follow-empty{margin-top:14px;padding:18px;border:1px dashed var(--hairline-strong);border-radius:8px;color:var(--ink-soft);font-size:13px;line-height:1.5}.research-follow-empty p{margin:0}.research-follow-empty strong{color:var(--ink);font-weight:600}.research-follow-browse{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}.research-follow-browse a{display:inline-flex;align-items:center;gap:6px;padding:6px 10px;border:1px solid var(--hairline-strong);border-radius:7px;color:var(--ink);background:var(--bg-elevated);font-size:12px;font-weight:600;text-decoration:none}.research-follow-browse a:hover{background:var(--bg-subtle)}.research-follow-browse svg{width:13px;height:13px}.research-email-destination{display:flex;flex-wrap:wrap;align-items:center;gap:8px 10px;margin-top:16px;padding:10px 12px;border:1px solid var(--hairline);border-radius:8px;color:var(--ink-soft);background:var(--bg-subtle);font-size:13px}.research-email-destination>svg{width:15px;height:15px;flex-shrink:0}.research-email-destination strong{color:var(--ink);font-weight:600;overflow-wrap:anywhere}.research-email-destination>span{flex:1 1 220px}.research-email-destination a{color:var(--accent-text);font-size:12px;font-weight:600;text-decoration:none}.research-email-destination a:hover{text-decoration:underline;text-underline-offset:2px}.research-email-status{margin:10px 0 0;color:var(--ink-soft);font-size:12px;line-height:1.5}.research-email-status.is-warning{color:var(--danger, #b42318)}.closed-eval-tooltip-link,.external-eval-tooltip-link{font-weight:600;text-decoration:underline;text-underline-offset:2px}@media (max-width: 640px){.theme-options{grid-template-columns:1fr}}.research-follow{display:flex;flex-wrap:wrap;align-items:center;gap:6px 12px;margin:14px 0 18px}.research-follow-btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-width:112px;min-height:36px;padding:7px 16px 7px 13px;border:1px solid var(--accent);border-radius:999px;color:var(--bg);background:var(--accent);font-family:var(--sans);font-size:14px;font-weight:600;line-height:1;text-decoration:none;cursor:pointer;box-shadow:0 1px 2px #00000014;transition:background .15s,border-color .15s,color .15s,filter .15s}.research-follow-btn:hover{filter:brightness(1.1)}.research-follow-btn:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.research-follow-btn:disabled{cursor:wait;opacity:.6}.research-follow-btn svg{width:16px;height:16px;flex-shrink:0}.research-follow-btn.is-following{border-color:var(--hairline-strong);color:var(--ink);background:var(--bg-elevated);box-shadow:none}.research-follow-btn.is-following svg{color:var(--accent-text)}.research-follow-label-hover{display:none}@media (hover: hover){.research-follow-btn.is-following:hover{filter:none;border-color:var(--danger, #b42318);color:var(--danger, #b42318)}.research-follow-btn.is-following:hover svg,.research-follow-btn.is-following:hover .research-follow-label{display:none}.research-follow-btn.is-following:hover .research-follow-label-hover{display:inline}}.research-follow-hint{color:var(--ink-soft);font-family:var(--sans);font-size:13px;line-height:1.4}.research-follow-hint a{color:var(--accent-text);font-weight:600;text-decoration:none}.research-follow-hint a:hover{text-decoration:underline;text-underline-offset:2px}.research-follow-hint.is-error{color:var(--danger, #b42318)}.following-intro{max-width:720px;margin:8px auto 32px;padding:28px 30px;border:1px solid var(--hairline);border-radius:12px;background:var(--bg-elevated)}.following-intro h2{margin:0;color:var(--ink);font-family:var(--serif);font-size:26px;font-weight:500;line-height:1.2}.following-intro-lead{margin:10px 0 0;color:var(--ink-soft);font-size:15px;line-height:1.55}.following-intro-topic{display:inline-flex;align-items:center;gap:6px;margin:18px 0 0;min-height:36px;padding:7px 16px;font-size:14px}.following-intro-topic svg{width:15px;height:15px}.following-intro-note{margin:10px 0 0;color:var(--ink-faint);font-size:13px}.following-intro-note a{color:var(--accent-text)}@media (max-width: 640px){.following-intro{padding:22px 18px}}.sidebar-follow-link{display:flex;align-items:center;gap:12px;padding:6px 0}.sidebar-follow-kind{flex:0 0 76px;padding:3px 0;border-radius:6px;color:var(--accent-text);background:var(--accent-soft);font-family:var(--mono);font-size:10px;letter-spacing:.1em;text-align:center;text-transform:uppercase}.sidebar-follow-name{min-width:0;overflow:hidden;color:var(--ink);font-size:14px;text-overflow:ellipsis;white-space:nowrap}.sidebar-follow-link:hover .sidebar-follow-name{text-decoration:underline;text-underline-offset:2px}.sidebar-follow-group{display:flex;flex-direction:column;align-items:flex-start;margin-top:10px}.sidebar-follow-group .sidebar-follow-kind{flex:none;width:76px;margin-bottom:2px}@media (max-width: 880px){.sidebar-follow-link{gap:8px}.sidebar-follow-kind{flex:none;padding:1px 6px}.sidebar-follow-group{display:contents}.sidebar-follow-group .sidebar-follow-kind{width:auto;margin:0;align-self:center}}.sidebar-follow-topic{display:flex;align-items:center;gap:8px}.sidebar-follow-topic .sidebar-follow-link{flex:1;min-width:0}@media (min-width: 881px){.sidebar-follow-link{align-items:flex-start}.sidebar-follow-name{overflow:visible;overflow-wrap:anywhere;white-space:normal;line-height:1.4}.sidebar-follow-topic{align-items:flex-start}.sidebar-follow-topic .sidebar-follow-link{flex-wrap:wrap;row-gap:6px}.sidebar-follow-topic .sidebar-follow-name{flex-basis:100%}.sidebar-follow-topic .sidebar-follow-edit{padding-top:7px}}.sidebar-follow-topic.active .sidebar-follow-kind{color:var(--accent-soft);background:var(--accent-text)}.sidebar-follow-topic.active .sidebar-follow-name{font-weight:600}.sidebar-follow-edit,.no-results .link-button{padding:0;font:inherit}.sidebar-follow-edit{margin-left:auto;color:var(--ink-faint);font-size:12px}.sidebar-follow-edit:hover{color:var(--ink)}.sidebar-follow-manage{display:inline-block;margin-top:8px;color:var(--ink-faint);font-size:12px}.sidebar-follow-manage:hover{color:var(--ink)}.research-topic{margin:4px 0 20px}.research-topic .settings-row-desc{margin:4px 0 10px}.research-topic-form{display:flex;flex-direction:column;gap:8px}.research-topic-input{width:100%;padding:10px 12px;border:1px solid var(--hairline-strong, var(--hairline));border-radius:8px;color:var(--ink);background:var(--bg-elevated);font:inherit;font-size:14px;line-height:1.45;resize:vertical}.research-topic-input:focus{outline:2px solid var(--accent-soft);border-color:var(--accent-text)}.research-topic-actions{display:flex;align-items:center;gap:8px}.research-topic-count{margin-right:auto;color:var(--ink-faint);font-family:var(--mono);font-size:11px}.research-topic-save{min-height:30px;padding:5px 12px;border:0;border-radius:6px;color:#fff;background:var(--accent-text);font-size:12px;font-weight:600}.research-topic-save:disabled{opacity:.45;cursor:default}.research-topic-suggestion{margin:6px 0 0;color:var(--ink-soft);font-size:13px}.topic-dialog{max-width:640px;max-height:calc(100vh - 32px);overflow-y:auto}.topic-dialog-form{display:flex;flex-direction:column;gap:18px}.topic-dialog-title{font-family:var(--serif);font-size:24px;font-weight:500;color:var(--ink)}.topic-dialog-group{display:flex;flex-direction:column;gap:8px}.topic-dialog-group h3{margin:0;color:var(--ink-faint);font-family:var(--sans);font-size:12px;font-weight:600;letter-spacing:.06em;text-transform:uppercase}.topic-dialog-hint{margin:0;color:var(--ink-soft);font-size:13px}.topic-dialog .research-topic-input{min-height:112px;font-size:15px}.topic-dialog .research-topic-count{align-self:flex-end;margin:0}.topic-dialog-chips{display:flex;flex-wrap:wrap;gap:8px}.topic-dialog-chips>[hidden]{display:none}.topic-dialog-chip{display:inline-flex;align-items:center;gap:5px;padding:4px 11px 4px 9px;border:1px solid var(--hairline);border-radius:999px;color:var(--ink-soft);background:transparent;font-size:13px}.topic-dialog-chip svg{width:13px;height:13px}.topic-dialog-chip-image{flex:none;width:20px;height:20px;margin:-2px 1px -2px 0;box-sizing:border-box;border:1px solid var(--hairline);background:#fff}.topic-dialog-chip-image.is-author{border-radius:50%;-o-object-fit:cover;object-fit:cover}.topic-dialog-chip-image.is-organization{border-radius:5px;padding:2px;-o-object-fit:contain;object-fit:contain}.topic-dialog-chip-image.is-initials{display:inline-flex;align-items:center;justify-content:center;color:var(--ink-soft);background:var(--hairline);font-size:9px;font-weight:600;letter-spacing:.02em}.topic-dialog-chip[aria-pressed=false]:hover:not(:disabled){border-color:var(--accent-text);color:var(--accent-text)}.topic-dialog-chip[aria-pressed=true]{border-color:var(--accent-text);color:#fff;background:var(--accent-text)}.topic-dialog-chip[aria-pressed=true]:hover:not(:disabled){opacity:.85}.topic-dialog-chip:disabled{cursor:default;opacity:.6}.topic-dialog-browse{display:inline-flex;align-items:center;gap:4px;padding:4px;color:var(--accent-text);font-size:13px;text-decoration:none}.topic-dialog-browse:hover{text-decoration:underline}.topic-dialog-browse svg{width:13px;height:13px}.topic-dialog-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px}.topic-dialog-remove{margin-right:auto}.topic-dialog-actions .research-topic-save{min-height:36px;padding:7px 18px;font-size:14px}.following-topic-note{margin:0 0 16px;padding:10px 14px;border-radius:8px;color:var(--ink-soft);background:var(--accent-soft);font-size:13px}.reader-route-shell{height:100dvh;min-height:0;display:flex;flex-direction:column;overflow:hidden}.reader-route-shell>.app-header{position:static;flex:0 0 auto}.reader-route-content{min-height:0;flex:1}.paper-reader-shell{height:100%;min-height:0;display:flex;flex-direction:column;background:var(--bg);color:var(--ink);overflow:hidden}.reader-workspace{position:relative;min-height:0;flex:1;display:flex;overflow:hidden}.reader-paper-pane,.reader-assistant-pane{min-width:0;min-height:0;display:flex;flex-direction:column;overflow:hidden}.reader-paper-pane{background:#fff;transition:width .24s cubic-bezier(.22,1,.36,1)}.reader-assistant-pane{visibility:visible;background:var(--bg);opacity:1;transform:translate(0);transition:width .24s cubic-bezier(.22,1,.36,1),opacity .18s ease,transform .24s cubic-bezier(.22,1,.36,1),visibility 0s}.reader-assistant-pane:focus{outline:none}.reader-assistant-pane.is-collapsed{visibility:hidden;opacity:0;transform:translate(28px);pointer-events:none;transition:width .24s cubic-bezier(.22,1,.36,1),opacity .14s ease,transform .24s cubic-bezier(.22,1,.36,1),visibility 0s linear .24s}.reader-workspace.is-resizing{cursor:col-resize;-webkit-user-select:none;-moz-user-select:none;user-select:none}.reader-workspace.is-resizing .reader-paper-pane,.reader-workspace.is-resizing .reader-assistant-pane{transition:none}.reader-resize-handle{position:relative;z-index:5;width:1px;flex:0 0 1px;cursor:col-resize;background:var(--hairline-strong);touch-action:none;outline:none}.reader-resize-handle:before{content:"";position:absolute;top:0;right:-8px;bottom:0;left:0}.reader-resize-handle:focus-visible{box-shadow:0 0 0 2px var(--accent)}.reader-collapse-assistant{position:absolute;z-index:8;top:0;right:16px;height:48px;display:flex;align-items:center;border:0;padding:0;background:transparent;color:var(--ink);font-size:12px;line-height:1.5}.reader-workspace.is-assistant-collapsed .pdf-toolbar{padding-right:96px}.reader-tabs{height:40px;flex:0 0 auto;display:flex;border-bottom:1px solid var(--border);background:var(--surface)}.reader-tabs button{flex:1;border:0;border-bottom:2px solid transparent;background:transparent;color:var(--ink-muted)}.reader-tabs button[aria-selected=true]{border-bottom-color:var(--accent);color:var(--ink);font-weight:600}.reader-tab-pending{display:inline-block;width:7px;height:7px;margin-left:6px;border-radius:50%;background:var(--accent);vertical-align:1px}@media (forced-colors: active){.reader-tab-pending{border:1px solid ButtonText}}.reader-workspace .is-hidden{position:absolute!important;top:0;right:0;bottom:0;left:0;width:100%!important;visibility:hidden;pointer-events:none}.reader-workspace.is-tabs>.reader-paper-pane,.reader-workspace.is-tabs>.reader-assistant-pane{width:100%}.reader-status{min-height:100dvh;display:grid;place-content:center;gap:12px;text-align:center}.reader-chat-unavailable{height:100%;display:grid;place-content:center;color:var(--ink-muted);padding:24px;text-align:center}.pdf-viewer{min-height:0;flex:1;display:flex;flex-direction:column}.pdf-toolbar{position:relative;min-height:48px;flex:0 0 auto;display:flex;align-items:center;gap:16px;padding:7px 10px 7px var(--reader-title-inset, 32px);border-bottom:1px solid var(--hairline);background:var(--bg);color:var(--ink);font-size:12px}.pdf-toolbar-paper{min-width:0;flex:1;display:flex;align-items:center;gap:10px;overflow:hidden}.pdf-toolbar .pdf-toolbar-back{flex:0 0 auto;height:28px;display:inline-flex;align-items:center;gap:4px;margin-left:-8px;border-radius:6px;padding:0 8px 0 6px;color:var(--ink-soft);font-weight:500;text-decoration:none;white-space:nowrap}.pdf-toolbar .pdf-toolbar-back:hover{background:var(--bg-subtle);color:var(--ink);text-decoration:none}.pdf-toolbar-title{min-width:0;overflow:hidden;color:var(--ink);font-size:14px;font-weight:600;letter-spacing:-.005em;text-overflow:ellipsis;white-space:nowrap}.pdf-toolbar-title:hover{color:var(--accent-text);text-decoration:underline;text-underline-offset:3px}.pdf-toolbar .pdf-toolbar-resource{flex:0 0 auto;height:24px;display:inline-flex;align-items:center;gap:5px;border:1px solid var(--hairline);border-radius:999px;padding:0 9px;background:var(--bg-elevated);color:var(--ink-soft);font-size:11px;font-variant-numeric:tabular-nums;text-decoration:none;white-space:nowrap}.pdf-toolbar .pdf-toolbar-resource:hover{border-color:var(--hairline-strong);color:var(--ink);text-decoration:none}.pdf-toolbar-controls{flex:0 0 auto;display:flex;align-items:center;gap:8px}.pdf-toolbar-group{height:30px;display:flex;align-items:center;gap:1px;border:1px solid var(--hairline);border-radius:8px;padding:1px;background:var(--bg-elevated)}.pdf-toolbar button,.pdf-toolbar-controls a{min-height:30px;display:inline-flex;align-items:center;justify-content:center;gap:6px;border:1px solid var(--hairline);border-radius:8px;padding:0 10px;background:var(--bg-elevated);color:var(--ink);font-weight:500;text-decoration:none}.pdf-toolbar button:hover:not(:disabled),.pdf-toolbar-controls a:hover{border-color:var(--hairline-strong);background:var(--bg-subtle)}.pdf-toolbar .pdf-toolbar-group button{width:26px;min-height:26px;height:26px;border:0;border-radius:6px;padding:0;background:transparent;color:var(--ink-soft)}.pdf-toolbar .pdf-toolbar-group button:hover:not(:disabled){background:var(--bg-subtle);color:var(--ink)}.pdf-toolbar-search svg{color:var(--ink-soft)}.pdf-toolbar button[aria-expanded=true]{border-color:var(--hairline-strong);background:var(--bg-subtle)}.pdf-toolbar button:focus-visible,.pdf-toolbar a:focus-visible,.pdf-toolbar input:focus-visible,.pdf-search-controls input:focus-visible{outline:2px solid var(--accent);outline-offset:1px}.pdf-toolbar button:disabled{cursor:default;opacity:.35}.pdf-page-form{display:flex;align-items:baseline;gap:3px;padding:0 4px;color:var(--ink-soft);font-variant-numeric:tabular-nums;white-space:nowrap}.pdf-page-form input{width:30px;height:22px;-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield;border:1px solid transparent;border-radius:5px;padding:0 2px;background:var(--bg-subtle);color:var(--ink);font:inherit;font-weight:500;text-align:center}.pdf-page-form input:hover,.pdf-page-form input:focus{border-color:var(--hairline-strong);background:var(--bg)}.pdf-page-form input::-webkit-inner-spin-button,.pdf-page-form input::-webkit-outer-spin-button{margin:0;-webkit-appearance:none;-moz-appearance:none;appearance:none}.pdf-zoom-value{width:46px;height:22px;border:1px solid transparent;border-radius:5px;padding:0 2px;background:transparent;color:var(--ink);text-align:center;font:inherit;font-weight:500;font-variant-numeric:tabular-nums}.pdf-zoom-value:hover,.pdf-zoom-value:focus{border-color:var(--hairline-strong);background:var(--bg)}.pdf-search-controls{position:absolute;z-index:10;right:8px;top:calc(100% + 5px);display:flex;align-items:center;gap:5px;padding:7px;border:1px solid var(--hairline);border-radius:6px;background:var(--bg-elevated);box-shadow:0 5px 20px #0003}.pdf-search-controls input{width:min(260px,45vw);min-height:30px;border:1px solid var(--hairline);border-radius:4px;padding:4px 7px;background:var(--bg);color:var(--ink)}.pdf-search-controls span{min-width:70px;color:var(--ink-soft);text-align:center}.pdf-search-controls button{display:inline-flex;align-items:center;justify-content:center}.pdf-citation-steps{position:absolute;z-index:10;top:8px;left:50%;display:flex;align-items:center;gap:4px;padding:5px 5px 5px 12px;border:1px solid var(--hairline);border-radius:8px;background:var(--bg-elevated);color:var(--ink);box-shadow:0 5px 20px #0003;font-size:13px;transform:translate(-50%);animation:pdf-citation-steps-in .14s ease-out}.pdf-citation-steps span{margin-right:4px;color:var(--ink-soft);font-variant-numeric:tabular-nums;white-space:nowrap}.pdf-citation-steps button{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border:0;border-radius:5px;background:transparent;color:var(--ink);cursor:pointer}.pdf-citation-steps button:hover{background:var(--hairline)}.pdf-citation-steps button:focus-visible{outline:2px solid var(--accent);outline-offset:1px}@keyframes pdf-citation-steps-in{0%{opacity:0;transform:translate(-50%,-6px)}}@media (prefers-reduced-motion: reduce){.pdf-citation-steps{animation:none}}.pdf-scroll-frame{position:relative;min-height:0;flex:1;display:flex;flex-direction:column}.pdf-scroll{min-height:0;flex:1;overflow:auto;overscroll-behavior:contain;background:#fff;scrollbar-color:var(--ink-faint) var(--bg-subtle);scrollbar-gutter:stable}.pdf-scroll::-webkit-scrollbar{width:12px;height:12px}.pdf-scroll::-webkit-scrollbar-track{background:var(--bg-subtle)}.pdf-scroll::-webkit-scrollbar-thumb{border:3px solid var(--bg-subtle);border-radius:999px;background:var(--ink-faint)}.pdf-pages{display:flex;width:-moz-max-content;width:max-content;min-width:100%;flex-direction:column;align-items:center;gap:8px;zoom:var(--pdf-live-scale, 1)}.pdf-page{position:relative;background:#fff}.pdf-page-layer{zoom:var(--pdf-layer-scale, 1)}.pdf-page-layer.is-pending{position:absolute;top:0;left:0;visibility:hidden;pointer-events:none}.pdf-page .react-pdf__Page{margin:0}.pdf-page-snapshot{position:absolute;top:0;right:0;bottom:0;left:0;z-index:2;width:100%;height:100%;pointer-events:none}.pdf-page .textLayer ::-moz-selection{background:#2d7dff4d;color:transparent}.pdf-page .textLayer ::selection{background:#2d7dff4d;color:transparent}.pdf-search-highlight{border-radius:1px;background:#2d7dff57;color:inherit;box-shadow:0 0 0 1px #2d7dff2e}.pdf-search-highlight.is-active{background:#1c68ef85;box-shadow:0 0 0 1px #1c68ef57}.pdf-citation-highlight{position:absolute;z-index:3;border-radius:3px;pointer-events:none;background:#ffc40047;box-shadow:0 0 0 2px #ffaa00b3;animation:pdf-citation-flash 4s ease-out forwards}@keyframes pdf-citation-flash{0%,10%{opacity:0}18%,70%{opacity:1}to{opacity:0}}.pdf-citation-highlight.is-brief{animation:pdf-citation-flash-brief 1.8s ease-out forwards}@keyframes pdf-citation-flash-brief{0%{opacity:0}12%,65%{opacity:1}to{opacity:0}}@media (prefers-reduced-motion: reduce){.pdf-citation-highlight{animation:pdf-citation-flash 4s step-end forwards}.pdf-citation-highlight.is-brief{animation:pdf-citation-flash-brief 1.8s step-end forwards}}.pdf-outline{position:absolute;z-index:9;top:0;right:14px;bottom:0;display:flex;align-items:center;pointer-events:none}.pdf-outline-rail{display:flex;flex-direction:column;align-items:flex-end;justify-content:center;gap:5px;max-height:100%;overflow:hidden;border:0;width:56px;padding:12px 6px 12px 0;background:transparent;cursor:pointer;pointer-events:auto;touch-action:none}.pdf-outline-rail:focus-visible{outline:2px solid var(--accent);outline-offset:-2px;border-radius:6px}.pdf-outline-tick{--pop: 0;--tick-width: 18px;display:block;width:calc(var(--tick-width) + var(--pop) * (34px - var(--tick-width)));height:2px;border-radius:1px;background:var(--ink-faint);transform:scaleY(calc(1 + var(--pop)));transition:background .12s ease,width .18s cubic-bezier(.34,1.56,.64,1),transform .18s cubic-bezier(.34,1.56,.64,1)}.pdf-outline-tick.level-1{--tick-width: 10px}.pdf-outline-tick.is-active{--tick-width: 22px;background:var(--accent)}.pdf-outline-tick.is-scrubbed{background:var(--accent)}.pdf-outline-scrub-label{position:absolute;right:calc(100% - 4px);max-width:min(260px,60vw);overflow:hidden;padding:6px 12px;border:1px solid var(--hairline);border-radius:999px;background:var(--bg-elevated);color:var(--ink);box-shadow:0 6px 20px #0003;font-size:13px;font-weight:600;line-height:1.3;text-overflow:ellipsis;white-space:nowrap;pointer-events:none;transform:translateY(-50%);transition:top 90ms ease;animation:pdf-outline-label-in .16s cubic-bezier(.34,1.56,.64,1)}@keyframes pdf-outline-label-in{0%{opacity:0;transform:translate(8px,-50%) scale(.9)}}.pdf-outline-panel{position:absolute;right:100%;top:50%;width:min(320px,60vw);max-height:min(70vh,100%);overflow-y:auto;margin-right:-6px;padding:10px 6px;border:1px solid var(--hairline);border-radius:12px;background:var(--bg-elevated);color:var(--ink);box-shadow:0 8px 28px #0003;font-size:14px;line-height:1.35;opacity:0;visibility:hidden;transform:translate(6px,-50%);transition:opacity .12s ease,transform .12s ease,visibility 0s linear .12s;pointer-events:none}.pdf-outline:hover .pdf-outline-panel,.pdf-outline:focus-within .pdf-outline-panel,.pdf-outline.is-pinned .pdf-outline-panel{opacity:1;visibility:visible;transform:translateY(-50%);transition-delay:0s;pointer-events:auto}.pdf-outline-panel ol{margin:0;padding:0;list-style:none}.pdf-outline-panel li.level-1 a{padding-left:32px;font-size:13px;color:var(--ink-soft)}.pdf-outline-panel a{display:block;padding:7px 16px;border-radius:6px;color:var(--ink-muted);text-decoration:none;overflow-wrap:anywhere}.pdf-outline-panel a:hover{background:var(--bg-subtle);color:var(--ink);text-decoration:none}.pdf-outline-panel a.is-scrubbed{background:var(--bg-subtle);color:var(--ink);box-shadow:inset 3px 0 0 var(--accent)}.pdf-outline-panel a:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}.pdf-outline-panel a[aria-current=location]{color:var(--accent-text);font-weight:600}@media (hover: none){.pdf-outline:hover:not(.is-pinned) .pdf-outline-panel{opacity:0;visibility:hidden;pointer-events:none}}@media (forced-colors: active){.pdf-outline-tick{background:ButtonText}.pdf-outline-tick.is-active{background:Highlight}}@media (prefers-reduced-motion: reduce){.pdf-outline-panel,.pdf-outline-tick,.pdf-outline-scrub-label{transition:none;animation:none}}.pdf-loading,.pdf-error{min-height:50vh;display:grid;place-content:center;color:var(--ink);text-align:center;padding:24px}.pdf-error a,.pdf-error button{color:inherit}.chat-page--reader .chat-main{min-width:0}.chat-page--reader .chat-topbar{min-height:48px;gap:4px;padding:7px 4px 7px 20px}.chat-page--reader .chat-share-button,.chat-page--reader .chat-topbar-title{margin-right:8px}.chat-reader-icon-btn{width:28px;height:28px}.chat-reader-icon-btn svg{width:15px;height:15px}.chat-page--reader .chat-empty-inner{width:min(100%,560px);padding-inline:16px}.chat-page--reader .chat-examples{width:min(100%,300px);margin-inline:auto;flex-direction:column;align-items:stretch}.chat-page--reader .chat-example{width:100%}.chat-reader-action{border:0;background:transparent;color:var(--accent-text);text-decoration:none;font-size:12px;white-space:nowrap}@media (max-width: 880px){.chat-page--reader .chat-topbar{padding-right:16px}.pdf-toolbar{padding-left:16px}}@media (max-width: 640px){.chat-page--reader .chat-topbar{padding-right:14px}.pdf-zoom-value{display:none}.pdf-toolbar{gap:8px;overflow-x:auto;padding-left:14px}.pdf-toolbar-paper{min-width:150px}.pdf-toolbar-search span{display:none}.pdf-toolbar .pdf-toolbar-search{width:30px;padding:0}}@media (forced-colors: active){.reader-resize-handle,.pdf-toolbar button,.pdf-toolbar a{border:1px solid ButtonText}}@media (prefers-reduced-motion: reduce){.paper-reader-shell *{scroll-behavior:auto!important}.reader-paper-pane,.reader-assistant-pane{transition-duration:.01ms!important}}.pdf-page .linkAnnotation>.pdf-paper-preview-link{position:absolute;top:0;right:0;bottom:0;left:0;display:block;width:100%;height:100%}.pdf-bibliography-link{position:absolute;z-index:2;border-radius:3px}.pdf-bibliography-link>.pdf-paper-preview-link{position:absolute;top:0;right:0;bottom:0;left:0;display:block;border-radius:inherit}.pdf-bibliography-link:hover,.pdf-bibliography-link:focus-within{background:#2563eb14}.pdf-author-link{position:absolute;z-index:2;border-radius:3px}.pdf-author-link>a{position:absolute;top:-1px;right:-2px;bottom:-1px;left:-2px;display:block;border-radius:inherit}.pdf-author-link:hover,.pdf-author-link:focus-within{background:#2563eb1a}.pdf-author-card{display:flex;align-items:center;gap:12px;padding:14px;color:inherit;text-decoration:none}.pdf-author-card:hover .paper-preview-title{color:var(--accent)}.pdf-author-card:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}.pdf-author-card-avatar{width:44px;height:44px;flex:none}.pdf-author-card-meta{min-width:0}.pdf-author-card-meta .paper-preview-title{margin-bottom:2px}.paper-preview-card-link{display:block;color:inherit;text-decoration:none}.paper-preview-card-link:hover .paper-preview-title{color:var(--accent)}.paper-preview-card-link:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}.pdf-paper-preview-actions{display:flex;justify-content:space-between;gap:12px;padding:10px 14px;border-top:1px solid var(--hairline);font-size:12px}.pdf-paper-preview-actions a,.pdf-paper-preview-actions button{color:var(--accent)}.pdf-paper-preview-actions button{border:0;background:transparent;cursor:pointer;padding:0;font:inherit}.pdf-paper-preview-actions a:focus-visible,.pdf-paper-preview-actions button:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.reader-web-document{max-width:760px;margin:0 auto;padding:32px 28px 64px;color:#1a1a1a;font-size:16px;line-height:1.65;overflow-wrap:anywhere}.reader-web-document h1{margin:0 0 20px;font-size:28px;line-height:1.25}.reader-web-document h2{margin:32px 0 12px;font-size:22px;line-height:1.3}.reader-web-document h3{margin:24px 0 8px;font-size:18px}.reader-web-document img{max-width:100%;height:auto}.reader-web-document pre{overflow-x:auto;padding:12px;border-radius:6px;background:#f4f4f5;font-size:13px}.reader-web-document table{display:block;max-width:100%;overflow-x:auto;border-collapse:collapse;font-size:14px}.reader-web-document th,.reader-web-document td{padding:6px 10px;border:1px solid #e4e4e7}.reader-web-document a{color:#1c68ef}.reader-web-document ::-moz-selection{background:#2d7dff4d}.reader-web-document ::selection{background:#2d7dff4d}@media (max-width: 640px){.reader-web-document{padding:20px 16px 48px;font-size:15px}}.saved-area-section{margin-top:28px}.saved-area-section:first-of-type{margin-top:4px}.saved-area-heading{font-family:var(--serif);font-size:22px;font-weight:500;color:var(--ink);margin:0 0 6px;padding-bottom:6px;border-bottom:1px solid var(--hairline-strong)}.saved-task-block{margin-top:16px}.saved-task-row{display:flex;align-items:center;gap:10px;margin-bottom:6px}.saved-task-count{font-size:12px;color:var(--ink-faint)}.saved-signin-panel{display:flex;justify-content:center;padding:80px 0}.saved-bucket-migration{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:24px;padding:14px 16px;border:1px solid var(--info-border);border-radius:6px;background:var(--info-bg);color:var(--info-text)}.saved-bucket-migration p{max-width:760px;font-size:13px;line-height:1.5}.saved-bucket-migration .hf-signin-btn{flex-shrink:0;max-width:100%;height:auto;min-height:36px;padding:8px 12px;white-space:normal;overflow-wrap:anywhere}@media (max-width: 700px){.saved-bucket-migration{align-items:flex-start;flex-direction:column}}.action-btn.is-saved{background:var(--ink);color:var(--bg);border-color:var(--ink)}.action-btn.is-saved:hover{background:color-mix(in oklch,var(--ink) 88%,var(--accent))}.ask-home-new{max-width:640px;margin:0 auto 6px;padding-left:9px;color:var(--ink-faint);font-size:14px;font-weight:700}.ask-home{position:relative;max-width:640px;margin:0 auto 36px;background:var(--bg-elevated);border:1px solid var(--hairline);border-radius:14px;box-shadow:0 1px 2px #1e1c140a,0 12px 34px -18px #1e1c1447;padding:8px}.ask-home-row{display:flex;align-items:flex-end;gap:8px}.ask-home-row>.chat-send{flex:none;margin:0 2px 2px 0}.ask-home-textarea-wrap{position:relative;flex:1;min-width:0}.ask-home textarea{position:relative;z-index:1;display:block;width:100%;border:0;outline:0;resize:none;background:transparent;font-family:var(--serif);font-size:17px;line-height:1.45;color:transparent;caret-color:var(--ink);padding:8px 12px}.ask-home textarea::-moz-placeholder{color:var(--ink-faint)}.ask-home textarea::placeholder{color:var(--ink-faint)}.feed-sidebar{display:flex;flex-direction:column;min-height:calc(100dvh - 250px)}.feed-sidebar>.sidebar-section-tools{margin-top:auto;margin-bottom:0}@media (max-width: 880px){.layout-with-sidebar>.sidebar,.layout-with-sidebar>.feed-main{display:contents}.feed-chat{order:1}.sidebar-section-top-domains{order:2}.sidebar-section-trending-domains{order:3}.sidebar-section-follows{order:2}.feed-content{order:4}.sidebar-section-tools{order:5}.feed-sidebar>.sidebar-section-tools{margin-top:0}.feed-content:has(>.following-intro){display:contents}.feed-content:has(>.following-intro)>*{order:4}.feed-content:has(>.following-intro)>.following-intro{order:0;margin:0}}.sidebar-tools-mcp{width:100%;justify-content:space-between;padding:10px 14px;font-size:15px;font-weight:600}.sidebar-tools-mcp:hover{border-color:var(--ink-faint)}.sidebar-tools-copy{font-size:12px;line-height:1.5;color:var(--ink-faint);margin:10px 0 0}.sidebar-tools-copy a{color:var(--ink-soft);text-decoration:underline;text-decoration-style:dotted}.sidebar-tools-copy code{font-family:var(--mono);font-size:11px}.submission-loading,.submission-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;min-height:240px;padding:32px;text-align:center;color:var(--ink-faint)}.submission-loading{min-height:160px;flex-direction:row;font-family:var(--mono);font-size:12px}.submission-empty h1,.submission-empty h2{font-family:var(--serif);font-weight:500;color:var(--ink)}.submission-empty p{max-width:460px;color:var(--ink-soft)}.submission-empty a{color:var(--accent-text);text-decoration:underline}.submission-empty-warn{border:1px solid var(--hairline);border-radius:8px;background:var(--bg-elevated)}.chat-page{position:relative;display:flex;overflow:hidden;background:var(--bg)}.chat-main{flex:1;display:flex;flex-direction:column;min-width:0;background:var(--bg)}.chat-topbar{display:flex;align-items:center;gap:14px;padding:10px 24px;border-bottom:1px solid var(--hairline)}.chat-topbar .icon-btn{flex:none;border-color:transparent;background:transparent;color:var(--ink-soft);transition:background .15s,color .15s}.chat-topbar .icon-btn:hover,.chat-topbar .icon-btn[data-state=open]{background:var(--bg-subtle);color:var(--ink)}.chat-topbar-title{flex:1;min-width:0;font-family:var(--serif);font-size:15px;font-weight:500;letter-spacing:-.005em;color:var(--ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.chat-empty{flex:1;display:flex;align-items:flex-start;justify-content:center;padding:40px 24px;overflow-y:auto}.chat-empty-inner{max-width:680px;width:100%;margin-block:auto;text-align:center}.chat-empty-eyebrow{font-family:var(--mono);font-size:11px;letter-spacing:.16em;text-transform:uppercase;color:var(--ink-faint);margin-bottom:18px}.chat-empty-title{font-family:var(--serif);font-weight:500;font-size:44px;line-height:1.05;letter-spacing:-.02em;margin-bottom:14px}.chat-empty-title em{font-style:italic;font-weight:400;color:var(--accent)}.chat-empty-sub{font-family:var(--serif);font-size:16px;line-height:1.5;color:var(--ink-soft);max-width:520px;margin:0 auto 26px;text-wrap:pretty}.chat-staging-access-note{max-width:560px;margin:-12px auto 18px;color:var(--ink-soft);font-size:13px;line-height:1.45}.chat-staging-badge{flex:none;border:1px solid color-mix(in oklch,var(--accent) 36%,var(--hairline));border-radius:999px;padding:3px 7px;color:var(--accent-text);background:color-mix(in oklch,var(--accent) 7%,var(--bg-elevated));font-family:var(--mono);font-size:10px;font-weight:700;letter-spacing:.08em;line-height:1;text-transform:uppercase}.chat-examples{display:flex;flex-wrap:wrap;gap:10px;justify-content:center;margin-top:24px}.chat-example{font-family:var(--serif);font-size:14px;color:var(--ink-soft);background:var(--bg-elevated);border:1px solid var(--hairline);border-radius:999px;padding:8px 16px;transition:border-color .15s,color .15s}.chat-example:hover{border-color:var(--hairline-strong);color:var(--ink)}.chat-paper-inline-highlight{color:var(--accent-text);text-decoration-line:underline;text-decoration-color:color-mix(in oklch,var(--accent) 40%,transparent);text-decoration-thickness:1px;text-underline-offset:2px}.chat-paper-inline-highlight.is-unavailable{color:var(--negative-text);text-decoration-color:var(--negative-border)}@media (max-width: 900px){.chat-empty-title{font-size:34px}}@media (forced-colors: active){.chat-paper-inline-highlight{outline:1px solid CanvasText}}@media (max-width: 560px){.chat-topbar{padding-inline:14px}}.chat-credits-notice{position:relative;display:flex;align-items:center;justify-content:center;min-height:28px;padding:5px 52px 6px;border-bottom:1px solid var(--hairline);background:var(--bg-subtle);color:var(--ink-soft);font-size:12px;line-height:16px;text-align:center}.chat-credits-notice-close{position:absolute;top:50%;right:20px;display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;padding:0;border:0;border-radius:4px;background:transparent;color:var(--ink-soft);font-size:16px;line-height:1;cursor:pointer;transform:translateY(-50%)}.chat-credits-notice-close:hover{background:var(--hairline);color:var(--ink)}.chat-credits-notice-close:focus-visible{outline:2px solid var(--accent-text);outline-offset:1px}.chat-sidebar{position:relative;width:var(--chat-sidebar-width, var(--app-leading-column-width));flex:none;background:var(--bg-subtle);border-right:1px solid var(--hairline);display:flex;flex-direction:column;transition:margin-left .2s ease}.chat-sidebar-backdrop{display:none}.chat-sidebar-resize-handle{position:absolute;top:0;right:-4px;bottom:0;z-index:2;width:8px;cursor:col-resize;touch-action:none}.chat-sidebar-resize-handle:after{content:"";position:absolute;top:0;right:3px;bottom:0;left:3px;background:var(--hairline-strong);opacity:0;transition:opacity .15s}.chat-sidebar-resize-handle:hover:after,.chat-sidebar-resize-handle:focus-visible:after{opacity:1}.chat-sidebar-resize-handle:focus-visible{outline:2px solid var(--link);outline-offset:-3px}.chat-sidebar-closed{margin-left:calc(-1 * (var(--chat-sidebar-width, var(--app-leading-column-width)) + 1px))}.chat-sidebar-top{display:flex;align-items:center;gap:8px;padding:14px 12px 8px}.chat-sidebar-top .icon-btn{flex:none}.chat-new-chat{flex:1;display:flex;align-items:center;justify-content:center;gap:8px;padding:9px;background:var(--bg-elevated);border:1px solid var(--hairline);border-radius:8px;font-size:13px;font-weight:500;color:var(--ink);transition:border-color .15s}.chat-new-chat:hover{border-color:var(--hairline-strong)}.chat-sessions{flex:1;overflow-y:auto;padding:4px 8px 20px}.chat-sessions-empty{padding:18px 10px;font-family:var(--serif);font-style:italic;font-size:13px;color:var(--ink-faint)}.chat-session-group{margin-top:14px}.chat-sessions-toggle{margin-top:6px;padding:7px 10px;border-radius:7px;font-family:var(--mono);font-size:11px;color:var(--ink-faint)}.chat-sessions-toggle:hover{background:var(--hairline);color:var(--ink)}.chat-sidebar-tools{flex:none;margin:0;padding:14px 16px 16px;border-top:1px solid var(--hairline)}.chat-session-group-label{font-family:var(--mono);font-size:10px;letter-spacing:.12em;text-transform:uppercase;color:var(--ink-faint);padding:6px 10px}.chat-session{display:flex;align-items:center;gap:6px;width:100%;text-align:left;padding:7px 10px;border-radius:7px;font-size:13px;color:var(--ink-soft);transition:background .12s,color .12s}.chat-session:hover{background:var(--hairline);color:var(--ink)}.chat-session-active{background:var(--hairline);color:var(--ink);font-weight:500}.chat-session-title{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.chat-session-delete{display:inline-flex;align-items:center;color:var(--ink-faint);padding:2px;border-radius:4px;flex:none}.chat-session-delete:hover{color:var(--negative-text)}.chat-session-menu{display:inline-flex;border:0;background:transparent;color:inherit;cursor:pointer;padding:0 3px;font-size:17px;line-height:1}@media (hover: hover) and (pointer: fine){.chat-session-delete,.chat-session-menu{display:none}.chat-session:hover .chat-session-delete,.chat-session:hover .chat-session-menu,.chat-session:focus-within .chat-session-delete,.chat-session:focus-within .chat-session-menu{display:inline-flex}}.chat-session-title-input{min-width:0;flex:1;border:1px solid var(--border);border-radius:4px;background:var(--surface);color:var(--ink);font:inherit;padding:2px 4px}.chat-session-context-menu{position:fixed;z-index:1000;width:150px;padding:4px;border:1px solid var(--border);border-radius:7px;background:var(--surface);box-shadow:0 8px 24px #00000029}.chat-session-context-menu button{width:100%;border:0;border-radius:4px;background:transparent;color:var(--ink);padding:7px 9px;text-align:left;cursor:pointer}.chat-session-context-menu button:hover,.chat-session-context-menu button:focus{background:var(--hairline)}.chat-session-loading,.chat-session-load-error{flex:1;display:flex;align-items:center;justify-content:center;gap:10px;color:var(--ink-soft);font-family:var(--serif);font-size:14px}.chat-session-load-error{flex-direction:column}.chat-session-load-error p{margin:0}.chat-session-load-error button{border:1px solid var(--border);border-radius:5px;padding:7px 12px;background:var(--surface);color:var(--ink);cursor:pointer}.chat-session-load-error button:hover{background:var(--bg-subtle)}@media (max-width: 900px){.chat-sidebar{position:absolute;top:0;bottom:0;left:0;z-index:60;box-shadow:0 0 40px #0003;width:var(--app-leading-column-width)}.chat-sidebar-backdrop{display:block;position:absolute;top:0;right:0;bottom:0;left:0;z-index:59}.chat-sidebar-resize-handle{display:none}.chat-sidebar-closed{margin-left:0;transform:translate(-101%);box-shadow:none}}.chat-share-button{flex:none;display:inline-flex;align-items:center;gap:6px;height:32px;padding:0 12px 0 10px;border:1px solid var(--hairline);border-radius:8px;background:var(--bg-elevated);color:var(--ink);font-size:13px;font-weight:500;transition:border-color .15s,box-shadow .15s}.chat-share-button:hover:not(:disabled){border-color:var(--hairline-strong);box-shadow:0 1px 2px #1a18140f}.chat-share-button:disabled{cursor:not-allowed;opacity:.55}.chat-share-button:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.chat-share-button svg{width:14px;height:14px;color:var(--ink-soft)}.chat-share-toast{position:fixed;top:18px;left:50%;width:min(420px,calc(100vw - 32px));transform:translate(-50%)}.chat-share-dialog-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:110;display:grid;place-items:center;padding:20px;background:#0000006b}.chat-share-dialog{width:min(520px,100%);padding:22px;border:1px solid var(--hairline-strong);border-radius:12px;background:var(--bg-elevated);box-shadow:0 18px 60px #00000038}.chat-share-dialog h2{margin:0 0 8px;font-family:var(--serif);font-size:21px}.chat-share-dialog p{margin:0 0 14px;color:var(--ink-soft)}.chat-share-dialog input{width:100%;padding:9px 10px;border:1px solid var(--hairline-strong);border-radius:7px;background:var(--bg);color:var(--ink);font-family:var(--mono);font-size:12px}.chat-share-dialog input:focus{outline:2px solid var(--accent);outline-offset:2px}.chat-share-dialog button{display:block;margin:16px 0 0 auto;padding:7px 14px;border-radius:7px;background:var(--accent);color:#fff;font-weight:600}@media (max-width: 560px){.chat-share-button{width:34px;padding:6px;justify-content:center}.chat-share-button span{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}}.chat-capacity-dialog-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:120;display:grid;place-items:center;padding:20px;background:#0000007a}.chat-capacity-dialog{width:min(500px,100%);padding:24px;border:1px solid var(--hairline-strong);border-radius:12px;background:var(--bg-elevated);box-shadow:0 18px 60px #0000003d}.chat-capacity-dialog h2{margin:0 0 9px;font-family:var(--serif);font-size:22px}.chat-capacity-dialog p{margin:0;color:var(--ink-soft);line-height:1.5}.chat-capacity-countdown{min-height:24px;padding-top:12px;font-size:13px}.chat-capacity-dialog-actions{display:flex;justify-content:flex-end;gap:9px;margin-top:20px}.chat-capacity-dialog-actions button{padding:8px 14px;border-radius:7px;font-weight:600}.chat-capacity-cancel{border:1px solid var(--hairline-strong);background:var(--bg);color:var(--ink)}.chat-capacity-retry{background:var(--accent);color:#fff}.chat-capacity-retry:disabled{cursor:not-allowed;opacity:.5}.chat-capacity-dialog-actions button:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.chat-paused-banner{margin-bottom:.75rem;border:1px solid var(--border);border-radius:.65rem;background:var(--muted);padding:.7rem .85rem;color:var(--muted-foreground);font-size:.875rem;line-height:1.4}.chat-composer-error{margin-bottom:.75rem;border:1px solid color-mix(in oklch,#c33 35%,var(--hairline));border-radius:.65rem;background:color-mix(in oklch,#c33 8%,var(--bg-elevated));padding:.7rem .85rem;color:var(--ink);font-size:.875rem;line-height:1.4}.chat-billing-notice{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px;margin:0 0 10px;padding:9px 11px;border:1px solid color-mix(in oklch,var(--accent) 24%,var(--hairline));border-radius:9px;color:var(--ink-soft);background:color-mix(in oklch,var(--accent) 5%,var(--bg-elevated));font-size:12px;line-height:1.4}.chat-billing-notice a{flex:none;color:var(--accent-text);font-weight:600;text-decoration:none}.chat-billing-notice a:hover{text-decoration:underline}.chat-billing-notice-actions{display:flex;align-items:center;gap:10px;flex:none}.chat-billing-notice-dismiss{display:inline-flex;align-items:center;justify-content:center;width:26px;height:26px;padding:0;border:0;border-radius:6px;color:var(--ink-soft);background:transparent;cursor:pointer}.chat-billing-notice-dismiss:hover{color:var(--ink);background:color-mix(in oklch,var(--ink) 7%,transparent)}.chat-billing-notice-dismiss:focus-visible{outline:2px solid var(--accent);outline-offset:1px}.ask-home>.chat-paper-picker{top:calc(100% + 6px);bottom:auto}.chat-empty .chat-composer{text-align:left}.chat-composer-wrap{border-top:1px solid var(--hairline);background:var(--bg);padding:14px 28px 16px}.chat-composer-inner{max-width:820px;margin:0 auto}.chat-composer{position:relative;background:var(--bg-elevated);border:1px solid var(--hairline);border-radius:14px;box-shadow:0 1px 2px #1e1c140a,0 10px 30px -20px #1e1c144d;padding:6px}.chat-composer-textarea-wrap{position:relative}.chat-paper-highlight-layer{position:absolute;z-index:0;top:0;right:0;bottom:0;left:0;box-sizing:border-box;overflow:hidden;pointer-events:none;color:transparent}.chat-paper-highlight-layer>div{min-height:100%;white-space:pre-wrap;overflow-wrap:break-word;word-break:break-word;color:var(--ink)}.chat-paper-highlight-layer-composer{padding:12px 12px 4px;font-family:var(--serif);font-size:16px;line-height:1.45}.chat-paper-highlight-layer-editor{padding:9px 11px;font-family:var(--serif);font-size:16px;line-height:1.45}.chat-paper-highlight-layer-home{padding:8px 12px;font-family:var(--serif);font-size:17px;line-height:1.45}.chat-prompt-completion{color:var(--ink-faint)}.chat-paper-picker{position:absolute;z-index:50;left:8px;bottom:calc(100% + 6px);width:min(560px,calc(100vw - 48px));max-height:384px;overflow-y:auto;border:1px solid var(--hairline-strong);border-radius:11px;background:var(--bg-elevated);box-shadow:0 16px 38px -16px #1e1c1473}.chat-slash-command{position:absolute;z-index:50;left:8px;bottom:calc(100% + 6px);display:flex;width:min(560px,calc(100vw - 48px));min-height:52px;align-items:center;gap:10px;padding:9px 12px;border:1px solid var(--hairline-strong);border-radius:11px;color:var(--ink);background:var(--bg-elevated);box-shadow:0 16px 38px -16px #1e1c1473;text-align:left}.chat-slash-command:hover{background:var(--accent-soft)}.chat-slash-command span{color:var(--ink-faint);font-size:12px}.chat-paper-picker-status{padding:10px 12px;color:var(--ink-faint);font-size:12px}.chat-paper-option{display:flex;width:100%;min-height:64px;flex-direction:column;justify-content:center;gap:3px;padding:9px 12px;border:0;border-top:1px solid var(--hairline);color:var(--ink);background:transparent;text-align:left}.chat-paper-option.is-active,.chat-paper-option:hover{background:var(--accent-soft)}.chat-paper-option-title{font-family:var(--serif);font-size:14px;line-height:1.25}.chat-paper-option-meta{color:var(--ink-faint);font-family:var(--mono);font-size:10.5px}.chat-paper-mention-message{padding:3px 12px;color:var(--negative-text);font-size:11.5px}.chat-inline-paper-mention{display:inline}.chat-inline-paper-mention svg{display:inline-block;margin-right:3px;color:var(--accent-text);vertical-align:-.12em}.chat-inline-paper-link{color:var(--accent-text);font-weight:600;text-decoration-line:underline;text-decoration-color:color-mix(in oklch,var(--accent) 40%,transparent);text-decoration-thickness:1px;text-underline-offset:2px}.chat-inline-paper-link:hover{text-decoration-color:var(--accent-text)}.chat-user-link{cursor:pointer;color:var(--accent-text);text-decoration-line:underline;text-decoration-color:color-mix(in oklch,var(--accent) 40%,transparent);text-decoration-thickness:1px;text-underline-offset:2px}.chat-user-link:hover{text-decoration-color:var(--accent-text)}.chat-composer textarea{position:relative;z-index:1;width:100%;border:0;outline:0;resize:none;background:transparent;font-family:var(--serif);font-size:16px;line-height:1.45;color:transparent;caret-color:var(--ink);padding:12px 12px 4px}.chat-composer textarea::-moz-placeholder{color:var(--ink-faint)}.chat-composer textarea::placeholder{color:var(--ink-faint)}.chat-composer-row{display:flex;align-items:center;justify-content:space-between;padding:2px 6px 4px}.chat-composer-tools{display:flex;align-items:center;flex-wrap:wrap;gap:12px}.chat-composer-hint{font-size:11.5px;color:var(--ink-faint)}.chat-composer-foot{display:flex;align-items:center;justify-content:center;gap:6px;text-align:center;font-size:11.5px;color:var(--ink-faint);margin-top:9px}.chat-provider-attribution{white-space:nowrap}.chat-send{display:flex;align-items:center;justify-content:center;width:38px;height:38px;border-radius:10px;background:var(--hairline);color:var(--bg-elevated);cursor:not-allowed;transition:background .15s;flex:none}.chat-send-on{background:var(--ink);cursor:pointer}.chat-send-on:hover{background:color-mix(in oklch,var(--ink) 88%,var(--accent))}@media (max-width: 900px){.chat-composer-wrap{padding:12px 16px 14px}.chat-composer-foot,.chat-composer-hint{display:none}}@media (prefers-reduced-motion: reduce){.chat-paper-option{scroll-behavior:auto}}@media (forced-colors: active){.chat-paper-option.is-active,.chat-inline-paper-link{outline:1px solid CanvasText}.chat-paper-selection,.chat-paper-selection-remove,.chat-paper-selection-toggle{border:1px solid ButtonText}}.chat-paper-selection{margin:6px 6px 0;padding:8px 10px;border:1px solid var(--hairline);border-radius:10px;background:var(--bg-subtle);text-align:left}.chat-paper-selection-header{display:flex;align-items:center;justify-content:space-between;gap:8px}.chat-paper-selection-label{color:var(--ink-soft);font-size:11px;font-weight:600;letter-spacing:.02em;text-transform:uppercase}.chat-paper-selection-actions{display:flex;align-items:center;gap:6px}.chat-paper-selection-toggle,.chat-paper-selection-remove{border:0;padding:2px 6px;background:transparent;color:var(--accent-text);font-size:11.5px}.chat-paper-selection-quote{display:-webkit-box;max-height:4.35em;margin:6px 0 0;overflow:hidden;color:var(--ink);font-family:var(--serif);font-size:13px;line-height:1.45;white-space:pre-wrap;-webkit-box-orient:vertical;-webkit-line-clamp:3}.chat-paper-selection-quote.is-expanded{display:block;max-height:8.5em;overflow:auto;-webkit-line-clamp:unset}.chat-paper-selection-disabled{padding:4px 12px 0;color:var(--negative-text);font-size:11.5px}.chat-paper-link{color:var(--accent-text);border-bottom:1px solid color-mix(in oklch,var(--accent-text) 35%,transparent);white-space:normal}.chat-paper-link:hover{border-bottom-color:var(--accent-text)}.chat-hf-link:after{content:" 🤗";font-size:.85em;white-space:nowrap}.chat-github-link{color:var(--accent-text);border-bottom:1px solid color-mix(in oklch,var(--accent-text) 35%,transparent)}.chat-github-link:hover{border-bottom-color:var(--accent-text)}.chat-github-link svg{display:inline-block;width:1em;height:1em;margin-right:.3em;vertical-align:-.14em}.chat-external-link{color:var(--accent-text);text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:2px}.chat-external-link:hover{text-decoration-thickness:2px}.chat-web-citation{color:var(--accent-text);text-decoration:underline;text-decoration-style:dotted;text-underline-offset:2px}.chat-external-paper-citation{color:var(--chat-link);text-decoration:underline;text-decoration-color:color-mix(in srgb,var(--chat-link) 35%,transparent);text-underline-offset:2px}.external-paper-preview-pop.external-paper-preview-pop{width:min(390px,calc(100vw - 24px));padding:0;overflow:hidden;border-color:var(--chat-border);background:var(--chat-surface);color:var(--chat-text)}.external-paper-preview-card{padding:14px}.external-paper-preview-source{display:flex;gap:6px;margin-bottom:7px;color:var(--chat-muted);font-size:12px}.external-paper-preview-card strong{display:block;color:var(--chat-text);font-size:14px;line-height:1.35}.external-paper-preview-card p{margin:7px 0 0;color:var(--chat-muted);font-size:12px;line-height:1.45;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:4;overflow:hidden}.external-paper-preview-authors{-webkit-line-clamp:2!important}.external-paper-preview-citations{display:block;margin-top:9px;color:var(--chat-muted);font-size:11px}.web-preview-pop.web-preview-pop{width:min(360px,calc(100vw - 24px));padding:0;overflow:hidden;border:1px solid var(--hairline);border-radius:12px;background:var(--bg-elevated);color:var(--ink);box-shadow:0 14px 44px -12px #1e1c1466}.web-preview-card{display:flex;flex-direction:column}.web-preview-image{display:block;width:100%;height:174px;-o-object-fit:cover;object-fit:cover;background:var(--bg-subtle);border-bottom:1px solid var(--hairline)}.web-preview-meta{padding:13px 14px 14px;min-width:0}.web-preview-source{display:flex;align-items:center;gap:5px;margin-bottom:6px;color:var(--ink-faint);font-size:11px}.web-preview-source img{width:14px;height:14px;border-radius:3px}.web-preview-meta strong{display:block;font-family:var(--serif);font-size:15px;font-weight:500;line-height:1.3}.web-preview-meta p{display:-webkit-box;overflow:hidden;margin:7px 0 0;color:var(--ink-soft);font-size:12px;line-height:1.4;-webkit-box-orient:vertical;-webkit-line-clamp:3}.paper-preview-pop.paper-preview-pop{width:min(344px,calc(100vw - 24px));padding:0;border:1px solid var(--hairline);border-radius:12px;background:var(--bg-elevated);color:var(--ink);box-shadow:0 14px 44px -12px #1e1c1466;overflow:hidden}.paper-preview-inner{display:flex;gap:14px;padding:14px}.paper-preview-meta{min-width:0;flex:1}.paper-preview-title{font-family:var(--serif);font-weight:500;font-size:15px;line-height:1.25;margin-bottom:5px}.paper-preview-auth{font-size:12px;color:var(--ink-soft);line-height:1.35}.paper-preview-venue{font-size:11.5px;color:var(--ink-faint);margin-top:3px;font-variant-numeric:tabular-nums}.paper-preview-tags{display:flex;flex-wrap:wrap;gap:5px;margin:9px 0}.paper-preview-tag{font-size:10.5px;font-family:var(--mono);background:var(--positive-bg);color:var(--positive-text);border-radius:5px;padding:2px 7px}.paper-preview-status{min-height:48px;padding:14px;display:flex;align-items:center;color:var(--ink-soft);font-size:12px}.paper-preview-index-request{flex-wrap:wrap;gap:6px 12px}.paper-preview-index-request a,.paper-preview-index-request button{color:var(--accent);font:inherit;border:0;background:transparent;padding:0;cursor:pointer}.paper-preview-index-request button:disabled{color:var(--ink-soft);cursor:default}.paper-preview-index-request a:focus-visible,.paper-preview-index-request button:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.paper-preview-index-request [role=alert]{flex-basis:100%;color:var(--negative-text, var(--ink-soft))}.paper-preview-thumb{position:relative;width:96px;height:124px;flex:none;background:var(--bg-elevated);border:1px solid var(--hairline);border-radius:3px;box-shadow:0 1px 3px #1e1c1414;overflow:hidden;padding:11px 10px}.paper-preview-thumb-real{padding:0}.paper-preview-thumb-real img{display:block;width:100%;height:100%;-o-object-fit:contain;object-fit:contain}.paper-preview-thumb-title{display:flex;flex-direction:column;align-items:center;gap:3px;margin-bottom:8px}.paper-preview-thumb-title span{height:3px;background:var(--ink);border-radius:2px}.paper-preview-thumb-title span:first-child{width:70%}.paper-preview-thumb-title span:last-child{width:52%}.paper-preview-thumb-auth{height:2px;width:40%;margin:0 auto 9px;background:var(--ink-faint);border-radius:2px}.paper-preview-thumb-cols{display:flex;gap:7px}.paper-preview-thumb-col{flex:1;height:74px;background:repeating-linear-gradient(var(--hairline-strong) 0 2px,transparent 2px 5px);opacity:.7}.paper-preview-thumb-fig{position:absolute;left:14px;right:14px;height:22px;background:var(--bg-subtle);border:1px solid var(--hairline);border-radius:2px}.hf-preview-pop.hf-preview-pop{width:min(172px,calc(100vw - 24px));padding:0;border:1px solid var(--hairline);border-radius:12px;background:var(--bg-elevated);color:var(--ink);box-shadow:0 14px 44px -12px #1e1c1466;overflow:hidden}.hf-preview-card{display:grid}.hf-preview-image,.hf-preview-fallback{display:block;width:100%;aspect-ratio:2 / 1;-o-object-fit:cover;object-fit:cover;background:var(--bg-subtle)}.hf-preview-fallback{display:grid;place-items:center;font-size:48px;background:radial-gradient(circle at 70% 35%,rgba(84,104,255,.4),transparent 45%),linear-gradient(135deg,#0f6d79,#d18a48)}.hf-preview-meta{display:grid;gap:3px;padding:12px 14px 14px}.hf-preview-meta strong{overflow-wrap:anywhere;font-size:14px}.hf-preview-kind,.hf-preview-meta>span:last-child{color:var(--ink-faint);font-size:11.5px}.github-preview-pop.github-preview-pop{width:min(344px,calc(100vw - 24px));padding:0;border:1px solid var(--hairline);border-radius:12px;background:var(--bg-elevated);color:var(--ink);box-shadow:0 14px 44px -12px #1e1c1466;overflow:hidden}.github-preview-card{display:flex;gap:14px;padding:14px}.github-preview-image,.github-preview-fallback{display:block;width:72px;height:72px;flex:none;-o-object-fit:cover;object-fit:cover;border-radius:12px;background:var(--bg-subtle)}.github-preview-fallback{display:grid;place-items:center;color:#fff;background:linear-gradient(135deg,#24292f,#57606a)}.github-preview-fallback svg{width:36px;height:36px}.github-preview-meta{display:grid;gap:3px;min-width:0}.github-preview-meta strong{overflow-wrap:anywhere;font-size:14px}.github-preview-kind,.github-preview-meta>span:last-child{color:var(--ink-faint);font-size:11.5px}.github-preview-description{display:-webkit-box;overflow:hidden;color:var(--ink-soft);font-size:12px;line-height:1.35;-webkit-box-orient:vertical;-webkit-line-clamp:2}.github-preview-stats{font-variant-numeric:tabular-nums}.catalog-preview-pop.catalog-preview-pop{width:min(320px,calc(100vw - 24px));padding:0;border:1px solid var(--hairline);border-radius:12px;background:var(--bg-elevated);color:var(--ink);box-shadow:0 14px 44px -12px #1e1c1466;overflow:hidden}.catalog-preview-card{display:grid}.catalog-preview-image{display:block;width:100%;aspect-ratio:2 / 1;-o-object-fit:cover;object-fit:cover;background:var(--bg-subtle);border-bottom:1px solid var(--hairline)}.catalog-preview-meta{display:grid;gap:3px;padding:12px 14px 14px}.catalog-preview-meta strong{font-family:var(--serif);font-weight:500;font-size:15px;line-height:1.25}.catalog-preview-meta p{display:-webkit-box;overflow:hidden;margin:3px 0 0;color:var(--ink-soft);font-size:12px;line-height:1.4;-webkit-box-orient:vertical;-webkit-line-clamp:3}.catalog-preview-kind,.catalog-preview-stats{color:var(--ink-faint);font-size:11.5px;font-variant-numeric:tabular-nums}.catalog-preview-stats{margin-top:4px}.chat-pdf-citation{position:relative;display:inline-flex;align-items:center;gap:4px;margin:0 1px;padding:1px 8px;border:1px solid color-mix(in oklch,var(--accent-text) 30%,transparent);border-radius:999px;background:color-mix(in oklch,var(--accent-text) 7%,transparent);color:var(--accent-text);font:inherit;font-size:.86em;line-height:1.5;vertical-align:baseline;cursor:pointer}.chat-pdf-citation:hover,.chat-pdf-citation:focus-visible{border-color:var(--accent-text)}.chat-pdf-citation>svg{width:.95em;height:.95em;flex:none}.chat-pdf-citation-preview{position:absolute;bottom:calc(100% + 6px);left:0;z-index:20;display:none;width:min(320px,70vw);padding:8px 10px;border:1px solid var(--hairline);border-radius:8px;background:var(--bg-elevated);color:var(--ink);box-shadow:0 14px 44px -12px #1e1c1466;font-size:.92em;line-height:1.45;text-align:left;white-space:normal}.chat-pdf-citation-preview.is-below{top:calc(100% + 6px);bottom:auto}.chat-pdf-citation-preview strong{display:block;margin-bottom:2px;color:var(--ink-faint);font-weight:600}.chat-pdf-citation:hover .chat-pdf-citation-preview,.chat-pdf-citation:focus-visible .chat-pdf-citation-preview{display:block}.chat-pdf-sources{margin-top:10px;color:var(--ink-faint);font-size:.88em}.chat-pdf-sources summary{cursor:pointer;width:-moz-fit-content;width:fit-content}.chat-pdf-sources ol{margin:6px 0 0;padding-left:1.4em}.chat-pdf-sources li{margin:3px 0}.chat-pdf-sources button{display:flex;gap:8px;width:100%;padding:0;border:0;background:none;color:var(--ink);font:inherit;text-align:left;cursor:pointer}.chat-pdf-sources button:hover>span:last-child{text-decoration:underline}.chat-pdf-sources-page{flex:none;color:var(--accent-text);font-variant-numeric:tabular-nums}.chat-artifact-card{width:min(100%,620px);display:flex;gap:14px;align-items:stretch;padding:0;overflow:hidden;text-align:left;color:var(--chat-text, #182230);background:#fff;border:1px solid #d8dee8;border-radius:14px;box-shadow:0 5px 18px #0f172a12}button.chat-artifact-card{cursor:pointer}.chat-artifact-card.is-selected{border-color:var(--accent);box-shadow:0 0 0 2px color-mix(in oklch,var(--accent) 22%,transparent)}.chat-artifact-card>img{width:190px;aspect-ratio:5 / 3;-o-object-fit:cover;object-fit:cover;background:#eef1f5}.chat-artifact-card-copy{display:flex;min-width:0;flex:1;flex-direction:column;justify-content:center;gap:7px;padding:14px 14px 14px 0}.chat-artifact-card-copy strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.chat-artifact-kicker{display:flex;align-items:center;gap:6px;color:#637083;font-size:12px}.chat-artifact-kicker svg{width:14px;height:14px}.chat-artifact-gate{width:-moz-fit-content;width:fit-content;padding:3px 8px;border-radius:999px;color:#11643b;background:#e7f7ee;font-size:11px;font-weight:650}.chat-artifact-gate-warnings{color:#7a4a00;background:#fff3d6}.chat-artifact-gate-failed{color:#9b2c2c;background:#fee9e7}.chat-artifact-generating,.chat-artifact-error{align-items:center;padding:16px}.chat-artifact-generating span:not(.chat-artifact-pulse),.chat-artifact-error span{display:flex;flex-direction:column;gap:3px}.chat-artifact-generating small,.chat-artifact-error small{color:#687386}.chat-artifact-error{border-color:#efb7b1}.chat-artifact-error>svg{width:24px;color:#b3372d}.chat-artifact-pulse{width:22px;height:22px;border:3px solid #d7dde8;border-top-color:#5367d9;border-radius:50%;animation:chat-artifact-spin .8s linear infinite}@keyframes chat-artifact-spin{to{transform:rotate(360deg)}}.chat-artifact-workspace{position:relative;min-width:0;min-height:0;flex:1;display:flex;overflow:hidden}.chat-artifact-workspace-content{min-width:0;min-height:0;flex:1;display:flex;overflow:hidden}.chat-artifact-workspace-chat>.chat-artifact-workspace-content>.chat-main{width:100%}.chat-artifact-workspace-shared{min-height:0}.chat-artifact-workspace-shared>.chat-artifact-workspace-content{overflow:auto}.chat-artifact-workspace-reader{height:100%}.chat-artifact-workspace-reader>.chat-artifact-workspace-content>.reader-workspace{width:100%}.chat-artifact-workspace-pane{min-width:0;min-height:0;flex:none;display:flex;overflow:hidden}.chat-artifact-resize-handle{position:relative;z-index:7;width:1px;flex:0 0 1px;cursor:col-resize;background:var(--hairline-strong);touch-action:none;outline:none}.chat-artifact-resize-handle:before{content:"";position:absolute;top:0;right:-8px;bottom:0;left:-8px}.chat-artifact-resize-handle:focus-visible{box-shadow:0 0 0 2px var(--accent)}.chat-artifact-panel{width:100%;height:100%;min-width:0;min-height:0;display:grid;grid-template-rows:auto auto minmax(0,1fr) auto;overflow:hidden;color:var(--ink);background:#f6f7f9;border-left:1px solid var(--hairline)}.chat-artifact-panel.is-dialog{position:fixed;z-index:1200;top:0;right:0;bottom:0;left:0;border:0}.chat-artifact-panel.is-reader-fallback{position:absolute}.chat-artifact-panel header{display:flex;align-items:center;justify-content:space-between;padding:16px 20px;background:#fff;border-bottom:1px solid #dce1e8}.chat-artifact-panel header span{color:#6d7788;font-size:12px;text-transform:uppercase;letter-spacing:.06em}.chat-artifact-panel h2{margin:2px 0 0;font-size:18px}.chat-artifact-panel header button{display:grid;place-items:center;width:36px;height:36px;border:0;border-radius:8px;background:transparent;cursor:pointer}.chat-paper-status{margin:4px 0 0;color:#687386;font-size:12px}.chat-artifact-header-actions{display:flex;align-items:center;gap:6px}.chat-artifact-header-actions>button:first-child{width:auto;min-height:36px;padding:7px 10px;border:1px solid #cfd6e4;color:#253143;background:#fff;font-size:12px}.chat-artifact-version{display:flex;align-items:center;gap:7px;margin-left:auto;margin-right:8px;color:#687386;font-size:12px}.chat-artifact-version select{padding:6px 8px;border:1px solid #cfd6e4;border-radius:7px;background:#fff}.chat-artifact-panel>nav{position:sticky;z-index:1;top:0;display:flex;gap:4px;padding:8px 18px 0;background:#fff}.chat-artifact-panel nav button{padding:9px 14px;border:0;border-bottom:2px solid transparent;color:#667085;background:transparent;cursor:pointer}.chat-artifact-panel nav button.active{color:#273a91;border-bottom-color:#5367d9;font-weight:650}.chat-artifact-panel button:focus-visible,.chat-artifact-panel a:focus-visible,.chat-artifact-panel input:focus-visible,.latex-source-editor .cm-content:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.chat-artifact-panel-body{min-height:0;display:grid;place-items:center;overflow:auto;padding:20px}.chat-artifact-panel-body>.pdf-viewer{align-self:stretch;justify-self:stretch;width:100%;height:100%}.chat-artifact-panel-body>img{max-width:100%;max-height:100%;-o-object-fit:contain;object-fit:contain;background:#fff;box-shadow:0 4px 22px #0f172a1f}.chat-artifact-panel-body>pre{align-self:stretch;justify-self:stretch;overflow:auto;margin:0;padding:18px;color:#d8dee9;background:#18202c;border-radius:10px;font-size:12px;white-space:pre-wrap}.chat-artifact-source-workspace{width:100%;height:100%;min-height:0;display:flex;overflow:hidden;border-radius:10px;background:#18202c}.chat-artifact-source-workspace>nav{width:min(180px,28%);flex:none;display:flex;flex-direction:column;overflow:auto;padding:10px;border-right:1px solid #ffffff24}.chat-artifact-source-workspace>nav button{overflow:hidden;border:0;padding:7px 8px;color:#aeb8c8;background:transparent;text-align:left;text-overflow:ellipsis;white-space:nowrap}.chat-artifact-source-workspace>nav button[aria-pressed=true]{color:#fff;background:#ffffff14}.chat-artifact-source-workspace>pre{min-width:0;flex:1;overflow:auto;margin:0;padding:18px;color:#d8dee9;font-size:12px;white-space:pre-wrap}.latex-editor-column{min-width:0;flex:1;display:flex;flex-direction:column;color:#d8dee9}.latex-source-editor{min-width:0;min-height:0;flex:1;overflow:auto}.latex-source-editor .cm-editor{height:100%;min-height:320px;font-size:13px}.latex-source-editor .cm-scroller{overflow:auto;font-family:ui-monospace,SFMono-Regular,Menlo,monospace}.latex-file-action{display:flex;align-items:center;gap:6px;margin-top:8px}.latex-file-action svg,.latex-file-buttons svg{width:14px;height:14px}.latex-file-buttons{display:flex;gap:8px;padding:8px;border-top:1px solid #ffffff24}.latex-file-buttons button,.chat-artifact-actions button{display:inline-flex;align-items:center;gap:7px;border:0;border-radius:7px;padding:8px 10px;cursor:pointer}.chat-artifact-actions button:disabled{cursor:not-allowed;opacity:.55}.chat-artifact-panel footer{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;padding:14px 20px;background:#fff;border-top:1px solid #dce1e8}.chat-artifact-metadata{display:flex;min-width:0;flex-direction:column;gap:3px;color:#687386;font-size:12px}.chat-artifact-metadata strong{color:#253143}.chat-artifact-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:8px}.chat-artifact-actions a{display:inline-flex;align-items:center;gap:5px;padding:8px 10px;color:#263b94;border:1px solid #cfd6e4;border-radius:8px;text-decoration:none;font-size:12px;font-weight:600}.chat-artifact-actions svg{width:14px;height:14px}.paper-pdf-toolbar{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px;width:100%;padding:8px;border-bottom:1px solid #dce1e8;background:#fff}.paper-pdf-toolbar-group{display:flex;align-items:center;gap:6px}.paper-pdf-toolbar button,.paper-pdf-toolbar input,.paper-pdf-toolbar a{min-height:32px;border:1px solid #cfd6e4;border-radius:7px;padding:5px 8px;color:#253143;background:#fff;font-size:12px;text-decoration:none}.paper-pdf-toolbar input{width:56px}.paper-pdf-toolbar button:disabled{cursor:not-allowed;opacity:.55}@media (max-width: 700px){.chat-artifact-card>img{width:120px}.chat-artifact-panel{width:100vw;height:100dvh}.chat-artifact-panel footer{align-items:stretch;flex-direction:column}.chat-artifact-actions{justify-content:flex-start}.chat-artifact-panel header{padding:12px 14px}.chat-artifact-header-actions>button:first-child{padding-inline:8px}.paper-pdf-toolbar{align-items:flex-start;flex-direction:column}}@media (forced-colors: active){.chat-artifact-resize-handle,.chat-artifact-card.is-selected{border:1px solid ButtonText}}@media (prefers-reduced-motion: reduce){.chat-artifact-pulse{animation-duration:.01ms}}.chat-ghost-link{color:var(--ink-soft);font-size:13px;padding:6px 10px;border-radius:6px}.chat-ghost-link:hover{color:var(--ink);background:var(--bg-subtle)}.chat-conversation-viewport{position:relative;display:flex;flex-direction:column;flex:1;min-height:0}.chat-conversation{flex:1;min-height:0;overflow-y:auto}.chat-jump-latest{position:absolute;bottom:12px;left:50%;transform:translate(-50%);border:1px solid var(--border);border-radius:20px;padding:8px 14px;background:var(--bg);color:var(--ink);box-shadow:0 2px 8px #0000001f;white-space:nowrap;cursor:pointer}.chat-conversation-inner{max-width:820px;margin:0 auto;padding:30px 28px 40px}.chat-msg{margin-bottom:26px}.chat-msg-user{display:flex;justify-content:flex-end}.chat-user-message-wrap{display:flex;flex-direction:column;align-items:flex-end;max-width:74%}.chat-bubble{background:var(--accent-soft);color:var(--ink);border:1px solid color-mix(in oklch,var(--accent-soft) 70%,var(--hairline));border-radius:16px 16px 4px;padding:12px 18px;font-family:var(--serif);font-size:16px;line-height:1.45;max-width:100%;white-space:pre-wrap;overflow-wrap:anywhere;-webkit-user-select:text;-moz-user-select:text;user-select:text;cursor:text}.chat-bubble::-moz-selection,.chat-bubble *::-moz-selection{background:var(--accent);color:var(--bg)}.chat-bubble::selection,.chat-bubble *::selection{background:var(--accent);color:var(--bg)}.chat-user-actions{display:flex;justify-content:flex-end;gap:2px;min-height:30px;padding:4px 2px 0;opacity:0;transform:translateY(-2px);transition:opacity .14s ease,transform .14s ease;-webkit-user-select:none;-moz-user-select:none;user-select:none}.chat-msg-user:hover .chat-user-actions,.chat-msg-user:focus-within .chat-user-actions{opacity:1;transform:translateY(0)}.chat-user-action{width:28px;height:28px;display:inline-flex;align-items:center;justify-content:center;border:1px solid transparent;border-radius:999px;color:var(--ink-soft);background:transparent}.chat-user-action:hover{color:var(--ink);background:var(--bg-elevated);border-color:var(--hairline)}.chat-user-action:focus-visible{outline:2px solid var(--accent);outline-offset:2px;opacity:1}.chat-user-action svg{width:14px;height:14px}.chat-inline-editor{width:min(620px,74%);min-width:min(360px,100%);padding:12px;border:1px solid color-mix(in oklch,var(--accent) 45%,var(--hairline));border-radius:16px 16px 4px;background:var(--accent-soft);box-shadow:0 8px 28px #00000014}.chat-inline-editor-textarea{position:relative;z-index:1;display:block;width:100%;min-height:72px;padding:8px 10px;resize:none;border:1px solid var(--hairline-strong);border-radius:10px;color:var(--ink);background:transparent;font-family:var(--serif);font-size:16px;line-height:1.45;white-space:pre-wrap}.chat-inline-editor-textarea-wrap{position:relative;background:var(--bg-elevated);border-radius:10px}.chat-inline-editor-textarea-wrap .chat-inline-editor-textarea{color:transparent;caret-color:var(--ink)}.chat-inline-editor-textarea:focus{outline:2px solid var(--accent);outline-offset:1px}.chat-inline-editor-notice{margin:8px 2px 0;color:var(--ink-soft);font-size:12.5px;line-height:1.4}.chat-inline-editor-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:10px}.chat-inline-editor-actions button{min-height:34px;padding:6px 14px;border:1px solid var(--hairline-strong);border-radius:999px;color:var(--ink);background:var(--bg-elevated);font-size:13px;font-weight:600}.chat-inline-editor-actions button:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.chat-inline-editor-actions .chat-inline-editor-send{color:#fff;border-color:var(--accent);background:var(--accent)}.chat-inline-editor-actions button:disabled{cursor:not-allowed;opacity:.5}.chat-msg-blocks{display:flex;flex-direction:column;gap:14px}.chat-waiting{min-height:20px;display:flex;align-items:center;font-size:13px;font-weight:600}.chat-thinking{color:transparent;background:linear-gradient(100deg,var(--ink-faint) 30%,var(--accent-text) 50%,var(--ink-faint) 70%);background-size:220% 100%;background-clip:text;-webkit-background-clip:text;animation:chat-thinking-glow 1.8s ease-in-out infinite}@keyframes chat-thinking-glow{0%{background-position:100% 0}to{background-position:-100% 0}}@media (prefers-reduced-motion: reduce){.chat-thinking{color:var(--accent-text);background:none;animation:none}}.chat-reason-live{border:1px solid var(--hairline);border-left:2px solid var(--accent);background:var(--bg-elevated);border-radius:10px;padding:14px 16px}.chat-reason-live-head{display:flex;align-items:center;gap:9px;font-size:12.5px;font-weight:600;color:var(--accent-text)}.chat-reason-live-body{margin-top:9px;font-family:var(--serif);font-size:14.5px;line-height:1.6;color:var(--ink-soft)}.chat-reason-done{border:1px solid var(--hairline);border-radius:10px;background:var(--bg-elevated);overflow:hidden}.chat-reason-done-head{display:flex;align-items:center;gap:9px;width:100%;padding:11px 15px;font-size:13px;color:var(--ink-soft);font-weight:500;text-align:left}.chat-reason-done-head svg:first-child{color:var(--positive-text);flex:none}.chat-reason-done-head .chat-chev{margin-left:auto}.chat-reason-done-head:hover{color:var(--ink)}.chat-reason-done-body{padding:2px 16px 16px 39px;font-family:var(--serif);font-size:14px;line-height:1.65;color:var(--ink-soft)}.chat-answer.chat-reason-markdown{padding-top:0;padding-right:0;padding-bottom:0;font-size:inherit;line-height:inherit;color:inherit;white-space:normal}.chat-answer.chat-reason-live-body{padding-left:23px}.chat-answer.chat-reason-done-body{padding:2px 16px 16px 39px}.chat-tool{border:1px solid var(--hairline);border-radius:10px;background:var(--bg-elevated);overflow:hidden}.chat-tool-running{border-color:color-mix(in oklch,var(--accent) 35%,var(--hairline))}.chat-tool-failed{border-color:color-mix(in oklch,#b42318 55%,var(--hairline))}.chat-tool-failed .chat-tool-status{color:#b42318;font-weight:600}.chat-tool-head{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;padding:11px 15px;text-align:left}.chat-tool-head:disabled{cursor:default}.chat-tool-head-left{display:flex;align-items:center;gap:9px;min-width:0}.chat-tool-head-left>svg{color:var(--accent-text);flex:none}.chat-tool-name{font-family:var(--mono);font-size:12px;font-weight:600;color:var(--ink);background:var(--bg-subtle);border:1px solid var(--hairline);border-radius:5px;padding:2px 7px;flex:none}.chat-tool-query{font-family:var(--serif);font-style:italic;font-size:13.5px;color:var(--ink-soft);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.chat-tool-head-right{display:flex;align-items:center;gap:10px;flex:none}.chat-tool-status{font-size:11.5px;color:var(--ink-soft);font-variant-numeric:tabular-nums}.chat-tool-body{padding:4px 16px 16px;border-top:1px solid var(--hairline)}.chat-tool-args{margin:12px 0 4px}.chat-tool-label{display:block;font-family:var(--mono);font-size:10px;letter-spacing:.1em;text-transform:uppercase;color:var(--ink-faint);margin-bottom:6px}.chat-tool-args pre{margin:0;background:var(--bg-subtle);border:1px solid var(--hairline);border-radius:8px;padding:10px 12px;font-family:var(--mono);font-size:11.5px;line-height:1.5;color:var(--ink-soft);overflow-x:auto}.chat-tool-results-label{margin-top:16px}.chat-tool-output-head{display:flex;align-items:center;justify-content:space-between;margin-top:14px}.chat-tool-output-head .chat-tool-label{margin-bottom:0}.chat-tool-copy{color:var(--accent-text);font-family:var(--mono);font-size:11px}.chat-tool-output{max-height:320px;margin:7px 0 0;overflow:auto;white-space:pre;-moz-tab-size:4;-o-tab-size:4;tab-size:4;border:1px solid var(--hairline);border-radius:8px;background:var(--bg-subtle);padding:11px 12px;color:var(--ink);font-family:var(--mono);font-size:11.5px;line-height:1.5}.chat-tool-truncated{margin-top:7px;color:var(--ink-faint);font-size:11px}.chat-mcp-app{border:1px solid var(--chat-border, #d8d8de);border-radius:12px;overflow:hidden;background:var(--chat-surface, #fff)}.chat-mcp-app>header{display:flex;justify-content:flex-end;padding:8px 10px 0}.chat-mcp-app button{border:0;border-radius:6px;background:#eef1f5;padding:5px 8px;cursor:pointer}.chat-mcp-app iframe{display:block;width:100%;border:0;background:#fff;aspect-ratio:4 / 3}.chat-mcp-loading,.chat-mcp-error{min-height:180px;aspect-ratio:4 / 3;display:grid;place-items:center;padding:18px;color:#52606d;text-align:center}.chat-mcp-error{gap:12px}.chat-mcp-app-fullscreen{position:fixed;top:16px;right:16px;bottom:16px;left:16px;z-index:1000}.chat-mcp-app-fullscreen iframe{height:calc(100vh - 72px)!important;aspect-ratio:auto}.chat-tool-results{list-style:none;margin:0;padding:0}.chat-hit{padding:11px 0;border-top:1px solid var(--hairline)}.chat-hit:first-child{border-top:0}.chat-hit-top{display:flex;align-items:baseline;gap:12px}.chat-hit-title{font-family:var(--serif);font-size:14.5px;font-weight:600;color:var(--accent-text);flex:1;line-height:1.3}.chat-hit-title:hover{text-decoration:underline}.chat-hit-meta{font-size:12px;color:var(--ink-faint);margin-top:2px}.chat-hit-truncated{color:var(--ink-faint);font-style:italic}.chat-hit-snippet{font-family:var(--serif);font-size:13.5px;line-height:1.5;color:var(--ink-soft);margin-top:5px;text-wrap:pretty}.chat-answer{font-family:var(--serif);font-size:16.5px;line-height:1.65;color:var(--ink);text-wrap:pretty;padding:2px}.chat-answer>:first-child{margin-top:0}.chat-answer>:last-child{margin-bottom:0}.chat-answer p{margin:0 0 .9em}.chat-answer h1,.chat-answer h2,.chat-answer h3,.chat-answer h4{font-family:var(--sans);font-weight:600;line-height:1.3;margin:1.35em 0 .5em}.chat-answer h1{font-size:1.45em}.chat-answer h2{font-size:1.25em}.chat-answer h3{font-size:1.08em}.chat-answer h4{font-size:1em}.chat-answer ul,.chat-answer ol{margin:0 0 .9em;padding-left:1.5em}.chat-answer ul{list-style-type:disc}.chat-answer ol{list-style-type:decimal}.chat-answer ul ul{list-style-type:circle}.chat-answer ul ul ul{list-style-type:square}.chat-answer li{margin:.2em 0}.chat-answer li>p{margin:0}.chat-answer blockquote{margin:0 0 .9em;padding-left:1em;border-left:3px solid var(--hairline-strong);color:var(--ink-soft)}.chat-answer code{font-family:var(--mono);font-size:.84em;background:var(--bg-subtle);border:1px solid var(--hairline);border-radius:4px;padding:.1em .3em}.chat-answer pre{margin:0 0 1em;padding:12px 14px;overflow-x:auto;background:var(--bg-subtle);border:1px solid var(--hairline);border-radius:8px;line-height:1.5}.chat-answer pre code{background:none;border:0;padding:0}.chat-answer table{display:block;width:-moz-max-content;width:max-content;max-width:100%;overflow-x:auto;border-collapse:collapse;margin:0 0 1em;font-family:var(--sans);font-size:.88em}.chat-answer th,.chat-answer td{border:1px solid var(--hairline);padding:6px 10px;text-align:left}.chat-answer th{background:var(--bg-subtle);font-weight:600}.chat-answer hr{border:0;border-top:1px solid var(--hairline);margin:1.25em 0}.chat-answer input[type=checkbox]{margin-right:.4em}.chat-answer strong{font-weight:600}.chat-error{display:flex;flex-wrap:wrap;align-items:flex-start;justify-content:space-between;gap:12px;border:1px solid var(--negative-border);background:var(--negative-bg);color:var(--negative-text);border-radius:10px;padding:12px 16px;font-size:13.5px;overflow-wrap:anywhere}.chat-error>span:first-child{flex:1 1 280px;min-width:0}.chat-finish-note{font-family:var(--serif);font-style:italic;font-size:13px;color:var(--ink-faint)}.chat-feedback{display:flex;align-items:center;gap:4px;min-height:30px;margin-top:8px;color:var(--ink-faint);font-size:12px}.chat-feedback-label{margin-right:2px}.chat-feedback-action{width:28px;height:28px;display:inline-flex;align-items:center;justify-content:center;border:1px solid transparent;border-radius:999px;color:var(--ink-soft);background:transparent}.chat-feedback-action:hover:not(:disabled),.chat-feedback-action-selected{color:var(--accent-text);background:var(--accent-soft);border-color:color-mix(in oklch,var(--accent) 35%,var(--hairline))}.chat-feedback-action:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.chat-feedback-action:disabled{cursor:wait}.chat-feedback-action svg{width:14px;height:14px}.chat-feedback-error{color:var(--negative-text);margin-left:4px}.chat-feedback-panel{width:min(460px,100%);margin-top:8px;padding:16px;border:1px solid var(--hairline);border-radius:12px;background:var(--bg-elevated);box-shadow:0 10px 30px #0000001a}.chat-feedback-panel-title{color:var(--ink);font-size:15px;font-weight:600}.chat-feedback-panel-label{display:block;margin-top:4px;color:var(--ink-soft);font-size:13px}.chat-feedback-comment{display:block;width:100%;min-height:92px;margin-top:12px;padding:10px 12px;resize:vertical;border:1px solid var(--hairline-strong);border-radius:8px;color:var(--ink);background:var(--bg);font:14px/1.45 var(--sans)}.chat-feedback-comment:focus{border-color:var(--accent);outline:2px solid color-mix(in oklch,var(--accent) 25%,transparent);outline-offset:1px}.chat-feedback-panel-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:12px}.chat-feedback-panel-actions button{min-width:72px;padding:8px 14px;border-radius:8px;font:600 13px var(--sans)}.chat-feedback-skip{border:1px solid transparent;color:var(--ink-soft);background:transparent}.chat-feedback-submit{border:1px solid var(--ink);color:var(--bg);background:var(--ink)}.chat-feedback-panel-actions button:disabled{cursor:wait;opacity:.65}.chat-error a,.chat-error button{flex:none;max-width:100%;color:var(--accent-text);font-weight:600;text-decoration:none}.chat-error button{border:0;padding:0;background:transparent;cursor:pointer;font:inherit;text-align:left;white-space:normal}.chat-error button:disabled{cursor:wait;opacity:.65}.chat-error-actions{display:flex;flex:0 1 auto;min-width:0;max-width:100%;flex-wrap:wrap;justify-content:flex-start;gap:8px 16px}.chat-error a:hover,.chat-error button:hover:not(:disabled){text-decoration:underline}@media (max-width: 900px){.chat-user-message-wrap{max-width:90%}.chat-inline-editor{width:90%;min-width:0}.chat-conversation-inner{padding:22px 16px 32px}}@media (max-width: 560px){.shared-chat-content .chat-user-message-wrap{max-width:88%}}@media (hover: none),(pointer: coarse){.chat-user-actions{opacity:1;transform:none}}.chat-compaction-status{flex-direction:column;align-items:flex-start}.chat-compaction-explanation{margin-top:4px;color:var(--ink-faint);font-weight:400}.chat-caret{display:inline-block;width:7px;height:1.05em;background:var(--accent);margin-left:1px;vertical-align:text-bottom;animation:chat-blink 1s steps(1) infinite}@keyframes chat-blink{50%{opacity:0}}.chat-chev{transition:transform .18s;color:var(--ink-faint)}.chat-chev-open{transform:rotate(180deg)}.chat-spinner{width:14px;height:14px;border:2px solid color-mix(in oklch,var(--accent) 25%,transparent);border-top-color:var(--accent);border-radius:50%;display:inline-block;animation:chat-spin .7s linear infinite;flex:none}.chat-spinner-light{border-color:#fff6;border-top-color:#fff}@keyframes chat-spin{to{transform:rotate(360deg)}}.shared-chat-page{min-height:0;display:flex;flex-direction:column;overflow:hidden;background:var(--bg)}.shared-chat-heading{flex:none;border-bottom:1px solid var(--hairline);display:flex;align-items:center;gap:10px}.shared-chat-heading h1{max-width:calc(50vw + 640px);margin:0 auto;padding:13px 32px;color:var(--ink);font-family:var(--serif);font-size:20px;font-weight:600;line-height:1.1}.shared-chat-content{width:min(876px,100%);margin:0 auto;padding:34px 28px 64px}.shared-chat-transcript{padding:0 0 26px}.shared-chat-attribution{display:flex;flex-wrap:wrap;justify-content:center;gap:5px 12px;color:var(--ink-faint);font-size:12px;line-height:1.5}.shared-chat-attribution a{color:inherit;font-weight:600;text-decoration:none}.shared-chat-attribution a:hover{color:var(--accent-text);text-decoration:underline}.shared-chat-fresh{margin-top:26px;padding-top:28px;border-top:1px solid var(--hairline)}.shared-chat-fresh h2{margin:0 0 6px;font-family:var(--serif);font-size:21px;font-weight:600}.shared-chat-fresh>p{margin:0 0 16px;color:var(--ink-soft);font-family:var(--serif)}.shared-chat-access-note{margin:-6px 0 16px;padding:10px 12px;border:1px solid color-mix(in oklch,var(--accent) 24%,var(--hairline));border-radius:9px;color:var(--ink-soft);background:color-mix(in oklch,var(--accent) 5%,var(--bg-elevated));font-size:13px;line-height:1.45}.shared-chat-access-note a{color:var(--accent-text);font-weight:600}.shared-chat-state{min-height:55vh;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;padding:48px 24px;text-align:center;color:var(--ink-soft)}.shared-chat-state h1{margin:0;color:var(--ink);font-family:var(--serif);font-size:27px}.shared-chat-state p{margin:0}.shared-chat-state button{margin-top:8px;padding:7px 13px;border:1px solid var(--hairline-strong);border-radius:7px;background:var(--bg-elevated);color:var(--ink)}@media (max-width: 900px){.shared-chat-heading h1{padding-inline:16px}}@media (max-width: 640px){.shared-chat-heading h1{padding-inline:14px}}@media (max-width: 560px){.shared-chat-content{padding:26px 16px 48px}} diff --git a/assets/input-CCN-4hy4.js b/assets/input-DEeEc0bH.js similarity index 88% rename from assets/input-CCN-4hy4.js rename to assets/input-DEeEc0bH.js index 258837e7eee44ff1152370d6822d090b8634a6c1..f609b8b1a57dca548dcaaf2a5eaeeb10460eba5b 100644 --- a/assets/input-CCN-4hy4.js +++ b/assets/input-DEeEc0bH.js @@ -1 +1 @@ -import{r as s,j as i,B as n}from"./index-D6jcIRWs.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{r as s,j as i,A as n}from"./index-YwiKC6Po.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-BuDrH29B.js b/assets/loader-circle-B0KtDERb.js similarity index 85% rename from assets/loader-circle-BuDrH29B.js rename to assets/loader-circle-B0KtDERb.js index 82ce1c7a85e164712357ee00e84592f7e023636e..e5deabb1e31cafe47c0e3c85a68295079f653404 100644 --- a/assets/loader-circle-BuDrH29B.js +++ b/assets/loader-circle-B0KtDERb.js @@ -1,4 +1,4 @@ -import{n as e}from"./index-D6jcIRWs.js";/** +import{n as e}from"./index-YwiKC6Po.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/moon--2wi3KtT.js b/assets/moon-DfjUzC9G.js similarity index 85% rename from assets/moon--2wi3KtT.js rename to assets/moon-DfjUzC9G.js index b27372d1a9e48ecaff85c38c464bf7f5068e725a..3f7c1ec5de4e8d940a848aff3023daca7a429c51 100644 --- a/assets/moon--2wi3KtT.js +++ b/assets/moon-DfjUzC9G.js @@ -1,4 +1,4 @@ -import{n as o}from"./index-D6jcIRWs.js";/** +import{n as o}from"./index-YwiKC6Po.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/openrouter-DrXWVMlM.js b/assets/openrouter-BT3NQ0bL.js similarity index 82% rename from assets/openrouter-DrXWVMlM.js rename to assets/openrouter-BT3NQ0bL.js index dcc24d1604a8080330d4b6c32482fd028fc606e8..0775dfb667cb76a03e36a24d5712660292da4b5f 100644 --- a/assets/openrouter-DrXWVMlM.js +++ b/assets/openrouter-BT3NQ0bL.js @@ -1 +1 @@ -import{u as r}from"./useQuery-CUJUm4FY.js";import{c as n}from"./chat-ChnK8XDU.js";const u=["chat","openrouter","usage"],o=["chat","openrouter","credential"];function s(e=!0){return r({queryKey:u,queryFn:()=>n.getUsage(),enabled:e,staleTime:3e4,refetchOnWindowFocus:!0})}function c(e=!0){return r({queryKey:o,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{o as O,s as a,m as r,c as u}; +import{u as r}from"./useQuery-DPH6Mb2w.js";import{c as n}from"./chat-DHGOonJg.js";const u=["chat","openrouter","usage"],o=["chat","openrouter","credential"];function s(e=!0){return r({queryKey:u,queryFn:()=>n.getUsage(),enabled:e,staleTime:3e4,refetchOnWindowFocus:!0})}function c(e=!0){return r({queryKey:o,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{o as O,s as a,m as r,c as u}; diff --git a/assets/paperEdits-DUTCoe5T.js b/assets/paperEdits-B8a9u4Tx.js similarity index 84% rename from assets/paperEdits-DUTCoe5T.js rename to assets/paperEdits-B8a9u4Tx.js index e5af1f7766e6fff1d2938ee808fec399dca635ce..b7dd0f22d04432950cdbbf5bbc41f1df68cdc93d 100644 --- a/assets/paperEdits-DUTCoe5T.js +++ b/assets/paperEdits-B8a9u4Tx.js @@ -1 +1 @@ -import{a5 as p}from"./index-D6jcIRWs.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{a5 as p}from"./index-YwiKC6Po.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/paperQueryKeys-C5FMa4Oj.js b/assets/paperQueryKeys-C5FMa4Oj.js new file mode 100644 index 0000000000000000000000000000000000000000..498ee062e894cd60b9392f2c51b3d97560437cab --- /dev/null +++ b/assets/paperQueryKeys-C5FMa4Oj.js @@ -0,0 +1 @@ +import{p as n}from"./curation-CkzNFTMJ.js";import{a5 as c,aO as h,aP as m}from"./index-YwiKC6Po.js";function p(a){const e=new URLSearchParams;for(const[t,s]of Object.entries(a??{}))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,i]of Object.entries(e??{}))i!==void 0&&i!==""&&r.set(s,String(i));const t=r.toString();return this.request(`/papers/${t?`?${t}`:""}`,{cache:"no-cache"})}search(e,r=1,t=10,s,i,o){const u=new URLSearchParams({q:e,page:r.toString(),page_size:t.toString()});return s&&u.set("mode",s),o!=null&&o.start_date&&u.set("start_date",o.start_date),o!=null&&o.end_date&&u.set("end_date",o.end_date),this.request(`/papers/search?${u.toString()}`,{signal:i})}searchFeed(e){return this.request(`/papers/search/feed${p(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,i]of Object.entries(e??{}))i!==void 0&&r.set(s,String(i));const t=r.toString();return this.request(`/papers/trending${t?`?${t}`:""}`,{cache:"no-store"})}xTrending(e){return this.request(`/papers/x-trending${p(e)}`)}forTask(e,r){return this.request(`/tasks/${e}/papers${p(r)}`)}forMethod(e,r){return this.request(`/methods/${encodeURIComponent(e)}/papers${p(r)}`)}forConference(e,r){return this.request(`/conferences/${e}/papers${p(r)}`)}forOrganization(e,r){return this.request(`/organizations/${e}/papers${p(r)}`)}getAuthor(e){return this.request(`/authors/${e}`)}searchAuthors(e,r){return this.request(`/authors/${p({search:e,page_size:r})}`)}primeCurationState(e,r=!1){return n.primePaper(e,r)}freshAuthMutationDraft(){return n.freshAuthMutationDraft()}resumeFreshAuthMutation(){return n.resumeFreshAuthMutation()}updateTasks(e,r){const t=new URLSearchParams(r.map(s=>["task_ids",String(s)])).toString();return n.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 n.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 n.mutatePaper(e,"organizations",r,`/papers/${e}/organizations?${t}`,{method:"PUT"})}updateRepositories(e,r){return n.mutatePaper(e,"repositories",r,`/papers/${e}/repositories`,{method:"PUT",body:JSON.stringify({repositories:r})})}updateProjectPages(e,r){return n.mutatePaper(e,"project_pages",r,`/papers/${e}/project-pages`,{method:"PUT",body:JSON.stringify({project_pages:r})})}updateXThreads(e,r){return n.mutatePaper(e,"x_threads",r,`/papers/${e}/x-threads`,{method:"PUT",body:JSON.stringify({x_threads:r})})}updateSourceUrl(e,r){return n.mutatePaper(e,"source_url",r,`/papers/${e}/source-url`,{method:"PUT",body:JSON.stringify({source_url:r})})}updateHfArtifacts(e,r){return n.mutatePaper(e,"hf_artifacts",r,`/papers/${e}/hf-artifacts`,{method:"PUT",body:JSON.stringify(r)})}}const $=new d(c);async function y(a){return(await h(`/papers/${encodeURIComponent(a)}/web-markdown`)).text()}function P(a){return m(`/papers/${encodeURIComponent(a)}/layout`)}const S={detail:a=>["paper",a],arxiv:a=>["paper-arxiv",a],preview:a=>["paper-preview",a],summary:a=>["paper-summary",a],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"]}};export{$ as a,P as b,y as g,S as p}; diff --git a/assets/papers-DIIIPDpj.js b/assets/papers-DIIIPDpj.js deleted file mode 100644 index 036fcd779415daed415a08c1bafd64fd017cf43a..0000000000000000000000000000000000000000 --- a/assets/papers-DIIIPDpj.js +++ /dev/null @@ -1 +0,0 @@ -var y=Object.defineProperty;var w=(a,e,t)=>e in a?y(a,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[e]=t;var m=(a,e,t)=>w(a,typeof e!="symbol"?e+"":e,t);import{A as f,aP as v,a5 as l,aQ as S,aR as $}from"./index-D6jcIRWs.js";const T={detail:a=>["paper",a],arxiv:a=>["paper-arxiv",a],preview:a=>["paper-preview",a],summary:a=>["paper-summary",a],feeds:{list:["papers"],infinite:["papers-infinite"],xTrending:["x-trending-papers-infinite"],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"]}},d="pwc:fresh-auth-mutation";function P(a){if(typeof window>"u")return;sessionStorage.setItem("pwc:fresh-auth-edit",a);const e=v("/api/v1/auth/hf/login");window.location.assign(`${e}?return_to=${encodeURIComponent(window.location.href)}`)}class q{constructor(e,t=P){m(this,"paperLoads",new Map);m(this,"evaluationLoads",new Map);this.request=e,this.recoverFreshAuth=t}primePaper(e,t=!1){t&&this.paperLoads.delete(e);let r=this.paperLoads.get(e);return r||(r=this.request(`/papers/${e}/curation-state`).catch(s=>{throw this.paperLoads.delete(e),s}),this.paperLoads.set(e,r)),r}primeEvaluations(e,t=!1){t&&this.evaluationLoads.delete(e);let r=this.evaluationLoads.get(e);return r||(r=this.request(`/evaluations/curation-state?paper_id=${e}`).catch(s=>{throw this.evaluationLoads.delete(e),s}),this.evaluationLoads.set(e,r)),r}async mutatePaper(e,t,r,s,o){const n=this.paperLoads.get(e);if(!n)throw new Error("The catalog version was not loaded when this editor opened. Close and reopen the editor.");const i=(await n).sections[t];if(!i)throw new Error(`Missing curation version for ${t}`);return this.mutate(t,s,r,i,o,`paper:${e}:${t}`)}async mutateEvaluations(e,t,r,s){const o=this.evaluationLoads.get(String(e));if(!o)throw new Error("The evaluation version was not loaded when this editor opened. Close and reopen the editor.");const n=(await o).version;return this.mutate("evaluations",r,t,n,s,`paper:${e}:evaluations`)}async mutate(e,t,r,s,o,n){const i=new Headers(o.headers);Object.entries(this.idempotencyHeaders(n,r,s)).forEach(([p,g])=>i.set(p,g));const c={...o,headers:i};try{const p=await this.request(t,c);return this.clearAttempt(c),p}catch(p){throw p instanceof f&&p.status===401&&p.code==="fresh_auth_required"?(this.saveFreshAuthMutation(e,t,r,c),this.recoverFreshAuth(e)):p instanceof f&&p.status===409&&(this.clearAttempt(c),typeof window<"u"&&window.dispatchEvent(new CustomEvent("pwc:catalog-conflict",{detail:{endpoint:t}}))),p}}freshAuthMutationDraft(){const e=sessionStorage.getItem(d);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(d),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(d),sessionStorage.removeItem("pwc:fresh-auth-edit"),t}saveFreshAuthMutation(e,t,r,s){const o=Object.fromEntries(new Headers(s.headers).entries()),n=typeof s.body=="string"?s.body:void 0;sessionStorage.setItem(d,JSON.stringify({section:e,endpoint:t,payload:r,options:{method:(s.method??"POST").toUpperCase(),body:n,headers:o}}))}idempotencyHeaders(e,t,r){const s=`pwc:mutation:${e}:${JSON.stringify(t)}`,o=sessionStorage.getItem(s);if(o){const i=JSON.parse(o);return{"Idempotency-Key":i.key,"If-Match":i.version}}const n=crypto.randomUUID();return sessionStorage.setItem(s,JSON.stringify({key:n,version:r})),sessionStorage.setItem(`pwc:mutation-key:${n}`,s),{"Idempotency-Key":n,"If-Match":r}}clearAttempt(e){const t=new Headers(e.headers).get("Idempotency-Key");if(!t)return;const r=sessionStorage.getItem(`pwc:mutation-key:${t}`);r&&sessionStorage.removeItem(r),sessionStorage.removeItem(`pwc:mutation-key:${t}`),this.paperLoads.clear(),this.evaluationLoads.clear()}}const u=new q(l);function h(a){const e=new URLSearchParams;for(const[r,s]of Object.entries(a??{}))s!==void 0&&s!==""&&e.set(r,String(s));const t=e.toString();return t?`?${t}`:""}class O{constructor(e){this.request=e}list(e){const t=new URLSearchParams;for(const[s,o]of Object.entries(e??{}))o!==void 0&&o!==""&&t.set(s,String(o));const r=t.toString();return this.request(`/papers/${r?`?${r}`:""}`,{cache:"no-cache"})}search(e,t=1,r=10,s,o,n){const i=new URLSearchParams({q:e,page:t.toString(),page_size:r.toString()});return s&&i.set("mode",s),n!=null&&n.start_date&&i.set("start_date",n.start_date),n!=null&&n.end_date&&i.set("end_date",n.end_date),this.request(`/papers/search?${i.toString()}`,{signal:o})}searchFeed(e){return this.request(`/papers/search/feed${h(e)}`,{cache:"no-cache"})}get(e,t=!0){const r=t?"?include_resources=true":"";return this.request(`/papers/${e}${r}`)}getByArxivId(e,t=!0){const r=t?"?include_resources=true":"";return this.request(`/papers/arxiv/${e}${r}`)}lookup(e){return this.request("/papers/lookup",{method:"POST",body:JSON.stringify({references:e})})}related(e,t=4){return this.request(`/papers/${encodeURIComponent(e)}/related?limit=${t}`)}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,t){return this.request(`/papers/${encodeURIComponent(e)}/copy-to-bucket`,{method:"POST",body:JSON.stringify(t)})}trending(e){const t=new URLSearchParams;for(const[s,o]of Object.entries(e??{}))o!==void 0&&t.set(s,String(o));const r=t.toString();return this.request(`/papers/trending${r?`?${r}`:""}`,{cache:"no-store"})}xTrending(e){return this.request(`/papers/x-trending${h(e)}`)}forTask(e,t){return this.request(`/tasks/${e}/papers${h(t)}`)}forMethod(e,t){return this.request(`/methods/${encodeURIComponent(e)}/papers${h(t)}`)}forConference(e,t){return this.request(`/conferences/${e}/papers${h(t)}`)}forOrganization(e,t){return this.request(`/organizations/${e}/papers${h(t)}`)}getAuthor(e){return this.request(`/authors/${e}`)}searchAuthors(e,t){return this.request(`/authors/${h({search:e,page_size:t})}`)}primeCurationState(e,t=!1){return u.primePaper(e,t)}freshAuthMutationDraft(){return u.freshAuthMutationDraft()}resumeFreshAuthMutation(){return u.resumeFreshAuthMutation()}updateTasks(e,t){const r=new URLSearchParams(t.map(s=>["task_ids",String(s)])).toString();return u.mutatePaper(e,"tasks",t,`/papers/${e}/tasks?${r}`,{method:"PUT"})}updateMethods(e,t){const r=new URLSearchParams(t.map(s=>["method_ids",String(s)])).toString();return u.mutatePaper(e,"methods",t,`/papers/${e}/methods?${r}`,{method:"PUT"})}updateOrganizations(e,t){const r=new URLSearchParams(t.map(s=>["organization_ids",String(s)])).toString();return u.mutatePaper(e,"organizations",t,`/papers/${e}/organizations?${r}`,{method:"PUT"})}updateRepositories(e,t){return u.mutatePaper(e,"repositories",t,`/papers/${e}/repositories`,{method:"PUT",body:JSON.stringify({repositories:t})})}updateProjectPages(e,t){return u.mutatePaper(e,"project_pages",t,`/papers/${e}/project-pages`,{method:"PUT",body:JSON.stringify({project_pages:t})})}updateXThreads(e,t){return u.mutatePaper(e,"x_threads",t,`/papers/${e}/x-threads`,{method:"PUT",body:JSON.stringify({x_threads:t})})}updateSourceUrl(e,t){return u.mutatePaper(e,"source_url",t,`/papers/${e}/source-url`,{method:"PUT",body:JSON.stringify({source_url:t})})}updateHfArtifacts(e,t){return u.mutatePaper(e,"hf_artifacts",t,`/papers/${e}/hf-artifacts`,{method:"PUT",body:JSON.stringify(t)})}}const _=new O(l);async function b(a){return(await S(`/papers/${encodeURIComponent(a)}/web-markdown`)).text()}function k(a){return $(`/papers/${encodeURIComponent(a)}/layout`)}export{_ as a,k as b,u as c,b as g,T as p}; diff --git a/assets/plus-C4UQ62Q1.js b/assets/plus-Cfz0QbT1.js similarity index 86% rename from assets/plus-C4UQ62Q1.js rename to assets/plus-Cfz0QbT1.js index 142b2da6bd21da3f0e0c1b40857ce477e18dc9e1..59c6864aae7c17678961794776c70498227a99b5 100644 --- a/assets/plus-C4UQ62Q1.js +++ b/assets/plus-Cfz0QbT1.js @@ -1,4 +1,4 @@ -import{n as e}from"./index-D6jcIRWs.js";/** +import{n as e}from"./index-YwiKC6Po.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/popover-DCjqGpW0.js b/assets/popover-D7ygxg37.js similarity index 93% rename from assets/popover-DCjqGpW0.js rename to assets/popover-D7ygxg37.js index 742465fa2dc4937f83c07b2e0b1b6fb8dd5ff819..7d1eaf078d7b6f0778a89c88a68f572c7d845aca 100644 --- a/assets/popover-DCjqGpW0.js +++ b/assets/popover-D7ygxg37.js @@ -1 +1 @@ -import{r as s,j as l,ad as V,v as $,aj as L,a8 as W,w as A,t as O,x as h,ak as E,al as y,P as _,am as H,z,an as B,ao as G,ap as K,aq as Z,ar as q,as as U,at as J,B as Q}from"./index-D6jcIRWs.js";function X(e){const t=Y(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 Y(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,[y]),m=y(),[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(_,{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(_,{present:n||a.open,children:a.modal?l.jsx(le,{...o,ref:t}):l.jsx(pe,{...o,ref:t})})});D.displayName=g;var ie=X("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 B(c)},[]),l.jsx(G,{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 K(),l.jsx(Z,{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(J,{...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:Q("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{r as s,j as l,ad as V,v as $,ai as L,a8 as W,w as A,t as O,x as h,aj as E,ak as y,P as _,al as H,z,aQ as G,aR as B,aS as K,aT as Z,am as Q,an as U,ao as q,A as J}from"./index-YwiKC6Po.js";function X(e){const t=Y(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 Y(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,[y]),m=y(),[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(_,{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(_,{present:n||a.open,children:a.modal?l.jsx(le,{...o,ref:t}):l.jsx(pe,{...o,ref:t})})});D.displayName=g;var ie=X("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 K(),l.jsx(Z,{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(q,{...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:J("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/queryInvalidation-BxCpTdQe.js b/assets/queryInvalidation-BxCpTdQe.js deleted file mode 100644 index 12b24f246437e33905f907f58bd197d9b712b7ee..0000000000000000000000000000000000000000 --- a/assets/queryInvalidation-BxCpTdQe.js +++ /dev/null @@ -1 +0,0 @@ -import{p as a}from"./papers-DIIIPDpj.js";function o(e,s,n){if(!e)return e;const i=r=>r.paper_id!==s||r.paper_title===n?r:{...r,paper_title:n};if(Array.isArray(e)){const r=e.map(i);return r.some((t,u)=>t!==e[u])?r:e}if(Array.isArray(e.results)){const r=e.results.map(i);return r.some((t,u)=>t!==e.results[u])?{...e,results:r}:e}return e}function v(e,s){const n=new Set(s.filter(i=>!!i));for(const i of n)for(const r of[a.detail(i),a.arxiv(i),a.preview(i),a.summary(i)])e.invalidateQueries({queryKey:r,exact:!0})}function f(e){for(const s of Object.values(a.feeds))e.invalidateQueries({queryKey:s,refetchType:"none"})}function p(e,s,n){new Set([...n,s.id,s.arxiv_id].filter(t=>!!t)).forEach(t=>{e.setQueryData(a.detail(t),s),e.setQueryData(a.arxiv(t),s),e.setQueriesData({queryKey:a.preview(t),exact:!0},s),e.setQueriesData({queryKey:a.summary(t),exact:!0},s)}),f(e);const r=String(s.id),c=t=>o(t,r,s.title);e.setQueriesData({queryKey:["evaluations"]},c),e.setQueriesData({queryKey:["dataset-evals"]},c),e.invalidateQueries({queryKey:["evaluations"],refetchType:"none"}),e.invalidateQueries({queryKey:["dataset-evals"],refetchType:"none"})}export{f as a,v as i,p as r}; diff --git a/assets/queryInvalidation-Dgyv9_oM.js b/assets/queryInvalidation-Dgyv9_oM.js new file mode 100644 index 0000000000000000000000000000000000000000..22daf6bd4ebddea20e411c99a316a30292bb95ec --- /dev/null +++ b/assets/queryInvalidation-Dgyv9_oM.js @@ -0,0 +1 @@ +import{p as a}from"./paperQueryKeys-C5FMa4Oj.js";function o(e,s,n){if(!e)return e;const i=r=>r.paper_id!==s||r.paper_title===n?r:{...r,paper_title:n};if(Array.isArray(e)){const r=e.map(i);return r.some((t,u)=>t!==e[u])?r:e}if(Array.isArray(e.results)){const r=e.results.map(i);return r.some((t,u)=>t!==e.results[u])?{...e,results:r}:e}return e}function v(e,s){const n=new Set(s.filter(i=>!!i));for(const i of n)for(const r of[a.detail(i),a.arxiv(i),a.preview(i),a.summary(i)])e.invalidateQueries({queryKey:r,exact:!0})}function f(e){for(const s of Object.values(a.feeds))e.invalidateQueries({queryKey:s,refetchType:"none"})}function p(e,s,n){new Set([...n,s.id,s.arxiv_id].filter(t=>!!t)).forEach(t=>{e.setQueryData(a.detail(t),s),e.setQueryData(a.arxiv(t),s),e.setQueriesData({queryKey:a.preview(t),exact:!0},s),e.setQueriesData({queryKey:a.summary(t),exact:!0},s)}),f(e);const r=String(s.id),c=t=>o(t,r,s.title);e.setQueriesData({queryKey:["evaluations"]},c),e.setQueriesData({queryKey:["dataset-evals"]},c),e.invalidateQueries({queryKey:["evaluations"],refetchType:"none"}),e.invalidateQueries({queryKey:["dataset-evals"],refetchType:"none"})}export{f as a,v as i,p as r}; diff --git a/assets/refresh-cw-Qmu3JZxd.js b/assets/refresh-cw-4AZFTXDl.js similarity index 94% rename from assets/refresh-cw-Qmu3JZxd.js rename to assets/refresh-cw-4AZFTXDl.js index ef5b71fccd203ede87ad65adfd458ad979036135..45785330d9b3939cb5562ab8f8d61097e08867d0 100644 --- a/assets/refresh-cw-Qmu3JZxd.js +++ b/assets/refresh-cw-4AZFTXDl.js @@ -1,4 +1,4 @@ -import{n as e}from"./index-D6jcIRWs.js";/** +import{n as e}from"./index-YwiKC6Po.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/research-BggtGgC2.js b/assets/research-5UpiU-ea.js similarity index 91% rename from assets/research-BggtGgC2.js rename to assets/research-5UpiU-ea.js index 62d6f55ed8b63a380bc15a876f0bedc6ce70d9fb..a6f314e896b65ab72682a130b8ac4e30dd582e0f 100644 --- a/assets/research-BggtGgC2.js +++ b/assets/research-5UpiU-ea.js @@ -1 +1 @@ -import{a5 as t}from"./index-D6jcIRWs.js";const i=300,m={follows:()=>t("/me/follows"),followSuggestions:()=>t("/research/follow-suggestions"),setFollow:(o,e,a)=>t(`/me/follows/${o}/${e}`,{method:a?"PUT":"DELETE"}),following:(o=0,e={})=>{const a=new URLSearchParams({offset:String(o),limit:"40"});return e.startDate&&a.set("start_date",e.startDate),e.endDate&&a.set("end_date",e.endDate),!e.startDate&&!e.endDate&&a.set("all_time","true"),e.topicOnly&&a.set("topic_only","true"),t(`/me/following?${a}`)},topic:()=>t("/me/topic"),setTopic:o=>t("/me/topic",{method:"PUT",body:JSON.stringify({text:o})}),clearTopic:()=>t("/me/topic",{method:"DELETE"}),email:()=>t("/me/research-email"),setEmail:o=>t("/me/research-email",{method:"PUT",body:JSON.stringify({enabled:o})})};export{i as T,m as r}; +import{a5 as t}from"./index-YwiKC6Po.js";const i=300,m={follows:()=>t("/me/follows"),followSuggestions:()=>t("/research/follow-suggestions"),setFollow:(o,e,a)=>t(`/me/follows/${o}/${e}`,{method:a?"PUT":"DELETE"}),following:(o=0,e={})=>{const a=new URLSearchParams({offset:String(o),limit:"40"});return e.startDate&&a.set("start_date",e.startDate),e.endDate&&a.set("end_date",e.endDate),!e.startDate&&!e.endDate&&a.set("all_time","true"),e.topicOnly&&a.set("topic_only","true"),t(`/me/following?${a}`)},topic:()=>t("/me/topic"),setTopic:o=>t("/me/topic",{method:"PUT",body:JSON.stringify({text:o})}),clearTopic:()=>t("/me/topic",{method:"DELETE"}),email:()=>t("/me/research-email"),setEmail:o=>t("/me/research-email",{method:"PUT",body:JSON.stringify({enabled:o})})};export{i as T,m as r}; diff --git a/assets/researchTopic-NFMcqCcs.js b/assets/researchTopic-CAL_T-Y-.js similarity index 91% rename from assets/researchTopic-NFMcqCcs.js rename to assets/researchTopic-CAL_T-Y-.js index 42d618ccaa9b5a7bc8cd4f8faa88b93ac18ffd8e..32400b0992d900e6674022507c05496a96a8d70c 100644 --- a/assets/researchTopic-NFMcqCcs.js +++ b/assets/researchTopic-CAL_T-Y-.js @@ -1 +1 @@ -import{d as u,f}from"./index-D6jcIRWs.js";import{u as d}from"./useMutation-p6mN4h17.js";import{r as a}from"./research-BggtGgC2.js";function y(e){var n;const s=(n=u())==null?void 0:n.user,t=f();return d({mutationFn:async o=>o===null?(await a.clearTopic(),null):a.setTopic(o),onSuccess:o=>{t.setQueryData(["research-topic",s==null?void 0:s.hf_subject],o),m(),e==null||e(),t.invalidateQueries({queryKey:["research-feed",s==null?void 0:s.hf_subject]}),t.invalidateQueries({queryKey:["research-email",s==null?void 0:s.hf_subject]})}})}const r="pwc:following-pending-topic";function S(e){sessionStorage.setItem(r,e)}function v(){return sessionStorage.getItem(r)}function m(){sessionStorage.removeItem(r)}function P(){var t;const e=(t=u())==null?void 0:t.user,s=f();return d({mutationFn:async n=>{const l=(await Promise.allSettled(n.map(i=>a.setFollow(i.kind,i.id,i.follow??!0)))).find(i=>i.status==="rejected");if(l)throw l.reason},onSuccess:()=>g(),onSettled:()=>{s.invalidateQueries({queryKey:["research-follows",e==null?void 0:e.hf_subject]}),s.invalidateQueries({queryKey:["research-feed",e==null?void 0:e.hf_subject]}),s.invalidateQueries({queryKey:["research-email",e==null?void 0:e.hf_subject]})}})}const c="pwc:following-pending-follows";function _(e){sessionStorage.setItem(c,JSON.stringify(e))}function I(){return JSON.parse(sessionStorage.getItem(c)??"[]")}function g(){sessionStorage.removeItem(c)}export{P as a,_ as b,I as c,m as d,v as r,S as s,y as u}; +import{d as u,f}from"./index-YwiKC6Po.js";import{u as d}from"./useMutation-f6iDkf3w.js";import{r as a}from"./research-5UpiU-ea.js";function y(e){var n;const s=(n=u())==null?void 0:n.user,t=f();return d({mutationFn:async o=>o===null?(await a.clearTopic(),null):a.setTopic(o),onSuccess:o=>{t.setQueryData(["research-topic",s==null?void 0:s.hf_subject],o),m(),e==null||e(),t.invalidateQueries({queryKey:["research-feed",s==null?void 0:s.hf_subject]}),t.invalidateQueries({queryKey:["research-email",s==null?void 0:s.hf_subject]})}})}const r="pwc:following-pending-topic";function S(e){sessionStorage.setItem(r,e)}function v(){return sessionStorage.getItem(r)}function m(){sessionStorage.removeItem(r)}function P(){var t;const e=(t=u())==null?void 0:t.user,s=f();return d({mutationFn:async n=>{const l=(await Promise.allSettled(n.map(i=>a.setFollow(i.kind,i.id,i.follow??!0)))).find(i=>i.status==="rejected");if(l)throw l.reason},onSuccess:()=>g(),onSettled:()=>{s.invalidateQueries({queryKey:["research-follows",e==null?void 0:e.hf_subject]}),s.invalidateQueries({queryKey:["research-feed",e==null?void 0:e.hf_subject]}),s.invalidateQueries({queryKey:["research-email",e==null?void 0:e.hf_subject]})}})}const c="pwc:following-pending-follows";function _(e){sessionStorage.setItem(c,JSON.stringify(e))}function I(){return JSON.parse(sessionStorage.getItem(c)??"[]")}function g(){sessionStorage.removeItem(c)}export{P as a,_ as b,I as c,m as d,v as r,S as s,y as u}; diff --git a/assets/savedPapersAuth-aA59XSW3.js b/assets/savedPapersAuth-k5u0Ozsk.js similarity index 75% rename from assets/savedPapersAuth-aA59XSW3.js rename to assets/savedPapersAuth-k5u0Ozsk.js index 2cf0dbaee0c2bf11b26454878063886e511ef8d6..d745433960a0880bbd97c3818b5f9665facd08a9 100644 --- a/assets/savedPapersAuth-aA59XSW3.js +++ b/assets/savedPapersAuth-k5u0Ozsk.js @@ -1 +1 @@ -import{h as a}from"./index-D6jcIRWs.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-YwiKC6Po.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-CfTufeR7.js b/assets/search-wcEXdf1i.js similarity index 87% rename from assets/search-CfTufeR7.js rename to assets/search-wcEXdf1i.js index 20588f1c7241194136f71cd2e6782bbac8999e48..db1580c61f2f2b3277f4b2d4a8c8595b481620dc 100644 --- a/assets/search-CfTufeR7.js +++ b/assets/search-wcEXdf1i.js @@ -1,4 +1,4 @@ -import{n as e}from"./index-D6jcIRWs.js";/** +import{n as e}from"./index-YwiKC6Po.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/searchable-select-B7z6Fcrr.js b/assets/searchable-select-Bqfyxu17.js similarity index 91% rename from assets/searchable-select-B7z6Fcrr.js rename to assets/searchable-select-Bqfyxu17.js index 4f1bef99212063c731c70cd70bd272cb856cee59..31dd203734465e5941ca076f06edb1adb08c67fe 100644 --- a/assets/searchable-select-B7z6Fcrr.js +++ b/assets/searchable-select-Bqfyxu17.js @@ -1,6 +1,6 @@ -import{n as Ae,r as a,a8 as Q,t as L,a9 as Me,aa as De,ab as $e,ac as Le,ad as H,j as p,B as D,C as Pe}from"./index-D6jcIRWs.js";import{u as Fe}from"./useQuery-CUJUm4FY.js";import{B as Ke}from"./button-Bzx0ccHH.js";import{P as qe,a as Be,b as Ve}from"./popover-DCjqGpW0.js";import"./dialog-vGFIbcd-.js";import{S as Ue}from"./search-CfTufeR7.js";import{L as Qe}from"./loader-circle-BuDrH29B.js";/** +import{n as Ae,r as a,a8 as Q,t as L,a9 as Me,aa as De,ab as $e,ac as Le,ad as H,j as p,A as D,C as Pe}from"./index-YwiKC6Po.js";import{u as Fe}from"./useQuery-DPH6Mb2w.js";import{B as Ke}from"./button-B90pJJiy.js";import{P as qe,a as Ve,b as Be}from"./popover-D7ygxg37.js";import"./dialog-foxx0Wu6.js";import{S as Ue}from"./search-wcEXdf1i.js";import{L as Qe}from"./loader-circle-B0KtDERb.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Te=Ae("ChevronsUpDown",[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]]);var fe=1,ze=.9,Ge=.8,He=.17,re=.1,ne=.999,We=.9999,Je=.99,Xe=/[\\\/_+.#"@\[\(\{&]/,Ye=/[\\\/_+.#"@\[\(\{&]/g,Ze=/[\s-]/,he=/[\s-]/g;function le(e,n,t,m,o,i,d){if(i===n.length)return o===e.length?fe:Je;var c=`${o},${i}`;if(d[c]!==void 0)return d[c];for(var y=m.charAt(i),u=t.indexOf(y,o),v=0,g,C,E,j;u>=0;)g=le(e,n,t,m,u+1,i+1,d),g>v&&(u===o?g*=fe:Xe.test(e.charAt(u-1))?(g*=Ge,E=e.slice(o,u-1).match(Ye),E&&o>0&&(g*=Math.pow(ne,E.length))):Ze.test(e.charAt(u-1))?(g*=ze,j=e.slice(o,u-1).match(he),j&&o>0&&(g*=Math.pow(ne,j.length))):(g*=He,o>0&&(g*=Math.pow(ne,u-o))),e.charAt(u)!==n.charAt(i)&&(g*=We)),(gg&&(g=C*re)),g>v&&(v=g),u=t.indexOf(y,u+1);return d[c]=v,v}function pe(e){return e.toLowerCase().replace(he," ")}function _e(e,n,t){return e=t&&t.length>0?`${e+" "+t.join(" ")}`:e,le(e,n,pe(e),pe(n),0,0,{})}var G='[cmdk-group=""]',ae='[cmdk-group-items=""]',Oe='[cmdk-group-heading=""]',ge='[cmdk-item=""]',ve=`${ge}:not([aria-disabled="true"])`,oe="cmdk-item-select",V="data-value",et=(e,n,t)=>_e(e,n,t),xe=a.createContext(void 0),W=()=>a.useContext(xe),be=a.createContext(void 0),ue=()=>a.useContext(be),ye=a.createContext(void 0),we=a.forwardRef((e,n)=>{let t=U(()=>{var r,s;return{search:"",value:(s=(r=e.value)!=null?r:e.defaultValue)!=null?s:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),m=U(()=>new Set),o=U(()=>new Map),i=U(()=>new Map),d=U(()=>new Set),c=Ee(e),{label:y,children:u,value:v,onValueChange:g,filter:C,shouldFilter:E,loop:j,disablePointerSelection:P=!1,vimBindings:R=!0,...F}=e,q=Q(),A=Q(),T=Q(),M=a.useRef(null),x=dt();K(()=>{if(v!==void 0){let r=v.trim();t.current.value=r,k.emit()}},[v]),K(()=>{x(6,ie)},[]);let k=a.useMemo(()=>({subscribe:r=>(d.current.add(r),()=>d.current.delete(r)),snapshot:()=>t.current,setState:(r,s,f)=>{var l,h,b,I;if(!Object.is(t.current[r],s)){if(t.current[r]=s,r==="search")O(),Z(),x(1,_);else if(r==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let S=document.getElementById(T);S?S.focus():(l=document.getElementById(q))==null||l.focus()}if(x(7,()=>{var S;t.current.selectedItemId=(S=B())==null?void 0:S.id,k.emit()}),f||x(5,ie),((h=c.current)==null?void 0:h.value)!==void 0){let S=s??"";(I=(b=c.current).onValueChange)==null||I.call(b,S);return}}k.emit()}},emit:()=>{d.current.forEach(r=>r())}}),[]),w=a.useMemo(()=>({value:(r,s,f)=>{var l;s!==((l=i.current.get(r))==null?void 0:l.value)&&(i.current.set(r,{value:s,keywords:f}),t.current.filtered.items.set(r,J(s,f)),x(2,()=>{Z(),k.emit()}))},item:(r,s)=>(m.current.add(r),s&&(o.current.has(s)?o.current.get(s).add(r):o.current.set(s,new Set([r]))),x(3,()=>{O(),Z(),t.current.value||_(),k.emit()}),()=>{i.current.delete(r),m.current.delete(r),t.current.filtered.items.delete(r);let f=B();x(4,()=>{O(),(f==null?void 0:f.getAttribute("id"))===r&&_(),k.emit()})}),group:r=>(o.current.has(r)||o.current.set(r,new Set),()=>{i.current.delete(r),o.current.delete(r)}),filter:()=>c.current.shouldFilter,label:y||e["aria-label"],getDisablePointerSelection:()=>c.current.disablePointerSelection,listId:q,inputId:T,labelId:A,listInnerRef:M}),[]);function J(r,s){var f,l;let h=(l=(f=c.current)==null?void 0:f.filter)!=null?l:et;return r?h(r,t.current.search,s):0}function Z(){if(!t.current.search||c.current.shouldFilter===!1)return;let r=t.current.filtered.items,s=[];t.current.filtered.groups.forEach(l=>{let h=o.current.get(l),b=0;h.forEach(I=>{let S=r.get(I);b=Math.max(S,b)}),s.push([l,b])});let f=M.current;z().sort((l,h)=>{var b,I;let S=l.getAttribute("id"),X=h.getAttribute("id");return((b=r.get(X))!=null?b:0)-((I=r.get(S))!=null?I:0)}).forEach(l=>{let h=l.closest(ae);h?h.appendChild(l.parentElement===h?l:l.closest(`${ae} > *`)):f.appendChild(l.parentElement===f?l:l.closest(`${ae} > *`))}),s.sort((l,h)=>h[1]-l[1]).forEach(l=>{var h;let b=(h=M.current)==null?void 0:h.querySelector(`${G}[${V}="${encodeURIComponent(l[0])}"]`);b==null||b.parentElement.appendChild(b)})}function _(){let r=z().find(f=>f.getAttribute("aria-disabled")!=="true"),s=r==null?void 0:r.getAttribute(V);k.setState("value",s||void 0)}function O(){var r,s,f,l;if(!t.current.search||c.current.shouldFilter===!1){t.current.filtered.count=m.current.size;return}t.current.filtered.groups=new Set;let h=0;for(let b of m.current){let I=(s=(r=i.current.get(b))==null?void 0:r.value)!=null?s:"",S=(l=(f=i.current.get(b))==null?void 0:f.keywords)!=null?l:[],X=J(I,S);t.current.filtered.items.set(b,X),X>0&&h++}for(let[b,I]of o.current)for(let S of I)if(t.current.filtered.items.get(S)>0){t.current.filtered.groups.add(b);break}t.current.filtered.count=h}function ie(){var r,s,f;let l=B();l&&(((r=l.parentElement)==null?void 0:r.firstChild)===l&&((f=(s=l.closest(G))==null?void 0:s.querySelector(Oe))==null||f.scrollIntoView({block:"nearest"})),l.scrollIntoView({block:"nearest"}))}function B(){var r;return(r=M.current)==null?void 0:r.querySelector(`${ge}[aria-selected="true"]`)}function z(){var r;return Array.from(((r=M.current)==null?void 0:r.querySelectorAll(ve))||[])}function ee(r){let s=z()[r];s&&k.setState("value",s.getAttribute(V))}function te(r){var s;let f=B(),l=z(),h=l.findIndex(I=>I===f),b=l[h+r];(s=c.current)!=null&&s.loop&&(b=h+r<0?l[l.length-1]:h+r===l.length?l[0]:l[h+r]),b&&k.setState("value",b.getAttribute(V))}function se(r){let s=B(),f=s==null?void 0:s.closest(G),l;for(;f&&!l;)f=r>0?st(f,G):ct(f,G),l=f==null?void 0:f.querySelector(ve);l?k.setState("value",l.getAttribute(V)):te(r)}let ce=()=>ee(z().length-1),de=r=>{r.preventDefault(),r.metaKey?ce():r.altKey?se(1):te(1)},me=r=>{r.preventDefault(),r.metaKey?ee(0):r.altKey?se(-1):te(-1)};return a.createElement(L.div,{ref:n,tabIndex:-1,...F,"cmdk-root":"",onKeyDown:r=>{var s;(s=F.onKeyDown)==null||s.call(F,r);let f=r.nativeEvent.isComposing||r.keyCode===229;if(!(r.defaultPrevented||f))switch(r.key){case"n":case"j":{R&&r.ctrlKey&&de(r);break}case"ArrowDown":{de(r);break}case"p":case"k":{R&&r.ctrlKey&&me(r);break}case"ArrowUp":{me(r);break}case"Home":{r.preventDefault(),ee(0);break}case"End":{r.preventDefault(),ce();break}case"Enter":{r.preventDefault();let l=B();if(l){let h=new Event(oe);l.dispatchEvent(h)}}}}},a.createElement("label",{"cmdk-label":"",htmlFor:w.inputId,id:w.labelId,style:ft},y),Y(e,r=>a.createElement(be.Provider,{value:k},a.createElement(xe.Provider,{value:w},r))))}),tt=a.forwardRef((e,n)=>{var t,m;let o=Q(),i=a.useRef(null),d=a.useContext(ye),c=W(),y=Ee(e),u=(m=(t=y.current)==null?void 0:t.forceMount)!=null?m:d==null?void 0:d.forceMount;K(()=>{if(!u)return c.item(o,d==null?void 0:d.id)},[u]);let v=ke(o,i,[e.value,e.children,i],e.keywords),g=ue(),C=$(x=>x.value&&x.value===v.current),E=$(x=>u||c.filter()===!1?!0:x.search?x.filtered.items.get(o)>0:!0);a.useEffect(()=>{let x=i.current;if(!(!x||e.disabled))return x.addEventListener(oe,j),()=>x.removeEventListener(oe,j)},[E,e.onSelect,e.disabled]);function j(){var x,k;P(),(k=(x=y.current).onSelect)==null||k.call(x,v.current)}function P(){g.setState("value",v.current,!0)}if(!E)return null;let{disabled:R,value:F,onSelect:q,forceMount:A,keywords:T,...M}=e;return a.createElement(L.div,{ref:H(i,n),...M,id:o,"cmdk-item":"",role:"option","aria-disabled":!!R,"aria-selected":!!C,"data-disabled":!!R,"data-selected":!!C,onPointerMove:R||c.getDisablePointerSelection()?void 0:P,onClick:R?void 0:j},e.children)}),rt=a.forwardRef((e,n)=>{let{heading:t,children:m,forceMount:o,...i}=e,d=Q(),c=a.useRef(null),y=a.useRef(null),u=Q(),v=W(),g=$(E=>o||v.filter()===!1?!0:E.search?E.filtered.groups.has(d):!0);K(()=>v.group(d),[]),ke(d,c,[e.value,e.heading,y]);let C=a.useMemo(()=>({id:d,forceMount:o}),[o]);return a.createElement(L.div,{ref:H(c,n),...i,"cmdk-group":"",role:"presentation",hidden:g?void 0:!0},t&&a.createElement("div",{ref:y,"cmdk-group-heading":"","aria-hidden":!0,id:u},t),Y(e,E=>a.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":t?u:void 0},a.createElement(ye.Provider,{value:C},E))))}),nt=a.forwardRef((e,n)=>{let{alwaysRender:t,...m}=e,o=a.useRef(null),i=$(d=>!d.search);return!t&&!i?null:a.createElement(L.div,{ref:H(o,n),...m,"cmdk-separator":"",role:"separator"})}),at=a.forwardRef((e,n)=>{let{onValueChange:t,...m}=e,o=e.value!=null,i=ue(),d=$(u=>u.search),c=$(u=>u.selectedItemId),y=W();return a.useEffect(()=>{e.value!=null&&i.setState("search",e.value)},[e.value]),a.createElement(L.input,{ref:n,...m,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":y.listId,"aria-labelledby":y.labelId,"aria-activedescendant":c,id:y.inputId,type:"text",value:o?e.value:d,onChange:u=>{o||i.setState("search",u.target.value),t==null||t(u.target.value)}})}),lt=a.forwardRef((e,n)=>{let{children:t,label:m="Suggestions",...o}=e,i=a.useRef(null),d=a.useRef(null),c=$(u=>u.selectedItemId),y=W();return a.useEffect(()=>{if(d.current&&i.current){let u=d.current,v=i.current,g,C=new ResizeObserver(()=>{g=requestAnimationFrame(()=>{let E=u.offsetHeight;v.style.setProperty("--cmdk-list-height",E.toFixed(1)+"px")})});return C.observe(u),()=>{cancelAnimationFrame(g),C.unobserve(u)}}},[]),a.createElement(L.div,{ref:H(i,n),...o,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":c,"aria-label":m,id:y.listId},Y(e,u=>a.createElement("div",{ref:H(d,y.listInnerRef),"cmdk-list-sizer":""},u)))}),ot=a.forwardRef((e,n)=>{let{open:t,onOpenChange:m,overlayClassName:o,contentClassName:i,container:d,...c}=e;return a.createElement(Me,{open:t,onOpenChange:m},a.createElement(De,{container:d},a.createElement($e,{"cmdk-overlay":"",className:o}),a.createElement(Le,{"aria-label":e.label,"cmdk-dialog":"",className:i},a.createElement(we,{ref:n,...c}))))}),ut=a.forwardRef((e,n)=>$(t=>t.filtered.count===0)?a.createElement(L.div,{ref:n,...e,"cmdk-empty":"",role:"presentation"}):null),it=a.forwardRef((e,n)=>{let{progress:t,children:m,label:o="Loading...",...i}=e;return a.createElement(L.div,{ref:n,...i,"cmdk-loading":"",role:"progressbar","aria-valuenow":t,"aria-valuemin":0,"aria-valuemax":100,"aria-label":o},Y(e,d=>a.createElement("div",{"aria-hidden":!0},d)))}),N=Object.assign(we,{List:lt,Item:tt,Input:at,Group:rt,Separator:nt,Dialog:ot,Empty:ut,Loading:it});function st(e,n){let t=e.nextElementSibling;for(;t;){if(t.matches(n))return t;t=t.nextElementSibling}}function ct(e,n){let t=e.previousElementSibling;for(;t;){if(t.matches(n))return t;t=t.previousElementSibling}}function Ee(e){let n=a.useRef(e);return K(()=>{n.current=e}),n}var K=typeof window>"u"?a.useEffect:a.useLayoutEffect;function U(e){let n=a.useRef();return n.current===void 0&&(n.current=e()),n}function $(e){let n=ue(),t=()=>e(n.snapshot());return a.useSyncExternalStore(n.subscribe,t,t)}function ke(e,n,t,m=[]){let o=a.useRef(),i=W();return K(()=>{var d;let c=(()=>{var u;for(let v of t){if(typeof v=="string")return v.trim();if(typeof v=="object"&&"current"in v)return v.current?(u=v.current.textContent)==null?void 0:u.trim():o.current}})(),y=m.map(u=>u.trim());i.value(e,c,y),(d=n.current)==null||d.setAttribute(V,c),o.current=c}),o}var dt=()=>{let[e,n]=a.useState(),t=U(()=>new Map);return K(()=>{t.current.forEach(m=>m()),t.current=new Map},[e]),(m,o)=>{t.current.set(m,o),n({})}};function mt(e){let n=e.type;return typeof n=="function"?n(e.props):"render"in n?n.render(e.props):e}function Y({asChild:e,children:n},t){return e&&a.isValidElement(n)?a.cloneElement(mt(n),{ref:n.ref},t(n.props.children)):t(n)}var ft={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const Se=a.forwardRef(({className:e,...n},t)=>p.jsx(N,{ref:t,className:D("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...n}));Se.displayName=N.displayName;const Ce=a.forwardRef(({className:e,...n},t)=>p.jsxs("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[p.jsx(Ue,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),p.jsx(N.Input,{ref:t,className:D("flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),...n})]}));Ce.displayName=N.Input.displayName;const Ne=a.forwardRef(({className:e,...n},t)=>p.jsx(N.List,{ref:t,className:D("max-h-[300px] overflow-y-auto overflow-x-hidden",e),...n}));Ne.displayName=N.List.displayName;const Ie=a.forwardRef((e,n)=>p.jsx(N.Empty,{ref:n,className:"py-6 text-center text-sm",...e}));Ie.displayName=N.Empty.displayName;const je=a.forwardRef(({className:e,...n},t)=>p.jsx(N.Group,{ref:t,className:D("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",e),...n}));je.displayName=N.Group.displayName;const pt=a.forwardRef(({className:e,...n},t)=>p.jsx(N.Separator,{ref:t,className:D("-mx-1 h-px bg-border",e),...n}));pt.displayName=N.Separator.displayName;const Re=a.forwardRef(({className:e,...n},t)=>p.jsx(N.Item,{ref:t,className:D("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected='true']:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50",e),...n}));Re.displayName=N.Item.displayName;const vt=250;function kt({value:e,onChange:n,placeholder:t="Select...",searchPlaceholder:m="Search...",emptyMessage:o="No results found.",errorMessage:i,disabled:d=!1,selectedOption:c,queryKey:y,queryFn:u,enabled:v=!0,className:g,ariaLabel:C}){const[E,j]=a.useState(!1),[P,R]=a.useState(""),[F,q]=a.useState("");a.useEffect(()=>{const w=window.setTimeout(()=>{q(P.trim())},vt);return()=>window.clearTimeout(w)},[P]),a.useEffect(()=>{E||(R(""),q(""))},[E]);const{data:A=[],isFetching:T,isError:M}=Fe({queryKey:[...y,F],queryFn:()=>u(F),enabled:v&&E}),x=a.useMemo(()=>!e||A.some(w=>w.value===e)?A:(c==null?void 0:c.value)===e?[c,...A]:A,[A,c,e]),k=a.useMemo(()=>{if(!e)return t;const w=x.find(J=>J.value===e)??((c==null?void 0:c.value)===e?c:null);return(w==null?void 0:w.label)??t},[x,t,c,e]);return p.jsxs(qe,{open:E,onOpenChange:j,modal:!0,children:[p.jsx(Be,{asChild:!0,children:p.jsxs(Ke,{type:"button",variant:"outline",role:"combobox","aria-expanded":E,"aria-label":C,disabled:d,className:D("h-8 w-full justify-between px-2 text-sm font-normal",!e&&"text-muted-foreground",g),children:[p.jsx("span",{className:"truncate",children:k}),p.jsx(Te,{className:"ml-1 h-3.5 w-3.5 shrink-0 opacity-50"})]})}),p.jsx(Ve,{className:"z-[60] w-[var(--radix-popover-trigger-width)] max-h-[var(--radix-popover-content-available-height)] overflow-hidden p-0",align:"start",collisionPadding:8,onWheel:w=>w.stopPropagation(),children:p.jsxs(Se,{shouldFilter:!1,className:"h-full",children:[p.jsx(Ce,{placeholder:m,value:P,onValueChange:R}),p.jsx(Ne,{className:"max-h-[min(300px,calc(var(--radix-popover-content-available-height)-2.75rem))] min-h-0 overscroll-contain",children:T?p.jsxs("div",{className:"flex items-center justify-center py-6 text-sm text-muted-foreground",children:[p.jsx(Qe,{className:"mr-2 h-4 w-4 animate-spin"}),"Loading..."]}):M&&i?p.jsx("div",{className:"px-4 py-6 text-center text-sm text-destructive",role:"alert",children:i}):x.length===0?p.jsx(Ie,{children:o}):p.jsx(je,{children:x.map(w=>p.jsxs(Re,{value:w.value,onSelect:()=>{n(w.value,w),j(!1)},children:[p.jsx(Pe,{className:D("mr-2 h-4 w-4",e===w.value?"opacity-100":"opacity-0")}),p.jsxs("div",{className:"min-w-0 flex-1",children:[p.jsx("div",{className:"truncate",children:w.label}),w.description?p.jsx("div",{className:"truncate text-xs text-muted-foreground",children:w.description}):null]})]},w.value))})})]})})]})}export{kt as S}; + */const Te=Ae("ChevronsUpDown",[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]]);var fe=1,ze=.9,Ge=.8,He=.17,re=.1,ne=.999,We=.9999,Je=.99,Xe=/[\\\/_+.#"@\[\(\{&]/,Ye=/[\\\/_+.#"@\[\(\{&]/g,Ze=/[\s-]/,he=/[\s-]/g;function le(e,n,t,m,o,i,d){if(i===n.length)return o===e.length?fe:Je;var c=`${o},${i}`;if(d[c]!==void 0)return d[c];for(var y=m.charAt(i),u=t.indexOf(y,o),v=0,g,C,E,j;u>=0;)g=le(e,n,t,m,u+1,i+1,d),g>v&&(u===o?g*=fe:Xe.test(e.charAt(u-1))?(g*=Ge,E=e.slice(o,u-1).match(Ye),E&&o>0&&(g*=Math.pow(ne,E.length))):Ze.test(e.charAt(u-1))?(g*=ze,j=e.slice(o,u-1).match(he),j&&o>0&&(g*=Math.pow(ne,j.length))):(g*=He,o>0&&(g*=Math.pow(ne,u-o))),e.charAt(u)!==n.charAt(i)&&(g*=We)),(gg&&(g=C*re)),g>v&&(v=g),u=t.indexOf(y,u+1);return d[c]=v,v}function pe(e){return e.toLowerCase().replace(he," ")}function _e(e,n,t){return e=t&&t.length>0?`${e+" "+t.join(" ")}`:e,le(e,n,pe(e),pe(n),0,0,{})}var G='[cmdk-group=""]',ae='[cmdk-group-items=""]',Oe='[cmdk-group-heading=""]',ge='[cmdk-item=""]',ve=`${ge}:not([aria-disabled="true"])`,oe="cmdk-item-select",B="data-value",et=(e,n,t)=>_e(e,n,t),xe=a.createContext(void 0),W=()=>a.useContext(xe),be=a.createContext(void 0),ue=()=>a.useContext(be),ye=a.createContext(void 0),we=a.forwardRef((e,n)=>{let t=U(()=>{var r,s;return{search:"",value:(s=(r=e.value)!=null?r:e.defaultValue)!=null?s:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),m=U(()=>new Set),o=U(()=>new Map),i=U(()=>new Map),d=U(()=>new Set),c=Ee(e),{label:y,children:u,value:v,onValueChange:g,filter:C,shouldFilter:E,loop:j,disablePointerSelection:P=!1,vimBindings:R=!0,...F}=e,q=Q(),A=Q(),T=Q(),M=a.useRef(null),x=dt();K(()=>{if(v!==void 0){let r=v.trim();t.current.value=r,k.emit()}},[v]),K(()=>{x(6,ie)},[]);let k=a.useMemo(()=>({subscribe:r=>(d.current.add(r),()=>d.current.delete(r)),snapshot:()=>t.current,setState:(r,s,f)=>{var l,h,b,I;if(!Object.is(t.current[r],s)){if(t.current[r]=s,r==="search")O(),Z(),x(1,_);else if(r==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let S=document.getElementById(T);S?S.focus():(l=document.getElementById(q))==null||l.focus()}if(x(7,()=>{var S;t.current.selectedItemId=(S=V())==null?void 0:S.id,k.emit()}),f||x(5,ie),((h=c.current)==null?void 0:h.value)!==void 0){let S=s??"";(I=(b=c.current).onValueChange)==null||I.call(b,S);return}}k.emit()}},emit:()=>{d.current.forEach(r=>r())}}),[]),w=a.useMemo(()=>({value:(r,s,f)=>{var l;s!==((l=i.current.get(r))==null?void 0:l.value)&&(i.current.set(r,{value:s,keywords:f}),t.current.filtered.items.set(r,J(s,f)),x(2,()=>{Z(),k.emit()}))},item:(r,s)=>(m.current.add(r),s&&(o.current.has(s)?o.current.get(s).add(r):o.current.set(s,new Set([r]))),x(3,()=>{O(),Z(),t.current.value||_(),k.emit()}),()=>{i.current.delete(r),m.current.delete(r),t.current.filtered.items.delete(r);let f=V();x(4,()=>{O(),(f==null?void 0:f.getAttribute("id"))===r&&_(),k.emit()})}),group:r=>(o.current.has(r)||o.current.set(r,new Set),()=>{i.current.delete(r),o.current.delete(r)}),filter:()=>c.current.shouldFilter,label:y||e["aria-label"],getDisablePointerSelection:()=>c.current.disablePointerSelection,listId:q,inputId:T,labelId:A,listInnerRef:M}),[]);function J(r,s){var f,l;let h=(l=(f=c.current)==null?void 0:f.filter)!=null?l:et;return r?h(r,t.current.search,s):0}function Z(){if(!t.current.search||c.current.shouldFilter===!1)return;let r=t.current.filtered.items,s=[];t.current.filtered.groups.forEach(l=>{let h=o.current.get(l),b=0;h.forEach(I=>{let S=r.get(I);b=Math.max(S,b)}),s.push([l,b])});let f=M.current;z().sort((l,h)=>{var b,I;let S=l.getAttribute("id"),X=h.getAttribute("id");return((b=r.get(X))!=null?b:0)-((I=r.get(S))!=null?I:0)}).forEach(l=>{let h=l.closest(ae);h?h.appendChild(l.parentElement===h?l:l.closest(`${ae} > *`)):f.appendChild(l.parentElement===f?l:l.closest(`${ae} > *`))}),s.sort((l,h)=>h[1]-l[1]).forEach(l=>{var h;let b=(h=M.current)==null?void 0:h.querySelector(`${G}[${B}="${encodeURIComponent(l[0])}"]`);b==null||b.parentElement.appendChild(b)})}function _(){let r=z().find(f=>f.getAttribute("aria-disabled")!=="true"),s=r==null?void 0:r.getAttribute(B);k.setState("value",s||void 0)}function O(){var r,s,f,l;if(!t.current.search||c.current.shouldFilter===!1){t.current.filtered.count=m.current.size;return}t.current.filtered.groups=new Set;let h=0;for(let b of m.current){let I=(s=(r=i.current.get(b))==null?void 0:r.value)!=null?s:"",S=(l=(f=i.current.get(b))==null?void 0:f.keywords)!=null?l:[],X=J(I,S);t.current.filtered.items.set(b,X),X>0&&h++}for(let[b,I]of o.current)for(let S of I)if(t.current.filtered.items.get(S)>0){t.current.filtered.groups.add(b);break}t.current.filtered.count=h}function ie(){var r,s,f;let l=V();l&&(((r=l.parentElement)==null?void 0:r.firstChild)===l&&((f=(s=l.closest(G))==null?void 0:s.querySelector(Oe))==null||f.scrollIntoView({block:"nearest"})),l.scrollIntoView({block:"nearest"}))}function V(){var r;return(r=M.current)==null?void 0:r.querySelector(`${ge}[aria-selected="true"]`)}function z(){var r;return Array.from(((r=M.current)==null?void 0:r.querySelectorAll(ve))||[])}function ee(r){let s=z()[r];s&&k.setState("value",s.getAttribute(B))}function te(r){var s;let f=V(),l=z(),h=l.findIndex(I=>I===f),b=l[h+r];(s=c.current)!=null&&s.loop&&(b=h+r<0?l[l.length-1]:h+r===l.length?l[0]:l[h+r]),b&&k.setState("value",b.getAttribute(B))}function se(r){let s=V(),f=s==null?void 0:s.closest(G),l;for(;f&&!l;)f=r>0?st(f,G):ct(f,G),l=f==null?void 0:f.querySelector(ve);l?k.setState("value",l.getAttribute(B)):te(r)}let ce=()=>ee(z().length-1),de=r=>{r.preventDefault(),r.metaKey?ce():r.altKey?se(1):te(1)},me=r=>{r.preventDefault(),r.metaKey?ee(0):r.altKey?se(-1):te(-1)};return a.createElement(L.div,{ref:n,tabIndex:-1,...F,"cmdk-root":"",onKeyDown:r=>{var s;(s=F.onKeyDown)==null||s.call(F,r);let f=r.nativeEvent.isComposing||r.keyCode===229;if(!(r.defaultPrevented||f))switch(r.key){case"n":case"j":{R&&r.ctrlKey&&de(r);break}case"ArrowDown":{de(r);break}case"p":case"k":{R&&r.ctrlKey&&me(r);break}case"ArrowUp":{me(r);break}case"Home":{r.preventDefault(),ee(0);break}case"End":{r.preventDefault(),ce();break}case"Enter":{r.preventDefault();let l=V();if(l){let h=new Event(oe);l.dispatchEvent(h)}}}}},a.createElement("label",{"cmdk-label":"",htmlFor:w.inputId,id:w.labelId,style:ft},y),Y(e,r=>a.createElement(be.Provider,{value:k},a.createElement(xe.Provider,{value:w},r))))}),tt=a.forwardRef((e,n)=>{var t,m;let o=Q(),i=a.useRef(null),d=a.useContext(ye),c=W(),y=Ee(e),u=(m=(t=y.current)==null?void 0:t.forceMount)!=null?m:d==null?void 0:d.forceMount;K(()=>{if(!u)return c.item(o,d==null?void 0:d.id)},[u]);let v=ke(o,i,[e.value,e.children,i],e.keywords),g=ue(),C=$(x=>x.value&&x.value===v.current),E=$(x=>u||c.filter()===!1?!0:x.search?x.filtered.items.get(o)>0:!0);a.useEffect(()=>{let x=i.current;if(!(!x||e.disabled))return x.addEventListener(oe,j),()=>x.removeEventListener(oe,j)},[E,e.onSelect,e.disabled]);function j(){var x,k;P(),(k=(x=y.current).onSelect)==null||k.call(x,v.current)}function P(){g.setState("value",v.current,!0)}if(!E)return null;let{disabled:R,value:F,onSelect:q,forceMount:A,keywords:T,...M}=e;return a.createElement(L.div,{ref:H(i,n),...M,id:o,"cmdk-item":"",role:"option","aria-disabled":!!R,"aria-selected":!!C,"data-disabled":!!R,"data-selected":!!C,onPointerMove:R||c.getDisablePointerSelection()?void 0:P,onClick:R?void 0:j},e.children)}),rt=a.forwardRef((e,n)=>{let{heading:t,children:m,forceMount:o,...i}=e,d=Q(),c=a.useRef(null),y=a.useRef(null),u=Q(),v=W(),g=$(E=>o||v.filter()===!1?!0:E.search?E.filtered.groups.has(d):!0);K(()=>v.group(d),[]),ke(d,c,[e.value,e.heading,y]);let C=a.useMemo(()=>({id:d,forceMount:o}),[o]);return a.createElement(L.div,{ref:H(c,n),...i,"cmdk-group":"",role:"presentation",hidden:g?void 0:!0},t&&a.createElement("div",{ref:y,"cmdk-group-heading":"","aria-hidden":!0,id:u},t),Y(e,E=>a.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":t?u:void 0},a.createElement(ye.Provider,{value:C},E))))}),nt=a.forwardRef((e,n)=>{let{alwaysRender:t,...m}=e,o=a.useRef(null),i=$(d=>!d.search);return!t&&!i?null:a.createElement(L.div,{ref:H(o,n),...m,"cmdk-separator":"",role:"separator"})}),at=a.forwardRef((e,n)=>{let{onValueChange:t,...m}=e,o=e.value!=null,i=ue(),d=$(u=>u.search),c=$(u=>u.selectedItemId),y=W();return a.useEffect(()=>{e.value!=null&&i.setState("search",e.value)},[e.value]),a.createElement(L.input,{ref:n,...m,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":y.listId,"aria-labelledby":y.labelId,"aria-activedescendant":c,id:y.inputId,type:"text",value:o?e.value:d,onChange:u=>{o||i.setState("search",u.target.value),t==null||t(u.target.value)}})}),lt=a.forwardRef((e,n)=>{let{children:t,label:m="Suggestions",...o}=e,i=a.useRef(null),d=a.useRef(null),c=$(u=>u.selectedItemId),y=W();return a.useEffect(()=>{if(d.current&&i.current){let u=d.current,v=i.current,g,C=new ResizeObserver(()=>{g=requestAnimationFrame(()=>{let E=u.offsetHeight;v.style.setProperty("--cmdk-list-height",E.toFixed(1)+"px")})});return C.observe(u),()=>{cancelAnimationFrame(g),C.unobserve(u)}}},[]),a.createElement(L.div,{ref:H(i,n),...o,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":c,"aria-label":m,id:y.listId},Y(e,u=>a.createElement("div",{ref:H(d,y.listInnerRef),"cmdk-list-sizer":""},u)))}),ot=a.forwardRef((e,n)=>{let{open:t,onOpenChange:m,overlayClassName:o,contentClassName:i,container:d,...c}=e;return a.createElement(Me,{open:t,onOpenChange:m},a.createElement(De,{container:d},a.createElement($e,{"cmdk-overlay":"",className:o}),a.createElement(Le,{"aria-label":e.label,"cmdk-dialog":"",className:i},a.createElement(we,{ref:n,...c}))))}),ut=a.forwardRef((e,n)=>$(t=>t.filtered.count===0)?a.createElement(L.div,{ref:n,...e,"cmdk-empty":"",role:"presentation"}):null),it=a.forwardRef((e,n)=>{let{progress:t,children:m,label:o="Loading...",...i}=e;return a.createElement(L.div,{ref:n,...i,"cmdk-loading":"",role:"progressbar","aria-valuenow":t,"aria-valuemin":0,"aria-valuemax":100,"aria-label":o},Y(e,d=>a.createElement("div",{"aria-hidden":!0},d)))}),N=Object.assign(we,{List:lt,Item:tt,Input:at,Group:rt,Separator:nt,Dialog:ot,Empty:ut,Loading:it});function st(e,n){let t=e.nextElementSibling;for(;t;){if(t.matches(n))return t;t=t.nextElementSibling}}function ct(e,n){let t=e.previousElementSibling;for(;t;){if(t.matches(n))return t;t=t.previousElementSibling}}function Ee(e){let n=a.useRef(e);return K(()=>{n.current=e}),n}var K=typeof window>"u"?a.useEffect:a.useLayoutEffect;function U(e){let n=a.useRef();return n.current===void 0&&(n.current=e()),n}function $(e){let n=ue(),t=()=>e(n.snapshot());return a.useSyncExternalStore(n.subscribe,t,t)}function ke(e,n,t,m=[]){let o=a.useRef(),i=W();return K(()=>{var d;let c=(()=>{var u;for(let v of t){if(typeof v=="string")return v.trim();if(typeof v=="object"&&"current"in v)return v.current?(u=v.current.textContent)==null?void 0:u.trim():o.current}})(),y=m.map(u=>u.trim());i.value(e,c,y),(d=n.current)==null||d.setAttribute(B,c),o.current=c}),o}var dt=()=>{let[e,n]=a.useState(),t=U(()=>new Map);return K(()=>{t.current.forEach(m=>m()),t.current=new Map},[e]),(m,o)=>{t.current.set(m,o),n({})}};function mt(e){let n=e.type;return typeof n=="function"?n(e.props):"render"in n?n.render(e.props):e}function Y({asChild:e,children:n},t){return e&&a.isValidElement(n)?a.cloneElement(mt(n),{ref:n.ref},t(n.props.children)):t(n)}var ft={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const Se=a.forwardRef(({className:e,...n},t)=>p.jsx(N,{ref:t,className:D("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...n}));Se.displayName=N.displayName;const Ce=a.forwardRef(({className:e,...n},t)=>p.jsxs("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[p.jsx(Ue,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),p.jsx(N.Input,{ref:t,className:D("flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),...n})]}));Ce.displayName=N.Input.displayName;const Ne=a.forwardRef(({className:e,...n},t)=>p.jsx(N.List,{ref:t,className:D("max-h-[300px] overflow-y-auto overflow-x-hidden",e),...n}));Ne.displayName=N.List.displayName;const Ie=a.forwardRef((e,n)=>p.jsx(N.Empty,{ref:n,className:"py-6 text-center text-sm",...e}));Ie.displayName=N.Empty.displayName;const je=a.forwardRef(({className:e,...n},t)=>p.jsx(N.Group,{ref:t,className:D("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",e),...n}));je.displayName=N.Group.displayName;const pt=a.forwardRef(({className:e,...n},t)=>p.jsx(N.Separator,{ref:t,className:D("-mx-1 h-px bg-border",e),...n}));pt.displayName=N.Separator.displayName;const Re=a.forwardRef(({className:e,...n},t)=>p.jsx(N.Item,{ref:t,className:D("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected='true']:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50",e),...n}));Re.displayName=N.Item.displayName;const vt=250;function kt({value:e,onChange:n,placeholder:t="Select...",searchPlaceholder:m="Search...",emptyMessage:o="No results found.",errorMessage:i,disabled:d=!1,selectedOption:c,queryKey:y,queryFn:u,enabled:v=!0,className:g,ariaLabel:C}){const[E,j]=a.useState(!1),[P,R]=a.useState(""),[F,q]=a.useState("");a.useEffect(()=>{const w=window.setTimeout(()=>{q(P.trim())},vt);return()=>window.clearTimeout(w)},[P]),a.useEffect(()=>{E||(R(""),q(""))},[E]);const{data:A=[],isFetching:T,isError:M}=Fe({queryKey:[...y,F],queryFn:()=>u(F),enabled:v&&E}),x=a.useMemo(()=>!e||A.some(w=>w.value===e)?A:(c==null?void 0:c.value)===e?[c,...A]:A,[A,c,e]),k=a.useMemo(()=>{if(!e)return t;const w=x.find(J=>J.value===e)??((c==null?void 0:c.value)===e?c:null);return(w==null?void 0:w.label)??t},[x,t,c,e]);return p.jsxs(qe,{open:E,onOpenChange:j,modal:!0,children:[p.jsx(Ve,{asChild:!0,children:p.jsxs(Ke,{type:"button",variant:"outline",role:"combobox","aria-expanded":E,"aria-label":C,disabled:d,className:D("h-8 w-full justify-between px-2 text-sm font-normal",!e&&"text-muted-foreground",g),children:[p.jsx("span",{className:"truncate",children:k}),p.jsx(Te,{className:"ml-1 h-3.5 w-3.5 shrink-0 opacity-50"})]})}),p.jsx(Be,{className:"z-[60] w-[var(--radix-popover-trigger-width)] max-h-[var(--radix-popover-content-available-height)] overflow-hidden p-0",align:"start",collisionPadding:8,onWheel:w=>w.stopPropagation(),children:p.jsxs(Se,{shouldFilter:!1,className:"h-full",children:[p.jsx(Ce,{placeholder:m,value:P,onValueChange:R}),p.jsx(Ne,{className:"max-h-[min(300px,calc(var(--radix-popover-content-available-height)-2.75rem))] min-h-0 overscroll-contain",children:T?p.jsxs("div",{className:"flex items-center justify-center py-6 text-sm text-muted-foreground",children:[p.jsx(Qe,{className:"mr-2 h-4 w-4 animate-spin"}),"Loading..."]}):M&&i?p.jsx("div",{className:"px-4 py-6 text-center text-sm text-destructive",role:"alert",children:i}):x.length===0?p.jsx(Ie,{children:o}):p.jsx(je,{children:x.map(w=>p.jsxs(Re,{value:w.value,onSelect:()=>{n(w.value,w),j(!1)},children:[p.jsx(Pe,{className:D("mr-2 h-4 w-4",e===w.value?"opacity-100":"opacity-0")}),p.jsxs("div",{className:"min-w-0 flex-1",children:[p.jsx("div",{className:"truncate",children:w.label}),w.description?p.jsx("div",{className:"truncate text-xs text-muted-foreground",children:w.description}):null]})]},w.value))})})]})})]})}export{kt as S}; diff --git a/assets/share-2-DPo2j-OC.js b/assets/share-2-m8aPY8Vq.js similarity index 91% rename from assets/share-2-DPo2j-OC.js rename to assets/share-2-m8aPY8Vq.js index 64e944947c245c541379554820eb2714d165cca8..2cfc9c955bdafae244189cb8fb7c659b0639ab99 100644 --- a/assets/share-2-DPo2j-OC.js +++ b/assets/share-2-m8aPY8Vq.js @@ -1,4 +1,4 @@ -import{n as c}from"./index-D6jcIRWs.js";/** +import{n as c}from"./index-YwiKC6Po.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/skeleton-BqkYFmXl.js b/assets/skeleton-CXR1qouH.js similarity index 62% rename from assets/skeleton-BqkYFmXl.js rename to assets/skeleton-CXR1qouH.js index de9b38a6f1ad0cc135abd1b40e313b4f2a1bba2b..d6590259dd878a70b4197e2c611388a6eb987f26 100644 --- a/assets/skeleton-BqkYFmXl.js +++ b/assets/skeleton-CXR1qouH.js @@ -1 +1 @@ -import{j as t,B as n}from"./index-D6jcIRWs.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,A as n}from"./index-YwiKC6Po.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-r8uPx2-0.js b/assets/sparkles-C3L7JDLC.js similarity index 93% rename from assets/sparkles-r8uPx2-0.js rename to assets/sparkles-C3L7JDLC.js index 9bf5a73564d99031397fbd8585b84b44dad7b9f1..49b38cedfa0466a01c2661dd88d4ceadfb567757 100644 --- a/assets/sparkles-r8uPx2-0.js +++ b/assets/sparkles-C3L7JDLC.js @@ -1,4 +1,4 @@ -import{n as a}from"./index-D6jcIRWs.js";/** +import{n as a}from"./index-YwiKC6Po.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/submissions-DNa3tQdo.js b/assets/submissions-BJgYjF7O.js similarity index 99% rename from assets/submissions-DNa3tQdo.js rename to assets/submissions-BJgYjF7O.js index 9b93f60881125e26f1bcf7a873af331c077e0748..d54d4a6ce4e029381bb8344d0bd53221d570bfee 100644 --- a/assets/submissions-DNa3tQdo.js +++ b/assets/submissions-BJgYjF7O.js @@ -1 +1 @@ -import{a5 as qe}from"./index-D6jcIRWs.js";var v;(function(s){s.assertEqual=n=>{};function e(n){}s.assertIs=e;function t(n){throw new Error}s.assertNever=t,s.arrayToEnum=n=>{const a={};for(const i of n)a[i]=i;return a},s.getValidEnumValues=n=>{const a=s.objectKeys(n).filter(o=>typeof n[n[o]]!="number"),i={};for(const o of a)i[o]=n[o];return s.objectValues(i)},s.objectValues=n=>s.objectKeys(n).map(function(a){return n[a]}),s.objectKeys=typeof Object.keys=="function"?n=>Object.keys(n):n=>{const a=[];for(const i in n)Object.prototype.hasOwnProperty.call(n,i)&&a.push(i);return a},s.find=(n,a)=>{for(const i of n)if(a(i))return i},s.isInteger=typeof Number.isInteger=="function"?n=>Number.isInteger(n):n=>typeof n=="number"&&Number.isFinite(n)&&Math.floor(n)===n;function r(n,a=" | "){return n.map(i=>typeof i=="string"?`'${i}'`:i).join(a)}s.joinValues=r,s.jsonStringifyReplacer=(n,a)=>typeof a=="bigint"?a.toString():a})(v||(v={}));var Te;(function(s){s.mergeShapes=(e,t)=>({...e,...t})})(Te||(Te={}));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(a){return a.message},r={_errors:[]},n=a=>{for(const i of a.issues)if(i.code==="invalid_union")i.unionErrors.map(n);else if(i.code==="invalid_return_type")n(i.returnTypeError);else if(i.code==="invalid_arguments")n(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 n of this.issues)if(n.path.length>0){const a=n.path[0];t[a]=t[a]||[],t[a].push(e(n))}else r.push(e(n));return{formErrors:r,fieldErrors:t}}get formErrors(){return this.flatten()}}I.create=s=>new I(s);const ue=(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 Fe=ue;function We(){return Fe}const Je=s=>{const{data:e,path:t,errorMaps:r,issueData:n}=s,a=[...t,...n.path||[]],i={...n,path:a};if(n.message!==void 0)return{...n,path:a,message:n.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{...n,path:a,message:o}};function c(s,e){const t=We(),r=Je({issueData:e,data:s.data,path:s.path,errorMaps:[s.common.contextualErrorMap,s.schemaErrorMap,t,t===ue?void 0:ue].filter(n=>!!n)});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 n of t){if(n.status==="aborted")return m;n.status==="dirty"&&e.dirty(),r.push(n.value)}return{status:e.value,value:r}}static async mergeObjectAsync(e,t){const r=[];for(const n of t){const a=await n.key,i=await n.value;r.push({key:a,value:i})}return C.mergeObjectSync(e,r)}static mergeObjectSync(e,t){const r={};for(const n of t){const{key:a,value:i}=n;if(a.status==="aborted"||i.status==="aborted")return m;a.status==="dirty"&&e.dirty(),i.status==="dirty"&&e.dirty(),a.value!=="__proto__"&&(typeof i.value<"u"||n.alwaysSet)&&(r[a.value]=i.value)}return{status:e.value,value:r}}}const m=Object.freeze({status:"aborted"}),W=s=>({status:"dirty",value:s}),O=s=>({status:"valid",value:s}),Se=s=>s.status==="aborted",Ce=s=>s.status==="dirty",U=s=>s.status==="valid",Q=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 Z{constructor(e,t,r,n){this._cachedPath=[],this.parent=e,this.data=t,this._path=r,this._key=n}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 Oe=(s,e)=>{if(U(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 y(s){if(!s)return{};const{errorMap:e,invalid_type_error:t,required_error:r,description:n}=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:n}:{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:n}}class g{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(Q(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)},n=this._parseSync({data:e,path:r.path,parent:r});return Oe(r,n)}"~validate"(e){var r,n;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 a=this._parseSync({data:e,path:[],parent:t});return U(a)?{value:a.value}:{issues:t.common.issues}}catch(a){(n=(r=a==null?void 0:a.message)==null?void 0:r.toLowerCase())!=null&&n.includes("encountered")&&(this["~standard"].async=!0),t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then(a=>U(a)?{value:a.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)},n=this._parse({data:e,path:r.path,parent:r}),a=await(Q(n)?n:Promise.resolve(n));return Oe(r,a)}refine(e,t){const r=n=>typeof t=="string"||typeof t>"u"?{message:t}:typeof t=="function"?t(n):t;return this._refinement((n,a)=>{const i=e(n),o=()=>a.addIssue({code:d.custom,...r(n)});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,n)=>e(r)?!0:(n.addIssue(typeof t=="function"?t(r,n):t),!1))}_refinement(e){return new z({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 L.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return A.create(this)}promise(){return re.create(this,this._def)}or(e){return K.create([this,e],this._def)}and(e){return ee.create(this,e,this._def)}transform(e){return new z({...y(this._def),schema:this,typeName:_.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t=typeof e=="function"?e:()=>e;return new ne({...y(this._def),innerType:this,defaultValue:t,typeName:_.ZodDefault})}brand(){return new Me({typeName:_.ZodBranded,type:this,...y(this._def)})}catch(e){const t=typeof e=="function"?e:()=>e;return new ae({...y(this._def),innerType:this,catchValue:t,typeName:_.ZodCatch})}describe(e){const t=this.constructor;return new t({...this._def,description:e})}pipe(e){return ke.create(this,e)}readonly(){return ie.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const Ye=/^c[^\s-]{8,}$/i,He=/^[0-9a-z]+$/,Ge=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Qe=/^[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,Xe=/^[a-z0-9_-]{21}$/i,Ke=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,et=/^[-+]?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)?)??$/,tt=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,st="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let ce;const rt=/^(?:(?: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])$/,at=/^(([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]))$/,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]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,ot=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,dt=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Ie="((\\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])))",ct=new RegExp(`^${Ie}$`);function $e(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 ut(s){return new RegExp(`^${$e(s)}$`)}function lt(s){let e=`${Ie}T${$e(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 ht(s,e){return!!((e==="v4"||!e)&&rt.test(s)||(e==="v6"||!e)&&at.test(s))}function ft(s,e){if(!Ke.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,"="),n=JSON.parse(atob(r));return!(typeof n!="object"||n===null||"typ"in n&&(n==null?void 0:n.typ)!=="JWT"||!n.alg||e&&n.alg!==e)}catch{return!1}}function pt(s,e){return!!((e==="v4"||!e)&&nt.test(s)||(e==="v6"||!e)&&it.test(s))}class E extends g{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==u.string){const a=this._getOrReturnCtx(e);return c(a,{code:d.invalid_type,expected:u.string,received:a.parsedType}),m}const r=new C;let n;for(const a of this._def.checks)if(a.kind==="min")e.data.lengtha.value&&(n=this._getOrReturnCtx(e,n),c(n,{code:d.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),r.dirty());else if(a.kind==="length"){const i=e.data.length>a.value,o=e.data.lengthe.test(n),{validation:t,code:d.invalid_string,...h.errToObj(r)})}_addCheck(e){return new E({...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 E({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new E({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new E({...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 E({checks:[],typeName:_.ZodString,coerce:(s==null?void 0:s.coerce)??!1,...y(s)});function mt(s,e){const t=(s.toString().split(".")[1]||"").length,r=(e.toString().split(".")[1]||"").length,n=t>r?t:r,a=Number.parseInt(s.toFixed(n).replace(".","")),i=Number.parseInt(e.toFixed(n).replace(".",""));return a%i/10**n}class B extends g{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 a=this._getOrReturnCtx(e);return c(a,{code:d.invalid_type,expected:u.number,received:a.parsedType}),m}let r;const n=new C;for(const a of this._def.checks)a.kind==="int"?v.isInteger(e.data)||(r=this._getOrReturnCtx(e,r),c(r,{code:d.invalid_type,expected:"integer",received:"float",message:a.message}),n.dirty()):a.kind==="min"?(a.inclusive?e.dataa.value:e.data>=a.value)&&(r=this._getOrReturnCtx(e,r),c(r,{code:d.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),n.dirty()):a.kind==="multipleOf"?mt(e.data,a.value)!==0&&(r=this._getOrReturnCtx(e,r),c(r,{code:d.not_multiple_of,multipleOf:a.value,message:a.message}),n.dirty()):a.kind==="finite"?Number.isFinite(e.data)||(r=this._getOrReturnCtx(e,r),c(r,{code:d.not_finite,message:a.message}),n.dirty()):v.assertNever(a);return{status:n.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,n){return new B({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:h.toString(n)}]})}_addCheck(e){return new B({...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 B({checks:[],typeName:_.ZodNumber,coerce:(s==null?void 0:s.coerce)||!1,...y(s)});class J extends g{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 n=new C;for(const a of this._def.checks)a.kind==="min"?(a.inclusive?e.dataa.value:e.data>=a.value)&&(r=this._getOrReturnCtx(e,r),c(r,{code:d.too_big,type:"bigint",maximum:a.value,inclusive:a.inclusive,message:a.message}),n.dirty()):a.kind==="multipleOf"?e.data%a.value!==BigInt(0)&&(r=this._getOrReturnCtx(e,r),c(r,{code:d.not_multiple_of,multipleOf:a.value,message:a.message}),n.dirty()):v.assertNever(a);return{status:n.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,n){return new J({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:h.toString(n)}]})}_addCheck(e){return new J({...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 J({checks:[],typeName:_.ZodBigInt,coerce:(s==null?void 0:s.coerce)??!1,...y(s)});class le extends g{_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)}}le.create=s=>new le({typeName:_.ZodBoolean,coerce:(s==null?void 0:s.coerce)||!1,...y(s)});class X extends g{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==u.date){const a=this._getOrReturnCtx(e);return c(a,{code:d.invalid_type,expected:u.date,received:a.parsedType}),m}if(Number.isNaN(e.data.getTime())){const a=this._getOrReturnCtx(e);return c(a,{code:d.invalid_date}),m}const r=new C;let n;for(const a of this._def.checks)a.kind==="min"?e.data.getTime()a.value&&(n=this._getOrReturnCtx(e,n),c(n,{code:d.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),r.dirty()):v.assertNever(a);return{status:r.value,value:new Date(e.data.getTime())}}_addCheck(e){return new X({...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 X({checks:[],coerce:(s==null?void 0:s.coerce)||!1,typeName:_.ZodDate,...y(s)});class Ae extends g{_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,...y(s)});class he extends g{_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)}}he.create=s=>new he({typeName:_.ZodUndefined,...y(s)});class fe extends g{_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)}}fe.create=s=>new fe({typeName:_.ZodNull,...y(s)});class Ne extends g{constructor(){super(...arguments),this._any=!0}_parse(e){return O(e.data)}}Ne.create=s=>new Ne({typeName:_.ZodAny,...y(s)});class pe extends g{constructor(){super(...arguments),this._unknown=!0}_parse(e){return O(e.data)}}pe.create=s=>new pe({typeName:_.ZodUnknown,...y(s)});class P extends g{_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,...y(s)});class Ze extends g{_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,...y(s)});class A extends g{_parse(e){const{ctx:t,status:r}=this._processInputParams(e),n=this._def;if(t.parsedType!==u.array)return c(t,{code:d.invalid_type,expected:u.array,received:t.parsedType}),m;if(n.exactLength!==null){const i=t.data.length>n.exactLength.value,o=t.data.lengthn.maxLength.value&&(c(t,{code:d.too_big,maximum:n.maxLength.value,type:"array",inclusive:!0,exact:!1,message:n.maxLength.message}),r.dirty()),t.common.async)return Promise.all([...t.data].map((i,o)=>n.type._parseAsync(new Z(t,i,t.path,o)))).then(i=>C.mergeArray(r,i));const a=[...t.data].map((i,o)=>n.type._parseSync(new Z(t,i,t.path,o)));return C.mergeArray(r,a)}get element(){return this._def.type}min(e,t){return new A({...this._def,minLength:{value:e,message:h.toString(t)}})}max(e,t){return new A({...this._def,maxLength:{value:e,message:h.toString(t)}})}length(e,t){return new A({...this._def,exactLength:{value:e,message:h.toString(t)}})}nonempty(e){return this.min(1,e)}}A.create=(s,e)=>new A({type:s,minLength:null,maxLength:null,exactLength:null,typeName:_.ZodArray,...y(e)});function D(s){if(s instanceof w){const e={};for(const t in s.shape){const r=s.shape[t];e[t]=j.create(D(r))}return new w({...s._def,shape:()=>e})}else return s instanceof A?new A({...s._def,type:D(s.element)}):s instanceof j?j.create(D(s.unwrap())):s instanceof L?L.create(D(s.unwrap())):s instanceof M?M.create(s.items.map(e=>D(e))):s}class w extends g{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:n}=this._processInputParams(e),{shape:a,keys:i}=this._getCached(),o=[];if(!(this._def.catchall instanceof P&&this._def.unknownKeys==="strip"))for(const p in n.data)i.includes(p)||o.push(p);const f=[];for(const p of i){const x=a[p],F=n.data[p];f.push({key:{status:"valid",value:p},value:x._parse(new Z(n,F,n.path,p)),alwaysSet:p in n.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:n.data[x]}});else if(p==="strict")o.length>0&&(c(n,{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 F=n.data[x];f.push({key:{status:"valid",value:x},value:p._parse(new Z(n,F,n.path,x)),alwaysSet:x in n.data})}}return n.common.async?Promise.resolve().then(async()=>{const p=[];for(const x of f){const F=await x.key,Be=await x.value;p.push({key:F,value:Be,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 a,i;const n=((i=(a=this._def).errorMap)==null?void 0:i.call(a,t,r).message)??r.defaultError;return t.code==="unrecognized_keys"?{message:h.errToObj(e).message??n}:{message:n}}}:{}})}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 D(this)}partial(e){const t={};for(const r of v.objectKeys(this.shape)){const n=this.shape[r];e&&!e[r]?t[r]=n:t[r]=n.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 a=this.shape[r];for(;a instanceof j;)a=a._def.innerType;t[r]=a}return new w({...this._def,shape:()=>t})}keyof(){return Pe(v.objectKeys(this.shape))}}w.create=(s,e)=>new w({shape:()=>s,unknownKeys:"strip",catchall:P.create(),typeName:_.ZodObject,...y(e)});w.strictCreate=(s,e)=>new w({shape:()=>s,unknownKeys:"strict",catchall:P.create(),typeName:_.ZodObject,...y(e)});w.lazycreate=(s,e)=>new w({shape:s,unknownKeys:"strip",catchall:P.create(),typeName:_.ZodObject,...y(e)});class K extends g{_parse(e){const{ctx:t}=this._processInputParams(e),r=this._def.options;function n(a){for(const o of a)if(o.result.status==="valid")return o.result;for(const o of a)if(o.result.status==="dirty")return t.common.issues.push(...o.ctx.common.issues),o.result;const i=a.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 a=>{const i={...t,common:{...t.common,issues:[]},parent:null};return{result:await a._parseAsync({data:t.data,path:t.path,parent:i}),ctx:i}})).then(n);{let a;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"&&!a&&(a={result:x,ctx:p}),p.common.issues.length&&i.push(p.common.issues)}if(a)return t.common.issues.push(...a.ctx.common.issues),a.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}}K.create=(s,e)=>new K({options:s,typeName:_.ZodUnion,...y(e)});const R=s=>s instanceof _e?R(s.schema):s instanceof z?R(s.innerType()):s instanceof se?[s.value]:s instanceof V?s.options:s instanceof ye?v.objectValues(s.enum):s instanceof ne?R(s._def.innerType):s instanceof he?[void 0]:s instanceof fe?[null]:s instanceof j?[void 0,...R(s.unwrap())]:s instanceof L?[null,...R(s.unwrap())]:s instanceof Me||s instanceof ie?R(s.unwrap()):s instanceof ae?R(s._def.innerType):[];class xe extends g{_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,n=t.data[r],a=this.optionsMap.get(n);return a?t.common.async?a._parseAsync({data:t.data,path:t.path,parent:t}):a._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 n=new Map;for(const a of t){const i=R(a.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(n.has(o))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(o)}`);n.set(o,a)}}return new xe({typeName:_.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:n,...y(r)})}}function me(s,e){const t=$(s),r=$(e);if(s===e)return{valid:!0,data:s};if(t===u.object&&r===u.object){const n=v.objectKeys(e),a=v.objectKeys(s).filter(o=>n.indexOf(o)!==-1),i={...s,...e};for(const o of a){const f=me(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 n=[];for(let a=0;a{if(Se(a)||Se(i))return m;const o=me(a.value,i.value);return o.valid?((Ce(a)||Ce(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(([a,i])=>n(a,i)):n(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}ee.create=(s,e,t)=>new ee({left:s,right:e,typeName:_.ZodIntersection,...y(t)});class M extends g{_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 a=[...r.data].map((i,o)=>{const f=this._def.items[o]||this._def.rest;return f?f._parse(new Z(r,i,r.path,o)):null}).filter(i=>!!i);return r.common.async?Promise.all(a).then(i=>C.mergeArray(t,i)):C.mergeArray(t,a)}get items(){return this._def.items}rest(e){return new M({...this._def,rest:e})}}M.create=(s,e)=>{if(!Array.isArray(s))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new M({items:s,typeName:_.ZodTuple,rest:null,...y(e)})};class te extends g{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 n=[],a=this._def.keyType,i=this._def.valueType;for(const o in r.data)n.push({key:a._parse(new Z(r,o,r.path,o)),value:i._parse(new Z(r,r.data[o],r.path,o)),alwaysSet:o in r.data});return r.common.async?C.mergeObjectAsync(t,n):C.mergeObjectSync(t,n)}get element(){return this._def.valueType}static create(e,t,r){return t instanceof g?new te({keyType:e,valueType:t,typeName:_.ZodRecord,...y(r)}):new te({keyType:E.create(),valueType:e,typeName:_.ZodRecord,...y(t)})}}class Re extends g{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 n=this._def.keyType,a=this._def.valueType,i=[...r.data.entries()].map(([o,f],p)=>({key:n._parse(new Z(r,o,r.path,[p,"key"])),value:a._parse(new Z(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,...y(t)});class Y extends g{_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 n=this._def;n.minSize!==null&&r.data.sizen.maxSize.value&&(c(r,{code:d.too_big,maximum:n.maxSize.value,type:"set",inclusive:!0,exact:!1,message:n.maxSize.message}),t.dirty());const a=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)=>a._parse(new Z(r,f,r.path,p)));return r.common.async?Promise.all(o).then(f=>i(f)):i(o)}min(e,t){return new Y({...this._def,minSize:{value:e,message:h.toString(t)}})}max(e,t){return new Y({...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)}}Y.create=(s,e)=>new Y({valueType:s,minSize:null,maxSize:null,typeName:_.ZodSet,...y(e)});class _e extends g{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})}}_e.create=(s,e)=>new _e({getter:s,typeName:_.ZodLazy,...y(e)});class se extends g{_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}}se.create=(s,e)=>new se({value:s,typeName:_.ZodLiteral,...y(e)});function Pe(s,e){return new V({values:s,typeName:_.ZodEnum,...y(e)})}class V extends g{_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=Pe;class ye extends g{_parse(e){const t=v.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(e);if(r.parsedType!==u.string&&r.parsedType!==u.number){const n=v.objectValues(t);return c(r,{expected:v.joinValues(n),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 n=v.objectValues(t);return c(r,{received:r.data,code:d.invalid_enum_value,options:n}),m}return O(e.data)}get enum(){return this._def.values}}ye.create=(s,e)=>new ye({values:s,typeName:_.ZodNativeEnum,...y(e)});class re extends g{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(n=>this._def.type.parseAsync(n,{path:t.path,errorMap:t.common.contextualErrorMap})))}}re.create=(s,e)=>new re({type:s,typeName:_.ZodPromise,...y(e)});class z extends g{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),n=this._def.effect||null,a={addIssue:i=>{c(r,i),i.fatal?t.abort():t.dirty()},get path(){return r.path}};if(a.addIssue=a.addIssue.bind(a),n.type==="preprocess"){const i=n.transform(r.data,a);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"?W(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"?W(o.value):o}}if(n.type==="refinement"){const i=o=>{const f=n.refinement(o,a);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(n.type==="transform")if(r.common.async===!1){const i=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!U(i))return m;const o=n.transform(i.value,a);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=>U(i)?Promise.resolve(n.transform(i.value,a)).then(o=>({status:t.value,value:o})):m);v.assertNever(n)}}z.create=(s,e,t)=>new z({schema:s,typeName:_.ZodEffects,effect:e,...y(t)});z.createWithPreprocess=(s,e,t)=>new z({schema:e,effect:{type:"preprocess",transform:s},typeName:_.ZodEffects,...y(t)});class j extends g{_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,...y(e)});class L extends g{_parse(e){return this._getType(e)===u.null?O(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}L.create=(s,e)=>new L({innerType:s,typeName:_.ZodNullable,...y(e)});class ne extends g{_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,...y(e)});class ae extends g{_parse(e){const{ctx:t}=this._processInputParams(e),r={...t,common:{...t.common,issues:[]}},n=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return Q(n)?n.then(a=>({status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new I(r.common.issues)},input:r.data})})):{status:"valid",value:n.status==="valid"?n.value:this._def.catchValue({get error(){return new I(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}ae.create=(s,e)=>new ae({innerType:s,typeName:_.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...y(e)});class Ee extends g{_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}}}Ee.create=s=>new Ee({typeName:_.ZodNaN,...y(s)});class Me extends g{_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 ke extends g{_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.common.async)return(async()=>{const a=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?m:a.status==="dirty"?(t.dirty(),W(a.value)):this._def.out._parseAsync({data:a.value,path:r.path,parent:r})})();{const n=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return n.status==="aborted"?m:n.status==="dirty"?(t.dirty(),{status:"dirty",value:n.value}):this._def.out._parseSync({data:n.value,path:r.path,parent:r})}}static create(e,t){return new ke({in:e,out:t,typeName:_.ZodPipeline})}}class ie extends g{_parse(e){const t=this._def.innerType._parse(e),r=n=>(U(n)&&(n.value=Object.freeze(n.value)),n);return Q(t)?t.then(n=>r(n)):r(t)}unwrap(){return this._def.innerType}}ie.create=(s,e)=>new ie({innerType:s,typeName:_.ZodReadonly,...y(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=E.create,b=B.create,oe=le.create,_t=pe.create;P.create;const T=A.create,k=w.create,Ve=K.create,ze=xe.create;ee.create;M.create;const Le=te.create,G=se.create,ge=V.create;re.create;j.create;L.create;const N=Le(_t()),be=k({id:b(),name:l(),slug:l().optional()}).passthrough(),de=k({url:l(),is_official:oe()}),ve=k({task_id:b(),dataset_id:b(),model_name:l().nullish(),harness:l().nullish(),methodology:l().nullish(),metrics:Le(Ve([l(),b()])),uses_additional_data:oe().optional(),is_open:oe().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=ve.partial().extend({id:b().optional()}),gt=ze("op",[k({op:G("create"),data:ve}),k({op:G("update"),evaluation_id:b(),data:ve}),k({op:G("delete"),evaluation_id:b()})]),je=k({hf_models:T(l()),hf_datasets:T(l()),hf_spaces:T(l())}),we=k({file_name:l(),mime_type:l(),data_url:l().optional(),url:l().optional()}),q=k({name:l(),description:l().optional()}),vt=q.extend({image:we.optional(),image_credit:l().optional(),parent_id:b().optional(),area_id:b().optional(),keywords:l().optional()}),xt=q.extend({image:we.optional(),image_credit:l().optional(),source_paper_id:b().optional(),source_url:l().optional(),source_title:l().optional()}),kt=Ve([k({benchmark:l(),task:l(),description:l()}),q.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()})]),bt=q.extend({description:l(),direction:ge(["higher_is_better","lower_is_better"]),full_name:l().optional(),scale:l().optional(),task_id:b(),dataset_id:b()}),wt=q.extend({short_name:l().optional(),venue:l().optional(),location:l().optional(),url:l(),year:b(),start_date:l().optional(),end_date:l().optional()}),Tt=q.extend({hf_slug:l().optional(),website_url:l().optional(),image:we.optional()}),St=k({id:b(),paper_id:b().nullable(),hf_username:l(),hf_subject:l().nullish(),is_author:oe(),status:ge(["pending","approved","rejected"]),applied_payload:N.nullish(),conflict_payload:N.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:ge(["human","codex","auto"]).nullish(),catalog_event_id:l().nullish(),review_evidence:N.nullish(),created_at:l(),updated_at:l(),reviewed_at:l().nullish()});function S(s,e,t){return St.extend({edit_type:G(s),proposed_payload:e,current_payload:t.nullish()})}const Ct=S("tasks",k({task_ids:T(b())}),k({tasks:T(be)})),Ot=S("methods",k({method_ids:T(b())}),k({methods:T(be)})),At=S("evaluations",k({operations:T(gt)}),k({evaluations:T(yt)})),Nt=S("repositories",k({repositories:T(de)}),k({repositories:T(de)})),Zt=S("project_pages",k({project_pages:T(de)}),k({project_pages:T(de)})),Rt=S("source_url",k({source_url:l()}),k({source_url:l().nullish()})),Et=S("hf_artifacts",je,je),jt=S("x_threads",k({x_threads:T(l())}),k({x_threads:T(k({url:l()}))})),It=S("organizations",k({organization_ids:T(b())}),k({organizations:T(be)})),$t=S("new_task",vt,N),Pt=S("new_method",xt,N),Mt=S("new_benchmark",kt,N),Vt=S("new_metric",bt,N),zt=S("new_conference",wt,N),Lt=S("new_organization",Tt,N),Dt=S("new_external_paper",k({title:l().optional(),source_url:l(),authors:T(l()),date_published:l().optional(),abstract:l().optional()}),N),De=ze("edit_type",[Ct,Ot,At,Nt,Zt,Rt,Et,jt,It,$t,Pt,Mt,Vt,zt,Lt,Dt]);function Jt(s,e,t){return{paper_id:s,edit_type:e,proposed_payload:t}}const Ut=k({count:b(),results:T(De)});class Bt extends Error{constructor(e){super(`Malformed pending-edit payload: ${e}`),this.name="PendingEditPayloadError"}}function Ue(s,e){const t=s.safeParse(e);if(t.success)return t.data;const r=t.error.issues[0];throw new Bt(`${(r==null?void 0:r.path.join("."))||"response"}: ${(r==null?void 0:r.message)||"invalid value"}`)}const H=s=>Ue(De,s),qt=s=>Ue(Ut,s);class Ft{constructor(e){this.request=e}async submit(e){return H(await this.request("/me/paper-edits",{method:"POST",body:JSON.stringify(e)}))}list(e){const t=new URLSearchParams;for(const[n,a]of Object.entries(e??{}))a!==void 0&&t.set(n,String(a));const r=t.toString();return this.request(`/admin/paper-edits${r?`?${r}`:""}`).then(qt)}revertAutoApproved(e,t={}){return this.request(`/admin/submitters/${encodeURIComponent(e)}/revert-auto-approved`,{method:"POST",body:JSON.stringify(t)})}async get(e){return H(await this.request(`/admin/paper-edits/${e}`))}async approve(e,t={}){return H(await this.request(`/admin/paper-edits/${e}/approve`,{method:"POST",body:JSON.stringify(t)}))}async reject(e,t={}){return H(await this.request(`/admin/paper-edits/${e}/reject`,{method:"POST",body:JSON.stringify(t)}))}}const Yt=new Ft(qe);export{Jt as p,Yt as s}; +import{a5 as qe}from"./index-YwiKC6Po.js";var v;(function(s){s.assertEqual=n=>{};function e(n){}s.assertIs=e;function t(n){throw new Error}s.assertNever=t,s.arrayToEnum=n=>{const a={};for(const i of n)a[i]=i;return a},s.getValidEnumValues=n=>{const a=s.objectKeys(n).filter(o=>typeof n[n[o]]!="number"),i={};for(const o of a)i[o]=n[o];return s.objectValues(i)},s.objectValues=n=>s.objectKeys(n).map(function(a){return n[a]}),s.objectKeys=typeof Object.keys=="function"?n=>Object.keys(n):n=>{const a=[];for(const i in n)Object.prototype.hasOwnProperty.call(n,i)&&a.push(i);return a},s.find=(n,a)=>{for(const i of n)if(a(i))return i},s.isInteger=typeof Number.isInteger=="function"?n=>Number.isInteger(n):n=>typeof n=="number"&&Number.isFinite(n)&&Math.floor(n)===n;function r(n,a=" | "){return n.map(i=>typeof i=="string"?`'${i}'`:i).join(a)}s.joinValues=r,s.jsonStringifyReplacer=(n,a)=>typeof a=="bigint"?a.toString():a})(v||(v={}));var Te;(function(s){s.mergeShapes=(e,t)=>({...e,...t})})(Te||(Te={}));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(a){return a.message},r={_errors:[]},n=a=>{for(const i of a.issues)if(i.code==="invalid_union")i.unionErrors.map(n);else if(i.code==="invalid_return_type")n(i.returnTypeError);else if(i.code==="invalid_arguments")n(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 n of this.issues)if(n.path.length>0){const a=n.path[0];t[a]=t[a]||[],t[a].push(e(n))}else r.push(e(n));return{formErrors:r,fieldErrors:t}}get formErrors(){return this.flatten()}}I.create=s=>new I(s);const ue=(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 Fe=ue;function We(){return Fe}const Je=s=>{const{data:e,path:t,errorMaps:r,issueData:n}=s,a=[...t,...n.path||[]],i={...n,path:a};if(n.message!==void 0)return{...n,path:a,message:n.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{...n,path:a,message:o}};function c(s,e){const t=We(),r=Je({issueData:e,data:s.data,path:s.path,errorMaps:[s.common.contextualErrorMap,s.schemaErrorMap,t,t===ue?void 0:ue].filter(n=>!!n)});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 n of t){if(n.status==="aborted")return m;n.status==="dirty"&&e.dirty(),r.push(n.value)}return{status:e.value,value:r}}static async mergeObjectAsync(e,t){const r=[];for(const n of t){const a=await n.key,i=await n.value;r.push({key:a,value:i})}return C.mergeObjectSync(e,r)}static mergeObjectSync(e,t){const r={};for(const n of t){const{key:a,value:i}=n;if(a.status==="aborted"||i.status==="aborted")return m;a.status==="dirty"&&e.dirty(),i.status==="dirty"&&e.dirty(),a.value!=="__proto__"&&(typeof i.value<"u"||n.alwaysSet)&&(r[a.value]=i.value)}return{status:e.value,value:r}}}const m=Object.freeze({status:"aborted"}),W=s=>({status:"dirty",value:s}),O=s=>({status:"valid",value:s}),Se=s=>s.status==="aborted",Ce=s=>s.status==="dirty",U=s=>s.status==="valid",Q=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 Z{constructor(e,t,r,n){this._cachedPath=[],this.parent=e,this.data=t,this._path=r,this._key=n}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 Oe=(s,e)=>{if(U(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 y(s){if(!s)return{};const{errorMap:e,invalid_type_error:t,required_error:r,description:n}=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:n}:{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:n}}class g{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(Q(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)},n=this._parseSync({data:e,path:r.path,parent:r});return Oe(r,n)}"~validate"(e){var r,n;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 a=this._parseSync({data:e,path:[],parent:t});return U(a)?{value:a.value}:{issues:t.common.issues}}catch(a){(n=(r=a==null?void 0:a.message)==null?void 0:r.toLowerCase())!=null&&n.includes("encountered")&&(this["~standard"].async=!0),t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then(a=>U(a)?{value:a.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)},n=this._parse({data:e,path:r.path,parent:r}),a=await(Q(n)?n:Promise.resolve(n));return Oe(r,a)}refine(e,t){const r=n=>typeof t=="string"||typeof t>"u"?{message:t}:typeof t=="function"?t(n):t;return this._refinement((n,a)=>{const i=e(n),o=()=>a.addIssue({code:d.custom,...r(n)});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,n)=>e(r)?!0:(n.addIssue(typeof t=="function"?t(r,n):t),!1))}_refinement(e){return new z({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 L.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return A.create(this)}promise(){return re.create(this,this._def)}or(e){return K.create([this,e],this._def)}and(e){return ee.create(this,e,this._def)}transform(e){return new z({...y(this._def),schema:this,typeName:_.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t=typeof e=="function"?e:()=>e;return new ne({...y(this._def),innerType:this,defaultValue:t,typeName:_.ZodDefault})}brand(){return new Me({typeName:_.ZodBranded,type:this,...y(this._def)})}catch(e){const t=typeof e=="function"?e:()=>e;return new ae({...y(this._def),innerType:this,catchValue:t,typeName:_.ZodCatch})}describe(e){const t=this.constructor;return new t({...this._def,description:e})}pipe(e){return ke.create(this,e)}readonly(){return ie.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const Ye=/^c[^\s-]{8,}$/i,He=/^[0-9a-z]+$/,Ge=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Qe=/^[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,Xe=/^[a-z0-9_-]{21}$/i,Ke=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,et=/^[-+]?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)?)??$/,tt=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,st="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let ce;const rt=/^(?:(?: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])$/,at=/^(([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]))$/,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]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,ot=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,dt=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Ie="((\\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])))",ct=new RegExp(`^${Ie}$`);function $e(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 ut(s){return new RegExp(`^${$e(s)}$`)}function lt(s){let e=`${Ie}T${$e(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 ht(s,e){return!!((e==="v4"||!e)&&rt.test(s)||(e==="v6"||!e)&&at.test(s))}function ft(s,e){if(!Ke.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,"="),n=JSON.parse(atob(r));return!(typeof n!="object"||n===null||"typ"in n&&(n==null?void 0:n.typ)!=="JWT"||!n.alg||e&&n.alg!==e)}catch{return!1}}function pt(s,e){return!!((e==="v4"||!e)&&nt.test(s)||(e==="v6"||!e)&&it.test(s))}class E extends g{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==u.string){const a=this._getOrReturnCtx(e);return c(a,{code:d.invalid_type,expected:u.string,received:a.parsedType}),m}const r=new C;let n;for(const a of this._def.checks)if(a.kind==="min")e.data.lengtha.value&&(n=this._getOrReturnCtx(e,n),c(n,{code:d.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),r.dirty());else if(a.kind==="length"){const i=e.data.length>a.value,o=e.data.lengthe.test(n),{validation:t,code:d.invalid_string,...h.errToObj(r)})}_addCheck(e){return new E({...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 E({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new E({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new E({...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 E({checks:[],typeName:_.ZodString,coerce:(s==null?void 0:s.coerce)??!1,...y(s)});function mt(s,e){const t=(s.toString().split(".")[1]||"").length,r=(e.toString().split(".")[1]||"").length,n=t>r?t:r,a=Number.parseInt(s.toFixed(n).replace(".","")),i=Number.parseInt(e.toFixed(n).replace(".",""));return a%i/10**n}class B extends g{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 a=this._getOrReturnCtx(e);return c(a,{code:d.invalid_type,expected:u.number,received:a.parsedType}),m}let r;const n=new C;for(const a of this._def.checks)a.kind==="int"?v.isInteger(e.data)||(r=this._getOrReturnCtx(e,r),c(r,{code:d.invalid_type,expected:"integer",received:"float",message:a.message}),n.dirty()):a.kind==="min"?(a.inclusive?e.dataa.value:e.data>=a.value)&&(r=this._getOrReturnCtx(e,r),c(r,{code:d.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),n.dirty()):a.kind==="multipleOf"?mt(e.data,a.value)!==0&&(r=this._getOrReturnCtx(e,r),c(r,{code:d.not_multiple_of,multipleOf:a.value,message:a.message}),n.dirty()):a.kind==="finite"?Number.isFinite(e.data)||(r=this._getOrReturnCtx(e,r),c(r,{code:d.not_finite,message:a.message}),n.dirty()):v.assertNever(a);return{status:n.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,n){return new B({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:h.toString(n)}]})}_addCheck(e){return new B({...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 B({checks:[],typeName:_.ZodNumber,coerce:(s==null?void 0:s.coerce)||!1,...y(s)});class J extends g{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 n=new C;for(const a of this._def.checks)a.kind==="min"?(a.inclusive?e.dataa.value:e.data>=a.value)&&(r=this._getOrReturnCtx(e,r),c(r,{code:d.too_big,type:"bigint",maximum:a.value,inclusive:a.inclusive,message:a.message}),n.dirty()):a.kind==="multipleOf"?e.data%a.value!==BigInt(0)&&(r=this._getOrReturnCtx(e,r),c(r,{code:d.not_multiple_of,multipleOf:a.value,message:a.message}),n.dirty()):v.assertNever(a);return{status:n.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,n){return new J({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:h.toString(n)}]})}_addCheck(e){return new J({...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 J({checks:[],typeName:_.ZodBigInt,coerce:(s==null?void 0:s.coerce)??!1,...y(s)});class le extends g{_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)}}le.create=s=>new le({typeName:_.ZodBoolean,coerce:(s==null?void 0:s.coerce)||!1,...y(s)});class X extends g{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==u.date){const a=this._getOrReturnCtx(e);return c(a,{code:d.invalid_type,expected:u.date,received:a.parsedType}),m}if(Number.isNaN(e.data.getTime())){const a=this._getOrReturnCtx(e);return c(a,{code:d.invalid_date}),m}const r=new C;let n;for(const a of this._def.checks)a.kind==="min"?e.data.getTime()a.value&&(n=this._getOrReturnCtx(e,n),c(n,{code:d.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),r.dirty()):v.assertNever(a);return{status:r.value,value:new Date(e.data.getTime())}}_addCheck(e){return new X({...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 X({checks:[],coerce:(s==null?void 0:s.coerce)||!1,typeName:_.ZodDate,...y(s)});class Ae extends g{_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,...y(s)});class he extends g{_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)}}he.create=s=>new he({typeName:_.ZodUndefined,...y(s)});class fe extends g{_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)}}fe.create=s=>new fe({typeName:_.ZodNull,...y(s)});class Ne extends g{constructor(){super(...arguments),this._any=!0}_parse(e){return O(e.data)}}Ne.create=s=>new Ne({typeName:_.ZodAny,...y(s)});class pe extends g{constructor(){super(...arguments),this._unknown=!0}_parse(e){return O(e.data)}}pe.create=s=>new pe({typeName:_.ZodUnknown,...y(s)});class P extends g{_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,...y(s)});class Ze extends g{_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,...y(s)});class A extends g{_parse(e){const{ctx:t,status:r}=this._processInputParams(e),n=this._def;if(t.parsedType!==u.array)return c(t,{code:d.invalid_type,expected:u.array,received:t.parsedType}),m;if(n.exactLength!==null){const i=t.data.length>n.exactLength.value,o=t.data.lengthn.maxLength.value&&(c(t,{code:d.too_big,maximum:n.maxLength.value,type:"array",inclusive:!0,exact:!1,message:n.maxLength.message}),r.dirty()),t.common.async)return Promise.all([...t.data].map((i,o)=>n.type._parseAsync(new Z(t,i,t.path,o)))).then(i=>C.mergeArray(r,i));const a=[...t.data].map((i,o)=>n.type._parseSync(new Z(t,i,t.path,o)));return C.mergeArray(r,a)}get element(){return this._def.type}min(e,t){return new A({...this._def,minLength:{value:e,message:h.toString(t)}})}max(e,t){return new A({...this._def,maxLength:{value:e,message:h.toString(t)}})}length(e,t){return new A({...this._def,exactLength:{value:e,message:h.toString(t)}})}nonempty(e){return this.min(1,e)}}A.create=(s,e)=>new A({type:s,minLength:null,maxLength:null,exactLength:null,typeName:_.ZodArray,...y(e)});function D(s){if(s instanceof w){const e={};for(const t in s.shape){const r=s.shape[t];e[t]=j.create(D(r))}return new w({...s._def,shape:()=>e})}else return s instanceof A?new A({...s._def,type:D(s.element)}):s instanceof j?j.create(D(s.unwrap())):s instanceof L?L.create(D(s.unwrap())):s instanceof M?M.create(s.items.map(e=>D(e))):s}class w extends g{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:n}=this._processInputParams(e),{shape:a,keys:i}=this._getCached(),o=[];if(!(this._def.catchall instanceof P&&this._def.unknownKeys==="strip"))for(const p in n.data)i.includes(p)||o.push(p);const f=[];for(const p of i){const x=a[p],F=n.data[p];f.push({key:{status:"valid",value:p},value:x._parse(new Z(n,F,n.path,p)),alwaysSet:p in n.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:n.data[x]}});else if(p==="strict")o.length>0&&(c(n,{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 F=n.data[x];f.push({key:{status:"valid",value:x},value:p._parse(new Z(n,F,n.path,x)),alwaysSet:x in n.data})}}return n.common.async?Promise.resolve().then(async()=>{const p=[];for(const x of f){const F=await x.key,Be=await x.value;p.push({key:F,value:Be,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 a,i;const n=((i=(a=this._def).errorMap)==null?void 0:i.call(a,t,r).message)??r.defaultError;return t.code==="unrecognized_keys"?{message:h.errToObj(e).message??n}:{message:n}}}:{}})}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 D(this)}partial(e){const t={};for(const r of v.objectKeys(this.shape)){const n=this.shape[r];e&&!e[r]?t[r]=n:t[r]=n.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 a=this.shape[r];for(;a instanceof j;)a=a._def.innerType;t[r]=a}return new w({...this._def,shape:()=>t})}keyof(){return Pe(v.objectKeys(this.shape))}}w.create=(s,e)=>new w({shape:()=>s,unknownKeys:"strip",catchall:P.create(),typeName:_.ZodObject,...y(e)});w.strictCreate=(s,e)=>new w({shape:()=>s,unknownKeys:"strict",catchall:P.create(),typeName:_.ZodObject,...y(e)});w.lazycreate=(s,e)=>new w({shape:s,unknownKeys:"strip",catchall:P.create(),typeName:_.ZodObject,...y(e)});class K extends g{_parse(e){const{ctx:t}=this._processInputParams(e),r=this._def.options;function n(a){for(const o of a)if(o.result.status==="valid")return o.result;for(const o of a)if(o.result.status==="dirty")return t.common.issues.push(...o.ctx.common.issues),o.result;const i=a.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 a=>{const i={...t,common:{...t.common,issues:[]},parent:null};return{result:await a._parseAsync({data:t.data,path:t.path,parent:i}),ctx:i}})).then(n);{let a;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"&&!a&&(a={result:x,ctx:p}),p.common.issues.length&&i.push(p.common.issues)}if(a)return t.common.issues.push(...a.ctx.common.issues),a.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}}K.create=(s,e)=>new K({options:s,typeName:_.ZodUnion,...y(e)});const R=s=>s instanceof _e?R(s.schema):s instanceof z?R(s.innerType()):s instanceof se?[s.value]:s instanceof V?s.options:s instanceof ye?v.objectValues(s.enum):s instanceof ne?R(s._def.innerType):s instanceof he?[void 0]:s instanceof fe?[null]:s instanceof j?[void 0,...R(s.unwrap())]:s instanceof L?[null,...R(s.unwrap())]:s instanceof Me||s instanceof ie?R(s.unwrap()):s instanceof ae?R(s._def.innerType):[];class xe extends g{_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,n=t.data[r],a=this.optionsMap.get(n);return a?t.common.async?a._parseAsync({data:t.data,path:t.path,parent:t}):a._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 n=new Map;for(const a of t){const i=R(a.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(n.has(o))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(o)}`);n.set(o,a)}}return new xe({typeName:_.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:n,...y(r)})}}function me(s,e){const t=$(s),r=$(e);if(s===e)return{valid:!0,data:s};if(t===u.object&&r===u.object){const n=v.objectKeys(e),a=v.objectKeys(s).filter(o=>n.indexOf(o)!==-1),i={...s,...e};for(const o of a){const f=me(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 n=[];for(let a=0;a{if(Se(a)||Se(i))return m;const o=me(a.value,i.value);return o.valid?((Ce(a)||Ce(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(([a,i])=>n(a,i)):n(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}ee.create=(s,e,t)=>new ee({left:s,right:e,typeName:_.ZodIntersection,...y(t)});class M extends g{_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 a=[...r.data].map((i,o)=>{const f=this._def.items[o]||this._def.rest;return f?f._parse(new Z(r,i,r.path,o)):null}).filter(i=>!!i);return r.common.async?Promise.all(a).then(i=>C.mergeArray(t,i)):C.mergeArray(t,a)}get items(){return this._def.items}rest(e){return new M({...this._def,rest:e})}}M.create=(s,e)=>{if(!Array.isArray(s))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new M({items:s,typeName:_.ZodTuple,rest:null,...y(e)})};class te extends g{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 n=[],a=this._def.keyType,i=this._def.valueType;for(const o in r.data)n.push({key:a._parse(new Z(r,o,r.path,o)),value:i._parse(new Z(r,r.data[o],r.path,o)),alwaysSet:o in r.data});return r.common.async?C.mergeObjectAsync(t,n):C.mergeObjectSync(t,n)}get element(){return this._def.valueType}static create(e,t,r){return t instanceof g?new te({keyType:e,valueType:t,typeName:_.ZodRecord,...y(r)}):new te({keyType:E.create(),valueType:e,typeName:_.ZodRecord,...y(t)})}}class Re extends g{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 n=this._def.keyType,a=this._def.valueType,i=[...r.data.entries()].map(([o,f],p)=>({key:n._parse(new Z(r,o,r.path,[p,"key"])),value:a._parse(new Z(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,...y(t)});class Y extends g{_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 n=this._def;n.minSize!==null&&r.data.sizen.maxSize.value&&(c(r,{code:d.too_big,maximum:n.maxSize.value,type:"set",inclusive:!0,exact:!1,message:n.maxSize.message}),t.dirty());const a=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)=>a._parse(new Z(r,f,r.path,p)));return r.common.async?Promise.all(o).then(f=>i(f)):i(o)}min(e,t){return new Y({...this._def,minSize:{value:e,message:h.toString(t)}})}max(e,t){return new Y({...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)}}Y.create=(s,e)=>new Y({valueType:s,minSize:null,maxSize:null,typeName:_.ZodSet,...y(e)});class _e extends g{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})}}_e.create=(s,e)=>new _e({getter:s,typeName:_.ZodLazy,...y(e)});class se extends g{_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}}se.create=(s,e)=>new se({value:s,typeName:_.ZodLiteral,...y(e)});function Pe(s,e){return new V({values:s,typeName:_.ZodEnum,...y(e)})}class V extends g{_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=Pe;class ye extends g{_parse(e){const t=v.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(e);if(r.parsedType!==u.string&&r.parsedType!==u.number){const n=v.objectValues(t);return c(r,{expected:v.joinValues(n),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 n=v.objectValues(t);return c(r,{received:r.data,code:d.invalid_enum_value,options:n}),m}return O(e.data)}get enum(){return this._def.values}}ye.create=(s,e)=>new ye({values:s,typeName:_.ZodNativeEnum,...y(e)});class re extends g{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(n=>this._def.type.parseAsync(n,{path:t.path,errorMap:t.common.contextualErrorMap})))}}re.create=(s,e)=>new re({type:s,typeName:_.ZodPromise,...y(e)});class z extends g{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),n=this._def.effect||null,a={addIssue:i=>{c(r,i),i.fatal?t.abort():t.dirty()},get path(){return r.path}};if(a.addIssue=a.addIssue.bind(a),n.type==="preprocess"){const i=n.transform(r.data,a);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"?W(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"?W(o.value):o}}if(n.type==="refinement"){const i=o=>{const f=n.refinement(o,a);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(n.type==="transform")if(r.common.async===!1){const i=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!U(i))return m;const o=n.transform(i.value,a);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=>U(i)?Promise.resolve(n.transform(i.value,a)).then(o=>({status:t.value,value:o})):m);v.assertNever(n)}}z.create=(s,e,t)=>new z({schema:s,typeName:_.ZodEffects,effect:e,...y(t)});z.createWithPreprocess=(s,e,t)=>new z({schema:e,effect:{type:"preprocess",transform:s},typeName:_.ZodEffects,...y(t)});class j extends g{_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,...y(e)});class L extends g{_parse(e){return this._getType(e)===u.null?O(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}L.create=(s,e)=>new L({innerType:s,typeName:_.ZodNullable,...y(e)});class ne extends g{_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,...y(e)});class ae extends g{_parse(e){const{ctx:t}=this._processInputParams(e),r={...t,common:{...t.common,issues:[]}},n=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return Q(n)?n.then(a=>({status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new I(r.common.issues)},input:r.data})})):{status:"valid",value:n.status==="valid"?n.value:this._def.catchValue({get error(){return new I(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}ae.create=(s,e)=>new ae({innerType:s,typeName:_.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...y(e)});class Ee extends g{_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}}}Ee.create=s=>new Ee({typeName:_.ZodNaN,...y(s)});class Me extends g{_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 ke extends g{_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.common.async)return(async()=>{const a=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?m:a.status==="dirty"?(t.dirty(),W(a.value)):this._def.out._parseAsync({data:a.value,path:r.path,parent:r})})();{const n=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return n.status==="aborted"?m:n.status==="dirty"?(t.dirty(),{status:"dirty",value:n.value}):this._def.out._parseSync({data:n.value,path:r.path,parent:r})}}static create(e,t){return new ke({in:e,out:t,typeName:_.ZodPipeline})}}class ie extends g{_parse(e){const t=this._def.innerType._parse(e),r=n=>(U(n)&&(n.value=Object.freeze(n.value)),n);return Q(t)?t.then(n=>r(n)):r(t)}unwrap(){return this._def.innerType}}ie.create=(s,e)=>new ie({innerType:s,typeName:_.ZodReadonly,...y(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=E.create,b=B.create,oe=le.create,_t=pe.create;P.create;const T=A.create,k=w.create,Ve=K.create,ze=xe.create;ee.create;M.create;const Le=te.create,G=se.create,ge=V.create;re.create;j.create;L.create;const N=Le(_t()),be=k({id:b(),name:l(),slug:l().optional()}).passthrough(),de=k({url:l(),is_official:oe()}),ve=k({task_id:b(),dataset_id:b(),model_name:l().nullish(),harness:l().nullish(),methodology:l().nullish(),metrics:Le(Ve([l(),b()])),uses_additional_data:oe().optional(),is_open:oe().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=ve.partial().extend({id:b().optional()}),gt=ze("op",[k({op:G("create"),data:ve}),k({op:G("update"),evaluation_id:b(),data:ve}),k({op:G("delete"),evaluation_id:b()})]),je=k({hf_models:T(l()),hf_datasets:T(l()),hf_spaces:T(l())}),we=k({file_name:l(),mime_type:l(),data_url:l().optional(),url:l().optional()}),q=k({name:l(),description:l().optional()}),vt=q.extend({image:we.optional(),image_credit:l().optional(),parent_id:b().optional(),area_id:b().optional(),keywords:l().optional()}),xt=q.extend({image:we.optional(),image_credit:l().optional(),source_paper_id:b().optional(),source_url:l().optional(),source_title:l().optional()}),kt=Ve([k({benchmark:l(),task:l(),description:l()}),q.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()})]),bt=q.extend({description:l(),direction:ge(["higher_is_better","lower_is_better"]),full_name:l().optional(),scale:l().optional(),task_id:b(),dataset_id:b()}),wt=q.extend({short_name:l().optional(),venue:l().optional(),location:l().optional(),url:l(),year:b(),start_date:l().optional(),end_date:l().optional()}),Tt=q.extend({hf_slug:l().optional(),website_url:l().optional(),image:we.optional()}),St=k({id:b(),paper_id:b().nullable(),hf_username:l(),hf_subject:l().nullish(),is_author:oe(),status:ge(["pending","approved","rejected"]),applied_payload:N.nullish(),conflict_payload:N.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:ge(["human","codex","auto"]).nullish(),catalog_event_id:l().nullish(),review_evidence:N.nullish(),created_at:l(),updated_at:l(),reviewed_at:l().nullish()});function S(s,e,t){return St.extend({edit_type:G(s),proposed_payload:e,current_payload:t.nullish()})}const Ct=S("tasks",k({task_ids:T(b())}),k({tasks:T(be)})),Ot=S("methods",k({method_ids:T(b())}),k({methods:T(be)})),At=S("evaluations",k({operations:T(gt)}),k({evaluations:T(yt)})),Nt=S("repositories",k({repositories:T(de)}),k({repositories:T(de)})),Zt=S("project_pages",k({project_pages:T(de)}),k({project_pages:T(de)})),Rt=S("source_url",k({source_url:l()}),k({source_url:l().nullish()})),Et=S("hf_artifacts",je,je),jt=S("x_threads",k({x_threads:T(l())}),k({x_threads:T(k({url:l()}))})),It=S("organizations",k({organization_ids:T(b())}),k({organizations:T(be)})),$t=S("new_task",vt,N),Pt=S("new_method",xt,N),Mt=S("new_benchmark",kt,N),Vt=S("new_metric",bt,N),zt=S("new_conference",wt,N),Lt=S("new_organization",Tt,N),Dt=S("new_external_paper",k({title:l().optional(),source_url:l(),authors:T(l()),date_published:l().optional(),abstract:l().optional()}),N),De=ze("edit_type",[Ct,Ot,At,Nt,Zt,Rt,Et,jt,It,$t,Pt,Mt,Vt,zt,Lt,Dt]);function Jt(s,e,t){return{paper_id:s,edit_type:e,proposed_payload:t}}const Ut=k({count:b(),results:T(De)});class Bt extends Error{constructor(e){super(`Malformed pending-edit payload: ${e}`),this.name="PendingEditPayloadError"}}function Ue(s,e){const t=s.safeParse(e);if(t.success)return t.data;const r=t.error.issues[0];throw new Bt(`${(r==null?void 0:r.path.join("."))||"response"}: ${(r==null?void 0:r.message)||"invalid value"}`)}const H=s=>Ue(De,s),qt=s=>Ue(Ut,s);class Ft{constructor(e){this.request=e}async submit(e){return H(await this.request("/me/paper-edits",{method:"POST",body:JSON.stringify(e)}))}list(e){const t=new URLSearchParams;for(const[n,a]of Object.entries(e??{}))a!==void 0&&t.set(n,String(a));const r=t.toString();return this.request(`/admin/paper-edits${r?`?${r}`:""}`).then(qt)}revertAutoApproved(e,t={}){return this.request(`/admin/submitters/${encodeURIComponent(e)}/revert-auto-approved`,{method:"POST",body:JSON.stringify(t)})}async get(e){return H(await this.request(`/admin/paper-edits/${e}`))}async approve(e,t={}){return H(await this.request(`/admin/paper-edits/${e}/approve`,{method:"POST",body:JSON.stringify(t)}))}async reject(e,t={}){return H(await this.request(`/admin/paper-edits/${e}/reject`,{method:"POST",body:JSON.stringify(t)}))}}const Yt=new Ft(qe);export{Jt as p,Yt as s}; diff --git a/assets/switch-Crqp0RkL.js b/assets/switch-Crqp0RkL.js new file mode 100644 index 0000000000000000000000000000000000000000..ca08c5ed361f018995ba6e6c606f1fa5fbdeaeab --- /dev/null +++ b/assets/switch-Crqp0RkL.js @@ -0,0 +1 @@ +import{r as s,w as C,v as I,j as a,t as y,x as M,y as A,z as H,A as g}from"./index-YwiKC6Po.js";import{u as z}from"./index-BaDZKp6X.js";var b="Switch",[U]=H(b),[q,L]=U(b),P=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),x=l?i||!!l.closest("form"):!0,[f,B]=I({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(T=>!T),x&&(k.current=h.isPropagationStopped(),k.current||h.stopPropagation())})}),x&&a.jsx(N,{control:l,bubbles:!k.current,name:n,value:u,checked:f,required:d,disabled:c,form:i,style:{transform:"translateX(-100%)"}})]})});P.displayName=b;var E="SwitchThumb",R=s.forwardRef((t,o)=>{const{__scopeSwitch:e,...n}=t,r=L(E,e);return a.jsx(y.span,{"data-state":j(r.checked),"data-disabled":r.disabled?"":void 0,...n,ref:o})});R.displayName=E;var O="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=z(e),v=A(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=O;function j(t){return t?"checked":"unchecked"}var _=P,D=R;const F=s.forwardRef(({className:t,...o},e)=>a.jsx(_,{className:g("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(D,{className:g("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")})}));F.displayName=_.displayName;export{F as S}; diff --git a/assets/switch-D_MyRbto.js b/assets/switch-D_MyRbto.js deleted file mode 100644 index c62b4c17c33fe609b355c22d788491120c442a72..0000000000000000000000000000000000000000 --- a/assets/switch-D_MyRbto.js +++ /dev/null @@ -1 +0,0 @@ -import{r as s,w as C,v as I,j as a,t as y,x as M,y as H,z,B as g}from"./index-D6jcIRWs.js";import{u as A}from"./index-DIg7XGE2.js";var b="Switch",[U]=z(b),[q,L]=U(b),P=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),x=l?i||!!l.closest("form"):!0,[f,B]=I({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(T=>!T),x&&(k.current=h.isPropagationStopped(),k.current||h.stopPropagation())})}),x&&a.jsx(N,{control:l,bubbles:!k.current,name:n,value:u,checked:f,required:d,disabled:c,form:i,style:{transform:"translateX(-100%)"}})]})});P.displayName=b;var E="SwitchThumb",R=s.forwardRef((t,o)=>{const{__scopeSwitch:e,...n}=t,r=L(E,e);return a.jsx(y.span,{"data-state":j(r.checked),"data-disabled":r.disabled?"":void 0,...n,ref:o})});R.displayName=E;var O="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=O;function j(t){return t?"checked":"unchecked"}var _=P,D=R;const F=s.forwardRef(({className:t,...o},e)=>a.jsx(_,{className:g("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(D,{className:g("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")})}));F.displayName=_.displayName;export{F as S}; diff --git a/assets/textarea-sXKODM3W.js b/assets/textarea-BPIMGf5w.js similarity index 86% rename from assets/textarea-sXKODM3W.js rename to assets/textarea-BPIMGf5w.js index b6107b5c59dd2169e003ee8631cbffcb973169c2..247cacec8a3ee00fa728a91cf9f58786811f54b3 100644 --- a/assets/textarea-sXKODM3W.js +++ b/assets/textarea-BPIMGf5w.js @@ -1 +1 @@ -import{r as s,j as a,B as t}from"./index-D6jcIRWs.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{r as s,j as a,A as t}from"./index-YwiKC6Po.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-BqRlVdvF.js b/assets/thumbs-up-D9G2aLNB.js similarity index 90% rename from assets/thumbs-up-BqRlVdvF.js rename to assets/thumbs-up-D9G2aLNB.js index 1f9e4791e8638beed6b2a9473feebecbabe3dc84..a3e791c57d21f890c904bb99930193487edcee0d 100644 --- a/assets/thumbs-up-BqRlVdvF.js +++ b/assets/thumbs-up-D9G2aLNB.js @@ -1,4 +1,4 @@ -import{n as a}from"./index-D6jcIRWs.js";/** +import{n as a}from"./index-YwiKC6Po.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/colors-CLwl8a2d.js b/assets/transform-CNg3rvXk.js similarity index 92% rename from assets/colors-CLwl8a2d.js rename to assets/transform-CNg3rvXk.js index 97d85e6b4c9474e72279b0116bcd0e79d1250fb4..8040921e907cd9da187f5eb7c910f3cbce8ea9f1 100644 --- a/assets/colors-CLwl8a2d.js +++ b/assets/transform-CNg3rvXk.js @@ -1 +1 @@ -import{Y as _}from"./index-D6jcIRWs.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 C(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:C({formats:at,defaultWidth:"full"}),time:C({formats:it,defaultWidth:"full"}),dateTime:C({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]},Ct={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},Nt={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:Ct,defaultMatchWidth:"any",parsePatterns:Nt,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 $t(t,e,n){const r=Bt(t,e,n);if(console.warn(r),jt.includes(t))throw new RangeError(r)}function Bt(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 Gt=/[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(Gt).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))&&$t(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 $(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=N(e[1]),r=N(e[2]),a=N(e[3]);return me(n,r,a)?n*R+r*I+a*1e3:NaN}function N(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 B(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]||(B(t)?29:28))}function fe(t,e){return e>=1&&e<=(B(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"?$(t):t;return Kt(e,"MMM d, yyyy")}catch{return null}}function Me(t){if(!t)return null;try{return $(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=G.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"]),G=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=G.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,"-")}function Te(t){let e=2166136261;const n=t||"";for(let r=0;r=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-DqN3HzZ5.js b/assets/trending-up-Sm0tkX5g.js similarity index 89% rename from assets/trending-up-DqN3HzZ5.js rename to assets/trending-up-Sm0tkX5g.js index 1bd69814dce7a42276d0db92f32bf82847b36fed..e5683f62e4d43f81e8dc26b2cf5e70189d87100e 100644 --- a/assets/trending-up-DqN3HzZ5.js +++ b/assets/trending-up-Sm0tkX5g.js @@ -1,4 +1,4 @@ -import{n}from"./index-D6jcIRWs.js";/** +import{n}from"./index-YwiKC6Po.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/triangle-alert-Cypc2KaL.js b/assets/triangle-alert-BWObrJc7.js similarity index 94% rename from assets/triangle-alert-Cypc2KaL.js rename to assets/triangle-alert-BWObrJc7.js index f62683c30123009b19687940c6f6e0ff410db995..32ac5f273ce5459298a8c1ac28c2a7d0ca9ef548 100644 --- a/assets/triangle-alert-Cypc2KaL.js +++ b/assets/triangle-alert-BWObrJc7.js @@ -1,4 +1,4 @@ -import{n as e}from"./index-D6jcIRWs.js";/** +import{n as e}from"./index-YwiKC6Po.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/trophy-CqWfBPLd.js b/assets/trophy-B60aAfG3.js similarity index 93% rename from assets/trophy-CqWfBPLd.js rename to assets/trophy-B60aAfG3.js index d61d0793d750e52518f761a03641ac3c31270850..cc4f518c3937f73293a3a7d4090d563eed8be524 100644 --- a/assets/trophy-CqWfBPLd.js +++ b/assets/trophy-B60aAfG3.js @@ -1,4 +1,4 @@ -import{n as a}from"./index-D6jcIRWs.js";/** +import{n as a}from"./index-YwiKC6Po.js";/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. diff --git a/assets/useDebounce-DLPbKAkz.js b/assets/useDebounce-BFugPTG4.js similarity index 66% rename from assets/useDebounce-DLPbKAkz.js rename to assets/useDebounce-BFugPTG4.js index 77e0424731ae21f26868b9bd06ce02cb26807f95..b80c66260bdc6bbf7778451569b77c826a9cf9b3 100644 --- a/assets/useDebounce-DLPbKAkz.js +++ b/assets/useDebounce-BFugPTG4.js @@ -1 +1 @@ -import{r as o}from"./index-D6jcIRWs.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{r as o}from"./index-YwiKC6Po.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/useHashScrollOnReady-BKkkyVVX.js b/assets/useHashScrollOnReady-BKkkyVVX.js new file mode 100644 index 0000000000000000000000000000000000000000..f958df48a12cc69eddc278f7ab37883b3a0064dd --- /dev/null +++ b/assets/useHashScrollOnReady-BKkkyVVX.js @@ -0,0 +1 @@ +import{j as s,L as h,r as x}from"./index-YwiKC6Po.js";import{S as p}from"./skeleton-CXR1qouH.js";import{A as j,a as m}from"./alert-Cx5luC5D.js";import{T as d}from"./trending-up-Sm0tkX5g.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-FXco4P1n.js b/assets/useInfiniteQuery-BEbL80ez.js similarity index 89% rename from assets/useInfiniteQuery-FXco4P1n.js rename to assets/useInfiniteQuery-BEbL80ez.js index 290167fbeaae60b481db3e0e5b5005c849c214ba..f2ec43992da6e735d35aff3fbdf906b219e9f46d 100644 --- a/assets/useInfiniteQuery-FXco4P1n.js +++ b/assets/useInfiniteQuery-BEbL80ez.js @@ -1 +1 @@ -import{Q as v,a as p}from"./useQuery-CUJUm4FY.js";import{aS as x,aT as b}from"./index-D6jcIRWs.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:b(t,s.data),hasPreviousPage:x(t,s.data),isFetchNextPageError:h,isFetchingNextPage:n,isFetchPreviousPageError:o,isFetchingPreviousPage:u,isRefetchError:d&&!h&&!o,isRefetching:g&&!n&&!u}}};function w(e,t){return p(e,l)}export{w as u}; +import{Q as v,h as p}from"./useQuery-DPH6Mb2w.js";import{aU as x,aV as b}from"./index-YwiKC6Po.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:b(t,s.data),hasPreviousPage:x(t,s.data),isFetchNextPageError:h,isFetchingNextPage:n,isFetchPreviousPageError:o,isFetchingPreviousPage:u,isRefetchError:d&&!h&&!o,isRefetching:g&&!n&&!u}}};function w(e,t){return p(e,l)}export{w as u}; diff --git a/assets/useInfiniteScroll-Dm7JY_X4.js b/assets/useInfiniteScroll-Dm7JY_X4.js deleted file mode 100644 index aef65d5957c46ecb51512271c2172deaa0a08da6..0000000000000000000000000000000000000000 --- a/assets/useInfiniteScroll-Dm7JY_X4.js +++ /dev/null @@ -1 +0,0 @@ -import{r as c}from"./index-D6jcIRWs.js";import{u as f}from"./useIntersectionObserver-3LTuEaFW.js";function x(i,n="200px"){const{targetRef:o,isIntersecting:e}=f({rootMargin:n}),{data:a,hasNextPage:t,isFetchingNextPage:r,fetchNextPage:s}=i;return c.useEffect(()=>{e&&t&&!r&&s()},[e,t,r,s,a]),o}export{x as u}; diff --git a/assets/useIntersectionObserver-3LTuEaFW.js b/assets/useIntersectionObserver-Dt36kyjs.js similarity index 86% rename from assets/useIntersectionObserver-3LTuEaFW.js rename to assets/useIntersectionObserver-Dt36kyjs.js index 4acd92195e509ac9460db666956ede43c1382fd6..44ebd4a746fb357c3b5e9d81314cb995ac85891e 100644 --- a/assets/useIntersectionObserver-3LTuEaFW.js +++ b/assets/useIntersectionObserver-Dt36kyjs.js @@ -1 +1 @@ -import{r}from"./index-D6jcIRWs.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{r}from"./index-YwiKC6Po.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-p6mN4h17.js b/assets/useMutation-f6iDkf3w.js similarity index 53% rename from assets/useMutation-p6mN4h17.js rename to assets/useMutation-f6iDkf3w.js index 5aa181714083625f0cc691e2a8bce61a131fd56e..13670310dd704026083475f120ebacd946c2ac79 100644 --- a/assets/useMutation-p6mN4h17.js +++ b/assets/useMutation-f6iDkf3w.js @@ -1 +1 @@ -var R=i=>{throw TypeError(i)};var E=(i,t,s)=>t.has(i)||R("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)?R("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{ay as L,aB as U,aN as j,aO as k,aL as P,f as q,r as v,aD as D,aM as A}from"./index-D6jcIRWs.js";var a,c,o,h,n,C,S,w,B=(w=class extends L{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),U(this.options,s)||e(this,a).getMutationCache().notify({type:"observerOptionsUpdated",mutation:e(this,o),observer:this}),s!=null&&s.mutationKey&&this.options.mutationKey&&j(s.mutationKey)!==j(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)??k();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){P.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))})})},w);function Q(i,t){const s=q(),[r]=v.useState(()=>new B(s,i));v.useEffect(()=>{r.setOptions(i)},[r,i]);const u=v.useSyncExternalStore(v.useCallback(d=>r.subscribe(P.batchCalls(d)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),f=v.useCallback((d,O)=>{r.mutate(d,O).catch(D)},[r]);if(u.error&&A(r.options.throwOnError,[u.error]))throw u.error;return{...u,mutate:f,mutateAsync:u.mutate}}export{Q as u}; +var R=i=>{throw TypeError(i)};var E=(i,t,s)=>t.has(i)||R("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)?R("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),v=(i,t,s)=>(E(i,t,"access private method"),s);import{at as U,av as k,aB as j,aC as q,au as P,f as D,r as y,ax as L,aD as A}from"./index-YwiKC6Po.js";var a,c,o,h,n,g,S,w,B=(w=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(),v(this,n,g).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&&j(s.mutationKey)!==j(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){v(this,n,g).call(this),v(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),v(this,n,g).call(this),v(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,g=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){P.batch(()=>{var s,r,u,f,d,O,x,K;if(e(this,h)&&this.hasListeners()){const m=e(this,c).variables,C=e(this,c).context,M={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,C,M)}catch(l){Promise.reject(l)}try{(f=(u=e(this,h)).onSettled)==null||f.call(u,t.data,null,m,C,M)}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,C,M)}catch(l){Promise.reject(l)}try{(K=(x=e(this,h)).onSettled)==null||K.call(x,void 0,t.error,m,C,M)}catch(l){Promise.reject(l)}}}this.listeners.forEach(m=>{m(e(this,c))})})},w);function T(i,t){const s=D(),[r]=y.useState(()=>new B(s,i));y.useEffect(()=>{r.setOptions(i)},[r,i]);const u=y.useSyncExternalStore(y.useCallback(d=>r.subscribe(P.batchCalls(d)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),f=y.useCallback((d,O)=>{r.mutate(d,O).catch(L)},[r]);if(u.error&&A(r.options.throwOnError,[u.error]))throw u.error;return{...u,mutate:f,mutateAsync:u.mutate}}export{T as u}; diff --git a/assets/usePapers-BbCSwcVk.js b/assets/usePapers-BbCSwcVk.js deleted file mode 100644 index de15c4851c295e82dfb9d1ce22d75e0b84ede18b..0000000000000000000000000000000000000000 --- a/assets/usePapers-BbCSwcVk.js +++ /dev/null @@ -1 +0,0 @@ -import{a as g,p as h}from"./papers-DIIIPDpj.js";import{ai as y}from"./index-D6jcIRWs.js";import{u as x}from"./useQuery-CUJUm4FY.js";import{u as m}from"./useInfiniteQuery-FXco4P1n.js";function w(a,e=!0){return x({queryKey:h.detail(a),queryFn:()=>g.get(a),enabled:e&&!!a,staleTime:10*60*1e3,refetchOnWindowFocus:!1})}function I(a={}){const{page_size:e=20,search:t,order_by:s="date_published",order_dir:n="desc",start_date:i,end_date:o,conference:r,task:u,method:l,latest_only:d=!0,include_resources:c=!1,has_code:f=!1,has_hf_artifacts:p=!1,framework:_,repository:b,author:F,enabled:k=!0}=a;return m({queryKey:[...h.feeds.infinite,{page_size:e,search:t,order_by:s,order_dir:n,start_date:i,end_date:o,conference:r,task:u,method:l,latest_only:d,include_resources:c,has_code:f,has_hf_artifacts:p,framework:_,repository:b,author:F}],queryFn:({pageParam:P=1})=>g.list({page:P,page_size:e,search:t,order_by:s,order_dir:n,start_date:i,end_date:o,conference:r,task:u,method:l,latest_only:d,include_resources:c,has_code:f,has_hf_artifacts:p,framework:_,repository:b,author:F}),getNextPageParam:P=>P.next_page,initialPageParam:1,enabled:k,staleTime:5*60*1e3,placeholderData:y,refetchOnWindowFocus:!1})}function K({q:a,order_by:e="relevance",start_date:t,end_date:s,has_code:n=!1,has_hf_artifacts:i=!1,enabled:o=!0}){return m({queryKey:[...h.feeds.search,{q:a,order_by:e,start_date:t,end_date:s,has_code:n,has_hf_artifacts:i}],queryFn:({pageParam:r=1})=>g.searchFeed({q:a,page:r,page_size:20,order_by:e,start_date:t,end_date:s,has_code:n,has_hf_artifacts:i,mode:"hybrid"}),getNextPageParam:r=>r.next_page,initialPageParam:1,enabled:o&&a.trim().length>0,staleTime:5*60*1e3,placeholderData:y,refetchOnWindowFocus:!1})}function D(a){const{taskId:e,page_size:t=20,order_by:s="date_published",order_dir:n="desc",latest_only:i=!0,include_resources:o=!0,has_code:r=!1,has_hf_artifacts:u=!1,start_date:l,end_date:d,enabled:c=!0}=a;return m({queryKey:[...h.feeds.task,e,{page_size:t,order_by:s,order_dir:n,latest_only:i,include_resources:o,has_code:r,has_hf_artifacts:u,start_date:l,end_date:d}],queryFn:({pageParam:f=1})=>g.forTask(e,{page:f,page_size:t,order_by:s,order_dir:n,latest_only:i,include_resources:o,repository_limit:1,has_code:r,has_hf_artifacts:u,start_date:l,end_date:d}),getNextPageParam:f=>f.next_page,initialPageParam:1,enabled:c&&!!e,staleTime:5*60*1e3,placeholderData:y,refetchOnWindowFocus:!1})}function W(a){const{conferenceSlug:e,taskSlug:t,presentation:s,page_size:n=20,order_by:i="date_published",order_dir:o="desc",latest_only:r=!0,include_resources:u=!0,has_code:l=!1,has_hf_artifacts:d=!1,start_date:c,end_date:f,enabled:p=!0}=a;return m({queryKey:[...h.feeds.conference,e,t,s,{page_size:n,order_by:i,order_dir:o,latest_only:r,include_resources:u,has_code:l,has_hf_artifacts:d,start_date:c,end_date:f}],queryFn:({pageParam:_=1})=>g.forConference(e,{task:t,presentation:s,page:_,page_size:n,order_by:i,order_dir:o,latest_only:r,include_resources:u,has_code:l,has_hf_artifacts:d,start_date:c,end_date:f}),getNextPageParam:_=>_.next_page,initialPageParam:1,enabled:p&&!!e,staleTime:5*60*1e3,placeholderData:y,refetchOnWindowFocus:!1})}function N(a){const{organizationSlug:e,taskSlug:t,page_size:s=20,order_by:n="date_published",order_dir:i="desc",latest_only:o=!0,include_resources:r=!0,has_code:u=!1,has_hf_artifacts:l=!1,start_date:d,end_date:c,enabled:f=!0}=a;return m({queryKey:[...h.feeds.organization,e,t,{page_size:s,order_by:n,order_dir:i,latest_only:o,include_resources:r,has_code:u,has_hf_artifacts:l,start_date:d,end_date:c}],queryFn:({pageParam:p=1})=>g.forOrganization(e,{task:t,page:p,page_size:s,order_by:n,order_dir:i,latest_only:o,include_resources:r,has_code:u,has_hf_artifacts:l,start_date:d,end_date:c}),getNextPageParam:p=>p.next_page,initialPageParam:1,enabled:f&&!!e,staleTime:5*60*1e3,placeholderData:y,refetchOnWindowFocus:!1})}export{K as a,w as b,D as c,W as d,N as e,I as u}; diff --git a/assets/usePapers-C1deOZKl.js b/assets/usePapers-C1deOZKl.js new file mode 100644 index 0000000000000000000000000000000000000000..762d6180fb8ebc49845d711c135afa2d3d43a4a9 --- /dev/null +++ b/assets/usePapers-C1deOZKl.js @@ -0,0 +1 @@ +import{a as u,p as i}from"./paperQueryKeys-C5FMa4Oj.js";import{u as o}from"./useQuery-DPH6Mb2w.js";import{u as f}from"./useInfiniteQuery-BEbL80ez.js";function c(e,t=!0){return o({queryKey:i.detail(e),queryFn:()=>u.get(e),enabled:t&&!!e,staleTime:10*60*1e3,refetchOnWindowFocus:!1})}function d(e,t,{enabled:n=!0,initialPage:s=1}={}){return f({queryKey:e,queryFn:({pageParam:a})=>t(a),initialPageParam:s,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,refetchOnWindowFocus:!1})}export{c as a,d as u}; diff --git a/assets/useQuery-CUJUm4FY.js b/assets/useQuery-DPH6Mb2w.js similarity index 89% rename from assets/useQuery-CUJUm4FY.js rename to assets/useQuery-DPH6Mb2w.js index 277bf7706b738648ba873a4068f4fb0e55e727f5..3933537d731c362e8f9966da0a0d63816a969f84 100644 --- a/assets/useQuery-CUJUm4FY.js +++ b/assets/useQuery-DPH6Mb2w.js @@ -1 +1 @@ -var bt=s=>{throw TypeError(s)};var $=(s,t,e)=>t.has(s)||bt("Cannot "+e);var i=(s,t,e)=>($(s,t,"read from private field"),e?e.call(s):t.get(s)),p=(s,t,e)=>t.has(s)?bt("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(s):t.set(s,e),u=(s,t,e,r)=>($(s,t,"write to private field"),r?r.call(s,e):t.set(s,e),e),l=(s,t,e)=>($(s,t,"access private method"),e);import{ay as Mt,az as gt,aA as S,aB as q,aC as H,aD as tt,aE as et,aF as vt,aG as Tt,aH as J,aI as Qt,aJ as xt,aK as mt,aL as Ct,r as O,aM as Ot,f as _t}from"./index-D6jcIRWs.js";var v,a,j,g,x,U,C,w,z,P,L,_,F,M,N,n,A,st,it,rt,at,nt,ht,ot,It,Et,Ft=(Et=class extends Mt{constructor(t,e){super();p(this,n);p(this,v);p(this,a);p(this,j);p(this,g);p(this,x);p(this,U);p(this,C);p(this,w);p(this,z);p(this,P);p(this,L);p(this,_);p(this,F);p(this,M);p(this,N,new Set);this.options=e,u(this,v,t),u(this,w,null),u(this,C,gt()),this.bindMethods(),this.setOptions(e)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(i(this,a).addObserver(this),Rt(i(this,a),this.options)?l(this,n,A).call(this):this.updateResult(),l(this,n,at).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return ct(i(this,a),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return ct(i(this,a),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,l(this,n,nt).call(this),l(this,n,ht).call(this),i(this,a).removeObserver(this)}setOptions(t){const e=this.options,r=i(this,a);if(this.options=i(this,v).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof S(this.options.enabled,i(this,a))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");l(this,n,ot).call(this),i(this,a).setOptions(this.options),e._defaulted&&!q(this.options,e)&&i(this,v).getQueryCache().notify({type:"observerOptionsUpdated",query:i(this,a),observer:this});const h=this.hasListeners();h&&St(i(this,a),r,this.options,e)&&l(this,n,A).call(this),this.updateResult(),h&&(i(this,a)!==r||S(this.options.enabled,i(this,a))!==S(e.enabled,i(this,a))||H(this.options.staleTime,i(this,a))!==H(e.staleTime,i(this,a)))&&l(this,n,st).call(this);const o=l(this,n,it).call(this);h&&(i(this,a)!==r||S(this.options.enabled,i(this,a))!==S(e.enabled,i(this,a))||o!==i(this,M))&&l(this,n,rt).call(this,o)}getOptimisticResult(t){const e=i(this,v).getQueryCache().build(i(this,v),t),r=this.createResult(e,t);return Ut(this,r)&&(u(this,g,r),u(this,U,this.options),u(this,x,i(this,a).state)),r}getCurrentResult(){return i(this,g)}trackResult(t,e){return new Proxy(t,{get:(r,h)=>(this.trackProp(h),e==null||e(h),h==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&i(this,C).status==="pending"&&i(this,C).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(r,h))})}trackProp(t){i(this,N).add(t)}getCurrentQuery(){return i(this,a)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const e=i(this,v).defaultQueryOptions(t),r=i(this,v).getQueryCache().build(i(this,v),e);return r.fetch().then(()=>this.createResult(r,e))}fetch(t){return l(this,n,A).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),i(this,g)))}createResult(t,e){var ft;const r=i(this,a),h=this.options,o=i(this,g),c=i(this,x),y=i(this,U),b=t!==r?t.state:i(this,j),{state:E}=t;let d={...E},T=!1,f;if(e._optimisticResults){const R=this.hasListeners(),k=!R&&Rt(t,e),V=R&&St(t,r,e,h);(k||V)&&(d={...d,...xt(E.data,t.options)}),e._optimisticResults==="isRestoring"&&(d.fetchStatus="idle")}let{error:Q,errorUpdatedAt:B,status:m}=d;f=d.data;let W=!1;if(e.placeholderData!==void 0&&f===void 0&&m==="pending"){let R;o!=null&&o.isPlaceholderData&&e.placeholderData===(y==null?void 0:y.placeholderData)?(R=o.data,W=!0):R=typeof e.placeholderData=="function"?e.placeholderData((ft=i(this,L))==null?void 0:ft.state.data,i(this,L)):e.placeholderData,R!==void 0&&(m="success",f=mt(o==null?void 0:o.data,R,e),T=!0)}if(e.select&&f!==void 0&&!W)if(o&&f===(c==null?void 0:c.data)&&e.select===i(this,z))f=i(this,P);else try{u(this,z,e.select),f=e.select(f),f=mt(o==null?void 0:o.data,f,e),u(this,P,f),u(this,w,null)}catch(R){u(this,w,R)}i(this,w)&&(Q=i(this,w),f=i(this,P),B=Date.now(),m="error");const X=d.fetchStatus==="fetching",Y=m==="pending",Z=m==="error",lt=Y&&X,dt=f!==void 0,I={status:m,fetchStatus:d.fetchStatus,isPending:Y,isSuccess:m==="success",isError:Z,isInitialLoading:lt,isLoading:lt,data:f,dataUpdatedAt:d.dataUpdatedAt,error:Q,errorUpdatedAt:B,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:d.dataUpdateCount>b.dataUpdateCount||d.errorUpdateCount>b.errorUpdateCount,isFetching:X,isRefetching:X&&!Y,isLoadingError:Z&&!dt,isPaused:d.fetchStatus==="paused",isPlaceholderData:T,isRefetchError:Z&&dt,isStale:ut(t,e),refetch:this.refetch,promise:i(this,C),isEnabled:S(e.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const R=I.data!==void 0,k=I.status==="error"&&!R,V=G=>{k?G.reject(I.error):R&&G.resolve(I.data)},pt=()=>{const G=u(this,C,I.promise=gt());V(G)},K=i(this,C);switch(K.status){case"pending":t.queryHash===r.queryHash&&V(K);break;case"fulfilled":(k||I.data!==K.value)&&pt();break;case"rejected":(!k||I.error!==K.reason)&&pt();break}}return I}updateResult(){const t=i(this,g),e=this.createResult(i(this,a),this.options);if(u(this,x,i(this,a).state),u(this,U,this.options),i(this,x).data!==void 0&&u(this,L,i(this,a)),q(e,t))return;u(this,g,e);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:h}=this.options,o=typeof h=="function"?h():h;if(o==="all"||!o&&!i(this,N).size)return!0;const c=new Set(o??i(this,N));return this.options.throwOnError&&c.add("error"),Object.keys(i(this,g)).some(y=>{const D=y;return i(this,g)[D]!==t[D]&&c.has(D)})};l(this,n,It).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&l(this,n,at).call(this)}},v=new WeakMap,a=new WeakMap,j=new WeakMap,g=new WeakMap,x=new WeakMap,U=new WeakMap,C=new WeakMap,w=new WeakMap,z=new WeakMap,P=new WeakMap,L=new WeakMap,_=new WeakMap,F=new WeakMap,M=new WeakMap,N=new WeakMap,n=new WeakSet,A=function(t){l(this,n,ot).call(this);let e=i(this,a).fetch(this.options,t);return t!=null&&t.throwOnError||(e=e.catch(tt)),e},st=function(){l(this,n,nt).call(this);const t=H(this.options.staleTime,i(this,a));if(et.isServer()||i(this,g).isStale||!vt(t))return;const r=Tt(i(this,g).dataUpdatedAt,t)+1;u(this,_,J.setTimeout(()=>{i(this,g).isStale||this.updateResult()},r))},it=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(i(this,a)):this.options.refetchInterval)??!1},rt=function(t){l(this,n,ht).call(this),u(this,M,t),!(et.isServer()||S(this.options.enabled,i(this,a))===!1||!vt(i(this,M))||i(this,M)===0)&&u(this,F,J.setInterval(()=>{(this.options.refetchIntervalInBackground||Qt.isFocused())&&l(this,n,A).call(this)},i(this,M)))},at=function(){l(this,n,st).call(this),l(this,n,rt).call(this,l(this,n,it).call(this))},nt=function(){i(this,_)!==void 0&&(J.clearTimeout(i(this,_)),u(this,_,void 0))},ht=function(){i(this,F)!==void 0&&(J.clearInterval(i(this,F)),u(this,F,void 0))},ot=function(){const t=i(this,v).getQueryCache().build(i(this,v),this.options);if(t===i(this,a))return;const e=i(this,a);u(this,a,t),u(this,j,t.state),this.hasListeners()&&(e==null||e.removeObserver(this),t.addObserver(this))},It=function(t){Ct.batch(()=>{t.listeners&&this.listeners.forEach(e=>{e(i(this,g))}),i(this,v).getQueryCache().notify({query:i(this,a),type:"observerResultsUpdated"})})},Et);function Dt(s,t){return S(t.enabled,s)!==!1&&s.state.data===void 0&&!(s.state.status==="error"&&S(t.retryOnMount,s)===!1)}function Rt(s,t){return Dt(s,t)||s.state.data!==void 0&&ct(s,t,t.refetchOnMount)}function ct(s,t,e){if(S(t.enabled,s)!==!1&&H(t.staleTime,s)!=="static"){const r=typeof e=="function"?e(s):e;return r==="always"||r!==!1&&ut(s,t)}return!1}function St(s,t,e,r){return(s!==t||S(r.enabled,s)===!1)&&(!e.suspense||s.state.status!=="error")&&ut(s,e)}function ut(s,t){return S(t.enabled,s)!==!1&&s.isStaleByTime(H(t.staleTime,s))}function Ut(s,t){return!q(s.getCurrentResult(),t)}var wt=O.createContext(!1),Pt=()=>O.useContext(wt);wt.Provider;function Lt(){let s=!1;return{clearReset:()=>{s=!1},reset:()=>{s=!0},isReset:()=>s}}var Nt=O.createContext(Lt()),Bt=()=>O.useContext(Nt),kt=(s,t,e)=>{const r=e!=null&&e.state.error&&typeof s.throwOnError=="function"?Ot(s.throwOnError,[e.state.error,e]):s.throwOnError;(s.suspense||s.experimental_prefetchInRender||r)&&(t.isReset()||(s.retryOnMount=!1))},At=s=>{O.useEffect(()=>{s.clearReset()},[s])},Ht=({result:s,errorResetBoundary:t,throwOnError:e,query:r,suspense:h})=>s.isError&&!t.isReset()&&!s.isFetching&&r&&(h&&s.data===void 0||Ot(e,[s.error,r])),jt=s=>{if(s.suspense){const e=h=>h==="static"?h:Math.max(h??1e3,1e3),r=s.staleTime;s.staleTime=typeof r=="function"?(...h)=>e(r(...h)):e(r),typeof s.gcTime=="number"&&(s.gcTime=Math.max(s.gcTime,1e3))}},zt=(s,t)=>s.isLoading&&s.isFetching&&!t,Wt=(s,t)=>(s==null?void 0:s.suspense)&&t.isPending,yt=(s,t,e)=>t.fetchOptimistic(s).catch(()=>{e.clearReset()});function Vt(s,t,e){var T,f,Q,B;const r=Pt(),h=Bt(),o=_t(),c=o.defaultQueryOptions(s);(f=(T=o.getDefaultOptions().queries)==null?void 0:T._experimental_beforeQuery)==null||f.call(T,c);const y=o.getQueryCache().get(c.queryHash);c._optimisticResults=r?"isRestoring":"optimistic",jt(c),kt(c,h,y),At(h);const D=!o.getQueryCache().get(c.queryHash),[b]=O.useState(()=>new t(o,c)),E=b.getOptimisticResult(c),d=!r&&s.subscribed!==!1;if(O.useSyncExternalStore(O.useCallback(m=>{const W=d?b.subscribe(Ct.batchCalls(m)):tt;return b.updateResult(),W},[b,d]),()=>b.getCurrentResult(),()=>b.getCurrentResult()),O.useEffect(()=>{b.setOptions(c)},[c,b]),Wt(c,E))throw yt(c,b,h);if(Ht({result:E,errorResetBoundary:h,throwOnError:c.throwOnError,query:y,suspense:c.suspense}))throw E.error;if((B=(Q=o.getDefaultOptions().queries)==null?void 0:Q._experimental_afterQuery)==null||B.call(Q,c,E),c.experimental_prefetchInRender&&!et.isServer()&&zt(E,r)){const m=D?yt(c,b,h):y==null?void 0:y.promise;m==null||m.catch(tt).finally(()=>{b.updateResult()})}return c.notifyOnChangeProps?E:b.trackResult(E)}function Xt(s,t){return Vt(s,Ft)}export{Ft as Q,Vt as a,Pt as b,Bt as c,kt as d,jt as e,At as f,yt as g,Ht as h,Wt as s,Xt as u}; +var bt=s=>{throw TypeError(s)};var $=(s,t,e)=>t.has(s)||bt("Cannot "+e);var i=(s,t,e)=>($(s,t,"read from private field"),e?e.call(s):t.get(s)),p=(s,t,e)=>t.has(s)?bt("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(s):t.set(s,e),u=(s,t,e,r)=>($(s,t,"write to private field"),r?r.call(s,e):t.set(s,e),e),l=(s,t,e)=>($(s,t,"access private method"),e);import{at as Mt,aE as gt,aF as S,av as q,aG as H,ax as tt,aH as et,aI as vt,aJ as Tt,aK as J,aL as Qt,aM as xt,aN as mt,au as Ct,r as O,aD as Ot,f as _t}from"./index-YwiKC6Po.js";var v,a,j,g,x,U,C,w,W,P,L,_,F,M,N,n,A,st,it,rt,at,nt,ht,ot,It,Et,Ft=(Et=class extends Mt{constructor(t,e){super();p(this,n);p(this,v);p(this,a);p(this,j);p(this,g);p(this,x);p(this,U);p(this,C);p(this,w);p(this,W);p(this,P);p(this,L);p(this,_);p(this,F);p(this,M);p(this,N,new Set);this.options=e,u(this,v,t),u(this,w,null),u(this,C,gt()),this.bindMethods(),this.setOptions(e)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(i(this,a).addObserver(this),Rt(i(this,a),this.options)?l(this,n,A).call(this):this.updateResult(),l(this,n,at).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return ct(i(this,a),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return ct(i(this,a),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,l(this,n,nt).call(this),l(this,n,ht).call(this),i(this,a).removeObserver(this)}setOptions(t){const e=this.options,r=i(this,a);if(this.options=i(this,v).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof S(this.options.enabled,i(this,a))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");l(this,n,ot).call(this),i(this,a).setOptions(this.options),e._defaulted&&!q(this.options,e)&&i(this,v).getQueryCache().notify({type:"observerOptionsUpdated",query:i(this,a),observer:this});const h=this.hasListeners();h&&St(i(this,a),r,this.options,e)&&l(this,n,A).call(this),this.updateResult(),h&&(i(this,a)!==r||S(this.options.enabled,i(this,a))!==S(e.enabled,i(this,a))||H(this.options.staleTime,i(this,a))!==H(e.staleTime,i(this,a)))&&l(this,n,st).call(this);const o=l(this,n,it).call(this);h&&(i(this,a)!==r||S(this.options.enabled,i(this,a))!==S(e.enabled,i(this,a))||o!==i(this,M))&&l(this,n,rt).call(this,o)}getOptimisticResult(t){const e=i(this,v).getQueryCache().build(i(this,v),t),r=this.createResult(e,t);return Ut(this,r)&&(u(this,g,r),u(this,U,this.options),u(this,x,i(this,a).state)),r}getCurrentResult(){return i(this,g)}trackResult(t,e){return new Proxy(t,{get:(r,h)=>(this.trackProp(h),e==null||e(h),h==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&i(this,C).status==="pending"&&i(this,C).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(r,h))})}trackProp(t){i(this,N).add(t)}getCurrentQuery(){return i(this,a)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const e=i(this,v).defaultQueryOptions(t),r=i(this,v).getQueryCache().build(i(this,v),e);return r.fetch().then(()=>this.createResult(r,e))}fetch(t){return l(this,n,A).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),i(this,g)))}createResult(t,e){var ft;const r=i(this,a),h=this.options,o=i(this,g),c=i(this,x),y=i(this,U),b=t!==r?t.state:i(this,j),{state:E}=t;let d={...E},T=!1,f;if(e._optimisticResults){const R=this.hasListeners(),k=!R&&Rt(t,e),V=R&&St(t,r,e,h);(k||V)&&(d={...d,...xt(E.data,t.options)}),e._optimisticResults==="isRestoring"&&(d.fetchStatus="idle")}let{error:Q,errorUpdatedAt:B,status:m}=d;f=d.data;let z=!1;if(e.placeholderData!==void 0&&f===void 0&&m==="pending"){let R;o!=null&&o.isPlaceholderData&&e.placeholderData===(y==null?void 0:y.placeholderData)?(R=o.data,z=!0):R=typeof e.placeholderData=="function"?e.placeholderData((ft=i(this,L))==null?void 0:ft.state.data,i(this,L)):e.placeholderData,R!==void 0&&(m="success",f=mt(o==null?void 0:o.data,R,e),T=!0)}if(e.select&&f!==void 0&&!z)if(o&&f===(c==null?void 0:c.data)&&e.select===i(this,W))f=i(this,P);else try{u(this,W,e.select),f=e.select(f),f=mt(o==null?void 0:o.data,f,e),u(this,P,f),u(this,w,null)}catch(R){u(this,w,R)}i(this,w)&&(Q=i(this,w),f=i(this,P),B=Date.now(),m="error");const X=d.fetchStatus==="fetching",Y=m==="pending",Z=m==="error",lt=Y&&X,dt=f!==void 0,I={status:m,fetchStatus:d.fetchStatus,isPending:Y,isSuccess:m==="success",isError:Z,isInitialLoading:lt,isLoading:lt,data:f,dataUpdatedAt:d.dataUpdatedAt,error:Q,errorUpdatedAt:B,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:d.dataUpdateCount>b.dataUpdateCount||d.errorUpdateCount>b.errorUpdateCount,isFetching:X,isRefetching:X&&!Y,isLoadingError:Z&&!dt,isPaused:d.fetchStatus==="paused",isPlaceholderData:T,isRefetchError:Z&&dt,isStale:ut(t,e),refetch:this.refetch,promise:i(this,C),isEnabled:S(e.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const R=I.data!==void 0,k=I.status==="error"&&!R,V=G=>{k?G.reject(I.error):R&&G.resolve(I.data)},pt=()=>{const G=u(this,C,I.promise=gt());V(G)},K=i(this,C);switch(K.status){case"pending":t.queryHash===r.queryHash&&V(K);break;case"fulfilled":(k||I.data!==K.value)&&pt();break;case"rejected":(!k||I.error!==K.reason)&&pt();break}}return I}updateResult(){const t=i(this,g),e=this.createResult(i(this,a),this.options);if(u(this,x,i(this,a).state),u(this,U,this.options),i(this,x).data!==void 0&&u(this,L,i(this,a)),q(e,t))return;u(this,g,e);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:h}=this.options,o=typeof h=="function"?h():h;if(o==="all"||!o&&!i(this,N).size)return!0;const c=new Set(o??i(this,N));return this.options.throwOnError&&c.add("error"),Object.keys(i(this,g)).some(y=>{const D=y;return i(this,g)[D]!==t[D]&&c.has(D)})};l(this,n,It).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&l(this,n,at).call(this)}},v=new WeakMap,a=new WeakMap,j=new WeakMap,g=new WeakMap,x=new WeakMap,U=new WeakMap,C=new WeakMap,w=new WeakMap,W=new WeakMap,P=new WeakMap,L=new WeakMap,_=new WeakMap,F=new WeakMap,M=new WeakMap,N=new WeakMap,n=new WeakSet,A=function(t){l(this,n,ot).call(this);let e=i(this,a).fetch(this.options,t);return t!=null&&t.throwOnError||(e=e.catch(tt)),e},st=function(){l(this,n,nt).call(this);const t=H(this.options.staleTime,i(this,a));if(et.isServer()||i(this,g).isStale||!vt(t))return;const r=Tt(i(this,g).dataUpdatedAt,t)+1;u(this,_,J.setTimeout(()=>{i(this,g).isStale||this.updateResult()},r))},it=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(i(this,a)):this.options.refetchInterval)??!1},rt=function(t){l(this,n,ht).call(this),u(this,M,t),!(et.isServer()||S(this.options.enabled,i(this,a))===!1||!vt(i(this,M))||i(this,M)===0)&&u(this,F,J.setInterval(()=>{(this.options.refetchIntervalInBackground||Qt.isFocused())&&l(this,n,A).call(this)},i(this,M)))},at=function(){l(this,n,st).call(this),l(this,n,rt).call(this,l(this,n,it).call(this))},nt=function(){i(this,_)!==void 0&&(J.clearTimeout(i(this,_)),u(this,_,void 0))},ht=function(){i(this,F)!==void 0&&(J.clearInterval(i(this,F)),u(this,F,void 0))},ot=function(){const t=i(this,v).getQueryCache().build(i(this,v),this.options);if(t===i(this,a))return;const e=i(this,a);u(this,a,t),u(this,j,t.state),this.hasListeners()&&(e==null||e.removeObserver(this),t.addObserver(this))},It=function(t){Ct.batch(()=>{t.listeners&&this.listeners.forEach(e=>{e(i(this,g))}),i(this,v).getQueryCache().notify({query:i(this,a),type:"observerResultsUpdated"})})},Et);function Dt(s,t){return S(t.enabled,s)!==!1&&s.state.data===void 0&&!(s.state.status==="error"&&S(t.retryOnMount,s)===!1)}function Rt(s,t){return Dt(s,t)||s.state.data!==void 0&&ct(s,t,t.refetchOnMount)}function ct(s,t,e){if(S(t.enabled,s)!==!1&&H(t.staleTime,s)!=="static"){const r=typeof e=="function"?e(s):e;return r==="always"||r!==!1&&ut(s,t)}return!1}function St(s,t,e,r){return(s!==t||S(r.enabled,s)===!1)&&(!e.suspense||s.state.status!=="error")&&ut(s,e)}function ut(s,t){return S(t.enabled,s)!==!1&&s.isStaleByTime(H(t.staleTime,s))}function Ut(s,t){return!q(s.getCurrentResult(),t)}var wt=O.createContext(!1),Pt=()=>O.useContext(wt);wt.Provider;function Lt(){let s=!1;return{clearReset:()=>{s=!1},reset:()=>{s=!0},isReset:()=>s}}var Nt=O.createContext(Lt()),Bt=()=>O.useContext(Nt),kt=(s,t,e)=>{const r=e!=null&&e.state.error&&typeof s.throwOnError=="function"?Ot(s.throwOnError,[e.state.error,e]):s.throwOnError;(s.suspense||s.experimental_prefetchInRender||r)&&(t.isReset()||(s.retryOnMount=!1))},At=s=>{O.useEffect(()=>{s.clearReset()},[s])},Ht=({result:s,errorResetBoundary:t,throwOnError:e,query:r,suspense:h})=>s.isError&&!t.isReset()&&!s.isFetching&&r&&(h&&s.data===void 0||Ot(e,[s.error,r])),jt=s=>{if(s.suspense){const e=h=>h==="static"?h:Math.max(h??1e3,1e3),r=s.staleTime;s.staleTime=typeof r=="function"?(...h)=>e(r(...h)):e(r),typeof s.gcTime=="number"&&(s.gcTime=Math.max(s.gcTime,1e3))}},Wt=(s,t)=>s.isLoading&&s.isFetching&&!t,zt=(s,t)=>(s==null?void 0:s.suspense)&&t.isPending,yt=(s,t,e)=>t.fetchOptimistic(s).catch(()=>{e.clearReset()});function Vt(s,t,e){var T,f,Q,B;const r=Pt(),h=Bt(),o=_t(),c=o.defaultQueryOptions(s);(f=(T=o.getDefaultOptions().queries)==null?void 0:T._experimental_beforeQuery)==null||f.call(T,c);const y=o.getQueryCache().get(c.queryHash);c._optimisticResults=r?"isRestoring":"optimistic",jt(c),kt(c,h,y),At(h);const D=!o.getQueryCache().get(c.queryHash),[b]=O.useState(()=>new t(o,c)),E=b.getOptimisticResult(c),d=!r&&s.subscribed!==!1;if(O.useSyncExternalStore(O.useCallback(m=>{const z=d?b.subscribe(Ct.batchCalls(m)):tt;return b.updateResult(),z},[b,d]),()=>b.getCurrentResult(),()=>b.getCurrentResult()),O.useEffect(()=>{b.setOptions(c)},[c,b]),zt(c,E))throw yt(c,b,h);if(Ht({result:E,errorResetBoundary:h,throwOnError:c.throwOnError,query:y,suspense:c.suspense}))throw E.error;if((B=(Q=o.getDefaultOptions().queries)==null?void 0:Q._experimental_afterQuery)==null||B.call(Q,c,E),c.experimental_prefetchInRender&&!et.isServer()&&Wt(E,r)){const m=D?yt(c,b,h):y==null?void 0:y.promise;m==null||m.catch(tt).finally(()=>{b.updateResult()})}return c.notifyOnChangeProps?E:b.trackResult(E)}function Xt(s,t){return Vt(s,Ft)}export{Ft as Q,Pt as a,Bt as b,kt as c,At as d,jt as e,yt as f,Ht as g,Vt as h,zt as s,Xt as u}; diff --git a/index.html b/index.html index 2c5febd58002a0bda2b8473f086f85af326442ef..ff82206840b5a91151084c85e847013b1b8c4c4f 100644 --- a/index.html +++ b/index.html @@ -72,8 +72,8 @@ plausible.init(); })(); - - + +