PageSourceSearch

https://aibotspace.com/assets/ViralAnalysis-C4O6I2Pz.js

js aibotspace.com collected 2026-09-28 00:50:46 UTC 12,713 bytes, 52 lines download raw bytes

1import{r as s,j as e}from"./vendor-react-B--7RBOU.js";import{c as O,T as w,S,a as U}from"./index-nJ2jv59_.js";import{generateContent as D}from"./geminiService-B6EQiH8U.js";import{buildViralStructureBreakdownSpec as G,buildUltraDetailCoreRules as P,buildViralAnalysisTableFormat as B}from"./segmentPromptSpec-DIAXvWzT.js";import{F as q}from"./file-video-DTbZCZGj.js";import{U as T}from"./upload-DoBpSw_7.js";import{G as H}from"./globe-D5nXzRzd.js";import{R as Y}from"./refresh-cw-Cj3hYgA9.js";import"./vendor-batch-utils-CGYAwOYr.js";import"./ossUpload-Dr_HOKC1.js";/**
2 * @license lucide-react v0.344.0 - ISC
3 *
4 * This source code is licensed under the ISC license.
5 * See the LICENSE file in the root directory of this source tree.
6 */const Z=O("SquarePen",[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a2.121 2.121 0 1 1 3 3L12 15l-4 1 1-4Z",key:"1lpok0"}]]),ce=()=>{const[n,C]=s.useState(null),[J,K]=s.useState(()=>localStorage.getItem("viral_analysis_video_name")||""),m="CUSTOM",[c,I]=s.useState(w[0]),[h,_]=s.useState(""),[u,b]=s.useState(8),[v,p]=s.useState("8"),[r,y]=s.useState(null),[l,A]=s.useState(()=>localStorage.getItem("viral_analysis_result")||"");s.useEffect(()=>{l&&localStorage.setItem("viral_analysis_result",l)},[l]);const[M,j]=s.useState(!1),[g,$]=s.useState(""),[o,L]=s.useState(()=>localStorage.getItem("viral_analysis_extra_instructions")||"");s.useEffect(()=>{localStorage.setItem("viral_analysis_extra_instructions",o)},[o]);const E=t=>{t.target.files&&t.target.files[0]&&C(t.target.files[0])},f=async t=>{if(!n&&t!=="modify")return;y(t);const a=c===m?h.trim():c;if(!a){alert("请先输入自定义语言内容");return}try{const i=`${u}s`,z=`
7        **输出格式严格要求**:
8
9        **第一部分**: ${t==="reverse"?"爆款解析总结(含 8 维度结构拆解:主题定位、爆款结构 Timeline、钩子类型、爆点分析、转化点、节奏密度、视觉母题、一致性锚点)":t==="derivative"?"衍生创作思路(含爆款逻辑复用方式、与原视频在人设/色调/镜头气质上的统一或对比说明)":"修改说明"} (纯文本)
10        ${t==="reverse"?G(a):""}
11        ${t==="derivative"?`
12- 简述衍生的**主题**与**爆款逻辑复用方式**;说明新内容如何与参考视频在**人设、色调、镜头气质**上保持统一或刻意对比。
13`:""}
14
15        ${P(i)}
16
17        ${B(i,a)}
18        ${t==="reverse"||t==="derivative"?`
19
20**反推提示词特别注意**: 除动作描述外,光影(光源方向/类型/色温)、镜头(焦段感观/机位/运镜)、色彩(主色调/调色风格)、构图(主体位置/层次)、场景(环境细节)、氛围(用画面元素支撑)、一致性锚点(具体外观细节)均须逐项写出,**不得只写动作而省略其它维度**。
21`:""}
22      `;let d="";t==="reverse"?d=`
23          **任务**: 爆款视频深度解析及提示词反推 (Reverse Engineering)。
24          **输入处理**: 请仔细观看上传的视频文件。
25          1. **深度总结(8 维度结构拆解)**: 按以下维度逐一展开分析——全片主题定位、爆款结构逻辑(Hook→铺垫→爆点→互动引导→转化收尾)、钩子类型与手法、爆点(Viral Trigger)分析、转化点(带货视频必填)、节奏与内容密度、视觉母题与一致性符号、人物/产品/场景一致性锚点。每一维度须有具体数据与时间戳支撑,禁止空泛套话。
26          2. **提示词反推**: 根据 ${u}s 分段,逐段反推可执行的 AI 视频提示词;须达到统一规范(细致入微、不遗漏任何细节),且除动作描述外,光影、镜头焦段与机位、色彩与调色、构图与场景、氛围情绪、一致性锚点均须逐项写出,不得省略。
27        `:t==="derivative"?d=`
28          **任务**: 爆款逻辑衍生创作 (Derivative Creation)。
29          **输入处理**: 提取上传视频的风格、主题、爆款逻辑、运镜节奏、视觉母题。
30          1. **衍生创作**: 保持原视频的「爆款逻辑」和「风格质感」不变,但更换一个具体的创意内容或场景,创作一个新的视频脚本。须说明新内容如何与参考视频在人设、色调、镜头气质上保持统一或刻意对比。
31          2. **提示词生成**: 输出新创意的详细分镜提示词,格式与反推完全一致,并遵守ç
31»Ÿä¸€è§„范(细致可执行、含段内时间轴与入画/出画);各段人设/场景/色调延续须写具体,不得空泛概括;光影、镜头、色彩、构图、场景、氛围、一致性锚点均须逐项写出。
32        `:t==="modify"&&(d=`
33           **任务**: 修改现有结果。
34           基于之前的分析结果,请应用以下用户修改意见重新生成表格内容: ${g}。
35           请保持下方规定的表格格式与细致可执行要求不变:每个时间条必须完整自洽(画面+台词+镜头+光线+声音融为一体),元数据标签简要,不得空泛偷懒;简单镜头允许精炼表述。
36         `);const V=o.trim().length>0?`
37        **用户额外指令(生成时必须遵守,且不得与下方格式要求冲突)**:
38        ${o.trim()}
39        `:"",F=`
40        ${d}
41        ${V}
42        
43        **目标语言**: ${a}。
44        ${z}
45
46        **Strict Output Rules**:
47        1. DO NOT output any internal thought process, "Okay I will", or analysis steps before the final result.
48        2. The output MUST START DIRECTLY with "**第一部分**:". 
49        3. Do not use <thinking> tags.
50
51        **注意**: 请直接输出最终结果,严禁输出 AI 思考过程。
52      `,N=await D({model:U.GEMINI_3_PRO,prompt:F,video:n||void 0});if(N.text){let x=N.text.replace(/<thinking>[\s\S]*?<\/thinking>/gi,"").trim();const k=x.indexOf("**第一部分**");k!==-1&&(x=x.substring(k)),A(x)}}catch(i){console.error(i),alert(i.message||"分析失败。请检查后台配置。")}finally{y(null)}},R=()=>{navigator.clipboard.writeText(l),j(!0),setTimeout(()=>j(!1),2e3)};return e.jsxs("div",{className:"max-w-7xl mx-auto space-y-8 pb-20",children:[e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsx("h2",{className:"text-3xl font-bold text-white",children:"爆款复刻"}),e.jsx("p",{className:"text-gray-400",children:"深度视频解析、提示词反推及爆款逻辑衍生。"})]}),e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-12 gap-8",children:[e.jsxs("div",{className:"lg:col-span-4 space-y-6 bg-dark-800 p-6 rounded-xl border border-dark-800 shadow-xl h-fit",children:[e.jsxs("div",{className:"border-2 border-dashed border-gray-600 rounded-lg p-8 text-center hover:border-brand-500 transition-colors relative group",children:[e.jsx("input",{type:"file",accept:"video/*",onChange:E,className:"absolute inset-0 w-full h-full opacity-0 cursor-pointer z-10"}),n?e.jsxs("div",{className:"flex flex-col items-center text-brand-400",children:[e.jsx(q,{size:48,className:"mb-2"}),e.jsx("span",{className:"font-medium text-sm truncate w-full",children:n.name})]}):e.jsxs("div",{className:"flex flex-col items-center text-gray-400 group-hover:text-white transition-colors",children:[e.jsx(T,{size:48,className:"mb-2"}),e.jsx("span",{className:"font-medium",children:"点击上传视频"})]})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsxs("label",{className:"block text-sm font-medium text-gray-300 mb-1 flex items-center gap-2",children:[e.jsx(H,{size:16})," 目标国家/语言"]}),e.jsxs("select",{value:c,onChange:t=>I(t.target.value),className:"w-full bg-dark-900 border border-gray-700 rounded-lg p-2.5 text-white focus:ring-2 focus:ring-brand-500 outline-none",children:[w.map(t=>e.jsx("option",{value:t,children:t},t)),e.jsx("option",{value:m,children:"自定义"})]})]}),c===m&&e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs font-medium text-gray-300 mb-1",children:"自定义语言"}),e.jsx("input",{type:"text",value:h,onChange:t=>_(t.target.value),placeholder:"例如:韩国语(韩语)",className:"w-full bg-dark-900 border border-gray-700 rounded-lg p-2.5 text-white focus:ring-2 focus:ring-brand-500 outline-none"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-gray-300 mb-1",children:"分段时长(秒)"}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("input",{type:"number",min:3,max:60,step:1,value:v,onChange:t=>{p(t.target.value);const a=parseInt(t.target.value,10);if(!isNaN(a)){const i=Math.min(60,Math.max(3,a));b(i)}},onBlur:()=>{const t=parseInt(v,10);if(isNaN(t)||t<3||t>60)p(String(u));else{const a=Math.min(60,Math.max(3,t));b(a),p(String(a))}},className:"flex-1 bg-dark-900 border border-gray-700 rounded-lg p-2.5 text-white focus:ring-2 focus:ring-brand-500 outline-none [appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none"}),e.jsx("span",{className:"text-sm text-gray-400 shrink-0",children:"秒/段"})]}),e.jsx("p",{className:"text-[10px] text-gray-500 mt-1",children:"支持 3–60 秒,按视频节奏自行设定"})]}),e.jsxs("div",{children:[e.jsxs("label",{className:"block text-sm font-medium text-gray-300 mb-1 flex items-center gap-2",children:[e.jsx(Z,{size:16})," 额外指令(可选)"]}),e.jsx("textarea",{value:o,onChange:t=>
52L(t.target.value),rows:4,placeholder:"例如:面向 Sora/Veo/可灵 等文生视频;横屏 16:9;写实纪录片风;禁止血腥暴力;每段突出一个产品卖点……",className:"w-full bg-dark-900 border border-gray-700 rounded-lg p-2.5 text-sm text-white placeholder:text-gray-500 focus:ring-2 focus:ring-brand-500 outline-none resize-y min-h-[88px]"}),e.jsx("p",{className:"text-[10px] text-gray-500 mt-1",children:"解析、衍生与「修改结果」均会参考此处;留空则不影响原有逻辑。"})]})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-3 pt-4 border-t border-gray-700",children:[e.jsxs("button",{onClick:()=>f("reverse"),disabled:!!r||!n,className:"col-span-1 bg-gradient-to-br from-blue-600 to-indigo-700 text-white p-3 rounded-lg font-bold disabled:opacity-50 flex flex-col items-center justify-center gap-1 hover:scale-105 transition-transform shadow-lg",children:[e.jsx(Y,{size:20,className:r==="reverse"?"animate-spin":""}),e.jsx("span",{className:"text-xs font-bold mt-1 text-center",children:"爆款解析&反推"})]}),e.jsxs("button",{onClick:()=>f("derivative"),disabled:!!r||!n,className:"col-span-1 bg-gradient-to-br from-purple-600 to-pink-600 text-white p-3 rounded-lg font-bold disabled:opacity-50 flex flex-col items-center justify-center gap-1 hover:scale-105 transition-transform shadow-lg",children:[e.jsx(S,{size:20,className:r==="derivative"?"animate-spin":""}),e.jsx("span",{className:"text-xs font-bold mt-1 text-center",children:"衍生提示词"})]})]})]}),e.jsxs("div",{className:"lg:col-span-8 bg-dark-800 rounded-xl border border-dark-800 shadow-xl flex flex-col min-h-[600px]",children:[e.jsxs("div",{className:"flex justify-between items-center p-4 border-b border-gray-700 bg-dark-900/50 rounded-t-xl",children:[e.jsx("h3",{className:"font-semibold text-gray-200 flex items-center gap-2",children:"解析结果"}),l&&e.jsx("button",{onClick:R,className:"px-3 py-1.5 rounded bg-dark-800 border border-gray-600 text-xs text-brand-400",children:M?"已复制":"复制表格"})]}),e.jsx("div",{className:"flex-1 p-6 overflow-y-auto bg-dark-900/30 font-mono text-sm text-gray-300",children:r?e.jsxs("div",{className:"h-full flex flex-col items-center justify-center gap-4 text-gray-500 animate-pulse",children:[e.jsx(S,{size:48,className:"text-brand-500"}),e.jsxs("p",{children:[r==="reverse"&&"正在进行深度爆款拆解与反推...",r==="derivative"&&"正在基于爆款逻辑进行衍生创作...",r==="modify"&&"正在应用修改..."]})]}):l?e.jsx("div",{className:"prose prose-invert max-w-none whitespace-pre-wrap",children:l}):e.jsxs("div",{className:"h-full flex flex-col items-center justify-center text-gray-600 gap-4",children:[e.jsx(T,{size:32}),e.jsx("p",{children:"请上传视频以获取详细拆解。"})]})}),l&&e.jsxs("div",{className:"p-4 border-t border-gray-700 bg-dark-900/50 rounded-b-xl flex gap-3",children:[e.jsx("input",{type:"text",value:g,onChange:t=>$(t.target.value),placeholder:"输入修改意见...",className:"flex-1 bg-dark-800 border border-gray-700 rounded-lg px-4 py-3 text-sm text-white"}),e.jsx("button",{onClick:()=>f("modify"),disabled:!!r||!g,className:"bg-brand-600 text-white px-6 rounded-lg font-medium",children:"修改结果"})]})]})]})]})};export{ce as ViralAnalysis};

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.