PageSourceSearch

https://animx.ai/_next/static/chunks/0l_320_ljwmhg.js

js animx.ai collected 2026-10-05 12:49:19 UTC 25,394 bytes, 1 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,58657,e=>{"use strict";e.s(["RU_PLANS",0,{basic:{id:"basic",priceRub:400,credits:700},plus:{id:"plus",priceRub:3990,credits:1e4},ultra:{id:"ultra",priceRub:10490,credits:3e4}}])},31008,e=>{"use strict";var t=e.i(43476),r=e.i(71645),a=e.i(48148),s=e.i(61745),n=e.i(88922),i=e.i(1779);function o({preview:e,apply:s,onClose:i,onApplied:d}){let u,m=(0,a.useTranslations)("planChangeModal"),x=(0,n.useToast)(),[p,h]=(0,r.useState)(!1);async function f(){if(!p){h(!0);try{let t=await fetch("/api/stripe/plan-change",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s),credentials:"same-origin"}),r=await t.json().catch(()=>({}));if(!t.ok||!r.success){x.show({variant:"error",title:m("errorTitle"),description:r.error??m("errorGeneric"),durationMs:6e3}),h(!1);return}x.show({variant:"success",title:m("successTitle",{plan:m(`planNames.${e.toPlan}`)}),description:m("successDesc"),durationMs:5e3}),d(),i()}catch(e){console.error("plan-change apply failed:",e),x.show({variant:"error",title:m("errorTitle"),description:m("errorNetwork"),durationMs:6e3}),h(!1)}}}let g=t=>new Intl.NumberFormat(void 0,{style:"currency",currency:e.currency.toUpperCase(),minimumFractionDigits:2*(t%100!=0),maximumFractionDigits:2}).format(t/100),b=e.immediateChargeAmount<0,j=0===e.immediateChargeAmount,w=Math.abs(e.immediateChargeAmount);return(0,t.jsx)("div",{role:"dialog","aria-modal":"true",className:"fixed inset-0 z-100 flex items-center justify-center bg-black/70 backdrop-blur-sm p-4",onClick:i,children:(0,t.jsxs)("div",{className:"w-full max-w-md rounded-2xl border border-line bg-background p-6 shadow-2xl sm:p-8",onClick:e=>e.stopPropagation(),children:[(0,t.jsx)("p",{className:"font-mono text-[10px] uppercase tracking-[0.2em] text-muted-soft",children:"downgrade"===e.direction?m("eyebrowDowngrade"):"upgrade"===e.direction?m("eyebrowUpgrade"):m("eyebrowSwitch")}),(0,t.jsx)("h2",{className:"mt-1 font-display text-2xl text-foreground",children:m("title",{from:m(`planNames.${e.fromPlan}`),to:m(`planNames.${e.toPlan}`)})}),(0,t.jsx)("div",{className:"mt-5 rounded-xl border border-line bg-surface-strong/40 p-4",children:(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-3 text-sm",children:[(0,t.jsx)(l,{label:m("currentLabel"),plan:m(`planNames.${e.fromPlan}`),credits:e.fromCredits,amount:e.fromAmount,interval:e.fromInterval,t:m,fmtCurrency:g}),(0,t.jsx)(l,{label:m("newLabel"),plan:m(`planNames.${e.toPlan}`),credits:e.toCredits,amount:e.toAmount,interval:e.toInterval,t:m,fmtCurrency:g,accent:!0})]})}),(0,t.jsxs)("div",{className:"mt-5 space-y-2 text-sm",children:[(0,t.jsx)(c,{label:j?m("dueToday"):b?m("creditedToday"):m("dueToday"),value:g(j?0:w),emphasized:!0}),(0,t.jsx)(c,{label:m("thenLabel",{date:(u=e.nextRenewalAt,new Intl.DateTimeFormat(void 0,{year:"numeric",month:"long",day:"numeric"}).format(new Date(u)))}),value:g(e.toAmount),mutedRight:!0})]}),"downgrade"===e.direction&&(0,t.jsx)("p",{className:"mt-4 rounded-lg border border-amber-400/40 bg-amber-400/10 px-3 py-2 text-xs text-amber-100 dark:text-amber-200",children:m("downgradeNote",{from:e.fromCredits.toLocaleString(),to:e.toCredits.toLocaleString()})}),(0,t.jsxs)("div",{className:"mt-6 flex flex-col gap-2",children:[(0,t.jsx)("button",{type:"button",onClick:f,disabled:p,className:`w-full rounded-full py-3 text-xs font-semibold tracking-[0.16em] uppercase transition-all duration-200 ${p?"cursor-wait opacity-60":"cursor-pointer"} bg-accent text-white hover:opacity-90 disabled:cursor-not-allowed`,children:p?m("submitting"):b?m("confirmDowngrade"):m("confirmUpgrade")}),(0,t.jsx)("button",{type:"button",onClick:i,disabled:p,className:"w-full cursor-pointer rounded-full border border-line bg-transparent py-3 text-xs font-semibold tracking-[0.16em] uppercase text-muted transition-colors hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",children:m("cancel")})]})]})})}function l({label:e,plan:r,credits:a,amount:s,interval:n,t:i,fmtCurrency:o,accent:c}){return(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"font-mono text-[10px] uppercase tracking-[0.15em] text-muted-soft",children:e}),(0,t.jsx)("p",{className:`mt-1 font-display text-base font-semibold ${c?"text-accent":"text-foreground"}`,children:r}),(0,t.jsx)("p",{className:"mt-1 text-[11px] text-muted",children:a>
10?i("creditsLine",{count:a.toLocaleString()}):"—"}),(0,t.jsx)("p",{className:"text-[11px] text-muted-soft",children:i(`intervalLine.${n}`,{amount:o(s)})})]})}function c({label:e,value:r,emphasized:a,mutedRight:s}){return(0,t.jsxs)("div",{className:"flex items-baseline justify-between gap-3",children:[(0,t.jsx)("span",{className:a?"text-foreground":"text-muted",children:e}),(0,t.jsx)("span",{className:`font-mono ${a?"text-lg font-semibold text-foreground":s?"text-muted-soft":"text-foreground"}`,children:r})]})}var d=e.i(56904),u=e.i(58657);let m=[{id:"small",credits:1e3,usd:7,rub:600},{id:"medium",credits:5e3,usd:30,rub:2500},{id:"large",credits:15e3,usd:80,rub:6500},{id:"xl",credits:5e4,usd:240,rub:19900}];function x(e,t=400){let[a,s]=(0,r.useState)(e),n=(0,r.useRef)(e);return n.current=a,(0,r.useEffect)(()=>{let r=n.current;if(.5>Math.abs(r-e))return void s(e);let a=0,i=performance.now(),o=n=>{let l=Math.min(1,(n-i)/t);s(r+(e-r)*(1-Math.pow(1-l,3))),l<1?a=requestAnimationFrame(o):s(e)};return a=requestAnimationFrame(o),()=>cancelAnimationFrame(a)},[e,t]),a}function p(){let e,i=(0,a.useTranslations)("credits.topup"),o="ru"===(0,s.useLocale)(),l=(0,n.useToast)(),[c,d]=(0,r.useState)(1),[u,p]=(0,r.useState)(!1),g=(e=Math.min(Math.max(c,0),m.length-1),m[e]),b=x(g.credits),j=x(o?g.rub:g.usd),w=o?g.rub/g.credits:g.usd/g.credits;async function y(){if(!u){p(!0);try{let e=await fetch(o?"/api/yookassa/topup/checkout":"/api/stripe/topup/checkout",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify({packId:g.id})});if(401===e.status){window.location.href="/sign-in";return}let t=await e.json().catch(()=>({}));if(!e.ok||!t.url){l.show({variant:"error",title:i("checkoutErrorTitle"),description:t.error??i("checkoutErrorDesc"),durationMs:6e3}),p(!1);return}window.location.href=t.url}catch(e){console.error("Top-up checkout failed:",e),l.show({variant:"error",title:i("networkErrorTitle"),description:i("networkErrorDesc"),durationMs:6e3}),p(!1)}}}return(0,t.jsxs)("div",{className:"relative overflow-hidden rounded-3xl border border-accent/30 bg-gradient-to-br from-accent/[0.08] via-surface to-surface p-8 md:p-12",children:[(0,t.jsx)("div",{"aria-hidden":!0,className:"pointer-events-none absolute -top-32 -right-32 h-96 w-96 rounded-full bg-accent/20 blur-[120px]"}),(0,t.jsxs)("div",{className:"relative grid grid-cols-1 gap-8 md:grid-cols-[1.1fr_1fr] md:items-center md:gap-12",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"font-mono text-[11px] font-semibold uppercase tracking-[0.32em] text-accent",children:i("eyebrow")}),(0,t.jsx)("h2",{className:"mt-3 font-display leading-[0.95] text-foreground",style:{fontSize:"clamp(1.75rem, 4vw, 2.75rem)"},children:i("title")}),(0,t.jsx)("p",{className:"mt-3 max-w-md text-sm text-muted md:text-base",children:i("sub")}),(0,t.jsxs)("div",{className:"mt-8",children:[(0,t.jsxs)("div",{className:"relative h-5",children:[(0,t.jsx)("div",{className:"absolute top-1/2 h-1 w-full -translate-y-1/2 rounded-full bg-line"}),(0,t.jsx)("div",{className:"absolute top-1/2 h-1 -translate-y-1/2 rounded-full bg-accent transition-all duration-300",style:{width:`${c/(m.length-1)*100}%`}}),m.map((e,r)=>(0,t.jsx)("span",{"aria-hidden":!0,className:`absolute top-1/2 h-2 w-2 -translate-x-1/2 -translate-y-1/2 rounded-full transition-colors duration-200 ${r<=c?"bg-accent":"bg-line"}`,style:{left:`${r/(m.length-1)*100}%`}},r)),(0,t.jsx)("div",{className:"absolute top-1/2 h-5 w-5 -translate-x-1/2 -translate-y-1/2 rounded-full border-2 border-accent bg-background shadow-[0_2px_10px_rgba(0,0,0,0.4)] transition-all duration-300",style:{left:`${c/(m.length-1)*100}%`}}),(0,t.jsx)("input",{type:"range",min:0,max:m.length-1,step:1,value:c,onChange:e=>d(Number(e.target.value)),"aria-label":i("sliderLabel"),className:"absolute inset-0 w-full cursor-pointer opacity-0"})]}),(0,t.jsx)("div",{className:"mt-3 flex justify-between font-mono text-[11px] text-muted-soft",children:m.map(e=>(0,t.jsx)("span",{className:e.id===g.id?"text-foreground":void 0,children:e.credits>=1e3?`${e.credits/1e3}
1k`:e.credits.toLocaleString()},e.id))})]}),(0,t.jsxs)("ul",{className:"mt-7 flex flex-wrap gap-x-5 gap-y-2 text-xs text-foreground/80",children:[(0,t.jsxs)("li",{className:"flex items-center gap-1.5",children:[(0,t.jsx)(f,{}),i("benefitNeverExpire")]}),(0,t.jsxs)("li",{className:"flex items-center gap-1.5",children:[(0,t.jsx)(f,{}),i("benefitStacks")]}),(0,t.jsxs)("li",{className:"flex items-center gap-1.5",children:[(0,t.jsx)(f,{}),i("benefitOneTime")]})]})]}),(0,t.jsxs)("div",{className:"rounded-2xl border border-line bg-background/60 p-7 text-center md:p-8",children:[(0,t.jsx)("p",{className:"font-mono text-[10px] font-semibold uppercase tracking-[0.2em] text-muted-soft",children:i("creditsLabel")}),(0,t.jsxs)("p",{className:"mt-2 font-display text-5xl text-foreground tabular-nums md:text-6xl",children:[(0,t.jsx)("span",{className:"text-accent",children:"✦ "}),Math.round(b).toLocaleString()]}),(0,t.jsxs)("div",{className:"mt-5",children:[(0,t.jsx)("p",{className:"font-display text-3xl text-foreground tabular-nums md:text-4xl",children:o?`${Math.round(j).toLocaleString("ru-RU")} ₽`:`$${Math.round(j)}`}),(0,t.jsx)("p",{className:"mt-1 text-[11px] text-muted-soft",children:o?i("perCreditRub",{rate:w.toFixed(2)}):i("perCreditUsd",{rate:(100*w).toFixed(2)})})]}),(0,t.jsx)("button",{type:"button",onClick:y,disabled:u,className:"mt-6 inline-flex w-full cursor-pointer items-center justify-center gap-2 rounded-full bg-accent px-6 py-3 text-xs font-semibold tracking-[0.16em] uppercase text-white shadow-[0_8px_24px_-8px_var(--accent-glow)] transition-opacity hover:opacity-90 disabled:cursor-not-allowed disabled:opacity-60",children:u?(0,t.jsx)(h,{}):i("buyCta",{credits:g.credits.toLocaleString()})})]})]})]})}function h(){return(0,t.jsxs)("svg",{className:"inline-block h-4 w-4 animate-spin",viewBox:"0 0 24 24",fill:"none","aria-hidden":!0,children:[(0,t.jsx)("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"3",opacity:"0.25"}),(0,t.jsx)("path",{d:"M12 2 a10 10 0 0 1 10 10",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round"})]})}function f(){return(0,t.jsx)("span",{className:"flex h-4 w-4 items-center justify-center rounded-full bg-accent/15 text-accent",children:(0,t.jsx)("svg",{width:"9",height:"9",viewBox:"0 0 9 9",fill:"none","aria-hidden":!0,children:(0,t.jsx)("path",{d:"M1.5 4.5l2 2 4-5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})})}var g=e.i(4177),b=e.i(84087);function j(){let[e,t]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{t((0,g.isPromoActive)())},[]),e}let w=[{id:"basic",monthlyPrice:5,annualPrice:5,credits:700,discountPercent:0,features:[!0,!0,!0,!1,!1,!1,!1],showcaseImageCost:18,showcaseVideoCost:150},{id:"plus",monthlyPrice:49,annualPrice:39,credits:1e4,discountPercent:20,highlight:"popular",features:[!0,!0,!0,!0,!0,!0,!1],showcaseImageCost:90,showcaseVideoCost:505},{id:"ultra",monthlyPrice:129,annualPrice:99,credits:3e4,discountPercent:23,highlight:"best-value",sliderStops:[3e4,6e4,9e4],features:[!0,!0,!0,!0,!0,!0,!0],showcaseImageCost:90,showcaseVideoCost:505}],y={free:0,basic:1,plus:2,ultra:3};function v(e,t=450){let[a,s]=(0,r.useState)(e),n=(0,r.useRef)(e);return n.current=a,(0,r.useEffect)(()=>{let r=n.current;if(.5>Math.abs(r-e))return void s(e);let a=0,i=performance.now(),o=n=>{let l=Math.min(1,(n-i)/t);s(r+(e-r)*(1-Math.pow(1-l,3))),l<1?a=requestAnimationFrame(o):s(e)};return a=requestAnimationFrame(o),()=>cancelAnimationFrame(a)},[e,t]),a}function N({on:e}){return(0,t.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",className:`mt-0.5 shrink-0 ${e?"text-accent":"text-muted-soft"}`,children:e?(0,t.jsx)("path",{d:"M3 7.5l2.5 2.5 5.5-6",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}):(0,t.jsx)("path",{d:"M3.5 3.5l7 7M10.5 3.5l-7 7",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})}function k(){return(0,t.jsxs)("svg",{className:"inline-block h-4 w-4 animate-spin",viewBox:"0 0 24 24",fill:"none","aria-hidden":!0,children:[(0,t.jsx)("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"3",opacity:"0.25"}),(0,t.jsx)("path",{d:"M12 2 a10 10 0 0 1 10 10",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round"})]})}
1function C({plan:e,yearly:i,loadingPlanId:o,setLoadingPlanId:l,onPlanChangePreview:c,userPlan:m,userCreditsPerMonth:x,showAvailableModelsLink:p}){var h;let f=(0,a.useTranslations)("landing.pricing"),b=(0,n.useToast)(),w=(h=e.id,m&&"free"!==m?m===h?"current":y[h]>y[m]?"available":"downgrade":"available"),[P,$]=(0,r.useState)(0),S="ru"===(0,s.useLocale)(),T=u.RU_PLANS[e.id]?.priceRub??0,M=o===e.id,L=null!==o,_=e.sliderStops,A="current"===w&&_&&x>0?_.indexOf(x):-1,D=A>=0,E=D?A:P,R=!S&&_?_[E]:e.credits,F=R/e.credits,U=(i?e.annualPrice:e.monthlyPrice)*F,I=j()?(0,g.getPromoConfig)():null,O=I?Math.round(U*(1-I.discountPct/100)):U,B=I?U:i&&e.monthlyPrice>e.annualPrice?e.monthlyPrice*F:null,V=I?Math.round(T*(1-I.discountPct/100)):T,W=(e.monthlyPrice-e.annualPrice)*12*F,q=v(R),z=v(R/e.showcaseImageCost),J=v(R/e.showcaseVideoCost),K=v(O),G=v(B??0),H=v(W),Z=e=>Math.round(e).toLocaleString();async function Q(){if(!L){l(e.id);try{let t=await fetch("/api/yookassa/checkout",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify({plan:e.id})});if(401===t.status){window.location.href="/sign-in";return}let r=await t.json().catch(()=>({}));if(!t.ok||!r.url){b.show({variant:"error",title:f("toast.checkoutErrorTitle"),description:r.error??f("toast.checkoutErrorDesc"),durationMs:6e3}),l(null);return}window.location.href=r.url}catch{b.show({variant:"error",title:f("toast.networkErrorTitle"),description:f("toast.networkErrorDesc"),durationMs:6e3}),l(null)}}}async function X(){if(L)return;l(e.id);let t=i?"year":"month";try{let r=await fetch("/api/stripe/checkout",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify({plan:e.id,interval:t,credits:R})});if(401===r.status){window.location.href="/sign-in";return}let a=await r.json().catch(()=>({}));if(!r.ok){"same_plan"===a.reason?b.show({variant:"info",title:f("toast.samePlanTitle"),description:f("toast.samePlanDesc"),durationMs:5e3}):"downgrade_via_portal"===a.reason?b.show({variant:"info",title:f("toast.downgradeViaPortalTitle"),description:f("toast.downgradeViaPortalDesc"),durationMs:6e3}):b.show({variant:"error",title:f("toast.checkoutErrorTitle"),description:a.error??f("toast.checkoutErrorDesc"),durationMs:6e3}),l(null);return}if("mode"in a&&"checkout"===a.mode&&a.url){window.location.href=a.url;return}if("mode"in a&&"plan_change"===a.mode&&a.preview){c({preview:a.preview,apply:{plan:e.id,interval:t,credits:R}}),l(null);return}console.error("Unexpected /api/stripe/checkout response:",a),b.show({variant:"error",title:f("toast.checkoutErrorTitle"),description:f("toast.unexpectedResponse"),durationMs:6e3}),l(null)}catch(e){console.error("Checkout request failed:",e),b.show({variant:"error",title:f("toast.networkErrorTitle"),description:f("toast.networkErrorDesc"),durationMs:6e3}),l(null)}}return(0,t.jsxs)("div",{className:`relative flex flex-col rounded-3xl p-7 transition-all duration-300 md:p-8 ${"popular"===e.highlight?"border border-accent/40 bg-accent/[0.05] shadow-[0_30px_80px_-30px_var(--accent-glow)]":"best-value"===e.highlight?"border border-emerald-400/40 bg-emerald-400/[0.05] shadow-[0_30px_80px_-30px_rgba(16,185,129,0.4)]":"border border-line bg-surface hover:border-line-soft"}`,children:["current"===w?(0,t.jsx)("span",{className:"absolute -top-3 left-1/2 -translate-x-1/2 rounded-full bg-foreground px-4 py-1 font-mono text-[10px] font-semibold tracking-[0.2em] uppercase text-background",children:f("currentBadge")}):e.highlight&&(0,t.jsx)("span",{className:`absolute -top-3 left-1/2 -translate-x-1/2 rounded-full px-4 py-1 font-mono text-[10px] font-semibold tracking-[0.2em] uppercase text-white ${"popular"===e.highlight?"bg-accent":"bg-emerald-500"}`,children:"popular"===e.highlight?f("mostPopular"):f("bestValue")}),(0,t.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,t.jsx)("h3",{className:"font-display text-3xl text-foreground md:text-4xl",children:f(`plans.${e.id}.name`)}),i&&e.discountPercent>0&&(0,t.jsx)("span",{className:`rounded-md px-2 py-1 font-mono text-[10px] font-semibold tracking-[0.1em] ${"best-value"===e.highlight?"bg-emerald-400/15 text-emerald-400":"bg-accent/15 text-accent"}`,children:f("discountBadge",{percent:e.discountPercent})})]}),(0,t.jsx)("p",{className:"mt-1.5 text-xs text-muted-soft md:text-sm",children:f(`plans.${e.id}.desc`)}),(0,t.jsxs)("div",{className:"mt-6 rounded-2xl border border-line bg-background/40 p-5",children:[(0,t.jsxs)("p",{className:"font-display text-2xl text-foreground",children:[(0,t.jsx)("span",{className:"text-accent",children:"✦ "}),f("creditsLabel",{credits:Z(q)})]}
1),(0,t.jsx)("p",{className:"mt-3 text-sm text-foreground/80",children:f(`plans.${e.id}.showcaseImage`,{count:Z(z)})}),(0,t.jsx)("p",{className:"mt-1 text-sm text-foreground/80",children:f(`plans.${e.id}.showcaseVideo`,{count:Z(J)})}),_&&!S?(0,t.jsxs)("div",{className:"mt-5",children:[(0,t.jsxs)("div",{className:"relative h-5",children:[(0,t.jsx)("div",{className:"absolute top-1/2 h-1 w-full -translate-y-1/2 rounded-full bg-line"}),(0,t.jsx)("div",{className:`absolute top-1/2 h-1 -translate-y-1/2 rounded-full transition-all duration-300 ${"best-value"===e.highlight?"bg-emerald-500":"bg-accent"}`,style:{width:`${E/(_.length-1)*100}%`}}),(0,t.jsx)("div",{className:`absolute top-1/2 h-4 w-4 -translate-x-1/2 -translate-y-1/2 rounded-full border-2 bg-background shadow-[0_2px_8px_rgba(0,0,0,0.4)] transition-all duration-300 ${"best-value"===e.highlight?"border-emerald-500":"border-accent"}`,style:{left:`${E/(_.length-1)*100}%`}}),(0,t.jsx)("input",{type:"range",min:0,max:_.length-1,step:1,value:E,onChange:e=>$(Number(e.target.value)),disabled:D,"aria-label":f("creditsLabel",{credits:R}),className:`absolute inset-0 w-full opacity-0 ${D?"cursor-not-allowed":"cursor-pointer"}`})]}),(0,t.jsx)("div",{className:"mt-2 flex justify-between font-mono text-[11px] text-muted",children:_.map(e=>(0,t.jsx)("span",{children:e.toLocaleString()},e))})]}):(0,t.jsxs)("div",{className:"mt-5 flex items-center gap-2 rounded-lg bg-background/60 px-3 py-2 text-xs text-muted",children:[(0,t.jsx)(N,{on:!0}),f("fixedAmount",{credits:Z(e.credits)})]})]}),(0,t.jsx)("div",{className:"mt-7 flex items-baseline gap-2",children:S?(0,t.jsxs)(t.Fragment,{children:[I&&(0,t.jsxs)("span",{className:"font-display text-3xl text-muted-soft line-through md:text-4xl",children:[T.toLocaleString("ru-RU")," ₽"]}),(0,t.jsxs)("span",{className:"font-display text-5xl text-foreground md:text-6xl",children:[V.toLocaleString("ru-RU")," ₽"]})]}):(0,t.jsxs)(t.Fragment,{children:[G>.5&&(0,t.jsxs)("span",{className:"font-display text-3xl text-muted-soft line-through md:text-4xl",children:["$",Z(G)]}),(0,t.jsxs)("span",{className:"font-display text-5xl text-foreground md:text-6xl",children:["$",Z(K)]})]})}),(0,t.jsx)("p",{className:"mt-1.5 text-xs text-muted",children:S||!i?f("billedMonthly"):f("billedAnnually")}),S?(0,t.jsx)("button",{type:"button",onClick:Q,disabled:L,className:`mt-6 flex w-full cursor-pointer items-center justify-center rounded-full py-3 text-xs font-semibold tracking-[0.16em] uppercase transition-all duration-200 disabled:cursor-not-allowed ${L&&!M?"opacity-40":""} ${"popular"===e.highlight?"bg-accent text-white hover:opacity-90":"best-value"===e.highlight?"bg-emerald-500 text-white hover:opacity-90":"border border-line bg-surface text-foreground hover:border-accent/40"}`,children:M?(0,t.jsx)(k,{}):f("getPlan")}):"current"===w?(0,t.jsx)("div",{"aria-disabled":"true",className:"mt-6 flex w-full cursor-not-allowed items-center justify-center rounded-full border border-line bg-surface py-3 text-xs font-semibold tracking-[0.16em] uppercase text-muted-soft",children:f("currentCta")}):"downgrade"===w?(0,t.jsxs)(d.Link,{href:"/dashboard/settings",className:"mt-6 flex w-full cursor-pointer items-center justify-center gap-1.5 rounded-full border border-line bg-surface py-3 text-xs font-semibold tracking-[0.16em] uppercase text-foreground transition-colors hover:border-accent/40",children:[f("downgradeCta"),(0,t.jsx)("span",{"aria-hidden":!0,children:"→"})]}):(0,t.jsx)("button",{type:"button",onClick:X,disabled:L,className:`mt-6 flex w-full cursor-pointer items-center justify-center rounded-full py-3 text-xs font-semibold tracking-[0.16em] uppercase transition-all duration-200 disabled:cursor-not-allowed ${L&&!M?"opacity-40":""} ${"popular"===e.highlight?"bg-accent text-white hover:opacity-90":"best-value"===e.highlight?"bg-emerald-500 text-white hover:opacity-90":"border border-line bg-surface text-foreground hover:border-accent/40"}`,children:M?(0,t.jsx)(k,{}):f("getPlan")}),(0,t.jsx)("p",{className:"mt-3 text-center text-xs text-muted-soft",children:S?" ":i&&e.discountPercent>0?f("saveCompared",{amount:Z(H)}):i?f("noDifference"):" "}),(0,t.jsx)("div",{className:"my-6 h-px bg-line"}),(0,t.jsx)("ul",{className:"space-y-3",children:e.features.map((r,a)=>(0,t.jsxs)("li",{className:`flex items-start gap-2.5 text-sm ${r?"text-foreground
1/85":"text-muted-soft line-through"}`,children:[(0,t.jsx)(N,{on:r}),(0,t.jsx)("span",{children:f(`plans.${e.id}.features.f${a+1}`)})]},a))}),p&&(0,t.jsxs)(d.Link,{href:"/pricing",target:"_blank",className:"mt-5 inline-flex items-center gap-1 text-xs font-semibold tracking-[0.14em] uppercase text-accent transition-colors hover:text-accent-light",children:[f("viewAvailableModels")," ",(0,t.jsx)("span",{"aria-hidden":!0,children:"→"})]})]})}function P(){let e=(0,a.useTranslations)("landing.pricing.promo");if(!j())return null;let{discountPct:r,endsAt:s}=(0,g.getPromoConfig)(),n=new Date(s).toLocaleDateString("en-US",{month:"short",day:"numeric",timeZone:"UTC"});return(0,t.jsx)("div",{className:"mb-8 flex justify-center md:mb-10",children:(0,t.jsxs)("div",{className:"inline-flex items-center gap-3 rounded-full border border-accent/40 bg-accent/[0.08] px-5 py-2 text-xs md:text-sm",children:[(0,t.jsx)("span",{className:"text-center font-semibold text-accent",children:e("badge",{percent:r,date:n})}),(0,t.jsx)("span",{"aria-hidden":!0,className:"text-foreground/40",children:"·"}),(0,t.jsx)(b.PromoCountdown,{endsAt:s,wrapperClassName:"font-mono font-semibold tabular-nums text-foreground/80"})]})})}e.s(["Pricing",0,function({showAvailableModelsLink:e=!1,showTopupSlider:n=!1}={}){let[l,c]=(0,r.useState)(!0),[d,u]=(0,r.useState)(null),[m,x]=(0,r.useState)(null),{data:h,refresh:f}=(0,i.useCredits)(),g=(0,a.useTranslations)("landing.pricing"),b="ru"===(0,s.useLocale)(),j=h?.plan,y=h?.plan_credits_per_month??0;return(0,t.jsxs)("section",{id:"pricing",className:"relative z-10 overflow-hidden border-t border-line px-6 py-24 md:px-14 md:py-32 lg:px-20",children:[(0,t.jsx)("div",{"aria-hidden":!0,className:"pointer-events-none absolute inset-0",children:(0,t.jsx)("div",{className:"absolute top-1/2 left-1/2 h-[700px] w-[1000px] -translate-x-1/2 -translate-y-1/2 rounded-full bg-accent/[0.06] blur-[160px]"})}),(0,t.jsxs)("div",{className:"relative mx-auto max-w-6xl",children:[(0,t.jsxs)("div",{className:"mb-12 text-center md:mb-16",children:[(0,t.jsxs)("h2",{className:"font-display leading-[0.95] text-foreground",style:{fontSize:"clamp(2.25rem, 5.5vw, 4.75rem)"},children:[g("headlinePart1"),(0,t.jsx)("span",{className:"text-accent",children:g("headlineHighlight")})]}),(0,t.jsx)("p",{className:"mx-auto mt-4 max-w-xl text-sm text-muted md:text-base",children:g("sub")}),(0,t.jsx)("div",{className:"mt-6",children:(0,t.jsx)(P,{})}),!b&&(0,t.jsxs)("div",{className:"mt-2 inline-flex items-center gap-1 rounded-full border border-line bg-surface p-1",children:[(0,t.jsxs)("button",{onClick:()=>c(!0),className:`cursor-pointer rounded-full px-4 py-1.5 text-xs font-semibold tracking-[0.14em] uppercase transition-colors ${l?"bg-accent text-white":"text-muted hover:text-foreground"}`,children:[g("annual")," ",(0,t.jsx)("span",{className:"ml-1 opacity-80",children:g("annualBadge")})]}),(0,t.jsx)("button",{onClick:()=>c(!1),className:`cursor-pointer rounded-full px-4 py-1.5 text-xs font-semibold tracking-[0.14em] uppercase transition-colors ${!l?"bg-accent text-white":"text-muted hover:text-foreground"}`,children:g("monthly")})]})]}),(0,t.jsx)("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-3 md:gap-5",children:w.map(r=>(0,t.jsx)(C,{plan:r,yearly:l,loadingPlanId:d,setLoadingPlanId:u,onPlanChangePreview:x,userPlan:j,userCreditsPerMonth:y,showAvailableModelsLink:e},r.id))}),n&&(0,t.jsx)("div",{className:"mt-4 md:mt-5",children:(0,t.jsx)(p,{})})]}),m&&(0,t.jsx)(o,{preview:m.preview,apply:m.apply,onClose:()=>x(null),onApplied:()=>{f()}})]})}],31008)}]);

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.