PageSourceSearch

https://silicon-ladder.vercel.app/assets/RankPage-Clc_WwnU.js

js silicon-ladder.vercel.app collected 2026-10-03 07:42:33 UTC 50,640 bytes, 2 lines download raw bytes

1import{d as H,c as f,G as S,H as Fe,o as m,I as Ze,g as w,f as Ne,J as et,a as r,K as Ce,L as Ue,M as ue,t as u,F as C,r as L,l as j,e as o,h as te,b as T,i as me,j as $,N as ve,O as tt,P as re,Q as le,R as nt,S as lt,T as Ae,U as ee,q as K,z as O,n as N,w as De,y as ae,x as de,A as se,k as st,m as ke,s as ze,p as be,V as X,u as at,W as Se,X as rt,Y as ge,Z as ot,$ as it,a0 as Ve,a1 as xe,a2 as ct,D as ut,E as dt}from"./index-uh6iJ027.js";import{u as mt,b as ft,S as ht}from"./seo-CKioZkWb.js";import{_ as pt}from"./ScoreBar.vue_vue_type_script_setup_true_lang-CG9lQlKt.js";const gt=["type"],xt=H({__name:"UiButton",props:{variant:{default:"ghost"},size:{default:"md"},block:{type:Boolean,default:!1},type:{default:"button"}},setup(e){return(t,n)=>(m(),f("button",{type:e.type,class:S(["ui-control inline-flex items-center justify-center gap-1.5 rounded-lg font-medium whitespace-nowrap select-none transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent/40 disabled:opacity-40 disabled:cursor-not-allowed",[e.size==="sm"?"h-8 px-3 text-xs":"h-9 px-4 text-sm",e.variant==="primary"?"bg-accent text-white hover:brightness-110 shadow-[0_6px_18px_-8px_rgb(var(--c-accent)/.8)]":"",e.variant==="ghost"?"border border-line bg-card text-muted hover:text-fg hover:border-accent/60":"",e.variant==="subtle"?"bg-card2 text-fg hover:bg-line/60":"",e.block?"w-full":""]])},[Fe(t.$slots,"default")],10,gt))}}),yt={class:"relative inline-flex w-full"},vt={key:0,class:"absolute left-2.5 inset-y-0 flex items-center text-muted pointer-events-none"},bt=["type","placeholder"],wt=H({__name:"UiInput",props:Ce({type:{default:"text"},placeholder:{default:""},size:{default:"md"},icon:{type:Boolean,default:!1}},{modelValue:{},modelModifiers:{}}),emits:Ce(["change"],["update:modelValue"]),setup(e){const t=Ze(e,"modelValue");return(n,l)=>(m(),f("div",yt,[e.icon?(m(),f("span",vt,[Fe(n.$slots,"icon",{},void 0,!0)])):w("",!0),Ne(r("input",{"onUpdate:modelValue":l[0]||(l[0]=s=>t.value=s),type:e.type,placeholder:e.placeholder,class:S(["ui-control w-full rounded-lg border border-line bg-card text-fg placeholder:text-muted/60 focus:outline-none focus:border-accent focus:ring-2 focus:ring-accent/20 transition-colors appearance-none",[e.size==="sm"?"h-8 px-2.5 text-xs":"h-9 px-3 text-sm",e.icon?"pl-8":""]]),onChange:l[1]||(l[1]=s=>n.$emit("change",s))},null,42,bt),[[et,t.value]])]))}}),oe=Ue(wt,[["__scopeId","data-v-03892132"]]),kt=["checked","aria-label"],$t={class:"w-full h-full rounded-[5px] border border-line bg-card transition-colors peer-checked:bg-accent peer-checked:border-accent peer-focus-visible:ring-2 peer-focus-visible:ring-accent/40 peer-hover:border-accent/60 flex items-center justify-center"},_t={key:0,width:"12",height:"12",viewBox:"0 0 24 24",fill:"none"},Ct={key:0,class:"text-xs text-muted"},Q=H({__name:"UiCheckbox",props:{modelValue:{type:Boolean},size:{default:"md"},ariaLabel:{default:""},label:{default:""}},emits:["update:modelValue"],setup(e,{emit:t}){const n=t;return(l,s)=>(m(),f("label",{class:"inline-flex items-center gap-2 cursor-pointer select-none",onClick:s[1]||(s[1]=ue(()=>{},["stop"]))},[r("span",{class:S(["relative inline-flex",e.size==="sm"?"w-4 h-4":"w-[18px] h-[18px]"])},[r("input",{type:"checkbox",class:"peer absolute inset-0 opacity-0 cursor-pointer",checked:e.modelValue,"aria-label":e.ariaLabel||e.label,onChange:s[0]||(s[0]=a=>n("update:modelValue",a.target.checked))},null,40,kt),r("span",$t,[e.modelValue?(m(),f("svg",_t,[...s[2]||(s[2]=[r("path",{d:"M5 12l5 5L20 7",stroke:"white","stroke-width":"3","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)])])):w("",!0)])],2),e.label?(m(),f("span",Ct,u(e.label),1)):w("",!0)]))}}),St={class:"flex flex-wrap gap-2"},Vt=["onClick"],Et={key:0,class:"ml-1.5 text-xs opacity-70"},Mt=H({__name:"FormTabs",props:{options:{},modelValue:{},counts:{}},emits:["update:modelValue"],setup(e,{emit:t}){const n=t,{t:l}=te();return(s,a)=>(m(),f("div",St,[(m(!0),f(C,null,L(e.options,i=>(m(),f("button",{key:i.key,class:S(["pill",{"pill-active":i.key===e.modelValue}]),onClick:d=>n("update:modelValue",i.key)},[j(u(o(l)("form."+i.key)),1),e.counts&&e.counts[i.key]!=null?(m(),f("span",Et,u(e.counts[i.key]),1)):w("",!0)],10,Vt))),128))]))}}),Rt={class:"flex flex-wrap items-center gap-2"},Tt={class:"text-xs text-muted whitespace-nowrap"},Lt={class:"seg flex-wrap !h-auto min-h-9"},Pt=["onClick"],It=H({__name:"SortTabs",props:{options:{},modelValue:{}},emits:["update:modelValue"],setup(e,{emit:t}){const n=t,{t:l}=te();return(s,a)=>(m(),f("div",Rt,[r("span",Tt,u(o(l)("rank.sortLabel")),1),r("div",Lt,[(m(!0),f(C,null,L(e.options,i=>(m(),f("button",{key:i.key,class:S(["seg-btn",{"seg-active":i.key===e.modelValue}]),onClick:d=>n("update:modelValue",i.key)},u(o(l)("sort."+i.key)),11,Pt))),128))])]))}}),Ft={class:"card p-3 sm:p-4"},Ut={class:"flex items-center gap-2"},At={class:"relative flex-1"},Dt=["value","placeholder"],zt={key:0,class:"ml-1 text-accent"},qt={key:0,class:"mt-3 flex flex-wrap items-center gap-1.5"},Kt={class:"text-xs text-muted"},Wt=["onClick"],Bt={class:"flex flex-wrap items-center gap-1.5"},Ot={class:"text-xs text-muted min-w-[3rem] pr-1 shrink-0 whitespace-nowrap"},Ht=["onClick"],jt={key:0,class:"flex flex-wrap items-center gap-1.5"},Gt={class:"text-xs text-muted min-w-[3rem] pr-1 shrink-0 whitespace-nowrap"},Xt=["onClick"],Qt={key:1,class:"flex flex-wrap items-center gap-1.5"},Jt={class:"text-xs text-muted min-w-[3rem] pr-1 shrink-0 whitespace-nowrap"},Yt=["onClick"],Zt={key:2,class:"flex flex-wrap items-center gap-1.5"},Nt={class:"text-xs text-muted min-w-[3rem] pr-1 shrink-0 whitespace-nowrap"},en={class:"w-24"},tn={class:"w-24"},nn={class:"text-xs text-muted ml-2"},ln=["onClick"],sn={key:3,class:"flex flex-wrap items-center gap-1.5"},an={class:"text-xs text-muted min-w-[3rem] pr-1 shrink-0 whitespace-nowrap"},rn=["onClick"],on={class:"flex flex-wrap items-center gap-1.5"},cn={class:"text-xs text-muted min-w-[3rem] pr-1 shrink-0 whitespace-nowrap"},un={class:"w-24"},dn={class:"w-24"},mn={class:"flex flex-wrap items-center gap-1.5"},fn={class:"text-xs text-muted min-w-[3rem] pr-1 shrink-0 whitespace-nowrap"},hn=["onClick"],pn={class:"ml-2"},gn=H({__name:"FilterBar",props:{category:{},modelValue:{},brands:{},gens:{},years:{}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,l=t,{t:s}=te(),a=me(!1);function i(c,h){l("update:modelValue",{...n.modelValue,[c]:h})}function d(c){const h=n.modelValue.brand;i("brand",h.includes(c)?h.filter(p=>p!==c):[...h,c])}function y(c){const h=c.target.value;return h===""?null:Number(h)}const k=$(()=>n.category==="cpu"||n.category==="gpu"),E=$(()=>n.category==="gpu"&&n.modelValue.form==="laptop"),P=$(()=>{if(!n.years)return[];const[c,h]=n.years,p=[{label:s("filter.all"),min:null,max:null}];for(let b=Math.floor(h/5)*5;b+4>=c;b-=5)p.push({label:b+4>h?`${b}+`:`${b}–${b+4}`,min:b,max:b+4});return p}),A=$(()=>{const c=n.modelValue;return c.brand.length+[c.gen,c.tgpTier,c.interface,c.tier].filter(
1Boolean).length+[c.tdpMin,c.tdpMax,c.wattMin,c.wattMax,c.yearMin,c.yearMax].filter(h=>h!==null).length+(c.atx31?1:0)});function V(){l("update:modelValue",{...n.modelValue,brand:[],gen:"",q:"",tdpMin:null,tdpMax:null,tgpTier:"",interface:"",wattMin:null,wattMax:null,tier:"",atx31:!1,yearMin:null,yearMax:null})}const M=["pcie5","pcie4","pcie3","sata","sata-hdd"],F=$(()=>{const c=n.modelValue,h=[];for(const p of c.brand)h.push({label:p,clear:()=>d(p)});return c.gen&&h.push({label:c.gen,clear:()=>i("gen","")}),(c.yearMin!==null||c.yearMax!==null)&&h.push({label:`${s("chips.era")} ${c.yearMin??""}–${c.yearMax??""}`,clear:()=>l("update:modelValue",{...c,yearMin:null,yearMax:null})}),(c.tdpMin!==null||c.tdpMax!==null)&&h.push({label:`${s("chips.tdp")} ${c.tdpMin??""}–${c.tdpMax??""}W`,clear:()=>l("update:modelValue",{...c,tdpMin:null,tdpMax:null})}),c.tgpTier&&h.push({label:`TGP ${c.tgpTier}`,clear:()=>i("tgpTier","")}),c.interface&&h.push({label:ve(c.interface),clear:()=>i("interface","")}),(c.wattMin!==null||c.wattMax!==null)&&h.push({label:`${s("chips.watt")} ${c.wattMin??""}–${c.wattMax??""}W`,clear:()=>l("update:modelValue",{...c,wattMin:null,wattMax:null})}),c.tier&&h.push({label:`Tier ${c.tier}`,clear:()=>i("tier","")}),c.atx31&&h.push({label:"ATX 3.1",clear:()=>i("atx31",!1)}),c.q&&h.push({label:`${s("chips.q")} “${c.q}”`,clear:()=>i("q","")}),h});return(c,h)=>(m(),f("div",Ft,[r("div",Ut,[r("div",At,[h[10]||(h[10]=r("svg",{class:"absolute left-2.5 top-1/2 -translate-y-1/2 text-muted pointer-events-none",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none"},[r("circle",{cx:"11",cy:"11",r:"7",stroke:"currentColor","stroke-width":"2"}),r("path",{d:"M20 20l-3.5-3.5",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round"})],-1)),r("input",{class:"input pl-8",value:e.modelValue.q,placeholder:o(s)("filter.search"),onInput:h[0]||(h[0]=p=>i("q",p.target.value))},null,40,Dt)]),r("button",{class:"btn-ghost md:hidden",onClick:h[1]||(h[1]=p=>a.value=!a.value)},[j(u(o(s)("filter.filters")),1),A.value?(m(),f("span",zt,"("+u(A.value)+")",1)):w("",!0)]),A.value||e.modelValue.q?(m(),f("button",{key:0,class:"btn-ghost hidden md:inline-flex",onClick:V},u(o(s)("filter.clear")),1)):w("",!0)]),F.value.length?(m(),f("div",qt,[r("span",Kt,u(o(s)("chips.active")),1),(m(!0),f(C,null,L(F.value,p=>(m(),f("button",{key:p.label,class:"pill pill-active !py-0.5 !text-xs inline-flex items-center gap-1",onClick:b=>p.clear()},[j(u(p.label),1),h[11]||(h[11]=r("span",{class:"opacity-70"},"×",-1))],8,Wt))),128)),r("button",{class:"text-xs text-muted hover:text-fg underline underline-offset-2 ml-1",onClick:V},u(o(s)("chips.clear")),1)])):w("",!0),r("div",{class:S(["mt-3 flex-col gap-2.5",a.value?"flex":"hidden md:flex"])},[r("div",Bt,[r("span",Ot,u(o(s)("filter.brand")),1),(m(!0),f(C,null,L(e.brands,p=>(m(),f("button",{key:p,class:S(["pill !h-8 !text-xs",{"pill-active":e.modelValue.brand.includes(p)}]),onClick:b=>d(p)},u(p),11,Ht))),128))]),e.gens.length?(m(),f("div",jt,[r("span",Gt,u(o(s)("filter.gen")),1),r("button",{class:S(["pill !h-8 !text-xs",{"pill-active":!e.modelValue.gen}]),onClick:h[2]||(h[2]=p=>i("gen",""))},u(o(s)("filter.all")),3),(m(!0),f(C,null,L(e.gens,p=>(m(),f("button",{key:p,class:S(["pill !h-8 !text-xs",{"pill-active":e.modelValue.gen===p}]),onClick:b=>i("gen",p)},u(p),11,Xt))),128))])):w("",!0),P.value.length>2?(m(),f("div",Qt,[r("span",Jt,u(o(s)("filter.era")),1),(m(!0),f(C,null,L(P.value,p=>(m(),f("button",{key:p.label,class:S(["pill !h-8 !text-xs",{"pill-active":e.modelValue.yearMin===p.min&&e.modelValue.yearMax===p.max}]),onClick:b=>l("update:modelValue",{...e.modelValue,yearMin:p.min,yearMax:p.max})},u(p.label),11,Yt))),128))])):w("",!0),k.value?(m(),f("div",Zt,[r("span",Nt,u(e.category==="gpu"?o(s)("filter.tgp"):o(s)("filter.tdp")),1),r("div",en,[T(o(oe),{size:"sm",type:"number",placeholder:o(s)("filter.minW"),"model-value":e.modelValue.tdpMin??"",onChange:h[3]||(h[3]=p=>i("tdpMin",y(p)))},null,8,["placeholder","model-value"])]),h[12]||(h[12]=r("span",{class:"text-muted"},"–",-1)),r("div",tn,[T(o(oe),{size:"sm",type:"number",placeholder:o(s)("filter.maxW"),"model-value":e.modelValue.tdpMax??"",onChange:h[4]||(h[4]=p=>i("tdpMax",y(p)))},null,8,["placeholder","model-value"])]),E.value?(m(),f(C,{key:0},[r("span",nn,u(o(s)("filter.tgpTier")),1),(m(!0),f(C,null,L([["",o(s)("filter.all")],["low","≤80W"],["mid","81–120W"],["high","≥121W"]],p=>
1(m(),f("button",{key:p[0],class:S(["pill !h-8 !text-xs",{"pill-active":e.modelValue.tgpTier===p[0]}]),onClick:b=>i("tgpTier",p[0])},u(p[1]),11,ln))),128))],64)):w("",!0)])):w("",!0),e.category==="storage"?(m(),f("div",sn,[r("span",an,u(o(s)("filter.interface")),1),r("button",{class:S(["pill !h-8 !text-xs",{"pill-active":!e.modelValue.interface}]),onClick:h[5]||(h[5]=p=>i("interface",""))},u(o(s)("filter.all")),3),(m(),f(C,null,L(M,p=>r("button",{key:p,class:S(["pill !h-8 !text-xs",{"pill-active":e.modelValue.interface===p}]),onClick:b=>i("interface",p)},u(o(ve)(p)),11,rn)),64))])):w("",!0),e.category==="psu"?(m(),f(C,{key:4},[r("div",on,[r("span",cn,u(o(s)("filter.watt")),1),r("div",un,[T(o(oe),{size:"sm",type:"number",placeholder:o(s)("filter.minW"),"model-value":e.modelValue.wattMin??"",onChange:h[6]||(h[6]=p=>i("wattMin",y(p)))},null,8,["placeholder","model-value"])]),h[13]||(h[13]=r("span",{class:"text-muted"},"–",-1)),r("div",dn,[T(o(oe),{size:"sm",type:"number",placeholder:o(s)("filter.maxW"),"model-value":e.modelValue.wattMax??"",onChange:h[7]||(h[7]=p=>i("wattMax",y(p)))},null,8,["placeholder","model-value"])])]),r("div",mn,[r("span",fn,u(o(s)("filter.tier")),1),r("button",{class:S(["pill !h-8 !text-xs",{"pill-active":!e.modelValue.tier}]),onClick:h[8]||(h[8]=p=>i("tier",""))},u(o(s)("filter.all")),3),(m(),f(C,null,L(["A","B","C","D"],p=>r("button",{key:p,class:S(["pill !h-8 !text-xs",{"pill-active":e.modelValue.tier===p}]),onClick:b=>i("tier",p)},u(p),11,hn)),64)),r("span",pn,[T(o(Q),{size:"sm","model-value":e.modelValue.atx31,label:o(s)("filter.atx31"),"onUpdate:modelValue":h[9]||(h[9]=p=>i("atx31",p))},null,8,["model-value","label"])])])],64)):w("",!0),A.value||e.modelValue.q?(m(),f("button",{key:5,class:"btn-ghost md:hidden self-start",onClick:V},u(o(s)("filter.clearAll")),1)):w("",!0)],2)]))}}),xn={cpu:[{key:"cores",label:"cores",kind:"text",hide:"lg",text:e=>e.item.cores},{key:"tdp",label:"tdp",kind:"text",align:"right",hide:"xl",text:e=>`${e.item.tdp_w}W`}
1,{key:"single",label:"single",kind:"score",hide:"lg",sortKey:"single",raw:e=>le(e.item.scores.cb24_st)},{key:"multi",label:"multi",kind:"score",sortKey:"multi",raw:e=>le(e.item.scores.cb24_mt)},{key:"gaming",label:"gaming",kind:"score",sortKey:"gaming",raw:e=>le(e.item.scores.gaming_rel)},{key:"overall",label:"overall",kind:"score",sortKey:"overall"}],gpu:[{key:"vram",label:"vram",kind:"text",hide:"lg",text:e=>`${lt(e.item.vram_gb)} ${e.item.vram_type.split(" ")[0]}`},{key:"power",label:"power",kind:"text",align:"right",hide:"xl",text:e=>`${e.raw.power}W`},{key:"raster",label:"raster",kind:"score",sortKey:"raster"},{key:"rt",label:"rt",kind:"score",hide:"lg",sortKey:"rt"},{key:"overall",label:"overall",kind:"score",sortKey:"overall"}],ram:[{key:"spec",label:"spec",kind:"text",text:e=>e.item.spec},{key:"bandwidth",label:"read",kind:"score",sortKey:"bandwidth",raw:e=>{const t=e.item.scores.read_GBs;return t==null?re:`${t} GB/s`}},{key:"latency",label:"latency",kind:"score",hide:"lg",sortKey:"latency",raw:e=>{const t=e.item.scores.latency_ns;return t==null?re:`${t} ns`}},{key:"overall",label:"overall",kind:"score",sortKey:"overall"}],storage:[{key:"interface",label:"interface",kind:"text",hide:"lg",text:e=>ve(e.item.interface)},{key:"seqRead",label:"seqRead",kind:"score",hide:"xl",sortKey:"seqRead",raw:e=>{const t=e.item.seq_read;return t==null?re:`${le(t)} MB/s`}},{key:"random4k",label:"random4k",kind:"score",sortKey:"random4k",raw:e=>nt(e.item.iops_4k_read)}
1,{key:"cacheOut",label:"cacheOut",kind:"score",hide:"lg",sortKey:"cacheOut",raw:e=>{const t=e.item.write_cache_out;return t==null?re:`${le(t)} MB/s`}},{key:"overall",label:"overall",kind:"score",sortKey:"overall"}],psu:[{key:"watt",label:"watt",kind:"text",align:"right",text:e=>`${e.item.watt}W`},{key:"tier",label:"tier",kind:"text",text:e=>e.item.tier},{key:"efficiency",label:"efficiency",kind:"text",hide:"lg",text:e=>e.item.efficiency},{key:"atx31",label:"atx31",kind:"text",hide:"xl",text:e=>e.item.atx31?"✓":"—"},{key:"modular",label:"modular",kind:"text",hide:"xl",text:e=>tt(e.item.modular)}]};function W(e,t){const n=t.item;if(e==="gpu"){const l=n;return l.form==="laptop"?`${l.tgp_w??l.tdp_w}W`:""}if(e==="cpu"){const l=n;return l.form==="laptop"&&l.tdp_range?l.tdp_range:""}if(e==="ram"){const l=n;return l.form==="sodimm"?"SO-DIMM":l.form==="onboard"?"LPDDR":l.type}if(e==="storage"){const l=n;return l.form==="nvme"?l.dram?"DRAM":"HMB":""}return e==="psu"&&n.form==="sfx"?"SFX":""}function ie(e,t){return e==="cpu"||e==="gpu"?t.item.gen:""}const yn={key:0,class:"card p-12 text-center text-muted"},vn={key:1,class:"card overflow-hidden hidden md:block"},bn={class:"w-full text-sm table-fixed"},wn={class:"text-[11px] uppercase tracking-wider text-muted bg-card2"},kn={class:"border-b border-line"},$n={class:"text-left pl-5 pr-2 py-3 w-14"},_n={class:"text-left px-2 py-3"},Cn=["onClick"],Sn={key:0,class:"text-accent ml-0.5"},Vn={class:"px-3 py-3 w-16 text-center"},En=["aria-label","onClick","onKeydown"],Mn={class:"pl-5 pr-2 py-3"},Rn={class:"px-2 py-3"},Tn={class:"flex items-center gap-2.5"},Ln={class:"min-w-0"},Pn={class:"flex items-center gap-1.5 min-w-0"},In={key:0,class:"badge"},Fn={key:1,class:"badge !text-amber-700 dark:!text-amber-300 !border-amber-500/40"},Un={class:"text-[11px] text-muted mt-0.5 flex items-center gap-1.5 whitespace-nowrap truncate"},An={key:0},Dn={key:1},zn=["title"],qn={key:1},Kn={key:2,class:"md:hidden space-y-2"},Wn=["onClick","onKeydown"],Bn={class:"flex-1 min-w-0"},On={class:"font-semibold truncate"},Hn={class:"text-[11px] text-muted mt-0.5 truncate"},jn={key:0},Gn={class:"text-right shrink-0"},Xn={class:"text-[10px] text-muted uppercase tracking-wide"},Qn={class:"font-bold text-accent"},Jn=H({__name:"RankTable",props:{category:{},rows:{},sort:{},dir:{}},emits:["sort"],setup(e,{emit:t}){const n=e,l=t,s=ke(),a=Ae(),{t:i}=te(),d=$(()=>xn[n.category]),y=$(()=>i("sort."+n.sort)),k=V=>V.hide==="lg"?"hidden lg:table-cell":V.hide==="xl"?"hidden xl:table-cell":"";function E(V){s.push(`/product/${n.category}/${V.item.id}`)}function P(V){return V===1?{color:"var(--gold)"}:V===2?{color:"var(--silver)"}:V===3?{color:"var(--bronze)"}:{}}function A(V){return n.category==="psu"?`${V.raw.tier}`:n.sort==="latency"?V.raw.latency==null?"—":`${V.raw.latency} ns`:se(V.rel[n.sort])}return(V,M)=>{const F=st("router-link");return m(),f("div",null,[e.rows.length?(m(),f("div",vn,[r("div",null,[r("table",bn,[r("thead",wn,[r("tr",kn,[r("th",$n,u(o(i)("col.rank")),1),r("th",_n,u(o(i)("col.model")),1),(m(!0),f(C,null,L(d.value,c=>(m(),f("th",{key:c.key,class:S(["px-2 py-3 whitespace-nowrap",[c.kind==="score"||c.align==="right"?"text-right":"text-left",c.sortKey?"cursor-pointer select-none hover:text-fg":"",k(c),c.kind==="score"?"w-[7.5rem] xl:w-[9.5rem] 2xl:w-[11rem]":c.key==="spec"?"w-[14rem]":"w-[6rem]"]]),onClick:h=>c.sortKey&&l("sort",c.sortKey)},[r("span",{class:S(c.sortKey===e.sort?"text-accent":"")},u(o(i)("col."+c.label)),3),c.sortKey===e.sort?(m(),f("span",Sn,u(e.dir==="desc"?"▼":"▲"),1)):w("",!0)],10,Cn))),128)),r("th",Vn,u(o(i)("col.compare")),1)])]),r("tbody",null,[(m(!0),f(C,null,L(e.rows,c=>(m(),f("tr",{key:c.item.id,class:S(["border-b border-line/70 last:border-0 cursor-pointer group hover:bg-accent/[.04] focus-visible:outline focus-visible:outline-2 focus-visible:outline-accent",[c.rank<=3?"bg-accent/[.025]":"",o(a).has(e.category,c.item.id)?"!bg-accent/10":""]]),tabindex:"0","aria-label":`#${c.rank} ${o(K)(c.item)}`,onClick:h=>E(c),onKeydown:[ee(h=>E(c),["enter"]),ee(ue(h=>o(a).toggle(e.category,c.item.id),["prevent"]),["space"])]},[r("td",Mn,[r("span",{class:S(["inline-flex items-center justify-center w-7 h-7 rounded-lg text-sm font-bold",c.rank<=3?"bg-card2 border border-line":"text-muted"]),style:O(P(c.rank))},u(c.rank),7)]),r("td",Rn,[r("div",Tn,[T(N,{brand:c.item.brand,size:20},null,8,["brand"]),r("div",Ln,[r("div",Pn,[T(F,{to:`/product/${e.category}/${c.item.id}`,class:"font-semibold truncate group-hover:text-accent",title:o(K)(c.item),onClick:M[0]||(M[0]=ue(()=>{},["stop"]))},{default:De(()=>[j(u(o(K)(c.item)),1)]),_:2},1032,["to","title"]),o(W)(e.category,c)?(m(),f("span",In,u(o(W)(e.category,c)),1)):w("",!0),c.item.est?(m(),f("span",Fn,u(o(i)("product.est")),1)):w("",!0)]),r("div",Un,[o(ie)(e.category,c)?(m(),f("span",An,u(o(ie)(e.category,c)),1)):w("",!0),o(ie)(e.category,c)?(m(),f("span",Dn,"·")):w("",!0),r("span",null,u(o(ae)(c.item.release)),1)])])])]),(m(!0),f(C,null,L(d.value,h=>(m(),f("td",{key:h.key,class:S(["px-2 py-3",[h.align==="right"?"text-right":"",h.kind==="text"?"truncate":"",k(h)]]),title:h.kind==="text"?h.text(c):void 0},[h.kind==="text"?(m(),f(C,{key:0},[h.key==="tier"?(m(),f("span",{key:0,class:S(["inline-flex w-7 h-7 items-center justify-center rounded-md font-bold text-xs",{"bg-emerald-500/15 text-emerald-700 dark:text-emerald-300":h.text(c)==="A","bg-sky-500/15 text-sky-700 dark:text-sky-300":h.text(c)==="B","bg-amber-500/15 text-amber-700 dark:text-amber-300":h.text(c)==="C","bg-rose-500/15 text-rose-700 dark:text-rose-300":h.text(c)==="D"}])},u(h.text(c)),3)):(m(),f("span",qn,u(h.text(c)),1))],64)):(m(),de(pt,{key:1,value:c.rel[h.key],raw:h.raw?h.raw(c):null,dim:h.key!==e.s
1ort},null,8,["value","raw","dim"]))],10,zn))),128)),r("td",{class:"px-3 py-3 text-center",onClick:M[1]||(M[1]=ue(()=>{},["stop"]))},[T(o(Q),{size:"sm","model-value":o(a).has(e.category,c.item.id),"aria-label":o(i)("col.compare"),"onUpdate:modelValue":h=>o(a).toggle(e.category,c.item.id)},null,8,["model-value","aria-label","onUpdate:modelValue"])])],42,En))),128))])])])])):(m(),f("div",yn,u(o(i)("rank.empty")),1)),e.rows.length?(m(),f("div",Kn,[(m(!0),f(C,null,L(e.rows,c=>(m(),f("div",{key:c.item.id,class:"card card-hover p-3 flex items-center gap-3",tabindex:"0",onClick:h=>E(c),onKeydown:ee(h=>E(c),["enter"])},[r("div",{class:"w-7 text-lg font-bold text-center",style:O(P(c.rank))},u(c.rank),5),T(N,{brand:c.item.brand,size:20},null,8,["brand"]),r("div",Bn,[r("div",On,u(o(K)(c.item)),1),r("div",Hn,[o(W)(e.category,c)?(m(),f("span",jn,u(o(W)(e.category,c))+" · ",1)):w("",!0),j(u(o(ie)(e.category,c)||o(ae)(c.item.release)),1)])]),r("div",Gn,[r("div",Xn,u(y.value),1),r("div",Qn,u(A(c)),1)]),T(o(Q),{size:"sm","model-value":o(a).has(e.category,c.item.id),"aria-label":o(i)("col.compare"),"onUpdate:modelValue":h=>o(a).toggle(e.category,c.item.id)},null,8,["model-value","aria-label","onUpdate:modelValue"])],40,Wn))),128))])):w("",!0)])}}});function Yn(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 n=document.implementation.createHTMLDocument(),l=n.createElement("base"),s=n.createElement("a");return n.head.appendChild(l),n.body.appendChild(s),t&&(l.href=t),s.href=e,s.href}const Zn=(()=>{let e=0;const t=()=>`0000${(Math.random()*36**4<<0).toString(36)}`.slice(-4);return()=>(e+=1,`u${t()}${e}`)})();function G(e){const t=[];for(let n=0,l=e.length;n<l;n++)t.push(e[n]);return t}let Y=null;function qe(e={}){return Y||(e.includeStyleProperties?(Y=e.includeStyleProperties,Y):(Y=G(window.getComputedStyle(document.documentElement)),Y))}function fe(e,t){const l=(e.ownerDocument.defaultView||window).getComputedStyle(e).getPropertyValue(t);return l?parseFloat(l.replace("px","")):0}function Nn(e){const t=fe(e,"border-left-width"),n=fe(e,"border-right-width");return e.clientWidth+t+n}function el(e){const t=fe(e,"border-top-width"),n=fe(e,"border-bottom-width");return e.clientHeight+t+n}function Ke(e,t={}){const n=t.width||Nn(e),l=t.height||el(e);return{width:n,height:l}}function tl(){let e,t;try{t=process}catch{}const n=t&&t.env?t.env.devicePixelRatio:null;return n&&(e=parseInt(n,10),Number.isNaN(e)&&(e=1)),e||window.devicePixelRatio||1}const q=16384;function nl(e){(e.width>q||e.height>q)&&(e.width>q&&e.height>q?e.width>e.height?(e.height*=q/e.width,e.width=q):(e.width*=q/e.height,e.height=q):e.width>q?(e.height*=q/e.width,e.width=q):(e.width*=q/e.height,e.height=q))}function he(e){return new Promise((t,n)=>{const l=new Image;l.onload=()=>{l.decode().then(()=>{requestAnimationFrame(()=>t(l))})},l.onerror=n,l.crossOrigin="anonymous",l.decoding="async",l.src=e})}async function ll(e){return Promise.resolve().then(()=>new XMLSerializer().serializeToString(e)).then(encodeURIComponent).then(t=>`data:image/svg+xml;charset=utf-8,${t}`)}async function sl(e,t,n){const l="http://www.w3.org/2000/svg",s=document.createElementNS(l,"svg"),a=document.createElementNS(l,"foreignObject");return s.setAttribute("width",`${t}`),s.setAttribute("height",`${n}`),s.setAttribute("viewBox",`0 0 ${t} ${n}`),a.setAttribute("width","100%"),a.setAttribute("height","100%"),a.setAttribute("x","0"),a.setAttribute("y","0"),a.setAttribute("externalResourcesRequired","true"),s.appendChild(a),a.appendChild(e),ll(s)}const D=(e,t)=>{if(e instanceof t)return!0;const n=Object.getPrototypeOf(e);return n===null?!1:n.constructor.name===t.name||D(n,t)};function al(e){const t=e.getPropertyValue("content");return`${e.cssText} content: '${t.replace(/'|"/g,"")}';`}function rl(e,t){return qe(t).map(n=>{const l=e.getPropertyValue(n),s=e.getPropertyPriority(n);return`${n}: ${l}${s?" !important":""};`}).join(" ")}function ol(e,t,n,l){const s=`.${e}:${t}`,a=n.cssText?al(n):rl(n,l);return document.createTextNode(`${s}{${a}}`)}function Ee(e,t,n,l){const s=window.getComputedStyle(e,n),a=s.getPropertyValue("content");
1if(a===""||a==="none")return;const i=Zn();try{t.className=`${t.className} ${i}`}catch{return}const d=document.createElement("style");d.appendChild(ol(i,n,s,l)),t.appendChild(d)}function il(e,t,n){Ee(e,t,":before",n),Ee(e,t,":after",n)}const Me="application/font-woff",Re="image/jpeg",cl={woff:Me,woff2:Me,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:Re,jpeg:Re,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml",webp:"image/webp"};function ul(e){const t=/\.([^./]*?)$/g.exec(e);return t?t[1]:""}function $e(e){const t=ul(e).toLowerCase();return cl[t]||""}function dl(e){return e.split(/,/)[1]}function we(e){return e.search(/^(data:)/)!==-1}function ml(e,t){return`data:${t};base64,${e}`}async function We(e,t,n){const l=await fetch(e,t);if(l.status===404)throw new Error(`Resource "${l.url}" not found`);const s=await l.blob();return new Promise((a,i)=>{const d=new FileReader;d.onerror=i,d.onloadend=()=>{try{a(n({res:l,result:d.result}))}catch(y){i(y)}},d.readAsDataURL(s)})}const ye={};function fl(e,t,n){let l=e.replace(/\?.*/,"");return n&&(l=e),/ttf|otf|eot|woff2?/i.test(l)&&(l=l.replace(/.*\//,"")),t?`[${t}]${l}`:l}async function _e(e,t,n){const l=fl(e,t,n.includeQueryParams);if(ye[l]!=null)return ye[l];n.cacheBust&&(e+=(/\?/.test(e)?"&":"?")+new Date().getTime());let s;try{const a=await We(e,n.fetchRequestInit,({res:i,result:d})=>(t||(t=i.headers.get("Content-Type")||""),dl(d)));s=ml(a,t)}catch(a){s=n.imagePlaceholder||"";let i=`Failed to fetch resource: ${e}`;a&&(i=typeof a=="string"?a:a.message),i&&console.warn(i)}return ye[l]=s,s}async function hl(e){const t=e.toDataURL();return t==="data:,"?e.cloneNode(!1):he(t)}async function pl(e,t){if(e.currentSrc){const a=document.createElement("canvas"),i=a.getContext("2d");a.width=e.clientWidth,a.height=e.clientHeight,i==null||i.drawImage(e,0,0,a.width,a.height);const d=a.toDataURL();return he(d)}const n=e.poster,l=$e(n),s=await _e(n,l,t);return he(s)}async function gl(e,t){var n;try{if(!((n=e==null?void 0:e.contentDocument)===null||n===void 0)&&n.body)return await pe(e.contentDocument.body,t,!0)}catch{}return e.cloneNode(!1)}async function xl(e,t){return D(e,HTMLCanvasElement)?hl(e):D(e,HTMLVideoElement)?pl(e,t):D(e,HTMLIFrameElement)?gl(e,t):e.cloneNode(Be(e))}const yl=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SLOT",Be=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SVG";async function vl(e,t,n){var l,s;if(Be(t))return t;let a=[];return yl(e)&&e.assignedNodes?a=G(e.assignedNodes()):D(e,HTMLIFrameElement)&&(!((l=e.contentDocument)===null||l===void 0)&&l.body)?a=G(e.contentDocument.body.childNodes):a=G(((s=e.shadowRoot)!==null&&s!==void 0?s:e).childNodes),a.length===0||D(e,HTMLVideoElement)||await a.reduce((i,d)=>i.then(()=>pe(d,n)).then(y=>{y&&t.appendChild(y)}),Promise.resolve()),t}function bl(e,t,n){const l=t.style;if(!l)return;const s=window.getComputedStyle(e);s.cssText?(l.cssText=s.cssText,l.transformOrigin=s.transformOrigin):qe(n).forEach(a=>{let i=s.getPropertyValue(a);a==="font-size"&&i.endsWith("px")&&(i=`${Math.floor(parseFloat(i.substring(0,i.length-2)))-.1}px`),D(e,HTMLIFrameElement)&&a==="display"&&i==="inline"&&(i="block"),a==="d"&&t.getAttribute("d")&&(i=`path(${t.getAttribute("d")})`),l.setProperty(a,i,s.getPropertyPriority(a))})}function wl(e,t){D(e,HTMLTextAreaElement)&&(t.innerHTML=e.value),D(e,HTMLInputElement)&&t.setAttribute("value",e.value)}function kl(e,t){if(D(e,HTMLSelectElement)){const n=t,l=Array.from(n.children).find(s=>e.value===s.getAttribute("value"));l&&l.setAttribute("selected","")}}function $l(e,t,n){return D(t,Element)&&(bl(e,t,n),il(e,t,n),wl(e,t),kl(e,t)),t}async function _l(e,t){const n=e.querySelectorAll?e.querySelectorAll("use"):[];if(n.length===0)return e;const l={};for(let a=0;a<n.length;a++){const d=n[a].getAttribute("xlink:href");if(d){const y=e.querySelector(d),k=document.querySelector(d);!y&&k&&!l[d]&&(l[d]=await pe(k,t,!0))}}const s=Object.values(l);if(s.length){const a="http://www.w3.org/1999/xhtml",i=document.createElementNS(a,"svg");i.setAttribute("xmlns",a),i.style.position="absolute",i.style.width="0",i.style.height="0",i.style.overflow="hidden",i.style.display="none";const d=document.createElementNS(a,"defs");i.appendChild(d);for(let y=0;y<s.length;y++)d.appendChild(s[y]);e.appendChild(i)}return e}async function pe(e,t,n){return!n&&t.filter&&!t.filter(e)?null:Promise.resolve(e).then(l=>xl(l,t)).then(l=>vl(e,l,t)).then(l=>$l(e,l,t)).then(l=>_l(l,t))}const Oe=/url\((['"]?)([^'"]+?)\1\)/g,Cl=/url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g,Sl=/src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;function Vl(e){const t=e.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1");return new RegExp(`(url\\(['"]?)(${t})(['"]?\\))`,"g")}function El(e){const t=[];return e.replace(Oe,(n,l,s)=>(t.push(s),n)),t.filter(n=>!we(n))}
1async function Ml(e,t,n,l,s){try{const a=n?Yn(t,n):t,i=$e(t);let d;return s||(d=await _e(a,i,l)),e.replace(Vl(t),`$1${d}$3`)}catch{}return e}function Rl(e,{preferredFontFormat:t}){return t?e.replace(Sl,n=>{for(;;){const[l,,s]=Cl.exec(n)||[];if(!s)return"";if(s===t)return`src: ${l};`}}):e}function He(e){return e.search(Oe)!==-1}async function je(e,t,n){if(!He(e))return e;const l=Rl(e,n);return El(l).reduce((a,i)=>a.then(d=>Ml(d,i,t,n)),Promise.resolve(l))}async function Z(e,t,n){var l;const s=(l=t.style)===null||l===void 0?void 0:l.getPropertyValue(e);if(s){const a=await je(s,null,n);return t.style.setProperty(e,a,t.style.getPropertyPriority(e)),!0}return!1}async function Tl(e,t){await Z("background",e,t)||await Z("background-image",e,t),await Z("mask",e,t)||await Z("-webkit-mask",e,t)||await Z("mask-image",e,t)||await Z("-webkit-mask-image",e,t)}async function Ll(e,t){const n=D(e,HTMLImageElement);if(!(n&&!we(e.src))&&!(D(e,SVGImageElement)&&!we(e.href.baseVal)))return;const l=n?e.src:e.href.baseVal,s=await _e(l,$e(l),t);await new Promise((a,i)=>{e.onload=a,e.onerror=t.onImageErrorHandler?(...y)=>{try{a(t.onImageErrorHandler(...y))}catch(k){i(k)}}:i;const d=e;d.decode&&(d.decode=a),d.loading==="lazy"&&(d.loading="eager"),n?(e.srcset="",e.src=s):e.href.baseVal=s})}async function Pl(e,t){const l=G(e.childNodes).map(s=>Ge(s,t));await Promise.all(l).then(()=>e)}async function Ge(e,t){D(e,Element)&&(await Tl(e,t),await Ll(e,t),await Pl(e,t))}function Il(e,t){const{style:n}=e;t.backgroundColor&&(n.backgroundColor=t.backgroundColor),t.width&&(n.width=`${t.width}px`),t.height&&(n.height=`${t.height}px`);const l=t.style;return l!=null&&Object.keys(l).forEach(s=>{n[s]=l[s]}),e}const Te={};async function Le(e){let t=Te[e];if(t!=null)return t;const l=await(await fetch(e)).text();return t={url:e,cssText:l},Te[e]=t,t}async function Pe(e,t){let n=e.cssText;const l=/url\(["']?([^"')]+)["']?\)/g,a=(n.match(/url\([^)]+\)/g)||[]).map(async i=>{let d=i.replace(l,"$1");return d.startsWith("https://")||(d=new URL(d,e.url).href),We(d,t.fetchRequestInit,({result:y})=>(n=n.replace(i,`url(${y})`),[i,y]))});return Promise.all(a).then(()=>n)}function Ie(e){if(e==null)return[];const t=[],n=/(\/\*[\s\S]*?\*\/)/gi;let l=e.replace(n,"");const s=new RegExp("((@.*?keyframes [\\s\\S]*?){([\\s\\S]*?}\\s*?)}
1)","gi");for(;;){const y=s.exec(l);if(y===null)break;t.push(y[0])}l=l.replace(s,"");const a=/@import[\s\S]*?url\([^)]*\)[\s\S]*?;/gi,i="((\\s*?(?:\\/\\*[\\s\\S]*?\\*\\/)?\\s*?@media[\\s\\S]*?){([\\s\\S]*?)}\\s*?})|(([\\s\\S]*?){([\\s\\S]*?)})",d=new RegExp(i,"gi");for(;;){let y=a.exec(l);if(y===null){if(y=d.exec(l),y===null)break;a.lastIndex=d.lastIndex}else d.lastIndex=a.lastIndex;t.push(y[0])}return t}async function Fl(e,t){const n=[],l=[];return e.forEach(s=>{if("cssRules"in s)try{G(s.cssRules||[]).forEach((a,i)=>{if(a.type===CSSRule.IMPORT_RULE){let d=i+1;const y=a.href,k=Le(y).then(E=>Pe(E,t)).then(E=>Ie(E).forEach(P=>{try{s.insertRule(P,P.startsWith("@import")?d+=1:s.cssRules.length)}catch(A){console.error("Error inserting rule from remote css",{rule:P,error:A})}})).catch(E=>{console.error("Error loading remote css",E.toString())});l.push(k)}})}catch(a){const i=e.find(d=>d.href==null)||document.styleSheets[0];s.href!=null&&l.push(Le(s.href).then(d=>Pe(d,t)).then(d=>Ie(d).forEach(y=>{i.insertRule(y,i.cssRules.length)})).catch(d=>{console.error("Error loading remote stylesheet",d)})),console.error("Error inlining remote css file",a)}}),Promise.all(l).then(()=>(e.forEach(s=>{if("cssRules"in s)try{G(s.cssRules||[]).forEach(a=>{n.push(a)})}catch(a){console.error(`Error while reading CSS rules from ${s.href}`,a)}}),n))}function Ul(e){return e.filter(t=>t.type===CSSRule.FONT_FACE_RULE).filter(t=>He(t.style.getPropertyValue("src")))}async function Al(e,t){if(e.ownerDocument==null)throw new Error("Provided element is not within a Document");const n=G(e.ownerDocument.styleSheets),l=await Fl(n,t);return Ul(l)}function Xe(e){return e.trim().replace(/["']/g,"")}function Dl(e){const t=new Set;function n(l){(l.style.fontFamily||getComputedStyle(l).fontFamily).split(",").forEach(a=>{t.add(Xe(a))}),Array.from(l.children).forEach(a=>{a instanceof HTMLElement&&n(a)})}return n(e),t}async function zl(e,t){const n=await Al(e,t),l=Dl(e);return(await Promise.all(n.filter(a=>l.has(Xe(a.style.fontFamily))).map(a=>{const i=a.parentStyleSheet?a.parentStyleSheet.href:null;return je(a.cssText,i,t)}))).join(`
2`)}async function ql(e,t){const n=t.fontEmbedCSS!=null?t.fontEmbedCSS:t.skipFonts?null:await zl(e,t);if(n){const l=document.createElement("style"),s=document.createTextNode(n);l.appendChild(s),e.firstChild?e.insertBefore(l,e.firstChild):e.appendChild(l)}}async function Kl(e,t={}){const{width:n,height:l}=Ke(e,t),s=await pe(e,t,!0);return await ql(s,t),await Ge(s,t),Il(s,t),await sl(s,n,l)}async function Wl(e,t={}){const{width:n,height:l}=Ke(e,t),s=await Kl(e,t),a=await he(s),i=document.createElement("canvas"),d=i.getContext("2d"),y=t.pixelRatio||tl(),k=t.canvasWidth||n,E=t.canvasHeight||l;return i.width=k*y,i.height=E*y,t.skipAutoScale||nl(i),i.style.width=`${k}`,i.style.height=`${E}`,t.backgroundColor&&(d.fillStyle=t.backgroundColor,d.fillRect(0,0,i.width,i.height)),d.drawImage(a,0,0,i.width,i.height),i}async function Bl(e,t={}){return(await Wl(e,t)).toDataURL()}const Ol={class:"card overflow-hidden"},Hl={class:"md:hidden"},jl={key:0,class:"text-[11px] text-muted mb-1.5"},Gl={class:"text-fg"},Xl={class:"space-y-1.5"},Ql=["onClick"],Jl={class:"text-[11px] text-muted w-7"},Yl={class:"flex-1 min-w-0"},Zl={class:"flex items-center gap-1.5 text-sm"},Nl={class:"font-semibold truncate"},es={key:0,class:"badge !py-0"},ts={class:"h-2 rounded-full overflow-hidden mt-1",style:{background:"var(--bar-track)"}},ns={class:"text-sm font-bold w-10 text-right"},ls={"data-no-export":"",class:"inline-flex"},ss={class:"hidden md:block"},as={class:"hidden export-only px-4 py-3 border-b border-line items-center gap-3"},rs={class:"text-muted text-sm"},os={class:"px-4 py-3 flex items-center justify-end gap-2.5 font-semibold"},is={class:"text-xs text-muted font-normal"},cs={class:"text-lg"},us={class:"py-3 text-center text-[11px] uppercase tracking-wider text-muted"},ds={class:"px-4 py-3 flex items-center gap-2.5 font-semibold"},ms={class:"text-lg"},fs={class:"text-xs text-muted font-normal"},hs={class:"px-3 py-3 text-[11px] uppercase tracking-wider text-muted"},ps={class:"text-xs text-muted font-normal"},gs=["onClick","onKeydown"],xs={class:"flex items-center gap-2 pr-2 shrink-0 min-w-0"},ys={"data-no-export":"",class:"inline-flex"},vs={key:0,class:"badge !py-0"},bs={key:1,class:"badge !py-0"},ws={class:"hidden xl:inline text-[11px] text-muted"},ks=["title"],$s={class:"text-[11px] text-muted w-8 text-right"},_s={class:"text-white text-xs font-bold pr-2 drop-shadow"},Cs={class:"flex flex-col items-center justify-center text-center border-x border-line/60 bg-card2/70"},Ss={class:"text-sm font-bold"},Vs={class:"text-[10px] text-muted"},Es=["onClick","onKeydown"],Ms={class:"text-white text-xs font-bold pl-2 drop-shadow"},Rs={class:"flex items-center gap-2 pl-2 shrink-0 min-w-0"},Ts={class:"text-[11px] text-muted w-8"},Ls=["title"],Ps={class:"hidden xl:inline text-[11px] text-muted"},Is={key:0,class:"badge !py-0"},Fs={key:1,class:"badge !py-0"},Us={"data-no-export":"",class:"inline-flex"},As={key:0},Ds={class:"text-fg"},zs=["onClick","onKeydown"],qs={class:"flex items-center gap-2 text-sm mb-1"},Ks={class:"text-[11px] text-muted w-6"},Ws={class:"font-semibold truncate group-hover:text-accent"},Bs={key:0,class:"badge !py-0"},Os={class:"ml-auto text-xs text-muted"},Hs={"data-no-export":"",class:"inline-flex"},js={class:"h-5 rounded-md overflow-hidden",style:{background:"var(--bar-track)"}},Gs={class:"text-white text-[11px] font-bold pl-1.5 drop-shadow"},Xs={class:"px-4 py-2 text-[11px] text-muted border-t border-line flex flex-wrap items-center gap-x-4 gap-y-1"},Qs={class:"hidden export-only"},Js={class:"ml-auto","data-no-export":""},Ys={key:0},Zs={key:0,class:"p-10 text-center text-muted"},ce=10,Ns=H({__name:"LadderView",props:{category:{},rows:{},sort:{}},setup(e){const t=e,n=me(null),l=me(!1);async function s(){var b;if(!(!n.value||l.value)){l.value=!0,n.value.classList.add("exporting");try{const z=getComputedStyle(document.documentElement).getPropertyValue("--c-bg").trim(),I=await Bl(n.value,{pixelRatio:2,backgroundColor:`rgb(${z})`,filter:R=>!(R instanceof HTMLElement&&R.dataset.noExport!==void 0)}),x=document.createElement("a");x.href=I,x.download=`silicon-ladder-${t.category}-${((b=t.rows[0])==null?void 0:b.item.form)??""}-${t.sort}.png`,x.click()}finally{n.value.classList.remove("exporting"),l.value=!1}}}const a=ke(),i=Ae(),{t:d}=te(),y=$(()=>
2d("sort."+t.sort)),k=$(()=>{const b=t.category==="gpu"?["NVIDIA","AMD","Intel","Apple","Qualcomm"]:["AMD","Intel","Apple","Qualcomm"],z=new Set(t.rows.map(I=>I.item.brand));return[...b.filter(I=>z.has(I)),...[...z].filter(I=>!b.includes(I))]}),E=$(()=>k.value.length===2),P=$(()=>t.rows.filter(b=>b.rel[t.sort]!=null)),A=$(()=>t.rows.filter(b=>b.rel[t.sort]==null)),V=$(()=>Math.max(0,...P.value.map(b=>b.rel[t.sort]))),M=$(()=>{if(!P.value.length)return[];const b=Math.min(...P.value.map(x=>x.rel[t.sort])),z=Math.max(0,Math.floor(b/ce)*ce),I=[];for(let x=100;x>z;x-=ce){const R=x-ce,g={};let _=0;for(const B of k.value)g[B]=[];for(const B of P.value){const J=B.rel[t.sort];(J<=x&&J>R||x===100&&J>=100)&&(g[B.item.brand].push(B),_++)}I.push({hi:x,lo:R,cells:g,count:_})}return I}),F=b=>b.rel[t.sort],c=b=>V.value>0?Math.round((F(b)/V.value-1)*100):0;function h(b){a.push(`/product/${t.category}/${b.item.id}`)}const p=$(()=>E.value?"1fr 64px 1fr":`56px repeat(${k.value.length}, minmax(0, 1fr))`);return(b,z)=>{var I;return m(),f("div",Ol,[r("div",Hl,[(m(!0),f(C,null,L(M.value,(x,R)=>(m(),f("div",{key:"m"+x.hi,class:S(["border-b border-line/60 last:border-0",x.count?"px-3 py-2":"h-2"]),style:O({background:`rgb(var(--c-accent) / ${(.06*(1-R/M.value.length)).toFixed(3)})`})},[x.count?(m(),f("div",jl,[r("b",Gl,u(x.hi),1),j(" – "+u(x.lo),1)])):w("",!0),r("div",Xl,[(m(!0),f(C,null,L(k.value.flatMap(g=>x.cells[g]).sort((g,_)=>g.rank-_.rank),g=>(m(),f("div",{key:g.item.id,class:"flex items-center gap-2",onClick:_=>h(g)},[r("span",Jl,"#"+u(g.rank),1),T(N,{brand:g.item.brand,size:14},null,8,["brand"]),r("div",Yl,[r("div",Zl,[r("span",Nl,u(o(K)(g.item)),1),o(W)(e.category,g)?(m(),f("span",es,u(o(W)(e.category,g)),1)):w("",!0)]),r("div",ts,[r("div",{class:"h-full rounded-full",style:O({width:F(g)+"%",background:o(X)(g.item.brand)})},null,4)])]),r("span",ns,u(o(se)(F(g))),1),r("span",ls,[T(o(Q),{size:"sm","model-value":o(i).has(e.category,g.item.id),"aria-label":o(d)("col.compare"),"onUpdate:modelValue":_=>o(i).toggle(e.category,g.item.id)},null,8,["model-value","aria-label","onUpdate:modelValue"])])],8,Ql))),128))])],6))),128))]),r("div",ss,[r("div",{ref_key:"exportEl",ref:n},[r("div",as,[z[0]||(z[0]=r("span",{class:"font-bold"},"Silicon Ladder",-1)),r("span",rs,u(o(ze)(((I=e.rows[0])==null?void 0:I.item.form)??""))+" "+u(o(be)(e.category))+" · "+u(y.value),1)]),r("div",{class:"grid border-b border-line bg-card2",style:O({gridTemplateColumns:p.value})},[E.value?(m(),f(C,{key:0},[r("div",os,[r("span",is,u(o(d)("ladder.items",{n:e.rows.filter(x=>x.item.brand===k.value[0]).length})),1),r("span",cs,u(k.value[0]),1),T(N,{brand:k.value[0],size:28},null,8,["brand"])]),r("div",us,u(y.value),1),r("div",ds,[T(N,{brand:k.value[1],size:28},null,8,["brand"]),r("span",ms,u(k.value[1]),1),r("span",fs,u(o(d)("ladder.items",{n:e.rows.filter(x=>x.item.brand===k.value[1]).length})),1)])],64)):(m(),f(C,{key:1},[r("div",hs,u(y.value),1),(m(!0),f(C,null,L(k.value,x=>(m(),f("div",{key:x,class:"px-3 py-3 flex items-center gap-2 font-semibold border-l border-line/60"},[T(N,{brand:x,size:24},null,8,["brand"]),r("span",null,u(x),1),r("span",ps,u(e.rows.filter(R=>R.item.brand===x).length),1)]))),128))],64))],4),(m(!0),f(C,null,L(M.value,(x,R)=>(m(),f("div",{key:x.hi,class:S(["grid border-b border-line/60 last:border-0 relative",x.count?"":"h-3"]),style:O({gridTemplateColumns:p.value,background:`linear-gradient(90deg, rgb(var(--c-accent) / ${(.07*(1-R/M.value.length)).toFixed(3)}), transparent 30%, transparent 70%, rgb(var(--c-accent) / ${(.07*(1-R/M.value.length)).toFixed(3)}))`})},[E.value?(m(),f(C,{key:0},[r("div",{class:S(["flex flex-col gap-1.5 items-end",x.count?"py-2 pl-4 pr-2":""])},[(m(!0),f(C,null,L(x.cells[k.value[0]],g=>(m(),f("div",{key:g.item.id,class:"ladder-item group w-full flex items-center justify-end",tabindex:"0",onClick:_=>h(g),onKeydown:ee(_=>h(g),["enter"])},[r("div",xs,[r("span",ys,[T(o(Q),{size:"sm","model-value":o(i).has(e.category,g.item.id),"aria-label":o(d)("col.compare"),"onUpdate:modelValue":_=>o(i).toggle(e.category,g.item.id)},null,8,["model-value","aria-label","onUpdate:modelValue"])]),g.item.est?(m(),f("span",vs,u(o(d)("product.est")),1)):w("",!0),o(W)(e.category,g)?(m(),f("span",bs,u(o(W)(e.category,g)),1)):w("",!0),r("span",ws,u(o(ae)(g.item.release)),1),r("span",{class:"text-sm font-semibold truncate max-w-[11rem] xl:max-w-none group-hover:text-accent",title:o(K)(g.item)},u(o(K)(g.item)),9,ks),r("span",$s,"#"+u(g.rank),1)]),r("div",{class:"relative h-7 flex items-center justify-end rounded-l-md",style:O({width:F(g)+"%",minWidth:"52px",background:`linear-gradient(270deg, ${o(X)(k.value[0])}, ${o(X)(k.value[0])}88)`})},[r("span",_s,u(o(se)(F(g))),1)],4)],40,gs))),128))],2),r("div",Cs,[x.count?(m(),f(C,{key:0},[r("span",Ss,u(x.hi),1),r("span",Vs,u(x.lo),1)],64)):w("",!0)]),r("div",{class:S(["flex flex-col gap-1.5",x.count?"py-2 pr-4 pl-2":""])},[(m(!0),f(C,null,L(x.cells[k.value[1]],g=>(m(),f("div",{key:g.item.id,class:"ladder-item group w-full flex items-center",tabindex:"0",onClick:_=>
2h(g),onKeydown:ee(_=>h(g),["enter"])},[r("div",{class:"relative h-7 flex items-center rounded-r-md",style:O({width:F(g)+"%",minWidth:"52px",background:`linear-gradient(90deg, ${o(X)(k.value[1])}, ${o(X)(k.value[1])}88)`})},[r("span",Ms,u(o(se)(F(g))),1)],4),r("div",Rs,[r("span",Ts,"#"+u(g.rank),1),r("span",{class:"text-sm font-semibold truncate max-w-[11rem] xl:max-w-none group-hover:text-accent",title:o(K)(g.item)},u(o(K)(g.item)),9,Ls),r("span",Ps,u(o(ae)(g.item.release)),1),o(W)(e.category,g)?(m(),f("span",Is,u(o(W)(e.category,g)),1)):w("",!0),g.item.est?(m(),f("span",Fs,u(o(d)("product.est")),1)):w("",!0),r("span",Us,[T(o(Q),{size:"sm","model-value":o(i).has(e.category,g.item.id),"aria-label":o(d)("col.compare"),"onUpdate:modelValue":_=>o(i).toggle(e.category,g.item.id)},null,8,["model-value","aria-label","onUpdate:modelValue"])])])],40,Es))),128))],2)],64)):(m(),f(C,{key:1},[r("div",{class:S(["px-3 text-xs text-muted flex items-start",x.count?"py-2":""])},[x.count?(m(),f("span",As,[r("b",Ds,u(x.hi),1),z[1]||(z[1]=r("br",null,null,-1)),j(u(x.lo),1)])):w("",!0)],2),(m(!0),f(C,null,L(k.value,g=>(m(),f("div",{key:g,class:S(["border-l border-line/60 px-2 flex flex-col gap-1.5",x.count?"py-2":""])},[(m(!0),f(C,null,L(x.cells[g],_=>(m(),f("div",{key:_.item.id,class:"ladder-item group",tabindex:"0",onClick:B=>h(_),onKeydown:ee(B=>h(_),["enter"])},[r("div",qs,[r("span",Ks,"#"+u(_.rank),1),r("span",Ws,u(o(K)(_.item)),1),o(W)(e.category,_)?(m(),f("span",Bs,u(o(W)(e.category,_)),1)):w("",!0),r("span",Os,u(c(_)===0?o(d)("ladder.top"):c(_)+"%"),1),r("span",Hs,[T(o(Q),{size:"sm","model-value":o(i).has(e.category,_.item.id),"aria-label":o(d)("col.compare"),"onUpdate:modelValue":B=>o(i).toggle(e.category,_.item.id)},null,8,["model-value","aria-label","onUpdate:modelValue"])])]),r("div",js,[r("div",{class:"h-full flex items-center rounded-md",style:O({width:F(_)+"%",minWidth:"44px",background:`linear-gradient(90deg, ${o(X)(g)}, ${o(X)(g)}99)`})},[r("span",Gs,u(o(se)(F(_))),1)],4)])],40,zs))),128))],2))),128))],64))],6))),128)),r("div",Xs,[r("span",null,u(o(d)("ladder.legend")),1),r("span",Qs,u(o(d)("exportImg.footer")),1),r("span",Js,[T(o(xt),{size:"sm",disabled:l.value,onClick:s},{default:De(()=>[j(u(l.value?o(d)("exportImg.busy"):o(d)("exportImg.btn")),1)]),_:1},8,["disabled"])]),A.value.length?(m(),f("span",Ys,u(o(d)("ladder.unscored",{sort:y.value}))+u(A.value.map(x=>o(K)(x.item)).join(", ")),1)):w("",!0)]),P.value.length?w("",!0):(m(),f("div",Zs,u(o(d)("rank.empty")),1))],512)])])}}}),ea=Ue(Ns,[["__scopeId","data-v-d337cc30"]]),ta={class:"space-y-4"},na={class:"kicker"},la={class:"text-2xl sm:text-3xl font-bold tracking-tight mt-1"},sa={class:"text-sm text-muted mt-1"},aa={key:0,class:"notice-info"},ra={key:1,class:"notice-warn"},oa={key:2,class:"notice-info"},ia={class:"flex flex-wrap items-center gap-3 -mb-1"},ca={key:1,class:"text-xs text-muted"},ua={class:"ml-auto flex items-center gap-3"},da={key:0,class:"hidden xl:inline text-xs text-muted"},ma={key:1,class:"seg"},fa={key:3,class:"text-xs text-muted"},xa=H({__name:"RankPage",setup(e){const t=ot(),n=ke(),l=at(),{t:s}=te(),a=$(()=>t.params.category),i=$(()=>({form:ge[a.value][0].key,sort:Ve[a.value][0].key})),d=me(Se(t.query,i.value));rt(()=>[t.query,t.params.category],()=>{d.value=Se(t.query,i.value)},{deep:!0});function y(v){d.value=v,n.replace({query:{...it(v,i.value),...t.query.view?{view:t.query.view}:{}}})}function k(v){y({...d.value,form:v,gen:"",tgpTier:"",brand:[]})}function E(v){y({...d.value,sort:v,dir:"desc"})}function P(v){d.value.sort===v?y({...d.value,dir:d.value.dir==="desc"?"asc":"desc"}):E(v)}const A=$(()=>l.byCategory(a.value)),V=$(()=>Object.fromEntries(ge[a.value].map(v=>[v.key,A.value.filter(U=>U.form===v.key).length]))),M=$(()=>A.value.filter(v=>v.form===d.value.form)),F=$(()=>xe(M.value.map(v=>v.brand)).sort()),c=$(()=>a.value==="cpu"?xe(M.value.map(v=>v.gen)).sort():a.value==="gpu"?xe(M.value.map(v=>v.gen)).sort():[]),h=$(()=>{if(!M.value.length)return null;const v=M.value.map(U=>ae(U.release));return[Math.min(...v),Math.max(...v)]}),p=$(()=>dt(a.value,M.value)),b=$(()=>M.value.some(v=>v.price_cny)),z=$(()=>a.value!=="cpu"||M.value.some(v=>v.scores.igpu_rel!==null)),I=$(()=>Ve[a.value].filter(v=>!(v.key==="value"&&!b.value||v.key==="igpu"&&!z.value||a.value==="ram"&&d.value.form==="onboard"&&v.key==="overall"))),x=$(()=>I.value.some(v=>v.key===d.value.sort)?d.value.sort:I.value[0].key),R=$(()=>{const v=new Set(ct(a.value,M.value,d.value).map(U=>U.id));return ut(a.value,p.value.filter(U=>v.has(U.item.id)),x.value,d.value.dir)}),g=$(()=>a.value==="cpu"||a.value==="gpu"),_=$(()=>g.value&&t.query.view==="ladder"?"ladder":"list");function B(v){const U={...t.query};v==="ladder"?U.view="ladder":delete U.view,n.replace({query:U})}const J=$(()=>s("sort."+x.value)),ne=$(()=>s("rank.title",{form:ze(d.value.form),cat:be(a.value)})),Qe=$(()=>d.value.form==="laptop"&&(a.value==="cpu"||a.value==="gpu")),Je=$(()=>R.value.some(v=>v.item.est));return mt(()=>({title:`${ne.value} · ${J.value}`,description:`${ne.value}:${R.value.slice(0,5).map(v=>K(v.item)).join("、")} … ${s("rank.count",{n:R.value.length})}`,path:`/rank/${a.value}`,jsonLd:[ft([{name:s("product.home"),path:"/"},{name:ne.value,path:`/rank/${a.value}`}]),{"@context":"https://schema.org","@type":"ItemList",name:ne.value,numberOfItems:R.value.length,itemListElement:R.value.slice(0,50).map(v=>({"@type":"ListItem",position:v.rank,name:K(v.item),url:`${ht}/product/${a.value}/${v.item.id}`}))}]})),(v,U)=>(m(),f("div",ta,[r("div",null,[r("div",na,u(o(be)(a.value)),1),r("h1",la,u(ne.value),1),r("p",sa,u(o(s)("rank.count",{n:R.value.length})),1)]),a.value==="psu"?(m(),f("div",aa,u(o(s)("rank.psuNote")),1)):w("",!0),Qe.value?(m(),f("div",ra,u(o(s)("rank.laptopWarn")),1)):w("",!0),a.value==="ram"&&d.value.form==="onboard"?(m(),f("div",oa,u(o(s)("rank.onboardNote")),1)):w("",!0),T(Mt,{options:o(ge)[a.value],"model-value":d.value.form,counts:V.value,"onUpdate:modelValue":k},null,8,["options","model-value","counts"]),T(gn,{category:a.value,"model-value":d.value,brands:F.value,gens:c.value,years:h.value,"onUpdate:modelValue":y},null,8,["category","model-value","brands","gens","years"]),r("div",ia,[a.value!=="psu"?(m(),de(It,{key:0,options:I.value,"model-value":x.value,"onUpdate:modelValue":E},null,8,["options","model-value"])):(m(),f("span",ca,u(o(s)("rank.psuSort")),1)),r("div",ua,[Je.value?(m(),f("span",da,u(o(s)("rank.estNote")),1)):w("",!0),g.value?(m(),f("div",ma,[r("button",{class:S(["seg-btn",{"seg-active":_.value==="list"}]),onClick:U[0]||(U[0]=Ye=>B("list"))},u(o(s)("rank.list")),3),r("button",{class:S(["seg-btn",{"seg-active":_.value==="ladder"}]),onClick:U[1]||(U[1]=Ye=>B("ladder"))},u(o(s)("rank.ladder")),3)])):w("",!0)])]),_.value==="ladder"?(m(),f("p",fa,u(o(s)("rank.ladderNote",{sort:J.value})),1)):w("",!0),_.value==="ladder"?(m(),de(ea,{key:4,category:a.value,rows:R.value,sort:x.value},null,8,["category","rows","sort"])):(m(),de(Jn,{key:5,category:a.value,rows:R.value,sort:x.value,dir:d.value.dir,onSort:P},null,8,["category","rows","sort","dir"]))]))}});
2export{xa as default};

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