import{j as e}from"./jsx-dev-runtime-Czb3f8pQ.js";import{r as n}from"./index-Br42UDbl.js";import{E as Q}from"./engine-Bmw5iF75.js";import{r as le,C as F,l as ne,F as ae,S as U,f as ee,D as y,s as de}from"./scenes-oUf6rtD_.js";import{g as ce}from"./audio-BSS1MXf9.js";import{e as ue}from"./exporter-CgYwbdYV.js";import{o as me}from"./state-B_bTBsCz.js";import"./index-BlGQAcOD.js";const te=t=>Array.from(t).length,se=t=>t.topics.map(i=>"#"+i).join(" ");function q(t){return t.topics.length?t.body+` `+se(t):t.body}function fe(t){return te(t.limits.bodyIncludesTopics?q(t):t.body)}const xe=[{key:"xhs",name:"小红书",color:"#ff2442",limits:{title:20,topics:10,body:1e3,bodyIncludesTopics:!0},title:"拇指一动就疼?3D看懂腱鞘炎",body:`抱娃、刷手机、拧瓶盖…… 手腕靠拇指这一侧,一用力就像被“卡住”一样疼? 做了一条 3D 解剖动画,把皮肤“变透明”,直接看里面发生了什么👇 🔹 腱鞘=包住肌腱的“小通道” 正常时肌腱在里面顺畅滑动;反复用力后,腱鞘增厚、通道变窄,肌腱一滑就摩擦 → 疼 🔹 为什么一动就疼 抓、捏、拧这些动作,都会让肌腱在狭窄处来回拉扯 🔹 谁更容易中招 宝妈抱娃|长时间用手机|键盘鼠标党|经常用力的手工活 🔹 处理顺序很重要 先判断:疼在哪、哪个动作最明显、是否反复发作 再选择:休息制动、护具、理疗、药物、局部注射等 反复发作、保守效果不好时,部分情况会考虑小针刀等微创松解 🔹 小针刀到底在干什么 不是“切开手腕”,而是:定位 → 消毒 → 局部麻醉 → 在影像引导下对狭窄处做“精准、有限、局部”的松解 目标只有一个:让肌腱重新顺畅滑动 🔹 恢复期 疼痛减轻 → 活动改善 → 逐步回到抱娃、打字、拿东西 别一好就猛用手,循序渐进最重要 📌 一句话记住:腱鞘炎的核心不是“手腕疼”,而是肌腱在狭窄的腱鞘里滑不动。 你是抱娃疼、手机疼,还是打字疼?评论区说说你最疼的那个动作👇 ⚠️ 原创 3D 示意动画,仅作健康科普,不能替代面诊。具体是否适合某种治疗,请由专业医生评估。`,topics:["腱鞘炎","妈妈手","手腕疼","拇指疼","健康科普","3D动画","医学科普","小针刀","打工人","护手"],tips:"建议封面用 3:4 竖版;标题≤20字,话题已计入正文 1000 字。"},{key:"douyin",name:"抖音",color:"#25f4ee",limits:{title:30,topics:5,body:1e3,bodyIncludesTopics:!0},title:"手腕拇指侧一用力就疼?3D动画带你看清腱鞘炎",body:`抱娃、刷手机、拧瓶盖,拇指一侧一用力就疼? 90 秒 3D 解剖动画,把皮肤变透明: ✅ 腱鞘增厚 → 空间变窄 → 肌腱一滑就摩擦 ✅ 先判断,再处理:休息、护具、理疗、药物、注射…… ✅ 反复发作时,小针刀做的是“精准、有限、局部”的松解 ✅ 目标只有一个:让肌腱重新顺畅滑动 记住:腱鞘炎不是简单的手腕疼,而是肌腱在狭窄的腱鞘里滑不动。 你最疼的是哪个动作?评论区告诉我👇 (原创3D示意动画,仅供科普,不替代面诊)`,topics:["腱鞘炎","妈妈手","手腕疼","健康科普","3D医学动画"],tips:"竖屏 9:16 原生发布;封面准备 3:4 与 4:3 两版。"},{key:"bili",name:"B站",color:"#00aeec",limits:{title:80,topics:10,body:2e3,bodyIncludesTopics:!1},title:"【3D解剖动画】拇指一动就疼?90秒看懂腱鞘炎:为什么疼、怎么判断、小针刀如何精准松解",body:`这是一条原创 3D 医学科普动画,用一只“可以透视”的手,把腱鞘炎从疼痛到恢复的完整过程讲清楚。 【时间轴】 00:00 疼痛开始:拇指一侧,一用力就疼 00:06 腱鞘炎到底发生了什么:腱鞘=肌腱的“小通道”,增厚 → 变窄 → 摩擦 00:15 为什么一动就疼:抓、捏、拧 00:20 哪些人更容易出现:抱娃、手机、键盘鼠标、反复用力 00:26 不要一上来就直接治疗:先定位、先判断 00:34 常见治疗方法:休息制动、护具、理疗、药物、注射 00:44 重点进入小针刀:适合什么情况、解决什么问题 00:51 小针刀治疗过程:定位 → 消毒 → 麻醉 → 精准松解 01:01 松解前后对比:狭窄 vs 顺畅 01:07 从疼痛到恢复:疼痛减轻、活动改善、回归日常 01:14 最后的记忆点 【一句话总结】 腱鞘炎的核心不是“手腕疼”,而是肌腱在狭窄的腱鞘里滑不动。处理的思路是:先判断,再选择;即使做松解,也强调精准、有限、局部,目标是让肌腱重新顺畅滑动。 【制作说明】 · 全部 3D 模型、器械、动画、配乐与音效均为原创程序化生成; · 片中器械为示意模型,不代表任何品牌产品; · 动画为原理示意,比例与操作细节经过简化,不能作为操作指导。 ⚠️ 本视频仅作健康科普,不替代面诊。是否适合任何一种治疗,请由专业医生面诊评估。 你最疼的是哪个动作?抱娃、刷手机、拧瓶盖还是打字?弹幕/评论区告诉我~`,topics:["腱鞘炎","妈妈手","医学科普","3D动画","人体解剖","健康","手腕疼","科普","小针刀","原创动画"],tips:"建议投稿分区:知识 › 医学健康;个人空间封面使用 16:9,投稿封面使用 4:3。"},{key:"sph",name:"视频号",color:"#fa9d3b",limits:{title:16,topics:null,body:null,bodyIncludesTopics:!0},title:"拇指一动就疼?看懂腱鞘炎",body:`抱娃、刷手机、拧瓶盖,拇指一侧一用力就疼? 这条 3D 解剖动画,带你看清腱鞘炎从疼痛到恢复的全过程: 1️⃣ 腱鞘增厚、通道变窄,肌腱一滑就摩擦 2️⃣ 抓、捏、拧,都会加重拉扯 3️⃣ 先判断,再处理:休息、护具、理疗、药物、注射 4️⃣ 反复发作时,小针刀强调“精准、有限、局部”的松解 5️⃣ 目标:让肌腱重新顺畅滑动,慢慢回归日常 记住一句话:腱鞘炎的核心,是肌腱在狭窄的腱鞘里滑不动。 转给家里经常抱娃、天天看手机的人👇 (原创3D示意动画,仅供科普,不替代面诊)`,topics:["腱鞘炎","妈妈手","手腕疼","拇指疼","健康科普","医学科普","3D动画","中老年健康","宝妈"],tips:"主页卡片用 3:4,转发分享卡片用 4:3。"}],T=[{key:"xhs-34",platform:"小红书",label:"3:4 竖版",w:1080,h:1440,l1:"拇指一动就疼?",l2:"3D看懂腱鞘炎",hot:"腱鞘炎",color:"#ff2442"},{key:"xhs-43",platform:"小红书",label:"4:3 横版",w:1440,h:1080,l1:"拇指一动就疼?",l2:"3D看懂腱鞘炎",hot:"腱鞘炎",color:"#ff2442"},{key:"dy-34",platform:"抖音",label:"3:4 竖版",w:1080,h:1440,l1:"一用力就疼?",l2:"透视腱鞘炎",hot:"腱鞘炎",color:"#25f4ee"},{key:"dy-43",platform:"抖音",label:"4:3 横版",w:1440,h:1080,l1:"一用力就疼?",l2:"透视腱鞘炎",hot:"腱鞘炎",color:"#25f4ee"},{key:"bili-43",platform:"B站",label:"4:3 投稿封面",w:1440,h:1080,l1:"【3D解剖】",l2:"看懂腱鞘炎",hot:"腱鞘炎",color:"#00aeec"},{key:"bili-169",platform:"B站",label:"16:9 个人空间",w:1920,h:1080,l1:"拇指一动就疼?",l2:"90秒看懂腱鞘炎",hot:"腱鞘炎",color:"#00aeec"},{key:"sph-34",platform:"视频号",label:"3:4 主页卡片",w:1080,h:1440,l1:"拇指疼?",l2:"看懂腱鞘炎",hot:"腱鞘炎",color:"#fa9d3b"},{key:"sph-43",platform:"视频号",label:"4:3 分享卡片",w:1440,h:1080,l1:"拇指疼?",l2:"看懂腱鞘炎",hot:"腱鞘炎",color:"#fa9d3b"}];let H=null;function Ne(t){const i=U[1].start+8.6;return{...ee(i).views[0].state,pain:1,friction:1,thick:1,xray:1,skin:.8,bone:1,tendon:1,sheath:1,focus:.5,cam:{pos:me([0,0,0],t?2.35:2,.05,.14),target:[0,0,0],fov:35,follow:1,shift:t?[.56,.64]:[.66,.54]}}}function Y(t,i,s,l,c,a){t.beginPath(),t.moveTo(i+a,s),t.arcTo(i+l,s,i+l,s+c,a),t.arcTo(i+l,s+c,i,s+c,a),t.arcTo(i,s+c,i,s,a),t.arcTo(i,s,i+l,s,a),t.closePath()}function re(t,i){const{w:s,h:l}=t;i.width=s,i.height=l;const c=i.getContext("2d");H||(H=new Q),H.setSize(s,l);const a=l>s,m=Ne(a),d=m.time;return H.render({views:[{rect:[0,0,1,1],state:m,bg:"lab"}],overlay:(r,N)=>{const f=Math.min(s,l),b=ae,g=a?r.createLinearGradient(0,0,0,l*.55):r.createLinearGradient(0,0,s*.6,0);g.addColorStop(0,"rgba(2,8,18,0.92)"),g.addColorStop(.6,"rgba(2,8,18,0.55)"),g.addColorStop(1,"rgba(2,8,18,0)"),r.fillStyle=g,r.fillRect(0,0,s,l);const V=N.anchor("pain"),x=N.anchor("sheath");le(r,V.x,V.y,f*.075,1,d,F.red,1),r.save(),r.scale(f/1080,f/1080);const w=1080/f;ne(r,x.x*w,x.y*w,x.x*w+(a?170:190),x.y*w+(a?230:210),"腱鞘增厚 · 通道变窄",1,F.yellow,34),r.restore();const S=f*.07,$=a?f*.09:f*.12;r.textBaseline="top",r.textAlign="left";const E=f*.036;r.font=`900 ${E}px ${b}`;const A="3D 解剖动画 · 医学科普",z=r.measureText(A).width+E*1.4;Y(r,S,$,z,E*1.8,E*.9),r.fillStyle="rgba(95,212,255,0.16)",r.fill(),r.strokeStyle=F.cyan,r.lineWidth=2,r.stroke(),r.fillStyle=F.cyan,r.fillText(A,S+E*.7,$+E*.4);const B=f*(t.l1.length>6?.105:.125);r.font=`900 ${B}px ${b}`,r.shadowColor="rgba(0,0,0,0.6)",r.shadowBlur=20,r.fillStyle="#fff",r.fillText(t.l1,S,$+E*2.6);const C=f*(t.l2.length>6?.115:.135);r.font=`900 ${C}px ${b}`;const D=$+E*2.6+B*1.2,R=t.l2.indexOf(t.hot),L=R>=0?t.l2.slice(0,R):t.l2;if(r.fillStyle="#fff",r.fillText(L,S,D),R>=0){const k=S+r.measureText(L).width;r.shadowColor="rgba(255,40,40,0.9)",r.shadowBlur=40;const j=r.createLinearGradient(0,D,0,D+C);j.addColorStop(0,"#ff7a6a"),j.addColorStop(1,"#ff2a2a"),r.fillStyle=j,r.fillText(t.hot,k,D),r.fillText(t.l2.slice(R+t.hot.length),k+r.measureText(t.hot).width,D)}r.shadowBlur=0;const o=f*.03;r.font=`800 ${o}px ${b}`;let u=S;const p=D+C*1.35,M=["疼痛","定位","处理","松解","恢复"];M.forEach((k,j)=>{const I=r.measureText(k).width+o*1.2;Y(r,u,p,I,o*1.7,o*.5),r.fillStyle=j===0?"rgba(255,59,59,0.85)":j===4?"rgba(62,224,143,0.85)":"rgba(255,255,255,0.14)",r.fill(),r.fillStyle="#fff",r.fillText(k,u+o*.6,p+o*.35),u+=I,ji.toBlob(c=>c?s(c):l(new Error("toBlob")),"image/png"))}/** * @license lucide-react v0.454.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const he=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),oe=(...t)=>t.filter((i,s,l)=>!!i&&i.trim()!==""&&l.indexOf(i)===s).join(" ").trim();/** * @license lucide-react v0.454.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */var pe={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** * @license lucide-react v0.454.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const ve=n.forwardRef(({color:t="currentColor",size:i=24,strokeWidth:s=2,absoluteStrokeWidth:l,className:c="",children:a,iconNode:m,...d},r)=>n.createElement("svg",{ref:r,...pe,width:i,height:i,stroke:t,strokeWidth:l?Number(s)*24/Number(i):s,className:oe("lucide",c),...d},[...m.map(([N,f])=>n.createElement(N,f)),...Array.isArray(a)?a:[a]]));/** * @license lucide-react v0.454.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const v=(t,i)=>{const s=n.forwardRef(({className:l,...c},a)=>n.createElement(ve,{ref:a,iconNode:i,className:oe(`lucide-${he(t)}`,l),...c}));return s.displayName=`${t}`,s};/** * @license lucide-react v0.454.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const ie=v("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/** * @license lucide-react v0.454.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const we=v("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/** * @license lucide-react v0.454.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const W=v("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/** * @license lucide-react v0.454.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const ke=v("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/** * @license lucide-react v0.454.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const ye=v("Film",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M7 3v18",key:"bbkbws"}],["path",{d:"M3 7.5h4",key:"zfgn84"}],["path",{d:"M3 12h18",key:"1i2n21"}],["path",{d:"M3 16.5h4",key:"1230mu"}],["path",{d:"M17 3v18",key:"in4fa5"}],["path",{d:"M17 7.5h4",key:"myr1c1"}],["path",{d:"M17 16.5h4",key:"go4c1d"}]]);/** * @license lucide-react v0.454.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const ge=v("Image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]);/** * @license lucide-react v0.454.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Se=v("Maximize",[["path",{d:"M8 3H5a2 2 0 0 0-2 2v3",key:"1dcmit"}],["path",{d:"M21 8V5a2 2 0 0 0-2-2h-3",key:"1e4gt3"}],["path",{d:"M3 16v3a2 2 0 0 0 2 2h3",key:"wsl5sc"}],["path",{d:"M16 21h3a2 2 0 0 0 2-2v-3",key:"18trek"}]]);/** * @license lucide-react v0.454.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Ee=v("Minimize",[["path",{d:"M8 3v3a2 2 0 0 1-2 2H3",key:"hohbtr"}],["path",{d:"M21 8h-3a2 2 0 0 1-2-2V3",key:"5jw1f3"}],["path",{d:"M3 16h3a2 2 0 0 1 2 2v3",key:"198tvr"}],["path",{d:"M16 21v-3a2 2 0 0 1 2-2h3",key:"ph8mxp"}]]);/** * @license lucide-react v0.454.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const De=v("Pause",[["rect",{x:"14",y:"4",width:"4",height:"16",rx:"1",key:"zuxfzm"}],["rect",{x:"6",y:"4",width:"4",height:"16",rx:"1",key:"1okwgv"}]]);/** * @license lucide-react v0.454.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const J=v("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/** * @license lucide-react v0.454.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const je=v("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);/** * @license lucide-react v0.454.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Ve=v("Volume2",[["path",{d:"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",key:"uqj9uw"}],["path",{d:"M16 9a5 5 0 0 1 0 6",key:"1q6k2b"}],["path",{d:"M19.364 18.364a9 9 0 0 0 0-12.728",key:"ijwkga"}]]);/** * @license lucide-react v0.454.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Ce=v("VolumeX",[["path",{d:"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",key:"uqj9uw"}],["line",{x1:"22",x2:"16",y1:"9",y2:"15",key:"1ewh16"}],["line",{x1:"16",x2:"22",y1:"9",y2:"15",key:"5ykzw1"}]]);/** * @license lucide-react v0.454.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Me=v("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),_=t=>`${Math.floor(t/60)}:${String(Math.floor(t%60)).padStart(2,"0")}`;function X(t,i){const s=document.createElement("a");s.href=URL.createObjectURL(t),s.download=i,document.body.appendChild(s),s.click(),s.remove(),setTimeout(()=>URL.revokeObjectURL(s.href),6e4)}function Te(){const t=n.useRef(null),i=n.useRef(null),s=n.useRef(null),l=n.useRef({t:0,playing:!1,startAt:0,startT:0,dirty:!0}),c=n.useRef({ctx:null,buf:null,src:null,gain:null}),[a,m]=n.useState(0),[d,r]=n.useState(!1),[N,f]=n.useState(!1),[b,g]=n.useState(!1),[V,x]=n.useState({p:0,label:"加载音频"}),[w,S]=n.useState(null),[$,E]=n.useState(!1);n.useEffect(()=>{ce((o,u)=>x({p:o,label:u})).then(o=>{c.current.buf=o,x(null)}).catch(o=>{S("音频加载失败:"+o.message),x(null)})},[]),n.useEffect(()=>{const o=i.current,u=Math.min(window.innerWidth,window.innerHeight)<600,p=u?540:720,M=u?960:1280;o.width=p,o.height=M;let k;try{k=new Q,k.setSize(p,M),s.current=k}catch(h){S("当前浏览器不支持 WebGL:"+h.message);return}const j=o.getContext("2d",{alpha:!1});let I=0,Z=0;const K=()=>{I=requestAnimationFrame(K);const h=l.current;if(h.playing){const P=c.current.ctx;h.t=h.startT+(P?P.currentTime-h.startAt:performance.now()/1e3-h.startAt),h.t>=y&&(h.t=y,A(),r(!1)),h.dirty=!0}if(h.dirty){h.dirty=!1,k.render(ee(h.t),j,h.t);const P=performance.now();(P-Z>100||!h.playing)&&(Z=P,m(h.t))}};return K(),()=>{cancelAnimationFrame(I),k.renderer.dispose()}},[]);const A=()=>{var u;const o=c.current;try{(u=o.src)==null||u.stop()}catch{}o.src=null,l.current.playing=!1},z=n.useCallback(async()=>{const o=c.current,u=l.current;if(u.t>=y-.05&&(u.t=0),o.ctx||(o.ctx=new AudioContext({sampleRate:48e3}),o.gain=o.ctx.createGain(),o.gain.connect(o.ctx.destination)),await o.ctx.resume(),o.gain.gain.value=N?0:1,o.buf){const p=o.ctx.createBufferSource();p.buffer=o.buf,p.connect(o.gain),p.start(o.ctx.currentTime+.03,Math.min(u.t,o.buf.duration-.01)),o.src=p,u.startAt=o.ctx.currentTime+.03}else u.startAt=o.ctx.currentTime;u.startT=u.t,u.playing=!0,r(!0),E(!0)},[N]),B=n.useCallback(()=>{A(),r(!1)},[]),C=()=>l.current.playing?B():z(),D=o=>{const u=l.current.playing;u&&A(),l.current.t=o,l.current.dirty=!0,m(o),u&&z()};n.useEffect(()=>{c.current.gain&&(c.current.gain.gain.value=N?0:1)},[N]);const R=async()=>{const o=t.current;if(document.fullscreenElement){await document.exitFullscreen();return}if(b){g(!1);return}if(o.requestFullscreen)try{await o.requestFullscreen();return}catch{}g(!0)};n.useEffect(()=>{const o=()=>g(!!document.fullscreenElement);return document.addEventListener("fullscreenchange",o),()=>document.removeEventListener("fullscreenchange",o)},[]),n.useEffect(()=>{const o=u=>{var p,M;((p=u.target)==null?void 0:p.tagName)==="TEXTAREA"||((M=u.target)==null?void 0:M.tagName)==="INPUT"||(u.code==="Space"&&(u.preventDefault(),C()),u.code==="ArrowRight"&&D(Math.min(y,l.current.t+5)),u.code==="ArrowLeft"&&D(Math.max(0,l.current.t-5)))};return window.addEventListener("keydown",o),()=>window.removeEventListener("keydown",o)});const L=de(a);return e.jsxDEV("div",{ref:t,className:b?"fixed inset-0 z-50 bg-black flex items-center justify-center":"relative w-full flex items-center justify-center",children:e.jsxDEV("div",{className:"relative bg-black overflow-hidden shadow-[0_0_80px_rgba(60,180,255,0.15)] sm:rounded-2xl",style:{aspectRatio:"9 / 16",height:b?"100%":"min(100svh - 24px, calc(100vw * 16 / 9))",maxWidth:"100%"},children:[e.jsxDEV("canvas",{ref:i,className:"w-full h-full block cursor-pointer",onClick:C},void 0,!1,{fileName:"/workspaces/frontend/src/video/Studio.tsx",lineNumber:137,columnNumber:9},this),!d&&e.jsxDEV("button",{onClick:C,className:"absolute inset-0 flex flex-col items-center justify-center gap-4 bg-black/25 hover:bg-black/15 transition",children:[e.jsxDEV("span",{className:"w-20 h-20 rounded-full bg-white/90 flex items-center justify-center shadow-2xl",children:e.jsxDEV(J,{className:"w-9 h-9 text-slate-900 ml-1",fill:"currentColor"},void 0,!1,{fileName:"/workspaces/frontend/src/video/Studio.tsx",lineNumber:141,columnNumber:15},this)},void 0,!1,{fileName:"/workspaces/frontend/src/video/Studio.tsx",lineNumber:140,columnNumber:13},this),!$&&e.jsxDEV("span",{className:"text-white/90 text-sm font-semibold tracking-wide px-3 py-1 rounded-full bg-black/40",children:"点击播放 · 有声音"},void 0,!1,{fileName:"/workspaces/frontend/src/video/Studio.tsx",lineNumber:143,columnNumber:26},this),V&&e.jsxDEV("span",{className:"text-cyan-200 text-xs",children:[V.label," ",Math.round(V.p*100),"%"]},void 0,!0,{fileName:"/workspaces/frontend/src/video/Studio.tsx",lineNumber:144,columnNumber:22},this)]},void 0,!0,{fileName:"/workspaces/frontend/src/video/Studio.tsx",lineNumber:139,columnNumber:11},this),w&&e.jsxDEV("div",{className:"absolute top-3 left-3 right-3 text-xs bg-red-900/80 text-red-100 rounded px-3 py-2",children:w},void 0,!1,{fileName:"/workspaces/frontend/src/video/Studio.tsx",lineNumber:147,columnNumber:17},this),e.jsxDEV("div",{className:`absolute left-0 right-0 bottom-0 px-3 ${b?"pb-3":"pb-12 sm:pb-3"} pt-8 bg-gradient-to-t from-black/80 to-transparent`,onClick:o=>o.stopPropagation(),children:[e.jsxDEV("div",{className:"relative h-5 flex items-center group",children:[e.jsxDEV("div",{className:"absolute inset-x-0 h-1 rounded bg-white/20 top-1/2 -translate-y-1/2"},void 0,!1,{fileName:"/workspaces/frontend/src/video/Studio.tsx",lineNumber:152,columnNumber:13},this),U.map(o=>e.jsxDEV("div",{className:"absolute w-px h-2 bg-white/50 top-1/2 -translate-y-1/2",style:{left:`${o.start/y*100}%`}},o.index,!1,{fileName:"/workspaces/frontend/src/video/Studio.tsx",lineNumber:153,columnNumber:29},this)),e.jsxDEV("div",{className:"absolute h-1 rounded bg-cyan-400 top-1/2 -translate-y-1/2 left-0",style:{width:`${a/y*100}%`}},void 0,!1,{fileName:"/workspaces/frontend/src/video/Studio.tsx",lineNumber:154,columnNumber:13},this),e.jsxDEV("input",{type:"range",min:0,max:y,step:.01,value:a,onChange:o=>D(+o.target.value),className:"absolute inset-0 w-full opacity-0 cursor-pointer","aria-label":"进度"},void 0,!1,{fileName:"/workspaces/frontend/src/video/Studio.tsx",lineNumber:155,columnNumber:13},this)]},void 0,!0,{fileName:"/workspaces/frontend/src/video/Studio.tsx",lineNumber:151,columnNumber:11},this),e.jsxDEV("div",{className:"flex items-center gap-3 text-white text-xs mt-1",children:[e.jsxDEV("button",{onClick:C,"aria-label":"播放/暂停",children:d?e.jsxDEV(De,{className:"w-5 h-5"},void 0,!1,{fileName:"/workspaces/frontend/src/video/Studio.tsx",lineNumber:159,columnNumber:68},this):e.jsxDEV(J,{className:"w-5 h-5"},void 0,!1,{fileName:"/workspaces/frontend/src/video/Studio.tsx",lineNumber:159,columnNumber:100},this)},void 0,!1,{fileName:"/workspaces/frontend/src/video/Studio.tsx",lineNumber:159,columnNumber:13},this),e.jsxDEV("span",{className:"tabular-nums opacity-80",children:[_(a)," / ",_(y)]},void 0,!0,{fileName:"/workspaces/frontend/src/video/Studio.tsx",lineNumber:160,columnNumber:13},this),e.jsxDEV("span",{className:"truncate opacity-70 flex-1",children:[String(L+1).padStart(2,"0")," · ",U[L].title]},void 0,!0,{fileName:"/workspaces/frontend/src/video/Studio.tsx",lineNumber:161,columnNumber:13},this),e.jsxDEV("button",{onClick:()=>f(o=>!o),"aria-label":"静音",children:N?e.jsxDEV(Ce,{className:"w-5 h-5"},void 0,!1,{fileName:"/workspaces/frontend/src/video/Studio.tsx",lineNumber:162,columnNumber:80},this):e.jsxDEV(Ve,{className:"w-5 h-5"},void 0,!1,{fileName:"/workspaces/frontend/src/video/Studio.tsx",lineNumber:162,columnNumber:114},this)},void 0,!1,{fileName:"/workspaces/frontend/src/video/Studio.tsx",lineNumber:162,columnNumber:13},this),e.jsxDEV("button",{onClick:R,"aria-label":"全屏",children:b?e.jsxDEV(Ee,{className:"w-5 h-5"},void 0,!1,{fileName:"/workspaces/frontend/src/video/Studio.tsx",lineNumber:163,columnNumber:66},this):e.jsxDEV(Se,{className:"w-5 h-5"},void 0,!1,{fileName:"/workspaces/frontend/src/video/Studio.tsx",lineNumber:163,columnNumber:101},this)},void 0,!1,{fileName:"/workspaces/frontend/src/video/Studio.tsx",lineNumber:163,columnNumber:13},this)]},void 0,!0,{fileName:"/workspaces/frontend/src/video/Studio.tsx",lineNumber:158,columnNumber:11},this)]},void 0,!0,{fileName:"/workspaces/frontend/src/video/Studio.tsx",lineNumber:149,columnNumber:9},this)]},void 0,!0,{fileName:"/workspaces/frontend/src/video/Studio.tsx",lineNumber:135,columnNumber:7},this)},void 0,!1,{fileName:"/workspaces/frontend/src/video/Studio.tsx",lineNumber:133,columnNumber:5},this)}function $e(){const[t,i]=n.useState(30),[s,l]=n.useState(null),[c,a]=n.useState(!1),[m,d]=n.useState(null),[r,N]=n.useState(null),f=n.useRef(null),b=typeof window<"u"&&"VideoEncoder"in window,g=async()=>{N(null),d(null),a(!0),f.current=new AbortController;const x=performance.now();try{const w=await ue(t,l,f.current.signal);d({blob:w,fps:t,sec:(performance.now()-x)/1e3}),X(w,`腱鞘炎3D科普_1080x1920_${t}fps.mp4`)}catch(w){w.name!=="AbortError"&&N(w.message)}finally{a(!1),l(null)}},V=(t===60?16:t===30?12:10)*y/8+2;return e.jsxDEV("div",{className:"space-y-5",children:[e.jsxDEV("div",{children:[e.jsxDEV("div",{className:"text-sm text-slate-400 mb-2",children:"帧率"},void 0,!1,{fileName:"/workspaces/frontend/src/video/Studio.tsx",lineNumber:198,columnNumber:9},this),e.jsxDEV("div",{className:"grid grid-cols-3 gap-2",children:[24,30,60].map(x=>e.jsxDEV("button",{disabled:c,onClick:()=>i(x),className:`rounded-xl py-3 border text-center transition ${t===x?"border-cyan-400 bg-cyan-400/10 text-white":"border-white/10 text-slate-300 hover:border-white/30"}`,children:[e.jsxDEV("div",{className:"text-xl font-black",children:[x,e.jsxDEV("span",{className:"text-xs font-semibold ml-0.5",children:"fps"},void 0,!1,{fileName:"/workspaces/frontend/src/video/Studio.tsx",lineNumber:203,columnNumber:54},this)]},void 0,!0,{fileName:"/workspaces/frontend/src/video/Studio.tsx",lineNumber:203,columnNumber:15},this),e.jsxDEV("div",{className:"text-[11px] opacity-60",children:x===24?"电影感 · 体积小":x===30?"平台推荐":"最流畅"},void 0,!1,{fileName:"/workspaces/frontend/src/video/Studio.tsx",lineNumber:204,columnNumber:15},this)]},x,!0,{fileName:"/workspaces/frontend/src/video/Studio.tsx",lineNumber:201,columnNumber:13},this))},void 0,!1,{fileName:"/workspaces/frontend/src/video/Studio.tsx",lineNumber:199,columnNumber:9},this)]},void 0,!0,{fileName:"/workspaces/frontend/src/video/Studio.tsx",lineNumber:197,columnNumber:7},this),e.jsxDEV("div",{className:"text-xs text-slate-400 leading-relaxed bg-white/5 rounded-xl p-3",children:["输出:1080×1920 竖屏 MP4 · H.264 + AAC 立体声 · 时长 ",y.toFixed(1)," 秒 · 预计约 ",Math.round(V)," MB",e.jsxDEV("br",{},void 0,!1,{fileName:"/workspaces/frontend/src/video/Studio.tsx",lineNumber:210,columnNumber:105},this),"全程在你的浏览器本地逐帧渲染,不上传任何数据。导出时请保持此页面在前台。"]},void 0,!0,{fileName:"/workspaces/frontend/src/video/Studio.tsx",lineNumber:209,columnNumber:7},this),!b&&e.jsxDEV("div",{className:"text-xs text-amber-300",children:"当前浏览器不支持本地视频编码,请使用电脑版 Chrome / Edge 最新版。"},void 0,!1,{fileName:"/workspaces/frontend/src/video/Studio.tsx",lineNumber:213,columnNumber:22},this),c?e.jsxDEV("div",{className:"space-y-2",children:[e.jsxDEV("div",{className:"flex justify-between text-sm",children:[e.jsxDEV("span",{className:"text-cyan-300",children:(s==null?void 0:s.phase)??"准备中"},void 0,!1,{fileName:"/workspaces/frontend/src/video/Studio.tsx",lineNumber:216,columnNumber:57},this),e.jsxDEV("span",{className:"tabular-nums",children:[Math.round(((s==null?void 0:s.p)??0)*100),"%"]},void 0,!0,{fileName:"/workspaces/frontend/src/video/Studio.tsx",lineNumber:216,columnNumber:118},this)]},void 0,!0,{fileName:"/workspaces/frontend/src/video/Studio.tsx",lineNumber:216,columnNumber:11},this),e.jsxDEV("div",{className:"h-2 rounded bg-white/10 overflow-hidden",children:e.jsxDEV("div",{className:"h-full bg-gradient-to-r from-cyan-400 to-emerald-400 transition-[width]",style:{width:`${((s==null?void 0:s.p)??0)*100}%`}},void 0,!1,{fileName:"/workspaces/frontend/src/video/Studio.tsx",lineNumber:217,columnNumber:68},this)},void 0,!1,{fileName:"/workspaces/frontend/src/video/Studio.tsx",lineNumber:217,columnNumber:11},this),e.jsxDEV("div",{className:"flex justify-between text-xs text-slate-400",children:[e.jsxDEV("span",{children:s!=null&&s.frame?`第 ${s.frame} / ${s.total} 帧`:""},void 0,!1,{fileName:"/workspaces/frontend/src/video/Studio.tsx",lineNumber:219,columnNumber:13},this),e.jsxDEV("span",{children:(s==null?void 0:s.eta)!=null?`剩余约 ${_(s.eta)}`:""},void 0,!1,{fileName:"/workspaces/frontend/src/video/Studio.tsx",lineNumber:220,columnNumber:13},this)]},void 0,!0,{fileName:"/workspaces/frontend/src/video/Studio.tsx",lineNumber:218,columnNumber:11},this),e.jsxDEV("button",{onClick:()=>{var x;return(x=f.current)==null?void 0:x.abort()},className:"w-full mt-2 rounded-xl py-2.5 border border-white/15 text-slate-200 flex items-center justify-center gap-2 hover:bg-white/5",children:[e.jsxDEV(Me,{className:"w-4 h-4"},void 0,!1,{fileName:"/workspaces/frontend/src/video/Studio.tsx",lineNumber:222,columnNumber:191},this),"取消导出"]},void 0,!0,{fileName:"/workspaces/frontend/src/video/Studio.tsx",lineNumber:222,columnNumber:11},this)]},void 0,!0,{fileName:"/workspaces/frontend/src/video/Studio.tsx",lineNumber:215,columnNumber:9},this):e.jsxDEV("button",{onClick:g,disabled:!b,className:"w-full rounded-xl py-3.5 font-bold text-slate-950 bg-gradient-to-r from-cyan-300 to-emerald-300 hover:brightness-110 disabled:opacity-40 flex items-center justify-center gap-2",children:[e.jsxDEV(W,{className:"w-5 h-5"},void 0,!1,{fileName:"/workspaces/frontend/src/video/Studio.tsx",lineNumber:227,columnNumber:11},this),"导出 MP4(",t,"fps)"]},void 0,!0,{fileName:"/workspaces/frontend/src/video/Studio.tsx",lineNumber:225,columnNumber:9},this),m&&e.jsxDEV("div",{className:"rounded-xl bg-emerald-500/10 border border-emerald-400/30 p-3 text-sm flex items-center gap-3",children:[e.jsxDEV(ie,{className:"w-5 h-5 text-emerald-300 shrink-0"},void 0,!1,{fileName:"/workspaces/frontend/src/video/Studio.tsx",lineNumber:232,columnNumber:11},this),e.jsxDEV("div",{className:"flex-1",children:["已导出 ",m.fps,"fps · ",(m.blob.size/1048576).toFixed(1)," MB · 用时 ",_(m.sec)]},void 0,!0,{fileName:"/workspaces/frontend/src/video/Studio.tsx",lineNumber:233,columnNumber:11},this),e.jsxDEV("button",{onClick:()=>X(m.blob,`腱鞘炎3D科普_1080x1920_${m.fps}fps.mp4`),className:"text-emerald-300 underline",children:"再次下载"},void 0,!1,{fileName:"/workspaces/frontend/src/video/Studio.tsx",lineNumber:234,columnNumber:11},this)]},void 0,!0,{fileName:"/workspaces/frontend/src/video/Studio.tsx",lineNumber:231,columnNumber:9},this),r&&e.jsxDEV("div",{className:"text-sm text-red-300 bg-red-500/10 rounded-xl p-3",children:["导出失败:",r]},void 0,!0,{fileName:"/workspaces/frontend/src/video/Studio.tsx",lineNumber:237,columnNumber:15},this)]},void 0,!0,{fileName:"/workspaces/frontend/src/video/Studio.tsx",lineNumber:196,columnNumber:5},this)}function O({text:t,label:i="复制"}){const[s,l]=n.useState(!1),c=async()=>{try{await navigator.clipboard.writeText(t)}catch{const a=document.createElement("textarea");a.value=t,document.body.appendChild(a),a.select(),document.execCommand("copy"),a.remove()}l(!0),setTimeout(()=>l(!1),1400)};return e.jsxDEV("button",{onClick:c,className:`shrink-0 text-xs px-2.5 py-1 rounded-lg border flex items-center gap-1 transition ${s?"border-emerald-400 text-emerald-300":"border-white/15 text-slate-300 hover:border-white/40"}`,children:[s?e.jsxDEV(ie,{className:"w-3.5 h-3.5"},void 0,!1,{fileName:"/workspaces/frontend/src/video/Studio.tsx",lineNumber:253,columnNumber:13},this):e.jsxDEV(we,{className:"w-3.5 h-3.5"},void 0,!1,{fileName:"/workspaces/frontend/src/video/Studio.tsx",lineNumber:253,columnNumber:49},this),s?"已复制":i]},void 0,!0,{fileName:"/workspaces/frontend/src/video/Studio.tsx",lineNumber:252,columnNumber:5},this)}function G({n:t,max:i}){const s=i==null||t<=i;return e.jsxDEV("span",{className:`text-[11px] tabular-nums px-1.5 py-0.5 rounded ${s?"bg-emerald-500/15 text-emerald-300":"bg-red-500/20 text-red-300"}`,children:[t,i!=null?` / ${i}`:" 字"]},void 0,!0,{fileName:"/workspaces/frontend/src/video/Studio.tsx",lineNumber:260,columnNumber:10},this)}function Ae({p:t}){const i=`${t.title} ${q(t)}`;return e.jsxDEV("div",{className:"rounded-2xl border border-white/10 bg-white/[0.03] overflow-hidden",children:[e.jsxDEV("div",{className:"flex items-center gap-2 px-4 py-3 border-b border-white/10",children:[e.jsxDEV("span",{className:"w-2.5 h-2.5 rounded-full",style:{background:t.color}},void 0,!1,{fileName:"/workspaces/frontend/src/video/Studio.tsx",lineNumber:268,columnNumber:9},this),e.jsxDEV("span",{className:"font-bold",children:t.name},void 0,!1,{fileName:"/workspaces/frontend/src/video/Studio.tsx",lineNumber:269,columnNumber:9},this),e.jsxDEV("span",{className:"text-[11px] text-slate-500 flex-1 truncate",children:t.tips},void 0,!1,{fileName:"/workspaces/frontend/src/video/Studio.tsx",lineNumber:270,columnNumber:9},this),e.jsxDEV(O,{text:i,label:"复制全部"},void 0,!1,{fileName:"/workspaces/frontend/src/video/Studio.tsx",lineNumber:271,columnNumber:9},this)]},void 0,!0,{fileName:"/workspaces/frontend/src/video/Studio.tsx",lineNumber:267,columnNumber:7},this),e.jsxDEV("div",{className:"p-4 space-y-4 text-sm",children:[e.jsxDEV("div",{children:[e.jsxDEV("div",{className:"flex items-center gap-2 mb-1.5",children:[e.jsxDEV("span",{className:"text-slate-400 text-xs",children:"标题"},void 0,!1,{fileName:"/workspaces/frontend/src/video/Studio.tsx",lineNumber:275,columnNumber:59},this),e.jsxDEV(G,{n:te(t.title),max:t.limits.title},void 0,!1,{fileName:"/workspaces/frontend/src/video/Studio.tsx",lineNumber:275,columnNumber:109},this),e.jsxDEV("span",{className:"flex-1"},void 0,!1,{fileName:"/workspaces/frontend/src/video/Studio.tsx",lineNumber:275,columnNumber:160},this),e.jsxDEV(O,{text:t.title},void 0,!1,{fileName:"/workspaces/frontend/src/video/Studio.tsx",lineNumber:275,columnNumber:187},this)]},void 0,!0,{fileName:"/workspaces/frontend/src/video/Studio.tsx",lineNumber:275,columnNumber:11},this),e.jsxDEV("div",{className:"font-bold text-white text-base leading-snug",children:t.title},void 0,!1,{fileName:"/workspaces/frontend/src/video/Studio.tsx",lineNumber:276,columnNumber:11},this)]},void 0,!0,{fileName:"/workspaces/frontend/src/video/Studio.tsx",lineNumber:274,columnNumber:9},this),e.jsxDEV("div",{children:[e.jsxDEV("div",{className:"flex items-center gap-2 mb-1.5",children:[e.jsxDEV("span",{className:"text-slate-400 text-xs",children:"话题"},void 0,!1,{fileName:"/workspaces/frontend/src/video/Studio.tsx",lineNumber:279,columnNumber:59},this),e.jsxDEV(G,{n:t.topics.length,max:t.limits.topics},void 0,!1,{fileName:"/workspaces/frontend/src/video/Studio.tsx",lineNumber:279,columnNumber:109},this),e.jsxDEV("span",{className:"text-[11px] text-slate-500",children:"个"},void 0,!1,{fileName:"/workspaces/frontend/src/video/Studio.tsx",lineNumber:279,columnNumber:160},this),e.jsxDEV("span",{className:"flex-1"},void 0,!1,{fileName:"/workspaces/frontend/src/video/Studio.tsx",lineNumber:279,columnNumber:213},this),e.jsxDEV(O,{text:se(t)},void 0,!1,{fileName:"/workspaces/frontend/src/video/Studio.tsx",lineNumber:279,columnNumber:240},this)]},void 0,!0,{fileName:"/workspaces/frontend/src/video/Studio.tsx",lineNumber:279,columnNumber:11},this),e.jsxDEV("div",{className:"flex flex-wrap gap-1.5",children:t.topics.map(s=>e.jsxDEV("span",{className:"text-xs px-2 py-0.5 rounded-full bg-cyan-400/10 text-cyan-200",children:["#",s]},s,!0,{fileName:"/workspaces/frontend/src/video/Studio.tsx",lineNumber:280,columnNumber:71},this))},void 0,!1,{fileName:"/workspaces/frontend/src/video/Studio.tsx",lineNumber:280,columnNumber:11},this)]},void 0,!0,{fileName:"/workspaces/frontend/src/video/Studio.tsx",lineNumber:278,columnNumber:9},this),e.jsxDEV("div",{children:[e.jsxDEV("div",{className:"flex items-center gap-2 mb-1.5",children:[e.jsxDEV("span",{className:"text-slate-400 text-xs",children:["正文",t.limits.bodyIncludesTopics&&t.limits.body?"(含话题)":""]},void 0,!0,{fileName:"/workspaces/frontend/src/video/Studio.tsx",lineNumber:284,columnNumber:13},this),e.jsxDEV(G,{n:fe(t),max:t.limits.body},void 0,!1,{fileName:"/workspaces/frontend/src/video/Studio.tsx",lineNumber:285,columnNumber:13},this),e.jsxDEV("span",{className:"flex-1"},void 0,!1,{fileName:"/workspaces/frontend/src/video/Studio.tsx",lineNumber:285,columnNumber:59},this),e.jsxDEV(O,{text:t.limits.bodyIncludesTopics?q(t):t.body},void 0,!1,{fileName:"/workspaces/frontend/src/video/Studio.tsx",lineNumber:286,columnNumber:13},this)]},void 0,!0,{fileName:"/workspaces/frontend/src/video/Studio.tsx",lineNumber:283,columnNumber:11},this),e.jsxDEV("pre",{className:"whitespace-pre-wrap font-sans text-slate-300 text-[13px] leading-relaxed max-h-64 overflow-auto bg-black/30 rounded-xl p-3",children:t.limits.bodyIncludesTopics?q(t):t.body},void 0,!1,{fileName:"/workspaces/frontend/src/video/Studio.tsx",lineNumber:288,columnNumber:11},this)]},void 0,!0,{fileName:"/workspaces/frontend/src/video/Studio.tsx",lineNumber:282,columnNumber:9},this)]},void 0,!0,{fileName:"/workspaces/frontend/src/video/Studio.tsx",lineNumber:273,columnNumber:7},this)]},void 0,!0,{fileName:"/workspaces/frontend/src/video/Studio.tsx",lineNumber:266,columnNumber:5},this)}function Re(){const t=n.useRef({}),[i,s]=n.useState(0);n.useEffect(()=>{let m=!0,d=0;const r=()=>{if(!m||d>=T.length)return;const N=T[d],f=t.current[N.key];if(f)try{re(N,f)}catch(b){console.error(b)}d++,s(d),setTimeout(r,30)};return setTimeout(r,50),()=>{m=!1}},[]);const l=async m=>{const d=T.find(r=>r.key===m);X(await be(d),`封面_${d.platform}_${d.label.split(" ")[0].replace(":","x")}_${d.w}x${d.h}.png`)},c=async()=>{for(const m of T)await l(m.key),await new Promise(d=>setTimeout(d,350))},a=[...new Set(T.map(m=>m.platform))];return e.jsxDEV("div",{className:"space-y-5",children:[e.jsxDEV("div",{className:"flex items-center gap-3",children:[e.jsxDEV("div",{className:"text-xs text-slate-400 flex-1",children:["由动画真实画面实时渲染,PNG 原尺寸下载。",ie.jsxDEV("div",{children:[e.jsxDEV("div",{className:"text-sm font-bold mb-2",children:m},void 0,!1,{fileName:"/workspaces/frontend/src/video/Studio.tsx",lineNumber:321,columnNumber:11},this),e.jsxDEV("div",{className:"grid grid-cols-2 gap-3 items-start",children:T.filter(d=>d.platform===m).map(d=>e.jsxDEV("div",{className:"rounded-xl overflow-hidden border border-white/10 bg-black/40",children:[e.jsxDEV("canvas",{ref:r=>{t.current[d.key]=r},className:"w-full block",style:{aspectRatio:`${d.w} / ${d.h}`}},void 0,!1,{fileName:"/workspaces/frontend/src/video/Studio.tsx",lineNumber:325,columnNumber:17},this),e.jsxDEV("div",{className:"flex items-center justify-between px-2.5 py-2 text-xs",children:[e.jsxDEV("span",{className:"text-slate-300",children:[d.label," ",e.jsxDEV("span",{className:"text-slate-500",children:[d.w,"×",d.h]},void 0,!0,{fileName:"/workspaces/frontend/src/video/Studio.tsx",lineNumber:327,columnNumber:62},this)]},void 0,!0,{fileName:"/workspaces/frontend/src/video/Studio.tsx",lineNumber:327,columnNumber:19},this),e.jsxDEV("button",{onClick:()=>l(d.key),className:"text-cyan-300 flex items-center gap-1",children:[e.jsxDEV(W,{className:"w-3.5 h-3.5"},void 0,!1,{fileName:"/workspaces/frontend/src/video/Studio.tsx",lineNumber:328,columnNumber:103},this),"PNG"]},void 0,!0,{fileName:"/workspaces/frontend/src/video/Studio.tsx",lineNumber:328,columnNumber:19},this)]},void 0,!0,{fileName:"/workspaces/frontend/src/video/Studio.tsx",lineNumber:326,columnNumber:17},this)]},d.key,!0,{fileName:"/workspaces/frontend/src/video/Studio.tsx",lineNumber:324,columnNumber:15},this))},void 0,!1,{fileName:"/workspaces/frontend/src/video/Studio.tsx",lineNumber:322,columnNumber:11},this)]},m,!0,{fileName:"/workspaces/frontend/src/video/Studio.tsx",lineNumber:320,columnNumber:9},this))]},void 0,!0,{fileName:"/workspaces/frontend/src/video/Studio.tsx",lineNumber:314,columnNumber:5},this)}function qe(){const[t,i]=n.useState("export"),s=[{k:"export",n:"导出视频",i:ye},{k:"copy",n:"平台文案",i:ke},{k:"cover",n:"封面",i:ge}];return e.jsxDEV("div",{className:"min-h-screen bg-[#04080f] text-slate-100",style:{backgroundImage:"radial-gradient(1200px 600px at 20% -10%, rgba(40,140,255,0.12), transparent), radial-gradient(800px 500px at 100% 100%, rgba(255,60,60,0.06), transparent)"},children:e.jsxDEV("div",{className:"mx-auto max-w-6xl lg:flex lg:gap-8 lg:p-6 lg:items-start",children:[e.jsxDEV("div",{className:"lg:sticky lg:top-6 sm:pt-3 lg:pt-0 lg:w-auto",children:e.jsxDEV(Te,{},void 0,!1,{fileName:"/workspaces/frontend/src/video/Studio.tsx",lineNumber:351,columnNumber:11},this)},void 0,!1,{fileName:"/workspaces/frontend/src/video/Studio.tsx",lineNumber:350,columnNumber:9},this),e.jsxDEV("div",{className:"flex-1 min-w-0 px-4 py-6 lg:px-0 lg:py-0",children:[e.jsxDEV("div",{className:"mb-5",children:[e.jsxDEV("div",{className:"text-[11px] tracking-[0.25em] text-cyan-300/80 font-bold",children:"ORIGINAL 3D MEDICAL ANIMATION"},void 0,!1,{fileName:"/workspaces/frontend/src/video/Studio.tsx",lineNumber:355,columnNumber:13},this),e.jsxDEV("h1",{className:"text-2xl lg:text-3xl font-black mt-1",children:"腱鞘炎 · 从疼痛到恢复"},void 0,!1,{fileName:"/workspaces/frontend/src/video/Studio.tsx",lineNumber:356,columnNumber:13},this),e.jsxDEV("p",{className:"text-sm text-slate-400 mt-1.5",children:["实时 3D 解剖动画 · 竖屏 9:16 · ",y.toFixed(0)," 秒 · 旁白 + 配乐 + 音效"]},void 0,!0,{fileName:"/workspaces/frontend/src/video/Studio.tsx",lineNumber:357,columnNumber:13},this),e.jsxDEV("div",{className:"flex flex-wrap gap-1.5 mt-3",children:["疼痛","定位","处理","松解","恢复"].map((l,c)=>e.jsxDEV("span",{className:`text-xs px-2.5 py-1 rounded-full ${c===0?"bg-red-500/20 text-red-200":c===4?"bg-emerald-500/20 text-emerald-200":"bg-white/5 text-slate-300"}`,children:l},l,!1,{fileName:"/workspaces/frontend/src/video/Studio.tsx",lineNumber:360,columnNumber:17},this))},void 0,!1,{fileName:"/workspaces/frontend/src/video/Studio.tsx",lineNumber:358,columnNumber:13},this)]},void 0,!0,{fileName:"/workspaces/frontend/src/video/Studio.tsx",lineNumber:354,columnNumber:11},this),e.jsxDEV("div",{className:"flex gap-1 p-1 rounded-xl bg-white/5 mb-5 sticky top-0 z-10 backdrop-blur",children:s.map(({k:l,n:c,i:a})=>e.jsxDEV("button",{onClick:()=>i(l),className:`flex-1 py-2 rounded-lg text-sm font-semibold flex items-center justify-center gap-1.5 transition ${t===l?"bg-white/10 text-white":"text-slate-400 hover:text-slate-200"}`,children:[e.jsxDEV(a,{className:"w-4 h-4"},void 0,!1,{fileName:"/workspaces/frontend/src/video/Studio.tsx",lineNumber:367,columnNumber:17},this),c]},l,!0,{fileName:"/workspaces/frontend/src/video/Studio.tsx",lineNumber:366,columnNumber:15},this))},void 0,!1,{fileName:"/workspaces/frontend/src/video/Studio.tsx",lineNumber:364,columnNumber:11},this),t==="export"&&e.jsxDEV($e,{},void 0,!1,{fileName:"/workspaces/frontend/src/video/Studio.tsx",lineNumber:371,columnNumber:32},this),t==="copy"&&e.jsxDEV("div",{className:"space-y-4",children:xe.map(l=>e.jsxDEV(Ae,{p:l},l.key,!1,{fileName:"/workspaces/frontend/src/video/Studio.tsx",lineNumber:372,columnNumber:72},this))},void 0,!1,{fileName:"/workspaces/frontend/src/video/Studio.tsx",lineNumber:372,columnNumber:30},this),t==="cover"&&e.jsxDEV(Re,{},void 0,!1,{fileName:"/workspaces/frontend/src/video/Studio.tsx",lineNumber:373,columnNumber:31},this),e.jsxDEV("div",{className:"text-[11px] text-slate-500 mt-8 leading-relaxed flex gap-2",children:[e.jsxDEV(je,{className:"w-3.5 h-3.5 shrink-0 mt-0.5"},void 0,!1,{fileName:"/workspaces/frontend/src/video/Studio.tsx",lineNumber:375,columnNumber:13},this),"所有模型、器械、动画、配乐与音效均为原创程序化生成;内容仅供健康科普,不替代医生面诊。"]},void 0,!0,{fileName:"/workspaces/frontend/src/video/Studio.tsx",lineNumber:374,columnNumber:11},this)]},void 0,!0,{fileName:"/workspaces/frontend/src/video/Studio.tsx",lineNumber:353,columnNumber:9},this)]},void 0,!0,{fileName:"/workspaces/frontend/src/video/Studio.tsx",lineNumber:349,columnNumber:7},this)},void 0,!1,{fileName:"/workspaces/frontend/src/video/Studio.tsx",lineNumber:348,columnNumber:5},this)}export{qe as default};