import{w as b,j as f}from"./jsx-runtime-CgWCn3gT.js";import{S as M,m as y,L as v,l as A,p as N}from"./legacy-shell-D4JdMu14.js";import{c as I,b as L,a as j,C as P}from"./index-C7ChcM5G.js";import{J as $,e as S,o as x,a as E}from"./seo-meta-Bpqygpx8.js";import{E as V}from"./error-page-Bt0s4Oe9.js";import"./i18nInstance-C_7vXBXC.js";import"./useTranslation-CksCcIr-.js";import"./index-ao6ir_VS.js";import"./preload-helper-BXl3LOEh.js";import"./styled-components.browser.esm-CQ4IZagM.js";import"./PricingPromotion-Cg1c_py4.js";import"./providerSeo-RwIhoovz.js";import"./index-CcHKj0sM.js";import"./useVariants-DSpotrXM.js";import"./SearchOutlined-4CAPyJbl.js";const c=M.siteInfo.domain;function C(l){return(l||[]).map(n=>{const t=n&&n.promotion?A(n.promotion):null;return t&&t.active?N(t.offPercent):1})}function W({data:l,error:n}){if(n?.status&&n.status>=500)return[{title:"Temporarily Unavailable"},{name:"robots",content:"noindex"}];if(n||!l)return[{title:"Comparison Not Found"},{name:"robots",content:"noindex"}];const{names:t,records:o,developers:u}=l;if(t.length===0){const e="Compare AI Models - Pricing, Speed & Arena Scores | AIHubMix",r="Put 2 to 4 AI models side by side on pricing, context window, latency, throughput, arena scores and real usage on AIHubMix.",m=`${c}/compare`;return[{title:e},{name:"description",content:r},{tagName:"link",rel:"canonical",href:m},...x({title:e,description:r,url:m}),...E()]}if(t.length<2)return[{title:"Compare AI Models | AIHubMix"},{name:"robots",content:"noindex"}];const a=`${o.map(e=>y(e)||e.model).join(" vs ")} - AI Model Comparison | AIHubMix`,d=new Map((u||[]).map(e=>[e.id,e.developer])),p=o.map(e=>{const r=y(e)||e.model,m=d.get(e.developer_id)||e.developer;return m?`${r} from ${m}`:r}).join(" and "),i=L(o,{priceMultipliers:C(o)})||`Compare ${p} on key metrics including pricing, context length, latency, throughput, arena scores and real usage on AIHubMix.`,s=I(t);return[{title:a},{name:"description",content:i},{tagName:"link",rel:"canonical",href:s},...x({title:a,description:i,url:s})]}const z=b(function({loaderData:n}){const{names:t,records:o,developers:u,relatedPairs:g,pairNames:a}=n,d={"@type":"WebSite",name:M.siteInfo.siteName,url:c};let p=null;if(t.length>=2){const i=I(t),s=C(o),e=o.map(h=>y(h)||h.model),r=[{"@type":"WebPage",url:i,name:`${e.join(" vs ")} - AI Model Comparison`,description:L(o,{priceMultipliers:s}),inLanguage:"en",isPartOf:d},{"@type":"BreadcrumbList",itemListElement:[{"@type":"ListItem",position:1,name:"Models",item:`${c}/models`},{"@type":"ListItem",position:2,name:"Compare",item:`${c}/compare`},{"@type":"ListItem",position:3,name:e.join(" vs "),item:i}]}],m=j(o,{priceMultipliers:s});m&&r.push(m),p={"@context":"https://schema.org","@graph":r}}else t.length===0&&(p={"@context":"https://schema.org","@type":"CollectionPage",name:"Compare AI Models",url:`${c}/compare`,isPartOf:d,mainEntity:{"@type":"ItemList",itemListElement:(g||[]).map(([i,s],e)=>({"@type":"ListItem",position:e+1,name:`${a&&a[i]||i} vs ${a&&a[s]||s}`,url:I([i,s])}))}});return f.jsxs(v,{children:[f.jsx(P,{modelNames:t,initialRecords:o,initialDevelopers:u,relatedPairs:g,pairNames:a},t.join("|")),p&&f.jsx("script",{id:$,type:"application/ld+json",dangerouslySetInnerHTML:{__html:S(JSON.stringify(p))}})]})});export{V as ErrorBoundary,z as default,W as meta};
