1import{u as B,r as p,j as e,H as O,a as D}from"./app-D0OLB3ot.js";import{D as L}from"./DashboardLayout-Cfup61fp.js";import"./index-H5A1n8Sn.js";import"./transition-BNByOUhS.js";import"./Modal-Bs3EcjIu.js";import"./with-selector-C-aa2_gm.js";import"./mail-Bp18y1Oi.js";function M(a){return(a/100).toFixed(2)}function T(a){return`${a.ai?"1":"0"}${a.url?"1":"0"}${a.hosting?"1":"0"}`}function I({on:a}){return a?e.jsx("svg",{className:"h-3.5 w-3.5",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":!0,children:e.jsx("path",{fillRule:"evenodd",d:"M16.704 4.153a.75.75 0 01.143 1.052l-8 10.5a.75.75 0 01-1.127.075l-4.5-4.5a.75.75 0 011.06-1.06l3.894 3.893 7.48-9.817a.75.75 0 011.05-.143z",clipRule:"evenodd"})}):e.jsx("svg",{className:"h-3.5 w-3.5",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":!0,children:e.jsx("path",{d:"M6.28 5.22a.75.75 0 00-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 101.06 1.06L10 11.06l3.72 3.72a.75.75 0 101.06-1.06L11.06 10l3.72-3.72a.75.75 0 00-1.06-1.06L10 8.94 6.28 5.22z"})})}function R(a,i){const n=a.map(r=>{if(!r.variation)return{...r};const f=i[r.variation];return{...r,included:f}}),l=n.filter(r=>!r.variation&&r.included),u=n.filter(r=>r.variation&&r.included),x=n.filter(r=>!r.variation&&!r.included),g=n.filter(r=>r.variation&&!r.included);return[...l,...u,...x,...g]}function z({pressed:a,label:i,onToggle:n}){return e.jsxs("button",{type:"button","aria-label":i,"aria-pressed":a,onClick:n,className:"relative h-[18px] w-[34px] shrink-0 border-0 bg-transparent p-0",children:[e.jsx("span",{className:`absolute left-0.5 right-0.5 top-[7px] h-1 rounded-full transition ${a?"bg-[#6E5FE0]":"bg-[#BFC5CF]"}`}),e.jsx("span",{className:`absolute top-0.5 h-3.5 w-3.5 rounded-full border-2 border-white shadow transition ${a?"left-5 bg-[#6E5FE0]":"left-0 bg-[#F59A23]"}`})]})}function J(){const{pricing:a,flash:i,activeSubscriptionCountByProductId:n={}}=B().props,[l,u]=p.useState("monthly"),[x,g]=p.useState({ai:!1,url:!1,hosting:!1}),[r,f]=p.useState(null),F=T(x),m=a.launch.variations[F]??a.launch.variations["000"],$=p.useMemo(()=>a.plans??[],[a.plans]),_=t=>{t&&(f(t),window.location.href=route("checkout.start",{price:t}))},[b,v]=p.useState(!1),A=()=>{b||(v(!0),D.post(route("pricing-plans.activate-free"),{},{preserveScroll:!0,onFinish:()=>v(!1)}))},E=t=>{g(o=>({...o,[t]:!o[t]}))};return e.jsxs(L,{title:"Pricing Plans",children:[e.jsx(O,{title:"Pricing Plans"}),e.jsx("div",{className:"-mx-4 -my-6 min-h-screen overflow-x-hidden bg-gradient-to-b from-white to-[#F8FAFE] px-4 py-6 sm:-mx-6 sm:px-6 lg:-mx-8 lg:px-8",children:e.jsxs("div",{className:"mx-auto w-full max-w-[1400px] font-sans",children:[i?.error&&e.jsx("div",{className:"mb-6 rounded-xl border border-red-200 bg-red-50 px-4 py-3 text-red-900 shadow-sm",role:"alert",children:e.jsx("p",{className:"text-sm font-medium",children:i.error})}),i?.success&&e.jsx("div",{className:"mb-6 rounded-xl border border-emerald-200 bg-emerald-50 px-4 py-3 text-emerald-900 shadow-sm",role:"status",children:e.jsx("p",{className:"text-sm font-medium",children:i.success})}),e.jsxs("header",{className:"mb-8 text-center",children:[e.jsx("p",{className:"mb-3 inline-flex items-center rounded-full border border-brand-primary/15 bg-[#F0F5FF] px-3 py-1.5 text-[11px] font-extrabold uppercase tracking-[0.08em] text-[#315DBE]",children:"WTranslator Pricing"}),e.jsxs("h1",{className:"font-display text-3xl font-extrabold tracking-tight text-slate-900 sm:text-4xl",children:["Simple plans for"," ",e.jsx("span",{className:"bg-brand-gradient bg-clip-text text-transparent",children:"multilingual WordPress growth"})]}),e.jsx("p",{className:"mx-auto mt-3 max-w-2xl text-sm text-slate-500 sm:text-base",children:"Start free, then upgrade for AI translation, multilingual SEO, editing, advanced delivery, and language hosting."}),e.jsxs("div",{className:"mt-6 inline-flex rounded-2xl border border-slate-200 bg-slate-50 p-1 shadow-sm",children:[e.jsx("button",{type:"button",onClick:()=>u("monthly"),className:`rounded-xl px-5 py-2.5 text-sm font-semibold transition ${l==="monthly"?"bg-cta-gradient text-white shadow-glow-brand":"text-slate-600 hover:bg-white hover:text-slate-900"}`,children:"Monthly"}),e.jsxs("button",{type:"button",onClick:()=>u("yearly"),className:`relative rounded-xl px-5 py-2.5 text-sm font-semibold transition ${l==="yearly"?"bg-cta-gradient text-white shadow-glow-brand":"text-slate-600 hover:bg-white hover:text-slate-900"}`,children:["Yearly",e.jsx("span",{className:`ml-2 inline-flex rounded-md px-2 py-0.5 text-[10px] font-extrabold uppercase tracking-wide ${l==="yearly"?"bg-white/20 text-white":"bg-emerald-100 text-emerald-700"}`,children:"20% Off"})]})]})]}),e.jsx("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-5",children:$.map(t=>{const o=t.key==="launch",h=t.key==="free",j=o?R(t.features,x):t.features;let w=l==="yearly"?t.yearly_cents:t.monthly_cents,d=l==="yearly"?t.yearly_price_id:t.monthly_price_id,C=h?"Free forever":l==="yearly"?"Yearly plan · 20% Off":"Billed monthly";o&&m&&(w=l==="yearly"?m.yearly_cents:m.monthly_cents,d=l==="yearly"?m.yearly_price_id:m.monthly_price_id);const c=Number(n[String(t.product_id??"")]??0),S=h?"/mo":l==="yearly"?"/year":"/mo",P=h?"0":M(w);return e.jsxs("article",{className:`relative flex flex-col overflow-hidden rounded-2xl border bg-white shadow-sm ${t.popular?"border-transparent ring-2 ring-brand-violet/40":"border-slate-200"}`,children:[t.popular&&e.jsx("div",{className:"bg-gradient-to-r from-[#15151D] via-[#241633] to-[#102D66] px-4 py-2 text-center text-[11px] font-extrabold uppercase tracking-wider text-white",children:"Most Popular"}),e.jsxs("div",{className:`px-5 pt-5 ${t.popular?"bg-gradient-to-b from-[#15151D] to-[#1a1a28] text-white":""}`,children:[e.jsx("div",{className:`mb-2 inline-flex items-center gap-1.5 text-[11px] font-bold uppercase tracking-wide ${t.popular?"text-amber-300":"text-brand-primary"}`,children:t.kicker}),e.jsx("h2",{className:`font-display text-xl font-extrabold tracking-tight ${t.popular?"text-white":"text-slate-900"}`,children:t.name}),e.jsx("p",{className:`mt-1 min-h-[40px] text-sm leading-snug ${t.popular?"text-white/70":"text-slate-500"}`,children:t.description}),e.jsxs("div",{className:"mt-4 flex items-end gap-1",children:[e.jsx("span",{className:`text-lg font-bold ${t.popular?"text-white/80":"text-slate-500"}`,children:"$"}),e.jsx("span",{className:`text-4xl font-extrabold tracking-tight ${t.popular?"text-white":"text-slate-900"}`,children:P}),e.jsx("span",{className:`pb-1 text-sm font-medium ${t.popular?"text-white/60":"text-slate-500"}`,children:S})]}),e.jsx("p",{className:`mt-1 text-xs ${t.popular?"text-white/55":"text-slate-500"}`,children:C})]}),e.jsxs("div",{className:"flex flex-1 flex-col px-5 pb-5 pt-4",children:[e.jsxs("div",{className:"mb-4 flex items-center gap-2 rounded-xl border border-amber-200/80 bg-amber-50 px-3 py-2 text-xs font-semibold text-amber-900",children:[e.jsx("span",{className:"inline-block h-1.5 w-1.5 rounded-full bg-amber-500"}),t.service_line]}),c>0&&e.jsxs("div",{className:"mb-3 inline-flex w-fit items-center rounded-full bg-brand-magenta/10 px-2.5 py-1 text-xs font-semibold text-brand-magenta",children:["Active ",c," time",c!==1?"s":""]}),e.jsx("div",{className:"mb-4",children:h?e.jsxs("button",{type:"button",disabled:b||c>0,onClick:A,className:"flex w-full items-center justify-center gap-2 rounded-xl border border-slate-300 bg-white px-4 py-3 text-sm font-bold text-slate-800 transition hover:border-brand-primary hover:text-brand-primary disabled:cursor-not-allowed disabled:opacity-50",children:[b?"Activatingâ¦":c>0?"Active":"Subscribe",!b&&c===0&&e.jsx("span",{"aria-hidden":!0,
1children:"â"})]}):e.jsxs("button",{type:"button",disabled:!d||r===d,onClick:()=>_(d),className:`flex w-full items-center justify-center gap-2 rounded-xl px-4 py-3 text-sm font-bold transition disabled:opacity-50 ${t.popular?"bg-cta-gradient text-white shadow-glow-brand hover:opacity-95":"border border-slate-300 bg-white text-slate-800 hover:border-brand-primary hover:text-brand-primary"}`,children:[r===d?"Redirectingâ¦":"Subscribe",r!==d&&e.jsx("span",{"aria-hidden":!0,children:"â"})]})}),e.jsx("p",{className:"mb-2 text-[11px] font-extrabold uppercase tracking-wider text-slate-400",children:"All pricing features"}),e.jsx("ul",{className:"flex min-h-0 flex-1 flex-col gap-0.5",children:j.map((s,y)=>{const N=!s.included&&(y===0||j[y-1]?.included),k=s.variation?x[s.variation]:!1;return e.jsxs("li",{className:`relative flex items-center gap-2 px-1.5 py-1.5 text-[13px] ${N?"mt-5 border-t border-[#DDE3EC] pt-5":""} ${s.variation&&k?"-mx-1.5 rounded-lg bg-gradient-to-r from-[rgba(138,78,232,0.065)] to-[rgba(0,90,224,0.045)] px-3":""}`,children:[N&&e.jsx("span",{className:"absolute -top-2 left-0 z-[1] bg-white pr-2 text-[7.5px] font-black uppercase tracking-[0.1em] text-[#A0A8B4]",children:"Not included"}),e.jsx("span",{className:`flex h-5 w-5 shrink-0 items-center justify-center rounded-full ${s.included?"bg-[#F59A23] text-white":"bg-[#E8ECF1] text-[#9AA3AF]"}`,children:e.jsx(I,{on:s.included})}),e.jsx("span",{className:`min-w-0 flex-1 leading-snug ${s.included?"font-medium text-slate-800":"text-[#A0A8B4]"}`,children:s.text}),s.value&&!s.variation&&e.jsx("span",{className:`shrink-0 rounded-md px-1.5 py-0.5 text-[10px] font-bold ${s.value_style==="bonus"?"bg-[#EEE8FF] text-[#6E5FE0]":(s.value_style==="site-one","bg-slate-100 text-slate-600")}`,children:s.value}),o&&s.variation&&e.jsx(z,{pressed:k,label:s.aria_label??s.text,onToggle:()=>E(s.variation)})]},`${t.key}-${s.variation??s.text}-${y}`)})}),e.jsxs("p",{className:"mt-4 border-t border-slate-100 pt-3 text-xs text-slate-500",children:["Best for ",e.jsx("strong",{className:"text-slate-800",children:t.best_for})]})]})]},t.key)})})]})})]})}export{J as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.