PageSourceSearch

https://kaivormusic.ai/_next/static/chunks/app/%5Blocale%5D/pricing/page-6c20bed902db7a76.js

js kaivormusic.ai collected 2026-10-05 12:07:57 UTC 154,897 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1906],{64098:function(e,t,r){Promise.resolve().then(r.bind(r,39819)),Promise.resolve().then(r.bind(r,83105)),Promise.resolve().then(r.bind(r,10108)),Promise.resolve().then(r.bind(r,69229)),Promise.resolve().then(r.bind(r,77068)),Promise.resolve().then(r.bind(r,97188)),Promise.resolve().then(r.bind(r,7656)),Promise.resolve().then(r.bind(r,57769)),Promise.resolve().then(r.bind(r,6597)),Promise.resolve().then(r.bind(r,32083))},51865:function(e,t,r){"use strict";r.d(t,{Z:function(){return b}});var a=r(57437),n=r(2265),s=r(12200),l=r(85046),i=r(62626),o=r(18087),c=r(81626),d=r(75242),u=r(14046);let p="_pxz",m="8d1f6a4c";function f(e){if(e!==m)return"";try{window.localStorage.setItem(p,e),window.sessionStorage.setItem(p,e),function(e,t){let r=new Date;r.setFullYear(r.getFullYear()+1),document.cookie="".concat(e,"=").concat(t,"; expires=").concat(r.toUTCString(),"; path=/; SameSite=Lax")}(p,e)}catch(e){console.error("Failed to persist checkout state")}return e}var x=r(84840),h=r(45762);function b(e){var t;let{priceId:r,price:b,mode:g="payment",planName:v,className:y,checkoutAll:w=!1,trackSubscribeClick:j=!0}=e,_=(0,i.tv)(),N=(0,o.useLocale)(),{toast:k}=(0,d.pm)(),C=(0,o.useTranslations)("pricing.checkout"),[S,I]=(0,n.useState)(!1),{data:P,profile:A}=(0,l.j)(),L=(null===(t=x.Z.stripe[v])||void 0===t?void 0:t.find(e=>e.priceId===r))||{price:b},T=()=>!!A&&!(0,h.Mk)(x.Z.stripe,A,L),E=async()=>{var e,t;if(I(!0),j&&(0,c.vo)({method:"paypro",price:b,price_id:r,plan_name:v,checkout_all:w,user_id:null==P?void 0:null===(e=P.user)||void 0===e?void 0:e.id}),!(null==P?void 0:P.user)){_.push("/auth/signin?callbackUrl="+encodeURIComponent(window.location.pathname+window.location.search));return}try{let e=new URL("".concat(window.location.origin,"/").concat(N,"/profile"));e.searchParams.set("paysuc",b);let a=await fetch("/api/paypro/create-checkout",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({priceId:r,src:(0,c.b5)(),successUrl:e.toString(),cancelUrl:window.location.href,planName:v,locale:N,qz:function(){let e="";try{(e=window.localStorage.getItem(p)||"")||(e=function(e){if("undefined"==typeof document)return"";let t="".concat(e,"="),r=document.cookie.split(";").map(e=>e.trim()).find(e=>e.startsWith(t));return r?r.slice(t.length):""}(p)),e||(e=window.sessionStorage.getItem(p)||"")}catch(e){console.error("Failed to read checkout state")}return String(e||"").trim()===m?f(e):""}()})}),n=await a.json().catch(()=>null);if(403===a.status&&(null==n?void 0:n.error)==="checkoutInitUnavailable")throw f(m),Error(C("error.checkoutError"));if(!a.ok||!n||n.error)throw Error(C((null==n?void 0:n.error)?"error.".concat(n.error):"error.checkoutError"));let{checkoutUrl:s}=n;(0,u.wu)(u.eE.CHECKOUT,{method:"paypro",source:(0,c.b5)(),price:b,user_id:null==P?void 0:null===(t=P.user)||void 0===t?void 0:t.id}),(0,c.qf)(b,A),window.location.href=s}catch(e){console.error("Checkout request failed"),k({variant:"destructive",title:e.message})}finally{setTimeout(()=>{I(!1)},2e3)}};return(0,a.jsx)(s.z,{size:"lg",translate:"no",onClick:E,disabled:S||T(),className:y,children:S?(0,a.jsx)("div",{className:"w-5 h-5 border-2 border-white border-t-transparent rounded-full animate-spin"}):w?(0,a.jsx)("span",{className:"notranslate relative z-10 flex items-center",children:C("pay")}):(0,a.jsxs)("span",{className:"notranslate relative z-10 flex items-center",children:[(null==A?void 0:A.has_access)&&A.subscription_amount&&b>A.subscription_amount?C("upgradePlan"):C("choosePlan"),!T()&&(0,a.jsx)("span",{className:"ml-2 group-hover:translate-x-1 transition-transform",children:"→"})]})})}},64050:function(e,t,r){"use strict";r.d(t,{Z:function(){return f}});var a=r(57437),n=r(2265),s=r(12200),l=r(85046),i=r(62626),o=r(18087),c=r(81626),d=r(75242),u=r(14046),p=r(84840),m=r(45762);function f(e){var t;let{priceId:r,price:f,mode:x="payment",planName:h,className:b,checkoutAll:g=!1,isMasterPaymentMethold:v=!1,trackSubscribeClick:y=!0}=e,w=(0,i.tv)(),j=(0,o.useLocale)(),{toast:_}=(0,d.pm)(),N=(0,o.useTranslations)("pricing.checkout"),[k,C]=(0,n.use
1State)(!1),{data:S,profile:I}=(0,l.j)(),P=(null===(t=p.Z.stripe[h])||void 0===t?void 0:t.find(e=>e.priceId===r))||{price:f},A=()=>!!I&&!(0,m.Mk)(p.Z.stripe,I,P),L=async()=>{var e,t;if(C(!0),y&&(0,c.vo)({method:"stripe",price:f,price_id:r,plan_name:h,checkout_all:g,user_id:null==S?void 0:null===(e=S.user)||void 0===e?void 0:e.id}),!(null==S?void 0:S.user)){w.push("/auth/signin?callbackUrl="+encodeURIComponent(window.location.pathname+window.location.search));return}try{let e=new URL("".concat(window.location.origin,"/").concat(j,"/profile"));e.searchParams.set("paysuc",f);let a=new URL(window.location.href);a.searchParams.set("paycancel",f),a.searchParams.set("plan_name",h),a.searchParams.set("plan_id",r);let n=await fetch("/api/stripe/create-checkout",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({priceId:r,mode:x,successUrl:e.toString(),cancelUrl:a.toString(),planName:h,src:(0,c.b5)(),isMasterPaymentMethold:v})}),s=await n.json();if(!s||s.error)throw Error(N((null==s?void 0:s.error)?"error.".concat(s.error):"error.checkoutError"));let{stripeSessionURL:l}=s;(0,u.wu)(u.eE.CHECKOUT,{method:"stripe",source:(0,c.b5)(),price:f,user_id:null==S?void 0:null===(t=S.user)||void 0===t?void 0:t.id}),(0,c.qf)(f,I),window.location.href=l}catch(e){console.error(e),_({variant:"destructive",title:e.message})}finally{setTimeout(()=>{C(!1)},2e3)}};return(0,a.jsx)(s.z,{size:"lg",translate:"no",onClick:L,disabled:k||A(),className:b,children:k?(0,a.jsx)("div",{className:"w-5 h-5 border-2 border-white border-t-transparent rounded-full animate-spin"}):g?(0,a.jsx)("span",{className:"notranslate relative z-10 flex items-center",children:N("pay")}):(0,a.jsxs)("span",{className:"notranslate relative z-10 flex items-center",children:[(null==I?void 0:I.has_access)&&I.subscription_amount&&f>I.subscription_amount?N("upgradePlan"):N("choosePlan"),!A()&&(0,a.jsx)("span",{className:"ml-2 group-hover:translate-x-1 transition-transform",children:"→"})]})})}},2199:function(e,t,r){"use strict";r.d(t,{Z:function(){return h}});var a=r(57437),n=r(2265),s=r(12200),l=r(85046),i=r(62626),o=r(18087),c=r(81626),d=r(75242),u=r(84840),p=r(14046),m=r(45762);let f=async()=>{for(let r=0;r<20;r++){var e,t;if(null===(t=window.Paddle)||void 0===t?void 0:null===(e=t.Checkout)||void 0===e?void 0:e.open)return window.Paddle;await new Promise(e=>setTimeout(e,100))}return null},x={ar:"ar",de:"de",en:"en",es:"es",fr:"fr",it:"it",ja:"ja",ko:"ko",pt:"pt",ru:"ru",zh:"zh-Hans"};function h(e){var t;let{priceId:r,price:h,mode:b="payment",planName:g,className:v,onCheckoutStart:y,trackSubscribeClick:w=!0}=e,j=(0,i.tv)(),_=(0,o.useLocale)(),{toast:N}=(0,d.pm)(),k=(0,o.useTranslations)("pricing.checkout"),[C,S]=(0,n.useState)(!1),{data:I,profile:P}=(0,l.j)(),A=(null===(t=u.Z.stripe[g])||void 0===t?void 0:t.find(e=>e.priceId===r))||{price:h},L=()=>!!P&&!(0,m.Mk)(u.Z.stripe,P,A),T=async()=>{var e,t,a;if(S(!0),w&&(0,c.vo)({method:"paddle",price:h,price_id:r,plan_name:g,user_id:null==I?void 0:null===(e=I.user)||void 0===e?void 0:e.id}),!(null==I?void 0:I.user)){j.push("/auth/signin?callbackUrl="+encodeURIComponent(window.location.pathname+window.location.search));return}try{let e=new URL("".concat(window.location.origin,"/").concat(_,"/profile"));e.searchParams.set("paysuc",h);let n=await fetch("/api/paddle/create-checkout",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({priceId:r,src:(0,c.b5)(),successUrl:e.toString(),cancelUrl:window.location.href,planName:g})}),s={};try{s=await n.json()}catch(e){s={}}if(!n.ok||!s||s.error){let e=(null==s?void 0:s.error)?"error.".concat(s.error):"error.checkoutError";throw Error(k.has(e)?k(e):k("error.checkoutError"))}let{meta:l}=s,i=await f();if(!(null==i?void 0:null===(t=i.Checkout)||void 0===t?void 0:t.open))throw Error(k("error.checkoutError"));(0,p.wu)(p.eE.CHECKOUT,{method:"paddle",source:(0,c.b5)(),price:h,user_id:null==I?void 0:null===(a=I.user)||void 0===a?void 0:a.id}),y&&y(),(0,c.qf)(h,P);let o=x[String(_||"en").toLowerCase().split("-")[0]]||"en",d={settings:{displayMode:"overlay",variant:"one-page",theme:"dark",locale:o,allowLogout:!1,showAddDiscounts:!1,successUrl:e.toString()},items:[{priceId:r,quantity:1}],customData:{userId:I.user.id,domain:u.Z.domainName,email:I.user.email||"",planName:g,...l}};I.user.email&&(d.customer={email:I.user.email}),i.Checkout.open(d)}catch(e){console.error(e),N({variant:"destructive",title:e.message})}finally{setTimeout(()=>{S(!1)},2e3)}};return(0,a.jsx)(s.z,{size:"lg",translate:"no",onClick:T,disabled:C||L(),className:v,children:C?(0,a.jsx)("div",{className:"w-5 h-5 border-2 border-white border-t-transparent roun
1ded-full animate-spin"}):(0,a.jsxs)("span",{className:"notranslate relative z-10 flex items-center",children:[(null==P?void 0:P.has_access)&&P.subscription_amount&&h>P.subscription_amount?k("upgradePlan"):k("choosePlan"),!L()&&(0,a.jsx)("span",{className:"ml-2 group-hover:translate-x-1 transition-transform",children:"→"})]})})}},19803:function(e,t,r){"use strict";r.d(t,{F:function(){return l}});var a=r(57437),n=r(2265),s=r(58214);function l(e){let{className:t,segmented:r=!1}=e,[l,i]=(0,n.useState)("");if((0,n.useEffect)(()=>{let e=()=>{let e=new Date,t=new Date;t.setHours(23,59,59,999);let r=t-e;if(r<0){t.setDate(t.getDate()+1);let r=t-e;return"".concat(Math.floor(r/36e5%24).toString().padStart(2,"0"),":").concat(Math.floor(r/1e3/60%60).toString().padStart(2,"0"),":").concat(Math.floor(r/1e3%60).toString().padStart(2,"0"))}return"".concat(Math.floor(r/36e5%24).toString().padStart(2,"0"),":").concat(Math.floor(r/1e3/60%60).toString().padStart(2,"0"),":").concat(Math.floor(r/1e3%60).toString().padStart(2,"0"))};i(e());let t=setInterval(()=>{i(e())},1e3);return()=>clearInterval(t)},[]),r){let[e="00",r="00",n="00"]=(l||"00:00:00").split(":");return(0,a.jsx)("span",{translate:"no",className:(0,s.cn)("notranslate inline-flex items-center gap-[0.18rem] whitespace-nowrap tabular-nums text-yellow-400",t),children:[e,r,n].map((e,t)=>(0,a.jsxs)("span",{className:"inline-flex items-center",children:[t>0&&(0,a.jsx)("span",{className:"mx-[0.08rem] text-current/55",children:":"}),(0,a.jsx)("span",{className:"inline-block w-[2ch] text-center",children:e})]},t))})}return(0,a.jsx)("span",{translate:"no",className:(0,s.cn)("notranslate whitespace-nowrap tabular-nums text-yellow-400",t),children:l})}},10108:function(e,t,r){"use strict";r.d(t,{default:function(){return x}});var a=r(57437),n=r(2265),s=r(79591),l=r(62265),i=r(29338),o=r(22468),c=r(18087),d=r(58214),u=r(2199),p=r(19803);function m(e){let{plan:t,variant:r="monthly",showComparison:n,className:s}=e,l=(0,c.useTranslations)("pricing"),m=Math.round((t.priceAnchor-t.price)/t.priceAnchor*100),f={monthly:{containerClass:"bg-[#0d1315]/80 hover:border-[#1eff69]/30 hover:bg-[#0f1918]/90",buttonClass:"group relative mt-8 h-[3.25rem] w-full overflow-hidden rounded-full border border-[#1eff69]/45 bg-[#1eff69] px-5 text-sm font-black text-[#031006] shadow-[0_0_34px_rgba(30,255,105,.22)] transition duration-300 hover:bg-[#b8ffe8] hover:shadow-[0_0_42px_rgba(30,255,105,.34)] disabled:pointer-events-none disabled:opacity-50"},featured:{containerClass:"kaivormusic-edge border-[#1eff69]/35 bg-[#0b1713]/90 shadow-[0_32px_100px_rgba(30,255,105,.12)]",buttonClass:"group relative mt-8 h-[3.25rem] w-full overflow-hidden rounded-full border border-[#9dffbd]/60 bg-gradient-to-r from-[#1eff69] to-[#12d7ff] px-5 text-sm font-black text-[#031006] shadow-[0_0_42px_rgba(30,255,105,.32)] transition duration-300 hover:from-[#b8ffe8] hover:to-[#f3fff7] hover:shadow-[0_0_54px_rgba(30,255,105,.45)] disabled:pointer-events-none disabled:opacity-50"},quarterly:{containerClass:"bg-[#0d1315]/80 hover:border-[#12d7ff]/28 hover:bg-[#0f1918]/90",buttonClass:"group relative mt-8 h-[3.25rem] w-full overflow-hidden rounded-full border border-[#1eff69]/45 bg-[#1eff69] px-5 text-sm font-black text-[#031006] shadow-[0_0_34px_rgba(30,255,105,.22)] transition duration-300 hover:bg-[#b8ffe8] hover:shadow-[0_0_42px_rgba(30,255,105,.34)] disabled:pointer-events-none disabled:opacity-50"}},x=t.price,h=t.showPrice,b=t.level.toLowerCase(),g=e=>{let r=t.level.toLowerCase();if(e.name.includes("minutes long")){if(e.name.includes("extend")){let[t,a
1]=e.name.match(/\d+/g);return l("plans.".concat(r,".features.extendDuration"),{minutes:t,extendMinutes:a})}let t=e.name.match(/\d+/)[0];return l("plans.".concat(r,".features.duration"),{minutes:t})}if(e.name.includes("songs maximum")){let a=e.name.match(/\d+/)[0];return l("plans.".concat(r,".features.songLimit"),{count:a,cycle:l("cycles.".concat(t.cycle))})}if(e.name.includes("generate times")){let[a,n]=e.name.match(/\d+\.?\d*/g);return l("plans.".concat(r,".features.generateTimes"),{count:a,cycle:l("cycles.".concat(t.cycle)),price:n})}if(e.name.includes("Download times")){let[a]=e.name.match(/\d+\.?\d*/g);return l("plans.".concat(r,".features.downloadTimes"),{count:a,cycle:l("cycles.".concat(t.cycle))})}if(e.name.includes("running jobs")){let t=e.name.match(/\d+/)[0];return l("plans.".concat(r,".features.runningJobs"),{count:t})}if(e.name.includes("Commercial use"))return l("plans.".concat(r,".features.commercial"));if(e.name.includes("Permanent music storage"))return l("plans.".concat(r,".features.permanentStorage"));if(e.name.includes("Unlimited Download"))return l("plans.".concat(r,".features.unlimitedDownload"));if(e.name.includes("storage")){var a;let t=null===(a=e.name.match(/up to (\d+ \w+)/))||void 0===a?void 0:a[1];if(t)return l("plans.".concat(r,".features.storage"),{duration:t})}return e.name};return(0,a.jsxs)("div",{className:(0,d.cn)("group relative flex h-full flex-col overflow-hidden rounded-[1.6rem] border border-white/10 backdrop-blur-2xl shadow-[0_28px_90px_rgba(0,0,0,.42),inset_0_1px_0_rgba(255,255,255,.055)] transition duration-300 hover:-translate-y-1",f[r].containerClass,s),children:[(0,a.jsx)("div",{className:"pointer-events-none absolute inset-x-6 top-0 h-px bg-gradient-to-r from-transparent via-white/30 to-transparent"}),"featured"===r&&(0,a.jsx)("div",{className:"absolute left-1/2 top-0 z-20 -translate-x-1/2 -translate-y-1/2",children:(0,a.jsxs)("div",{className:"inline-flex items-center gap-2 whitespace-nowrap rounded-full border border-[#1eff69]/35 bg-[#07120e]/95 px-4 py-2 text-xs font-black uppercase text-[#dfffee] shadow-[0_0_34px_rgba(30,255,105,.24)] backdrop-blur-xl",children:[(0,a.jsx)(i.Z,{className:"h-3.5 w-3.5 fill-[#1eff69] text-[#1eff69]"}),(0,a.jsx)("span",{children:l("bestValue")}),m>0&&(0,a.jsxs)("span",{translate:"no",className:"notranslate rounded-full bg-[#1eff69] px-2 py-0.5 text-[0.68rem] text-[#031006]",children:["-",m,"%"]})]})}),(0,a.jsxs)("div",{className:"relative flex flex-1 flex-col p-6 sm:p-7 lg:p-8",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h3",{className:"kaivormusic-display-font text-2xl font-black text-[#f4fff9]",children:l("cycles.".concat(t.cycle))}),(0,a.jsx)("p",{className:"mt-3 min-h-[3rem] text-sm leading-6 text-[#c9d6d2]/68",children:l("plans.".concat(b,".description"),{percent:t.description.match(/\d+\.?\d*/)[0]})})]}),(0,a.jsxs)("div",{className:"mt-7",children:[(0,a.jsxs)("div",{className:"flex flex-wrap items-end gap-x-2 gap-y-1",children:[(0,a.jsxs)("span",{translate:"no",className:"notranslate kaivormusic-display-font text-5xl font-black leading-none text-[#f7fff9]",children:["$",x]}),(0,a.jsxs)("span",{className:"pb-1 text-sm font-bold text-[#c9d6d2]/55",children:["/",l("cycles.".concat(t.cycle))]})]}),(0,a.jsx)("div",{className:"mt-3 inline-flex rounded-full border border-[#1eff69]/18 bg-[#1eff69]/[0.07] px-3 py-1 text-xs font-black text-[#b8ffe8]",children:l("perMonth",{price:h.toFixed(2)})}),m>0&&(0,a.jsxs)("div",{className:"mt-4 flex flex-wrap items-center gap-2 text-xs",children:[(0,a.jsxs)("span",{translate:"no",className:"notranslate text-[#c9d6d2]/38 line-through",children:["$",t.priceAnchor]}),(0,a.jsx)("span",{className:"rounded-full border border-[#1eff69]/18 bg-[#1eff69]/[0.075] px-2.5 py-1 font-black text-[#1eff69]",children:l("save",{percent:m})}),"featured"===r&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-[#c9d6d2]/28",children:"/"}),(0,a.jsxs)("div",{className:"inline-flex items-center gap-1.5 rounded-full border border-white/10 bg-white/[0.045] px-2.5 py-1",children:[(0,a.jsxs)("span",{className:"font-bold text-[#c9d6d2]/62",children:[l("discountEnds"),":"]}),(0,a.jsx)(p.F,{className:"font-black text-[#b8ffe8]"})]})]})]})]}),(0,a.jsx)("ul",{className:"mt-8 flex-1 space-y-3.5",children:t.features.map((e,t)=>(0,a.jsxs)("li",{className:"flex items-start gap-3",children:[(0,a.jsx)("div",{className:(0,d.cn)("mt-0.5 flex h-5 w-5 flex-shrink-0 items-center justify-center rounded-full border transition-colors duration-200",e.highlight?"border-[#1eff69]/45 bg-[#1eff69]/16 text-[#1eff69]":"border-[#1eff69]/22 bg-[#1eff69]/10 text-[#1eff69]/82"),children:(0,a.jsx)(o.Z,{className:"h-3.5 w-3.5"})}),(0,a.jsx)("span",{className:(0,d.cn)("text-sm leading-6",e.highlight?"font-semibold text-[#f4fff9]":"text-[#c9d6d2]/68"),children:g(e)})]},t))}),(0,a.jsx)(u.Z,{priceId:t.priceId,price:x,mode:"subscription",planName:"plans",className:(0,d.cn)(f[r].buttonClass),children:l("selectPlan")}),(0,a.jsxs)("div",{className:"mt-4 space-y-2 text-center",children:[(0,a.jsxs)("p",{className:"flex items-center justify-center gap-1.5 text-xs font-semibold text-[#b8ffe8]/78",children:[(0,a.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4 text-[#1eff69]",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"})}),l("subscription.cancelAnytime")]}),(0,a.jsx)("p",{className:"text-xs text-[#c9d6d2]/42",children:l("subscription.paymentSupport")})]})]})]})}var f=r(84840);function x(e){let{needPremium:t}
1=e,[r,i]=(0,n.useState)(t?"Premium":"Basic"),o=f.Z.stripe.plans.filter(e=>e.level===r).reduce((e,t)=>(e[t.cycle]=t,e),{});return(0,a.jsxs)("div",{className:"relative isolate w-full overflow-hidden bg-[#050807] pb-16 pt-7 text-white sm:pb-20 sm:pt-9",children:[(0,a.jsx)("div",{className:"pointer-events-none absolute inset-0 bg-[radial-gradient(circle_at_22%_4%,rgba(30,255,105,.14),transparent_26rem),radial-gradient(circle_at_84%_10%,rgba(18,215,255,.09),transparent_24rem),linear-gradient(rgba(255,255,255,.022)_1px,transparent_1px),linear-gradient(90deg,rgba(255,255,255,.022)_1px,transparent_1px)] bg-[size:auto,auto,56px_56px,56px_56px]"}),(0,a.jsx)("div",{className:"pointer-events-none absolute inset-x-0 top-0 h-px bg-gradient-to-r from-transparent via-[#1eff69]/45 to-transparent"}),(0,a.jsx)(s.E.div,{className:"relative z-10 mb-8 flex justify-center px-4",initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.2},children:(0,a.jsx)(l.J,{selectedLevel:r,onLevelChange:i})}),(0,a.jsx)("div",{className:"relative z-10 px-4 sm:px-6 lg:px-8",children:(0,a.jsxs)(s.E.div,{className:"mx-auto grid max-w-7xl gap-5 lg:grid-cols-3 lg:gap-6 xl:gap-7",initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.3},children:[(0,a.jsx)(m,{plan:o.monthly,variant:"monthly",showComparison:!1}),(0,a.jsx)(m,{plan:o.annually,variant:"featured",showComparison:!0,className:"relative lg:-mt-4"}),(0,a.jsx)(m,{plan:o.quarterly,variant:"quarterly",showComparison:!1})]})})]})}},69229:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return i}});var a=r(57437),n=r(18087),s=r(85046),l=r(30690);function i(){let e=(0,n.useTranslations)("pricing.page"),{profile:t,isProfileLoading:r}=(0,s.j)();return r?(0,a.jsx)("div",{className:"mt-4 max-w-3xl rounded-[1.1rem] border border-white/10 bg-white/[0.04] p-3 shadow-[inset_0_1px_0_rgba(255,255,255,.06)] backdrop-blur-xl",children:(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("div",{className:"h-9 w-9 shrink-0 animate-pulse rounded-full bg-[#1eff69]/15 ring-1 ring-[#1eff69]/25"}),(0,a.jsxs)("div",{className:"min-w-0 flex-1 space-y-2",children:[(0,a.jsx)("div",{className:"h-3 w-2/3 animate-pulse rounded-full bg-white/12"}),(0,a.jsx)("div",{className:"h-3 w-1/3 animate-pulse rounded-full bg-white/8"})]})]})}):(null==t?void 0:t.has_access)?(0,a.jsx)("div",{className:"kaivormusic-card mt-4 max-w-3xl rounded-[1.25rem] p-4 backdrop-blur-xl",children:(0,a.jsxs)("div",{className:"flex items-start gap-3",children:[(0,a.jsx)("div",{className:"mt-0.5 flex h-9 w-9 shrink-0 items-center justify-center rounded-full border border-[#1eff69]/25 bg-[#1eff69]/10 text-[#1eff69]",children:(0,a.jsx)(l.Z,{className:"h-4 w-4"})}),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsx)("p",{className:"text-sm font-black text-[#f4fff9]",children:e("upgrade_notice_title")}),(0,a.jsxs)("ul",{className:"mt-2 space-y-1.5 text-xs leading-5 text-[#c9d6d2]/68",children:[(0,a.jsxs)("li",{className:"flex items-start gap-2",children:[(0,a.jsx)("span",{className:"mt-1.5 h-1.5 w-1.5 shrink-0 rounded-full bg-[#1eff69]"}),(0,a.jsx)("span",{children:e("upgrade_notice_1")})]}),(0,a.jsxs)("li",{className:"flex items-start gap-2",children:[(0,a.jsx)("span",{className:"mt-1.5 h-1.5 w-1.5 shrink-0 rounded-full bg-[#12d7ff]"}),(0,a.jsx)("span",{children:e("upgrade_notice_2")})]})]})]})]})}):(0,a.jsx)("div",{className:"mt-4 max-w-3xl rounded-[1.25rem] border border-[#1eff69]/20 bg-[#1eff69]/[0.055] p-3 shadow-[0_18px_60px_rgba(30,255,105,.08),inset_0_1px_0_rgba(255,255,255,.06)] backdrop-blur-xl",children:(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("div",{className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-full border border-[#1eff69]/25 bg-[#1eff69]/10",children:(0,a.jsx)("div",{className:"h-2.5 w-2.5 rounded-full bg-[#1eff69] shadow-[0_0_18px_rgba(30,255,105,.75)]"})}),(0,a.jsx)("p",{className:"text-sm font-bold leading-6 text-[#dfffee] sm:text-base",children:e("highlight")})]})})}},62265:function(e,t,r){"use strict";r.d(t,{J:function(){return l}});var a=r(57437),n=r(18087),s=r(58214);function l(e){let{selectedLevel:t,onLevelChange:r}=e,l=(0,n.useTranslations)("pricing");return(0,a.jsx)("div",{className:"inline-flex w-full max-w-[28rem] rounded-[1.25rem] border border-white/10 bg-white/[0.045] p-1 shadow-[0_18px_70px_rgba(0,0,0,.38),inset_0_1px_0_rgba(255,255,255,.06)] backdrop-blur-2xl sm:w-auto 
1sm:max-w-none",children:["Basic","Premium","Advanced"].map(e=>(0,a.jsx)("button",{type:"button",onClick:()=>r(e),"aria-pressed":t===e,className:(0,s.cn)("relative min-w-0 flex-1 rounded-[1rem] px-4 py-3 text-sm font-black transition duration-300 sm:min-w-[8rem] sm:px-6",t===e?"bg-[#1eff69] text-[#031006] shadow-[0_0_32px_rgba(30,255,105,.28)] ring-1 ring-[#9dffbd]/60":"text-[#c9d6d2]/58 hover:bg-white/[0.06] hover:text-[#f3fff7]"),children:(0,a.jsx)("span",{className:"block truncate",children:l("levels.".concat(e.toLowerCase()))})},e))})}},77068:function(e,t,r){"use strict";r.d(t,{default:function(){return C}});var a=r(57437),n=r(2265),s=r(79591),l=r(62265),i=r(29338),o=r(22468),c=r(18087),d=r(58214),u=r(15094),p=r(88592),m=r(95737),f=r(12200),x=r(85046),h=r(62626),b=r(2199),g=r(51865),v=r(14046),y=r(81626),w=r(84840),j=r(45762);function _(e){let{planDetails:t,mode:r,planName:s,className:l}=e,{priceId:i,price:o,level:d,cycle:_}=t,[N,k]=(0,n.useState)(!1),[C,S]=(0,n.useState)(!1),I=(0,c.useTranslations)("pricing.checkout"),P=(0,h.tv)();(0,c.useLocale)();let{data:A,profile:L}=(0,x.j)(),T=w.Z.stripe.plans_super_paypro.filter(e=>e.level===d&&e.cycle===_)[0],E=async()=>{var e,t;if((0,y.vo)({method:"paddle_paypro",price:o,price_id:i,plan_name:s,user_id:null==A?void 0:null===(e=A.user)||void 0===e?void 0:e.id}),!(null==A?void 0:A.user)){P.push("/auth/signin?callbackUrl="+encodeURIComponent(window.location.pathname+window.location.search));return}(0,y.qf)(o,L),k(!0),(0,v.wu)(v.eE.CHECKOUTALL,{method:"paddle_paypro",source:(0,y.b5)(),price:o,user_id:null==A?void 0:null===(t=A.user)||void 0===t?void 0:t.id})},D=()=>{k(!1)},M=[{id:"paddle",title:I("paddle.title"),priceId:i,price:o,planName:s,description:I("paddle.description"),icon:p.Z,component:b.Z},{id:"paypro-bak",title:I("paypro-bak.title"),description:I("paypro-bak.description"),priceId:null==T?void 0:T.priceId,price:null==T?void 0:T.price,planName:"plans_super_paypro",icon:m.Z,
1component:g.Z}];return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(f.z,{size:"lg",translate:"no",onClick:E,disabled:C||!!L&&!(0,j.Mk)(w.Z.stripe,L,t),className:l,children:C?(0,a.jsx)("div",{className:"w-5 h-5 border-2 border-white border-t-transparent rounded-full animate-spin"}):(0,a.jsx)("span",{className:"notranslate relative z-10 flex items-center",children:(null==L?void 0:L.has_access)&&L.subscription_amount&&o>L.subscription_amount?I("upgradePlan"):I("choosePlan")})}),(0,a.jsx)(u.Vq,{open:N,onOpenChange:k,children:(0,a.jsxs)(u.cZ,{className:"sm:max-w-md bg-gray-900/95 border border-white/10 backdrop-blur-xl",children:[(0,a.jsx)(u.$N,{className:"text-xl font-semibold text-white text-center",children:I("selectPayment")}),(0,a.jsx)("div",{className:"space-y-4",children:(0,a.jsx)("div",{className:"grid gap-6",children:M.map((e,t)=>{let n=e.component,s=0===t;return(0,a.jsxs)("div",{className:"relative rounded-xl p-4 transition-all group ".concat(s?"bg-music-primary/20 border-2 border-music-primary shadow-lg shadow-music-primary/20":"bg-white/5 hover:bg-white/10"),children:[s&&(0,a.jsx)("div",{className:"kaivormusic-primary-pill absolute -top-3 -right-2 px-3 py-1 text-xs font-bold rounded-full",children:I("recommendedOption")}),(0,a.jsxs)("div",{className:"flex items-start gap-4",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg ".concat(s?"bg-music-primary text-[#03110d]":"bg-music-primary/10 text-music-primary"),children:(0,a.jsx)(e.icon,{className:"w-5 h-5"})}),(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsx)("h4",{className:"text-sm font-medium ".concat(s?"text-music-primary":"text-white"),children:e.title}),(0,a.jsx)("p",{className:"mt-1 text-xs text-gray-400",children:e.description})]})]}),(0,a.jsx)("div",{className:"mt-4",children:(0,a.jsx)(n,{priceId:e.priceId,price:e.price,mode:r,planName:e.planName,checkoutAll:!0,onCheckoutStart:D,trackSubscribeClick:!1,className:"w-full py-2 px-4 rounded-lg text-sm font-medium transition-all ".concat(s?"kaivormusic-primary-button shadow-md transform hover:-translate-y-1":"bg-gray-700 text-white hover:bg-gray-600"),children:s?I("".concat(e.id,".buttonText"))+" ✓":I("".concat(e.id,".buttonText"))})})]},e.id)})})})]})})]})}var N=r(19803);function k(e){let{plan:t,variant:r="monthly",showComparison:n,className:s}=e,l=(0,c.useTranslations)("pricing"),u=t.level.toLowerCase(),p=t.cycle.toLowerCase(),m=e=>{let t=[];for(let r=1;;r++){let a="plans_super_paypro.".concat(u,".").concat(p,".features.").concat(e,".").concat(r,"_text"),n="plans_super_paypro.".concat(u,".").concat(p,".features.").concat(e,".").concat(r,"_highlight");if(!l.has(a))break;let s=l(a),i=l.has(n)&&"true"===l(n);t.push({text:s,highlight:i})}return t},f=m("available");(["premium","advanced"].includes(u)||"basic"===u&&"annually"===p)&&l.has("featureGroups.advanced.aiLyrics")&&f.push({text:l("featureGroups.advanced.aiLyrics"),highlight:!0});let x=m("unavailable"),h={priceId:t.priceId,price:t.price,showPrice:t.showPrice,priceAnchor:t.priceAnchor,cycle:t.cycle,level:t.level},b=Math.round((h.priceAnchor-h.price)/h.priceAnchor*100),g={monthly:{containerClass:"bg-[#0d1315]/80 hover:border-[#1eff69]/30 hover:bg-[#0f1918]/90",buttonClass:"group relative mt-8 h-[3.25rem] w-full overflow-hidden rounded-full border border-[#1eff69]/45 bg-[#1eff69] px-5 text-sm font-black text-[#031006] shadow-[0_0_34px_rgba(30,255,105,.22)] transition duration-300 hover:bg-[#b8ffe8] hover:shadow-[0_0_42px_rgba(30,255,105,.34)] disabled:pointer-events-none disabled:opacity-50"},featured:{containerClass:"kaivormusic-edge border-[#1eff69]/35 bg-[#0b1713]/90 shadow-[0_32px_100px_rgba(30,255,105,.12)]",buttonClass:"group relative mt-8 h-[3.25rem] w-full overflow-hidden rounded-full border border-[#9dffbd]/60 bg-gradient-to-r from-[#1eff69] to-[#12d7ff] px-5 text-sm font-black text-[#031006] shadow-[0_0_42px_rgba(30,255,105,.32)] transition duration-300 hover:from-[#b8ffe8] hover:to-[#f3fff7] hover:shadow-[0_0_54px_rgba(30,255,105,.45)] disabled:pointer-events-none disabled:opacity-50"},quarterly:{containerClass:"bg-[#0d1315]/80 hover:border-[#12d7ff]/30 hover:bg-[#0f1918]/90",buttonClass:"group relative mt-8 h-[3.25rem] w-full overflow-hidden rounded-full border border-[#1eff69]/45 bg-[#1eff69] px-5 text-sm font-black text-[#031006] shadow-[0_0_34px_rgba(30,255,105,.22)] transition duration-300 hover:bg-[#b8ffe8] hover:shadow-[0_0_42px_rgba(30,255,105,.34)] disabled:pointer-events-none disabled:opacity-50"}};return(0,a.jsxs)("div",{className:(0,d.cn)("group relative flex h-full flex-col overflow-hidden rounded-[1.6rem] border border-white/10 backdrop-blur-2xl shadow-[0_28px_90px_rgba(0,0,0,.42),inset_0_1px_0_rgba(255,255,255,.055)] transition duration-300 hover:-translate-y-1",g[r].containerClass,s),children:[(0,a.jsx)("div",{className:"pointer-events-none absolute inset-x-6 top-0 h-px bg-gradient-to-r from-transparent via-white/30 to-transparent"}),"featured"===r&&(0,a.jsx)("div",{className:"absolute left-1/2 top-0 z-20 -translate-x-1/2 -translate-y-1/2",children:(0,a.jsxs)("div",{className:"inline-flex items-center gap-2 whitespace-nowrap rounded-full border border-[#1eff69]/35 bg-[#07120e]/95 px-4 py-2 text-xs font-black uppercase text-[#dfffee] shadow-[0_0_34px_rgba(30,255,105,.24)] backdrop-blur-xl",children:[(0,a.jsx)(i.Z,{className:"h-3.5 w-3.5 fill-[#1eff69] text-[#1eff69]"}),(0,a.jsx)("span",{children:l("bestValue")}),b>0&&(0,a.jsxs)("span",{translate:"no",className:"notranslate rounded-full bg-[#1eff69] px-2 py-0.5 text-[0.68rem] text-[#031006]",children:["-",b,"%"]})]})}),(0,a.jsxs)("div",{className:"relative flex flex-1 flex-col p-6 sm:p-7 lg:p-8",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h3",{className:"kaivormusic-display-font text-2xl font-black text-[#f4fff9]",children:l("cycles.".concat(h.cycle))}),(0,a.jsx)("p",{className:"mt-3 min-h-[3rem] text-sm leading-6 text-[#c9d6d2]/68",children:l("plans_super_paypro.".concat(u,".").concat(p,".description"))})]}),(0,a.jsxs)("div",{className:"mt-7",children:[(0,a.jsxs)("div",{className:"flex flex-wrap items-end gap-x-2 gap-y-1",children:[(0,a.jsxs)("span",{translate:"no",className:"notranslate kaivormusic-display-font text-5xl font-black leading-none text-[#f7fff9]",children:["$",h.showPrice.toFixed(2)]}),(0,a.jsx)("span",{className:"pb-1 text-sm font-black text-[#b8ffe8]",children:l("perMonth2")})]}),b>0&&(0,a.jsxs)("div",{className:"mt-4 flex flex-wrap items-center gap-2 text-xs",children:[(0,a.jsxs)("span",{translate:"no",className:"notranslate text-[#c9d6d2]/38 line-through",children:["$",h.priceAnchor]}),(0,a.jsx)("span",{className:"rounded-full border border-[#1eff69]/18 bg-[#1eff69]/[0.075] px-2.5 py-1 font-black text-[#1eff69]",children:l("save",{percent:b})}),"featured"===r&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-[#c9d6d2]/28",children:"/"}),(0,a.jsxs)("div",{className:"inline-flex items-center gap-1.5 rounded-full border border-white/10 bg-white/[0.045] px-2.5 py-1",children:[(0,a.jsxs)("span",{className:"font-bold text-[#c9d6d2]/62",children:[l("discountEnds"),":"]}),(0,a.jsx)(N.F,{className:"font-black text-[#b8ffe8]"})]})]})]})]}),(0,a.jsxs)("ul",{className:"mt-8 flex-1 space-y-3.5",children:[f.map((e,t)=>(0,a.jsxs)("li",{className:"flex items-start gap-3",children:[(0,a.jsx)("div",{className:(0,d.cn)("mt-0.5 flex h-5 w-5 flex-shrink-0 items-center justify-center rounded-full border transition-colors duration-200",e.highlight?"border-[#1eff69]/45 bg-[#1eff69]/20 text-[#1eff69]":"border-[#1eff69]/20 bg-[#1eff69]/10 text-[#1eff69]/80"),children:(0,a.jsx)(o.Z,{className:"h-3.5 w-3.5"})}),(0,a.jsx)("span",{className:(0,d.cn)("text-sm leading-6 transition-colors duration-200",e.highlight?"font-semibold text-[#f4fff9]":"text-[#c9d6d2]/68"),children:e.text})]},"available-".concat(t))),x.map((e,t)=>(0,a.jsxs)("li",{className:"flex items-start gap-3",children:[(0,a.jsx)("div",{className:"mt-0.5 flex h-5 w-5 flex-shrink-0 items-center justify-center rounded-full border border-white/10 bg-white/[0.035] text-white/35 transition-colors duration-200",children:(0,a.jsx)("svg",{className:"h-3.5 w-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})}),(0,a.jsx)("span",{className:(0,d.cn)("text-sm leading-6 transition-colors duration-200",e.highlight?"font-semibold text-[#dfffee]/80":"text-[#c9d6d2]/42"),children:e.text})]},"unavailable-".concat(t)))]}),(0,a.jsx)(_,{planDetails:h,mode:"subscription",planName:"plans_paddle_20250319",className:(0,d.cn)(g[r].buttonClass),children:l("selectPlan")}),(0,a.jsxs)("div",{className:"mt-4 space-y-2 text-center",children:[(0,a.jsxs)("p",{className:"flex items-center justify-center gap-1.5 text-xs font-semibold text-[#b8ffe8]/78",children:[(0,a.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4 text-[#1eff69]",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"})}),l("subscription.cancelAnytime")]}),(0,a.jsx)("p",{className:"text-xs text-[#c9d6d2]/42",children:l("subscription.paymentSupport")})]})]})]})}function C(e){let{needPremium:t}
1=e,[r,i]=(0,n.useState)(t?"Premium":"Basic"),o=w.Z.stripe.plans_paddle_20250319.filter(e=>e.level===r).reduce((e,t)=>(e[t.cycle]=t,e),{});return(0,a.jsxs)("div",{className:"relative isolate w-full overflow-hidden bg-[#050807] pb-16 pt-7 text-white sm:pb-20 sm:pt-9",children:[(0,a.jsx)("div",{className:"pointer-events-none absolute inset-0 bg-[radial-gradient(circle_at_22%_4%,rgba(30,255,105,.14),transparent_26rem),radial-gradient(circle_at_84%_10%,rgba(18,215,255,.09),transparent_24rem),linear-gradient(rgba(255,255,255,.022)_1px,transparent_1px),linear-gradient(90deg,rgba(255,255,255,.022)_1px,transparent_1px)] bg-[size:auto,auto,56px_56px,56px_56px]"}),(0,a.jsx)("div",{className:"pointer-events-none absolute inset-x-0 top-0 h-px bg-gradient-to-r from-transparent via-[#1eff69]/45 to-transparent"}),(0,a.jsx)(s.E.div,{className:"relative z-10 mb-8 flex justify-center px-4",initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.2},children:(0,a.jsx)(l.J,{selectedLevel:r,onLevelChange:i})}),(0,a.jsx)("div",{className:"relative z-10 px-4 sm:px-6 lg:px-8",children:(0,a.jsxs)(s.E.div,{className:"mx-auto grid max-w-7xl gap-5 lg:grid-cols-3 lg:gap-6 xl:gap-7",initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.3},children:[(0,a.jsx)(k,{plan:o.monthly,variant:"monthly",showComparison:!1}),(0,a.jsx)(k,{plan:o.annually,variant:"featured",showComparison:!0,className:"relative lg:-mt-4"}),(0,a.jsx)(k,{plan:o.quarterly,variant:"quarterly",showComparison:!1})]})})]})}},97188:function(e,t,r){"use strict";r.d(t,{default:function(){return y}});var a=r(57437),n=r(2265),s=r(79591),l=r(62265),i=r(22468),o=r(29338),c=r(26164),d=r(15626),u=r(42421),p=r(33907),m=r(18087),f=r(58214),x=r(2199),h=r(19803),b=r(5169);function g(e){var t;let{plan:r,variant:s="monthly",showComparison:l,className:g,pricingCurrency:v,pricingPreview:y}=e,w=(0,m.useTranslations)("pricing"),j=r.level.toLowerCase(),_=r.cycle.toLowerCase(),N=v||(0,b.j)(),k="monthly"===_,C="basic"===j&&k,S="basic"===j&&"annually"===_,[I,P]=(0,n.useState)(!1),A=Math.round(r.quota/5),L=e=>new Intl.NumberFormat("en-US").format(e),T=(e,t,r)=>{let a="featureGroups.".concat(e);return w.has(a)?w(a,r):t},E=Array.from({length:11},(e,t)=>{let r="featureGroups.core.".concat(t+1);return w.has(r)?w(r):""}).filter(Boolean),D=!C||E.length>8,M=C||I?I?E:E.slice(0,8):[T("coreIncluded","Basic creation features included")],U=C?[]:"basic"===j?[T("advanced.commercial","Lifetime commercial license"),T("advanced.uploadedVoice","Uploaded voice creation"),T("advanced.singerVideo","AI singer videos up to 120 seconds"),...S?[T("advanced.aiLyrics","Use credits for professional AI lyric writing")]:[]]:[T("advanced.commercial","Lifetime commercial license"),T("advanced.uploadedVoice","Uploaded voice creation"),T("advanced.singerVideo","AI singer videos up to 120 seconds"),T("advanced.stems","All Stems separation (12 tracks: vocals, drums, bass, guitar, etc.)"),T("advanced.aiLyrics","Use credits for professional AI lyric writing"),T("advanced.scale","Higher credits with priority processing")],R={price:r.price,showPrice:r.showPrice,priceAnchor:r.priceAnchor,cycle:r.cycle},Z=Math.round((R.priceAnchor-R.price)/R.priceAnchor*100),z=null==y?void 0:null===(t=y.prices)||void 0===t?void 0:t[r.priceId],F=(null==z?void 0:z.monthly)||(0,b.bW)(R.showPrice,N),B=(null==z?void 0:z.anchor)||(0,b.bW)(R.priceAnchor,N),K=String((null==z?void 0:z.currencyCode)||(null==y?void 0:y.currencyCode)||N.currency||"USD").toUpperCase(),O=F.replace(RegExp("^".concat(K,"\\s+"),"i"),"").replace(RegExp("\\s+".concat(K,"$"),"i"),"").trim(),q=e=>{let{icon:t,title:r,children:n,className:s}=e;return(0,a.jsxs)("section",{className:(0,f.cn)("rounded-2xl border border-white/10 bg-white/[0.032] p-3.5 shadow-[inset_0_1px_0_rgba(255,255,255,.04)]",s),children:[(0,a.jsxs)("div",{className:"mb-2.5 flex items-center gap-2 text-[0.68rem] font-black uppercase tracking-[0.13em] text-[#b8ffe8]/62",children:[(0,a.jsx)("span",{className:"flex h-6 w-6 items-center justify-center rounded-full border border-[#1eff69]/18 bg-[#1eff69]/[0.075] text-[#1eff69]",children:(0,a.jsx)(t,{className:"h-3 w-3"})}),(0,a.jsx)("span",{children:r})]}),n]})},H=e=>{let{items:t,emphasized:r=!1}=e;return(0,a.jsx)("ul",{className:"space-y-2",children:t.map((e,t)=>(0,a.jsxs)("li",{className:"flex items-start gap-2.5",children:[(0,a.jsx)("div",{className:(0,f.cn)("mt-0.5 flex h-[1.1rem] w-[1.1rem] flex-shrink-0 items-center justify-center rounded-full border",r?"border-[#1eff69]/45 bg-[#1eff69]/20 text-[#1eff69]":"border-[#1eff69]/18 bg-[#1eff69]/10 text-[#1eff69]/78"),children:(0,a.jsx)(i.Z,{className:"h-3 w-3"})}),(0,a.jsx)("span",{translate:"no",className:(0,f.cn)("notranslate text-[0.82rem] leading-5",r?"font-semibold text-[#f4fff9]":"text-[#c9d6d2]/70"),children:e})]},"".concat(e,"-").concat(t)))})},G={monthly:{containerClass:"bg-[#0d1315]/80 hover:border-[#1eff69]/30 hover:bg-[#0f1918]/90",buttonClass:"group relative mt-5 h-[3rem] w-full overflow-hidden rounded-full border border-[#1eff69]/45 bg-[#1eff69] px-5 text-sm font-black text-[#031006] shadow-[0_0_34px_rgba(30,255,105,.22)] transition duration-300 hover:bg-[#b8ffe8] hover:shadow-[0_0_42px_rgba(30,255,105,.34)] disabled:pointer-events-none disabled:opacity-50"},featured:{containerClass:"kaivormusic-edge border-[#1eff69]/35 bg-[#0b1713]/90 shadow-[0_32px_100px_rgba(30,255,105,.12)]",buttonClass:"group relative mt-5 h-[3rem] w-full overflow-hidden rounded-full border border-[#9dffbd]/60 bg-gradient-to-r from-[#1eff69] to-[#12d7ff] px-5 text-sm font-black text-[#031006] shadow-[0_0_42px_rgba(30,255,105,.32)] transition duration-300 hover:from-[#b8ffe8] hover:to-[#f3fff7] hover:shadow-[0_0_54px_rgba(30,255,105,.45)] disabled:pointer-events-none disabled:opacity-50"},quarterly:{containerClass:"bg-[#0d1315]/80 hover:border-[#12d7ff]/30 hover:bg-[#0f1918]/90",buttonClass:"group relative mt-5 h-[3rem] w-full overflow-hidden rounded-full border border-[#1eff69]/45 bg-[#1eff69] px-5 text-sm font-black text-[#031006] shadow-[0_0_34px_rgba(30,255,105,.22)] transition duration-300 hover:bg-[#b8ffe8] hover:shadow-[0_0_42px_rgba(30,255,105,.34)] disabled:pointer-events-none disabled:opacity-50"}};return(0,a.jsxs)("div",{className:(0,f.cn)("group relative flex flex-col overflow-visible rounded-[1.6rem] border border-white/10 backdrop-blur-2xl shadow-[0_28px_90px_rgba(0,0,0,.42),inset_0_1px_0_rgba(255,255,255,.055)] transition duration-300 hover:-translate-y-1",G[s].containerClass,g),children:[(0,a.jsx)("div",{className:"pointer-events-none absolute inset-x-6 top-0 h-px bg-gradient-to-r from-transparent via-white/30 to-transparent"}),"featured"===s&&(0,a.jsx)("div",{className:"pointer-events-none absolute -right-3 top-6 z-20 rotate-[7deg] sm:-right-5",children:(0,a.jsxs)("div",{className:"relative inline-flex items-center gap-2 whitespace-nowrap rounded-[0.55rem] bg-gradient-to-r from-[#5b4cff] to-[#8d72ff] px-4 py-2 text-xs font-black uppercase tracking-[0.08em] text-white shadow-[0_18px_40px_rgba(91,76,255,.36)]",children:[(0,a.jsx)("span",{className:"absolute -left-2 top-1 h-3 w-3 rotate-45 bg-[#4032d7]"}),(0,a.jsx)(o.Z,{className:"h-3.5 w-3.5 fill-[#1eff69] text-[#1eff69]"}),(0,a.jsx)("span",{children:w("bestValue")}),Z>0&&(0,a.jsxs)("span",{translate:"no",className:"notranslate absolute -bottom-5 -right-3 rounded-full bg-[#1eff69] px-2.5 py-1 text-[0.72rem] text-[#031006] shadow-[0_12px_26px_rgba(30,255,105,.3)]",children:["-",Z,"%"]})]})}),(0,a.jsxs)("div",{className:"relative flex flex-col p-5 sm:p-6 lg:p-6",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"flex min-h-[2rem] items-center gap-3 pr-10",children:(0,a.jsx)("h3",{className:"kaivormusic-display-font text-[1.55rem] font-black text-[#f4fff9]",children:w("cycles.".concat(R.cycle))})}),(0,a.jsx)("p",{className:"mt-2 min-h-[2.5rem] text-[0.82rem] leading-5 text-[#c9d6d2]/68",children:w("plans_super_paypro.".concat(j,".").concat(_,".description"))})]}),(0,a.jsxs)("div",{className:"mt-5",children:[(0,a.jsxs)("div",{className:"flex flex-wrap items-baseline justify-center gap-x-2 gap-y-1",children:[(0,a.jsx)("span",{translate:"no",className:"notranslate kaivormusic-display-font text-[2.85rem] font-black leading-none text-[#f7fff9]",children:O}),(0,a.jsx)("span",{translate:"no",className:"notranslate text-[0.78rem] font-semibold tracking-[0.08em] text-[#c9d6d2]/52",children:K}),(0,a.jsx)("span",{className:"text-lg font-black text-[#1eff69]",children:w("perMonth2")})]}),Z>0&&(0,a.jsxs)("div",{className:"mt-3 flex flex-wrap items-center justify-center gap-2 text-xs",children:[(0,a.jsx)("span",{translate:"no",className:"notranslate text-[#c9d6d2]/38 line-through",children:B}),(0,a.jsx)("span",{translate:"no",className:"notranslate rounded-full border border-[#1eff69]/18 bg-[#1eff69]/[0.075] px-2.5 py-1 font-black text-[#1eff69]",children:w("save",{percent:Z})}),"featured"===s&&(0,a.jsxs)("div",{className:"inline-flex shrink-0 items-center gap-2 rounded-full border border-[#1eff69]/16 bg-[#1eff69]/[0.065] px-2.5 py-1 font-black text-[#b8ffe8] shadow-[0_12px_30px_rgba(30,255,105,.1)]",title:w("discountEnds"),"aria-label":"".concat(w("discountEnds")," ").concat(R.cycle),children:[(0,a.jsx)("span",{"aria-hidden":"true",children:"\uD83D\uDD25"}),(0,a.jsx)(h.F,{segmented:!0,className:"text-[#dfffee]"})]})]})]}),(0,a.jsxs)("div",{className:"mt-5 space-y-3.5",children:[(0,a.jsx)(q,{icon:c.Z,title:T("creditsTitle","Credits"),children:(0,a.jsx)("p",{translate:"no",className:"notranslate rounded-xl border border-white/10 bg-[#050807]/45 px-3 py-2 text-[0.82rem] font-black leading-5 text-[#dfffee]",children:T("creditsSummary","{credits} credits, up to {songs} songs",{credits:L(r.quota),songs:L(A)})})}),(0,a.jsxs)(q,{icon:d.Z,title:T("coreTitle","Basic creation features"),children:[(0,a.jsx)(H,{items:M}),D&&(0,a.jsxs)("button",{type:"button",translate:"no",onClick:()=>P(e=>!e),className:"notranslate mt-2.5 inline-flex items-center gap-1.5 rounded-full border border-white/10 bg-white/[0.045] px-2.5 py-1 text-[0.72rem] font-black text-[#b8ffe8]/72 transition hover:border-[#1eff69]/25 hover:bg-[#1eff69]/[0.08] hover:text-[#f4fff9]","aria-expanded":I,children:[T(I?"collapseCore":"exp
1andCore",I?"Hide features":"View all features"),(0,a.jsx)(u.Z,{className:(0,f.cn)("h-3.5 w-3.5 transition-transform",I&&"rotate-180")})]})]}),U.length>0&&(0,a.jsx)(q,{icon:p.Z,title:T("advancedTitle","Advanced benefits"),className:"border-[#1eff69]/24 bg-[linear-gradient(135deg,rgba(30,255,105,.075),rgba(18,215,255,.035)_55%,rgba(157,114,255,.04))] shadow-[0_18px_48px_rgba(30,255,105,.08),inset_0_1px_0_rgba(255,255,255,.06)]",children:(0,a.jsx)(H,{items:U,emphasized:!0})})]}),(0,a.jsx)(x.Z,{priceId:r.priceId,price:R.price,mode:"subscription",planName:"plans_paddle_20250319",className:(0,f.cn)(G[s].buttonClass),children:w("selectPlan")}),(0,a.jsxs)("div",{className:"mt-4 space-y-2 text-center",children:[(0,a.jsxs)("p",{className:"flex items-center justify-center gap-1.5 text-xs font-semibold text-[#b8ffe8]/78",children:[(0,a.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4 text-[#1eff69]",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"})}),w("subscription.cancelAnytime")]}),(0,a.jsx)("p",{className:"text-xs text-[#c9d6d2]/42",children:w("subscription.paymentSupport")})]})]})]})}var v=r(84840);function y(e){let{needPremium:t,pricingCurrency:r,pricingPreview:i}=e,[o,c]=(0,n.useState)(t?"Premium":"Basic"),d=v.Z.stripe.plans_paddle_20250319.filter(e=>e.level===o).reduce((e,t)=>(e[t.cycle]=t,e),{});return(0,a.jsxs)("div",{className:"relative isolate w-full overflow-hidden bg-[#050807] pb-16 pt-7 text-white sm:pb-20 sm:pt-9",children:[(0,a.jsx)("div",{className:"pointer-events-none absolute inset-0 bg-[radial-gradient(circle_at_22%_4%,rgba(30,255,105,.14),transparent_26rem),radial-gradient(circle_at_84%_10%,rgba(18,215,255,.09),transparent_24rem),linear-gradient(rgba(255,255,255,.022)_1px,transparent_1px),linear-gradient(90deg,rgba(255,255,255,.022)_1px,transparent_1px)] bg-[size:auto,auto,56px_56px,56px_56px]"}),(0,a.jsx)("div",{className:"pointer-events-none absolute inset-x-0 top-0 h-px bg-gradient-to-r from-transparent via-[#1eff69]/45 to-transparent"}),(0,a.jsx)(s.E.div,{className:"relative z-10 mb-8 flex justify-center px-4",initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.2},children:(0,a.jsx)(l.J,{selectedLevel:o,onLevelChange:c})}),(0,a.jsx)("div",{className:"relative z-10 px-4 sm:px-6 lg:px-8",children:(0,a.jsxs)(s.E.div,{className:"mx-auto grid max-w-7xl items-start gap-5 lg:grid-cols-3 lg:gap-6 xl:gap-7",initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.3},children:[(0,a.jsx)(g,{plan:d.monthly,variant:"monthly",showComparison:!1,pricingCurrency:r,pricingPreview:i}),(0,a.jsx)(g,{plan:d.annually,variant:"featured",showComparison:!0,className:"relative lg:-mt-4",pricingCurrency:r,pricingPreview:i}),(0,a.jsx)(g,{plan:d.quarterly,variant:"quarterly",showComparison:!1,pricingCurrency:r,pricingPreview:i})]})})]})}},7656:function(e,t,r){"use strict";r.d(t,{default:function(){return C}});var a=r(57437),n=r(2265),s=r(79591),l=r(62265),i=r(29338),o=r(22468),c=r(18087),d=r(58214),u=r(15094),p=r(95737),m=r(88592),f=r(12200),x=r(85046),h=r(62626),b=r(64050),g=r(51865),v=r(14046),y=r(81626),w=r(84840),j=r(45762);function _(e){let{planDetails:t,mode:r,planName:s,className:l}=e,{priceId:i,price:o,level:d,cycle:_}=t,[N,k]=(0,n.useState)(!1),[C,S]=(0,n.useState)(!1),I=(0,c.useTranslations)("pricing.checkout"),P=(0,h.tv)();(0,c.useLocale)();let{data:A,profile:L}=(0,x.j)(),T=w.Z.stripe.plans_stripe_20250319.filter(e=>e.level===d&&e.cycle===_)[0],E=async()=>{var e,t;if((0,y.vo)({method:"stripe_paypro",price:o,price_id:i,plan_name:s,user_id:null==A?void 0:null===(e=A.user)||void 0===e?void 0:e.id}),!(null==A?void 0:A.user)){P.push("/auth/signin?callbackUrl="+encodeURIComponent(window.location.pathname+window.location.search));return}(0,y.qf)(o,L),k(!0),(0,v.wu)(v.eE.CHECKOUTALL,{method:"stripe_paypro",source:(0,y.b5)(),price:o,user_id:null==A?void 0:null===(t=A.user)||void 0===t?void 0:t.id})},D=[{id:"paypro",title:I("paypro.title"),priceId:i,price:o,planName:s,description:I("paypro.description"),icon:p.Z,component:g.Z},{id:"stripe",title:I("stripe.title"),description:I("stripe.description"),priceId:null==T?void 0:T.priceId,price:null==T?void 0:T.price,planName:"plans_stripe_20250319",icon:m.Z,
1component:b.Z}];return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(f.z,{size:"lg",translate:"no",onClick:E,disabled:C||!!L&&!(0,j.Mk)(w.Z.stripe,L,t),className:l,children:C?(0,a.jsx)("div",{className:"w-5 h-5 border-2 border-white border-t-transparent rounded-full animate-spin"}):(0,a.jsx)("span",{className:"notranslate relative z-10 flex items-center",children:(null==L?void 0:L.has_access)&&L.subscription_amount&&o>L.subscription_amount?I("upgradePlan"):I("choosePlan")})}),(0,a.jsx)(u.Vq,{open:N,onOpenChange:k,children:(0,a.jsxs)(u.cZ,{className:"sm:max-w-md bg-gray-900/95 border border-white/10 backdrop-blur-xl",children:[(0,a.jsx)(u.$N,{className:"text-xl font-semibold text-white text-center",children:I("selectPayment")}),(0,a.jsx)("div",{className:"space-y-4",children:(0,a.jsx)("div",{className:"grid gap-6",children:D.map((e,t)=>{let n=e.component,s=0===t;return(0,a.jsxs)("div",{className:"relative rounded-xl p-4 transition-all group ".concat(s?"bg-music-primary/20 border-2 border-music-primary shadow-lg shadow-music-primary/20":"bg-white/5 hover:bg-white/10"),children:[s&&(0,a.jsx)("div",{className:"kaivormusic-primary-pill absolute -top-3 -right-2 px-3 py-1 text-xs font-bold rounded-full",children:I("recommendedOption")}),(0,a.jsxs)("div",{className:"flex items-start gap-4",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg ".concat(s?"bg-music-primary text-[#03110d]":"bg-music-primary/10 text-music-primary"),children:(0,a.jsx)(e.icon,{className:"w-5 h-5"})}),(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsx)("h4",{className:"text-sm font-medium ".concat(s?"text-music-primary":"text-white"),children:e.title}),(0,a.jsx)("p",{className:"mt-1 text-xs text-gray-400",children:e.description})]})]}),(0,a.jsx)("div",{className:"mt-4",children:(0,a.jsx)(n,{priceId:e.priceId,price:e.price,mode:r,planName:e.planName,checkoutAll:!0,trackSubscribeClick:!1,className:"w-full py-2 px-4 rounded-lg text-sm font-medium transition-all ".concat(s?"kaivormusic-primary-button shadow-md transform hover:-translate-y-1":"bg-gray-700 text-white hover:bg-gray-600"),children:s?I("".concat(e.id,".buttonText"))+" ✓":I("".concat(e.id,".buttonText"))})})]},e.id)})})})]})})]})}var N=r(19803);function k(e){let{plan:t,variant:r="monthly",showComparison:n,className:s}=e,l=(0,c.useTranslations)("pricing"),u=t.level.toLowerCase(),p=t.cycle.toLowerCase(),m=e=>{let t=[];for(let r=1;;r++){let a="plans_super_paypro.".concat(u,".").concat(p,".features.").concat(e,".").concat(r,"_text"),n="plans_super_paypro.".concat(u,".").concat(p,".features.").concat(e,".").concat(r,"_highlight");if(!l.has(a))break;let s=l(a),i=l.has(n)&&"true"===l(n);t.push({text:s,highlight:i})}return t},f=m("available");(["premium","advanced"].includes(u)||"basic"===u&&"annually"===p)&&l.has("featureGroups.advanced.aiLyrics")&&f.push({text:l("featureGroups.advanced.aiLyrics"),highlight:!0});let x=m("unavailable"),h={priceId:t.priceId,price:t.price,showPrice:t.showPrice,priceAnchor:t.priceAnchor,cycle:t.cycle,level:t.level},b=Math.round((h.priceAnchor-h.price)/h.priceAnchor*100),g={monthly:{containerClass:"bg-[#0d1315]/80 hover:border-[#1eff69]/30 hover:bg-[#0f1918]/90",buttonClass:"group relative mt-8 h-[3.25rem] w-full overflow-hidden rounded-full border border-[#1eff69]/45 bg-[#1eff69] px-5 text-sm font-black text-[#031006] shadow-[0_0_34px_rgba(30,255,105,.22)] transition duration-300 hover:bg-[#b8ffe8] hover:shadow-[0_0_42px_rgba(30,255,105,.34)] disabled:pointer-events-none disabled:opacity-50"},featured:{containerClass:"kaivormusic-edge border-[#1eff69]/35 bg-[#0b1713]/90 shadow-[0_32px_100px_rgba(30,255,105,.12)]",buttonClass:"group relative mt-8 h-[3.25rem] w-full overflow-hidden rounded-full border border-[#9dffbd]/60 bg-gradient-to-r from-[#1eff69] to-[#12d7ff] px-5 text-sm font-black text-[#031006] shadow-[0_0_42px_rgba(30,255,105,.32)] transition duration-300 hover:from-[#b8ffe8] hover:to-[#f3fff7] hover:shadow-[0_0_54px_rgba(30,255,105,.45)] disabled:pointer-events-none disabled:opacity-50"},quarterly:{containerClass:"bg-[#0d1315]/80 hover:border-[#12d7ff]/30 hover:bg-[#0f1918]/90",buttonClass:"group relative mt-8 h-[3.25rem] w-full overflow-hidden rounded-full border border-[#1eff69]/45 bg-[#1eff69] px-5 text-sm font-black text-[#031006] shadow-[0_0_34px_rgba(30,255,105,.22)] transition duration-300 hover:bg-[#b8ffe8] hover:shadow-[0_0_42px_rgba(30,255,105,.34)] disabled:pointer-events-none disabled:opacity-50"}};return(0,a.jsxs)("div",{className:(0,d.cn)("group relative flex h-full flex-col overflow-hidden rounded-[1.6rem] border border-white/10 backdrop-blur-2xl shadow-[0_28px_90px_rgba(0,0,0,.42),inset_0_1px_0_rgba(255,255,255,.055)] transition duration-300 hover:-translate-y-1",g[r].containerClass,s),children:[(0,a.jsx)("div",{className:"pointer-events-none absolute inset-x-6 top-0 h-px bg-gradient-to-r from-transparent via-white/30 to-transparent"}),"featured"===r&&(0,a.jsx)("div",{className:"absolute left-1/2 top-0 z-20 -translate-x-1/2 -translate-y-1/2",children:(0,a.jsxs)("div",{className:"inline-flex items-center gap-2 whitespace-nowrap rounded-full border border-[#1eff69]/35 bg-[#07120e]/95 px-4 py-2 text-xs font-black uppercase text-[#dfffee] shadow-[0_0_34px_rgba(30,255,105,.24)] backdrop-blur-xl",children:[(0,a.jsx)(i.Z,{className:"h-3.5 w-3.5 fill-[#1eff69] text-[#1eff69]"}),(0,a.jsx)("span",{children:l("bestValue")}),b>0&&(0,a.jsxs)("span",{translate:"no",className:"notranslate rounded-full bg-[#1eff69] px-2 py-0.5 text-[0.68rem] text-[#031006]",children:["-",b,"%"]})]})}),(0,a.jsxs)("div",{className:"relative flex flex-1 flex-col p-6 sm:p-7 lg:p-8",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h3",{className:"kaivormusic-display-font text-2xl font-black text-[#f4fff9]",children:l("cycles.".concat(h.cycle))}),(0,a.jsx)("p",{className:"mt-3 min-h-[3rem] text-sm leading-6 text-[#c9d6d2]/68",children:l("plans_super_paypro.".concat(u,".").concat(p,".description"))})]}),(0,a.jsxs)("div",{className:"mt-7",children:[(0,a.jsxs)("div",{className:"flex flex-wrap items-end gap-x-2 gap-y-1",children:[(0,a.jsxs)("span",{translate:"no",className:"notranslate kaivormusic-display-font text-5xl font-black leading-none text-[#f7fff9]",children:["$",h.showPrice.toFixed(2)]}),(0,a.jsx)("span",{className:"pb-1 text-sm font-black text-[#b8ffe8]",children:l("perMonth2")})]}),b>0&&(0,a.jsxs)("div",{className:"mt-4 flex flex-wrap items-center gap-2 text-xs",children:[(0,a.jsxs)("span",{translate:"no",className:"notranslate text-[#c9d6d2]/38 line-through",children:["$",h.priceAnchor]}),(0,a.jsx)("span",{className:"rounded-full border border-[#1eff69]/18 bg-[#1eff69]/[0.075] px-2.5 py-1 font-black text-[#1eff69]",children:l("save",{percent:b})}),"featured"===r&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-[#c9d6d2]/28",children:"/"}),(0,a.jsxs)("div",{className:"inline-flex items-center gap-1.5 rounded-full border border-white/10 bg-white/[0.045] px-2.5 py-1",children:[(0,a.jsxs)("span",{className:"font-bold text-[#c9d6d2]/62",children:[l("discountEnds"),":"]}),(0,a.jsx)(N.F,{className:"font-black text-[#b8ffe8]"})]})]})]})]}),(0,a.jsxs)("ul",{className:"mt-8 flex-1 space-y-3.5",children:[f.map((e,t)=>(0,a.jsxs)("li",{className:"flex items-start gap-3",children:[(0,a.jsx)("div",{className:(0,d.cn)("mt-0.5 flex h-5 w-5 flex-shrink-0 items-center justify-center rounded-full border transition-colors duration-200",e.highlight?"border-[#1eff69]/45 bg-[#1eff69]/20 text-[#1eff69]":"border-[#1eff69]/20 bg-[#1eff69]/10 text-[#1eff69]/80"),children:(0,a.jsx)(o.Z,{className:"h-3.5 w-3.5"})}),(0,a.jsx)("span",{className:(0,d.cn)("text-sm leading-6 transition-colors duration-200",e.highlight?"font-semibold text-[#f4fff9]":"text-[#c9d6d2]/68"),children:e.text})]},"available-".concat(t))),x.map((e,t)=>(0,a.jsxs)("li",{className:"flex items-start gap-3",children:[(0,a.jsx)("div",{className:"mt-0.5 flex h-5 w-5 flex-shrink-0 items-center justify-center rounded-full border border-white/10 bg-white/[0.035] text-white/35 transition-colors duration-200",children:(0,a.jsx)("svg",{className:"h-3.5 w-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})}),(0,a.jsx)("span",{className:(0,d.cn)("text-sm leading-6 transition-colors duration-200",e.highlight?"font-semibold text-[#dfffee]/80":"text-[#c9d6d2]/42"),children:e.text})]},"unavailable-".concat(t)))]}),(0,a.jsx)(_,{planDetails:h,mode:"subscription",planName:"plans_super_paypro",className:(0,d.cn)(g[r].buttonClass),children:l("selectPlan")}),(0,a.jsxs)("div",{className:"mt-4 space-y-2 text-center",children:[(0,a.jsxs)("p",{className:"flex items-center justify-center gap-1.5 text-xs font-semibold text-[#b8ffe8]/78",children:[(0,a.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4 text-[#1eff69]",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"})}),l("subscription.cancelAnytime")]}),(0,a.jsx)("p",{className:"text-xs text-[#c9d6d2]/42",children:l("subscription.paymentSupport")})]})]})]})}function C(e){let{needPremium:t}
1=e,[r,i]=(0,n.useState)(t?"Premium":"Basic"),o=w.Z.stripe.plans_super_paypro.filter(e=>e.level===r).reduce((e,t)=>(e[t.cycle]=t,e),{});return(0,a.jsxs)("div",{className:"relative isolate w-full overflow-hidden bg-[#050807] pb-16 pt-7 text-white sm:pb-20 sm:pt-9",children:[(0,a.jsx)("div",{className:"pointer-events-none absolute inset-0 bg-[radial-gradient(circle_at_22%_4%,rgba(30,255,105,.14),transparent_26rem),radial-gradient(circle_at_84%_10%,rgba(18,215,255,.09),transparent_24rem),linear-gradient(rgba(255,255,255,.022)_1px,transparent_1px),linear-gradient(90deg,rgba(255,255,255,.022)_1px,transparent_1px)] bg-[size:auto,auto,56px_56px,56px_56px]"}),(0,a.jsx)("div",{className:"pointer-events-none absolute inset-x-0 top-0 h-px bg-gradient-to-r from-transparent via-[#1eff69]/45 to-transparent"}),(0,a.jsx)(s.E.div,{className:"relative z-10 mb-8 flex justify-center px-4",initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.2},children:(0,a.jsx)(l.J,{selectedLevel:r,onLevelChange:i})}),(0,a.jsx)("div",{className:"relative z-10 px-4 sm:px-6 lg:px-8",children:(0,a.jsxs)(s.E.div,{className:"mx-auto grid max-w-7xl gap-5 lg:grid-cols-3 lg:gap-6 xl:gap-7",initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.3},children:[(0,a.jsx)(k,{plan:o.monthly,variant:"monthly",showComparison:!1}),(0,a.jsx)(k,{plan:o.annually,variant:"featured",showComparison:!0,className:"relative lg:-mt-4"}),(0,a.jsx)(k,{plan:o.quarterly,variant:"quarterly",showComparison:!1})]})})]})}},57769:function(e,t,r){"use strict";r.d(t,{default:function(){return C}});var a=r(57437),n=r(2265),s=r(79591),l=r(62265),i=r(29338),o=r(22468),c=r(18087),d=r(58214),u=r(15094),p=r(88592),m=r(95737),f=r(12200),x=r(85046),h=r(62626),b=r(64050),g=r(51865),v=r(14046),y=r(81626),w=r(84840),j=r(45762);function _(e){let{planDetails:t,mode:r,planName:s,className:l}=e,{priceId:i,price:o,level:d,cycle:_}=t,[N,k]=(0,n.useState)(!1),[C,S]=(0,n.useState)(!1),I=(0,c.useTranslations)("pricing.checkout"),P=(0,h.tv)();(0,c.useLocale)();let{data:A,profile:L}=(0,x.j)(),T=w.Z.stripe.plans_super_paypro.filter(e=>e.level===d&&e.cycle===_)[0],E=async()=>{var e,t;if((0,y.vo)({method:"stripe_paypro",price:o,price_id:i,plan_name:s,user_id:null==A?void 0:null===(e=A.user)||void 0===e?void 0:e.id}),!(null==A?void 0:A.user)){P.push("/auth/signin?callbackUrl="+encodeURIComponent(window.location.pathname+window.location.search));return}(0,y.qf)(o,L),k(!0),(0,v.wu)(v.eE.CHECKOUTALL,{method:"paddle_paypro",source:(0,y.b5)(),price:o,user_id:null==A?void 0:null===(t=A.user)||void 0===t?void 0:t.id})},D=()=>{k(!1)},M=[{id:"stripe",title:I("paddle.title"),priceId:i,price:o,planName:s,description:I("paddle.description"),icon:p.Z,component:b.Z},{id:"paypro-bak",title:I("paypro-bak.title"),description:I("paypro-bak.description"),priceId:null==T?void 0:T.priceId,price:null==T?void 0:T.price,planName:"plans_super_paypro",icon:m.Z,
1component:g.Z}];return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(f.z,{size:"lg",translate:"no",onClick:E,disabled:C||!!L&&!(0,j.Mk)(w.Z.stripe,L,t),className:l,children:C?(0,a.jsx)("div",{className:"w-5 h-5 border-2 border-white border-t-transparent rounded-full animate-spin"}):(0,a.jsx)("span",{className:"notranslate relative z-10 flex items-center",children:(null==L?void 0:L.has_access)&&L.subscription_amount&&o>L.subscription_amount?I("upgradePlan"):I("choosePlan")})}),(0,a.jsx)(u.Vq,{open:N,onOpenChange:k,children:(0,a.jsxs)(u.cZ,{className:"sm:max-w-md bg-gray-900/95 border border-white/10 backdrop-blur-xl",children:[(0,a.jsx)(u.$N,{className:"text-xl font-semibold text-white text-center",children:I("selectPayment")}),(0,a.jsx)("div",{className:"space-y-4",children:(0,a.jsx)("div",{className:"grid gap-6",children:M.map((e,t)=>{let n=e.component,s=0===t;return(0,a.jsxs)("div",{className:"relative rounded-xl p-4 transition-all group ".concat(s?"bg-music-primary/20 border-2 border-music-primary shadow-lg shadow-music-primary/20":"bg-white/5 hover:bg-white/10"),children:[s&&(0,a.jsx)("div",{className:"kaivormusic-primary-pill absolute -top-3 -right-2 px-3 py-1 text-xs font-bold rounded-full",children:I("recommendedOption")}),(0,a.jsxs)("div",{className:"flex items-start gap-4",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg ".concat(s?"bg-music-primary text-[#03110d]":"bg-music-primary/10 text-music-primary"),children:(0,a.jsx)(e.icon,{className:"w-5 h-5"})}),(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsx)("h4",{className:"text-sm font-medium ".concat(s?"text-music-primary":"text-white"),children:e.title}),(0,a.jsx)("p",{className:"mt-1 text-xs text-gray-400",children:e.description})]})]}),(0,a.jsx)("div",{className:"mt-4",children:(0,a.jsx)(n,{priceId:e.priceId,price:e.price,mode:r,planName:e.planName,checkoutAll:!0,isMasterPaymentMethold:s,onCheckoutStart:D,trackSubscribeClick:!1,className:"w-full py-2 px-4 rounded-lg text-sm font-medium transition-all ".concat(s?"kaivormusic-primary-button shadow-md transform hover:-translate-y-1":"bg-gray-700 text-white hover:bg-gray-600"),children:s?I("".concat(e.id,".buttonText"))+" ✓":I("".concat(e.id,".buttonText"))})})]},e.id)})})})]})})]})}var N=r(19803);function k(e){let{plan:t,variant:r="monthly",showComparison:n,className:s}=e,l=(0,c.useTranslations)("pricing"),u=t.level.toLowerCase(),p=t.cycle.toLowerCase(),m=e=>{let t=[];for(let r=1;;r++){let a="plans_super_paypro.".concat(u,".").concat(p,".features.").concat(e,".").concat(r,"_text"),n="plans_super_paypro.".concat(u,".").concat(p,".features.").concat(e,".").concat(r,"_highlight");if(!l.has(a))break;let s=l(a),i=l.has(n)&&"true"===l(n);t.push({text:s,highlight:i})}return t},f=m("available");(["premium","advanced"].includes(u)||"basic"===u&&"annually"===p)&&l.has("featureGroups.advanced.aiLyrics")&&f.push({text:l("featureGroups.advanced.aiLyrics"),highlight:!0});let x=m("unavailable"),h={priceId:t.priceId,price:t.price,showPrice:t.showPrice,priceAnchor:t.priceAnchor,cycle:t.cycle,level:t.level},b=Math.round((h.priceAnchor-h.price)/h.priceAnchor*100),g={monthly:{containerClass:"bg-[#0d1315]/80 hover:border-[#1eff69]/30 hover:bg-[#0f1918]/90",buttonClass:"group relative mt-8 h-[3.25rem] w-full overflow-hidden rounded-full border border-[#1eff69]/45 bg-[#1eff69] px-5 text-sm font-black text-[#031006] shadow-[0_0_34px_rgba(30,255,105,.22)] transition duration-300 hover:bg-[#b8ffe8] hover:shadow-[0_0_42px_rgba(30,255,105,.34)] disabled:pointer-events-none disabled:opacity-50"},featured:{containerClass:"kaivormusic-edge border-[#1eff69]/35 bg-[#0b1713]/90 shadow-[0_32px_100px_rgba(30,255,105,.12)]",buttonClass:"group relative mt-8 h-[3.25rem] w-full overflow-hidden rounded-full border border-[#9dffbd]/60 bg-gradient-to-r from-[#1eff69] to-[#12d7ff] px-5 text-sm font-black text-[#031006] shadow-[0_0_42px_rgba(30,255,105,.32)] transition duration-300 hover:from-[#b8ffe8] hover:to-[#f3fff7] hover:shadow-[0_0_54px_rgba(30,255,105,.45)] disabled:pointer-events-none disabled:opacity-50"},quarterly:{containerClass:"bg-[#0d1315]/80 hover:border-[#12d7ff]/30 hover:bg-[#0f1918]/90",buttonClass:"group relative mt-8 h-[3.25rem] w-full overflow-hidden rounded-full border border-[#1eff69]/45 bg-[#1eff69] px-5 text-sm font-black text-[#031006] shadow-[0_0_34px_rgba(30,255,105,.22)] transition duration-300 hover:bg-[#b8ffe8] hover:shadow-[0_0_42px_rgba(30,255,105,.34)] disabled:pointer-events-none disabled:opacity-50"}};return(0,a.jsxs)("div",{className:(0,d.cn)("group relative flex h-full flex-col overflow-hidden rounded-[1.6rem] border border-white/10 backdrop-blur-2xl shadow-[0_28px_90px_rgba(0,0,0,.42),inset_0_1px_0_rgba(255,255,255,.055)] transition duration-300 hover:-translate-y-1",g[r].containerClass,s),children:[(0,a.jsx)("div",{className:"pointer-events-none absolute inset-x-6 top-0 h-px bg-gradient-to-r from-transparent via-white/30 to-transparent"}),"featured"===r&&(0,a.jsx)("div",{className:"absolute left-1/2 top-0 z-20 -translate-x-1/2 -translate-y-1/2",children:(0,a.jsxs)("div",{className:"inline-flex items-center gap-2 whitespace-nowrap rounded-full border border-[#1eff69]/35 bg-[#07120e]/95 px-4 py-2 text-xs font-black uppercase text-[#dfffee] shadow-[0_0_34px_rgba(30,255,105,.24)] backdrop-blur-xl",children:[(0,a.jsx)(i.Z,{className:"h-3.5 w-3.5 fill-[#1eff69] text-[#1eff69]"}),(0,a.jsx)("span",{children:l("bestValue")}),b>0&&(0,a.jsxs)("span",{translate:"no",className:"notranslate rounded-full bg-[#1eff69] px-2 py-0.5 text-[0.68rem] text-[#031006]",children:["-",b,"%"]})]})}),(0,a.jsxs)("div",{className:"relative flex flex-1 flex-col p-6 sm:p-7 lg:p-8",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h3",{className:"kaivormusic-display-font text-2xl font-black text-[#f4fff9]",children:l("cycles.".concat(h.cycle))}),(0,a.jsx)("p",{className:"mt-3 min-h-[3rem] text-sm leading-6 text-[#c9d6d2]/68",children:l("plans_super_paypro.".concat(u,".").concat(p,".description"))})]}),(0,a.jsxs)("div",{className:"mt-7",children:[(0,a.jsxs)("div",{className:"flex flex-wrap items-end gap-x-2 gap-y-1",children:[(0,a.jsxs)("span",{translate:"no",className:"notranslate kaivormusic-display-font text-5xl font-black leading-none text-[#f7fff9]",children:["$",h.showPrice.toFixed(2)]}),(0,a.jsx)("span",{className:"pb-1 text-sm font-black text-[#b8ffe8]",children:l("perMonth2")})]}),b>0&&(0,a.jsxs)("div",{className:"mt-4 flex flex-wrap items-center gap-2 text-xs",children:[(0,a.jsxs)("span",{translate:"no",className:"notranslate text-[#c9d6d2]/38 line-through",children:["$",h.priceAnchor]}),(0,a.jsx)("span",{className:"rounded-full border border-[#1eff69]/18 bg-[#1eff69]/[0.075] px-2.5 py-1 font-black text-[#1eff69]",children:l("save",{percent:b})}),"featured"===r&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-[#c9d6d2]/28",children:"/"}),(0,a.jsxs)("div",{className:"inline-flex items-center gap-1.5 rounded-full border border-white/10 bg-white/[0.045] px-2.5 py-1",children:[(0,a.jsxs)("span",{className:"font-bold text-[#c9d6d2]/62",children:[l("discountEnds"),":"]}),(0,a.jsx)(N.F,{className:"font-black text-[#b8ffe8]"})]})]})]})]}),(0,a.jsxs)("ul",{className:"mt-8 flex-1 space-y-3.5",children:[f.map((e,t)=>(0,a.jsxs)("li",{className:"flex items-start gap-3",children:[(0,a.jsx)("div",{className:(0,d.cn)("mt-0.5 flex h-5 w-5 flex-shrink-0 items-center justify-center rounded-full border transition-colors duration-200",e.highlight?"border-[#1eff69]/45 bg-[#1eff69]/20 text-[#1eff69]":"border-[#1eff69]/20 bg-[#1eff69]/10 text-[#1eff69]/80"),children:(0,a.jsx)(o.Z,{className:"h-3.5 w-3.5"})}),(0,a.jsx)("span",{className:(0,d.cn)("text-sm leading-6 transition-colors duration-200",e.highlight?"font-semibold text-[#f4fff9]":"text-[#c9d6d2]/68"),children:e.text})]},"available-".concat(t))),x.map((e,t)=>(0,a.jsxs)("li",{className:"flex items-start gap-3",children:[(0,a.jsx)("div",{className:"mt-0.5 flex h-5 w-5 flex-shrink-0 items-center justify-center rounded-full border border-white/10 bg-white/[0.035] text-white/35 transition-colors duration-200",children:(0,a.jsx)("svg",{className:"h-3.5 w-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})}),(0,a.jsx)("span",{className:(0,d.cn)("text-sm leading-6 transition-colors duration-200",e.highlight?"font-semibold text-[#dfffee]/80":"text-[#c9d6d2]/42"),children:e.text})]},"unavailable-".concat(t)))]}),(0,a.jsx)(_,{planDetails:h,mode:"subscription",planName:"plans_stripe_20250319",className:(0,d.cn)(g[r].buttonClass),children:l("selectPlan")}),(0,a.jsxs)("div",{className:"mt-4 space-y-2 text-center",children:[(0,a.jsxs)("p",{className:"flex items-center justify-center gap-1.5 text-xs font-semibold text-[#b8ffe8]/78",children:[(0,a.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4 text-[#1eff69]",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"})}),l("subscription.cancelAnytime")]}),(0,a.jsx)("p",{className:"text-xs text-[#c9d6d2]/42",children:l("subscription.paymentSupport")})]})]})]})}function C(e){let{needPremium:t}
1=e,[r,i]=(0,n.useState)(t?"Premium":"Basic"),o=w.Z.stripe.plans_stripe_20250319.filter(e=>e.level===r).reduce((e,t)=>(e[t.cycle]=t,e),{});return(0,a.jsxs)("div",{className:"relative isolate w-full overflow-hidden bg-[#050807] pb-16 pt-7 text-white sm:pb-20 sm:pt-9",children:[(0,a.jsx)("div",{className:"pointer-events-none absolute inset-0 bg-[radial-gradient(circle_at_22%_4%,rgba(30,255,105,.14),transparent_26rem),radial-gradient(circle_at_84%_10%,rgba(18,215,255,.09),transparent_24rem),linear-gradient(rgba(255,255,255,.022)_1px,transparent_1px),linear-gradient(90deg,rgba(255,255,255,.022)_1px,transparent_1px)] bg-[size:auto,auto,56px_56px,56px_56px]"}),(0,a.jsx)("div",{className:"pointer-events-none absolute inset-x-0 top-0 h-px bg-gradient-to-r from-transparent via-[#1eff69]/45 to-transparent"}),(0,a.jsx)(s.E.div,{className:"relative z-10 mb-8 flex justify-center px-4",initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.2},children:(0,a.jsx)(l.J,{selectedLevel:r,onLevelChange:i})}),(0,a.jsx)("div",{className:"relative z-10 px-4 sm:px-6 lg:px-8",children:(0,a.jsxs)(s.E.div,{className:"mx-auto grid max-w-7xl gap-5 lg:grid-cols-3 lg:gap-6 xl:gap-7",initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.3},children:[(0,a.jsx)(k,{plan:o.monthly,variant:"monthly",showComparison:!1}),(0,a.jsx)(k,{plan:o.annually,variant:"featured",showComparison:!0,className:"relative lg:-mt-4"}),(0,a.jsx)(k,{plan:o.quarterly,variant:"quarterly",showComparison:!1})]})})]})}},6597:function(e,t,r){"use strict";r.d(t,{default:function(){return C}});var a=r(57437),n=r(2265),s=r(79591),l=r(62265),i=r(29338),o=r(22468),c=r(18087),d=r(58214),u=r(15094),p=r(88592),m=r(95737),f=r(12200),x=r(85046),h=r(62626),b=r(64050),g=r(2199),v=r(14046),y=r(81626),w=r(84840),j=r(45762);function _(e){let{planDetails:t,mode:r,planName:s,className:l}=e,{priceId:i,price:o,level:d,cycle:_}=t,[N,k]=(0,n.useState)(!1),[C,S]=(0,n.useState)(!1),I=(0,c.useTranslations)("pricing.checkout"),P=(0,h.tv)(),{data:A,profile:L}=(0,x.j)(),T=w.Z.stripe.plans_paddle_20250319.find(e=>e.level===d&&e.cycle===_),E=async()=>{var e,t;if((0,y.vo)({method:"stripe_paddle",price:o,price_id:i,plan_name:s,user_id:null==A?void 0:null===(e=A.user)||void 0===e?void 0:e.id}),!(null==A?void 0:A.user)){P.push("/auth/signin?callbackUrl="+encodeURIComponent(window.location.pathname+window.location.search));return}(0,y.qf)(o,L),k(!0),(0,v.wu)(v.eE.CHECKOUTALL,{method:"stripe_paddle",source:(0,y.b5)(),price:o,user_id:null==A?void 0:null===(t=A.user)||void 0===t?void 0:t.id})},D=()=>{k(!1)},M=[{id:"stripe",title:I("paddle.title"),priceId:i,price:o,planName:s,description:I("paddle.description"),buttonText:I("paddle.buttonText"),icon:p.Z,component:b.Z},{id:"paddle",title:I("stripe.title"),description:I("stripe.description"),priceId:null==T?void 0:T.priceId,price:null==T?void 0:T.price,planName:"plans_paddle_20250319",buttonText:I("stripe.buttonText"),icon:m.Z,component:g.Z}];return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(f.z,{size:"lg",translate:"no",onClick:E,disabled:C||!!L&&!(0,j.Mk)(w.Z.stripe,L,t),className:l,children:C?(0,a.jsx)("div",{className:"w-5 h-5 border-2 border-white border-t-transparent rounded-full animate-spin"}):(0,a.jsx)("span",{className:"notranslate relative z-10 flex items-center",children:(null==L?void 0:L.has_access)&&L.subscription_amount&&o>L.subscription_amount?I("upgradePlan"):I("choosePlan")})}),(0,a.jsx)(u.Vq,{open:N,onOpenChange:k,children:(0,a.jsxs)(u.cZ,{className:"sm:max-w-md bg-gray-900/95 border border-white/10 backdrop-blur-xl",children:[(0,a.jsx)(u.$N,{className:"text-xl font-semibold text-white text-center",children:I("selectPayment")}),(0,a.jsx)("div",{className:"space-y-4",children:(0,a.jsx)("div",{className:"grid gap-6",children:M.map((e,t)=>{let n=e.component,s=0===t;return(0,a.jsxs)("div",{className:"relative rounded-xl p-4 transition-all group ".concat(s?"bg-music-primary/20 border-2 border-music-primary shadow-lg shadow-music-primary/20":"bg-white/5 hover:bg-white/10"),children:[s&&(0,a.jsx)("div",{className:"kaivormusic-primary-pill absolute -top-3 -right-2 px-3 py-1 text-xs font-bold rounded-full",children:I("recommendedOption")}),(0,a.jsxs)("div",{className:"flex items-start gap-4",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg ".concat(s?"bg-music-primary text-[#03110d]":"bg-music-primary/10 text-music-primary"),children:(0,a.jsx)(e.icon,{className:"w-5 h-5"})}),(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsx)("h4",{className:"text-sm font-medium ".concat(s?"text-music-primary":"text-white"),children:e.title}),(0,a.jsx)("p",{className:"mt-1 text-xs text-gray-400",children:e.description})]})]}),(0,a.jsx)("div",{className:"mt-4",children:(0,a.jsx)(n,{priceId:e.priceId,price:e.price,mode:r,planName:e.planName,checkoutAll:!0,isMasterPaymentMethold:s,onCheckoutStart:D,trackSubscribeClick:!1,className:"w-full py-2 px-4 roun
1ded-lg text-sm font-medium transition-all ".concat(s?"kaivormusic-primary-button shadow-md transform hover:-translate-y-1":"bg-gray-700 text-white hover:bg-gray-600"),children:s?"".concat(e.buttonText," ✓"):e.buttonText})})]},e.id)})})})]})})]})}var N=r(19803);function k(e){let{plan:t,variant:r="monthly",showComparison:n,className:s}=e,l=(0,c.useTranslations)("pricing"),u=t.level.toLowerCase(),p=t.cycle.toLowerCase(),m=e=>{let t=[];for(let r=1;;r++){let a="plans_super_paypro.".concat(u,".").concat(p,".features.").concat(e,".").concat(r,"_text"),n="plans_super_paypro.".concat(u,".").concat(p,".features.").concat(e,".").concat(r,"_highlight");if(!l.has(a))break;let s=l(a),i=l.has(n)&&"true"===l(n);t.push({text:s,highlight:i})}return t},f=m("available");(["premium","advanced"].includes(u)||"basic"===u&&"annually"===p)&&l.has("featureGroups.advanced.aiLyrics")&&f.push({text:l("featureGroups.advanced.aiLyrics"),highlight:!0});let x=m("unavailable"),h={priceId:t.priceId,price:t.price,showPrice:t.showPrice,priceAnchor:t.priceAnchor,cycle:t.cycle,level:t.level},b=Math.round((h.priceAnchor-h.price)/h.priceAnchor*100),g={monthly:{containerClass:"bg-[#0d1315]/80 hover:border-[#1eff69]/30 hover:bg-[#0f1918]/90",buttonClass:"group relative mt-8 h-[3.25rem] w-full overflow-hidden rounded-full border border-[#1eff69]/45 bg-[#1eff69] px-5 text-sm font-black text-[#031006] shadow-[0_0_34px_rgba(30,255,105,.22)] transition duration-300 hover:bg-[#b8ffe8] hover:shadow-[0_0_42px_rgba(30,255,105,.34)] disabled:pointer-events-none disabled:opacity-50"},featured:{containerClass:"kaivormusic-edge border-[#1eff69]/35 bg-[#0b1713]/90 shadow-[0_32px_100px_rgba(30,255,105,.12)]",buttonClass:"group relative mt-8 h-[3.25rem] w-full overflow-hidden rounded-full border border-[#9dffbd]/60 bg-gradient-to-r from-[#1eff69] to-[#12d7ff] px-5 text-sm font-black text-[#031006] shadow-[0_0_42px_rgba(30,255,105,.32)] transition duration-300 hover:from-[#b8ffe8] hover:to-[#f3fff7] hover:shadow-[0_0_54px_rgba(30,255,105,.45)] disabled:pointer-events-none disabled:opacity-50"},quarterly:{containerClass:"bg-[#0d1315]/80 hover:border-[#12d7ff]/30 hover:bg-[#0f1918]/90",buttonClass:"group relative mt-8 h-[3.25rem] w-full overflow-hidden rounded-full border border-[#1eff69]/45 bg-[#1eff69] px-5 text-sm font-black text-[#031006] shadow-[0_0_34px_rgba(30,255,105,.22)] transition duration-300 hover:bg-[#b8ffe8] hover:shadow-[0_0_42px_rgba(30,255,105,.34)] disabled:pointer-events-none disabled:opacity-50"}};return(0,a.jsxs)("div",{className:(0,d.cn)("group relative flex h-full flex-col overflow-hidden rounded-[1.6rem] border border-white/10 backdrop-blur-2xl shadow-[0_28px_90px_rgba(0,0,0,.42),inset_0_1px_0_rgba(255,255,255,.055)] transition duration-300 hover:-translate-y-1",g[r].containerClass,s),children:[(0,a.jsx)("div",{className:"pointer-events-none absolute inset-x-6 top-0 h-px bg-gradient-to-r from-transparent via-white/30 to-transparent"}),"featured"===r&&(0,a.jsx)("div",{className:"absolute left-1/2 top-0 z-20 -translate-x-1/2 -translate-y-1/2",children:(0,a.jsxs)("div",{className:"inline-flex items-center gap-2 whitespace-nowrap rounded-full border border-[#1eff69]/35 bg-[#07120e]/95 px-4 py-2 text-xs font-black uppercase text-[#dfffee] shadow-[0_0_34px_rgba(30,255,105,.24)] backdrop-blur-xl",children:[(0,a.jsx)(i.Z,{className:"h-3.5 w-3.5 fill-[#1eff69] text-[#1eff69]"}),(0,a.jsx)("span",{children:l("bestValue")}),b>0&&(0,a.jsxs)("span",{translate:"no",className:"notranslate rounded-full bg-[#1eff69] px-2 py-0.5 text-[0.68rem] text-[#031006]",children:["-",b,"%"]})]})}),(0,a.jsxs)("div",{className:"relative flex flex-1 flex-col p-6 sm:p-7 lg:p-8",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h3",{className:"kaivormusic-display-font text-2xl font-black text-[#f4fff9]",children:l("cycles.".concat(h.cycle))}),(0,a.jsx)("p",{className:"mt-3 min-h-[3rem] text-sm leading-6 text-[#c9d6d2]/68",children:l("plans_super_paypro.".concat(u,".").concat(p,".description"))})]}),(0,a.jsxs)("div",{className:"mt-7",children:[(0,a.jsxs)("div",{className:"flex flex-wrap items-end gap-x-2 gap-y-1",children:[(0,a.jsxs)("span",{translate:"no",className:"notranslate kaivormusic-display-font text-5xl font-black leading-none text-[#f7fff9]",children:["$",h.showPrice.toFixed(2)]}),(0,a.jsx)("span",{className:"pb-1 text-sm font-black text-[#b8ffe8]",children:l("perMonth2")})]}),b>0&&(0,a.jsxs)("div",{className:"mt-4 flex flex-wrap items-center gap-2 text-xs",children:[(0,a.jsxs)("span",{translate:"no",className:"notranslate text-[#c9d6d2]/38 line-through",children:["$",h.priceAnchor]}),(0,a.jsx)("span",{className:"rounded-full border border-[#1eff69]/18 bg-[#1eff69]/[0.075] px-2.5 py-1 font-black text-[#1eff69]",children:l("save",{percent:b})}),"featured"===r&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-[#c9d6d2]/28",children:"/"}),(0,a.jsxs)("div",{className:"inline-flex items-center gap-1.5 rounded-full border border-white/10 bg-white/[0.045] px-2.5 py-1",children:[(0,a.jsxs)("span",{className:"font-bold text-[#c9d6d2]/62",children:[l("discountEnds"),":"]}),(0,a.jsx)(N.F,{className:"font-black text-[#b8ffe8]"})]})]})]})]}),(0,a.jsxs)("ul",{className:"mt-8 flex-1 space-y-3.5",children:[f.map((e,t)=>(0,a.jsxs)("li",{className:"flex items-start gap-3",children:[(0,a.jsx)("div",{className:(0,d.cn)("mt-0.5 flex h-5 w-5 flex-shrink-0 items-center justify-center rounded-full border transition-colors duration-200",e.highlight?"border-[#1eff69]/45 bg-[#1eff69]/20 text-[#1eff69]":"border-[#1eff69]/20 bg-[#1eff69]/10 text-[#1eff69]/80"),children:(0,a.jsx)(o.Z,{className:"h-3.5 w-3.5"})}),(0,a.jsx)("span",{className:(0,d.cn)("text-sm leading-6 transition-colors duration-200",e.highlight?"font-semibold text-[#f4fff9]":"text-[#c9d6d2]/68"),children:e.text})]},"available-".concat(t))),x.map((e,t)=>(0,a.jsxs)("li",{className:"flex items-start gap-3",children:[(0,a.jsx)("div",{className:"mt-0.5 flex h-5 w-5 flex-shrink-0 items-center justify-center rounded-full border border-white/10 bg-white/[0.035] text-white/35 transition-colors duration-200",children:(0,a.jsx)("svg",{className:"h-3.5 w-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})}),(0,a.jsx)("span",{className:(0,d.cn)("text-sm leading-6 transition-colors duration-200",e.highlight?"font-semibold text-[#dfffee]/80":"text-[#c9d6d2]/42"),children:e.text})]},"unavailable-".concat(t)))]}),(0,a.jsx)(_,{planDetails:h,mode:"subscription",planName:"plans_stripe_20250319",className:(0,d.cn)(g[r].buttonClass),children:l("selectPlan")}),(0,a.jsxs)("div",{className:"mt-4 space-y-2 text-center",children:[(0,a.jsxs)("p",{className:"flex items-center justify-center gap-1.5 text-xs font-semibold text-[#b8ffe8]/78",children:[(0,a.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4 text-[#1eff69]",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"})}),l("subscription.cancelAnytime")]}),(0,a.jsx)("p",{className:"text-xs text-[#c9d6d2]/42",children:l("subscription.paymentSupport")})]})]})]})}function C(e){let{needPremium:t}
1=e,[r,i]=(0,n.useState)(t?"Premium":"Basic"),o=w.Z.stripe.plans_stripe_20250319.filter(e=>e.level===r).reduce((e,t)=>(e[t.cycle]=t,e),{});return(0,a.jsxs)("div",{className:"relative isolate w-full overflow-hidden bg-[#050807] pb-16 pt-7 text-white sm:pb-20 sm:pt-9",children:[(0,a.jsx)("div",{className:"pointer-events-none absolute inset-0 bg-[radial-gradient(circle_at_22%_4%,rgba(30,255,105,.14),transparent_26rem),radial-gradient(circle_at_84%_10%,rgba(18,215,255,.09),transparent_24rem),linear-gradient(rgba(255,255,255,.022)_1px,transparent_1px),linear-gradient(90deg,rgba(255,255,255,.022)_1px,transparent_1px)] bg-[size:auto,auto,56px_56px,56px_56px]"}),(0,a.jsx)("div",{className:"pointer-events-none absolute inset-x-0 top-0 h-px bg-gradient-to-r from-transparent via-[#1eff69]/45 to-transparent"}),(0,a.jsx)(s.E.div,{className:"relative z-10 mb-8 flex justify-center px-4",initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.2},children:(0,a.jsx)(l.J,{selectedLevel:r,onLevelChange:i})}),(0,a.jsx)("div",{className:"relative z-10 px-4 sm:px-6 lg:px-8",children:(0,a.jsxs)(s.E.div,{className:"mx-auto grid max-w-7xl gap-5 lg:grid-cols-3 lg:gap-6 xl:gap-7",initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.3},children:[(0,a.jsx)(k,{plan:o.monthly,variant:"monthly",showComparison:!1}),(0,a.jsx)(k,{plan:o.annually,variant:"featured",showComparison:!0,className:"relative lg:-mt-4"}),(0,a.jsx)(k,{plan:o.quarterly,variant:"quarterly",showComparison:!1})]})})]})}},32083:function(e,t,r){"use strict";r.d(t,{default:function(){return G}});var a=r(57437),n=r(2265),s=r(79591),l=r(18087),i=r(62265),o=r(22468),c=r(29338),d=r(26164),u=r(15626),p=r(42421),m=r(33907),f=r(58214),x=r(12200),h=r(19803),b=r(85046),g=r(45762),v=r(84840),y=r(5169);function w(e){var t;let{plan:r,variant:s="monthly",showComparison:i,className:w,pricingCurrency:j,pricingPreview:_,onChoosePlan:N}=e,k=(0,l.useTranslations)("pricing"),C=(0,l.useTranslations)("pricing.checkout"),{profile:S}=(0,b.j)(),I=r.level.toLowerCase(),P=r.cycle.toLowerCase(),A=j||(0,y.j)(),L="monthly"===P,T="basic"===I&&L,E="basic"===I&&"annually"===P,[D,M]=(0,n.useState)(!1),U=Math.round(r.quota/5),R=e=>new Intl.NumberFormat("en-US").format(e),Z=(e,t)=>k("featureGroups.".concat(e),t),z=Array.from({length:11},(e,t)=>{let r="featureGroups.core.".concat(t+1);return k.has(r)?k(r):""}).filter(Boolean),F=!T||z.length>8,B=T||D?D?z:z.slice(0,8):[Z("coreIncluded")],K=T?[]:"basic"===I?[Z("advanced.commercial"),Z("advanced.uploadedVoice"),Z("advanced.singerVideo"),...E?[Z("advanced.aiLyrics")]:[]]:[Z("advanced.commercial"),Z("advanced.uploadedVoice"),Z("advanced.singerVideo"),Z("advanced.stems"),Z("advanced.aiLyrics"),Z("advanced.scale")],O={price:r.price,showPrice:r.showPrice,priceAnchor:r.priceAnchor,cycle:r.cycle},q=Math.round((O.priceAnchor-O.price)/O.priceAnchor*100),H=null==_?void 0:null===(t=_.prices)||void 0===t?void 0:t[r.priceId],G=(null==H?void 0:H.total)||(0,y.bW)(O.price,A),W=(null==H?void 0:H.monthly)||(0,y.bW)(O.showPrice,A),V=(null==H?void 0:H.anchor)||(0,y.bW)(O.priceAnchor,A),J=String((null==H?void 0:H.currencyCode)||(null==_?void 0:_.currencyCode)||A.currency||"USD").toUpperCase(),$=W.replace(RegExp("^".concat(J,"\\s+"),"i"),"").replace(RegExp("\\s+".concat(J,"$"),"i"),"").trim(),Y=!!S&&!(0,g.Mk)(v.Z.stripe,S,r),X=C((null==S?void 0:S.has_access)&&S.subscription_amount&&O.price>S.subscription_amount?"upgradePlan":"choosePlan"),Q={title:k("cycles.".concat(O.cycle)),description:k("plans_super_paypro.".concat(I,".").concat(P,".description")),formattedPrice:G,formattedMonthlyPrice:W,formattedAnchorPrice:V,credits:Z("creditsSummary",{credits:R(r.quota),songs:R(U)}),coreFeature:Z(T?"coreTitle":"coreIncluded"),advancedFeature:K[0],rawPrice:O.price},ee=e=>{let{icon:t,title:r,children:n,className:s}=e;return(0,a.jsxs)("section",{className:(0,f.cn)("rounded-2xl border border-white/10 bg-white/[0.032] p-3.5 shadow-[inset_0_1px_0_rgba(255,255,255,.04)]",s),children:[(0,a.jsxs)("div",{className:"mb-2.5 flex items-center gap-2 text-[0.68rem] font-black uppercase tracking-[0.13em] text-[#b8ffe8]/62",children:[(0,a.jsx)("span",{className:"flex h-6 w-6 items-center justify-center rounded-full border border-[#1eff69]/18 bg-[#1eff69]/[0.075] text-[#1eff69]",children:(0,a.jsx)(t,{className:"h-3 w-3"})}),(0,a.jsx)("span",{children:r})]}),n]})},et=e=>{let{items:t,emphasized:r=!1}=e;return(0,a.jsx)("ul",{className:"space-y-2",children:t.map((e,t)=>(0,a.jsxs)("li",{className:"flex items-start gap-2.5",children:[(0,a.jsx)("div",{className:(0,f.cn)("mt-0.5 flex h-[1.1rem] w-[1.1rem] flex-shrink-0 items-center justify-center rounded-full border",r?"border-[#1eff69]/45 bg-[#1eff69]/20 text-[#1eff69]":"border-[#1eff69]/18 bg-[#1eff69]/10 text-[#1eff69]/78"),children:(0,a.jsx)(o.Z,{className:"h-3 w-3"})}),(0,a.jsx)("span",{translate:"no",className:(0,f.cn)("notranslate text-[0.82rem] leading-5",r?"font-semibold text-[#f4fff9]":"text-[#c9d6d2]/70"),children:e})]},"".concat(e,"-").concat(t)))})},er={monthly:{containerClass:"bg-[#0d1315]/80 hover:border-[#1eff69]/30 hover:bg-[#0f1918]/90",buttonClass:"group relative mt-5 h-[3rem] w-full overflow-hidden rounded-full border border-[#1eff69]/45 bg-[#1eff69] px-5 text-sm font-black text-[#031006] shadow-[0_0_34px_rgba(30,255,105,.22)] transition duration-300 hover:bg-[#b8ffe8] hover:shadow-[0_0_42px_rgba(30,255,105,.34)] disabled:pointer-events-none disabled:opacity-50"},featured:{containerClass:"kaivormusic-edge border-[#1eff69]/35 bg-[#0b1713]/90 shadow-[0_32px_100px_rgba(30,255,105,.12)]",buttonClass:"group relative mt-5 h-[3rem] w-full overflow-hidden rounded-full border border-[#9dffbd]/60 bg-gradient-to-r from-[#1eff69] to-[#12d7ff] px-5 text-sm font-black text-[#031006] shadow-[0_0_42px_rgba(30,255,105,.32)] transition duration-300 hover:from-[#b8ffe8] hover:to-[#f3fff7] hover:shadow-[0_0_54px_rgba(30,255,105,.45)] disabled:pointer-events-none disabled:opacity-50"},quarterly:{containerClass:"bg-[#0d1315]/80 hover:border-[#12d7ff]/30 hover:bg-[#0f1918]/90",buttonClass:"group relative mt-5 h-[3rem] w-full overflow-hidden rounded-full border border-[#1eff69]/45 bg-[#1eff69] px-5 text-sm font-black text-[#031006] shadow-[0_0_34px_rgba(30,255,105,.22)] transition duration-300 hover:bg-[#b8ffe8] hover:shadow-[0_0_42px_rgba(30,255,105,.34)] disabled:pointer-events-none disabled:opacity-50"}};return(0,a.jsxs)("div",{className:(0,f.cn)("group relative flex flex-col overflow-visible rounded-[1.6rem] border border-white/10 backdrop-blur-2xl shadow-[0_28px_90px_rgba(0,0,0,.42),inset_0_1px_0_rgba(255,255,255,.055)] transition duration-300 hover:-translate-y-1",er[s].containerClass,w),children:[(0,a.jsx)("div",{className:"pointer-events-none absolute inset-x-6 top-0 h-px bg-gradient-to-r from-transparent via-white/30 to-transparent"}),"featured"===s&&(0,a.jsx)("div",{className:"pointer-events-none absolute -right-3 top-6 z-20 rotate-[7deg] sm:-right-5",children:(0,a.jsxs)("div",{className:"relative inline-flex items-center gap-2 whitespace-nowrap rounded-[0.55rem] bg-gradient-to-r from-[#5b4cff] to-[#8d72ff] px-4 py-2 text-xs font-black uppercase tracking-[0.08em] text-white shadow-[0_18px_40px_rgba(91,76,255,.36)]",children:[(0,a.jsx)("span",{className:"absolute -left-2 top-1 h-3 w-3 rotate-45 bg-[#4032d7]"}),(0,a.jsx)(c.Z,{className:"h-3.5 w-3.5 fill-[#1eff69] text-[#1eff69]"}),(0,a.jsx)("span",{children:k("bestValue")}),q>0&&(0,a.jsxs)("span",{translate:"no",className:"notranslate absolute -bottom-5 -right-3 rounded-full bg-[#1eff69] px-2.5 py-1 text-[0.72rem] text-[#031006] shadow-[0_12px_26px_rgba(30,255,105,.3)]",children:["-",q,"%"]})]})}),(0,a.jsxs)("div",{className:"relative flex flex-col p-5 sm:p-6 lg:p-6",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"flex min-h-[2rem] items-center gap-3 pr-10",children:(0,a.jsx)("h3",{className:"kaivormusic-display-font text-[1.55rem] font-black text-[#f4fff9]",children:k("cycles.".concat(O.cycle))})}),(0,a.jsx)("p",{className:"mt-2 min-h-[2.5rem] text-[0.82rem] leading-5 text-[#c9d6d2]/68",children:k("plans_super_paypro.".concat(I,".").concat(P,".description"))})]}),(0,a.jsxs)("div",{className:"mt-5",children:[(0,a.jsxs)("div",{className:"flex flex-wrap items-baseline justify-center gap-x-2 gap-y-1",children:[(0,a.jsx)("span",{translate:"no",className:"notranslate kaivormusic-display-font text-[2.85rem] font-black leading-none text-[#f7fff9]",children:$}),(0,a.jsx)("span",{translate:"no",className:"notranslate text-[0.78rem] font-semibold tracking-[0.08em] text-[#c9d6d2]/52",children:J}),(0,a.jsx)("span",{className:"text-lg font-black text-[#1eff69]",children:k("perMonth2")})]}),q>0&&(0,a.jsxs)("div",{className:"mt-3 flex flex-wrap items-center justify-center gap-2 text-xs",children:[(0,a.jsx)("span",{translate:"no",className:"notranslate text-[#c9d6d2]/38 line-through",children:V}),(0,a.jsx)("span",{translate:"no",className:"notranslate rounded-full border border-[#1eff69]/18 bg-[#1eff69]/[0.075] px-2.5 py-1 font-black text-[#1eff69]",children:k("save",{percent:q})}),"featured"===s&&(0,a.jsxs)("div",{className:"inline-flex shrink-0 items-center gap-2 rounded-full border border-[#1eff69]/16 bg-[#1eff69]/[0.065] px-2.5 py-1 font-black text-[#b8ffe8] shadow-[0_12px_30px_rgba(30,255,105,.1)]",title:k("discountEnds"),"aria-label":"".concat(k("discountEnds")," ").concat(O.cycle),children:[(0,a.jsx)("span",{"aria-hidden":"true",children:"\uD83D\uDD25"}),(0,a.jsx)(h.F,{segmented:!0,className:"text-[#dfffee]"})]})]})]}),(0,a.jsxs)("div",{className:"mt-5 space-y-3.5",children:[(0,a.jsx)(ee,{icon:d.Z,title:Z("creditsTitle"),children:(0,a.jsx)("p",{translate:"no",className:"notranslate rounded-xl border border-white/10 bg-[#050807]/45 px-3 py-2 text-[0.82rem] font-black leading-5 text-[#dfffee]",children:Z("creditsSummary",{credits:R(r.quota),songs:R(U)})})}),(0,a.jsxs)(ee,{icon:u.Z,title:Z("coreTitle"),children:[(0,a.jsx)(et,{items:B}),F&&(0,a.jsxs)("button",{type:"button",translate:"no",onClick:()=>M(e=>!e),className:"notranslate mt-2.5 inline-flex items-center gap-1.5 rounded-full border border-white/10 bg-white/[0.045] px-2.5 py-1 text-[0.72rem] font-black text-[#b8ffe8]/72 transition hover:border-[#1eff69]/25 hover:bg-[#1eff69]/[0.08] hover:text-[#f4fff9]","aria-expanded":D,children:[Z(D?"collapseCore":"exp
1andCore"),(0,a.jsx)(p.Z,{className:(0,f.cn)("h-3.5 w-3.5 transition-transform",D&&"rotate-180")})]})]}),K.length>0&&(0,a.jsx)(ee,{icon:m.Z,title:Z("advancedTitle"),className:"border-[#1eff69]/24 bg-[linear-gradient(135deg,rgba(30,255,105,.075),rgba(18,215,255,.035)_55%,rgba(157,114,255,.04))] shadow-[0_18px_48px_rgba(30,255,105,.08),inset_0_1px_0_rgba(255,255,255,.06)]",children:(0,a.jsx)(et,{items:K,emphasized:!0})})]}),(0,a.jsx)(x.z,{size:"lg",type:"button",translate:"no",disabled:Y,onClick:()=>null==N?void 0:N({plan:r,summary:Q}),className:(0,f.cn)(er[s].buttonClass),children:(0,a.jsxs)("span",{className:"notranslate relative z-10 flex items-center",children:[X,!Y&&(0,a.jsx)("span",{className:"ml-2 transition-transform group-hover:translate-x-1",children:"→"})]})}),(0,a.jsxs)("div",{className:"mt-4 space-y-2 text-center",children:[(0,a.jsxs)("p",{className:"flex items-center justify-center gap-1.5 text-xs font-semibold text-[#b8ffe8]/78",children:[(0,a.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4 text-[#1eff69]",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"})}),k("subscription.cancelAnytime")]}),(0,a.jsx)("p",{className:"text-xs text-[#c9d6d2]/42",children:k("subscription.paymentSupport")})]})]})]})}var j=r(54887),_=r(21314),N=r(13537),k=r(74697),C=r(88592),S=r(36141),I=r(3274),P=r(71976),A=r(62626),L=r(81626),T=r(75242),E=r(14046);function D(e){var t;let{open:r,plan:s,summary:i,onClose:c,onHostedFallback:d,planName:u="plans_stripe_20250319"}=e,p=(0,A.tv)(),m=(0,l.useLocale)(),{toast:h}=(0,T.pm)(),g=(0,l.useTranslations)("pricing.checkout"),{data:v,profile:y}=(0,b.j)(),w=null==v?void 0:null===(t=v.user)||void 0===t?void 0:t.id,[D,M]=(0,n.useState)(null),[U,R]=(0,n.useState)(!1),[Z,z]=(0,n.useState)(""),[F,B]=(0,n.useState)(0),[K,O]=(0,n.useState)(!1),q=(0,n.useRef)(null),H=(0,n.useRef)(null),G=(0,n.useRef)(null),W=(0,n.useMemo)(()=>({secureCheckout:g("embedded.secureCheckout"),orderSummary:g("embedded.orderSummary"),close:g("embedded.close"),preparingTitle:g("embedded.preparingTitle"),preparingDescription:g("embedded.preparingDescription"),tryAgain:g("embedded.tryAgain"),tryHosted:g("embedded.tryHosted"),cancelAnytime:g("embedded.cancelAnytime"),perMonth:g("embedded.perMonth")}),[g]),V=(0,n.useMemo)(()=>({has_access:null==y?void 0:y.has_access,subscription_id:null==y?void 0:y.subscription_id}),[null==y?void 0:y.has_access,null==y?void 0:y.subscription_id]);(0,n.useEffect)(()=>{O(!0)},[]);let J=(0,n.useMemo)(()=>(null==D?void 0:D.publishableKey)?(0,N.J)(D.publishableKey):null,[null==D?void 0:D.publishableKey]),$=(0,n.useCallback)(e=>e?g("error.".concat(e)):g("error.checkoutError"),[g]),Y=(0,n.useCallback)(()=>{M(null),z(""),R(!1)},[]),X=(0,n.useCallback)(()=>{Y(),null==c||c()},[c,Y]),Q=(0,n.useCallback)(()=>{null==d||d({plan:s,summary:i})},[d,s,i]);if((0,n.useEffect)(()=>{if(!r){Y();return}if(!(null==s?void 0:s.priceId))return;let e=!1;return M(null),z(""),R(!0),(async()=>{if(!w){null==c||c(),p.push("/auth/signin?callbackUrl=".concat(encodeURIComponent(window.location.pathname+window.location.search)));return}try{var t;let r=null!==(t=null==i?void 0:i.rawPrice)&&void 0!==t?t:s.price,a="".concat(window.location.origin,"/").concat(m,"/profile?paysuc=").concat(encodeURIComponent(r),"&checkout_session_id={CHECKOUT_SESSION_ID}"),n=await fetch("/api/stripe/create-embedded-checkout",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({priceId:s.priceId,mode:s.mode||"subscription",returnUrl:a,planName:u,src:(0,L.b5)()})}),l={};try{l=await n.json()}catch(e){l={}}if(!n.ok||!l||l.error)throw Error($(null==l?void 0:l.error));if(e)return;(0,E.wu)(E.eE.CHECKOUT,{method:"stripe_embedded",source:(0,L.b5)(),price:r,price_id:s.priceId,plan_name:u,user_id:w}),(0,L.qf)(r,V),M({clientSecret:l.clientSecret,publishableKey:l.publishableKey})}catch(r){if(e)return;console.error(r);let t=(null==r?void 0:r.message)||$();z(t),h({variant:"destructive",title:t})}finally{e||R(!1)}})(),()=>{e=!0}},[r,null==s?void 0:s.priceId,null==s?void 0:s.mode,null==s?void 0:s.price,u,null==i?void 0:i.rawPrice,m,p,w,c,$,Y,h,F,V]),(0,n.useEffect)(()=>
1{if(!r)return;let e=window.scrollY,t=window.innerWidth-document.documentElement.clientWidth,a=document.body.style.overflow,n=document.body.style.position,s=document.body.style.top,l=document.body.style.width,i=document.body.style.paddingRight,o=document.documentElement.style.overscrollBehavior,c=document.body.style.overscrollBehavior;document.body.style.overflow="hidden",document.body.style.position="fixed",document.body.style.top="-".concat(e,"px"),document.body.style.width="100%",t>0&&(document.body.style.paddingRight="".concat(t,"px")),document.documentElement.style.overscrollBehavior="none",document.body.style.overscrollBehavior="none",window.setTimeout(()=>{let e=window.matchMedia("(min-width: 1024px)").matches?G.current:H.current;null==e||e.focus()},0);let d=e=>{if("Escape"===e.key){X();return}if("Tab"!==e.key||!q.current)return;let t=Array.from(q.current.querySelectorAll('a[href], button:not([disabled]), textarea, input, select, iframe, [tabindex]:not([tabindex="-1"])')).filter(e=>!e.hasAttribute("disabled")&&null!==e.offsetParent);if(!t.length)return;let r=t[0],a=t[t.length-1];e.shiftKey&&document.activeElement===r?(e.preventDefault(),a.focus()):e.shiftKey||document.activeElement!==a||(e.preventDefault(),r.focus())};return window.addEventListener("keydown",d),()=>{window.removeEventListener("keydown",d),document.body.style.overflow=a,document.body.style.position=n,document.body.style.top=s,document.body.style.width=l,document.body.style.paddingRight=i,document.documentElement.style.overscrollBehavior=o,document.body.style.overscrollBehavior=c,window.scrollTo(0,e)}},[r,X]),!K||!r||!s)return null;let ee=[null==i?void 0:i.credits,null==i?void 0:i.coreFeature,null==i?void 0:i.advancedFeature].filter(
1Boolean),et=(0,a.jsxs)("div",{ref:q,role:"dialog","aria-modal":"true","aria-label":W.secureCheckout,className:"fixed inset-0 z-[2147483000] flex items-center justify-center overflow-hidden overscroll-none bg-[#020604]/[0.82] p-2 text-white backdrop-blur-2xl sm:p-4",children:[(0,a.jsx)("div",{className:"pointer-events-none absolute inset-0 bg-[radial-gradient(circle_at_18%_18%,rgba(30,255,105,.16),transparent_28rem),radial-gradient(circle_at_86%_12%,rgba(18,215,255,.12),transparent_24rem),linear-gradient(rgba(255,255,255,.025)_1px,transparent_1px),linear-gradient(90deg,rgba(255,255,255,.025)_1px,transparent_1px)] bg-[size:auto,auto,54px_54px,54px_54px]"}),(0,a.jsxs)("div",{className:"relative flex h-[calc(100dvh-1rem)] w-[min(98vw,1420px)] overflow-hidden overscroll-contain rounded-[1.45rem] border border-[#b8ffe8]/[0.26] bg-[#06100d] shadow-[0_34px_120px_rgba(0,0,0,.62),0_0_70px_rgba(30,255,105,.13)] sm:h-[calc(100dvh-2rem)] max-lg:flex-col",children:[(0,a.jsxs)("aside",{className:"relative flex w-[318px] shrink-0 flex-col border-r border-white/10 bg-[linear-gradient(145deg,rgba(30,255,105,.11),rgba(18,215,255,.045)_45%,rgba(4,10,8,.92))] p-5 max-lg:max-h-[34dvh] max-lg:w-full max-lg:overflow-auto max-lg:overscroll-contain max-lg:border-b max-lg:border-r-0 max-lg:p-4",children:[(0,a.jsx)("div",{className:"pointer-events-none absolute inset-x-6 top-0 h-px bg-gradient-to-r from-transparent via-[#b8ffe8]/[0.45] to-transparent"}),(0,a.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-xs font-black uppercase tracking-[0.24em] text-[#62f7d8]",children:W.secureCheckout}),(0,a.jsx)("h2",{className:"kaivormusic-display-font mt-1 text-2xl font-black text-[#f5fff9]",children:"KaivorMusic.AI"})]}),(0,a.jsx)("button",{type:"button",ref:G,onClick:X,className:"hidden h-11 w-11 shrink-0 items-center justify-center rounded-full border border-white/10 bg-white/[0.06] text-[#dfffee] transition hover:border-[#62f7d8]/[0.35] hover:bg-[#62f7d8]/10 lg:inline-flex","aria-label":W.close,children:(0,a.jsx)(k.Z,{className:"h-5 w-5"})})]}),(0,a.jsxs)("div",{className:"mt-5 rounded-2xl border border-white/10 bg-black/20 p-4 shadow-[inset_0_1px_0_rgba(255,255,255,.055)] max-lg:mt-4",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 text-[0.72rem] font-black uppercase tracking-[0.16em] text-[#b8ffe8]/70",children:[(0,a.jsx)(C.Z,{className:"h-4 w-4 text-[#62f7d8]"}),W.orderSummary]}),(0,a.jsx)("h3",{className:"kaivormusic-display-font mt-4 text-3xl font-black text-[#f7fff9] max-lg:text-2xl",children:(null==i?void 0:i.title)||s.cycle}),(0,a.jsx)("p",{className:"mt-2 text-sm leading-6 text-[#c9d6d2]/70 max-lg:hidden",children:null==i?void 0:i.description}),(0,a.jsxs)("div",{className:"mt-5 flex items-end gap-2 max-lg:mt-3",children:[(0,a.jsx)("span",{translate:"no",className:"notranslate kaivormusic-display-font text-4xl font-black leading-none text-[#f7fff9]",children:null==i?void 0:i.formattedMonthlyPrice}),(0,a.jsx)("span",{className:"pb-1 text-base font-black text-[#1eff69]",children:W.perMonth})]}),(0,a.jsxs)("div",{className:"mt-2 inline-flex rounded-full border border-white/10 bg-white/[0.055] px-3 py-1 text-xs font-bold text-[#c9d6d2]/[0.72]",children:[(0,a.jsx)("span",{translate:"no",className:"notranslate text-[#dfffee]",children:null==i?void 0:i.formattedPrice}),(0,a.jsxs)("span",{className:"ml-1",children:["/ ",(null==i?void 0:i.title)||s.cycle]})]}),ee.length>0&&(0,a.jsx)("ul",{className:"mt-5 space-y-2.5 max-lg:hidden",children:ee.map(e=>(0,a.jsxs)("li",{className:"flex items-start gap-2.5 text-sm font-semibold leading-5 text-[#dfffee]/[0.86]",children:[(0,a.jsx)("span",{className:"mt-0.5 flex h-5 w-5 shrink-0 items-center justify-center rounded-full border border-[#1eff69]/30 bg-[#1eff69]/[0.14] text-[#1eff69]",children:(0,a.jsx)(o.Z,{className:"h-3.5 w-3.5"})}),(0,a.jsx)("span",{children:e})]},e))})]}),(0,a.jsx)("div",{className:"mt-auto pt-5 max-lg:hidden",children:(0,a.jsxs)("div",{className:"flex items-center gap-2 rounded-2xl border border-[#62f7d8]/[0.18] bg-[#62f7d8]/[0.055] p-3 text-sm font-semibold text-[#b8ffe8]/[0.82]",children:[(0,a.jsx)(S.Z,{className:"h-5 w-5 shrink-0 text-[#62f7d8]"}),(0,a.jsx)("span",{children:W.cancelAnytime})]})})]}),(0,a.jsxs)("main",{className:"relative flex min-h-0 min-w-0 flex-1 flex-col bg-[#f7faf8]",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between border-b border-black/10 bg-white px-4 py-3 text-[#101
1513] lg:hidden",children:[(0,a.jsxs)("div",{translate:"no",className:"notranslate text-sm font-black",children:[null==i?void 0:i.formattedPrice," \xb7 ",(null==i?void 0:i.title)||s.cycle]}),(0,a.jsx)(x.z,{type:"button",ref:H,onClick:X,variant:"ghost","aria-label":W.close,className:"h-9 rounded-full px-3 text-[#101513]",children:(0,a.jsx)(k.Z,{className:"h-4 w-4"})})]}),(0,a.jsxs)("div",{className:(0,f.cn)("stripe-embedded-checkout-shell min-h-0 flex-1 overflow-auto overscroll-contain",(U||Z||!(null==D?void 0:D.clientSecret)||!J)&&"grid place-items-center bg-[#f7faf8]"),children:[U&&(0,a.jsxs)("div",{className:"w-[min(86%,420px)] rounded-3xl border border-black/10 bg-white p-6 text-center shadow-[0_24px_70px_rgba(0,0,0,.14)]",children:[(0,a.jsx)("div",{className:"mx-auto flex h-14 w-14 items-center justify-center rounded-2xl bg-[#06100d] text-[#62f7d8]",children:(0,a.jsx)(I.Z,{className:"h-6 w-6 animate-spin"})}),(0,a.jsx)("h3",{translate:"no",className:"notranslate mt-5 text-xl font-black text-[#101513]",children:W.preparingTitle}),(0,a.jsx)("p",{translate:"no",className:"notranslate mt-2 text-sm leading-6 text-[#606a66]",children:W.preparingDescription}),(0,a.jsxs)("div",{className:"mt-5 space-y-2",children:[(0,a.jsx)("div",{className:"h-11 animate-pulse rounded-xl bg-black/[0.07]"}),(0,a.jsx)("div",{className:"h-11 animate-pulse rounded-xl bg-black/[0.05]"}),(0,a.jsx)("div",{className:"h-11 animate-pulse rounded-xl bg-black/[0.04]"})]})]}),!U&&Z&&(0,a.jsxs)("div",{className:"w-[min(86%,430px)] rounded-3xl border border-black/10 bg-white p-6 text-center shadow-[0_24px_70px_rgba(0,0,0,.14)]",children:[(0,a.jsx)("h3",{className:"text-xl font-black text-[#101
1513]",children:g("error.checkoutError")}),(0,a.jsx)("p",{translate:"no",className:"notranslate mt-2 text-sm leading-6 text-[#606a66]",children:Z}),(0,a.jsxs)("div",{className:"mt-5 flex flex-wrap justify-center gap-3",children:[(0,a.jsx)(x.z,{type:"button",onClick:X,variant:"outline",className:"rounded-full",children:W.close}),d&&(0,a.jsx)(x.z,{type:"button",onClick:Q,variant:"outline",className:"rounded-full border-[#62f7d8]/40 bg-[#62f7d8]/[0.08] text-[#0b3f32] hover:bg-[#62f7d8]/[0.14]",children:W.tryHosted}),(0,a.jsxs)(x.z,{type:"button",onClick:()=>{z(""),M(null),B(e=>e+1)},className:"rounded-full bg-[#1eff69] text-[#031006] hover:bg-[#b8ffe8]",children:[W.tryAgain," ",(0,a.jsx)(P.Z,{className:"h-4 w-4"})]})]})]}),!U&&!Z&&(null==D?void 0:D.clientSecret)&&J&&(0,a.jsx)(_.vs,{stripe:J,options:{clientSecret:D.clientSecret},children:(0,a.jsx)(_._j,{})},D.clientSecret)]})]})]})]});return(0,j.createPortal)(et,document.body)}let M=new Set(["BIF","CLP","DJF","GNF","JPY","KMF","KRW","MGA","PYG","RWF","UGX","VND","VUV","XAF","XOF","XPF"]),U=new Set(["ar","bg","cs","da","de","el","en","en-GB","es","es-419","et","fi","fil","fr","fr-CA","he","hr","hu","id","it","ja","ko","lt","lv","ms","mt","nb","nl","pl","pt","pt-BR","ro","ru","sk","sl","sv","th","tr","vi","zh","zh-HK","zh-TW"]);function R(e){return({annually:"billingIntervalYear",yearly:"billingIntervalYear",year:"billingIntervalYear",quarterly:"billingIntervalQuarter",quarter:"billingIntervalQuarter",monthly:"billingIntervalMonth",month:"billingIntervalMonth",weekly:"billingIntervalWeek",week:"billingIntervalWeek",daily:"billingIntervalDay",day:"billingIntervalDay"})[String(e||"").toLowerCase()]||"billingIntervalCycle"}function Z(e){return!!e&&Object.values(e).some(e=>"boolean"==typeof e?e:!!(null==e?void 0:e.available))}async function z(e){let{refreshProfile:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:18;for(let a=0;a<r;a++){try{let r;if(t){let e=await t({global:!0,quiet:!0});r=null==e?void 0:e.profile}else{let e=await fetch("/api/user/profile",{cache:"no-store",headers:{"Cache-Control":"no-store"}}),t=await e.json().catch(()=>({}));r=null==t?void 0:t.profile}if((null==r?void 0:r.has_access)&&(!e||(null==r?void 0:r.subscription_id)===e))return r}catch(e){}await new Promise(e=>setTimeout(e,1800))}return null}function F(e){let{copy:t,policyCopy:r,variant:n="compact",className:s=""}=e,l="sidebar"===n;return(0,a.jsxs)("div",{className:(0,f.cn)("text-center",s),children:[(0,a.jsx)("div",{className:(0,f.cn)("flex flex-wrap items-center justify-center gap-x-3 gap-y-1 text-xs font-semibold text-[#b8ffe8]/60",l&&"justify-start"),children:(0,a.jsxs)("span",{className:"inline-flex items-center gap-1.5",children:[(0,a.jsx)(S.Z,{className:"h-4 w-4 text-[#62f7d8]"}),t.encrypted]})}),l?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("p",{className:"mt-3 max-w-[15rem] text-[0.68rem] font-medium leading-5 text-[#c9d6d2]/[0.46]",children:r.notice}),(0,a.jsxs)("div",{className:"mt-3 flex max-w-[15rem] flex-wrap gap-x-3 gap-y-2 text-[0.68rem] font-bold leading-5",children:[(0,a.jsx)("a",{href:"/tos",target:"_blank",rel:"noreferrer",className:"text-[#b8ffe8]/80 underline decoration-[#62f7d8]/30 underline-offset-4 transition hover:text-[#f5fff9]",children:r.terms}),(0,a.jsx)("a",{href:"/privacy-policy",target:"_blank",rel:"noreferrer",className:"text-[#b8ffe8]/80 underline decoration-[#62f7d8]/30 underline-offset-4 transition hover:text-[#f5fff9]",children:r.privacy}),(0,a.jsx)("a",{href:"/refund-policy",target:"_blank",rel:"noreferrer",className:"text-[#b8ffe8]/80 underline decoration-[#62f7d8]/30 underline-offset-4 transition hover:text-[#f5fff9]",children:r.refund})]})]}):(0,a.jsxs)("p",{className:"mx-auto mt-2 max-w-[560px] text-[0.68rem] font-medium leading-5 text-[#c9d6d2]/[0.46]",children:[r.prefix,(0,a.jsx)("a",{href:"/tos",target:"_blank",rel:"noreferrer",className:"text-[#b8ffe8]/75 underline decoration-[#62f7d8]/30 underline-offset-4 transition hover:text-[#f5fff9]",children:r.terms}),r.middle,(0,a.jsx)("a",{href:"/privacy-policy",target:"_blank",rel:"noreferrer",className:"text-[#b8ffe8]/75 underline decoration-[#62f7d8]/30 underline-offset-4 transition hover:text-[#f5fff9]",children:r.privacy}),r.and,(0,a.jsx)("a",{href:"/refund-policy",target:"_blank",rel:"noreferrer",className:"text-[#b8ffe8]/75 underline decoration-[#62f7d8]/30 underline-offset-4 transition hover:text-[#f5fff9]",children:r.refund}),r.suffix]})]})}function B(e){var t,r;let{summary:s,plan:l,payment:i,amountDueLabel:o,cycleLabel:c,copy:d,policyCopy:u,returnUrl:p,onCreateSubscription:m,onClose:h,onBusyChange:b,onProfileRefresh:g}
1=e,v=(0,_.MD)(),y=(0,_.lq)(),w=(0,A.tv)(),[j,N]=(0,n.useState)(!1),[k,C]=(0,n.useState)("idle"),[L,T]=(0,n.useState)(""),[E,D]=(0,n.useState)(!1),[M,U]=(0,n.useState)(null),B=(0,n.useMemo)(()=>{var e;return function(e,t,r){var a,n;if(!e)return"";let s=R(t),l=(null==r?void 0:r[s])||(null==r?void 0:r.billingIntervalCycle);return a=null==r?void 0:r.billingDisclosure,n={amount:e,interval:l},String(a||"").replace(/\{(\w+)\}/g,(e,t)=>{var r;return null!==(r=n[t])&&void 0!==r?r:""})}(o,(null==i?void 0:null===(e=i.invoice)||void 0===e?void 0:e.recurringInterval)||(null==l?void 0:l.cycle),d)},[o,d,null==i?void 0:null===(t=i.invoice)||void 0===t?void 0:t.recurringInterval,null==l?void 0:l.cycle]),K=(0,n.useCallback)(async e=>{if(C("activating"),await z(e,{refreshProfile:g})){var t,r;await (null==g?void 0:g({global:!0,quiet:!0})),w.push("/profile?paysuc=".concat(encodeURIComponent(null!==(r=null!==(t=null==s?void 0:s.rawPrice)&&void 0!==t?t:null==l?void 0:l.price)&&void 0!==r?r:""),"&stripe_elements=1&subscription_id=").concat(encodeURIComponent(e||""))),null==h||h();return}C("delayed"),N(!1),null==b||b(!1)},[b,h,g,null==l?void 0:l.price,w,null==s?void 0:s.rawPrice]),O=(0,n.useCallback)(function(e,t){var r;let a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"fail";T(e),null==t||null===(r=t.paymentFailed)||void 0===r||r.call(t,{reason:a,message:e}),N(!1),null==b||b(!1),C("idle")},[b]),q=(0,n.useCallback)(async e=>{let t;if(!v||!y||j)return;N(!0),null==b||b(!0),C("submitting"),T("");let{error:r}=await y.submit();if(r){O(r.message||d.paymentFailed,e,"invalid_payment_data");return}try{t=await (null==m?void 0:m())}catch(t){O((null==t?void 0:t.message)||d.paymentFailed,e);return}if(!(null==t?void 0:t.clientSecret)){O(d.paymentFailed,e);return}let a="".concat(p,"&subscription_id=").concat(encodeURIComponent((null==t?void 0:t.subscriptionId)||"")),n={elements:y,clientSecret:null==t?void 0:t.clientSecret,confirmParams:{return_url:a},redirect:"if_required"},{error:s}=(null==t?void 0:t.type)==="setup"?await v.confirmSetup(n):await v.confirmPayment(n);if(s){O(s.message||d.paymentFailed,e);return}await K(null==t?void 0:t.subscriptionId)},[d.paymentFailed,y,O,K,j,b,m,p,v]),H=async e=>{e.preventDefault(),await q()},G=(0,n.useCallback)(async e=>{try{await q(e)}catch(t){O((null==t?void 0:t.message)||d.paymentFailed,e)}},[d.paymentFailed,q,O]),W=(0,n.useCallback)(e=>{U(Z(e.availablePaymentMethods))},[]),V=(0,n.useCallback)(e=>{U(Z(e.paymentMethods))},[]),J=(0,n.useMemo)(()=>{var e;return{buttonHeight:52,buttonType:{applePay:"plain",googlePay:"plain",paypal:"paypal"},layout:{maxColumns:4,maxRows:6,overflow:"auto"},lineItems:Number.isFinite(null==i?void 0:null===(e=i.invoice)||void 0===e?void 0:e.amountDue)?[{name:(null==s?void 0:s.title)||d.orderSummary,amount:i.invoice.amountDue}]:void 0,paymentMethodOrder:["applePay","googlePay","link","paypal","amazonPay","klarna"],paymentMethods:{applePay:"always",googlePay:"always",link:"auto",amazonPay:"auto",paypal:"auto",klarna:"auto"}}},[d.orderSummary,null==i?void 0:null===(r=i.invoice)||void 0===r?void 0:r.amountDue,null==s?void 0:s.title]),$=(0,n.useMemo)(()=>({layout:"tabs",wallets:{applePay:"auto",googlePay:"auto",link:"never"},terms:{card:"never"},fields:{billingDetails:{name:"auto",email:"auto",address:"auto"}}}),[]),Y=(0,n.useMemo)(()=>({visibility:"always",fields:{businessName:"always"},validation:{businessName:{required:"always"},taxId:{required:"auto"}},verification:{taxId:{mode:"if_supported"}}}),[]);return"activating"===k||"delayed"===k?(0,a.jsx)("div",{className:"flex h-full min-h-0 flex-col justify-center px-5 py-8 sm:px-7",children:(0,a.jsxs)("div",{className:"mx-auto w-full max-w-[560px] rounded-[1.1rem] border border-white/10 bg-white/[0.045] p-6 text-center shadow-[0_24px_70px_rgba(0,0,0,.18),inset_0_1px_0_rgba(255,255,255,.06)]",children:[(0,a.jsx)("div",{className:"mx-auto flex h-14 w-14 items-center justify-center rounded-2xl bg-[#1eff69]/[0.12] text-[#1eff69]",children:"activating"===k?(0,a.jsx)(I.Z,{className:"h-6 w-6 animate-spin"}):(0,a.jsx)(S.Z,{className:"h-6 w-6"})}),(0,a.jsx)("h3",{translate:"no",className:"notranslate mt-5 text-xl font-black text-[#f5fff9]",children:"activating"===k?d.activatingTitle:d.delayedTitle}),(0,a.jsx)("p",{translate:"no",className:"notranslate mt-2 text-sm leading-6 text-[#c9d6d2]/70",children:"activating"===k?d.activatingDescription:d.delayedDescription}),"delayed"===k&&(0,a.jsxs)(x.z,{type:"button",translate:"no",onClick:()=>w.push("/profile"),className:"notranslate mt-5 rounded-full bg-[#1eff69] px-6 text-[#031006] hover:bg-[#b8ffe8]",children:[d.goProfile,(0,a.jsx)(P.Z,{className:"h-4 w-4"})]})]})}):(0,a.jsxs)("form",{onSubmit:H,className:"flex min-h-full flex-col lg:h-full lg:min-h-0",children:[(0,a.jsx)("div",{className:"px-3 py-3 sm:px-5 sm:py-5 lg:min-h-0 lg:flex-1 lg:overflow-auto lg:overscroll-contain lg:px-7 lg:py-6 lg:[scroll-padding-bottom:7rem]",children:(0,a.jsxs)("div",{className:"mx-auto w-full max-w-[680px]",children:[(0,a.jsx)("div",{className:"mb-4 hidden rounded-[1rem] border border-[#62f7d8]/[0.14] bg-[#62f7d8]/[0.045] px-4 py-3 lg:block",children:(0,a.jsx)("div",{className:"flex flex-wrap items-end justify-between gap-2",children:(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-[0.7rem] font-black uppercase tracking-[0.16em] text-[#62f7d8]/80",children:d.billedToday}),(0,a.jsx)("p",{translate:"no",className:"notranslate mt-1 text-2xl font-black text-[#f5fff9]",children:o})]})})}),!1!==M&&(0,a.jsx)("div",{className:(0,f.cn)("mb-4 overflow-hidden transition-opacity",M?"opacity-100":"pointer-events-none h-[52px] opacity-0"),"aria-hidden":!M,children:(0,a.jsx)(_.IM,{options:J,onReady:W,onAvailablePaymentMethodsChange:V,onConfirm:G})}),(0,a.jsx)("div",{className:"rounded-[1rem] border border-white/10 bg-[#08120f] p-3 shadow-[inset_0_1px_0_rgba(255,255,255,.055)] sm:p-4",children:(0,a.jsx)(_.Hn,{options:$})}),(0,a.jsxs)("div",{className:"mt-4 rounded-[1rem] border border-white/10 bg-white/[0.035] p-3 shadow-[inset_0_1px_0_rgba(255,255,255,.045)] sm:p-4",children:[(0,a.jsxs)("label",{className:"flex min-h-11 cursor-pointer items-center gap-3 text-sm font-bold text-[#dfffee]/[0.86]",children:[(0,a.jsx)("input",{type:"checkbox",checked:E,onChange:e=>D(e.target.checked),className:"h-5 w-5 shrink-0 rounded border-white/20 bg-[#06100d] accent-[#1eff69]"}),(0,a.jsx)("span",{children:d.companyPurchase})]}),E&&(0,a.jsxs)("div",{className:"mt-4 border-t border-white/10 pt-4",children:[(0,a.jsx)("p",{className:"mb-3 text-xs font-black uppercase tracking-[0.16em] text-[#62f7d8]/80",children:d.businessDetail
1s}),(0,a.jsx)(_.MA,{options:Y})]})]}),L&&(0,a.jsx)("div",{translate:"no",className:"notranslate mt-4 rounded-2xl border border-red-300/30 bg-red-500/10 px-4 py-3 text-sm font-semibold text-red-100",children:L})]})}),(0,a.jsx)("div",{className:"shrink-0 border-t border-white/10 bg-[#06100d]/[0.96] px-4 pb-4 pt-3 sm:px-5 sm:pb-5",style:{paddingBottom:"max(1rem, env(safe-area-inset-bottom))"},children:(0,a.jsxs)("div",{className:"mx-auto w-full max-w-[680px]",children:[(0,a.jsx)(x.z,{type:"submit",translate:"no",disabled:!v||!y||j,className:"notranslate h-12 min-h-12 w-full rounded-full bg-[#1eff69] px-5 text-base font-black text-[#031006] shadow-[0_18px_46px_rgba(30,255,105,.22)] transition hover:bg-[#b8ffe8] disabled:cursor-not-allowed disabled:opacity-70 sm:h-14",children:j?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(I.Z,{className:"h-5 w-5 animate-spin"}),d.submitting]}):(0,a.jsxs)(a.Fragment,{children:[d.payCta,(0,a.jsx)("span",{className:"mx-1",children:"\xb7"}),o,(0,a.jsx)(P.Z,{className:"h-5 w-5"})]})}),B&&(0,a.jsx)("p",{translate:"no",className:"notranslate mx-auto mt-2 max-w-[620px] px-2 text-center text-[0.72rem] font-semibold leading-5 text-[#c9d6d2]/45 sm:text-xs",children:B}),(0,a.jsx)(F,{copy:d,policyCopy:u,className:"mt-3 lg:hidden"})]})})]})}function K(e){var t,r,s,i,c,d;let{open:u,plan:h,summary:g,onClose:v,onHostedFallback:y,planName:w="plans_stripe_20250319"}=e,S=(0,A.tv)(),D=(0,l.useLocale)(),{toast:Z}=(0,T.pm)(),z=(0,l.useTranslations)("pricing.checkout"),{data:K,profile:O,refreshProfile:q}=(0,b.j)(),H=null==K?void 0:null===(t=K.user)||void 0===t?void 0:t.id,[G,W]=(0,n.useState)(null),[V,J]=(0,n.use
1State)(!1),[$,Y]=(0,n.useState)(!1),[X,Q]=(0,n.useState)(""),[ee,et]=(0,n.useState)(0),[er,ea]=(0,n.useState)(!1),en=(0,n.useRef)(null),es=(0,n.useRef)(null),el=(0,n.useRef)(null),ei=(0,n.useRef)(null),eo=(0,n.useMemo)(()=>({has_access:null==O?void 0:O.has_access,subscription_id:null==O?void 0:O.subscription_id}),[null==O?void 0:O.has_access,null==O?void 0:O.subscription_id]),ec=(0,n.useMemo)(()=>({secureCheckout:z("elements.secureCheckout"),orderSummary:z("elements.orderSummary"),paymentTitle:z("elements.paymentTitle"),paymentDescription:z("elements.paymentDescription"),billedToday:z("elements.billedToday"),monthlyEquivalent:z("elements.monthlyEquivalent"),renews:z("elements.renews"),payCta:z("elements.payCta"),submitting:z("elements.submitting"),activatingTitle:z("elements.activatingTitle"),activatingDescription:z("elements.activatingDescription"),delayedTitle:z("elements.delayedTitle"),delayedDescription:z("elements.delayedDescription"),goProfile:z("elements.goProfile"),tryHosted:z("elements.tryHosted"),tryAgain:z("elements.tryAgain"),close:z("elements.close"),cancelAnytime:z("elements.cancelAnytime"),merchant:z("elements.merchant"),encrypted:z("elements.encrypted"),preparingTitle:z("elements.preparingTitle"),preparingDescription:z("elements.preparingDescription"),paymentFailed:z("elements.paymentFailed"),companyPurchase:z("elements.companyPurchase"),businessDetails:z("elements.businessDetails"),billingDisclosure:z.raw("elements.billingDisclosure"),billingIntervalYear:z("elements.billingIntervalYear"),billingIntervalQuarter:z("elements.billingIntervalQuarter"),billingIntervalMonth:z("elements.billingIntervalMonth"),billingIntervalWeek:z("elements.billingIntervalWeek"),billingIntervalDay:z("elements.billingIntervalDay"),billingIntervalCycle:z("elements.billingIntervalCycle")}),[z]),ed=(0,n.useMemo)(()=>({prefix:z("policy.prefix"),terms:z("policy.terms"),middle:z("policy.middle"),privacy:z("policy.privacy"),and:z("policy.and"),refund:z("policy.refund"),suffix:z("policy.suffix"),notice:z("policy.notice")}),[z]);(0,n.useEffect)(()=>{ea(!0)},[]);let eu=(0,n.useMemo)(()=>(null==G?void 0:G.publishableKey)?(0,N.J)(G.publishableKey,{betas:["elements_tax_id_1"]}):null,[null==G?void 0:G.publishableKey]),ep=(0,n.useMemo)(()=>{var e,t;return Number.isFinite(null==G?void 0:null===(e=G.invoice)||void 0===e?void 0:e.amountDue)&&(null==G?void 0:null===(t=G.invoice)||void 0===t?void 0:t.currency)?{mode:"subscription",amount:G.invoice.amountDue,currency:G.invoice.currency,locale:function(e){let t=String(e||"en").replace("_","-");if(U.has(t))return t;let r=t.split("-")[0];return U.has(r)?r:"auto"}(D),appearance:{theme:"night",variables:{colorPrimary:"#62f7d8",colorBackground:"#07100d",colorText:"#f5fff9",colorTextSecondary:"#a9b8b3",colorTextPlaceholder:"rgba(184,255,232,.32)",colorDanger:"#ff7d7d",iconChevronDownColor:"#9eeed8",iconChevronDownHoverColor:"#62f7d8",iconMenuColor:"#9eeed8",iconMenuHoverColor:"#62f7d8",fontFamily:"Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, sans-serif",borderRadius:"14px",spacingUnit:"4px"},rules:{".Input":{border:"1px solid rgba(184,255,232,.18)",boxShadow:"none"},".Input:focus":{border:"1px solid rgba(98,247,216,.72)",boxShadow:"0 0 0 3px rgba(98,247,216,.13)"},".Select":{border:"1px solid rgba(184,255,232,.18)",boxShadow:"none",color:"#f5fff9",backgroundColor:"#07100d"},".Select:focus":{border:"1px solid rgba(98,247,216,.72)",boxShadow:"0 0 0 3px rgba(98,247,216,.13)"},".Dropdown":{border:"1px solid rgba(98,247,216,.24)",backgroundColor:"#07100d",color:"#f5fff9",boxShadow:"0 24px 64px rgba(0,0,0,.38)"},".DropdownItem":{color:"#dfffee",backgroundColor:"#07100d"},".DropdownItem--highlight":{color:"#031006",backgroundColor:"#62f7d8"},".Tab":{border:"1px solid rgba(255,255,255,.12)",boxShadow:"none"},".Tab--selected":{border:"1px solid rgba(98,247,216,.58)"}}}}:null},[D,null==G?void 0:null===(r=G.invoice)||void 0===r?void 0:r.amountDue,null==G?void 0:null===(s=G.invoice)||void 0===s?void 0:s.currency]),em=(0,n.useCallback)(e=>e?z("error.".concat(e)):z("error.checkoutError"),[z]),ef=(0,n.useCallback)(()=>{W(null),Q(""),J(!1),Y(!1),ei.current=null},[]),ex=(0,n.useCallback)(()=>{$||(ef(),null==v||v())},[$,v,ef]),eh=(0,n.useCallback)(()=>{$||null==y||y({plan:h,summary:g})},[$,y,h,g]);(0,n.useEffect)(()=>
1{if(!u){ef();return}if(!(null==h?void 0:h.priceId))return;let e=!1;return W(null),Q(""),J(!0),(async()=>{if(!H){null==v||v(),S.push("/auth/signin?callbackUrl=".concat(encodeURIComponent(window.location.pathname+window.location.search)));return}try{var t,r,a;let n=null!==(t=null==g?void 0:g.rawPrice)&&void 0!==t?t:h.price;ei.current||(ei.current=(null===(a=window.crypto)||void 0===a?void 0:null===(r=a.randomUUID)||void 0===r?void 0:r.call(a))||"".concat(Date.now(),"-").concat(Math.random().toString(36).slice(2)));let s="".concat(window.location.origin,"/").concat(D,"/profile?paysuc=").concat(encodeURIComponent(n),"&stripe_elements=1"),l=await fetch("/api/stripe/prepare-elements-subscription",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({priceId:h.priceId,mode:h.mode||"subscription",returnUrl:s,planName:w,checkoutAttemptId:ei.current})}),i={};try{i=await l.json()}catch(e){i={}}if(!l.ok||!i||i.error)throw Error(em(null==i?void 0:i.error));if(e)return;W({publishableKey:i.publishableKey,checkoutAttemptId:i.checkoutAttemptId,invoice:i.invoice,returnUrl:s})}catch(r){if(e)return;console.error(r);let t=(null==r?void 0:r.message)||em();Q(t),Z({variant:"destructive",title:t})}finally{e||J(!1)}})(),()=>{e=!0}},[u,null==h?void 0:h.priceId,null==h?void 0:h.mode,null==h?void 0:h.price,w,null==g?void 0:g.rawPrice,D,S,H,v,em,ef,Z,ee]);let eb=(0,n.useCallback)(async()=>{var e;let t=null!==(e=null==g?void 0:g.rawPrice)&&void 0!==e?e:null==h?void 0:h.price,r=(null==G?void 0:G.returnUrl)||"".concat(window.location.origin,"/").concat(D,"/profile?paysuc=").concat(encodeURIComponent(t),"&stripe_elements=1"),a=await fetch("/api/stripe/create-elements-subscription",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({priceId:null==h?void 0:h.priceId,mode:(null==h?void 0:h.mode)||"subscription",returnUrl:r,planName:w,src:(0,L.b5)(),checkoutAttemptId:(null==G?void 0:G.checkoutAttemptId)||ei.current})}),n={};try{n=await a.json()}catch(e){n={}}if(!a.ok||!n||n.error)throw Error(em(null==n?void 0:n.error));return(0,E.wu)(E.eE.CHECKOUT,{method:"stripe_elements",source:(0,L.b5)(),price:t,price_id:null==h?void 0:h.priceId,plan_name:w,user_id:H}),(0,L.qf)(t,eo),n},[eo,em,D,null==G?void 0:G.checkoutAttemptId,null==G?void 0:G.returnUrl,null==h?void 0:h.mode,null==h?void 0:h.price,null==h?void 0:h.priceId,w,H,null==g?void 0:g.rawPrice]);if((0,n.useEffect)(()=>{if(!u)return;let e=window.scrollY,t=window.innerWidth-document.documentElement.clientWidth,r=document.body.style.overflow,a=document.body.style.position,n=document.body.style.top,s=document.body.style.width,l=document.body.style.paddingRight,i=document.documentElement.style.overscrollBehavior,o=document.body.style.overscrollBehavior,c=!window.matchMedia("(max-width: 640px), (pointer: coarse)").matches;c&&(document.body.style.overflow="hidden",document.body.style.position="fixed",document.body.style.top="-".concat(e,"px"),document.body.style.width="100%",t>0&&(document.body.style.paddingRight="".concat(t,"px")),document.documentElement.style.overscrollBehavior="none",document.body.style.overscrollBehavior="none"),window.setTimeout(()=>{let e=window.matchMedia("(min-width: 1024px)").matches?el.current:es.current;null==e||e.focus()},0);let d=e=>{if("Escape"===e.key){ex();return}if("Tab"!==e.key||!en.current)return;let t=Array.from(en.current.querySelectorAll('a[href], button:not([disabled]), textarea, input, select, iframe, [tabindex]:not([tabindex="-1"])')).filter(e=>!e.hasAttribute("disabled")&&null!==e.offsetParent);if(!t.length)return;let r=t[0],a=t[t.length-1];e.shiftKey&&document.activeElement===r?(e.preventDefault(),a.focus()):e.shiftKey||document.activeElement!==a||(e.preventDefault(),r.focus())};return window.addEventListener("keydown",d),()=>{window.removeEventListener("keydown",d),c&&(document.body.style.overflow=r,document.body.style.position=a,document.body.style.top=n,document.body.style.width=s,document.body.style.paddingRight=l,document.documentElement.style.overscrollBehavior=i,document.body.style.overscrollBehavior=o,window.scrollTo(0,e))}},[u,ex]),!er||!u||!h)return null;let eg=[null==g?void 0:g.credits,null==g?void 0:g.coreFeature,null==g?void 0:g.advancedFeature].filter(
1Boolean),ev=function(e,t,r){let a=String(t||"").toUpperCase();if(!Number.isFinite(e)||!a)return"";let n=M.has(a)?1:100;try{return new Intl.NumberFormat(r||"en",{style:"currency",currency:a}).format(e/n)}catch(t){return"".concat(a," ").concat((e/n).toFixed(2))}}(null==G?void 0:null===(i=G.invoice)||void 0===i?void 0:i.amountDue,null==G?void 0:null===(c=G.invoice)||void 0===c?void 0:c.currency,D)||(null==g?void 0:g.formattedPrice)||"",ey=function(e,t,r){let a=R(e);return"billingIntervalCycle"!==a?r[a]:t||""}(null==G?void 0:null===(d=G.invoice)||void 0===d?void 0:d.recurringInterval,(null==g?void 0:g.title)||h.cycle,ec),ew=ey?"".concat(ec.renews,": ").concat(ey):"",ej=!!((null==G?void 0:G.publishableKey)&&eu&&ep),e_=(0,a.jsxs)("div",{ref:en,role:"dialog","aria-modal":"true","aria-label":ec.paymentTitle,className:"fixed inset-0 z-[2147483000] flex items-start justify-center overflow-y-auto overscroll-contain bg-[#020604]/[0.86] p-0 text-white sm:p-4 lg:items-center lg:overflow-hidden lg:p-4 lg:backdrop-blur-2xl",children:[(0,a.jsx)("div",{className:"pointer-events-none absolute inset-0 bg-[radial-gradient(circle_at_18%_18%,rgba(30,255,105,.1),transparent_28rem),radial-gradient(circle_at_86%_12%,rgba(18,215,255,.08),transparent_24rem),linear-gradient(rgba(255,255,255,.018)_1px,transparent_1px),linear-gradient(90deg,rgba(255,255,255,.018)_1px,transparent_1px)] bg-[size:auto,auto,54px_54px,54px_54px]"}),(0,a.jsxs)("div",{className:"relative grid min-h-dvh w-full grid-rows-[minmax(0,1fr)] overflow-visible border border-[#b8ffe8]/[0.24] bg-[#06100d] shadow-[0_34px_120px_rgba(0,0,0,.62),0_0_48px_rgba(30,255,105,.1)] sm:min-h-0 sm:w-[min(98vw,1040px)] sm:rounded-[1.1rem] lg:h-[min(760px,calc(100vh-2rem))] lg:grid-cols-[320px_minmax(0,1fr)] lg:overflow-hidden",children:[(0,a.jsxs)("aside",{className:"relative hidden min-h-0 flex-col border-r border-white/10 bg-[linear-gradient(145deg,rgba(30,255,105,.075),rgba(18,215,255,.035)_45%,rgba(4,10,8,.94))] p-5 lg:flex",children:[(0,a.jsx)("div",{className:"pointer-events-none absolute inset-x-6 top-0 h-px bg-gradient-to-r from-transparent via-[#b8ffe8]/[0.45] to-transparent"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-xs font-black uppercase tracking-[0.24em] text-[#62f7d8]",children:ec.secureCheckout}),(0,a.jsx)("h2",{className:"kaivormusic-display-font mt-1 text-2xl font-black text-[#f5fff9]",children:"KaivorMusic.AI"})]}),(0,a.jsxs)("div",{className:"mt-4 rounded-[1rem] border border-white/10 bg-black/[0.18] p-4 shadow-[inset_0_1px_0_rgba(255,255,255,.045)] lg:mt-6",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 text-[0.72rem] font-black uppercase tracking-[0.16em] text-[#b8ffe8]/70",children:[(0,a.jsx)(C.Z,{className:"h-4 w-4 text-[#62f7d8]"}),ec.orderSummary]}),(0,a.jsx)("h3",{translate:"no",className:"notranslate kaivormusic-display-font mt-4 text-3xl font-black text-[#f7fff9] max-lg:text-2xl",children:ev}),(0,a.jsx)("p",{className:"mt-2 text-sm font-bold leading-6 text-[#1eff69]",children:ec.billedToday}),(0,a.jsx)("p",{className:"mt-2 text-sm leading-6 text-[#c9d6d2]/70 max-lg:hidden",children:null==g?void 0:g.description}),(0,a.jsx)("div",{className:"mt-4 flex flex-wrap gap-2 text-xs font-bold text-[#c9d6d2]/[0.72]",children:ew&&(0,a.jsx)("span",{className:"max-w-full truncate rounded-full border border-white/10 bg-white/[0.055] px-3 py-1",title:ec.cancelAnytime,children:ec.cancelAnytime})}),eg.length>0&&(0,a.jsx)("ul",{className:"mt-5 space-y-2.5",children:eg.map(e=>(0,a.jsxs)("li",{className:"flex items-start gap-2.5 text-sm font-semibold leading-5 text-[#dfffee]/[0.86]",children:[(0,a.jsx)("span",{className:"mt-0.5 flex h-5 w-5 shrink-0 items-center justify-center rounded-full border border-[#1eff69]/30 bg-[#1eff69]/[0.14] text-[#1eff69]",children:(0,a.jsx)(o.Z,{className:"h-3.5 w-3.5"})}),(0,a.jsx)("span",{children:e})]},e))})]}),(0,a.jsx)("div",{className:"mt-auto rounded-[1rem] border border-[#62f7d8]/[0.16] bg-[#62f7d8]/[0.045] p-4 shadow-[inset_0_1px_0_rgba(255,255,255,.045)] max-lg:hidden",children:(0,a.jsx)(F,{copy:ec,policyCopy:ed,variant:"sidebar",className:"text-left [&_p]:mx-0 [&_p]:text-left"})})]}),(0,a.jsxs)("main",{className:"relative flex min-h-0 min-w-0 flex-col overflow-visible bg-[#07100d] lg:overflow-hidden",children:[(0,a.jsxs)("div",{className:"flex shrink-0 items-center justify-between gap-3 border-b border-white/10 bg-[linear-gradient(135deg,rgba(30,255,105,.08),rgba(255,255,255,.02))] px-4 py-3 sm:px-6 sm:py-4 lg:px-7",children:[(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 text-[0.72rem] font-black uppercase tracking-[0.18em] text-[#62f7d8] sm:tracking-[0.2em]",children:[(0,a.jsx)(m.Z,{className:"h-4 w-4"}),ec.paymentTitle]}),(0,a.jsx)("p",{className:"mt-1 max-w-[42rem] text-xs font-semibold leading-5 text-[#c9d6d2]/70 sm:text-sm sm:leading-6",children:ec.paymentDescription})]}),(0,a.jsx)("button",{type:"button",ref:es,onClick:ex,disabled:$,className:"inline-flex h-11 w-11 shrink-0 items-center justify-center rounded-full border border-white/10 bg-white/[0.06] text-[#dfffee] transition hover:border-[#62f7d8]/[0.35] hover:bg-[#62f7d8]/10 disabled:cursor-not-allowed disabled:opacity-45 lg:hidden","aria-label":ec.close,children:(0,a.jsx)(k.Z,{className:"h-5 w-5"})}),(0,a.jsx)("button",{type:"button",ref:el,onClick:ex,disabled:$,className:"hidden h-11 w-11 shrink-0 items-center justify-center rounded-full border border-white/10 bg-white/[0.06] text-[#dfffee] transition hover:border-[#62f7d8]/[0.35] hover:bg-[#62f7d8]/10 disabled:cursor-not-allowed disabled:opacity-45 lg:inline-flex","aria-label":ec.close,children:(0,a.jsx)(k.Z,{className:"h-5 w-5"})})]}),(0,a.jsxs)("details",{className:"group shrink-0 border-b border-white/10 bg-[#06100d]/[0.98] px-4 py-2.5 lg:hidden",children:[(0,a.jsxs)("summary",{className:"flex min-h-11 cursor-pointer list-none items-center justify-between gap-3 [&::-webkit-details-marker]:hidden",children:[(0,a.jsxs)("span",{className:"flex min-w-0 items-center gap-2",children:[(0,a.jsx)(C.Z,{className:"h-4 w-4 shrink-0 text-[#62f7d8]"}),(0,a.jsx)("span",{className:"text-xs font-black uppercase tracking-[0.16em] text-[#b8ffe8]/70",children:ec.orderSummary})]}),(0,a.jsxs)("span",{className:"flex shrink-0 items-center gap-2",children:[(0,a.jsx)("span",{translate:"no",className:"notranslate kaivormusic-display-font text-lg font-black text-[#f7fff9]",children:ev}),(0,a.jsx)(p.Z,{className:"h-4 w-4 text-[#62f7d8] transition-transform group-open:rotate-180"})]})]}),(0,a.jsxs)("div",{className:"pb-2 pt-1",children:[(0,a.jsxs)("div",{className:"flex flex-wrap gap-2 text-xs font-bold text-[#c9d6d2]/[0.72]",children:[(0,a.jsx)("span",{className:"rounded-full border border-white/10 bg-white/[0.055] px-3 py-1 text-[#1eff69]",children:ec.billedToday}),ew&&(0,a.jsx)("span",{className:"max-w-full truncate rounded-full border border-white/10 bg-white/[0.055] px-3 py-1",title:ec.cancelAnytime,children:ec.cancelAnytime})]}),eg.length>0&&(0,a.jsx)("ul",{className:"mt-3 grid gap-2",children:eg.slice(0,3).map(e=>(0,a.jsxs)("li",{className:"flex items-start gap-2 text-sm font-semibold leading-5 text-[#dfffee]/[0.86]",children:[(0,a.jsx)("span",{className:"mt-0.5 flex h-5 w-5 shrink-0 items-center justify-center rounded-full border border-[#1eff69]/30 bg-[#1eff69]/[0.14] text-[#1eff69]",children:(0,a.jsx)(o.Z,{className:"h-3.5 w-3.5"})}),(0,a.jsx)("span",{children:e})]},e))})]})]}),(0,a.jsxs)("div",{className:(0,f.cn)("min-h-0 flex-1 lg:overflow-hidden",(V||X||!ej)&&"grid place-items-center"),children:[V&&(0,a.jsxs)("div",{className:"w-[min(86%,420px)] rounded-3xl border border-white/10 bg-white/[0.055] p-6 text-center shadow-[0_24px_70px_rgba(0,0,0,.2)]",children:[(0,a.jsx)("div",{className:"mx-auto flex h-14 w-14 items-center justify-center rounded-2xl bg-black/30 text-[#62f7d8]",children:(0,a.jsx)(I.Z,{className:"h-6 w-6 animate-spin"})}),(0,a.jsx)("h3",{translate:"no",className:"notranslate mt-5 text-xl font-black text-[#f5fff9]",children:ec.preparingTitle}),(0,a.jsx)("p",{translate:"no",className:"notranslate mt-2 text-sm leading-6 text-[#c9d6d2]/[0.68]",children:ec.preparingDescription})]}),!V&&X&&(0,a.jsxs)("div",{className:"w-[min(86%,430px)] rounded-3xl border border-white/10 bg-white/[0.055] p-6 text-center shadow-[0_24px_70px_rgba(0,0,0,.2)]",children:[(0,a.jsx)("h3",{className:"text-xl font-black text-[#f5fff9]",children:z("error.checkoutError")}),(0,a.jsx)("p",{translate:"no",className:"notranslate mt-2 text-sm leading-6 text-[#c9d6d2]/[0.68]",children:X}),(0,a.jsxs)("div",{className:"mt-5 flex flex-wrap justify-center gap-3",children:[(0,a.jsx)(x.z,{type:"button",onClick:ex,variant:"outline",className:"rounded-full border-white/20 bg-white/[0.05] text-white hover:bg-white/10",children:ec.close}),y&&(0,a.jsx)(x.z,{type:"button",onClick:eh,variant:"outline",className:"rounded-full border-[#62f7d8]/30 bg-[#62f7d8]/[0.08] text-[#b8ffe8] hover:bg-[#62f7d8]/[0.14]",children:ec.tryHosted}),(0,a.jsxs)(x.z,{type:"button",onClick:()=>{ei.current=null,Q(""),W(null),et(e=>e+1)},className:"rounded-full bg-[#1eff69] text-[#031006] hover:bg-[#b8ffe8]",children:[ec.tryAgain," ",(0,a.jsx)(P.Z,{className:"h-4 w-4"})]})]})]}
1),!V&&!X&&ej&&(0,a.jsx)(_.eK,{stripe:eu,options:ep,children:(0,a.jsx)(B,{summary:g,plan:h,payment:G,amountDueLabel:ev,cycleLabel:ew,copy:ec,policyCopy:ed,returnUrl:G.returnUrl,onCreateSubscription:eb,onClose:ex,onBusyChange:Y,onProfileRefresh:q})},G.checkoutAttemptId||"".concat(G.invoice.amountDue,"-").concat(G.invoice.currency))]})]})]})]});return(0,j.createPortal)(e_,document.body)}let O="plans_stripe_20250319",q=new Set(["embedded","elements","url"]);function H(e){let t=String(e||"").trim().toLowerCase();return"hosted"===t?"url":q.has(t)?t:null}function G(e){var t;let{needPremium:r,pricingCurrency:o,pricingPreview:c}=e,d=(0,A.tv)(),u=(0,l.useLocale)(),p=(0,l.useTranslations)("pricing.checkout"),{toast:m}=(0,T.pm)(),{data:f,profile:x}=(0,b.j)(),[h,g]=(0,n.useState)(r?"Premium":"Basic"),[y,j]=(0,n.useState)(null),[_,N]=(0,n.useState)(null),[k,C]=(0,n.useState)("embedded"),S=(0,n.useRef)(!1),I=(0,n.useCallback)(()=>H(new URLSearchParams(window.location.search).get("stripe_checkout")||new URLSearchParams(window.location.search).get("stripeCheckout")||new URLSearchParams(window.location.search).get("checkout"))||H("url")||"embedded",[]),P=(0,n.useCallback)(e=>p(e?"error.".concat(e):"error.checkoutError"),[p]),M=(0,n.useCallback)(async e=>{let{plan:t,summary:r}=e;if(!S.current){if(!(null==f?void 0:f.user)){d.push("/auth/signin?callbackUrl=".concat(encodeURIComponent(window.location.pathname+window.location.search)));return}S.current=!0;try{var a,n;let e=null!==(n=null==r?void 0:r.rawPrice)&&void 0!==n?n:t.price,s=new URL("".concat(window.location.origin,"/").concat(u,"/profile"));s.searchParams.set("paysuc",e),s.searchParams.set("checkout_session_id","{CHECKOUT_SESSION_ID}");let l=new URL(window.location.href);l.searchParams.set("paycancel",e),l.searchParams.set("plan_name",O),l.searchParams.set("plan_id",t.priceId);let i=await fetch("/api/stripe/create-checkout",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({priceId:t.priceId,mode:t.mode||"subscription",successUrl:s.toString(),cancelUrl:l.toString(),planName:O,src:(0,L.b5)()})}),o={};try{o=await i.json()}catch(e){o={}}if(!i.ok||!(null==o?void 0:o.stripeSessionURL)||o.error)throw Error(P(null==o?void 0:o.error));(0,E.wu)(E.eE.CHECKOUT,{method:"stripe_url",source:(0,L.b5)(),price:e,price_id:t.priceId,plan_name:O,user_id:null==f?void 0:null===(a=f.user)||void 0===a?void 0:a.id}),(0,L.qf)(e,x),window.location.href=o.stripeSessionURL}catch(e){S.current=!1,console.error(e),m({variant:"destructive",title:(null==e?void 0:e.message)||P()})}}},[P,u,d,null==f?void 0:f.user,m,x]),U=(0,n.useCallback)(e=>{var t,r;let{plan:a,summary:n}=e,s=I();if((0,L.vo)({method:"stripe_".concat(s),price:null!==(r=null==n?void 0:n.rawPrice)&&void 0!==r?r:a.price,price_id:a.priceId,plan_name:O,plan_level:a.level,billing_cycle:a.cycle,user_id:null==f?void 0:null===(t=f.user)||void 0===t?void 0:t.id}),"url"===s){M({plan:a,summary:n});return}C(s),j(a),N(n)},[I,M,null==f?void 0:null===(t=f.user)||void 0===t?void 0:t.id]),R=(0,n.useCallback)(()=>{j(null),N(null),C("embedded")},[]),Z=v.Z.stripe.plans_stripe_20250319.filter(e=>e.level===h).reduce((e,t)=>(e[t.cycle]=t,e),{});return(0,a.jsxs)("div",{className:"relative isolate w-full overflow-hidden bg-[#050807] pb-16 pt-7 text-white sm:pb-20 sm:pt-9",children:[(0,a.jsx)("div",{className:"pointer-events-none absolute inset-0 bg-[radial-gradient(circle_at_22%_4%,rgba(30,255,105,.14),transparent_26rem),radial-gradient(circle_at_84%_10%,rgba(18,215,255,.09),transparent_24rem),linear-gradient(rgba(255,255,255,.022)_1px,transparent_1px),linear-gradient(90deg,rgba(255,255,255,.022)_1px,transparent_1px)] bg-[size:auto,auto,56px_56px,56px_56px]"}),(0,a.jsx)("div",{className:"pointer-events-none absolute inset-x-0 top-0 h-px bg-gradient-to-r from-transparent via-[#1eff69]/[0.45] to-transparent"}),(0,a.jsx)(s.E.div,{className:"relative z-10 mb-8 flex justify-center px-4",initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.2},children:(0,a.jsx)(i.J,{selectedLevel:h,onLevelChange:g})}),(0,a.jsx)("div",{className:"relative z-10 px-4 sm:px-6 lg:px-8",children:(0,a.jsxs)(s.E.div,{className:"mx-auto grid max-w-7xl items-start gap-5 lg:grid-cols-3 lg:gap-6 xl:gap-7",initial:{opacity:0,y:20}
1,animate:{opacity:1,y:0},transition:{delay:.3},children:[(0,a.jsx)(w,{plan:Z.monthly,variant:"monthly",showComparison:!1,pricingCurrency:o,pricingPreview:c,onChoosePlan:U}),(0,a.jsx)(w,{plan:Z.annually,variant:"featured",showComparison:!0,className:"relative lg:-mt-4",pricingCurrency:o,pricingPreview:c,onChoosePlan:U}),(0,a.jsx)(w,{plan:Z.quarterly,variant:"quarterly",showComparison:!1,pricingCurrency:o,pricingPreview:c,onChoosePlan:U})]})}),(0,a.jsx)(D,{open:!!y&&"embedded"===k,plan:y,summary:_,onClose:R,onHostedFallback:M,planName:O}),(0,a.jsx)(K,{open:!!y&&"elements"===k,plan:y,summary:_,onClose:R,onHostedFallback:M,planName:O})]})}},12200:function(e,t,r){"use strict";r.d(t,{d:function(){return o},z:function(){return c}});var a=r(57437),n=r(2265),s=r(71538),l=r(12218),i=r(58214);let o=(0,l.j)("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-neutral-950 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 dark:focus-visible:ring-neutral-300",{variants:{variant:{default:"bg-neutral-900 text-neutral-50 shadow hover:bg-neutral-900/90 dark:bg-neutral-50 dark:text-neutral-900 dark:hover:bg-neutral-50/90",destructive:"bg-red-500 text-neutral-50 shadow-sm hover:bg-red-500/90 dark:bg-red-900 dark:text-neutral-50 dark:hover:bg-red-900/90",outline:"border border-neutral-200 bg-white shadow-sm hover:bg-neutral-100 hover:text-neutral-900 dark:border-neutral-800 dark:bg-neutral-950 dark:hover:bg-neutral-800 dark:hover:text-neutral-50",secondary:"bg-neutral-100 text-neutral-900 shadow-sm hover:bg-neutral-100/80 dark:bg-neutral-800 dark:text-neutral-50 dark:hover:bg-neutral-800/80",ghost:"hover:bg-neutral-100 hover:text-neutral-900 dark:hover:bg-neutral-800 dark:hover:text-neutral-50",link:"text-neutral-900 underline-offset-4 hover:underline dark:text-neutral-50"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),c=n.forwardRef((e,t)=>{let{className:r,variant:n,size:l,asChild:c=!1,...d}=e,u=c?s.g7:"button";return(0,a.jsx)(u,{className:(0,i.cn)(o({variant:n,size:l,className:r})),ref:t,...d})});c.displayName="Button"},15094:function(e,t,r){"use strict";r.d(t,{$N:function(){return x},Be:function(){return h},GG:function(){return d},Vq:function(){return o},cN:function(){return f},cZ:function(){return p},fK:function(){return m}});var a=r(57437),n=r(2265),s=r(13304),l=r(4867),i=r(58214);let o=s.fC;s.xz;let c=s.h_,d=s.x8,u=n.forwardRef((e,t)=>{let{className:r,...n}=e;return(0,a.jsx)(s.aV,{ref:t,className:(0,i.cn)("fixed inset-0 z-[990] bg-[#020706]/78 backdrop-blur-xl",r),...n})});u.displayName=s.aV.displayName;let p=n.forwardRef((e,t)=>{let{className:r,children:n,style:o,...d}=e;return(0,a.jsxs)(c,{children:[(0,a.jsx)(u,{}),(0,a.jsxs)(s.VY,{ref:t,style:{...o,position:"fixed",left:"50%",top:"50%",transform:"translate(-50%, -50%)",zIndex:1e3},className:(0,i.cn)("grid max-h-[calc(100dvh-2rem)] w-[calc(100vw-1.5rem)] max-w-lg gap-4 overflow-hidden rounded-[1.5rem] border border-white/10 bg-[#07100f]/96 p-6 text-[#f4fff9] shadow-[0_34px_120px_rgba(0,0,0,0.62),inset_0_1px_0_rgba(255,255,255,0.08)] outline-none backdrop-blur-2xl sm:w-[calc(100vw-2rem)]",r),...d,children:[n,(0,a.jsxs)(s.x8,{className:"absolute right-4 top-4 z-20 inline-flex h-10 w-10 items-center justify-center rounded-full border border-white/10 bg-white/[0.055] text-emerald-50/62 shadow-[0_12px_34px_rgba(0,0,0,0.28)] backdrop-blur-xl transition hover:border-music-primary/35 hover:bg-white/10 hover:text-white focus:outline-none focus:ring-2 focus:ring-music-primary/50 disabled:pointer-events-none",children:[(0,a.jsx)(l.Pxu,{className:"h-4 w-4"}),(0,a.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})});p.displayName=s.VY.displayName;let m=e=>{let{className:t,...r}=e;return(0,a.jsx)("div",{className:(0,i.cn)("flex flex-col space-y-1.5 text-center sm:text-left",t),...r})};m.displayName="DialogHeader";let f=e=>{let{className:t,...r}=e;return(0,a.jsx)("div",{className:(0,i.cn)("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",t),...r})};f.displayName="DialogFooter";let x=n.forwardRef((e,t)=>
1{let{className:r,...n}=e;return(0,a.jsx)(s.Dx,{ref:t,className:(0,i.cn)("kaivormusic-display-font text-lg font-black leading-none tracking-tight text-[#f4fff9]",r),...n})});x.displayName=s.Dx.displayName;let h=n.forwardRef((e,t)=>{let{className:r,...n}=e;return(0,a.jsx)(s.dk,{ref:t,className:(0,i.cn)("text-sm font-medium leading-6 text-emerald-50/56",r),...n})});h.displayName=s.dk.displayName},75242:function(e,t,r){"use strict";r.d(t,{Am:function(){return u},pm:function(){return p}});var a=r(2265);let n=0,s=new Map,l=e=>{if(s.has(e))return;let t=setTimeout(()=>{s.delete(e),d({type:"REMOVE_TOAST",toastId:e})},5e3);s.set(e,t)},i=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,1)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(e=>e.id===t.toast.id?{...e,...t.toast}:e)};case"DISMISS_TOAST":{let{toastId:r}=t;return r?l(r):e.toasts.forEach(e=>{l(e.id)}),{...e,toasts:e.toasts.map(e=>e.id===r||void 0===r?{...e,open:!1}:e)}}case"REMOVE_TOAST":if(void 0===t.toastId)return{...e,toasts:[]};return{...e,toasts:e.toasts.filter(e=>e.id!==t.toastId)}}},o=[],c={toasts:[]};function d(e){c=i(c,e),o.forEach(e=>{e(c)})}function u(e){var t;let{...r}=e,a=(n=(n+1)%Number.MAX_SAFE_INTEGER).toString(),s=null!==(t=r.duration)&&void 0!==t?t:5e3,l=()=>d({type:"DISMISS_TOAST",toastId:a});return d({type:"ADD_TOAST",toast:{...r,id:a,open:!0,onOpenChange:e=>{e||l()}}}),s>0&&setTimeout(()=>{l()},s),{id:a,dismiss:l,update:e=>d({type:"UPDATE_TOAST",toast:{...e,id:a}})}}function p(){let[e,t]=a.useState(c);return a.useEffect(()=>(o.push(t),()=>{let e=o.indexOf(t);e>-1&&o.splice(e,1)}),[e]),{...e,toast:u,dismiss:e=>d({type:"DISMISS_TOAST",toastId:e})}}},62626:function(e,t,r){"use strict";r.d(t,{jD:function(){return o},rU:function(){return l},tv:function(){return c}});var a=r(63019),n=r(5758);let s=(0,a.R)({locales:["en","zh","ja","es","fr","de","ko","ar","pt","it","ru"],defaultLocale:"en",localePrefix:"as-needed"}),{Link:l,redirect:i,usePathname:o,useRouter:c}=(0,n.os)(s)},45762:function(e,t,r){"use strict";function a(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e||!t)return null;let r=e[t.plan_name];return Array.isArray(r)&&(r.find(e=>e.priceId===t.price_id)||r.find(e=>e.level===t.subscription_level&&e.cycle===t.subscription_cycle&&Number(e.price)===Number(t.subscription_amount))||r.find(e=>e.level===t.subscription_level&&e.cycle===t.subscription_cycle))||null}(e,t),a=Number(null==r?void 0:r.quota)||0,n=Number(null==t?void 0:t.quota)||0;if(a<=0)return{subscribedPlan:r,totalCredits:a,remainingCredits:n,usedCredits:0,usedRatio:0};let s=Math.max(0,a-n);return{subscribedPlan:r,totalCredits:a,remainingCredits:n,usedCredits:s,usedRatio:Math.min(1,s/a)}}function n(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.subscription_level===t.level&&e.subscription_cycle===t.cycle}function s(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return null==t||!t.has_access||!function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!n(t,r))return!1;let{totalCredits:s,usedRatio:l}=a(e,t);return s<=0||l<.1}(e,t,r)&&!function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return"string"==typeof(null==e?void 0:e.src)&&e.src.includes("special-downgrade")}(t)||!function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=Number(e.subscription_amount)||0,a=Number(t.price)||0;return!n(e,t)&&a<r}(t,r))return!1;let{totalCredits:s,usedRatio:l}=a(e,t),i=String(r.level||"").toLowerCase(),o=String(r.cycle||"").toLowerCase();return s<=0||"basic"===i&&"monthly"===o||l<.5}(e,t,r)}r.d(t,{Mk:function(){return s}})},5169:function(e,t,r){"use strict";r.d(t,{bW:function(){return u},j:function(){return d}});let a=new Set(["AD","AL","AT","AX","BA","BE","BG","CH","CY","CZ","DE","DK","EE","ES","FI","FO","FR","GB","GE","GG","GI","GR","HR","HU","IE","IM","IS","IT","JE","LI","LT","LU","LV","MC","MD","ME","MK","MT","NL","NO","PL","PT","RO","RS","SE","SI","SK","SM","UA","VA","XK"]),n=new Set(["AD","AT","AX","BE","BG","CY","DE","EE","ES","FI","FR","GR","HR","IE","IT","LT","LU","LV","MC","ME","MT","NL","PT","SI","SK","SM","VA","XK"]),s=new Set([...a,"AU","BR","CA","CN","NZ"]),l=new Set(["CLP","IDR","JPY","KRW","VND"]),i={AED:"AED ",ALL:"L ",ARS:"ARS ",AUD:"A$",BAM:"KM ",BRL:"R$",CAD:"CA$",CHF:"CHF ",CLP:"CLP ",CNY:"\xa5",COP:"COP ",CZK:"Kč ",DKK:"kr ",EUR:"€",GEL:"₾",GBP:"\xa3",HKD:"HK$",HUF:"Ft ",IDR:"Rp",ILS:"₪",INR:"₹",ISK:"kr ",JPY:"\xa5",KRW:"₩",MDL:"L ",MKD:"ден ",MXN:"MX$",MYR:"RM",NOK:"kr ",NZD:"NZ$",PHP:"₱",PLN:"zł ",RON:"lei ",RSD:"дин ",RUB:"₽",SAR:"SAR ",SEK:"kr ",SGD:"S$",THB:"฿",TRY:"₺",TWD:"NT$",UAH:"₴",USD:"$",VND:"₫",ZAR:"R"},o={AE:{currency:"AED",rate:3.67,locale:"ar-AE"},AL:{currency:"ALL",rate:82.31,locale:"sq-AL"},AR:{currency:"ARS",rate:900,locale:"es-AR"},AU:{currency:"AUD",rate:1.52,locale:"en-AU"},BA:{currency:"BAM",rate:1.72,locale:"bs-BA"},BR:{currency:"BRL",rate:5.1,locale:"pt-BR"},CA:{currency:"CAD",rate:1.37,locale:"en-CA"},CH:{currency:"CHF",rate:.9,locale:"de-CH"},CL:{currency:"CLP",rate:950,locale:"es-CL"},CN:{currency:"CNY",rate:7.24,locale:"zh-CN"},CO:{currency:"COP",rate:3900,locale:"es-CO"},CZ:{currency:"CZK",rate:22.8,locale:"cs-CZ"},DK:{currency:"DKK",rate:6.86,locale:"da-DK"},FO:{currency:"DKK",rate:6.86,locale:"da-DK"},GB:{currency:"GBP",rate:.79,locale:"en-GB"},GE:{currency:"GEL",rate:2.63,locale:"ka-GE"},GG:{currency:"GBP",rate:.79,locale:"en-GB"},GI:{currency:"GBP",rate:.79,locale:"en-GB"},HK:{currency:"HKD",rate:7.8,locale:"zh-HK"},HU:{currency:"HUF",rate:320,locale:"hu-HU"},ID:{currency:"IDR",rate:15800,locale:"id-ID"},IL:{currency:"ILS",rate:3.7,locale:"he-IL"},IM:{currency:"GBP",rate:.79,locale:"en-GB"},IN:{currency:"INR",rate:83.5,locale:"en-IN"},IS:{currency:"ISK",rate:125.39,locale:"is-IS"},JE:{currency:"GBP",rate:.79,locale:"en-GB"},JP:{currency:"JPY",rate:155,locale:"ja-JP"}
1,KR:{currency:"KRW",rate:1350,locale:"ko-KR"},LI:{currency:"CHF",rate:.9,locale:"de-CH"},MD:{currency:"MDL",rate:17.62,locale:"ro-MD"},MK:{currency:"MKD",rate:54.04,locale:"mk-MK"},MX:{currency:"MXN",rate:17.2,locale:"es-MX"},MY:{currency:"MYR",rate:4.7,locale:"ms-MY"},NO:{currency:"NOK",rate:10.7,locale:"nb-NO"},NZ:{currency:"NZD",rate:1.65,locale:"en-NZ"},PH:{currency:"PHP",rate:57,locale:"en-PH"},PL:{currency:"PLN",rate:3.95,locale:"pl-PL"},RO:{currency:"RON",rate:4.6,locale:"ro-RO"},RS:{currency:"RSD",rate:103.15,locale:"sr-RS"},RU:{currency:"RUB",rate:92,locale:"ru-RU"},SA:{currency:"SAR",rate:3.75,locale:"ar-SA"},SE:{currency:"SEK",rate:10.8,locale:"sv-SE"},SG:{currency:"SGD",rate:1.35,locale:"en-SG"},TH:{currency:"THB",rate:36,locale:"th-TH"},TR:{currency:"TRY",rate:32,locale:"tr-TR"},TW:{currency:"TWD",rate:32,locale:"zh-TW"},UA:{currency:"UAH",rate:38.8,locale:"uk-UA"},US:{currency:"USD",rate:1,locale:"en-US"},VN:{currency:"VND",rate:25400,locale:"vi-VN"},ZA:{currency:"ZAR",rate:18.3,locale:"en-ZA"}};function c(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"UNKNOWN",t=String(e||"").trim().toUpperCase();return/^[A-Z]{2}$/.test(t)?t:"US"}function d(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"UNKNOWN",t=c(e),r=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"UNKNOWN",t=c(e);return!function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"UNKNOWN";return s.has(c(e))}(t)?"US":t}(t);if(n.has(r))return{countryCode:r,sourceCountryCode:t,currency:"EUR",rate:.92,locale:"en-IE",isLocalCurrency:!0};let a=o[r]||o.US;return{countryCode:r,sourceCountryCode:t,currency:a.currency,rate:a.rate,locale:a.locale,isLocalCurrency:"USD"!==a.currency}}function u(e,t){let r=t||d();return function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"en-US",a=String(t||"USD").toUpperCase(),n=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"en-US",a=String(t||"USD").toUpperCase(),n=Number(e||0),s=Number.isInteger(n)?0:l.has(String(a||"").toUpperCase())?0:2,o=new Intl.NumberFormat(r,{minimumFractionDigits:s,maximumFractionDigits:s}).format(n);return"".concat(i[a]||"".concat(a," ")).concat(o)}(e,a,r);return n.toUpperCase().startsWith("".concat(a," "))?n:"".concat(n," ").concat(a)}(Number(e||0)*r.rate,r.currency,r.locale)}},58214:function(e,t,r){"use strict";r.d(t,{LU:function(){return i},cn:function(){return s},ew:function(){return o},w:function(){return l}});var a=r(44839),n=r(96164);function s(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return(0,n.m6)((0,a.W)(t))}r(62626);let l=e=>{let t=e.split("@")[1].toLowerCase();return!["gmail.","email.it","yahoo.","hotmail.","msn.","live.","outlook.","aol.","icloud.","protonmail.","zoho.","yandex.","mail.ru","tutanota.","fastmail.","qq.","163.","126.","yeah.","139.","189.","sina.","sohu.","tom.","21cn.","aliyun.","foxmail.","hushmail.","hubspot.","gmx.","googlemail.","web.de","me.com","seznam.cz","libero.it","proton.me","t-online.de","wp.pl","inbox.lv","bluewin.ch","mail.com","o2.pl","abv.bg","btinternet.com","ymail.com","mac.com","moe-dl.edu.my","pm.me","student.uitm.edu.my","virgilio.it","att.net","education.nsw.gov.au","free.fr","freenet.de","orange.fr","aim.com","bigpond.com","education.vic.gov.au","op.pl","sbcglobal.net","telenet.be","comcast.net","freemail.hu","google.com","interia.pl","laposte.net","missionary.org","online.no","rocketmail.com","ukr.net","yopmail.com","advisionair.it","aucklanduni.ac.nz","azet.sk","bluemail.ch","bol.com.br","centrum.cz","criterio.com.br","daemcauquenes.cl","deped.gov.ph","dubicars.com","eldespacho.cl","eproductions.co.nz","fp7mccann.com","garageoilspirits.com","gmx-topmail.de","gravity.com.co","ilan.org.br","itla.edu.do","kommunity.me","lanns.com.br","lapietra.edu","lestoituresdici.ca","liberty.edu","livinitlarge.net","llyc.global","mail.tau.ac.il","medable.com","neuraxo.com","ntlworld.com","poplk.com","posteo.de","sapo.pt","sfr.fr","shaw.ca","sky.com","skynet.be","tin.it","tohru.org","tzfonet.org.il","uach.mx","usa.com","wanadoo.fr","windowslive.com"].some(e=>t.includes(e))};function i(e){if(!e)return"0:00";let t=Math.floor(e%60).toString().padStart(2,"0");return"".concat(Math.floor(e/60),":").concat(t)}let o=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:30;return e?e.length>t?"".concat(e.slice(0,t),"..."):e:"Untitled"}}},function(e){e.O(0,[8310,9413,8087,5888,2183,7979,51,9591,2471,726,6615,7716,1626,2971,3526,1744],function(){return e(e.s=64098)}),_N_E=e.O()}]);

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.