PageSourceSearch

https://vilao.ai/_next/static/chunks/2506.a3a1a89ac4cc6d2c.js

js vilao.ai collected 2026-10-05 14:39:39 UTC 89,695 bytes, 5 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2506,4819,9951],{8176:(e,t,s)=>{s.d(t,{JZ:()=>l,Ps:()=>i,d5:()=>a});let a="/console",l={landing:"/",llmMarketplace:"/llm-marketplace",models:"/models",providers:"/providers",ranking:"/ranking",llmMarketplaceProviderDetail:"/llm-marketplace/providers/:id",marketplaceProviderDetail:"/provider/:prefix",marketplaceModelDetail:"/model/:prefix/*",llmMarketplacePlans:"/llm-marketplace/plans",llmMarketplacePlanDetail:"/llm-marketplace/plans/:slug",subscription:"/subscription",checkModel:"/check-model",enterprise:"/enterprise",root:`${a}/`,oauthCallback:`${a}/oauth/callback`,refLanding:"/ref",refShort:"/r/:code",admin:`${a}/admin/`,adminAnalytics:`${a}/admin/analytics`,adminUsers:`${a}/admin/users`,adminUsersUserId:`${a}/admin/users/:userId`,adminPayments:`${a}/admin/payments`,adminReferrals:`${a}/admin/referrals`,adminAffiliate:`${a}/admin/affiliate`,adminSettings:`${a}/admin/settings`,adminAnnouncements:`${a}/admin/announcements`,adminEmailCampaigns:`${a}/admin/email-campaigns`,adminEmailCampaignNew:`${a}/admin/email-campaigns/new`,adminEmailCampaignEdit:`${a}/admin/email-campaigns/:id/edit`,adminEmailCampaignDetail:`${a}/admin/email-campaigns/:id`,adminTeams:`${a}/admin/teams`,adminTeamDetail:`${a}/admin/teams/:teamId`,adminLLMDashboard:`${a}/admin/llm/dashboard`,adminFreeModel:`${a}/admin/freemodel`,adminPlans:`${a}/admin/llm/plans`,adminPlansOverview:`${a}/admin/llm/plans-overview`,adminPlanSubscriptions:`${a}/admin/llm/plan-subscriptions`,adminPlanPayouts:`${a}/admin/llm/plan-payouts`,adminPlanPartialRelease:`${a}/admin/llm/plan-payouts/partial`,adminPlanRefunds:`${a}/admin/llm/plan-refunds`,adminLLMPromotions:`${a}/admin/llm/promotions`,adminLLMSVGTest:`${a}/admin/llm/svg-test`,adminLLMTickets:`${a}/admin/llm/tickets`,adminLLMTicketDetail:`${a}/admin/llm/tickets/:id`,userDashboard:`${a}/dashboard`,userBilling:`${a}/billing`,userWalletTopupId:`${a}/wallet/topup/:id`,userWalletTopup:`${a}/wallet/topup`,userAccount:`${a}/account`,userReferrals:`${a}/referrals`,userTeams:`${a}/teams`,userTeamDetail:`${a}/teams/:teamId`,userAPIDocs:`${a}/api-docs`,userLLMKeys:`${a}/keys`,userLLMPlans:`${a}/plans`,userLLMUsage:`${a}/usage`,userLLMTickets:`${a}/tickets`,userLLMTicketDetail:`${a}/tickets/:id`,user:`${a}/user/`,userAffiliate:`${a}/user/affiliate`,userAPITokens:`${a}/user/api-tokens`,userLLMProviders:`${a}/user/llm/providers`,userLLMProviderDetail:`${a}/user/llm/providers/:id`,userLLMPromotions:`${a}/user/llm/promotions`,sellerProviderTickets:`${a}/seller/llm/provider-tickets`,sellerProviderTicketDetail:`${a}/seller/llm/provider-tickets/:id`,earnPlans:`${a}/user/earn/plans`,earnPlanDetail:`${a}/user/earn/plans/:id`,earnPlanAnalytics:`${a}/user/earn/plans/:id/analytics`,seller:`${a}/seller/`,sellerDashboard:`${a}/seller/dashboard`,sellerLLMProviders:`${a}/seller/llm/providers`,sellerLLMProviderDetail:`${a}/seller/llm/providers/:id`,sellerLLMPromotions:`${a}/seller/llm/promotions`,sellerUsage:`${a}/seller/llm/usage`,sellerPublicProfile:`${a}/seller/public-profile`,sellerAffiliate:`${a}/seller/affiliate`,sellerPlans:`${a}/seller/plans`,sellerPlanDetail:`${a}/seller/plans/:id`,sellerPlanAnalytics:`${a}/seller/plans/:id/analytics`,policy:"/policy",terms:"/terms",documentation:"/docs",documentationDetail:"/docs/:slug"},r=[["/llm/keys",l.userLLMKeys],["/llm/usage",l.userLLMUsage],["/llm/plans",l.userLLMPlans],["/llm/tickets",l.userLLMTickets],["/llm/providers",l.sellerLLMProviders],["/earn/plans",l.sellerPlans],["/api-tokens",l.userAccount]];function i(e,t=""){let s=`${a}/user`;if(e!==s&&!e.startsWith(`${s}/`))return null;let o=e.slice(s.length).replace(/\/+$/,"");if(""===o)return l.userDashboard+t;if("/llm"===o)return l.userLLMKeys+t;if("/affiliate"===o){let e=new URLSearchParams(t);return e.set("tab","affiliate"),`${l.userReferrals}?${e.toString()}`}let n=r.find(([e])=>o===e||o.startsWith(`${e}/`));return(n?n[1]+o.slice(n[0].length):a+o)+t}},12904:(e,t,s)=>{s.d(t,{A:()=>b});var a=s(54568);s(7620);var l=s(24837),r=s(44543),i=s(3617),o=s(86668),n=s(52395),c=s(48597),d=s(79718),m=s(64567),u=s(63909),p=s(33383);let x="#4A90E2",h="#7B68EE",g="rgba(15, 15, 35, 0.5)",f="rgba(55, 65, 81, 0.5)",y="#9ca3af",j=()=>
1(0,a.jsx)("svg",{viewBox:"0 0 24 24",fill:"currentColor",width:"1em",height:"1em",children:(0,a.jsx)("path",{d:"M19.59 6.69a4.83 4.83 0 01-3.77-4.25V2h-3.45v13.67a2.89 2.89 0 01-2.88 2.5 2.89 2.89 0 01-2.89-2.89 2.89 2.89 0 012.89-2.89c.28 0 .54.04.79.1v-3.5a6.37 6.37 0 00-.79-.05A6.34 6.34 0 003.15 15.2a6.34 6.34 0 006.34 6.34 6.34 6.34 0 006.34-6.34V8.73a8.19 8.19 0 004.76 1.52V6.79a4.84 4.84 0 01-1-.1z"})}),v=()=>(0,a.jsx)("svg",{viewBox:"0 0 24 24",fill:"currentColor",width:"1em",height:"1em",children:(0,a.jsx)("path",{d:"M12.186 24h-.007C5.461 23.956.057 18.514 0 11.741 0 5.244 5.373 0 11.987 0 18.555.043 24 5.485 24 12.068c-.013 3.278-1.381 6.337-3.68 8.604a11.95 11.95 0 01-8.134 3.328zm5.598-10.083c-.208-3.478-2.124-5.495-5.578-5.878a5.572 5.572 0 00-3.462.776l.923 2.126a3.61 3.61 0 012.248-.597c1.264.068 2.1.722 2.354 1.838a5.49 5.49 0 00-1.566-.189c-2.633.046-4.326 1.583-4.246 3.86.042 1.175.594 2.19 1.555 2.86.813.566 1.862.81 2.95.688 1.407-.158 2.477-.842 3.137-2.08.363-.69.54-1.465.575-2.527l.02-.001c.49.28.87.65 1.11 1.12.436.848.474 2.246-.474 3.37-1.058 1.254-2.397 1.78-4.264 1.798-2.082-.019-3.663-.716-4.7-2.073C5.77 16.385 5.23 14.597 5.21 12.4l-.001-.41c.019-2.2.56-3.988 1.607-5.31 1.037-1.356 2.618-2.054 4.7-2.073 2.1.02 3.704.72 4.766 2.08.529.678.908 1.483 1.14 2.413l2.475-.665c-.3-1.24-.824-2.35-1.575-3.322C16.88 3.296 14.71 2.38 12.017 2.354h-.058c-2.68.026-4.822.949-6.368 2.742C4.17 6.743 3.507 8.95 3.48 11.56v.877c.027 2.608.69 4.816 1.968 6.565 1.545 1.794 3.687 2.716 6.368 2.742h.058c2.098-.019 3.768-.703 5.116-2.095 1.72-1.774 1.92-3.99 1.254-5.538-.47-1.094-1.352-1.956-2.46-2.394z"})}),b=({onGetStarted:e})=>{let t=(0,d.Zp)(),{t:s}=(0,m.Bd)("landing"),b=new Date().getFullYear(),k=e=>{let t=document.getElementById(e.replace("#",""));t&&t.scrollIntoView({behavior:"smooth"})},w=[{label:"Facebook",href:"https://www.facebook.com/vilaovn",icon:(0,a.jsx)(r.A,{})},{label:"YouTube",href:"https://www.youtube.com/@chiasegpu",icon:(0,a.jsx)(i.A,{})},{label:"TikTok",href:"https://www.tiktok.com/@chiasegpu.vn",icon:(0,a.jsx)(j,{})},{label:"Instagram",href:"https://www.instagram.com/chiasegpu.vn",icon:(0,a.jsx)(o.A,{})},{label:"Threads",href:"https://www.threads.com/@chiasegpu.vn",icon:(0,a.jsx)(v,{})}],A={product:[{label:s("header.marketplace"),href:u.JZ.models,isRoute:!0},{label:s("header.providers"),href:u.JZ.providers,isRoute:!0},{label:s("header.subscription"),href:u.JZ.subscription,isRoute:!0},{label:s("footer.pricing"),href:u.JZ.models,isRoute:!0}],resources:[{label:s("footer.features"),href:"#features"},{label:s("footer.guide"),href:"#how-it-works"},{label:s("footer.docs"),href:"#"},{label:"API",href:"#"}],company:[{label:s("footer.about"),href:"#"},{label:s("footer.contact"),href:"#"},{label:s("footer.enterprise"),href:u.JZ.enterprise,isRoute:!0},{label:s("footer.policy"),href:u.JZ.policy,isRoute:!0},{label:s("footer.terms"),href:u.JZ.terms,isRoute:!0}]},N="text-sm text-space-text-dim hover:text-space-primary transition-colors duration-200 cursor-pointer bg-transparent border-0 p-0";return(0,a.jsx)("footer",{className:"relative",style:{background:"linear-gradient(180deg, var(--space-background) 0%, #08081a 100%)",borderTop:`1px solid ${f}`},children:(0,a.jsxs)("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-12 md:py-16",children:[(0,a.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-5 gap-8 md:gap-12 mb-12",children:[(0,a.jsxs)("div",{className:"lg:col-span-2",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("img",{src:"/assets/logo.png",alt:"Vilao AI",className:"w-12 h-12 object-contain"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h3",{className:"text-xl font-bold text-transparent bg-clip-text font-sans",style:{backgroundImage:`linear-gradient(135deg, ${x}, ${h})`},children:"Vilao AI"}),(0,a.jsx)("p",{className:"text-xs text-space-text-dim font-mono uppercase tracking-wider",children:"AI Models Marketplace"})]})]}),(0,a.jsx)("p",{className:"text-sm text-space-text-dim mb-6 max-w-md leading-relaxed",children:s("footer.brandDesc")}),(0,a.jsx)("div",{className:"flex items-center gap-2 mb-6",children:w.map(e=>(0,a.jsx)("a",{href:e.href,target:"_blank",rel:"noopener noreferrer",className:"w-10 h-10 rounded-xl flex items-center justify-center transition-all duration-200 hover:scale-[1.05]",style:{background:g,border:`1px solid ${f}`,color:y},onMouseEnter:e=>{e.currentTarget.style.color=x,e.currentTarget.style.borderColor=`${x}80`,e.currentTarget.style.background=`${x}15`},onMouseLeave:e=>{e.currentTarget.style.color=y,e.currentTarget.style.borderColor=f,e.currentTarget.style.background=g},"aria-label":e.label,title:e.label,children:e.icon},e.label))}),(0,a.jsxs)("div",{className:"rounded-2xl p-4 max-w-sm",style:{background:g,border:`1px solid ${f}`},children:[(0,a.jsx)("h4",{className:"text-[10px] font-semibold mb-2 font-mono uppercase tracking-wider",style:{color:x},children:s("footer.businessInfo")}),(0,a.jsxs)("div",{className:"space-y-1.5 text-xs text-space-text-dim",children:[(0,a.jsxs)("p",{className:"flex items-start gap-2",children:[(0,a.jsx)("span",{style:{color:h},className:"font-medium shrink-0 font-mono",children:"HKD"}),(0,a.jsx)("span",{children:s("footer.businessName")})]}),(0,a.jsxs)("p",{className:"flex items-start gap-2",children:[(0,a.jsx)("span",{style:{color:h},className:"font-medium shrink-0 font-mono",children:"MST"}),(0,a.jsx)("span",{className:"font-mono",children:"066200002426"})]}),(0,a.jsxs)("p",{className:"flex items-start gap-2",children:[(0,a.jsx)(n.A,{style:{color:h},className:"mt-0.5 shrink-0"}),(0,a.jsx)("a",{href:"mailto:[email protected]",className:"text-space-text-dim hover:text-space-primary transition-colors",children:"[email protected]"})]})]})]})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h4",{className:"text-xs font-semibold mb-4 font-mono uppercase tracking-wider",style:{color:x},children:s("footer.productHeading")}),(0,a.jsx)("ul",{className:"space-y-2.5",children:A.product.map(e=>(0,a.jsx)("li",{children:(0,a.jsx)("button",{onClick:()=>{e.isRoute?t(e.href):e.href.startsWith("#")&&k(e.href)},className:N,children:e.label})},e.label))})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h4",{className:"text-xs font-semibold mb-4 font-mono uppercase tracking-wider",style:{color:h},children:s("footer.resourcesHeading")}),(0,a.jsx)("ul",{className:"space-y-2.5",children:A.resources.map(e=>(0,a.jsx)("li",{children:(0,a.jsx)("button",{onClick:()=>{e.href.startsWith("#")&&k(e.href)},className:N,children:e.label})},e.label))})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h4",{className:"text-xs font-semibold mb-4 font-mono uppercase tracking-wider",style:{color:"#10b981"},children:s("footer.companyHeading")}),(0,a.jsx)("ul",{className:"space-y-2.5",children:A.company.map(e=>(0,a.jsx)("li",{children:(0,a.jsx)("button",{onClick:()=>{e.isRoute?t(e.href):e.href.startsWith("#")&&k(e.href)},className:N,children:e.label})},e.label))})]})]}),(0,a.jsxs)("div",{className:"rounded-2xl px-6 py-8 mb-10 text-center",style:{background:`linear-gradient(135deg, ${x}10, ${h}10)`,border:`1px solid ${x}30`},children:[(0,a.jsx)("h3",{className:"text-xl md:text-2xl font-bold text-space-text mb-2 font-sans",children:s("footer.ctaTitle")}),(0,a.jsx)("p",{className:"text-space-text-dim mb-5 text-sm md:text-base",children:s("footer.ctaDesc")}),(0,a.jsx)(l.Ay,{type:"primary",size:"large",icon:(0,a.jsx)(c.A,{}),onClick:e,className:"bg-gradient-to-r from-[#2F74D0] to-[#5B4BC4] border-0 hover:from-[#2766BA] hover:to-[#4F40B0] transition-all duration-200 h-12 px-8 font-semibold cursor-pointer",style:{fontFamily:"var(--font-sans), system-ui, sans-serif",boxShadow:`0 6px 20px ${x}55`},children:s("footer.ctaButton")})]}),(0,a.jsxs)("div",{className:"pt-6 flex flex-col md:flex-row items-center justify-between gap-3 md:gap-0",style:{borderTop:`1px solid ${f}`},children:[(0,a.jsx)("div",{className:"text-xs text-space-text-dim text-center md:text-left font-mono",children:(0,a.jsx)("p",{children:s("footer.copyright",{year:b})})}),(0,a.jsxs)("div",{className:"flex items-center gap-5 text-xs text-space-text-dim font-mono",children:[(0,a.jsx)("a",{href:(0,p.ZA)(u.JZ.policy),rel:"noopener",className:"hover:text-space-primary transition-colors duration-200 cursor-pointer",children:"Privacy Policy"}),(0,a.jsx)("a",{href:(0,p.ZA)(u.JZ.terms),rel:"noopener",className:"hover:text-space-primary transition-colors duration-200 cursor-pointer",children:"Terms of Service"})]})]})]})})}},19951:(e,t,s)=>{s.d(t,{A:()=>p,O:()=>x});var a=s(54568),l=s(81429),r=s(7620),i=s(27501),o=s(56890),n=s(87131),c=s(56269),d=s(35730);let m=["vi","en","zh"],u=(0,r.createContext)(void 0),p=()=>{let e=(0,r.useContext)(u);if(void 0===e)throw Error("useAuth must be used within an AuthProvider");return e},x=({children:e})=>{let{message:t}=i.A.useApp(),[s,p]=(0,r.useState)("unknown"),[x,h]=(0,r.useState)(null),{fetchMe:g,setMe:f,clearUserScoped:y,clearViewerScoped:j}=(0,n.u)();(0,r.useEffect)(()=>{f(x)},[x,f]);let v="pending"===s||"authed"===s,b=(0,r.useRef)(null);(0,r.useEffect)(()=>{"unknown"!==s&&(null!==b.current&&b.current!==v&&j(),b.current=v)},[s,v,j]);let k="unknown"===s||"pending"===s,w=(0,r.useCallback)(e=>{p(e?"authed":"guest")},[]);(0,r.useLayoutEffect)(()=>{l.Z.initializeAuth(),p(e=>"unknown"!==e?e:"none"===(0,c.IB)()?"guest":"pending")},[]);let A=(0,r.useCallback)(()=>null!==l.Z.getAccessToken(),[]),N=(0,r.useCallback)(async e=>{try{await l.Z.login(e);let s=await l.Z.getCurrentUser();return h(s),w(!0),t.success(o.Ay.t("auth.loginSuccess",{ns:"common"})),!0}catch(l){console.error("Login error:",l);let e=l.response?.data,s=e?.error_code,a=e?.message||e?.error;switch(s){case"ACCOUNT_TEMPORARILY_LOCKED":t.error(a||o.Ay.t("auth.errorAccountLocked",{ns:"common"}));break;case"ACCOUNT_DEACTIVATED_TOO_MANY_ATTEMPTS":t.error(a||o.Ay.t("auth.errorAccountDeactivated",{ns:"common"}));break;case"TURNSTILE_VERIFICATION_FAILED":t.error(a||o.Ay.t("auth.errorCaptchaFailed",{ns:"common"}));break;case"INVALID_CREDENTIALS":t.error(a||o.Ay.t("auth.errorInvalidCredentials",{ns:"common"}));break;case"ACCOUNT_INACTIVE":case"ACCOUNT_BANNED":t.error(a||o.Ay.t("auth.errorAccountUnavailable",{ns:"common"}));break;default:t.error(a||o.Ay.t("auth.errorLoginFailed",{ns:"common"}))}return!1}},[]),$=(0,r.useCallback)(async e=>
1{try{let s=await l.Z.registerRequest(e);if(s.access_token){let e=await l.Z.getCurrentUser();h(e),w(!0),t.success(o.Ay.t("auth.registerSuccess",{ns:"common"}))}return s}catch(l){console.error("Registration error:",l);let e=l.response?.data,s=e?.error_code,a=e?.message||e?.error;switch(s){case"TURNSTILE_VERIFICATION_FAILED":t.error(a||o.Ay.t("auth.errorCaptchaFailed",{ns:"common"}));break;case"INVALID_USERNAME":t.error(a||o.Ay.t("auth.errorInvalidUsername",{ns:"common"}));break;case"INVALID_EMAIL":case"EMAIL_REQUIRED":t.error(a||o.Ay.t("auth.errorInvalidEmail",{ns:"common"}));break;default:t.error(a||o.Ay.t("auth.errorRegisterFailed",{ns:"common"}))}return null}},[]),_=(0,r.useCallback)(async(e,s)=>{try{await l.Z.registerVerify(e,s);let a=await l.Z.getCurrentUser();return h(a),w(!0),t.success(o.Ay.t("auth.registerSuccess",{ns:"common"})),!0}catch(s){console.error("OTP verification error:",s);let e=s.response?.data;return t.error(e?.message||e?.error||o.Ay.t("auth.errorRegisterFailed",{ns:"common"})),!1}},[]),T=(0,r.useCallback)(async()=>{try{await l.Z.logout()}catch(e){console.error("Logout error:",e)}finally{w(!1),h(null),y(),t.success("Logged out successfully")}},[y]),S=(0,r.useCallback)(e=>{e&&h(t=>{if(!t)return t;let s=t.balance||0;return{...t,balance:Math.max(0,s+e)}})},[]),C=(0,r.useCallback)(async()=>{try{let e=await g({force:!0});h(e)}catch(e){console.error("Failed to refresh user:",e)}},[g]),I=x?.role==="admin";(0,r.useEffect)(()=>{(async()=>{let e=new URLSearchParams(window.location.search).get("oauth_token");if(e){l.Z.setAccessToken(e);let t=new URL(window.location.href);t.searchParams.delete("oauth_token"),window.history.replaceState({},document.title,t.pathname+t.search);try{let e=await l.Z.getCurrentUser();h(e),p("authed");return}catch(e){console.error("OAuth token validation failed:",e),l.Z.removeAccessToken()}}if(A()&&l.Z.getAccessToken())try{let e=await l.Z.validateToken();h(e),p("authed")}catch(e){console.error("Token validation failed:",e),l.Z.removeAccessToken(),p("guest"),h(null),y()}else p("guest"),h(null)})()},[]),(0,r.useEffect)(()=>{if(!v)return;let e=setInterval(()=>{document.hidden||(0,c.y3)()},24e4);return()=>clearInterval(e)},[v]);let L=x?.id,R=x?.language;(0,r.useEffect)(()=>{if("authed"!==s||!L)return;let e=e=>{let t=e?.slice(0,2);t&&m.includes(t)&&t!==R&&d.pp.setLanguage(t).then(()=>h(e=>e&&e.id===L?{...e,language:t}:e)).catch(e=>console.warn("save language failed",e))};return e(o.Ay.language),o.Ay.on("languageChanged",e),()=>o.Ay.off("languageChanged",e)},[s,L,R]);let M=r.useMemo(()=>({isAuthenticated:v,authStatus:s,user:x,login:N,requestRegister:$,verifyRegisterOtp:_,logout:T,checkSession:A,authLoading:k,isAdmin:I,setIsAuthenticated:w,setUser:h,applyBalanceDelta:S,refreshUser:C}),[v,s,x,k,I,N,$,_,T,A,w,S,C]);return(0,a.jsx)(u.Provider,{value:M,children:e})}},26569:(e,t,s)=>{s.d(t,{A:()=>c});var a=s(54568);s(7620);var l=s(72363),r=s(35333);let i="rgba(15, 15, 35, 0.5)",o="rgba(55, 65, 81, 0.5)",n=({children:e})=>(0,a.jsxs)("div",{className:"rounded-2xl overflow-hidden",style:{background:i,border:`1px solid ${o}`},children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 px-4 py-3",style:{borderBottom:`1px solid ${o}`,background:"linear-gradient(90deg, #4A90E210 0%, transparent 100%)"},children:[(0,a.jsx)(l.A.Avatar,{active:!0,size:18,shape:"square",style:{borderRadius:4}}),(0,a.jsx)(r.f9,{width:140,height:12})]}),(0,a.jsx)("div",{className:"p-4",children:e})]}),c=()=>(0,a.jsx)("div",{className:"min-h-screen bg-gradient-to-br from-[#0f0f23] via-[#1a1a2e] to-[#16213e]",children:(0,a.jsx)("div",{className:"pt-24 pb-16",children:(0,a.jsxs)("div",{className:"max-w-[1600px] mx-auto px-3 sm:px-4 lg:px-8 space-y-4",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(r.f9,{width:120,height:12}),(0,a.jsx)(r.f9,{width:180,height:12})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-4 gap-6",children:[(0,a.jsxs)("div",{className:"lg:col-span-2 lg:order-2 space-y-4",children:[(0,a.jsx)("div",{className:"rounded-2xl p-5",style:{background:i,border:`1px solid ${o}`},children:(0,a.jsxs)("div",{className:"flex items-start gap-4",children:[(0,a.jsx)(l.A.Avatar,{active:!0,size:56,shape:"square",style:{borderRadius:16}}),(0,a.jsxs)("div",{className:"flex-1 min-w-0 flex flex-col gap-2",children:[(0,a.jsx)(r.f9,{width:"55%",height:20}),(0,a.jsx)(r.f9,{width:220,height:26}),(0,a.jsxs)("div",{className:"flex gap-1.5",children:[(0,a.jsx)(r.f9,{width:56,height:18}),(0,a.jsx)(r.f9,{width:68,height:18}),(0,a.jsx)(r.f9,{width:48,height:18})]})]})]})}),(0,a.jsx)(n,{children:(0,a.jsx)("div",{className:"space-y-3",children:[0,1,2].map(e=>(0,a.jsx)(l.A.Button,{active:!0,block:!0,style:{height:12}},e))})}),(0,a.jsx)(n,{children:(0,a.jsx)(l.A.Button,{active:!0,block:!0,style:{height:180,borderRadius:12}})}),(0,a.jsx)(n,{children:(0,a.jsx)("div",{className:"space-y-3",children:[0,1].map(e=>(0,a.jsxs)("div",{className:"rounded-xl p-3 flex items-start gap-2",style:{background:"rgba(15, 15, 35, 0.7)",border:`1px solid ${o}`},children:[(0,a.jsx)(l.A.Avatar,{active:!0,size:32}),(0,a.jsxs)("div",{className:"flex-1 flex flex-col gap-1.5",children:[(0,a.jsx)(r.f9,{width:"30%",height:11}),(0,a.jsx)(r.f9,{width:"80%",height:12})]})]},e))})})]}),(0,a.jsxs)("div",{className:"lg:col-span-1 lg:order-3 space-y-4",children:[(0,a.jsx)(n,{children:(0,a.jsx)("div",{className:"space-y-2.5",children:[0,1,2].map(e=>(0,a.jsx)(l.A.Button,{active:!0,block:!0,style:{height:34,borderRadius:8}},e))})}),(0,a.jsxs)("div",{className:"rounded-2xl p-4 space-y-2.5",style:{background:i,border:`1px solid ${o}`},children:[(0,a.jsx)(l.A.Button,{active:!0,block:!0,style:{height:40,borderRadius:12}}),(0,a.jsx)(l.A.Button,{active:!0,block:!0,style:{height:38,borderRadius:8}})]})]}),(0,a.jsx)("div",{className:"lg:col-span-1 lg:order-1",children:(0,a.jsx)(n,{children:(0,a.jsx)("div",{className:"space-y-3",children:[0,1,2,3,4,5].map(e=>(0,a.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,a.jsx)(r.f9,{width:"40%",height:11}),(0,a.jsx)(r.f9,{width:56,height:12})]},e))})})})]})]})})})},26589:(e,t,s)=>{s.d(t,{W6:()=>l,rf:()=>i,yy:()=>r});var a=s(33383);let l="https://vilao.ai",r="Vilao AI";function i(e,t){return`${l}${(0,a.HF)(e,t)}`}},33383:(e,t,s)=>{s.d(t,{HF:()=>c,Xn:()=>a,Yv:()=>r,ZA:()=>d,Zd:()=>o,eQ:()=>i,gs:()=>m,hY:()=>n});let a="en",l=["vi","zh"],r=["vi","en","zh"],i=e=>l.includes(e),o=e=>r.includes(e);function n(e){let t=e.split("/")[1]??"";if(i(t)){let s=e.slice(t.length+1)||"/";return{locale:t,basename:`/${t}`,rest:s}}return{locale:a,basename:"",rest:e||"/"}}function c(e,t){let s=t.startsWith("/")?t:`/${t}`;return e===a?s:"/"===s?`/${e}
1`:`/${e}${s}`}function d(e){let{locale:t}=n(window.location.pathname);return c(t,e)}function m(e){"u">typeof document&&(document.cookie=`vilao.lang=${e}; path=/; max-age=31536000; samesite=lax`)}},35333:(e,t,s)=>{s.d(t,{AA:()=>m,F$:()=>n,PD:()=>d,f9:()=>o,rf:()=>u,vJ:()=>c});var a=s(54568);s(7620);var l=s(72363);let r="rgba(15, 15, 35, 0.5)",i="rgba(55, 65, 81, 0.5)",o=({width:e="100%",height:t=14})=>(0,a.jsx)("div",{style:{width:e},children:(0,a.jsx)(l.A.Button,{active:!0,block:!0,style:{height:t,minWidth:0}})}),n=()=>(0,a.jsxs)("div",{className:"rounded-2xl p-4 flex flex-col gap-3",style:{background:r,border:`1px solid ${i}`},children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)(o,{width:"45%",height:11}),(0,a.jsx)(l.A.Avatar,{active:!0,size:32,shape:"square",style:{borderRadius:8}})]}),(0,a.jsx)(o,{width:"60%",height:24}),(0,a.jsx)(o,{width:"35%",height:10})]}),c=({count:e=4})=>(0,a.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-3 sm:gap-4",children:Array.from({length:e}).map((e,t)=>(0,a.jsx)(n,{},t))}),d=({rows:e=8,cols:t=5})=>(0,a.jsxs)("div",{className:"rounded-2xl overflow-hidden",style:{background:r,border:`1px solid ${i}`},children:[(0,a.jsx)("div",{className:"grid gap-3 px-4 py-3",style:{gridTemplateColumns:`repeat(${t}, 1fr)`,background:"rgba(15, 15, 35, 0.7)",borderBottom:`1px solid ${i}`},children:Array.from({length:t}).map((e,t)=>(0,a.jsx)(o,{width:"70%",height:12},t))}),Array.from({length:e}).map((e,s)=>(0,a.jsx)("div",{className:"grid gap-3 px-4 py-3.5",style:{gridTemplateColumns:`repeat(${t}, 1fr)`,borderBottom:`1px solid ${i}`},children:Array.from({length:t}).map((e,t)=>(0,a.jsx)(o,{width:0===t?"85%":"60%",height:12},t))},s))]}),m=({rows:e=4})=>(0,a.jsxs)("div",{className:"rounded-2xl p-4",style:{background:r,border:`1px solid ${i}`},children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-3",children:[(0,a.jsx)(l.A.Avatar,{active:!0,size:36,shape:"square",style:{borderRadius:10}}),(0,a.jsxs)("div",{className:"flex-1 flex flex-col gap-1.5",children:[(0,a.jsx)(o,{width:"50%",height:14}),(0,a.jsx)(o,{width:"30%",height:10})]})]}),(0,a.jsx)(l.A,{active:!0,title:!1,paragraph:{rows:e,width:Array.from({length:e},(t,s)=>s===e-1?"60%":"100%")}})]}),u=()=>(0,a.jsxs)("div",{className:"flex items-center justify-between gap-3 mb-4",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(l.A.Avatar,{active:!0,size:32,shape:"square",style:{borderRadius:8}}),(0,a.jsx)("div",{style:{width:220},children:(0,a.jsx)(l.A.Button,{active:!0,block:!0,style:{height:24}})})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("div",{style:{width:96},children:(0,a.jsx)(l.A.Button,{active:!0,block:!0,style:{height:32}})}),(0,a.jsx)("div",{style:{width:120},children:(0,a.jsx)(l.A.Button,{active:!0,block:!0,style:{height:32}})})]})]})},35730:(e,t,s)=>{s.d(t,{pp:()=>r});var a=s(51894);let l="/api/v1/admin/email-campaigns",r={list:async(e=1,t=20,s)=>(await a.Ay.get(l,{params:{page:e,limit:t,status:s}})).data,get:async e=>(await a.Ay.get(`${l}/${e}`)).data.data,create:async e=>(await a.Ay.post(l,e)).data.data,update:async(e,t)=>(await a.Ay.patch(`${l}/${e}`,t)).data.data,async remove(e){await a.Ay.delete(`${l}/${e}`)},audienceCount:async(e,t)=>(await a.Ay.post(`${l}/audience-count`,{audience:e,kind:t})).data.data,preview:async(e,t,s)=>(await a.Ay.post(`${l}/preview`,{kind:e,lang:t,content:s})).data.data,aiTranslate:async e=>(await a.Ay.post(`${l}/ai-translate`,{content:e})).data.data,testSend:async(e,t)=>(await a.Ay.post(`${l}/${e}/test-send`,{lang:t})).data.data.to,launch:async e=>(await a.Ay.post(`${l}/${e}/launch`)).data.data,schedule:async(e,t)=>(await a.Ay.post(`${l}/${e}/schedule`,{scheduled_at:t})).data.data,unschedule:async e=>(await a.Ay.post(`${l}/${e}/unschedule`)).data.data,pause:async e=>(await a.Ay.post(`${l}/${e}/pause`)).data.data,resume:async e=>(await a.Ay.post(`${l}/${e}/resume`)).data.data,cancel:async e=>(await a.Ay.post(`${l}/${e}/cancel`)).data.data,deliveries:async(e,t,s=1,r=20)=>(await a.Ay.get(`${l}/${e}/deliveries`,{params:{status:t,page:s,limit:r}})).data,retryDeliveries:async(e,t)=>(await a.Ay.post(`${l}/${e}/deliveries/retry`,{user_ids:t})).data.data.requeued,clearUserEmailState:async e=>(await a.Ay.post("/api/v1/admin/users/email-state/clear",{user_ids:e})).data.data.cleared,queueStatus:async()=>(await a.Ay.get(`${l}/queue-status`)).data.data,async clearSenderPause(){await a.Ay.post(`${l}/queue-status/clear-pause`)},async setLanguage(e){await a.Ay.patch("/api/v1/user/email-preferences",{language:e})},async setMarketingOptOut(e){await a.Ay.patch("/api/v1/user/email-preferences",{marketing_opt_out:e})}}},38147:(e,t,s)=>{s.d(t,{F9:()=>a.F9,Ip:()=>a.Ip,Jz:()=>a.Jz,LH:()=>a.LH,ML:()=>a.ML,V3:()=>a.V3,YJ:()=>a.YJ,Z6:()=>a.Z6,ZV:()=>a.ZV,ct:()=>a.ct,qH:()=>a.qH,vv:()=>a.vv,wk:()=>a.wk});var a=s(52774)},56269:(e,t,s)=>{s.d(t,{Ay:()=>a.Ay,IB:()=>a.IB,y3:()=>a.y3});var a=s(51894)},56890:(e,t,s)=>{s.d(t,{Ay:()=>a.Ay,ZZ:()=>a.ZZ});var a=s(28409)},59009:(e,t,s)=>{s.d(t,{H$:()=>a.H$,V1:()=>a.V1,V5:()=>a.V5,ih:()=>a.ih,kY:()=>a.kY,ky:()=>a.ky,xv:()=>a.xv});var a=s(82240)},63909:(e,t,s)=>{s.d(t,{JZ:()=>a.JZ,d5:()=>a.d5});var a=s(8176)},63996:(e,t,s)=>{s.d(t,{A:()=>m});var a=s(7620),l=s(64567),r=s(33383),i=s(26589);function o(e,t,s){let a=document.querySelector(e);a&&a.getAttribute(t)!==s&&a.setAttribute(t,s)}let n=(e,t)=>(0,i.rf)(e,t).replace(/\/$/,""),c={"/":{seoKey:null,ogImage:`${i.W6}/assets/og/og-home.png`},"/models":{seoKey:"models",ogImage:`${i.W6}/assets/og/og-models.png`},"/providers":{seoKey:"providers",ogImage:`${i.W6}/assets/og/og-providers.png`},"/ranking":{seoKey:"ranking"},"/docs":{seoKey:"docs",ogImage:`${i.W6}/assets/og/og-docs.png`},"/policy":{seoKey:"policy",ogImage:`${i.W6}/assets/og/og-policy.png`},"/terms":{seoKey:"terms",ogImage:`${i.W6}/assets/og/og-terms.png`},"/subscription":{seoKey:"subscription",ogImage:`${i.W6}/assets/og/og-subscription.png`},"/enterprise":{seoKey:"enterprise",ogImage:`${i.W6}/assets/og/og-enterprise.png`},"/check-model":{seoKey:"checkModel"}};var d=s(86408);function m(e){let t,{t:s}=(0,l.Bd)("common");
1if("route"in e){let a=c[e.route];t={...(0,d.aI)((e,t)=>s(`seo.${e}`,t),a.seoKey),path:e.route,noindex:a.noindex}}else t=e;let{title:i,description:m,path:u,noindex:p}=t;return(0,a.useEffect)(()=>{!function(e){if(Array.from(document.getElementsByTagName("title")).some(e=>e instanceof HTMLTitleElement)&&document.title!==e.title&&(document.title=e.title),o('meta[name="description"]',"content",e.description),o('meta[property="og:title"]',"content",e.title),o('meta[property="og:description"]',"content",e.description),o('meta[property="og:image:alt"]',"content",e.title),o('meta[name="twitter:title"]',"content",e.title),o('meta[name="twitter:description"]',"content",e.description),o('meta[name="robots"]',"content",e.noindex?"noindex, nofollow":"index, follow"),void 0===e.path)return;let t=n((0,r.hY)(window.location.pathname).locale,e.path);for(let s of(o('link[rel="canonical"]',"href",t),o('meta[property="og:url"]',"content",t),r.Yv))o(`link[rel="alternate"][hreflang="${s}"]`,"href",n(s,e.path));o('link[rel="alternate"][hreflang="x-default"]',"href",n(r.Xn,e.path))}({title:i,description:m,path:u,noindex:p})},[i,m,u,p]),null}},81429:(e,t,s)=>{s.d(t,{Z:()=>r});var a=s(51894);class l{async login(e){let t=(await a.Ay.post("/api/v1/login",e,{withCredentials:!0})).data;return this.setAccessToken(t.access_token),t}withReferralCode(e){let t=localStorage.getItem("referral_code"),s=localStorage.getItem("referral_code_expiry"),a={...e};return t&&s&&(new Date(s)>new Date?a.ref_code=t:(localStorage.removeItem("referral_code"),localStorage.removeItem("referral_code_expiry"))),a}clearReferralCode(){localStorage.removeItem("referral_code"),localStorage.removeItem("referral_code_expiry")}async registerRequest(e){let t=(await a.Ay.post("/api/v1/register",this.withReferralCode(e),{withCredentials:!0})).data;return t.access_token&&(this.setAccessToken(t.access_token),this.clearReferralCode()),t}async registerVerify(e,t){let s=(await a.Ay.post("/api/v1/register/verify",{email:e,code:t},{withCredentials:!0})).data;return this.setAccessToken(s.access_token),this.clearReferralCode(),s}async registerResend(e){await a.Ay.post("/api/v1/register/resend",{email:e})}async forgotPassword(e){await a.Ay.post("/api/v1/password/forgot",{email:e})}async resetPassword(e,t,s){await a.Ay.post("/api/v1/password/reset",{email:e,code:t,new_password:s})}async refreshAccessToken(){return this.refreshTokenPromise||(this.refreshTokenPromise=(async()=>{try{let e=(await a.Ay.post("/api/v1/refresh",{},{withCredentials:!0})).data;return this.setAccessToken(e.access_token),e.access_token}catch(e){throw this.removeAccessToken(),e}finally{this.refreshTokenPromise=null}})()),this.refreshTokenPromise}async logout(){try{await a.Ay.post("/api/v1/logout",{},{withCredentials:!0})}catch(e){console.error("Logout error:",e)}finally{this.removeAccessToken()}}async getCurrentUser(){return(await a.Ay.get("/api/v1/user/me")).data}async getProfile(){try{return await this.getCurrentUser()}catch(e){try{let e=await a.Ay.get("/api/v1/user/dashboard");if(e.data.user_info)return e.data.user_info;return e.data}catch{throw e}}}async validateToken(){try{return await this.getCurrentUser()}catch(e){if(e.response?.status===401)try{return await this.refreshAccessToken(),await this.getCurrentUser()}catch(e){}throw this.removeAccessToken(),Error("Token validation failed: "+(e.message||"Unknown error"))}}setAccessToken(e){localStorage.setItem("access_token",e),a.Ay.defaults.headers.common.Authorization=`Bearer ${e}`}getAccessToken(){return localStorage.getItem("access_token")}removeAccessToken(){localStorage.removeItem("access_token"),delete a.Ay.defaults.headers.common.Authorization}initializeAuth(){let e=this.getAccessToken();e&&(a.Ay.defaults.headers.common.Authorization=`Bearer ${e}`)}setAuthToken(e){this.setAccessToken(e)}getAuthToken(){return this.getAccessToken()}removeAuthToken(){this.removeAccessToken()}async getTurnstileConfig(){return(await a.Ay.get("/api/v1/auth/turnstile-config")).data}async changePassword(e,t){return(await a.Ay.put("/api/v1/user/account/change-password",{old_password:e,new_password:t})).data}constructor(){this.refreshTokenPromise=null}}let r=new l},84904:(e,t,s)=>{s.d(t,{A:()=>r});var a=s(54568);s(7620);let l=({item:e})=>(0,a.jsxs)("div",{className:"group relative overflow-hidden rounded-2xl p-4 transition-all duration-300",style:{background:"rgba(15, 15, 35, 0.7)",border:"1px solid rgba(55, 65, 81, 0.5)"},children:[(0,a.jsx)("div",{className:"absolute top-0 left-0 right-0 h-0.5 opacity-70 transition-opacity duration-300 group-hover:opacity-100",style:{background:`linear-gradient(90deg, ${e.color}, transparent 90%)`}}),(0,a.jsx)("div",{className:"pointer-events-none absolute -right-8 -top-8 h-24 w-24 rounded-full opacity-0 blur-2xl transition-opacity duration-300 group-hover:opacity-20",style:{background:e.color}}),(0,a.jsxs)("div",{className:"relative flex flex-col gap-1.5",children:[(0,a.jsx)("span",{className:"text-base leading-none",style:{color:e.color},children:e.icon}),(0,a.jsx)("span",{className:"font-mono text-lg font-bold leading-tight",style:{color:e.color},children:e.value}),(0,a.jsx)("span",{className:"font-mono text-[10px] font-semibold uppercase tracking-wider",style:{color:"#9ca3af"},children:e.label})]})]}),r=({items:e})=>0===e.length?null:(0,a.jsx)("div",{className:"grid grid-cols-2 gap-3 sm:grid-cols-3 lg:grid-cols-4",children:e.map(e=>(0,a.jsx)(l,{item:e},e.key))})},86408:(e,t,s)=>{s.d(t,{yK:()=>f,Ll:()=>u,BM:()=>x,wv:()=>h,hw:()=>p,aI:()=>m});let a={"getting-started":"gettingStarted",withdraw:"withdraw",introduction:"llmIntroduction",quickstart:"llmQuickstart","api-keys":"llmApiKeys","api-reference":"llmApiReference",models:"llmModels","api-explorer":"apiExplorer","cli-ide-integration":"llmCliIdeIntegration","claude-code":"llmClaudeCode","claude-cowork":"llmClaudeCowork",codex:"llmCodex",cursor:"llmCursor",aizen:"llmAizen",cline:"llmCline",continue:"llmContinue",windsurf:"llmWindsurf",zed:"llmZed","kilo-code":"llmKiloCode",aider:"llmAider",openclaw:"llmOpenClaw",opencode:"llmOpenCode",hermes:"llmHermes","mcp-servers":"llmMcpServers","provider-guide":"llmProviderGuide","llm-api":"llmApiLegacy","llm-provider":"llmProviderLegacy"};var l=s(26589);let r=new Intl.NumberFormat("vi-VN",{style:"currency",currency:"VND",maximumFractionDigits:0}),i=new Intl.NumberFormat("vi-VN");function o(e){return null!=e&&e>0?r.format(e):null}function n(e){return null!=e&&e>0?i.format(Math.round(e)):null}function c(e){return e.filter(e=>!!e&&""!==e.trim()).join(" ")}function d(e,t,s){let a=null==t||!(t>0)||t>5?null:t.toFixed(1),l=n(s);return a&&l?e("tpl.rating",{rating:a,count:l}):null}function m(e,t){return t?{title:`${e(`route.${t}.title`)} — ${l.yy}`,description:e(`route.${t}.description`)}:{title:e("defaultTitle"),description:e("defaultDescription")}}function u(e,t,s){let a=t.display_name||t.model_id||s.modelId,r=t.provider_name||s.prefix,i=o(t.price_per_input_token),m=o(t.price_per_output_token),u=o(t.price_per_request),p=null;
1i&&m?p=e("tpl.priceInputOutput",{input:i,output:m}):i?p=e("tpl.priceInput",{input:i}):u&&(p=e("tpl.priceRequest",{price:u}));let x=t.success_rate,h=n(t.total_requests),g=null;void 0!==x&&x>0&&h?g=e("tpl.successRate",{rate:x.toFixed(1),count:h}):h&&(g=e("tpl.servedRequests",{count:h}));let f=c([e("tpl.modelIntro",{name:a,provider:r}),p,g,d(e,t.avg_rating,t.rating_count)]);return{name:a,providerName:r,title:`${a} — ${r} — ${l.yy}`,description:f||e("tpl.modelRichFallback",{name:a,provider:r})}}function p(e,t,s){let a=t.name||s,r=t.stats??{},i=n(r.model_count),o=n(r.total_requests),m=c([e("tpl.sellerIntro",{name:a}),i?e("tpl.providesModels",{count:i}):null,o?e("tpl.servedRequests",{count:o}):null,d(e,r.avg_rating,r.rating_count)]);return{name:a,title:`${a} — Provider — ${l.yy}`,description:t.short_desc||m||e("tpl.sellerIntro",{name:a})}}function x(e,t,s){let a=t.name||s,r=o(t.min_price),i=n(Array.isArray(t.model_ids)?t.model_ids.length:void 0),d=n(Array.isArray(t.packages)?t.packages.length:void 0),m=n(t.total_subscribers),u=c([e("tpl.planIntro",{name:a}),r?e("tpl.priceFrom",{price:r}):null,i?e("tpl.includesModels",{count:i}):null,d?e("tpl.packagesCount",{count:d}):null,m?e("tpl.subscribersCount",{count:m}):null]);return{name:a,title:`${a} — ${e("route.plans.title")} — ${l.yy}`,description:t.tagline||t.description||u||e("tpl.planIntro",{name:a})}}function h(e){return{title:`${e("route.plans.title")} — ${l.yy}`,description:e("tpl.planFallbackDesc")}}let g=new Set(["claude-code","codex","openclaw"]);function f(e,t){let s=e(`config.pages.${a[t]}.title`);if(g.has(t)){let s=`detail.seo.slugOverrides.${t}`;return{title:e(`${s}.title`),description:e(`${s}.description`),keywords:e(`${s}.keywords`)}}return{title:e("detail.seo.defaultTitle",{pageTitle:s}),description:e(`config.pages.${a[t]}.description`),keywords:e("detail.seo.defaultKeywords",{pageTitle:s.toLowerCase()})}}},87131:(e,t,s)=>{s.d(t,{u:()=>o});var a=s(68728),l=s(7620),r=s(81429),i=s(5524);function o(){let e=(0,a.jE)(),t=(0,l.useCallback)(t=>e.fetchQuery({queryKey:i.l.me,queryFn:()=>r.Z.getCurrentUser(),staleTime:6e4*!t?.force}),[e]),s=(0,l.useCallback)(t=>{t?e.setQueryData(i.l.me,t):e.removeQueries({queryKey:i.l.me})},[e]),o=(0,l.useCallback)(()=>e.getQueryData(i.l.me)??null,[e]);return{fetchMe:t,setMe:s,getMe:o,clearUserScoped:(0,l.useCallback)(()=>{for(let t of i.i)e.removeQueries({queryKey:t})},[e]),clearViewerScoped:(0,l.useCallback)(()=>{e.removeQueries({queryKey:i.l.marketplace.all}),e.removeQueries({queryKey:i.l.announcements})},[e])}}},87218:(e,t,s)=>{s.r(t),s.d(t,{default:()=>tC});var a=s(54568),l=s(7620),r=s(79718),i=s(68728),o=s(48820),n=s(64567),c=s(25324),d=s(27501),m=s(24837),u=s(92137),p=s(9744),x=s(89704),h=s(70692),g=s(53581),f=s(95513),y=s(33884),j=s(85756),v=s(16387),b=s(96604),k=s(32219),w=s(11e3),A=s(54533),N=s(24426),$=s(62151),_=s(81897),T=s(65911),S=s(24658),C=s(51292),I=s(58349),L=s(98646),R=s(2650),M=s(84699),E=s(81128),D=s(16814),P=s(92458),z=s(39519),B=s(32891),F=s(6762),U=s(48597),q=s(62262),Z=s(5854),K=s(47226),O=s(57825),V=s(68175),H=s(12904),W=s(28461),J=s.n(W),Y=s(94744);let G="#10b981",Q="#6b7280",X=[{value:"24h",labelKey:"status.last24h"},{value:"7d",labelKey:"status.last7d"}],ee=({range:e,onRangeChange:t})=>{let{t:s}=(0,n.Bd)("marketplace");return(0,a.jsx)("div",{className:"flex items-center gap-1",children:X.map(l=>{let r=l.value===e;return(0,a.jsx)("button",{type:"button",onClick:()=>t(l.value),className:"px-2.5 py-0.5 rounded-full text-[10px] font-mono uppercase tracking-wider transition-colors cursor-pointer",style:{background:r?`${G}1f`:"transparent",color:r?G:Q,border:`1px solid ${r?`${G}55`:"rgba(55, 65, 81, 0.5)"}`},children:s(l.labelKey)},l.value)})})},et=({data:e,showFooter:t=!0})=>{let{t:s}=(0,n.Bd)("marketplace"),l=e=>s(`status.${e}`,Y.Z[e]),r=null===e||!!e&&(0===e.buckets.length||e.buckets.every(e=>"unknown"===e.status));return void 0===e?(0,a.jsx)("div",{className:"h-2.5 w-full rounded animate-pulse",style:{background:"rgba(15,15,35,0.6)"}}):r?(0,a.jsx)("div",{className:"text-[10px] font-mono uppercase tracking-wider text-center py-2 rounded-lg",style:{color:Q,background:"rgba(15,15,35,0.4)"},children:s("status.notEnoughData")}):(0,a.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,a.jsx)("div",{className:"flex items-end gap-[1px] h-2.5",children:e.buckets.map((e,t)=>{let s=J()(e.period_start).format("MMM D, HH:mm"),r=0===e.total?`${s}
2${l("unknown")}`:`${s}
3${l(e.status)}
4Req: ${e.total} (${e.success} ok / ${e.failed} fail)
5Latency: ${Math.round(e.avg_latency_ms)}ms`;return(0,a.jsx)(x.A,{title:(0,a.jsx)("pre",{className:"text-[10px] m-0 whitespace-pre-wrap",children:r}),children:(0,a.jsx)("div",{className:"flex-1 min-w-[1px] rounded-sm transition-opacity hover:opacity-70",style:{backgroundColor:Y.E[e.status],height:"100%"}})},t)})}),t&&(0,a.jsxs)("div",{className:"flex items-center justify-between text-[10px] leading-tight font-mono",style:{color:Q},children:[(0,a.jsx)("span",{style:{color:Y.E[e.worst_status]},children:l(e.worst_status)}),(0,a.jsxs)("span",{children:[e.uptime_percent.toFixed(1),"% ",s("status.uptime")]})]})]})},es=({data:e,range:t,onRangeChange:s,hideToggle:l=!1})=>(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[!l&&(0,a.jsx)("div",{className:"flex items-center justify-end",children:(0,a.jsx)(ee,{range:t,onRangeChange:s})}),(0,a.jsx)(et,{data:e})]});var ea=s(48893),el=s(42264),er=s(54097),ei=s(2622),eo=s(94633),en=s(47716),ec=s(87342),ed=s(15618),em=s(96994),eu=s(35333);let ep="#9ca3af",ex="#6b7280",eh=[{minSec:0,maxSec:8,color:"#22c55e",labelKey:"insights.ttftTierFast"},{minSec:8,maxSec:15,color:"#4A90E2",labelKey:"insights.ttftTierOk"},{minSec:15,maxSec:30,color:"#eab308",labelKey:"insights.ttftTierSlow"},{minSec:30,maxSec:1/0,color:"#ef4444",labelKey:"insights.ttftTierVerySlow"}],eg=["operational","minor","major","outage"],ef={backgroundColor:"#111827",border:"1px solid #374151",borderRadius:8,fontSize:11,padding:"8px 10px"},ey=({title:e,children:t})=>(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-[10px] font-mono uppercase tracking-wider mb-1.5",style:{color:ep},children:e}),t]}),ej=({color:e,label:t})=>(0,a.jsxs)("span",{className:"inline-flex items-center gap-1 text-[10px] font-mono",style:{color:ex},children:[(0,a.jsx)("span",{className:"inline-block w-2 h-2 rounded-sm",style:{background:e}}),t]}),ev=({children:e})=>(0,a.jsx)("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-1 mt-1.5",children:e}),eb=({buckets:e})=>{let{t}=(0,n.Bd)("marketplace"),s=(0,l.useMemo)(()=>e?e.map(e=>({label:J()(e.period_start).format("MMM D HH:mm"),total:e.total,success:e.success,failed:e.failed,status:e.status,ttft:null!=e.avg_ttft_ms&&e.avg_ttft_ms>0?Math.round(e.avg_ttft_ms):null})):[],[e]),r=(0,l.useMemo)(()=>
5eg.filter(e=>s.some(t=>t.total>0&&t.status===e)),[s]),i=s.some(e=>e.total>0);return void 0===e?(0,a.jsx)("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4","aria-hidden":"true",children:[0,1].map(e=>(0,a.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,a.jsx)(eu.f9,{width:120,height:10}),(0,a.jsx)(eu.f9,{width:"100%",height:200}),(0,a.jsx)(eu.f9,{width:"60%",height:10})]},e))}):i?(0,a.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4",children:[(0,a.jsxs)(ey,{title:t("insights.requestVolume"),children:[(0,a.jsx)(ea.u,{width:"100%",height:200,children:(0,a.jsxs)(el.E,{data:s,children:[(0,a.jsx)(er.d,{strokeDasharray:"3 3",stroke:"rgba(75, 85, 99, 0.3)"}),(0,a.jsx)(ei.W,{dataKey:"label",stroke:ex,tick:{fontSize:10},minTickGap:24}),(0,a.jsx)(eo.h,{stroke:ex,tick:{fontSize:10},width:42,allowDecimals:!1}),(0,a.jsx)(en.m,{contentStyle:ef,formatter:(e,s,a)=>{let l=a?.payload;return l?[t("insights.requestsTooltip",{total:l.total,success:l.success,failed:l.failed}),s]:[String(e),s]}}),(0,a.jsx)(ec.yP,{dataKey:"total",name:t("insights.requests"),radius:[2,2,0,0],children:s.map((e,t)=>(0,a.jsx)(ed.f,{fill:Y.E[e.status]},t))})]})}),(0,a.jsx)(ev,{children:r.map(e=>(0,a.jsx)(ej,{color:Y.E[e],label:t(`status.${e}`)},e))})]}),(0,a.jsxs)(ey,{title:t("insights.ttft"),children:[(0,a.jsx)(ea.u,{width:"100%",height:200,children:(0,a.jsxs)(el.E,{data:s,children:[(0,a.jsx)(er.d,{strokeDasharray:"3 3",stroke:"rgba(75, 85, 99, 0.3)"}),(0,a.jsx)(ei.W,{dataKey:"label",stroke:ex,tick:{fontSize:10},minTickGap:24}),(0,a.jsx)(eo.h,{stroke:ex,tick:{fontSize:10},width:50,unit:"ms"}),(0,a.jsx)(en.m,{contentStyle:ef,formatter:(e,t)=>[`${e}ms`,t]}),(0,a.jsx)(ec.yP,{dataKey:"ttft",name:t("insights.ttftAvg"),radius:[2,2,0,0],children:s.map((e,t)=>{let s;return(0,a.jsx)(ed.f,{fill:null==e.ttft?"transparent":(s=e.ttft,(eh.find(e=>s/1e3<e.maxSec)??eh[eh.length-1]).color)},t)})})]})}),(0,a.jsx)(ev,{children:eh.map(e=>(0,a.jsx)(ej,{color:e.color,label:t(e.labelKey,{min:e.minSec,max:e.maxSec})},e.labelKey))})]})]}):(0,a.jsx)(em.A,{description:(0,a.jsx)("span",{style:{color:ep},children:t("status.notEnoughData")}),className:"py-8"})};var ek=s(6417),ew=s(10814),eA=s(20889),eN=s(86297),e$=s(42799),e_=s(29039),eT=s(25651),eS=s(84938);let eC="rgba(15, 15, 35, 0.5)",eI="rgba(55, 65, 81, 0.5)",eL="#9ca3af",eR="#6b7280",eM="#ef4444",eE=()=>(0,a.jsx)("div",{className:"space-y-2.5","aria-hidden":"true",children:[0,1,2,3].map(e=>(0,a.jsxs)("div",{className:"rounded-xl px-3 py-2.5",style:{background:eC,border:`1px solid ${eI}`},children:[(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,a.jsx)(eu.f9,{width:"40%",height:14}),(0,a.jsx)(eu.f9,{width:96,height:10})]}),(0,a.jsx)("div",{className:"mt-2",children:(0,a.jsx)(eu.f9,{width:"55%",height:11})})]},e))}),eD=({open:e,onClose:t,providerId:s,modelId:r})=>{let{t:i}=(0,n.Bd)("marketplace"),o=(0,eS.al)(),[d,m]=(0,l.useState)([]),[u,p]=(0,l.useState)(0),[x,h]=(0,l.useState)(1),[g,y]=(0,l.useState)(!1),[j,v]=(0,l.useState)(null),b=`${s}:${r}`,k=(0,l.useCallback)(async e=>{y(!0);try{let t=await e_.wR.listModelTests(s,r,e,10);m(t.data||[]),p(t.total||0)}catch{m([]),p(0)}finally{y(!1),v(`${s}:${r}`)}},[s,r]);return(0,l.useEffect)(()=>{e&&(h(1),k(1))},[e,k]),(0,a.jsx)(eN.A,{title:i("modelTest.historyTitle"),open:e,onClose:t,width:o?"100%":520,destroyOnHidden:!0,children:j!==b||g&&0===d.length?(0,a.jsx)(eE,{}):0===d.length?(0,a.jsx)("div",{className:"text-center py-10 text-xs",style:{color:eR},children:i("modelTest.historyEmpty")}):(0,a.jsxs)("div",{className:"space-y-2.5 transition-opacity duration-150",style:g?{opacity:.6}:void 0,"aria-busy":g||void 0,children:[d.map(e=>{let t="done"===e.status,s=t?(0,eT.KM)(e.score):eR;return(0,a.jsxs)("div",{className:"rounded-xl px-3 py-2.5",style:{background:eC,border:`1px solid ${eI}`},children:[(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 min-w-0",children:[(0,a.jsx)(K.A,{style:{color:s,fontSize:13}}),t?(0,a.jsxs)("span",{className:"font-mono font-bold text-sm",style:{color:s},children:[e.score,"%"]}):(0,a.jsx)(c.A,{style:{margin:0},color:"error",children:i("modelTest.statusFailed")}),t&&e.score_label&&(0,a.jsx)("span",{className:"text-[11px] truncate",style:{color:eL},children:e.score_label})]}),(0,a.jsx)("span",{className:"text-[10px] font-mono flex-shrink-0",style:{color:eR},children:J()(e.created_at).format("YYYY-MM-DD HH:mm")}
5)]}),t&&(0,a.jsxs)("div",{className:"mt-1.5 flex items-center gap-3 text-[11px] font-mono",style:{color:eL},children:[(0,a.jsxs)("span",{className:"inline-flex items-center gap-1",children:[(0,a.jsx)(I.A,{style:{color:"#10b981",fontSize:11}}),e.passed]}),(0,a.jsxs)("span",{className:"inline-flex items-center gap-1",children:[(0,a.jsx)(e$.A,{style:{color:eM,fontSize:11}}),e.failed]}),(0,a.jsx)("span",{children:i("modelTest.passedOfTotal",{passed:e.passed,total:e.total_checks})})]}),!t&&e.error_message&&(0,a.jsx)("div",{className:"mt-1 text-[11px]",style:{color:eM},children:e.error_message})]},e.id)}),u>10&&(0,a.jsx)("div",{className:"flex justify-center pt-2",children:(0,a.jsx)(f.A,{size:"small",current:x,pageSize:10,total:u,showSizeChanger:!1,onChange:e=>{h(e),k(e)}})})]})})};var eP=s(13951),ez=s(79171),eB=s(39570),eF=s(59009),eU=s(99204);let eq="rgba(55, 65, 81, 0.5)",eZ="#9ca3af",eK="#6b7280",eO=({label:e,value:t,secret:s})=>{let{t:r}=(0,n.Bd)("marketplace"),[i,o]=(0,l.useState)(!1),c=async()=>{await navigator.clipboard.writeText(t),o(!0),setTimeout(()=>o(!1),1500)};return(0,a.jsxs)("div",{className:"rounded-lg px-2.5 py-2",style:{background:"rgba(15, 15, 35, 0.5)",border:`1px solid ${eq}`},children:[(0,a.jsx)("div",{className:"text-[9px] font-mono uppercase tracking-wider mb-1",style:{color:eK},children:e}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"flex-1 min-w-0 truncate text-xs font-mono",style:{color:"#e5e7eb"},title:s?void 0:t,children:t}),(0,a.jsx)(x.A,{title:r(i?"modelTest.manual.copied":"modelTest.manual.copy"),children:(0,a.jsx)(m.Ay,{size:"small",type:"text",className:"cursor-pointer shrink-0",icon:i?(0,a.jsx)(I.A,{style:{color:"#10b981"}}):(0,a.jsx)(E.A,{style:{color:eZ}}),onClick:c})})]})]})},eV=({open:e,onClose:t,providerId:s,modelId:r,onSubmitted:i})=>{let{t:o}=(0,n.Bd)("marketplace"),{message:c}=d.A.useApp(),u=(0,eS.al)(),{isSmallLaptop:p}=(0,eS.Gu)(),x=eF.ih.has(r),[f,j]=(0,l.useState)(void 0),[v,b]=(0,l.useState)(!1),[k,w]=(0,l.useState)(null),[A,N]=(0,l.useState)(null),[$,_]=(0,l.useState)(null),[T,S]=(0,l.useState)(void 0),[C,I]=(0,l.useState)(eF.V1[0]),[L,R]=(0,l.useState)(""),[M,E]=(0,l.useState)(!1),D=(0,l.useCallback)(()=>{w(null),N(null),_(null),S(void 0),R(""),j(void 0)},[]);(0,l.useEffect)(()=>{if(!e)return;let t=!1;return e_.wR.getManualModelTest().then(e=>{if(t||!e.data)return;let a=e.data.session;a.provider_id===s&&a.model_id===r&&(w(a.id),N(e.data.credentials),j(a.mapped_test_id||void 0))}).catch(()=>void 0),()=>{t=!0}},[e,s,r]);let P=(0,l.useCallback)((e,t)=>{let s=e?.response?.data?.error_code;"MANUAL_SESSION_IN_FLIGHT"===s?c.error(o("modelTest.manual.errorInFlight")):"MANUAL_SESSION_NOT_FOUND"===s?(c.error(o("modelTest.manual.errorSessionGone")),D()):"FEATURE_DISABLED"===s?c.error(o("modelTest.errorDisabled")):c.error(t)},[c,o,D]),z=async()=>{b(!0);try{let e=await e_.wR.startManualModelTest(s,r,f);w(e.data.session.id),N(e.data.credentials)}catch(e){P(e,o("modelTest.manual.errorStart"))}finally{b(!1)}},B=async()=>{if(k&&null!=$){if(!T)return void c.error(o("modelTest.manual.proofRequired"));E(!0);try{await e_.wR.submitManualModelTestResult(k,{score:$,proof_image_url:T,note:L,tested_on:C}),c.success(o("modelTest.manual.submitted")),D(),i(),t()}catch(e){P(e,o("modelTest.manual.errorSubmit"))}finally{E(!1)}}},F=async()=>{if(k)try{await e_.wR.cancelManualModelTest(k),c.success(o("modelTest.manual.cancelled"))}catch(e){P(e,o("modelTest.manual.errorSubmit"))}finally{D()}},U=A?Math.max(0,Math.round((new Date(A.expires_at).getTime()-Date.now())/6e4)):0,q=null==$?eK:(0,eT.KM)($);return(0,a.jsx)(y.A,{className:"space-modal",title:o("modelTest.manual.title"),open:e,onCancel:t,footer:null,width:u?"96vw":p?Math.min(520,.92*window.innerWidth):520,style:u?{top:0,paddingBottom:0,maxWidth:"100vw",margin:0}:{},destroyOnHidden:!0,children:(0,a.jsxs)("div",{className:"space-y-4",children:[(0,a.jsxs)("div",{className:"space-y-2.5",children:[(0,a.jsx)("div",{className:"text-[10px] font-mono uppercase tracking-wider",style:{color:eZ},children:o("modelTest.manual.step1")}),A?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(eO,{label:o("modelTest.manual.baseUrl"),value:A.base_url}),(0,a.jsx)(eO,{label:o("modelTest.manual.apiKey"),value:A.api_key,secret:!0}),(0,a.jsx)(eO,{label:o("modelTest.manual.modelId"),value:A.model_id}),(0,a.jsx)("p",{className:"text-[11px] leading-relaxed m-0",style:{color:eZ},children:o("modelTest.manual.instructions")}),(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,a.jsx)("span",{className:"text-[11px] font-mono",style:{color:eK},children:U>
50?o("modelTest.manual.expiresIn",{minutes:U}):o("modelTest.manual.expired")}),(0,a.jsx)(h.A,{title:o("modelTest.manual.cancelConfirm"),onConfirm:F,okText:o("modelTest.manual.cancelSession"),cancelText:o("modelTest.mappingCancel"),children:(0,a.jsx)(m.Ay,{size:"small",danger:!0,type:"text",className:"cursor-pointer",children:o("modelTest.manual.cancelSession")})})]})]}):(0,a.jsxs)(a.Fragment,{children:[!x&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("p",{className:"text-xs leading-relaxed m-0",style:{color:eZ},children:o("modelTest.manual.mappingHint",{model:r})}),(0,a.jsx)(eP.A,{showSearch:!0,allowClear:!0,value:f,onChange:j,placeholder:o("modelTest.mappingPlaceholder"),style:{width:"100%"},options:[...eF.ih].map(e=>({label:e,value:e}))})]}),(0,a.jsx)(m.Ay,{block:!0,type:"primary",icon:(0,a.jsx)(K.A,{}),loading:v,disabled:!x&&!f,onClick:z,className:"cursor-pointer",children:o("modelTest.manual.start")})]})]}),A&&(0,a.jsxs)("div",{className:"space-y-2.5 pt-1",style:{borderTop:`1px solid ${eq}`},children:[(0,a.jsx)("div",{className:"text-[10px] font-mono uppercase tracking-wider pt-2.5",style:{color:eZ},children:o("modelTest.manual.step2")}),(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"text-[11px] mb-1",style:{color:eZ},children:o("modelTest.manual.similarityLabel")}),(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)(ez.A,{min:0,max:100,value:$,onChange:e=>_(e??null),style:{width:110},addonAfter:"%"}),(0,a.jsx)("span",{className:"inline-flex items-center rounded-full px-2.5 py-0.5 text-[10px] font-mono font-semibold uppercase tracking-wider",style:{background:`${q}14`,color:q,border:`1px solid ${q}30`},children:null==$?o("modelTest.manual.similarityPreview"):o(`modelTest.tier.${(0,eT.Ng)($)}`)})]})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"text-[11px] mb-1",style:{color:eZ},children:o("modelTest.manual.testedOnLabel")}),(0,a.jsx)(eP.A,{allowClear:!0,value:C,onChange:I,placeholder:o("modelTest.manual.testedOnPlaceholder"),style:{width:"100%"},options:eF.V1.map(e=>({label:e,value:e}))})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"text-[11px] mb-1",style:{color:eZ},children:o("modelTest.manual.proofLabel")}),(0,a.jsx)(eU.A,{value:T,onChange:S,folder:"model-proofs"}),!T&&(0,a.jsx)("div",{className:"text-[10px] mt-1",style:{color:eK},children:o("modelTest.manual.proofPasteHint")})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"text-[11px] mb-1",style:{color:eZ},children:o("modelTest.manual.noteLabel")}),(0,a.jsx)(g.A.TextArea,{rows:2,value:L,onChange:e=>R(e.target.value),placeholder:o("modelTest.manual.notePlaceholder"),maxLength:500})]}),(0,a.jsx)(m.Ay,{block:!0,type:"primary",loading:M,disabled:null==$||!T,onClick:B,className:"cursor-pointer",children:o("modelTest.manual.submit")})]}),v&&!A&&(0,a.jsx)("div",{className:"flex justify-center py-2",children:(0,a.jsx)(eB.A,{size:"small"})})]})})};var eH=s(47036),eW=s(16837),eJ=s(1418),eY=s(49439),eG=s(26569),eQ=s(54930),eX=s(18729),e0=s(38147),e1=s(97122),e2=s(72163),e5=s(62985),e4=s(63909),e3=s(70031),e8=s(64049),e6=s(19951),e9=s(81864),e7=s(86408),te=s(5524),tt=s(52722),ts=s(84904),ta=s(92556),tl=s(33914),tr=s(68571);let ti="#10b981",to="rgba(55, 65, 81, 0.5)",tn=({providerId:e,modelId:t,modelLabel:s,isMobile:r,isSmallLaptop:i})=>{let{t:o}=(0,n.Bd)("svgTest"),[c,d]=(0,l.useState)(null),[u,p]=(0,l.useState)(!0),[h,g]=(0,l.useState)(!1);return((0,l.useEffect)(()=>{if(!e||!t)return void p(!1);let s=!1;return p(!0),ta.wR.getPublicSVGTest(e,t).then(e=>{s||d(e.data??null)}).catch(()=>{s||d(null)}).finally(()=>{s||p(!1)}),()=>{s=!0}},[e,t]),u||!c?.html)?null:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"rounded-2xl overflow-hidden",style:{background:"rgba(15, 15, 35, 0.5)",border:`1px solid ${to}`},children:[(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2 px-4 py-3",style:{borderBottom:`1px solid ${to}`,background:`linear-gradient(90deg, ${ti}10 0%, transparent 100%)`},children:[(0,a.jsxs)("span",{className:"flex items-center gap-2 min-w-0",children:[(0,a.jsx)(K.A,{style:{color:ti,fontSize:13}}),(0,a.jsx)("span",{className:"font-mono text-xs font-semibold uppercase tracking-wider truncate",style:{color:"#e5e7eb"},children:o("panel.title")})]}),!1===c.has_animation&&(0,a.jsx)(x.A,{title:o("badge.staticHint"),children:(0,a.jsx)(Z.A,{style:{color:"#f59e0b",fontSize:12}})})]}),(0,a.jsxs)("div",{className:"p-3 space-y-3",children:[(0,a.jsx)(tr.A,{html:c.html,title:s}),(0,a.jsx)(m.Ay,{block:!0,type:"primary",icon:(0,a.jsx)(S.A,{}),onClick:()=>g(!0),className:"bg-gradient-to-r from-space-primary to-space-secondary border-0 hover:from-space-secondary hover:to-space-accent shadow-lg cursor-pointer",children:o("panel.compareButton")}),(0,a.jsxs)("div",{className:"flex items-center justify-between text-[10px]",style:{color:"#6b7280"},children:[(0,a.jsx)("span",{children:o("panel.latency",{ms:c.latency_ms})}),(0,a.jsx)("span",{children:o("panel.tokens",{count:c.output_tokens})})]}),(0,a.jsx)("div",{className:"text-[10px] leading-snug",style:{color:"#9ca3af"},children:o("panel.explainer")})]})]}),(0,a.jsx)(tl.A,{open:h,onClose:()=>g(!1),subject:c,subjectLabel:s,isMobile:r,isSmallLaptop:i})]})};var tc=s(64286),td=s(52792),tm=s(87400);let tu="#10b981",tp="#4A90E2",tx="#7B68EE",th="#10b981",tg="#f59e0b",tf="rgba(15, 15, 35, 0.5)",ty="rgba(55, 65, 81, 0.5)",tj="#e5e7eb",tv="#9ca3af",tb="#6b7280";function tk(e,t){if(!e)return"—";let s=Math.floor((Date.now()-new Date(e).getTime())/864e5);if(0===s)return t("time.today");if(1===s)return t("time.yesterday");if(s<30)return t("time.daysAgo",{count:s});let a=Math.floor(s/30);return a<12?t("time.monthsAgo",{count:a}):t("time.yearsAgo",{count:Math.floor(a/12)})}let tw=()=>{let{t:e}=(0,n.Bd)("marketplace");return(0,a.jsxs)("div",{className:"rounded-2xl p-4 flex items-start gap-3",style:{background:`linear-gradient(135deg, ${tu}10 0%, ${tp}08 100%)`,border:`1px solid ${tu}30`},children:[(0,a.jsx)("div",{className:"w-9 h-9 rounded-xl flex items-center justify-center flex-shrink-0",style:{background:`${tu}1f`,border:`1px solid ${tu}40`,color:tu},children:(0,a.jsx)(v.A,{style:{fontSize:17}})}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("p",{className:"font-mono text-xs font-semibold uppercase tracking-wider mb-1",style:{color:tj},children:e("guarantee.title")}),(0,a.jsx)("p",{className:"text-xs leading-relaxed",style:{color:tv},children:e("guarantee.body")})]})]})},tA=({icon:e,label:t,value:s,accent:l})=>(0,a.jsxs)("div",{className:"flex items-center justify-between gap-3 rounded-lg px-3 py-2",style:{background:"rgba(15,15,35,0.7)",border:`1px solid ${ty}`},children:[(0,a.jsxs)("span",{className:"flex items-center gap-1.5 text-[10px] font-mono uppercase tracking-wider min-w-0",style:{color:tv},children:[(0,a.jsx)("span",{style:{color:l||tb},children:e}),(0,a.jsx)("span",{className:"truncate",children:t})]}),(0,a.jsx)("span",{className:"font-mono font-bold text-xs flex-shrink-0",style:{color:l||tj},children:s})]}),tN=({icon:e,label:t,value:s,valueColor:l})=>(0,a.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,a.jsxs)("span",{className:"flex items-center gap-1.5 text-[11px] font-mono uppercase tracking-wider",style:{color:tv},children:[(0,a.jsx)("span",{style:{color:tb},children:e}),t]}),(0,a.jsx)("span",{className:"font-mono font-bold text-xs flex-shrink-0",style:{color:l||tj},children:s})]}),t$=({role:e})=>{let{t}=(0,n.Bd)("marketplace");return"admin"===e?(0,a.jsx)(c.A,{style:{margin:0,fontSize:9,lineHeight:"16px",border:"none",color:"#fff",background:`linear-gradient(90deg, ${tp}, ${tx})`},children:t("rating.roleAdmin")}):"provider"===e?(0,a.jsx)(c.A,{style:{margin:0,fontSize:9,lineHeight:"16px",background:`${tu}1f`,color:tu,border:`1px solid ${tu}40`},children:t("rating.roleProvider")}):(0,a.jsx)(c.A,{style:{margin:0,fontSize:9,lineHeight:"16px",background:"rgba(255,255,255,0.06)",color:tv,border:`1px solid ${ty}`},children:t("rating.roleUser")})},t_=({providerId:e,modelId:t,modelName:s,isAuthenticated:r,isAdmin:i,onRatingSubmitted:o})=>{let{t:c}=(0,n.Bd)("marketplace"),{message:j}=d.A.useApp(),[v,T]=(0,l.useState)([]),[S,C]=(0,l.useState)(0),[I,L]=(0,l.useState)(1),[R,M]=(0,l.useState)(!0),[E,D]=(0,l.useState)(!1),[P,z]=(0,l.useState)(null),[B,F]=(0,l.useState)(""),[U,q]=(0,l.useState)(!1),[Z,K]=(0,l.useState)(null),[O,V]=(0,l.useState)(0),[H,W]=(0,l.useState)(""),[J,Y]=(0,l.useState)(!1),G=(0,l.useCallback)(async()=>{try{let s=((await e_.wR.getMarketplaceProviderRatings(e,{page:1,limit:50})).data||[]).filter(e=>"model"===e.target_type&&e.model_id===t);T(s),C(s.length)}catch{T([]),C(0)}finally{M(!1)}},[e,t]);(0,l.useEffect)(()=>{G()},[G]);let Q=async e=>{let t=B.trim();if(!t)return void j.warning(c("rating.replyPlaceholder"));q(!0);try{await e_.wR.createRatingReply(e,t),j.success(c("rating.replySuccess")),z(null),F(""),G()}catch(t){let e=t?.response?.data?.error;j.error(e||c("rating.replySuccess"))}finally{q(!1)}},X=async()=>
5{if(Z){Y(!0);try{await e_.wR.adminUpdateRating(Z.id,{stars:O,comment:H}),j.success(c("rating.adminUpdateSuccess")),K(null),G()}catch(t){let e=t?.response?.data?.error;j.error(e||c("rating.adminUpdateSuccess"))}finally{Y(!1)}}},ee=async e=>{try{await e_.wR.adminDeleteRating(e),j.success(c("rating.adminDeleteSuccess")),G()}catch(t){let e=t?.response?.data?.error;j.error(e||c("rating.adminDeleteSuccess"))}},et=async e=>{try{await e_.wR.adminDeleteRatingReply(e),j.success(c("rating.adminDeleteSuccess")),G()}catch(t){let e=t?.response?.data?.error;j.error(e||c("rating.adminDeleteSuccess"))}},es=v.slice((I-1)*10,10*I);return(0,a.jsxs)("div",{className:"rounded-2xl overflow-hidden",style:{background:tf,border:`1px solid ${ty}`},children:[(0,a.jsxs)("div",{className:"flex items-center justify-between px-4 py-3",style:{borderBottom:`1px solid ${ty}`,background:"linear-gradient(90deg, #fadb1410 0%, transparent 100%)"},children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(b.A,{style:{color:"#fadb14",fontSize:13}}),(0,a.jsx)("span",{className:"font-mono text-xs font-semibold uppercase tracking-wider",style:{color:tj},children:c("modelDetail.reviews")}),S>0&&(0,a.jsx)("span",{className:"font-mono",style:{color:tv,fontSize:10,padding:"1px 6px",borderRadius:8,background:"rgba(255,255,255,0.06)"},children:S})]}),(0,a.jsx)(m.Ay,{type:"primary",size:"small",icon:(0,a.jsx)(k.A,{}),onClick:()=>{r?D(!0):j.info(c("rating.loginToRate"))},className:"border-0 shadow-lg cursor-pointer text-xs",children:c("rating.write")})]}),(0,a.jsxs)("div",{className:"p-4",children:[R?(0,a.jsx)("div",{className:"space-y-3",children:[0,1,2].map(e=>(0,a.jsxs)("div",{className:"rounded-xl p-3 flex items-start gap-2",style:{background:"rgba(15,15,35,0.5)",border:`1px solid ${ty}`},children:[(0,a.jsx)(u.A,{size:32,className:"flex-shrink-0",style:{opacity:.3}}),(0,a.jsxs)("div",{className:"flex-1 flex flex-col gap-1.5",children:[(0,a.jsx)(eu.f9,{width:"30%",height:11}),(0,a.jsx)(eu.f9,{width:"80%",height:12})]})]},e))}):0===es.length?(0,a.jsxs)("div",{className:"text-center py-10",children:[(0,a.jsx)("div",{className:"w-16 h-16 mx-auto rounded-2xl flex items-center justify-center mb-3",style:{background:`linear-gradient(135deg, ${tp}25 0%, ${tx}25 100%)`,border:`1px solid ${tp}40`},children:(0,a.jsx)(k.A,{style:{fontSize:24,color:tp}})}),(0,a.jsx)("p",{style:{color:tv},children:c("rating.noRatings")})]}):(0,a.jsx)("div",{className:"space-y-3",children:es.map(e=>(0,a.jsxs)("div",{className:"rounded-xl p-3",style:{background:"rgba(15,15,35,0.5)",border:`1px solid ${ty}`},children:[(0,a.jsxs)("div",{className:"flex items-start justify-between gap-3 mb-1.5",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(u.A,{size:32,icon:(0,a.jsx)(w.A,{}),className:"bg-gradient-to-br from-space-primary to-space-secondary flex-shrink-0"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-xs font-semibold",style:{color:tj},children:e.username||c("rating.anonymous")}),(0,a.jsx)(p.A,{disabled:!0,value:e.stars,style:{fontSize:12,color:"#fadb14"}})]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2 flex-shrink-0",children:[(0,a.jsx)("span",{className:"text-[10px] font-mono",style:{color:tb},children:tk(e.created_at,c)}),i&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(x.A,{title:c("rating.adminEdit"),children:(0,a.jsx)(m.Ay,{type:"text",size:"small",icon:(0,a.jsx)(A.A,{}),onClick:()=>{K(e),V(e.stars),W(e.comment||"")},style:{color:tv}})}),(0,a.jsx)(h.A,{title:c("rating.adminDeleteConfirm"),onConfirm:()=>ee(e.id),okText:c("rating.adminDelete"),cancelText:c("rating.cancelBtn"),okButtonProps:{danger:!0},children:(0,a.jsx)(m.Ay,{type:"text",size:"small",danger:!0,icon:(0,a.jsx)(N.A,{})})})]})]})]}),e.comment&&(0,a.jsx)("p",{className:"text-sm leading-relaxed pl-10",style:{color:tv},children:e.comment}),!!e.replies?.length&&(0,a.jsx)("div",{className:"mt-2 ml-10 space-y-2",children:e.replies.map(e=>(0,a.jsxs)("div",{className:"pl-3 py-1",style:{borderLeft:`2px solid ${ty}`},children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 flex-wrap",children:[(0,a.jsx)("span",{className:"text-[11px] font-semibold",style:{color:tj},children:e.username||c("rating.anonymous")}),(0,a.jsx)(t$,{role:e.author_role}),(0,a.jsx)("span",{className:"text-[10px] font-mono",style:{color:tb},children:tk(e.created_at,c)}),i&&(0,a.jsx)(h.A,{title:c("rating.adminDeleteReplyConfirm"),onConfirm:()=>et(e.id),okText:c("rating.adminDelete"),cancelText:c("rating.cancelBtn"),okButtonProps:{danger:!0},children:(0,a.jsx)(m.Ay,{type:"text",size:"small",danger:!0,icon:(0,a.jsx)(N.A,{}),style:{height:18,padding:"0 4px"}})})]}),(0,a.jsx)("p",{className:"text-xs leading-relaxed mt-0.5",style:{color:tv},children:e.body})]},e.id))}),(0,a.jsx)("div",{className:"mt-2 ml-10",children:P===e.id?(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)(g.A.TextArea,{rows:2,value:
5B,onChange:e=>F(e.target.value),maxLength:1e3,placeholder:c("rating.replyPlaceholder"),disabled:U,style:{resize:"none"}}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(m.Ay,{size:"small",type:"primary",icon:(0,a.jsx)($.A,{}),loading:U,onClick:()=>Q(e.id),className:"border-0 cursor-pointer",children:c("rating.replySubmit")}),(0,a.jsx)(m.Ay,{size:"small",onClick:()=>{z(null),F("")},disabled:U,children:c("rating.cancelBtn")})]})]}):r?(0,a.jsx)(m.Ay,{type:"text",size:"small",icon:(0,a.jsx)(_.A,{}),onClick:()=>{z(e.id),F("")},style:{color:tp,paddingLeft:0},children:c("rating.reply")}):(0,a.jsx)(x.A,{title:c("rating.loginToReply"),children:(0,a.jsx)("span",{className:"text-[11px] font-mono cursor-not-allowed",style:{color:tb},children:c("rating.reply")})})})]},e.id))}),S>10&&(0,a.jsx)("div",{className:"flex justify-center mt-4",children:(0,a.jsx)(f.A,{current:I,total:S,pageSize:10,onChange:e=>L(e),showSizeChanger:!1})})]}),E&&(0,a.jsx)(ew.default,{open:E,onClose:()=>D(!1),onSuccess:()=>{G(),L(1),o()},targetType:"model",providerId:e,modelId:t,targetName:s}),(0,a.jsx)(y.A,{className:"space-modal",open:!!Z,onCancel:()=>K(null),title:(0,a.jsx)("span",{className:"font-mono uppercase tracking-wider text-xs",style:{color:tj},children:c("rating.adminEditTitle")}),footer:null,width:460,destroyOnHidden:!0,children:(0,a.jsxs)("div",{className:"space-y-4 py-2",children:[(0,a.jsx)("div",{className:"flex flex-col items-center gap-2",children:(0,a.jsx)(p.A,{value:O,onChange:V,style:{fontSize:32,color:"#fadb14"}})}),(0,a.jsx)(g.A.TextArea,{rows:3,value:H,onChange:e=>W(e.target.value),maxLength:500,showCount:!0,placeholder:c("rating.commentPlaceholder"),disabled:J,style:{resize:"none"}}),(0,a.jsxs)("div",{className:"flex gap-3",children:[(0,a.jsx)(m.Ay,{onClick:()=>K(null),className:"flex-1",disabled:J,children:c("rating.cancelBtn")}),(0,a.jsx)(m.Ay,{type:"primary",loading:J,disabled:!O,onClick:X,className:"flex-1 border-0 shadow-lg cursor-pointer disabled:opacity-40",children:c("rating.updateBtn")})]})]})})]})},tT=({label:e,oldV:t,newV:s})=>(t??0)===(s??0)?null:(0,a.jsxs)("div",{className:"flex items-center gap-1 flex-wrap",children:[(0,a.jsxs)("span",{children:[e,":"]}),(0,a.jsx)("span",{style:{textDecoration:"line-through",color:tb},children:(0,e0.vv)(t)}),(0,a.jsx)("span",{children:"→"}),(0,a.jsx)("span",{style:{color:(s??0)>(t??0)?"#ef4444":"#10b981"},children:(0,e0.vv)(s)})]}),tS=({prefix:e,modelId:t})=>{let{t:s}=(0,n.Bd)("marketplace"),[r,i]=(0,l.useState)([]),[o,c]=(0,l.useState)(!1);return((0,l.useEffect)(()=>{if(!e||!t)return;let s=!1;return e_.wR.getModelPriceHistory(e,t).then(e=>{s||i(e.data||[])}).catch(()=>{s||i([])}).finally(()=>{s||c(!0)}),()=>{s=!0}},[e,t]),o&&0!==r.length)?(0,a.jsxs)("div",{className:"rounded-2xl overflow-hidden",style:{background:tf,border:`1px solid ${ty}`},children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 px-4 py-3",style:{borderBottom:`1px solid ${ty}`,background:`linear-gradient(90deg, ${tp}10 0%, transparent 100%)`},children:[(0,a.jsx)(T.A,{style:{color:tp,fontSize:13}}),(0,a.jsx)("span",{className:"font-mono text-xs font-semibold uppercase tracking-wider",style:{color:tj},children:s("modelDetail.priceHistory")})]}),(0,a.jsx)("div",{className:"p-4 space-y-3",children:r.map(e=>(0,a.jsxs)("div",{className:"font-mono text-[11px]",style:{color:tv},children:[(0,a.jsx)("div",{className:"mb-1",style:{color:tj},children:new Date(e.changed_at).toLocaleDateString()}),(0,a.jsx)(tT,{label:s("model.inputPrice"),oldV:e.old_input_1m,newV:e.new_input_1m}),(0,a.jsx)(tT,{label:s("model.outputPrice"),oldV:e.old_output_1m,newV:e.new_output_1m}),(0,a.jsx)(tT,{label:s("model.pricePerRequest"),oldV:e.old_per_request,newV:e.new_per_request})]},e.id))})]}):null},tC=()=>{let e=(0,r.g)(),t=e.prefix??"",s=e["*"]??"",c=(0,r.Zp)(),{isAuthenticated:u,isAdmin:p}=(0,e6.A)(),{t:h,ready:g}=(0,n.Bd)("marketplace"),{t:f}=(0,n.Bd)("affiliate"),{t:y}=(0,n.Bd)("common"),{message:v}=d.A.useApp(),{isSmallLaptop:w}=(0,eS.Gu)(),A=(0,i.jE)(),N=(0,o.I)({...(0,tt.bZ)(t,s),enabled:!!t&&!!s,placeholderData:()=>(0,tt.QZ)(A,t,s)}),$=N.data??null,_=(0,tm.C)(),W=N.isError&&!N.data,[J,Y]=(0,l.useState)(void 0),[G,Q]=(0,l.useState)("24h"),[X,et]=(0,l.useState)(!0),ea=`${t}/${s}`,[el,er]=(0,l.useState)({model:ea,range:G});(el.model!==ea||el.range!==G)&&(el.model!==ea&&Y(void 0),er({model:ea,range:G}),et(!0));let[ei,eo]=(0,l.useState)(!1),[en,ec]=(0,l.useState)(!1),[ed,em]=(0,l.useState)(!1),[ep,ex]=(0,l.useState)(null),[eh,eg]=(0,l.useState)(!1),[ef,ey]=(0,l.useState)(!1),ej=(0,l.useCallback)(()=>
5{A.invalidateQueries({queryKey:te.l.marketplace.modelDetail(t,s)})},[A,t,s]),ev=(0,l.useRef)(null);(0,l.useEffect)(()=>{let e=`${t}/${s}`;W&&g&&ev.current!==e&&(ev.current=e,v.error(h("empty")),c(e4.JZ.marketplaceProviderDetail.replace(":prefix",t),{replace:!0}))},[W,g,v,c,t,s,h]),(0,l.useEffect)(()=>{let e=$?.provider_id;e&&eJ.C.getProgramInfo(e).then(ex).catch(()=>ex(null))},[$?.provider_id]);let ew=(0,l.useCallback)(e=>{switch(e){case"TEST_COOLDOWN":v.warning(h("modelTest.errorCooldown"));break;case"MODEL_NOT_TESTABLE":v.error(h("modelTest.errorNotTestable"));break;case"MODEL_NOT_FOUND":v.error(h("modelTest.errorNotFound"));break;case"TEST_QUEUE_FULL":v.warning(h("modelTest.errorQueueFull"));break;case"FEATURE_DISABLED":v.error(h("modelTest.errorDisabled"));break;case"DETECT_FAILED":v.error(h("modelTest.errorDetectFailed"));break;default:v.error(h("modelTest.errorGeneric"))}},[h]),eN=(0,l.useCallback)(()=>{ej()},[ej]),{job:e$,testing:eC}=function(e,t,s,a){let[r,i]=(0,l.useState)(null),[o,n]=(0,l.useState)(!1),[c,d]=(0,l.useState)(!1),[m,u]=(0,l.useState)(null),p=(0,l.useRef)(!1);p.current=c;let x=(0,l.useRef)(null),h=(0,l.useRef)(a);h.current=a;let g=(0,l.useRef)(s);g.current=s;let f=(0,l.useCallback)(e=>eT.Pt.has(e),[]),y=(0,l.useCallback)(e=>{if("failed"===e.status){let t=e.error_code??"DETECT_FAILED";u(t),g.current(t)}h.current?.(e)},[]),j=(0,l.useCallback)(e=>{x.current=e,d(!0)},[]),v=(0,l.useCallback)(async()=>{let e=x.current;if(e)try{let t=(await e_.wR.getModelTest(e)).data;i(t),f(t.status)&&(d(!1),y(t))}catch{}},[f,y]);(0,l.useEffect)(()=>{if(!c)return;let e=window.setInterval(()=>{p.current&&v()},3e3);return()=>window.clearInterval(e)},[c,v]);let b=(0,l.useCallback)(async s=>{if(!o&&!c){n(!0),u(null);try{let a=(await e_.wR.requestModelTest(e,t,s)).data;i(a),f(a.status)?(x.current=a.id,y(a)):j(a.id)}catch(t){var a;let e=(a=t,a?.response?.data?.error_code??null);u(e),g.current(e)}finally{n(!1)}}},[e,t,o,c,f,y,j]),k=(0,l.useRef)(null);(0,l.useEffect)(()=>{if(!e||!t)return;let s=`${e}:${t}`;if(k.current===s||(k.current=s,x.current||p.current))return;let a=!1;return e_.wR.listModelTests(e,t,1,1).then(e=>{if(a)return;let t=e.data?.[0];!t||x.current||p.current||"manual"!==t.mode&&("pending"===t.status||"running"===t.status)&&(i(t),j(t.id))}).catch(()=>{k.current===s&&(k.current=null)}),()=>{a=!0}},[e,t,j]);let w=o||c||r?.status==="pending"||r?.status==="running";return{job:r,testing:w,errorCode:m,startTest:b}}($?.provider_id??"",s,ew,eN),[eI,eL]=(0,l.useState)(null);(0,l.useEffect)(()=>{let e=$?.provider_id;if(!e||!s||$?.last_test_status!=="done")return void eL(null);let t=!1;return e_.wR.listModelTests(e,s,1,1).then(e=>{t||eL(e.data?.[0]??null)}).catch(()=>{t||eL(null)}),()=>{t=!0}},[$?.provider_id,s,$?.last_test_status,$?.last_test_at]),(0,l.useEffect)(()=>{if(!t||!s)return;let e=!1;return e_.wR.getModelDailyStatus(t,s,G).then(t=>{e||Y(t.data)}).catch(()=>{e||Y(null)}).finally(()=>{e||et(!1)}),()=>{e=!0}},[t,s,G]);let eR=()=>(0,e8.M$)(e4.JZ.userLLMKeys);if(!$)return W?null:(0,a.jsx)(eG.A,{});let eM=eX.I[$.provider_type]??{color:"#6b7280",bgColor:"rgba(107,114,128,0.12)",label:$.provider_type,icon:null},eE=$.provider_prefix?`${$.provider_prefix}/${$.model_id}`:$.model_id,eP=($.total_requests??0)>0,ez=null==$.success_rate?tb:$.success_rate>=95?th:$.success_rate>=80?tg:"#ef4444",eB=(0,e1.sO)($),eF=eB.hasCachePricing,eU=J?.last_called??void 0,eq=X&&void 0!==J,eZ={opacity:eq?.6:1,transition:"opacity 150ms"},eK=[...($.total_requests??0)>0?[{key:"requests",icon:(0,a.jsx)(S.A,{}),label:h("provider.requests"),value:(0,eQ.B4)($.total_requests),color:tp}]:[],...($.total_tokens??0)>0?[{key:"tokens",icon:(0,a.jsx)(C.A,{}),label:h("provider.tokens"),value:(0,eQ.B4)($.total_tokens),color:tx}]:[],...eP?[{key:"successRate",icon:(0,a.jsx)(I.A,{}),label:h("provider.successRate"),value:(0,eQ.CE)($.success_rate),color:ez}]:[],...($.avg_latency_ms??0)>0?[{key:"latency",icon:(0,a.jsx)(L.A,{}),label:h("provider.latency"),value:(0,eQ.YL)($.avg_latency_ms),color:tu}]:[],...($.rating_count??0)>0?[{key:"rating",icon:(0,a.jsx)(b.A,{}),label:h("provider.rating"),value:`${($.avg_rating??0).toFixed(1)}/5`,color:tg}]:[]],eO=p&&!(0,td.fB)($),e0=(0,eT.qe)($.last_test_at),ta=!p&&e0>0,tl=(0,eT.uh)($.last_test_at),tr=eC||ta,ti=e$?.status==="done"?e$.score:"done"===$.last_test_status&&null!=$.last_test_score?$.last_test_score:null,to=e$?.status==="done"?e$:eI,t$=null!=ti,tT=(0,e7.Ll)((e,t)=>y(`seo.${e}`,t),$,{prefix:t,modelId:s});return(0,a.jsxs)("div",{className:"min-h-screen bg-gradient-to-br from-[#0f0f23] via-[#1a1a2e] to-[#16213e]",children:[(0,a.jsx)(e9.k,{title:tT.title,de
5scription:tT.description,path:(0,e3.S)({provider_prefix:t,provider_id:"",model_id:s})}),(0,a.jsx)("div",{className:"pt-24 pb-16",children:(0,a.jsxs)(j.P.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5},className:`max-w-[1600px] mx-auto ${w?"px-2 space-y-2":"px-3 sm:px-4 lg:px-8 space-y-4"}`,children:[(0,a.jsxs)("nav",{className:"flex items-center gap-1.5 text-xs font-mono uppercase tracking-wider flex-wrap",style:{color:tv},children:[(0,a.jsx)("button",{onClick:()=>c(-1),className:"flex items-center gap-1 transition-colors cursor-pointer hover:opacity-80",style:{color:tv},"aria-label":h("common:back"),children:(0,a.jsx)(R.A,{className:"text-[10px]"})}),(0,a.jsx)(M.A,{className:"text-[8px]",style:{color:tb}}),(0,a.jsx)("button",{onClick:()=>c(e4.JZ.marketplaceProviderDetail.replace(":prefix",$.seller_slug||$.provider_prefix||t)),className:"transition-colors cursor-pointer truncate max-w-[40vw] hover:opacity-90",style:{color:tp},title:$.seller_name||$.provider_name,children:$.seller_name||$.provider_name}),(0,a.jsx)(M.A,{className:"text-[8px]",style:{color:tb}}),(0,a.jsx)("span",{style:{color:tj},className:"truncate max-w-[50vw]",children:$.display_name||$.model_id})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-4",style:{gap:"var(--sl-gap)"},children:[(0,a.jsxs)("div",{className:"lg:col-span-2 lg:order-2 space-y-4",children:[(0,a.jsxs)("div",{className:"rounded-2xl p-5 relative overflow-hidden",style:{background:tf,border:`1px solid ${ty}`},children:[(0,a.jsx)("div",{className:"absolute top-0 left-0 right-0 h-1 opacity-80",style:{background:`linear-gradient(90deg, ${eM.color}, ${tu}, transparent 80%)`}}),(0,a.jsxs)("div",{className:"relative flex items-start gap-4",children:[(0,a.jsx)("div",{className:"w-14 h-14 rounded-2xl flex items-center justify-center flex-shrink-0 [&>svg]:w-8 [&>svg]:h-8",style:{background:eM.bgColor,border:`1px solid ${eM.color}35`,color:eM.color},children:eM.icon}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 flex-wrap mb-1.5",children:[(0,a.jsx)("h1",{className:"font-mono font-bold text-lg sm:text-xl leading-tight m-0",style:{color:tj},children:$.display_name||$.model_id}),$.provider_verified&&(0,a.jsx)(eA.A,{size:"md",tooltip:h("provider.verifiedTooltip")})]}),(0,a.jsx)(x.A,{title:ei?h("model.copied"):h("model.copyEffectiveName"),children:(0,a.jsxs)("button",{onClick:()=>{navigator.clipboard.writeText(eE).catch(()=>{}),eo(!0),setTimeout(()=>eo(!1),1500)},className:"inline-flex items-center gap-1.5 text-xs font-mono px-2 py-1 rounded-md cursor-pointer transition-colors mb-2.5",style:{background:`${eM.color}12`,color:eM.color,border:`1px solid ${eM.color}25`},children:[(0,a.jsx)("span",{className:"truncate max-w-[60vw] sm:max-w-[360px]",children:eE}),ei?(0,a.jsx)(I.A,{style:{fontSize:11,color:th}}):(0,a.jsx)(E.A,{style:{fontSize:11}})]})}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-1.5",children:[(0,a.jsx)("span",{className:"text-[10px] font-semibold font-mono uppercase tracking-wider px-2 py-0.5 rounded-full border",style:"token"===$.pricing_mode?{background:`${tp}14`,color:tp,borderColor:`${tp}30`}:{background:`${tx}14`,color:tx,borderColor:`${tx}30`},children:"token"===$.pricing_mode?"Token":"Per-Req"}),$.max_context_length?(0,a.jsxs)("span",{className:"text-[10px] font-medium font-mono px-2 py-0.5 rounded-full",style:{background:"rgba(255,255,255,0.04)",color:tv,border:`1px solid ${ty}`},children:[(0,eQ.J_)($.max_context_length)," ctx"]}):null,$.max_output_tokens?(0,a.jsxs)("span",{className:"text-[10px] font-medium font-mono px-2 py-0.5 rounded-full",style:{background:"rgba(255,255,255,0.04)",color:tv,border:`1px solid ${ty}`},children:[(0,eQ.J_)($.max_output_tokens)," out"]}):null,(0,a.jsx)(eQ.hP,{model:$})]})]})]})]}),(0,a.jsx)(ts.A,{items:eK}),$.provider_verified&&(0,a.jsx)(tw,{}),(0,td.fB)($)&&$.provider_prefix&&_&&(0,a.jsx)(tc.A,{baseUrl:_,prefix:$.provider_prefix,modelId:$.model_id,routes:$.passthrough_routes??[]}),(0,a.jsxs)("div",{className:"rounded-2xl overflow-hidden",style:{background:tf,border:`1px solid ${ty}`},children:[(0,a.jsx)("div",{className:"flex items-center justify-between px-4 py-3",style:{borderBottom:`1px solid ${ty}`,background:`linear-gradient(90deg, ${tu}10 0%, transparent 100%)`},children:(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(D.A,{style:{color:tu,fontSize:13}}),(0,a.jsx)("span",{className:"font-mono text-xs font-semibold uppercase tracking-wider",style:{color:tj},children:h("modelDetail.serviceStatus")})]})}),(0,a.jsxs)("div",{className:"p-4",children:[(0,a.jsx)("div",{className:"flex items-center justify-end mb-2",children:(0,a.jsx)(ee,{range:G,onRangeChange:Q})}),(0,a.jsx)("div",{style:eZ,"aria-busy":eq||void 0,children:(0,a.jsx)(es,{data:J,range:G,onRangeChange:Q,hideToggle:!0})})]})]}),(0,a.jsxs)("div",{className:"rounded-2xl overflow-hidden",style:{background:tf,border:`1px solid ${ty}`},children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 px-4 py-3",style:{borderBottom:`1px solid ${ty}`,background:`linear-gradient(90deg, ${tx}10 0%, transparent 100%)`},children:[(0,a.jsx)(P.A,{style:{color:tx,fontSize:13}}),(0,a.jsx)("span",{className:"font-mono text-xs font-semibold uppercase tracking-wider",style:{color:tj},children:h("modelDetail.insights")})]}),(0,a.jsx)("div",{className:"p-4",style:eZ,"aria-busy":eq||void 0,children:(0,a.jsx)(eb,{buckets:J?J.buckets:J})})]}),(0,a.jsx)(t_,{providerId:$.provider_id,modelId:s,modelName:$.display_name||$.model_id,isAuthenticated:u,isAdmin:p,onRatingSubmitted:ej})]}),(0,a.jsx)("div",{className:"lg:col-span-1 lg:order-3",children:(0,a.jsxs)("div",{className:"lg:sticky lg:top-4 space-y-4",children:[(0,a.jsxs)("div",{className:"rounded-2xl overflow-hidden",style:{background:tf,border:`1px solid ${ty}`},children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 px-4 py-3",style:{borderBottom:`1px solid ${ty}`,background:`linear-gradient(90deg, ${tp}10 0%, transparent 100%)`},children:[(0,a.jsx)(z.A,{style:{color:tp,fontSize:13}}),(0,a.jsx)("span",{className:"font-mono text-xs font-semibold uppercase tracking-wider",style:{color:tj},children:h("modelDetail.pricing")}),$.promo&&(0,a.jsx)(e5.A,{promo:$.promo,size:"sm"})]}),(0,a.jsxs)("div",{className:"p-4 space-y-2.5",children:[eB.isFree?(0,a.jsx)(tA,{icon:(0,a.jsx)(z.A,{style:{fontSize:10}}),label:h("model.pricePerRequest"),value:(0,a.jsx)("span",{style:{color:tu},children:h("model.free")}),accent:tu}):eB.isTokenMode?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(tA,{icon:(0,a.jsx)(B.A,{style:{fontSize:10}}),label:`${h("model.inputPrice")} /1M`,value:(0,a.jsx)(e2.gN,{bucket:eB.input})}),(0,a.jsx)(tA,{icon:(0,a.jsx)(S.A,{style:{fontSize:10}}),label:`${h("model.outputPrice")} /1M`,value:(0,a.jsx)(e2.gN,{bucket:eB.output})}),eB.cachedRead.list>0&&(0,a.jsx)(tA,{icon:(0,a.jsx)(S.A,{style:{fontSize:10}}),label:`${h("model.cacheReadPrice")} /1M`,value:(0,a.jsx)(e2.gN,{bucket:eB.cachedRead}),accent:tu}),eB.cacheCreation.list>0&&(0,a.jsx)(tA,{icon:(0,a.jsx)(S.A,{style:{fontSize:10}}),label:`${h("model.cacheWritePrice")} /1M`,value:(0,a.jsx)(e2.gN,{bucket:eB.cacheCreation}),accent:tu}),eB.minPricePerRequest>0&&(0,a.jsx)(tA,{icon:(0,a.jsx)(z.A,{style:{fontSize:10}}),label:h("model.minPriceTooltip"),value:(0,e1.jx)(eB.minPricePerRequest)})]}):(0,a.jsx)(tA,{icon:(0,a.jsx)(z.A,{style:{fontSize:10}}),label:h("model.pricePerRequest"),value:(0,a.jsx)(e2.gN,{bucket:eB.perRequest})}),!eF&&"token"===$.pricing_mode&&null]}),eB.longContext&&!eB.isFree&&(0,a.jsxs)("div",{className:"px-4 py-3 space-y-2.5",style:{borderTop:`1px solid ${ty}`},children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(F.A,{style:{color:tg,fontSize:12}}),(0,a.jsx)("span",{className:"font-mono text-[11px] font-semibold uppercase tracking-wider",style:{color:tg},children:h("modelDetail.longContextTitle",{tokens:eB.longContext.thresholdTokens.toLocaleStr
5ing("en-US")})})]}),(0,a.jsx)("p",{className:"text-[11px] m-0",style:{color:tv},children:h("modelDetail.longContextDesc",{tokens:eB.longContext.thresholdTokens.toLocaleString("en-US")})}),(0,a.jsx)(tA,{icon:(0,a.jsx)(B.A,{style:{fontSize:10}}),label:`${h("model.inputPrice")} /1M`,value:(0,a.jsx)(e2.gN,{bucket:eB.longContext.input}),accent:tg}),(0,a.jsx)(tA,{icon:(0,a.jsx)(S.A,{style:{fontSize:10}}),label:`${h("model.outputPrice")} /1M`,value:(0,a.jsx)(e2.gN,{bucket:eB.longContext.output}),accent:tg}),eB.cachedRead.list>0&&(0,a.jsx)(tA,{icon:(0,a.jsx)(S.A,{style:{fontSize:10}}),label:`${h("model.cacheReadPrice")} /1M`,value:(0,a.jsx)(e2.gN,{bucket:eB.longContext.cachedRead}),accent:tg}),eB.cacheCreation.list>0&&(0,a.jsx)(tA,{icon:(0,a.jsx)(S.A,{style:{fontSize:10}}),label:`${h("model.cacheWritePrice")} /1M`,value:(0,a.jsx)(e2.gN,{bucket:eB.longContext.cacheCreation}),accent:tg})]})]}),(0,a.jsx)(tS,{prefix:$.provider_prefix||t,modelId:s}),(0,a.jsxs)("div",{className:"rounded-2xl p-4 space-y-2.5",style:{background:tf,border:`1px solid ${ty}`},children:[(0,a.jsx)(m.Ay,{type:"primary",size:"large",block:!0,icon:(0,a.jsx)(U.A,{}),onClick:()=>{(0,e8.M$)(`${e4.JZ.userLLMKeys}?provider_id=${encodeURIComponent($.provider_id)}&model_id=${encodeURIComponent(s)}`)},className:"border-0 shadow-lg cursor-pointer",children:h("modelDetail.tryNow")}),ep?.enabled&&(0,a.jsx)(m.Ay,{block:!0,icon:(0,a.jsx)(q.A,{}),onClick:()=>eg(!0),className:"cursor-pointer",style:{background:"transparent",color:tg,borderColor:`${tg}50`},children:f("shareEarn",{rate:(100*ep.effective_rate).toFixed(1).replace(/\.0$/,"")})}),(0,a.jsx)(m.Ay,{block:!0,icon:(0,a.jsx)(Z.A,{}),onClick:()=>ec(!0),className:"cursor-pointer",style:{background:"transparent",color:tv,borderColor:ty},children:h("report.button")}),eO&&(0,a.jsx)(x.A,{title:ta?h("modelTest.cooldownTooltip",{count:tl}):"",placement:"top",children:(0,a.jsx)(m.Ay,{block:!0,icon:(0,a.jsx)(K.A,{}),disabled:tr,onClick:()=>ey(!0),className:"cursor-pointer",style:{background:"transparent",color:tu,borderColor:`${tu}40`},children:eC?h("modelTest.testing"):h("modelTest.button")})})]}),(0,a.jsx)(eH.A,{variant:"page",providerId:$.provider_prefix||t,modelId:s})]})}),(0,a.jsx)("div",{className:"lg:col-span-1 lg:order-1",children:(0,a.jsxs)("div",{className:"lg:sticky lg:top-4 space-y-4",children:[(0,a.jsxs)("div",{className:"rounded-2xl overflow-hidden",style:{background:tf,border:`1px solid ${ty}`},children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 px-4 py-3",style:{borderBottom:`1px solid ${ty}`,background:`linear-gradient(90deg, ${tx}10 0%, transparent 100%)`},children:[(0,a.jsx)(O.A,{style:{color:tx,fontSize:13}}),(0,a.jsx)("span",{className:"font-mono text-xs font-semibold uppercase tracking-wider",style:{color:tj},children:h("modelDetail.statistics")})]}),(0,a.jsxs)("div",{className:"p-4 space-y-3",children:[(0,a.jsx)(tN,{icon:(0,a.jsx)(S.A,{style:{fontSize:11}}),label:h("provider.requests"),value:(0,eQ.B4)($.total_requests)}),(0,a.jsx)(tN,{icon:(0,a.jsx)(C.A,{style:{fontSize:11}}),label:h("provider.tokens"),value:(0,eQ.B4)($.total_tokens)}),(0,a.jsx)(tN,{icon:(0,a.jsx)(L.A,{style:{fontSize:11}}),label:h("provider.latency"),value:(0,eQ.YL)($.avg_latency_ms)}),(0,a.jsx)(tN,{icon:(0,a.jsx)(I.A,{style:{fontSize:11}}),label:h("provider.successRate"),value:eP?(0,eQ.CE)($.success_rate):"—",valueColor:eP?ez:tb}),(0,a.jsx)(tN,{icon:(0,a.jsx)(V.A,{style:{fontSize:11}}),label:h("modelDetail.uptime"),value:void 0===J?(0,a.jsx)(eu.f9,{width:44,height:12}):(0,a.jsx)("span",{style:eZ,"aria-busy":eq||void 0,children:J&&!J.last_called&&0===J.total_requests?"—":J?`${J.uptime_percent.toFixed(1)}%`:"—"})}),(0,a.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,a.jsxs)("span",{className:"flex items-center gap-1.5 text-[11px] font-mono uppercase tracking-wider",style:{color:tv},children:[(0,a.jsx)(k.A,{style:{fontSize:11,color:tb}}),h("provider.rating")]}),(0,a.jsx)(eQ.b3,{rating:$.avg_rating,count:$.rating_count})]}),(0,a.jsx)(tN,{icon:(0,a.jsx)(L.A,{style:{fontSize:11}}),label:h("status.lastCalled"),value:void 0===J?(0,a.jsx)(eu.f9,{width:56,height:12}):tk(eU,h)}),(to||eO&&eC)&&(0,a.jsxs)("div",{className:"rounded-xl p-3 mt-1 
5space-y-2",style:{background:"rgba(15,15,35,0.7)",border:`1px solid ${ty}`},children:[(0,a.jsx)("div",{className:"flex items-center gap-2",children:(0,a.jsxs)("span",{className:"flex items-center gap-1.5 text-[10px] font-mono uppercase tracking-wider",style:{color:tv},children:[(0,a.jsx)(K.A,{style:{fontSize:11,color:tu}}),h("modelTest.resultTitle")]})}),eC&&!t$?(0,a.jsxs)("div",{className:"flex items-center gap-2 text-xs",style:{color:tv},children:[(0,a.jsxs)("span",{className:"relative flex h-2 w-2","aria-hidden":"true",children:[(0,a.jsx)("span",{className:"absolute inline-flex h-full w-full rounded-full opacity-75 animate-ping",style:{background:tu}}),(0,a.jsx)("span",{className:"relative inline-flex h-2 w-2 rounded-full",style:{background:tu}})]}),h("modelTest.running")]}):t$&&to&&(0,a.jsx)(eY.A,{job:to,showHeader:!0}),eO&&(0,a.jsx)(m.Ay,{block:!0,size:"small",icon:(0,a.jsx)(T.A,{}),onClick:()=>em(!0),className:"cursor-pointer",style:{background:"transparent",color:tv,borderColor:ty},children:h("modelTest.viewHistory")})]})]})]}),$?.provider_id&&(0,a.jsx)(tn,{providerId:$.provider_id,modelId:s,modelLabel:$.model_id||s,isSmallLaptop:w})]})})]})]})}),(0,a.jsx)(H.A,{onGetStarted:eR}),(0,a.jsx)(ek.A,{open:en,onClose:()=>ec(!1),targetType:"model",prefix:t,modelId:s,targetName:$.display_name||$.model_id,isAuthenticated:u}),(0,a.jsx)(eW.A,{open:eh,onClose:()=>eg(!1),providerId:$.provider_id,modelId:$.model_id,program:ep,isLoggedIn:u,onLoginRequired:eR}),eO&&(0,a.jsx)(eD,{open:ed,onClose:()=>em(!1),providerId:$.provider_id,modelId:$.model_id}),eO&&(0,a.jsx)(eV,{open:ef,onClose:()=>ey(!1),providerId:$.provider_id,modelId:$.model_id,onSubmitted:ej})]})}},87400:(e,t,s)=>{s.d(t,{C:()=>c,j:()=>n});var a=s(7620),l=s(29039);let r="https://<endpoint>",i=null,o=null;function n(){return c()??r}function c(){let[e,t]=(0,a.useState)(i);return(0,a.useEffect)(()=>{i?t(i):(!o&&(o=l.wR.getLLMInfo().then(e=>i=(e.base_url||"").replace(/\/$/,"")||r).catch(()=>i=r)),o).then(e=>t(e))},[]),e}},88774:(e,t,s)=>{s.d(t,{X:()=>l,u:()=>r});let a=null;function l(e,t){return a={area:e,navigate:t},()=>{a?.navigate===t&&(a=null)}}function r(e,t){return!!a&&a.area===e&&(a.navigate(t),!0)}},99204:(e,t,s)=>{s.d(t,{A:()=>u});var a=s(54568),l=s(7620),r=s(27501),i=s(68526),o=s(24837),n=s(50596),c=s(24426),d=s(92085),m=s(69257);let u=({value:e,onChange:t,folder:s,maxSize:u=5,accept:p="image/*",disabled:x=!1})=>{let{message:h}=r.A.useApp(),[g,f]=(0,l.useState)(!1),y=(0,l.useCallback)(async e=>{if(e.size/1048576>u)return h.error(`File size must be less than ${u}MB`),!1;if(!e.type.startsWith("image/"))return h.error("Only image files are allowed"),!1;try{f(!0);let a=await (0,m.e)(e,s);t?.(a.secure_url),h.success("Image uploaded successfully")}catch(t){let e=t instanceof Error?t.message:"Failed to upload image";h.error(e)}finally{f(!1)}return!1},[s,u,t,h]);return(0,l.useEffect)(()=>{if(x||g||e)return;let t=e=>{let t=(e=>{if(!e)return null;for(let t of Array.from(e.items))if("file"===t.kind&&t.type.startsWith("image/")){let e=t.getAsFile();if(e)return e}return null})(e.clipboardData);t&&(e.preventDefault(),y(t))};return document.addEventListener("paste",t),()=>document.removeEventListener("paste",t)},[x,g,e,y]),(0,a.jsxs)("div",{children:[e?(0,a.jsxs)("div",{style:{marginBottom:8},children:[(0,a.jsx)(i.A,{src:e,alt:"Uploaded",preview:!0,style:{maxWidth:"100%",maxHeight:200,objectFit:"contain",borderRadius:4}}),!x&&(0,a.jsx)("div",{style:{marginTop:8},children:(0,a.jsx)(o.Ay,{danger:!0,icon:(0,a.jsx)(c.A,{}),onClick:()=>{t?.(void 0)},size:"small",children:"Remove Image"})})]}):(0,a.jsx)(n.A,{accept:p,beforeUpload:y,showUploadList:!1,disabled:x||g,children:(0,a.jsx)(o.Ay,{icon:(0,a.jsx)(d.A,{}),loading:g,disabled:x,children:g?"Uploading...":"Upload Image"})}),(0,a.jsxs)("div",{style:{fontSize:"12px",color:"#8c8c8c",marginTop:4},children:["Max size: ",u,"MB. Supported: JPG, PNG, GIF, WebP"]})]})}}}]);

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.