1/*! LICENSE: 1572.b2574156ec.js.LICENSE.txt */ 2"use strict";(self.rspackChunknewapi_web=self.rspackChunknewapi_web||[]).push([[1572],{39369(e,t,r){function s(e){try{let t=new URL(e);return"http:"===t.protocol||"https:"===t.protocol}catch{return!1}}function a(e){return/<!doctype html|<html[\s>]|<head[\s>]|<body[\s>]|<style[\s>]|<script[\s>]|<\/?[a-z][\s\S]*>/i.test(e)}r.d(t,{q:()=>s,y:()=>a})},5359(e,t,r){r.r(t),r.d(t,{component:()=>ed});var s=r(79015),a=r(65311),n=r(89077),l=r(51571),i=r(30661),o=r(43303),d=r(88535),c=r(47801);function m(e){let{t}=(0,n.Bd)(),r=e.link.href.startsWith("http"),a=t(e.link.text);return r?(0,s.jsx)("a",{href:e.link.href,target:"_blank",rel:"noopener noreferrer",className:"text-muted-foreground hover:text-foreground text-sm transition-colors duration-200",children:a}):(0,s.jsx)(i.N_,{to:e.link.href,className:"text-muted-foreground hover:text-foreground text-sm transition-colors duration-200",children:a})}function x(e){let{t}=(0,n.Bd)(),{status:r}=(0,o.s)(),l=[];return(r?.user_agreement_enabled&&l.push({key:"user-agreement",label:t("User Agreement"),href:"/user-agreement"}),r?.privacy_policy_enabled&&l.push({key:"privacy-policy",label:t("Privacy Policy"),href:"/privacy-policy"}),0===l.length)?null:(0,s.jsx)(s.Fragment,{children:l.map((t,r)=>(0,s.jsxs)(a.Fragment,{children:[(e.leadingSeparator||r>0)&&(0,s.jsx)("span",{"aria-hidden":"true",className:"text-muted-foreground/30",children:"·"}),(0,s.jsx)(i.N_,{to:t.href,className:"hover:text-foreground transition-colors duration-200",children:t.label})]},t.key))})}function u(e){let{t}=(0,n.Bd)(),r=(0,s.jsxs)("span",{className:"text-muted-foreground/45",children:["© ",e.currentYear," ",(0,s.jsx)("a",{href:"https://github.com/QuantumNous/new-api",target:"_blank",rel:"noopener noreferrer",className:"text-foreground/70 hover:text-foreground font-medium transition-colors",children:t("New API")}),". ",t("footer.newapi.projectAttributionSuffix")]});return e.inline?r:(0,s.jsx)("div",{className:"text-muted-foreground/45 text-center text-xs sm:text-right",children:r})}function p(e){let{t}=(0,n.Bd)(),{systemName:r,logo:l,footerHtml:o,demoSiteEnabled:p}=(0,d.R)(),h=l||e.logo||"/logo.png",g=r||e.name||"New API",f=new Date().getFullYear(),b=(0,a.useMemo)(()=>[{title:t("footer.columns.about.title"),links:[{text:t("footer.columns.about.links.aboutProject"),href:"https://docs.newapi.pro/wiki/project-introduction/"},{text:t("footer.columns.about.links.contact"),href:"https://docs.newapi.pro/support/community-interaction/"},{text:t("footer.columns.about.links.features"),href:"https://docs.newapi.pro/wiki/features-introduction/"}]},{title:t("footer.columns.docs.title"),links:[{text:t("footer.columns.docs.links.quickStart"),href:"https://docs.newapi.pro/getting-started/"},{text:t("footer.columns.docs.links.installation"),href:"https://docs.newapi.pro/installation/"},{text:t("footer.columns.docs.links.apiDocs"),href:"https://docs.newapi.pro/api/"}]},{title:t("footer.columns.related.title"),links:[{text:t("footer.columns.related.links.oneApi"),href:"https://github.com/songquanpeng/one-api"},{text:t("footer.columns.related.links.midjourney"),href:"https://github.com/novicezk/midjourney-proxy"},{text:t("footer.columns.related.links.newApiKeyTool"),href:"https://github.com/Calcium-Ion/new-api-key-tool"}]}],[t]),j=e.columns??b;return o?(0,s.jsx)("footer",{className:(0,c.cn)("border-border/40 relative z-10 border-t",e.className),children:(0,s.jsx)("div",{className:"mx-auto w-full max-w-6xl px-6 py-5",children:(0,s.jsxs)("div",{className:"bg-muted/20 border-border/50 flex flex-col items-center justify-between gap-4 rounded-2xl border px-4 py-4 backdrop-blur-sm sm:flex-row sm:px-5",children:[(0,s.jsx)("div",{className:"custom-footer text-muted-foreground min-w-0 text-center text-sm sm:text-left",dangerouslySetInnerHTML:{__html:o}}),(0,s.jsxs)("div",{className:"border-border/60 text-muted-foreground/45 flex w-full flex-wrap items-center justify-center gap-x-3 gap-y-1 border-t pt-4 text-xs sm:w-auto sm:justify-end sm:border-t-0 sm:border-l sm:pt-0 sm:pl-5",children:[(0,s.jsx)(x,{}),(0,s.jsx)(u,{currentYear:f,inline:!0})]})]})})}
2):(0,s.jsx)("footer",{className:(0,c.cn)("border-border/40 relative z-10 border-t",e.className),children:(0,s.jsxs)("div",{className:"mx-auto max-w-6xl px-6 py-12 md:py-16",children:[(0,s.jsxs)("div",{className:"flex flex-col justify-between gap-10 md:flex-row md:gap-16",children:[(0,s.jsxs)("div",{className:"shrink-0",children:[(0,s.jsxs)(i.N_,{to:"/",className:"group flex items-center gap-2.5",children:[(0,s.jsx)("img",{src:h,alt:g,className:"size-7 rounded-lg object-contain"}),(0,s.jsx)("span",{className:"text-sm font-semibold tracking-tight",children:g})]}),(0,s.jsx)("p",{className:"text-muted-foreground/60 mt-3 max-w-[200px] text-xs leading-relaxed",children:t("Powerful API Management Platform")})]}),!!p&&(0,s.jsx)("div",{className:"grid grid-cols-3 gap-8 md:gap-16",children:j.map((e,r)=>(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"text-muted-foreground/50 mb-3 text-xs font-medium tracking-wider uppercase",children:t(e.title)}),(0,s.jsx)("ul",{className:"space-y-2.5",children:e.links.map((e,t)=>(0,s.jsx)("li",{children:(0,s.jsx)(m,{link:e})},t))})]},r))})]}),(0,s.jsxs)("div",{className:"border-border/30 mt-12 flex flex-col items-center justify-between gap-x-3 gap-y-2 border-t pt-6 sm:flex-row",children:[(0,s.jsxs)("div",{className:"text-muted-foreground/40 flex flex-wrap items-center justify-center gap-x-2 gap-y-1 text-xs sm:justify-start",children:[(0,s.jsxs)("span",{children:["© ",f," ",g,"."," ",e.copyright??t("footer.defaultCopyright")]}),(0,s.jsx)(x,{leadingSeparator:!0})]}),(0,s.jsx)(u,{currentYear:f})]})]})})}var h=r(93375),g=r(66197),f=r(39369),b=r(65965),j=r(9278);function v(e){let{as:t="div",delay:r=0,threshold:n=.15,animation:l="fade-up",once:i=!0}=e,o=(0,a.useRef)(null);return(0,a.useEffect)(()=>{let e=o.current;if(!e)return;if(window.matchMedia("(prefers-reduced-motion: reduce)").matches){e.classList.remove("opacity-0"),e.classList.add(`landing-animate-${l}`);return}let t=new IntersectionObserver(r=>{let[s]=r;s.isIntersecting?(e.classList.remove("opacity-0"),e.classList.add(`landing-animate-${l}`),i&&t.unobserve(e)):i||(e.classList.add("opacity-0"),e.classList.remove(`landing-animate-${l}`))},{threshold:n,rootMargin:"0px 0px -40px 0px"});return t.observe(e),()=>t.disconnect()},[n,i,l]),(0,s.jsx)(t,{ref:o,className:(0,c.cn)("opacity-0 will-change-[transform,opacity]",e.className),style:{animationDelay:r?`${r}ms`:void 0},children:e.children})}var y=r(73178);function k(e){let{t}=(0,n.Bd)();return e.isAuthenticated?null:(0,s.jsxs)("section",{className:"relative z-10 overflow-hidden px-6 py-24 md:py-32",children:[(0,s.jsx)("div",{"aria-hidden":!0,className:"absolute inset-0 -z-10 opacity-20 dark:opacity-[0.08]",style:{background:"radial-gradient(ellipse 50% 50% at 30% 50%, oklch(0.7 0.15 250 / 70%) 0%, transparent 70%), radial-gradient(ellipse 40% 40% at 70% 40%, oklch(0.65 0.12 200 / 50%) 0%, transparent 70%)"}}),(0,s.jsxs)(v,{className:"mx-auto max-w-2xl text-center",animation:"scale-in",children:[(0,s.jsxs)("h2",{className:"text-2xl leading-tight font-bold tracking-tight md:text-4xl",children:[t("Ready to simplify"),(0,s.jsx)("br",{}),(0,s.jsx)("span",{className:"bg-gradient-to-r from-blue-400 via-violet-400 to-purple-500 bg-clip-text text-transparent",children:t("your AI integration?")})]}),(0,s.jsx)("p",{className:"text-muted-foreground/80 mx-auto mt-5 max-w-md text-sm leading-relaxed md:text-base",children:t("Deploy your own gateway and start routing requests through your configured upstream services.")}),(0,s.jsxs)("div",{className:"mt-8 flex items-center justify-center gap-3",children:[(0,s.jsxs)(y.$,{className:"group rounded-lg",render:(0,s.jsx)(i.N_,{to:"/sign-up"}),children:[t("Get Started"),(0,s.jsx)(j.A,{className:"ml-1 size-3.5 transition-transform duration-200 group-hover:translate-x-0.5"})]}),(0,s.jsx)(y.$,{variant:"outline",className:"border-border/50 hover:border-border hover:bg-muted/50 rounded-lg",render:(0,s.jsx)(i.N_,{to:"/pricing"}),children:t("View Pricing")})]})]})]})}var N=r(8585),w=r(95535),A=r(41948),_=r(13663),z=r(37417),C=r(70380),M=r(77108);let I=(0,r(40946).A)("heart-handshake",[["path",{d:"M19.414 14.414C21 12.828 22 11.5 22 9.5a5.5 5.5 0 0 0-9.591-3.676.6.6 0 0 1-.818.001A5.5 5.5 0 0 0 2 9.5c0 2.3 1.5 4 3 5.5l5.535 5.362a2 2 0 0 0 2.879.052 2.12 2.12 0 0 0-.004-3 2.124 2.124 0 1 0 3-3 2.124 2.124 0 0 0 3.004 0 2 2
20 0 0 0-2.828l-1.881-1.882a2.41 2.41 0 0 0-3.409 0l-1.71 1.71a2 2 0 0 1-2.828 0 2 2 0 0 1 0-2.828l2.823-2.762",key:"17lmqv"}]]);function S(e){let{t}=(0,n.Bd)(),r=[{id:"fast",num:"01",title:t("Lightning Fast"),desc:t("Optimized network architecture ensures millisecond response times"),span:"md:col-span-2",icon:(0,s.jsx)(N.A,{className:"size-4 text-blue-400"}),visual:(0,s.jsx)("div",{className:"mt-4 grid grid-cols-3 gap-2",children:["OpenAI","Claude","Gemini","DeepSeek","Qwen","Llama"].map(e=>(0,s.jsx)("div",{className:"border-border/30 bg-muted/20 text-muted-foreground flex items-center justify-center rounded-lg border px-3 py-2 text-xs transition-colors duration-300 hover:border-blue-500/30 hover:bg-blue-500/5",children:e},e))})},{id:"secure",num:"02",title:t("Secure & Reliable"),desc:t("Enterprise-grade security with comprehensive permission management"),span:"md:col-span-1",icon:(0,s.jsx)(w.A,{className:"size-4 text-emerald-400"}),visual:(0,s.jsx)("div",{className:"mt-4 flex items-center justify-center",children:(0,s.jsxs)("div",{className:"relative",children:[(0,s.jsx)("div",{className:"flex size-16 items-center justify-center rounded-2xl border border-emerald-500/20 bg-emerald-500/5",children:(0,s.jsx)(w.A,{className:"size-7 text-emerald-500/70",strokeWidth:1.5})}),(0,s.jsx)("div",{className:"absolute -top-1 -right-1 flex size-4 items-center justify-center rounded-full bg-emerald-500",children:(0,s.jsx)("svg",{className:"size-2.5 text-white",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:3,children:(0,s.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m4.5 12.75 6 6 9-13.5"})})})]})})},{id:"global",num:"03",title:t("Global Coverage"),desc:t("Multi-region deployment for stable global access"),span:"md:col-span-1",icon:(0,s.jsx)(A.A,{className:"size-4 text-violet-400"}),visual:(0,s.jsx)("div",{className:"mt-4 space-y-2",children:[t("Load Balancing"),t("Rate Limiting"),t("Cost Tracking")].map((e,t)=>(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("div",{className:`flex size-6 items-center justify-center rounded-full text-[10px] font-bold ${1===t?"border border-blue-500/30 bg-blue-500/20 text-blue-500":"border-border/40 bg-muted text-muted-foreground border"}`,children:t+1}),(0,s.jsx)("div",{className:"bg-border/40 h-px flex-1"}),(0,s.jsx)("span",{className:"text-muted-foreground text-xs",children:e})]},e))})},{id:"developer",num:"04",title:t("Developer Friendly"),desc:t("Compatible API routes for common AI application workflows"),span:"md:col-span-2",icon:(0,s.jsx)(_.A,{className:"size-4 text-amber-400"}),visual:(0,s.jsxs)("div",{className:"mt-4 flex items-center gap-3",children:[(0,s.jsx)("div",{className:"flex -space-x-2",children:["API","SDK","CLI","Docs"].map(e=>(0,s.jsx)("div",{className:"border-background from-muted to-muted/60 text-muted-foreground flex size-8 items-center justify-center rounded-full border-2 bg-gradient-to-br text-[9px] font-bold",children:e},e))}),(0,s.jsxs)("div",{className:"text-muted-foreground flex items-center gap-1.5 text-xs",children:[(0,s.jsx)(_.A,{className:"size-3.5 text-blue-500"}),t("Multi-protocol Compatible")]})]})}],a=[{icon:(0,s.jsx)(z.A,{className:"size-5",strokeWidth:1.5}),title:t("High Performance"),desc:t("Support for high concurrency with automatic load balancing")},{icon:(0,s.jsx)(C.A,{className:"size-5",strokeWidth:1.5}),title:t("Transparent Billing"),desc:t("Pay-as-you-go with real-time usage monitoring")},{icon:(0,s.jsx)(M.A,{className:"size-5",strokeWidth:1.5}),title:t("Team Collaboration"),desc:t("Multi-user management with flexible permission allocation")},{icon:(0,s.jsx)(I,{className:"size-5",strokeWidth:1.5}),title:t("Open Source"),desc:t("Community driven, self-hosted, and extensible")}];return(0,s.jsx)("section",{className:"relative z-10 px-6 py-24 md:py-32",children:(0,s.jsxs)("div",{className:"mx-auto max-w-6xl",children:[(0,s.jsxs)(v,{className:"mb-16 max-w-lg",children:[(0,s.jsx)("p",{className:"text-muted-foreground mb-3 text-xs font-medium tracking-widest uppercase",children:t("Core Features")}),(0,s.jsxs)("h2",{className:"text-2xl leading-tight font-bold tracking-tight md:text-3xl",children:[t("Built for developers,"),(0,s.jsx)("br",{}),t("designed for scale")]})]}),(0,s.jsx)("div",{className:"border-border/40 bg-border/40 grid gap-px overflow-hidden rounded-xl border md:grid-cols-3",children:r.map((e,t)=>(0,s.jsxs)(v,{delay:100*t,animation:"scale-in",className:`bg-background group hover:bg-muted/20 p-7 transition-colors duration-300 md:p-8 ${e.span}`,children:[(0,s.jsxs)("div",{className:"mb-3 flex items-center gap-3",children:[(0,s.jsx)("span",{className:"border-border/40 bg-muted text-muted-foreground flex size-7 items-center justify-center rounded-md border text-[10px] font-semibold tabular-nums",children:e.num}),(0,s.jsx)("h3",{className:"text-sm font-semibold",children:e.title})]}),(0,s.jsx)("p",{className:"text-muted-foreground text-sm leading-relaxed",children:e.desc}),e.visual]},e.id))}),(0,s.jsx)("div",{className:"mt-12 grid grid-cols-2 gap-8 md:grid-cols-4 md:gap-12",children:a.map((e,t)=>(0,s.jsxs)(v,{delay:100*t,animation:"fade-up",className:"flex flex-col items-center text-center",children:[(0,s.jsx)("div",{className:"text-muted-foreground border-border/50 bg-muted/30 group-hover:text-foreground mb-3 flex size-12 items-center justify-center rounded-xl border transition-colors",children:e.icon}),(0,s.jsx)("h3",{className:"mb-1.5 text-sm font-semibold",children:e.title}),(0,s.jsx)("p",{className:"text-muted-foreground max-w-[200px] text-xs leading-relaxed",children:e.desc})]},e.title))})]})})}var $=r(57053),P=r(68328);let T={emerald:{activeText:"text-emerald-600 dark:text-emerald-400",activeBorder:"border-emerald-500 dark:border-emerald-400",badge:"bg-emerald-500/10 text-emerald-600 dark:bg-emerald-400/10 dark:text-emerald-400"}
2,amber:{activeText:"text-amber-600 dark:text-amber-400",activeBorder:"border-amber-500 dark:border-amber-400",badge:"bg-amber-500/10 text-amber-600 dark:bg-amber-400/10 dark:text-amber-400"},blue:{activeText:"text-blue-600 dark:text-blue-400",activeBorder:"border-blue-500 dark:border-blue-400",badge:"bg-blue-500/10 text-blue-600 dark:bg-blue-400/10 dark:text-blue-400"},violet:{activeText:"text-violet-600 dark:text-violet-400",activeBorder:"border-violet-500 dark:border-violet-400",badge:"bg-violet-500/10 text-violet-600 dark:bg-violet-400/10 dark:text-violet-400"}},B=[{id:"gpt-chat",label:"Chat",method:"POST",endpoint:"/v1/chat/completions",headers:['"Authorization: Bearer sk-â¢â¢â¢â¢"'],request:['"model": "your-model",','"messages": [',' { "role": "user", "content": "..." }',"]"],response:["{",' "choices": [{ "message": { "content": <text> } }],',' "usage": { "total_tokens": <tokens> }',"}"],responseHighlights:["<text>","<tokens>"],tokens:27,latency:142,accent:"emerald"},{id:"responses",label:"Responses",method:"POST",endpoint:"/v1/responses",headers:['"Authorization: Bearer sk-â¢â¢â¢â¢"'],request:['"model": "your-model",','"input": "..."'],response:["{",' "output": [{ "type": "output_text", "text": <text> }],',' "usage": { "total_tokens": <tokens> }',"}"],responseHighlights:["<text>","<tokens>"],tokens:31,latency:168,accent:"amber"},{id:"claude",label:"Claude",method:"POST",endpoint:"/v1/messages",headers:['"x-api-key: sk-â¢â¢â¢â¢"','"anthropic-version: 2023-06-01"'],request:['"model": "your-model",','"max_tokens": 1024,','"messages": [',' { "role": "user", "content": "..." }',"]"],response:["{",' "content": [{ "type": "text", "text": <text> }],',' "usage": { "input_tokens": <in>, "output_tokens": <out> }',"}"],responseHighlights:["<text>","<in>","<out>"],tokens:29,latency:156,accent:"blue"},{id:"gemini",label:"Gemini",method:"POST",endpoint:"/v1beta/models/{model}:generateContent",headers:['"x-goog-api-key: sk-â¢â¢â¢â¢"'],request:['"contents": [',' { "role": "user",',' "parts": [{ "text": "..." }] }',"]"],response:["{",' "candidates": [{ "content": { "parts": [{ "text": <text> }] } }],',' "usageMetadata": { "totalTokenCount": <tokens> }',"}"],responseHighlights:["<text>","<tokens>"],tokens:25,latency:93,accent:"violet"}];function q(e){let[t,r]=(0,a.useState)(0),[n,l]=(0,a.useState)(!1),i=(0,a.useRef)(void 0),o=(0,a.useRef)(void 0);(0,a.useEffect)(()=>{if(!window.matchMedia("(prefers-reduced-motion: reduce)").matches)return i.current=setInterval(()=>{l(!0),o.current=setTimeout(()=>{r(e=>(e+1)%B.length),l(!1)},220)},4500),()=>{i.current&&clearInterval(i.current),o.current&&clearTimeout(o.current)}},[]);let d=B[t],m=T[d.accent];return(0,s.jsx)("div",{className:(0,c.cn)("mx-auto w-full max-w-2xl",e.className),children:(0,s.jsxs)("div",{className:(0,c.cn)("overflow-hidden rounded-2xl border backdrop-blur-sm","border-border/60 bg-white/95 shadow-[0_20px_50px_-25px_rgba(15,23,42,0.18)]","dark:border-white/[0.06] dark:bg-[#0b0f17]/95 dark:shadow-[0_20px_60px_-25px_rgba(0,0,0,0.7)]"),children:[(0,s.jsxs)("div",{className:(0,c.cn)("flex items-center gap-1 border-b px-2 sm:gap-1.5 sm:px-3","border-border/50 dark:border-white/[0.05]"),children:[B.map((e,a)=>{let n=T[e.accent];return(0,s.jsx)("button",{onClick:()=>{a!==t&&(i.current&&clearInterval(i.current),o.current&&clearTimeout(o.current),l(!0),o.current=setTimeout(()=>{r(a),l(!1)},220))},className:(0,c.cn)("relative -mb-px flex items-center gap-1.5 border-b-2 px-2.5 py-2.5 text-[11px] font-medium tracking-wide transition-colors sm:px-3 sm:text-xs",a===t?`${n.activeBorder} ${n.activeText}`:"text-foreground/40 hover:text-foreground/70 border-transparent"),children:e.label},e.id)}),(0,s.jsxs)("div",{className:"ml-auto flex items-center gap-2 pr-2 sm:pr-3",children:[(0,s.jsx)("span",{className:"inline-block size-1.5 rounded-full bg-emerald-500 shadow-[0_0_8px_rgba(16,185,129,0.45)]"}),(0,s.jsx)("span",{className:"text-foreground/40 font-mono text-[10px] tracking-wider uppercase",children:"200 ok"})]})]}),(0,s.jsxs)("div",{className:(0,c.cn)("flex items-center gap-2.5 border-b px-5 py-3","border-border/40 dark:border-white/[0.04]"),children:[(0,s.jsx)("span",{className:(0,
2c.cn)("rounded-md px-1.5 py-0.5 font-mono text-[10px] font-semibold tracking-wider",m.badge),children:d.method}),(0,s.jsx)("code",{className:(0,c.cn)("text-foreground/75 truncate font-mono text-[12.5px] transition-opacity duration-200",n?"opacity-0":"opacity-100"),children:d.endpoint})]}),(0,s.jsxs)("div",{className:"grid h-[400px] grid-rows-[235px_minmax(0,1fr)] font-mono text-[12.5px] leading-[1.55]",children:[(0,s.jsx)(D,{demo:d,transitioning:n}),(0,s.jsx)(L,{demo:d,transitioning:n})]}),(0,s.jsxs)("div",{className:(0,c.cn)("flex items-center justify-between border-t px-5 py-2.5","border-border/40 bg-muted/30 dark:border-white/[0.05] dark:bg-white/[0.02]"),children:[(0,s.jsxs)("div",{className:"text-foreground/40 flex items-center gap-3 text-[10px] tabular-nums",children:[(0,s.jsxs)("span",{className:"flex items-center gap-1",children:[(0,s.jsx)("span",{className:"font-mono",children:d.latency}),(0,s.jsx)("span",{className:"tracking-wider uppercase",children:"ms"})]}),(0,s.jsx)("span",{className:"bg-foreground/15 size-1 rounded-full"}),(0,s.jsxs)("span",{className:"flex items-center gap-1",children:[(0,s.jsx)("span",{className:"font-mono",children:d.tokens}),(0,s.jsx)("span",{className:"tracking-wider uppercase",children:"tokens"})]}
2),(0,s.jsx)("span",{className:"bg-foreground/15 size-1 rounded-full"}),(0,s.jsxs)("span",{className:"flex items-center gap-1",children:[(0,s.jsx)("span",{className:"tracking-wider uppercase",children:"cost"}),(0,s.jsxs)("span",{className:"font-mono",children:["$",(3e-5*d.tokens).toFixed(5)]})]})]}),(0,s.jsx)("span",{className:"text-foreground/30 font-mono text-[10px] tracking-wider uppercase",children:"stream · sse"})]})]})})}function D(e){let{demo:t,transitioning:r}=e;return(0,s.jsxs)("div",{className:"relative px-5 py-4",children:[(0,s.jsx)(F,{children:"Request"}),(0,s.jsxs)("div",{className:(0,c.cn)("mt-2 transition-opacity duration-200",r?"opacity-0":"opacity-100"),children:[(0,s.jsxs)(O,{children:[(0,s.jsx)(E,{children:"curl"})," ",(0,s.jsx)(G,{children:"-X"})," ",(0,s.jsx)(G,{children:"POST"})," ",(0,s.jsxs)(K,{children:['"',t.endpoint,'"']})," ",(0,s.jsx)(U,{children:"\\"})]}),t.headers.map(e=>(0,s.jsxs)(O,{indent:2,children:[(0,s.jsx)(G,{children:"-H"})," ",(0,s.jsx)(K,{children:e})," ",(0,s.jsx)(U,{children:"\\"})]},e)),(0,s.jsxs)(O,{indent:2,children:[(0,s.jsx)(G,{children:"-d"})," ",(0,s.jsxs)(K,{children:["'","{"]})]}),t.request.map((e,t)=>{var r;return(0,s.jsx)(O,{indent:4,children:(r=e).trim()?H(r):(0,s.jsx)(U,{children:" "})},t)}),(0,s.jsx)(O,{indent:2,children:(0,s.jsxs)(K,{children:["}","'"]})})]})]})}function L(e){let{demo:t,transitioning:r}=e;return(0,s.jsxs)("div",{className:(0,c.cn)("relative border-t px-5 py-4","border-border/40 bg-muted/20 dark:border-white/[0.05] dark:bg-white/[0.015]"),children:[(0,s.jsx)(F,{children:"Response"}),(0,s.jsx)("div",{className:(0,c.cn)("mt-2 transition-opacity duration-200",r?"opacity-0":"opacity-100"),children:t.response.map((e,r)=>(0,s.jsx)(O,{children:function(e,t){if(!e.trim())return(0,s.jsx)(U,{children:" "});let r=[],a=0,n=[...e.matchAll(W)];return 0===n.length?H(e):(n.forEach((n,l)=>{let i=n.index??0;i>a&&r.push((0,s.jsx)("span",{children:H(e.slice(a,i))},`pre-${l}`));let o=n[0];"<text>"===o?r.push((0,s.jsx)(Q,{accent:t.accent,children:`"${{"gpt-chat":"Chat request routed.",responses:"Response workflow ready.",claude:"Claude message routed.",gemini:"Gemini request served."}[t.id]??"..."}"`},`ph-${l}`)):"<tokens>"===o?r.push((0,s.jsx)(Y,{children:t.tokens},`ph-${l}`)):"<in>"===o?r.push((0,s.jsx)(Y,{children:Math.floor(.4*t.tokens)},`ph-${l}`)):"<out>"===o?r.push((0,s.jsx)(Y,{children:Math.ceil(.6*t.tokens)},`ph-${l}`)):r.push((0,s.jsx)(U,{children:o},`ph-${l}`)),a=i+o.length}),a<e.length&&r.push((0,s.jsx)("span",{children:H(e.slice(a))},"tail")),r)}(e,t)},r))})]})}function F(e){return(0,s.jsx)("span",{className:"text-foreground/30 font-sans text-[10px] font-semibold tracking-[0.18em] uppercase",children:e.children})}let R=/"[^"]*"/g,W=/<[a-z]+>/gi;function H(e){let t=[],r=0;return[...e.matchAll(R)].forEach((a,n)=>{let l=a.index??0;l>r&&t.push((0,s.jsx)(U,{children:e.slice(r,l)},`m-${n}`));let i=a[0];e.slice(l+i.length).trimStart().startsWith(":")?t.push((0,s.jsx)(V,{children:i},`k-${n}`)):t.push((0,s.jsx)(K,{children:i},`s-${n}`)),r=l+i.length}),r<e.length&&t.push((0,s.jsx)(U,{children:e.slice(r)},"tail")),t}function O(e){return(0,s.jsxs)("div",{className:"break-words whitespace-pre-wrap",children:[e.indent?(0,s.jsx)("span",{"aria-hidden":!0,className:"inline-block",style:{width:`${e.indent}ch`}}):null,e.children]})}function E(e){return(0,s.jsx)("span",{className:"font-medium text-emerald-600 dark:text-emerald-400",children:e.children})}function G(e){return(0,s.jsx)("span",{className:"text-blue-600 dark:text-blue-400",children:e.children})}function V(e){return(0,s.jsx)("span",{className:"text-sky-700 dark:text-sky-300",children:e.children})}function K(e){return(0,s.jsx)("span",{className:"text-amber-700 dark:text-amber-300",children:e.children})}function Y(e){return(0,s.jsx)("span",{className:"font-medium text-violet-600 dark:text-violet-300",children:e.children})}function U(e){return(0,s.jsx)("span",{className:"text-foreground/55",children:e.children})}function Q(e){let t=T[e.accent];return(0,s.jsx)("span",{className:(0,c.cn)("font-medium",t.activeText),children:e.children})}let X=()=>
2(0,s.jsxs)("svg",{className:"text-muted-foreground/60 group-hover:text-foreground size-6 shrink-0 transition-colors",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,s.jsx)("circle",{cx:"6",cy:"12",r:"2",fill:"currentColor"}),(0,s.jsx)("circle",{cx:"12",cy:"12",r:"2",fill:"currentColor"}),(0,s.jsx)("circle",{cx:"18",cy:"12",r:"2",fill:"currentColor"})]});function J(e){let{t}=(0,n.Bd)(),{status:r}=(0,o.s)(),a=r?.docs_link||"https://docs.newapi.pro",l=()=>a.startsWith("http")?(0,s.jsxs)(y.$,{variant:"outline",className:"group border-border/50 hover:border-border hover:bg-muted/50 inline-flex h-11 items-center gap-1.5 rounded-lg px-5 text-sm font-medium",render:(0,s.jsx)("a",{href:a,target:"_blank",rel:"noopener noreferrer"}),children:[(0,s.jsx)(P.A,{className:"text-muted-foreground/80 group-hover:text-foreground size-4 transition-colors duration-200"}),(0,s.jsx)("span",{children:t("Docs")})]}):(0,s.jsxs)(y.$,{variant:"outline",className:"group border-border/50 hover:border-border hover:bg-muted/50 inline-flex h-11 items-center gap-1.5 rounded-lg px-5 text-sm font-medium",render:(0,s.jsx)(i.N_,{to:a}),children:[(0,s.jsx)(P.A,{className:"text-muted-foreground/80 group-hover:text-foreground size-4 transition-colors duration-200"}),(0,s.jsx)("span",{children:t("Docs")})]});return(0,s.jsxs)("section",{className:"relative z-10 overflow-hidden px-6 pt-24 pb-16 md:pt-32 md:pb-24 lg:pt-36 lg:pb-28",children:[(0,s.jsx)("div",{"aria-hidden":!0,className:"pointer-events-none absolute inset-0 -z-10 opacity-25 dark:opacity-[0.12]",style:{background:"radial-gradient(ellipse 60% 50% at 20% 20%, oklch(0.72 0.18 250 / 80%) 0%, transparent 70%), radial-gradient(ellipse 50% 40% at 80% 15%, oklch(0.65 0.15 200 / 60%) 0%, transparent 70%), radial-gradient(ellipse 40% 35% at 40% 80%, oklch(0.70 0.12 280 / 40%) 0%, transparent 70%)"}}),(0,s.jsx)("div",{"aria-hidden":!0,className:"absolute inset-0 -z-10 bg-[linear-gradient(to_right,var(--border)_1px,transparent_1px),linear-gradient(to_bottom,var(--border)_1px,transparent_1px)] [mask-image:radial-gradient(ellipse_60%_50%_at_50%_30%,black_20%,transparent_100%)] bg-[size:4rem_4rem] opacity-[0.08]"}),(0,s.jsxs)("div",{className:"mx-auto grid max-w-6xl grid-cols-1 items-start gap-12 lg:grid-cols-12 lg:gap-8",children:[(0,s.jsxs)("div",{className:"flex flex-col items-start text-left lg:col-span-6",children:[(0,s.jsxs)("div",{className:"landing-animate-fade-up mb-5 inline-flex items-center gap-1.5 rounded-full border border-blue-500/20 bg-blue-500/5 px-3 py-1.5 text-[11px] font-medium text-blue-600 opacity-0 shadow-xs dark:border-blue-400/20 dark:bg-blue-400/5 dark:text-blue-400",style:{animationDelay:"0ms"},children:[(0,s.jsxs)("span",{className:"relative flex size-1.5",children:[(0,s.jsx)("span",{className:"absolute inline-flex h-full w-full animate-ping rounded-full bg-blue-400 opacity-75"}),(0,s.jsx)("span",{className:"relative inline-flex size-1.5 rounded-full bg-blue-500 dark:bg-blue-400"})]}),(0,s.jsx)("span",{children:t("AI Application Infrastructure Foundation")})]}),(0,s.jsxs)("h1",{className:"landing-animate-fade-up text-[clamp(2.25rem,4.5vw,3.25rem)] leading-[1.15] font-bold tracking-tight",style:{animationDelay:"60ms"},children:[t("Unified API Gateway for"),(0,s.jsx)("br",{}),(0,s.jsx)("span",{className:"bg-gradient-to-r from-blue-400 via-violet-400 to-purple-500 bg-clip-text text-transparent",children:t("Vast Range of AI Models")})]}),(0,s.jsx)("p",{className:"landing-animate-fade-up text-muted-foreground/80 mt-5 max-w-xl text-base leading-relaxed opacity-0 md:text-[15px]",style:{animationDelay:"120ms"},children:t("Access a vast selection of models via a standard, unified API protocol. Power AI applications, manage digital assets, and connect the Future.")}),(0,s.jsx)("div",{className:"landing-animate-fade-up mt-8 flex flex-wrap items-center gap-3 opacity-0",style:{animationDelay:"180ms"},children:e.isAuthenticated?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(y.$,{className:"group h-11 rounded-lg px-5 text-sm font-medium",render:(0,s.jsx)(i.N_,{to:"/dashboard"}),children:[t("Go to Dashboard"),(0,s.jsx)(j.A,{className:"ml-1.5 size-4 transition-transform duration-200 group-hover:translate-x-0.5"})]}),l()]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(y.$,{className:"group h-11 rounded-lg px-5 text-sm font-medium",render:(0,s.jsx)(i.N_,{to:"/sign-up"}),children:[t("Get Started"),(0,s.jsx)(j.A,{className:"ml-1.5 size-4 transition-transform duration-200 group-hover:translate-x-0.5"})]}),(0,s.jsx)(y.$,{variant:"outline",className:"border-border/50 hover:border-border hover:bg-muted/50 h-11 rounded-lg px-5 text-sm font-medium",render:(0,s.jsx)(i.N_,{to:"/pricing"}),children:t("View Pricing")}),l()]})}),(0,s.jsxs)("div",{className:"landing-animate-fade-up mt-10 w-full max-w-xl opacity-0",style:{animationDelay:"240ms"},children:[(0,s.jsxs)("div",{className:"mb-4 flex flex-col gap-1",children:[(0,s.jsx)("span",{className:"text-muted-foreground
2/50 text-[10px] font-bold tracking-[0.15em] uppercase",children:t("Supported Applications")}),(0,s.jsx)("p",{className:"text-muted-foreground/60 text-xs leading-relaxed",children:t("Supports one-click configuration and perfectly adapts to NewAPI multi-protocol configuration.")})]}),(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,s.jsxs)("a",{href:"https://cherry-ai.com",target:"_blank",rel:"noopener noreferrer",className:"group border-border/40 bg-muted/15 text-foreground/80 hover:border-border hover:bg-muted/30 hover:text-foreground flex items-center gap-3 rounded-full border px-5 py-2.5 text-sm font-medium shadow-[0_1px_2.5px_rgba(0,0,0,0.01)] backdrop-blur-xs transition-all duration-300 hover:scale-[1.02]",children:[(0,s.jsx)($.A.Color,{size:24,className:"shrink-0"}),(0,s.jsx)("span",{children:"Cherry Studio"})]}),(0,s.jsxs)("a",{href:"https://ccswitch.io",target:"_blank",rel:"noopener noreferrer",className:"group border-border/40 bg-muted/15 text-foreground/80 hover:border-border hover:bg-muted/30 hover:text-foreground flex items-center gap-3 rounded-full border px-5 py-2.5 text-sm font-medium shadow-[0_1px_2.5px_rgba(0,0,0,0.01)] backdrop-blur-xs transition-all duration-300 hover:scale-[1.02]",children:[(0,s.jsx)("img",{src:"https://ccswitch.io/favicon.png",alt:"CC Switch",className:"size-6 shrink-0 rounded-md object-contain",onError:e=>{e.currentTarget.style.display="none";let t=e.currentTarget.nextSibling;t&&(t.style.display="flex")}}),(0,s.jsx)("span",{style:{display:"none"},className:"size-6 shrink-0 items-center justify-center rounded-md bg-blue-500/10 text-[10px] font-bold text-blue-600 dark:bg-blue-400/10 dark:text-blue-400",children:"CC"}),(0,s.jsx)("span",{children:"CC Switch"})]}),(0,s.jsxs)("div",{className:"group border-border/40 bg-muted/15 text-foreground/55 hover:border-border hover:bg-muted/30 hover:text-foreground flex cursor-default items-center gap-2.5 rounded-full border px-5 py-2.5 text-sm font-medium shadow-[0_1px_2.5px_rgba(0,0,0,0.01)] backdrop-blur-xs transition-all duration-300 hover:scale-[1.02]",children:[(0,s.jsx)(X,{}),(0,s.jsx)("span",{children:t("More Apps")})]})]})]})]}),(0,s.jsx)("div",{className:"landing-animate-fade-up flex w-full justify-center opacity-0 lg:col-span-6",style:{animationDelay:"320ms"},children:(0,s.jsx)(q,{className:"mt-8 lg:mt-0"})})]})]})}var Z=r(35671),ee=r(23027);function et(){let{t:e}=(0,n.Bd)(),t=[{num:"1",title:e("Configure"),desc:e("Add your API keys, set up channels and configure access permissions"),icon:(0,s.jsx)(Z.A,{className:"size-6",strokeWidth:1.5})},{num:"2",title:e("Connect"),desc:e("Connect through OpenAI, Claude, Gemini, and other compatible API routes"),icon:(0,s.jsx)(N.A,{className:"size-6",strokeWidth:1.5})},{num:"3",title:e("Monitor"),desc:e("Track usage, costs and performance with real-time analytics"),icon:(0,s.jsx)(ee.A,{className:"size-6",strokeWidth:1.5})}];return(0,s.jsx)("section",{className:"border-border/40 relative z-10 border-t px-6 py-24 md:py-32",children:(0,s.jsxs)("div",{className:"mx-auto max-w-6xl",children:[(0,s.jsxs)(v,{className:"mb-16 text-center md:mb-20",children:[(0,s.jsx)("p",{className:"text-muted-foreground mb-3 text-xs font-medium tracking-widest uppercase",children:e("How It Works")}),(0,s.jsx)("h2",{className:"text-2xl font-bold tracking-tight md:text-3xl",children:e("Three steps to get started")})]}),(0,s.jsx)("div",{className:"grid gap-8 md:grid-cols-3 md:gap-12",children:t.map((e,t)=>(0,s.jsxs)(v,{delay:150*t,animation:"fade-up",className:"relative flex flex-col items-center text-center",children:[(0,s.jsxs)("div",{className:"relative mb-6",children:[(0,s.jsx)("div",{className:"text-muted-foreground border-border/50 bg-muted/30 flex size-16 items-center justify-center rounded-2xl border transition-colors",children:e.icon}),(0,s.jsx)("div",{className:"bg-foreground text-background absolute -top-2 -right-2 flex size-6 items-center justify-center rounded-full text-xs font-bold",children:e.num})]}),(0,s.jsx)("h3",{className:"mb-2 text-base font-semibold",children:e.title}),(0,s.jsx)("p",{className:"text-muted-foreground max-w-[240px] text-sm leading-relaxed",children:e.desc})]},e.num))})]})})}function er(e){let{end:t,suffix:r="",prefix:n="",duration:l=1600,decimals:i=0}=e,o=(0,a.useRef)(null),d=(0,a.useRef)(!1),c=(0,a.useCallback)(e=>i>
20?e.toFixed(i):Math.round(e).toLocaleString(),[i]),m=(0,a.useCallback)(()=>{let e=o.current;if(!e)return;let s=performance.now(),a=i=>{let o=Math.min((i-s)/l,1),d=1-Math.pow(1-o,3);e.textContent=`${n}${c(d*t)}${r}`,o<1&&requestAnimationFrame(a)};requestAnimationFrame(a)},[t,l,n,r,c]);return(0,a.useEffect)(()=>{let e=o.current;if(!e)return;if(window.matchMedia("(prefers-reduced-motion: reduce)").matches){e.textContent=`${n}${c(t)}${r}`;return}let s=new IntersectionObserver(t=>{let[r]=t;r.isIntersecting&&!d.current&&(d.current=!0,m(),s.unobserve(e))},{threshold:.5});return s.observe(e),()=>s.disconnect()},[m,t,n,r,c]),(0,s.jsxs)("span",{ref:o,className:"tabular-nums",children:[n,"0",r]})}function es(e){let{t}=(0,n.Bd)(),r=[{end:50,suffix:"+",label:t("upstream services integrated")},{end:100,suffix:"+",label:t("model billing support")},{end:50,suffix:"+",label:t("compatible API routes")},{end:10,suffix:"+",label:t("scheduling controls")}];return(0,s.jsx)("div",{className:"border-border/40 bg-muted/10 relative z-10 border-y",children:(0,s.jsx)("div",{className:"mx-auto max-w-6xl px-6 py-10 md:py-12",children:(0,s.jsx)("div",{className:"grid grid-cols-2 gap-8 md:grid-cols-4 md:gap-12",children:r.map(e=>(0,s.jsxs)("div",{className:"flex flex-col items-center text-center",children:[(0,s.jsx)("span",{className:"text-2xl font-bold tracking-tight md:text-3xl",children:(0,s.jsx)(er,{end:e.end,suffix:e.suffix,decimals:e.decimals})}),(0,s.jsx)("span",{className:"text-muted-foreground mt-1.5 text-xs",children:e.label})]},e.label))})})})}var ea=r(54958),en=r(26028),el=r(63228);async function ei(){return(await el.FH.get("/api/home_page_content")).data}let eo="home_page_content",ed=function(){let{i18n:e,t}=(0,n.Bd)(),r=(0,a.useRef)(null),{resolvedTheme:i}=(0,g.D)(),{auth:o}=(0,b.n)(),d=!!o.user,{content:c,isLoaded:m,isUrl:x}=function(){let[e,t]=(0,a.useState)(""),[r,s]=(0,a.useState)(!1);(0,a.useEffect)(()=>{let e=!0;return(async()=>{let r=localStorage.getItem(eo);r&&e&&t(r);try{let{success:r,data:s}=await ei();if(!e)return;r&&s?(t(s),localStorage.setItem(eo,s)):(t(""),localStorage.removeItem(eo))}catch(t){if(!e)return;console.error("Failed to load home page content:",t),en.oR.error(ea.Ay.t("Failed to load home page content"))}finally{e&&s(!0)}})(),()=>{e=!1}},[]);let n=(0,f.q)(e);return{content:e,isLoaded:r,isUrl:n}}(),u=(0,a.useCallback)(()=>{try{r.current?.contentWindow?.postMessage({themeMode:i},"*"),r.current?.contentWindow?.postMessage({lang:e.language},"*")}catch{}},[e.language,i]);return((0,a.useEffect)(()=>{x&&u()},[x,u]),m)?c?x?(0,s.jsx)(l.si,{showMainContainer:!1,children:(0,s.jsx)("iframe",{ref:r,src:c,className:"h-screen w-full border-none",title:t("Custom Home Page"),sandbox:"allow-forms allow-popups allow-popups-to-escape-sandbox allow-scripts allow-top-navigation-by-user-activation",onLoad:u})}):(0,f.y)(c)?(0,s.jsx)(l.si,{showMainContainer:!1,children:(0,s.jsx)(h.K,{mode:"html",htmlVariant:"isolated",content:c,className:"custom-home-content"})}):(0,s.jsx)(l.si,{children:(0,s.jsx)("div",{className:"mx-auto max-w-6xl px-4 py-8",children:(0,s.jsx)(h.K,{mode:"markdown",content:c,className:"custom-home-content"})})}):(0,s.jsxs)(l.si,{showMainContainer:!1,children:[(0,s.jsx)(J,{isAuthenticated:d}),(0,s.jsx)(es,{}),(0,s.jsx)(S,{}),(0,s.jsx)(et,{}),(0,s.jsx)(k,{isAuthenticated:d}),(0,s.jsx)(p,{})]}):(0,s.jsx)(l.si,{showMainContainer:!1,children:(0,s.jsx)("main",{className:"flex min-h-screen items-center justify-center",children:(0,s.jsx)("div",{className:"text-muted-foreground",children:t("Loading...")})})})}},68328(e,t,r){let s=(0,r(40946).A)("book-open",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]]);r.d(t,{},{A:s})},23027(e,t,r){let s=(0,r(40946).A)("chart-column",[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]]);r.d(t,{},{A:s})},13663(e,t,r){let s=(0,r(40946).A)("code",[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]]);r.d(t,{},{A:s})},70380(e,t,r){let s=(0,r(40946).A)("dollar-sign",[["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}],["path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6",key:"1b0p4s"}]]);r.d(t,{},{A:s})},37417(e,t,r){let s=(0,r(40946).A)("gauge",[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]]);r.d(t,{},{A:s})},41948(e,t,r){let s=(0,r(40946).A)("globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);r.d(t,{},{A:s})},8585(e,t,r){let s=(0,r(40946).A)("zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]);r.d(t,{},{A:s})}}]);
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.