1import{_ as se}from"./NGvUxdtH.js";import{_ as oe,q as le,C as ae,r as x,g as _,h as ne,c as i,u as l,a as e,j as p,b as A,w,t as n,d as v,F as g,i as b,y as T,z as B,A as I,k as L,o as r}from"#entry";import{c as re,a as S}from"./CDCbpY0Z.js";import{b as ie}from"./DF6qag_-.js";import{g as de}from"./CL5GoSVA.js";import{u as ue}from"./CvpC9xd1.js";import{u as ce,_ as pe}from"./juye0P76.js";import{u as me}from"./YtK0D77B.js";const xe={class:"min-h-screen bg-gradient-to-b from-slate-900 via-slate-800 to-slate-900 pt-24 pb-12"},ge={key:0,class:"max-w-4xl mx-auto px-4 sm:px-6 lg:px-8"},be={class:"mb-8"},ve={class:"flex items-center space-x-2 text-sm"},fe={class:"text-white"},_e={class:"bg-slate-800/60 backdrop-filter backdrop-blur-sm rounded-xl p-8 border border-slate-700 mb-8"},he={class:"flex justify-between items-start mb-6"},ye={class:"text-4xl font-bold text-white mb-2"},we={class:"flex items-center gap-4 text-sm"},ke={class:"flex items-center gap-2 bg-slate-700 text-yellow-400 px-3 py-1 rounded-full font-medium"},Ce=["src","alt"],Se={key:0,class:"text-slate-400"},Me={class:"text-slate-400"},$e={class:"text-lg text-slate-300 mb-6"},De={class:"grid md:grid-cols-3 gap-6 mb-8"},je={class:"bg-slate-900/50 rounded-lg p-4 border border-slate-700"},Ae={class:"text-2xl font-bold text-white"},Te={class:"bg-slate-900/50 rounded-lg p-4 border border-slate-700"},Be={class:"text-2xl font-bold text-white"},Ie={key:0,class:"bg-slate-900/50 rounded-lg p-4 border border-slate-700"},Le={class:"text-2xl font-bold text-yellow-400"},Ne={class:"mb-8"},Pe={class:"flex flex-wrap gap-2"},Ve={class:"bg-slate-800/60 backdrop-filter backdrop-blur-sm rounded-xl p-8 border border-slate-700 mb-8"},Fe={key:0,class:"mb-8"},Oe={class:"border border-slate-700 rounded-lg overflow-hidden"},Ue={class:"bg-slate-900/50 px-6 py-4 border-b border-slate-700"},We={class:"flex items-center gap-4"},Re={class:"relative"},ze=["value"],Ee={class:"relative"},qe=["value"],Ge={class:"relative"},He={key:0,class:"absolute inset-0 bg-gray-900/90 flex items-center justify-center z-10"},Ke={class:"bg-slate-900/50 px-6 py-4 border-t border-slate-700"},Je={class:"space-y-3 text-sm"},Qe={class:"text-slate-400"},Xe={class:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-3"},Ye={class:"grid grid-cols-2 sm:flex sm:items-center gap-4 sm:gap-6 text-slate-400"},Ze={key:0},et={key:1},tt={class:"flex gap-2"},st={key:1},ot={class:"text-lg font-semibold mb-4 text-white"},lt={class:"grid md:grid-cols-3 gap-4"},at={class:"flex items-start justify-between mb-2"},nt={class:"font-medium text-white"},rt={class:"bg-slate-700 text-slate-400 px-2 py-1 rounded text-xs capitalize"},it={class:"text-slate-400 text-sm mb-3"},dt={class:"flex items-center justify-between text-xs text-slate-500"},ut={key:2,class:"text-center py-8 text-slate-400"},ct={key:0,class:"bg-slate-800/60 backdrop-filter backdrop-blur-sm rounded-xl p-8 border border-slate-700 mb-8"},pt={class:"grid md:grid-cols-2 lg:grid-cols-3 gap-4"},mt={class:"flex items-center gap-3"},xt={class:"text-2xl"},gt={class:"font-semibold text-white"},bt={class:"text-sm text-slate-400"},vt={class:"bg-slate-800/60 backdrop-filter backdrop-blur-sm rounded-xl p-8 border border-slate-700"},ft={class:"text-2xl font-bold mb-6 text-white"},_t={class:"mb-8"},ht={class:"grid md:grid-cols-2 gap-4"},yt={class:"flex justify-between items-center"},wt={class:"font-semibold group-hover:text-yellow-400 transition text-white"},kt={class:"text-sm text-slate-400 mt-1"},Ct={class:"border-t border-slate-700 pt-6"},St={class:"flex flex-col sm:flex-row gap-4"},Mt=["label"],$t=["value","disabled"],Dt=["disabled"],jt={key:1,class:"max-w-4xl mx-auto px-4 sm:px-6 lg:px-8 text-center"},At={class:"bg-slate-800/60 backdrop-filter backdrop-blur-sm rounded-xl p-12 border border-slate-700"},Tt={__name:"[slug]",setup(Bt){const O=le(),U=ae(),W=O.params.slug,o=re(W),N=o?ie(o.id):[],{fetchPublicTasks:R,fetchTask:z}=ue(),{calculateCostUSD:E}=ce(),u=x(null),P=x([]),k=x([]),y=x({}),m=x(""),f=x(""),C=x(!1),q=_(()=>k.value.map(a=>({promptId:a.id,title:a.title}))),G=_(()=>{if(!m.value)return[];const a=y.value[m.value];return!a||!a.code?[]:[...new Set(a.code.filter(d=>d.model_id===o.slug).map(d=>d.language_id))].map(d=>{const s=de(d);return{id:d,name:s?.name||d}})}),H=async()=>{o&&(k.value=await R(o.slug),k.value.length>0&&(m.value=k.value[0].id,await V(m.value)))},V=async a=>{if(y.value[a]){const d=y.value[a].code.find(s=>
1s.model_id===o.slug);d&&(f.value=d.language_id),await M();return}C.value=!0;try{const t=await z(a);if(t){y.value[a]=t;const d=t.code.find(s=>s.model_id===o.slug);d&&(f.value=d.language_id),await M()}}finally{C.value=!1}},M=async()=>{if(!m.value||!f.value)return;const a=y.value[m.value];if(!a)return;const t=a.code.find(d=>d.model_id===o.slug&&d.language_id===f.value);t&&(u.value={id:`${a.task.id}-${o.slug}-${t.language_id}`,title:a.task.title,description:"",language:t.language_id,code:t.code,filename:t.filename,prompt:a.task.prompt,metrics:t.metrics,tags:a.task.tags||[]})},K=async()=>{await V(m.value)},J=async()=>{await M()};ne(async()=>{await H()}),x(!1);const Q=_(()=>u.value?{code:u.value.code,languageId:u.value.language,filename:u.value.filename}:null),$=_(()=>u.value?.metrics?X(u.value.metrics):null),F=_(()=>{if(!u.value?.metrics)return null;const a=u.value.metrics.generationTimeMs;return typeof a!="number"||!Number.isFinite(a)?null:a}),X=a=>E(a,o?.pricing),h=x(""),Y=_(()=>{if(!o)return[];const a=[],t=S.filter(s=>s.provider===o.provider&&s.slug!==o.slug&&!s.deprecated).slice(0,1);if(["OpenAI","Anthropic","Google"].filter(s=>s!==o.provider).forEach(s=>{const c=S.find(j=>j.provider===s&&!j.deprecated&&j.slug!==o.slug);c&&a.push(c)}),o.contextWindow>1e5){const s=S.find(c=>c.contextWindow>1e5&&c.slug!==o.slug&&!a.includes(c));s&&a.push(s)}return[...t,...a].slice(0,4)}),Z=_(()=>{const a={};return S.filter(t=>!t.deprecated).forEach(t=>{a[t.provider]||(a[t.provider]={name:t.provider,models:[]}),a[t.provider].models.push(t)}),Object.values(a)}),ee=()=>{h.value&&o&&U.push(`/models/compare/${o.slug}-vs-${h.value}`)},D=a=>a>=1e6?`${(a/1e6).toFixed(1)}M`:a>=1e3?`${Math.round(a/1e3)}K`:a.toString(),te=a=>new Date(a).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"});return me({title:o?`${o.name} - AI Model Analysis | Who Codes Best?`:"Model Not Found",meta:[{name:"description",content:o?`${o.description} Compare ${o.name} with other AI models. Context: ${D(o.contextWindow)}, Provider: ${o.provider}.`:"Model not found"}]}),(a,t)=>{const d=se;return r(),i("div",xe,[l(o)?(r(),i("div",ge,[e("nav",be,[e("ol",ve,[e("li",null,[A(d,{to:"/",class:"inline-block py-1 px-2 -mx-2 text-slate-500 hover:text-yellow-400 transition-colors"},{default:w(()=>[...t[3]||(t[3]=[v("home",-1)])]),_:1})]),t[5]||(t[5]=e("li",{class:"text-slate-500 px-1"},"/",-1)),e("li",null,[A(d,{to:"/models/",class:"inline-block py-1 px-2 -mx-2 text-slate-500 hover:text-yellow-400 transition-colors"},{default:w(()=>[...t[4]||(t[4]=[v("models",-1)])]),_:1})]),t[6]||(t[6]=e("li",{class:"text-slate-500"},"/",-1)),e("li",fe,n(l(o).name),1)])]),e("div",_e,[e("div",he,[e("div",null,[e("h1",ye,n(l(o).name),1),e("div",we,[e("div",ke,[l(o).logo?(r(),i("img",{key:0,src:l(o).logo,alt:l(o).provider,class:"w-5 h-5 object-contain brightness-0 invert"},null,8,Ce)):p("",!0),e("span",null,n(l(o).provider),1)]),l(o).version?(r(),i("span",Se,"Version: "+n(l(o).version),1)):p("",!0),e("span",Me,"Released: "+n(te(l(o).releaseDate)),1)])])]),e("p",$e,n(l(o).description),1),e("div",De,[e("div",je,[t[7]||(t[7]=e("div",{class:"text-sm text-slate-500 mb-1"},"Context Window",-1)),e("div",Ae,n(D(l(o).contextWindow)),1)]),e("div",Te,[t[8]||(t[8]=e("div",{class:"text-sm text-slate-500 mb-1"},"Max Output",-1)),e("div",Be,n(D(l(o).maxOutput||4096)),1)]),l(o).pricing?(r(),i("div",Ie,[t[11]||(t[11]=e("div",{class:"text-sm text-slate-500 mb-1"},"Pricing (per 1M tokens)",-1)),e("div",Le,[t[9]||(t[9]=e("span",{class:"text-base text-slate-400"},"In:",-1)),v(" $"+n(l(o).pricing.input)+" ",1),t[10]||(t[10]=e("span",{class:"text-base text-slate-400 ml-2"},"Out:",-1)),v(" $"+n(l(o).pricing.output),1)])])):p("",!0)]),e("div",Ne,[t[12]||(t[12]=e("h2",{class:"text-xl font-semibold mb-4 text-white"},"Features",-1)),e("div",Pe,[(r(!0),i(g,null,b(l(o).features,s=>(r(),i("span",{key:s,class:"bg-slate-700 text-yellow-400 px-3 py-1 rounded-lg text-sm"},n(s),1))),128))])])]),e("div",Ve,[t[21]||(t[21]=e("div",{class:"flex items-center justify-between mb-6"},[e("h2",{class:"text-2xl font-bold text-white"},"Code Output")],-1)),l(u)?(r(),i("div",Fe,[e("div",Oe,[e("div",Ue,[e("div",We,[e("div",Re,[T(e("select",{"onUpdate:modelValue":t[0]||(t[0]=s=>I(m)?m.value=s:null),onChange:K,class:"bg-slate-800 text-white border border-slate-600 rounded-lg px-4 py-2 pr-8 appearance-none cursor-pointer hover:border-yellow-400/50 transition"},[(r(!0),i(g,null,b(l(q),s=>(r(),i("option",{key:s.promptId,value:s.promptId},n(s.title),9,ze))),128))],544),[[B,l(m)]]),t[13]||(t[13]=e("div",{class:"absolute inset-y-0 right-0 flex items-center pr-2 pointer-events-none"},[e("svg",{class:"w-5 h-5 text-slate-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M19 9l-7 7-7-7"})])],-1))]),e("div",Ee,[T(e("select",{"onUpdate:modelValue":t[1]||(t[1]=s=>I(f)?f.value=s:null),onChange:J,class:"bg-slate-800 text-white border border-slate-600 rounded-lg px-4 py-2 pr-8 appearance-none cursor-pointer hover:border-yellow-400/50 transition"},[(r(!0),i(g,null,b(l(G),s=>(r(),i("option",{key:s.id,value:s.id},n(s.name),9,qe))),128))],544),[[B,l(f)]]),t[14]||(t[14]=e("div",{class:"absolute inset-y-0 right-0 flex items-center pr-2 pointer-events-none"},[e("svg",{class:"w-5 h-5 text-slate-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M19 9l-7 7-7-7"})])],-1))])])]),e("div",Ge,[l(C)?(r(),i("div",He,[...t[15]||(t[15]=[e("div",{class:"animate-spin rounded-full h-8 w-8 border-b-2 border-yellow-400"},null,-1)])])):p("",!0),l(C)?p("",!0):(r(),L(pe,{key:1,model:l(o),"code-sample":l(Q),"cost-u-s-d":l($),"show-header":!1,border:!1,position:"left"},null,8,["model","code-sample","cost-u-s-d"]))]),e("div",Ke,[e("div",Je,[e("div",Qe,[t[16]||(t[16]=e("span",{class:"font-medium text-slate-300"},"Prompt:",-1)),v(' "'+n(l(u).prompt)+'" ',1)]),e("div",Xe,[e("div",Ye,[l($)!==null?(r(),i("span",Ze,[t[17]||(t[17]=e("span",{class:"font-medium text-slate-300"},"Cost:",-1)),v(" $"+n(l($)),1)])):p("",!0),l(F)!==null?(r(),i("span",et,[t[18]||(t[18]=e("span",{class:"font-medium text-slate-300"},"Time:",-1)),v(" "+n(l(F))+"ms ",1)])):p("",!0)]),e("div",tt,[(r(!0),i(g,null,b(l(u).tags.slice(0,3),s=>(r(),i("span",{key:s,class:"bg-slate-700 text-slate-300 px-2 py-1 rounded text-xs"},n(s),1))),128))])])])])])])):p("",!0),l(P).length>0?(r(),i("div",st,[e("h3",ot,"More samples with "+n(l(o).name),1),e("div",lt,[(r(!0),i(g,null,b(l(P),s=>(r(),i("div",{key:s.id,class:"border border-slate-700 rounded-lg p-4 hover:border-yellow-400/50 transition cursor-pointer bg-slate-900/50"},[e("div",at,[e("h4",nt,n(s.title),1),e("span",rt,n(s.language),
11)]),e("p",it,n(s.description),1),e("div",dt,[e("span",null,n(s.metrics.tokensUsed)+" tokens",1),e("span",null,n(s.difficulty),1)])]))),128))])])):p("",!0),l(u)?p("",!0):(r(),i("div",ut,[t[19]||(t[19]=e("div",{class:"text-4xl mb-4"},"ð»",-1)),e("p",null,"No code samples available for "+n(l(o).name)+" yet.",1),t[20]||(t[20]=e("p",{class:"text-sm mt-2"},"Check back soon for examples!",-1))]))]),l(N).length>0?(r(),i("div",ct,[t[22]||(t[22]=e("h2",{class:"text-2xl font-bold mb-6 text-white"},"Available in These Agents",-1)),e("div",pt,[(r(!0),i(g,null,b(l(N),s=>(r(),L(d,{key:s.id,to:`/agents/${s.id}`,class:"border border-slate-700 rounded-lg p-4 hover:border-yellow-400/50 transition bg-slate-900/50"},{default:w(()=>[e("div",mt,[e("span",xt,n(s.emoji||"ð¤"),1),e("div",null,[e("div",gt,n(s.name),1),e("div",bt,n(s.category),1)])])]),_:2},1032,["to"]))),128))])])):p("",!0),e("div",vt,[e("h2",ft,"Compare "+n(l(o).name),1),e("div",_t,[t[24]||(t[24]=e("h3",{class:"text-lg font-semibold mb-4 text-white"},"Popular Comparisons",-1)),e("div",ht,[(r(!0),i(g,null,b(l(Y),s=>(r(),L(d,{key:s.slug,to:`/models/compare/${l(o).slug}-vs-${s.slug}`,class:"border border-slate-700 rounded-lg p-4 hover:border-yellow-400/50 transition group bg-slate-900/50"},{default:w(()=>[e("div",yt,[e("div",null,[e("div",wt,n(l(o).name)+" vs "+n(s.name),1),e("div",kt," Compare with "+n(s.provider)+"'s model ",1)]),t[23]||(t[23]=e("span",{class:"text-yellow-400 group-hover:translate-x-1 transition-transform"},"â",-1))])]),_:2},1032,["to"]))),128))])]),e("div",Ct,[t[26]||(t[26]=e("h3",{class:"text-lg font-semibold mb-4 text-white"},"Compare with Any Model",-1)),e("div",St,[T(e("select",{"onUpdate:modelValue":t[2]||(t[2]=s=>I(h)?h.value=s:null),class:"flex-1 px-4 py-2 bg-slate-900/50 border border-slate-700 text-white rounded-lg focus:ring-2 focus:ring-yellow-400 focus:border-transparent"},[t[25]||(t[25]=e("option",{value:""},"Select a model to compare...",-1)),(r(!0),i(g,null,b(l(Z),s=>(r(),i("optgroup",{key:s.name,label:s.name},[(r(!0),i(g,null,b(s.models,c=>(r(),i("option",{key:c.id,value:c.slug,disabled:c.slug===l(o).slug},n(c.name)+n(c.slug===l(o).slug?" (current)":""),9,$t))),128))],8,Mt))),128))],512),[[B,l(h)]]),e("button",{onClick:ee,disabled:!l(h),class:"px-6 py-2 bg-yellow-400 text-slate-900 font-medium rounded-lg hover:bg-yellow-300 transition disabled:bg-slate-700 disabled:text-slate-500 disabled:cursor-not-allowed sm:w-auto w-full"}," Compare â ",8,Dt)])])])])):(r(),i("div",jt,[e("div",At,[t[28]||(t[28]=e("div",{class:"text-6xl mb-4"},"ð",-1)),t[29]||(t[29]=e("h1",{class:"text-2xl font-bold text-white mb-4"},"Model Not Found",-1)),t[30]||(t[30]=e("p",{class:"text-slate-300 mb-8"},"The model you're looking for doesn't exist or may have been renamed.",-1)),A(d,{to:"/models/",class:"bg-yellow-400 text-slate-900 font-medium px-6 py-3 rounded-lg hover:bg-yellow-300 transition"},{default:w(()=>[...t[27]||(t[27]=[v(" Browse All Models ",-1)])]),_:1})])]))])}}},Wt=oe(Tt,[["__scopeId","data-v-aac55938"]]);export{Wt 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.