From 1cb957d20debe23bdf5540e85257ff4cee876254 Mon Sep 17 00:00:00 2001 From: wwwwwwwww <526125649@qq.com> Date: Wed, 22 Jul 2026 11:10:32 +0800 Subject: [PATCH] 1 --- .../{index-DZg1zviY.js => index-hoIjy2R3.js} | 2 +- video-gen-app/dist/index.html | 2 +- video-gen-app/src/pages/GenerateConver.tsx | 162 +++++++++++++++--- 3 files changed, 140 insertions(+), 26 deletions(-) rename video-gen-app/dist/assets/{index-DZg1zviY.js => index-hoIjy2R3.js} (99%) diff --git a/video-gen-app/dist/assets/index-DZg1zviY.js b/video-gen-app/dist/assets/index-hoIjy2R3.js similarity index 99% rename from video-gen-app/dist/assets/index-DZg1zviY.js rename to video-gen-app/dist/assets/index-hoIjy2R3.js index 49e80c9f..10b5d87a 100644 --- a/video-gen-app/dist/assets/index-DZg1zviY.js +++ b/video-gen-app/dist/assets/index-hoIjy2R3.js @@ -515,7 +515,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho 视频${F.filter(e=>e.type===`video`).length}/${B}${Nn>0?`, 音频${F.filter(e=>e.type===`audio`).length}/${Nn}`:``}`,maxImageCount:z,maxVideoCount:B,usedImageCount:F.filter(e=>e.type===`image`).length,usedVideoCount:F.filter(e=>e.type===`video`).length,usedVideoDuration:F.filter(e=>e.type===`video`).reduce((e,t)=>e+(t.duration||0),0),maxVideoDuration:15,maxAudioCount:Nn>0?Nn:void 0,usedAudioCount:F.filter(e=>e.type===`audio`).length,maxAudioDuration:15,usedAudioDuration:F.filter(e=>e.type===`audio`).reduce((e,t)=>e+(t.duration||0),0),hideLimitHint:c===`image`,mediaType:c,children:(0,$.jsx)(`div`,{style:{width:54,height:74,borderRadius:7,border:`1px solid rgba(231, 234, 240, 0.95)`,display:`flex`,alignItems:`center`,justifyContent:`center`,cursor:`pointer`,transition:`all 0.25s ease`,background:`#f4f4f4`,flexDirection:`column`,gap:5,transform:`rotate(-7deg)`},onMouseEnter:e=>{e.currentTarget.style.borderColor=`#D7DDE7`,e.currentTarget.style.background=`#f4f4f4`,e.currentTarget.style.transform=`rotate(0deg) translateY(-2px)`},onMouseLeave:e=>{e.currentTarget.style.borderColor=`rgba(231, 234, 240, 0.95)`,e.currentTarget.style.background=`#f4f4f4`,e.currentTarget.style.transform=`rotate(-7deg)`},children:te?(0,$.jsx)(Jm,{style:{fontSize:17,color:`#667085`}}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)($I,{style:{fontSize:18,color:`#667085`,lineHeight:1}}),(0,$.jsxs)(`div`,{style:{display:`grid`,gridTemplateColumns:`repeat(2, 14px)`,columnGap:2,justifyContent:`center`,color:`#344054`,fontSize:12,fontWeight:700,lineHeight:1.05,letterSpacing:0},children:[(0,$.jsxs)(`span`,{style:{display:`flex`,flexDirection:`column`,alignItems:`center`,gap:1},children:[(0,$.jsx)(`span`,{children:`参`}),(0,$.jsx)(`span`,{children:`考`})]}),(0,$.jsxs)(`span`,{style:{display:`flex`,flexDirection:`column`,alignItems:`center`,gap:1},children:[(0,$.jsx)(`span`,{children:`内`}),(0,$.jsx)(`span`,{children:`容`})]})]})]})})}),F.length>0&&(0,$.jsx)($.Fragment,{children:F.map((e,t)=>{let n=Math.min(F.length,3)-1-t,r=_e?t*58:t<3?t*6:18,i=_e?!0:t<3;return(0,$.jsx)(`div`,{style:{position:`absolute`,left:r,bottom:0,zIndex:t+1,transition:`all 0.28s cubic-bezier(0.4, 0, 0.2, 1)`,transform:_e?`scale(1) rotate(0deg)`:`scale(${t<3?1-n*.08:0}) rotate(${t<3?-3+t*1.5:0}deg)`,opacity:i?_e?1:1-n*.15:0,pointerEvents:i?`auto`:`none`},children:(0,$.jsxs)(`div`,{style:{position:`relative`,width:52,height:60},children:[e.type===`image`?(0,$.jsx)(`img`,{src:_n(e.url),alt:e.name,onClick:()=>{Ue(e.url),Ke(`image`),Je(e.name),Ve(!0)},style:{width:52,height:60,objectFit:`cover`,borderRadius:10,cursor:`pointer`,border:`1px solid rgba(255,255,255,0.98)`,boxShadow:`0 4px 12px rgba(31,41,55,0.15)`}}):e.type===`video`?(0,$.jsx)(`video`,{src:_n(e.url),muted:!0,onClick:()=>{Ue(e.url),Ke(`video`),Je(e.name),Ve(!0)},style:{width:52,height:60,objectFit:`cover`,borderRadius:10,cursor:`pointer`,border:`1px solid rgba(255,255,255,0.98)`,boxShadow:`0 4px 12px rgba(31,41,55,0.15)`}}):(0,$.jsx)(`div`,{onClick:t=>{t.stopPropagation(),tn(e.url)},style:{width:52,height:60,objectFit:`cover`,borderRadius:10,cursor:`pointer`,border:`1px solid rgba(255,255,255,0.98)`,boxShadow:`0 4px 12px rgba(31,41,55,0.15)`,background:`linear-gradient(135deg, #8b5cf6 0%, #a78bfa 100%)`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:Xe===_n(e.url)?(0,$.jsx)(M6,{style:{fontSize:20,color:`#fff`}}):(0,$.jsx)(M2,{style:{fontSize:20,color:`#fff`}})}),(0,$.jsx)(`button`,{onClick:()=>vn(t),style:{position:`absolute`,top:-6,right:-6,width:20,height:20,borderRadius:50,background:`#1f2937`,border:`none`,color:`#fff`,cursor:`pointer`,display:`flex`,alignItems:`center`,justifyContent:`center`,boxShadow:`0 2px 6px rgba(0,0,0,0.2)`,zIndex:10,transition:`all 0.2s ease`},onMouseEnter:e=>{e.currentTarget.style.background=`#dc2626`,e.currentTarget.style.transform=`scale(1.1)`},onMouseLeave:e=>{e.currentTarget.style.background=`#1f2937`,e.currentTarget.style.transform=`scale(1)`},children:(0,$.jsx)(f$,{style:{fontSize:10}})})]})},`stack-${t}`)})}),F.length>0&&(0,$.jsx)(F7,{accept:c===`image`?`image/*`:`image/*,video/*,audio/*`,onLocalSelect:ln,onHistorySelect:pn,onPortraitLibrarySelect:e=>{hn(e)},uploading:te,tooltipTitle:c===`image`?`图片${F.filter(e=>e.type===`image`).length}/${z}`:`图片${F.filter(e=>e.type===`image`).length}/${z}, 视频${F.filter(e=>e.type===`video`).length}/${B}${Nn>0?`, - 音频${F.filter(e=>e.type===`audio`).length}/${Nn}`:``}`,maxImageCount:z,maxVideoCount:B,usedImageCount:F.filter(e=>e.type===`image`).length,usedVideoCount:F.filter(e=>e.type===`video`).length,usedVideoDuration:F.filter(e=>e.type===`video`).reduce((e,t)=>e+(t.duration||0),0),maxVideoDuration:15,maxAudioCount:Nn>0?Nn:void 0,usedAudioCount:F.filter(e=>e.type===`audio`).length,maxAudioDuration:15,usedAudioDuration:F.filter(e=>e.type===`audio`).reduce((e,t)=>e+(t.duration||0),0),hideLimitHint:c===`image`,mediaType:c,children:(0,$.jsx)(`div`,{style:{position:`absolute`,right:0,bottom:0,width:28,height:28,borderRadius:50,background:`#ffffff`,border:`1px solid rgba(231, 234, 240, 0.95)`,display:`flex`,alignItems:`center`,justifyContent:`center`,cursor:`pointer`,transition:`all 0.2s ease`,boxShadow:`0 2px 8px rgba(47, 52, 64, 0.08)`,zIndex:100},onMouseEnter:e=>{e.currentTarget.style.borderColor=`#8b5cf6`,e.currentTarget.style.boxShadow=`0 4px 12px rgba(139, 92, 246, 0.2)`},onMouseLeave:e=>{e.currentTarget.style.borderColor=`rgba(231, 234, 240, 0.95)`,e.currentTarget.style.boxShadow=`0 2px 8px rgba(47, 52, 64, 0.08)`},children:(0,$.jsx)($I,{style:{fontSize:14,color:`#8b5cf6`,lineHeight:1}})})})]})})}),(0,$.jsx)(`div`,{style:{flex:1,minWidth:0},children:(0,$.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:6,padding:`0`,backgroundColor:`transparent`,borderRadius:0,border:`none`,boxShadow:`none`,transition:`all 0.2s ease`,position:`relative`,minHeight:On?92:74},children:[(0,$.jsx)(gse,{ref:we,value:b,onChange:bn,onKeyDown:xn,onPaste:e=>{let t=e.clipboardData?.items;if(!t)return;let n=[];for(let e=0;e0&&(e.preventDefault(),n.forEach(async e=>{await sn(e)}))},placeholder:An,autoSize:{minRows:3,maxRows:6},style:{width:`100%`,borderRadius:0,border:`none`,outline:`none`,boxShadow:`none`,fontSize:14,lineHeight:1.72,color:`#2f3440`,fontWeight:500,resize:`none`,backgroundColor:`transparent`,padding:10},disabled:ne}),Se&&F.length>0&&ae===`universal`&&(0,$.jsx)(`div`,{style:{position:`absolute`,bottom:`100%`,left:10,marginBottom:8,zIndex:1e3,background:`#fff`,borderRadius:16,boxShadow:`0 18px 42px rgba(47, 52, 64, 0.12)`,border:`1px solid #E7EAF0`,padding:8,minWidth:160,maxHeight:260,overflowY:`auto`},children:F.map((e,t)=>(0,$.jsxs)(`div`,{onClick:()=>Sn(e.label),style:{padding:`8px 12px`,borderRadius:6,cursor:`pointer`,display:`flex`,alignItems:`center`,gap:8,fontSize:13,color:`#2f3440`,transition:`all 0.15s`},onMouseEnter:e=>{e.currentTarget.style.background=`rgba(139, 92, 246, 0.08)`,e.currentTarget.style.color=`#8b5cf6`},onMouseLeave:e=>{e.currentTarget.style.background=`transparent`,e.currentTarget.style.color=`#2f3440`},children:[e.type===`image`?(0,$.jsx)(V6,{style:{fontSize:14,color:`#8b5cf6`}}):(0,$.jsx)(e5,{style:{fontSize:14,color:`#8b5cf6`}}),(0,$.jsx)(`span`,{children:e.label})]},t))})]})})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,gap:14,marginTop:10,paddingTop:13,borderTop:`1px solid rgba(231, 234, 240, 0.76)`},children:[(0,$.jsxs)(eH,{size:8,wrap:!0,style:{flex:1,minWidth:0},children:[(0,$.jsxs)(`div`,{style:{position:`relative`,display:`inline-block`},children:[(0,$.jsxs)(`button`,{onClick:()=>{_t(!1),st(!1),lt(!1),J(!1),yt(e=>!e)},className:`image-settings-trigger`,style:{minWidth:118,padding:`5px 12px`,height:32,borderRadius:10,border:`1px solid #E7EAF0`,backgroundColor:`#ffffff`,cursor:`pointer`,display:`inline-flex`,alignItems:`center`,gap:6,transition:`all 0.2s ease`,boxShadow:`0 1px 2px rgba(47, 52, 64, 0.025)`},onMouseEnter:e=>{e.currentTarget.style.backgroundColor=`#FFFFFF`,e.currentTarget.style.borderColor=`#D7DDE7`,e.currentTarget.style.boxShadow=`0 2px 8px rgba(47, 52, 64, 0.06)`},onMouseLeave:e=>{e.currentTarget.style.backgroundColor=`#ffffff`,e.currentTarget.style.borderColor=`#E7EAF0`,e.currentTarget.style.boxShadow=`0 1px 2px rgba(47, 52, 64, 0.03)`},children:[c===`video`?(0,$.jsx)(e5,{style:{fontSize:14,color:`#8b5cf6`}}):(0,$.jsx)(V6,{style:{fontSize:14,color:`#8b5cf6`}}),(0,$.jsx)(i9,{style:{fontSize:13,fontWeight:500,color:`#2f3440`},children:c===`video`?`视频生成`:`图片生成`}),(0,$.jsx)(ZZ,{style:{fontSize:10,color:`#8b5cf6`,marginLeft:`auto`}})]}),vt&&(0,$.jsx)(`div`,{className:`image-settings-popover`,style:{position:`absolute`,bottom:`calc(100% + 8px)`,left:0,width:300,backgroundColor:`#ffffff`,backdropFilter:`blur(16px)`,borderRadius:16,boxShadow:`0 20px 48px rgba(47, 52, 64, 0.12)`,padding:16,border:`1px solid #E7EAF0`,zIndex:9999},onClick:e=>e.stopPropagation(),children:(0,$.jsxs)(`div`,{style:{marginBottom:8},children:[(0,$.jsx)(i9,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:600,color:`#475467`},children:`创作类型`}),(0,$.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:4},children:[{value:`video`,label:`视频生成`,icon:e5},{value:`image`,label:`图片生成`,icon:V6}].map(e=>(0,$.jsxs)(`button`,{onClick:()=>{x(e.value),yt(!1),I([]),P(``)},style:{flex:1,minHeight:48,borderRadius:10,border:c===e.value?`1px solid #8b5cf6`:`1px solid #E7EAF0`,backgroundColor:c===e.value?`#f5f3ff`:`#ffffff`,cursor:`pointer`,display:`flex`,alignItems:`center`,padding:`8px 12px`,transition:`all 0.2s`,textAlign:`left`,gap:8},children:[(0,$.jsx)(e.icon,{style:{fontSize:14,color:c===e.value?`#8b5cf6`:`#98a2b3`}}),(0,$.jsx)(`span`,{style:{fontSize:14,fontWeight:c===e.value?600:500,color:c===e.value?`#8b5cf6`:`#475467`},children:e.label})]},e.value))})]})})]}),(0,$.jsxs)(`div`,{style:{position:`relative`,display:`inline-block`},children:[(0,$.jsxs)(`button`,{onClick:()=>{yt(!1),st(!1),lt(!1),J(!1),_t(e=>!e)},className:`image-settings-trigger`,style:{minWidth:174,padding:`5px 12px`,height:32,borderRadius:10,border:`1px solid #E7EAF0`,backgroundColor:`#ffffff`,cursor:`pointer`,display:`inline-flex`,alignItems:`center`,gap:6,transition:`all 0.2s ease`,boxShadow:`0 1px 2px rgba(47, 52, 64, 0.025)`},onMouseEnter:e=>{e.currentTarget.style.backgroundColor=`#FFFFFF`,e.currentTarget.style.borderColor=`#D7DDE7`,e.currentTarget.style.boxShadow=`0 2px 8px rgba(47, 52, 64, 0.06)`},onMouseLeave:e=>{e.currentTarget.style.backgroundColor=`#ffffff`,e.currentTarget.style.borderColor=`#E7EAF0`,e.currentTarget.style.boxShadow=`0 1px 2px rgba(47, 52, 64, 0.03)`},children:[(0,$.jsx)(T8,{style:{fontSize:14,color:`#8b5cf6`}}),(0,$.jsx)(i9,{style:{fontSize:13,fontWeight:500,color:`#2f3440`},children:c===`image`?L.image?.find(e=>e.id===l)?.name:L.video?.find(e=>e.id===l)?.name||`选择引擎`}),(0,$.jsx)(ZZ,{style:{fontSize:10,color:`#8b5cf6`,marginLeft:`auto`}})]}),gt&&(0,$.jsx)(`div`,{className:`image-settings-popover`,style:{position:`absolute`,bottom:`calc(100% + 8px)`,left:0,width:360,backgroundColor:`#ffffff`,backdropFilter:`blur(16px)`,borderRadius:16,boxShadow:`0 20px 48px rgba(47, 52, 64, 0.12)`,padding:16,border:`1px solid #E7EAF0`,zIndex:9999},onClick:e=>e.stopPropagation(),children:(0,$.jsxs)(`div`,{style:{marginBottom:8},children:[(0,$.jsx)(i9,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:600,color:`#475467`},children:`选择引擎`}),(0,$.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:4},children:(c===`image`?L.image:L.video)?.map(e=>(0,$.jsxs)(`button`,{onClick:()=>{if(C(e.id),c===`video`&&(M({ratios:e.supportedRatios||[`16:9`,`4:3`,`1:1`,`3:4`,`9:16`,`21:9`],resolutions:e.supportedResolutions||[`480p`,`720p`,`1080p`],durations:e.supportedDurations||[5,8,10,12,15]}),e.supportedRatios?.includes(g)||A(e.supportedRatios?.[0]||`16:9`),e.supportedResolutions?.includes(_)||j(e.supportedResolutions?.[0]||`720p`),e.supportedDurations?.includes(h)||k(e.supportedDurations?.[0]||5)),c===`image`){let t=e.supportedSizes||{},n=Object.keys(t).sort((e,t)=>{let n={"1K":0,"2K":1,"4K":2};return(n[e]||0)-(n[t]||0)}),r=n[0]||`2K`,i=Object.keys(t[r]||{});if(dt(i.map(e=>({value:e,label:e}))),ht(t),pt(n.map(e=>{let t=e.match(/(\d+)K/);return{value:e,label:`${{1:`标清`,2:`高清`,4:`超清`}[t?parseInt(t[1]):1]||`高清`} ${e}`}})),t[r]&&t[r][i[0]]){let[e,n]=t[r][i[0]].split(/[×x]/);D(Number(e)),O(Number(n)),T(i[0]),E(r)}}_t(!1)},style:{flex:1,minHeight:48,borderRadius:10,border:l===e.id?`1px solid #8b5cf6`:`1px solid #E7EAF0`,backgroundColor:l===e.id?`#f5f3ff`:`#ffffff`,cursor:`pointer`,display:`flex`,flexDirection:`column`,justifyContent:`center`,alignItems:`flex-start`,padding:`8px 12px`,transition:`all 0.2s`,textAlign:`left`},children:[(0,$.jsx)(`span`,{style:{fontSize:14,fontWeight:l===e.id?600:500,color:l===e.id?`#8b5cf6`:`#475467`,marginBottom:2},children:e.name}),(0,$.jsx)(`span`,{style:{fontSize:11,color:`#98a2b3`}})]},e.id))})]})})]}),c===`video`&&(Gt||Kt)&&(0,$.jsxs)(`div`,{style:{position:`relative`,display:`inline-block`},children:[(0,$.jsxs)(`button`,{onClick:()=>{yt(!1),_t(!1),st(!1),lt(!1),J(!fe)},className:`image-settings-trigger`,style:{minWidth:118,padding:`6px 14px`,height:32,borderRadius:10,border:`1px solid #E7EAF0`,backgroundColor:`#ffffff`,cursor:`pointer`,display:`inline-flex`,alignItems:`center`,gap:6,transition:`all 0.2s ease`,boxShadow:`0 1px 2px rgba(47, 52, 64, 0.025)`},onMouseEnter:e=>{e.currentTarget.style.backgroundColor=`#FFFFFF`,e.currentTarget.style.borderColor=`#D7DDE7`,e.currentTarget.style.boxShadow=`0 2px 8px rgba(47, 52, 64, 0.06)`},onMouseLeave:e=>{e.currentTarget.style.backgroundColor=`#ffffff`,e.currentTarget.style.borderColor=`#E7EAF0`,e.currentTarget.style.boxShadow=`0 1px 2px rgba(47, 52, 64, 0.03)`},children:[(0,$.jsx)(V6,{style:{fontSize:14,color:`#8b5cf6`}}),(0,$.jsx)(i9,{style:{fontSize:13,fontWeight:500,color:`#2f3440`},children:ae===`universal`?`全能参考`:`首尾帧`}),(0,$.jsx)(ZZ,{style:{fontSize:10,color:`#8b5cf6`,marginLeft:`auto`}})]}),fe&&(0,$.jsx)(`div`,{className:`image-settings-popover`,style:{position:`absolute`,bottom:`calc(100% + 8px)`,left:0,width:300,backgroundColor:`#ffffff`,backdropFilter:`blur(16px)`,borderRadius:16,boxShadow:`0 20px 48px rgba(47, 52, 64, 0.12)`,padding:16,border:`1px solid #E7EAF0`,zIndex:9999},onClick:e=>e.stopPropagation(),children:(0,$.jsxs)(`div`,{style:{marginBottom:8},children:[(0,$.jsx)(i9,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:600,color:`#475467`},children:`参考模式`}),(0,$.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:4},children:[(0,$.jsxs)(`button`,{onClick:()=>{qt(`universal`),J(!1)},disabled:!Kt,style:{flex:1,minHeight:48,borderRadius:10,border:ae===`universal`?`1px solid #8b5cf6`:`1px solid #E7EAF0`,backgroundColor:ae===`universal`?`#f5f3ff`:`#ffffff`,cursor:Kt?`pointer`:`not-allowed`,display:`flex`,alignItems:`center`,padding:`8px 12px`,transition:`all 0.2s`,textAlign:`left`,gap:8,opacity:Kt?1:.4},children:[(0,$.jsx)(V6,{style:{fontSize:14,color:ae===`universal`?`#8b5cf6`:`#98a2b3`}}),(0,$.jsx)(`span`,{style:{fontSize:14,fontWeight:ae===`universal`?600:500,color:ae===`universal`?`#8b5cf6`:`#475467`},children:`全能参考`}),!Kt&&(0,$.jsx)(`span`,{style:{fontSize:10,color:`#98a2b3`,marginLeft:`auto`},children:`不支持`})]}),(0,$.jsxs)(`button`,{onClick:()=>{qt(`first_last_frame`),J(!1)},disabled:!Gt,style:{flex:1,minHeight:48,borderRadius:10,border:ae===`first_last_frame`?`1px solid #8b5cf6`:`1px solid #E7EAF0`,backgroundColor:ae===`first_last_frame`?`#f5f3ff`:`#ffffff`,cursor:Gt?`pointer`:`not-allowed`,display:`flex`,alignItems:`center`,padding:`8px 12px`,transition:`all 0.2s`,textAlign:`left`,gap:8,opacity:Gt?1:.4},children:[(0,$.jsx)(NU,{style:{fontSize:14,color:ae===`first_last_frame`?`#8b5cf6`:`#98a2b3`}}),(0,$.jsx)(`span`,{style:{fontSize:14,fontWeight:ae===`first_last_frame`?600:500,color:ae===`first_last_frame`?`#8b5cf6`:`#475467`},children:`首尾帧`}),!Gt&&(0,$.jsx)(`span`,{style:{fontSize:10,color:`#98a2b3`,marginLeft:`auto`},children:`不支持`})]})]})]})})]}),c===`image`&&(0,$.jsxs)(`div`,{style:{position:`relative`,display:`inline-block`},children:[(0,$.jsxs)(`button`,{onClick:()=>{yt(!1),_t(!1),lt(!1),J(!1),st(!ot)},className:`image-settings-trigger`,style:{minWidth:156,padding:`6px 14px`,height:32,borderRadius:10,border:`1px solid #E7EAF0`,backgroundColor:`#ffffff`,cursor:`pointer`,display:`inline-flex`,alignItems:`center`,gap:6,transition:`all 0.2s ease`,boxShadow:`0 1px 2px rgba(47, 52, 64, 0.025)`},onMouseEnter:e=>{e.currentTarget.style.backgroundColor=`#FFFFFF`,e.currentTarget.style.borderColor=`#D7DDE7`,e.currentTarget.style.boxShadow=`0 2px 8px rgba(47, 52, 64, 0.06)`},onMouseLeave:e=>{e.currentTarget.style.backgroundColor=`#ffffff`,e.currentTarget.style.borderColor=`#E7EAF0`,e.currentTarget.style.boxShadow=`0 1px 2px rgba(47, 52, 64, 0.03)`},children:[(0,$.jsx)(W3,{style:{fontSize:14,color:`#8b5cf6`}}),(0,$.jsxs)(i9,{style:{fontSize:13,fontWeight:500,color:`#2f3440`},children:[d===`auto`?`智能`:d,` · `,f===`1K`?`1K标清`:f===`2K`?`2K高清`:`4K超清`,` · `,p,`×`,m]}),(0,$.jsx)(ZZ,{style:{fontSize:10,color:`#8b5cf6`,marginLeft:`auto`}})]}),ot&&(0,$.jsxs)(`div`,{className:`image-settings-popover`,style:{position:`absolute`,bottom:`calc(100% + 8px)`,left:0,width:480,backgroundColor:`#ffffff`,backdropFilter:`blur(16px)`,borderRadius:14,boxShadow:`0 18px 44px rgba(47, 52, 64, 0.12)`,padding:16,border:`1px solid #E7EAF0`,zIndex:9999},onClick:e=>e.stopPropagation(),children:[(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(i9,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#667085`},children:`选择比例`}),(0,$.jsx)(`div`,{style:{display:`flex`,flexWrap:`wrap`,gap:4},children:ut.map(e=>(0,$.jsxs)(`button`,{onClick:()=>{T(e.value),Vt(e.label)},style:{flex:`0 0 calc(11.11% - 4px)`,minWidth:44,height:52,borderRadius:6,border:d===e.value?`2px solid #8b5cf6`:`1px solid #E7EAF0`,backgroundColor:d===e.value?`#f5f3ff`:`#FFFFFF`,cursor:`pointer`,display:`flex`,flexDirection:`column`,justifyContent:`center`,alignItems:`center`,transition:`all 0.2s`},children:[(0,$.jsx)(`div`,{style:{width:(()=>{let[t,n]=e.value===`auto`?[1,1]:e.value.split(`:`).map(Number);return t>=n?18:Math.round(t/n*18)})(),height:(()=>{let[t,n]=e.value===`auto`?[1,1]:e.value.split(`:`).map(Number);return n>=t?18:Math.round(n/t*18)})(),border:`2px solid ${d===e.value?`#8b5cf6`:`#98a2b3`}`,borderRadius:2,marginBottom:2,display:`flex`,alignItems:`center`,justifyContent:`center`},children:e.value===`auto`&&(0,$.jsx)(`span`,{style:{fontSize:7,color:d===e.value?`#8b5cf6`:`#98a2b3`},children:`智`})}),(0,$.jsx)(`span`,{style:{fontSize:9,color:d===e.value?`#8b5cf6`:`#667085`,fontWeight:d===e.value?600:400},children:e.value})]},e.value))})]}),(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(i9,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#667085`},children:`选择分辨率`}),(0,$.jsx)(`div`,{style:{display:`flex`,gap:6},children:ft.map(e=>(0,$.jsx)(`button`,{onClick:()=>{E(e.value),Ht(e.value)},style:{flex:1,height:42,borderRadius:6,border:f===e.value?`2px solid #8b5cf6`:`1px solid #E7EAF0`,backgroundColor:f===e.value?`#8b5cf6`:`#FFFFFF`,cursor:`pointer`,display:`flex`,justifyContent:`center`,alignItems:`center`,transition:`all 0.2s`},children:(0,$.jsxs)(`span`,{style:{fontSize:12,fontWeight:600,color:f===e.value?`#fff`:`#475467`},children:[e.value,e.value===`4K`&&(0,$.jsx)(`span`,{style:{marginLeft:2},children:`✨`})]})},e.value))})]}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(i9,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#667085`},children:`尺寸`}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,flex:1,maxWidth:120},children:[(0,$.jsx)(`span`,{style:{color:`#98a2b3`,fontSize:11,marginRight:4},children:`W`}),(0,$.jsx)(kW,{value:p,onChange:e=>D(Number(e.target.value)||0),style:{flex:1,textAlign:`center`,borderRadius:4,height:34,border:`1px solid #E7EAF0`,backgroundColor:`#FFFFFF`,fontSize:12,fontWeight:600,color:`#2f3440`}})]}),(0,$.jsx)(`button`,{onClick:Ut,style:{width:24,height:24,borderRadius:4,border:`1px solid #E7EAF0`,backgroundColor:`#fff`,cursor:`pointer`,display:`flex`,justifyContent:`center`,alignItems:`center`,color:`#8b5cf6`},children:(0,$.jsx)(NU,{style:{fontSize:10}})}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,flex:1,maxWidth:120},children:[(0,$.jsx)(`span`,{style:{color:`#98a2b3`,fontSize:11,marginRight:4},children:`H`}),(0,$.jsx)(kW,{value:m,onChange:e=>O(Number(e.target.value)||0),style:{flex:1,textAlign:`center`,borderRadius:4,height:34,border:`1px solid #E7EAF0`,backgroundColor:`#FFFFFF`,fontSize:12,fontWeight:600,color:`#2f3440`}})]}),(0,$.jsx)(`span`,{style:{color:`#98a2b3`,fontSize:11},children:`PX`})]})]})]})]}),c===`video`&&(0,$.jsxs)(`div`,{style:{position:`relative`,display:`inline-block`},children:[(0,$.jsxs)(`button`,{onClick:()=>{yt(!1),_t(!1),st(!1),J(!1),lt(!ct)},className:`image-settings-trigger`,style:{minWidth:156,padding:`6px 14px`,height:32,borderRadius:10,border:`1px solid #E7EAF0`,backgroundColor:`#ffffff`,cursor:`pointer`,display:`inline-flex`,alignItems:`center`,gap:6,transition:`all 0.2s ease`,boxShadow:`0 1px 2px rgba(47, 52, 64, 0.025)`},onMouseEnter:e=>{e.currentTarget.style.backgroundColor=`#FFFFFF`,e.currentTarget.style.borderColor=`#D7DDE7`,e.currentTarget.style.boxShadow=`0 2px 8px rgba(47, 52, 64, 0.06)`},onMouseLeave:e=>{e.currentTarget.style.backgroundColor=`#ffffff`,e.currentTarget.style.borderColor=`#E7EAF0`,e.currentTarget.style.boxShadow=`0 1px 2px rgba(47, 52, 64, 0.03)`},children:[(0,$.jsx)(W3,{style:{fontSize:14,color:`#2f3440`}}),(0,$.jsx)(`span`,{style:{fontSize:13,fontWeight:600,color:`#2f3440`},children:g}),(0,$.jsx)(`span`,{style:{width:1,height:14,background:`#E7EAF0`}}),(0,$.jsx)(`span`,{style:{fontSize:13,fontWeight:600,color:`#2f3440`},children:_?.toUpperCase?.()||_}),(0,$.jsx)(`span`,{style:{width:1,height:14,background:`#E7EAF0`}}),(0,$.jsxs)(`span`,{style:{fontSize:13,fontWeight:600,color:`#2f3440`},children:[h,`秒`]}),(0,$.jsx)(ZZ,{style:{fontSize:10,color:`#667085`,marginLeft:`auto`}})]}),ct&&(0,$.jsxs)(`div`,{className:`image-settings-popover`,style:{position:`absolute`,bottom:`calc(100% + 8px)`,left:0,width:400,backgroundColor:`#ffffff`,backdropFilter:`blur(16px)`,borderRadius:14,boxShadow:`0 18px 44px rgba(47, 52, 64, 0.12)`,padding:16,border:`1px solid #E7EAF0`,zIndex:9999},onClick:e=>e.stopPropagation(),children:[(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(i9,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#667085`},children:`选择比例`}),(0,$.jsx)(`div`,{style:{display:`flex`,flexWrap:`wrap`,gap:4},children:v.ratios.map(e=>(0,$.jsxs)(`button`,{onClick:()=>A(e),style:{flex:`0 0 calc(14.28% - 4px)`,minWidth:44,height:52,borderRadius:6,border:g===e?`2px solid #8b5cf6`:`1px solid #E7EAF0`,backgroundColor:g===e?`#f5f3ff`:`#FFFFFF`,cursor:`pointer`,display:`flex`,flexDirection:`column`,justifyContent:`center`,alignItems:`center`,transition:`all 0.2s`},children:[(0,$.jsx)(`div`,{style:{width:(()=>{let[t,n]=e.split(`:`).map(Number);return t>=n?18:Math.round(t/n*18)})(),height:(()=>{let[t,n]=e.split(`:`).map(Number);return n>=t?18:Math.round(n/t*18)})(),border:`2px solid ${g===e?`#8b5cf6`:`#98a2b3`}`,borderRadius:2,marginBottom:2}}),(0,$.jsx)(`span`,{style:{fontSize:9,color:g===e?`#8b5cf6`:`#667085`,fontWeight:g===e?600:400},children:e})]},e))})]}),(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(i9,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#667085`},children:`选择时长`}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,$.jsxs)(`div`,{style:{flex:1,position:`relative`,height:24,display:`flex`,alignItems:`center`},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,top:`50%`,left:0,right:0,height:6,borderRadius:3,background:`#E7EAF0`,transform:`translateY(-50%)`}}),(0,$.jsx)(`div`,{style:{position:`absolute`,top:`50%`,left:0,height:6,borderRadius:3,background:`#8b5cf6`,width:`${(h-Math.min(...v.durations))/(Math.max(...v.durations)-Math.min(...v.durations))*100}%`,transform:`translateY(-50%)`}}),(0,$.jsx)(`input`,{type:`range`,min:Math.min(...v.durations),max:Math.max(...v.durations),value:h,onChange:e=>k(Number(e.target.value)),style:{position:`relative`,width:`100%`,height:24,borderRadius:3,background:`transparent`,outline:`none`,appearance:`none`,cursor:`pointer`,zIndex:1}})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:4,padding:`4px 12px`,backgroundColor:`#F6F7FA`,borderRadius:6},children:[(0,$.jsx)(`span`,{style:{fontSize:14,fontWeight:600,color:`#667085`},children:h}),(0,$.jsx)(`span`,{style:{fontSize:12,color:`#98a2b3`},children:`秒`})]})]})]}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(i9,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#667085`},children:`选择分辨率`}),(0,$.jsx)(`div`,{style:{display:`flex`,gap:6},children:v.resolutions.map(e=>(0,$.jsx)(`button`,{onClick:()=>j(e),style:{flex:1,height:42,borderRadius:6,border:_===e?`2px solid #8b5cf6`:`1px solid #E7EAF0`,backgroundColor:_===e?`#8b5cf6`:`#FFFFFF`,cursor:`pointer`,display:`flex`,justifyContent:`center`,alignItems:`center`,transition:`all 0.2s`},children:(0,$.jsx)(`span`,{style:{fontSize:12,fontWeight:600,color:_===e?`#fff`:`#475467`},children:e})},e))})]})]})]})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12,flexShrink:0},children:[V&&(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6,whiteSpace:`nowrap`,height:34,padding:`0 8px 0 12px`,borderRadius:11,background:`rgba(255, 255, 255, 0.92)`,border:`1px solid rgba(231, 234, 240, 0.92)`,boxShadow:`0 4px 12px rgba(47, 52, 64, 0.04)`},children:[(0,$.jsx)(i9,{style:{fontSize:13,color:`#667085`,fontWeight:600},children:`生成数量:`}),(0,$.jsx)(wC,{value:u,onChange:e=>w(Number(e||1)),disabled:W<=1,size:`small`,variant:`borderless`,style:{width:68},options:Array.from({length:W},(e,t)=>({value:t+1,label:`${t+1}份`}))})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6,color:`#667085`,whiteSpace:`nowrap`,height:34,padding:`0 12px`,borderRadius:11,background:`rgba(255, 255, 255, 0.92)`,border:`1px solid rgba(231, 234, 240, 0.92)`,boxShadow:`0 4px 12px rgba(47, 52, 64, 0.04)`},children:[(0,$.jsx)(i9,{style:{fontSize:13,color:`#667085`,fontWeight:600},children:`预估积分:`}),(0,$.jsx)(i9,{style:{fontSize:13,color:`#2f3440`,fontWeight:800},children:Et()})]}),(0,$.jsx)(Z,{type:`primary`,shape:`circle`,icon:(0,$.jsx)(k2,{}),onClick:Zt,disabled:!kn,loading:ne,style:{flexShrink:0,width:36,height:36,borderRadius:`50%`,background:kn?`linear-gradient(135deg, #8b5cf6 0%, #a78bfa 100%)`:`#E7EAF0`,color:`#ffffff`,opacity:kn?1:.86,boxShadow:kn?`0 10px 24px rgba(139, 92, 246, 0.28)`:`inset 0 0 0 1px rgba(139, 92, 246, 0.18)`,cursor:kn?`pointer`:`not-allowed`,transition:`all 0.2s ease`,border:`none`}})]})]})]})]})]}),(0,$.jsx)(`style`,{children:` + 音频${F.filter(e=>e.type===`audio`).length}/${Nn}`:``}`,maxImageCount:z,maxVideoCount:B,usedImageCount:F.filter(e=>e.type===`image`).length,usedVideoCount:F.filter(e=>e.type===`video`).length,usedVideoDuration:F.filter(e=>e.type===`video`).reduce((e,t)=>e+(t.duration||0),0),maxVideoDuration:15,maxAudioCount:Nn>0?Nn:void 0,usedAudioCount:F.filter(e=>e.type===`audio`).length,maxAudioDuration:15,usedAudioDuration:F.filter(e=>e.type===`audio`).reduce((e,t)=>e+(t.duration||0),0),hideLimitHint:c===`image`,mediaType:c,children:(0,$.jsx)(`div`,{style:{position:`absolute`,right:0,bottom:0,width:28,height:28,borderRadius:50,background:`#ffffff`,border:`1px solid rgba(231, 234, 240, 0.95)`,display:`flex`,alignItems:`center`,justifyContent:`center`,cursor:`pointer`,transition:`all 0.2s ease`,boxShadow:`0 2px 8px rgba(47, 52, 64, 0.08)`,zIndex:100},onMouseEnter:e=>{e.currentTarget.style.borderColor=`#8b5cf6`,e.currentTarget.style.boxShadow=`0 4px 12px rgba(139, 92, 246, 0.2)`},onMouseLeave:e=>{e.currentTarget.style.borderColor=`rgba(231, 234, 240, 0.95)`,e.currentTarget.style.boxShadow=`0 2px 8px rgba(47, 52, 64, 0.08)`},children:(0,$.jsx)($I,{style:{fontSize:14,color:`#8b5cf6`,lineHeight:1}})})})]})})}),(0,$.jsx)(`div`,{style:{flex:1,minWidth:0},children:(0,$.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:6,padding:`0`,backgroundColor:`transparent`,borderRadius:0,border:`none`,boxShadow:`none`,transition:`all 0.2s ease`,position:`relative`,minHeight:On?92:74},children:[(0,$.jsx)(gse,{ref:we,value:b,onChange:bn,onKeyDown:xn,onPaste:e=>{let t=e.clipboardData?.items;if(!t)return;let n=[];for(let e=0;e0&&(e.preventDefault(),n.forEach(async e=>{await sn(e)}))},placeholder:An,autoSize:{minRows:3,maxRows:6},style:{width:`100%`,borderRadius:0,border:`none`,outline:`none`,boxShadow:`none`,fontSize:14,lineHeight:1.72,color:`#2f3440`,fontWeight:500,resize:`none`,backgroundColor:`transparent`,padding:10},disabled:ne}),Se&&F.length>0&&ae===`universal`&&(0,$.jsx)(`div`,{style:{position:`absolute`,bottom:`100%`,left:10,marginBottom:8,zIndex:1e3,background:`#fff`,borderRadius:16,boxShadow:`0 18px 42px rgba(47, 52, 64, 0.12)`,border:`1px solid #E7EAF0`,padding:8,minWidth:160,maxHeight:260,overflowY:`auto`},children:F.map((e,t)=>(0,$.jsxs)(`div`,{onClick:()=>Sn(e.label),style:{padding:`8px 12px`,borderRadius:6,cursor:`pointer`,display:`flex`,alignItems:`center`,gap:8,fontSize:13,color:`#2f3440`,transition:`all 0.15s`},onMouseEnter:e=>{e.currentTarget.style.background=`rgba(139, 92, 246, 0.08)`,e.currentTarget.style.color=`#8b5cf6`},onMouseLeave:e=>{e.currentTarget.style.background=`transparent`,e.currentTarget.style.color=`#2f3440`},children:[e.type===`image`?(0,$.jsx)(V6,{style:{fontSize:14,color:`#8b5cf6`}}):(0,$.jsx)(e5,{style:{fontSize:14,color:`#8b5cf6`}}),(0,$.jsx)(`span`,{children:e.label})]},t))})]})})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,gap:14,marginTop:10,paddingTop:13,borderTop:`1px solid rgba(231, 234, 240, 0.76)`},children:[(0,$.jsxs)(eH,{size:8,wrap:!0,style:{flex:1,minWidth:0},children:[(0,$.jsxs)(`div`,{style:{position:`relative`,display:`inline-block`},children:[(0,$.jsxs)(`button`,{onClick:()=>{_t(!1),st(!1),lt(!1),J(!1),yt(e=>!e)},className:`image-settings-trigger`,style:{minWidth:118,padding:`5px 12px`,height:32,borderRadius:10,border:`1px solid #E7EAF0`,backgroundColor:`#ffffff`,cursor:`pointer`,display:`inline-flex`,alignItems:`center`,gap:6,transition:`all 0.2s ease`,boxShadow:`0 1px 2px rgba(47, 52, 64, 0.025)`},onMouseEnter:e=>{e.currentTarget.style.backgroundColor=`#FFFFFF`,e.currentTarget.style.borderColor=`#D7DDE7`,e.currentTarget.style.boxShadow=`0 2px 8px rgba(47, 52, 64, 0.06)`},onMouseLeave:e=>{e.currentTarget.style.backgroundColor=`#ffffff`,e.currentTarget.style.borderColor=`#E7EAF0`,e.currentTarget.style.boxShadow=`0 1px 2px rgba(47, 52, 64, 0.03)`},children:[c===`video`?(0,$.jsx)(e5,{style:{fontSize:14,color:`#8b5cf6`}}):(0,$.jsx)(V6,{style:{fontSize:14,color:`#8b5cf6`}}),(0,$.jsx)(i9,{style:{fontSize:13,fontWeight:500,color:`#2f3440`},children:c===`video`?`视频生成`:`图片生成`}),(0,$.jsx)(ZZ,{style:{fontSize:10,color:`#8b5cf6`,marginLeft:`auto`}})]}),vt&&(0,$.jsx)(`div`,{className:`image-settings-popover`,style:{position:`absolute`,bottom:`calc(100% + 8px)`,left:0,width:300,backgroundColor:`#ffffff`,backdropFilter:`blur(16px)`,borderRadius:16,boxShadow:`0 20px 48px rgba(47, 52, 64, 0.12)`,padding:16,border:`1px solid #E7EAF0`,zIndex:9999},onClick:e=>e.stopPropagation(),children:(0,$.jsxs)(`div`,{style:{marginBottom:8},children:[(0,$.jsx)(i9,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:600,color:`#475467`},children:`创作类型`}),(0,$.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:4},children:[{value:`video`,label:`视频生成`,icon:e5},{value:`image`,label:`图片生成`,icon:V6}].map(e=>(0,$.jsxs)(`button`,{onClick:()=>{x(e.value),yt(!1),I([]),P(``)},style:{flex:1,minHeight:48,borderRadius:10,border:c===e.value?`1px solid #8b5cf6`:`1px solid #E7EAF0`,backgroundColor:c===e.value?`#f5f3ff`:`#ffffff`,cursor:`pointer`,display:`flex`,alignItems:`center`,padding:`8px 12px`,transition:`all 0.2s`,textAlign:`left`,gap:8},children:[(0,$.jsx)(e.icon,{style:{fontSize:14,color:c===e.value?`#8b5cf6`:`#98a2b3`}}),(0,$.jsx)(`span`,{style:{fontSize:14,fontWeight:c===e.value?600:500,color:c===e.value?`#8b5cf6`:`#475467`},children:e.label})]},e.value))})]})})]}),(0,$.jsxs)(`div`,{style:{position:`relative`,display:`inline-block`},children:[(0,$.jsxs)(`button`,{onClick:()=>{yt(!1),st(!1),lt(!1),J(!1),_t(e=>!e)},className:`image-settings-trigger`,style:{minWidth:174,padding:`5px 12px`,height:32,borderRadius:10,border:`1px solid #E7EAF0`,backgroundColor:`#ffffff`,cursor:`pointer`,display:`inline-flex`,alignItems:`center`,gap:6,transition:`all 0.2s ease`,boxShadow:`0 1px 2px rgba(47, 52, 64, 0.025)`},onMouseEnter:e=>{e.currentTarget.style.backgroundColor=`#FFFFFF`,e.currentTarget.style.borderColor=`#D7DDE7`,e.currentTarget.style.boxShadow=`0 2px 8px rgba(47, 52, 64, 0.06)`},onMouseLeave:e=>{e.currentTarget.style.backgroundColor=`#ffffff`,e.currentTarget.style.borderColor=`#E7EAF0`,e.currentTarget.style.boxShadow=`0 1px 2px rgba(47, 52, 64, 0.03)`},children:[(0,$.jsx)(T8,{style:{fontSize:14,color:`#8b5cf6`}}),(0,$.jsx)(i9,{style:{fontSize:13,fontWeight:500,color:`#2f3440`},children:c===`image`?L.image?.find(e=>e.id===l)?.name:L.video?.find(e=>e.id===l)?.name||`选择引擎`}),(0,$.jsx)(ZZ,{style:{fontSize:10,color:`#8b5cf6`,marginLeft:`auto`}})]}),gt&&(0,$.jsx)(`div`,{className:`image-settings-popover`,style:{position:`absolute`,bottom:`calc(100% + 8px)`,left:0,width:360,backgroundColor:`#ffffff`,backdropFilter:`blur(16px)`,borderRadius:16,boxShadow:`0 20px 48px rgba(47, 52, 64, 0.12)`,padding:16,border:`1px solid #E7EAF0`,zIndex:9999},onClick:e=>e.stopPropagation(),children:(0,$.jsxs)(`div`,{style:{marginBottom:8},children:[(0,$.jsx)(i9,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:600,color:`#475467`},children:`选择引擎`}),(0,$.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:4},children:(c===`image`?L.image:L.video)?.map(e=>(0,$.jsxs)(`button`,{onClick:()=>{if(C(e.id),c===`video`&&(M({ratios:e.supportedRatios||[`16:9`,`4:3`,`1:1`,`3:4`,`9:16`,`21:9`],resolutions:e.supportedResolutions||[`480p`,`720p`,`1080p`],durations:e.supportedDurations||[5,8,10,12,15]}),e.supportedRatios?.includes(g)||A(e.supportedRatios?.[0]||`16:9`),e.supportedResolutions?.includes(_)||j(e.supportedResolutions?.[0]||`720p`),e.supportedDurations?.includes(h)||k(e.supportedDurations?.[0]||5)),c===`image`){let t=e.supportedSizes||{},n=Object.keys(t).sort((e,t)=>{let n={"1K":0,"2K":1,"4K":2};return(n[e]||0)-(n[t]||0)}),r=n[0]||`2K`,i=Object.keys(t[r]||{});if(dt(i.map(e=>({value:e,label:e}))),ht(t),pt(n.map(e=>{let t=e.match(/(\d+)K/);return{value:e,label:`${{1:`标清`,2:`高清`,4:`超清`}[t?parseInt(t[1]):1]||`高清`} ${e}`}})),t[r]&&t[r][i[0]]){let[e,n]=t[r][i[0]].split(/[×x]/);D(Number(e)),O(Number(n)),T(i[0]),E(r)}}_t(!1)},style:{flex:1,minHeight:48,borderRadius:10,border:l===e.id?`1px solid #8b5cf6`:`1px solid #E7EAF0`,backgroundColor:l===e.id?`#f5f3ff`:`#ffffff`,cursor:`pointer`,display:`flex`,flexDirection:`column`,justifyContent:`center`,alignItems:`flex-start`,padding:`8px 12px`,transition:`all 0.2s`,textAlign:`left`},children:[(0,$.jsx)(`span`,{style:{fontSize:14,fontWeight:l===e.id?600:500,color:l===e.id?`#8b5cf6`:`#475467`,marginBottom:2},children:e.name}),(0,$.jsx)(`span`,{style:{fontSize:11,color:`#98a2b3`}})]},e.id))})]})})]}),c===`video`&&(Gt||Kt)&&(0,$.jsxs)(`div`,{style:{position:`relative`,display:`inline-block`},children:[(0,$.jsxs)(`button`,{onClick:()=>{yt(!1),_t(!1),st(!1),lt(!1),J(!fe)},className:`image-settings-trigger`,style:{minWidth:118,padding:`6px 14px`,height:32,borderRadius:10,border:`1px solid #E7EAF0`,backgroundColor:`#ffffff`,cursor:`pointer`,display:`inline-flex`,alignItems:`center`,gap:6,transition:`all 0.2s ease`,boxShadow:`0 1px 2px rgba(47, 52, 64, 0.025)`},onMouseEnter:e=>{e.currentTarget.style.backgroundColor=`#FFFFFF`,e.currentTarget.style.borderColor=`#D7DDE7`,e.currentTarget.style.boxShadow=`0 2px 8px rgba(47, 52, 64, 0.06)`},onMouseLeave:e=>{e.currentTarget.style.backgroundColor=`#ffffff`,e.currentTarget.style.borderColor=`#E7EAF0`,e.currentTarget.style.boxShadow=`0 1px 2px rgba(47, 52, 64, 0.03)`},children:[(0,$.jsx)(V6,{style:{fontSize:14,color:`#8b5cf6`}}),(0,$.jsx)(i9,{style:{fontSize:13,fontWeight:500,color:`#2f3440`},children:ae===`universal`?`全能参考`:`首尾帧`}),(0,$.jsx)(ZZ,{style:{fontSize:10,color:`#8b5cf6`,marginLeft:`auto`}})]}),fe&&(0,$.jsx)(`div`,{className:`image-settings-popover`,style:{position:`absolute`,bottom:`calc(100% + 8px)`,left:0,width:300,backgroundColor:`#ffffff`,backdropFilter:`blur(16px)`,borderRadius:16,boxShadow:`0 20px 48px rgba(47, 52, 64, 0.12)`,padding:16,border:`1px solid #E7EAF0`,zIndex:9999},onClick:e=>e.stopPropagation(),children:(0,$.jsxs)(`div`,{style:{marginBottom:8},children:[(0,$.jsx)(i9,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:600,color:`#475467`},children:`参考模式`}),(0,$.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:4},children:[(0,$.jsxs)(`button`,{onClick:()=>{qt(`universal`),J(!1)},disabled:!Kt,style:{flex:1,minHeight:48,borderRadius:10,border:ae===`universal`?`1px solid #8b5cf6`:`1px solid #E7EAF0`,backgroundColor:ae===`universal`?`#f5f3ff`:`#ffffff`,cursor:Kt?`pointer`:`not-allowed`,display:`flex`,alignItems:`center`,padding:`8px 12px`,transition:`all 0.2s`,textAlign:`left`,gap:8,opacity:Kt?1:.4},children:[(0,$.jsx)(V6,{style:{fontSize:14,color:ae===`universal`?`#8b5cf6`:`#98a2b3`}}),(0,$.jsx)(`span`,{style:{fontSize:14,fontWeight:ae===`universal`?600:500,color:ae===`universal`?`#8b5cf6`:`#475467`},children:`全能参考`}),!Kt&&(0,$.jsx)(`span`,{style:{fontSize:10,color:`#98a2b3`,marginLeft:`auto`},children:`不支持`})]}),(0,$.jsxs)(`button`,{onClick:()=>{qt(`first_last_frame`),J(!1)},disabled:!Gt,style:{flex:1,minHeight:48,borderRadius:10,border:ae===`first_last_frame`?`1px solid #8b5cf6`:`1px solid #E7EAF0`,backgroundColor:ae===`first_last_frame`?`#f5f3ff`:`#ffffff`,cursor:Gt?`pointer`:`not-allowed`,display:`flex`,alignItems:`center`,padding:`8px 12px`,transition:`all 0.2s`,textAlign:`left`,gap:8,opacity:Gt?1:.4},children:[(0,$.jsx)(NU,{style:{fontSize:14,color:ae===`first_last_frame`?`#8b5cf6`:`#98a2b3`}}),(0,$.jsx)(`span`,{style:{fontSize:14,fontWeight:ae===`first_last_frame`?600:500,color:ae===`first_last_frame`?`#8b5cf6`:`#475467`},children:`首尾帧`}),!Gt&&(0,$.jsx)(`span`,{style:{fontSize:10,color:`#98a2b3`,marginLeft:`auto`},children:`不支持`})]})]})]})})]}),c===`image`&&(0,$.jsxs)(`div`,{style:{position:`relative`,display:`inline-block`},children:[(0,$.jsxs)(`button`,{onClick:()=>{yt(!1),_t(!1),lt(!1),J(!1),st(!ot)},className:`image-settings-trigger`,style:{minWidth:156,padding:`6px 14px`,height:32,borderRadius:10,border:`1px solid #E7EAF0`,backgroundColor:`#ffffff`,cursor:`pointer`,display:`inline-flex`,alignItems:`center`,gap:6,transition:`all 0.2s ease`,boxShadow:`0 1px 2px rgba(47, 52, 64, 0.025)`},onMouseEnter:e=>{e.currentTarget.style.backgroundColor=`#FFFFFF`,e.currentTarget.style.borderColor=`#D7DDE7`,e.currentTarget.style.boxShadow=`0 2px 8px rgba(47, 52, 64, 0.06)`},onMouseLeave:e=>{e.currentTarget.style.backgroundColor=`#ffffff`,e.currentTarget.style.borderColor=`#E7EAF0`,e.currentTarget.style.boxShadow=`0 1px 2px rgba(47, 52, 64, 0.03)`},children:[(0,$.jsx)(W3,{style:{fontSize:14,color:`#8b5cf6`}}),(0,$.jsxs)(i9,{style:{fontSize:13,fontWeight:500,color:`#2f3440`},children:[d===`auto`?`智能`:d,` · `,f===`1K`?`1K标清`:f===`2K`?`2K高清`:`4K超清`,` · `,p,`×`,m]}),V&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`span`,{style:{width:1,height:14,background:`#E7EAF0`}}),(0,$.jsx)(`span`,{style:{fontSize:13,fontWeight:600,color:`#8b5cf6`},children:u})]}),(0,$.jsx)(ZZ,{style:{fontSize:10,color:`#8b5cf6`,marginLeft:`auto`}})]}),ot&&(0,$.jsxs)(`div`,{className:`image-settings-popover`,style:{position:`absolute`,bottom:`calc(100% + 8px)`,left:0,width:480,backgroundColor:`#ffffff`,backdropFilter:`blur(16px)`,borderRadius:14,boxShadow:`0 18px 44px rgba(47, 52, 64, 0.12)`,padding:16,border:`1px solid #E7EAF0`,zIndex:9999},onClick:e=>e.stopPropagation(),children:[(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(i9,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#667085`},children:`选择比例`}),(0,$.jsx)(`div`,{style:{display:`flex`,flexWrap:`wrap`,gap:4},children:ut.map(e=>(0,$.jsxs)(`button`,{onClick:()=>{T(e.value),Vt(e.label)},style:{flex:`0 0 calc(11.11% - 4px)`,minWidth:44,height:52,borderRadius:6,border:d===e.value?`2px solid #8b5cf6`:`1px solid #E7EAF0`,backgroundColor:d===e.value?`#f5f3ff`:`#FFFFFF`,cursor:`pointer`,display:`flex`,flexDirection:`column`,justifyContent:`center`,alignItems:`center`,transition:`all 0.2s`},children:[(0,$.jsx)(`div`,{style:{width:(()=>{let[t,n]=e.value===`auto`?[1,1]:e.value.split(`:`).map(Number);return t>=n?18:Math.round(t/n*18)})(),height:(()=>{let[t,n]=e.value===`auto`?[1,1]:e.value.split(`:`).map(Number);return n>=t?18:Math.round(n/t*18)})(),border:`2px solid ${d===e.value?`#8b5cf6`:`#98a2b3`}`,borderRadius:2,marginBottom:2,display:`flex`,alignItems:`center`,justifyContent:`center`},children:e.value===`auto`&&(0,$.jsx)(`span`,{style:{fontSize:7,color:d===e.value?`#8b5cf6`:`#98a2b3`},children:`智`})}),(0,$.jsx)(`span`,{style:{fontSize:9,color:d===e.value?`#8b5cf6`:`#667085`,fontWeight:d===e.value?600:400},children:e.value})]},e.value))})]}),(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(i9,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#667085`},children:`选择分辨率`}),(0,$.jsx)(`div`,{style:{display:`flex`,gap:6},children:ft.map(e=>(0,$.jsx)(`button`,{onClick:()=>{E(e.value),Ht(e.value)},style:{flex:1,height:42,borderRadius:6,border:f===e.value?`2px solid #8b5cf6`:`1px solid #E7EAF0`,backgroundColor:f===e.value?`#8b5cf6`:`#FFFFFF`,cursor:`pointer`,display:`flex`,justifyContent:`center`,alignItems:`center`,transition:`all 0.2s`},children:(0,$.jsxs)(`span`,{style:{fontSize:12,fontWeight:600,color:f===e.value?`#fff`:`#475467`},children:[e.value,e.value===`4K`&&(0,$.jsx)(`span`,{style:{marginLeft:2},children:`✨`})]})},e.value))})]}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(i9,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#667085`},children:`尺寸`}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,flex:1,maxWidth:120},children:[(0,$.jsx)(`span`,{style:{color:`#98a2b3`,fontSize:11,marginRight:4},children:`W`}),(0,$.jsx)(kW,{value:p,onChange:e=>D(Number(e.target.value)||0),style:{flex:1,textAlign:`center`,borderRadius:4,height:34,border:`1px solid #E7EAF0`,backgroundColor:`#FFFFFF`,fontSize:12,fontWeight:600,color:`#2f3440`}})]}),(0,$.jsx)(`button`,{onClick:Ut,style:{width:24,height:24,borderRadius:4,border:`1px solid #E7EAF0`,backgroundColor:`#fff`,cursor:`pointer`,display:`flex`,justifyContent:`center`,alignItems:`center`,color:`#8b5cf6`},children:(0,$.jsx)(NU,{style:{fontSize:10}})}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,flex:1,maxWidth:120},children:[(0,$.jsx)(`span`,{style:{color:`#98a2b3`,fontSize:11,marginRight:4},children:`H`}),(0,$.jsx)(kW,{value:m,onChange:e=>O(Number(e.target.value)||0),style:{flex:1,textAlign:`center`,borderRadius:4,height:34,border:`1px solid #E7EAF0`,backgroundColor:`#FFFFFF`,fontSize:12,fontWeight:600,color:`#2f3440`}})]}),(0,$.jsx)(`span`,{style:{color:`#98a2b3`,fontSize:11},children:`PX`})]})]}),V&&(0,$.jsxs)(`div`,{style:{marginTop:16,paddingTop:16,borderTop:`1px solid #f0f0f5`},children:[(0,$.jsx)(i9,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#667085`},children:`生成数量`}),(0,$.jsx)(`div`,{style:{display:`flex`,gap:6},children:Array.from({length:W},(e,t)=>t+1).map(e=>(0,$.jsx)(`button`,{onClick:()=>w(e),disabled:W<=1,style:{flex:1,height:42,borderRadius:6,border:u===e?`2px solid #8b5cf6`:`1px solid #E7EAF0`,backgroundColor:u===e?`#8b5cf6`:`#FFFFFF`,cursor:W<=1?`not-allowed`:`pointer`,display:`flex`,justifyContent:`center`,alignItems:`center`,transition:`all 0.2s`,opacity:W<=1?.5:1},children:(0,$.jsx)(`span`,{style:{fontSize:14,fontWeight:600,color:u===e?`#fff`:`#475467`},children:e})},e))})]})]})]}),c===`video`&&(0,$.jsxs)(`div`,{style:{position:`relative`,display:`inline-block`},children:[(0,$.jsxs)(`button`,{onClick:()=>{yt(!1),_t(!1),st(!1),J(!1),lt(!ct)},className:`image-settings-trigger`,style:{minWidth:156,padding:`6px 14px`,height:32,borderRadius:10,border:`1px solid #E7EAF0`,backgroundColor:`#ffffff`,cursor:`pointer`,display:`inline-flex`,alignItems:`center`,gap:6,transition:`all 0.2s ease`,boxShadow:`0 1px 2px rgba(47, 52, 64, 0.025)`},onMouseEnter:e=>{e.currentTarget.style.backgroundColor=`#FFFFFF`,e.currentTarget.style.borderColor=`#D7DDE7`,e.currentTarget.style.boxShadow=`0 2px 8px rgba(47, 52, 64, 0.06)`},onMouseLeave:e=>{e.currentTarget.style.backgroundColor=`#ffffff`,e.currentTarget.style.borderColor=`#E7EAF0`,e.currentTarget.style.boxShadow=`0 1px 2px rgba(47, 52, 64, 0.03)`},children:[(0,$.jsx)(W3,{style:{fontSize:14,color:`#2f3440`}}),(0,$.jsx)(`span`,{style:{fontSize:13,fontWeight:600,color:`#2f3440`},children:g}),(0,$.jsx)(`span`,{style:{width:1,height:14,background:`#E7EAF0`}}),(0,$.jsx)(`span`,{style:{fontSize:13,fontWeight:600,color:`#2f3440`},children:_?.toUpperCase?.()||_}),(0,$.jsx)(`span`,{style:{width:1,height:14,background:`#E7EAF0`}}),(0,$.jsxs)(`span`,{style:{fontSize:13,fontWeight:600,color:`#2f3440`},children:[h,`秒`]}),V&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`span`,{style:{width:1,height:14,background:`#E7EAF0`}}),(0,$.jsxs)(`span`,{style:{fontSize:13,fontWeight:600,color:`#8b5cf6`},children:[u,`份`]})]}),(0,$.jsx)(ZZ,{style:{fontSize:10,color:`#667085`,marginLeft:`auto`}})]}),ct&&(0,$.jsxs)(`div`,{className:`image-settings-popover`,style:{position:`absolute`,bottom:`calc(100% + 8px)`,left:0,width:400,backgroundColor:`#ffffff`,backdropFilter:`blur(16px)`,borderRadius:14,boxShadow:`0 18px 44px rgba(47, 52, 64, 0.12)`,padding:16,border:`1px solid #E7EAF0`,zIndex:9999},onClick:e=>e.stopPropagation(),children:[(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(i9,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#667085`},children:`选择比例`}),(0,$.jsx)(`div`,{style:{display:`flex`,flexWrap:`wrap`,gap:4},children:v.ratios.map(e=>(0,$.jsxs)(`button`,{onClick:()=>A(e),style:{flex:`0 0 calc(14.28% - 4px)`,minWidth:44,height:52,borderRadius:6,border:g===e?`2px solid #8b5cf6`:`1px solid #E7EAF0`,backgroundColor:g===e?`#f5f3ff`:`#FFFFFF`,cursor:`pointer`,display:`flex`,flexDirection:`column`,justifyContent:`center`,alignItems:`center`,transition:`all 0.2s`},children:[(0,$.jsx)(`div`,{style:{width:(()=>{let[t,n]=e.split(`:`).map(Number);return t>=n?18:Math.round(t/n*18)})(),height:(()=>{let[t,n]=e.split(`:`).map(Number);return n>=t?18:Math.round(n/t*18)})(),border:`2px solid ${g===e?`#8b5cf6`:`#98a2b3`}`,borderRadius:2,marginBottom:2}}),(0,$.jsx)(`span`,{style:{fontSize:9,color:g===e?`#8b5cf6`:`#667085`,fontWeight:g===e?600:400},children:e})]},e))})]}),(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(i9,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#667085`},children:`选择时长`}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,$.jsxs)(`div`,{style:{flex:1,position:`relative`,height:24,display:`flex`,alignItems:`center`},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,top:`50%`,left:0,right:0,height:6,borderRadius:3,background:`#E7EAF0`,transform:`translateY(-50%)`}}),(0,$.jsx)(`div`,{style:{position:`absolute`,top:`50%`,left:0,height:6,borderRadius:3,background:`#8b5cf6`,width:`${(h-Math.min(...v.durations))/(Math.max(...v.durations)-Math.min(...v.durations))*100}%`,transform:`translateY(-50%)`}}),(0,$.jsx)(`input`,{type:`range`,min:Math.min(...v.durations),max:Math.max(...v.durations),value:h,onChange:e=>k(Number(e.target.value)),style:{position:`relative`,width:`100%`,height:24,borderRadius:3,background:`transparent`,outline:`none`,appearance:`none`,cursor:`pointer`,zIndex:1}})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:4},children:[(0,$.jsx)(`input`,{type:`number`,min:Math.min(...v.durations),max:Math.max(...v.durations),value:h,onChange:e=>{let t=Number(e.target.value);isNaN(t)||k(Math.min(Math.max(t,Math.min(...v.durations)),Math.max(...v.durations)))},style:{width:56,height:32,textAlign:`center`,border:`1px solid #E7EAF0`,borderRadius:6,fontSize:14,fontWeight:600,color:`#2f3440`,outline:`none`}}),(0,$.jsx)(`span`,{style:{fontSize:12,color:`#98a2b3`},children:`秒`})]})]})]}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(i9,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#667085`},children:`选择分辨率`}),(0,$.jsx)(`div`,{style:{display:`flex`,gap:6},children:v.resolutions.map(e=>(0,$.jsx)(`button`,{onClick:()=>j(e),style:{flex:1,height:42,borderRadius:6,border:_===e?`2px solid #8b5cf6`:`1px solid #E7EAF0`,backgroundColor:_===e?`#8b5cf6`:`#FFFFFF`,cursor:`pointer`,display:`flex`,justifyContent:`center`,alignItems:`center`,transition:`all 0.2s`},children:(0,$.jsx)(`span`,{style:{fontSize:12,fontWeight:600,color:_===e?`#fff`:`#475467`},children:e})},e))})]}),V&&(0,$.jsxs)(`div`,{style:{marginTop:16,paddingTop:16,borderTop:`1px solid #f0f0f5`},children:[(0,$.jsx)(i9,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#667085`},children:`生成数量`}),(0,$.jsx)(`div`,{style:{display:`flex`,gap:6},children:Array.from({length:W},(e,t)=>t+1).map(e=>(0,$.jsx)(`button`,{onClick:()=>w(e),disabled:W<=1,style:{flex:1,height:42,borderRadius:6,border:u===e?`2px solid #8b5cf6`:`1px solid #E7EAF0`,backgroundColor:u===e?`#8b5cf6`:`#FFFFFF`,cursor:W<=1?`not-allowed`:`pointer`,display:`flex`,justifyContent:`center`,alignItems:`center`,transition:`all 0.2s`,opacity:W<=1?.5:1},children:(0,$.jsx)(`span`,{style:{fontSize:14,fontWeight:600,color:u===e?`#fff`:`#475467`},children:e})},e))})]})]})]})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12,flexShrink:0},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6,color:`#667085`,whiteSpace:`nowrap`,height:34,padding:`0 12px`,borderRadius:11,background:`rgba(255, 255, 255, 0.92)`,border:`1px solid rgba(231, 234, 240, 0.92)`,boxShadow:`0 4px 12px rgba(47, 52, 64, 0.04)`},children:[(0,$.jsx)(i9,{style:{fontSize:13,color:`#667085`,fontWeight:600},children:`预估积分:`}),(0,$.jsx)(i9,{style:{fontSize:13,color:`#2f3440`,fontWeight:800},children:Et()})]}),(0,$.jsx)(Z,{type:`primary`,shape:`circle`,icon:(0,$.jsx)(k2,{}),onClick:Zt,disabled:!kn,loading:ne,style:{flexShrink:0,width:36,height:36,borderRadius:`50%`,background:kn?`linear-gradient(135deg, #8b5cf6 0%, #a78bfa 100%)`:`#E7EAF0`,color:`#ffffff`,opacity:kn?1:.86,boxShadow:kn?`0 10px 24px rgba(139, 92, 246, 0.28)`:`inset 0 0 0 1px rgba(139, 92, 246, 0.18)`,cursor:kn?`pointer`:`not-allowed`,transition:`all 0.2s ease`,border:`none`}})]})]})]})]})]}),(0,$.jsx)(`style`,{children:` .ai-create-page { --ai-accent: #8b5cf6; diff --git a/video-gen-app/dist/index.html b/video-gen-app/dist/index.html index ac72c57f..0485bd03 100644 --- a/video-gen-app/dist/index.html +++ b/video-gen-app/dist/index.html @@ -28,7 +28,7 @@ } })(); - + diff --git a/video-gen-app/src/pages/GenerateConver.tsx b/video-gen-app/src/pages/GenerateConver.tsx index f6cc19fb..5a720535 100644 --- a/video-gen-app/src/pages/GenerateConver.tsx +++ b/video-gen-app/src/pages/GenerateConver.tsx @@ -3893,6 +3893,12 @@ const AIChatPage: React.FC = () => { }}> {selectedRatio === 'auto' ? '智能' : selectedRatio} · {selectedResolution === '1K' ? '1K标清' : selectedResolution === '2K' ? '2K高清' : '4K超清'} · {width}×{height} + {multiGenerationEnabled && ( + <> + + {generationCount} + + )} @@ -4153,6 +4159,57 @@ const AIChatPage: React.FC = () => { + + {/* 生成数量 */} + {multiGenerationEnabled && ( +
+ + 生成数量 + +
+ {Array.from({ length: effectiveMaxGenerationCount }, (_, i) => i + 1).map((num) => ( + + ))} +
+
+ )} )} @@ -4201,6 +4258,12 @@ const AIChatPage: React.FC = () => { {videoResolution?.toUpperCase?.() || videoResolution} {videoDuration}秒 + {multiGenerationEnabled && ( + <> + + {generationCount}份 + + )} @@ -4351,17 +4414,34 @@ const AIChatPage: React.FC = () => { display: 'flex', alignItems: 'center', gap: 4, - padding: '4px 12px', - backgroundColor: '#F6F7FA', - borderRadius: 6, }}> - - {videoDuration} - + { + const v = Number(e.target.value); + if (!isNaN(v)) { + const clamped = Math.min(Math.max(v, Math.min(...engineOptions.durations)), Math.max(...engineOptions.durations)); + setVideoDuration(clamped); + } + }} + style={{ + width: 56, + height: 32, + textAlign: 'center', + border: '1px solid #E7EAF0', + borderRadius: 6, + fontSize: 14, + fontWeight: 600, + color: '#2f3440', + outline: 'none', + }} + /> - {/* 选择分辨率 */} @@ -4410,6 +4490,57 @@ const AIChatPage: React.FC = () => { ))} + + {/* 生成数量 */} + {multiGenerationEnabled && ( +
+ + 生成数量 + +
+ {Array.from({ length: effectiveMaxGenerationCount }, (_, i) => i + 1).map((num) => ( + + ))} +
+
+ )} )} @@ -4417,23 +4548,6 @@ const AIChatPage: React.FC = () => {
- {multiGenerationEnabled && ( -
- 生成数量: -