1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[955,9551],{9551:(e,t,o)=>{o.r(t),o.d(t,{default:()=>p});var l=o(61962);o(29570);var i=o(39423),s=o(79676),a=o(86569),r=o(68351),n=o(29016),d=o(21271),c=o(50955),m=o(83752),x=o(29157);function u(){var e;let t=(0,i.c)("workspace.imageToVideo.rightDetail.tabs"),o=(0,a.j)();(0,s.Ym)();let{isMobile:u,viewportHeight:p}=(0,x.k)(),h=[{id:"inspiration",label:t("inspiration"),component:c.default},{id:"result",label:t("result"),component:n.default},{id:"history",label:t("history"),component:d.default}];return(null==(e=h.find(e=>e.id===o.activeTab))?void 0:e.component)||c.default,(0,l.jsxs)("div",{className:"flex flex-col md:flex-row gap-[10px] md:h-full",style:{position:u&&p>0?"fixed":void 0,top:u&&p>0?0:void 0,left:u&&p>0?0:void 0,right:u&&p>0?0:void 0,height:u&&p>0?"".concat(p,"px"):void 0,overflowY:u&&p>0?"auto":void 0,overflowX:u&&p>0?"hidden":void 0},children:[(0,l.jsx)("aside",{className:"w-full md:w-96 bg-white dark:bg-gray-950 flex-shrink-0 md:h-full md:overflow-y-auto",children:(0,l.jsx)(r.default,{})}),(0,l.jsxs)("main",{className:"flex-1 w-full md:w-auto md:overflow-hidden bg-gray-50 dark:bg-gray-900 flex flex-col",children:[(0,l.jsx)("div",{className:"bg-[#0D0718]",children:(0,l.jsx)("div",{className:"flex justify-center md:justify-start px-2 md:px-6 pt-4 pb-1",children:(0,l.jsx)("nav",{className:"flex space-x-2",children:h.map(e=>(0,l.jsx)("button",{onClick:()=>o.setActiveTab(e.id),className:(0,m.cn)("px-5 py-2.5 rounded-t-lg text-sm font-medium transition-all duration-200",o.activeTab===e.id?"bg-[#9903CF] text-white":"text-gray-400 hover:text-white hover:bg-[#171524]"),children:e.label},e.id))})})}),(0,l.jsx)("div",{className:"flex-1 md:overflow-hidden relative",children:h.map(e=>(0,l.jsx)("div",{className:"absolute inset-0",style:{display:o.activeTab===e.id?"block":"none"},children:(0,l.jsx)(e.component,{})},e.id))})]})]})}function p(e){let{image2video_maintool:t}=e;return(0,l.jsx)(a.i,{image2video_maintool:t,children:(0,l.jsx)(u,{})})}},21271:(e,t,o)=>{o.r(t),o.d(t,{default:()=>u});var l=o(61962),i=o(29570),s=o(50181),a=o(39423),r=o(79676),n=o(86569),d=o(96202),c=o(72067),m=o(36308),x=o(44212);function u(){let e=(0,a.c)("workspace.imageToVideo.historyDetail"),t=(0,s.useParams)(),u=(null==t?void 0:t.locale)||(0,r.Ym)(),p=(0,n.j)(),[h,v]=i.useState();i.useEffect(()=>{o(8835)("./".concat(u,".json")).then(e=>{var t,o;(null==(o=e.default)||null==(t=o.video_generator)?void 0:t.main_tool)&&(v(e.default.video_generator.main_tool),console.log("â
HistoryDetail - ç¿»è¯å è½½æå"))}).catch(e=>{console.error("â HistoryDetail - å 载翻è¯å¤±è´¥:",e)})},[u]);let g=(0,d.p)({image2video_maintool:h,setPreviewVideo:p.setPreviewVideo,setShowPreview:p.setShowPreview,setZoomLevel:p.setZoomLevel,setPosition:p.setPosition,setIsDragging:p.setIsDragging,setDragStart:p.setDragStart,previewVideo:p.previewVideo,zoomLevel:p.zoomLevel,position:p.position,isDragging:p.isDragging,dragStart:p.dragStart,modalRef:p.modalRef}),f=p.videoHistory.filter(e=>!e.isLoading);return(0,l.jsxs)("div",{className:"h-full flex flex-col",children:[(0,l.jsx)(x.r,{element:"div",options:{scrollbars:{theme:"os-theme-light",visibility:"auto",autoHide:"never"},overflow:{x:"hidden",y:"scroll"}},defer:!0,className:"flex-1 p-6 bg-[#0D0718] pb-48 md:pb-0",children:(0,l.jsx)("div",{className:"w-full",children:0===f.length?(0,l.jsx)("div",{className:"bg-[#171524] rounded-lg p-8 text-center mb-24 md:mb-0",children:(0,l.jsx)("p",{className:"text-gray-400",children:e("noHistory")})}):(0,l.jsx)("div",{className:" mb-24 md:mb-0 space-y-8",children:f.map((t,o)=>(0,l.jsxs)("div",{className:"mb-8 last:mb-4 rounded-md overflow-hidden bg-[#171524] backdrop-blur-sm",children:[(0,l.jsxs)("div",{className:"px-5 pt-5 pb-1 text-sm font-medium text-gray-600 dark:text-gray-300 flex items-center",children:[(0,l.jsxs)("span",{className:"flex-shrink-0 mr-2 text-[#D6D6D6]",children:[e("timeLabel"),":"]}),(0,l.jsx)("span",{className:"text-[#D6D6D6]",children:t.timestamp})]}),(0,l.jsx)("div",{className:"px-5 pb-1 text-sm font-medium text-gray-600 dark:text-gray-300",children:(0,l.jsx)("span",{className:"block overflow-hidden text-[16px] text-[#D6D6D6] text-ellipsis w-full",style:{display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden",textOverflow:"ellipsis",wordBreak:"break-word",lineHeight:"1.3em",maxHeight:"2.6em"},title:t.prompt,children:t.prompt})}),t.negativePrompt&&""!==t.negativePrompt.trim()&&(0,l.jsx)("div",{className:"px-5 pb-1 text-sm font-medium text-gray-600 dark:text-gray-300",children:(0,l.jsx)("span",{className:"block overflow-hidden text-[16px] text-[#D6D6D6] text-ellipsis w-full",style:{display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden",textOverflow:"ellipsis",wordBreak:"break-word",lineHeight:"1.3em",maxHeight:"2.6em"},title:t.negativePrompt,children:t.negativePrompt})}),(0,l.jsx)("div",{className:"px-4 pb-2",children:(0,l.jsx)("div",{className:"flex flex-wrap justify-center items-stretch w-full",children:t.videos.map((e,o)=>(0,l.jsx)("div",{className:"w-1/2 sm:w-1/2 lg:w-1/2 p-1.5 flex items-center justify-center",children:(0,l.jsx)(c.A,{video:e,videoIndex:o,isLoading:t.isLoading,statusMessage:t.statusMessage,useSeconds:t.useSeconds,image2video_maintool:h,videoBlobUrlCache:p.videoBlobUrlCache,loadingVideoUrls:p.loadingVideoUrls,onPreview:g.openPreview,onDownload:g.handleDownload,onEdit:g.handleVideoEdit})},o))})}),(0,l.jsx)("div",{className:"px-5 pb-4 text-[11px] text-gray-400/80 text-center",children:e("privacyNotice")})]},o))})})}),(0,l.jsx)(m.A,{previewVideo:p.previewVideo,zoomLevel:p.zoomLevel,position:p.position,modalRef:p.modalRef,videoRef:p.videoRef,onClose:g.closePreview,onModalClick:g.handleModalClick,onMouseMove:g.handleMouseMove,onMouseUp:g.handleMouseUp,onMouseDown:g.handleMouseDown,onDoubleClick:g.handleDoubleClick,onDownload:g.handleDownload})]})}},29016:(e,t,o)=>{o.r(t),o.d(t,{default:()=>u});var l=o(61962),i=o(29570),s=o(50181),a=o(39423),r=o(79676),n=o(86569),d=o(96202),c=o(72067),m=o(36308),x=o(44212);function u(){let e=(0,a.c)("workspace.imageToVideo.resultDetail"),t=(0,s.useParams)(),u=(null==t?void 0:t.locale)||(0,r.Ym)(),p=(0,n.j)(),[h,v]=i.useState();i.useEffect(()=>{o(8835)("./".concat(u,".json")).then(e=>{var t,o;(null==(o=e.default)||null==(t=o.video_generator)?void 0:t.main_tool)&&(v(e.default.video_generator.main_tool),console.log("â
ResultDetail - ç¿»è¯å è½½æå"))}).catch(e=>{console.error("â ResultDetail - å 载翻è¯å¤±è´¥:",e)})},[u]);let g=(0,d.p)({image2video_maintool:h,setPreviewVideo:p.setPreviewVideo,setShowPreview:p.setShowPreview,setZoomLevel:p.setZoomLevel,setPosition:p.setPosition,setIsDragging:p.setIsDragging,setDragStart:p.setDragStart,previewVideo:p.previewVideo,zoomLevel:p.zoomLevel,position:p.position,isDragging:p.isDragging,dragStart:p.dragStart,modalRef:p.modalRef}),f=p.currentResult;return(0,l.jsxs)("div",{className:"h-full flex flex-col",children:[(0,l.jsx)(x.r,{element:"div",options:{scrollbars:{theme:"os-theme-light",visibility:"auto",autoHide:"never"},overflow:{x:"hidden",y:"scroll"}},defer:!0,className:"flex-1 p-6 bg-[#0D0718] pb-48 md:pb-0",children:(0,l.jsx)("div",{className:"w-full",children:f?(0,l.jsxs)("div",{className:" rounded-md overflow-hidden bg-[#171524] backdrop-blur-sm",children:[(0,l.jsxs)("div",{className:"px-5 pt-5 pb-1 text-sm font-medium text-gray-600 dark:text-gray-300 flex items-center",children:[(0,l.jsxs)("span",{className:"flex-shrink-0 mr-2 text-[#D6D6D6]",children:[e("timeLabel"),":"]}),(0,l.jsx)("span",{className:"text-[#D6D6D6]",children:f.timestamp})]}),(0,l.jsx)("div",{className:"px-5 pb-1 text-sm font-medium text-gray-600 dark:text-gray-300",children:(0,l.jsx)("span",{className:"block overflow-hidden text-[16px] text-[#D6D6D6] text-ellipsis w-full",style:{display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden",textOverflow:"ellipsis",wordBreak:"break-word",lineHeight:"1.3em",maxHeight:"2.6em"},title:f.prompt,children:f.prompt})}),f.negativePrompt&&""!==f.negativePrompt.trim()&&(0,l.jsx)("div",{className:"px-5 pb-1 text-sm font-medium text-gray-600 dark:text-gray-300",children:(0,l.jsx)("span",{className:"block overflow-hidden text-[16px] text-[#D6D6D6] text-ellipsis w-full",style:{display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden",textOverflow:"ellipsis",wordBreak:"break-word",lineHeight:"1.3em",maxHeight:"2.6em"},title:f.negativePrompt,children:f.negativePrompt})}),f.errorMessage?(0,l.jsx)("div",{className:"px-4 py-8",children:(0,l.jsx)("div",{className:"bg-red-500/10 border border-red-500/30 rounded-lg p-6 text-center",children:(0,l.jsxs)("div",{className:"flex flex-col items-center justify-center",children:[(0,l.jsx)("svg",{className:"w-16 h-16 mb-4 text-red-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,l.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),(0,l.jsx)("p",{className:"text-red-400 text-lg font-medium mb-2",children:e("taskFailed")}),(0,l.jsx)("p",{className:"text-red-300/80 text-sm break-words max-w-full px-4",children:f.errorMessage})]})})}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("div",{className:"px-4 pb-2",children:(0,l.jsx)("div",{className:"flex flex-wrap justify-center items-start w-full",children:f.videos.map((e,t)=>(0,l.jsx)("div",{className:"w-full p-1.5",children:(0,l.jsx)(c.A,{video:e,videoIndex:t,isLoading:f.isLoading,statusMessage:f.statusMessage,useSeconds:f.useSeconds,image2video_maintool:h,videoBlobUrlCache:p.videoBlobUrlCache,loadingVideoUrls:p.loadingVideoUrls,onPreview:g.openPreview,onDownload:g.handleDownload,onEdit:g.handleVideoEdit})},t))})}),!f.isLoading&&void 0!==f.costMoney&&null!==f.costMoney&&(0,l.jsx)("div",{className:"px-5 pb-3 flex justify-center",children:(0,l.jsxs)("div",{className:"flex items-center gap-2 bg-gradient-to-r from-[#9903CF] to-[#7B02A8] px-6 py-2 rounded-full shadow-lg",children:[(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5 text-white",f
1ill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,l.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 8c-1.657 0-3 .895-3 2s1.343 2 3 2 3 .895 3 2-1.343 2-3 2m0-8c1.11 0 2.08.402 2.599 1M12 8V7m0 1v8m0 0v1m0-1c-1.11 0-2.08-.402-2.599-1M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),(0,l.jsxs)("span",{className:"text-white font-bold text-lg",children:[e("costLabel")," $",f.costMoney.toFixed(3)]})]})}),(0,l.jsx)("div",{className:"px-5 pb-4 text-[11px] text-gray-400/80 text-center",children:e("privacyNotice")})]})]}):(0,l.jsx)("div",{className:"bg-[#171524] rounded-lg p-8 text-center ",children:(0,l.jsx)("p",{className:"text-gray-400",children:e("noResults")})})})}),(0,l.jsx)(m.A,{previewVideo:p.previewVideo,zoomLevel:p.zoomLevel,position:p.position,modalRef:p.modalRef,videoRef:p.videoRef,onClose:g.closePreview,onModalClick:g.handleModalClick,onMouseMove:g.handleMouseMove,onMouseUp:g.handleMouseUp,onMouseDown:g.handleMouseDown,onDoubleClick:g.handleDoubleClick,onDownload:g.handleDownload})]})}},36308:(e,t,o)=>{o.d(t,{A:()=>a});var l=o(61962),i=o(29570),s=o(79676);function a(e){var t;let{previewImage:a,previewVideo:r,zoomLevel:n,position:d,modalRef:c,imageRef:m,videoRef:x,onClose:u,onModalClick:p,onMouseMove:h,onMouseUp:v,onMouseDown:g,onDoubleClick:f,onDownload:w}=e,b=(0,s.Ym)(),[j,y]=i.useState();i.useEffect(()=>{o(8835)("./".concat(b,".json")).then(e=>{var t,o;(null==(o=e.default)||null==(t=o.video_generator)?void 0:t.main_tool)&&y(e.default.video_generator.main_tool)}).catch(e=>{console.error("å 载翻è¯å¤±è´¥:",e)})},[b]);let k=a||r;return k?(0,l.jsx)("div",{ref:c,className:"fixed inset-0 bg-black bg-opacity-80 flex items-center justify-center z-50",onClick:p,children:(0,l.jsxs)("div",{className:"relative flex items-center justify-center overflow-hidden bg-gray-900 rounded-lg",onMouseMove:h,onMouseUp:v,children:[(0,l.jsx)("button",{title:"Close",className:"absolute top-4 right-4 z-10 bg-black/40 hover:bg-black/60 rounded-full p-2 transition-all duration-200",onClick:u,children:(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-8 w-8 text-white",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,l.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})}),(0,l.jsxs)("div",{className:"relative cursor-move",onMouseDown:g,onDoubleClick:f,style:{transform:"translate(".concat(d.x,"px, ").concat(d.y,"px)")},children:[a&&(0,l.jsx)("img",{src:a.url,className:"max-w-[100vw] max-h-[100vh] object-contain transition-transform duration-100",ref:m,style:{transform:"scale(".concat(n,")")},draggable:!1,alt:"Preview"}),r&&(0,l.jsx)("video",{src:r.url,poster:r.thumbnail,className:"max-w-[100vw] max-h-[100vh] object-contain transition-transform duration-100",ref:x,style:{transform:"scale(".concat(n,")")},controls:!0,muted:!0,loop:!0,playsInline:!0})]}),(0,l.jsxs)("button",{className:"absolute bottom-8 left-1/2 transform -translate-x-1/2 flex items-center gap-2 py-2 px-4 bg-primary/80 hover:bg-primary text-white rounded-md shadow-md transition-colors",onClick:()=>w(k.url),children:[(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,l.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"})}),(null==j||null==(t=j.preview)?void 0:t.download_button)||"ä¸è½½"]})]})}):null}},50955:(e,t,o)=>{o.r(t),o.d(t,{default:()=>u});var l=o(61962),i=o(41869),s=o.n(i),a=o(29570),r=o(39423),n=o(93617),d=o(32986),c=o(84027),m=o(4808);let x=[{image:"/image2video/demo/image_01.png",video:"/image2video/demo/video_01.mp4",title:"Near Portrait",prompt:"Smiles,lowers head and smooths hair, then lifts head looks at you"},{image:"/image2video/demo/image_02.png",video:"/image2video/demo/video_02.mp4",title:"Magic Fairy",prompt:"The fairy flew away in terror"},{image:"/image2video/demo/image_03.png",video:"/image2video/demo/video_03.mp4",title:"Caton Dialogue",prompt:"In the image, fox and girl in a simple dialogue"}];function u(){let e=(0,r.c)("workspace.imageToVideo.inspirationDetail"),[t,o]=(0,a.useState)(0);(0,a.useEffect)(()=>{let e=setInterval(()=>{o(e=>(e+1)%x.length)},5e3);return()=>clearInterval(e)},[]);let i=()=>{o(e=>(e-1+x.length)%x.length)},u=()=>{o(e=>(e+1)%x.length)};return(0,l.jsxs)("section",{className:"w-full md:h-full md:overflow-y-auto flex flex-col items-center py-8 md:py-12 px-2 md:px-8 bg-[#0D0718]",children:[(0,l.jsxs)("div",{className:"text-center mb-6 md:mb-12 w-full",children:[(0,l.jsx)("h2",{className:"text-2xl font-bold text-white mb-2",children:e("title")}),(0,l.jsx)("p",{className:"text-white/70 text-sm md:text-[20px] max-w-4xl mx-auto leading-normal mb-4 md:mb-6 px-2 md:px-4",children:e("subtitle")})]}),(0,l.jsxs)("div",{className:"relative w-full max-w-7xl mb-4 md:mb-8 flex items-center justify-center",children:[(0,l.jsx)(c.$,{variant:"outline",size:"icon",className:"hidden md:flex h-12 w-12 rounded-full bg-[#20034F] border-0 hover:border hover:border-[#
1E598FD] active:border active:border-[#E598FD] hover:bg-[#20034F]/80 mr-6 group flex-shrink-0",onClick:i,children:(0,l.jsx)(n.A,{className:"h-6 w-6 text-white group-hover:text-[#E598FD] group-active:text-[#E598FD] transition-colors"})}),(0,l.jsxs)("div",{className:"jsx-d966e4c4e9ab53fe relative flex items-start justify-center gap-2 md:gap-8 w-full max-w-full overflow-hidden ",children:[(0,l.jsx)(s(),{id:"d966e4c4e9ab53fe",children:".fade-container.jsx-d966e4c4e9ab53fe{transition:opacity.3s ease-in-out}.fade-enter.jsx-d966e4c4e9ab53fe{opacity:0}.fade-enter-active.jsx-d966e4c4e9ab53fe{opacity:1}"}),(0,l.jsxs)("div",{className:"jsx-d966e4c4e9ab53fe flex flex-col gap-2 md:gap-5 w-[32%] md:w-[35%] flex-shrink-0 min-w-0",children:[(0,l.jsx)("div",{className:"jsx-d966e4c4e9ab53fe w-full aspect-square rounded-md md:rounded-3xl overflow-hidden flex items-center justify-center bg-gray-900",children:(0,l.jsx)(m.default,{src:x[t].image,alt:x[t].title,width:450,height:450,className:"w-full h-full object-contain",unoptimized:!0},"img-".concat(t))}),(0,l.jsxs)("div",{className:"jsx-d966e4c4e9ab53fe w-full aspect-[1/0.55] md:aspect-[1/0.3] rounded-md md:rounded-3xl overflow-hidden bg-[#180A2F] px-1.5 md:px-6 py-1.5 md:py-6 flex flex-col justify-center",children:[(0,l.jsx)("h3",{className:"jsx-d966e4c4e9ab53fe text-white text-[0.5rem] md:text-xl font-bold mb-0 md:mb-2 break-words line-clamp-1 leading-tight",children:x[t].title}),(0,l.jsx)("p",{className:"jsx-d966e4c4e9ab53fe text-white/70 text-[0.45rem] md:text-base leading-tight break-words line-clamp-2 md:line-clamp-3",children:x[t].prompt})]})]}),(0,l.jsx)("div",{className:"jsx-d966e4c4e9ab53fe w-[52%] md:w-[47.25%] aspect-square rounded-md md:rounded-3xl overflow-hidden flex items-center justify-center bg-gray-900 flex-shrink-0 min-w-0",children:(0,l.jsx)("video",{src:x[t].video,autoPlay:!0,loop:!0,muted:!0,playsInline:!0,preload:"auto",className:"jsx-d966e4c4e9ab53fe w-full h-full object-contain"},x[t].video)})]}),(0,l.jsx)(c.$,{variant:"outline",size:"icon",className:"hidden md:flex h-12 w-12 rounded-full bg-[#20034F] border-0 hover:border hover:border-[#E598FD] active:border active:border-[#E598FD] hover:bg-[#20034F]/80 ml-6 group flex-shrink-0",onClick:u,children:(0,l.jsx)(d.A,{className:"h-6 w-6 text-white group-hover:text-[#E598FD] group-active:text-[#E598FD] transition-colors"})})]}),(0,l.jsxs)("div",{className:"mb-24 md:mb-0 flex items-center justify-center gap-4 md:mt-6 mt-1",children:[(0,l.jsx)(c.$,{variant:"outline",size:"icon",className:"flex md:hidden h-12 w-12 rounded-full bg-[#20034F] border-0 hover:border hover:border-[#E598FD] active:border active:border-[#E598FD] hover:bg-[#20034F]/80 group",onClick:i,children:(0,l.jsx)(n.A,{className:"h-6 w-6 text-white group-hover:text-[#E598FD] group-active:text-[#E598FD] transition-colors"})}),(0,l.jsx)("div",{className:"flex items-center justify-center gap-2.5 ml-4 mr-4",children:x.map((e,o)=>(0,l.jsx)("div",{className:"w-2.5 h-2.5 rounded-full transition-all duration-300 ".concat(o===t?"bg-purple-500 w-6":"bg-purple-500/40")},o))}),(0,l.jsx)(c.$,{variant:"outline",size:"icon",className:"flex md:hidden h-12 w-12 rounded-full bg-[#20034F] border-0 hover:border hover:border-[#E598FD] active:border active:border-[#E598FD] hover:bg-[#20034F]/80 group",onClick:u,children:(0,l.jsx)(d.A,{className:"h-6 w-6 text-white group-hover:text-[#E598FD] group-active:text-[#E598FD] transition-colors"})})]})]})}},72067:(e,t,o)=>{o.d(t,{A:()=>i});var l=o(61962);function i(e){var t,o,i,s;let{video:a,videoIndex:r,isLoading:n,statusMessage:d,useSeconds:c,image2video_maintool:m,videoBlobUrlCache:x,loadingVideoUrls:u,onPreview:p,onDownload:h,onEdit:v,onVideoLoaded:g}=e,f="isLoading"in a&&a.isLoading,w="url"in a;if(f)return(0,l.jsxs)("div",{className:"w-full relative bg-[#1E1B2E] rounded-lg overflow-hidden",style:{paddingTop:"56.25%"},children:[" ",(0,l.jsxs)("div",{className:"absolute inset-0 flex flex-col items-center justify-center",children:[(0,l.jsxs)("svg",{className:"animate-spin w-8 h-8 sm:w-10 sm:h-10 md:w-12 md:h-12 mb-3 sm:mb-4 text-white opacity-80",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[(0,l.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,l.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),void 0!==c&&(0,l.jsxs)("div",{className:"text-[#FFFFFF] text-sm sm:text-base md:text-lg mb-1 sm:mb-2 px-2 text-center font-mono",children:[c,"s"]}),(0,l.jsx)("div",{className:"text-[#CCCCCC] text-xs sm:text-sm md:text-base mb-2 sm:mb-3 px-2 text-center",children:d||(null==m||null==(t=m.preview)?void 0:t.video_generating)||"çæè§é¢ä¸..."})]})]});if(w){let e=x.get(a.url),t=e||a.url,r="thumbnail"in a?a.thumbnail:void 0,n=u.has(a.url);return(0,l.jsxs)("div",{className:"w-full relative rounded-lg overflow-hidden group cursor-pointer",children:[(0,l.jsx)("div",{className:"w-full h-0",style:{paddingTop:"56.25%",backgroundColor:"rgba(44, 43, 52, 0.7)",position:"absolute",top:0,left:0,borderRadius:"0.5rem"}}),n&&(0,l.jsxs)("div",{className:"absolute inset-0 flex flex-col items-center justify-center bg-[#2C2B34]/70 rounded-lg z-10",children:[(0,l.jsxs)("svg",{className:"animate-spin w-8 h-8 sm:w-10 sm:h-10 md:w-12 md:h-12 mb-3 sm:mb-4 text-white opacity-80",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[(0,l.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,l.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),(0,l.jsx)("div",{className:"text-[#CCCCCC] text-xs sm:text-sm md:text-base px-2 text-center",children:(null==m||null==(o=m.preview)?void 0:o.video_generating)||"å è½½è§é¢ä¸..."})]}),(0,l.jsx)("video",{src:t,poster:r,className:"w-full h-auto rounded-lg group-hover:scale-[1.02] transition-transform duration-300 relative z-5 ".concat(n?"opacity-0":"opacity-100"),style:{transition:"opacity 0.3s ease-in-out"}
1,controls:!0,muted:!0,loop:!0,playsInline:!0,onClick:e=>{e.stopPropagation()},onLoadedData:()=>{!e&&g&&g(a.url)}}),(0,l.jsx)("div",{className:"absolute inset-0 transition-all duration-300 flex items-end justify-center pb-2 sm:pb-3 md:pb-4 opacity-0 group-hover:opacity-100 z-20 rounded-lg",children:(0,l.jsxs)("div",{className:"flex gap-1 sm:gap-2",children:[(0,l.jsx)("button",{className:"bg-white/90 hover:bg-white text-gray-800 px-2 py-1 sm:px-3 sm:py-1.5 md:px-4 md:py-2 rounded-md text-xs sm:text-sm md:text-base transition-all duration-200 flex items-center gap-1",onClick:e=>{e.stopPropagation(),p(a)},title:(null==m||null==(i=m.preview)?void 0:i.preview_button)||"é¢è§",children:(0,l.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-3 w-3 sm:h-4 sm:w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:[(0,l.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"}),(0,l.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"})]})}),(0,l.jsx)("button",{className:"bg-primary/90 hover:bg-primary text-white px-2 py-1 sm:px-3 sm:py-1.5 md:px-4 md:py-2 rounded-md text-xs sm:text-sm md:text-base transition-all duration-200 flex items-center gap-1",onClick:e=>h(a.url,e),title:(null==m||null==(s=m.preview)?void 0:s.download_button)||"ä¸è½½",children:(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-3 w-3 sm:h-4 sm:w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,l.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"})})}),(0,l.jsx)("button",{className:"bg-purple-500/90 hover:bg-purple-500 text-white px-2 py-1 sm:px-3 sm:py-1.5 md:px-4 md:py-2 rounded-md text-xs sm:text-sm md:text-base transition-all duration-200 flex items-center gap-1",onClick:e=>v(a.url,e),title:"ç¼è¾",children:(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-3 w-3 sm:h-4 sm:w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,l.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"})})})]})})]})}return null}o(29570)},96202:(e,t,o)=>{o.d(t,{p:()=>a});var l=o(29570),i=o(6632),s=o(39423);function a(e){let t=(0,s.c)("workspace.imageToVideo.logic"),{image2video_maintool:o,setPreviewVideo:a,setShowPreview:r,setZoomLevel:n,setPosition:d,setIsDragging:c,setDragStart:m,previewVideo:x,zoomLevel:u,position:p,isDragging:h,dragStart:v,modalRef:g}=e,f=()=>{a(null),r(!1),n(1),d({x:0,y:0}),document.body.style.overflow=""},w=e=>{if(x){e.preventDefault();let t=Math.max(Math.min(.2*Math.round(u/.2)+.2*(e.deltaY>0?-1:1),5),.2);t!==u&&(n(t),t<=1&&d({x:0,y:0}))}};return(0,l.useEffect)(()=>{let e=g.current;if(x&&e)return e.addEventListener("wheel",w,{passive:!1}),()=>{e.removeEventListener("wheel",w)}},[x,u]),(0,l.useEffect)(()=>{if(h){let e=e=>{h&&u>1&&d({x:e.clientX-v.x,y:e.clientY-v.y})},t=()=>{c(!1)};return window.addEventListener("mousemove",e),window.addEventListener("mouseup",t),()=>{window.removeEventListener("mousemove",e),window.removeEventListener("mouseup",t)}}},[h,v,u]),{openPreview:e=>{e&&e.url&&(console.log("设置é¢è§è§é¢",e),a({url:e.url,thumbnail:e.thumbnail}),r(!0),n(1),d({x:0,y:0}),document.body.style.overflow="hidden")},closePreview:f,handleWheel:w,handleDoubleClick:()=>{u>1.1?(n(1),d({x:0,y:0})):n(2)},resetZoom:()=>{n(1),d({x:0,y:0})},handleMouseDown:e=>{u>1&&(c(!0),m({x:e.clientX-p.x,y:e.clientY-p.y}))},handleMouseMove:e=>{h&&u>1&&d({x:e.clientX-v.x,y:e.clientY-v.y})},handleMouseUp:()=>{c(!1)},handleModalClick:e=>{g.current&&e.target===g.current&&f()},handleDownload:(e,l)=>{l&&(l.stopPropagation(),l.preventDefault());let s=new Date,a="".concat(s.getFullYear()).concat(String(s.getMonth()+1).padStart(2,"0")).concat(String(s.getDate()).padStart(2,"0"),"_").concat(String(s.getHours()).padStart(2,"0")).concat(String(s.getMinutes()).padStart(2,"0")).concat(String(s.getSeconds()).padStart(2,"0")),r="video_".concat(a,".mp4"),n=document.createElement("img");n.onload=function(){let e=document.createElement("canvas");e.width=n.width,e.height=n.height;let t=e.getContext("2d");
1if(t){t.drawImage(n,0,0);try{let t=e.toDataURL("image/png"),o=document.createElement("a");o.href=t,o.download=r,o.style.display="none",document.body.appendChild(o),o.click(),setTimeout(()=>{document.body.removeChild(o)},100)}catch(e){console.error("æ æ³å建base64æ°æ®:",e)}}},n.onerror=function(){var e;console.error("è§é¢å 载失败"),i.toast.error((null==o||null==(e=o.messages)?void 0:e.video_download_failed)||t("videoDownloadFailed"),{position:"top-center",className:"text-center flex items-center justify-center"})},n.src=e},handleVideoEdit:(e,t)=>{t&&(t.stopPropagation(),t.preventDefault());let o=encodeURIComponent(e);window.location.href="/video-to-video?video=".concat(o)}}}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.