-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathindex.html
More file actions
4059 lines (3808 loc) · 296 KB
/
index.html
File metadata and controls
4059 lines (3808 loc) · 296 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>OpenCut</title>
<link rel="icon" type="image/png" href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAB6ElEQVR4nMWXUU4CMRCG/5nsBSQrmCgiGM/gITiGb8aoT8YoMb6qxMTEB/UcchsJECNqqGcYH7aF0i24xWXpy26myXzt/PO3u7R3MIKQAAQI6ycBYEmeU3EBWM+TQBhO3OTR8wQnns4feSZlyXCy83PBcIBF7PxcMNzkFxPnFcBNXIQALrLhfHFeJXxSgRXBQeK64H/wr8sahcCFYbsgh50jDG65IDv843pLufDPi+3O13mtIyKv32e1Tla4kIBDdw4Aw6uqGraqykA2bgZN2CMjXBjg4LJbw0C+z3eo0u433fhfcExckF3z1E4JKN/1RAgo3yeLGJ3WO/Pg0O/aBYENZ1fA03DrD72kEnPgjgvCut2Myu0g9nX76KSuAOyro4bylX16UYJoEatN79DR3Bo/h7sKANZe3mKxym7nj0JPOACotPuxD66O68peQOm5G7uau/mj4OPVaO+x2hj81I1d/X1wIQFttt6TqzGns91ntVlwEIjzvFgC4bYL8oXP09yVmxeBq9MGuXCZY7VZcOuLKHDncCHZGi4tt5i7IKzspceuLKq5DdcVKFZzN39UVLe78LEEq4DDHFw0+S+gIsuu85PlAkkWEQAPsdosOFgQOZME/ceyLM1tuL4NU2VPHTJ5aj4VZ+AX8o+DeqiKjVUAAAAASUVORK5CYII=">
<link rel="stylesheet" href="style.css">
<script>
(function(){try{var s=JSON.parse(localStorage.getItem('opencut_settings')||'{}');var t=s.theme||'auto';if(t==='light'){document.documentElement.classList.add('theme-light');}else if(t==='auto'&&window.matchMedia&&window.matchMedia('(prefers-color-scheme: light)').matches){document.documentElement.classList.add('theme-light');}}catch(e){}})();
</script>
</head>
<body>
<a class="skip-link" href="#mainContent">Skip to Main Content</a>
<div class="app">
<!-- ===== SIDEBAR ===== -->
<aside class="sidebar">
<div class="sidebar-brand">
<img class="logo-mark" width="18" height="18" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAA9ElEQVR4nK3UwUrDQBDG8f/M+gKBxkspePAkvXj14tmjIHr1IBT0Ij6G3kSkHnqQPoNeamNBT+JjTIekNNmkmsP+2GX5MbM7LPJcqLKVKFAiEPG5vt0T8vM1iWIoE9V/j6UpqNw4O2hIqD7L/wGhTqkIWRhKvEqRB56qiMgePkIhsn+YriVNDSSJUF0r2ppNswk0KZi5e5PvXcfpfYd/rJ42ex8RJXCJcqd+22ren5cAxdtm1N6/6oOoiOLVY0Qixvsg/5dcjvEupF3PbRp5JJHOdSMXJ7IasiWZxctOBUrngCzuJPGij/+TIYhclkfSBuCMOAFmNwJ0F6s0yQAAAABJRU5ErkJggg==" alt="OpenCut">
<div class="brand-copy">
<span class="logo-text" translate="no">OpenCut</span>
<span class="brand-meta">Editorial Suite</span>
</div>
</div>
<nav class="nav-tabs" id="navTabs" aria-label="Main navigation" role="tablist">
<button type="button" class="nav-tab active" id="navTabCut" data-nav="cut" title="Cut & Clean" role="tab" aria-label="Cut & Clean" aria-controls="panel-cut" aria-selected="true" aria-current="page">
<svg width="14" height="14" viewBox="0 0 16 16" fill="currentColor"><path d="M4 1.5a2.5 2.5 0 00-1.47 4.53L6.47 8 2.53 9.97A2.5 2.5 0 104 14.5a2.5 2.5 0 001.47-4.53L7.44 8.99 13.5 12V4L7.44 7.01 5.47 5.97A2.5 2.5 0 004 1.5zM2.5 4a1.5 1.5 0 113 0 1.5 1.5 0 01-3 0zm0 8a1.5 1.5 0 113 0 1.5 1.5 0 01-3 0z"/></svg>
<span data-i18n="tabs.cut">Cut</span>
</button>
<button type="button" class="nav-tab" id="navTabCaptions" data-nav="captions" title="Captions & Subtitles" role="tab" aria-label="Captions & Subtitles" aria-controls="panel-captions" aria-selected="false">
<svg width="14" height="14" viewBox="0 0 16 16" fill="currentColor"><path d="M0 2a2 2 0 012-2h12a2 2 0 012 2v8a2 2 0 01-2 2H6.5L2 14.5V12H2a2 2 0 01-2-2V2zm4 3a.5.5 0 000 1h4a.5.5 0 000-1H4zm0 2.5a.5.5 0 000 1h8a.5.5 0 000-1H4z"/></svg>
<span data-i18n="tabs.captions">Captions</span>
</button>
<button type="button" class="nav-tab" id="navTabAudio" data-nav="audio" title="Audio Suite" role="tab" aria-label="Audio Suite" aria-controls="panel-audio" aria-selected="false">
<svg width="14" height="14" viewBox="0 0 16 16" fill="currentColor"><path d="M6 1v14l-4-4H0V5h2l4-4zm7.07 1.93a.75.75 0 00-1.06 1.06 5.5 5.5 0 010 7.78.75.75 0 001.06 1.06 7 7 0 000-9.9zm-2.12 2.12a.75.75 0 00-1.06 1.06 2.5 2.5 0 010 3.54.75.75 0 001.06 1.06 4 4 0 000-5.66z"/></svg>
<span data-i18n="tabs.audio">Audio</span>
</button>
<button type="button" class="nav-tab" id="navTabVideo" data-nav="video" title="Video Tools" role="tab" aria-label="Video Tools" aria-controls="panel-video" aria-selected="false">
<svg width="14" height="14" viewBox="0 0 16 16" fill="currentColor"><path d="M0 3a2 2 0 012-2h8a2 2 0 012 2v4l4-2v6l-4-2v4a2 2 0 01-2 2H2a2 2 0 01-2-2V3z"/></svg>
<span data-i18n="tabs.video">Video</span>
</button>
<button type="button" class="nav-tab" id="navTabExport" data-nav="export" title="Export & Publish" role="tab" aria-label="Export & Publish" aria-controls="panel-export" aria-selected="false">
<svg width="14" height="14" viewBox="0 0 16 16" fill="currentColor"><path d="M8.5 1a.5.5 0 00-1 0v5.793L5.854 5.146a.5.5 0 10-.708.708l2.5 2.5a.5.5 0 00.708 0l2.5-2.5a.5.5 0 00-.708-.708L8.5 6.793V1zM2 10a2 2 0 00-2 2v1a2 2 0 002 2h12a2 2 0 002-2v-1a2 2 0 00-2-2h-3.5a.5.5 0 010-1H14a3 3 0 013 3v1a3 3 0 01-3 3H2a3 3 0 01-3-3v-1a3 3 0 013-3h3.5a.5.5 0 010 1H2z"/></svg>
<span data-i18n="tabs.export">Export</span>
</button>
<button type="button" class="nav-tab" id="navTabTimeline" data-nav="timeline" title="Timeline Tools" role="tab" aria-label="Timeline Tools" aria-controls="panel-timeline" aria-selected="false">
<svg width="14" height="14" viewBox="0 0 16 16" fill="currentColor"><path d="M0 3.5A.5.5 0 01.5 3h15a.5.5 0 010 1H.5A.5.5 0 010 3.5zm0 4A.5.5 0 01.5 7h15a.5.5 0 010 1H.5A.5.5 0 010 7.5zm0 4A.5.5 0 01.5 11h15a.5.5 0 010 1H.5a.5.5 0 01-.5-.5z"/></svg>
<span data-i18n="tabs.timeline">Timeline</span>
</button>
<button type="button" class="nav-tab" id="navTabSearch" data-nav="nlp" title="Search & AI Commands" role="tab" aria-label="Search and AI Commands" aria-controls="panel-nlp" aria-selected="false">
<svg width="14" height="14" viewBox="0 0 16 16" fill="currentColor"><path d="M11.742 10.344a6.5 6.5 0 10-1.397 1.398h-.001c.03.04.062.078.098.115l3.85 3.85a1 1 0 001.415-1.414l-3.85-3.85a1.007 1.007 0 00-.115-.099zM12 6.5a5.5 5.5 0 11-11 0 5.5 5.5 0 0111 0z"/></svg>
<span data-i18n="tabs.search">Search</span>
</button>
<button type="button" class="nav-tab" id="navTabSettings" data-nav="settings" title="Settings" role="tab" aria-label="Settings" aria-controls="panel-settings" aria-selected="false">
<svg width="14" height="14" viewBox="0 0 16 16" fill="currentColor"><path d="M7.068.727c.243-.97 1.62-.97 1.864 0l.071.286a.96.96 0 001.622.434l.205-.211c.695-.719 1.888-.03 1.613.931l-.084.303a.96.96 0 001.187 1.187l.303-.084c.961-.275 1.65.918.931 1.613l-.211.205a.96.96 0 00.434 1.622l.286.071c.97.243.97 1.62 0 1.864l-.286.071a.96.96 0 00-.434 1.622l.211.205c.719.695.03 1.888-.931 1.613l-.303-.084a.96.96 0 00-1.187 1.187l.084.303c.275.961-.918 1.65-1.613.931l-.205-.211a.96.96 0 00-1.622.434l-.071.286c-.243.97-1.62.97-1.864 0l-.071-.286a.96.96 0 00-1.622-.434l-.205.211c-.695.719-1.888.03-1.613-.931l.084-.303a.96.96 0 00-1.187-1.187l-.303.084c-.961.275-1.65-.918-.931-1.613l.211-.205a.96.96 0 00-.434-1.622l-.286-.071c-.97-.243-.97-1.62 0-1.864l.286-.071A.96.96 0 001.39 4.22l-.211-.205c-.719-.695-.03-1.888.931-1.613l.303.084a.96.96 0 001.187-1.187l-.084-.303C3.241.035 4.434-.654 5.13.065l.205.211A.96.96 0 006.997.71l.071-.286zM8 11a3 3 0 100-6 3 3 0 000 6z"/></svg>
<span data-i18n="tabs.settings">Settings</span>
</button>
</nav>
<div class="sidebar-footer">
<span class="conn-dot" id="connDot" role="status" aria-label="Server disconnected"></span>
</div>
</aside>
<!-- ===== CONTENT AREA ===== -->
<div class="content-area">
<div class="content-header">
<div class="content-header-copy">
<div class="content-kicker-row">
<span class="content-kicker" translate="no">OpenCut Studio</span>
<span class="workspace-chip" id="workspaceClipStatus" aria-live="polite" title="Choose a clip or drop media to start">No media selected</span>
</div>
<div class="content-title-stack">
<h1 class="content-title" id="contentTitle">Cut & Clean</h1>
<p class="content-subtitle" id="contentSubtitle">Focused cleanup, captions, finishing, and delivery tools organized around the active shot.</p>
</div>
</div>
<div class="content-actions">
<button type="button" class="header-btn utility-icon-btn is-refresh" id="refreshAllBtn" title="Refresh connection and capabilities" aria-label="Refresh connection and capabilities">
<span class="btn-icon" aria-hidden="true">
<svg viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M16.75 8.25A6.75 6.75 0 0 0 5.27 4.11"/><path d="M4 1.75v3.5h3.5"/><path d="M3.25 11.75a6.75 6.75 0 0 0 11.48 4.14"/><path d="M16 18.25v-3.5h-3.5"/></svg>
</span>
</button>
<div class="conn-status" id="connStatus" data-state="offline" title="Backend status" role="status" aria-live="polite">
<span class="conn-label" id="connLabel" data-i18n="conn.offline">Offline</span>
</div>
</div>
</div>
<!-- Processing Banner (always visible when job active, no scrolling needed) -->
<div class="processing-banner hidden" id="processingBanner" role="status" aria-live="polite">
<div class="processing-inner">
<div class="processing-spinner"></div>
<span class="processing-msg" id="processingMsg" data-i18n="common.processing">Processing…</span>
</div>
<div class="processing-right">
<span class="processing-elapsed" id="processingElapsed">0s</span>
<span class="processing-estimate" id="processingEstimate"></span>
<button type="button" class="processing-cancel" id="processingCancel" title="Stop run" aria-label="Stop active run">Stop run</button>
</div>
<div class="processing-track"><div class="processing-fill" id="processingFill" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" aria-label="Processing progress"></div></div>
</div>
<!-- Alert Banner -->
<div class="alert-banner hidden" id="alertBanner" role="alert" aria-live="assertive">
<div class="alert-inner">
<span class="alert-icon" id="alertIcon" aria-hidden="true">
<svg width="16" height="16" viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><circle cx="10" cy="10" r="7.25"/><path d="M10 6.4v4.45"/><circle cx="10" cy="13.85" r="0.9" fill="currentColor" stroke="none"/></svg>
</span>
<div class="alert-copy">
<span class="alert-eyebrow" id="alertEyebrow">Status update</span>
<span class="alert-text" id="alertText"></span>
</div>
</div>
<button type="button" class="alert-dismiss utility-icon-btn banner-dismiss-btn" id="alertDismiss" title="Dismiss alert" aria-label="Dismiss alert">
<span class="btn-icon" aria-hidden="true">
<svg viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round"><path d="M5 5l10 10"/><path d="M15 5 5 15"/></svg>
</span>
</button>
</div>
<!-- Session Context — "Where you left off" -->
<section class="session-context hidden" id="sessionContext" role="region" aria-label="Resume from your last session">
<header class="session-context-header">
<div class="session-context-title-group">
<span class="session-context-eyebrow">Welcome back</span>
<h3 class="session-context-title" id="sessionContextTitle">Here's where you left off</h3>
</div>
<button type="button" class="utility-icon-btn banner-dismiss-btn" id="sessionContextDismiss" title="Dismiss" aria-label="Dismiss welcome back card">
<span class="btn-icon" aria-hidden="true">
<svg viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round"><path d="M5 5l10 10"/><path d="M15 5 5 15"/></svg>
</span>
</button>
</header>
<div class="session-context-body" id="sessionContextBody" aria-live="polite">
<!-- populated by renderSessionContext() -->
</div>
</section>
<main class="main" id="mainContent" tabindex="-1" role="main">
<div class="server-status-banner hidden" id="serverStatusBanner">
<span id="serverStatusMsg">Server disconnected. Reconnecting…</span>
</div>
<section class="workspace-stage" id="workspaceStage" aria-labelledby="workspaceStageTitle">
<div class="workspace-stage-primary">
<div class="workspace-stage-kicker" id="workspaceStageKicker">Studio Workspace</div>
<h2 class="workspace-stage-title" id="workspaceStageTitle">Select media to start the cut pass.</h2>
<p class="workspace-stage-copy" id="workspaceStageCopy">Choose a source, then remove dead air, clean fillers, and review pacing from the same workspace.</p>
<div class="workspace-stage-session" role="list" aria-label="Current workspace session">
<article class="workspace-stage-session-item" role="listitem">
<span class="workspace-stage-session-label">Source</span>
<strong class="workspace-stage-session-value" id="workspaceStageSource">Awaiting media</strong>
</article>
<article class="workspace-stage-session-item" role="listitem">
<span class="workspace-stage-session-label">Suite</span>
<strong class="workspace-stage-session-value" id="workspaceStageSuite">Cut & Clean</strong>
</article>
<article class="workspace-stage-session-item" role="listitem">
<span class="workspace-stage-session-label">Status</span>
<strong class="workspace-stage-session-value" id="workspaceStageStatus">Backend offline</strong>
</article>
</div>
<div class="workspace-stage-actions">
<button type="button" class="stage-action stage-action-primary" id="stageChooseMediaBtn">
<span class="stage-action-icon" aria-hidden="true">
<svg viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M3 6.25A2.25 2.25 0 0 1 5.25 4h3.32l1.43 1.5h4.75A2.25 2.25 0 0 1 17 7.75v6A2.25 2.25 0 0 1 14.75 16H5.25A2.25 2.25 0 0 1 3 13.75z"/><path d="M6.5 10h7"/></svg>
</span>
<span class="stage-action-label">Choose Project Media</span>
</button>
<button type="button" class="stage-action" id="stageUseTimelineBtn">
<span class="stage-action-icon" aria-hidden="true">
<svg viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><rect x="3.5" y="5.5" width="13" height="9" rx="2"/><path d="M8 5.5v9"/><path d="M11 10h3.5"/></svg>
</span>
<span class="stage-action-label">Use Timeline Selection</span>
</button>
<button type="button" class="stage-action" id="stageBrowseMediaBtn">
<span class="stage-action-icon" aria-hidden="true">
<svg viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M4.25 6.25A2.25 2.25 0 0 1 6.5 4h2.75l1.5 1.5h2.75a2.25 2.25 0 0 1 2.25 2.25v5.75A2.25 2.25 0 0 1 14.5 15.75h-8A2.25 2.25 0 0 1 4.25 13.5z"/><path d="m10 8.5 2 2-2 2"/><path d="M7 10.5h5"/></svg>
</span>
<span class="stage-action-label">Browse File</span>
</button>
<button type="button" class="stage-action" id="stageCommandPaletteBtn">
<span class="stage-action-icon" aria-hidden="true">
<svg viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M6 6.5h8"/><path d="M6 10h8"/><path d="M6 13.5h5"/><rect x="3.5" y="4" width="13" height="12" rx="2.5"/></svg>
</span>
<span class="stage-action-label">Open Command Palette</span>
</button>
</div>
</div>
<div class="workspace-stage-grid" role="list" aria-label="How OpenCut fits the workflow">
<article class="workspace-stage-card" role="listitem">
<span class="workspace-stage-card-icon" aria-hidden="true">
<svg viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round"><path d="M3 6.25A2.25 2.25 0 0 1 5.25 4h3.32l1.43 1.5h4.75A2.25 2.25 0 0 1 17 7.75v6A2.25 2.25 0 0 1 14.75 16H5.25A2.25 2.25 0 0 1 3 13.75z"/></svg>
</span>
<span class="workspace-stage-card-label">Intake</span>
<h3>Choose the Source</h3>
<p>Start from project media, the active timeline, or a direct file drop without leaving Premiere.</p>
</article>
<article class="workspace-stage-card" role="listitem">
<span class="workspace-stage-card-icon" aria-hidden="true">
<svg viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round"><path d="M4 6.5h12"/><path d="M4 10h12"/><path d="M4 13.5h8"/><path d="M14 13.5 16 15.5 18 11.5"/></svg>
</span>
<span class="workspace-stage-card-label">Process</span>
<h3>Run the Right Toolset</h3>
<p>Move through cut, captions, audio, video, export, and search from one consistent control surface.</p>
</article>
<article class="workspace-stage-card" role="listitem">
<span class="workspace-stage-card-icon" aria-hidden="true">
<svg viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round"><path d="m6 10 3 3 5-6"/><path d="M4.5 4.5h11v11h-11z"/></svg>
</span>
<span class="workspace-stage-card-label">Return</span>
<h3>Return to the Edit</h3>
<p>Review the result, confirm it, and send it back into the active Premiere project with less friction.</p>
</article>
</div>
</section>
<!-- MEDIA SELECTION (persistent across all tabs) -->
<section class="card" id="clipSection">
<div class="card-header card-header-media">
<div class="card-heading">
<div class="card-title">
<svg width="14" height="14" viewBox="0 0 16 16" fill="currentColor" opacity="0.5"><path d="M2 3a1 1 0 011-1h4.586a1 1 0 01.707.293l.707.707H13a1 1 0 011 1v8a1 1 0 01-1 1H3a1 1 0 01-1-1V3z"/></svg>
<span data-i18n="media.title">Media</span>
</div>
<p class="card-subtitle">Pull the current shot into the workspace from project bins, the active timeline, or a local file.</p>
</div>
<button type="button" class="link-btn utility-btn is-refresh" id="refreshClipsBtn" title="Rescan project media">
<span class="btn-icon" aria-hidden="true">
<svg viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M16.75 8.25A6.75 6.75 0 0 0 5.27 4.11"/><path d="M4 1.75v3.5h3.5"/><path d="M3.25 11.75a6.75 6.75 0 0 0 11.48 4.14"/><path d="M16 18.25v-3.5h-3.5"/></svg>
</span>
<span class="btn-label">Rescan</span>
</button>
</div>
<div class="media-intake-shell">
<div class="media-intake-main">
<select class="clip-select" id="clipSelect" aria-label="Select project clip">
<option value="" disabled selected>Loading project media…</option>
</select>
<div class="recent-clips-row">
<button type="button" class="btn-sm btn-ghost utility-btn" id="recentClipsBtn" title="Recent clips" aria-expanded="false" aria-controls="recentClipsDropdown">
<span class="btn-icon" aria-hidden="true">
<svg viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M3.75 10a6.25 6.25 0 1 0 1.83-4.42"/><path d="M3.75 4.5V8h3.5"/><path d="M10 6.5v4l2.5 1.5"/></svg>
</span>
<span class="btn-label">Recent</span>
</button>
<div class="recent-clips-dropdown hidden" id="recentClipsDropdown" aria-label="Recent clips"></div>
</div>
<div class="context-guidance hidden" id="contextGuidanceBanner">
<span class="context-guidance-text" id="contextGuidanceText"></span>
<button type="button" class="context-guidance-dismiss utility-icon-btn banner-dismiss-btn" id="contextGuidanceDismiss" title="Dismiss guidance" aria-label="Dismiss guidance">
<span class="btn-icon" aria-hidden="true">
<svg viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round"><path d="M5 5l10 10"/><path d="M15 5 5 15"/></svg>
</span>
</button>
</div>
<div class="drop-zone" id="dropZone">
<div class="drop-zone-icon">
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5"><path d="M21 15v4a2 2 0 01-2 2H5a2 2 0 01-2-2v-4"/><polyline points="17 8 12 3 7 8"/><line x1="12" y1="3" x2="12" y2="15"/></svg>
</div>
<div class="drop-zone-text" data-i18n="media.drop_zone">Drop media file here</div>
</div>
<div class="btn-row media-action-row">
<button type="button" class="btn-sm btn-ghost utility-btn media-inline-btn" id="useSelectionBtn" data-i18n="media.use_selection" title="Use the active Premiere timeline selection" aria-label="Use timeline selection">
<span class="btn-icon" aria-hidden="true">
<svg viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><rect x="3.5" y="5.25" width="13" height="9.5" rx="2"/><path d="M8 5.25v9.5"/><path d="M10.75 10h4"/></svg>
</span>
<span class="btn-label">Use Timeline Selection</span>
</button>
<button type="button" class="btn-sm btn-ghost utility-btn media-inline-btn is-folder" id="browseFileBtn" data-i18n="media.browse" title="Browse for a local media file" aria-label="Browse for media file">
<span class="btn-icon" aria-hidden="true">
<svg viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M2.75 6.25a2 2 0 0 1 2-2H8l1.5 1.5h5.75a2 2 0 0 1 2 2v5.5a2 2 0 0 1-2 2H4.75a2 2 0 0 1-2-2z"/><path d="M6.5 10h7"/></svg>
</span>
<span class="btn-label">Browse File</span>
</button>
</div>
</div>
<aside class="media-sidecar" aria-live="polite">
<div class="media-sidecar-empty">
<div class="media-sidecar-kicker">Current Source</div>
<h3 class="media-sidecar-title">No media loaded yet.</h3>
<p class="media-sidecar-copy">Choose a project clip, pull the active timeline selection, or browse a local file to unlock the full OpenCut workflow.</p>
<div class="media-sidecar-pills" aria-hidden="true">
<span class="media-sidecar-pill">Project media</span>
<span class="media-sidecar-pill">Timeline</span>
<span class="media-sidecar-pill">Local file</span>
</div>
</div>
<div class="clip-preview-row" id="clipPreviewRow">
<div class="clip-thumb" id="clipThumb"></div>
<div class="clip-meta" id="clipMeta">
<span id="clipMetaRes"></span>
<span id="clipMetaDur"></span>
<span id="clipMetaSize"></span>
</div>
</div>
<div class="file-info hidden" id="fileInfoBox">
<div class="file-name" id="fileNameDisplay"></div>
<div class="file-meta" id="fileMetaDisplay"></div>
</div>
</aside>
</div>
</section>
<!-- Favorites Quick Access Bar -->
<div class="favorites-bar hidden" id="favoritesBar">
<div class="favorites-label">
<svg width="10" height="10" viewBox="0 0 16 16" fill="currentColor"><path d="M8 .25a.75.75 0 01.673.418l1.882 3.815 4.21.612a.75.75 0 01.416 1.279l-3.046 2.97.719 4.192a.75.75 0 01-1.088.791L8 12.347l-3.766 1.98a.75.75 0 01-1.088-.79l.72-4.194L.818 6.374a.75.75 0 01.416-1.28l4.21-.611L7.327.668A.75.75 0 018 .25z"/></svg>
<span data-i18n="favorites.title">Favorites</span>
</div>
<div class="favorites-items" id="favoritesItems" aria-label="Favorite tools"></div>
</div>
<!-- ======== TAB: CUT ======== -->
<div class="nav-panel active" id="panel-cut" role="tabpanel" aria-label="Cut & Clean">
<div class="quick-actions" id="quickActionsCut">
<button type="button" class="quick-action-btn" id="quickCleanInterview" disabled title="Remove silence + normalize audio" data-i18n="cut.clean_up">
<span class="quick-action-head">
<span class="quick-action-icon" aria-hidden="true">
<svg viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round"><path d="M4.5 10.25h3l1.7-4.25 2.1 8.5 1.45-4.25h2.75"/></svg>
</span>
<span class="quick-action-copy">
<span class="btn-label">Clean Up</span>
<span class="quick-action-meta">Silence trim plus balanced loudness</span>
</span>
</span>
<span class="quick-action-tag" aria-hidden="true">Preset</span>
</button>
<button type="button" class="quick-action-btn" id="quickYouTube" disabled title="Silence removal + normalize + loudness match" data-i18n="cut.youtube_ready">
<span class="quick-action-head">
<span class="quick-action-icon" aria-hidden="true">
<svg viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round"><rect x="3.5" y="4.5" width="13" height="11" rx="2.5"/><path d="m8.5 8 4 2-4 2z"/></svg>
</span>
<span class="quick-action-copy">
<span class="btn-label">YouTube Ready</span>
<span class="quick-action-meta">Fast cleanup for creator delivery</span>
</span>
</span>
<span class="quick-action-tag" aria-hidden="true">Preset</span>
</button>
<button type="button" class="quick-action-btn" id="quickPodcast" disabled title="Denoise + normalize + loudness match" data-i18n="cut.podcast_polish">
<span class="quick-action-head">
<span class="quick-action-icon" aria-hidden="true">
<svg viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round"><rect x="7.25" y="3.5" width="5.5" height="8.5" rx="2.75"/><path d="M5.25 9.5a4.75 4.75 0 0 0 9.5 0"/><path d="M10 14.25v2.25"/><path d="M7.75 16.5h4.5"/></svg>
</span>
<span class="quick-action-copy">
<span class="btn-label">Podcast Polish</span>
<span class="quick-action-meta">Dialogue-first cleanup for spoken edits</span>
</span>
</span>
<span class="quick-action-tag" aria-hidden="true">Preset</span>
</button>
</div>
<!-- Interview Polish one-click pipeline (v1.9.29) -->
<section class="card interview-polish-card" id="interviewPolishCard" aria-labelledby="interviewPolishTitle">
<div class="card-header">
<div class="card-title-group">
<div class="card-title" id="interviewPolishTitle">Interview Polish</div>
<div class="card-subtitle">One click: silence trim → repeated-take detection → filler cut → captions → chapters → Premiere XML</div>
</div>
</div>
<div class="interview-polish-options">
<label class="checkbox-row">
<input type="checkbox" id="polishDetectRepeats" checked>
<span>Detect & remove repeated takes</span>
</label>
<label class="checkbox-row">
<input type="checkbox" id="polishRemoveFillers" checked>
<span>Cut filler words ("um", "uh", "like")</span>
</label>
<label class="checkbox-row">
<input type="checkbox" id="polishGenerateChapters" checked>
<span>Generate YouTube chapters</span>
</label>
</div>
<div class="interview-polish-run">
<button type="button" class="btn btn-primary btn-lg" id="polishInterviewBtn" disabled>
Polish this interview
</button>
<button type="button" class="btn btn-secondary btn-lg hidden" id="polishBatchBtn" title="Polish every file in the batch picker, one after another">
Polish batch (<span id="polishBatchCount">0</span>)
</button>
<span class="interview-polish-hint" id="interviewPolishHint">Choose a source clip to unlock the full polish pass.</span>
</div>
<!-- v1.10.5 (Q): clear the cached transcript if the user wants Whisper to re-run -->
<div class="interview-polish-footer">
<button type="button" class="btn btn-ghost btn-sm" id="polishClearCacheBtn" title="Force a fresh Whisper transcription on the next run">Re-transcribe next run</button>
</div>
<ul class="polish-steps hidden" id="polishSteps" aria-live="polite" aria-label="Pipeline progress">
<!-- populated by renderPolishSteps() -->
</ul>
<div class="polish-result hidden" id="polishResult"></div>
</section>
<!-- Sequence Assistant (v1.10.0, feature E) -->
<section class="card assistant-card" id="assistantCard" aria-labelledby="assistantCardTitle">
<div class="card-header">
<div class="card-title-group">
<div class="card-title" id="assistantCardTitle">Sequence Assistant</div>
<div class="card-subtitle">Scan the active sequence and surface the highest-leverage next move before you commit changes.</div>
</div>
<button type="button" class="icon-btn" id="assistantRefreshBtn" title="Re-scan the current sequence" aria-label="Refresh assistant suggestions">
<svg width="14" height="14" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true"><path d="M2.5 8a5.5 5.5 0 019.3-4h-2a.75.75 0 000 1.5h3.5a.75.75 0 00.75-.75V1.5a.75.75 0 00-1.5 0v1.7A7 7 0 101 8a.75.75 0 001.5 0z"/></svg>
</button>
</div>
<div class="assistant-body" id="assistantBody" aria-live="polite">
<div class="assistant-empty">Open a Premiere sequence, then refresh to surface cleanup, caption, and write-back suggestions.</div>
</div>
</section>
<div class="sub-tabs" role="tablist" id="cutSubTabs">
<button type="button" class="sub-tab active" data-sub="silence" data-i18n="subtabs.silence">Silence</button>
<button type="button" class="sub-tab" data-sub="fillers" data-i18n="subtabs.fillers">Fillers</button>
<button type="button" class="sub-tab" data-sub="full" data-i18n="subtabs.full_edit">Full Edit</button>
<button type="button" class="sub-tab" data-sub="trim" data-i18n="subtabs.trim">Trim</button>
<button type="button" class="sub-tab" data-sub="auto-edit" data-i18n="subtabs.auto_edit">Auto-Edit</button>
<button type="button" class="sub-tab" data-sub="highlights" data-i18n="subtabs.highlights">Highlights</button>
</div>
<div class="sub-panel active" id="sub-silence">
<section class="card">
<p class="card-desc" data-i18n="cut.silence_desc">Detect and remove silent pauses from your clip. Choose a preset or fine-tune the detection.</p>
<div class="form-group">
<label for="silencePreset" data-i18n="forms.preset">Preset</label>
<select id="silencePreset">
<option value="youtube" selected>YouTube (-28dB, 0.4s)</option>
<option value="default">Default (-30dB, 0.5s)</option>
<option value="aggressive">Aggressive (-25dB, 0.3s)</option>
<option value="conservative">Conservative (-40dB, 1.0s)</option>
<option value="podcast">Podcast (-35dB, 0.75s)</option>
<option value="">Custom…</option>
</select>
</div>
<div class="custom-settings hidden" id="customSilenceSettings">
<div class="form-group">
<label for="threshold" data-i18n="silence.threshold">Noise Threshold</label>
<div class="slider-row">
<input type="range" id="threshold" min="-60" max="-10" value="-30" step="1" title="Audio level below which is considered silence (lower = more sensitive)">
<span class="slider-val" id="thresholdVal">-30 dB</span>
</div>
</div>
<div class="form-group">
<label for="minDuration" data-i18n="silence.min_duration">Min Silence Length</label>
<div class="slider-row">
<input type="range" id="minDuration" min="0.1" max="3.0" value="0.5" step="0.1" title="Minimum length of silence to remove (shorter = more aggressive)">
<span class="slider-val" id="minDurationVal">0.5s</span>
</div>
</div>
<div class="form-group">
<label for="padBefore" data-i18n="silence.padding">Keep Padding (before / after)</label>
<div class="input-pair">
<input type="number" id="padBefore" value="0.1" min="0" max="2" step="0.05" aria-label="Padding before silence">
<span>/</span>
<input type="number" id="padAfter" value="0.1" min="0" max="2" step="0.05" aria-label="Padding after silence">
<span class="unit">sec</span>
</div>
</div>
</div>
<div class="waveform-container hidden" id="waveformContainer">
<canvas id="waveformCanvas" class="waveform-canvas" width="500" height="100"></canvas>
<div class="waveform-threshold" id="waveformThreshold"></div>
<div class="waveform-label">Waveform — drag threshold line to adjust</div>
</div>
<div class="form-group">
<label for="silenceDetectMethod" data-i18n="cut.detection_method">Detection Method</label>
<select id="silenceDetectMethod" aria-label="Silence detection method">
<option value="auto" selected>Auto (AI if available, fallback to threshold)</option>
<option value="vad">Silero VAD (AI neural detection)</option>
<option value="energy">Energy Threshold (classic FFmpeg)</option>
</select>
<div class="hint hidden" id="vadHint"><span class="hint-copy">Silero VAD requires PyTorch. Switch to Energy Threshold for now, or install PyTorch manually to unlock neural detection.</span></div>
</div>
<div class="form-group">
<label for="silenceMode" data-i18n="silence.mode">Silence Mode</label>
<select id="silenceMode">
<option value="remove" selected>Remove Silent Segments</option>
<option value="speedup">Speed Up Silent Segments</option>
</select>
</div>
<div class="form-group hidden" id="silenceSpeedGroup">
<label for="silenceSpeedFactor" data-i18n="silence.speed_factor">Speed Factor</label>
<div class="slider-row">
<input type="range" id="silenceSpeedFactor" min="1.5" max="8" value="4" step="0.5" title="How fast to play silent segments (higher = shorter pauses)">
<span class="slider-val" id="silenceSpeedVal">4x</span>
</div>
</div>
<button type="button" class="btn-outline btn-sm mb-sm" id="loadWaveformBtn" disabled data-i18n="silence.preview_waveform">Preview Waveform</button>
<!-- v1.10.2 (M): hear what gets cut with current threshold -->
<div class="audio-preview-row">
<button type="button" class="btn-secondary btn-sm" id="silencePreviewBtn" disabled title="Hear a 10s preview with silent regions removed">Preview 10s</button>
<audio id="silencePreviewPlayer" class="audio-preview-inline hidden" controls preload="none"></audio>
</div>
<button type="button" class="btn-primary" id="runSilenceBtn" disabled title="Ctrl+Shift+S" data-i18n="silence.remove">Remove Silences</button>
</section>
</div>
<div class="sub-panel" id="sub-fillers">
<section class="card">
<p class="card-desc" data-i18n="cut.filler_desc">Find and remove filler words like "um", "uh", "like", and "you know" using AI speech recognition.</p>
<div class="form-group">
<label for="fillerBackend" data-i18n="forms.backend">Detection Backend</label>
<select id="fillerBackend" aria-label="Filler detection backend">
<option value="whisper" selected>Whisper (standard — fast)</option>
<option value="crisper">CrisperWhisper (verbatim — most accurate)</option>
</select>
</div>
<div class="form-group">
<label for="fillerModel" data-i18n="forms.model">Whisper Model</label>
<select id="fillerModel">
<option value="tiny">Tiny (fastest)</option>
<option value="base" selected>Base (balanced)</option>
<option value="small">Small (accurate)</option>
<option value="medium">Medium (best)</option>
</select>
</div>
<div class="form-group">
<label id="fillerWordsLabel" data-i18n="cut.filler_words">Remove These Fillers</label>
<div class="filler-checks" id="fillerChecks" role="group" aria-labelledby="fillerWordsLabel">
<label class="checkbox-row cb-sm"><input type="checkbox" data-filler="um" checked> um / umm</label>
<label class="checkbox-row cb-sm"><input type="checkbox" data-filler="uh" checked> uh / uhh</label>
<label class="checkbox-row cb-sm"><input type="checkbox" data-filler="er" checked> er / err</label>
<label class="checkbox-row cb-sm"><input type="checkbox" data-filler="ah" checked> ah</label>
<label class="checkbox-row cb-sm"><input type="checkbox" data-filler="hm" checked> hmm</label>
<label class="checkbox-row cb-sm"><input type="checkbox" data-filler="like" checked> like</label>
<label class="checkbox-row cb-sm"><input type="checkbox" data-filler="so"> so</label>
<label class="checkbox-row cb-sm"><input type="checkbox" data-filler="you know" checked> you know</label>
<label class="checkbox-row cb-sm"><input type="checkbox" data-filler="i mean" checked> i mean</label>
<label class="checkbox-row cb-sm"><input type="checkbox" data-filler="basically" checked> basically</label>
<label class="checkbox-row cb-sm"><input type="checkbox" data-filler="actually"> actually</label>
<label class="checkbox-row cb-sm"><input type="checkbox" data-filler="right"> right</label>
</div>
</div>
<div class="form-group">
<label for="fillerCustom">Custom Fillers <span class="hint-inline">(comma-separated)</span></label>
<input type="text" id="fillerCustom" placeholder="e.g. whatever, totally, honestly" class="text-input">
</div>
<label class="checkbox-row"><input type="checkbox" id="fillerSilence" checked> <span data-i18n="cut.filler_also_silence">Also remove silences</span></label>
<button type="button" class="btn-primary" id="runFillersBtn" disabled data-i18n="cut.clean_fillers">Clean Filler Words</button>
<div class="hint hidden" id="fillersHint">
<span class="hint-copy">No filler detection backend is installed yet. Add Whisper from Settings or install CrisperWhisper here for verbatim filler detection.</span>
<button type="button" class="btn-text btn-xs hidden" id="installCrisperWhisperBtn">Install CrisperWhisper</button>
</div>
</section>
</div>
<div class="sub-panel" id="sub-full">
<section class="card">
<p class="card-desc" data-i18n="cut.full_desc">One-click cleanup: remove silences, strip fillers, add captions, and auto-zoom — all at once.</p>
<div class="form-group">
<label for="fullPreset" data-i18n="forms.preset">Preset</label>
<select id="fullPreset">
<option value="youtube" selected>YouTube</option>
<option value="default">Default</option>
<option value="aggressive">Aggressive</option>
<option value="conservative">Conservative</option>
<option value="podcast">Podcast</option>
</select>
</div>
<label class="checkbox-row"><input type="checkbox" id="fullZoom" checked> <span data-i18n="cut.auto_zoom">Auto Zoom</span></label>
<label class="checkbox-row"><input type="checkbox" id="fullCaptions" checked> <span data-i18n="cut.captions_srt">Captions (SRT)</span></label>
<label class="checkbox-row"><input type="checkbox" id="fullFillers"> <span data-i18n="cut.remove_fillers">Remove Filler Words</span></label>
<button type="button" class="btn-primary" id="runFullBtn" disabled data-i18n="cut.full_run">Run Full Pipeline</button>
</section>
</div>
<!-- TRIM -->
<div class="sub-panel" id="sub-trim">
<section class="card">
<div class="card-header">
<div class="card-title">
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M6 9l6 6 6-6"/></svg>
<span data-i18n="cut.trim_clip">Trim Clip</span>
</div>
</div>
<p class="card-desc" data-i18n="cut.trim_desc">Set in/out points to extract a portion of your clip. Use timecodes or seconds.</p>
<div class="form-group">
<label for="trimStart">Start Time</label>
<input type="text" id="trimStart" placeholder="00:00:00" value="00:00:00">
<span class="hint-inline">HH:MM:SS or seconds (e.g. 5.5)</span>
</div>
<div class="form-group">
<label for="trimEnd">End Time</label>
<input type="text" id="trimEnd" placeholder="00:00:30" value="00:00:30">
<span class="hint-inline">HH:MM:SS or seconds</span>
</div>
<div class="form-group">
<label for="trimMode">Mode</label>
<select id="trimMode">
<option value="copy">Fast (instant, may be off by a few frames)</option>
<option value="reencode">Precise (frame-accurate, slower)</option>
</select>
</div>
<div class="form-group" id="trimQualityGroup">
<label for="trimQuality">Quality</label>
<select id="trimQuality">
<option value="high" selected>High (CRF 18)</option>
<option value="medium">Medium (CRF 23)</option>
<option value="low">Low (CRF 28)</option>
</select>
</div>
<button type="button" class="btn-primary" id="runTrimBtn" disabled data-i18n="cut.trim_run">Trim Clip</button>
</section>
</div>
<div class="sub-panel" id="sub-auto-edit">
<section class="card">
<div class="card-header"><div class="card-title" data-i18n="subtabs.auto_edit">Auto-Edit (Motion Detection)</div></div>
<p class="card-desc" data-i18n="cut.auto_edit_desc">Detect and remove static/boring segments using visual motion analysis.</p>
<div class="form-group">
<label for="autoEditMethod">Detection Method</label>
<select id="autoEditMethod">
<option value="motion" selected>Motion</option>
<option value="audio">Audio</option>
<option value="both">Both</option>
</select>
</div>
<div class="form-group">
<label for="autoEditThreshold">Motion Threshold</label>
<div class="slider-row">
<input type="range" id="autoEditThreshold" min="0.005" max="0.2" value="0.02" step="0.005" title="Lower = more sensitive (detects smaller movements)">
<span class="slider-val" id="autoEditThresholdVal">0.02</span>
</div>
</div>
<div class="form-group">
<label for="autoEditMargin">Margin</label>
<div class="slider-row">
<input type="range" id="autoEditMargin" min="0" max="2" value="0.2" step="0.1" title="Padding around kept segments (seconds)">
<span class="slider-val" id="autoEditMarginVal">0.2s</span>
</div>
</div>
<div class="form-group">
<label for="autoEditMinClip">Min Clip Length</label>
<div class="slider-row">
<input type="range" id="autoEditMinClip" min="0.2" max="5" value="0.5" step="0.1" title="Minimum segment duration to keep (seconds)">
<span class="slider-val" id="autoEditMinClipVal">0.5s</span>
</div>
</div>
<button type="button" class="btn-primary" id="runAutoEditBtn" disabled data-i18n="cut.auto_edit_run">Run Auto-Edit</button>
<div class="result-area hidden" id="autoEditResult">
<div class="result-stats" id="autoEditStats"></div>
</div>
</section>
</div>
<div class="sub-panel" id="sub-highlights">
<section class="card">
<div class="card-header"><div class="card-title" data-i18n="subtabs.highlights">AI Highlight Extraction</div></div>
<p class="card-desc" data-i18n="cut.highlights_desc">Use AI to find the most interesting/viral moments in your video.</p>
<div class="form-group">
<label for="highlightMax">Max Highlights</label>
<div class="slider-row">
<input type="range" id="highlightMax" min="1" max="20" value="5" step="1" title="Maximum number of highlights to extract">
<span class="slider-val" id="highlightMaxVal">5</span>
</div>
</div>
<div class="form-group">
<label for="highlightMinDur">Duration Range (sec)</label>
<div class="input-pair">
<input type="number" id="highlightMinDur" value="15" min="5" max="300" step="5" aria-label="Minimum highlight duration">
<span>to</span>
<input type="number" id="highlightMaxDur" value="60" min="10" max="600" step="5" aria-label="Maximum highlight duration">
</div>
</div>
<button type="button" class="btn-primary" id="runHighlightsBtn" disabled data-i18n="cut.highlights_extract">Extract Highlights (LLM)</button>
<button type="button" class="btn-outline btn-sm mt-xs" id="runEmotionHighlightsBtn" disabled aria-label="Detect emotion-based highlights" data-i18n="cut.highlights_emotion">Emotion Highlights (Face AI)</button>
<div class="hint hidden" id="emotionHint">
Emotion analysis (deepface) not installed.
<button type="button" class="btn-install" id="installEmotionBtn">Install Now</button>
<div class="install-alt">Requires: <code>pip install deepface</code></div>
</div>
<div class="result-area hidden" id="highlightResult">
<div id="highlightList"></div>
</div>
</section>
</div>
</div>
<!-- ======== TAB: CAPTIONS ======== -->
<div class="nav-panel" id="panel-captions" role="tabpanel" aria-label="Captions">
<div class="quick-actions" id="quickActionsCaptions">
<button type="button" class="quick-action-btn" id="quickAutoSubtitle" disabled title="Transcribe + export SRT subtitles" data-i18n="captions.subtitle_export">
<span class="quick-action-head">
<span class="quick-action-icon" aria-hidden="true">
<svg viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round"><rect x="3.5" y="4" width="13" height="10" rx="2"/><path d="M6.5 8h7"/><path d="M6.5 10.75h4.5"/><path d="M8.75 14v2"/></svg>
</span>
<span class="quick-action-copy">
<span class="btn-label">Auto Subtitle</span>
<span class="quick-action-meta">Transcript to subtitle file in one pass</span>
</span>
</span>
<span class="quick-action-tag" aria-hidden="true">Preset</span>
</button>
<button type="button" class="quick-action-btn" id="quickTranslate" disabled title="Transcribe + translate to another language" data-i18n="captions.translate">
<span class="quick-action-head">
<span class="quick-action-icon" aria-hidden="true">
<svg viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round"><path d="M4.5 6.25h7"/><path d="M8 4v2.25c0 2.9-1.8 5.3-4.25 6.4"/><path d="M6.25 8.75c.7 1.65 1.95 3.05 3.75 4.15"/><path d="M12.5 6.25h3"/><path d="m14 4.5 2.5 7"/><path d="m12.75 9.5 2.5-5 2.5 5"/></svg>
</span>
<span class="quick-action-copy">
<span class="btn-label">Translate</span>
<span class="quick-action-meta">Generate multilingual captions from source speech</span>
</span>
</span>
<span class="quick-action-tag" aria-hidden="true">Preset</span>
</button>
</div>
<div class="sub-tabs" role="tablist" id="captionSubTabs">
<button type="button" class="sub-tab active" data-sub="cap-styled" data-i18n="subtabs.styled">Styled</button>
<button type="button" class="sub-tab" data-sub="cap-subtitle" data-i18n="subtabs.subtitle">Subtitle</button>
<button type="button" class="sub-tab" data-sub="cap-transcript" data-i18n="subtabs.transcript">Transcript</button>
<button type="button" class="sub-tab" data-sub="cap-translate" data-i18n="subtabs.translate">Translate</button>
<button type="button" class="sub-tab" data-sub="cap-karaoke" data-i18n="subtabs.karaoke">Karaoke</button>
<button type="button" class="sub-tab" data-sub="cap-burnin" data-i18n="subtabs.burnin">Burn-in</button>
<button type="button" class="sub-tab" data-sub="cap-animated" data-i18n="subtabs.animated">Animated</button>
<button type="button" class="sub-tab" data-sub="cap-repeat" data-i18n="subtabs.repeats">Repeats</button>
<button type="button" class="sub-tab" data-sub="cap-chapters" data-i18n="subtabs.chapters">Chapters</button>
<button type="button" class="sub-tab" data-sub="cap-srt-import" data-i18n="subtabs.srt_import">SRT Import</button>
</div>
<div class="sub-panel active" id="sub-cap-styled">
<section class="card">
<div class="form-group">
<label for="captionModel">Model</label>
<select id="captionModel">
<option value="tiny">Tiny (fastest)</option>
<option value="base">Base (balanced)</option>
<option value="small">Small (good)</option>
<option value="medium">Medium (great)</option>
<option value="turbo" selected>Turbo (fast + accurate)</option>
<option value="large-v3">Large v3 (best accuracy)</option>
<option value="distil-large-v3.5">Distil v3.5 (fast + great)</option>
<option value="distil-large-v3">Distil v3 (fast + good)</option>
</select>
</div>
<div class="form-group">
<label for="captionLang">Language</label>
<select id="captionLang">
<option value="">Auto-detect</option>
<option value="en">English</option>
<option value="es">Spanish</option>
<option value="fr">French</option>
<option value="de">German</option>
<option value="ja">Japanese</option>
<option value="ko">Korean</option>
<option value="zh">Chinese</option>
<option value="pt">Portuguese</option>
<option value="it">Italian</option>
<option value="ru">Russian</option>
</select>
</div>
<div class="form-group">
<label for="captionStyle">Style</label>
<select id="captionStyle">
<optgroup label="Popular">
<option value="youtube_bold" selected>YouTube Bold</option>
<option value="clean_modern">Clean Modern</option>
<option value="neon_pop">Neon Pop</option>
<option value="minimal">Minimal</option>
</optgroup>
<optgroup label="Classic">
<option value="boxed">Boxed</option>
<option value="cinematic">Cinematic</option>
<option value="subtitle_classic">Classic Subtitle</option>
</optgroup>
<optgroup label="Creative">
<option value="glow">Glow</option>
<option value="karaoke">Karaoke</option>
<option value="outline">Outline</option>
<option value="gradient_fire">Fire Gradient</option>
<option value="bounce">Bounce</option>
<option value="comic">Comic</option>
<option value="typewriter">Typewriter</option>
<option value="news_ticker">News Ticker</option>
</optgroup>
<optgroup label="Platform">
<option value="instagram_stories">Instagram Stories</option>
<option value="netflix">Netflix</option>
<option value="documentary">Documentary</option>
<option value="sports">Sports</option>
</optgroup>
</select>
</div>
<div class="style-preview" id="stylePreview">
<div class="style-preview-bg">
<span class="sp-word" id="spW1">This</span>
<span class="sp-word" id="spW2">is</span>
<span class="sp-word sp-highlight" id="spW3">how</span>
<span class="sp-word" id="spW4">your</span>
<span class="sp-word sp-action" id="spW5">captions</span>
<span class="sp-word" id="spW6">look</span>
</div>
<div class="sp-legend">
<span class="sp-legend-item"><span class="sp-dot sp-dot-hl"></span> Current word</span>
<span class="sp-legend-item"><span class="sp-dot sp-dot-act"></span> Action word</span>
</div>
</div>
<div class="form-group">
<label for="captionFontSize">Font Size</label>
<input type="number" id="captionFontSize" class="text-input" value="48" min="8" max="200" style="width:70px">
</div>
<label class="checkbox-row"><input type="checkbox" id="captionWordHighlight" checked> <span data-i18n="captions.word_highlight">Word-by-word highlight</span></label>
<label class="checkbox-row"><input type="checkbox" id="captionAutoAction" checked> <span data-i18n="captions.auto_action">Auto-detect action words</span></label>
<label class="checkbox-row"><input type="checkbox" id="captionAutoEmoji"> <span data-i18n="captions.auto_emoji">Auto-insert emoji</span></label>
<div class="form-group">
<label for="actionWordsInput">Custom Action Words <span class="hint-inline">(comma-separated)</span></label>
<input type="text" id="actionWordsInput" placeholder="e.g. amazing, subscribe, click" class="text-input">
</div>
<button type="button" class="btn-primary" id="runStyledCaptionsBtn" disabled title="Ctrl+Shift+C" data-i18n="captions.generate_styled">Generate Styled Captions</button>
<div class="hint hidden" id="captionsHint">
Whisper not installed.
<button type="button" class="btn-install" id="installWhisperBtn">Install Whisper Now</button>
<div class="install-alt">Or manually: <code>pip install faster-whisper</code></div>
</div>
</section>
</div>
<div class="sub-panel" id="sub-cap-subtitle">
<section class="card">
<div class="form-group">
<label for="subModel">Model</label>
<select id="subModel">
<option value="tiny">Tiny (fastest)</option>
<option value="base">Base (balanced)</option>
<option value="small">Small (good)</option>
<option value="medium">Medium (great)</option>
<option value="turbo" selected>Turbo (fast + accurate)</option>
<option value="large-v3">Large v3 (best accuracy)</option>
<option value="distil-large-v3.5">Distil v3.5 (fast + great)</option>
<option value="distil-large-v3">Distil v3 (fast + good)</option>
</select>
</div>
<div class="form-group">
<label for="subLang">Language</label>
<select id="subLang">
<option value="">Auto-detect</option>
<option value="en">English</option>
<option value="es">Spanish</option>
<option value="fr">French</option>
<option value="de">German</option>
<option value="ja">Japanese</option>
<option value="ko">Korean</option>
<option value="zh">Chinese</option>
<option value="pt">Portuguese</option>
</select>
</div>
<div class="form-group">
<label for="subFormat">Format</label>
<select id="subFormat">
<option value="srt">SRT (SubRip)</option>
<option value="vtt">WebVTT</option>
<option value="ass">ASS (Karaoke)</option>
<option value="json">JSON (Word-level)</option>
</select>
</div>
<button type="button" class="btn-primary" id="runSubtitleBtn" disabled data-i18n="captions.subtitle_export">Export Subtitles</button>
</section>
</div>
<div class="sub-panel" id="sub-cap-transcript">
<section class="card">
<div class="form-group">
<label for="transcriptModel">Model</label>
<select id="transcriptModel">
<option value="tiny">Tiny (fastest)</option>
<option value="base" selected>Base (balanced)</option>
<option value="small">Small (good)</option>
<option value="medium">Medium (great)</option>
</select>
</div>
<button type="button" class="btn-primary" id="runTranscriptBtn" disabled data-i18n="captions.transcribe">Transcribe</button>
<div class="transcript-editor hidden" id="transcriptEditor">
<div class="transcript-header">
<span class="transcript-info" id="transcriptInfo"></span>
<div class="transcript-actions">
<button type="button" class="btn-sm btn-secondary" id="transcriptUndoBtn" disabled title="Undo" aria-label="Undo transcript edit">↶</button>
<button type="button" class="btn-sm btn-secondary" id="transcriptRedoBtn" disabled title="Redo" aria-label="Redo transcript edit">↷</button>
<select id="transcriptExportFormat" class="inline-select" aria-label="Transcript export format">
<option value="srt">SRT</option>
<option value="vtt">VTT</option>
<option value="ass">ASS</option>
<option value="json">JSON</option>
</select>
<button type="button" class="btn-sm" id="exportTranscriptBtn">Export</button>
<button type="button" class="btn-sm" id="summarizeTranscriptBtn">Summarize</button>
</div>
</div>
<div class="transcript-search" id="transcriptSearch">
<input type="text" id="transcriptSearchInput" class="text-input" placeholder="Search transcript…" aria-label="Search transcript" autocomplete="off" spellcheck="false">
<span class="transcript-search-count" id="transcriptSearchCount"></span>
<button type="button" class="btn-sm" id="transcriptSearchPrev" title="Previous" aria-label="Previous transcript search result">↑</button>
<button type="button" class="btn-sm" id="transcriptSearchNext" title="Next" aria-label="Next transcript search result">↓</button>
</div>
<div class="transcript-workspace">
<section class="transcript-timeline-panel" aria-labelledby="transcriptTimelineHeading">
<div class="transcript-timeline-header">
<div class="transcript-timeline-copy">
<span class="transcript-timeline-kicker">Edit Timeline</span>
<span class="transcript-timeline-heading" id="transcriptTimelineHeading">Transcript rhythm overview</span>
</div>
<span class="transcript-timeline-status" id="transcriptTimelineStatus">Select a segment to focus the edit.</span>
</div>
<div class="transcript-timeline-meta" id="transcriptTimelineMeta" aria-label="Transcript timeline stats"></div>
<div class="transcript-timeline-ruler" id="transcriptTimelineRuler" aria-hidden="true"></div>
<div class="transcript-timeline" id="transcriptTimeline" role="listbox" aria-label="Transcript timeline"></div>
<p class="transcript-timeline-hint">Arrow keys move between segments. Press Enter to jump into the current text.</p>
</section>
<div class="transcript-segments" id="transcriptSegments"></div>
</div>
</div>
<div class="result-area hidden" id="summaryResult">
<div class="card-header"><div class="card-title">Summary</div></div>
<div id="summaryContent" class="summary-content"></div>
<button type="button" class="btn-sm mt-xs" id="copySummaryBtn">Copy</button>
</div>
</section>
</div>
<!-- TRANSLATE CAPTIONS -->
<div class="sub-panel" id="sub-cap-translate">
<section class="card">
<div class="card-header">
<div class="card-title">
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M3 5h12M9 3v2m1.048 9.5A18.022 18.022 0 016.412 9m6.088 9h7M11 21l5-10 5 10M12.751 5C11.783 10.77 8.07 15.61 3 18.129"/></svg>
<span data-i18n="captions.translate">Caption Translation</span>
</div>
</div>
<p class="card-desc" data-i18n="captions.translate_desc">Translate your captions into 200+ languages. Runs fully offline after a one-time model download.</p>
<div class="form-group">
<label for="translateModel">Step 1: Transcribe (if needed)</label>
<select id="translateModel">
<option value="tiny">Tiny (fastest)</option>
<option value="base" selected>Base (balanced)</option>
<option value="small">Small (good)</option>
</select>
</div>
<div class="form-group">
<label for="translateSourceLang">Source Language</label>
<select id="translateSourceLang">
<option value="en" selected>English</option>
<option value="es">Spanish</option>
<option value="fr">French</option>
<option value="de">German</option>
<option value="it">Italian</option>
<option value="pt">Portuguese</option>
<option value="ja">Japanese</option>
<option value="zh">Chinese</option>
<option value="ko">Korean</option>
<option value="ru">Russian</option>
<option value="ar">Arabic</option>
<option value="hi">Hindi</option>
</select>
</div>
<div class="form-group">
<label for="translateTargetLang">Target Language</label>
<select id="translateTargetLang">
<option value="es" selected>Spanish</option>
<option value="fr">French</option>
<option value="de">German</option>
<option value="it">Italian</option>
<option value="pt">Portuguese</option>
<option value="ja">Japanese</option>
<option value="zh">Chinese (Simplified)</option>
<option value="ko">Korean</option>
<option value="ru">Russian</option>
<option value="ar">Arabic</option>
<option value="hi">Hindi</option>
<option value="nl">Dutch</option>
<option value="pl">Polish</option>
<option value="sv">Swedish</option>
<option value="tr">Turkish</option>
<option value="th">Thai</option>
<option value="vi">Vietnamese</option>
<option value="id">Indonesian</option>
<option value="en">English</option>
</select>
</div>
<div class="form-group">
<label for="translateFormat">Output Format</label>
<select id="translateFormat">
<option value="srt" selected>SRT</option>
<option value="vtt">VTT</option>
<option value="ass">ASS</option>
</select>
</div>
<button type="button" class="btn-primary" id="runTranslateBtn" disabled data-i18n="captions.translate_run">Transcribe & Translate</button>
<div class="hint hidden" id="translateHint">
NLLB translation model not installed.
<button type="button" class="btn-install" id="installNllbBtn">Install NLLB</button>