2 lines
12 KiB
JavaScript
2 lines
12 KiB
JavaScript
import{u as b,a as u,r as c,f as j,l as N,j as e,L as l}from"./index-EC_zKUeV.js";import{C as x}from"./CountUp-FAZKmwKP.js";import{F as i}from"./FadeContent-BdYn_6g-.js";import{G as v}from"./GradientText-BXOyhYAi.js";import{S as n}from"./SpotlightCard-CLwtgnEt.js";import{S as f}from"./ShinyText--nigmw_p.js";import{u as w}from"./useTranslation-DATAnSaR.js";import"./use-animation-frame-DEW1zdg1.js";import"./proxy-CLxAIQiL.js";function F(){const{t:s}=w(),{user:o}=b(),{site:d}=u(),[h,g]=c.useState([]),[m,p]=c.useState([]);c.useEffect(()=>{j().then(t=>{t.data.success&&g(t.data.data||[])}).catch(()=>{}),N().then(t=>{t.data.success&&p(t.data.data||[])}).catch(()=>{})},[]);const a=h.filter(t=>t.enabled!==!1);return e.jsxs("div",{className:"bg-white",children:[e.jsxs("section",{className:"relative overflow-hidden",children:[e.jsx("div",{className:"absolute inset-0 bg-gradient-to-b from-slate-50 to-white"}),e.jsx("div",{className:"absolute inset-0 bg-[radial-gradient(ellipse_80%_50%_at_50%_-20%,rgba(148,163,184,0.15),transparent)]"}),e.jsxs("div",{className:"relative max-w-7xl mx-auto px-6 lg:px-8 pt-24 pb-20",children:[e.jsx(i,{blur:!0,duration:600,delay:100,children:e.jsxs("div",{className:"max-w-3xl",children:[e.jsxs("div",{className:"inline-flex items-center gap-2 px-3 py-1 rounded-md bg-slate-100 text-slate-600 text-xs font-semibold uppercase tracking-wider mb-8",children:[e.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-emerald-500 animate-pulse"}),e.jsx(f,{text:s("home.lightningFast"),speed:5,color:"#475569",shineColor:"rgba(71,85,105,0.4)",className:"text-xs font-semibold uppercase tracking-wider"})]}),e.jsx("h1",{className:"text-4xl md:text-5xl lg:text-6xl font-bold leading-[1.1] tracking-tight mb-6",children:e.jsx(v,{colors:["#0f172a","#334155","#64748b","#334155","#0f172a"],animationSpeed:8,className:"text-4xl md:text-5xl lg:text-6xl font-bold leading-[1.1] tracking-tight",children:(d==null?void 0:d.name)||s("home.defaultHeroTitle")})}),e.jsx("p",{className:"text-lg text-slate-500 max-w-xl mb-10 leading-relaxed",children:s("home.heroSubtitle")}),e.jsx("div",{className:"flex items-center gap-4",children:o?e.jsxs(l,{to:"/dashboard",className:"inline-flex items-center px-6 py-3 rounded-lg bg-slate-900 text-white font-semibold text-sm hover:bg-slate-800 transition-colors",children:[s("home.goToDashboard"),e.jsx("svg",{className:"ml-2 w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M17 8l4 4m0 0l-4 4m4-4H3"})})]}):e.jsxs(e.Fragment,{children:[e.jsxs(l,{to:"/register",className:"inline-flex items-center px-6 py-3 rounded-lg bg-slate-900 text-white font-semibold text-sm hover:bg-slate-800 transition-colors",children:[s("home.getStarted"),e.jsx("svg",{className:"ml-2 w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M17 8l4 4m0 0l-4 4m4-4H3"})})]}),e.jsx(l,{to:"/pricing",className:"inline-flex items-center px-6 py-3 rounded-lg border-2 border-slate-200 text-slate-700 font-semibold text-sm hover:border-slate-300 hover:bg-slate-50 transition-colors",children:s("home.viewPricing")})]})})]})}),e.jsx(i,{blur:!0,duration:600,delay:300,children:e.jsxs("div",{className:"mt-20 grid grid-cols-3 divide-x divide-slate-200 border border-slate-200 rounded-xl bg-white shadow-sm",children:[e.jsxs("div",{className:"px-8 py-6 text-center",children:[e.jsxs("div",{className:"text-3xl font-bold text-slate-900",children:[e.jsx(x,{from:0,to:a.length||50,duration:2}),"+"]}),e.jsx("p",{className:"text-sm text-slate-500 mt-1 font-medium",children:s("home.aiModels")})]}),e.jsxs("div",{className:"px-8 py-6 text-center",children:[e.jsxs("div",{className:"text-3xl font-bold text-slate-900",children:[e.jsx(x,{from:0,to:99.9,duration:2.5}),"%"]}),e.jsx("p",{className:"text-sm text-slate-500 mt-1 font-medium",children:s("home.uptime")})]}),e.jsxs("div",{className:"px-8 py-6 text-center",children:[e.jsxs("div",{className:"text-3xl font-bold text-slate-900",children:["<",e.jsx(x,{from:200,to:50,duration:2,direction:"down"}),"ms"]}),e.jsx("p",{className:"text-sm text-slate-500 mt-1 font-medium",children:s("home.latency")})]})]})})]})]}),e.jsx("section",{className:"border-y border-slate-200 bg-slate-50",children:e.jsx("div",{className:"max-w-7xl mx-auto px-6 lg:px-8 py-24",children:e.jsxs(i,{blur:!0,duration:600,delay:100,children:[e.jsxs("div",{className:"text-center mb-16",children:[e.jsx("h2",{className:"text-3xl font-bold text-slate-900 tracking-tight mb-3",children:s("home.whyChooseUs")}),e.jsx("p",{className:"text-slate-500 text-lg",children:s("home.whyChooseUsDesc")})]}),e.jsxs("div",{className:"grid md:grid-cols-3 gap-8",children:[e.jsx(n,{className:"!bg-white !rounded-xl !p-0 !border-slate-200 !shadow-sm",spotlightColor:"rgba(245,158,11,0.06)",children:e.jsxs("div",{className:"p-8",children:[e.jsx("div",{className:"w-11 h-11 rounded-lg bg-amber-100 flex items-center justify-center mb-5",children:e.jsx("svg",{className:"w-5 h-5 text-amber-600",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 10V3L4 14h7v7l9-11h-7z"})})}),e.jsx("h3",{className:"text-lg font-semibold text-slate-900 mb-2",children:s("home.lightningFast")}),e.jsx("p",{className:"text-sm text-slate-500 leading-relaxed",children:s("home.lightningFastDesc")})]})}),e.jsx(n,{className:"!bg-white !rounded-xl !p-0 !border-slate-200 !shadow-sm",spotlightColor:"rgba(14,165,233,0.06)",children:e.jsxs("div",{className:"p-8",children:[e.jsx("div",{className:"w-11 h-11 rounded-lg bg-sky-100 flex items-center justify-center mb-5",children:e.jsx("svg",{className:"w-5 h-5 text-sky-600",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z"})})}),e.jsx("h3",{className:"text-lg font-semibold text-slate-900 mb-2",children:s("home.securePrivate")}),e.jsx("p",{className:"text-sm text-slate-500 leading-relaxed",children:s("home.securePrivateDesc")})]})}),e.jsx(n,{className:"!bg-white !rounded-xl !p-0 !border-slate-200 !shadow-sm",spotlightColor:"rgba(16,185,129,0.06)",children:e.jsxs("div",{className:"p-8",children:[e.jsx("div",{className:"w-11 h-11 rounded-lg bg-emerald-100 flex items-center justify-center mb-5",children:e.jsx("svg",{className:"w-5 h-5 text-emerald-600",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 8c-1.657 0-3 .895-3 2s1.343 2 3 2 3 .895 3 2-1.343 2-3 2m0-8c1.11 0 2.08.402 2.599 1M12 8V7m0 1v8m0 0v1m0-1c-1.11 0-2.08-.402-2.599-1M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})})}),e.jsx("h3",{className:"text-lg font-semibold text-slate-900 mb-2",children:s("home.payAsYouGo")}),e.jsx("p",{className:"text-sm text-slate-500 leading-relaxed",children:s("home.payAsYouGoDesc")})]})})]})]})})}),a.length>0&&e.jsx("section",{className:"max-w-7xl mx-auto px-6 lg:px-8 py-24",children:e.jsxs(i,{blur:!0,duration:600,delay:100,children:[e.jsxs("div",{className:"text-center mb-14",children:[e.jsx("h2",{className:"text-3xl font-bold text-slate-900 tracking-tight mb-3",children:s("home.availableModels")}),e.jsx("p",{className:"text-slate-500 text-lg",children:s("home.availableModelsDesc",{count:a.length})})]}),e.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-3",children:a.slice(0,12).map((t,r)=>e.jsxs("div",{className:"px-4 py-3.5 rounded-lg border border-slate-200 bg-white flex items-center gap-3 hover:border-slate-300 hover:shadow-sm transition-all group",children:[e.jsx("div",{className:"w-2 h-2 rounded-full bg-emerald-500 flex-shrink-0"}),e.jsx("span",{className:"text-sm font-mono text-slate-600 group-hover:text-slate-900 transition-colors truncate",children:t.display_name||t.model_name})]},t.id||r))}),a.length>12&&e.jsx("div",{className:"text-center mt-8",children:e.jsxs(l,{to:"/pricing",className:"inline-flex items-center text-sm text-slate-600 hover:text-slate-900 transition-colors font-semibold",children:[s("home.viewAllModels",{count:a.length}),e.jsx("svg",{className:"ml-1 w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M17 8l4 4m0 0l-4 4m4-4H3"})})]})})]})}),m.length>0&&e.jsx("section",{className:"border-y border-slate-200 bg-slate-50",children:e.jsx("div",{className:"max-w-7xl mx-auto px-6 lg:px-8 py-24",children:e.jsxs(i,{blur:!0,duration:600,delay:100,children:[e.jsxs("div",{className:"text-center mb-14",children:[e.jsx("h2",{className:"text-3xl font-bold text-slate-900 tracking-tight mb-3",children:s("home.plansPackages")}),e.jsx("p",{className:"text-slate-500 text-lg",children:s("home.choosePlan")})]}),e.jsx("div",{className:"grid md:grid-cols-3 gap-8 max-w-5xl mx-auto",children:m.filter(t=>t.enabled).slice(0,3).map((t,r)=>e.jsx(n,{className:`!bg-white !rounded-xl !p-0 !flex !flex-col ${r===1?"!border-slate-900 !shadow-md relative":"!border-slate-200"}`,spotlightColor:r===1?"rgba(15,23,42,0.06)":"rgba(0,0,0,0.02)",children:e.jsxs("div",{className:"relative",children:[r===1&&e.jsx("div",{className:"absolute -top-3 left-1/2 -translate-x-1/2",children:e.jsx("span",{className:"bg-slate-900 text-white text-xs font-bold px-3 py-1 rounded-full uppercase tracking-wider",children:"Popular"})}),e.jsxs("div",{className:"p-8 flex-1 flex flex-col",children:[e.jsx("h3",{className:"text-xl font-bold text-slate-900 mb-1",children:t.name}),t.description&&e.jsx("p",{className:"text-sm text-slate-500 mb-6",children:t.description}),e.jsxs("div",{className:"mt-auto",children:[e.jsxs("div",{className:"flex items-baseline gap-1.5",children:[e.jsxs("span",{className:"text-4xl font-bold text-slate-900",children:["$",t.price]}),t.original_price>t.price&&e.jsxs("span",{className:"text-sm text-slate-500 line-through",children:["$",t.original_price]})]}),t.duration>0&&e.jsx("p",{className:"text-sm text-slate-500 mt-1",children:s("home.days",{count:t.duration})})]})]}),e.jsx("div",{className:"px-8 pb-8",children:e.jsx(l,{to:o?"/packages":"/register",className:`block py-3 rounded-lg font-semibold text-sm text-center transition-colors ${r===1?"bg-slate-900 text-white hover:bg-slate-800":"bg-slate-100 text-slate-700 hover:bg-slate-200"}`,children:s(o?"home.subscribe":"home.getStarted")})})]})},t.id))})]})})}),e.jsx("section",{className:"max-w-7xl mx-auto px-6 lg:px-8 py-24",children:e.jsx(i,{blur:!0,duration:600,delay:100,children:e.jsxs("div",{className:"bg-slate-900 rounded-2xl p-12 md:p-16 text-center relative overflow-hidden",children:[e.jsx("div",{className:"absolute inset-0 bg-[radial-gradient(ellipse_at_top_right,rgba(148,163,184,0.15),transparent)]"}),e.jsxs("div",{className:"relative",children:[e.jsx("h2",{className:"text-3xl md:text-4xl font-bold text-white mb-4 tracking-tight",children:s("home.readyToStart")}),e.jsx("p",{className:"text-slate-400 mb-10 max-w-lg mx-auto text-lg",children:s("home.readyToStartDesc")}),e.jsx("div",{className:"flex items-center justify-center gap-4",children:o?e.jsxs(l,{to:"/dashboard",className:"inline-flex items-center px-8 py-3 rounded-lg bg-white text-slate-900 font-semibold text-sm hover:bg-slate-100 transition-colors",children:[s("home.goToDashboard"),e.jsx("svg",{className:"ml-2 w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M17 8l4 4m0 0l-4 4m4-4H3"})})]}):e.jsxs(e.Fragment,{children:[e.jsxs(l,{to:"/register",className:"inline-flex items-center px-8 py-3 rounded-lg bg-white text-slate-900 font-semibold text-sm hover:bg-slate-100 transition-colors",children:[s("home.createFreeAccount"),e.jsx("svg",{className:"ml-2 w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M17 8l4 4m0 0l-4 4m4-4H3"})})]}),e.jsx(l,{to:"/login",className:"px-8 py-3 rounded-lg border border-slate-700 text-slate-300 font-medium text-sm hover:bg-slate-800 transition-colors",children:s("home.signIn")})]})})]})]})})})]})}export{F as default};
|