PageSourceSearch

https://makebpm.com/_next/static/chunks/29499c14fb47bc0a.js?dpl=dpl_wYeEmYYBTFC8a5UodxAmq52WtBYx

js makebpm.com collected 2026-10-04 15:26:55 UTC 39,738 bytes, 21 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,380700,e=>{"use strict";var r=e.i(466471),t=e.i(536355),a=e.i(884702),s=e.i(103979),o=e.i(573715),i=e.i(636680),l=e.i(654150),n=e.i(570172),d=e.i(866273),c=e.i(394673),m=e.i(910776),p=e.i(241051),u=e.i(462297),g=e.i(507846),x=e.i(946149),b=e.i(55871),h=e.i(246596),f=e.i(283422),y=e.i(576076),v=e.i(754853),j=e.i(141836),w=e.i(550573),N=e.i(862015),k=e.i(779342),C=e.i(199978),S=e.i(511398),z=e.i(122913),A=e.i(638678),_=e.i(960568),T=e.i(742096),D=e.i(526683),F=e.i(252233);let R=[["idea","Idea",w.Sparkles],["lyrics","Lyrics",h.PenLine],["instrumental","Beat",o.AudioLines]],M=[["auto","Auto"],["boom-bap","Boom Bap"],["trap","Trap"],["drill","Drill"],["melodic-rap","Melodic Rap"],["old-school","Old School"],["lo-fi-rap","Lo-fi Rap"],["west-coast-g-funk","West Coast / G-Funk"],["phonk","Phonk"],["cloud-rap","Cloud Rap"],["grime","Grime"],["jazz-rap","Jazz Rap"],["experimental-rap","Experimental Rap"]],P=[["auto","Auto"],["confident","Confident"],["dark","Dark"],["reflective","Reflective"],["aggressive","Aggressive"],["chill","Chill"],["uplifting","Uplifting"],["hype","Hype"],["melancholic","Melancholic"],["nostalgic","Nostalgic"],["playful","Playful"],["gritty","Gritty"]],L=[["auto","Auto"],["conversational","Conversational"],["tight","Tight"],["laid-back","Laid-back"],["forceful","Forceful"],["melodic","Light Melody"],["punchy","Punchy"],["storytelling","Storytelling"],["double-time","Double-time"],["chant-hook","Chant Hook"]],B=[["auto","Auto"],["slow","Slow"],["mid-tempo","Mid-tempo"],["fast","Fast"]],E=[["auto","Auto"],["dusty","Dusty"],["hard-808s","Hard 808s"],["sparse","Sparse"],["live-drums","Live Drums"],["lo-fi","Lo-fi"]],$=[["V5","V5"],["V5_5","V5.5"],["V4_5","V4.5"],["V4","V4"],["V3_5","V3.5"]],I=["[Intro]","[Verse 1]","[Hook]","[Verse 2]","[Bridge]","[Outro]"],G={"subgenre:auto":"/imgs/rap-options/style-auto.webp","subgenre:boom-bap":"/imgs/rap-options/boom-bap.webp","subgenre:trap":"/imgs/rap-options/trap.webp","subgenre:drill":"/imgs/rap-options/drill.webp","subgenre:melodic-rap":"/imgs/rap-options/melodic-rap.webp","subgenre:old-school":"/imgs/rap-options/old-school.webp","subgenre:lo-fi-rap":"/imgs/rap-options/lo-fi-rap.webp","subgenre:west-coast-g-funk":"/imgs/rap-options/west-coast-g-funk.webp","subgenre:phonk":"/imgs/rap-options/phonk.webp","subgenre:cloud-rap":"/imgs/rap-options/cloud-rap.webp","subgenre:grime":"/imgs/rap-options/grime.webp","subgenre:jazz-rap":"/imgs/rap-options/jazz-rap.webp","subgenre:experimental-rap":"/imgs/rap-options/experimental-rap.webp","mood:auto":"/imgs/rap-options/mood-auto.webp","mood:confident":"/imgs/rap-options/confident.webp","mood:dark":"/imgs/rap-options/dark.webp","mood:reflective":"/imgs/rap-options/reflective.webp","mood:aggressive":"/imgs/rap-options/aggressive.webp","mood:chill":"/imgs/rap-options/chill.webp","mood:uplifting":"/imgs/rap-options/uplifting.webp","mood:hype":"/imgs/rap-options/hype.webp","mood:melancholic":"/imgs/rap-options/melancholic.webp","mood:nostalgic":"/imgs/rap-options/nostalgic.webp","mood:playful":"/imgs/rap-options/playful.webp","mood:gritty":"/imgs/rap-options/gritty.webp","delivery:auto":"/imgs/rap-options/delivery-auto.webp","delivery:conversational":"/imgs/rap-options/conversational.webp","delivery:tight":"/imgs/rap-options/tight.webp","delivery:laid-back":"/imgs/rap-options/laid-back.webp","delivery:forceful":"/imgs/rap-options/forceful.webp","delivery:melodic":"/imgs/rap-options/melodic-delivery.webp","delivery:punchy":"/imgs/rap-options/punchy.webp","delivery:storytelling":"/imgs/rap-options/storytelling.webp","delivery:double-time":"/imgs/rap-options/double-time.webp","delivery:chant-hook":"/imgs/rap-options/chant-hook.webp"};function O(){return{subgenre:"auto",mood:"auto",delivery:"auto",tempoFeel:"auto",drumCharacter:"auto"}}function U(){return{idea:{prompt:"",title:"",lyrics:"",direction:O()},lyrics:{prompt:"",title:"",lyrics:"",direction:O()},instrumental:{prompt:"",title:"",lyrics:"",direction:O()}}}function V(e){if(!Number.isFinite(e)||e<=0)return"0:00";let r=Math.floor(e/60),t=Math.floor(e%60);return`${r}:${String(t).padStart(2,"0")}`}function H(e){let a,s,o,i,l=(0,t.c)(14),{label:n,value:d,options:c,onChange:m}=e;if(l[0]!==n?(a=(0,r.jsx)("legend",{className:"text-sm font-semibold",children:n}),l[0]=n,l[1]=a):a=l[1],l[2]!==m||l[3]!==c||l[4]!==d){let e;l[6]!==m||l[7]!==d?(e=e=>
1{let[t,a]=e;return(0,r.jsx)("button",{type:"button","aria-pressed":d===t,onClick:()=>m(t),className:(0,D.cn)("border-border/70 rounded-full border px-3 py-1.5 text-xs font-medium transition",d===t?"border-primary bg-primary text-primary-foreground":"bg-background/45 text-muted-foreground hover:border-primary/40 hover:text-foreground"),children:a},t)},l[6]=m,l[7]=d,l[8]=e):e=l[8],s=c.map(e),l[2]=m,l[3]=c,l[4]=d,l[5]=s}else s=l[5];return l[9]!==s?(o=(0,r.jsx)("div",{className:"flex flex-wrap gap-2",children:s}),l[9]=s,l[10]=o):o=l[10],l[11]!==a||l[12]!==o?(i=(0,r.jsxs)("fieldset",{className:"space-y-2",children:[a,o]}),l[11]=a,l[12]=o,l[13]=i):i=l[13],i}function q(e){let o,l,n,d,c,m,p,u,g,x,b,h,f,v,w,N,k,C,S,A,_,T,F,R,M,P,L=(0,t.c)(60),{category:B,label:E,value:$,options:I,onChange:O}=e,[U,V]=(0,a.useState)(!1),[H,q]=(0,a.useState)("");L[0]!==I||L[1]!==$?(o=I.find(e=>{let[r]=e;return r===$})||I[0],L[0]=I,L[1]=$,L[2]=o):o=L[2];let W=o,Y=G[`${B}:${W[0]}`];L[3]!==H?(l=e=>{let[,r]=e;return r.toLowerCase().includes(H.trim().toLowerCase())},L[3]=H,L[4]=l):l=L[4];let J=I.filter(l);L[5]!==U?(n=()=>{U&&q("")},d=[U],L[5]=U,L[6]=n,L[7]=d):(n=L[6],d=L[7]),(0,a.useEffect)(n,d),L[8]!==E?(c=(0,r.jsx)("legend",{className:"text-sm font-semibold",children:E}),L[8]=E,L[9]=c):c=L[9],L[10]===Symbol.for("react.memo_cache_sentinel")?(m=()=>V(!0),L[10]=m):m=L[10];let K=W[1];L[11]!==E?(p=E.toLowerCase(),L[11]=E,L[12]=p):p=L[12];let X=`${K} ${p} thumbnail`,Q=`${W[1]} ${E}`;L[13]!==Y||L[14]!==X||L[15]!==Q?(u=(0,r.jsx)(s.default,{src:Y,alt:X,title:Q,fill:!0,sizes:"(max-width: 640px) 45vw, 180px",className:"object-cover transition duration-300 group-hover:scale-105"}),L[13]=Y,L[14]=X,L[15]=Q,L[16]=u):u=L[16],L[17]===Symbol.for("react.memo_cache_sentinel")?(g=(0,r.jsx)("span",{className:"absolute inset-0 bg-gradient-to-t from-black/90 via-black/20 to-transparent"}),L[17]=g):g=L[17],L[18]!==W[1]?(x=(0,r.jsx)("span",{className:"truncate text-sm font-semibold drop-shadow",children:W[1]}),L[18]=W[1],L[19]=x):x=L[19],L[20]===Symbol.for("react.memo_cache_sentinel")?(b=(0,r.jsx)("span",{className:"flex size-7 shrink-0 items-center justify-center rounded-full border border-white/30 bg-black/45 backdrop-blur-sm",children:(0,r.jsx)(y.RefreshCw,{className:"size-3.5"})}),L[20]=b):b=L[20],L[21]!==x?(h=(0,r.jsxs)("span",{className:"absolute right-2 bottom-2 left-2 flex items-end justify-between gap-2 text-white",children:[x,b]}),L[21]=x,L[22]=h):h=L[22],L[23]!==u||L[24]!==h?(f=(0,r.jsxs)("button",{type:"button",onClick:m,className:"border-border/70 bg-background/40 hover:border-primary/70 group relative aspect-[4/3] w-full overflow-hidden rounded-xl border text-left transition",children:[u,g,h]}),L[23]=u,L[24]=h,L[25]=f):f=L[25];let Z=z.Dialog,ee=z.DialogContent;L[26]!==E?(v=(0,r.jsxs)("h3",{className:"text-lg font-semibold",children:["Choose ",E]}),L[26]=E,L[27]=v):v=L[27],L[28]===Symbol.for("react.memo_cache_sentinel")?(w=(0,r.jsx)("p",{className:"text-muted-foreground mt-1 text-xs",children:"Add one option to the rap direction."}),L[28]=w):w=L[28],L[29]!==v?(N=(0,r.jsxs)("div",{className:"border-border/70 border-b px-5 py-4 pr-12",children:[v,w]}),L[29]=v,L[30]=N):N=L[30],L[31]===Symbol.for("react.memo_cache_sentinel")?(k=(0,r.jsx)(j.Search,{className:"text-muted-foreground pointer-events-none absolute top-1/2 left-3 size-4 -translate-y-1/2"}),L[31]=k):k=L[31],L[32]===Symbol.for("react.memo_cache_sentinel")?(C=e=>q(e.target.value),L[32]=C):C=L[32],L[33]!==E?(S=E.toLowerCase(),L[33]=E,L[34]=S):S=L[34];let er=`Search ${S}...`;L[35]!==H||L[36]!==er?(A=(0,r.jsxs)("div",{className:"relative",children:[k,(0,r.jsx)("input",{value:H,onChange:C,placeholder:er,className:"border-border/70 bg-background/70 placeholder:text-muted-foreground focus:border-primary/70 w-full rounded-xl border py-2.5 pr-3 pl-10 text-sm outline-none",autoFocus:!0})]}),L[35]=H,L[36]=er,L[37]=A):A=L[37],L[38]!==B||L[39]!==E||L[40]!==O||L[41]!==$?(_=e=>
1{let[t,a]=e,o=t===$;return(0,r.jsxs)("button",{type:"button","aria-pressed":o,onClick:()=>{O(t),V(!1)},className:(0,D.cn)("border-border/70 group hover:border-primary/70 relative aspect-square overflow-hidden rounded-lg border bg-black text-left text-xs transition",o&&"border-primary text-foreground ring-primary/35 ring-2"),children:[(0,r.jsx)(s.default,{src:G[`${B}:${t}`],alt:`${a} ${E.toLowerCase()} option`,title:`${a} ${E}`,fill:!0,sizes:"(max-width: 640px) 45vw, 180px",className:"object-cover transition duration-300 group-hover:scale-105"}),(0,r.jsx)("span",{className:"absolute inset-0 bg-gradient-to-t from-black/80 via-black/20 to-transparent"}),(0,r.jsx)("span",{className:(0,D.cn)("absolute right-2 bottom-2 left-2 text-sm text-white drop-shadow",o?"font-bold":"font-semibold"),children:a}),o&&(0,r.jsx)("span",{className:"bg-primary text-primary-foreground absolute top-2 right-2 flex size-7 items-center justify-center rounded-full shadow-lg",children:(0,r.jsx)(i.Check,{className:"size-4"})})]},t)},L[38]=B,L[39]=E,L[40]=O,L[41]=$,L[42]=_):_=L[42];let et=J.map(_);return L[43]!==et?(T=(0,r.jsx)("div",{className:"makebpm-scrollbar max-h-[52vh] overflow-y-auto pr-1",children:(0,r.jsx)("div",{className:"grid grid-cols-2 gap-2 sm:grid-cols-3 lg:grid-cols-5",children:et})}),L[43]=et,L[44]=T):T=L[44],L[45]!==A||L[46]!==T?(F=(0,r.jsxs)("div",{className:"space-y-4 p-5",children:[A,T]}),L[45]=A,L[46]=T,L[47]=F):F=L[47],L[48]!==ee||L[49]!==N||L[50]!==F?(R=(0,r.jsxs)(ee,{className:"border-border/70 bg-card text-foreground w-[calc(100vw-2rem)] !max-w-5xl gap-0 overflow-hidden rounded-2xl border p-0 shadow-2xl",children:[N,F]}),L[48]=ee,L[49]=N,L[50]=F,L[51]=R):R=L[51],L[52]!==Z||L[53]!==U||L[54]!==R?(M=(0,r.jsx)(Z,{open:U,onOpenChange:V,children:R}),L[52]=Z,L[53]=U,L[54]=R,L[55]=M):M=L[55],L[56]!==f||L[57]!==M||L[58]!==c?(P=(0,r.jsxs)("fieldset",{className:"space-y-2",children:[c,f,M]}),L[56]=f,L[57]=M,L[58]=c,L[59]=P):P=L[59],P}function W({mode:e,onModeChange:t,fullHeight:s=!1}){let{user:o,setIsShowSignModal:i,fetchUserCredits:h}=(0,_.useAppContext)(),[j,G]=(0,a.useState)(U),[O,W]=(0,a.useState)("V5"),[Y,J]=(0,a.useState)("Auto"),[K,X]=(0,a.useState)(""),[Q,Z]=(0,a.useState)(.65),[ee,er]=(0,a.useState)(.65),[et,ea]=(0,a.useState)(.65),[es,eo]=(0,a.useState)(!1),[ei,el]=(0,a.useState)({idea:!1,lyrics:!1,instrumental:!1}),[en,ed]=(0,a.useState)("idle"),[ec,em]=(0,a.useState)(""),[ep,eu]=(0,a.useState)(null),[eg,ex]=(0,a.useState)([]),[eb,eh]=(0,a.useState)(0),[ef,ey]=(0,a.useState)(!1),[ev,ej]=(0,a.useState)(0),[ew,eN]=(0,a.useState)(0),[ek,eC]=(0,a.useState)(0),[eS,ez]=(0,a.useState)(!1),[eA,e_]=(0,a.useState)(!1),[eT,eD]=(0,a.useState)(null),[eF,eR]=(0,a.useState)(!1),[eM,eP]=(0,a.useState)(null),eL=(0,a.useRef)(null),eB=(0,a.useRef)(null),eE=j[e],e$=eg[eb],eI=e$?.streamAudioUrl||e$?.audioUrl||"",eG=["preparing","submitting","queued","processing"].includes(en),eO="idea"===e?!!eE.prompt.trim():"lyrics"!==e||!!eE.lyrics.trim();function eU(r){G(t=>({...t,[e]:{...t[e],...r}}))}function eV(r){G(t=>({...t,[e]:{...t[e],direction:{...t[e].direction,...r}}}))}async function eH(){if(!eG){if(!o)return void i(!0);if(!eO)return void k.toast.error("idea"===e?"Describe what the rap should be about.":"Add your rap lyrics.");if((o.credits?.remainingCredits??0)<T.STANDARD_MUSIC_GENERATION_CREDITS)return void k.toast.error("You need more credits to generate music.");ed("preparing"),em(""),ex([]),eh(0);try{let r=await fetch("/api/rap/prepare",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({mode:e,prompt:eE.prompt,title:eE.title,lyrics:eE.lyrics,direction:eE.direction,model:O})}),t=await r.json();if(!r.ok||0!==t.code)throw Error(t.message||"Unable to prepare this rap");let a=t.data;ed("submitting");let s="Female"===Y?"f":"Male"===Y?"m":void 0,o=function(e,r,t=""){let a=r?["lead vocals","rap vocals","sung hook","singing voice","vocal melody","artist imitation","celebrity voice","copyrighted lyrics"]:"melodic-rap"===e.subgenre||"cloud-rap"===e.subgenre||"melodic"===e.delivery?["full sung lead vocal","R&B crooning","pop ballad vocal","non-rap pop chorus","long melismatic singing","crooner vocal","artist imitation","celebrity voice","copyrighted lyrics"]:["sung lead vocal","pop singing","R&B singing","full melodic chorus","crooner vocal","ballad vocal","long melismatic singing","non-rap pop chorus","artist imitation","celebrity voice","copyrighted lyrics"];return"west-coast-g-funk"===e.subgenre&&a.push("R&B singing hook","smooth sung hook","soul singing lead vocal"),t.split(",").map(e=>
1e.trim()).filter(Boolean).forEach(e=>a.push(e)),Array.from(new Set(a)).join(", ")}(eE.direction,a.instrumental,K),i=await fetch("/api/ai/generate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:"kie",mediaType:"music",model:O,prompt:a.sourcePrompt,options:{customMode:!0,workflow:"ai-rap-generator",rapMode:e,sourcePrompt:a.sourcePrompt,title:a.title,style:a.style,lyrics:a.lyrics,instrumental:a.instrumental,rapDirection:eE.direction,...!a.instrumental&&s?{vocalGender:s}:{},negativeTags:o,styleWeight:Number(Q.toFixed(2)),weirdnessConstraint:Number(ee.toFixed(2)),audioWeight:Number(et.toFixed(2))}})}),l=await i.json();if(!i.ok||0!==l.code)throw Error(l.message||"Unable to start music generation");eu(l.data.id),ed("queued"),await h()}catch(e){em(e?.message||"Unable to generate this rap"),ed("failed"),k.toast.error(e?.message||"Unable to generate this rap")}}}async function eq(){if(!o)return void i(!0);let e=j.lyrics.lyrics;if(!e.trim())return void k.toast.error("Add your rap lyrics first.");e_(!0);try{let r=await fetch("/api/rap/fit-lyrics",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({lyrics:e,direction:j.lyrics.direction})}),t=await r.json();if(!r.ok||0!==t.code)throw Error(t.message||"Unable to fit lyrics to flow");eD(t.data),eR(!0)}catch(e){k.toast.error(e?.message||"Unable to fit lyrics to flow")}finally{e_(!1)}}async function eW(){let e;if(!eI||eS)return;let r=(0,F.getAudioDownloadFormat)(eI),t=(0,F.getAudioMimeType)(r),a=`${(0,F.getDownloadBaseName)(e$?.title||"makebpm-rap")}.${r}`;try{e=await (0,F.requestAudioSaveFileHandle)({fileName:a,format:r,mimeType:t})}catch(e){e?.name!=="AbortError"&&k.toast.error("Could not start this download");return}ez(!0);try{let r=await fetch(`/api/proxy/file?url=${encodeURIComponent(eI)}`);if(!r.ok)throw Error("Failed to fetch audio");let t=await r.blob();if(!t.size)throw Error("Downloaded audio is empty");await (0,F.saveAudioBlob)(t,a,e),k.toast.success("Download ready")}catch{k.toast.error("Could not download this audio")}finally{ez(!1)}}(0,a.useEffect)(()=>{if(!ep||!eG)return;let e=!1,r=window.setTimeout(()=>{e||(em("Generation timed out. Please try again."),ed("failed"),eu(null),k.toast.error("Generation timed out. Please try again."))},9e5),t=async()=>{try{let e=await fetch("/api/ai/query",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({taskId:ep})}),r=await e.json();if(!e.ok||0!==r.code)throw Error(r.message||"Unable to check generation status");let t=r.data,a=t.taskInfo?JSON.parse(t.taskInfo):{},s=Array.isArray(a.songs)?a.songs.slice(0,2):[];if("success"===t.status){if(!s.length)throw Error("Music generation finished without playable tracks");ex(s),eh(0),ed("success"),eu(null),await h();return}if("failed"===t.status||"canceled"===t.status)throw Error(a.errorMessage||"Music generation failed");ed("processing"===t.status?"processing":"queued")}catch(r){if(e)return;em(r?.message||"Music generation failed"),ed("failed"),eu(null),k.toast.error(r?.message||"Music generation failed"),await h()}};t();let a=window.setInterval(t,8e3);return()=>{e=!0,window.clearInterval(a),window.clearTimeout(r)}},[h,eG,ep]),(0,a.useEffect)(()=>{"failed"===en&&eL.current?.focus()},[en]),(0,a.useEffect)(()=>{if(!eG)return void eC(0);let e=Date.now();eC(0);let r=window.setInterval(()=>{eC(Math.floor((Date.now()-e)/1e3))},1e3);return()=>window.clearInterval(r)},[eG]),(0,a.useEffect)(()=>{eB.current?.pause(),ey(!1),ej(0),eN(0)},[eb,eI]);let eY="preparing"===en?"Preparing your rap direction...":"submitting"===en?"Starting music generation...":"queued"===en?"Your rap is queued...":"processing"===en?"Generating two rap versions...":"success"===en?"Your rap tracks are ready.":"failed"===en?ec:"Choose a starting point and shape your rap direction.";return(0,r.jsxs)("div",{className:(0,D.cn)("grid min-h-[42rem] gap-4 lg:grid-cols-[1fr_1.05fr] lg:gap-0",s?"lg:h-full":"lg:h-[42rem]"),children:[(0,r.jsx)("style",{children:`
2        @keyframes makebpm-rap-preview-shimmer {
3          0% {
4            transform: translateX(-100%);
5          }
6          100% {
7            transform: translateX(100%);
8          }
9        }
10
11        @keyframes makebpm-rap-preview-bars {
12          0%,
13          100% {
14            transform: scaleY(0.45);
15          }
16          50% {
17            transform: scaleY(1);
18          }
19        }
20      `}),(0,r.jsxs)("section",{className:"border-border/80 bg-card/95 shadow-primary/10 flex min-h-0 flex-col overflow-hidden rounded-2xl border shadow-2xl lg:rou
20nded-none",children:[(0,r.jsxs)("div",{className:"flex items-center gap-3 px-5 py-4",children:[(0,r.jsx)("span",{className:"bg-primary/15 text-primary flex size-9 items-center justify-center rounded-xl",children:(0,r.jsx)(N.WandSparkles,{className:"size-5"})}),(0,r.jsx)("div",{className:"text-lg font-semibold",children:"AI Rap Generator"})]}),(0,r.jsx)("div",{role:"tablist","aria-label":"Rap creation mode",onKeyDown:function(r){if(!["ArrowLeft","ArrowRight","Home","End"].includes(r.key))return;r.preventDefault();let a=R.findIndex(([r])=>r===e),s="Home"===r.key?0:"End"===r.key?R.length-1:"ArrowRight"===r.key?(a+1)%R.length:(a-1+R.length)%R.length;t(R[s][0]),requestAnimationFrame(()=>{document.getElementById(`rap-mode-${R[s][0]}`)?.focus()})},className:"bg-background/60 border-border/70 mx-5 grid grid-cols-3 gap-1 rounded-xl border p-1",children:R.map(([a,s,o])=>(0,r.jsxs)("button",{id:`rap-mode-${a}`,type:"button",role:"tab","aria-selected":e===a,"aria-controls":"rap-mode-panel",tabIndex:e===a?0:-1,onClick:()=>t(a),className:(0,D.cn)("flex min-h-11 items-center justify-center gap-1.5 rounded-lg px-2 py-2 text-center text-xs font-medium transition sm:text-sm",e===a?"bg-primary text-primary-foreground shadow-lg":"text-muted-foreground hover:text-foreground"),children:[(0,r.jsx)(o,{className:"hidden size-4 sm:block"}),(0,r.jsx)("span",{children:s})]},a))}),(0,r.jsxs)("div",{id:"rap-mode-panel",role:"tabpanel","aria-labelledby":`rap-mode-${e}`,className:"min-h-0 flex-1 space-y-5 overflow-y-auto p-5 [scrollbar-width:thin]",children:["idea"===e&&(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsxs)("label",{htmlFor:"rap-idea",className:"text-sm font-semibold",children:["What should this rap be about?"," ",(0,r.jsx)("span",{className:"text-primary",children:"*"})]}),(0,r.jsx)("textarea",{id:"rap-idea",value:eE.prompt,onChange:e=>eU({prompt:e.target.value}),maxLength:500,placeholder:"For example: rebuilding after a setback, keeping your confidence while everything changes...",className:"border-border/70 bg-background/45 placeholder:text-muted-foreground focus:border-primary/60 min-h-32 w-full resize-y rounded-xl border p-4 text-sm leading-6 outline-none"}),(0,r.jsxs)("p",{className:"text-muted-foreground text-right text-xs",children:[eE.prompt.length," / 500"]})]}),"lyrics"===e&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsxs)("label",{htmlFor:"rap-title",className:"text-sm font-semibold",children:["Title"," ",(0,r.jsx)("span",{className:"text-muted-foreground font-normal",children:"(optional)"})]}),(0,r.jsx)("input",{id:"rap-title",value:eE.title,onChange:e=>eU({title:e.target.value}),maxLength:80,placeholder:"Give your rap a working title",className:"border-border/70 bg-background/45 placeholder:text-muted-foreground focus:border-primary/60 w-full rounded-xl border px-4 py-3 text-sm outline-none"})]}),(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[(0,r.jsxs)("label",{htmlFor:"rap-lyrics",className:"text-sm font-semibold",children:["Your rap lyrics ",(0,r.jsx)("span",{className:"text-primary",children:"*"})]}),(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[null!==eM&&(0,r.jsxs)("button",{type:"button",onClick:function(){null!==eM&&(G(e=>({...e,lyrics:{...e.lyrics,lyrics:eM}})),eP(null),k.toast.success("Original lyrics restored."))},className:"text-muted-foreground hover:text-primary inline-flex items-center gap-1 text-xs",children:[(0,r.jsx)(v.RotateCcw,{className:"size-3.5"})," Undo"]}),(0,r.jsxs)("button",{type:"button",onClick:()=>void eq(),disabled:eA||!eE.lyrics.trim(),className:"text-primary hover:bg-primary/10 inline-flex items-center gap-1 rounded-full px-2.5 py-1.5 text-xs font-medium disabled:opacity-50",children:[eA?(0,r.jsx)(u.Loader2,{className:"size-3.5 animate-spin"}):(0,r.jsx)(w.Sparkles,{className:"size-3.5"}),"Improve Flow · Free"]})]})]}),(0,r.jsx)("textarea",{id:"rap-lyrics",value:eE.lyrics,onChange:e=>eU({lyrics:e.target.value}),maxLength:5e3,placeholder:"Paste or write your rap lyrics here...",className:"border-border/70 bg-background/45 placeholder:text-muted-foreground focus:border-primary/60 min-h-44 w-full resize-y rounded-xl border p-4 font-mono text-sm leading-6 outline-none"}),(0,r.jsx)("div",{className:"flex flex-wrap gap-1.5",children:I.map(e=>(0,r.jsx)("button",{type:"button",onClick:()=>eU({lyrics:`${eE.lyrics}${eE.lyrics?"\n\n":""}${e}
21`}),className:"bg-secondary text-muted-foreground hover:text-foreground rounded-md px-2 py-1 text-[11px]",children:e},e))}),(0,r.jsxs)("p",{className:"text-muted-foreground text-right text-xs",children:[eE.lyrics.length," / 5000"]})]})]}),"instrumental"===e&&(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsxs)("label",{htmlFor:"rap-beat",className:"text-sm font-semibold",children:["Describe the beat"," ",(0,r.jsx)("span",{className:"text-muted-foreground font-normal",children:"(optional)"})]}),(0,r.jsx)("textarea",{id:"rap-beat",value:eE.prompt,onChange:e=>eU({prompt:e.target.value}),maxLength:500,placeholder:"For example: a tense late-night beat with cold piano, hard drums, and room for a focused verse...",className:"border-border/70 bg-background/45 placeholder:text-muted-foreground focus:border-primary/60 min-h-28 w-full resize-y rounded-xl border p-4 text-sm leading-6 outline-none"}),(0,r.jsxs)("p",{className:"text-muted-foreground text-right text-xs",children:[eE.prompt.length," / 500"]})]}),(0,r.jsxs)("div",{className:(0,D.cn)("grid gap-3","instrumental"===e?"grid-cols-2":"grid-cols-3"),children:[(0,r.jsx)(q,{category:"subgenre",label:"Rap Style",value:eE.direction.subgenre,options:M,onChange:e=>eV({subgenre:e})}),(0,r.jsx)(q,{category:"mood",label:"Mood",value:eE.direction.mood,options:P,onChange:e=>eV({mood:e})}),"instrumental"!==e&&(0,r.jsx)(q,{category:"delivery",label:"Flow / Delivery",value:eE.direction.delivery||"auto",options:L,onChange:e=>eV({delivery:e})})]}),(0,r.jsxs)("fieldset",{className:"space-y-2",children:[(0,r.jsx)("legend",{className:"text-sm font-semibold",children:"Tempo"}),(0,r.jsxs)("div",{className:"flex flex-wrap gap-2",children:[B.map(([t,a])=>{let s=!ei[e]&&eE.direction.tempoFeel===t;return(0,r.jsx)("button",{type:"button","aria-pressed":s,onClick:()=>{eV({tempoFeel:t,tempoBpm:void 0}),el(r=>({...r,[e]:!1}))},className:(0,D.cn)("border-border/70 rounded-full border px-3 py-1.5 text-xs font-medium transition",s?"border-primary bg-primary text-primary-foreground":"bg-background/45 text-muted-foreground hover:border-primary/40 hover:text-foreground"),children:a},t)}),(0,r.jsx)("button",{type:"button","aria-pressed":ei[e],onClick:function(){eV({tempoFeel:"auto"}),el(r=>({...r,[e]:!0}))},className:(0,D.cn)("border-border/70 rounded-full border px-3 py-1.5 text-xs font-medium transition",ei[e]?"border-primary bg-primary text-primary-foreground":"bg-background/45 text-muted-foreground hover:border-primary/40 hover:text-foreground"),children:"Custom"})]})]}),ei[e]&&(0,r.jsxs)("label",{className:"block space-y-2 text-sm font-semibold",children:[(0,r.jsxs)("span",{className:"flex items-center justify-between",children:[(0,r.jsx)("span",{children:"Custom BPM"}),(0,r.jsx)("span",{className:"text-muted-foreground text-xs font-normal",children:"40–240"})]}),(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsx)("input",{type:"number",inputMode:"numeric",min:4
210,max:240,step:1,value:eE.direction.tempoBpm??"",onChange:e=>eV({tempoBpm:e.target.value?Number(e.target.value):void 0}),onBlur:()=>{let e=eE.direction.tempoBpm;void 0!==e&&eV({tempoBpm:Math.min(240,Math.max(40,Math.round(e)))})},placeholder:"Enter BPM","aria-label":"Custom BPM",autoFocus:!0,className:"border-border/70 bg-background/45 placeholder:text-muted-foreground focus:border-primary/60 w-full appearance-none rounded-xl border px-3 py-2.5 pr-14 text-sm outline-none [-moz-appearance:textfield] [&::-webkit-inner-spin-button]:m-0 [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:m-0 [&::-webkit-outer-spin-button]:appearance-none"}),(0,r.jsx)("span",{className:"text-muted-foreground pointer-events-none absolute top-1/2 right-3 -translate-y-1/2 text-xs",children:"BPM"})]})]}),"instrumental"===e&&(0,r.jsx)(H,{label:"Drum Character",value:eE.direction.drumCharacter||"auto",options:E,onChange:e=>eV({drumCharacter:e})}),(0,r.jsxs)("div",{className:"border-border/70 bg-background/35 overflow-hidden rounded-xl border",children:[(0,r.jsxs)("button",{type:"button","aria-expanded":es,onClick:()=>eo(e=>!e),className:"text-muted-foreground hover:text-foreground flex w-full items-center justify-between px-4 py-3 text-sm font-medium",children:["More Settings",(0,r.jsx)(l.ChevronDown,{className:(0,D.cn)("size-4 transition",es&&"rotate-180")})]}),es&&(0,r.jsxs)("div",{className:"border-border/70 space-y-5 border-t p-4",children:[(0,r.jsxs)("div",{className:"grid gap-4 sm:grid-cols-2",children:[(0,r.jsxs)("div",{className:"space-y-2 text-sm font-semibold",children:[(0,r.jsx)("span",{children:"Model"}),(0,r.jsxs)(A.Select,{value:O,onValueChange:e=>W(e),children:[(0,r.jsx)(A.SelectTrigger,{className:"border-border/70 bg-background/60 h-11 w-full rounded-lg",children:(0,r.jsx)(A.SelectValue,{placeholder:"Choose model"})}),(0,r.jsx)(A.SelectContent,{className:"border-border/70 bg-popover",children:$.map(([e,t])=>(0,r.jsx)(A.SelectItem,{value:e,children:t},e))})]})]}),"instrumental"!==e&&(0,r.jsxs)("div",{className:"space-y-2 text-sm font-semibold",children:[(0,r.jsx)("span",{children:"Vocal Gender"}),(0,r.jsxs)(A.Select,{value:Y,onValueChange:e=>J(e),children:[(0,r.jsx)(A.SelectTrigger,{className:"border-border/70 bg-background/60 h-11 w-full rounded-lg",children:(0,r.jsx)(A.SelectValue,{placeholder:"Choose vocal gender"})}),(0,r.jsx)(A.SelectContent,{className:"border-border/70 bg-popover",children:["Auto","Female","Male"].map(e=>(0,r.jsx)(A.SelectItem,{value:e,children:e},e))})]})]})]}),(0,r.jsxs)("label",{className:"block space-y-2 text-sm font-semibold",children:[(0,r.jsx)("span",{children:"Excluded Styles"}),(0,r.jsx)("input",{value:K,onChange:e=>X(e.target.value),maxLength:500,placeholder:"e.g. pop chorus, glossy synths, sung vocals",className:"border-border/70 bg-background/60 w-full rounded-lg border px-3 py-2.5 text-sm outline-none"})]}),[["Style Weight",Q,Z],["Creativity",ee,er],["Audio Consistency",et,ea]].map(([e,t,a])=>(0,r.jsxs)("label",{className:"block space-y-2",children:[(0,r.jsxs)("span",{className:"flex justify-between text-sm font-medium",children:[(0,r.jsx)("span",{children:e}),(0,r.jsx)("span",{className:"text-muted-foreground",children:t.toFixed(2)})]}),(0,r.jsx)("input",{type:"range",min:"0",max:"1",step:"0.05",value:t,onChange:e=>a(Number(e.target.value)),className:"accent-primary w-full"})]},e))]})]})]}),(0,r.jsxs)("div",{className:"border-border/70 flex items-center justify-between gap-3 border-t p-4",children:[(0,r.jsxs)("span",{className:"text-muted-foreground flex items-center gap-1.5 text-xs",children:[(0,r.jsx)(c.Coins,{className:"text-primary size-4"}),T.STANDARD_MUSIC_GENERATION_CREDITS," credits"]}),(0,r.jsxs)(S.Button,{onClick:()=>void eH(),disabled:!eO||eG,className:"h-11 px-7",children:[eG?(0,r.jsx)(u.Loader2,{className:"mr-2 size-4 animate-spin"}):(0,r.jsx)(N.WandSparkles,{className:"mr-2 size-4"}),"preparing"===en?"Preparing...":eG?"Generating...":"success"===en?"Generate Again":"failed"===en?"Try Again":"Generate Rap"]})]})]}),(0,r.jsxs)("section",{className:"border-border/80 bg-card/95 shadow-primary/10 flex min-h-[36rem] flex-col overflow-hidden rounded-2xl border shadow-2xl lg:min-h-0 lg:rounded-none lg:border-l-0",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between px-5 py-4",children:[(0,r.jsxs)("div",{className:"flex items-center gap-3",children:[(0,r.jsx)("span",{className:"bg-primary/15 text-primary flex size-9 items-center justify-center rounded-xl",children:(0,r.jsx)(x.Music2,{className:"size-5"})}),(0,r.jsx)("div",{className:"text-lg font-semibold",children:"success"===en?"Generated Rap":"Preview Tracks"})]}),(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)(C.Link,{href:"/history","aria-label":"History",title:"History",className:"border-border/70 bg-background/65 text-muted-foreground hover:text-foreground inline-flex size-9 items-center justify-center rounded-full border",children:(0,r.jsx)(p.History,{className:"size-4"})}),"success"===en&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("button",{type:"button",onClick:()=>void eH(),"aria-label":"Generate another pair",title:"Generate another pair",className:"border-border/70 bg-background/65 text-muted-foreground hover:text-foreground inline-flex size-9 items-center justify-center rounded-full border",children:(0,r.jsx)(y.RefreshCw,{className:"size-4"})}),(0,r.jsx)("button",{type:"button",onClick:()=>void eW(),disabled:!eI||eS,"aria-label":"Download current track",title:"Download current track",className:"border-border/70 bg-background/65 text-muted-foreground hover:text-foreground inline-flex size-9 items-center justify-center rounded-full border disabled:opacity-50",children:eS?(0,r.jsx)(u.Loader2,{className:"size-4 animate-spin"}):(0,r.jsx)(m.Download,{className:"size-4"})})]})]})]}),(0,r.jsx)("div",{className:"flex min-h-0 flex-1 items-center justify-center p-4",children:eG?(0,r.jsx)("div",{className:"grid w-full max-w-[620px] gap-4 sm:grid-cols-2",children:[0,1].map(e=>{let t=["Creating rap direction","Preparing arrangement","Finalizing preview"],a=t[Math.floor(ek/8+e)%t.length];return(0,r.jsxs)("article",{className:"border-border/70 bg-background/80 relative overflow-hidden rounded-xl border p-5 shadow-xl",children:[(0,r.jsx)("div",{className:"absolute inset-0 [animation:makebpm-rap-preview-shimmer_2.2s_linear_infinite] bg-[linear-gradient(110deg,transparent,rgba(245,158,11,0.14),transparent)] opacity-70"}),(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsx)("div",{className:"bg-primary/10 text-primary border-primary/20 mb-5 flex aspect-square items-center justify-center overflow-hidden rounded-lg border",children:(0,r.jsx)("div",{className:"flex h-16 items-end gap-1.5",children:[0,1,2,3,4].map(e=>(0,r.jsx)("span",{className:"bg-primary w-2 [animation:makebpm-rap-preview-bars_1s_ease-in-out_infinite] rounded-full opacity-80",style:{height:`${22+7*e}px`,animationDelay:`${.12*e}s`}},e))})}),(0,r.jsxs)("p",{className:"text-base font-semibold",children:["Generating track ",e+1]}),(0,r.jsxs)("p",{className:"text-primary mt-1 text-sm font-medium",children:[a,"..."]}),(0,r.jsxs)("div",{className:"text-muted-foreground mt-3 space-y-1 text-xs",children:[(0,r.jsx)("p",{children:"Estimated time: 1-2 min"}),(0,r.jsxs)("p",{children:[V(ek)," elapsed"]})]})]})]},e)})}):"success"===en&&e$?(0,r.jsxs)("div",{className:"relative w-full max-w-[580px] xl:max-w-[calc(100%-7rem)]",children:[eg.length>1&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("button",{type:"button",onClick:()=>eh(e=>0===e?eg.length-1:e-1),"aria-label":"Previous track",className:"bg-background/85 hover:bg-background absolute top-1/2 -left-12 z-10 hidden size-9 -translate-y-1/2 items-center justify-center rounded-full border border-white/10 shadow-lg xl:flex",children:(0,r.jsx)(n.ChevronLeft,{className:"size-4"})}),(0,r.jsx)("button",{type:"button",onClick:()=>eh(e=>e+1>=eg.length?0:e+1),"aria-label":"Next track",className:"bg-background/85 hover:bg-background absolute top-1/2 -right-12 z-10 hidden size-9 -translate-y-1/2 items-center justify-center rounded-full border border-white/10 shadow-lg xl:flex",children:(0,r.jsx)(d.
21ChevronRight,{className:"size-4"})})]}),(0,r.jsxs)("article",{className:"group block w-full overflow-hidden rounded-xl text-left",children:[(0,r.jsxs)("div",{className:"border-border/70 bg-background relative h-[clamp(420px,58vh,700px)] overflow-hidden rounded-t-xl border",children:[(0,r.jsx)("img",{src:e$.imageUrl||"/imgs/makebpm/makebpm-og.webp",alt:`Generated rap cover for ${e$.title||"MakeBPM rap track"}`,width:1200,height:1200,className:(0,D.cn)("h-full w-full object-cover transition duration-300 group-hover:scale-105",ef&&"scale-105 blur-sm")}),(0,r.jsxs)("div",{className:"absolute bottom-4 left-1/2 flex -translate-x-1/2 items-center gap-3",children:[eg.length>1&&(0,r.jsx)("button",{type:"button",onClick:()=>eh(e=>0===e?eg.length-1:e-1),"aria-label":"Previous track",className:"hover:bg-primary hover:text-primary-foreground flex size-10 items-center justify-center rounded-full border border-white/20 bg-black/45 text-white shadow-[0_10px_24px_rgba(0,0,0,0.4)] backdrop-blur-md transition hover:scale-105 xl:hidden",children:(0,r.jsx)(n.ChevronLeft,{className:"size-4"})}),(0,r.jsx)("button",{type:"button",onClick:function(){let e=eB.current;e&&eI&&(e.paused?e.play():e.pause())},disabled:!eI,"aria-label":ef?"Pause track":"Play track",className:"hover:bg-primary hover:text-primary-foreground flex size-12 items-center justify-center rounded-full border border-white/25 bg-black/45 text-white shadow-[0_12px_30px_rgba(0,0,0,0.45)] backdrop-blur-md transition hover:scale-105 disabled:opacity-50",children:ef?(0,r.jsx)(b.Pause,{className:"size-5 fill-current"}):(0,r.jsx)(f.Play,{className:"ml-0.5 size-5 fill-current"})}),eg.length>1&&(0,r.jsx)("button",{type:"button",onClick:()=>eh(e=>e+1>=eg.length?0:e+1),"aria-label":"Next track",className:"hover:bg-primary hover:text-primary-foreground flex size-10 items-center justify-center rounded-full border border-white/20 bg-black/45 text-white shadow-[0_10px_24px_rgba(0,0,0,0.4)] backdrop-blur-md transition hover:scale-105 xl:hidden",children:(0,r.jsx)(d.ChevronRight,{className:"size-4"})})]})]}),(0,r.jsx)("div",{className:"bg-background/60 px-4 py-3",children:(0,r.jsxs)("div",{className:"min-w-0",children:[(0,r.jsxs)("p",{className:"text-primary mb-1 text-xs font-semibold tracking-normal uppercase",children:["Version ",0===eb?"A":"B"]}),(0,r.jsx)("p",{className:"truncate text-base font-semibold",children:e$.title||"Untitled Rap"}),(0,r.jsxs)("div",{className:"mt-2",children:[(0,r.jsxs)("div",{className:"text-muted-foreground flex items-center justify-between text-xs",children:[(0,r.jsx)("span",{children:V(ev)}),(0,r.jsx)("span",{children:V(ew||e$.duration||0)})]}),(0,r.jsx)("input",{type:"range",min:"0",max:ew||e$.duration||0,step:"0.1",value:Math.min(ev,ew||e$.duration||0),disabled:!eI||0>=(ew||e$.duration||0),onChange:e=>{let r=Number(e.target.value);eB.current&&(eB.current.currentTime=r),ej(r)},"aria-label":`Seek ${e$.title||"generated rap track"}`,className:"accent-primary mt-2 h-1.5 w-full cursor-pointer"})]})]})})]}),(0,r.jsx)("audio",{ref:eB,src:eI,preload:"metadata",onLoadedMetadata:function(e){let r=e.currentTarget;eN(Number.isFinite(r.duration)?r.duration:0)},onTimeUpdate:e=>ej(e.currentTarget.currentTime),onPlay:()=>ey(!0),onPause:()=>ey(!1),onEnded:()=>ey(!1)}),eg.length>1&&(0,r.jsx)("div",{className:"mt-8 flex justify-center gap-2","aria-label":"Track selector",children:eg.map((e,t)=>(0,r.jsx)("button",{type:"button",onClick:()=>eh(t),"aria-label":`Show track ${t+1}`,"aria-current":t===eb?"true":void 0,className:(0,D.cn)("h-1.5 rounded-full transition-all",t===eb?"bg-primary w-10":"bg-muted-foreground/25 hover:bg-muted-foreground/45 w-5")},e.id||t))})]}):"failed"===en?(0,r.jsxs)("div",{ref:eL,tabIndex:-1,role:"alert",className:"border-destructive/30 bg-destructive/5 max-w-md rounded-2xl border px-6 py-8 text-center outline-none",children:[(0,r.jsx)("p",{className:"text-lg font-semibold",children:"Generation could not finish"}),(0,r.jsx)("p",{className:"text-muted-foreground mt-2 text-sm leading-6",children:ec}),(0,r.jsx)(S.Button,{className:"mt-5",onClick:()=>void eH(),children:"Try Again"})]}):(0,r.jsxs)("div",{className:"flex min-h-[420px] w-full max-w-[620px] flex-col items-center justify-center rounded-xl border border-dashed border-white/10 bg-black/20 px-6 text-center",children:[(0,r.jsx)(g.Mic2,{className:"text-primary size-10"}),(0,r.jsx)("p",{className:"mt-4 text-lg font-semibold",children:"Your generated rap tracks will appear here"}),(0,r.jsx)("p",{className:"text-muted-foreground mt-2 max-w-sm text-sm leading-6",children:"Start from an idea, bring your own lyrics, or describe a rap beat."})]})}),(0,r.jsx)("div",{"aria-live":"polite",className:"border-border/70 text-muted-foreground border-t px-5 py-3 text-sm",children:eY})]}),(0,r.jsx)(z.Dialog,{open:eF,onOpenChange:eR,children:(0,r.jsxs)(z.DialogContent,{className:"max-h-[85vh] overflow-y-auto sm:max-w-4xl",children:[(0,r.jsxs)(z.DialogHeader,{children:[(0,r.jsx)(z.DialogTitle,{children:"Review the Fit to Flow suggestion"}),(0,r.jsx)(z.DialogDescription,{children:"Your original lyrics stay unchanged until you choose the revised version."})]}),eT&&(0,r.jsxs)(r.Fragment,{children:[eT.changesSummary.length>0&&(0,r.jsxs)("div",{className:"border-primary/20 bg-primary/5 rounded-xl border p-4",children:[(0,r.jsx)("p",{className:"text-sm font-semibold",children:"What changed"}),(0,r.jsx)("ul",{className:"text-muted-foreground mt-2 list-disc space-y-1 pl-5 text-sm",children:eT.changesSummary.map(e=>(0,r.jsx)("li",{children:e},e))})]}),(0,r.jsxs)("div",{className:"grid gap-4 md:grid-cols-2",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"mb-2 text-sm font-semibold",children:"Original"}),(0,r.jsx)("pre",{className:"bg-background/70 border-border/70 max-h-80 overflow-auto rounded-xl border p-4 text-sm leading-6 whitespace-pre-wrap",children:eT.originalLyrics})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"mb-2 text-sm font-semibold",children:"Revised"}),(0,r.jsx)("pre",{className:"bg-primary/5 border-primary/20 max-h-80 overflow-auto rounded-xl border p-4 text-sm leading-6 whitespace-pre-wrap",children:eT.revisedLyrics})]})]})]}),(0,r.jsxs)(z.DialogFooter,{children:[(0,r.jsx)(S.Button,{variant:"outline",onClick:()=>eR(!1),children:"Keep Original"}),(0,r.jsx)(S.Button,{onClick:function(){eT&&(eP(j.lyrics.lyrics),G(e=>({...e,lyrics:{...e.lyrics,lyrics:eT.revisedLyrics}})),eR(!1),k.toast.success("Revised lyrics added."))},children:"Use Revised Lyrics"})]})]})})]})}e.s(["RapGeneratorTool",()=>W],380700)}]);

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.