@remotion/studio 4.0.451 → 4.0.453

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. package/dist/Studio.js +1 -1
  2. package/dist/audio-waveform-worker.d.ts +1 -0
  3. package/dist/audio-waveform-worker.js +102 -0
  4. package/dist/components/AudioWaveform.d.ts +2 -0
  5. package/dist/components/AudioWaveform.js +166 -18
  6. package/dist/components/Timeline/LoopedIndicator.js +5 -19
  7. package/dist/components/Timeline/TimelineSequence.js +18 -10
  8. package/dist/components/Timeline/TimelineVideoInfo.d.ts +2 -0
  9. package/dist/components/Timeline/TimelineVideoInfo.js +51 -12
  10. package/dist/components/Timeline/TimelineWidthProvider.js +1 -16
  11. package/dist/components/audio-waveform-worker-types.d.ts +28 -0
  12. package/dist/components/audio-waveform-worker-types.js +2 -0
  13. package/dist/components/draw-peaks.d.ts +1 -1
  14. package/dist/components/load-waveform-peaks.d.ts +11 -1
  15. package/dist/components/load-waveform-peaks.js +25 -24
  16. package/dist/components/looped-media-timeline.d.ts +6 -0
  17. package/dist/components/looped-media-timeline.js +14 -0
  18. package/dist/components/slice-waveform-peaks.d.ts +7 -0
  19. package/dist/components/slice-waveform-peaks.js +15 -0
  20. package/dist/components/waveform-peak-processor.d.ts +23 -0
  21. package/dist/components/waveform-peak-processor.js +77 -0
  22. package/dist/esm/audio-waveform-worker.mjs +345 -0
  23. package/dist/esm/{chunk-v2r2309d.js → chunk-hn4803e7.js} +1016 -717
  24. package/dist/esm/internals.mjs +1016 -717
  25. package/dist/esm/previewEntry.mjs +996 -697
  26. package/dist/esm/renderEntry.mjs +3 -3
  27. package/dist/helpers/calculate-timeline.js +16 -0
  28. package/dist/helpers/get-timeline-nestedness.js +2 -1
  29. package/dist/make-audio-waveform-worker.d.ts +1 -0
  30. package/dist/make-audio-waveform-worker.js +10 -0
  31. package/dist/renderEntry.js +2 -2
  32. package/package.json +18 -9
@@ -4,13 +4,13 @@ import {
4
4
  } from "./chunk-6jf1natv.js";
5
5
 
6
6
  // src/Studio.tsx
7
- import { useLayoutEffect as useLayoutEffect6 } from "react";
7
+ import { useLayoutEffect as useLayoutEffect5 } from "react";
8
8
  import { createPortal } from "react-dom";
9
9
  import { Internals as Internals70 } from "remotion";
10
10
 
11
11
  // src/components/Editor.tsx
12
12
  import { PlayerInternals as PlayerInternals19 } from "@remotion/player";
13
- import React187, { useCallback as useCallback149, useMemo as useMemo151, useState as useState98 } from "react";
13
+ import React187, { useCallback as useCallback149, useMemo as useMemo151, useState as useState97 } from "react";
14
14
  import { Internals as Internals65 } from "remotion";
15
15
 
16
16
  // src/helpers/colors.ts
@@ -65,7 +65,7 @@ var canvasRef = createRef();
65
65
  var drawRef = createRef();
66
66
 
67
67
  // src/state/timeline-zoom.tsx
68
- import { createContext as createContext2, useCallback, useMemo, useState as useState2 } from "react";
68
+ import { createContext as createContext2, useCallback, useMemo, useState } from "react";
69
69
 
70
70
  // src/components/Timeline/imperative-state.ts
71
71
  var currentFrame = 0;
@@ -161,10 +161,10 @@ var timelineVerticalScroll = React.createRef();
161
161
  // src/components/Timeline/TimelineSlider.tsx
162
162
  import {
163
163
  createRef as createRef2,
164
- useContext as useContext2,
164
+ useContext,
165
165
  useEffect,
166
166
  useImperativeHandle,
167
- useLayoutEffect as useLayoutEffect2,
167
+ useLayoutEffect,
168
168
  useRef
169
169
  } from "react";
170
170
  import { Internals, useVideoConfig } from "remotion";
@@ -199,7 +199,7 @@ var TimelineSliderHandle = () => {
199
199
 
200
200
  // src/components/Timeline/TimelineWidthProvider.tsx
201
201
  import { PlayerInternals } from "@remotion/player";
202
- import { createContext, useContext, useLayoutEffect, useState } from "react";
202
+ import { createContext } from "react";
203
203
  import { jsx as jsx2 } from "react/jsx-runtime";
204
204
  var TimelineWidthContext = createContext(null);
205
205
  var TimelineWidthProvider = ({ children }) => {
@@ -207,19 +207,8 @@ var TimelineWidthProvider = ({ children }) => {
207
207
  triggerOnWindowResize: false,
208
208
  shouldApplyCssTransforms: true
209
209
  });
210
- const { zoom: zoomMap } = useContext(TimelineZoomCtx);
211
- const [widthOverride, setWidthOverride] = useState(null);
212
- const observedWidth = size?.width ?? null;
213
- useLayoutEffect(() => {
214
- const actual = sliderAreaRef.current?.clientWidth ?? null;
215
- if (actual !== null && actual !== observedWidth) {
216
- setWidthOverride(actual);
217
- } else {
218
- setWidthOverride(null);
219
- }
220
- }, [observedWidth, zoomMap]);
221
210
  return /* @__PURE__ */ jsx2(TimelineWidthContext.Provider, {
222
- value: widthOverride ?? observedWidth,
211
+ value: size?.width ?? null,
223
212
  children
224
213
  });
225
214
  };
@@ -241,7 +230,7 @@ var line = {
241
230
  var redrawTimelineSliderFast = createRef2();
242
231
  var TimelineSlider = () => {
243
232
  const videoConfig = Internals.useUnsafeVideoConfig();
244
- const timelineWidth = useContext2(TimelineWidthContext);
233
+ const timelineWidth = useContext(TimelineWidthContext);
245
234
  if (videoConfig === null || timelineWidth === null) {
246
235
  return null;
247
236
  }
@@ -251,14 +240,14 @@ var Inner = () => {
251
240
  const videoConfig = useVideoConfig();
252
241
  const timelinePosition = Internals.Timeline.useTimelinePosition();
253
242
  const ref = useRef(null);
254
- const timelineWidth = useContext2(TimelineWidthContext);
255
- const { zoom: zoomMap } = useContext2(TimelineZoomCtx);
256
- const { canvasContent } = useContext2(Internals.CompositionManager);
243
+ const timelineWidth = useContext(TimelineWidthContext);
244
+ const { zoom: zoomMap } = useContext(TimelineZoomCtx);
245
+ const { canvasContent } = useContext(Internals.CompositionManager);
257
246
  if (timelineWidth === null) {
258
247
  throw new Error("Unexpectedly did not have timeline width");
259
248
  }
260
249
  const zoomLevel = canvasContent?.type === "composition" ? zoomMap[canvasContent.compositionId] ?? TIMELINE_MIN_ZOOM : TIMELINE_MIN_ZOOM;
261
- useLayoutEffect2(() => {
250
+ useLayoutEffect(() => {
262
251
  const el = ref.current;
263
252
  const measuredWidth = sliderAreaRef.current?.clientWidth;
264
253
  if (!el || measuredWidth === undefined || measuredWidth === 0) {
@@ -533,7 +522,7 @@ var zoomAndPreserveCursor = ({
533
522
  };
534
523
 
535
524
  // src/components/ZoomPersistor.tsx
536
- import { useContext as useContext3, useEffect as useEffect2 } from "react";
525
+ import { useContext as useContext2, useEffect as useEffect2 } from "react";
537
526
  import { Internals as Internals2 } from "remotion";
538
527
 
539
528
  // src/helpers/url-state.ts
@@ -602,8 +591,8 @@ var getZoomFromLocalStorage = () => {
602
591
  };
603
592
  var ZoomPersistor = () => {
604
593
  const [playing] = Internals2.Timeline.usePlayingState();
605
- const { zoom } = useContext3(TimelineZoomCtx);
606
- const { canvasContent } = useContext3(Internals2.CompositionManager);
594
+ const { zoom } = useContext2(TimelineZoomCtx);
595
+ const { canvasContent } = useContext2(Internals2.CompositionManager);
607
596
  const urlState = deriveCanvasContentFromUrl();
608
597
  const isActive = urlState && urlState.type === "composition" && canvasContent && canvasContent.type === "composition" && urlState.compositionId === canvasContent.compositionId;
609
598
  useEffect2(() => {
@@ -626,7 +615,7 @@ var TimelineZoomCtx = createContext2({
626
615
  }
627
616
  });
628
617
  var TimelineZoomContext = ({ children }) => {
629
- const [zoom, setZoomState] = useState2(() => getZoomFromLocalStorage());
618
+ const [zoom, setZoomState] = useState(() => getZoomFromLocalStorage());
630
619
  const setZoom = useCallback((compositionId, callback, options) => {
631
620
  setZoomState((prevZoomMap) => {
632
621
  const newZoomWithFloatingPointErrors = Math.min(TIMELINE_MAX_ZOOM, Math.max(TIMELINE_MIN_ZOOM, callback(prevZoomMap[compositionId] ?? TIMELINE_MIN_ZOOM)));
@@ -659,14 +648,14 @@ var TimelineZoomContext = ({ children }) => {
659
648
  // src/state/z-index.tsx
660
649
  import {
661
650
  createContext as createContext5,
662
- useContext as useContext5,
651
+ useContext as useContext4,
663
652
  useEffect as useEffect4,
664
653
  useMemo as useMemo5,
665
654
  useRef as useRef3
666
655
  } from "react";
667
656
 
668
657
  // src/helpers/use-keybinding.ts
669
- import { useCallback as useCallback3, useContext as useContext4, useEffect as useEffect3, useMemo as useMemo3, useState as useState3 } from "react";
658
+ import { useCallback as useCallback3, useContext as useContext3, useEffect as useEffect3, useMemo as useMemo3, useState as useState2 } from "react";
670
659
 
671
660
  // src/state/keybindings.tsx
672
661
  import { createContext as createContext3, useCallback as useCallback2, useMemo as useMemo2, useRef as useRef2 } from "react";
@@ -724,8 +713,8 @@ var areKeyboardShortcutsDisabled = () => {
724
713
  return !process.env.KEYBOARD_SHORTCUTS_ENABLED;
725
714
  };
726
715
  var useKeybinding = () => {
727
- const [paneId] = useState3(() => String(Math.random()));
728
- const context = useContext4(KeybindingContext);
716
+ const [paneId] = useState2(() => String(Math.random()));
717
+ const context = useContext3(KeybindingContext);
729
718
  const { isHighestContext } = useZIndex();
730
719
  const registerKeybinding = useCallback3((options) => {
731
720
  if (!process.env.KEYBOARD_SHORTCUTS_ENABLED) {
@@ -784,7 +773,7 @@ var useKeybinding = () => {
784
773
  };
785
774
 
786
775
  // src/state/highest-z-index.tsx
787
- import { createContext as createContext4, useCallback as useCallback4, useMemo as useMemo4, useState as useState4 } from "react";
776
+ import { createContext as createContext4, useCallback as useCallback4, useMemo as useMemo4, useState as useState3 } from "react";
788
777
  import { jsx as jsx6 } from "react/jsx-runtime";
789
778
  var HighestZIndexContext = createContext4({
790
779
  highestIndex: 0,
@@ -796,7 +785,7 @@ var HighestZIndexContext = createContext4({
796
785
  }
797
786
  });
798
787
  var HighestZIndexProvider = ({ children }) => {
799
- const [zIndexes, setZIndexes] = useState4([]);
788
+ const [zIndexes, setZIndexes] = useState3([]);
800
789
  const registerZIndex = useCallback4((newIndex) => {
801
790
  setZIndexes((prev) => [...prev, newIndex]);
802
791
  }, []);
@@ -857,8 +846,8 @@ var EscapeHook = ({ onEscape }) => {
857
846
  return null;
858
847
  };
859
848
  var HigherZIndex = ({ children, onEscape, onOutsideClick, disabled }) => {
860
- const context = useContext5(ZIndexContext);
861
- const highestContext = useContext5(HighestZIndexContext);
849
+ const context = useContext4(ZIndexContext);
850
+ const highestContext = useContext4(HighestZIndexContext);
862
851
  const containerRef = useRef3(null);
863
852
  const currentIndex = disabled ? context.currentIndex : context.currentIndex + 1;
864
853
  useEffect4(() => {
@@ -917,8 +906,8 @@ var HigherZIndex = ({ children, onEscape, onOutsideClick, disabled }) => {
917
906
  });
918
907
  };
919
908
  var useZIndex = () => {
920
- const context = useContext5(ZIndexContext);
921
- const highestContext = useContext5(HighestZIndexContext);
909
+ const context = useContext4(ZIndexContext);
910
+ const highestContext = useContext4(HighestZIndexContext);
922
911
  const isHighestContext = highestContext.highestIndex === context.currentIndex;
923
912
  return useMemo5(() => ({
924
913
  currentZIndex: context.currentIndex,
@@ -929,11 +918,11 @@ var useZIndex = () => {
929
918
  };
930
919
 
931
920
  // src/components/EditorContent.tsx
932
- import { useContext as useContext81 } from "react";
921
+ import { useContext as useContext80 } from "react";
933
922
  import { Internals as Internals58 } from "remotion";
934
923
 
935
924
  // src/helpers/is-current-selected-still.ts
936
- import { useContext as useContext6 } from "react";
925
+ import { useContext as useContext5 } from "react";
937
926
  import { Internals as Internals3 } from "remotion";
938
927
 
939
928
  // src/helpers/is-composition-still.ts
@@ -954,7 +943,7 @@ var useIsStill = () => {
954
943
  };
955
944
  var useIsVideoComposition = () => {
956
945
  const isStill = useIsStill();
957
- const { canvasContent } = useContext6(Internals3.CompositionManager);
946
+ const { canvasContent } = useContext5(Internals3.CompositionManager);
958
947
  if (canvasContent === null) {
959
948
  return false;
960
949
  }
@@ -965,17 +954,17 @@ var useIsVideoComposition = () => {
965
954
  };
966
955
 
967
956
  // src/components/InitialCompositionLoader.tsx
968
- import { useCallback as useCallback24, useContext as useContext16, useEffect as useEffect15 } from "react";
957
+ import { useCallback as useCallback24, useContext as useContext15, useEffect as useEffect15 } from "react";
969
958
  import { Internals as Internals12 } from "remotion";
970
959
 
971
960
  // src/helpers/mobile-layout.ts
972
- import { useEffect as useEffect5, useRef as useRef4, useState as useState5 } from "react";
961
+ import { useEffect as useEffect5, useRef as useRef4, useState as useState4 } from "react";
973
962
  var breakpoint = 900;
974
963
  function getIsMobile() {
975
964
  return window.innerWidth < breakpoint;
976
965
  }
977
966
  var useMobileLayout = () => {
978
- const [isMobile, setIsMobile] = useState5(getIsMobile());
967
+ const [isMobile, setIsMobile] = useState4(getIsMobile());
979
968
  const isMobileRef = useRef4(isMobile);
980
969
  useEffect5(() => {
981
970
  function handleResize() {
@@ -993,7 +982,7 @@ var useMobileLayout = () => {
993
982
  };
994
983
 
995
984
  // src/state/folders.tsx
996
- import { createContext as createContext7, useMemo as useMemo6, useState as useState6 } from "react";
985
+ import { createContext as createContext7, useMemo as useMemo6, useState as useState5 } from "react";
997
986
 
998
987
  // src/helpers/persist-open-folders.tsx
999
988
  import { createContext as createContext6 } from "react";
@@ -1033,8 +1022,8 @@ var FolderContext = createContext7({
1033
1022
  }
1034
1023
  });
1035
1024
  var FolderContextProvider = ({ children }) => {
1036
- const [compositionFoldersExpanded, setCompositionFoldersExpanded] = useState6(() => loadExpandedFolders("compositions"));
1037
- const [assetFoldersExpanded, setAssetFoldersExpanded] = useState6(() => loadExpandedFolders("assets"));
1025
+ const [compositionFoldersExpanded, setCompositionFoldersExpanded] = useState5(() => loadExpandedFolders("compositions"));
1026
+ const [assetFoldersExpanded, setAssetFoldersExpanded] = useState5(() => loadExpandedFolders("assets"));
1038
1027
  const value = useMemo6(() => {
1039
1028
  return {
1040
1029
  compositionFoldersExpanded,
@@ -1050,7 +1039,7 @@ var FolderContextProvider = ({ children }) => {
1050
1039
  };
1051
1040
 
1052
1041
  // src/state/sidebar.tsx
1053
- import { createContext as createContext8, useMemo as useMemo7, useState as useState7 } from "react";
1042
+ import { createContext as createContext8, useMemo as useMemo7, useState as useState6 } from "react";
1054
1043
  import { jsx as jsx9 } from "react/jsx-runtime";
1055
1044
  var storageKey = (sidebar) => {
1056
1045
  if (sidebar === "right") {
@@ -1093,7 +1082,7 @@ var SidebarContext = createContext8({
1093
1082
  });
1094
1083
  var SidebarContextProvider = ({ children }) => {
1095
1084
  const isMobileLayout = useMobileLayout();
1096
- const [sidebarCollapsedState, setSidebarCollapsedState] = useState7(() => ({
1085
+ const [sidebarCollapsedState, setSidebarCollapsedState] = useState6(() => ({
1097
1086
  left: getSavedCollapsedStateLeft(isMobileLayout),
1098
1087
  right: getSavedCollapsedStateRight(isMobileLayout)
1099
1088
  }));
@@ -1127,7 +1116,7 @@ var SidebarContextProvider = ({ children }) => {
1127
1116
  };
1128
1117
 
1129
1118
  // src/components/CompositionSelector.tsx
1130
- import { useCallback as useCallback17, useContext as useContext10, useMemo as useMemo21 } from "react";
1119
+ import { useCallback as useCallback17, useContext as useContext9, useMemo as useMemo21 } from "react";
1131
1120
  import { Internals as Internals7 } from "remotion";
1132
1121
 
1133
1122
  // src/error-overlay/remotion-overlay/ShortcutHint.tsx
@@ -1360,11 +1349,11 @@ var ModalsContext = createContext9({
1360
1349
  // src/components/CompositionSelectorItem.tsx
1361
1350
  import {
1362
1351
  useCallback as useCallback16,
1363
- useContext as useContext9,
1364
- useLayoutEffect as useLayoutEffect3,
1352
+ useContext as useContext8,
1353
+ useLayoutEffect as useLayoutEffect2,
1365
1354
  useMemo as useMemo20,
1366
1355
  useRef as useRef11,
1367
- useState as useState15
1356
+ useState as useState14
1368
1357
  } from "react";
1369
1358
 
1370
1359
  // src/helpers/sidebar-scroll-into-view.ts
@@ -1510,7 +1499,7 @@ var FilmIcon = ({ color, ...props }) => {
1510
1499
  };
1511
1500
 
1512
1501
  // src/components/CompositionContextButton.tsx
1513
- import { useCallback as useCallback13, useContext as useContext7, useMemo as useMemo17 } from "react";
1502
+ import { useCallback as useCallback13, useContext as useContext6, useMemo as useMemo17 } from "react";
1514
1503
 
1515
1504
  // src/helpers/client-id.tsx
1516
1505
  import React13, { useCallback as useCallback7, useEffect as useEffect8, useMemo as useMemo10, useRef as useRef6 } from "react";
@@ -1521,7 +1510,7 @@ import {
1521
1510
  createRef as createRef3,
1522
1511
  useCallback as useCallback5,
1523
1512
  useImperativeHandle as useImperativeHandle2,
1524
- useState as useState8
1513
+ useState as useState7
1525
1514
  } from "react";
1526
1515
 
1527
1516
  // src/components/Notifications/Notification.tsx
@@ -1583,7 +1572,7 @@ var showNotification = (content, durationInMs) => {
1583
1572
  });
1584
1573
  };
1585
1574
  var NotificationCenter = () => {
1586
- const [notifications, setNotifications] = useState8([]);
1575
+ const [notifications, setNotifications] = useState7([]);
1587
1576
  const onRemove = useCallback5((id) => {
1588
1577
  setNotifications((not) => {
1589
1578
  return not.filter((n) => n.id !== id);
@@ -1655,7 +1644,7 @@ import React12, {
1655
1644
  useImperativeHandle as useImperativeHandle3,
1656
1645
  useMemo as useMemo9,
1657
1646
  useRef as useRef5,
1658
- useState as useState9
1647
+ useState as useState8
1659
1648
  } from "react";
1660
1649
 
1661
1650
  // src/components/RenderQueue/client-render-queue.ts
@@ -1725,9 +1714,9 @@ var RenderQueueContext = React12.createContext({
1725
1714
  });
1726
1715
  var renderJobsRef = createRef4();
1727
1716
  var RenderQueueContextProvider = ({ children }) => {
1728
- const [serverJobs, setServerJobs] = useState9(window.remotion_initialRenderQueue ?? []);
1729
- const [clientJobs, setClientJobs] = useState9(restorePersistedClientRenders);
1730
- const [currentlyProcessing, setCurrentlyProcessing] = useState9(null);
1717
+ const [serverJobs, setServerJobs] = useState8(window.remotion_initialRenderQueue ?? []);
1718
+ const [clientJobs, setClientJobs] = useState8(restorePersistedClientRenders);
1719
+ const [currentlyProcessing, setCurrentlyProcessing] = useState8(null);
1731
1720
  const processJobCallbackRef = useRef5(null);
1732
1721
  useEffect7(() => {
1733
1722
  if (currentlyProcessing) {
@@ -2012,11 +2001,11 @@ var EllipsisIcon = (props) => {
2012
2001
 
2013
2002
  // src/components/InlineDropdown.tsx
2014
2003
  import { PlayerInternals as PlayerInternals3 } from "@remotion/player";
2015
- import { useCallback as useCallback12, useMemo as useMemo16, useRef as useRef9, useState as useState13 } from "react";
2004
+ import { useCallback as useCallback12, useMemo as useMemo16, useRef as useRef9, useState as useState12 } from "react";
2016
2005
  import ReactDOM2 from "react-dom";
2017
2006
 
2018
2007
  // src/components/InlineAction.tsx
2019
- import { useCallback as useCallback8, useMemo as useMemo11, useState as useState10 } from "react";
2008
+ import { useCallback as useCallback8, useMemo as useMemo11, useState as useState9 } from "react";
2020
2009
  import { jsx as jsx19 } from "react/jsx-runtime";
2021
2010
  var InlineAction = ({
2022
2011
  renderAction,
@@ -2025,7 +2014,7 @@ var InlineAction = ({
2025
2014
  title
2026
2015
  }) => {
2027
2016
  const { tabIndex } = useZIndex();
2028
- const [hovered, setHovered] = useState10(false);
2017
+ const [hovered, setHovered] = useState9(false);
2029
2018
  const onPointerEnter = useCallback8(() => {
2030
2019
  setHovered(true);
2031
2020
  }, []);
@@ -2109,7 +2098,7 @@ var inlineCodeSnippet = {
2109
2098
  };
2110
2099
 
2111
2100
  // src/components/NewComposition/MenuContent.tsx
2112
- import { useCallback as useCallback11, useEffect as useEffect10, useMemo as useMemo15, useRef as useRef8, useState as useState12 } from "react";
2101
+ import { useCallback as useCallback11, useEffect as useEffect10, useMemo as useMemo15, useRef as useRef8, useState as useState11 } from "react";
2113
2102
 
2114
2103
  // src/components/Menu/is-menu-item.tsx
2115
2104
  var MENU_INITIATOR_CLASSNAME = "__remotion-studio-menu-initiator";
@@ -2136,7 +2125,7 @@ var MenuDivider = () => {
2136
2125
 
2137
2126
  // src/components/Menu/MenuSubItem.tsx
2138
2127
  import { PlayerInternals as PlayerInternals2 } from "@remotion/player";
2139
- import { useCallback as useCallback10, useEffect as useEffect9, useMemo as useMemo14, useRef as useRef7, useState as useState11 } from "react";
2128
+ import { useCallback as useCallback10, useEffect as useEffect9, useMemo as useMemo14, useRef as useRef7, useState as useState10 } from "react";
2140
2129
  import ReactDOM from "react-dom";
2141
2130
 
2142
2131
  // src/icons/caret.tsx
@@ -2325,7 +2314,7 @@ var MenuSubItem = ({
2325
2314
  setSubMenuActivated,
2326
2315
  disabled
2327
2316
  }) => {
2328
- const [hovered, setHovered] = useState11(false);
2317
+ const [hovered, setHovered] = useState10(false);
2329
2318
  const ref = useRef7(null);
2330
2319
  const size = PlayerInternals2.useElementSize(ref, {
2331
2320
  triggerOnWindowResize: true,
@@ -2494,13 +2483,13 @@ var MenuContent = ({
2494
2483
  const keybindings = useKeybinding();
2495
2484
  const containerRef = useRef8(null);
2496
2485
  const isMobileLayout = useMobileLayout();
2497
- const [subMenuActivated, setSubMenuActivated] = useState12(false);
2486
+ const [subMenuActivated, setSubMenuActivated] = useState11(false);
2498
2487
  const typeaheadQueryRef = useRef8("");
2499
2488
  const typeaheadTimeoutRef = useRef8(null);
2500
2489
  if (values[0].type === "divider") {
2501
2490
  throw new Error("first value cant be divide");
2502
2491
  }
2503
- const [selectedItem, setSelectedItem] = useState12(typeof preselectIndex === "number" && preselectIndex >= 0 ? values[preselectIndex].id : null);
2492
+ const [selectedItem, setSelectedItem] = useState11(typeof preselectIndex === "number" && preselectIndex >= 0 ? values[preselectIndex].id : null);
2504
2493
  const onEscape = useCallback11(() => {
2505
2494
  onHide();
2506
2495
  }, [onHide]);
@@ -2798,7 +2787,7 @@ var InlineDropdown = ({
2798
2787
  ...props
2799
2788
  }) => {
2800
2789
  const ref = useRef9(null);
2801
- const [opened, setOpened] = useState13({ type: "not-open" });
2790
+ const [opened, setOpened] = useState12({ type: "not-open" });
2802
2791
  const { currentZIndex } = useZIndex();
2803
2792
  const size = PlayerInternals3.useElementSize(ref, {
2804
2793
  triggerOnWindowResize: true,
@@ -2900,7 +2889,7 @@ var CompositionContextButton = ({ visible, values }) => {
2900
2889
  }
2901
2890
  };
2902
2891
  }, []);
2903
- const connectionStatus = useContext7(StudioServerConnectionCtx).previewServerState.type;
2892
+ const connectionStatus = useContext6(StudioServerConnectionCtx).previewServerState.type;
2904
2893
  const renderAction = useCallback13((color) => {
2905
2894
  return /* @__PURE__ */ jsx27(EllipsisIcon, {
2906
2895
  fill: color,
@@ -2918,12 +2907,12 @@ var CompositionContextButton = ({ visible, values }) => {
2918
2907
 
2919
2908
  // src/components/ContextMenu.tsx
2920
2909
  import { PlayerInternals as PlayerInternals4 } from "@remotion/player";
2921
- import { useCallback as useCallback14, useEffect as useEffect11, useMemo as useMemo18, useRef as useRef10, useState as useState14 } from "react";
2910
+ import { useCallback as useCallback14, useEffect as useEffect11, useMemo as useMemo18, useRef as useRef10, useState as useState13 } from "react";
2922
2911
  import ReactDOM3 from "react-dom";
2923
2912
  import { jsx as jsx28, jsxs as jsxs6, Fragment as Fragment3 } from "react/jsx-runtime";
2924
2913
  var ContextMenu = ({ children, values }) => {
2925
2914
  const ref = useRef10(null);
2926
- const [opened, setOpened] = useState14({ type: "not-open" });
2915
+ const [opened, setOpened] = useState13({ type: "not-open" });
2927
2916
  const { currentZIndex } = useZIndex();
2928
2917
  const style = useMemo18(() => {
2929
2918
  return {};
@@ -3029,7 +3018,7 @@ var ContextMenu = ({ children, values }) => {
3029
3018
  };
3030
3019
 
3031
3020
  // src/components/SidebarRenderButton.tsx
3032
- import { useCallback as useCallback15, useContext as useContext8, useMemo as useMemo19 } from "react";
3021
+ import { useCallback as useCallback15, useContext as useContext7, useMemo as useMemo19 } from "react";
3033
3022
  import { Internals as Internals5 } from "remotion";
3034
3023
 
3035
3024
  // src/icons/render.tsx
@@ -3049,8 +3038,8 @@ var ThinRenderIcon = (props) => {
3049
3038
  // src/components/SidebarRenderButton.tsx
3050
3039
  import { jsx as jsx30 } from "react/jsx-runtime";
3051
3040
  var SidebarRenderButton = ({ composition, visible }) => {
3052
- const { setSelectedModal } = useContext8(ModalsContext);
3053
- const { setSidebarCollapsedState } = useContext8(SidebarContext);
3041
+ const { setSelectedModal } = useContext7(ModalsContext);
3042
+ const { setSidebarCollapsedState } = useContext7(SidebarContext);
3054
3043
  const isMobileLayout = useMobileLayout();
3055
3044
  const iconStyle = useMemo19(() => {
3056
3045
  return {
@@ -3059,8 +3048,8 @@ var SidebarRenderButton = ({ composition, visible }) => {
3059
3048
  }
3060
3049
  };
3061
3050
  }, []);
3062
- const connectionStatus = useContext8(StudioServerConnectionCtx).previewServerState.type;
3063
- const { props } = useContext8(Internals5.EditorPropsContext);
3051
+ const connectionStatus = useContext7(StudioServerConnectionCtx).previewServerState.type;
3052
+ const { props } = useContext7(Internals5.EditorPropsContext);
3064
3053
  const onClick = useCallback15((e) => {
3065
3054
  const defaults = window.remotion_renderDefaults;
3066
3055
  if (!defaults) {
@@ -3194,7 +3183,7 @@ var CompositionSelectorItem = ({
3194
3183
  }
3195
3184
  return false;
3196
3185
  }, [item, currentComposition]);
3197
- const [hovered, setHovered] = useState15(false);
3186
+ const [hovered, setHovered] = useState14(false);
3198
3187
  const onPointerEnter = useCallback16(() => {
3199
3188
  setHovered(true);
3200
3189
  }, []);
@@ -3203,7 +3192,7 @@ var CompositionSelectorItem = ({
3203
3192
  }, []);
3204
3193
  const compositionRowRef = useRef11(null);
3205
3194
  const compositionId = item.type === "composition" ? item.composition.id : null;
3206
- useLayoutEffect3(() => {
3195
+ useLayoutEffect2(() => {
3207
3196
  if (compositionId === null) {
3208
3197
  return;
3209
3198
  }
@@ -3240,7 +3229,7 @@ var CompositionSelectorItem = ({
3240
3229
  onClick(evt);
3241
3230
  }
3242
3231
  }, [onClick]);
3243
- const { setSelectedModal } = useContext9(ModalsContext);
3232
+ const { setSelectedModal } = useContext8(ModalsContext);
3244
3233
  const contextMenu = useMemo20(() => {
3245
3234
  if (item.type === "composition") {
3246
3235
  return [
@@ -3498,7 +3487,7 @@ var CurrentComposition = () => {
3498
3487
  // src/components/CompositionSelector.tsx
3499
3488
  import { jsx as jsx33, jsxs as jsxs9 } from "react/jsx-runtime";
3500
3489
  var useCompositionNavigation = () => {
3501
- const { compositions, canvasContent } = useContext10(Internals7.CompositionManager);
3490
+ const { compositions, canvasContent } = useContext9(Internals7.CompositionManager);
3502
3491
  const selectComposition = useSelectComposition();
3503
3492
  const navigateToNextComposition = useCallback17(() => {
3504
3493
  if (!canvasContent || canvasContent.type !== "composition" || compositions.length <= 1) {
@@ -3571,9 +3560,9 @@ var getKeysToExpand = (initialFolderName, parentFolderName, initial = []) => {
3571
3560
  return getKeysToExpand(name, parent, initial);
3572
3561
  };
3573
3562
  var CompositionSelector = () => {
3574
- const { compositions, canvasContent, folders } = useContext10(Internals7.CompositionManager);
3575
- const { foldersExpanded } = useContext10(ExpandedFoldersContext);
3576
- const { setSelectedModal } = useContext10(ModalsContext);
3563
+ const { compositions, canvasContent, folders } = useContext9(Internals7.CompositionManager);
3564
+ const { foldersExpanded } = useContext9(ExpandedFoldersContext);
3565
+ const { setSelectedModal } = useContext9(ModalsContext);
3577
3566
  const { tabIndex } = useZIndex();
3578
3567
  const selectComposition = useSelectComposition();
3579
3568
  const sortedCompositions = useMemo21(() => {
@@ -3643,10 +3632,10 @@ var CompositionSelector = () => {
3643
3632
  };
3644
3633
 
3645
3634
  // src/components/ExplorerPanel.tsx
3646
- import { createRef as createRef5, useCallback as useCallback23, useImperativeHandle as useImperativeHandle5, useState as useState22 } from "react";
3635
+ import { createRef as createRef5, useCallback as useCallback23, useImperativeHandle as useImperativeHandle5, useState as useState21 } from "react";
3647
3636
 
3648
3637
  // src/components/AssetSelector.tsx
3649
- import { useCallback as useCallback20, useContext as useContext14, useMemo as useMemo25, useState as useState19 } from "react";
3638
+ import { useCallback as useCallback20, useContext as useContext13, useMemo as useMemo25, useState as useState18 } from "react";
3650
3639
  import { Internals as Internals10 } from "remotion";
3651
3640
 
3652
3641
  // src/api/write-static-file.ts
@@ -3718,11 +3707,11 @@ var use_asset_drag_events_default = useAssetDragEvents;
3718
3707
  // src/components/AssetSelectorItem.tsx
3719
3708
  import React25, {
3720
3709
  useCallback as useCallback19,
3721
- useContext as useContext11,
3722
- useLayoutEffect as useLayoutEffect4,
3710
+ useContext as useContext10,
3711
+ useLayoutEffect as useLayoutEffect3,
3723
3712
  useMemo as useMemo23,
3724
3713
  useRef as useRef13,
3725
- useState as useState16
3714
+ useState as useState15
3726
3715
  } from "react";
3727
3716
  import { Internals as Internals8 } from "remotion";
3728
3717
  import { NoReactInternals as NoReactInternals3 } from "remotion/no-react";
@@ -4108,7 +4097,7 @@ var AssetFolderItem = ({
4108
4097
  setDropLocation,
4109
4098
  readOnlyStudio
4110
4099
  }) => {
4111
- const [hovered, setHovered] = useState16(false);
4100
+ const [hovered, setHovered] = useState15(false);
4112
4101
  const openFolderTimerRef = useRef13(null);
4113
4102
  const { isDropDiv, onDragEnter, onDragLeave } = use_asset_drag_events_default({
4114
4103
  name: item.name,
@@ -4237,13 +4226,13 @@ var AssetFolderTree = ({
4237
4226
  };
4238
4227
  var AssetSelectorItem = ({ item, tabIndex, level, parentFolder, readOnlyStudio }) => {
4239
4228
  const isMobileLayout = useMobileLayout();
4240
- const [hovered, setHovered] = useState16(false);
4241
- const { setSidebarCollapsedState } = useContext11(SidebarContext);
4229
+ const [hovered, setHovered] = useState15(false);
4230
+ const { setSidebarCollapsedState } = useContext10(SidebarContext);
4242
4231
  const onPointerEnter = useCallback19(() => {
4243
4232
  setHovered(true);
4244
4233
  }, []);
4245
- const { setCanvasContent } = useContext11(Internals8.CompositionSetters);
4246
- const { canvasContent } = useContext11(Internals8.CompositionManager);
4234
+ const { setCanvasContent } = useContext10(Internals8.CompositionSetters);
4235
+ const { canvasContent } = useContext10(Internals8.CompositionManager);
4247
4236
  const relativePath = useMemo23(() => {
4248
4237
  return parentFolder ? parentFolder + "/" + item.name : item.name;
4249
4238
  }, [parentFolder, item.name]);
@@ -4257,7 +4246,7 @@ var AssetSelectorItem = ({ item, tabIndex, level, parentFolder, readOnlyStudio }
4257
4246
  setHovered(false);
4258
4247
  }, []);
4259
4248
  const rowRef = useRef13(null);
4260
- useLayoutEffect4(() => {
4249
+ useLayoutEffect3(() => {
4261
4250
  maybeScrollAssetSidebarRowIntoView({
4262
4251
  element: rowRef.current,
4263
4252
  assetPath: relativePath,
@@ -4374,11 +4363,11 @@ var AssetSelectorItem = ({ item, tabIndex, level, parentFolder, readOnlyStudio }
4374
4363
  // src/components/CurrentAsset.tsx
4375
4364
  import { formatBytes } from "@remotion/studio-shared";
4376
4365
  import { ALL_FORMATS, Input, UrlSource } from "mediabunny";
4377
- import { useContext as useContext13, useEffect as useEffect14, useMemo as useMemo24, useState as useState18 } from "react";
4366
+ import { useContext as useContext12, useEffect as useEffect14, useMemo as useMemo24, useState as useState17 } from "react";
4378
4367
  import { Internals as Internals9, staticFile } from "remotion";
4379
4368
 
4380
4369
  // src/components/use-static-files.ts
4381
- import React26, { createContext as createContext10, useContext as useContext12, useEffect as useEffect13, useState as useState17 } from "react";
4370
+ import React26, { createContext as createContext10, useContext as useContext11, useEffect as useEffect13, useState as useState16 } from "react";
4382
4371
  import { useRemotionEnvironment } from "remotion";
4383
4372
 
4384
4373
  // src/api/get-static-files.ts
@@ -4436,7 +4425,7 @@ var watchPublicFolder = (callback) => {
4436
4425
  // src/components/use-static-files.ts
4437
4426
  var StaticFilesContext = createContext10([]);
4438
4427
  var StaticFilesProvider = ({ children }) => {
4439
- const [files, setFiles] = useState17(() => getStaticFiles());
4428
+ const [files, setFiles] = useState16(() => getStaticFiles());
4440
4429
  const env = useRemotionEnvironment();
4441
4430
  useEffect13(() => {
4442
4431
  if (!env.isStudio) {
@@ -4453,7 +4442,7 @@ var StaticFilesProvider = ({ children }) => {
4453
4442
  return React26.createElement(StaticFilesContext.Provider, { value: files }, children);
4454
4443
  };
4455
4444
  var useStaticFiles = () => {
4456
- return useContext12(StaticFilesContext);
4445
+ return useContext11(StaticFilesContext);
4457
4446
  };
4458
4447
 
4459
4448
  // src/components/CurrentAsset.tsx
@@ -4498,7 +4487,7 @@ var formatDuration = (seconds) => {
4498
4487
  return `${String(m).padStart(2, "0")}:${sFixed}`;
4499
4488
  };
4500
4489
  var CurrentAsset = () => {
4501
- const { canvasContent } = useContext13(Internals9.CompositionManager);
4490
+ const { canvasContent } = useContext12(Internals9.CompositionManager);
4502
4491
  const assetName = canvasContent?.type === "asset" ? canvasContent.asset : null;
4503
4492
  const staticFiles = useStaticFiles();
4504
4493
  const sizeInBytes = useMemo24(() => {
@@ -4508,7 +4497,7 @@ var CurrentAsset = () => {
4508
4497
  const file = staticFiles.find((f) => f.name === assetName);
4509
4498
  return file?.sizeInBytes ?? null;
4510
4499
  }, [assetName, staticFiles]);
4511
- const [mediaMetadata, setMediaMetadata] = useState18(null);
4500
+ const [mediaMetadata, setMediaMetadata] = useState17(null);
4512
4501
  useEffect14(() => {
4513
4502
  setMediaMetadata(null);
4514
4503
  if (!assetName) {
@@ -4602,10 +4591,10 @@ var baseList = {
4602
4591
  };
4603
4592
  var AssetSelector = ({ readOnlyStudio }) => {
4604
4593
  const { tabIndex } = useZIndex();
4605
- const { canvasContent } = useContext14(Internals10.CompositionManager);
4606
- const { assetFoldersExpanded, setAssetFoldersExpanded } = useContext14(FolderContext);
4607
- const [dropLocation, setDropLocation] = useState19(null);
4608
- const connectionStatus = useContext14(StudioServerConnectionCtx).previewServerState.type;
4594
+ const { canvasContent } = useContext13(Internals10.CompositionManager);
4595
+ const { assetFoldersExpanded, setAssetFoldersExpanded } = useContext13(FolderContext);
4596
+ const [dropLocation, setDropLocation] = useState18(null);
4597
+ const connectionStatus = useContext13(StudioServerConnectionCtx).previewServerState.type;
4609
4598
  const shouldAllowUpload = connectionStatus === "connected" && !readOnlyStudio;
4610
4599
  const showCurrentAsset = canvasContent?.type === "asset";
4611
4600
  const list = useMemo25(() => {
@@ -4728,16 +4717,16 @@ var AssetSelector = ({ readOnlyStudio }) => {
4728
4717
  // src/components/CompSelectorRef.tsx
4729
4718
  import {
4730
4719
  useCallback as useCallback21,
4731
- useContext as useContext15,
4720
+ useContext as useContext14,
4732
4721
  useImperativeHandle as useImperativeHandle4,
4733
4722
  useMemo as useMemo26,
4734
- useState as useState20
4723
+ useState as useState19
4735
4724
  } from "react";
4736
4725
  import { Internals as Internals11 } from "remotion";
4737
4726
  import { jsx as jsx39 } from "react/jsx-runtime";
4738
4727
  var CompSelectorRef = ({ children }) => {
4739
- const { compositions } = useContext15(Internals11.CompositionManager);
4740
- const [foldersExpanded, setFoldersExpanded] = useState20(loadExpandedFolders("compositions"));
4728
+ const { compositions } = useContext14(Internals11.CompositionManager);
4729
+ const [foldersExpanded, setFoldersExpanded] = useState19(loadExpandedFolders("compositions"));
4741
4730
  const selectComposition = useSelectComposition();
4742
4731
  const toggleFolder = useCallback21((folderName, parentName) => {
4743
4732
  setFoldersExpanded((p) => {
@@ -4810,7 +4799,7 @@ var CompSelectorRef = ({ children }) => {
4810
4799
  };
4811
4800
 
4812
4801
  // src/components/Tabs/index.tsx
4813
- import { useCallback as useCallback22, useMemo as useMemo27, useState as useState21 } from "react";
4802
+ import { useCallback as useCallback22, useMemo as useMemo27, useState as useState20 } from "react";
4814
4803
  import { jsx as jsx40 } from "react/jsx-runtime";
4815
4804
  var tabsContainer = {
4816
4805
  display: "flex",
@@ -4844,7 +4833,7 @@ var selectorButton = {
4844
4833
  WebkitUserSelect: "none"
4845
4834
  };
4846
4835
  var Tab = ({ children, onClick, style, selected }) => {
4847
- const [hovered, setHovered] = useState21(false);
4836
+ const [hovered, setHovered] = useState20(false);
4848
4837
  const { tabIndex } = useZIndex();
4849
4838
  const onPointerEnter = useCallback22(() => {
4850
4839
  setHovered(true);
@@ -4897,7 +4886,7 @@ var persistSelectedOptionsSidebarPanel = (panel) => {
4897
4886
  };
4898
4887
  var explorerSidebarTabs = createRef5();
4899
4888
  var ExplorerPanel = ({ readOnlyStudio }) => {
4900
- const [panel, setPanel] = useState22(() => getSelectedPanel());
4889
+ const [panel, setPanel] = useState21(() => getSelectedPanel());
4901
4890
  const onCompositionsSelected = useCallback23(() => {
4902
4891
  setPanel("compositions");
4903
4892
  persistSelectedOptionsSidebarPanel("compositions");
@@ -4950,8 +4939,8 @@ var ExplorerPanel = ({ readOnlyStudio }) => {
4950
4939
 
4951
4940
  // src/components/InitialCompositionLoader.tsx
4952
4941
  var useSelectAsset = () => {
4953
- const { setCanvasContent } = useContext16(Internals12.CompositionSetters);
4954
- const { setAssetFoldersExpanded } = useContext16(FolderContext);
4942
+ const { setCanvasContent } = useContext15(Internals12.CompositionSetters);
4943
+ const { setAssetFoldersExpanded } = useContext15(FolderContext);
4955
4944
  return useCallback24((asset) => {
4956
4945
  setCanvasContent({ type: "asset", asset });
4957
4946
  explorerSidebarTabs.current?.selectAssetsPanel();
@@ -4971,10 +4960,10 @@ var useSelectAsset = () => {
4971
4960
  }, [setAssetFoldersExpanded, setCanvasContent]);
4972
4961
  };
4973
4962
  var useSelectComposition = () => {
4974
- const { setCompositionFoldersExpanded } = useContext16(FolderContext);
4975
- const { setCanvasContent } = useContext16(Internals12.CompositionSetters);
4963
+ const { setCompositionFoldersExpanded } = useContext15(FolderContext);
4964
+ const { setCanvasContent } = useContext15(Internals12.CompositionSetters);
4976
4965
  const isMobileLayout = useMobileLayout();
4977
- const { setSidebarCollapsedState } = useContext16(SidebarContext);
4966
+ const { setSidebarCollapsedState } = useContext15(SidebarContext);
4978
4967
  return useCallback24((c, push) => {
4979
4968
  if (push) {
4980
4969
  pushUrl(`/${c.id}`);
@@ -5005,8 +4994,8 @@ var useSelectComposition = () => {
5005
4994
  ]);
5006
4995
  };
5007
4996
  var InitialCompositionLoader = () => {
5008
- const { compositions, canvasContent } = useContext16(Internals12.CompositionManager);
5009
- const { setCanvasContent } = useContext16(Internals12.CompositionSetters);
4997
+ const { compositions, canvasContent } = useContext15(Internals12.CompositionManager);
4998
+ const { setCanvasContent } = useContext15(Internals12.CompositionSetters);
5010
4999
  const selectComposition = useSelectComposition();
5011
5000
  const selectAsset = useSelectAsset();
5012
5001
  const staticFiles = useStaticFiles();
@@ -5081,10 +5070,10 @@ var InitialCompositionLoader = () => {
5081
5070
  };
5082
5071
 
5083
5072
  // src/components/MenuToolbar.tsx
5084
- import { useCallback as useCallback99, useMemo as useMemo105, useState as useState69 } from "react";
5073
+ import { useCallback as useCallback99, useMemo as useMemo105, useState as useState68 } from "react";
5085
5074
 
5086
5075
  // src/helpers/use-menu-structure.tsx
5087
- import { useContext as useContext23, useMemo as useMemo42 } from "react";
5076
+ import { useContext as useContext22, useMemo as useMemo42 } from "react";
5088
5077
  import { Internals as Internals19 } from "remotion";
5089
5078
  import { NoReactInternals as NoReactInternals5 } from "remotion/no-react";
5090
5079
 
@@ -5107,7 +5096,7 @@ import {
5107
5096
  useEffect as useEffect16,
5108
5097
  useImperativeHandle as useImperativeHandle6,
5109
5098
  useRef as useRef14,
5110
- useState as useState23
5099
+ useState as useState22
5111
5100
  } from "react";
5112
5101
  import { AbsoluteFill } from "remotion";
5113
5102
 
@@ -5154,7 +5143,7 @@ var ModalContainer = ({ children, onEscape, onOutsideClick, noZIndex }) => {
5154
5143
  };
5155
5144
 
5156
5145
  // src/components/ModalHeader.tsx
5157
- import { useCallback as useCallback25, useContext as useContext17 } from "react";
5146
+ import { useCallback as useCallback25, useContext as useContext16 } from "react";
5158
5147
 
5159
5148
  // src/components/NewComposition/CancelButton.tsx
5160
5149
  import { jsx as jsx43 } from "react/jsx-runtime";
@@ -5205,7 +5194,7 @@ var icon = {
5205
5194
  width: 20
5206
5195
  };
5207
5196
  var ModalHeader = ({ title: title3, onClose }) => {
5208
- const { setSelectedModal } = useContext17(ModalsContext);
5197
+ const { setSelectedModal } = useContext16(ModalsContext);
5209
5198
  const onPress = useCallback25(() => {
5210
5199
  setSelectedModal(null);
5211
5200
  }, [setSelectedModal]);
@@ -5236,7 +5225,7 @@ var container13 = {
5236
5225
  };
5237
5226
  var askAiModalRef = createRef6();
5238
5227
  var AskAiModal = () => {
5239
- const [state, setState] = useState23("never-opened");
5228
+ const [state, setState] = useState22("never-opened");
5240
5229
  const iframe = useRef14(null);
5241
5230
  useImperativeHandle6(askAiModalRef, () => ({
5242
5231
  toggle: () => {
@@ -5303,7 +5292,7 @@ var AskAiModal = () => {
5303
5292
  };
5304
5293
 
5305
5294
  // src/components/SizeSelector.tsx
5306
- import { useContext as useContext21, useMemo as useMemo39 } from "react";
5295
+ import { useContext as useContext20, useMemo as useMemo39 } from "react";
5307
5296
  import { Internals as Internals16 } from "remotion";
5308
5297
 
5309
5298
  // src/icons/Checkmark.tsx
@@ -5348,7 +5337,7 @@ var ControlButton = (props) => {
5348
5337
 
5349
5338
  // src/components/NewComposition/ComboBox.tsx
5350
5339
  import { PlayerInternals as PlayerInternals5 } from "@remotion/player";
5351
- import { useCallback as useCallback27, useEffect as useEffect17, useMemo as useMemo29, useRef as useRef15, useState as useState24 } from "react";
5340
+ import { useCallback as useCallback27, useEffect as useEffect17, useMemo as useMemo29, useRef as useRef15, useState as useState23 } from "react";
5352
5341
  import ReactDOM4 from "react-dom";
5353
5342
  import { jsx as jsx48, jsxs as jsxs16, Fragment as Fragment6 } from "react/jsx-runtime";
5354
5343
  var container14 = {
@@ -5367,8 +5356,8 @@ var label2 = {
5367
5356
  textAlign: "left"
5368
5357
  };
5369
5358
  var Combobox = ({ values, selectedId, style: customStyle, title: title3 }) => {
5370
- const [hovered, setIsHovered] = useState24(false);
5371
- const [opened, setOpened] = useState24(false);
5359
+ const [hovered, setIsHovered] = useState23(false);
5360
+ const [opened, setOpened] = useState23(false);
5372
5361
  const ref = useRef15(null);
5373
5362
  const { tabIndex, currentZIndex } = useZIndex();
5374
5363
  const size = PlayerInternals5.useElementSize(ref, {
@@ -5535,11 +5524,11 @@ var Combobox = ({ values, selectedId, style: customStyle, title: title3 }) => {
5535
5524
 
5536
5525
  // src/components/Preview.tsx
5537
5526
  import { PlayerInternals as PlayerInternals7 } from "@remotion/player";
5538
- import { useContext as useContext20, useEffect as useEffect30, useMemo as useMemo38, useRef as useRef20 } from "react";
5527
+ import { useContext as useContext19, useEffect as useEffect30, useMemo as useMemo38, useRef as useRef20 } from "react";
5539
5528
  import { Internals as Internals15 } from "remotion";
5540
5529
 
5541
5530
  // src/error-overlay/remotion-overlay/ErrorLoader.tsx
5542
- import { useEffect as useEffect24, useState as useState29 } from "react";
5531
+ import { useEffect as useEffect24, useState as useState28 } from "react";
5543
5532
 
5544
5533
  // src/error-overlay/react-overlay/utils/parser.ts
5545
5534
  import { getLocationFromBuildError } from "@remotion/studio-shared";
@@ -5949,10 +5938,10 @@ var style3 = {
5949
5938
  };
5950
5939
 
5951
5940
  // src/error-overlay/remotion-overlay/CopyStackTrace.tsx
5952
- import { useCallback as useCallback29, useEffect as useEffect19, useMemo as useMemo31, useState as useState25 } from "react";
5941
+ import { useCallback as useCallback29, useEffect as useEffect19, useMemo as useMemo31, useState as useState24 } from "react";
5953
5942
  import { jsx as jsx52, jsxs as jsxs19 } from "react/jsx-runtime";
5954
5943
  var CopyStackTrace = ({ canHaveKeyboardShortcuts, errorText }) => {
5955
- const [copyState, setCopyState] = useState25("idle");
5944
+ const [copyState, setCopyState] = useState24("idle");
5956
5945
  const handleCopyToClipboard = useCallback29(() => {
5957
5946
  navigator.clipboard.writeText(errorText).then(() => {
5958
5947
  setCopyState("copied");
@@ -6044,7 +6033,7 @@ var DismissButton = () => {
6044
6033
 
6045
6034
  // src/error-overlay/remotion-overlay/ErrorMessage.tsx
6046
6035
  import { PlayerInternals as PlayerInternals6 } from "@remotion/player";
6047
- import { useCallback as useCallback31, useMemo as useMemo32, useRef as useRef16, useState as useState26 } from "react";
6036
+ import { useCallback as useCallback31, useMemo as useMemo32, useRef as useRef16, useState as useState25 } from "react";
6048
6037
 
6049
6038
  // src/error-overlay/remotion-overlay/carets.tsx
6050
6039
  import { jsx as jsx54 } from "react/jsx-runtime";
@@ -6117,7 +6106,7 @@ var moreButton = {
6117
6106
  color: "white"
6118
6107
  };
6119
6108
  var ErrorMessage = ({ message }) => {
6120
- const [expanded, setExpanded] = useState26(false);
6109
+ const [expanded, setExpanded] = useState25(false);
6121
6110
  const ref = useRef16(null);
6122
6111
  const size2 = PlayerInternals6.useElementSize(ref, {
6123
6112
  shouldApplyCssTransforms: false,
@@ -6439,7 +6428,7 @@ var HelpLink = ({ canHaveKeyboardShortcuts, link }) => {
6439
6428
  };
6440
6429
 
6441
6430
  // src/error-overlay/remotion-overlay/MediaPlaybackErrorExplainer.tsx
6442
- import { useEffect as useEffect21, useState as useState27 } from "react";
6431
+ import { useEffect as useEffect21, useState as useState26 } from "react";
6443
6432
  import { jsx as jsx59, jsxs as jsxs24 } from "react/jsx-runtime";
6444
6433
  var container16 = {
6445
6434
  borderRadius: 3,
@@ -6461,7 +6450,7 @@ var linkStyle = {
6461
6450
  color: "#58a6ff"
6462
6451
  };
6463
6452
  var MediaPlaybackErrorExplainer = ({ src }) => {
6464
- const [result, setResult] = useState27({ type: "loading" });
6453
+ const [result, setResult] = useState26({ type: "loading" });
6465
6454
  useEffect21(() => {
6466
6455
  fetch(src, { method: "HEAD" }).then((res) => {
6467
6456
  if (res.status === 404) {
@@ -6789,7 +6778,7 @@ var SearchGithubIssues = ({ message, canHaveKeyboardShortcuts }) => {
6789
6778
  };
6790
6779
 
6791
6780
  // src/error-overlay/remotion-overlay/StackFrame.tsx
6792
- import { useCallback as useCallback35, useState as useState28 } from "react";
6781
+ import { useCallback as useCallback35, useState as useState27 } from "react";
6793
6782
 
6794
6783
  // src/error-overlay/remotion-overlay/CodeFrame.tsx
6795
6784
  import { jsx as jsx63, jsxs as jsxs27 } from "react/jsx-runtime";
@@ -6887,7 +6876,7 @@ var fnName = {
6887
6876
  marginBottom: 3
6888
6877
  };
6889
6878
  var StackElement = ({ s, lineNumberWidth, isFirst, defaultFunctionName }) => {
6890
- const [showCodeFrame, setShowCodeFrame] = useState28(() => !s.originalFileName?.includes("node_modules") && !s.originalFileName?.startsWith("webpack/") || isFirst);
6879
+ const [showCodeFrame, setShowCodeFrame] = useState27(() => !s.originalFileName?.includes("node_modules") && !s.originalFileName?.startsWith("webpack/") || isFirst);
6891
6880
  const toggleCodeFrame = useCallback35(() => {
6892
6881
  setShowCodeFrame((f) => !f);
6893
6882
  }, []);
@@ -7089,7 +7078,7 @@ var ErrorLoader = ({
7089
7078
  canHaveDismissButton,
7090
7079
  calculateMetadata
7091
7080
  }) => {
7092
- const [state, setState] = useState29({
7081
+ const [state, setState] = useState28({
7093
7082
  type: "loading"
7094
7083
  });
7095
7084
  useEffect24(() => {
@@ -7218,7 +7207,7 @@ var CheckerboardContext = createContext11({
7218
7207
  });
7219
7208
 
7220
7209
  // src/components/RenderPreview.tsx
7221
- import { useContext as useContext18, useEffect as useEffect29, useState as useState34 } from "react";
7210
+ import { useContext as useContext17, useEffect as useEffect29, useState as useState33 } from "react";
7222
7211
 
7223
7212
  // src/helpers/get-asset-metadata.ts
7224
7213
  import { getVideoMetadata } from "@remotion/media-utils";
@@ -7305,7 +7294,7 @@ var getAssetMetadata = async (canvasContent, addTime) => {
7305
7294
  import { formatBytes as formatBytes2 } from "@remotion/studio-shared";
7306
7295
 
7307
7296
  // src/components/JSONViewer.tsx
7308
- import { useEffect as useEffect27, useState as useState32 } from "react";
7297
+ import { useEffect as useEffect27, useState as useState31 } from "react";
7309
7298
 
7310
7299
  // src/components/NewComposition/RemTextarea.tsx
7311
7300
  import {
@@ -7314,7 +7303,7 @@ import {
7314
7303
  useImperativeHandle as useImperativeHandle8,
7315
7304
  useMemo as useMemo36,
7316
7305
  useRef as useRef19,
7317
- useState as useState31
7306
+ useState as useState30
7318
7307
  } from "react";
7319
7308
 
7320
7309
  // src/components/NewComposition/RemInput.tsx
@@ -7324,7 +7313,7 @@ import {
7324
7313
  useImperativeHandle as useImperativeHandle7,
7325
7314
  useMemo as useMemo35,
7326
7315
  useRef as useRef18,
7327
- useState as useState30
7316
+ useState as useState29
7328
7317
  } from "react";
7329
7318
  import { jsx as jsx67 } from "react/jsx-runtime";
7330
7319
  var INPUT_HORIZONTAL_PADDING = 8;
@@ -7350,8 +7339,8 @@ var getInputBorderColor = ({
7350
7339
  isHovered
7351
7340
  }) => status === "warning" ? WARNING_COLOR : status === "error" ? FAIL_COLOR : isFocused ? SELECTED_BACKGROUND : isHovered ? INPUT_BORDER_COLOR_HOVERED : INPUT_BORDER_COLOR_UNHOVERED;
7352
7341
  var RemInputForwardRef = ({ status, rightAlign, ...props }, ref) => {
7353
- const [isFocused, setIsFocused] = useState30(false);
7354
- const [isHovered, setIsHovered] = useState30(false);
7342
+ const [isFocused, setIsFocused] = useState29(false);
7343
+ const [isHovered, setIsHovered] = useState29(false);
7355
7344
  const inputRef = useRef18(null);
7356
7345
  const { tabIndex } = useZIndex();
7357
7346
  const style5 = useMemo35(() => {
@@ -7408,8 +7397,8 @@ var inputBaseStyle2 = {
7408
7397
  overflowX: "hidden"
7409
7398
  };
7410
7399
  var RemTextareaFRFunction = ({ status, ...props }, ref) => {
7411
- const [isFocused, setIsFocused] = useState31(false);
7412
- const [isHovered, setIsHovered] = useState31(false);
7400
+ const [isFocused, setIsFocused] = useState30(false);
7401
+ const [isHovered, setIsHovered] = useState30(false);
7413
7402
  const inputRef = useRef19(null);
7414
7403
  const { tabIndex } = useZIndex();
7415
7404
  useImperativeHandle8(ref, () => {
@@ -7501,7 +7490,7 @@ var jsonStyle = {
7501
7490
  flex: 1
7502
7491
  };
7503
7492
  var JSONViewer = ({ src }) => {
7504
- const [json, setJson] = useState32(null);
7493
+ const [json, setJson] = useState31(null);
7505
7494
  useEffect27(() => {
7506
7495
  fetch(src).then((res) => res.json()).then((jsonRes) => {
7507
7496
  setJson(JSON.stringify(jsonRes, null, 2));
@@ -7518,7 +7507,7 @@ var JSONViewer = ({ src }) => {
7518
7507
  };
7519
7508
 
7520
7509
  // src/components/TextViewer.tsx
7521
- import { useEffect as useEffect28, useState as useState33 } from "react";
7510
+ import { useEffect as useEffect28, useState as useState32 } from "react";
7522
7511
  import { jsxs as jsxs31 } from "react/jsx-runtime";
7523
7512
  var textStyle = {
7524
7513
  margin: 14,
@@ -7528,7 +7517,7 @@ var textStyle = {
7528
7517
  whiteSpace: "pre-wrap"
7529
7518
  };
7530
7519
  var TextViewer = ({ src }) => {
7531
- const [txt, setTxt] = useState33("");
7520
+ const [txt, setTxt] = useState32("");
7532
7521
  useEffect28(() => {
7533
7522
  fetch(src).then(async (res) => {
7534
7523
  if (!res.ok || !res.body) {
@@ -7629,9 +7618,9 @@ var errMsgStyle = {
7629
7618
  };
7630
7619
  var RenderPreview = ({ path, assetMetadata, getBlob }) => {
7631
7620
  const fileType = getPreviewFileType(path);
7632
- const connectionStatus = useContext18(StudioServerConnectionCtx).previewServerState.type;
7633
- const [blobUrl, setBlobUrl] = useState34(null);
7634
- const [blobError, setBlobError] = useState34(null);
7621
+ const connectionStatus = useContext17(StudioServerConnectionCtx).previewServerState.type;
7622
+ const [blobUrl, setBlobUrl] = useState33(null);
7623
+ const [blobError, setBlobError] = useState33(null);
7635
7624
  useEffect29(() => {
7636
7625
  if (!getBlob) {
7637
7626
  setBlobUrl(null);
@@ -7747,7 +7736,7 @@ var Spinner = ({ size: size2, duration }) => {
7747
7736
  };
7748
7737
 
7749
7738
  // src/components/StaticFilePreview.tsx
7750
- import { useContext as useContext19 } from "react";
7739
+ import { useContext as useContext18 } from "react";
7751
7740
  import { staticFile as staticFile3 } from "remotion";
7752
7741
  import { jsx as jsx73, jsxs as jsxs35 } from "react/jsx-runtime";
7753
7742
  var msgStyle3 = {
@@ -7765,7 +7754,7 @@ var StaticFilePreview = ({ currentAsset, assetMetadata }) => {
7765
7754
  const fileType = getPreviewFileType(currentAsset);
7766
7755
  const staticFileSrc = staticFile3(currentAsset);
7767
7756
  const staticFiles = useStaticFiles();
7768
- const connectionStatus = useContext19(StudioServerConnectionCtx).previewServerState.type;
7757
+ const connectionStatus = useContext18(StudioServerConnectionCtx).previewServerState.type;
7769
7758
  const exists = staticFiles.find((file) => file.name === currentAsset);
7770
7759
  if (connectionStatus === "disconnected") {
7771
7760
  return /* @__PURE__ */ jsx73("div", {
@@ -7904,7 +7893,7 @@ var VideoPreview = ({
7904
7893
  });
7905
7894
  };
7906
7895
  var CompWhenItHasDimensions = ({ contentDimensions, canvasSize, canvasContent, assetMetadata }) => {
7907
- const { size: previewSize } = useContext20(Internals15.PreviewSizeContext);
7896
+ const { size: previewSize } = useContext19(Internals15.PreviewSizeContext);
7908
7897
  const { centerX, centerY, yCorrection, xCorrection, scale } = useMemo38(() => {
7909
7898
  if (contentDimensions === "none") {
7910
7899
  return {
@@ -7983,7 +7972,7 @@ var CompWhenItHasDimensions = ({ contentDimensions, canvasSize, canvasContent, a
7983
7972
  });
7984
7973
  };
7985
7974
  var PortalContainer = ({ scale, xCorrection, yCorrection, contentDimensions }) => {
7986
- const { checkerboard } = useContext20(CheckerboardContext);
7975
+ const { checkerboard } = useContext19(CheckerboardContext);
7987
7976
  const style5 = useMemo38(() => {
7988
7977
  return containerStyle({
7989
7978
  checkerboard,
@@ -8075,8 +8064,8 @@ var getUniqueSizes = (size2) => {
8075
8064
  };
8076
8065
  var zoomableFileTypes = ["video", "image"];
8077
8066
  var SizeSelector = () => {
8078
- const { size: size2, setSize } = useContext21(Internals16.PreviewSizeContext);
8079
- const { canvasContent } = useContext21(Internals16.CompositionManager);
8067
+ const { size: size2, setSize } = useContext20(Internals16.PreviewSizeContext);
8068
+ const { canvasContent } = useContext20(Internals16.CompositionManager);
8080
8069
  const style5 = useMemo39(() => {
8081
8070
  return {
8082
8071
  padding: CONTROL_BUTTON_PADDING
@@ -8174,7 +8163,7 @@ var TimelineOutPointer = (props) => {
8174
8163
  };
8175
8164
 
8176
8165
  // src/state/in-out.ts
8177
- import { createContext as createContext12, useContext as useContext22, useMemo as useMemo40 } from "react";
8166
+ import { createContext as createContext12, useContext as useContext21, useMemo as useMemo40 } from "react";
8178
8167
  import { Internals as Internals17 } from "remotion";
8179
8168
  var TimelineInOutContext = createContext12({});
8180
8169
  var SetTimelineInOutContext = createContext12({
@@ -8184,7 +8173,7 @@ var SetTimelineInOutContext = createContext12({
8184
8173
  });
8185
8174
  var useTimelineInOutFramePosition = () => {
8186
8175
  const videoConfig = Internals17.useUnsafeVideoConfig();
8187
- const state = useContext22(TimelineInOutContext);
8176
+ const state = useContext21(TimelineInOutContext);
8188
8177
  const id = videoConfig?.id;
8189
8178
  const durationInFrames = videoConfig?.durationInFrames;
8190
8179
  return useMemo40(() => {
@@ -8201,7 +8190,7 @@ var useTimelineInOutFramePosition = () => {
8201
8190
  }, [durationInFrames, id, state]);
8202
8191
  };
8203
8192
  var useTimelineSetInOutFramePosition = () => {
8204
- const { setInAndOutFrames } = useContext22(SetTimelineInOutContext);
8193
+ const { setInAndOutFrames } = useContext21(SetTimelineInOutContext);
8205
8194
  return { setInAndOutFrames };
8206
8195
  };
8207
8196
 
@@ -8745,18 +8734,18 @@ var getFileMenu = ({
8745
8734
  };
8746
8735
  };
8747
8736
  var useMenuStructure = (closeMenu, readOnlyStudio) => {
8748
- const { setSelectedModal } = useContext23(ModalsContext);
8749
- const { checkerboard, setCheckerboard } = useContext23(CheckerboardContext);
8750
- const { editorZoomGestures, setEditorZoomGestures } = useContext23(EditorZoomGesturesContext);
8751
- const { editorShowRulers, setEditorShowRulers } = useContext23(EditorShowRulersContext);
8752
- const { editorShowGuides, setEditorShowGuides } = useContext23(EditorShowGuidesContext);
8753
- const { size: size2, setSize } = useContext23(Internals19.PreviewSizeContext);
8754
- const { type } = useContext23(StudioServerConnectionCtx).previewServerState;
8737
+ const { setSelectedModal } = useContext22(ModalsContext);
8738
+ const { checkerboard, setCheckerboard } = useContext22(CheckerboardContext);
8739
+ const { editorZoomGestures, setEditorZoomGestures } = useContext22(EditorZoomGesturesContext);
8740
+ const { editorShowRulers, setEditorShowRulers } = useContext22(EditorShowRulersContext);
8741
+ const { editorShowGuides, setEditorShowGuides } = useContext22(EditorShowGuidesContext);
8742
+ const { size: size2, setSize } = useContext22(Internals19.PreviewSizeContext);
8743
+ const { type } = useContext22(StudioServerConnectionCtx).previewServerState;
8755
8744
  const {
8756
8745
  setSidebarCollapsedState,
8757
8746
  sidebarCollapsedStateLeft,
8758
8747
  sidebarCollapsedStateRight
8759
- } = useContext23(SidebarContext);
8748
+ } = useContext22(SidebarContext);
8760
8749
  const sizes = useMemo42(() => getUniqueSizes(size2), [size2]);
8761
8750
  const isFullscreenSupported = checkFullscreenSupport();
8762
8751
  const { remotion_packageManager } = window;
@@ -9503,7 +9492,7 @@ var makeSearchResults = (actions, setSelectedModal) => {
9503
9492
 
9504
9493
  // src/components/Menu/MenuItem.tsx
9505
9494
  import { PlayerInternals as PlayerInternals9 } from "@remotion/player";
9506
- import { useCallback as useCallback37, useMemo as useMemo43, useRef as useRef21, useState as useState35 } from "react";
9495
+ import { useCallback as useCallback37, useMemo as useMemo43, useRef as useRef21, useState as useState34 } from "react";
9507
9496
  import ReactDOM5 from "react-dom";
9508
9497
  import { jsx as jsx81, jsxs as jsxs38, Fragment as Fragment13 } from "react/jsx-runtime";
9509
9498
  var container20 = {
@@ -9529,7 +9518,7 @@ var MenuItem = ({
9529
9518
  onNextMenu,
9530
9519
  menu
9531
9520
  }) => {
9532
- const [hovered, setHovered] = useState35(false);
9521
+ const [hovered, setHovered] = useState34(false);
9533
9522
  const ref = useRef21(null);
9534
9523
  const size2 = PlayerInternals9.useElementSize(ref, {
9535
9524
  triggerOnWindowResize: true,
@@ -9634,18 +9623,18 @@ var MenuItem = ({
9634
9623
  // src/components/MenuBuildIndicator.tsx
9635
9624
  import {
9636
9625
  useCallback as useCallback39,
9637
- useContext as useContext26,
9626
+ useContext as useContext25,
9638
9627
  useEffect as useEffect33,
9639
9628
  useMemo as useMemo45,
9640
- useState as useState38
9629
+ useState as useState37
9641
9630
  } from "react";
9642
9631
 
9643
9632
  // src/components/MenuCompositionName.tsx
9644
- import { useCallback as useCallback38, useContext as useContext25, useMemo as useMemo44, useState as useState37 } from "react";
9633
+ import { useCallback as useCallback38, useContext as useContext24, useMemo as useMemo44, useState as useState36 } from "react";
9645
9634
  import { Internals as Internals21 } from "remotion";
9646
9635
 
9647
9636
  // src/components/Timeline/use-resolved-stack.ts
9648
- import { useContext as useContext24, useEffect as useEffect32, useState as useState36 } from "react";
9637
+ import { useContext as useContext23, useEffect as useEffect32, useState as useState35 } from "react";
9649
9638
  import { Internals as Internals20 } from "remotion";
9650
9639
 
9651
9640
  // src/components/Timeline/TimelineStack/get-stack.ts
@@ -9738,8 +9727,8 @@ var resolvedCache = new Map;
9738
9727
  var inFlight = new Set;
9739
9728
  var subscribers = new Map;
9740
9729
  var useResolvedStack = (stack2) => {
9741
- const updateResolvedStackTrace = useContext24(Internals20.SequenceStackTracesUpdateContext);
9742
- const [value, setValue] = useState36(() => {
9730
+ const updateResolvedStackTrace = useContext23(Internals20.SequenceStackTracesUpdateContext);
9731
+ const [value, setValue] = useState35(() => {
9743
9732
  if (!stack2) {
9744
9733
  return null;
9745
9734
  }
@@ -9804,10 +9793,10 @@ var slashStyle = {
9804
9793
  top: 1
9805
9794
  };
9806
9795
  var MenuCompositionName = () => {
9807
- const { canvasContent, compositions } = useContext25(Internals21.CompositionManager);
9808
- const connectionStatus = useContext25(StudioServerConnectionCtx).previewServerState.type;
9809
- const [opening, setOpening] = useState37(false);
9810
- const [hovered, setHovered] = useState37(false);
9796
+ const { canvasContent, compositions } = useContext24(Internals21.CompositionManager);
9797
+ const connectionStatus = useContext24(StudioServerConnectionCtx).previewServerState.type;
9798
+ const [opening, setOpening] = useState36(false);
9799
+ const [hovered, setHovered] = useState36(false);
9811
9800
  const composition = useMemo44(() => {
9812
9801
  if (canvasContent === null || canvasContent.type !== "composition") {
9813
9802
  return null;
@@ -9885,9 +9874,9 @@ var projectNameLinkHovered = {
9885
9874
  textDecoration: "underline"
9886
9875
  };
9887
9876
  var MenuBuildIndicator = () => {
9888
- const [isBuilding, setIsBuilding] = useState38(false);
9889
- const [projectNameHovered, setProjectNameHovered] = useState38(false);
9890
- const ctx = useContext26(StudioServerConnectionCtx).previewServerState;
9877
+ const [isBuilding, setIsBuilding] = useState37(false);
9878
+ const [projectNameHovered, setProjectNameHovered] = useState37(false);
9879
+ const ctx = useContext25(StudioServerConnectionCtx).previewServerState;
9891
9880
  const showEditorLink = window.remotion_editorName && ctx.type === "connected";
9892
9881
  const showGitLink = !showEditorLink && Boolean(window.remotion_gitSource);
9893
9882
  const handleProjectNameClick = useCallback39(async () => {
@@ -9965,16 +9954,16 @@ var MenuBuildIndicator = () => {
9965
9954
  };
9966
9955
 
9967
9956
  // src/components/SidebarCollapserControls.tsx
9968
- import { useCallback as useCallback96, useContext as useContext65, useEffect as useEffect62 } from "react";
9957
+ import { useCallback as useCallback96, useContext as useContext64, useEffect as useEffect62 } from "react";
9969
9958
 
9970
9959
  // src/components/TopPanel.tsx
9971
- import React123, { useCallback as useCallback95, useContext as useContext64, useEffect as useEffect61, useMemo as useMemo103 } from "react";
9960
+ import React123, { useCallback as useCallback95, useContext as useContext63, useEffect as useEffect61, useMemo as useMemo103 } from "react";
9972
9961
  import { Internals as Internals45 } from "remotion";
9973
9962
 
9974
9963
  // src/helpers/use-breakpoint.ts
9975
- import { useEffect as useEffect34, useRef as useRef22, useState as useState39 } from "react";
9964
+ import { useEffect as useEffect34, useRef as useRef22, useState as useState38 } from "react";
9976
9965
  function useBreakpoint(breakpoint2) {
9977
- const [compactUI, setCompactUI] = useState39(window.innerWidth < breakpoint2);
9966
+ const [compactUI, setCompactUI] = useState38(window.innerWidth < breakpoint2);
9978
9967
  const compactUIRef = useRef22(compactUI);
9979
9968
  useEffect34(() => {
9980
9969
  function handleResize() {
@@ -9992,21 +9981,21 @@ function useBreakpoint(breakpoint2) {
9992
9981
  }
9993
9982
 
9994
9983
  // src/components/CanvasIfSizeIsAvailable.tsx
9995
- import { useContext as useContext35, useMemo as useMemo53 } from "react";
9984
+ import { useContext as useContext34, useMemo as useMemo53 } from "react";
9996
9985
  import { Internals as Internals30 } from "remotion";
9997
9986
 
9998
9987
  // src/components/CanvasOrLoading.tsx
9999
- import { useContext as useContext34, useEffect as useEffect39 } from "react";
9988
+ import { useContext as useContext33, useEffect as useEffect39 } from "react";
10000
9989
  import { Internals as Internals29 } from "remotion";
10001
9990
 
10002
9991
  // src/components/Canvas.tsx
10003
9992
  import {
10004
9993
  useCallback as useCallback43,
10005
- useContext as useContext33,
9994
+ useContext as useContext32,
10006
9995
  useEffect as useEffect37,
10007
9996
  useMemo as useMemo52,
10008
9997
  useRef as useRef25,
10009
- useState as useState41
9998
+ useState as useState40
10010
9999
  } from "react";
10011
10000
  import { Internals as Internals27, watchStaticFile } from "remotion";
10012
10001
 
@@ -10141,19 +10130,19 @@ var applyZoomAroundFocalPoint = ({
10141
10130
  };
10142
10131
 
10143
10132
  // src/components/EditorGuides/index.tsx
10144
- import { useContext as useContext29, useMemo as useMemo49 } from "react";
10133
+ import { useContext as useContext28, useMemo as useMemo49 } from "react";
10145
10134
  import { Internals as Internals24 } from "remotion";
10146
10135
 
10147
10136
  // src/helpers/use-studio-canvas-dimensions.ts
10148
10137
  import { PlayerInternals as PlayerInternals10 } from "@remotion/player";
10149
- import { useContext as useContext27, useMemo as useMemo46 } from "react";
10138
+ import { useContext as useContext26, useMemo as useMemo46 } from "react";
10150
10139
  import { Internals as Internals23 } from "remotion";
10151
10140
  var useStudioCanvasDimensions = ({
10152
10141
  canvasSize,
10153
10142
  contentDimensions,
10154
10143
  assetMetadata
10155
10144
  }) => {
10156
- const { size: previewSize } = useContext27(Internals23.PreviewSizeContext);
10145
+ const { size: previewSize } = useContext26(Internals23.PreviewSizeContext);
10157
10146
  const { centerX, centerY, scale } = useMemo46(() => {
10158
10147
  if (contentDimensions === "none" || contentDimensions === null || assetMetadata && (assetMetadata.type === "not-found" || assetMetadata.type === "metadata-error") || !canvasSize) {
10159
10148
  return {
@@ -10199,7 +10188,7 @@ var useStudioCanvasDimensions = ({
10199
10188
  };
10200
10189
 
10201
10190
  // src/components/EditorGuides/Guide.tsx
10202
- import { memo, useCallback as useCallback40, useContext as useContext28, useMemo as useMemo48 } from "react";
10191
+ import { memo, useCallback as useCallback40, useContext as useContext27, useMemo as useMemo48 } from "react";
10203
10192
  import { NoReactInternals as NoReactInternals6 } from "remotion/no-react";
10204
10193
 
10205
10194
  // src/components/ForceSpecificCursor.tsx
@@ -10247,7 +10236,7 @@ var GuideComp = ({ guide, canvasDimensions, scale }) => {
10247
10236
  selectedGuideId,
10248
10237
  setHoveredGuideId,
10249
10238
  hoveredGuideId
10250
- } = useContext28(EditorShowGuidesContext);
10239
+ } = useContext27(EditorShowGuidesContext);
10251
10240
  const onPointerEnter = useCallback40(() => {
10252
10241
  setHoveredGuideId(() => guide.id);
10253
10242
  }, [guide.id, setHoveredGuideId]);
@@ -10339,11 +10328,11 @@ var EditorGuides = ({ canvasSize, contentDimensions, assetMetadata }) => {
10339
10328
  contentDimensions,
10340
10329
  assetMetadata
10341
10330
  });
10342
- const { canvasContent } = useContext29(Internals24.CompositionManager);
10331
+ const { canvasContent } = useContext28(Internals24.CompositionManager);
10343
10332
  if (canvasContent === null || canvasContent.type !== "composition") {
10344
10333
  throw new Error("Expected to be in a composition");
10345
10334
  }
10346
- const { guidesList } = useContext29(EditorShowGuidesContext);
10335
+ const { guidesList } = useContext28(EditorShowGuidesContext);
10347
10336
  const guidesForThisComposition = useMemo49(() => {
10348
10337
  return guidesList.filter((guide) => {
10349
10338
  return guide.compositionId === canvasContent.compositionId;
@@ -10364,7 +10353,7 @@ var EditorGuides_default = EditorGuides;
10364
10353
  // src/components/EditorRuler/index.tsx
10365
10354
  import {
10366
10355
  useCallback as useCallback42,
10367
- useContext as useContext31,
10356
+ useContext as useContext30,
10368
10357
  useEffect as useEffect36,
10369
10358
  useMemo as useMemo51,
10370
10359
  useRef as useRef24
@@ -10579,11 +10568,11 @@ var getRulerScaleRange = ({
10579
10568
  // src/components/EditorRuler/Ruler.tsx
10580
10569
  import {
10581
10570
  useCallback as useCallback41,
10582
- useContext as useContext30,
10571
+ useContext as useContext29,
10583
10572
  useEffect as useEffect35,
10584
10573
  useMemo as useMemo50,
10585
10574
  useRef as useRef23,
10586
- useState as useState40
10575
+ useState as useState39
10587
10576
  } from "react";
10588
10577
  import { Internals as Internals25 } from "remotion";
10589
10578
  import { jsx as jsx87 } from "react/jsx-runtime";
@@ -10609,12 +10598,12 @@ var Ruler = ({
10609
10598
  setSelectedGuideId,
10610
10599
  guidesList,
10611
10600
  setEditorShowGuides
10612
- } = useContext30(EditorShowGuidesContext);
10601
+ } = useContext29(EditorShowGuidesContext);
10613
10602
  const unsafeVideoConfig = Internals25.useUnsafeVideoConfig();
10614
10603
  if (!unsafeVideoConfig) {
10615
10604
  throw new Error("Video config not set");
10616
10605
  }
10617
- const [cursor, setCursor] = useState40(isVerticalRuler ? "ew-resize" : "ns-resize");
10606
+ const [cursor, setCursor] = useState39(isVerticalRuler ? "ew-resize" : "ns-resize");
10618
10607
  const selectedOrHoveredGuide = useMemo50(() => {
10619
10608
  return guidesList.find((guide) => guide.id === selectedGuideId) ?? guidesList.find((guide) => guide.id === hoveredGuideId) ?? null;
10620
10609
  }, [guidesList, hoveredGuideId, selectedGuideId]);
@@ -10734,7 +10723,7 @@ var EditorRulers = ({ contentDimensions, canvasSize, assetMetadata, containerRef
10734
10723
  setGuidesList,
10735
10724
  selectedGuideId,
10736
10725
  setSelectedGuideId
10737
- } = useContext31(EditorShowGuidesContext);
10726
+ } = useContext30(EditorShowGuidesContext);
10738
10727
  const rulerMarkingGaps = useMemo51(() => {
10739
10728
  const minimumGap = MINIMUM_RULER_MARKING_GAP_PX;
10740
10729
  const predefinedGap = PREDEFINED_RULER_SCALE_GAPS.find((gap) => gap * scale > minimumGap);
@@ -10890,11 +10879,11 @@ var EditorRulers = ({ contentDimensions, canvasSize, assetMetadata, containerRef
10890
10879
  };
10891
10880
 
10892
10881
  // src/components/EditorRuler/use-is-ruler-visible.ts
10893
- import { useContext as useContext32 } from "react";
10882
+ import { useContext as useContext31 } from "react";
10894
10883
  import { Internals as Internals26 } from "remotion";
10895
10884
  var useIsRulerVisible = () => {
10896
- const { canvasContent } = useContext32(Internals26.CompositionManager);
10897
- const { editorShowRulers } = useContext32(EditorShowRulersContext);
10885
+ const { canvasContent } = useContext31(Internals26.CompositionManager);
10886
+ const { editorShowRulers } = useContext31(EditorShowRulersContext);
10898
10887
  return editorShowRulers && canvasContent && canvasContent.type === "composition";
10899
10888
  };
10900
10889
 
@@ -10924,8 +10913,8 @@ var resetZoom = {
10924
10913
  };
10925
10914
  var ZOOM_PX_FACTOR = 0.003;
10926
10915
  var Canvas = ({ canvasContent, size: size2 }) => {
10927
- const { setSize, size: previewSize } = useContext33(Internals27.PreviewSizeContext);
10928
- const { editorZoomGestures } = useContext33(EditorZoomGesturesContext);
10916
+ const { setSize, size: previewSize } = useContext32(Internals27.PreviewSizeContext);
10917
+ const { editorZoomGestures } = useContext32(EditorZoomGesturesContext);
10929
10918
  const previewSnapshotRef = useRef25({
10930
10919
  previewSize,
10931
10920
  canvasSize: size2,
@@ -10937,8 +10926,8 @@ var Canvas = ({ canvasContent, size: size2 }) => {
10937
10926
  const keybindings = useKeybinding();
10938
10927
  const config = Internals27.useUnsafeVideoConfig();
10939
10928
  const areRulersVisible = useIsRulerVisible();
10940
- const { editorShowGuides } = useContext33(EditorShowGuidesContext);
10941
- const [assetResolution, setAssetResolution] = useState41(null);
10929
+ const { editorShowGuides } = useContext32(EditorShowGuidesContext);
10930
+ const [assetResolution, setAssetResolution] = useState40(null);
10942
10931
  const contentDimensions = useMemo52(() => {
10943
10932
  if ((canvasContent.type === "asset" || canvasContent.type === "output" || canvasContent.type === "output-blob") && assetResolution && assetResolution.type === "found") {
10944
10933
  return assetResolution.dimensions;
@@ -11436,9 +11425,9 @@ var container23 = {
11436
11425
  };
11437
11426
  var CanvasOrLoading = ({ size: size2 }) => {
11438
11427
  const resolved = Internals29.useResolvedVideoConfig(null);
11439
- const { setZoom } = useContext34(TimelineZoomCtx);
11440
- const { canvasContent } = useContext34(Internals29.CompositionManager);
11441
- const { error: renderError } = useContext34(RenderErrorContext);
11428
+ const { setZoom } = useContext33(TimelineZoomCtx);
11429
+ const { canvasContent } = useContext33(Internals29.CompositionManager);
11430
+ const { error: renderError } = useContext33(RenderErrorContext);
11442
11431
  useEffect39(() => {
11443
11432
  if (resolved?.type !== "success" && resolved?.type !== "success-and-refreshing") {
11444
11433
  return;
@@ -11536,7 +11525,7 @@ var ErrorLoading = ({ error, calculateMetadataContext }) => {
11536
11525
  import { jsx as jsx94 } from "react/jsx-runtime";
11537
11526
  var CanvasIfSizeIsAvailable = () => {
11538
11527
  const rulersAreVisible = useIsRulerVisible();
11539
- const context = useContext35(Internals30.CurrentScaleContext);
11528
+ const context = useContext34(Internals30.CurrentScaleContext);
11540
11529
  const sizeWithRulersApplied = useMemo53(() => {
11541
11530
  const size2 = context && context.type === "canvas-size" ? context.canvasSize : null;
11542
11531
  if (!rulersAreVisible) {
@@ -11560,7 +11549,7 @@ var CanvasIfSizeIsAvailable = () => {
11560
11549
  };
11561
11550
 
11562
11551
  // src/components/CurrentCompositionSideEffects.tsx
11563
- import { useCallback as useCallback44, useContext as useContext36, useEffect as useEffect40 } from "react";
11552
+ import { useCallback as useCallback44, useContext as useContext35, useEffect as useEffect40 } from "react";
11564
11553
  import { Internals as Internals31 } from "remotion";
11565
11554
 
11566
11555
  // src/helpers/document-title.ts
@@ -11615,8 +11604,8 @@ var getProgressInBrackets = (selectedCompositionId, jobs) => {
11615
11604
 
11616
11605
  // src/components/CurrentCompositionSideEffects.tsx
11617
11606
  var TitleUpdater = () => {
11618
- const renderQueue = useContext36(RenderQueueContext);
11619
- const { canvasContent } = useContext36(Internals31.CompositionManager);
11607
+ const renderQueue = useContext35(RenderQueueContext);
11608
+ const { canvasContent } = useContext35(Internals31.CompositionManager);
11620
11609
  const { jobs } = renderQueue;
11621
11610
  useEffect40(() => {
11622
11611
  if (!canvasContent) {
@@ -11645,7 +11634,7 @@ var TitleUpdater = () => {
11645
11634
  var CurrentCompositionKeybindings = ({ readOnlyStudio }) => {
11646
11635
  const keybindings = useKeybinding();
11647
11636
  const video = Internals31.useVideo();
11648
- const { type } = useContext36(StudioServerConnectionCtx).previewServerState;
11637
+ const { type } = useContext35(StudioServerConnectionCtx).previewServerState;
11649
11638
  const openRenderModal = useCallback44(() => {
11650
11639
  if (!video) {
11651
11640
  return;
@@ -11720,18 +11709,18 @@ function MobilePanel({
11720
11709
  // src/components/ObserveDefaultPropsContext.tsx
11721
11710
  import React63, {
11722
11711
  useCallback as useCallback45,
11723
- useContext as useContext37,
11712
+ useContext as useContext36,
11724
11713
  useEffect as useEffect41,
11725
11714
  useMemo as useMemo54,
11726
- useState as useState42
11715
+ useState as useState41
11727
11716
  } from "react";
11728
11717
  import { Internals as Internals32 } from "remotion";
11729
11718
  import { jsx as jsx96 } from "react/jsx-runtime";
11730
11719
  var ObserveDefaultPropsContext = React63.createContext(null);
11731
11720
  var ObserveDefaultProps = ({ compositionId, readOnlyStudio, children }) => {
11732
- const { previewServerState, subscribeToEvent } = useContext37(StudioServerConnectionCtx);
11733
- const { updateProps } = useContext37(Internals32.EditorPropsContext);
11734
- const [canSaveDefaultPropsObjectState, setCanSaveDefaultProps] = useState42({});
11721
+ const { previewServerState, subscribeToEvent } = useContext36(StudioServerConnectionCtx);
11722
+ const { updateProps } = useContext36(Internals32.EditorPropsContext);
11723
+ const [canSaveDefaultPropsObjectState, setCanSaveDefaultProps] = useState41({});
11735
11724
  const canSaveDefaultProps = useMemo54(() => {
11736
11725
  if (compositionId === null) {
11737
11726
  return null;
@@ -11805,10 +11794,10 @@ var ObserveDefaultProps = ({ compositionId, readOnlyStudio, children }) => {
11805
11794
  import {
11806
11795
  createRef as createRef9,
11807
11796
  useCallback as useCallback86,
11808
- useContext as useContext55,
11797
+ useContext as useContext54,
11809
11798
  useImperativeHandle as useImperativeHandle12,
11810
11799
  useMemo as useMemo97,
11811
- useState as useState60
11800
+ useState as useState59
11812
11801
  } from "react";
11813
11802
  import { Internals as Internals36 } from "remotion";
11814
11803
 
@@ -11821,7 +11810,7 @@ import {
11821
11810
  useImperativeHandle as useImperativeHandle10,
11822
11811
  useMemo as useMemo56,
11823
11812
  useRef as useRef26,
11824
- useState as useState44
11813
+ useState as useState43
11825
11814
  } from "react";
11826
11815
  import { useRemotionEnvironment as useRemotionEnvironment2 } from "remotion";
11827
11816
 
@@ -11843,10 +11832,10 @@ function getZodSchemaFromPrimitive(value, z) {
11843
11832
  // src/components/get-zod-if-possible.tsx
11844
11833
  import {
11845
11834
  createContext as createContext17,
11846
- useContext as useContext38,
11835
+ useContext as useContext37,
11847
11836
  useEffect as useEffect42,
11848
11837
  useMemo as useMemo55,
11849
- useState as useState43
11838
+ useState as useState42
11850
11839
  } from "react";
11851
11840
  import { jsx as jsx97 } from "react/jsx-runtime";
11852
11841
  async function getZodIfPossible() {
@@ -11874,18 +11863,18 @@ var getZTypesIfPossible = async () => {
11874
11863
  }
11875
11864
  };
11876
11865
  function useZodIfPossible() {
11877
- const context = useContext38(ZodContext);
11866
+ const context = useContext37(ZodContext);
11878
11867
  return context?.zod ?? null;
11879
11868
  }
11880
11869
  var useZodTypesIfPossible = () => {
11881
- const context = useContext38(ZodContext);
11870
+ const context = useContext37(ZodContext);
11882
11871
  return context?.zodTypes ?? null;
11883
11872
  };
11884
11873
  var ZodContext = createContext17(null);
11885
11874
  var ZodProvider = ({ children }) => {
11886
- const [zod, setZod] = useState43(null);
11887
- const [zodV3, setZodV3] = useState43(null);
11888
- const [zodTypes, setZodTypes] = useState43(null);
11875
+ const [zod, setZod] = useState42(null);
11876
+ const [zodV3, setZodV3] = useState42(null);
11877
+ const [zodTypes, setZodTypes] = useState42(null);
11889
11878
  useEffect42(() => {
11890
11879
  getZodIfPossible().then((z) => setZod(z));
11891
11880
  }, []);
@@ -11961,7 +11950,7 @@ var SetVisualControlsContext = createContext18({
11961
11950
  });
11962
11951
  var VisualControlsProvider = ({ children }) => {
11963
11952
  const imperativeHandles = useRef26({});
11964
- const [handles, setHandles] = useState44({});
11953
+ const [handles, setHandles] = useState43({});
11965
11954
  const state = useMemo56(() => {
11966
11955
  return {
11967
11956
  handles
@@ -12063,10 +12052,10 @@ var VisualControlsProvider = ({ children }) => {
12063
12052
  };
12064
12053
 
12065
12054
  // src/components/DefaultPropsEditor.tsx
12066
- import { useContext as useContext42 } from "react";
12055
+ import { useContext as useContext41 } from "react";
12067
12056
 
12068
12057
  // src/components/RenderModal/DataEditor.tsx
12069
- import React94, { useCallback as useCallback71, useContext as useContext41, useMemo as useMemo86, useState as useState55 } from "react";
12058
+ import React94, { useCallback as useCallback71, useContext as useContext40, useMemo as useMemo86, useState as useState54 } from "react";
12070
12059
  import { getInputProps } from "remotion";
12071
12060
  import { NoReactInternals as NoReactInternals10 } from "remotion/no-react";
12072
12061
 
@@ -12124,7 +12113,7 @@ var ValidationMessage = ({ message, align, type }) => {
12124
12113
  };
12125
12114
 
12126
12115
  // src/components/SegmentedControl.tsx
12127
- import { useCallback as useCallback47, useMemo as useMemo58, useState as useState45 } from "react";
12116
+ import { useCallback as useCallback47, useMemo as useMemo58, useState as useState44 } from "react";
12128
12117
  import { jsx as jsx100 } from "react/jsx-runtime";
12129
12118
  var container26 = {
12130
12119
  display: "flex",
@@ -12173,7 +12162,7 @@ var SegmentedControl = ({ items, needsWrapping }) => {
12173
12162
  });
12174
12163
  };
12175
12164
  var Item = ({ selected, onClick, children }) => {
12176
- const [hovered, setHovered] = useState45(false);
12165
+ const [hovered, setHovered] = useState44(false);
12177
12166
  const { tabIndex } = useZIndex();
12178
12167
  const onPointerEnter = useCallback47(() => {
12179
12168
  setHovered(true);
@@ -12268,7 +12257,7 @@ var getRenderModalWarnings = ({
12268
12257
 
12269
12258
  // src/components/RenderModal/RenderModalJSONPropsEditor.tsx
12270
12259
  import React69, { useCallback as useCallback48, useEffect as useEffect44, useMemo as useMemo60 } from "react";
12271
- import { useContext as useContext39 } from "react";
12260
+ import { useContext as useContext38 } from "react";
12272
12261
  import { NoReactInternals as NoReactInternals9 } from "remotion/no-react";
12273
12262
 
12274
12263
  // src/components/RenderModal/SchemaEditor/deep-equal.ts
@@ -12596,7 +12585,7 @@ var RenderModalJSONPropsEditor = ({
12596
12585
  if (serializedJSON === null) {
12597
12586
  throw new Error("expecting serializedJSON to be defined");
12598
12587
  }
12599
- const { subscribeToEvent } = useContext39(StudioServerConnectionCtx);
12588
+ const { subscribeToEvent } = useContext38(StudioServerConnectionCtx);
12600
12589
  const [localValue, setLocalValue] = React69.useState(() => {
12601
12590
  return parseJSON(serializedJSON.serializedString, schema);
12602
12591
  });
@@ -13070,12 +13059,12 @@ var createZodValues = (schema, zodRuntime, zodTypes) => {
13070
13059
  };
13071
13060
 
13072
13061
  // src/components/RenderModal/SchemaEditor/Fieldset.tsx
13073
- import { createContext as createContext19, useContext as useContext40, useMemo as useMemo61 } from "react";
13062
+ import { createContext as createContext19, useContext as useContext39, useMemo as useMemo61 } from "react";
13074
13063
  import { jsx as jsx104 } from "react/jsx-runtime";
13075
13064
  var SCHEMA_EDITOR_FIELDSET_PADDING = 10;
13076
13065
  var AlreadyPaddedRightContext = createContext19(false);
13077
13066
  var Fieldset = ({ children, shouldPad }) => {
13078
- const alreadyPadded = useContext40(AlreadyPaddedRightContext);
13067
+ const alreadyPadded = useContext39(AlreadyPaddedRightContext);
13079
13068
  const style8 = useMemo61(() => {
13080
13069
  if (shouldPad) {
13081
13070
  return {
@@ -13100,7 +13089,7 @@ var Fieldset = ({ children, shouldPad }) => {
13100
13089
  };
13101
13090
 
13102
13091
  // src/components/RenderModal/SchemaEditor/SchemaLabel.tsx
13103
- import { useCallback as useCallback50, useMemo as useMemo62, useState as useState46 } from "react";
13092
+ import { useCallback as useCallback50, useMemo as useMemo62, useState as useState45 } from "react";
13104
13093
 
13105
13094
  // src/components/RenderModal/InlineRemoveButton.tsx
13106
13095
  import { useCallback as useCallback49 } from "react";
@@ -13152,7 +13141,7 @@ var compactStyles = {
13152
13141
  flex: 1
13153
13142
  };
13154
13143
  var SchemaLabel = ({ jsonPath, onRemove, valid, suffix: suffix2, handleClick }) => {
13155
- const [clickableButtonHovered, setClickableButtonHovered] = useState46(false);
13144
+ const [clickableButtonHovered, setClickableButtonHovered] = useState45(false);
13156
13145
  const labelStyle4 = useMemo62(() => {
13157
13146
  return {
13158
13147
  fontFamily: "monospace",
@@ -13198,7 +13187,7 @@ var SchemaLabel = ({ jsonPath, onRemove, valid, suffix: suffix2, handleClick })
13198
13187
 
13199
13188
  // src/components/RenderModal/SchemaEditor/ZodObjectEditor.tsx
13200
13189
  import { useCallback as useCallback69 } from "react";
13201
- import React92, { useMemo as useMemo83, useState as useState54 } from "react";
13190
+ import React92, { useMemo as useMemo83, useState as useState53 } from "react";
13202
13191
 
13203
13192
  // src/components/RenderModal/layout.ts
13204
13193
  var optionRow = {
@@ -13244,7 +13233,7 @@ var fieldsetLabel = {
13244
13233
  };
13245
13234
 
13246
13235
  // src/components/RenderModal/SchemaEditor/SchemaSeparationLine.tsx
13247
- import { useCallback as useCallback51, useMemo as useMemo63, useState as useState47 } from "react";
13236
+ import { useCallback as useCallback51, useMemo as useMemo63, useState as useState46 } from "react";
13248
13237
 
13249
13238
  // src/icons/plus.tsx
13250
13239
  import { jsx as jsx107 } from "react/jsx-runtime";
@@ -13279,8 +13268,8 @@ var arraySeparationLine = {
13279
13268
  flexBasis: "100%"
13280
13269
  };
13281
13270
  var SchemaArrayItemSeparationLine = ({ onChange, index, schema, isLast, showAddButton }) => {
13282
- const [outerHovered, setOuterHovered] = useState47(false);
13283
- const [innerHovered, setInnerHovered] = useState47(false);
13271
+ const [outerHovered, setOuterHovered] = useState46(false);
13272
+ const [innerHovered, setInnerHovered] = useState46(false);
13284
13273
  const zodTypes = useZodTypesIfPossible();
13285
13274
  const z = useZodIfPossible();
13286
13275
  if (!z) {
@@ -13420,7 +13409,7 @@ var SchemaVerticalGuide = ({ isRoot, children }) => {
13420
13409
  };
13421
13410
 
13422
13411
  // src/components/RenderModal/SchemaEditor/ZodArrayEditor.tsx
13423
- import React77, { useCallback as useCallback54, useMemo as useMemo68, useState as useState49 } from "react";
13412
+ import React77, { useCallback as useCallback54, useMemo as useMemo68, useState as useState48 } from "react";
13424
13413
 
13425
13414
  // src/components/RenderModal/SchemaEditor/ZodArrayItemEditor.tsx
13426
13415
  import { useCallback as useCallback52, useMemo as useMemo65 } from "react";
@@ -13457,7 +13446,7 @@ var ZodArrayItemEditor = ({ elementSchema, onChange, jsonPath, index, value, may
13457
13446
 
13458
13447
  // src/components/RenderModal/InfoBubble.tsx
13459
13448
  import { PlayerInternals as PlayerInternals11 } from "@remotion/player";
13460
- import { useCallback as useCallback53, useEffect as useEffect45, useMemo as useMemo67, useRef as useRef27, useState as useState48 } from "react";
13449
+ import { useCallback as useCallback53, useEffect as useEffect45, useMemo as useMemo67, useRef as useRef27, useState as useState47 } from "react";
13461
13450
  import ReactDOM7 from "react-dom";
13462
13451
 
13463
13452
  // src/components/RenderModal/InfoTooltip.tsx
@@ -13540,8 +13529,8 @@ var container27 = {
13540
13529
  verticalAlign: "text-bottom"
13541
13530
  };
13542
13531
  var InfoBubble = ({ title: title4, children }) => {
13543
- const [hovered, setIsHovered] = useState48(false);
13544
- const [opened, setOpened] = useState48(false);
13532
+ const [hovered, setIsHovered] = useState47(false);
13533
+ const [opened, setOpened] = useState47(false);
13545
13534
  const ref2 = useRef27(null);
13546
13535
  const { tabIndex, currentZIndex } = useZIndex();
13547
13536
  const size2 = PlayerInternals11.useElementSize(ref2, {
@@ -13728,7 +13717,7 @@ var ZodArrayEditor = ({ schema, jsonPath, setValue, value, onRemove, mayPad }) =
13728
13717
  const onChange = useCallback54((updater, { shouldSave }) => {
13729
13718
  setValue(updater, { shouldSave });
13730
13719
  }, [setValue]);
13731
- const [expanded, setExpanded] = useState49(true);
13720
+ const [expanded, setExpanded] = useState48(true);
13732
13721
  const arrayElement = getArrayElement(schema);
13733
13722
  const suffix2 = useMemo68(() => {
13734
13723
  return expanded ? " [" : " [...] ";
@@ -13913,7 +13902,7 @@ var colorWithNewOpacity = (color, opacity, zodTypes) => {
13913
13902
  };
13914
13903
 
13915
13904
  // src/components/NewComposition/InputDragger.tsx
13916
- import React80, { useCallback as useCallback56, useEffect as useEffect47, useMemo as useMemo70, useRef as useRef29, useState as useState50 } from "react";
13905
+ import React80, { useCallback as useCallback56, useEffect as useEffect47, useMemo as useMemo70, useRef as useRef29, useState as useState49 } from "react";
13917
13906
  import { interpolate as interpolate2 } from "remotion";
13918
13907
  import { jsx as jsx117 } from "react/jsx-runtime";
13919
13908
  var isInt = (num) => {
@@ -13933,8 +13922,8 @@ var InputDraggerForwardRefFn = ({
13933
13922
  small,
13934
13923
  ...props
13935
13924
  }, ref2) => {
13936
- const [inputFallback, setInputFallback] = useState50(false);
13937
- const [dragging, setDragging] = useState50(false);
13925
+ const [inputFallback, setInputFallback] = useState49(false);
13926
+ const [dragging, setDragging] = useState49(false);
13938
13927
  const fallbackRef = useRef29(null);
13939
13928
  const pointerDownRef = useRef29(false);
13940
13929
  const style8 = useMemo70(() => {
@@ -14104,7 +14093,7 @@ import {
14104
14093
  useImperativeHandle as useImperativeHandle11,
14105
14094
  useMemo as useMemo71,
14106
14095
  useRef as useRef30,
14107
- useState as useState51
14096
+ useState as useState50
14108
14097
  } from "react";
14109
14098
  import { jsx as jsx118 } from "react/jsx-runtime";
14110
14099
  var inputBaseStyle3 = {
@@ -14113,8 +14102,8 @@ var inputBaseStyle3 = {
14113
14102
  borderWidth: 1
14114
14103
  };
14115
14104
  var RemInputTypeColorForwardRef = ({ status, ...props }, ref2) => {
14116
- const [isFocused, setIsFocused] = useState51(false);
14117
- const [isHovered, setIsHovered] = useState51(false);
14105
+ const [isFocused, setIsFocused] = useState50(false);
14106
+ const [isHovered, setIsHovered] = useState50(false);
14118
14107
  const inputRef = useRef30(null);
14119
14108
  const { tabIndex } = useZIndex();
14120
14109
  const style8 = useMemo71(() => {
@@ -14465,7 +14454,7 @@ var ZodEnumEditor = ({ schema, jsonPath, setValue, value, onRemove }) => {
14465
14454
  };
14466
14455
 
14467
14456
  // src/components/RenderModal/SchemaEditor/ZodMatrixEditor.tsx
14468
- import React86, { useMemo as useMemo76, useState as useState52 } from "react";
14457
+ import React86, { useMemo as useMemo76, useState as useState51 } from "react";
14469
14458
  import { useCallback as useCallback61 } from "react";
14470
14459
  import { jsx as jsx124, jsxs as jsxs63 } from "react/jsx-runtime";
14471
14460
  var rowStyle = {
@@ -14478,7 +14467,7 @@ var ZodMatrixEditor = ({ schema, jsonPath, setValue, value, onRemove, mayPad })
14478
14467
  setValue(updater, { shouldSave });
14479
14468
  }, [setValue]);
14480
14469
  const zodValidation = useMemo76(() => zodSafeParse(schema, value), [schema, value]);
14481
- const [expanded, setExpanded] = useState52(true);
14470
+ const [expanded, setExpanded] = useState51(true);
14482
14471
  const arrayElement = getArrayElement(schema);
14483
14472
  const suffix2 = useMemo76(() => {
14484
14473
  return expanded ? " [" : " [...] ";
@@ -14974,7 +14963,7 @@ var ZodTextareaEditor = ({ jsonPath, value, setValue, schema, onRemove, mayPad }
14974
14963
  };
14975
14964
 
14976
14965
  // src/components/RenderModal/SchemaEditor/ZodTupleEditor.tsx
14977
- import React91, { useCallback as useCallback68, useMemo as useMemo82, useState as useState53 } from "react";
14966
+ import React91, { useCallback as useCallback68, useMemo as useMemo82, useState as useState52 } from "react";
14978
14967
 
14979
14968
  // src/components/RenderModal/SchemaEditor/ZodTupleItemEditor.tsx
14980
14969
  import { useCallback as useCallback67, useMemo as useMemo81 } from "react";
@@ -15011,7 +15000,7 @@ var ZodTupleEditor = ({ schema, jsonPath, setValue, value, onRemove, mayPad }) =
15011
15000
  setValue(updater, { shouldSave });
15012
15001
  }, [setValue]);
15013
15002
  const zodValidation = useMemo82(() => zodSafeParse(schema, value), [schema, value]);
15014
- const [expanded, setExpanded] = useState53(true);
15003
+ const [expanded, setExpanded] = useState52(true);
15015
15004
  const tupleItems = getTupleItems(schema);
15016
15005
  const suffix2 = useMemo82(() => {
15017
15006
  return expanded ? " [" : " [...] ";
@@ -15400,7 +15389,7 @@ var ZodObjectEditor = ({
15400
15389
  mayPad,
15401
15390
  discriminatedUnionReplacement
15402
15391
  }) => {
15403
- const [expanded, setExpanded] = useState54(true);
15392
+ const [expanded, setExpanded] = useState53(true);
15404
15393
  const onChange = useCallback69((updater, { shouldSave }) => {
15405
15394
  setValue(updater, { shouldSave });
15406
15395
  }, [setValue]);
@@ -15709,8 +15698,8 @@ var DataEditor = ({
15709
15698
  propsEditType,
15710
15699
  canSaveDefaultProps
15711
15700
  }) => {
15712
- const [mode, setMode] = useState55("schema");
15713
- const [showWarning, setShowWarningWithoutPersistance] = useState55(() => getPersistedShowWarningState());
15701
+ const [mode, setMode] = useState54("schema");
15702
+ const [showWarning, setShowWarningWithoutPersistance] = useState54(() => getPersistedShowWarningState());
15714
15703
  const jsonEditorSetValue = useCallback71((newProps) => {
15715
15704
  setDefaultProps(typeof newProps === "function" ? newProps : () => newProps, { shouldSave: false });
15716
15705
  }, [setDefaultProps]);
@@ -15762,7 +15751,7 @@ var DataEditor = ({
15762
15751
  return val(prevVal);
15763
15752
  });
15764
15753
  }, []);
15765
- const { previewServerState } = useContext41(StudioServerConnectionCtx);
15754
+ const { previewServerState } = useContext40(StudioServerConnectionCtx);
15766
15755
  const modeItems = useMemo86(() => {
15767
15756
  return [
15768
15757
  {
@@ -15902,7 +15891,7 @@ var DefaultPropsEditor = ({
15902
15891
  setDefaultProps,
15903
15892
  propsEditType
15904
15893
  }) => {
15905
- const canSaveDefaultProps = useContext42(ObserveDefaultPropsContext);
15894
+ const canSaveDefaultProps = useContext41(ObserveDefaultPropsContext);
15906
15895
  if (canSaveDefaultProps === null) {
15907
15896
  throw new Error("ObserveDefaultPropsContext is not set");
15908
15897
  }
@@ -16115,16 +16104,16 @@ var SchemaResetButton = ({ onClick }) => {
16115
16104
  };
16116
16105
 
16117
16106
  // src/components/RenderQueue/index.tsx
16118
- import React106, { useContext as useContext51, useEffect as useEffect51, useMemo as useMemo94 } from "react";
16107
+ import React106, { useContext as useContext50, useEffect as useEffect51, useMemo as useMemo94 } from "react";
16119
16108
  import { Internals as Internals35 } from "remotion";
16120
16109
 
16121
16110
  // src/components/RenderQueue/RenderQueueItem.tsx
16122
16111
  import {
16123
16112
  useCallback as useCallback83,
16124
- useContext as useContext50,
16113
+ useContext as useContext49,
16125
16114
  useEffect as useEffect50,
16126
16115
  useMemo as useMemo93,
16127
- useState as useState56
16116
+ useState as useState55
16128
16117
  } from "react";
16129
16118
  import { Internals as Internals34 } from "remotion";
16130
16119
 
@@ -16225,7 +16214,7 @@ import { useCallback as useCallback75, useMemo as useMemo87 } from "react";
16225
16214
 
16226
16215
  // src/components/RenderQueue/ClientRenderQueueProcessor.tsx
16227
16216
  import { renderMediaOnWeb, renderStillOnWeb } from "@remotion/web-renderer";
16228
- import { useCallback as useCallback74, useContext as useContext43, useEffect as useEffect49 } from "react";
16217
+ import { useCallback as useCallback74, useContext as useContext42, useEffect as useEffect49 } from "react";
16229
16218
 
16230
16219
  // src/api/save-render-output.ts
16231
16220
  var throwIfNotOk = async (response) => {
@@ -16290,7 +16279,7 @@ var ClientRenderQueueProcessor = () => {
16290
16279
  markClientJobFailed,
16291
16280
  markClientJobCancelled,
16292
16281
  setProcessJobCallback
16293
- } = useContext43(RenderQueueContext);
16282
+ } = useContext42(RenderQueueContext);
16294
16283
  const processStillJob = useCallback74(async (job, signal) => {
16295
16284
  const compositionRef = getCompositionForJob2(job.id);
16296
16285
  if (!compositionRef) {
@@ -16481,13 +16470,13 @@ var RenderQueueDownloadItem = ({ job }) => {
16481
16470
  };
16482
16471
 
16483
16472
  // src/components/RenderQueue/RenderQueueError.tsx
16484
- import { useCallback as useCallback76, useContext as useContext44 } from "react";
16473
+ import { useCallback as useCallback76, useContext as useContext43 } from "react";
16485
16474
  import { jsx as jsx147 } from "react/jsx-runtime";
16486
16475
  var outputLocation = {
16487
16476
  ...renderQueueItemSubtitleStyle
16488
16477
  };
16489
16478
  var RenderQueueError = ({ job }) => {
16490
- const { setSelectedModal } = useContext44(ModalsContext);
16479
+ const { setSelectedModal } = useContext43(ModalsContext);
16491
16480
  const { tabIndex } = useZIndex();
16492
16481
  const onClick = useCallback76(() => {
16493
16482
  setSelectedModal({
@@ -16509,11 +16498,11 @@ var RenderQueueError = ({ job }) => {
16509
16498
  };
16510
16499
 
16511
16500
  // src/components/RenderQueue/RenderQueueItemCancelButton.tsx
16512
- import { useCallback as useCallback77, useContext as useContext45, useMemo as useMemo88 } from "react";
16501
+ import { useCallback as useCallback77, useContext as useContext44, useMemo as useMemo88 } from "react";
16513
16502
  import { jsx as jsx148 } from "react/jsx-runtime";
16514
16503
  var RenderQueueCancelButton = ({ job }) => {
16515
16504
  const isClientJob = isClientRenderJob(job);
16516
- const { cancelClientJob } = useContext45(RenderQueueContext);
16505
+ const { cancelClientJob } = useContext44(RenderQueueContext);
16517
16506
  const onClick = useCallback77((e) => {
16518
16507
  e.stopPropagation();
16519
16508
  if (isClientJob) {
@@ -16548,7 +16537,7 @@ var RenderQueueCancelButton = ({ job }) => {
16548
16537
  };
16549
16538
 
16550
16539
  // src/components/RenderQueue/RenderQueueItemStatus.tsx
16551
- import React99, { useCallback as useCallback78, useContext as useContext46 } from "react";
16540
+ import React99, { useCallback as useCallback78, useContext as useContext45 } from "react";
16552
16541
 
16553
16542
  // src/components/RenderQueue/CircularProgress.tsx
16554
16543
  import { jsx as jsx149 } from "react/jsx-runtime";
@@ -16593,7 +16582,7 @@ var invisibleStyle = {
16593
16582
  display: "flex"
16594
16583
  };
16595
16584
  var RenderQueueItemStatus = ({ job }) => {
16596
- const { setSelectedModal } = useContext46(ModalsContext);
16585
+ const { setSelectedModal } = useContext45(ModalsContext);
16597
16586
  const [hovered, setHovered] = React99.useState(false);
16598
16587
  const isClientJob = isClientRenderJob(job);
16599
16588
  const onPointerEnter = useCallback78(() => {
@@ -16745,7 +16734,7 @@ var RenderQueueOutputName = ({ job }) => {
16745
16734
  };
16746
16735
 
16747
16736
  // src/components/RenderQueue/RenderQueueProgressMessage.tsx
16748
- import { useCallback as useCallback80, useContext as useContext47 } from "react";
16737
+ import { useCallback as useCallback80, useContext as useContext46 } from "react";
16749
16738
 
16750
16739
  // src/components/RenderQueue/client-render-progress.ts
16751
16740
  var formatEtaString = (timeRemainingInMilliseconds) => {
@@ -16782,7 +16771,7 @@ var RenderQueueProgressMessage = ({ job }) => {
16782
16771
  if (job.status !== "running") {
16783
16772
  throw new Error("should not have rendered this component");
16784
16773
  }
16785
- const { setSelectedModal } = useContext47(ModalsContext);
16774
+ const { setSelectedModal } = useContext46(ModalsContext);
16786
16775
  const { tabIndex } = useZIndex();
16787
16776
  const isClientJob = isClientRenderJob(job);
16788
16777
  const onClick = useCallback80(() => {
@@ -16803,14 +16792,14 @@ var RenderQueueProgressMessage = ({ job }) => {
16803
16792
  };
16804
16793
 
16805
16794
  // src/components/RenderQueue/RenderQueueRemoveItem.tsx
16806
- import { useCallback as useCallback81, useContext as useContext48, useMemo as useMemo91 } from "react";
16795
+ import { useCallback as useCallback81, useContext as useContext47, useMemo as useMemo91 } from "react";
16807
16796
  import { Internals as Internals33 } from "remotion";
16808
16797
  import { jsx as jsx154 } from "react/jsx-runtime";
16809
16798
  var RenderQueueRemoveItem = ({ job }) => {
16810
16799
  const isClientJob = isClientRenderJob(job);
16811
- const { removeClientJob } = useContext48(RenderQueueContext);
16812
- const { canvasContent } = useContext48(Internals33.CompositionManager);
16813
- const { setCanvasContent } = useContext48(Internals33.CompositionSetters);
16800
+ const { removeClientJob } = useContext47(RenderQueueContext);
16801
+ const { canvasContent } = useContext47(Internals33.CompositionManager);
16802
+ const { setCanvasContent } = useContext47(Internals33.CompositionSetters);
16814
16803
  const onClick = useCallback81((e) => {
16815
16804
  e.stopPropagation();
16816
16805
  if (isClientJob) {
@@ -16852,7 +16841,7 @@ var RenderQueueRemoveItem = ({ job }) => {
16852
16841
  };
16853
16842
 
16854
16843
  // src/components/RenderQueue/RenderQueueRepeat.tsx
16855
- import { useCallback as useCallback82, useContext as useContext49, useMemo as useMemo92 } from "react";
16844
+ import { useCallback as useCallback82, useContext as useContext48, useMemo as useMemo92 } from "react";
16856
16845
 
16857
16846
  // src/helpers/retry-payload.ts
16858
16847
  import { NoReactInternals as NoReactInternals11 } from "remotion/no-react";
@@ -17056,9 +17045,9 @@ var makeClientRetryPayload = (job) => {
17056
17045
  // src/components/RenderQueue/RenderQueueRepeat.tsx
17057
17046
  import { jsx as jsx155 } from "react/jsx-runtime";
17058
17047
  var RenderQueueRepeatItem = ({ job }) => {
17059
- const { setSelectedModal } = useContext49(ModalsContext);
17048
+ const { setSelectedModal } = useContext48(ModalsContext);
17060
17049
  const isMobileLayout = useMobileLayout();
17061
- const { setSidebarCollapsedState } = useContext49(SidebarContext);
17050
+ const { setSidebarCollapsedState } = useContext48(SidebarContext);
17062
17051
  const isClientJob = isClientRenderJob(job);
17063
17052
  const onClick = useCallback82((e) => {
17064
17053
  e.stopPropagation();
@@ -17141,8 +17130,8 @@ var subtitle3 = {
17141
17130
  };
17142
17131
  var SELECTED_CLASSNAME = "__remotion_selected_classname";
17143
17132
  var RenderQueueItem = ({ job, selected }) => {
17144
- const [hovered, setHovered] = useState56(false);
17145
- const { setCanvasContent } = useContext50(Internals34.CompositionSetters);
17133
+ const [hovered, setHovered] = useState55(false);
17134
+ const { setCanvasContent } = useContext49(Internals34.CompositionSetters);
17146
17135
  const isClientJob = isClientRenderJob(job);
17147
17136
  const onPointerEnter = useCallback83(() => {
17148
17137
  setHovered(true);
@@ -17308,9 +17297,9 @@ var renderQueue = {
17308
17297
  overflowY: "auto"
17309
17298
  };
17310
17299
  var RenderQueue = () => {
17311
- const connectionStatus = useContext51(StudioServerConnectionCtx).previewServerState.type;
17312
- const { jobs } = useContext51(RenderQueueContext);
17313
- const { canvasContent } = useContext51(Internals35.CompositionManager);
17300
+ const connectionStatus = useContext50(StudioServerConnectionCtx).previewServerState.type;
17301
+ const { jobs } = useContext50(RenderQueueContext);
17302
+ const { canvasContent } = useContext50(Internals35.CompositionManager);
17314
17303
  const previousJobCount = React106.useRef(jobs.length);
17315
17304
  const jobCount = jobs.length;
17316
17305
  const divRef = React106.useRef(null);
@@ -17393,7 +17382,7 @@ var RenderQueue = () => {
17393
17382
  };
17394
17383
 
17395
17384
  // src/components/RendersTab.tsx
17396
- import { useContext as useContext52, useMemo as useMemo95 } from "react";
17385
+ import { useContext as useContext51, useMemo as useMemo95 } from "react";
17397
17386
  import { jsx as jsx159, jsxs as jsxs77, Fragment as Fragment21 } from "react/jsx-runtime";
17398
17387
  var row4 = {
17399
17388
  display: "flex",
@@ -17413,7 +17402,7 @@ var badge = {
17413
17402
  alignItems: "center"
17414
17403
  };
17415
17404
  var RendersTab = ({ selected, onClick }) => {
17416
- const { jobs } = useContext52(RenderQueueContext);
17405
+ const { jobs } = useContext51(RenderQueueContext);
17417
17406
  const failedJobs = jobs.filter((j) => j.status === "failed").length;
17418
17407
  const jobCount = jobs.length;
17419
17408
  const badgeStyle = useMemo95(() => {
@@ -17448,10 +17437,10 @@ var RendersTab = ({ selected, onClick }) => {
17448
17437
  };
17449
17438
 
17450
17439
  // src/components/VisualControls/VisualControlsContent.tsx
17451
- import React109, { useContext as useContext54 } from "react";
17440
+ import React109, { useContext as useContext53 } from "react";
17452
17441
 
17453
17442
  // src/components/VisualControls/VisualControlHandle.tsx
17454
- import { useCallback as useCallback85, useContext as useContext53, useEffect as useEffect53, useState as useState59 } from "react";
17443
+ import { useCallback as useCallback85, useContext as useContext52, useEffect as useEffect53, useState as useState58 } from "react";
17455
17444
  import { NoReactInternals as NoReactInternals12 } from "remotion/no-react";
17456
17445
 
17457
17446
  // src/fast-refresh-context.ts
@@ -17463,9 +17452,9 @@ var FastRefreshContext = createContext20({
17463
17452
  });
17464
17453
 
17465
17454
  // src/components/VisualControls/get-original-stack-trace.ts
17466
- import { useEffect as useEffect52, useState as useState57 } from "react";
17455
+ import { useEffect as useEffect52, useState as useState56 } from "react";
17467
17456
  var useOriginalFileName = (stack2) => {
17468
- const [originalFileName, setOriginalFileName] = useState57({ type: "loading" });
17457
+ const [originalFileName, setOriginalFileName] = useState56({ type: "loading" });
17469
17458
  useEffect52(() => {
17470
17459
  if (!stack2) {
17471
17460
  return;
@@ -17487,7 +17476,7 @@ var useOriginalFileName = (stack2) => {
17487
17476
  };
17488
17477
 
17489
17478
  // src/components/VisualControls/ClickableFileName.tsx
17490
- import { useCallback as useCallback84, useMemo as useMemo96, useState as useState58 } from "react";
17479
+ import { useCallback as useCallback84, useMemo as useMemo96, useState as useState57 } from "react";
17491
17480
 
17492
17481
  // src/components/Timeline/TimelineStack/source-attribution.ts
17493
17482
  var getOriginalSourceAttribution = (originalLocation) => {
@@ -17512,7 +17501,7 @@ var container32 = {
17512
17501
  var ClickableFileName = ({
17513
17502
  originalFileName
17514
17503
  }) => {
17515
- const [titleHovered, setTitleHovered] = useState58(false);
17504
+ const [titleHovered, setTitleHovered] = useState57(false);
17516
17505
  const hoverEffect = titleHovered && originalFileName.type === "loaded";
17517
17506
  const onTitlePointerEnter = useCallback84(() => {
17518
17507
  setTitleHovered(true);
@@ -17562,10 +17551,10 @@ var VisualControlHandle = ({ value, keyName }) => {
17562
17551
  throw new Error("expected zod");
17563
17552
  }
17564
17553
  const zodTypes = useZodTypesIfPossible();
17565
- const state = useContext53(VisualControlsContext);
17566
- const { updateValue } = useContext53(SetVisualControlsContext);
17567
- const { fastRefreshes, increaseManualRefreshes } = useContext53(FastRefreshContext);
17568
- const [_saving, setSaving] = useState59(false);
17554
+ const state = useContext52(VisualControlsContext);
17555
+ const { updateValue } = useContext52(SetVisualControlsContext);
17556
+ const { fastRefreshes, increaseManualRefreshes } = useContext52(FastRefreshContext);
17557
+ const [_saving, setSaving] = useState58(false);
17569
17558
  const currentValue = getVisualControlEditedValue({
17570
17559
  handles: state.handles,
17571
17560
  key: keyName
@@ -17654,7 +17643,7 @@ var container33 = {
17654
17643
  overflowY: "auto"
17655
17644
  };
17656
17645
  var VisualControlsContent = () => {
17657
- const { handles } = useContext54(VisualControlsContext);
17646
+ const { handles } = useContext53(VisualControlsContext);
17658
17647
  const entries = Object.entries(handles);
17659
17648
  return /* @__PURE__ */ jsx163("div", {
17660
17649
  style: container33,
@@ -17697,10 +17686,10 @@ var persistSelectedOptionsSidebarPanel2 = (panel2) => {
17697
17686
  };
17698
17687
  var optionsSidebarTabs = createRef9();
17699
17688
  var OptionsPanel = ({ readOnlyStudio }) => {
17700
- const { props, updateProps } = useContext55(Internals36.EditorPropsContext);
17689
+ const { props, updateProps } = useContext54(Internals36.EditorPropsContext);
17701
17690
  const renderingAvailable = !readOnlyStudio || SHOW_BROWSER_RENDERING;
17702
17691
  const isMobileLayout = useMobileLayout();
17703
- const visualControlsTabActivated = useContext55(VisualControlsTabActivatedContext);
17692
+ const visualControlsTabActivated = useContext54(VisualControlsTabActivatedContext);
17704
17693
  const container34 = useMemo97(() => ({
17705
17694
  height: "100%",
17706
17695
  width: "100%",
@@ -17709,7 +17698,7 @@ var OptionsPanel = ({ readOnlyStudio }) => {
17709
17698
  flexDirection: "column",
17710
17699
  flex: 1
17711
17700
  }), [isMobileLayout]);
17712
- const [panel2, setPanel] = useState60(() => getSelectedPanel2(renderingAvailable));
17701
+ const [panel2, setPanel] = useState59(() => getSelectedPanel2(renderingAvailable));
17713
17702
  const onPropsSelected = useCallback86(() => {
17714
17703
  setPanel("input-props");
17715
17704
  persistSelectedOptionsSidebarPanel2("input-props");
@@ -17730,7 +17719,7 @@ var OptionsPanel = ({ readOnlyStudio }) => {
17730
17719
  }
17731
17720
  };
17732
17721
  }, []);
17733
- const { compositions, canvasContent } = useContext55(Internals36.CompositionManager);
17722
+ const { compositions, canvasContent } = useContext54(Internals36.CompositionManager);
17734
17723
  const composition = useMemo97(() => {
17735
17724
  if (canvasContent === null || canvasContent.type !== "composition") {
17736
17725
  return null;
@@ -17867,7 +17856,7 @@ var OptionsPanel = ({ readOnlyStudio }) => {
17867
17856
  };
17868
17857
 
17869
17858
  // src/components/PreviewToolbar.tsx
17870
- import { useContext as useContext61, useEffect as useEffect59, useRef as useRef33, useState as useState64 } from "react";
17859
+ import { useContext as useContext60, useEffect as useEffect59, useRef as useRef33, useState as useState63 } from "react";
17871
17860
  import { Internals as Internals44 } from "remotion";
17872
17861
 
17873
17862
  // src/state/loop.ts
@@ -17881,7 +17870,7 @@ var loadLoopOption = () => {
17881
17870
  };
17882
17871
 
17883
17872
  // src/components/CheckboardToggle.tsx
17884
- import { useCallback as useCallback87, useContext as useContext56 } from "react";
17873
+ import { useCallback as useCallback87, useContext as useContext55 } from "react";
17885
17874
  import { NoReactInternals as NoReactInternals13 } from "remotion/no-react";
17886
17875
  import { jsx as jsx165 } from "react/jsx-runtime";
17887
17876
  var accessibilityLabel2 = [
@@ -17889,7 +17878,7 @@ var accessibilityLabel2 = [
17889
17878
  areKeyboardShortcutsDisabled() ? null : "(T)"
17890
17879
  ].filter(NoReactInternals13.truthy).join(" ");
17891
17880
  var CheckboardToggle = () => {
17892
- const { checkerboard, setCheckerboard } = useContext56(CheckerboardContext);
17881
+ const { checkerboard, setCheckerboard } = useContext55(CheckerboardContext);
17893
17882
  const onClick = useCallback87(() => {
17894
17883
  setCheckerboard((c) => {
17895
17884
  return !c;
@@ -17920,10 +17909,10 @@ var CheckboardToggle = () => {
17920
17909
  // src/components/FpsCounter.tsx
17921
17910
  import {
17922
17911
  useEffect as useEffect54,
17923
- useLayoutEffect as useLayoutEffect5,
17912
+ useLayoutEffect as useLayoutEffect4,
17924
17913
  useMemo as useMemo98,
17925
17914
  useRef as useRef31,
17926
- useState as useState61
17915
+ useState as useState60
17927
17916
  } from "react";
17928
17917
  import { Internals as Internals37 } from "remotion";
17929
17918
  import { jsxs as jsxs81 } from "react/jsx-runtime";
@@ -17941,17 +17930,17 @@ var FpsCounter = ({ playbackSpeed }) => {
17941
17930
  const videoConfig = Internals37.useUnsafeVideoConfig();
17942
17931
  const [playing] = Internals37.Timeline.usePlayingState();
17943
17932
  const frame2 = Internals37.Timeline.useTimelinePosition();
17944
- const [marker, rerender] = useState61({});
17945
- const [fps, setFps] = useState61(0);
17933
+ const [marker, rerender] = useState60({});
17934
+ const [fps, setFps] = useState60(0);
17946
17935
  const previousUpdates = useRef31([]);
17947
17936
  const fpsRef = useRef31(0);
17948
17937
  const playingRef = useRef31(playing);
17949
- useLayoutEffect5(() => {
17938
+ useLayoutEffect4(() => {
17950
17939
  fpsRef.current = 0;
17951
17940
  previousUpdates.current = [];
17952
17941
  playingRef.current = playing;
17953
17942
  }, [playing]);
17954
- useLayoutEffect5(() => {
17943
+ useLayoutEffect4(() => {
17955
17944
  if (playingRef.current === false)
17956
17945
  return;
17957
17946
  previousUpdates.current = pushWithMaxSize(previousUpdates.current, performance.now(), 15);
@@ -18001,7 +17990,7 @@ var FpsCounter = ({ playbackSpeed }) => {
18001
17990
  };
18002
17991
 
18003
17992
  // src/components/FullscreenToggle.tsx
18004
- import { useCallback as useCallback88, useContext as useContext57, useEffect as useEffect55 } from "react";
17993
+ import { useCallback as useCallback88, useContext as useContext56, useEffect as useEffect55 } from "react";
18005
17994
  import { Internals as Internals38 } from "remotion";
18006
17995
  import { NoReactInternals as NoReactInternals14 } from "remotion/no-react";
18007
17996
  import { jsx as jsx166 } from "react/jsx-runtime";
@@ -18011,7 +18000,7 @@ var accessibilityLabel3 = [
18011
18000
  ].filter(NoReactInternals14.truthy).join(" ");
18012
18001
  var FullScreenToggle = () => {
18013
18002
  const keybindings = useKeybinding();
18014
- const { setSize } = useContext57(Internals38.PreviewSizeContext);
18003
+ const { setSize } = useContext56(Internals38.PreviewSizeContext);
18015
18004
  const onClick = useCallback88(() => {
18016
18005
  drawRef.current?.requestFullscreen();
18017
18006
  if (document.fullscreenElement)
@@ -18245,7 +18234,7 @@ var PlaybackRatePersistor = () => {
18245
18234
  };
18246
18235
 
18247
18236
  // src/components/PlaybackRateSelector.tsx
18248
- import { useContext as useContext58, useMemo as useMemo99 } from "react";
18237
+ import { useContext as useContext57, useMemo as useMemo99 } from "react";
18249
18238
  import { Internals as Internals40 } from "remotion";
18250
18239
  import { jsx as jsx170 } from "react/jsx-runtime";
18251
18240
  var commonPlaybackRates = [
@@ -18267,7 +18256,7 @@ var getPlaybackRateLabel = (playbackRate) => {
18267
18256
  var accessibilityLabel5 = "Change the playback rate";
18268
18257
  var comboStyle2 = { width: 80 };
18269
18258
  var PlaybackRateSelector = ({ playbackRate, setPlaybackRate }) => {
18270
- const { canvasContent } = useContext58(Internals40.CompositionManager);
18259
+ const { canvasContent } = useContext57(Internals40.CompositionManager);
18271
18260
  const isStill = useIsStill();
18272
18261
  const style9 = useMemo99(() => {
18273
18262
  return {
@@ -18317,7 +18306,7 @@ var PlaybackRateSelector = ({ playbackRate, setPlaybackRate }) => {
18317
18306
 
18318
18307
  // src/components/PlayPause.tsx
18319
18308
  import { PlayerInternals as PlayerInternals13 } from "@remotion/player";
18320
- import { useCallback as useCallback92, useEffect as useEffect58, useState as useState62 } from "react";
18309
+ import { useCallback as useCallback92, useEffect as useEffect58, useState as useState61 } from "react";
18321
18310
  import { Internals as Internals41 } from "remotion";
18322
18311
 
18323
18312
  // src/icons/jump-to-start.tsx
@@ -18414,7 +18403,7 @@ var iconButton = {
18414
18403
  var PlayPause = ({ playbackRate, loop, bufferStateDelayInMilliseconds }) => {
18415
18404
  const { inFrame, outFrame } = useTimelineInOutFramePosition();
18416
18405
  const videoConfig = Internals41.useUnsafeVideoConfig();
18417
- const [showBufferIndicator, setShowBufferState] = useState62(false);
18406
+ const [showBufferIndicator, setShowBufferState] = useState61(false);
18418
18407
  const {
18419
18408
  playing,
18420
18409
  play,
@@ -18676,7 +18665,7 @@ var PlayPause = ({ playbackRate, loop, bufferStateDelayInMilliseconds }) => {
18676
18665
 
18677
18666
  // src/components/RenderButton.tsx
18678
18667
  import { PlayerInternals as PlayerInternals14 } from "@remotion/player";
18679
- import { useCallback as useCallback93, useContext as useContext59, useMemo as useMemo100, useRef as useRef32, useState as useState63 } from "react";
18668
+ import { useCallback as useCallback93, useContext as useContext58, useMemo as useMemo100, useRef as useRef32, useState as useState62 } from "react";
18680
18669
  import ReactDOM8 from "react-dom";
18681
18670
  import { Internals as Internals42 } from "remotion";
18682
18671
  import { jsx as jsx177, jsxs as jsxs83, Fragment as Fragment24 } from "react/jsx-runtime";
@@ -18747,9 +18736,9 @@ var RenderButton = ({
18747
18736
  readOnlyStudio
18748
18737
  }) => {
18749
18738
  const { inFrame, outFrame } = useTimelineInOutFramePosition();
18750
- const { setSelectedModal } = useContext59(ModalsContext);
18751
- const [preferredRenderType, setPreferredRenderType] = useState63(() => getInitialRenderType(readOnlyStudio));
18752
- const [dropdownOpened, setDropdownOpened] = useState63(false);
18739
+ const { setSelectedModal } = useContext58(ModalsContext);
18740
+ const [preferredRenderType, setPreferredRenderType] = useState62(() => getInitialRenderType(readOnlyStudio));
18741
+ const [dropdownOpened, setDropdownOpened] = useState62(false);
18753
18742
  const dropdownRef = useRef32(null);
18754
18743
  const containerRef = useRef32(null);
18755
18744
  const { currentZIndex } = useZIndex();
@@ -18786,7 +18775,7 @@ var RenderButton = ({
18786
18775
  return !o;
18787
18776
  });
18788
18777
  }, [refresh]);
18789
- const connectionStatus = useContext59(StudioServerConnectionCtx).previewServerState.type;
18778
+ const connectionStatus = useContext58(StudioServerConnectionCtx).previewServerState.type;
18790
18779
  const canServerRender = connectionStatus === "connected";
18791
18780
  const canRender = canServerRender || SHOW_BROWSER_RENDERING || readOnlyStudio;
18792
18781
  const renderType = useMemo100(() => {
@@ -18816,7 +18805,7 @@ var RenderButton = ({
18816
18805
  }, []);
18817
18806
  const video = Internals42.useVideo();
18818
18807
  const getCurrentFrame2 = PlayerInternals14.useFrameImperative();
18819
- const { props } = useContext59(Internals42.EditorPropsContext);
18808
+ const { props } = useContext58(Internals42.EditorPropsContext);
18820
18809
  const openServerRenderModal = useCallback93((copyCommandOnly) => {
18821
18810
  if (!video) {
18822
18811
  return null;
@@ -19139,7 +19128,7 @@ var RenderButton = ({
19139
19128
  };
19140
19129
 
19141
19130
  // src/components/Timeline/TimelineZoomControls.tsx
19142
- import { useCallback as useCallback94, useContext as useContext60 } from "react";
19131
+ import { useCallback as useCallback94, useContext as useContext59 } from "react";
19143
19132
  import { Internals as Internals43 } from "remotion";
19144
19133
 
19145
19134
  // src/icons/minus.tsx
@@ -19172,8 +19161,8 @@ var iconStyle4 = {
19172
19161
  width: 14
19173
19162
  };
19174
19163
  var TimelineZoomControls = () => {
19175
- const { canvasContent } = useContext60(Internals43.CompositionManager);
19176
- const { setZoom, zoom: zoomMap } = useContext60(TimelineZoomCtx);
19164
+ const { canvasContent } = useContext59(Internals43.CompositionManager);
19165
+ const { setZoom, zoom: zoomMap } = useContext59(TimelineZoomCtx);
19177
19166
  const { tabIndex } = useZIndex();
19178
19167
  const onMinusClicked = useCallback94(() => {
19179
19168
  if (canvasContent === null || canvasContent.type !== "composition") {
@@ -19301,15 +19290,15 @@ var padding2 = {
19301
19290
  };
19302
19291
  var PreviewToolbar = ({ readOnlyStudio, bufferStateDelayInMilliseconds }) => {
19303
19292
  const { playbackRate, setPlaybackRate } = Internals44.useTimelineContext();
19304
- const { mediaMuted } = useContext61(Internals44.MediaVolumeContext);
19305
- const { setMediaMuted } = useContext61(Internals44.SetMediaVolumeContext);
19306
- const { canvasContent } = useContext61(Internals44.CompositionManager);
19293
+ const { mediaMuted } = useContext60(Internals44.MediaVolumeContext);
19294
+ const { setMediaMuted } = useContext60(Internals44.SetMediaVolumeContext);
19295
+ const { canvasContent } = useContext60(Internals44.CompositionManager);
19307
19296
  const isVideoComposition = useIsVideoComposition();
19308
19297
  const previewToolbarRef = useRef33(null);
19309
19298
  const leftScrollIndicatorRef = useRef33(null);
19310
19299
  const rightScrollIndicatorRef = useRef33(null);
19311
19300
  const isStill = useIsStill();
19312
- const [loop, setLoop] = useState64(loadLoopOption());
19301
+ const [loop, setLoop] = useState63(loadLoopOption());
19313
19302
  const isFullscreenSupported = checkFullscreenSupport();
19314
19303
  const isMobileLayout = useMobileLayout();
19315
19304
  useEffect59(() => {
@@ -19463,7 +19452,7 @@ var PreviewToolbar = ({ readOnlyStudio, bufferStateDelayInMilliseconds }) => {
19463
19452
  };
19464
19453
 
19465
19454
  // src/components/Splitter/SplitterContainer.tsx
19466
- import { useMemo as useMemo101, useRef as useRef34, useState as useState65 } from "react";
19455
+ import { useMemo as useMemo101, useRef as useRef34, useState as useState64 } from "react";
19467
19456
 
19468
19457
  // src/state/timeline.ts
19469
19458
  var localStorageKey4 = (id) => `remotion.editor.timelineFlex.${id}`;
@@ -19517,7 +19506,7 @@ var containerColumn = {
19517
19506
  };
19518
19507
  var SplitterContainer = ({ orientation, children, defaultFlex, maxFlex, minFlex, id }) => {
19519
19508
  const [initialTimelineFlex, persistFlex] = useTimelineFlex(id);
19520
- const [flexValue, setFlexValue] = useState65(initialTimelineFlex ?? defaultFlex);
19509
+ const [flexValue, setFlexValue] = useState64(initialTimelineFlex ?? defaultFlex);
19521
19510
  const ref2 = useRef34(null);
19522
19511
  const isDragging = useRef34(false);
19523
19512
  const value = useMemo101(() => {
@@ -19554,11 +19543,11 @@ var SplitterContainer = ({ orientation, children, defaultFlex, maxFlex, minFlex,
19554
19543
  };
19555
19544
 
19556
19545
  // src/components/Splitter/SplitterElement.tsx
19557
- import { useContext as useContext62, useMemo as useMemo102 } from "react";
19546
+ import { useContext as useContext61, useMemo as useMemo102 } from "react";
19558
19547
  import { interpolateColors, random } from "remotion";
19559
19548
  import { jsx as jsx182, jsxs as jsxs86, Fragment as Fragment26 } from "react/jsx-runtime";
19560
19549
  var SplitterElement = ({ children, type, sticky }) => {
19561
- const context = useContext62(SplitterContext);
19550
+ const context = useContext61(SplitterContext);
19562
19551
  const style9 = useMemo102(() => {
19563
19552
  return {
19564
19553
  flex: (type === "flexer" ? context.flexValue : 1 - context.flexValue) * 1000,
@@ -19592,7 +19581,7 @@ var SplitterElement = ({ children, type, sticky }) => {
19592
19581
 
19593
19582
  // src/components/Splitter/SplitterHandle.tsx
19594
19583
  import { PlayerInternals as PlayerInternals15 } from "@remotion/player";
19595
- import { useContext as useContext63, useEffect as useEffect60, useRef as useRef35, useState as useState66 } from "react";
19584
+ import { useContext as useContext62, useEffect as useEffect60, useRef as useRef35, useState as useState65 } from "react";
19596
19585
  import { jsx as jsx183 } from "react/jsx-runtime";
19597
19586
  var SPLITTER_HANDLE_SIZE = 3;
19598
19587
  var containerRow2 = {
@@ -19602,11 +19591,11 @@ var containerColumn2 = {
19602
19591
  width: SPLITTER_HANDLE_SIZE
19603
19592
  };
19604
19593
  var SplitterHandle = ({ allowToCollapse, onCollapse }) => {
19605
- const context = useContext63(SplitterContext);
19594
+ const context = useContext62(SplitterContext);
19606
19595
  if (!context) {
19607
19596
  throw new Error("Cannot find splitter context");
19608
19597
  }
19609
- const [lastPointerUp, setLastPointerUp] = useState66(() => Date.now());
19598
+ const [lastPointerUp, setLastPointerUp] = useState65(() => Date.now());
19610
19599
  const ref2 = useRef35(null);
19611
19600
  useEffect60(() => {
19612
19601
  if (context.isDragging.current) {
@@ -19757,7 +19746,7 @@ var row5 = {
19757
19746
  minHeight: 0
19758
19747
  };
19759
19748
  var useResponsiveSidebarStatus = () => {
19760
- const { sidebarCollapsedStateLeft } = useContext64(SidebarContext);
19749
+ const { sidebarCollapsedStateLeft } = useContext63(SidebarContext);
19761
19750
  const responsiveLeftStatus = useBreakpoint(1200) ? "collapsed" : "expanded";
19762
19751
  const actualStateLeft = useMemo103(() => {
19763
19752
  if (sidebarCollapsedStateLeft === "collapsed") {
@@ -19771,9 +19760,9 @@ var useResponsiveSidebarStatus = () => {
19771
19760
  return actualStateLeft;
19772
19761
  };
19773
19762
  var TopPanelInner = ({ readOnlyStudio, onMounted, drawRef: drawRef2, bufferStateDelayInMilliseconds }) => {
19774
- const { setSidebarCollapsedState, sidebarCollapsedStateRight } = useContext64(SidebarContext);
19763
+ const { setSidebarCollapsedState, sidebarCollapsedStateRight } = useContext63(SidebarContext);
19775
19764
  const rulersAreVisible = useIsRulerVisible();
19776
- const { canvasContent } = useContext64(Internals45.CompositionManager);
19765
+ const { canvasContent } = useContext63(Internals45.CompositionManager);
19777
19766
  const actualStateLeft = useResponsiveSidebarStatus();
19778
19767
  const actualStateRight = useMemo103(() => {
19779
19768
  if (sidebarCollapsedStateRight === "collapsed") {
@@ -19895,7 +19884,7 @@ var style9 = {
19895
19884
  position: "relative"
19896
19885
  };
19897
19886
  var SidebarCollapserControls = () => {
19898
- const { setSidebarCollapsedState, sidebarCollapsedStateRight } = useContext65(SidebarContext);
19887
+ const { setSidebarCollapsedState, sidebarCollapsedStateRight } = useContext64(SidebarContext);
19899
19888
  const keybindings = useKeybinding();
19900
19889
  const leftSidebarStatus = useResponsiveSidebarStatus();
19901
19890
  const leftIcon = useCallback96((color) => {
@@ -20033,10 +20022,10 @@ var SidebarCollapserControls = () => {
20033
20022
  // src/components/UndoRedoButtons.tsx
20034
20023
  import {
20035
20024
  useCallback as useCallback97,
20036
- useContext as useContext66,
20025
+ useContext as useContext65,
20037
20026
  useEffect as useEffect63,
20038
20027
  useRef as useRef36,
20039
- useState as useState67
20028
+ useState as useState66
20040
20029
  } from "react";
20041
20030
 
20042
20031
  // src/icons/redo.tsx
@@ -20072,9 +20061,9 @@ var iconStyle5 = {
20072
20061
  height: 16
20073
20062
  };
20074
20063
  var UndoRedoButtons = () => {
20075
- const [undoFile, setUndoFile] = useState67(null);
20076
- const [redoFile, setRedoFile] = useState67(null);
20077
- const { subscribeToEvent } = useContext66(StudioServerConnectionCtx);
20064
+ const [undoFile, setUndoFile] = useState66(null);
20065
+ const [redoFile, setRedoFile] = useState66(null);
20066
+ const { subscribeToEvent } = useContext65(StudioServerConnectionCtx);
20078
20067
  const keybindings = useKeybinding();
20079
20068
  const undoInFlight = useRef36(false);
20080
20069
  const redoInFlight = useRef36(false);
@@ -20179,10 +20168,10 @@ var UndoRedoButtons = () => {
20179
20168
  // src/components/UpdateCheck.tsx
20180
20169
  import {
20181
20170
  useCallback as useCallback98,
20182
- useContext as useContext67,
20171
+ useContext as useContext66,
20183
20172
  useEffect as useEffect64,
20184
20173
  useMemo as useMemo104,
20185
- useState as useState68
20174
+ useState as useState67
20186
20175
  } from "react";
20187
20176
  import { VERSION } from "remotion";
20188
20177
  import { jsx as jsx189 } from "react/jsx-runtime";
@@ -20198,10 +20187,10 @@ var buttonStyle3 = {
20198
20187
  justifyContent: "center"
20199
20188
  };
20200
20189
  var UpdateCheck = () => {
20201
- const [info, setInfo] = useState68(null);
20202
- const { setSelectedModal } = useContext67(ModalsContext);
20190
+ const [info, setInfo] = useState67(null);
20191
+ const { setSelectedModal } = useContext66(ModalsContext);
20203
20192
  const { tabIndex } = useZIndex();
20204
- const [knownBugs, setKnownBugs] = useState68(null);
20193
+ const [knownBugs, setKnownBugs] = useState67(null);
20205
20194
  const hasKnownBugs = useMemo104(() => {
20206
20195
  return knownBugs && knownBugs.length > 0;
20207
20196
  }, [knownBugs]);
@@ -20297,7 +20286,7 @@ var flex2 = {
20297
20286
  flex: 1
20298
20287
  };
20299
20288
  var MenuToolbar = ({ readOnlyStudio }) => {
20300
- const [selected, setSelected] = useState69(null);
20289
+ const [selected, setSelected] = useState68(null);
20301
20290
  const mobileLayout = useMobileLayout();
20302
20291
  const fixedWidthRight = useMemo105(() => {
20303
20292
  return {
@@ -20403,7 +20392,7 @@ var MenuToolbar = ({ readOnlyStudio }) => {
20403
20392
  };
20404
20393
 
20405
20394
  // src/components/Timeline/Timeline.tsx
20406
- import React150, { useContext as useContext80, useMemo as useMemo123 } from "react";
20395
+ import React150, { useContext as useContext79, useMemo as useMemo123 } from "react";
20407
20396
  import { Internals as Internals57 } from "remotion";
20408
20397
 
20409
20398
  // src/helpers/get-sequence-visible-range.ts
@@ -20450,7 +20439,8 @@ var getTimelineNestedLevel = (sequence, allSequences, depth) => {
20450
20439
  if (!parentSequence) {
20451
20440
  throw new Error("has parentId but no parent");
20452
20441
  }
20453
- return getTimelineNestedLevel(parentSequence, allSequences, depth + 1);
20442
+ const parentContributes = parentSequence.showInTimeline;
20443
+ return getTimelineNestedLevel(parentSequence, allSequences, parentContributes ? depth + 1 : depth);
20454
20444
  };
20455
20445
 
20456
20446
  // src/helpers/get-timeline-sequence-hash.ts
@@ -20499,6 +20489,19 @@ var getTimelineSequenceSequenceSortKey = (track, tracks, sameHashes = {}, nonceR
20499
20489
  };
20500
20490
 
20501
20491
  // src/helpers/calculate-timeline.ts
20492
+ var getInheritedLoopDisplay = (sequence, sequences) => {
20493
+ if (sequence.loopDisplay) {
20494
+ return sequence.loopDisplay;
20495
+ }
20496
+ if (!sequence.parent) {
20497
+ return;
20498
+ }
20499
+ const parent = sequences.find((s) => s.id === sequence.parent);
20500
+ if (!parent) {
20501
+ return;
20502
+ }
20503
+ return getInheritedLoopDisplay(parent, sequences);
20504
+ };
20502
20505
  var calculateTimeline = ({
20503
20506
  sequences
20504
20507
  }) => {
@@ -20527,7 +20530,8 @@ var calculateTimeline = ({
20527
20530
  sequence: {
20528
20531
  ...sequence,
20529
20532
  from: visibleStart,
20530
- duration: visibleDuration
20533
+ duration: visibleDuration,
20534
+ loopDisplay: sequence.type === "audio" || sequence.type === "video" ? getInheritedLoopDisplay(sequence, sortedSequences) : sequence.loopDisplay
20531
20535
  },
20532
20536
  depth: getTimelineNestedLevel(sequence, sortedSequences, 0),
20533
20537
  hash: actualHash,
@@ -20554,7 +20558,7 @@ var calculateTimeline = ({
20554
20558
  };
20555
20559
 
20556
20560
  // src/components/ExpandedTracksProvider.tsx
20557
- import { createContext as createContext21, useCallback as useCallback100, useMemo as useMemo106, useState as useState70 } from "react";
20561
+ import { createContext as createContext21, useCallback as useCallback100, useMemo as useMemo106, useState as useState69 } from "react";
20558
20562
  import { jsx as jsx191 } from "react/jsx-runtime";
20559
20563
  var ExpandedTracksContext = createContext21({
20560
20564
  expandedTracks: {},
@@ -20563,7 +20567,7 @@ var ExpandedTracksContext = createContext21({
20563
20567
  }
20564
20568
  });
20565
20569
  var ExpandedTracksProvider = ({ children }) => {
20566
- const [expandedTracks, setExpandedTracks] = useState70({});
20570
+ const [expandedTracks, setExpandedTracks] = useState69({});
20567
20571
  const toggleTrack = useCallback100((id) => {
20568
20572
  setExpandedTracks((prev) => ({
20569
20573
  ...prev,
@@ -20620,16 +20624,16 @@ var MaxTimelineTracksReached = () => {
20620
20624
  import { PlayerInternals as PlayerInternals16 } from "@remotion/player";
20621
20625
  import {
20622
20626
  useCallback as useCallback101,
20623
- useContext as useContext70,
20627
+ useContext as useContext69,
20624
20628
  useEffect as useEffect65,
20625
20629
  useMemo as useMemo108,
20626
20630
  useRef as useRef37,
20627
- useState as useState71
20631
+ useState as useState70
20628
20632
  } from "react";
20629
20633
  import { Internals as Internals47, useVideoConfig as useVideoConfig4 } from "remotion";
20630
20634
 
20631
20635
  // src/components/Timeline/TimelineInOutPointer.tsx
20632
- import { createRef as createRef10, useContext as useContext68 } from "react";
20636
+ import { createRef as createRef10, useContext as useContext67 } from "react";
20633
20637
  import { Internals as Internals46 } from "remotion";
20634
20638
  import { jsx as jsx192, jsxs as jsxs92, Fragment as Fragment29 } from "react/jsx-runtime";
20635
20639
  var areaHighlight = {
@@ -20644,7 +20648,7 @@ var outMarkerAreaRef = createRef10();
20644
20648
  var TimelineInOutPointer = () => {
20645
20649
  const { inFrame, outFrame } = useTimelineInOutFramePosition();
20646
20650
  const videoConfig = Internals46.useUnsafeVideoConfig();
20647
- const timelineWidth = useContext68(TimelineWidthContext);
20651
+ const timelineWidth = useContext67(TimelineWidthContext);
20648
20652
  if (!videoConfig || timelineWidth === null) {
20649
20653
  return null;
20650
20654
  }
@@ -20671,7 +20675,7 @@ var TimelineInOutPointer = () => {
20671
20675
  };
20672
20676
 
20673
20677
  // src/components/Timeline/TimelineInOutPointerHandle.tsx
20674
- import { createRef as createRef11, useContext as useContext69, useMemo as useMemo107 } from "react";
20678
+ import { createRef as createRef11, useContext as useContext68, useMemo as useMemo107 } from "react";
20675
20679
  import { useVideoConfig as useVideoConfig3 } from "remotion";
20676
20680
  import { jsx as jsx193 } from "react/jsx-runtime";
20677
20681
  var line3 = {
@@ -20704,7 +20708,7 @@ var TimelineInOutPointerHandle = ({
20704
20708
  type,
20705
20709
  atFrame
20706
20710
  }) => {
20707
- const timelineWidth = useContext69(TimelineWidthContext);
20711
+ const timelineWidth = useContext68(TimelineWidthContext);
20708
20712
  if (timelineWidth === null) {
20709
20713
  return null;
20710
20714
  }
@@ -20740,8 +20744,8 @@ var getClientXWithScroll = (x) => {
20740
20744
  };
20741
20745
  var TimelineDragHandler = () => {
20742
20746
  const video = Internals47.useUnsafeVideoConfig();
20743
- const { zoom: zoomMap } = useContext70(TimelineZoomCtx);
20744
- const { canvasContent } = useContext70(Internals47.CompositionManager);
20747
+ const { zoom: zoomMap } = useContext69(TimelineZoomCtx);
20748
+ const { canvasContent } = useContext69(Internals47.CompositionManager);
20745
20749
  const containerStyle2 = useMemo108(() => {
20746
20750
  if (!canvasContent || canvasContent.type !== "composition") {
20747
20751
  return {};
@@ -20769,10 +20773,10 @@ var Inner2 = () => {
20769
20773
  });
20770
20774
  const { isHighestContext } = useZIndex();
20771
20775
  const setFrame = Internals47.useTimelineSetFrame();
20772
- const [inOutDragging, setInOutDragging] = useState71({
20776
+ const [inOutDragging, setInOutDragging] = useState70({
20773
20777
  dragging: false
20774
20778
  });
20775
- const timelineWidth = useContext70(TimelineWidthContext);
20779
+ const timelineWidth = useContext69(TimelineWidthContext);
20776
20780
  const get = useCallback101((frame2) => {
20777
20781
  if (timelineWidth === null) {
20778
20782
  throw new Error("timeline width is not yet determined");
@@ -20783,7 +20787,7 @@ var Inner2 = () => {
20783
20787
  const left3 = size4?.left ?? 0;
20784
20788
  const { inFrame, outFrame } = useTimelineInOutFramePosition();
20785
20789
  const { setInAndOutFrames } = useTimelineSetInOutFramePosition();
20786
- const [dragging, setDragging] = useState71({
20790
+ const [dragging, setDragging] = useState70({
20787
20791
  dragging: false
20788
20792
  });
20789
20793
  const { playing, play, pause, seek } = PlayerInternals16.usePlayer();
@@ -21166,14 +21170,14 @@ import { PlayerInternals as PlayerInternals18 } from "@remotion/player";
21166
21170
  import { useRef as useRef41 } from "react";
21167
21171
 
21168
21172
  // src/components/Timeline/TimelineListItem.tsx
21169
- import { useCallback as useCallback110, useContext as useContext74, useMemo as useMemo116 } from "react";
21173
+ import { useCallback as useCallback110, useContext as useContext73, useMemo as useMemo116 } from "react";
21170
21174
  import { Internals as Internals50 } from "remotion";
21171
21175
 
21172
21176
  // src/components/Timeline/TimelineExpandedSection.tsx
21173
21177
  import React137, { useMemo as useMemo113 } from "react";
21174
21178
 
21175
21179
  // src/components/Timeline/TimelineFieldRow.tsx
21176
- import { useCallback as useCallback106, useContext as useContext71, useMemo as useMemo112 } from "react";
21180
+ import { useCallback as useCallback106, useContext as useContext70, useMemo as useMemo112 } from "react";
21177
21181
  import { Internals as Internals48 } from "remotion";
21178
21182
 
21179
21183
  // src/components/Timeline/TimelineBooleanField.tsx
@@ -21202,7 +21206,7 @@ var TimelineBooleanField = ({ field, codeValue, effectiveValue, canUpdate, onSav
21202
21206
  };
21203
21207
 
21204
21208
  // src/components/Timeline/TimelineNumberField.tsx
21205
- import { useCallback as useCallback103, useMemo as useMemo109, useState as useState72 } from "react";
21209
+ import { useCallback as useCallback103, useMemo as useMemo109, useState as useState71 } from "react";
21206
21210
 
21207
21211
  // src/components/Timeline/timeline-field-utils.ts
21208
21212
  var getDecimalPlaces = (num) => {
@@ -21225,7 +21229,7 @@ var TimelineNumberField = ({
21225
21229
  onDragEnd,
21226
21230
  codeValue
21227
21231
  }) => {
21228
- const [dragValue, setDragValue] = useState72(null);
21232
+ const [dragValue, setDragValue] = useState71(null);
21229
21233
  const onValueChange = useCallback103((newVal) => {
21230
21234
  setDragValue(newVal);
21231
21235
  onDragValueChange(field.key, newVal);
@@ -21277,7 +21281,7 @@ var TimelineNumberField = ({
21277
21281
  };
21278
21282
 
21279
21283
  // src/components/Timeline/TimelineRotationField.tsx
21280
- import { useCallback as useCallback104, useMemo as useMemo110, useState as useState73 } from "react";
21284
+ import { useCallback as useCallback104, useMemo as useMemo110, useState as useState72 } from "react";
21281
21285
  import { jsx as jsx197 } from "react/jsx-runtime";
21282
21286
  var unitPattern = /^([+-]?(?:\d+\.?\d*|\.\d+))(deg|rad|turn|grad)$/;
21283
21287
  var unitToDegrees = {
@@ -21307,7 +21311,7 @@ var TimelineRotationField = ({
21307
21311
  onDragValueChange,
21308
21312
  onDragEnd
21309
21313
  }) => {
21310
- const [dragValue, setDragValue] = useState73(null);
21314
+ const [dragValue, setDragValue] = useState72(null);
21311
21315
  const degrees = useMemo110(() => parseCssRotationToDegrees(String(effectiveValue ?? "0deg")), [effectiveValue]);
21312
21316
  const onValueChange = useCallback104((newVal) => {
21313
21317
  setDragValue(newVal);
@@ -21365,7 +21369,7 @@ var TimelineRotationField = ({
21365
21369
  };
21366
21370
 
21367
21371
  // src/components/Timeline/TimelineTranslateField.tsx
21368
- import { useCallback as useCallback105, useMemo as useMemo111, useState as useState74 } from "react";
21372
+ import { useCallback as useCallback105, useMemo as useMemo111, useState as useState73 } from "react";
21369
21373
  import { jsx as jsx198, jsxs as jsxs94 } from "react/jsx-runtime";
21370
21374
  var leftDraggerStyle = {
21371
21375
  paddingLeft: 0
@@ -21394,8 +21398,8 @@ var TimelineTranslateField = ({
21394
21398
  onDragValueChange,
21395
21399
  onDragEnd
21396
21400
  }) => {
21397
- const [dragX, setDragX] = useState74(null);
21398
- const [dragY, setDragY] = useState74(null);
21401
+ const [dragX, setDragX] = useState73(null);
21402
+ const [dragY, setDragY] = useState73(null);
21399
21403
  const [codeX, codeY] = useMemo111(() => parseTranslate(String(effectiveValue ?? "0px 0px")), [effectiveValue]);
21400
21404
  const makeString = useCallback105((x, y) => `${x}px ${y}px`, []);
21401
21405
  const step = field.fieldSchema.type === "translate" ? field.fieldSchema.step ?? 1 : 1;
@@ -21669,7 +21673,7 @@ var TimelineFieldRow = ({
21669
21673
  clearDragOverrides,
21670
21674
  dragOverrides,
21671
21675
  codeValues: allPropStatuses
21672
- } = useContext71(Internals48.VisualModeOverridesContext);
21676
+ } = useContext70(Internals48.VisualModeOverridesContext);
21673
21677
  const propStatuses = allPropStatuses[overrideId] ?? null;
21674
21678
  const propStatus = propStatuses?.[field.key] ?? null;
21675
21679
  const dragOverrideValue = useMemo112(() => {
@@ -21682,7 +21686,7 @@ var TimelineFieldRow = ({
21682
21686
  defaultValue: field.fieldSchema.default,
21683
21687
  shouldResortToDefaultValueIfUndefined: true
21684
21688
  });
21685
- const { setCodeValues } = useContext71(Internals48.VisualModeOverridesContext);
21689
+ const { setCodeValues } = useContext70(Internals48.VisualModeOverridesContext);
21686
21690
  const onSave = useCallback106((key4, value) => {
21687
21691
  if (!propStatuses || !validatedLocation || !nodePath) {
21688
21692
  return Promise.reject(new Error("Cannot save"));
@@ -21896,7 +21900,7 @@ var TimelineLayerEye = ({ onInvoked, hidden, type }) => {
21896
21900
 
21897
21901
  // src/components/Timeline/TimelineStack/index.tsx
21898
21902
  import { SOURCE_MAP_ENDPOINT } from "@remotion/studio-shared";
21899
- import { useCallback as useCallback108, useContext as useContext72, useMemo as useMemo114, useState as useState75 } from "react";
21903
+ import { useCallback as useCallback108, useContext as useContext71, useMemo as useMemo114, useState as useState74 } from "react";
21900
21904
  import { SourceMapConsumer as SourceMapConsumer3 } from "source-map";
21901
21905
  import { jsx as jsx203, jsxs as jsxs97, Fragment as Fragment30 } from "react/jsx-runtime";
21902
21906
  var publicPath = window.remotion_publicPath === "/" ? "" : window.remotion_publicPath;
@@ -21905,11 +21909,11 @@ SourceMapConsumer3.initialize({
21905
21909
  "lib/mappings.wasm": withoutSlashInTheEnd + SOURCE_MAP_ENDPOINT
21906
21910
  });
21907
21911
  var TimelineStack = ({ isCompact, sequence, originalLocation }) => {
21908
- const [stackHovered, setStackHovered] = useState75(false);
21909
- const [titleHovered, setTitleHovered] = useState75(false);
21910
- const [opening, setOpening] = useState75(false);
21912
+ const [stackHovered, setStackHovered] = useState74(false);
21913
+ const [titleHovered, setTitleHovered] = useState74(false);
21914
+ const [opening, setOpening] = useState74(false);
21911
21915
  const selectAsset = useSelectAsset();
21912
- const connectionStatus = useContext72(StudioServerConnectionCtx).previewServerState.type;
21916
+ const connectionStatus = useContext71(StudioServerConnectionCtx).previewServerState.type;
21913
21917
  const assetPath = useMemo114(() => {
21914
21918
  if (sequence.type !== "video" && sequence.type !== "audio" && sequence.type !== "image") {
21915
21919
  return null;
@@ -22060,15 +22064,15 @@ var TimelineStack = ({ isCompact, sequence, originalLocation }) => {
22060
22064
  // src/components/Timeline/use-sequence-props-subscription.ts
22061
22065
  import {
22062
22066
  useCallback as useCallback109,
22063
- useContext as useContext73,
22067
+ useContext as useContext72,
22064
22068
  useEffect as useEffect66,
22065
22069
  useMemo as useMemo115,
22066
22070
  useRef as useRef38,
22067
- useState as useState76
22071
+ useState as useState75
22068
22072
  } from "react";
22069
22073
  import { Internals as Internals49 } from "remotion";
22070
22074
  var useSequencePropsSubscription = (sequence, originalLocation, visualModeEnabled) => {
22071
- const { setCodeValues } = useContext73(Internals49.VisualModeOverridesContext);
22075
+ const { setCodeValues } = useContext72(Internals49.VisualModeOverridesContext);
22072
22076
  const overrideId = sequence.controls?.overrideId ?? null;
22073
22077
  const setPropStatusesForSequence = useCallback109((statuses) => {
22074
22078
  if (!overrideId) {
@@ -22076,7 +22080,7 @@ var useSequencePropsSubscription = (sequence, originalLocation, visualModeEnable
22076
22080
  }
22077
22081
  setCodeValues(overrideId, statuses);
22078
22082
  }, [overrideId, setCodeValues]);
22079
- const { previewServerState: state, subscribeToEvent } = useContext73(StudioServerConnectionCtx);
22083
+ const { previewServerState: state, subscribeToEvent } = useContext72(StudioServerConnectionCtx);
22080
22084
  const clientId = state.type === "connected" ? state.clientId : undefined;
22081
22085
  const schemaFields = useMemo115(() => getSchemaFields(sequence.controls), [sequence.controls]);
22082
22086
  const schemaKeysString = useMemo115(() => schemaFields ? schemaFields.map((f) => f.key).join(",") : null, [schemaFields]);
@@ -22100,8 +22104,8 @@ var useSequencePropsSubscription = (sequence, originalLocation, visualModeEnable
22100
22104
  const currentLocationColumn = useRef38(locationColumn);
22101
22105
  currentLocationColumn.current = locationColumn;
22102
22106
  const nodePathRef = useRef38(null);
22103
- const [nodePath, setNodePath] = useState76(null);
22104
- const [jsxInMapCallback, setJsxInMapCallback] = useState76(false);
22107
+ const [nodePath, setNodePath] = useState75(null);
22108
+ const [jsxInMapCallback, setJsxInMapCallback] = useState75(false);
22105
22109
  const isMountedRef = useRef38(true);
22106
22110
  const setNodePathBoth = useCallback109((next) => {
22107
22111
  nodePathRef.current = next;
@@ -22242,12 +22246,12 @@ var arrowButton = {
22242
22246
  lineHeight: 1
22243
22247
  };
22244
22248
  var TimelineListItem = ({ nestedDepth, sequence, isCompact }) => {
22245
- const { previewServerState } = useContext74(StudioServerConnectionCtx);
22249
+ const { previewServerState } = useContext73(StudioServerConnectionCtx);
22246
22250
  const visualModeEnvEnabled = Boolean(process.env.EXPERIMENTAL_VISUAL_MODE_ENABLED);
22247
22251
  const previewConnected = previewServerState.type === "connected";
22248
22252
  const visualModeActive = visualModeEnvEnabled && previewConnected;
22249
- const { hidden, setHidden } = useContext74(Internals50.SequenceVisibilityToggleContext);
22250
- const { expandedTracks, toggleTrack } = useContext74(ExpandedTracksContext);
22253
+ const { hidden, setHidden } = useContext73(Internals50.SequenceVisibilityToggleContext);
22254
+ const { expandedTracks, toggleTrack } = useContext73(ExpandedTracksContext);
22251
22255
  const originalLocation = useResolvedStack(sequence.stack ?? null);
22252
22256
  const { nodePath, jsxInMapCallback } = useSequencePropsSubscription(sequence, originalLocation, visualModeActive);
22253
22257
  const validatedLocation = useMemo116(() => {
@@ -22450,7 +22454,7 @@ var TimelineListItem = ({ nestedDepth, sequence, isCompact }) => {
22450
22454
  };
22451
22455
 
22452
22456
  // src/components/Timeline/TimelineTimeIndicators.tsx
22453
- import { useContext as useContext75, useEffect as useEffect68, useMemo as useMemo117, useRef as useRef40 } from "react";
22457
+ import { useContext as useContext74, useEffect as useEffect68, useMemo as useMemo117, useRef as useRef40 } from "react";
22454
22458
  import { Internals as Internals52 } from "remotion";
22455
22459
 
22456
22460
  // src/components/TimeValue.tsx
@@ -22605,7 +22609,7 @@ var TimelineTimePadding = () => {
22605
22609
  });
22606
22610
  };
22607
22611
  var TimelineTimeIndicators = () => {
22608
- const sliderTrack = useContext75(TimelineWidthContext);
22612
+ const sliderTrack = useContext74(TimelineWidthContext);
22609
22613
  const video = Internals52.useVideo();
22610
22614
  if (sliderTrack === null) {
22611
22615
  return null;
@@ -22728,15 +22732,15 @@ var TimelineList = ({ timeline }) => {
22728
22732
  };
22729
22733
 
22730
22734
  // src/components/Timeline/TimelinePinchZoom.tsx
22731
- import { useCallback as useCallback112, useContext as useContext76, useEffect as useEffect69, useRef as useRef42 } from "react";
22735
+ import { useCallback as useCallback112, useContext as useContext75, useEffect as useEffect69, useRef as useRef42 } from "react";
22732
22736
  import { Internals as Internals53 } from "remotion";
22733
22737
  var ZOOM_WHEEL_DELTA = 0.06;
22734
22738
  var TimelinePinchZoom = () => {
22735
22739
  const isVideoComposition = useIsVideoComposition();
22736
22740
  const videoConfig = Internals53.useUnsafeVideoConfig();
22737
- const { canvasContent } = useContext76(Internals53.CompositionManager);
22738
- const { zoom, setZoom } = useContext76(TimelineZoomCtx);
22739
- const { editorZoomGestures } = useContext76(EditorZoomGesturesContext);
22741
+ const { canvasContent } = useContext75(Internals53.CompositionManager);
22742
+ const { zoom, setZoom } = useContext75(TimelineZoomCtx);
22743
+ const { editorZoomGestures } = useContext75(EditorZoomGesturesContext);
22740
22744
  const zoomRef = useRef42(zoom);
22741
22745
  zoomRef.current = zoom;
22742
22746
  const pinchBaseZoomRef = useRef42(null);
@@ -22945,15 +22949,15 @@ var TimelinePinchZoom = () => {
22945
22949
  };
22946
22950
 
22947
22951
  // src/components/Timeline/TimelinePlayCursorSyncer.tsx
22948
- import { useContext as useContext77, useEffect as useEffect70 } from "react";
22952
+ import { useContext as useContext76, useEffect as useEffect70 } from "react";
22949
22953
  import { Internals as Internals54 } from "remotion";
22950
22954
  var lastTimelinePositionWhileScrolling = null;
22951
22955
  var TimelinePlayCursorSyncer = () => {
22952
22956
  const video = Internals54.useVideo();
22953
22957
  const timelineContext = Internals54.useTimelineContext();
22954
22958
  const timelinePosition = Internals54.Timeline.useTimelinePosition();
22955
- const { canvasContent } = useContext77(Internals54.CompositionManager);
22956
- const { zoom: zoomMap } = useContext77(TimelineZoomCtx);
22959
+ const { canvasContent } = useContext76(Internals54.CompositionManager);
22960
+ const { zoom: zoomMap } = useContext76(TimelineZoomCtx);
22957
22961
  const compositionId = canvasContent && canvasContent.type === "composition" ? canvasContent.compositionId : null;
22958
22962
  const zoom = compositionId ? zoomMap[compositionId] ?? TIMELINE_MIN_ZOOM : null;
22959
22963
  if (zoom && video) {
@@ -23039,10 +23043,10 @@ var TimelineScrollable = ({ children }) => {
23039
23043
  };
23040
23044
 
23041
23045
  // src/components/Timeline/TimelineTracks.tsx
23042
- import { useContext as useContext79, useMemo as useMemo122 } from "react";
23046
+ import { useContext as useContext78, useMemo as useMemo122 } from "react";
23043
23047
 
23044
23048
  // src/components/Timeline/TimelineSequence.tsx
23045
- import { useContext as useContext78, useMemo as useMemo121 } from "react";
23049
+ import { useContext as useContext77, useMemo as useMemo121 } from "react";
23046
23050
  import { Internals as Internals56, useCurrentFrame as useCurrentFrame2 } from "remotion";
23047
23051
 
23048
23052
  // src/helpers/get-timeline-sequence-layout.ts
@@ -23114,7 +23118,7 @@ var getTimelineSequenceLayout = ({
23114
23118
  // src/helpers/use-max-media-duration.ts
23115
23119
  import { getVideoMetadata as getVideoMetadata2 } from "@remotion/media-utils";
23116
23120
  import { ALL_FORMATS as ALL_FORMATS2, Input as Input2, InputDisposedError, UrlSource as UrlSource2 } from "mediabunny";
23117
- import { useEffect as useEffect71, useState as useState77 } from "react";
23121
+ import { useEffect as useEffect71, useState as useState76 } from "react";
23118
23122
  var cache = new Map;
23119
23123
  var getSrc = (s) => {
23120
23124
  if (s.type === "video") {
@@ -23127,7 +23131,7 @@ var getSrc = (s) => {
23127
23131
  };
23128
23132
  var useMaxMediaDuration = (s, fps) => {
23129
23133
  const src = getSrc(s);
23130
- const [maxMediaDuration, setMaxMediaDuration] = useState77(src ? cache.get(src) ?? null : Infinity);
23134
+ const [maxMediaDuration, setMaxMediaDuration] = useState76(src ? cache.get(src) ?? null : Infinity);
23131
23135
  useEffect71(() => {
23132
23136
  if (!src) {
23133
23137
  return;
@@ -23160,9 +23164,16 @@ var useMaxMediaDuration = (s, fps) => {
23160
23164
  };
23161
23165
 
23162
23166
  // src/components/AudioWaveform.tsx
23163
- import { useEffect as useEffect72, useMemo as useMemo119, useRef as useRef43, useState as useState78 } from "react";
23167
+ import { useEffect as useEffect72, useMemo as useMemo119, useRef as useRef43, useState as useState77 } from "react";
23164
23168
  import { Internals as Internals55 } from "remotion";
23165
23169
 
23170
+ // src/make-audio-waveform-worker.ts
23171
+ var makeAudioWaveformWorker = () => {
23172
+ return new Worker(new URL("./audio-waveform-worker.mjs", import.meta.url), {
23173
+ type: "module"
23174
+ });
23175
+ };
23176
+
23166
23177
  // src/components/parse-color.ts
23167
23178
  var colorCache = new Map;
23168
23179
  var parseColor = (color) => {
@@ -23238,12 +23249,107 @@ var drawBars = (canvas, peaks, color, volume, width) => {
23238
23249
 
23239
23250
  // src/components/load-waveform-peaks.ts
23240
23251
  import { ALL_FORMATS as ALL_FORMATS3, AudioSampleSink, Input as Input3, UrlSource as UrlSource3 } from "mediabunny";
23252
+
23253
+ // src/components/waveform-peak-processor.ts
23254
+ var emitWaveformProgress = ({
23255
+ completedPeaks,
23256
+ final,
23257
+ onProgress,
23258
+ peaks,
23259
+ totalPeaks
23260
+ }) => {
23261
+ onProgress?.({
23262
+ peaks,
23263
+ completedPeaks,
23264
+ totalPeaks,
23265
+ final
23266
+ });
23267
+ };
23268
+ var createWaveformPeakProcessor = ({
23269
+ totalPeaks,
23270
+ samplesPerPeak,
23271
+ onProgress,
23272
+ progressIntervalInMs,
23273
+ now
23274
+ }) => {
23275
+ const peaks = new Float32Array(totalPeaks);
23276
+ let peakIndex = 0;
23277
+ let peakMax = 0;
23278
+ let sampleInPeak = 0;
23279
+ let lastProgressAt = 0;
23280
+ let lastProgressPeak = 0;
23281
+ const emitProgress = (force) => {
23282
+ const timestamp = now();
23283
+ if (!force && peakIndex === lastProgressPeak && sampleInPeak === 0) {
23284
+ return;
23285
+ }
23286
+ if (!force && timestamp - lastProgressAt < progressIntervalInMs) {
23287
+ return;
23288
+ }
23289
+ lastProgressAt = timestamp;
23290
+ lastProgressPeak = peakIndex;
23291
+ emitWaveformProgress({
23292
+ peaks,
23293
+ completedPeaks: peakIndex,
23294
+ totalPeaks,
23295
+ final: force,
23296
+ onProgress
23297
+ });
23298
+ };
23299
+ return {
23300
+ peaks,
23301
+ processSampleChunk: (floats, channels) => {
23302
+ const frameCount = Math.floor(floats.length / Math.max(1, channels));
23303
+ for (let frame2 = 0;frame2 < frameCount; frame2++) {
23304
+ let framePeak = 0;
23305
+ for (let channel = 0;channel < channels; channel++) {
23306
+ const sampleIndex = frame2 * channels + channel;
23307
+ const abs = Math.abs(floats[sampleIndex] ?? 0);
23308
+ if (abs > framePeak) {
23309
+ framePeak = abs;
23310
+ }
23311
+ }
23312
+ if (framePeak > peakMax) {
23313
+ peakMax = framePeak;
23314
+ }
23315
+ sampleInPeak++;
23316
+ if (sampleInPeak >= samplesPerPeak) {
23317
+ if (peakIndex < totalPeaks) {
23318
+ peaks[peakIndex] = peakMax;
23319
+ }
23320
+ peakIndex++;
23321
+ peakMax = 0;
23322
+ sampleInPeak = 0;
23323
+ }
23324
+ }
23325
+ emitProgress(false);
23326
+ },
23327
+ finalize: () => {
23328
+ if (sampleInPeak > 0 && peakIndex < totalPeaks) {
23329
+ peaks[peakIndex] = peakMax;
23330
+ peakIndex++;
23331
+ }
23332
+ emitProgress(true);
23333
+ }
23334
+ };
23335
+ };
23336
+
23337
+ // src/components/load-waveform-peaks.ts
23241
23338
  var TARGET_SAMPLE_RATE = 100;
23339
+ var DEFAULT_PROGRESS_INTERVAL_IN_MS = 50;
23242
23340
  var peaksCache = new Map;
23243
- async function loadWaveformPeaks(url, signal) {
23341
+ async function loadWaveformPeaks(url, signal, options) {
23244
23342
  const cached = peaksCache.get(url);
23245
- if (cached)
23343
+ if (cached) {
23344
+ emitWaveformProgress({
23345
+ peaks: cached,
23346
+ completedPeaks: cached.length,
23347
+ totalPeaks: cached.length,
23348
+ final: true,
23349
+ onProgress: options?.onProgress
23350
+ });
23246
23351
  return cached;
23352
+ }
23247
23353
  const input2 = new Input3({
23248
23354
  formats: ALL_FORMATS3,
23249
23355
  source: new UrlSource3(url)
@@ -23256,12 +23362,15 @@ async function loadWaveformPeaks(url, signal) {
23256
23362
  const { sampleRate } = audioTrack;
23257
23363
  const durationInSeconds = await audioTrack.computeDuration();
23258
23364
  const totalPeaks = Math.ceil(durationInSeconds * TARGET_SAMPLE_RATE);
23259
- const samplesPerPeak = Math.floor(sampleRate / TARGET_SAMPLE_RATE);
23260
- const peaks = new Float32Array(totalPeaks);
23261
- let peakIndex = 0;
23262
- let peakMax = 0;
23263
- let sampleInPeak = 0;
23365
+ const samplesPerPeak = Math.max(1, Math.floor(sampleRate / TARGET_SAMPLE_RATE));
23264
23366
  const sink = new AudioSampleSink(audioTrack);
23367
+ const processor = createWaveformPeakProcessor({
23368
+ totalPeaks,
23369
+ samplesPerPeak,
23370
+ onProgress: options?.onProgress,
23371
+ progressIntervalInMs: options?.progressIntervalInMs ?? DEFAULT_PROGRESS_INTERVAL_IN_MS,
23372
+ now: () => Date.now()
23373
+ });
23265
23374
  for await (const sample of sink.samples()) {
23266
23375
  if (signal.aborted) {
23267
23376
  sample.close();
@@ -23273,25 +23382,12 @@ async function loadWaveformPeaks(url, signal) {
23273
23382
  });
23274
23383
  const floats = new Float32Array(bytesNeeded / 4);
23275
23384
  sample.copyTo(floats, { format: "f32", planeIndex: 0 });
23385
+ const channels = Math.max(1, sample.numberOfChannels);
23276
23386
  sample.close();
23277
- for (let i = 0;i < floats.length; i++) {
23278
- const abs = Math.abs(floats[i]);
23279
- if (abs > peakMax)
23280
- peakMax = abs;
23281
- sampleInPeak++;
23282
- if (sampleInPeak >= samplesPerPeak) {
23283
- if (peakIndex < totalPeaks) {
23284
- peaks[peakIndex] = peakMax;
23285
- }
23286
- peakIndex++;
23287
- peakMax = 0;
23288
- sampleInPeak = 0;
23289
- }
23290
- }
23291
- }
23292
- if (sampleInPeak > 0 && peakIndex < totalPeaks) {
23293
- peaks[peakIndex] = peakMax;
23387
+ processor.processSampleChunk(floats, channels);
23294
23388
  }
23389
+ processor.finalize();
23390
+ const { peaks } = processor;
23295
23391
  peaksCache.set(url, peaks);
23296
23392
  return peaks;
23297
23393
  } finally {
@@ -23299,8 +23395,50 @@ async function loadWaveformPeaks(url, signal) {
23299
23395
  }
23300
23396
  }
23301
23397
 
23398
+ // src/components/looped-media-timeline.ts
23399
+ var shouldTileLoopDisplay = (loopDisplay) => {
23400
+ return loopDisplay !== undefined && loopDisplay.numberOfTimes > 1;
23401
+ };
23402
+ var getLoopDisplayWidth = ({
23403
+ visualizationWidth,
23404
+ loopDisplay
23405
+ }) => {
23406
+ if (!shouldTileLoopDisplay(loopDisplay)) {
23407
+ return visualizationWidth;
23408
+ }
23409
+ return visualizationWidth / loopDisplay.numberOfTimes;
23410
+ };
23411
+
23412
+ // src/components/slice-waveform-peaks.ts
23413
+ var sliceWaveformPeaks = ({
23414
+ durationInFrames,
23415
+ fps,
23416
+ peaks,
23417
+ playbackRate,
23418
+ startFrom
23419
+ }) => {
23420
+ if (peaks.length === 0) {
23421
+ return peaks;
23422
+ }
23423
+ const startTimeInSeconds = startFrom / fps;
23424
+ const durationInSeconds = durationInFrames / fps * playbackRate;
23425
+ const startPeakIndex = Math.floor(startTimeInSeconds * TARGET_SAMPLE_RATE);
23426
+ const endPeakIndex = Math.ceil((startTimeInSeconds + durationInSeconds) * TARGET_SAMPLE_RATE);
23427
+ return peaks.subarray(Math.max(0, startPeakIndex), Math.min(peaks.length, endPeakIndex));
23428
+ };
23429
+
23302
23430
  // src/components/AudioWaveform.tsx
23303
23431
  import { jsx as jsx209, jsxs as jsxs101 } from "react/jsx-runtime";
23432
+ var EMPTY_PEAKS = new Float32Array(0);
23433
+ var canRetryCanvasTransfer = (err) => {
23434
+ return err instanceof DOMException && err.name === "InvalidStateError";
23435
+ };
23436
+ var canUseAudioWaveformWorker = () => {
23437
+ if (typeof Worker === "undefined" || typeof OffscreenCanvas === "undefined" || typeof HTMLCanvasElement === "undefined") {
23438
+ return false;
23439
+ }
23440
+ return "transferControlToOffscreen" in HTMLCanvasElement.prototype;
23441
+ };
23304
23442
  var container42 = {
23305
23443
  display: "flex",
23306
23444
  flexDirection: "row",
@@ -23319,11 +23457,41 @@ var errorMessage = {
23319
23457
  opacity: 0.75
23320
23458
  };
23321
23459
  var waveformCanvasStyle = {
23322
- pointerEvents: "none"
23460
+ pointerEvents: "none",
23461
+ width: "100%",
23462
+ height: "100%"
23323
23463
  };
23324
23464
  var volumeCanvasStyle = {
23325
23465
  position: "absolute"
23326
23466
  };
23467
+ var drawLoopedWaveform = ({
23468
+ canvas,
23469
+ peaks,
23470
+ volume,
23471
+ visualizationWidth,
23472
+ loopWidth
23473
+ }) => {
23474
+ const h = canvas.height;
23475
+ const w = Math.ceil(visualizationWidth);
23476
+ const targetCanvas = document.createElement("canvas");
23477
+ targetCanvas.width = Math.max(1, Math.ceil(loopWidth));
23478
+ targetCanvas.height = h;
23479
+ drawBars(targetCanvas, peaks, "rgba(255, 255, 255, 0.6)", volume, targetCanvas.width);
23480
+ canvas.width = w;
23481
+ canvas.height = h;
23482
+ const ctx = canvas.getContext("2d");
23483
+ if (!ctx) {
23484
+ throw new Error("Failed to get canvas context");
23485
+ }
23486
+ const pattern = ctx.createPattern(targetCanvas, "repeat-x");
23487
+ if (!pattern) {
23488
+ return;
23489
+ }
23490
+ pattern.setTransform(new DOMMatrix().scaleSelf(loopWidth / targetCanvas.width, 1));
23491
+ ctx.clearRect(0, 0, w, h);
23492
+ ctx.fillStyle = pattern;
23493
+ ctx.fillRect(0, 0, w, h);
23494
+ };
23327
23495
  var AudioWaveform = ({
23328
23496
  src,
23329
23497
  startFrom,
@@ -23331,10 +23499,13 @@ var AudioWaveform = ({
23331
23499
  visualizationWidth,
23332
23500
  volume,
23333
23501
  doesVolumeChange,
23334
- playbackRate
23502
+ playbackRate,
23503
+ loopDisplay
23335
23504
  }) => {
23336
- const [peaks, setPeaks] = useState78(null);
23337
- const [error, setError] = useState78(null);
23505
+ const [peaks, setPeaks] = useState77(null);
23506
+ const [error, setError] = useState77(null);
23507
+ const [waveformCanvasKey, setWaveformCanvasKey] = useState77(0);
23508
+ const canUseWorkerPath = useMemo119(() => canUseAudioWaveformWorker(), []);
23338
23509
  const vidConf = Internals55.useUnsafeVideoConfig();
23339
23510
  if (vidConf === null) {
23340
23511
  throw new Error("Expected video config");
@@ -23342,8 +23513,15 @@ var AudioWaveform = ({
23342
23513
  const containerRef = useRef43(null);
23343
23514
  const waveformCanvas = useRef43(null);
23344
23515
  const volumeCanvas = useRef43(null);
23516
+ const waveformWorker = useRef43(null);
23517
+ const hasTransferredCanvas = useRef43(false);
23518
+ const latestRequestId = useRef43(0);
23345
23519
  useEffect72(() => {
23520
+ if (canUseWorkerPath) {
23521
+ return;
23522
+ }
23346
23523
  const controller = new AbortController;
23524
+ setPeaks(null);
23347
23525
  setError(null);
23348
23526
  loadWaveformPeaks(src, controller.signal).then((p) => {
23349
23527
  if (!controller.signal.aborted) {
@@ -23355,30 +23533,127 @@ var AudioWaveform = ({
23355
23533
  }
23356
23534
  });
23357
23535
  return () => controller.abort();
23358
- }, [src]);
23536
+ }, [canUseWorkerPath, src]);
23537
+ useEffect72(() => {
23538
+ if (!canUseWorkerPath) {
23539
+ return;
23540
+ }
23541
+ const canvasElement = waveformCanvas.current;
23542
+ if (!canvasElement || hasTransferredCanvas.current) {
23543
+ return;
23544
+ }
23545
+ const worker = makeAudioWaveformWorker();
23546
+ waveformWorker.current = worker;
23547
+ worker.addEventListener("message", (event) => {
23548
+ if (event.data.type === "error") {
23549
+ if (event.data.requestId !== latestRequestId.current) {
23550
+ return;
23551
+ }
23552
+ setError(new Error(event.data.message));
23553
+ }
23554
+ });
23555
+ let offscreen;
23556
+ try {
23557
+ offscreen = canvasElement.transferControlToOffscreen();
23558
+ } catch (err) {
23559
+ worker.terminate();
23560
+ waveformWorker.current = null;
23561
+ if (canRetryCanvasTransfer(err)) {
23562
+ setWaveformCanvasKey((key4) => key4 + 1);
23563
+ return;
23564
+ }
23565
+ throw err;
23566
+ }
23567
+ hasTransferredCanvas.current = true;
23568
+ worker.postMessage({ type: "init", canvas: offscreen }, [offscreen]);
23569
+ return () => {
23570
+ worker.postMessage({ type: "dispose" });
23571
+ worker.terminate();
23572
+ waveformWorker.current = null;
23573
+ hasTransferredCanvas.current = false;
23574
+ };
23575
+ }, [canUseWorkerPath, waveformCanvasKey]);
23359
23576
  const portionPeaks = useMemo119(() => {
23360
- if (!peaks || peaks.length === 0) {
23577
+ if (canUseWorkerPath || !peaks) {
23361
23578
  return null;
23362
23579
  }
23363
- const startTimeInSeconds = startFrom / vidConf.fps;
23364
- const durationInSeconds = durationInFrames / vidConf.fps * playbackRate;
23365
- const startPeakIndex = Math.floor(startTimeInSeconds * TARGET_SAMPLE_RATE);
23366
- const endPeakIndex = Math.ceil((startTimeInSeconds + durationInSeconds) * TARGET_SAMPLE_RATE);
23367
- return peaks.slice(Math.max(0, startPeakIndex), Math.min(peaks.length, endPeakIndex));
23368
- }, [peaks, startFrom, durationInFrames, vidConf.fps, playbackRate]);
23580
+ return sliceWaveformPeaks({
23581
+ durationInFrames: shouldTileLoopDisplay(loopDisplay) ? loopDisplay.durationInFrames : durationInFrames,
23582
+ fps: vidConf.fps,
23583
+ peaks,
23584
+ playbackRate,
23585
+ startFrom
23586
+ });
23587
+ }, [
23588
+ canUseWorkerPath,
23589
+ durationInFrames,
23590
+ loopDisplay,
23591
+ peaks,
23592
+ playbackRate,
23593
+ startFrom,
23594
+ vidConf.fps
23595
+ ]);
23369
23596
  useEffect72(() => {
23370
23597
  const { current: canvasElement } = waveformCanvas;
23371
23598
  const { current: containerElement } = containerRef;
23372
- if (!canvasElement || !containerElement || !portionPeaks || portionPeaks.length === 0) {
23599
+ if (!canvasElement || !containerElement) {
23373
23600
  return;
23374
23601
  }
23375
23602
  const h = containerElement.clientHeight;
23376
23603
  const w = Math.ceil(visualizationWidth);
23604
+ const vol = typeof volume === "number" ? volume : 1;
23605
+ if (canUseWorkerPath) {
23606
+ const worker = waveformWorker.current;
23607
+ if (!worker || !hasTransferredCanvas.current) {
23608
+ return;
23609
+ }
23610
+ latestRequestId.current += 1;
23611
+ setError(null);
23612
+ const message = {
23613
+ type: "render",
23614
+ requestId: latestRequestId.current,
23615
+ src,
23616
+ width: w,
23617
+ height: h,
23618
+ volume: vol,
23619
+ startFrom,
23620
+ durationInFrames,
23621
+ fps: vidConf.fps,
23622
+ playbackRate,
23623
+ loopDisplay
23624
+ };
23625
+ worker.postMessage(message);
23626
+ return;
23627
+ }
23377
23628
  canvasElement.width = w;
23378
23629
  canvasElement.height = h;
23379
- const vol = typeof volume === "number" ? volume : 1;
23380
- drawBars(canvasElement, portionPeaks, "rgba(255, 255, 255, 0.6)", vol, w);
23381
- }, [portionPeaks, visualizationWidth, volume]);
23630
+ if (shouldTileLoopDisplay(loopDisplay)) {
23631
+ drawLoopedWaveform({
23632
+ canvas: canvasElement,
23633
+ peaks: portionPeaks ?? EMPTY_PEAKS,
23634
+ volume: vol,
23635
+ visualizationWidth,
23636
+ loopWidth: getLoopDisplayWidth({
23637
+ visualizationWidth,
23638
+ loopDisplay
23639
+ })
23640
+ });
23641
+ } else {
23642
+ drawBars(canvasElement, portionPeaks ?? EMPTY_PEAKS, "rgba(255, 255, 255, 0.6)", vol, w);
23643
+ }
23644
+ }, [
23645
+ canUseWorkerPath,
23646
+ durationInFrames,
23647
+ loopDisplay,
23648
+ playbackRate,
23649
+ portionPeaks,
23650
+ src,
23651
+ startFrom,
23652
+ vidConf.fps,
23653
+ visualizationWidth,
23654
+ volume,
23655
+ waveformCanvasKey
23656
+ ]);
23382
23657
  useEffect72(() => {
23383
23658
  const { current: volumeCanvasElement } = volumeCanvas;
23384
23659
  const { current: containerElement } = containerRef;
@@ -23420,7 +23695,7 @@ var AudioWaveform = ({
23420
23695
  })
23421
23696
  });
23422
23697
  }
23423
- if (!peaks) {
23698
+ if (!canUseWorkerPath && !peaks) {
23424
23699
  return null;
23425
23700
  }
23426
23701
  return /* @__PURE__ */ jsxs101("div", {
@@ -23430,7 +23705,7 @@ var AudioWaveform = ({
23430
23705
  /* @__PURE__ */ jsx209("canvas", {
23431
23706
  ref: waveformCanvas,
23432
23707
  style: waveformCanvasStyle
23433
- }),
23708
+ }, waveformCanvasKey),
23434
23709
  /* @__PURE__ */ jsx209("canvas", {
23435
23710
  ref: volumeCanvas,
23436
23711
  style: volumeCanvasStyle
@@ -23453,7 +23728,8 @@ var width = {
23453
23728
  position: "relative"
23454
23729
  };
23455
23730
  var icon4 = {
23456
- height: 12
23731
+ height: 12,
23732
+ filter: "drop-shadow(0 0 2px rgba(0, 0, 0, 0.9)) drop-shadow(0 1px 2px rgba(0, 0, 0, 0.8))"
23457
23733
  };
23458
23734
  var Icon = () => /* @__PURE__ */ jsx210("svg", {
23459
23735
  viewBox: "0 0 512 512",
@@ -23463,44 +23739,23 @@ var Icon = () => /* @__PURE__ */ jsx210("svg", {
23463
23739
  d: "M512 256c0 88.224-71.775 160-160 160H170.067l34.512 32.419c9.875 9.276 10.119 24.883.539 34.464l-10.775 10.775c-9.373 9.372-24.568 9.372-33.941 0l-92.686-92.686c-9.373-9.373-9.373-24.568 0-33.941l92.686-92.686c9.373-9.373 24.568-9.373 33.941 0l10.775 10.775c9.581 9.581 9.337 25.187-.539 34.464L170.067 352H352c52.935 0 96-43.065 96-96 0-13.958-2.996-27.228-8.376-39.204-4.061-9.039-2.284-19.626 4.723-26.633l12.183-12.183c11.499-11.499 30.965-8.526 38.312 5.982C505.814 205.624 512 230.103 512 256zM72.376 295.204C66.996 283.228 64 269.958 64 256c0-52.935 43.065-96 96-96h181.933l-34.512 32.419c-9.875 9.276-10.119 24.883-.539 34.464l10.775 10.775c9.373 9.372 24.568 9.372 33.941 0l92.686-92.686c9.373-9.373 9.373-24.568 0-33.941l-92.686-92.686c-9.373-9.373-24.568-9.373-33.941 0L306.882 29.12c-9.581 9.581-9.337 25.187.539 34.464L341.933 96H160C71.775 96 0 167.776 0 256c0 25.897 6.186 50.376 17.157 72.039 7.347 14.508 26.813 17.481 38.312 5.982l12.183-12.183c7.008-7.008 8.786-17.595 4.724-26.634z"
23464
23740
  })
23465
23741
  });
23466
- var topLine = {
23467
- top: 0,
23468
- height: 2,
23469
- width: 1,
23470
- background: LIGHT_COLOR
23471
- };
23472
- var bottomLine = {
23473
- top: 0,
23474
- height: 2,
23742
+ var verticalLine = {
23743
+ height: "100%",
23475
23744
  width: 1,
23476
- background: LIGHT_COLOR
23477
- };
23478
- var topContainer = {
23479
- justifyContent: "flex-start",
23480
- alignItems: "center"
23745
+ background: "rgb(255,255,255, 0.5)"
23481
23746
  };
23482
23747
  var centerContainer = {
23483
23748
  justifyContent: "center",
23484
23749
  alignItems: "center"
23485
23750
  };
23486
- var bottomContainer = {
23487
- justifyContent: "flex-end",
23488
- alignItems: "center"
23489
- };
23490
23751
  var LoopedIndicator = () => {
23491
23752
  return /* @__PURE__ */ jsxs102("div", {
23492
23753
  style: width,
23493
23754
  children: [
23494
23755
  /* @__PURE__ */ jsx210(AbsoluteFill3, {
23495
- style: topContainer,
23496
- children: /* @__PURE__ */ jsx210("div", {
23497
- style: topLine
23498
- })
23499
- }),
23500
- /* @__PURE__ */ jsx210(AbsoluteFill3, {
23501
- style: bottomContainer,
23756
+ style: centerContainer,
23502
23757
  children: /* @__PURE__ */ jsx210("div", {
23503
- style: bottomLine
23758
+ style: verticalLine
23504
23759
  })
23505
23760
  }),
23506
23761
  /* @__PURE__ */ jsx210(AbsoluteFill3, {
@@ -23614,7 +23869,7 @@ var TimelineSequenceFrame = ({ roundedFrame, premounted, postmounted }) => {
23614
23869
  };
23615
23870
 
23616
23871
  // src/components/Timeline/TimelineVideoInfo.tsx
23617
- import { useEffect as useEffect74, useMemo as useMemo120, useRef as useRef45, useState as useState79 } from "react";
23872
+ import { useEffect as useEffect74, useMemo as useMemo120, useRef as useRef45, useState as useState78 } from "react";
23618
23873
  import { useVideoConfig as useVideoConfig5 } from "remotion";
23619
23874
 
23620
23875
  // src/helpers/extract-frames.ts
@@ -23972,11 +24227,12 @@ var TimelineVideoInfo = ({
23972
24227
  volume,
23973
24228
  doesVolumeChange,
23974
24229
  premountWidth,
23975
- postmountWidth
24230
+ postmountWidth,
24231
+ loopDisplay
23976
24232
  }) => {
23977
24233
  const { fps } = useVideoConfig5();
23978
24234
  const ref2 = useRef45(null);
23979
- const [error, setError] = useState79(null);
24235
+ const [error, setError] = useState78(null);
23980
24236
  const aspectRatio = useRef45(getAspectRatioFromCache(src));
23981
24237
  useEffect74(() => {
23982
24238
  if (error) {
@@ -23995,25 +24251,54 @@ var TimelineVideoInfo = ({
23995
24251
  return;
23996
24252
  }
23997
24253
  current.appendChild(canvas);
24254
+ const loopWidth = getLoopDisplayWidth({
24255
+ visualizationWidth: naturalWidth,
24256
+ loopDisplay
24257
+ });
24258
+ const shouldRepeatVideo = shouldTileLoopDisplay(loopDisplay);
24259
+ const targetCanvas = shouldRepeatVideo ? document.createElement("canvas") : canvas;
24260
+ targetCanvas.width = shouldRepeatVideo ? Math.max(1, Math.ceil(loopWidth)) : canvas.width;
24261
+ targetCanvas.height = canvas.height;
24262
+ const targetCtx = shouldRepeatVideo ? targetCanvas.getContext("2d") : ctx;
24263
+ if (!targetCtx) {
24264
+ current.removeChild(canvas);
24265
+ return;
24266
+ }
24267
+ const repeatTarget = () => {
24268
+ if (!shouldRepeatVideo) {
24269
+ return;
24270
+ }
24271
+ const pattern = ctx.createPattern(targetCanvas, "repeat-x");
24272
+ if (!pattern) {
24273
+ return;
24274
+ }
24275
+ pattern.setTransform(new DOMMatrix().scaleSelf(loopWidth / targetCanvas.width, 1));
24276
+ ctx.clearRect(0, 0, canvas.width, canvas.height);
24277
+ ctx.fillStyle = pattern;
24278
+ ctx.fillRect(0, 0, canvas.width, canvas.height);
24279
+ };
23998
24280
  const filledSlots = new Map;
23999
24281
  const fromSeconds = trimBefore / fps;
24000
- const toSeconds = fromSeconds + durationInFrames * playbackRate / fps;
24282
+ const visibleDurationInFrames = shouldRepeatVideo && loopDisplay ? loopDisplay.durationInFrames : durationInFrames;
24283
+ const toSeconds = fromSeconds + visibleDurationInFrames * playbackRate / fps;
24284
+ const targetWidth = shouldRepeatVideo ? targetCanvas.width : naturalWidth;
24001
24285
  if (aspectRatio.current !== null) {
24002
24286
  ensureSlots({
24003
24287
  filledSlots,
24004
- naturalWidth,
24288
+ naturalWidth: targetWidth,
24005
24289
  fromSeconds,
24006
24290
  toSeconds,
24007
24291
  aspectRatio: aspectRatio.current
24008
24292
  });
24009
24293
  fillWithCachedFrames({
24010
- ctx,
24011
- naturalWidth,
24294
+ ctx: targetCtx,
24295
+ naturalWidth: targetWidth,
24012
24296
  filledSlots,
24013
24297
  src,
24014
24298
  segmentDuration: toSeconds - fromSeconds,
24015
24299
  fromSeconds
24016
24300
  });
24301
+ repeatTarget();
24017
24302
  const unfilled = Array.from(filledSlots.keys()).filter((timestamp) => !filledSlots.get(timestamp));
24018
24303
  if (unfilled.length === 0) {
24019
24304
  return () => {
@@ -24031,7 +24316,7 @@ var TimelineVideoInfo = ({
24031
24316
  filledSlots,
24032
24317
  fromSeconds,
24033
24318
  toSeconds,
24034
- naturalWidth,
24319
+ naturalWidth: targetWidth,
24035
24320
  aspectRatio: aspectRatio.current
24036
24321
  });
24037
24322
  return Array.from(filledSlots.keys()).map((timestamp) => timestamp / WEBCODECS_TIMESCALE);
@@ -24059,17 +24344,18 @@ var TimelineVideoInfo = ({
24059
24344
  filledSlots,
24060
24345
  fromSeconds,
24061
24346
  toSeconds,
24062
- naturalWidth,
24347
+ naturalWidth: targetWidth,
24063
24348
  aspectRatio: aspectRatio.current
24064
24349
  });
24065
24350
  fillFrameWhereItFits({
24066
- ctx,
24351
+ ctx: targetCtx,
24067
24352
  filledSlots,
24068
- visualizationWidth: naturalWidth,
24353
+ visualizationWidth: targetWidth,
24069
24354
  frame: transformed,
24070
24355
  segmentDuration: toSeconds - fromSeconds,
24071
24356
  fromSeconds
24072
24357
  });
24358
+ repeatTarget();
24073
24359
  } catch (e) {
24074
24360
  if (frame2) {
24075
24361
  frame2.close();
@@ -24085,13 +24371,14 @@ var TimelineVideoInfo = ({
24085
24371
  return;
24086
24372
  }
24087
24373
  fillWithCachedFrames({
24088
- ctx,
24089
- naturalWidth,
24374
+ ctx: targetCtx,
24375
+ naturalWidth: targetWidth,
24090
24376
  filledSlots,
24091
24377
  src,
24092
24378
  segmentDuration: toSeconds - fromSeconds,
24093
24379
  fromSeconds
24094
24380
  });
24381
+ repeatTarget();
24095
24382
  }).catch((e) => {
24096
24383
  setError(e);
24097
24384
  });
@@ -24103,6 +24390,7 @@ var TimelineVideoInfo = ({
24103
24390
  durationInFrames,
24104
24391
  error,
24105
24392
  fps,
24393
+ loopDisplay,
24106
24394
  naturalWidth,
24107
24395
  playbackRate,
24108
24396
  src,
@@ -24134,7 +24422,8 @@ var TimelineVideoInfo = ({
24134
24422
  durationInFrames,
24135
24423
  volume,
24136
24424
  doesVolumeChange,
24137
- playbackRate
24425
+ playbackRate,
24426
+ loopDisplay
24138
24427
  })
24139
24428
  })
24140
24429
  ]
@@ -24147,7 +24436,7 @@ var AUDIO_GRADIENT = "linear-gradient(rgb(16 171 58), rgb(43 165 63) 60%)";
24147
24436
  var VIDEO_GRADIENT = "linear-gradient(to top, #8e44ad, #9b59b6)";
24148
24437
  var IMAGE_GRADIENT = "linear-gradient(to top, #2980b9, #3498db)";
24149
24438
  var TimelineSequence = ({ s }) => {
24150
- const windowWidth = useContext78(TimelineWidthContext);
24439
+ const windowWidth = useContext77(TimelineWidthContext);
24151
24440
  if (windowWidth === null) {
24152
24441
  return null;
24153
24442
  }
@@ -24159,29 +24448,37 @@ var TimelineSequence = ({ s }) => {
24159
24448
  var Inner4 = ({ s, windowWidth }) => {
24160
24449
  const video = Internals56.useVideo();
24161
24450
  const maxMediaDuration = useMaxMediaDuration(s, video?.fps ?? 30);
24451
+ const effectiveMaxMediaDuration = s.loopDisplay ? null : maxMediaDuration;
24162
24452
  if (!video) {
24163
24453
  throw new TypeError("Expected video config");
24164
24454
  }
24165
24455
  const frame2 = useCurrentFrame2();
24166
24456
  const relativeFrame = frame2 - s.from;
24457
+ const displayDurationInFrames = s.loopDisplay ? s.loopDisplay.durationInFrames * s.loopDisplay.numberOfTimes : s.duration;
24167
24458
  const relativeFrameWithPremount = relativeFrame + (s.premountDisplay ?? 0);
24168
- const relativeFrameWithPostmount = relativeFrame - s.duration;
24459
+ const relativeFrameWithPostmount = relativeFrame - displayDurationInFrames;
24169
24460
  const roundedFrame = Math.round(relativeFrame * 100) / 100;
24170
- const isInRange = relativeFrame >= 0 && relativeFrame < s.duration;
24171
- const isPremounting = relativeFrameWithPremount >= 0 && relativeFrameWithPremount < s.duration && !isInRange;
24461
+ const isInRange = relativeFrame >= 0 && relativeFrame < displayDurationInFrames;
24462
+ const isPremounting = relativeFrameWithPremount >= 0 && relativeFrameWithPremount < displayDurationInFrames && !isInRange;
24172
24463
  const isPostmounting = relativeFrameWithPostmount >= 0 && relativeFrameWithPostmount < (s.postmountDisplay ?? 0) && !isInRange;
24173
24464
  const { marginLeft, width: width2, naturalWidth, premountWidth, postmountWidth } = useMemo121(() => {
24174
24465
  return getTimelineSequenceLayout({
24175
- durationInFrames: s.loopDisplay ? s.loopDisplay.durationInFrames * s.loopDisplay.numberOfTimes : s.duration,
24466
+ durationInFrames: displayDurationInFrames,
24176
24467
  startFrom: s.loopDisplay ? s.from + s.loopDisplay.startOffset : s.from,
24177
24468
  startFromMedia: s.type === "sequence" || s.type === "image" ? 0 : s.startMediaFrom,
24178
- maxMediaDuration,
24469
+ maxMediaDuration: effectiveMaxMediaDuration,
24179
24470
  video,
24180
24471
  windowWidth,
24181
24472
  premountDisplay: s.premountDisplay,
24182
24473
  postmountDisplay: s.postmountDisplay
24183
24474
  });
24184
- }, [maxMediaDuration, s, video, windowWidth]);
24475
+ }, [
24476
+ displayDurationInFrames,
24477
+ effectiveMaxMediaDuration,
24478
+ s,
24479
+ video,
24480
+ windowWidth
24481
+ ]);
24185
24482
  const style11 = useMemo121(() => {
24186
24483
  return {
24187
24484
  background: s.type === "audio" ? AUDIO_GRADIENT : s.type === "video" ? VIDEO_GRADIENT : s.type === "image" ? IMAGE_GRADIENT : BLUE,
@@ -24196,7 +24493,7 @@ var Inner4 = ({ s, windowWidth }) => {
24196
24493
  opacity: isInRange ? 1 : 0.5
24197
24494
  };
24198
24495
  }, [isInRange, marginLeft, s.type, width2]);
24199
- if (maxMediaDuration === null) {
24496
+ if (maxMediaDuration === null && !s.loopDisplay) {
24200
24497
  return null;
24201
24498
  }
24202
24499
  return /* @__PURE__ */ jsxs105("div", {
@@ -24239,7 +24536,8 @@ var Inner4 = ({ s, windowWidth }) => {
24239
24536
  startFrom: s.startMediaFrom,
24240
24537
  durationInFrames: s.duration,
24241
24538
  volume: s.volume,
24242
- playbackRate: s.playbackRate
24539
+ playbackRate: s.playbackRate,
24540
+ loopDisplay: s.loopDisplay
24243
24541
  }) : null,
24244
24542
  s.type === "video" ? /* @__PURE__ */ jsx215(TimelineVideoInfo, {
24245
24543
  src: s.src,
@@ -24251,7 +24549,8 @@ var Inner4 = ({ s, windowWidth }) => {
24251
24549
  volume: s.volume,
24252
24550
  doesVolumeChange: s.doesVolumeChange,
24253
24551
  premountWidth: premountWidth ?? 0,
24254
- postmountWidth: postmountWidth ?? 0
24552
+ postmountWidth: postmountWidth ?? 0,
24553
+ loopDisplay: s.loopDisplay
24255
24554
  }) : null,
24256
24555
  s.type === "image" ? /* @__PURE__ */ jsx215(TimelineImageInfo, {
24257
24556
  src: s.src,
@@ -24291,8 +24590,8 @@ var getExpandedPlaceholderStyle = (controls) => ({
24291
24590
  height: getExpandedTrackHeight(controls) + TIMELINE_ITEM_BORDER_BOTTOM
24292
24591
  });
24293
24592
  var TimelineTracks = ({ timeline, hasBeenCut }) => {
24294
- const { expandedTracks } = useContext79(ExpandedTracksContext);
24295
- const { previewServerState } = useContext79(StudioServerConnectionCtx);
24593
+ const { expandedTracks } = useContext78(ExpandedTracksContext);
24594
+ const { previewServerState } = useContext78(StudioServerConnectionCtx);
24296
24595
  const visualModeEnabled = Boolean(process.env.EXPERIMENTAL_VISUAL_MODE_ENABLED) && previewServerState.type === "connected";
24297
24596
  const timelineStyle = useMemo122(() => {
24298
24597
  return {
@@ -24350,9 +24649,9 @@ var noop3 = () => {
24350
24649
  return;
24351
24650
  };
24352
24651
  var TimelineInner = () => {
24353
- const { sequences } = useContext80(Internals57.SequenceManager);
24354
- const { expandedTracks } = useContext80(ExpandedTracksContext);
24355
- const { previewServerState } = useContext80(StudioServerConnectionCtx);
24652
+ const { sequences } = useContext79(Internals57.SequenceManager);
24653
+ const { expandedTracks } = useContext79(ExpandedTracksContext);
24654
+ const { previewServerState } = useContext79(StudioServerConnectionCtx);
24356
24655
  const visualModeEnabled = Boolean(process.env.EXPERIMENTAL_VISUAL_MODE_ENABLED) && previewServerState.type === "connected";
24357
24656
  const videoConfig = Internals57.useUnsafeVideoConfig();
24358
24657
  const videoConfigIsNull = videoConfig === null;
@@ -24466,7 +24765,7 @@ var container45 = {
24466
24765
  };
24467
24766
  var EditorContent = ({ readOnlyStudio, children }) => {
24468
24767
  const isStill = useIsStill();
24469
- const { canvasContent } = useContext81(Internals58.CompositionManager);
24768
+ const { canvasContent } = useContext80(Internals58.CompositionManager);
24470
24769
  const showTimeline = canvasContent !== null && !isStill && canvasContent.type === "composition";
24471
24770
  return /* @__PURE__ */ jsxs108("div", {
24472
24771
  style: container45,
@@ -24503,11 +24802,11 @@ var EditorContent = ({ readOnlyStudio, children }) => {
24503
24802
  };
24504
24803
 
24505
24804
  // src/components/GlobalKeybindings.tsx
24506
- import { useContext as useContext82, useEffect as useEffect75 } from "react";
24805
+ import { useContext as useContext81, useEffect as useEffect75 } from "react";
24507
24806
  var GlobalKeybindings = () => {
24508
24807
  const keybindings = useKeybinding();
24509
- const { setSelectedModal } = useContext82(ModalsContext);
24510
- const { setCheckerboard } = useContext82(CheckerboardContext);
24808
+ const { setSelectedModal } = useContext81(ModalsContext);
24809
+ const { setCheckerboard } = useContext81(CheckerboardContext);
24511
24810
  const { navigateToNextComposition, navigateToPreviousComposition } = useCompositionNavigation();
24512
24811
  useEffect75(() => {
24513
24812
  const nKey = keybindings.registerKeybinding({
@@ -24611,7 +24910,7 @@ var GlobalKeybindings = () => {
24611
24910
  };
24612
24911
 
24613
24912
  // src/components/Modals.tsx
24614
- import { useContext as useContext96 } from "react";
24913
+ import { useContext as useContext95 } from "react";
24615
24914
 
24616
24915
  // src/components/InstallPackage.tsx
24617
24916
  import {
@@ -24620,7 +24919,7 @@ import {
24620
24919
  extraPackages,
24621
24920
  installableMap
24622
24921
  } from "@remotion/studio-shared";
24623
- import React154, { useCallback as useCallback114, useContext as useContext84, useEffect as useEffect76 } from "react";
24922
+ import React154, { useCallback as useCallback114, useContext as useContext83, useEffect as useEffect76 } from "react";
24624
24923
  import { VERSION as VERSION2 } from "remotion";
24625
24924
 
24626
24925
  // src/api/install-package.ts
@@ -24708,10 +25007,10 @@ var ModalFooterContainer = ({ children }) => {
24708
25007
  };
24709
25008
 
24710
25009
  // src/components/NewComposition/DismissableModal.tsx
24711
- import { useCallback as useCallback113, useContext as useContext83 } from "react";
25010
+ import { useCallback as useCallback113, useContext as useContext82 } from "react";
24712
25011
  import { jsx as jsx223 } from "react/jsx-runtime";
24713
25012
  var DismissableModal = ({ children }) => {
24714
- const { setSelectedModal } = useContext83(ModalsContext);
25013
+ const { setSelectedModal } = useContext82(ModalsContext);
24715
25014
  const onQuit = useCallback113(() => {
24716
25015
  setSelectedModal(null);
24717
25016
  }, [setSelectedModal]);
@@ -24735,7 +25034,7 @@ var text2 = {
24735
25034
  var InstallPackageModal = ({ packageManager }) => {
24736
25035
  const [state, setState] = React154.useState({ type: "idle" });
24737
25036
  const [map, setMap] = React154.useState({});
24738
- const { previewServerState: ctx } = useContext84(StudioServerConnectionCtx);
25037
+ const { previewServerState: ctx } = useContext83(StudioServerConnectionCtx);
24739
25038
  const selectedPackages = Object.keys(map).filter((pkg) => map[pkg]);
24740
25039
  const onClick = useCallback114(async () => {
24741
25040
  if (state.type === "done") {
@@ -24905,10 +25204,10 @@ var InstallPackageModal = ({ packageManager }) => {
24905
25204
  };
24906
25205
 
24907
25206
  // src/components/NewComposition/DeleteComposition.tsx
24908
- import { useCallback as useCallback116, useContext as useContext87, useMemo as useMemo126 } from "react";
25207
+ import { useCallback as useCallback116, useContext as useContext86, useMemo as useMemo126 } from "react";
24909
25208
 
24910
25209
  // src/components/RenderModal/ResolveCompositionBeforeModal.tsx
24911
- import React155, { useContext as useContext85, useEffect as useEffect77, useMemo as useMemo125 } from "react";
25210
+ import React155, { useContext as useContext84, useEffect as useEffect77, useMemo as useMemo125 } from "react";
24912
25211
  import { Internals as Internals59 } from "remotion";
24913
25212
  import { jsx as jsx225, jsxs as jsxs111 } from "react/jsx-runtime";
24914
25213
  var loaderContainer2 = {
@@ -24930,7 +25229,7 @@ var loaderLabel2 = {
24930
25229
  var ResolvedCompositionContext = React155.createContext(null);
24931
25230
  var ResolveCompositionBeforeModal = ({ compositionId, children }) => {
24932
25231
  const resolved = Internals59.useResolvedVideoConfig(compositionId);
24933
- const unresolvedContext = useContext85(Internals59.CompositionManager);
25232
+ const unresolvedContext = useContext84(Internals59.CompositionManager);
24934
25233
  const unresolved = unresolvedContext.compositions.find((c) => compositionId === c.id);
24935
25234
  useEffect77(() => {
24936
25235
  const { current } = Internals59.resolveCompositionsRef;
@@ -24990,7 +25289,7 @@ var ResolveCompositionBeforeModal = ({ compositionId, children }) => {
24990
25289
  };
24991
25290
 
24992
25291
  // src/components/NewComposition/CodemodFooter.tsx
24993
- import { useCallback as useCallback115, useContext as useContext86, useEffect as useEffect78, useState as useState80 } from "react";
25292
+ import { useCallback as useCallback115, useContext as useContext85, useEffect as useEffect78, useState as useState79 } from "react";
24994
25293
 
24995
25294
  // src/components/NewComposition/DiffPreview.tsx
24996
25295
  import { jsx as jsx226, jsxs as jsxs112 } from "react/jsx-runtime";
@@ -25050,12 +25349,12 @@ var CodemodFooter = ({
25050
25349
  submitLabel,
25051
25350
  onSuccess
25052
25351
  }) => {
25053
- const [submitting, setSubmitting] = useState80(false);
25054
- const { setSelectedModal } = useContext86(ModalsContext);
25055
- const [codemodStatus, setCanApplyCodemod] = useState80({
25352
+ const [submitting, setSubmitting] = useState79(false);
25353
+ const { setSelectedModal } = useContext85(ModalsContext);
25354
+ const [codemodStatus, setCanApplyCodemod] = useState79({
25056
25355
  type: "loading"
25057
25356
  });
25058
- const [projectInfo, setProjectInfo] = useState80(null);
25357
+ const [projectInfo, setProjectInfo] = useState79(null);
25059
25358
  useEffect78(() => {
25060
25359
  const controller = new AbortController;
25061
25360
  getProjectInfo(controller.signal).then((info) => {
@@ -25176,7 +25475,7 @@ var content3 = {
25176
25475
  minWidth: 500
25177
25476
  };
25178
25477
  var DeleteCompositionLoaded = ({ compositionId }) => {
25179
- const context = useContext87(ResolvedCompositionContext);
25478
+ const context = useContext86(ResolvedCompositionContext);
25180
25479
  if (!context) {
25181
25480
  throw new Error("Resolved composition context");
25182
25481
  }
@@ -25251,7 +25550,7 @@ var DeleteComposition = ({ compositionId }) => {
25251
25550
  };
25252
25551
 
25253
25552
  // src/components/NewComposition/DuplicateComposition.tsx
25254
- import { useCallback as useCallback118, useContext as useContext88, useMemo as useMemo127, useState as useState81 } from "react";
25553
+ import { useCallback as useCallback118, useContext as useContext87, useMemo as useMemo127, useState as useState80 } from "react";
25255
25554
  import { Internals as Internals61 } from "remotion";
25256
25555
 
25257
25556
  // src/helpers/validate-new-comp-data.ts
@@ -25357,19 +25656,19 @@ var comboBoxStyle = {
25357
25656
  width: 190
25358
25657
  };
25359
25658
  var DuplicateCompositionLoaded = ({ initialType }) => {
25360
- const context = useContext88(ResolvedCompositionContext);
25659
+ const context = useContext87(ResolvedCompositionContext);
25361
25660
  if (!context) {
25362
25661
  throw new Error("Resolved composition context");
25363
25662
  }
25364
25663
  const { resolved, unresolved } = context;
25365
- const [initialCompType] = useState81(initialType);
25664
+ const [initialCompType] = useState80(initialType);
25366
25665
  const hadDimensionsDefined = unresolved.width && unresolved.height;
25367
25666
  const hadFpsDefined = unresolved.fps !== undefined;
25368
25667
  const hadDurationDefined = unresolved.durationInFrames !== undefined;
25369
- const [selectedFrameRate, setFrameRate] = useState81(resolved.result.fps);
25370
- const { compositions } = useContext88(Internals61.CompositionManager);
25371
- const [type, setType] = useState81(initialCompType);
25372
- const [newId, setName] = useState81(() => {
25668
+ const [selectedFrameRate, setFrameRate] = useState80(resolved.result.fps);
25669
+ const { compositions } = useContext87(Internals61.CompositionManager);
25670
+ const [type, setType] = useState80(initialCompType);
25671
+ const [newId, setName] = useState80(() => {
25373
25672
  const numberAtEnd = resolved.result.id.match(/([0-9]+)$/)?.[0];
25374
25673
  let prefix = numberAtEnd ? Number(numberAtEnd) : 1;
25375
25674
  const initialName = resolved.result.id.replace(/([0-9]+)$/, "");
@@ -25384,11 +25683,11 @@ var DuplicateCompositionLoaded = ({ initialType }) => {
25384
25683
  }
25385
25684
  return currentName;
25386
25685
  });
25387
- const [size4, setSize] = useState81(() => ({
25686
+ const [size4, setSize] = useState80(() => ({
25388
25687
  width: resolved.result.width,
25389
25688
  height: resolved.result.height
25390
25689
  }));
25391
- const [durationInFrames, setDurationInFrames] = useState81(resolved.result.durationInFrames);
25690
+ const [durationInFrames, setDurationInFrames] = useState80(resolved.result.durationInFrames);
25392
25691
  const onTypeChanged = useCallback118((newType) => {
25393
25692
  setType(newType);
25394
25693
  }, []);
@@ -25714,7 +26013,7 @@ var DuplicateComposition = ({ compositionId, compositionType }) => {
25714
26013
  };
25715
26014
 
25716
26015
  // src/components/NewComposition/RenameComposition.tsx
25717
- import { useCallback as useCallback119, useContext as useContext89, useMemo as useMemo128, useState as useState82 } from "react";
26016
+ import { useCallback as useCallback119, useContext as useContext88, useMemo as useMemo128, useState as useState81 } from "react";
25718
26017
  import { Internals as Internals62 } from "remotion";
25719
26018
  import { jsx as jsx231, jsxs as jsxs117, Fragment as Fragment35 } from "react/jsx-runtime";
25720
26019
  var content5 = {
@@ -25725,13 +26024,13 @@ var content5 = {
25725
26024
  minWidth: 500
25726
26025
  };
25727
26026
  var RenameCompositionLoaded = () => {
25728
- const context = useContext89(ResolvedCompositionContext);
26027
+ const context = useContext88(ResolvedCompositionContext);
25729
26028
  if (!context) {
25730
26029
  throw new Error("Resolved composition context");
25731
26030
  }
25732
26031
  const { resolved } = context;
25733
- const { compositions } = useContext89(Internals62.CompositionManager);
25734
- const [newId, setName] = useState82(() => {
26032
+ const { compositions } = useContext88(Internals62.CompositionManager);
26033
+ const [newId, setName] = useState81(() => {
25735
26034
  return resolved.result.id;
25736
26035
  });
25737
26036
  const onNameChange = useCallback119((e) => {
@@ -25825,7 +26124,7 @@ var RenameComposition = ({ compositionId }) => {
25825
26124
  };
25826
26125
 
25827
26126
  // src/components/OverrideInputProps.tsx
25828
- import { useCallback as useCallback120, useContext as useContext90, useMemo as useMemo129, useState as useState83 } from "react";
26127
+ import { useCallback as useCallback120, useContext as useContext89, useMemo as useMemo129, useState as useState82 } from "react";
25829
26128
  import { Internals as Internals63 } from "remotion";
25830
26129
  import { jsx as jsx232, jsxs as jsxs118 } from "react/jsx-runtime";
25831
26130
  var style11 = {
@@ -25861,14 +26160,14 @@ var isValidJSON = (value) => {
25861
26160
  }
25862
26161
  };
25863
26162
  var Inner5 = () => {
25864
- const [value, setValue] = useState83(() => {
26163
+ const [value, setValue] = useState82(() => {
25865
26164
  const override = Internals63.getInputPropsOverride();
25866
26165
  if (override) {
25867
26166
  return JSON.stringify(override, null, 2);
25868
26167
  }
25869
26168
  return null;
25870
26169
  });
25871
- const { setSelectedModal } = useContext90(ModalsContext);
26170
+ const { setSelectedModal } = useContext89(ModalsContext);
25872
26171
  const valid = useMemo129(() => {
25873
26172
  if (!value)
25874
26173
  return true;
@@ -25949,11 +26248,11 @@ var OverrideInputPropsModal = () => {
25949
26248
  // src/components/QuickSwitcher/QuickSwitcherContent.tsx
25950
26249
  import {
25951
26250
  useCallback as useCallback121,
25952
- useContext as useContext91,
26251
+ useContext as useContext90,
25953
26252
  useEffect as useEffect80,
25954
26253
  useMemo as useMemo131,
25955
26254
  useRef as useRef47,
25956
- useState as useState85
26255
+ useState as useState84
25957
26256
  } from "react";
25958
26257
  import { Internals as Internals64 } from "remotion";
25959
26258
 
@@ -26850,7 +27149,7 @@ var QuickSwitcherNoResults = ({ query, mode }) => {
26850
27149
  };
26851
27150
 
26852
27151
  // src/components/QuickSwitcher/QuickSwitcherResult.tsx
26853
- import { useEffect as useEffect79, useMemo as useMemo130, useRef as useRef46, useState as useState84 } from "react";
27152
+ import { useEffect as useEffect79, useMemo as useMemo130, useRef as useRef46, useState as useState83 } from "react";
26854
27153
  import { jsx as jsx236, jsxs as jsxs121, Fragment as Fragment37 } from "react/jsx-runtime";
26855
27154
  var container49 = {
26856
27155
  paddingLeft: 16,
@@ -26879,7 +27178,7 @@ var labelContainer = {
26879
27178
  paddingBottom: 5
26880
27179
  };
26881
27180
  var QuickSwitcherResult = ({ result, selected }) => {
26882
- const [hovered, setIsHovered] = useState84(false);
27181
+ const [hovered, setIsHovered] = useState83(false);
26883
27182
  const ref2 = useRef46(null);
26884
27183
  const keybindings = useKeybinding();
26885
27184
  useEffect79(() => {
@@ -27045,8 +27344,8 @@ var mapModeToQuery = (mode) => {
27045
27344
  throw new Error("no mode" + mode);
27046
27345
  };
27047
27346
  var QuickSwitcherContent = ({ initialMode, invocationTimestamp, readOnlyStudio }) => {
27048
- const { compositions } = useContext91(Internals64.CompositionManager);
27049
- const [state, setState] = useState85(() => {
27347
+ const { compositions } = useContext90(Internals64.CompositionManager);
27348
+ const [state, setState] = useState84(() => {
27050
27349
  return {
27051
27350
  query: mapModeToQuery(initialMode),
27052
27351
  selectedIndex: 0
@@ -27064,8 +27363,8 @@ var QuickSwitcherContent = ({ initialMode, invocationTimestamp, readOnlyStudio }
27064
27363
  return;
27065
27364
  }, []);
27066
27365
  const actions = useMenuStructure(closeMenu, readOnlyStudio);
27067
- const [docResults, setDocResults] = useState85({ type: "initial" });
27068
- const { setSelectedModal } = useContext91(ModalsContext);
27366
+ const [docResults, setDocResults] = useState84({ type: "initial" });
27367
+ const { setSelectedModal } = useContext90(ModalsContext);
27069
27368
  const keybindings = useKeybinding();
27070
27369
  const mode = mapQueryToMode(state.query);
27071
27370
  const actualQuery = useMemo131(() => {
@@ -27330,7 +27629,7 @@ var QuickSwitcher = ({ initialMode, invocationTimestamp, readOnlyStudio }) => {
27330
27629
  var QuickSwitcher_default = QuickSwitcher;
27331
27630
 
27332
27631
  // src/components/RenderModal/RenderStatusModal.tsx
27333
- import { useCallback as useCallback123, useContext as useContext92 } from "react";
27632
+ import { useCallback as useCallback123, useContext as useContext91 } from "react";
27334
27633
 
27335
27634
  // src/components/RenderModal/ClientRenderProgress.tsx
27336
27635
  import { formatBytes as formatBytes3 } from "@remotion/studio-shared";
@@ -27720,8 +28019,8 @@ var buttonRow = {
27720
28019
  var RenderStatusModal = ({
27721
28020
  jobId
27722
28021
  }) => {
27723
- const { setSelectedModal } = useContext92(ModalsContext);
27724
- const { jobs, removeClientJob, cancelClientJob } = useContext92(RenderQueueContext);
28022
+ const { setSelectedModal } = useContext91(ModalsContext);
28023
+ const { jobs, removeClientJob, cancelClientJob } = useContext91(RenderQueueContext);
27725
28024
  const job = jobs.find((j) => j.id === jobId);
27726
28025
  if (!job) {
27727
28026
  throw new Error("job not found");
@@ -27830,12 +28129,12 @@ import { BrowserSafeApis as BrowserSafeApis11 } from "@remotion/renderer/client"
27830
28129
  import { getDefaultOutLocation } from "@remotion/studio-shared";
27831
28130
  import {
27832
28131
  useCallback as useCallback141,
27833
- useContext as useContext94,
28132
+ useContext as useContext93,
27834
28133
  useEffect as useEffect83,
27835
28134
  useMemo as useMemo143,
27836
28135
  useReducer as useReducer2,
27837
28136
  useRef as useRef49,
27838
- useState as useState91
28137
+ useState as useState90
27839
28138
  } from "react";
27840
28139
 
27841
28140
  // src/helpers/convert-env-variables.ts
@@ -28103,9 +28402,9 @@ var makeReadOnlyStudioRenderCommand = ({
28103
28402
  };
28104
28403
 
28105
28404
  // src/helpers/render-modal-sections.ts
28106
- import { useMemo as useMemo133, useState as useState86 } from "react";
28405
+ import { useMemo as useMemo133, useState as useState85 } from "react";
28107
28406
  var useRenderModalSections = (renderMode, codec) => {
28108
- const [selectedTab, setTab] = useState86("general");
28407
+ const [selectedTab, setTab] = useState85("general");
28109
28408
  const shownTabs = useMemo133(() => {
28110
28409
  if (renderMode === "audio") {
28111
28410
  return ["general", "data", "audio", "advanced"];
@@ -28198,7 +28497,7 @@ var GifIcon = (props) => /* @__PURE__ */ jsx247("svg", {
28198
28497
  });
28199
28498
 
28200
28499
  // src/components/Tabs/vertical.tsx
28201
- import { useCallback as useCallback124, useMemo as useMemo134, useState as useState87 } from "react";
28500
+ import { useCallback as useCallback124, useMemo as useMemo134, useState as useState86 } from "react";
28202
28501
  import { jsx as jsx248 } from "react/jsx-runtime";
28203
28502
  var selectorButton2 = {
28204
28503
  border: "none",
@@ -28214,7 +28513,7 @@ var selectorButton2 = {
28214
28513
  WebkitUserSelect: "none"
28215
28514
  };
28216
28515
  var VerticalTab = ({ children, onClick, style: style12, selected }) => {
28217
- const [hovered, setHovered] = useState87(false);
28516
+ const [hovered, setHovered] = useState86(false);
28218
28517
  const { tabIndex } = useZIndex();
28219
28518
  const onPointerEnter = useCallback124(() => {
28220
28519
  setHovered(true);
@@ -28244,7 +28543,7 @@ var VerticalTab = ({ children, onClick, style: style12, selected }) => {
28244
28543
 
28245
28544
  // src/components/RenderModal/CrfSetting.tsx
28246
28545
  import { BrowserSafeApis as BrowserSafeApis3 } from "@remotion/renderer/client";
28247
- import { useState as useState89 } from "react";
28546
+ import { useState as useState88 } from "react";
28248
28547
 
28249
28548
  // src/components/RenderModal/NumberSetting.tsx
28250
28549
  import { useCallback as useCallback126 } from "react";
@@ -28253,7 +28552,7 @@ import { useCallback as useCallback126 } from "react";
28253
28552
  import { BrowserSafeApis as BrowserSafeApis2 } from "@remotion/renderer/client";
28254
28553
 
28255
28554
  // src/components/RenderModal/CliCopyButton.tsx
28256
- import { useCallback as useCallback125, useEffect as useEffect81, useMemo as useMemo135, useState as useState88 } from "react";
28555
+ import { useCallback as useCallback125, useEffect as useEffect81, useMemo as useMemo135, useState as useState87 } from "react";
28257
28556
  import { jsx as jsx249 } from "react/jsx-runtime";
28258
28557
  var svgStyle = {
28259
28558
  width: 16,
@@ -28280,8 +28579,8 @@ var buttonStyle5 = {
28280
28579
  var CliCopyButton = ({
28281
28580
  valueToCopy
28282
28581
  }) => {
28283
- const [copied, setCopied] = useState88(false);
28284
- const [hovered, setHovered] = useState88(false);
28582
+ const [copied, setCopied] = useState87(false);
28583
+ const [hovered, setHovered] = useState87(false);
28285
28584
  const fillColor = useMemo135(() => {
28286
28585
  return hovered ? "white" : LIGHT_TEXT;
28287
28586
  }, [hovered]);
@@ -28569,7 +28868,7 @@ var getDefaultCrfState = () => {
28569
28868
  }, {});
28570
28869
  };
28571
28870
  var useCrfState = (codec) => {
28572
- const [state, setState] = useState89(() => getDefaultCrfState());
28871
+ const [state, setState] = useState88(() => getDefaultCrfState());
28573
28872
  const range = BrowserSafeApis3.getValidCrfRanges(codec);
28574
28873
  const setCrf = (updater) => {
28575
28874
  setState((q) => {
@@ -29841,10 +30140,10 @@ import { BrowserSafeApis as BrowserSafeApis7 } from "@remotion/renderer/client";
29841
30140
  import { useCallback as useCallback133, useMemo as useMemo137 } from "react";
29842
30141
 
29843
30142
  // src/helpers/use-file-existence.ts
29844
- import { useContext as useContext93, useEffect as useEffect82, useRef as useRef48, useState as useState90 } from "react";
30143
+ import { useContext as useContext92, useEffect as useEffect82, useRef as useRef48, useState as useState89 } from "react";
29845
30144
  var useFileExistence = (outName) => {
29846
- const [exists, setExists] = useState90(false);
29847
- const { previewServerState: state, subscribeToEvent } = useContext93(StudioServerConnectionCtx);
30145
+ const [exists, setExists] = useState89(false);
30146
+ const { previewServerState: state, subscribeToEvent } = useContext92(StudioServerConnectionCtx);
29848
30147
  const clientId = state.type === "connected" ? state.clientId : undefined;
29849
30148
  const currentOutName = useRef48("");
29850
30149
  currentOutName.current = outName;
@@ -31273,8 +31572,8 @@ var RenderModal = ({
31273
31572
  initialChromeMode,
31274
31573
  renderDefaults
31275
31574
  }) => {
31276
- const { setSelectedModal } = useContext94(ModalsContext);
31277
- const context = useContext94(ResolvedCompositionContext);
31575
+ const { setSelectedModal } = useContext93(ModalsContext);
31576
+ const context = useContext93(ResolvedCompositionContext);
31278
31577
  if (!context) {
31279
31578
  throw new Error("Should not be able to render without resolving comp first");
31280
31579
  }
@@ -31283,7 +31582,7 @@ var RenderModal = ({
31283
31582
  unresolved: unresolvedComposition
31284
31583
  } = context;
31285
31584
  const isMounted = useRef49(true);
31286
- const [isVideo] = useState91(() => {
31585
+ const [isVideo] = useState90(() => {
31287
31586
  return typeof resolvedComposition.durationInFrames === "undefined" ? true : resolvedComposition.durationInFrames > 1;
31288
31587
  });
31289
31588
  const [
@@ -31294,7 +31593,7 @@ var RenderModal = ({
31294
31593
  initialVideoCodecForAudioTab,
31295
31594
  initialVideoCodecForVideoTab
31296
31595
  }
31297
- ] = useState91(() => {
31596
+ ] = useState90(() => {
31298
31597
  return getDefaultCodecs({
31299
31598
  defaultConfigurationVideoCodec,
31300
31599
  compositionDefaultVideoCodec: resolvedComposition.defaultCodec,
@@ -31303,16 +31602,16 @@ var RenderModal = ({
31303
31602
  });
31304
31603
  });
31305
31604
  const [state, dispatch] = useReducer2(reducer2, initialState2);
31306
- const [unclampedFrame, setFrame] = useState91(() => initialFrame);
31307
- const [stillImageFormat, setStillImageFormat] = useState91(() => initialStillImageFormat);
31308
- const [videoImageFormat, setVideoImageFormat] = useState91(() => initialVideoImageFormat ?? resolvedComposition.defaultVideoImageFormat ?? renderDefaults.videoImageFormat);
31309
- const [sequenceImageFormat, setSequenceImageFormat] = useState91(() => initialStillImageFormat === "jpeg" ? "jpeg" : "png");
31310
- const [concurrency, setConcurrency] = useState91(() => initialConcurrency);
31311
- const [videoCodecForVideoTab, setVideoCodecForVideoTab] = useState91(() => initialVideoCodecForVideoTab);
31312
- const [userSelectedAudioCodec, setUserSelectedAudioCodec] = useState91(() => initialAudioCodec);
31313
- const [separateAudioTo, setSeparateAudioTo] = useState91(null);
31314
- const [envVariables, setEnvVariables] = useState91(() => envVariablesObjectToArray(initialEnvVariables).filter(([key5]) => key5 !== "NODE_ENV"));
31315
- const [initialOutName] = useState91(() => {
31605
+ const [unclampedFrame, setFrame] = useState90(() => initialFrame);
31606
+ const [stillImageFormat, setStillImageFormat] = useState90(() => initialStillImageFormat);
31607
+ const [videoImageFormat, setVideoImageFormat] = useState90(() => initialVideoImageFormat ?? resolvedComposition.defaultVideoImageFormat ?? renderDefaults.videoImageFormat);
31608
+ const [sequenceImageFormat, setSequenceImageFormat] = useState90(() => initialStillImageFormat === "jpeg" ? "jpeg" : "png");
31609
+ const [concurrency, setConcurrency] = useState90(() => initialConcurrency);
31610
+ const [videoCodecForVideoTab, setVideoCodecForVideoTab] = useState90(() => initialVideoCodecForVideoTab);
31611
+ const [userSelectedAudioCodec, setUserSelectedAudioCodec] = useState90(() => initialAudioCodec);
31612
+ const [separateAudioTo, setSeparateAudioTo] = useState90(null);
31613
+ const [envVariables, setEnvVariables] = useState90(() => envVariablesObjectToArray(initialEnvVariables).filter(([key5]) => key5 !== "NODE_ENV"));
31614
+ const [initialOutName] = useState90(() => {
31316
31615
  return getDefaultOutLocation({
31317
31616
  compositionName: resolvedComposition.id,
31318
31617
  defaultExtension: initialRenderType === "still" ? initialStillImageFormat : isVideo ? BrowserSafeApis11.getFileExtensionFromCodec(initialVideoCodec, initialAudioCodec) : initialStillImageFormat,
@@ -31321,26 +31620,26 @@ var RenderModal = ({
31321
31620
  outputLocation: renderDefaults.outputLocation
31322
31621
  });
31323
31622
  });
31324
- const [videoCodecForAudioTab, setVideoCodecForAudioTab] = useState91(() => initialVideoCodecForAudioTab);
31325
- const [mutedState, setMuted] = useState91(() => initialMuted);
31326
- const [repro, setRepro] = useState91(() => initialRepro);
31327
- const [enforceAudioTrackState, setEnforceAudioTrackState] = useState91(() => initialEnforceAudioTrack);
31328
- const [forSeamlessAacConcatenation, setForSeamlessAacConcatenation] = useState91(() => initialForSeamlessAacConcatenation);
31329
- const [sampleRate, setSampleRate] = useState91(() => initialSampleRate);
31330
- const [renderMode, setRenderModeState] = useState91(initialRenderType);
31331
- const [jpegQuality, setJpegQuality] = useState91(() => initialJpegQuality);
31332
- const [scale, setScale] = useState91(() => initialScale);
31333
- const [logLevel, setLogLevel] = useState91(() => initialLogLevel);
31334
- const [disallowParallelEncoding, setDisallowParallelEncoding] = useState91(false);
31335
- const [disableWebSecurity, setDisableWebSecurity] = useState91(() => initialDisableWebSecurity);
31336
- const [headless, setHeadless] = useState91(() => initialHeadless);
31337
- const [beepOnFinish, setBeepOnFinish] = useState91(() => initialBeep);
31338
- const [ignoreCertificateErrors, setIgnoreCertificateErrors] = useState91(() => initialIgnoreCertificateErrors);
31339
- const [multiProcessOnLinux, setChromiumMultiProcessOnLinux] = useState91(() => initialMultiProcessOnLinux);
31340
- const [darkMode, setDarkMode] = useState91(() => initialDarkMode);
31341
- const [openGlOption, setOpenGlOption] = useState91(() => initialGl ?? "default");
31342
- const [colorSpace, setColorSpace] = useState91(() => initialColorSpace);
31343
- const [userAgent, setUserAgent] = useState91(() => initialUserAgent === null ? null : initialUserAgent.trim() === "" ? null : initialUserAgent);
31623
+ const [videoCodecForAudioTab, setVideoCodecForAudioTab] = useState90(() => initialVideoCodecForAudioTab);
31624
+ const [mutedState, setMuted] = useState90(() => initialMuted);
31625
+ const [repro, setRepro] = useState90(() => initialRepro);
31626
+ const [enforceAudioTrackState, setEnforceAudioTrackState] = useState90(() => initialEnforceAudioTrack);
31627
+ const [forSeamlessAacConcatenation, setForSeamlessAacConcatenation] = useState90(() => initialForSeamlessAacConcatenation);
31628
+ const [sampleRate, setSampleRate] = useState90(() => initialSampleRate);
31629
+ const [renderMode, setRenderModeState] = useState90(initialRenderType);
31630
+ const [jpegQuality, setJpegQuality] = useState90(() => initialJpegQuality);
31631
+ const [scale, setScale] = useState90(() => initialScale);
31632
+ const [logLevel, setLogLevel] = useState90(() => initialLogLevel);
31633
+ const [disallowParallelEncoding, setDisallowParallelEncoding] = useState90(false);
31634
+ const [disableWebSecurity, setDisableWebSecurity] = useState90(() => initialDisableWebSecurity);
31635
+ const [headless, setHeadless] = useState90(() => initialHeadless);
31636
+ const [beepOnFinish, setBeepOnFinish] = useState90(() => initialBeep);
31637
+ const [ignoreCertificateErrors, setIgnoreCertificateErrors] = useState90(() => initialIgnoreCertificateErrors);
31638
+ const [multiProcessOnLinux, setChromiumMultiProcessOnLinux] = useState90(() => initialMultiProcessOnLinux);
31639
+ const [darkMode, setDarkMode] = useState90(() => initialDarkMode);
31640
+ const [openGlOption, setOpenGlOption] = useState90(() => initialGl ?? "default");
31641
+ const [colorSpace, setColorSpace] = useState90(() => initialColorSpace);
31642
+ const [userAgent, setUserAgent] = useState90(() => initialUserAgent === null ? null : initialUserAgent.trim() === "" ? null : initialUserAgent);
31344
31643
  const chromiumOptions = useMemo143(() => {
31345
31644
  return {
31346
31645
  headless,
@@ -31360,29 +31659,29 @@ var RenderModal = ({
31360
31659
  multiProcessOnLinux,
31361
31660
  darkMode
31362
31661
  ]);
31363
- const [outName, setOutName] = useState91(() => initialOutName);
31364
- const [endFrameOrNull, setEndFrame] = useState91(() => outFrameMark ?? null);
31365
- const [startFrameOrNull, setStartFrame] = useState91(() => inFrameMark ?? null);
31366
- const [proResProfileSetting, setProResProfile] = useState91(() => initialProResProfile ?? resolvedComposition.defaultProResProfile ?? "hq");
31367
- const [x264PresetSetting, setx264Preset] = useState91(() => initialx264Preset);
31368
- const [hardwareAcceleration, setHardwareAcceleration] = useState91(() => initialHardwareAcceleration);
31369
- const [userPreferredPixelFormat, setPixelFormat] = useState91(() => initialPixelFormat ?? resolvedComposition.defaultPixelFormat ?? renderDefaults.pixelFormat);
31370
- const [preferredQualityControlType, setQualityControl] = useState91(() => initialVideoBitrate === null ? "crf" : "bitrate");
31662
+ const [outName, setOutName] = useState90(() => initialOutName);
31663
+ const [endFrameOrNull, setEndFrame] = useState90(() => outFrameMark ?? null);
31664
+ const [startFrameOrNull, setStartFrame] = useState90(() => inFrameMark ?? null);
31665
+ const [proResProfileSetting, setProResProfile] = useState90(() => initialProResProfile ?? resolvedComposition.defaultProResProfile ?? "hq");
31666
+ const [x264PresetSetting, setx264Preset] = useState90(() => initialx264Preset);
31667
+ const [hardwareAcceleration, setHardwareAcceleration] = useState90(() => initialHardwareAcceleration);
31668
+ const [userPreferredPixelFormat, setPixelFormat] = useState90(() => initialPixelFormat ?? resolvedComposition.defaultPixelFormat ?? renderDefaults.pixelFormat);
31669
+ const [preferredQualityControlType, setQualityControl] = useState90(() => initialVideoBitrate === null ? "crf" : "bitrate");
31371
31670
  const [
31372
31671
  shouldHaveCustomTargetAudioBitrate,
31373
31672
  setShouldHaveCustomTargetAudioBitrate
31374
- ] = useState91(() => initialAudioBitrate !== null);
31375
- const [customTargetAudioBitrate, setCustomTargetAudioBitrateValue] = useState91(() => initialAudioBitrate ?? "320K");
31376
- const [customTargetVideoBitrate, setCustomTargetVideoBitrateValue] = useState91(() => initialVideoBitrate ?? "1M");
31377
- const [encodingMaxRate, setEncodingMaxRate] = useState91(() => initialEncodingMaxRate ?? null);
31378
- const [encodingBufferSize, setEncodingBufferSize] = useState91(() => initialEncodingBufferSize ?? null);
31379
- const [limitNumberOfGifLoops, setLimitNumberOfGifLoops] = useState91(() => initialNumberOfGifLoops !== null);
31380
- const [numberOfGifLoopsSetting, setNumberOfGifLoopsSetting] = useState91(() => initialNumberOfGifLoops ?? 0);
31381
- const [delayRenderTimeout, setDelayRenderTimeout] = useState91(() => initialDelayRenderTimeout);
31382
- const [chromeMode, setChromeMode] = useState91(() => initialChromeMode);
31383
- const [offthreadVideoCacheSizeInBytes, setOffthreadVideoCacheSizeInBytes] = useState91(initialOffthreadVideoCacheSizeInBytes);
31384
- const [mediaCacheSizeInBytes, setMediaCacheSizeInBytes] = useState91(initialMediaCacheSizeInBytes);
31385
- const [offthreadVideoThreads, setOffthreadVideoThreads] = useState91(() => initialOffthreadVideoThreads);
31673
+ ] = useState90(() => initialAudioBitrate !== null);
31674
+ const [customTargetAudioBitrate, setCustomTargetAudioBitrateValue] = useState90(() => initialAudioBitrate ?? "320K");
31675
+ const [customTargetVideoBitrate, setCustomTargetVideoBitrateValue] = useState90(() => initialVideoBitrate ?? "1M");
31676
+ const [encodingMaxRate, setEncodingMaxRate] = useState90(() => initialEncodingMaxRate ?? null);
31677
+ const [encodingBufferSize, setEncodingBufferSize] = useState90(() => initialEncodingBufferSize ?? null);
31678
+ const [limitNumberOfGifLoops, setLimitNumberOfGifLoops] = useState90(() => initialNumberOfGifLoops !== null);
31679
+ const [numberOfGifLoopsSetting, setNumberOfGifLoopsSetting] = useState90(() => initialNumberOfGifLoops ?? 0);
31680
+ const [delayRenderTimeout, setDelayRenderTimeout] = useState90(() => initialDelayRenderTimeout);
31681
+ const [chromeMode, setChromeMode] = useState90(() => initialChromeMode);
31682
+ const [offthreadVideoCacheSizeInBytes, setOffthreadVideoCacheSizeInBytes] = useState90(initialOffthreadVideoCacheSizeInBytes);
31683
+ const [mediaCacheSizeInBytes, setMediaCacheSizeInBytes] = useState90(initialMediaCacheSizeInBytes);
31684
+ const [offthreadVideoThreads, setOffthreadVideoThreads] = useState90(() => initialOffthreadVideoThreads);
31386
31685
  const codec = useMemo143(() => {
31387
31686
  if (renderMode === "audio") {
31388
31687
  return videoCodecForAudioTab;
@@ -31469,11 +31768,11 @@ var RenderModal = ({
31469
31768
  }
31470
31769
  return null;
31471
31770
  }, [codec, x264PresetSetting, renderMode]);
31472
- const [inputProps, _setInputProps] = useState91(() => defaultProps);
31771
+ const [inputProps, _setInputProps] = useState90(() => defaultProps);
31473
31772
  const setInputProps = useCallback141((updater) => {
31474
31773
  _setInputProps(updater);
31475
31774
  }, []);
31476
- const [metadata] = useState91(() => defaultMetadata);
31775
+ const [metadata] = useState90(() => defaultMetadata);
31477
31776
  const endFrame = useMemo143(() => {
31478
31777
  if (endFrameOrNull === null) {
31479
31778
  return resolvedComposition.durationInFrames - 1;
@@ -31552,7 +31851,7 @@ var RenderModal = ({
31552
31851
  setStillImageFormat(format);
31553
31852
  setDefaultOutName({ type: "still", imageFormat: format });
31554
31853
  }, [setDefaultOutName]);
31555
- const { setSidebarCollapsedState } = useContext94(SidebarContext);
31854
+ const { setSidebarCollapsedState } = useContext93(SidebarContext);
31556
31855
  const onClickStill = useCallback141(() => {
31557
31856
  setSidebarCollapsedState({ left: null, right: "expanded" });
31558
31857
  persistSelectedOptionsSidebarPanel2("renders");
@@ -31606,7 +31905,7 @@ var RenderModal = ({
31606
31905
  offthreadVideoThreads,
31607
31906
  mediaCacheSizeInBytes
31608
31907
  ]);
31609
- const [everyNthFrameSetting, setEveryNthFrameSetting] = useState91(() => initialEveryNthFrame);
31908
+ const [everyNthFrameSetting, setEveryNthFrameSetting] = useState90(() => initialEveryNthFrame);
31610
31909
  const everyNthFrame = useMemo143(() => {
31611
31910
  if (codec === "gif") {
31612
31911
  return everyNthFrameSetting;
@@ -32060,7 +32359,7 @@ var RenderModal = ({
32060
32359
  videoBitrate,
32061
32360
  x264Preset
32062
32361
  ]);
32063
- const [commandCopiedAt, setCommandCopiedAt] = useState91(null);
32362
+ const [commandCopiedAt, setCommandCopiedAt] = useState90(null);
32064
32363
  const renderDisabled = readOnlyStudio ? false : !outnameValidation.valid || state.type === "load";
32065
32364
  const trigger = useCallback141(() => {
32066
32365
  if (readOnlyStudio) {
@@ -32416,7 +32715,7 @@ import {
32416
32715
  getDefaultVideoCodecForContainer,
32417
32716
  isAudioOnlyContainer
32418
32717
  } from "@remotion/web-renderer";
32419
- import { useCallback as useCallback145, useContext as useContext95, useMemo as useMemo148, useState as useState95 } from "react";
32718
+ import { useCallback as useCallback145, useContext as useContext94, useMemo as useMemo148, useState as useState94 } from "react";
32420
32719
 
32421
32720
  // src/icons/certificate.tsx
32422
32721
  import { jsx as jsx273 } from "react/jsx-runtime";
@@ -32435,10 +32734,10 @@ import {
32435
32734
  getEncodableAudioCodecs,
32436
32735
  getSupportedAudioCodecsForContainer
32437
32736
  } from "@remotion/web-renderer";
32438
- import { useEffect as useEffect84, useRef as useRef50, useState as useState92 } from "react";
32737
+ import { useEffect as useEffect84, useRef as useRef50, useState as useState91 } from "react";
32439
32738
  var useEncodableAudioCodecs = (container60) => {
32440
32739
  const cacheRef = useRef50({});
32441
- const [codecsByContainer, setCodecsByContainer] = useState92(() => {
32740
+ const [codecsByContainer, setCodecsByContainer] = useState91(() => {
32442
32741
  return {
32443
32742
  [container60]: getSupportedAudioCodecsForContainer(container60)
32444
32743
  };
@@ -32477,10 +32776,10 @@ import {
32477
32776
  getEncodableVideoCodecs,
32478
32777
  getSupportedVideoCodecsForContainer
32479
32778
  } from "@remotion/web-renderer";
32480
- import { useEffect as useEffect85, useRef as useRef51, useState as useState93 } from "react";
32779
+ import { useEffect as useEffect85, useRef as useRef51, useState as useState92 } from "react";
32481
32780
  var useEncodableVideoCodecs = (container60) => {
32482
32781
  const cacheRef = useRef51({});
32483
- const [codecsByContainer, setCodecsByContainer] = useState93(() => {
32782
+ const [codecsByContainer, setCodecsByContainer] = useState92(() => {
32484
32783
  return {
32485
32784
  [container60]: getSupportedVideoCodecsForContainer(container60)
32486
32785
  };
@@ -33173,7 +33472,7 @@ var WebRenderModalBasic = ({
33173
33472
  };
33174
33473
 
33175
33474
  // src/components/RenderModal/WebRenderModalLicense.tsx
33176
- import { useCallback as useCallback143, useEffect as useEffect86, useState as useState94 } from "react";
33475
+ import { useCallback as useCallback143, useEffect as useEffect86, useState as useState93 } from "react";
33177
33476
 
33178
33477
  // src/icons/check-circle-filled.tsx
33179
33478
  import { jsx as jsx279 } from "react/jsx-runtime";
@@ -33393,8 +33692,8 @@ var WebRenderModalLicense = ({
33393
33692
  setLicenseKey,
33394
33693
  initialPublicLicenseKey
33395
33694
  }) => {
33396
- const [licenseValidation, setLicenseValidation] = useState94({ valid: true, message: null, details: null });
33397
- const [isLoading, setIsLoading] = useState94(false);
33695
+ const [licenseValidation, setLicenseValidation] = useState93({ valid: true, message: null, details: null });
33696
+ const [isLoading, setIsLoading] = useState93(false);
33398
33697
  useEffect86(() => {
33399
33698
  if (licenseKey === null || licenseKey === "free-license") {
33400
33699
  return setLicenseValidation({
@@ -33761,10 +34060,10 @@ var WebRenderModal = ({
33761
34060
  initialMuted,
33762
34061
  initialAllowHtmlInCanvas
33763
34062
  }) => {
33764
- const context = useContext95(ResolvedCompositionContext);
33765
- const { setSelectedModal } = useContext95(ModalsContext);
33766
- const { setSidebarCollapsedState } = useContext95(SidebarContext);
33767
- const { addClientStillJob, addClientVideoJob } = useContext95(RenderQueueContext);
34063
+ const context = useContext94(ResolvedCompositionContext);
34064
+ const { setSelectedModal } = useContext94(ModalsContext);
34065
+ const { setSidebarCollapsedState } = useContext94(SidebarContext);
34066
+ const { addClientStillJob, addClientVideoJob } = useContext94(RenderQueueContext);
33768
34067
  if (!context) {
33769
34068
  throw new Error("Should not be able to render without resolving comp first");
33770
34069
  }
@@ -33772,34 +34071,34 @@ var WebRenderModal = ({
33772
34071
  resolved: { result: resolvedComposition },
33773
34072
  unresolved: unresolvedComposition
33774
34073
  } = context;
33775
- const [isVideo] = useState95(() => {
34074
+ const [isVideo] = useState94(() => {
33776
34075
  return typeof resolvedComposition.durationInFrames === "undefined" ? true : resolvedComposition.durationInFrames > 1;
33777
34076
  });
33778
- const [renderMode, setRenderMode] = useState95(initialContainer && isAudioOnlyContainer(initialContainer) ? "audio" : isVideo ? "video" : "still");
33779
- const [tab, setTab] = useState95("general");
33780
- const [imageFormat, setImageFormat] = useState95(() => initialStillImageFormat ?? "png");
33781
- const [frame2, setFrame] = useState95(() => initialFrame);
33782
- const [logLevel, setLogLevel] = useState95(() => initialLogLevel);
33783
- const [inputProps, _setInputProps] = useState95(() => defaultProps);
34077
+ const [renderMode, setRenderMode] = useState94(initialContainer && isAudioOnlyContainer(initialContainer) ? "audio" : isVideo ? "video" : "still");
34078
+ const [tab, setTab] = useState94("general");
34079
+ const [imageFormat, setImageFormat] = useState94(() => initialStillImageFormat ?? "png");
34080
+ const [frame2, setFrame] = useState94(() => initialFrame);
34081
+ const [logLevel, setLogLevel] = useState94(() => initialLogLevel);
34082
+ const [inputProps, _setInputProps] = useState94(() => defaultProps);
33784
34083
  const setInputProps = useCallback145((updater) => {
33785
34084
  _setInputProps(updater);
33786
34085
  }, []);
33787
- const [delayRenderTimeout, setDelayRenderTimeout] = useState95(initialDelayRenderTimeout ?? 30000);
33788
- const [mediaCacheSizeInBytes, setMediaCacheSizeInBytes] = useState95(initialMediaCacheSizeInBytes);
33789
- const [codec, setCodec] = useState95(initialVideoCodec ?? "h264");
33790
- const [container61, setContainer] = useState95(initialContainer ?? "mp4");
33791
- const [audioCodec, setAudioCodec] = useState95(initialAudioCodec ?? "aac");
33792
- const [audioBitrate, setAudioBitrate] = useState95(initialAudioBitrate ?? "medium");
33793
- const [videoBitrate, setVideoBitrate] = useState95(initialVideoBitrate ?? "high");
33794
- const [hardwareAcceleration, setHardwareAcceleration] = useState95(initialHardwareAcceleration ?? "no-preference");
33795
- const [keyframeIntervalInSeconds, setKeyframeIntervalInSeconds] = useState95(initialKeyframeIntervalInSeconds ?? 5);
33796
- const [startFrame, setStartFrame] = useState95(() => inFrameMark);
33797
- const [endFrame, setEndFrame] = useState95(() => outFrameMark);
33798
- const [transparent, setTransparent] = useState95(initialTransparent ?? false);
33799
- const [muted, setMuted] = useState95(initialMuted ?? false);
33800
- const [scale, setScale] = useState95(initialScale ?? 1);
33801
- const [licenseKey, setLicenseKey] = useState95(initialLicenseKey);
33802
- const [allowHtmlInCanvas, setAllowHtmlInCanvas] = useState95(initialAllowHtmlInCanvas ?? false);
34086
+ const [delayRenderTimeout, setDelayRenderTimeout] = useState94(initialDelayRenderTimeout ?? 30000);
34087
+ const [mediaCacheSizeInBytes, setMediaCacheSizeInBytes] = useState94(initialMediaCacheSizeInBytes);
34088
+ const [codec, setCodec] = useState94(initialVideoCodec ?? "h264");
34089
+ const [container61, setContainer] = useState94(initialContainer ?? "mp4");
34090
+ const [audioCodec, setAudioCodec] = useState94(initialAudioCodec ?? "aac");
34091
+ const [audioBitrate, setAudioBitrate] = useState94(initialAudioBitrate ?? "medium");
34092
+ const [videoBitrate, setVideoBitrate] = useState94(initialVideoBitrate ?? "high");
34093
+ const [hardwareAcceleration, setHardwareAcceleration] = useState94(initialHardwareAcceleration ?? "no-preference");
34094
+ const [keyframeIntervalInSeconds, setKeyframeIntervalInSeconds] = useState94(initialKeyframeIntervalInSeconds ?? 5);
34095
+ const [startFrame, setStartFrame] = useState94(() => inFrameMark);
34096
+ const [endFrame, setEndFrame] = useState94(() => outFrameMark);
34097
+ const [transparent, setTransparent] = useState94(initialTransparent ?? false);
34098
+ const [muted, setMuted] = useState94(initialMuted ?? false);
34099
+ const [scale, setScale] = useState94(initialScale ?? 1);
34100
+ const [licenseKey, setLicenseKey] = useState94(initialLicenseKey);
34101
+ const [allowHtmlInCanvas, setAllowHtmlInCanvas] = useState94(initialAllowHtmlInCanvas ?? false);
33803
34102
  const encodableAudioCodecs = useEncodableAudioCodecs(container61);
33804
34103
  const encodableVideoCodecs = useEncodableVideoCodecs(container61);
33805
34104
  const effectiveAudioCodec = useMemo148(() => {
@@ -33826,7 +34125,7 @@ var WebRenderModal = ({
33826
34125
  }
33827
34126
  return Math.max(0, Math.min(finalEndFrame, startFrame));
33828
34127
  }, [finalEndFrame, startFrame]);
33829
- const [initialOutNameState] = useState95(() => {
34128
+ const [initialOutNameState] = useState94(() => {
33830
34129
  if (initialDefaultOutName) {
33831
34130
  return initialDefaultOutName;
33832
34131
  }
@@ -33842,7 +34141,7 @@ var WebRenderModal = ({
33842
34141
  }
33843
34142
  return defaultOut;
33844
34143
  });
33845
- const [outName, setOutName] = useState95(() => initialOutNameState);
34144
+ const [outName, setOutName] = useState94(() => initialOutNameState);
33846
34145
  const updateOutNameExtension = useCallback145((extension) => {
33847
34146
  setOutName((prev) => getStringBeforeSuffix(prev) + "." + extension);
33848
34147
  }, []);
@@ -34282,7 +34581,7 @@ var WebRenderModalWithLoader = (props) => {
34282
34581
  import { useCallback as useCallback148, useMemo as useMemo150 } from "react";
34283
34582
 
34284
34583
  // src/components/CopyButton.tsx
34285
- import { useCallback as useCallback146, useEffect as useEffect87, useState as useState96 } from "react";
34584
+ import { useCallback as useCallback146, useEffect as useEffect87, useState as useState95 } from "react";
34286
34585
  import { jsx as jsx284, jsxs as jsxs152 } from "react/jsx-runtime";
34287
34586
  var iconStyle9 = {
34288
34587
  width: 16,
@@ -34312,7 +34611,7 @@ var labelStyle5 = {
34312
34611
  fontSize: 14
34313
34612
  };
34314
34613
  var CopyButton = ({ textToCopy, label: label12, labelWhenCopied }) => {
34315
- const [copied, setCopied] = useState96(false);
34614
+ const [copied, setCopied] = useState95(false);
34316
34615
  const onClick = useCallback146(() => {
34317
34616
  copyText(textToCopy).then(() => {
34318
34617
  setCopied(Date.now());
@@ -34345,7 +34644,7 @@ var CopyButton = ({ textToCopy, label: label12, labelWhenCopied }) => {
34345
34644
  };
34346
34645
 
34347
34646
  // src/components/UpdateModal/OpenIssueButton.tsx
34348
- import { useCallback as useCallback147, useMemo as useMemo149, useState as useState97 } from "react";
34647
+ import { useCallback as useCallback147, useMemo as useMemo149, useState as useState96 } from "react";
34349
34648
  import { jsx as jsx285 } from "react/jsx-runtime";
34350
34649
  var svgStyle2 = {
34351
34650
  width: "11px",
@@ -34360,7 +34659,7 @@ var buttonStyle7 = {
34360
34659
  alignItems: "center"
34361
34660
  };
34362
34661
  var OpenIssueButton = ({ link: link4 }) => {
34363
- const [hovered, setHovered] = useState97(false);
34662
+ const [hovered, setHovered] = useState96(false);
34364
34663
  const buttonTooltip = `Open GitHub issue in new Tab`;
34365
34664
  const handleClick = useCallback147(() => {
34366
34665
  window.open(link4, "_blank");
@@ -34561,8 +34860,8 @@ var UpdateModal = ({ info, knownBugs }) => {
34561
34860
  // src/components/Modals.tsx
34562
34861
  import { jsx as jsx288, jsxs as jsxs155, Fragment as Fragment53 } from "react/jsx-runtime";
34563
34862
  var Modals = ({ readOnlyStudio }) => {
34564
- const { selectedModal: modalContextType } = useContext96(ModalsContext);
34565
- const canRender = useContext96(StudioServerConnectionCtx).previewServerState.type === "connected";
34863
+ const { selectedModal: modalContextType } = useContext95(ModalsContext);
34864
+ const canRender = useContext95(StudioServerConnectionCtx).previewServerState.type === "connected";
34566
34865
  return /* @__PURE__ */ jsxs155(Fragment53, {
34567
34866
  children: [
34568
34867
  modalContextType && modalContextType.type === "duplicate-comp" && /* @__PURE__ */ jsx288(DuplicateComposition, {
@@ -34683,7 +34982,7 @@ var Editor = ({ Root, readOnlyStudio }) => {
34683
34982
  const MemoRoot = useMemo151(() => {
34684
34983
  return React187.memo(Root);
34685
34984
  }, [Root]);
34686
- const [renderError, setRenderError] = useState98(null);
34985
+ const [renderError, setRenderError] = useState97(null);
34687
34986
  const clearError = useCallback149(() => {
34688
34987
  setRenderError(null);
34689
34988
  }, []);
@@ -34739,7 +35038,7 @@ var Editor = ({ Root, readOnlyStudio }) => {
34739
35038
  import { PlayerInternals as PlayerInternals20 } from "@remotion/player";
34740
35039
 
34741
35040
  // src/state/preview-size.tsx
34742
- import { useCallback as useCallback150, useContext as useContext97, useMemo as useMemo152, useState as useState99 } from "react";
35041
+ import { useCallback as useCallback150, useContext as useContext96, useMemo as useMemo152, useState as useState98 } from "react";
34743
35042
  import { Internals as Internals66 } from "remotion";
34744
35043
  import { jsx as jsx290 } from "react/jsx-runtime";
34745
35044
  var key5 = "remotion.previewSize";
@@ -34760,14 +35059,14 @@ var loadPreviewSizeOption = () => {
34760
35059
  return JSON.parse(item2);
34761
35060
  };
34762
35061
  var PreviewSizeProvider = ({ children }) => {
34763
- const [size4, setSizeState] = useState99(() => loadPreviewSizeOption());
34764
- const [translation, setTranslation] = useState99(() => {
35062
+ const [size4, setSizeState] = useState98(() => loadPreviewSizeOption());
35063
+ const [translation, setTranslation] = useState98(() => {
34765
35064
  return {
34766
35065
  x: 0,
34767
35066
  y: 0
34768
35067
  };
34769
35068
  });
34770
- const { editorZoomGestures } = useContext97(EditorZoomGesturesContext);
35069
+ const { editorZoomGestures } = useContext96(EditorZoomGesturesContext);
34771
35070
  const setSize = useCallback150((newValue) => {
34772
35071
  setSizeState((prevState) => {
34773
35072
  const newVal = newValue(prevState);
@@ -34796,10 +35095,10 @@ var PreviewSizeProvider = ({ children }) => {
34796
35095
  };
34797
35096
 
34798
35097
  // src/components/CheckerboardProvider.tsx
34799
- import { useCallback as useCallback151, useMemo as useMemo153, useState as useState100 } from "react";
35098
+ import { useCallback as useCallback151, useMemo as useMemo153, useState as useState99 } from "react";
34800
35099
  import { jsx as jsx291 } from "react/jsx-runtime";
34801
35100
  var CheckerboardProvider = ({ children }) => {
34802
- const [checkerboard, setCheckerboardState] = useState100(() => loadCheckerboardOption());
35101
+ const [checkerboard, setCheckerboardState] = useState99(() => loadCheckerboardOption());
34803
35102
  const setCheckerboard = useCallback151((newValue) => {
34804
35103
  setCheckerboardState((prevState) => {
34805
35104
  const newVal = newValue(prevState);
@@ -34820,12 +35119,12 @@ var CheckerboardProvider = ({ children }) => {
34820
35119
  };
34821
35120
 
34822
35121
  // src/components/MediaVolumeProvider.tsx
34823
- import { useMemo as useMemo154, useState as useState101 } from "react";
35122
+ import { useMemo as useMemo154, useState as useState100 } from "react";
34824
35123
  import { Internals as Internals67 } from "remotion";
34825
35124
  import { jsx as jsx292 } from "react/jsx-runtime";
34826
35125
  var MediaVolumeProvider = ({ children }) => {
34827
- const [mediaMuted, setMediaMuted] = useState101(() => loadMuteOption());
34828
- const [mediaVolume, setMediaVolume] = useState101(1);
35126
+ const [mediaMuted, setMediaMuted] = useState100(() => loadMuteOption());
35127
+ const [mediaVolume, setMediaVolume] = useState100(1);
34829
35128
  const mediaVolumeContextValue = useMemo154(() => {
34830
35129
  return {
34831
35130
  mediaMuted,
@@ -34848,10 +35147,10 @@ var MediaVolumeProvider = ({ children }) => {
34848
35147
  };
34849
35148
 
34850
35149
  // src/components/ModalsProvider.tsx
34851
- import { useMemo as useMemo155, useState as useState102 } from "react";
35150
+ import { useMemo as useMemo155, useState as useState101 } from "react";
34852
35151
  import { jsx as jsx293 } from "react/jsx-runtime";
34853
35152
  var ModalsProvider = ({ children }) => {
34854
- const [modalContextType, setModalContextType] = useState102(null);
35153
+ const [modalContextType, setModalContextType] = useState101(null);
34855
35154
  const modalsContext = useMemo155(() => {
34856
35155
  return {
34857
35156
  selectedModal: modalContextType,
@@ -34865,7 +35164,7 @@ var ModalsProvider = ({ children }) => {
34865
35164
  };
34866
35165
 
34867
35166
  // src/components/SetTimelineInOutProvider.tsx
34868
- import { useEffect as useEffect88, useMemo as useMemo156, useState as useState103 } from "react";
35167
+ import { useEffect as useEffect88, useMemo as useMemo156, useState as useState102 } from "react";
34869
35168
 
34870
35169
  // src/state/marks.ts
34871
35170
  var localStorageKey5 = () => `remotion.editor.marksv2`;
@@ -34883,7 +35182,7 @@ var loadMarks = () => {
34883
35182
  // src/components/SetTimelineInOutProvider.tsx
34884
35183
  import { jsx as jsx294 } from "react/jsx-runtime";
34885
35184
  var SetTimelineInOutProvider = ({ children }) => {
34886
- const [inAndOutFrames, setInAndOutFrames] = useState103(() => loadMarks());
35185
+ const [inAndOutFrames, setInAndOutFrames] = useState102(() => loadMarks());
34887
35186
  const setTimelineInOutContextValue = useMemo156(() => {
34888
35187
  return {
34889
35188
  setInAndOutFrames
@@ -34902,13 +35201,13 @@ var SetTimelineInOutProvider = ({ children }) => {
34902
35201
  };
34903
35202
 
34904
35203
  // src/components/ShowGuidesProvider.tsx
34905
- import { useCallback as useCallback152, useMemo as useMemo157, useRef as useRef52, useState as useState104 } from "react";
35204
+ import { useCallback as useCallback152, useMemo as useMemo157, useRef as useRef52, useState as useState103 } from "react";
34906
35205
  import { jsx as jsx295 } from "react/jsx-runtime";
34907
35206
  var ShowGuidesProvider = ({ children }) => {
34908
- const [guidesList, setGuidesList] = useState104(() => loadGuidesList());
34909
- const [selectedGuideId, setSelectedGuideId] = useState104(null);
34910
- const [hoveredGuideId, setHoveredGuideId] = useState104(null);
34911
- const [editorShowGuides, setEditorShowGuidesState] = useState104(() => loadEditorShowGuidesOption());
35207
+ const [guidesList, setGuidesList] = useState103(() => loadGuidesList());
35208
+ const [selectedGuideId, setSelectedGuideId] = useState103(null);
35209
+ const [hoveredGuideId, setHoveredGuideId] = useState103(null);
35210
+ const [editorShowGuides, setEditorShowGuidesState] = useState103(() => loadEditorShowGuidesOption());
34912
35211
  const shouldCreateGuideRef = useRef52(false);
34913
35212
  const shouldDeleteGuideRef = useRef52(false);
34914
35213
  const setEditorShowGuides = useCallback152((newValue) => {
@@ -34945,10 +35244,10 @@ var ShowGuidesProvider = ({ children }) => {
34945
35244
  };
34946
35245
 
34947
35246
  // src/components/ShowRulersProvider.tsx
34948
- import { useCallback as useCallback153, useMemo as useMemo158, useState as useState105 } from "react";
35247
+ import { useCallback as useCallback153, useMemo as useMemo158, useState as useState104 } from "react";
34949
35248
  import { jsx as jsx296 } from "react/jsx-runtime";
34950
35249
  var ShowRulersProvider = ({ children }) => {
34951
- const [editorShowRulers, setEditorShowRulersState] = useState105(() => loadEditorShowRulersOption());
35250
+ const [editorShowRulers, setEditorShowRulersState] = useState104(() => loadEditorShowRulersOption());
34952
35251
  const setEditorShowRulers = useCallback153((newValue) => {
34953
35252
  setEditorShowRulersState((prevState) => {
34954
35253
  const newVal = newValue(prevState);
@@ -34969,10 +35268,10 @@ var ShowRulersProvider = ({ children }) => {
34969
35268
  };
34970
35269
 
34971
35270
  // src/components/VisualControls/VisualControlsUndoSync.tsx
34972
- import { useContext as useContext98, useEffect as useEffect89 } from "react";
35271
+ import { useContext as useContext97, useEffect as useEffect89 } from "react";
34973
35272
  var VisualControlsUndoSync = () => {
34974
- const { subscribeToEvent } = useContext98(StudioServerConnectionCtx);
34975
- const { updateValue } = useContext98(SetVisualControlsContext);
35273
+ const { subscribeToEvent } = useContext97(StudioServerConnectionCtx);
35274
+ const { updateValue } = useContext97(SetVisualControlsContext);
34976
35275
  useEffect89(() => {
34977
35276
  const unsub = subscribeToEvent("visual-control-values-changed", (event) => {
34978
35277
  if (event.type !== "visual-control-values-changed") {
@@ -34988,10 +35287,10 @@ var VisualControlsUndoSync = () => {
34988
35287
  };
34989
35288
 
34990
35289
  // src/components/ZoomGesturesProvider.tsx
34991
- import { useCallback as useCallback154, useMemo as useMemo159, useState as useState106 } from "react";
35290
+ import { useCallback as useCallback154, useMemo as useMemo159, useState as useState105 } from "react";
34992
35291
  import { jsx as jsx297 } from "react/jsx-runtime";
34993
35292
  var ZoomGesturesProvider = ({ children }) => {
34994
- const [editorZoomGestures, setEditorZoomGesturesState] = useState106(() => loadEditorZoomGesturesOption());
35293
+ const [editorZoomGestures, setEditorZoomGesturesState] = useState105(() => loadEditorZoomGesturesOption());
34995
35294
  const setEditorZoomGestures = useCallback154((newValue) => {
34996
35295
  setEditorZoomGesturesState((prevState) => {
34997
35296
  const newVal = newValue(prevState);
@@ -35062,7 +35361,7 @@ var EditorContexts = ({ children, readOnlyStudio }) => {
35062
35361
  };
35063
35362
 
35064
35363
  // src/components/Notifications/ServerDisconnected.tsx
35065
- import { useContext as useContext99 } from "react";
35364
+ import { useContext as useContext98 } from "react";
35066
35365
  import { jsx as jsx299, jsxs as jsxs158 } from "react/jsx-runtime";
35067
35366
  var container63 = {
35068
35367
  position: "fixed",
@@ -35097,7 +35396,7 @@ window.addEventListener("beforeunload", () => {
35097
35396
  pageIsGoingToReload = true;
35098
35397
  });
35099
35398
  var ServerDisconnected = () => {
35100
- const { previewServerState: ctx } = useContext99(StudioServerConnectionCtx);
35399
+ const { previewServerState: ctx } = useContext98(StudioServerConnectionCtx);
35101
35400
  const fav = document.getElementById("__remotion_favicon");
35102
35401
  if (ctx.type !== "disconnected") {
35103
35402
  fav.setAttribute("href", "/favicon.ico");
@@ -35136,11 +35435,11 @@ var ServerDisconnected = () => {
35136
35435
  };
35137
35436
 
35138
35437
  // src/FastRefreshProvider.tsx
35139
- import { useCallback as useCallback155, useEffect as useEffect90, useMemo as useMemo160, useState as useState107 } from "react";
35438
+ import { useCallback as useCallback155, useEffect as useEffect90, useMemo as useMemo160, useState as useState106 } from "react";
35140
35439
  import { jsx as jsx300 } from "react/jsx-runtime";
35141
35440
  var FastRefreshProvider = ({ children }) => {
35142
- const [fastRefreshes, setFastRefreshes] = useState107(0);
35143
- const [manualRefreshes, setManualRefreshes] = useState107(0);
35441
+ const [fastRefreshes, setFastRefreshes] = useState106(0);
35442
+ const [manualRefreshes, setManualRefreshes] = useState106(0);
35144
35443
  const increaseManualRefreshes = useCallback155(() => {
35145
35444
  setManualRefreshes((i) => i + 1);
35146
35445
  }, []);
@@ -35327,29 +35626,29 @@ var injectCSS = () => {
35327
35626
  // src/ResolveCompositionConfigInStudio.tsx
35328
35627
  import {
35329
35628
  useCallback as useCallback156,
35330
- useContext as useContext100,
35629
+ useContext as useContext99,
35331
35630
  useEffect as useEffect91,
35332
35631
  useImperativeHandle as useImperativeHandle14,
35333
35632
  useMemo as useMemo161,
35334
- useState as useState108
35633
+ useState as useState107
35335
35634
  } from "react";
35336
35635
  import { getInputProps as getInputProps2, Internals as Internals69 } from "remotion";
35337
35636
  import { jsx as jsx301 } from "react/jsx-runtime";
35338
35637
  var ResolveCompositionConfigInStudio = ({ children }) => {
35339
- const [currentRenderModalComposition, setCurrentRenderModalComposition] = useState108(null);
35340
- const { compositions, canvasContent, currentCompositionMetadata } = useContext100(Internals69.CompositionManager);
35341
- const { fastRefreshes, manualRefreshes } = useContext100(FastRefreshContext);
35638
+ const [currentRenderModalComposition, setCurrentRenderModalComposition] = useState107(null);
35639
+ const { compositions, canvasContent, currentCompositionMetadata } = useContext99(Internals69.CompositionManager);
35640
+ const { fastRefreshes, manualRefreshes } = useContext99(FastRefreshContext);
35342
35641
  if (manualRefreshes) {}
35343
35642
  const selectedComposition = useMemo161(() => {
35344
35643
  return compositions.find((c) => canvasContent && canvasContent.type === "composition" && canvasContent.compositionId === c.id);
35345
35644
  }, [canvasContent, compositions]);
35346
35645
  const renderModalComposition = compositions.find((c) => c.id === currentRenderModalComposition);
35347
- const { props: allEditorProps } = useContext100(Internals69.EditorPropsContext);
35646
+ const { props: allEditorProps } = useContext99(Internals69.EditorPropsContext);
35348
35647
  const env = Internals69.getRemotionEnvironment();
35349
35648
  const inputProps = useMemo161(() => {
35350
35649
  return typeof window === "undefined" || env.isPlayer ? {} : getInputProps2() ?? {};
35351
35650
  }, [env.isPlayer]);
35352
- const [resolvedConfigs, setResolvedConfigs] = useState108({});
35651
+ const [resolvedConfigs, setResolvedConfigs] = useState107({});
35353
35652
  const selectedEditorProps = useMemo161(() => {
35354
35653
  return selectedComposition ? allEditorProps[selectedComposition.id] ?? {} : {};
35355
35654
  }, [allEditorProps, selectedComposition]);
@@ -35606,7 +35905,7 @@ var StudioInner = ({ rootComponent, readOnly, visualModeEnabled }) => {
35606
35905
  videoEnabled: window.remotion_videoEnabled,
35607
35906
  logLevel: window.remotion_logLevel ?? "info",
35608
35907
  numberOfAudioTags: window.remotion_numberOfAudioTags,
35609
- audioLatencyHint: window.remotion_audioLatencyHint ?? "interactive",
35908
+ audioLatencyHint: window.remotion_audioLatencyHint ?? "playback",
35610
35909
  children: /* @__PURE__ */ jsx302(StaticFilesProvider, {
35611
35910
  children: /* @__PURE__ */ jsx302(ResolveCompositionConfigInStudio, {
35612
35911
  children: /* @__PURE__ */ jsxs159(EditorContexts, {
@@ -35625,7 +35924,7 @@ var StudioInner = ({ rootComponent, readOnly, visualModeEnabled }) => {
35625
35924
  });
35626
35925
  };
35627
35926
  var Studio = ({ rootComponent, readOnly, visualModeEnabled }) => {
35628
- useLayoutEffect6(() => {
35927
+ useLayoutEffect5(() => {
35629
35928
  injectCSS();
35630
35929
  }, []);
35631
35930
  return /* @__PURE__ */ jsx302(FastRefreshProvider, {