@remotion/studio 4.0.451 → 4.0.452

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.
@@ -23,13 +23,13 @@ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require
23
23
  });
24
24
 
25
25
  // src/Studio.tsx
26
- import { useLayoutEffect as useLayoutEffect6 } from "react";
26
+ import { useLayoutEffect as useLayoutEffect5 } from "react";
27
27
  import { createPortal } from "react-dom";
28
28
  import { Internals as Internals70 } from "remotion";
29
29
 
30
30
  // src/components/Editor.tsx
31
31
  import { PlayerInternals as PlayerInternals19 } from "@remotion/player";
32
- import React187, { useCallback as useCallback149, useMemo as useMemo151, useState as useState98 } from "react";
32
+ import React187, { useCallback as useCallback149, useMemo as useMemo151, useState as useState97 } from "react";
33
33
  import { Internals as Internals65 } from "remotion";
34
34
 
35
35
  // src/helpers/colors.ts
@@ -84,7 +84,7 @@ var canvasRef = createRef();
84
84
  var drawRef = createRef();
85
85
 
86
86
  // src/state/timeline-zoom.tsx
87
- import { createContext as createContext2, useCallback, useMemo, useState as useState2 } from "react";
87
+ import { createContext as createContext2, useCallback, useMemo, useState } from "react";
88
88
 
89
89
  // src/components/Timeline/imperative-state.ts
90
90
  var currentFrame = 0;
@@ -180,10 +180,10 @@ var timelineVerticalScroll = React.createRef();
180
180
  // src/components/Timeline/TimelineSlider.tsx
181
181
  import {
182
182
  createRef as createRef2,
183
- useContext as useContext2,
183
+ useContext,
184
184
  useEffect,
185
185
  useImperativeHandle,
186
- useLayoutEffect as useLayoutEffect2,
186
+ useLayoutEffect,
187
187
  useRef
188
188
  } from "react";
189
189
  import { Internals, useVideoConfig } from "remotion";
@@ -218,7 +218,7 @@ var TimelineSliderHandle = () => {
218
218
 
219
219
  // src/components/Timeline/TimelineWidthProvider.tsx
220
220
  import { PlayerInternals } from "@remotion/player";
221
- import { createContext, useContext, useLayoutEffect, useState } from "react";
221
+ import { createContext } from "react";
222
222
  import { jsx as jsx2 } from "react/jsx-runtime";
223
223
  var TimelineWidthContext = createContext(null);
224
224
  var TimelineWidthProvider = ({ children }) => {
@@ -226,19 +226,8 @@ var TimelineWidthProvider = ({ children }) => {
226
226
  triggerOnWindowResize: false,
227
227
  shouldApplyCssTransforms: true
228
228
  });
229
- const { zoom: zoomMap } = useContext(TimelineZoomCtx);
230
- const [widthOverride, setWidthOverride] = useState(null);
231
- const observedWidth = size?.width ?? null;
232
- useLayoutEffect(() => {
233
- const actual = sliderAreaRef.current?.clientWidth ?? null;
234
- if (actual !== null && actual !== observedWidth) {
235
- setWidthOverride(actual);
236
- } else {
237
- setWidthOverride(null);
238
- }
239
- }, [observedWidth, zoomMap]);
240
229
  return /* @__PURE__ */ jsx2(TimelineWidthContext.Provider, {
241
- value: widthOverride ?? observedWidth,
230
+ value: size?.width ?? null,
242
231
  children
243
232
  });
244
233
  };
@@ -260,7 +249,7 @@ var line = {
260
249
  var redrawTimelineSliderFast = createRef2();
261
250
  var TimelineSlider = () => {
262
251
  const videoConfig = Internals.useUnsafeVideoConfig();
263
- const timelineWidth = useContext2(TimelineWidthContext);
252
+ const timelineWidth = useContext(TimelineWidthContext);
264
253
  if (videoConfig === null || timelineWidth === null) {
265
254
  return null;
266
255
  }
@@ -270,14 +259,14 @@ var Inner = () => {
270
259
  const videoConfig = useVideoConfig();
271
260
  const timelinePosition = Internals.Timeline.useTimelinePosition();
272
261
  const ref = useRef(null);
273
- const timelineWidth = useContext2(TimelineWidthContext);
274
- const { zoom: zoomMap } = useContext2(TimelineZoomCtx);
275
- const { canvasContent } = useContext2(Internals.CompositionManager);
262
+ const timelineWidth = useContext(TimelineWidthContext);
263
+ const { zoom: zoomMap } = useContext(TimelineZoomCtx);
264
+ const { canvasContent } = useContext(Internals.CompositionManager);
276
265
  if (timelineWidth === null) {
277
266
  throw new Error("Unexpectedly did not have timeline width");
278
267
  }
279
268
  const zoomLevel = canvasContent?.type === "composition" ? zoomMap[canvasContent.compositionId] ?? TIMELINE_MIN_ZOOM : TIMELINE_MIN_ZOOM;
280
- useLayoutEffect2(() => {
269
+ useLayoutEffect(() => {
281
270
  const el = ref.current;
282
271
  const measuredWidth = sliderAreaRef.current?.clientWidth;
283
272
  if (!el || measuredWidth === undefined || measuredWidth === 0) {
@@ -552,7 +541,7 @@ var zoomAndPreserveCursor = ({
552
541
  };
553
542
 
554
543
  // src/components/ZoomPersistor.tsx
555
- import { useContext as useContext3, useEffect as useEffect2 } from "react";
544
+ import { useContext as useContext2, useEffect as useEffect2 } from "react";
556
545
  import { Internals as Internals2 } from "remotion";
557
546
 
558
547
  // src/helpers/url-state.ts
@@ -621,8 +610,8 @@ var getZoomFromLocalStorage = () => {
621
610
  };
622
611
  var ZoomPersistor = () => {
623
612
  const [playing] = Internals2.Timeline.usePlayingState();
624
- const { zoom } = useContext3(TimelineZoomCtx);
625
- const { canvasContent } = useContext3(Internals2.CompositionManager);
613
+ const { zoom } = useContext2(TimelineZoomCtx);
614
+ const { canvasContent } = useContext2(Internals2.CompositionManager);
626
615
  const urlState = deriveCanvasContentFromUrl();
627
616
  const isActive = urlState && urlState.type === "composition" && canvasContent && canvasContent.type === "composition" && urlState.compositionId === canvasContent.compositionId;
628
617
  useEffect2(() => {
@@ -645,7 +634,7 @@ var TimelineZoomCtx = createContext2({
645
634
  }
646
635
  });
647
636
  var TimelineZoomContext = ({ children }) => {
648
- const [zoom, setZoomState] = useState2(() => getZoomFromLocalStorage());
637
+ const [zoom, setZoomState] = useState(() => getZoomFromLocalStorage());
649
638
  const setZoom = useCallback((compositionId, callback, options) => {
650
639
  setZoomState((prevZoomMap) => {
651
640
  const newZoomWithFloatingPointErrors = Math.min(TIMELINE_MAX_ZOOM, Math.max(TIMELINE_MIN_ZOOM, callback(prevZoomMap[compositionId] ?? TIMELINE_MIN_ZOOM)));
@@ -678,14 +667,14 @@ var TimelineZoomContext = ({ children }) => {
678
667
  // src/state/z-index.tsx
679
668
  import {
680
669
  createContext as createContext5,
681
- useContext as useContext5,
670
+ useContext as useContext4,
682
671
  useEffect as useEffect4,
683
672
  useMemo as useMemo5,
684
673
  useRef as useRef3
685
674
  } from "react";
686
675
 
687
676
  // src/helpers/use-keybinding.ts
688
- import { useCallback as useCallback3, useContext as useContext4, useEffect as useEffect3, useMemo as useMemo3, useState as useState3 } from "react";
677
+ import { useCallback as useCallback3, useContext as useContext3, useEffect as useEffect3, useMemo as useMemo3, useState as useState2 } from "react";
689
678
 
690
679
  // src/state/keybindings.tsx
691
680
  import { createContext as createContext3, useCallback as useCallback2, useMemo as useMemo2, useRef as useRef2 } from "react";
@@ -743,8 +732,8 @@ var areKeyboardShortcutsDisabled = () => {
743
732
  return !process.env.KEYBOARD_SHORTCUTS_ENABLED;
744
733
  };
745
734
  var useKeybinding = () => {
746
- const [paneId] = useState3(() => String(Math.random()));
747
- const context = useContext4(KeybindingContext);
735
+ const [paneId] = useState2(() => String(Math.random()));
736
+ const context = useContext3(KeybindingContext);
748
737
  const { isHighestContext } = useZIndex();
749
738
  const registerKeybinding = useCallback3((options) => {
750
739
  if (!process.env.KEYBOARD_SHORTCUTS_ENABLED) {
@@ -803,7 +792,7 @@ var useKeybinding = () => {
803
792
  };
804
793
 
805
794
  // src/state/highest-z-index.tsx
806
- import { createContext as createContext4, useCallback as useCallback4, useMemo as useMemo4, useState as useState4 } from "react";
795
+ import { createContext as createContext4, useCallback as useCallback4, useMemo as useMemo4, useState as useState3 } from "react";
807
796
  import { jsx as jsx6 } from "react/jsx-runtime";
808
797
  var HighestZIndexContext = createContext4({
809
798
  highestIndex: 0,
@@ -815,7 +804,7 @@ var HighestZIndexContext = createContext4({
815
804
  }
816
805
  });
817
806
  var HighestZIndexProvider = ({ children }) => {
818
- const [zIndexes, setZIndexes] = useState4([]);
807
+ const [zIndexes, setZIndexes] = useState3([]);
819
808
  const registerZIndex = useCallback4((newIndex) => {
820
809
  setZIndexes((prev) => [...prev, newIndex]);
821
810
  }, []);
@@ -876,8 +865,8 @@ var EscapeHook = ({ onEscape }) => {
876
865
  return null;
877
866
  };
878
867
  var HigherZIndex = ({ children, onEscape, onOutsideClick, disabled }) => {
879
- const context = useContext5(ZIndexContext);
880
- const highestContext = useContext5(HighestZIndexContext);
868
+ const context = useContext4(ZIndexContext);
869
+ const highestContext = useContext4(HighestZIndexContext);
881
870
  const containerRef = useRef3(null);
882
871
  const currentIndex = disabled ? context.currentIndex : context.currentIndex + 1;
883
872
  useEffect4(() => {
@@ -936,8 +925,8 @@ var HigherZIndex = ({ children, onEscape, onOutsideClick, disabled }) => {
936
925
  });
937
926
  };
938
927
  var useZIndex = () => {
939
- const context = useContext5(ZIndexContext);
940
- const highestContext = useContext5(HighestZIndexContext);
928
+ const context = useContext4(ZIndexContext);
929
+ const highestContext = useContext4(HighestZIndexContext);
941
930
  const isHighestContext = highestContext.highestIndex === context.currentIndex;
942
931
  return useMemo5(() => ({
943
932
  currentZIndex: context.currentIndex,
@@ -948,11 +937,11 @@ var useZIndex = () => {
948
937
  };
949
938
 
950
939
  // src/components/EditorContent.tsx
951
- import { useContext as useContext81 } from "react";
940
+ import { useContext as useContext80 } from "react";
952
941
  import { Internals as Internals58 } from "remotion";
953
942
 
954
943
  // src/helpers/is-current-selected-still.ts
955
- import { useContext as useContext6 } from "react";
944
+ import { useContext as useContext5 } from "react";
956
945
  import { Internals as Internals3 } from "remotion";
957
946
 
958
947
  // src/helpers/is-composition-still.ts
@@ -973,7 +962,7 @@ var useIsStill = () => {
973
962
  };
974
963
  var useIsVideoComposition = () => {
975
964
  const isStill = useIsStill();
976
- const { canvasContent } = useContext6(Internals3.CompositionManager);
965
+ const { canvasContent } = useContext5(Internals3.CompositionManager);
977
966
  if (canvasContent === null) {
978
967
  return false;
979
968
  }
@@ -984,17 +973,17 @@ var useIsVideoComposition = () => {
984
973
  };
985
974
 
986
975
  // src/components/InitialCompositionLoader.tsx
987
- import { useCallback as useCallback24, useContext as useContext16, useEffect as useEffect15 } from "react";
976
+ import { useCallback as useCallback24, useContext as useContext15, useEffect as useEffect15 } from "react";
988
977
  import { Internals as Internals12 } from "remotion";
989
978
 
990
979
  // src/helpers/mobile-layout.ts
991
- import { useEffect as useEffect5, useRef as useRef4, useState as useState5 } from "react";
980
+ import { useEffect as useEffect5, useRef as useRef4, useState as useState4 } from "react";
992
981
  var breakpoint = 900;
993
982
  function getIsMobile() {
994
983
  return window.innerWidth < breakpoint;
995
984
  }
996
985
  var useMobileLayout = () => {
997
- const [isMobile, setIsMobile] = useState5(getIsMobile());
986
+ const [isMobile, setIsMobile] = useState4(getIsMobile());
998
987
  const isMobileRef = useRef4(isMobile);
999
988
  useEffect5(() => {
1000
989
  function handleResize() {
@@ -1012,7 +1001,7 @@ var useMobileLayout = () => {
1012
1001
  };
1013
1002
 
1014
1003
  // src/state/folders.tsx
1015
- import { createContext as createContext7, useMemo as useMemo6, useState as useState6 } from "react";
1004
+ import { createContext as createContext7, useMemo as useMemo6, useState as useState5 } from "react";
1016
1005
 
1017
1006
  // src/helpers/persist-open-folders.tsx
1018
1007
  import { createContext as createContext6 } from "react";
@@ -1052,8 +1041,8 @@ var FolderContext = createContext7({
1052
1041
  }
1053
1042
  });
1054
1043
  var FolderContextProvider = ({ children }) => {
1055
- const [compositionFoldersExpanded, setCompositionFoldersExpanded] = useState6(() => loadExpandedFolders("compositions"));
1056
- const [assetFoldersExpanded, setAssetFoldersExpanded] = useState6(() => loadExpandedFolders("assets"));
1044
+ const [compositionFoldersExpanded, setCompositionFoldersExpanded] = useState5(() => loadExpandedFolders("compositions"));
1045
+ const [assetFoldersExpanded, setAssetFoldersExpanded] = useState5(() => loadExpandedFolders("assets"));
1057
1046
  const value = useMemo6(() => {
1058
1047
  return {
1059
1048
  compositionFoldersExpanded,
@@ -1069,7 +1058,7 @@ var FolderContextProvider = ({ children }) => {
1069
1058
  };
1070
1059
 
1071
1060
  // src/state/sidebar.tsx
1072
- import { createContext as createContext8, useMemo as useMemo7, useState as useState7 } from "react";
1061
+ import { createContext as createContext8, useMemo as useMemo7, useState as useState6 } from "react";
1073
1062
  import { jsx as jsx9 } from "react/jsx-runtime";
1074
1063
  var storageKey = (sidebar) => {
1075
1064
  if (sidebar === "right") {
@@ -1112,7 +1101,7 @@ var SidebarContext = createContext8({
1112
1101
  });
1113
1102
  var SidebarContextProvider = ({ children }) => {
1114
1103
  const isMobileLayout = useMobileLayout();
1115
- const [sidebarCollapsedState, setSidebarCollapsedState] = useState7(() => ({
1104
+ const [sidebarCollapsedState, setSidebarCollapsedState] = useState6(() => ({
1116
1105
  left: getSavedCollapsedStateLeft(isMobileLayout),
1117
1106
  right: getSavedCollapsedStateRight(isMobileLayout)
1118
1107
  }));
@@ -1146,7 +1135,7 @@ var SidebarContextProvider = ({ children }) => {
1146
1135
  };
1147
1136
 
1148
1137
  // src/components/CompositionSelector.tsx
1149
- import { useCallback as useCallback17, useContext as useContext10, useMemo as useMemo21 } from "react";
1138
+ import { useCallback as useCallback17, useContext as useContext9, useMemo as useMemo21 } from "react";
1150
1139
  import { Internals as Internals7 } from "remotion";
1151
1140
 
1152
1141
  // src/error-overlay/remotion-overlay/ShortcutHint.tsx
@@ -1379,11 +1368,11 @@ var ModalsContext = createContext9({
1379
1368
  // src/components/CompositionSelectorItem.tsx
1380
1369
  import {
1381
1370
  useCallback as useCallback16,
1382
- useContext as useContext9,
1383
- useLayoutEffect as useLayoutEffect3,
1371
+ useContext as useContext8,
1372
+ useLayoutEffect as useLayoutEffect2,
1384
1373
  useMemo as useMemo20,
1385
1374
  useRef as useRef11,
1386
- useState as useState15
1375
+ useState as useState14
1387
1376
  } from "react";
1388
1377
 
1389
1378
  // src/helpers/sidebar-scroll-into-view.ts
@@ -1529,7 +1518,7 @@ var FilmIcon = ({ color, ...props }) => {
1529
1518
  };
1530
1519
 
1531
1520
  // src/components/CompositionContextButton.tsx
1532
- import { useCallback as useCallback13, useContext as useContext7, useMemo as useMemo17 } from "react";
1521
+ import { useCallback as useCallback13, useContext as useContext6, useMemo as useMemo17 } from "react";
1533
1522
 
1534
1523
  // src/helpers/client-id.tsx
1535
1524
  import React13, { useCallback as useCallback7, useEffect as useEffect8, useMemo as useMemo10, useRef as useRef6 } from "react";
@@ -1540,7 +1529,7 @@ import {
1540
1529
  createRef as createRef3,
1541
1530
  useCallback as useCallback5,
1542
1531
  useImperativeHandle as useImperativeHandle2,
1543
- useState as useState8
1532
+ useState as useState7
1544
1533
  } from "react";
1545
1534
 
1546
1535
  // src/components/Notifications/Notification.tsx
@@ -1602,7 +1591,7 @@ var showNotification = (content, durationInMs) => {
1602
1591
  });
1603
1592
  };
1604
1593
  var NotificationCenter = () => {
1605
- const [notifications, setNotifications] = useState8([]);
1594
+ const [notifications, setNotifications] = useState7([]);
1606
1595
  const onRemove = useCallback5((id) => {
1607
1596
  setNotifications((not) => {
1608
1597
  return not.filter((n) => n.id !== id);
@@ -1674,7 +1663,7 @@ import React12, {
1674
1663
  useImperativeHandle as useImperativeHandle3,
1675
1664
  useMemo as useMemo9,
1676
1665
  useRef as useRef5,
1677
- useState as useState9
1666
+ useState as useState8
1678
1667
  } from "react";
1679
1668
 
1680
1669
  // src/components/RenderQueue/client-render-queue.ts
@@ -1744,9 +1733,9 @@ var RenderQueueContext = React12.createContext({
1744
1733
  });
1745
1734
  var renderJobsRef = createRef4();
1746
1735
  var RenderQueueContextProvider = ({ children }) => {
1747
- const [serverJobs, setServerJobs] = useState9(window.remotion_initialRenderQueue ?? []);
1748
- const [clientJobs, setClientJobs] = useState9(restorePersistedClientRenders);
1749
- const [currentlyProcessing, setCurrentlyProcessing] = useState9(null);
1736
+ const [serverJobs, setServerJobs] = useState8(window.remotion_initialRenderQueue ?? []);
1737
+ const [clientJobs, setClientJobs] = useState8(restorePersistedClientRenders);
1738
+ const [currentlyProcessing, setCurrentlyProcessing] = useState8(null);
1750
1739
  const processJobCallbackRef = useRef5(null);
1751
1740
  useEffect7(() => {
1752
1741
  if (currentlyProcessing) {
@@ -2031,11 +2020,11 @@ var EllipsisIcon = (props) => {
2031
2020
 
2032
2021
  // src/components/InlineDropdown.tsx
2033
2022
  import { PlayerInternals as PlayerInternals3 } from "@remotion/player";
2034
- import { useCallback as useCallback12, useMemo as useMemo16, useRef as useRef9, useState as useState13 } from "react";
2023
+ import { useCallback as useCallback12, useMemo as useMemo16, useRef as useRef9, useState as useState12 } from "react";
2035
2024
  import ReactDOM2 from "react-dom";
2036
2025
 
2037
2026
  // src/components/InlineAction.tsx
2038
- import { useCallback as useCallback8, useMemo as useMemo11, useState as useState10 } from "react";
2027
+ import { useCallback as useCallback8, useMemo as useMemo11, useState as useState9 } from "react";
2039
2028
  import { jsx as jsx19 } from "react/jsx-runtime";
2040
2029
  var InlineAction = ({
2041
2030
  renderAction,
@@ -2044,7 +2033,7 @@ var InlineAction = ({
2044
2033
  title
2045
2034
  }) => {
2046
2035
  const { tabIndex } = useZIndex();
2047
- const [hovered, setHovered] = useState10(false);
2036
+ const [hovered, setHovered] = useState9(false);
2048
2037
  const onPointerEnter = useCallback8(() => {
2049
2038
  setHovered(true);
2050
2039
  }, []);
@@ -2128,7 +2117,7 @@ var inlineCodeSnippet = {
2128
2117
  };
2129
2118
 
2130
2119
  // src/components/NewComposition/MenuContent.tsx
2131
- import { useCallback as useCallback11, useEffect as useEffect10, useMemo as useMemo15, useRef as useRef8, useState as useState12 } from "react";
2120
+ import { useCallback as useCallback11, useEffect as useEffect10, useMemo as useMemo15, useRef as useRef8, useState as useState11 } from "react";
2132
2121
 
2133
2122
  // src/components/Menu/is-menu-item.tsx
2134
2123
  var MENU_INITIATOR_CLASSNAME = "__remotion-studio-menu-initiator";
@@ -2155,7 +2144,7 @@ var MenuDivider = () => {
2155
2144
 
2156
2145
  // src/components/Menu/MenuSubItem.tsx
2157
2146
  import { PlayerInternals as PlayerInternals2 } from "@remotion/player";
2158
- import { useCallback as useCallback10, useEffect as useEffect9, useMemo as useMemo14, useRef as useRef7, useState as useState11 } from "react";
2147
+ import { useCallback as useCallback10, useEffect as useEffect9, useMemo as useMemo14, useRef as useRef7, useState as useState10 } from "react";
2159
2148
  import ReactDOM from "react-dom";
2160
2149
 
2161
2150
  // src/icons/caret.tsx
@@ -2344,7 +2333,7 @@ var MenuSubItem = ({
2344
2333
  setSubMenuActivated,
2345
2334
  disabled
2346
2335
  }) => {
2347
- const [hovered, setHovered] = useState11(false);
2336
+ const [hovered, setHovered] = useState10(false);
2348
2337
  const ref = useRef7(null);
2349
2338
  const size = PlayerInternals2.useElementSize(ref, {
2350
2339
  triggerOnWindowResize: true,
@@ -2513,13 +2502,13 @@ var MenuContent = ({
2513
2502
  const keybindings = useKeybinding();
2514
2503
  const containerRef = useRef8(null);
2515
2504
  const isMobileLayout = useMobileLayout();
2516
- const [subMenuActivated, setSubMenuActivated] = useState12(false);
2505
+ const [subMenuActivated, setSubMenuActivated] = useState11(false);
2517
2506
  const typeaheadQueryRef = useRef8("");
2518
2507
  const typeaheadTimeoutRef = useRef8(null);
2519
2508
  if (values[0].type === "divider") {
2520
2509
  throw new Error("first value cant be divide");
2521
2510
  }
2522
- const [selectedItem, setSelectedItem] = useState12(typeof preselectIndex === "number" && preselectIndex >= 0 ? values[preselectIndex].id : null);
2511
+ const [selectedItem, setSelectedItem] = useState11(typeof preselectIndex === "number" && preselectIndex >= 0 ? values[preselectIndex].id : null);
2523
2512
  const onEscape = useCallback11(() => {
2524
2513
  onHide();
2525
2514
  }, [onHide]);
@@ -2817,7 +2806,7 @@ var InlineDropdown = ({
2817
2806
  ...props
2818
2807
  }) => {
2819
2808
  const ref = useRef9(null);
2820
- const [opened, setOpened] = useState13({ type: "not-open" });
2809
+ const [opened, setOpened] = useState12({ type: "not-open" });
2821
2810
  const { currentZIndex } = useZIndex();
2822
2811
  const size = PlayerInternals3.useElementSize(ref, {
2823
2812
  triggerOnWindowResize: true,
@@ -2919,7 +2908,7 @@ var CompositionContextButton = ({ visible, values }) => {
2919
2908
  }
2920
2909
  };
2921
2910
  }, []);
2922
- const connectionStatus = useContext7(StudioServerConnectionCtx).previewServerState.type;
2911
+ const connectionStatus = useContext6(StudioServerConnectionCtx).previewServerState.type;
2923
2912
  const renderAction = useCallback13((color) => {
2924
2913
  return /* @__PURE__ */ jsx27(EllipsisIcon, {
2925
2914
  fill: color,
@@ -2937,12 +2926,12 @@ var CompositionContextButton = ({ visible, values }) => {
2937
2926
 
2938
2927
  // src/components/ContextMenu.tsx
2939
2928
  import { PlayerInternals as PlayerInternals4 } from "@remotion/player";
2940
- import { useCallback as useCallback14, useEffect as useEffect11, useMemo as useMemo18, useRef as useRef10, useState as useState14 } from "react";
2929
+ import { useCallback as useCallback14, useEffect as useEffect11, useMemo as useMemo18, useRef as useRef10, useState as useState13 } from "react";
2941
2930
  import ReactDOM3 from "react-dom";
2942
2931
  import { jsx as jsx28, jsxs as jsxs6, Fragment as Fragment3 } from "react/jsx-runtime";
2943
2932
  var ContextMenu = ({ children, values }) => {
2944
2933
  const ref = useRef10(null);
2945
- const [opened, setOpened] = useState14({ type: "not-open" });
2934
+ const [opened, setOpened] = useState13({ type: "not-open" });
2946
2935
  const { currentZIndex } = useZIndex();
2947
2936
  const style = useMemo18(() => {
2948
2937
  return {};
@@ -3048,7 +3037,7 @@ var ContextMenu = ({ children, values }) => {
3048
3037
  };
3049
3038
 
3050
3039
  // src/components/SidebarRenderButton.tsx
3051
- import { useCallback as useCallback15, useContext as useContext8, useMemo as useMemo19 } from "react";
3040
+ import { useCallback as useCallback15, useContext as useContext7, useMemo as useMemo19 } from "react";
3052
3041
  import { Internals as Internals5 } from "remotion";
3053
3042
 
3054
3043
  // src/icons/render.tsx
@@ -3068,8 +3057,8 @@ var ThinRenderIcon = (props) => {
3068
3057
  // src/components/SidebarRenderButton.tsx
3069
3058
  import { jsx as jsx30 } from "react/jsx-runtime";
3070
3059
  var SidebarRenderButton = ({ composition, visible }) => {
3071
- const { setSelectedModal } = useContext8(ModalsContext);
3072
- const { setSidebarCollapsedState } = useContext8(SidebarContext);
3060
+ const { setSelectedModal } = useContext7(ModalsContext);
3061
+ const { setSidebarCollapsedState } = useContext7(SidebarContext);
3073
3062
  const isMobileLayout = useMobileLayout();
3074
3063
  const iconStyle = useMemo19(() => {
3075
3064
  return {
@@ -3078,8 +3067,8 @@ var SidebarRenderButton = ({ composition, visible }) => {
3078
3067
  }
3079
3068
  };
3080
3069
  }, []);
3081
- const connectionStatus = useContext8(StudioServerConnectionCtx).previewServerState.type;
3082
- const { props } = useContext8(Internals5.EditorPropsContext);
3070
+ const connectionStatus = useContext7(StudioServerConnectionCtx).previewServerState.type;
3071
+ const { props } = useContext7(Internals5.EditorPropsContext);
3083
3072
  const onClick = useCallback15((e) => {
3084
3073
  const defaults = window.remotion_renderDefaults;
3085
3074
  if (!defaults) {
@@ -3213,7 +3202,7 @@ var CompositionSelectorItem = ({
3213
3202
  }
3214
3203
  return false;
3215
3204
  }, [item, currentComposition]);
3216
- const [hovered, setHovered] = useState15(false);
3205
+ const [hovered, setHovered] = useState14(false);
3217
3206
  const onPointerEnter = useCallback16(() => {
3218
3207
  setHovered(true);
3219
3208
  }, []);
@@ -3222,7 +3211,7 @@ var CompositionSelectorItem = ({
3222
3211
  }, []);
3223
3212
  const compositionRowRef = useRef11(null);
3224
3213
  const compositionId = item.type === "composition" ? item.composition.id : null;
3225
- useLayoutEffect3(() => {
3214
+ useLayoutEffect2(() => {
3226
3215
  if (compositionId === null) {
3227
3216
  return;
3228
3217
  }
@@ -3259,7 +3248,7 @@ var CompositionSelectorItem = ({
3259
3248
  onClick(evt);
3260
3249
  }
3261
3250
  }, [onClick]);
3262
- const { setSelectedModal } = useContext9(ModalsContext);
3251
+ const { setSelectedModal } = useContext8(ModalsContext);
3263
3252
  const contextMenu = useMemo20(() => {
3264
3253
  if (item.type === "composition") {
3265
3254
  return [
@@ -3517,7 +3506,7 @@ var CurrentComposition = () => {
3517
3506
  // src/components/CompositionSelector.tsx
3518
3507
  import { jsx as jsx33, jsxs as jsxs9 } from "react/jsx-runtime";
3519
3508
  var useCompositionNavigation = () => {
3520
- const { compositions, canvasContent } = useContext10(Internals7.CompositionManager);
3509
+ const { compositions, canvasContent } = useContext9(Internals7.CompositionManager);
3521
3510
  const selectComposition = useSelectComposition();
3522
3511
  const navigateToNextComposition = useCallback17(() => {
3523
3512
  if (!canvasContent || canvasContent.type !== "composition" || compositions.length <= 1) {
@@ -3590,9 +3579,9 @@ var getKeysToExpand = (initialFolderName, parentFolderName, initial = []) => {
3590
3579
  return getKeysToExpand(name, parent, initial);
3591
3580
  };
3592
3581
  var CompositionSelector = () => {
3593
- const { compositions, canvasContent, folders } = useContext10(Internals7.CompositionManager);
3594
- const { foldersExpanded } = useContext10(ExpandedFoldersContext);
3595
- const { setSelectedModal } = useContext10(ModalsContext);
3582
+ const { compositions, canvasContent, folders } = useContext9(Internals7.CompositionManager);
3583
+ const { foldersExpanded } = useContext9(ExpandedFoldersContext);
3584
+ const { setSelectedModal } = useContext9(ModalsContext);
3596
3585
  const { tabIndex } = useZIndex();
3597
3586
  const selectComposition = useSelectComposition();
3598
3587
  const sortedCompositions = useMemo21(() => {
@@ -3662,10 +3651,10 @@ var CompositionSelector = () => {
3662
3651
  };
3663
3652
 
3664
3653
  // src/components/ExplorerPanel.tsx
3665
- import { createRef as createRef5, useCallback as useCallback23, useImperativeHandle as useImperativeHandle5, useState as useState22 } from "react";
3654
+ import { createRef as createRef5, useCallback as useCallback23, useImperativeHandle as useImperativeHandle5, useState as useState21 } from "react";
3666
3655
 
3667
3656
  // src/components/AssetSelector.tsx
3668
- import { useCallback as useCallback20, useContext as useContext14, useMemo as useMemo25, useState as useState19 } from "react";
3657
+ import { useCallback as useCallback20, useContext as useContext13, useMemo as useMemo25, useState as useState18 } from "react";
3669
3658
  import { Internals as Internals10 } from "remotion";
3670
3659
 
3671
3660
  // src/api/write-static-file.ts
@@ -3737,11 +3726,11 @@ var use_asset_drag_events_default = useAssetDragEvents;
3737
3726
  // src/components/AssetSelectorItem.tsx
3738
3727
  import React25, {
3739
3728
  useCallback as useCallback19,
3740
- useContext as useContext11,
3741
- useLayoutEffect as useLayoutEffect4,
3729
+ useContext as useContext10,
3730
+ useLayoutEffect as useLayoutEffect3,
3742
3731
  useMemo as useMemo23,
3743
3732
  useRef as useRef13,
3744
- useState as useState16
3733
+ useState as useState15
3745
3734
  } from "react";
3746
3735
  import { Internals as Internals8 } from "remotion";
3747
3736
  import { NoReactInternals as NoReactInternals3 } from "remotion/no-react";
@@ -4127,7 +4116,7 @@ var AssetFolderItem = ({
4127
4116
  setDropLocation,
4128
4117
  readOnlyStudio
4129
4118
  }) => {
4130
- const [hovered, setHovered] = useState16(false);
4119
+ const [hovered, setHovered] = useState15(false);
4131
4120
  const openFolderTimerRef = useRef13(null);
4132
4121
  const { isDropDiv, onDragEnter, onDragLeave } = use_asset_drag_events_default({
4133
4122
  name: item.name,
@@ -4256,13 +4245,13 @@ var AssetFolderTree = ({
4256
4245
  };
4257
4246
  var AssetSelectorItem = ({ item, tabIndex, level, parentFolder, readOnlyStudio }) => {
4258
4247
  const isMobileLayout = useMobileLayout();
4259
- const [hovered, setHovered] = useState16(false);
4260
- const { setSidebarCollapsedState } = useContext11(SidebarContext);
4248
+ const [hovered, setHovered] = useState15(false);
4249
+ const { setSidebarCollapsedState } = useContext10(SidebarContext);
4261
4250
  const onPointerEnter = useCallback19(() => {
4262
4251
  setHovered(true);
4263
4252
  }, []);
4264
- const { setCanvasContent } = useContext11(Internals8.CompositionSetters);
4265
- const { canvasContent } = useContext11(Internals8.CompositionManager);
4253
+ const { setCanvasContent } = useContext10(Internals8.CompositionSetters);
4254
+ const { canvasContent } = useContext10(Internals8.CompositionManager);
4266
4255
  const relativePath = useMemo23(() => {
4267
4256
  return parentFolder ? parentFolder + "/" + item.name : item.name;
4268
4257
  }, [parentFolder, item.name]);
@@ -4276,7 +4265,7 @@ var AssetSelectorItem = ({ item, tabIndex, level, parentFolder, readOnlyStudio }
4276
4265
  setHovered(false);
4277
4266
  }, []);
4278
4267
  const rowRef = useRef13(null);
4279
- useLayoutEffect4(() => {
4268
+ useLayoutEffect3(() => {
4280
4269
  maybeScrollAssetSidebarRowIntoView({
4281
4270
  element: rowRef.current,
4282
4271
  assetPath: relativePath,
@@ -4393,11 +4382,11 @@ var AssetSelectorItem = ({ item, tabIndex, level, parentFolder, readOnlyStudio }
4393
4382
  // src/components/CurrentAsset.tsx
4394
4383
  import { formatBytes } from "@remotion/studio-shared";
4395
4384
  import { ALL_FORMATS, Input, UrlSource } from "mediabunny";
4396
- import { useContext as useContext13, useEffect as useEffect14, useMemo as useMemo24, useState as useState18 } from "react";
4385
+ import { useContext as useContext12, useEffect as useEffect14, useMemo as useMemo24, useState as useState17 } from "react";
4397
4386
  import { Internals as Internals9, staticFile } from "remotion";
4398
4387
 
4399
4388
  // src/components/use-static-files.ts
4400
- import React26, { createContext as createContext10, useContext as useContext12, useEffect as useEffect13, useState as useState17 } from "react";
4389
+ import React26, { createContext as createContext10, useContext as useContext11, useEffect as useEffect13, useState as useState16 } from "react";
4401
4390
  import { useRemotionEnvironment } from "remotion";
4402
4391
 
4403
4392
  // src/api/get-static-files.ts
@@ -4455,7 +4444,7 @@ var watchPublicFolder = (callback) => {
4455
4444
  // src/components/use-static-files.ts
4456
4445
  var StaticFilesContext = createContext10([]);
4457
4446
  var StaticFilesProvider = ({ children }) => {
4458
- const [files, setFiles] = useState17(() => getStaticFiles());
4447
+ const [files, setFiles] = useState16(() => getStaticFiles());
4459
4448
  const env = useRemotionEnvironment();
4460
4449
  useEffect13(() => {
4461
4450
  if (!env.isStudio) {
@@ -4472,7 +4461,7 @@ var StaticFilesProvider = ({ children }) => {
4472
4461
  return React26.createElement(StaticFilesContext.Provider, { value: files }, children);
4473
4462
  };
4474
4463
  var useStaticFiles = () => {
4475
- return useContext12(StaticFilesContext);
4464
+ return useContext11(StaticFilesContext);
4476
4465
  };
4477
4466
 
4478
4467
  // src/components/CurrentAsset.tsx
@@ -4517,7 +4506,7 @@ var formatDuration = (seconds) => {
4517
4506
  return `${String(m).padStart(2, "0")}:${sFixed}`;
4518
4507
  };
4519
4508
  var CurrentAsset = () => {
4520
- const { canvasContent } = useContext13(Internals9.CompositionManager);
4509
+ const { canvasContent } = useContext12(Internals9.CompositionManager);
4521
4510
  const assetName = canvasContent?.type === "asset" ? canvasContent.asset : null;
4522
4511
  const staticFiles = useStaticFiles();
4523
4512
  const sizeInBytes = useMemo24(() => {
@@ -4527,7 +4516,7 @@ var CurrentAsset = () => {
4527
4516
  const file = staticFiles.find((f) => f.name === assetName);
4528
4517
  return file?.sizeInBytes ?? null;
4529
4518
  }, [assetName, staticFiles]);
4530
- const [mediaMetadata, setMediaMetadata] = useState18(null);
4519
+ const [mediaMetadata, setMediaMetadata] = useState17(null);
4531
4520
  useEffect14(() => {
4532
4521
  setMediaMetadata(null);
4533
4522
  if (!assetName) {
@@ -4621,10 +4610,10 @@ var baseList = {
4621
4610
  };
4622
4611
  var AssetSelector = ({ readOnlyStudio }) => {
4623
4612
  const { tabIndex } = useZIndex();
4624
- const { canvasContent } = useContext14(Internals10.CompositionManager);
4625
- const { assetFoldersExpanded, setAssetFoldersExpanded } = useContext14(FolderContext);
4626
- const [dropLocation, setDropLocation] = useState19(null);
4627
- const connectionStatus = useContext14(StudioServerConnectionCtx).previewServerState.type;
4613
+ const { canvasContent } = useContext13(Internals10.CompositionManager);
4614
+ const { assetFoldersExpanded, setAssetFoldersExpanded } = useContext13(FolderContext);
4615
+ const [dropLocation, setDropLocation] = useState18(null);
4616
+ const connectionStatus = useContext13(StudioServerConnectionCtx).previewServerState.type;
4628
4617
  const shouldAllowUpload = connectionStatus === "connected" && !readOnlyStudio;
4629
4618
  const showCurrentAsset = canvasContent?.type === "asset";
4630
4619
  const list = useMemo25(() => {
@@ -4747,16 +4736,16 @@ var AssetSelector = ({ readOnlyStudio }) => {
4747
4736
  // src/components/CompSelectorRef.tsx
4748
4737
  import {
4749
4738
  useCallback as useCallback21,
4750
- useContext as useContext15,
4739
+ useContext as useContext14,
4751
4740
  useImperativeHandle as useImperativeHandle4,
4752
4741
  useMemo as useMemo26,
4753
- useState as useState20
4742
+ useState as useState19
4754
4743
  } from "react";
4755
4744
  import { Internals as Internals11 } from "remotion";
4756
4745
  import { jsx as jsx39 } from "react/jsx-runtime";
4757
4746
  var CompSelectorRef = ({ children }) => {
4758
- const { compositions } = useContext15(Internals11.CompositionManager);
4759
- const [foldersExpanded, setFoldersExpanded] = useState20(loadExpandedFolders("compositions"));
4747
+ const { compositions } = useContext14(Internals11.CompositionManager);
4748
+ const [foldersExpanded, setFoldersExpanded] = useState19(loadExpandedFolders("compositions"));
4760
4749
  const selectComposition = useSelectComposition();
4761
4750
  const toggleFolder = useCallback21((folderName, parentName) => {
4762
4751
  setFoldersExpanded((p) => {
@@ -4829,7 +4818,7 @@ var CompSelectorRef = ({ children }) => {
4829
4818
  };
4830
4819
 
4831
4820
  // src/components/Tabs/index.tsx
4832
- import { useCallback as useCallback22, useMemo as useMemo27, useState as useState21 } from "react";
4821
+ import { useCallback as useCallback22, useMemo as useMemo27, useState as useState20 } from "react";
4833
4822
  import { jsx as jsx40 } from "react/jsx-runtime";
4834
4823
  var tabsContainer = {
4835
4824
  display: "flex",
@@ -4863,7 +4852,7 @@ var selectorButton = {
4863
4852
  WebkitUserSelect: "none"
4864
4853
  };
4865
4854
  var Tab = ({ children, onClick, style, selected }) => {
4866
- const [hovered, setHovered] = useState21(false);
4855
+ const [hovered, setHovered] = useState20(false);
4867
4856
  const { tabIndex } = useZIndex();
4868
4857
  const onPointerEnter = useCallback22(() => {
4869
4858
  setHovered(true);
@@ -4916,7 +4905,7 @@ var persistSelectedOptionsSidebarPanel = (panel) => {
4916
4905
  };
4917
4906
  var explorerSidebarTabs = createRef5();
4918
4907
  var ExplorerPanel = ({ readOnlyStudio }) => {
4919
- const [panel, setPanel] = useState22(() => getSelectedPanel());
4908
+ const [panel, setPanel] = useState21(() => getSelectedPanel());
4920
4909
  const onCompositionsSelected = useCallback23(() => {
4921
4910
  setPanel("compositions");
4922
4911
  persistSelectedOptionsSidebarPanel("compositions");
@@ -4969,8 +4958,8 @@ var ExplorerPanel = ({ readOnlyStudio }) => {
4969
4958
 
4970
4959
  // src/components/InitialCompositionLoader.tsx
4971
4960
  var useSelectAsset = () => {
4972
- const { setCanvasContent } = useContext16(Internals12.CompositionSetters);
4973
- const { setAssetFoldersExpanded } = useContext16(FolderContext);
4961
+ const { setCanvasContent } = useContext15(Internals12.CompositionSetters);
4962
+ const { setAssetFoldersExpanded } = useContext15(FolderContext);
4974
4963
  return useCallback24((asset) => {
4975
4964
  setCanvasContent({ type: "asset", asset });
4976
4965
  explorerSidebarTabs.current?.selectAssetsPanel();
@@ -4990,10 +4979,10 @@ var useSelectAsset = () => {
4990
4979
  }, [setAssetFoldersExpanded, setCanvasContent]);
4991
4980
  };
4992
4981
  var useSelectComposition = () => {
4993
- const { setCompositionFoldersExpanded } = useContext16(FolderContext);
4994
- const { setCanvasContent } = useContext16(Internals12.CompositionSetters);
4982
+ const { setCompositionFoldersExpanded } = useContext15(FolderContext);
4983
+ const { setCanvasContent } = useContext15(Internals12.CompositionSetters);
4995
4984
  const isMobileLayout = useMobileLayout();
4996
- const { setSidebarCollapsedState } = useContext16(SidebarContext);
4985
+ const { setSidebarCollapsedState } = useContext15(SidebarContext);
4997
4986
  return useCallback24((c, push) => {
4998
4987
  if (push) {
4999
4988
  pushUrl(`/${c.id}`);
@@ -5024,8 +5013,8 @@ var useSelectComposition = () => {
5024
5013
  ]);
5025
5014
  };
5026
5015
  var InitialCompositionLoader = () => {
5027
- const { compositions, canvasContent } = useContext16(Internals12.CompositionManager);
5028
- const { setCanvasContent } = useContext16(Internals12.CompositionSetters);
5016
+ const { compositions, canvasContent } = useContext15(Internals12.CompositionManager);
5017
+ const { setCanvasContent } = useContext15(Internals12.CompositionSetters);
5029
5018
  const selectComposition = useSelectComposition();
5030
5019
  const selectAsset = useSelectAsset();
5031
5020
  const staticFiles = useStaticFiles();
@@ -5100,10 +5089,10 @@ var InitialCompositionLoader = () => {
5100
5089
  };
5101
5090
 
5102
5091
  // src/components/MenuToolbar.tsx
5103
- import { useCallback as useCallback99, useMemo as useMemo105, useState as useState69 } from "react";
5092
+ import { useCallback as useCallback99, useMemo as useMemo105, useState as useState68 } from "react";
5104
5093
 
5105
5094
  // src/helpers/use-menu-structure.tsx
5106
- import { useContext as useContext23, useMemo as useMemo42 } from "react";
5095
+ import { useContext as useContext22, useMemo as useMemo42 } from "react";
5107
5096
  import { Internals as Internals19 } from "remotion";
5108
5097
  import { NoReactInternals as NoReactInternals5 } from "remotion/no-react";
5109
5098
 
@@ -5126,7 +5115,7 @@ import {
5126
5115
  useEffect as useEffect16,
5127
5116
  useImperativeHandle as useImperativeHandle6,
5128
5117
  useRef as useRef14,
5129
- useState as useState23
5118
+ useState as useState22
5130
5119
  } from "react";
5131
5120
  import { AbsoluteFill } from "remotion";
5132
5121
 
@@ -5173,7 +5162,7 @@ var ModalContainer = ({ children, onEscape, onOutsideClick, noZIndex }) => {
5173
5162
  };
5174
5163
 
5175
5164
  // src/components/ModalHeader.tsx
5176
- import { useCallback as useCallback25, useContext as useContext17 } from "react";
5165
+ import { useCallback as useCallback25, useContext as useContext16 } from "react";
5177
5166
 
5178
5167
  // src/components/NewComposition/CancelButton.tsx
5179
5168
  import { jsx as jsx43 } from "react/jsx-runtime";
@@ -5224,7 +5213,7 @@ var icon = {
5224
5213
  width: 20
5225
5214
  };
5226
5215
  var ModalHeader = ({ title: title3, onClose }) => {
5227
- const { setSelectedModal } = useContext17(ModalsContext);
5216
+ const { setSelectedModal } = useContext16(ModalsContext);
5228
5217
  const onPress = useCallback25(() => {
5229
5218
  setSelectedModal(null);
5230
5219
  }, [setSelectedModal]);
@@ -5255,7 +5244,7 @@ var container13 = {
5255
5244
  };
5256
5245
  var askAiModalRef = createRef6();
5257
5246
  var AskAiModal = () => {
5258
- const [state, setState] = useState23("never-opened");
5247
+ const [state, setState] = useState22("never-opened");
5259
5248
  const iframe = useRef14(null);
5260
5249
  useImperativeHandle6(askAiModalRef, () => ({
5261
5250
  toggle: () => {
@@ -5322,7 +5311,7 @@ var AskAiModal = () => {
5322
5311
  };
5323
5312
 
5324
5313
  // src/components/SizeSelector.tsx
5325
- import { useContext as useContext21, useMemo as useMemo39 } from "react";
5314
+ import { useContext as useContext20, useMemo as useMemo39 } from "react";
5326
5315
  import { Internals as Internals16 } from "remotion";
5327
5316
 
5328
5317
  // src/icons/Checkmark.tsx
@@ -5367,7 +5356,7 @@ var ControlButton = (props) => {
5367
5356
 
5368
5357
  // src/components/NewComposition/ComboBox.tsx
5369
5358
  import { PlayerInternals as PlayerInternals5 } from "@remotion/player";
5370
- import { useCallback as useCallback27, useEffect as useEffect17, useMemo as useMemo29, useRef as useRef15, useState as useState24 } from "react";
5359
+ import { useCallback as useCallback27, useEffect as useEffect17, useMemo as useMemo29, useRef as useRef15, useState as useState23 } from "react";
5371
5360
  import ReactDOM4 from "react-dom";
5372
5361
  import { jsx as jsx48, jsxs as jsxs16, Fragment as Fragment6 } from "react/jsx-runtime";
5373
5362
  var container14 = {
@@ -5386,8 +5375,8 @@ var label2 = {
5386
5375
  textAlign: "left"
5387
5376
  };
5388
5377
  var Combobox = ({ values, selectedId, style: customStyle, title: title3 }) => {
5389
- const [hovered, setIsHovered] = useState24(false);
5390
- const [opened, setOpened] = useState24(false);
5378
+ const [hovered, setIsHovered] = useState23(false);
5379
+ const [opened, setOpened] = useState23(false);
5391
5380
  const ref = useRef15(null);
5392
5381
  const { tabIndex, currentZIndex } = useZIndex();
5393
5382
  const size = PlayerInternals5.useElementSize(ref, {
@@ -5554,11 +5543,11 @@ var Combobox = ({ values, selectedId, style: customStyle, title: title3 }) => {
5554
5543
 
5555
5544
  // src/components/Preview.tsx
5556
5545
  import { PlayerInternals as PlayerInternals7 } from "@remotion/player";
5557
- import { useContext as useContext20, useEffect as useEffect30, useMemo as useMemo38, useRef as useRef20 } from "react";
5546
+ import { useContext as useContext19, useEffect as useEffect30, useMemo as useMemo38, useRef as useRef20 } from "react";
5558
5547
  import { Internals as Internals15 } from "remotion";
5559
5548
 
5560
5549
  // src/error-overlay/remotion-overlay/ErrorLoader.tsx
5561
- import { useEffect as useEffect24, useState as useState29 } from "react";
5550
+ import { useEffect as useEffect24, useState as useState28 } from "react";
5562
5551
 
5563
5552
  // src/error-overlay/react-overlay/utils/parser.ts
5564
5553
  import { getLocationFromBuildError } from "@remotion/studio-shared";
@@ -5968,10 +5957,10 @@ var style3 = {
5968
5957
  };
5969
5958
 
5970
5959
  // src/error-overlay/remotion-overlay/CopyStackTrace.tsx
5971
- import { useCallback as useCallback29, useEffect as useEffect19, useMemo as useMemo31, useState as useState25 } from "react";
5960
+ import { useCallback as useCallback29, useEffect as useEffect19, useMemo as useMemo31, useState as useState24 } from "react";
5972
5961
  import { jsx as jsx52, jsxs as jsxs19 } from "react/jsx-runtime";
5973
5962
  var CopyStackTrace = ({ canHaveKeyboardShortcuts, errorText }) => {
5974
- const [copyState, setCopyState] = useState25("idle");
5963
+ const [copyState, setCopyState] = useState24("idle");
5975
5964
  const handleCopyToClipboard = useCallback29(() => {
5976
5965
  navigator.clipboard.writeText(errorText).then(() => {
5977
5966
  setCopyState("copied");
@@ -6063,7 +6052,7 @@ var DismissButton = () => {
6063
6052
 
6064
6053
  // src/error-overlay/remotion-overlay/ErrorMessage.tsx
6065
6054
  import { PlayerInternals as PlayerInternals6 } from "@remotion/player";
6066
- import { useCallback as useCallback31, useMemo as useMemo32, useRef as useRef16, useState as useState26 } from "react";
6055
+ import { useCallback as useCallback31, useMemo as useMemo32, useRef as useRef16, useState as useState25 } from "react";
6067
6056
 
6068
6057
  // src/error-overlay/remotion-overlay/carets.tsx
6069
6058
  import { jsx as jsx54 } from "react/jsx-runtime";
@@ -6136,7 +6125,7 @@ var moreButton = {
6136
6125
  color: "white"
6137
6126
  };
6138
6127
  var ErrorMessage = ({ message }) => {
6139
- const [expanded, setExpanded] = useState26(false);
6128
+ const [expanded, setExpanded] = useState25(false);
6140
6129
  const ref = useRef16(null);
6141
6130
  const size2 = PlayerInternals6.useElementSize(ref, {
6142
6131
  shouldApplyCssTransforms: false,
@@ -6458,7 +6447,7 @@ var HelpLink = ({ canHaveKeyboardShortcuts, link }) => {
6458
6447
  };
6459
6448
 
6460
6449
  // src/error-overlay/remotion-overlay/MediaPlaybackErrorExplainer.tsx
6461
- import { useEffect as useEffect21, useState as useState27 } from "react";
6450
+ import { useEffect as useEffect21, useState as useState26 } from "react";
6462
6451
  import { jsx as jsx59, jsxs as jsxs24 } from "react/jsx-runtime";
6463
6452
  var container16 = {
6464
6453
  borderRadius: 3,
@@ -6480,7 +6469,7 @@ var linkStyle = {
6480
6469
  color: "#58a6ff"
6481
6470
  };
6482
6471
  var MediaPlaybackErrorExplainer = ({ src }) => {
6483
- const [result, setResult] = useState27({ type: "loading" });
6472
+ const [result, setResult] = useState26({ type: "loading" });
6484
6473
  useEffect21(() => {
6485
6474
  fetch(src, { method: "HEAD" }).then((res) => {
6486
6475
  if (res.status === 404) {
@@ -6808,7 +6797,7 @@ var SearchGithubIssues = ({ message, canHaveKeyboardShortcuts }) => {
6808
6797
  };
6809
6798
 
6810
6799
  // src/error-overlay/remotion-overlay/StackFrame.tsx
6811
- import { useCallback as useCallback35, useState as useState28 } from "react";
6800
+ import { useCallback as useCallback35, useState as useState27 } from "react";
6812
6801
 
6813
6802
  // src/error-overlay/remotion-overlay/CodeFrame.tsx
6814
6803
  import { jsx as jsx63, jsxs as jsxs27 } from "react/jsx-runtime";
@@ -6906,7 +6895,7 @@ var fnName = {
6906
6895
  marginBottom: 3
6907
6896
  };
6908
6897
  var StackElement = ({ s, lineNumberWidth, isFirst, defaultFunctionName }) => {
6909
- const [showCodeFrame, setShowCodeFrame] = useState28(() => !s.originalFileName?.includes("node_modules") && !s.originalFileName?.startsWith("webpack/") || isFirst);
6898
+ const [showCodeFrame, setShowCodeFrame] = useState27(() => !s.originalFileName?.includes("node_modules") && !s.originalFileName?.startsWith("webpack/") || isFirst);
6910
6899
  const toggleCodeFrame = useCallback35(() => {
6911
6900
  setShowCodeFrame((f) => !f);
6912
6901
  }, []);
@@ -7108,7 +7097,7 @@ var ErrorLoader = ({
7108
7097
  canHaveDismissButton,
7109
7098
  calculateMetadata
7110
7099
  }) => {
7111
- const [state, setState] = useState29({
7100
+ const [state, setState] = useState28({
7112
7101
  type: "loading"
7113
7102
  });
7114
7103
  useEffect24(() => {
@@ -7237,7 +7226,7 @@ var CheckerboardContext = createContext11({
7237
7226
  });
7238
7227
 
7239
7228
  // src/components/RenderPreview.tsx
7240
- import { useContext as useContext18, useEffect as useEffect29, useState as useState34 } from "react";
7229
+ import { useContext as useContext17, useEffect as useEffect29, useState as useState33 } from "react";
7241
7230
 
7242
7231
  // src/helpers/get-asset-metadata.ts
7243
7232
  import { getVideoMetadata } from "@remotion/media-utils";
@@ -7324,7 +7313,7 @@ var getAssetMetadata = async (canvasContent, addTime) => {
7324
7313
  import { formatBytes as formatBytes2 } from "@remotion/studio-shared";
7325
7314
 
7326
7315
  // src/components/JSONViewer.tsx
7327
- import { useEffect as useEffect27, useState as useState32 } from "react";
7316
+ import { useEffect as useEffect27, useState as useState31 } from "react";
7328
7317
 
7329
7318
  // src/components/NewComposition/RemTextarea.tsx
7330
7319
  import {
@@ -7333,7 +7322,7 @@ import {
7333
7322
  useImperativeHandle as useImperativeHandle8,
7334
7323
  useMemo as useMemo36,
7335
7324
  useRef as useRef19,
7336
- useState as useState31
7325
+ useState as useState30
7337
7326
  } from "react";
7338
7327
 
7339
7328
  // src/components/NewComposition/RemInput.tsx
@@ -7343,7 +7332,7 @@ import {
7343
7332
  useImperativeHandle as useImperativeHandle7,
7344
7333
  useMemo as useMemo35,
7345
7334
  useRef as useRef18,
7346
- useState as useState30
7335
+ useState as useState29
7347
7336
  } from "react";
7348
7337
  import { jsx as jsx67 } from "react/jsx-runtime";
7349
7338
  var INPUT_HORIZONTAL_PADDING = 8;
@@ -7369,8 +7358,8 @@ var getInputBorderColor = ({
7369
7358
  isHovered
7370
7359
  }) => status === "warning" ? WARNING_COLOR : status === "error" ? FAIL_COLOR : isFocused ? SELECTED_BACKGROUND : isHovered ? INPUT_BORDER_COLOR_HOVERED : INPUT_BORDER_COLOR_UNHOVERED;
7371
7360
  var RemInputForwardRef = ({ status, rightAlign, ...props }, ref) => {
7372
- const [isFocused, setIsFocused] = useState30(false);
7373
- const [isHovered, setIsHovered] = useState30(false);
7361
+ const [isFocused, setIsFocused] = useState29(false);
7362
+ const [isHovered, setIsHovered] = useState29(false);
7374
7363
  const inputRef = useRef18(null);
7375
7364
  const { tabIndex } = useZIndex();
7376
7365
  const style5 = useMemo35(() => {
@@ -7427,8 +7416,8 @@ var inputBaseStyle2 = {
7427
7416
  overflowX: "hidden"
7428
7417
  };
7429
7418
  var RemTextareaFRFunction = ({ status, ...props }, ref) => {
7430
- const [isFocused, setIsFocused] = useState31(false);
7431
- const [isHovered, setIsHovered] = useState31(false);
7419
+ const [isFocused, setIsFocused] = useState30(false);
7420
+ const [isHovered, setIsHovered] = useState30(false);
7432
7421
  const inputRef = useRef19(null);
7433
7422
  const { tabIndex } = useZIndex();
7434
7423
  useImperativeHandle8(ref, () => {
@@ -7520,7 +7509,7 @@ var jsonStyle = {
7520
7509
  flex: 1
7521
7510
  };
7522
7511
  var JSONViewer = ({ src }) => {
7523
- const [json, setJson] = useState32(null);
7512
+ const [json, setJson] = useState31(null);
7524
7513
  useEffect27(() => {
7525
7514
  fetch(src).then((res) => res.json()).then((jsonRes) => {
7526
7515
  setJson(JSON.stringify(jsonRes, null, 2));
@@ -7537,7 +7526,7 @@ var JSONViewer = ({ src }) => {
7537
7526
  };
7538
7527
 
7539
7528
  // src/components/TextViewer.tsx
7540
- import { useEffect as useEffect28, useState as useState33 } from "react";
7529
+ import { useEffect as useEffect28, useState as useState32 } from "react";
7541
7530
  import { jsxs as jsxs31 } from "react/jsx-runtime";
7542
7531
  var textStyle = {
7543
7532
  margin: 14,
@@ -7547,7 +7536,7 @@ var textStyle = {
7547
7536
  whiteSpace: "pre-wrap"
7548
7537
  };
7549
7538
  var TextViewer = ({ src }) => {
7550
- const [txt, setTxt] = useState33("");
7539
+ const [txt, setTxt] = useState32("");
7551
7540
  useEffect28(() => {
7552
7541
  fetch(src).then(async (res) => {
7553
7542
  if (!res.ok || !res.body) {
@@ -7648,9 +7637,9 @@ var errMsgStyle = {
7648
7637
  };
7649
7638
  var RenderPreview = ({ path, assetMetadata, getBlob }) => {
7650
7639
  const fileType = getPreviewFileType(path);
7651
- const connectionStatus = useContext18(StudioServerConnectionCtx).previewServerState.type;
7652
- const [blobUrl, setBlobUrl] = useState34(null);
7653
- const [blobError, setBlobError] = useState34(null);
7640
+ const connectionStatus = useContext17(StudioServerConnectionCtx).previewServerState.type;
7641
+ const [blobUrl, setBlobUrl] = useState33(null);
7642
+ const [blobError, setBlobError] = useState33(null);
7654
7643
  useEffect29(() => {
7655
7644
  if (!getBlob) {
7656
7645
  setBlobUrl(null);
@@ -7766,7 +7755,7 @@ var Spinner = ({ size: size2, duration }) => {
7766
7755
  };
7767
7756
 
7768
7757
  // src/components/StaticFilePreview.tsx
7769
- import { useContext as useContext19 } from "react";
7758
+ import { useContext as useContext18 } from "react";
7770
7759
  import { staticFile as staticFile3 } from "remotion";
7771
7760
  import { jsx as jsx73, jsxs as jsxs35 } from "react/jsx-runtime";
7772
7761
  var msgStyle3 = {
@@ -7784,7 +7773,7 @@ var StaticFilePreview = ({ currentAsset, assetMetadata }) => {
7784
7773
  const fileType = getPreviewFileType(currentAsset);
7785
7774
  const staticFileSrc = staticFile3(currentAsset);
7786
7775
  const staticFiles = useStaticFiles();
7787
- const connectionStatus = useContext19(StudioServerConnectionCtx).previewServerState.type;
7776
+ const connectionStatus = useContext18(StudioServerConnectionCtx).previewServerState.type;
7788
7777
  const exists = staticFiles.find((file) => file.name === currentAsset);
7789
7778
  if (connectionStatus === "disconnected") {
7790
7779
  return /* @__PURE__ */ jsx73("div", {
@@ -7923,7 +7912,7 @@ var VideoPreview = ({
7923
7912
  });
7924
7913
  };
7925
7914
  var CompWhenItHasDimensions = ({ contentDimensions, canvasSize, canvasContent, assetMetadata }) => {
7926
- const { size: previewSize } = useContext20(Internals15.PreviewSizeContext);
7915
+ const { size: previewSize } = useContext19(Internals15.PreviewSizeContext);
7927
7916
  const { centerX, centerY, yCorrection, xCorrection, scale } = useMemo38(() => {
7928
7917
  if (contentDimensions === "none") {
7929
7918
  return {
@@ -8002,7 +7991,7 @@ var CompWhenItHasDimensions = ({ contentDimensions, canvasSize, canvasContent, a
8002
7991
  });
8003
7992
  };
8004
7993
  var PortalContainer = ({ scale, xCorrection, yCorrection, contentDimensions }) => {
8005
- const { checkerboard } = useContext20(CheckerboardContext);
7994
+ const { checkerboard } = useContext19(CheckerboardContext);
8006
7995
  const style5 = useMemo38(() => {
8007
7996
  return containerStyle({
8008
7997
  checkerboard,
@@ -8094,8 +8083,8 @@ var getUniqueSizes = (size2) => {
8094
8083
  };
8095
8084
  var zoomableFileTypes = ["video", "image"];
8096
8085
  var SizeSelector = () => {
8097
- const { size: size2, setSize } = useContext21(Internals16.PreviewSizeContext);
8098
- const { canvasContent } = useContext21(Internals16.CompositionManager);
8086
+ const { size: size2, setSize } = useContext20(Internals16.PreviewSizeContext);
8087
+ const { canvasContent } = useContext20(Internals16.CompositionManager);
8099
8088
  const style5 = useMemo39(() => {
8100
8089
  return {
8101
8090
  padding: CONTROL_BUTTON_PADDING
@@ -8193,7 +8182,7 @@ var TimelineOutPointer = (props) => {
8193
8182
  };
8194
8183
 
8195
8184
  // src/state/in-out.ts
8196
- import { createContext as createContext12, useContext as useContext22, useMemo as useMemo40 } from "react";
8185
+ import { createContext as createContext12, useContext as useContext21, useMemo as useMemo40 } from "react";
8197
8186
  import { Internals as Internals17 } from "remotion";
8198
8187
  var TimelineInOutContext = createContext12({});
8199
8188
  var SetTimelineInOutContext = createContext12({
@@ -8203,7 +8192,7 @@ var SetTimelineInOutContext = createContext12({
8203
8192
  });
8204
8193
  var useTimelineInOutFramePosition = () => {
8205
8194
  const videoConfig = Internals17.useUnsafeVideoConfig();
8206
- const state = useContext22(TimelineInOutContext);
8195
+ const state = useContext21(TimelineInOutContext);
8207
8196
  const id = videoConfig?.id;
8208
8197
  const durationInFrames = videoConfig?.durationInFrames;
8209
8198
  return useMemo40(() => {
@@ -8220,7 +8209,7 @@ var useTimelineInOutFramePosition = () => {
8220
8209
  }, [durationInFrames, id, state]);
8221
8210
  };
8222
8211
  var useTimelineSetInOutFramePosition = () => {
8223
- const { setInAndOutFrames } = useContext22(SetTimelineInOutContext);
8212
+ const { setInAndOutFrames } = useContext21(SetTimelineInOutContext);
8224
8213
  return { setInAndOutFrames };
8225
8214
  };
8226
8215
 
@@ -8764,18 +8753,18 @@ var getFileMenu = ({
8764
8753
  };
8765
8754
  };
8766
8755
  var useMenuStructure = (closeMenu, readOnlyStudio) => {
8767
- const { setSelectedModal } = useContext23(ModalsContext);
8768
- const { checkerboard, setCheckerboard } = useContext23(CheckerboardContext);
8769
- const { editorZoomGestures, setEditorZoomGestures } = useContext23(EditorZoomGesturesContext);
8770
- const { editorShowRulers, setEditorShowRulers } = useContext23(EditorShowRulersContext);
8771
- const { editorShowGuides, setEditorShowGuides } = useContext23(EditorShowGuidesContext);
8772
- const { size: size2, setSize } = useContext23(Internals19.PreviewSizeContext);
8773
- const { type } = useContext23(StudioServerConnectionCtx).previewServerState;
8756
+ const { setSelectedModal } = useContext22(ModalsContext);
8757
+ const { checkerboard, setCheckerboard } = useContext22(CheckerboardContext);
8758
+ const { editorZoomGestures, setEditorZoomGestures } = useContext22(EditorZoomGesturesContext);
8759
+ const { editorShowRulers, setEditorShowRulers } = useContext22(EditorShowRulersContext);
8760
+ const { editorShowGuides, setEditorShowGuides } = useContext22(EditorShowGuidesContext);
8761
+ const { size: size2, setSize } = useContext22(Internals19.PreviewSizeContext);
8762
+ const { type } = useContext22(StudioServerConnectionCtx).previewServerState;
8774
8763
  const {
8775
8764
  setSidebarCollapsedState,
8776
8765
  sidebarCollapsedStateLeft,
8777
8766
  sidebarCollapsedStateRight
8778
- } = useContext23(SidebarContext);
8767
+ } = useContext22(SidebarContext);
8779
8768
  const sizes = useMemo42(() => getUniqueSizes(size2), [size2]);
8780
8769
  const isFullscreenSupported = checkFullscreenSupport();
8781
8770
  const { remotion_packageManager } = window;
@@ -9522,7 +9511,7 @@ var makeSearchResults = (actions, setSelectedModal) => {
9522
9511
 
9523
9512
  // src/components/Menu/MenuItem.tsx
9524
9513
  import { PlayerInternals as PlayerInternals9 } from "@remotion/player";
9525
- import { useCallback as useCallback37, useMemo as useMemo43, useRef as useRef21, useState as useState35 } from "react";
9514
+ import { useCallback as useCallback37, useMemo as useMemo43, useRef as useRef21, useState as useState34 } from "react";
9526
9515
  import ReactDOM5 from "react-dom";
9527
9516
  import { jsx as jsx81, jsxs as jsxs38, Fragment as Fragment13 } from "react/jsx-runtime";
9528
9517
  var container20 = {
@@ -9548,7 +9537,7 @@ var MenuItem = ({
9548
9537
  onNextMenu,
9549
9538
  menu
9550
9539
  }) => {
9551
- const [hovered, setHovered] = useState35(false);
9540
+ const [hovered, setHovered] = useState34(false);
9552
9541
  const ref = useRef21(null);
9553
9542
  const size2 = PlayerInternals9.useElementSize(ref, {
9554
9543
  triggerOnWindowResize: true,
@@ -9653,18 +9642,18 @@ var MenuItem = ({
9653
9642
  // src/components/MenuBuildIndicator.tsx
9654
9643
  import {
9655
9644
  useCallback as useCallback39,
9656
- useContext as useContext26,
9645
+ useContext as useContext25,
9657
9646
  useEffect as useEffect33,
9658
9647
  useMemo as useMemo45,
9659
- useState as useState38
9648
+ useState as useState37
9660
9649
  } from "react";
9661
9650
 
9662
9651
  // src/components/MenuCompositionName.tsx
9663
- import { useCallback as useCallback38, useContext as useContext25, useMemo as useMemo44, useState as useState37 } from "react";
9652
+ import { useCallback as useCallback38, useContext as useContext24, useMemo as useMemo44, useState as useState36 } from "react";
9664
9653
  import { Internals as Internals21 } from "remotion";
9665
9654
 
9666
9655
  // src/components/Timeline/use-resolved-stack.ts
9667
- import { useContext as useContext24, useEffect as useEffect32, useState as useState36 } from "react";
9656
+ import { useContext as useContext23, useEffect as useEffect32, useState as useState35 } from "react";
9668
9657
  import { Internals as Internals20 } from "remotion";
9669
9658
 
9670
9659
  // src/components/Timeline/TimelineStack/get-stack.ts
@@ -9757,8 +9746,8 @@ var resolvedCache = new Map;
9757
9746
  var inFlight = new Set;
9758
9747
  var subscribers = new Map;
9759
9748
  var useResolvedStack = (stack2) => {
9760
- const updateResolvedStackTrace = useContext24(Internals20.SequenceStackTracesUpdateContext);
9761
- const [value, setValue] = useState36(() => {
9749
+ const updateResolvedStackTrace = useContext23(Internals20.SequenceStackTracesUpdateContext);
9750
+ const [value, setValue] = useState35(() => {
9762
9751
  if (!stack2) {
9763
9752
  return null;
9764
9753
  }
@@ -9823,10 +9812,10 @@ var slashStyle = {
9823
9812
  top: 1
9824
9813
  };
9825
9814
  var MenuCompositionName = () => {
9826
- const { canvasContent, compositions } = useContext25(Internals21.CompositionManager);
9827
- const connectionStatus = useContext25(StudioServerConnectionCtx).previewServerState.type;
9828
- const [opening, setOpening] = useState37(false);
9829
- const [hovered, setHovered] = useState37(false);
9815
+ const { canvasContent, compositions } = useContext24(Internals21.CompositionManager);
9816
+ const connectionStatus = useContext24(StudioServerConnectionCtx).previewServerState.type;
9817
+ const [opening, setOpening] = useState36(false);
9818
+ const [hovered, setHovered] = useState36(false);
9830
9819
  const composition = useMemo44(() => {
9831
9820
  if (canvasContent === null || canvasContent.type !== "composition") {
9832
9821
  return null;
@@ -9904,9 +9893,9 @@ var projectNameLinkHovered = {
9904
9893
  textDecoration: "underline"
9905
9894
  };
9906
9895
  var MenuBuildIndicator = () => {
9907
- const [isBuilding, setIsBuilding] = useState38(false);
9908
- const [projectNameHovered, setProjectNameHovered] = useState38(false);
9909
- const ctx = useContext26(StudioServerConnectionCtx).previewServerState;
9896
+ const [isBuilding, setIsBuilding] = useState37(false);
9897
+ const [projectNameHovered, setProjectNameHovered] = useState37(false);
9898
+ const ctx = useContext25(StudioServerConnectionCtx).previewServerState;
9910
9899
  const showEditorLink = window.remotion_editorName && ctx.type === "connected";
9911
9900
  const showGitLink = !showEditorLink && Boolean(window.remotion_gitSource);
9912
9901
  const handleProjectNameClick = useCallback39(async () => {
@@ -9984,16 +9973,16 @@ var MenuBuildIndicator = () => {
9984
9973
  };
9985
9974
 
9986
9975
  // src/components/SidebarCollapserControls.tsx
9987
- import { useCallback as useCallback96, useContext as useContext65, useEffect as useEffect62 } from "react";
9976
+ import { useCallback as useCallback96, useContext as useContext64, useEffect as useEffect62 } from "react";
9988
9977
 
9989
9978
  // src/components/TopPanel.tsx
9990
- import React123, { useCallback as useCallback95, useContext as useContext64, useEffect as useEffect61, useMemo as useMemo103 } from "react";
9979
+ import React123, { useCallback as useCallback95, useContext as useContext63, useEffect as useEffect61, useMemo as useMemo103 } from "react";
9991
9980
  import { Internals as Internals45 } from "remotion";
9992
9981
 
9993
9982
  // src/helpers/use-breakpoint.ts
9994
- import { useEffect as useEffect34, useRef as useRef22, useState as useState39 } from "react";
9983
+ import { useEffect as useEffect34, useRef as useRef22, useState as useState38 } from "react";
9995
9984
  function useBreakpoint(breakpoint2) {
9996
- const [compactUI, setCompactUI] = useState39(window.innerWidth < breakpoint2);
9985
+ const [compactUI, setCompactUI] = useState38(window.innerWidth < breakpoint2);
9997
9986
  const compactUIRef = useRef22(compactUI);
9998
9987
  useEffect34(() => {
9999
9988
  function handleResize() {
@@ -10011,21 +10000,21 @@ function useBreakpoint(breakpoint2) {
10011
10000
  }
10012
10001
 
10013
10002
  // src/components/CanvasIfSizeIsAvailable.tsx
10014
- import { useContext as useContext35, useMemo as useMemo53 } from "react";
10003
+ import { useContext as useContext34, useMemo as useMemo53 } from "react";
10015
10004
  import { Internals as Internals30 } from "remotion";
10016
10005
 
10017
10006
  // src/components/CanvasOrLoading.tsx
10018
- import { useContext as useContext34, useEffect as useEffect39 } from "react";
10007
+ import { useContext as useContext33, useEffect as useEffect39 } from "react";
10019
10008
  import { Internals as Internals29 } from "remotion";
10020
10009
 
10021
10010
  // src/components/Canvas.tsx
10022
10011
  import {
10023
10012
  useCallback as useCallback43,
10024
- useContext as useContext33,
10013
+ useContext as useContext32,
10025
10014
  useEffect as useEffect37,
10026
10015
  useMemo as useMemo52,
10027
10016
  useRef as useRef25,
10028
- useState as useState41
10017
+ useState as useState40
10029
10018
  } from "react";
10030
10019
  import { Internals as Internals27, watchStaticFile } from "remotion";
10031
10020
 
@@ -10160,19 +10149,19 @@ var applyZoomAroundFocalPoint = ({
10160
10149
  };
10161
10150
 
10162
10151
  // src/components/EditorGuides/index.tsx
10163
- import { useContext as useContext29, useMemo as useMemo49 } from "react";
10152
+ import { useContext as useContext28, useMemo as useMemo49 } from "react";
10164
10153
  import { Internals as Internals24 } from "remotion";
10165
10154
 
10166
10155
  // src/helpers/use-studio-canvas-dimensions.ts
10167
10156
  import { PlayerInternals as PlayerInternals10 } from "@remotion/player";
10168
- import { useContext as useContext27, useMemo as useMemo46 } from "react";
10157
+ import { useContext as useContext26, useMemo as useMemo46 } from "react";
10169
10158
  import { Internals as Internals23 } from "remotion";
10170
10159
  var useStudioCanvasDimensions = ({
10171
10160
  canvasSize,
10172
10161
  contentDimensions,
10173
10162
  assetMetadata
10174
10163
  }) => {
10175
- const { size: previewSize } = useContext27(Internals23.PreviewSizeContext);
10164
+ const { size: previewSize } = useContext26(Internals23.PreviewSizeContext);
10176
10165
  const { centerX, centerY, scale } = useMemo46(() => {
10177
10166
  if (contentDimensions === "none" || contentDimensions === null || assetMetadata && (assetMetadata.type === "not-found" || assetMetadata.type === "metadata-error") || !canvasSize) {
10178
10167
  return {
@@ -10218,7 +10207,7 @@ var useStudioCanvasDimensions = ({
10218
10207
  };
10219
10208
 
10220
10209
  // src/components/EditorGuides/Guide.tsx
10221
- import { memo, useCallback as useCallback40, useContext as useContext28, useMemo as useMemo48 } from "react";
10210
+ import { memo, useCallback as useCallback40, useContext as useContext27, useMemo as useMemo48 } from "react";
10222
10211
  import { NoReactInternals as NoReactInternals6 } from "remotion/no-react";
10223
10212
 
10224
10213
  // src/components/ForceSpecificCursor.tsx
@@ -10266,7 +10255,7 @@ var GuideComp = ({ guide, canvasDimensions, scale }) => {
10266
10255
  selectedGuideId,
10267
10256
  setHoveredGuideId,
10268
10257
  hoveredGuideId
10269
- } = useContext28(EditorShowGuidesContext);
10258
+ } = useContext27(EditorShowGuidesContext);
10270
10259
  const onPointerEnter = useCallback40(() => {
10271
10260
  setHoveredGuideId(() => guide.id);
10272
10261
  }, [guide.id, setHoveredGuideId]);
@@ -10358,11 +10347,11 @@ var EditorGuides = ({ canvasSize, contentDimensions, assetMetadata }) => {
10358
10347
  contentDimensions,
10359
10348
  assetMetadata
10360
10349
  });
10361
- const { canvasContent } = useContext29(Internals24.CompositionManager);
10350
+ const { canvasContent } = useContext28(Internals24.CompositionManager);
10362
10351
  if (canvasContent === null || canvasContent.type !== "composition") {
10363
10352
  throw new Error("Expected to be in a composition");
10364
10353
  }
10365
- const { guidesList } = useContext29(EditorShowGuidesContext);
10354
+ const { guidesList } = useContext28(EditorShowGuidesContext);
10366
10355
  const guidesForThisComposition = useMemo49(() => {
10367
10356
  return guidesList.filter((guide) => {
10368
10357
  return guide.compositionId === canvasContent.compositionId;
@@ -10383,7 +10372,7 @@ var EditorGuides_default = EditorGuides;
10383
10372
  // src/components/EditorRuler/index.tsx
10384
10373
  import {
10385
10374
  useCallback as useCallback42,
10386
- useContext as useContext31,
10375
+ useContext as useContext30,
10387
10376
  useEffect as useEffect36,
10388
10377
  useMemo as useMemo51,
10389
10378
  useRef as useRef24
@@ -10598,11 +10587,11 @@ var getRulerScaleRange = ({
10598
10587
  // src/components/EditorRuler/Ruler.tsx
10599
10588
  import {
10600
10589
  useCallback as useCallback41,
10601
- useContext as useContext30,
10590
+ useContext as useContext29,
10602
10591
  useEffect as useEffect35,
10603
10592
  useMemo as useMemo50,
10604
10593
  useRef as useRef23,
10605
- useState as useState40
10594
+ useState as useState39
10606
10595
  } from "react";
10607
10596
  import { Internals as Internals25 } from "remotion";
10608
10597
  import { jsx as jsx87 } from "react/jsx-runtime";
@@ -10628,12 +10617,12 @@ var Ruler = ({
10628
10617
  setSelectedGuideId,
10629
10618
  guidesList,
10630
10619
  setEditorShowGuides
10631
- } = useContext30(EditorShowGuidesContext);
10620
+ } = useContext29(EditorShowGuidesContext);
10632
10621
  const unsafeVideoConfig = Internals25.useUnsafeVideoConfig();
10633
10622
  if (!unsafeVideoConfig) {
10634
10623
  throw new Error("Video config not set");
10635
10624
  }
10636
- const [cursor, setCursor] = useState40(isVerticalRuler ? "ew-resize" : "ns-resize");
10625
+ const [cursor, setCursor] = useState39(isVerticalRuler ? "ew-resize" : "ns-resize");
10637
10626
  const selectedOrHoveredGuide = useMemo50(() => {
10638
10627
  return guidesList.find((guide) => guide.id === selectedGuideId) ?? guidesList.find((guide) => guide.id === hoveredGuideId) ?? null;
10639
10628
  }, [guidesList, hoveredGuideId, selectedGuideId]);
@@ -10753,7 +10742,7 @@ var EditorRulers = ({ contentDimensions, canvasSize, assetMetadata, containerRef
10753
10742
  setGuidesList,
10754
10743
  selectedGuideId,
10755
10744
  setSelectedGuideId
10756
- } = useContext31(EditorShowGuidesContext);
10745
+ } = useContext30(EditorShowGuidesContext);
10757
10746
  const rulerMarkingGaps = useMemo51(() => {
10758
10747
  const minimumGap = MINIMUM_RULER_MARKING_GAP_PX;
10759
10748
  const predefinedGap = PREDEFINED_RULER_SCALE_GAPS.find((gap) => gap * scale > minimumGap);
@@ -10909,11 +10898,11 @@ var EditorRulers = ({ contentDimensions, canvasSize, assetMetadata, containerRef
10909
10898
  };
10910
10899
 
10911
10900
  // src/components/EditorRuler/use-is-ruler-visible.ts
10912
- import { useContext as useContext32 } from "react";
10901
+ import { useContext as useContext31 } from "react";
10913
10902
  import { Internals as Internals26 } from "remotion";
10914
10903
  var useIsRulerVisible = () => {
10915
- const { canvasContent } = useContext32(Internals26.CompositionManager);
10916
- const { editorShowRulers } = useContext32(EditorShowRulersContext);
10904
+ const { canvasContent } = useContext31(Internals26.CompositionManager);
10905
+ const { editorShowRulers } = useContext31(EditorShowRulersContext);
10917
10906
  return editorShowRulers && canvasContent && canvasContent.type === "composition";
10918
10907
  };
10919
10908
 
@@ -10943,8 +10932,8 @@ var resetZoom = {
10943
10932
  };
10944
10933
  var ZOOM_PX_FACTOR = 0.003;
10945
10934
  var Canvas = ({ canvasContent, size: size2 }) => {
10946
- const { setSize, size: previewSize } = useContext33(Internals27.PreviewSizeContext);
10947
- const { editorZoomGestures } = useContext33(EditorZoomGesturesContext);
10935
+ const { setSize, size: previewSize } = useContext32(Internals27.PreviewSizeContext);
10936
+ const { editorZoomGestures } = useContext32(EditorZoomGesturesContext);
10948
10937
  const previewSnapshotRef = useRef25({
10949
10938
  previewSize,
10950
10939
  canvasSize: size2,
@@ -10956,8 +10945,8 @@ var Canvas = ({ canvasContent, size: size2 }) => {
10956
10945
  const keybindings = useKeybinding();
10957
10946
  const config = Internals27.useUnsafeVideoConfig();
10958
10947
  const areRulersVisible = useIsRulerVisible();
10959
- const { editorShowGuides } = useContext33(EditorShowGuidesContext);
10960
- const [assetResolution, setAssetResolution] = useState41(null);
10948
+ const { editorShowGuides } = useContext32(EditorShowGuidesContext);
10949
+ const [assetResolution, setAssetResolution] = useState40(null);
10961
10950
  const contentDimensions = useMemo52(() => {
10962
10951
  if ((canvasContent.type === "asset" || canvasContent.type === "output" || canvasContent.type === "output-blob") && assetResolution && assetResolution.type === "found") {
10963
10952
  return assetResolution.dimensions;
@@ -11455,9 +11444,9 @@ var container23 = {
11455
11444
  };
11456
11445
  var CanvasOrLoading = ({ size: size2 }) => {
11457
11446
  const resolved = Internals29.useResolvedVideoConfig(null);
11458
- const { setZoom } = useContext34(TimelineZoomCtx);
11459
- const { canvasContent } = useContext34(Internals29.CompositionManager);
11460
- const { error: renderError } = useContext34(RenderErrorContext);
11447
+ const { setZoom } = useContext33(TimelineZoomCtx);
11448
+ const { canvasContent } = useContext33(Internals29.CompositionManager);
11449
+ const { error: renderError } = useContext33(RenderErrorContext);
11461
11450
  useEffect39(() => {
11462
11451
  if (resolved?.type !== "success" && resolved?.type !== "success-and-refreshing") {
11463
11452
  return;
@@ -11555,7 +11544,7 @@ var ErrorLoading = ({ error, calculateMetadataContext }) => {
11555
11544
  import { jsx as jsx94 } from "react/jsx-runtime";
11556
11545
  var CanvasIfSizeIsAvailable = () => {
11557
11546
  const rulersAreVisible = useIsRulerVisible();
11558
- const context = useContext35(Internals30.CurrentScaleContext);
11547
+ const context = useContext34(Internals30.CurrentScaleContext);
11559
11548
  const sizeWithRulersApplied = useMemo53(() => {
11560
11549
  const size2 = context && context.type === "canvas-size" ? context.canvasSize : null;
11561
11550
  if (!rulersAreVisible) {
@@ -11579,7 +11568,7 @@ var CanvasIfSizeIsAvailable = () => {
11579
11568
  };
11580
11569
 
11581
11570
  // src/components/CurrentCompositionSideEffects.tsx
11582
- import { useCallback as useCallback44, useContext as useContext36, useEffect as useEffect40 } from "react";
11571
+ import { useCallback as useCallback44, useContext as useContext35, useEffect as useEffect40 } from "react";
11583
11572
  import { Internals as Internals31 } from "remotion";
11584
11573
 
11585
11574
  // src/helpers/document-title.ts
@@ -11634,8 +11623,8 @@ var getProgressInBrackets = (selectedCompositionId, jobs) => {
11634
11623
 
11635
11624
  // src/components/CurrentCompositionSideEffects.tsx
11636
11625
  var TitleUpdater = () => {
11637
- const renderQueue = useContext36(RenderQueueContext);
11638
- const { canvasContent } = useContext36(Internals31.CompositionManager);
11626
+ const renderQueue = useContext35(RenderQueueContext);
11627
+ const { canvasContent } = useContext35(Internals31.CompositionManager);
11639
11628
  const { jobs } = renderQueue;
11640
11629
  useEffect40(() => {
11641
11630
  if (!canvasContent) {
@@ -11664,7 +11653,7 @@ var TitleUpdater = () => {
11664
11653
  var CurrentCompositionKeybindings = ({ readOnlyStudio }) => {
11665
11654
  const keybindings = useKeybinding();
11666
11655
  const video = Internals31.useVideo();
11667
- const { type } = useContext36(StudioServerConnectionCtx).previewServerState;
11656
+ const { type } = useContext35(StudioServerConnectionCtx).previewServerState;
11668
11657
  const openRenderModal = useCallback44(() => {
11669
11658
  if (!video) {
11670
11659
  return;
@@ -11739,18 +11728,18 @@ function MobilePanel({
11739
11728
  // src/components/ObserveDefaultPropsContext.tsx
11740
11729
  import React63, {
11741
11730
  useCallback as useCallback45,
11742
- useContext as useContext37,
11731
+ useContext as useContext36,
11743
11732
  useEffect as useEffect41,
11744
11733
  useMemo as useMemo54,
11745
- useState as useState42
11734
+ useState as useState41
11746
11735
  } from "react";
11747
11736
  import { Internals as Internals32 } from "remotion";
11748
11737
  import { jsx as jsx96 } from "react/jsx-runtime";
11749
11738
  var ObserveDefaultPropsContext = React63.createContext(null);
11750
11739
  var ObserveDefaultProps = ({ compositionId, readOnlyStudio, children }) => {
11751
- const { previewServerState, subscribeToEvent } = useContext37(StudioServerConnectionCtx);
11752
- const { updateProps } = useContext37(Internals32.EditorPropsContext);
11753
- const [canSaveDefaultPropsObjectState, setCanSaveDefaultProps] = useState42({});
11740
+ const { previewServerState, subscribeToEvent } = useContext36(StudioServerConnectionCtx);
11741
+ const { updateProps } = useContext36(Internals32.EditorPropsContext);
11742
+ const [canSaveDefaultPropsObjectState, setCanSaveDefaultProps] = useState41({});
11754
11743
  const canSaveDefaultProps = useMemo54(() => {
11755
11744
  if (compositionId === null) {
11756
11745
  return null;
@@ -11824,10 +11813,10 @@ var ObserveDefaultProps = ({ compositionId, readOnlyStudio, children }) => {
11824
11813
  import {
11825
11814
  createRef as createRef9,
11826
11815
  useCallback as useCallback86,
11827
- useContext as useContext55,
11816
+ useContext as useContext54,
11828
11817
  useImperativeHandle as useImperativeHandle12,
11829
11818
  useMemo as useMemo97,
11830
- useState as useState60
11819
+ useState as useState59
11831
11820
  } from "react";
11832
11821
  import { Internals as Internals36 } from "remotion";
11833
11822
 
@@ -11840,7 +11829,7 @@ import {
11840
11829
  useImperativeHandle as useImperativeHandle10,
11841
11830
  useMemo as useMemo56,
11842
11831
  useRef as useRef26,
11843
- useState as useState44
11832
+ useState as useState43
11844
11833
  } from "react";
11845
11834
  import { useRemotionEnvironment as useRemotionEnvironment2 } from "remotion";
11846
11835
 
@@ -11862,10 +11851,10 @@ function getZodSchemaFromPrimitive(value, z) {
11862
11851
  // src/components/get-zod-if-possible.tsx
11863
11852
  import {
11864
11853
  createContext as createContext17,
11865
- useContext as useContext38,
11854
+ useContext as useContext37,
11866
11855
  useEffect as useEffect42,
11867
11856
  useMemo as useMemo55,
11868
- useState as useState43
11857
+ useState as useState42
11869
11858
  } from "react";
11870
11859
  import { jsx as jsx97 } from "react/jsx-runtime";
11871
11860
  async function getZodIfPossible() {
@@ -11893,18 +11882,18 @@ var getZTypesIfPossible = async () => {
11893
11882
  }
11894
11883
  };
11895
11884
  function useZodIfPossible() {
11896
- const context = useContext38(ZodContext);
11885
+ const context = useContext37(ZodContext);
11897
11886
  return context?.zod ?? null;
11898
11887
  }
11899
11888
  var useZodTypesIfPossible = () => {
11900
- const context = useContext38(ZodContext);
11889
+ const context = useContext37(ZodContext);
11901
11890
  return context?.zodTypes ?? null;
11902
11891
  };
11903
11892
  var ZodContext = createContext17(null);
11904
11893
  var ZodProvider = ({ children }) => {
11905
- const [zod, setZod] = useState43(null);
11906
- const [zodV3, setZodV3] = useState43(null);
11907
- const [zodTypes, setZodTypes] = useState43(null);
11894
+ const [zod, setZod] = useState42(null);
11895
+ const [zodV3, setZodV3] = useState42(null);
11896
+ const [zodTypes, setZodTypes] = useState42(null);
11908
11897
  useEffect42(() => {
11909
11898
  getZodIfPossible().then((z) => setZod(z));
11910
11899
  }, []);
@@ -11980,7 +11969,7 @@ var SetVisualControlsContext = createContext18({
11980
11969
  });
11981
11970
  var VisualControlsProvider = ({ children }) => {
11982
11971
  const imperativeHandles = useRef26({});
11983
- const [handles, setHandles] = useState44({});
11972
+ const [handles, setHandles] = useState43({});
11984
11973
  const state = useMemo56(() => {
11985
11974
  return {
11986
11975
  handles
@@ -12082,10 +12071,10 @@ var VisualControlsProvider = ({ children }) => {
12082
12071
  };
12083
12072
 
12084
12073
  // src/components/DefaultPropsEditor.tsx
12085
- import { useContext as useContext42 } from "react";
12074
+ import { useContext as useContext41 } from "react";
12086
12075
 
12087
12076
  // src/components/RenderModal/DataEditor.tsx
12088
- import React94, { useCallback as useCallback71, useContext as useContext41, useMemo as useMemo86, useState as useState55 } from "react";
12077
+ import React94, { useCallback as useCallback71, useContext as useContext40, useMemo as useMemo86, useState as useState54 } from "react";
12089
12078
  import { getInputProps } from "remotion";
12090
12079
  import { NoReactInternals as NoReactInternals10 } from "remotion/no-react";
12091
12080
 
@@ -12143,7 +12132,7 @@ var ValidationMessage = ({ message, align, type }) => {
12143
12132
  };
12144
12133
 
12145
12134
  // src/components/SegmentedControl.tsx
12146
- import { useCallback as useCallback47, useMemo as useMemo58, useState as useState45 } from "react";
12135
+ import { useCallback as useCallback47, useMemo as useMemo58, useState as useState44 } from "react";
12147
12136
  import { jsx as jsx100 } from "react/jsx-runtime";
12148
12137
  var container26 = {
12149
12138
  display: "flex",
@@ -12192,7 +12181,7 @@ var SegmentedControl = ({ items, needsWrapping }) => {
12192
12181
  });
12193
12182
  };
12194
12183
  var Item = ({ selected, onClick, children }) => {
12195
- const [hovered, setHovered] = useState45(false);
12184
+ const [hovered, setHovered] = useState44(false);
12196
12185
  const { tabIndex } = useZIndex();
12197
12186
  const onPointerEnter = useCallback47(() => {
12198
12187
  setHovered(true);
@@ -12287,7 +12276,7 @@ var getRenderModalWarnings = ({
12287
12276
 
12288
12277
  // src/components/RenderModal/RenderModalJSONPropsEditor.tsx
12289
12278
  import React69, { useCallback as useCallback48, useEffect as useEffect44, useMemo as useMemo60 } from "react";
12290
- import { useContext as useContext39 } from "react";
12279
+ import { useContext as useContext38 } from "react";
12291
12280
  import { NoReactInternals as NoReactInternals9 } from "remotion/no-react";
12292
12281
 
12293
12282
  // src/components/RenderModal/SchemaEditor/deep-equal.ts
@@ -12615,7 +12604,7 @@ var RenderModalJSONPropsEditor = ({
12615
12604
  if (serializedJSON === null) {
12616
12605
  throw new Error("expecting serializedJSON to be defined");
12617
12606
  }
12618
- const { subscribeToEvent } = useContext39(StudioServerConnectionCtx);
12607
+ const { subscribeToEvent } = useContext38(StudioServerConnectionCtx);
12619
12608
  const [localValue, setLocalValue] = React69.useState(() => {
12620
12609
  return parseJSON(serializedJSON.serializedString, schema);
12621
12610
  });
@@ -13089,12 +13078,12 @@ var createZodValues = (schema, zodRuntime, zodTypes) => {
13089
13078
  };
13090
13079
 
13091
13080
  // src/components/RenderModal/SchemaEditor/Fieldset.tsx
13092
- import { createContext as createContext19, useContext as useContext40, useMemo as useMemo61 } from "react";
13081
+ import { createContext as createContext19, useContext as useContext39, useMemo as useMemo61 } from "react";
13093
13082
  import { jsx as jsx104 } from "react/jsx-runtime";
13094
13083
  var SCHEMA_EDITOR_FIELDSET_PADDING = 10;
13095
13084
  var AlreadyPaddedRightContext = createContext19(false);
13096
13085
  var Fieldset = ({ children, shouldPad }) => {
13097
- const alreadyPadded = useContext40(AlreadyPaddedRightContext);
13086
+ const alreadyPadded = useContext39(AlreadyPaddedRightContext);
13098
13087
  const style8 = useMemo61(() => {
13099
13088
  if (shouldPad) {
13100
13089
  return {
@@ -13119,7 +13108,7 @@ var Fieldset = ({ children, shouldPad }) => {
13119
13108
  };
13120
13109
 
13121
13110
  // src/components/RenderModal/SchemaEditor/SchemaLabel.tsx
13122
- import { useCallback as useCallback50, useMemo as useMemo62, useState as useState46 } from "react";
13111
+ import { useCallback as useCallback50, useMemo as useMemo62, useState as useState45 } from "react";
13123
13112
 
13124
13113
  // src/components/RenderModal/InlineRemoveButton.tsx
13125
13114
  import { useCallback as useCallback49 } from "react";
@@ -13171,7 +13160,7 @@ var compactStyles = {
13171
13160
  flex: 1
13172
13161
  };
13173
13162
  var SchemaLabel = ({ jsonPath, onRemove, valid, suffix: suffix2, handleClick }) => {
13174
- const [clickableButtonHovered, setClickableButtonHovered] = useState46(false);
13163
+ const [clickableButtonHovered, setClickableButtonHovered] = useState45(false);
13175
13164
  const labelStyle4 = useMemo62(() => {
13176
13165
  return {
13177
13166
  fontFamily: "monospace",
@@ -13217,7 +13206,7 @@ var SchemaLabel = ({ jsonPath, onRemove, valid, suffix: suffix2, handleClick })
13217
13206
 
13218
13207
  // src/components/RenderModal/SchemaEditor/ZodObjectEditor.tsx
13219
13208
  import { useCallback as useCallback69 } from "react";
13220
- import React92, { useMemo as useMemo83, useState as useState54 } from "react";
13209
+ import React92, { useMemo as useMemo83, useState as useState53 } from "react";
13221
13210
 
13222
13211
  // src/components/RenderModal/layout.ts
13223
13212
  var optionRow = {
@@ -13263,7 +13252,7 @@ var fieldsetLabel = {
13263
13252
  };
13264
13253
 
13265
13254
  // src/components/RenderModal/SchemaEditor/SchemaSeparationLine.tsx
13266
- import { useCallback as useCallback51, useMemo as useMemo63, useState as useState47 } from "react";
13255
+ import { useCallback as useCallback51, useMemo as useMemo63, useState as useState46 } from "react";
13267
13256
 
13268
13257
  // src/icons/plus.tsx
13269
13258
  import { jsx as jsx107 } from "react/jsx-runtime";
@@ -13298,8 +13287,8 @@ var arraySeparationLine = {
13298
13287
  flexBasis: "100%"
13299
13288
  };
13300
13289
  var SchemaArrayItemSeparationLine = ({ onChange, index, schema, isLast, showAddButton }) => {
13301
- const [outerHovered, setOuterHovered] = useState47(false);
13302
- const [innerHovered, setInnerHovered] = useState47(false);
13290
+ const [outerHovered, setOuterHovered] = useState46(false);
13291
+ const [innerHovered, setInnerHovered] = useState46(false);
13303
13292
  const zodTypes = useZodTypesIfPossible();
13304
13293
  const z = useZodIfPossible();
13305
13294
  if (!z) {
@@ -13439,7 +13428,7 @@ var SchemaVerticalGuide = ({ isRoot, children }) => {
13439
13428
  };
13440
13429
 
13441
13430
  // src/components/RenderModal/SchemaEditor/ZodArrayEditor.tsx
13442
- import React77, { useCallback as useCallback54, useMemo as useMemo68, useState as useState49 } from "react";
13431
+ import React77, { useCallback as useCallback54, useMemo as useMemo68, useState as useState48 } from "react";
13443
13432
 
13444
13433
  // src/components/RenderModal/SchemaEditor/ZodArrayItemEditor.tsx
13445
13434
  import { useCallback as useCallback52, useMemo as useMemo65 } from "react";
@@ -13476,7 +13465,7 @@ var ZodArrayItemEditor = ({ elementSchema, onChange, jsonPath, index, value, may
13476
13465
 
13477
13466
  // src/components/RenderModal/InfoBubble.tsx
13478
13467
  import { PlayerInternals as PlayerInternals11 } from "@remotion/player";
13479
- import { useCallback as useCallback53, useEffect as useEffect45, useMemo as useMemo67, useRef as useRef27, useState as useState48 } from "react";
13468
+ import { useCallback as useCallback53, useEffect as useEffect45, useMemo as useMemo67, useRef as useRef27, useState as useState47 } from "react";
13480
13469
  import ReactDOM7 from "react-dom";
13481
13470
 
13482
13471
  // src/components/RenderModal/InfoTooltip.tsx
@@ -13559,8 +13548,8 @@ var container27 = {
13559
13548
  verticalAlign: "text-bottom"
13560
13549
  };
13561
13550
  var InfoBubble = ({ title: title4, children }) => {
13562
- const [hovered, setIsHovered] = useState48(false);
13563
- const [opened, setOpened] = useState48(false);
13551
+ const [hovered, setIsHovered] = useState47(false);
13552
+ const [opened, setOpened] = useState47(false);
13564
13553
  const ref2 = useRef27(null);
13565
13554
  const { tabIndex, currentZIndex } = useZIndex();
13566
13555
  const size2 = PlayerInternals11.useElementSize(ref2, {
@@ -13747,7 +13736,7 @@ var ZodArrayEditor = ({ schema, jsonPath, setValue, value, onRemove, mayPad }) =
13747
13736
  const onChange = useCallback54((updater, { shouldSave }) => {
13748
13737
  setValue(updater, { shouldSave });
13749
13738
  }, [setValue]);
13750
- const [expanded, setExpanded] = useState49(true);
13739
+ const [expanded, setExpanded] = useState48(true);
13751
13740
  const arrayElement = getArrayElement(schema);
13752
13741
  const suffix2 = useMemo68(() => {
13753
13742
  return expanded ? " [" : " [...] ";
@@ -13932,7 +13921,7 @@ var colorWithNewOpacity = (color, opacity, zodTypes) => {
13932
13921
  };
13933
13922
 
13934
13923
  // src/components/NewComposition/InputDragger.tsx
13935
- import React80, { useCallback as useCallback56, useEffect as useEffect47, useMemo as useMemo70, useRef as useRef29, useState as useState50 } from "react";
13924
+ import React80, { useCallback as useCallback56, useEffect as useEffect47, useMemo as useMemo70, useRef as useRef29, useState as useState49 } from "react";
13936
13925
  import { interpolate as interpolate2 } from "remotion";
13937
13926
  import { jsx as jsx117 } from "react/jsx-runtime";
13938
13927
  var isInt = (num) => {
@@ -13952,8 +13941,8 @@ var InputDraggerForwardRefFn = ({
13952
13941
  small,
13953
13942
  ...props
13954
13943
  }, ref2) => {
13955
- const [inputFallback, setInputFallback] = useState50(false);
13956
- const [dragging, setDragging] = useState50(false);
13944
+ const [inputFallback, setInputFallback] = useState49(false);
13945
+ const [dragging, setDragging] = useState49(false);
13957
13946
  const fallbackRef = useRef29(null);
13958
13947
  const pointerDownRef = useRef29(false);
13959
13948
  const style8 = useMemo70(() => {
@@ -14123,7 +14112,7 @@ import {
14123
14112
  useImperativeHandle as useImperativeHandle11,
14124
14113
  useMemo as useMemo71,
14125
14114
  useRef as useRef30,
14126
- useState as useState51
14115
+ useState as useState50
14127
14116
  } from "react";
14128
14117
  import { jsx as jsx118 } from "react/jsx-runtime";
14129
14118
  var inputBaseStyle3 = {
@@ -14132,8 +14121,8 @@ var inputBaseStyle3 = {
14132
14121
  borderWidth: 1
14133
14122
  };
14134
14123
  var RemInputTypeColorForwardRef = ({ status, ...props }, ref2) => {
14135
- const [isFocused, setIsFocused] = useState51(false);
14136
- const [isHovered, setIsHovered] = useState51(false);
14124
+ const [isFocused, setIsFocused] = useState50(false);
14125
+ const [isHovered, setIsHovered] = useState50(false);
14137
14126
  const inputRef = useRef30(null);
14138
14127
  const { tabIndex } = useZIndex();
14139
14128
  const style8 = useMemo71(() => {
@@ -14484,7 +14473,7 @@ var ZodEnumEditor = ({ schema, jsonPath, setValue, value, onRemove }) => {
14484
14473
  };
14485
14474
 
14486
14475
  // src/components/RenderModal/SchemaEditor/ZodMatrixEditor.tsx
14487
- import React86, { useMemo as useMemo76, useState as useState52 } from "react";
14476
+ import React86, { useMemo as useMemo76, useState as useState51 } from "react";
14488
14477
  import { useCallback as useCallback61 } from "react";
14489
14478
  import { jsx as jsx124, jsxs as jsxs63 } from "react/jsx-runtime";
14490
14479
  var rowStyle = {
@@ -14497,7 +14486,7 @@ var ZodMatrixEditor = ({ schema, jsonPath, setValue, value, onRemove, mayPad })
14497
14486
  setValue(updater, { shouldSave });
14498
14487
  }, [setValue]);
14499
14488
  const zodValidation = useMemo76(() => zodSafeParse(schema, value), [schema, value]);
14500
- const [expanded, setExpanded] = useState52(true);
14489
+ const [expanded, setExpanded] = useState51(true);
14501
14490
  const arrayElement = getArrayElement(schema);
14502
14491
  const suffix2 = useMemo76(() => {
14503
14492
  return expanded ? " [" : " [...] ";
@@ -14993,7 +14982,7 @@ var ZodTextareaEditor = ({ jsonPath, value, setValue, schema, onRemove, mayPad }
14993
14982
  };
14994
14983
 
14995
14984
  // src/components/RenderModal/SchemaEditor/ZodTupleEditor.tsx
14996
- import React91, { useCallback as useCallback68, useMemo as useMemo82, useState as useState53 } from "react";
14985
+ import React91, { useCallback as useCallback68, useMemo as useMemo82, useState as useState52 } from "react";
14997
14986
 
14998
14987
  // src/components/RenderModal/SchemaEditor/ZodTupleItemEditor.tsx
14999
14988
  import { useCallback as useCallback67, useMemo as useMemo81 } from "react";
@@ -15030,7 +15019,7 @@ var ZodTupleEditor = ({ schema, jsonPath, setValue, value, onRemove, mayPad }) =
15030
15019
  setValue(updater, { shouldSave });
15031
15020
  }, [setValue]);
15032
15021
  const zodValidation = useMemo82(() => zodSafeParse(schema, value), [schema, value]);
15033
- const [expanded, setExpanded] = useState53(true);
15022
+ const [expanded, setExpanded] = useState52(true);
15034
15023
  const tupleItems = getTupleItems(schema);
15035
15024
  const suffix2 = useMemo82(() => {
15036
15025
  return expanded ? " [" : " [...] ";
@@ -15419,7 +15408,7 @@ var ZodObjectEditor = ({
15419
15408
  mayPad,
15420
15409
  discriminatedUnionReplacement
15421
15410
  }) => {
15422
- const [expanded, setExpanded] = useState54(true);
15411
+ const [expanded, setExpanded] = useState53(true);
15423
15412
  const onChange = useCallback69((updater, { shouldSave }) => {
15424
15413
  setValue(updater, { shouldSave });
15425
15414
  }, [setValue]);
@@ -15728,8 +15717,8 @@ var DataEditor = ({
15728
15717
  propsEditType,
15729
15718
  canSaveDefaultProps
15730
15719
  }) => {
15731
- const [mode, setMode] = useState55("schema");
15732
- const [showWarning, setShowWarningWithoutPersistance] = useState55(() => getPersistedShowWarningState());
15720
+ const [mode, setMode] = useState54("schema");
15721
+ const [showWarning, setShowWarningWithoutPersistance] = useState54(() => getPersistedShowWarningState());
15733
15722
  const jsonEditorSetValue = useCallback71((newProps) => {
15734
15723
  setDefaultProps(typeof newProps === "function" ? newProps : () => newProps, { shouldSave: false });
15735
15724
  }, [setDefaultProps]);
@@ -15781,7 +15770,7 @@ var DataEditor = ({
15781
15770
  return val(prevVal);
15782
15771
  });
15783
15772
  }, []);
15784
- const { previewServerState } = useContext41(StudioServerConnectionCtx);
15773
+ const { previewServerState } = useContext40(StudioServerConnectionCtx);
15785
15774
  const modeItems = useMemo86(() => {
15786
15775
  return [
15787
15776
  {
@@ -15921,7 +15910,7 @@ var DefaultPropsEditor = ({
15921
15910
  setDefaultProps,
15922
15911
  propsEditType
15923
15912
  }) => {
15924
- const canSaveDefaultProps = useContext42(ObserveDefaultPropsContext);
15913
+ const canSaveDefaultProps = useContext41(ObserveDefaultPropsContext);
15925
15914
  if (canSaveDefaultProps === null) {
15926
15915
  throw new Error("ObserveDefaultPropsContext is not set");
15927
15916
  }
@@ -16134,16 +16123,16 @@ var SchemaResetButton = ({ onClick }) => {
16134
16123
  };
16135
16124
 
16136
16125
  // src/components/RenderQueue/index.tsx
16137
- import React106, { useContext as useContext51, useEffect as useEffect51, useMemo as useMemo94 } from "react";
16126
+ import React106, { useContext as useContext50, useEffect as useEffect51, useMemo as useMemo94 } from "react";
16138
16127
  import { Internals as Internals35 } from "remotion";
16139
16128
 
16140
16129
  // src/components/RenderQueue/RenderQueueItem.tsx
16141
16130
  import {
16142
16131
  useCallback as useCallback83,
16143
- useContext as useContext50,
16132
+ useContext as useContext49,
16144
16133
  useEffect as useEffect50,
16145
16134
  useMemo as useMemo93,
16146
- useState as useState56
16135
+ useState as useState55
16147
16136
  } from "react";
16148
16137
  import { Internals as Internals34 } from "remotion";
16149
16138
 
@@ -16244,7 +16233,7 @@ import { useCallback as useCallback75, useMemo as useMemo87 } from "react";
16244
16233
 
16245
16234
  // src/components/RenderQueue/ClientRenderQueueProcessor.tsx
16246
16235
  import { renderMediaOnWeb, renderStillOnWeb } from "@remotion/web-renderer";
16247
- import { useCallback as useCallback74, useContext as useContext43, useEffect as useEffect49 } from "react";
16236
+ import { useCallback as useCallback74, useContext as useContext42, useEffect as useEffect49 } from "react";
16248
16237
 
16249
16238
  // src/api/save-render-output.ts
16250
16239
  var throwIfNotOk = async (response) => {
@@ -16309,7 +16298,7 @@ var ClientRenderQueueProcessor = () => {
16309
16298
  markClientJobFailed,
16310
16299
  markClientJobCancelled,
16311
16300
  setProcessJobCallback
16312
- } = useContext43(RenderQueueContext);
16301
+ } = useContext42(RenderQueueContext);
16313
16302
  const processStillJob = useCallback74(async (job, signal) => {
16314
16303
  const compositionRef = getCompositionForJob2(job.id);
16315
16304
  if (!compositionRef) {
@@ -16500,13 +16489,13 @@ var RenderQueueDownloadItem = ({ job }) => {
16500
16489
  };
16501
16490
 
16502
16491
  // src/components/RenderQueue/RenderQueueError.tsx
16503
- import { useCallback as useCallback76, useContext as useContext44 } from "react";
16492
+ import { useCallback as useCallback76, useContext as useContext43 } from "react";
16504
16493
  import { jsx as jsx147 } from "react/jsx-runtime";
16505
16494
  var outputLocation = {
16506
16495
  ...renderQueueItemSubtitleStyle
16507
16496
  };
16508
16497
  var RenderQueueError = ({ job }) => {
16509
- const { setSelectedModal } = useContext44(ModalsContext);
16498
+ const { setSelectedModal } = useContext43(ModalsContext);
16510
16499
  const { tabIndex } = useZIndex();
16511
16500
  const onClick = useCallback76(() => {
16512
16501
  setSelectedModal({
@@ -16528,11 +16517,11 @@ var RenderQueueError = ({ job }) => {
16528
16517
  };
16529
16518
 
16530
16519
  // src/components/RenderQueue/RenderQueueItemCancelButton.tsx
16531
- import { useCallback as useCallback77, useContext as useContext45, useMemo as useMemo88 } from "react";
16520
+ import { useCallback as useCallback77, useContext as useContext44, useMemo as useMemo88 } from "react";
16532
16521
  import { jsx as jsx148 } from "react/jsx-runtime";
16533
16522
  var RenderQueueCancelButton = ({ job }) => {
16534
16523
  const isClientJob = isClientRenderJob(job);
16535
- const { cancelClientJob } = useContext45(RenderQueueContext);
16524
+ const { cancelClientJob } = useContext44(RenderQueueContext);
16536
16525
  const onClick = useCallback77((e) => {
16537
16526
  e.stopPropagation();
16538
16527
  if (isClientJob) {
@@ -16567,7 +16556,7 @@ var RenderQueueCancelButton = ({ job }) => {
16567
16556
  };
16568
16557
 
16569
16558
  // src/components/RenderQueue/RenderQueueItemStatus.tsx
16570
- import React99, { useCallback as useCallback78, useContext as useContext46 } from "react";
16559
+ import React99, { useCallback as useCallback78, useContext as useContext45 } from "react";
16571
16560
 
16572
16561
  // src/components/RenderQueue/CircularProgress.tsx
16573
16562
  import { jsx as jsx149 } from "react/jsx-runtime";
@@ -16612,7 +16601,7 @@ var invisibleStyle = {
16612
16601
  display: "flex"
16613
16602
  };
16614
16603
  var RenderQueueItemStatus = ({ job }) => {
16615
- const { setSelectedModal } = useContext46(ModalsContext);
16604
+ const { setSelectedModal } = useContext45(ModalsContext);
16616
16605
  const [hovered, setHovered] = React99.useState(false);
16617
16606
  const isClientJob = isClientRenderJob(job);
16618
16607
  const onPointerEnter = useCallback78(() => {
@@ -16764,7 +16753,7 @@ var RenderQueueOutputName = ({ job }) => {
16764
16753
  };
16765
16754
 
16766
16755
  // src/components/RenderQueue/RenderQueueProgressMessage.tsx
16767
- import { useCallback as useCallback80, useContext as useContext47 } from "react";
16756
+ import { useCallback as useCallback80, useContext as useContext46 } from "react";
16768
16757
 
16769
16758
  // src/components/RenderQueue/client-render-progress.ts
16770
16759
  var formatEtaString = (timeRemainingInMilliseconds) => {
@@ -16801,7 +16790,7 @@ var RenderQueueProgressMessage = ({ job }) => {
16801
16790
  if (job.status !== "running") {
16802
16791
  throw new Error("should not have rendered this component");
16803
16792
  }
16804
- const { setSelectedModal } = useContext47(ModalsContext);
16793
+ const { setSelectedModal } = useContext46(ModalsContext);
16805
16794
  const { tabIndex } = useZIndex();
16806
16795
  const isClientJob = isClientRenderJob(job);
16807
16796
  const onClick = useCallback80(() => {
@@ -16822,14 +16811,14 @@ var RenderQueueProgressMessage = ({ job }) => {
16822
16811
  };
16823
16812
 
16824
16813
  // src/components/RenderQueue/RenderQueueRemoveItem.tsx
16825
- import { useCallback as useCallback81, useContext as useContext48, useMemo as useMemo91 } from "react";
16814
+ import { useCallback as useCallback81, useContext as useContext47, useMemo as useMemo91 } from "react";
16826
16815
  import { Internals as Internals33 } from "remotion";
16827
16816
  import { jsx as jsx154 } from "react/jsx-runtime";
16828
16817
  var RenderQueueRemoveItem = ({ job }) => {
16829
16818
  const isClientJob = isClientRenderJob(job);
16830
- const { removeClientJob } = useContext48(RenderQueueContext);
16831
- const { canvasContent } = useContext48(Internals33.CompositionManager);
16832
- const { setCanvasContent } = useContext48(Internals33.CompositionSetters);
16819
+ const { removeClientJob } = useContext47(RenderQueueContext);
16820
+ const { canvasContent } = useContext47(Internals33.CompositionManager);
16821
+ const { setCanvasContent } = useContext47(Internals33.CompositionSetters);
16833
16822
  const onClick = useCallback81((e) => {
16834
16823
  e.stopPropagation();
16835
16824
  if (isClientJob) {
@@ -16871,7 +16860,7 @@ var RenderQueueRemoveItem = ({ job }) => {
16871
16860
  };
16872
16861
 
16873
16862
  // src/components/RenderQueue/RenderQueueRepeat.tsx
16874
- import { useCallback as useCallback82, useContext as useContext49, useMemo as useMemo92 } from "react";
16863
+ import { useCallback as useCallback82, useContext as useContext48, useMemo as useMemo92 } from "react";
16875
16864
 
16876
16865
  // src/helpers/retry-payload.ts
16877
16866
  import { NoReactInternals as NoReactInternals11 } from "remotion/no-react";
@@ -17075,9 +17064,9 @@ var makeClientRetryPayload = (job) => {
17075
17064
  // src/components/RenderQueue/RenderQueueRepeat.tsx
17076
17065
  import { jsx as jsx155 } from "react/jsx-runtime";
17077
17066
  var RenderQueueRepeatItem = ({ job }) => {
17078
- const { setSelectedModal } = useContext49(ModalsContext);
17067
+ const { setSelectedModal } = useContext48(ModalsContext);
17079
17068
  const isMobileLayout = useMobileLayout();
17080
- const { setSidebarCollapsedState } = useContext49(SidebarContext);
17069
+ const { setSidebarCollapsedState } = useContext48(SidebarContext);
17081
17070
  const isClientJob = isClientRenderJob(job);
17082
17071
  const onClick = useCallback82((e) => {
17083
17072
  e.stopPropagation();
@@ -17160,8 +17149,8 @@ var subtitle3 = {
17160
17149
  };
17161
17150
  var SELECTED_CLASSNAME = "__remotion_selected_classname";
17162
17151
  var RenderQueueItem = ({ job, selected }) => {
17163
- const [hovered, setHovered] = useState56(false);
17164
- const { setCanvasContent } = useContext50(Internals34.CompositionSetters);
17152
+ const [hovered, setHovered] = useState55(false);
17153
+ const { setCanvasContent } = useContext49(Internals34.CompositionSetters);
17165
17154
  const isClientJob = isClientRenderJob(job);
17166
17155
  const onPointerEnter = useCallback83(() => {
17167
17156
  setHovered(true);
@@ -17327,9 +17316,9 @@ var renderQueue = {
17327
17316
  overflowY: "auto"
17328
17317
  };
17329
17318
  var RenderQueue = () => {
17330
- const connectionStatus = useContext51(StudioServerConnectionCtx).previewServerState.type;
17331
- const { jobs } = useContext51(RenderQueueContext);
17332
- const { canvasContent } = useContext51(Internals35.CompositionManager);
17319
+ const connectionStatus = useContext50(StudioServerConnectionCtx).previewServerState.type;
17320
+ const { jobs } = useContext50(RenderQueueContext);
17321
+ const { canvasContent } = useContext50(Internals35.CompositionManager);
17333
17322
  const previousJobCount = React106.useRef(jobs.length);
17334
17323
  const jobCount = jobs.length;
17335
17324
  const divRef = React106.useRef(null);
@@ -17412,7 +17401,7 @@ var RenderQueue = () => {
17412
17401
  };
17413
17402
 
17414
17403
  // src/components/RendersTab.tsx
17415
- import { useContext as useContext52, useMemo as useMemo95 } from "react";
17404
+ import { useContext as useContext51, useMemo as useMemo95 } from "react";
17416
17405
  import { jsx as jsx159, jsxs as jsxs77, Fragment as Fragment21 } from "react/jsx-runtime";
17417
17406
  var row4 = {
17418
17407
  display: "flex",
@@ -17432,7 +17421,7 @@ var badge = {
17432
17421
  alignItems: "center"
17433
17422
  };
17434
17423
  var RendersTab = ({ selected, onClick }) => {
17435
- const { jobs } = useContext52(RenderQueueContext);
17424
+ const { jobs } = useContext51(RenderQueueContext);
17436
17425
  const failedJobs = jobs.filter((j) => j.status === "failed").length;
17437
17426
  const jobCount = jobs.length;
17438
17427
  const badgeStyle = useMemo95(() => {
@@ -17467,10 +17456,10 @@ var RendersTab = ({ selected, onClick }) => {
17467
17456
  };
17468
17457
 
17469
17458
  // src/components/VisualControls/VisualControlsContent.tsx
17470
- import React109, { useContext as useContext54 } from "react";
17459
+ import React109, { useContext as useContext53 } from "react";
17471
17460
 
17472
17461
  // src/components/VisualControls/VisualControlHandle.tsx
17473
- import { useCallback as useCallback85, useContext as useContext53, useEffect as useEffect53, useState as useState59 } from "react";
17462
+ import { useCallback as useCallback85, useContext as useContext52, useEffect as useEffect53, useState as useState58 } from "react";
17474
17463
  import { NoReactInternals as NoReactInternals12 } from "remotion/no-react";
17475
17464
 
17476
17465
  // src/fast-refresh-context.ts
@@ -17482,9 +17471,9 @@ var FastRefreshContext = createContext20({
17482
17471
  });
17483
17472
 
17484
17473
  // src/components/VisualControls/get-original-stack-trace.ts
17485
- import { useEffect as useEffect52, useState as useState57 } from "react";
17474
+ import { useEffect as useEffect52, useState as useState56 } from "react";
17486
17475
  var useOriginalFileName = (stack2) => {
17487
- const [originalFileName, setOriginalFileName] = useState57({ type: "loading" });
17476
+ const [originalFileName, setOriginalFileName] = useState56({ type: "loading" });
17488
17477
  useEffect52(() => {
17489
17478
  if (!stack2) {
17490
17479
  return;
@@ -17506,7 +17495,7 @@ var useOriginalFileName = (stack2) => {
17506
17495
  };
17507
17496
 
17508
17497
  // src/components/VisualControls/ClickableFileName.tsx
17509
- import { useCallback as useCallback84, useMemo as useMemo96, useState as useState58 } from "react";
17498
+ import { useCallback as useCallback84, useMemo as useMemo96, useState as useState57 } from "react";
17510
17499
 
17511
17500
  // src/components/Timeline/TimelineStack/source-attribution.ts
17512
17501
  var getOriginalSourceAttribution = (originalLocation) => {
@@ -17531,7 +17520,7 @@ var container32 = {
17531
17520
  var ClickableFileName = ({
17532
17521
  originalFileName
17533
17522
  }) => {
17534
- const [titleHovered, setTitleHovered] = useState58(false);
17523
+ const [titleHovered, setTitleHovered] = useState57(false);
17535
17524
  const hoverEffect = titleHovered && originalFileName.type === "loaded";
17536
17525
  const onTitlePointerEnter = useCallback84(() => {
17537
17526
  setTitleHovered(true);
@@ -17581,10 +17570,10 @@ var VisualControlHandle = ({ value, keyName }) => {
17581
17570
  throw new Error("expected zod");
17582
17571
  }
17583
17572
  const zodTypes = useZodTypesIfPossible();
17584
- const state = useContext53(VisualControlsContext);
17585
- const { updateValue } = useContext53(SetVisualControlsContext);
17586
- const { fastRefreshes, increaseManualRefreshes } = useContext53(FastRefreshContext);
17587
- const [_saving, setSaving] = useState59(false);
17573
+ const state = useContext52(VisualControlsContext);
17574
+ const { updateValue } = useContext52(SetVisualControlsContext);
17575
+ const { fastRefreshes, increaseManualRefreshes } = useContext52(FastRefreshContext);
17576
+ const [_saving, setSaving] = useState58(false);
17588
17577
  const currentValue = getVisualControlEditedValue({
17589
17578
  handles: state.handles,
17590
17579
  key: keyName
@@ -17673,7 +17662,7 @@ var container33 = {
17673
17662
  overflowY: "auto"
17674
17663
  };
17675
17664
  var VisualControlsContent = () => {
17676
- const { handles } = useContext54(VisualControlsContext);
17665
+ const { handles } = useContext53(VisualControlsContext);
17677
17666
  const entries = Object.entries(handles);
17678
17667
  return /* @__PURE__ */ jsx163("div", {
17679
17668
  style: container33,
@@ -17716,10 +17705,10 @@ var persistSelectedOptionsSidebarPanel2 = (panel2) => {
17716
17705
  };
17717
17706
  var optionsSidebarTabs = createRef9();
17718
17707
  var OptionsPanel = ({ readOnlyStudio }) => {
17719
- const { props, updateProps } = useContext55(Internals36.EditorPropsContext);
17708
+ const { props, updateProps } = useContext54(Internals36.EditorPropsContext);
17720
17709
  const renderingAvailable = !readOnlyStudio || SHOW_BROWSER_RENDERING;
17721
17710
  const isMobileLayout = useMobileLayout();
17722
- const visualControlsTabActivated = useContext55(VisualControlsTabActivatedContext);
17711
+ const visualControlsTabActivated = useContext54(VisualControlsTabActivatedContext);
17723
17712
  const container34 = useMemo97(() => ({
17724
17713
  height: "100%",
17725
17714
  width: "100%",
@@ -17728,7 +17717,7 @@ var OptionsPanel = ({ readOnlyStudio }) => {
17728
17717
  flexDirection: "column",
17729
17718
  flex: 1
17730
17719
  }), [isMobileLayout]);
17731
- const [panel2, setPanel] = useState60(() => getSelectedPanel2(renderingAvailable));
17720
+ const [panel2, setPanel] = useState59(() => getSelectedPanel2(renderingAvailable));
17732
17721
  const onPropsSelected = useCallback86(() => {
17733
17722
  setPanel("input-props");
17734
17723
  persistSelectedOptionsSidebarPanel2("input-props");
@@ -17749,7 +17738,7 @@ var OptionsPanel = ({ readOnlyStudio }) => {
17749
17738
  }
17750
17739
  };
17751
17740
  }, []);
17752
- const { compositions, canvasContent } = useContext55(Internals36.CompositionManager);
17741
+ const { compositions, canvasContent } = useContext54(Internals36.CompositionManager);
17753
17742
  const composition = useMemo97(() => {
17754
17743
  if (canvasContent === null || canvasContent.type !== "composition") {
17755
17744
  return null;
@@ -17886,7 +17875,7 @@ var OptionsPanel = ({ readOnlyStudio }) => {
17886
17875
  };
17887
17876
 
17888
17877
  // src/components/PreviewToolbar.tsx
17889
- import { useContext as useContext61, useEffect as useEffect59, useRef as useRef33, useState as useState64 } from "react";
17878
+ import { useContext as useContext60, useEffect as useEffect59, useRef as useRef33, useState as useState63 } from "react";
17890
17879
  import { Internals as Internals44 } from "remotion";
17891
17880
 
17892
17881
  // src/state/loop.ts
@@ -17900,7 +17889,7 @@ var loadLoopOption = () => {
17900
17889
  };
17901
17890
 
17902
17891
  // src/components/CheckboardToggle.tsx
17903
- import { useCallback as useCallback87, useContext as useContext56 } from "react";
17892
+ import { useCallback as useCallback87, useContext as useContext55 } from "react";
17904
17893
  import { NoReactInternals as NoReactInternals13 } from "remotion/no-react";
17905
17894
  import { jsx as jsx165 } from "react/jsx-runtime";
17906
17895
  var accessibilityLabel2 = [
@@ -17908,7 +17897,7 @@ var accessibilityLabel2 = [
17908
17897
  areKeyboardShortcutsDisabled() ? null : "(T)"
17909
17898
  ].filter(NoReactInternals13.truthy).join(" ");
17910
17899
  var CheckboardToggle = () => {
17911
- const { checkerboard, setCheckerboard } = useContext56(CheckerboardContext);
17900
+ const { checkerboard, setCheckerboard } = useContext55(CheckerboardContext);
17912
17901
  const onClick = useCallback87(() => {
17913
17902
  setCheckerboard((c) => {
17914
17903
  return !c;
@@ -17939,10 +17928,10 @@ var CheckboardToggle = () => {
17939
17928
  // src/components/FpsCounter.tsx
17940
17929
  import {
17941
17930
  useEffect as useEffect54,
17942
- useLayoutEffect as useLayoutEffect5,
17931
+ useLayoutEffect as useLayoutEffect4,
17943
17932
  useMemo as useMemo98,
17944
17933
  useRef as useRef31,
17945
- useState as useState61
17934
+ useState as useState60
17946
17935
  } from "react";
17947
17936
  import { Internals as Internals37 } from "remotion";
17948
17937
  import { jsxs as jsxs81 } from "react/jsx-runtime";
@@ -17960,17 +17949,17 @@ var FpsCounter = ({ playbackSpeed }) => {
17960
17949
  const videoConfig = Internals37.useUnsafeVideoConfig();
17961
17950
  const [playing] = Internals37.Timeline.usePlayingState();
17962
17951
  const frame2 = Internals37.Timeline.useTimelinePosition();
17963
- const [marker, rerender] = useState61({});
17964
- const [fps, setFps] = useState61(0);
17952
+ const [marker, rerender] = useState60({});
17953
+ const [fps, setFps] = useState60(0);
17965
17954
  const previousUpdates = useRef31([]);
17966
17955
  const fpsRef = useRef31(0);
17967
17956
  const playingRef = useRef31(playing);
17968
- useLayoutEffect5(() => {
17957
+ useLayoutEffect4(() => {
17969
17958
  fpsRef.current = 0;
17970
17959
  previousUpdates.current = [];
17971
17960
  playingRef.current = playing;
17972
17961
  }, [playing]);
17973
- useLayoutEffect5(() => {
17962
+ useLayoutEffect4(() => {
17974
17963
  if (playingRef.current === false)
17975
17964
  return;
17976
17965
  previousUpdates.current = pushWithMaxSize(previousUpdates.current, performance.now(), 15);
@@ -18020,7 +18009,7 @@ var FpsCounter = ({ playbackSpeed }) => {
18020
18009
  };
18021
18010
 
18022
18011
  // src/components/FullscreenToggle.tsx
18023
- import { useCallback as useCallback88, useContext as useContext57, useEffect as useEffect55 } from "react";
18012
+ import { useCallback as useCallback88, useContext as useContext56, useEffect as useEffect55 } from "react";
18024
18013
  import { Internals as Internals38 } from "remotion";
18025
18014
  import { NoReactInternals as NoReactInternals14 } from "remotion/no-react";
18026
18015
  import { jsx as jsx166 } from "react/jsx-runtime";
@@ -18030,7 +18019,7 @@ var accessibilityLabel3 = [
18030
18019
  ].filter(NoReactInternals14.truthy).join(" ");
18031
18020
  var FullScreenToggle = () => {
18032
18021
  const keybindings = useKeybinding();
18033
- const { setSize } = useContext57(Internals38.PreviewSizeContext);
18022
+ const { setSize } = useContext56(Internals38.PreviewSizeContext);
18034
18023
  const onClick = useCallback88(() => {
18035
18024
  drawRef.current?.requestFullscreen();
18036
18025
  if (document.fullscreenElement)
@@ -18264,7 +18253,7 @@ var PlaybackRatePersistor = () => {
18264
18253
  };
18265
18254
 
18266
18255
  // src/components/PlaybackRateSelector.tsx
18267
- import { useContext as useContext58, useMemo as useMemo99 } from "react";
18256
+ import { useContext as useContext57, useMemo as useMemo99 } from "react";
18268
18257
  import { Internals as Internals40 } from "remotion";
18269
18258
  import { jsx as jsx170 } from "react/jsx-runtime";
18270
18259
  var commonPlaybackRates = [
@@ -18286,7 +18275,7 @@ var getPlaybackRateLabel = (playbackRate) => {
18286
18275
  var accessibilityLabel5 = "Change the playback rate";
18287
18276
  var comboStyle2 = { width: 80 };
18288
18277
  var PlaybackRateSelector = ({ playbackRate, setPlaybackRate }) => {
18289
- const { canvasContent } = useContext58(Internals40.CompositionManager);
18278
+ const { canvasContent } = useContext57(Internals40.CompositionManager);
18290
18279
  const isStill = useIsStill();
18291
18280
  const style9 = useMemo99(() => {
18292
18281
  return {
@@ -18336,7 +18325,7 @@ var PlaybackRateSelector = ({ playbackRate, setPlaybackRate }) => {
18336
18325
 
18337
18326
  // src/components/PlayPause.tsx
18338
18327
  import { PlayerInternals as PlayerInternals13 } from "@remotion/player";
18339
- import { useCallback as useCallback92, useEffect as useEffect58, useState as useState62 } from "react";
18328
+ import { useCallback as useCallback92, useEffect as useEffect58, useState as useState61 } from "react";
18340
18329
  import { Internals as Internals41 } from "remotion";
18341
18330
 
18342
18331
  // src/icons/jump-to-start.tsx
@@ -18433,7 +18422,7 @@ var iconButton = {
18433
18422
  var PlayPause = ({ playbackRate, loop, bufferStateDelayInMilliseconds }) => {
18434
18423
  const { inFrame, outFrame } = useTimelineInOutFramePosition();
18435
18424
  const videoConfig = Internals41.useUnsafeVideoConfig();
18436
- const [showBufferIndicator, setShowBufferState] = useState62(false);
18425
+ const [showBufferIndicator, setShowBufferState] = useState61(false);
18437
18426
  const {
18438
18427
  playing,
18439
18428
  play,
@@ -18695,7 +18684,7 @@ var PlayPause = ({ playbackRate, loop, bufferStateDelayInMilliseconds }) => {
18695
18684
 
18696
18685
  // src/components/RenderButton.tsx
18697
18686
  import { PlayerInternals as PlayerInternals14 } from "@remotion/player";
18698
- import { useCallback as useCallback93, useContext as useContext59, useMemo as useMemo100, useRef as useRef32, useState as useState63 } from "react";
18687
+ import { useCallback as useCallback93, useContext as useContext58, useMemo as useMemo100, useRef as useRef32, useState as useState62 } from "react";
18699
18688
  import ReactDOM8 from "react-dom";
18700
18689
  import { Internals as Internals42 } from "remotion";
18701
18690
  import { jsx as jsx177, jsxs as jsxs83, Fragment as Fragment24 } from "react/jsx-runtime";
@@ -18766,9 +18755,9 @@ var RenderButton = ({
18766
18755
  readOnlyStudio
18767
18756
  }) => {
18768
18757
  const { inFrame, outFrame } = useTimelineInOutFramePosition();
18769
- const { setSelectedModal } = useContext59(ModalsContext);
18770
- const [preferredRenderType, setPreferredRenderType] = useState63(() => getInitialRenderType(readOnlyStudio));
18771
- const [dropdownOpened, setDropdownOpened] = useState63(false);
18758
+ const { setSelectedModal } = useContext58(ModalsContext);
18759
+ const [preferredRenderType, setPreferredRenderType] = useState62(() => getInitialRenderType(readOnlyStudio));
18760
+ const [dropdownOpened, setDropdownOpened] = useState62(false);
18772
18761
  const dropdownRef = useRef32(null);
18773
18762
  const containerRef = useRef32(null);
18774
18763
  const { currentZIndex } = useZIndex();
@@ -18805,7 +18794,7 @@ var RenderButton = ({
18805
18794
  return !o;
18806
18795
  });
18807
18796
  }, [refresh]);
18808
- const connectionStatus = useContext59(StudioServerConnectionCtx).previewServerState.type;
18797
+ const connectionStatus = useContext58(StudioServerConnectionCtx).previewServerState.type;
18809
18798
  const canServerRender = connectionStatus === "connected";
18810
18799
  const canRender = canServerRender || SHOW_BROWSER_RENDERING || readOnlyStudio;
18811
18800
  const renderType = useMemo100(() => {
@@ -18835,7 +18824,7 @@ var RenderButton = ({
18835
18824
  }, []);
18836
18825
  const video = Internals42.useVideo();
18837
18826
  const getCurrentFrame2 = PlayerInternals14.useFrameImperative();
18838
- const { props } = useContext59(Internals42.EditorPropsContext);
18827
+ const { props } = useContext58(Internals42.EditorPropsContext);
18839
18828
  const openServerRenderModal = useCallback93((copyCommandOnly) => {
18840
18829
  if (!video) {
18841
18830
  return null;
@@ -19158,7 +19147,7 @@ var RenderButton = ({
19158
19147
  };
19159
19148
 
19160
19149
  // src/components/Timeline/TimelineZoomControls.tsx
19161
- import { useCallback as useCallback94, useContext as useContext60 } from "react";
19150
+ import { useCallback as useCallback94, useContext as useContext59 } from "react";
19162
19151
  import { Internals as Internals43 } from "remotion";
19163
19152
 
19164
19153
  // src/icons/minus.tsx
@@ -19191,8 +19180,8 @@ var iconStyle4 = {
19191
19180
  width: 14
19192
19181
  };
19193
19182
  var TimelineZoomControls = () => {
19194
- const { canvasContent } = useContext60(Internals43.CompositionManager);
19195
- const { setZoom, zoom: zoomMap } = useContext60(TimelineZoomCtx);
19183
+ const { canvasContent } = useContext59(Internals43.CompositionManager);
19184
+ const { setZoom, zoom: zoomMap } = useContext59(TimelineZoomCtx);
19196
19185
  const { tabIndex } = useZIndex();
19197
19186
  const onMinusClicked = useCallback94(() => {
19198
19187
  if (canvasContent === null || canvasContent.type !== "composition") {
@@ -19320,15 +19309,15 @@ var padding2 = {
19320
19309
  };
19321
19310
  var PreviewToolbar = ({ readOnlyStudio, bufferStateDelayInMilliseconds }) => {
19322
19311
  const { playbackRate, setPlaybackRate } = Internals44.useTimelineContext();
19323
- const { mediaMuted } = useContext61(Internals44.MediaVolumeContext);
19324
- const { setMediaMuted } = useContext61(Internals44.SetMediaVolumeContext);
19325
- const { canvasContent } = useContext61(Internals44.CompositionManager);
19312
+ const { mediaMuted } = useContext60(Internals44.MediaVolumeContext);
19313
+ const { setMediaMuted } = useContext60(Internals44.SetMediaVolumeContext);
19314
+ const { canvasContent } = useContext60(Internals44.CompositionManager);
19326
19315
  const isVideoComposition = useIsVideoComposition();
19327
19316
  const previewToolbarRef = useRef33(null);
19328
19317
  const leftScrollIndicatorRef = useRef33(null);
19329
19318
  const rightScrollIndicatorRef = useRef33(null);
19330
19319
  const isStill = useIsStill();
19331
- const [loop, setLoop] = useState64(loadLoopOption());
19320
+ const [loop, setLoop] = useState63(loadLoopOption());
19332
19321
  const isFullscreenSupported = checkFullscreenSupport();
19333
19322
  const isMobileLayout = useMobileLayout();
19334
19323
  useEffect59(() => {
@@ -19482,7 +19471,7 @@ var PreviewToolbar = ({ readOnlyStudio, bufferStateDelayInMilliseconds }) => {
19482
19471
  };
19483
19472
 
19484
19473
  // src/components/Splitter/SplitterContainer.tsx
19485
- import { useMemo as useMemo101, useRef as useRef34, useState as useState65 } from "react";
19474
+ import { useMemo as useMemo101, useRef as useRef34, useState as useState64 } from "react";
19486
19475
 
19487
19476
  // src/state/timeline.ts
19488
19477
  var localStorageKey4 = (id) => `remotion.editor.timelineFlex.${id}`;
@@ -19536,7 +19525,7 @@ var containerColumn = {
19536
19525
  };
19537
19526
  var SplitterContainer = ({ orientation, children, defaultFlex, maxFlex, minFlex, id }) => {
19538
19527
  const [initialTimelineFlex, persistFlex] = useTimelineFlex(id);
19539
- const [flexValue, setFlexValue] = useState65(initialTimelineFlex ?? defaultFlex);
19528
+ const [flexValue, setFlexValue] = useState64(initialTimelineFlex ?? defaultFlex);
19540
19529
  const ref2 = useRef34(null);
19541
19530
  const isDragging = useRef34(false);
19542
19531
  const value = useMemo101(() => {
@@ -19573,11 +19562,11 @@ var SplitterContainer = ({ orientation, children, defaultFlex, maxFlex, minFlex,
19573
19562
  };
19574
19563
 
19575
19564
  // src/components/Splitter/SplitterElement.tsx
19576
- import { useContext as useContext62, useMemo as useMemo102 } from "react";
19565
+ import { useContext as useContext61, useMemo as useMemo102 } from "react";
19577
19566
  import { interpolateColors, random } from "remotion";
19578
19567
  import { jsx as jsx182, jsxs as jsxs86, Fragment as Fragment26 } from "react/jsx-runtime";
19579
19568
  var SplitterElement = ({ children, type, sticky }) => {
19580
- const context = useContext62(SplitterContext);
19569
+ const context = useContext61(SplitterContext);
19581
19570
  const style9 = useMemo102(() => {
19582
19571
  return {
19583
19572
  flex: (type === "flexer" ? context.flexValue : 1 - context.flexValue) * 1000,
@@ -19611,7 +19600,7 @@ var SplitterElement = ({ children, type, sticky }) => {
19611
19600
 
19612
19601
  // src/components/Splitter/SplitterHandle.tsx
19613
19602
  import { PlayerInternals as PlayerInternals15 } from "@remotion/player";
19614
- import { useContext as useContext63, useEffect as useEffect60, useRef as useRef35, useState as useState66 } from "react";
19603
+ import { useContext as useContext62, useEffect as useEffect60, useRef as useRef35, useState as useState65 } from "react";
19615
19604
  import { jsx as jsx183 } from "react/jsx-runtime";
19616
19605
  var SPLITTER_HANDLE_SIZE = 3;
19617
19606
  var containerRow2 = {
@@ -19621,11 +19610,11 @@ var containerColumn2 = {
19621
19610
  width: SPLITTER_HANDLE_SIZE
19622
19611
  };
19623
19612
  var SplitterHandle = ({ allowToCollapse, onCollapse }) => {
19624
- const context = useContext63(SplitterContext);
19613
+ const context = useContext62(SplitterContext);
19625
19614
  if (!context) {
19626
19615
  throw new Error("Cannot find splitter context");
19627
19616
  }
19628
- const [lastPointerUp, setLastPointerUp] = useState66(() => Date.now());
19617
+ const [lastPointerUp, setLastPointerUp] = useState65(() => Date.now());
19629
19618
  const ref2 = useRef35(null);
19630
19619
  useEffect60(() => {
19631
19620
  if (context.isDragging.current) {
@@ -19776,7 +19765,7 @@ var row5 = {
19776
19765
  minHeight: 0
19777
19766
  };
19778
19767
  var useResponsiveSidebarStatus = () => {
19779
- const { sidebarCollapsedStateLeft } = useContext64(SidebarContext);
19768
+ const { sidebarCollapsedStateLeft } = useContext63(SidebarContext);
19780
19769
  const responsiveLeftStatus = useBreakpoint(1200) ? "collapsed" : "expanded";
19781
19770
  const actualStateLeft = useMemo103(() => {
19782
19771
  if (sidebarCollapsedStateLeft === "collapsed") {
@@ -19790,9 +19779,9 @@ var useResponsiveSidebarStatus = () => {
19790
19779
  return actualStateLeft;
19791
19780
  };
19792
19781
  var TopPanelInner = ({ readOnlyStudio, onMounted, drawRef: drawRef2, bufferStateDelayInMilliseconds }) => {
19793
- const { setSidebarCollapsedState, sidebarCollapsedStateRight } = useContext64(SidebarContext);
19782
+ const { setSidebarCollapsedState, sidebarCollapsedStateRight } = useContext63(SidebarContext);
19794
19783
  const rulersAreVisible = useIsRulerVisible();
19795
- const { canvasContent } = useContext64(Internals45.CompositionManager);
19784
+ const { canvasContent } = useContext63(Internals45.CompositionManager);
19796
19785
  const actualStateLeft = useResponsiveSidebarStatus();
19797
19786
  const actualStateRight = useMemo103(() => {
19798
19787
  if (sidebarCollapsedStateRight === "collapsed") {
@@ -19914,7 +19903,7 @@ var style9 = {
19914
19903
  position: "relative"
19915
19904
  };
19916
19905
  var SidebarCollapserControls = () => {
19917
- const { setSidebarCollapsedState, sidebarCollapsedStateRight } = useContext65(SidebarContext);
19906
+ const { setSidebarCollapsedState, sidebarCollapsedStateRight } = useContext64(SidebarContext);
19918
19907
  const keybindings = useKeybinding();
19919
19908
  const leftSidebarStatus = useResponsiveSidebarStatus();
19920
19909
  const leftIcon = useCallback96((color) => {
@@ -20052,10 +20041,10 @@ var SidebarCollapserControls = () => {
20052
20041
  // src/components/UndoRedoButtons.tsx
20053
20042
  import {
20054
20043
  useCallback as useCallback97,
20055
- useContext as useContext66,
20044
+ useContext as useContext65,
20056
20045
  useEffect as useEffect63,
20057
20046
  useRef as useRef36,
20058
- useState as useState67
20047
+ useState as useState66
20059
20048
  } from "react";
20060
20049
 
20061
20050
  // src/icons/redo.tsx
@@ -20091,9 +20080,9 @@ var iconStyle5 = {
20091
20080
  height: 16
20092
20081
  };
20093
20082
  var UndoRedoButtons = () => {
20094
- const [undoFile, setUndoFile] = useState67(null);
20095
- const [redoFile, setRedoFile] = useState67(null);
20096
- const { subscribeToEvent } = useContext66(StudioServerConnectionCtx);
20083
+ const [undoFile, setUndoFile] = useState66(null);
20084
+ const [redoFile, setRedoFile] = useState66(null);
20085
+ const { subscribeToEvent } = useContext65(StudioServerConnectionCtx);
20097
20086
  const keybindings = useKeybinding();
20098
20087
  const undoInFlight = useRef36(false);
20099
20088
  const redoInFlight = useRef36(false);
@@ -20198,10 +20187,10 @@ var UndoRedoButtons = () => {
20198
20187
  // src/components/UpdateCheck.tsx
20199
20188
  import {
20200
20189
  useCallback as useCallback98,
20201
- useContext as useContext67,
20190
+ useContext as useContext66,
20202
20191
  useEffect as useEffect64,
20203
20192
  useMemo as useMemo104,
20204
- useState as useState68
20193
+ useState as useState67
20205
20194
  } from "react";
20206
20195
  import { VERSION } from "remotion";
20207
20196
  import { jsx as jsx189 } from "react/jsx-runtime";
@@ -20217,10 +20206,10 @@ var buttonStyle3 = {
20217
20206
  justifyContent: "center"
20218
20207
  };
20219
20208
  var UpdateCheck = () => {
20220
- const [info, setInfo] = useState68(null);
20221
- const { setSelectedModal } = useContext67(ModalsContext);
20209
+ const [info, setInfo] = useState67(null);
20210
+ const { setSelectedModal } = useContext66(ModalsContext);
20222
20211
  const { tabIndex } = useZIndex();
20223
- const [knownBugs, setKnownBugs] = useState68(null);
20212
+ const [knownBugs, setKnownBugs] = useState67(null);
20224
20213
  const hasKnownBugs = useMemo104(() => {
20225
20214
  return knownBugs && knownBugs.length > 0;
20226
20215
  }, [knownBugs]);
@@ -20316,7 +20305,7 @@ var flex2 = {
20316
20305
  flex: 1
20317
20306
  };
20318
20307
  var MenuToolbar = ({ readOnlyStudio }) => {
20319
- const [selected, setSelected] = useState69(null);
20308
+ const [selected, setSelected] = useState68(null);
20320
20309
  const mobileLayout = useMobileLayout();
20321
20310
  const fixedWidthRight = useMemo105(() => {
20322
20311
  return {
@@ -20422,7 +20411,7 @@ var MenuToolbar = ({ readOnlyStudio }) => {
20422
20411
  };
20423
20412
 
20424
20413
  // src/components/Timeline/Timeline.tsx
20425
- import React150, { useContext as useContext80, useMemo as useMemo123 } from "react";
20414
+ import React150, { useContext as useContext79, useMemo as useMemo123 } from "react";
20426
20415
  import { Internals as Internals57 } from "remotion";
20427
20416
 
20428
20417
  // src/helpers/get-sequence-visible-range.ts
@@ -20573,7 +20562,7 @@ var calculateTimeline = ({
20573
20562
  };
20574
20563
 
20575
20564
  // src/components/ExpandedTracksProvider.tsx
20576
- import { createContext as createContext21, useCallback as useCallback100, useMemo as useMemo106, useState as useState70 } from "react";
20565
+ import { createContext as createContext21, useCallback as useCallback100, useMemo as useMemo106, useState as useState69 } from "react";
20577
20566
  import { jsx as jsx191 } from "react/jsx-runtime";
20578
20567
  var ExpandedTracksContext = createContext21({
20579
20568
  expandedTracks: {},
@@ -20582,7 +20571,7 @@ var ExpandedTracksContext = createContext21({
20582
20571
  }
20583
20572
  });
20584
20573
  var ExpandedTracksProvider = ({ children }) => {
20585
- const [expandedTracks, setExpandedTracks] = useState70({});
20574
+ const [expandedTracks, setExpandedTracks] = useState69({});
20586
20575
  const toggleTrack = useCallback100((id) => {
20587
20576
  setExpandedTracks((prev) => ({
20588
20577
  ...prev,
@@ -20639,16 +20628,16 @@ var MaxTimelineTracksReached = () => {
20639
20628
  import { PlayerInternals as PlayerInternals16 } from "@remotion/player";
20640
20629
  import {
20641
20630
  useCallback as useCallback101,
20642
- useContext as useContext70,
20631
+ useContext as useContext69,
20643
20632
  useEffect as useEffect65,
20644
20633
  useMemo as useMemo108,
20645
20634
  useRef as useRef37,
20646
- useState as useState71
20635
+ useState as useState70
20647
20636
  } from "react";
20648
20637
  import { Internals as Internals47, useVideoConfig as useVideoConfig4 } from "remotion";
20649
20638
 
20650
20639
  // src/components/Timeline/TimelineInOutPointer.tsx
20651
- import { createRef as createRef10, useContext as useContext68 } from "react";
20640
+ import { createRef as createRef10, useContext as useContext67 } from "react";
20652
20641
  import { Internals as Internals46 } from "remotion";
20653
20642
  import { jsx as jsx192, jsxs as jsxs92, Fragment as Fragment29 } from "react/jsx-runtime";
20654
20643
  var areaHighlight = {
@@ -20663,7 +20652,7 @@ var outMarkerAreaRef = createRef10();
20663
20652
  var TimelineInOutPointer = () => {
20664
20653
  const { inFrame, outFrame } = useTimelineInOutFramePosition();
20665
20654
  const videoConfig = Internals46.useUnsafeVideoConfig();
20666
- const timelineWidth = useContext68(TimelineWidthContext);
20655
+ const timelineWidth = useContext67(TimelineWidthContext);
20667
20656
  if (!videoConfig || timelineWidth === null) {
20668
20657
  return null;
20669
20658
  }
@@ -20690,7 +20679,7 @@ var TimelineInOutPointer = () => {
20690
20679
  };
20691
20680
 
20692
20681
  // src/components/Timeline/TimelineInOutPointerHandle.tsx
20693
- import { createRef as createRef11, useContext as useContext69, useMemo as useMemo107 } from "react";
20682
+ import { createRef as createRef11, useContext as useContext68, useMemo as useMemo107 } from "react";
20694
20683
  import { useVideoConfig as useVideoConfig3 } from "remotion";
20695
20684
  import { jsx as jsx193 } from "react/jsx-runtime";
20696
20685
  var line3 = {
@@ -20723,7 +20712,7 @@ var TimelineInOutPointerHandle = ({
20723
20712
  type,
20724
20713
  atFrame
20725
20714
  }) => {
20726
- const timelineWidth = useContext69(TimelineWidthContext);
20715
+ const timelineWidth = useContext68(TimelineWidthContext);
20727
20716
  if (timelineWidth === null) {
20728
20717
  return null;
20729
20718
  }
@@ -20759,8 +20748,8 @@ var getClientXWithScroll = (x) => {
20759
20748
  };
20760
20749
  var TimelineDragHandler = () => {
20761
20750
  const video = Internals47.useUnsafeVideoConfig();
20762
- const { zoom: zoomMap } = useContext70(TimelineZoomCtx);
20763
- const { canvasContent } = useContext70(Internals47.CompositionManager);
20751
+ const { zoom: zoomMap } = useContext69(TimelineZoomCtx);
20752
+ const { canvasContent } = useContext69(Internals47.CompositionManager);
20764
20753
  const containerStyle2 = useMemo108(() => {
20765
20754
  if (!canvasContent || canvasContent.type !== "composition") {
20766
20755
  return {};
@@ -20788,10 +20777,10 @@ var Inner2 = () => {
20788
20777
  });
20789
20778
  const { isHighestContext } = useZIndex();
20790
20779
  const setFrame = Internals47.useTimelineSetFrame();
20791
- const [inOutDragging, setInOutDragging] = useState71({
20780
+ const [inOutDragging, setInOutDragging] = useState70({
20792
20781
  dragging: false
20793
20782
  });
20794
- const timelineWidth = useContext70(TimelineWidthContext);
20783
+ const timelineWidth = useContext69(TimelineWidthContext);
20795
20784
  const get = useCallback101((frame2) => {
20796
20785
  if (timelineWidth === null) {
20797
20786
  throw new Error("timeline width is not yet determined");
@@ -20802,7 +20791,7 @@ var Inner2 = () => {
20802
20791
  const left3 = size4?.left ?? 0;
20803
20792
  const { inFrame, outFrame } = useTimelineInOutFramePosition();
20804
20793
  const { setInAndOutFrames } = useTimelineSetInOutFramePosition();
20805
- const [dragging, setDragging] = useState71({
20794
+ const [dragging, setDragging] = useState70({
20806
20795
  dragging: false
20807
20796
  });
20808
20797
  const { playing, play, pause, seek } = PlayerInternals16.usePlayer();
@@ -21185,14 +21174,14 @@ import { PlayerInternals as PlayerInternals18 } from "@remotion/player";
21185
21174
  import { useRef as useRef41 } from "react";
21186
21175
 
21187
21176
  // src/components/Timeline/TimelineListItem.tsx
21188
- import { useCallback as useCallback110, useContext as useContext74, useMemo as useMemo116 } from "react";
21177
+ import { useCallback as useCallback110, useContext as useContext73, useMemo as useMemo116 } from "react";
21189
21178
  import { Internals as Internals50 } from "remotion";
21190
21179
 
21191
21180
  // src/components/Timeline/TimelineExpandedSection.tsx
21192
21181
  import React137, { useMemo as useMemo113 } from "react";
21193
21182
 
21194
21183
  // src/components/Timeline/TimelineFieldRow.tsx
21195
- import { useCallback as useCallback106, useContext as useContext71, useMemo as useMemo112 } from "react";
21184
+ import { useCallback as useCallback106, useContext as useContext70, useMemo as useMemo112 } from "react";
21196
21185
  import { Internals as Internals48 } from "remotion";
21197
21186
 
21198
21187
  // src/components/Timeline/TimelineBooleanField.tsx
@@ -21221,7 +21210,7 @@ var TimelineBooleanField = ({ field, codeValue, effectiveValue, canUpdate, onSav
21221
21210
  };
21222
21211
 
21223
21212
  // src/components/Timeline/TimelineNumberField.tsx
21224
- import { useCallback as useCallback103, useMemo as useMemo109, useState as useState72 } from "react";
21213
+ import { useCallback as useCallback103, useMemo as useMemo109, useState as useState71 } from "react";
21225
21214
 
21226
21215
  // src/components/Timeline/timeline-field-utils.ts
21227
21216
  var getDecimalPlaces = (num) => {
@@ -21244,7 +21233,7 @@ var TimelineNumberField = ({
21244
21233
  onDragEnd,
21245
21234
  codeValue
21246
21235
  }) => {
21247
- const [dragValue, setDragValue] = useState72(null);
21236
+ const [dragValue, setDragValue] = useState71(null);
21248
21237
  const onValueChange = useCallback103((newVal) => {
21249
21238
  setDragValue(newVal);
21250
21239
  onDragValueChange(field.key, newVal);
@@ -21296,7 +21285,7 @@ var TimelineNumberField = ({
21296
21285
  };
21297
21286
 
21298
21287
  // src/components/Timeline/TimelineRotationField.tsx
21299
- import { useCallback as useCallback104, useMemo as useMemo110, useState as useState73 } from "react";
21288
+ import { useCallback as useCallback104, useMemo as useMemo110, useState as useState72 } from "react";
21300
21289
  import { jsx as jsx197 } from "react/jsx-runtime";
21301
21290
  var unitPattern = /^([+-]?(?:\d+\.?\d*|\.\d+))(deg|rad|turn|grad)$/;
21302
21291
  var unitToDegrees = {
@@ -21326,7 +21315,7 @@ var TimelineRotationField = ({
21326
21315
  onDragValueChange,
21327
21316
  onDragEnd
21328
21317
  }) => {
21329
- const [dragValue, setDragValue] = useState73(null);
21318
+ const [dragValue, setDragValue] = useState72(null);
21330
21319
  const degrees = useMemo110(() => parseCssRotationToDegrees(String(effectiveValue ?? "0deg")), [effectiveValue]);
21331
21320
  const onValueChange = useCallback104((newVal) => {
21332
21321
  setDragValue(newVal);
@@ -21384,7 +21373,7 @@ var TimelineRotationField = ({
21384
21373
  };
21385
21374
 
21386
21375
  // src/components/Timeline/TimelineTranslateField.tsx
21387
- import { useCallback as useCallback105, useMemo as useMemo111, useState as useState74 } from "react";
21376
+ import { useCallback as useCallback105, useMemo as useMemo111, useState as useState73 } from "react";
21388
21377
  import { jsx as jsx198, jsxs as jsxs94 } from "react/jsx-runtime";
21389
21378
  var leftDraggerStyle = {
21390
21379
  paddingLeft: 0
@@ -21413,8 +21402,8 @@ var TimelineTranslateField = ({
21413
21402
  onDragValueChange,
21414
21403
  onDragEnd
21415
21404
  }) => {
21416
- const [dragX, setDragX] = useState74(null);
21417
- const [dragY, setDragY] = useState74(null);
21405
+ const [dragX, setDragX] = useState73(null);
21406
+ const [dragY, setDragY] = useState73(null);
21418
21407
  const [codeX, codeY] = useMemo111(() => parseTranslate(String(effectiveValue ?? "0px 0px")), [effectiveValue]);
21419
21408
  const makeString = useCallback105((x, y) => `${x}px ${y}px`, []);
21420
21409
  const step = field.fieldSchema.type === "translate" ? field.fieldSchema.step ?? 1 : 1;
@@ -21688,7 +21677,7 @@ var TimelineFieldRow = ({
21688
21677
  clearDragOverrides,
21689
21678
  dragOverrides,
21690
21679
  codeValues: allPropStatuses
21691
- } = useContext71(Internals48.VisualModeOverridesContext);
21680
+ } = useContext70(Internals48.VisualModeOverridesContext);
21692
21681
  const propStatuses = allPropStatuses[overrideId] ?? null;
21693
21682
  const propStatus = propStatuses?.[field.key] ?? null;
21694
21683
  const dragOverrideValue = useMemo112(() => {
@@ -21701,7 +21690,7 @@ var TimelineFieldRow = ({
21701
21690
  defaultValue: field.fieldSchema.default,
21702
21691
  shouldResortToDefaultValueIfUndefined: true
21703
21692
  });
21704
- const { setCodeValues } = useContext71(Internals48.VisualModeOverridesContext);
21693
+ const { setCodeValues } = useContext70(Internals48.VisualModeOverridesContext);
21705
21694
  const onSave = useCallback106((key4, value) => {
21706
21695
  if (!propStatuses || !validatedLocation || !nodePath) {
21707
21696
  return Promise.reject(new Error("Cannot save"));
@@ -21915,7 +21904,7 @@ var TimelineLayerEye = ({ onInvoked, hidden, type }) => {
21915
21904
 
21916
21905
  // src/components/Timeline/TimelineStack/index.tsx
21917
21906
  import { SOURCE_MAP_ENDPOINT } from "@remotion/studio-shared";
21918
- import { useCallback as useCallback108, useContext as useContext72, useMemo as useMemo114, useState as useState75 } from "react";
21907
+ import { useCallback as useCallback108, useContext as useContext71, useMemo as useMemo114, useState as useState74 } from "react";
21919
21908
  import { SourceMapConsumer as SourceMapConsumer3 } from "source-map";
21920
21909
  import { jsx as jsx203, jsxs as jsxs97, Fragment as Fragment30 } from "react/jsx-runtime";
21921
21910
  var publicPath = window.remotion_publicPath === "/" ? "" : window.remotion_publicPath;
@@ -21924,11 +21913,11 @@ SourceMapConsumer3.initialize({
21924
21913
  "lib/mappings.wasm": withoutSlashInTheEnd + SOURCE_MAP_ENDPOINT
21925
21914
  });
21926
21915
  var TimelineStack = ({ isCompact, sequence, originalLocation }) => {
21927
- const [stackHovered, setStackHovered] = useState75(false);
21928
- const [titleHovered, setTitleHovered] = useState75(false);
21929
- const [opening, setOpening] = useState75(false);
21916
+ const [stackHovered, setStackHovered] = useState74(false);
21917
+ const [titleHovered, setTitleHovered] = useState74(false);
21918
+ const [opening, setOpening] = useState74(false);
21930
21919
  const selectAsset = useSelectAsset();
21931
- const connectionStatus = useContext72(StudioServerConnectionCtx).previewServerState.type;
21920
+ const connectionStatus = useContext71(StudioServerConnectionCtx).previewServerState.type;
21932
21921
  const assetPath = useMemo114(() => {
21933
21922
  if (sequence.type !== "video" && sequence.type !== "audio" && sequence.type !== "image") {
21934
21923
  return null;
@@ -22079,15 +22068,15 @@ var TimelineStack = ({ isCompact, sequence, originalLocation }) => {
22079
22068
  // src/components/Timeline/use-sequence-props-subscription.ts
22080
22069
  import {
22081
22070
  useCallback as useCallback109,
22082
- useContext as useContext73,
22071
+ useContext as useContext72,
22083
22072
  useEffect as useEffect66,
22084
22073
  useMemo as useMemo115,
22085
22074
  useRef as useRef38,
22086
- useState as useState76
22075
+ useState as useState75
22087
22076
  } from "react";
22088
22077
  import { Internals as Internals49 } from "remotion";
22089
22078
  var useSequencePropsSubscription = (sequence, originalLocation, visualModeEnabled) => {
22090
- const { setCodeValues } = useContext73(Internals49.VisualModeOverridesContext);
22079
+ const { setCodeValues } = useContext72(Internals49.VisualModeOverridesContext);
22091
22080
  const overrideId = sequence.controls?.overrideId ?? null;
22092
22081
  const setPropStatusesForSequence = useCallback109((statuses) => {
22093
22082
  if (!overrideId) {
@@ -22095,7 +22084,7 @@ var useSequencePropsSubscription = (sequence, originalLocation, visualModeEnable
22095
22084
  }
22096
22085
  setCodeValues(overrideId, statuses);
22097
22086
  }, [overrideId, setCodeValues]);
22098
- const { previewServerState: state, subscribeToEvent } = useContext73(StudioServerConnectionCtx);
22087
+ const { previewServerState: state, subscribeToEvent } = useContext72(StudioServerConnectionCtx);
22099
22088
  const clientId = state.type === "connected" ? state.clientId : undefined;
22100
22089
  const schemaFields = useMemo115(() => getSchemaFields(sequence.controls), [sequence.controls]);
22101
22090
  const schemaKeysString = useMemo115(() => schemaFields ? schemaFields.map((f) => f.key).join(",") : null, [schemaFields]);
@@ -22119,8 +22108,8 @@ var useSequencePropsSubscription = (sequence, originalLocation, visualModeEnable
22119
22108
  const currentLocationColumn = useRef38(locationColumn);
22120
22109
  currentLocationColumn.current = locationColumn;
22121
22110
  const nodePathRef = useRef38(null);
22122
- const [nodePath, setNodePath] = useState76(null);
22123
- const [jsxInMapCallback, setJsxInMapCallback] = useState76(false);
22111
+ const [nodePath, setNodePath] = useState75(null);
22112
+ const [jsxInMapCallback, setJsxInMapCallback] = useState75(false);
22124
22113
  const isMountedRef = useRef38(true);
22125
22114
  const setNodePathBoth = useCallback109((next) => {
22126
22115
  nodePathRef.current = next;
@@ -22261,12 +22250,12 @@ var arrowButton = {
22261
22250
  lineHeight: 1
22262
22251
  };
22263
22252
  var TimelineListItem = ({ nestedDepth, sequence, isCompact }) => {
22264
- const { previewServerState } = useContext74(StudioServerConnectionCtx);
22253
+ const { previewServerState } = useContext73(StudioServerConnectionCtx);
22265
22254
  const visualModeEnvEnabled = Boolean(process.env.EXPERIMENTAL_VISUAL_MODE_ENABLED);
22266
22255
  const previewConnected = previewServerState.type === "connected";
22267
22256
  const visualModeActive = visualModeEnvEnabled && previewConnected;
22268
- const { hidden, setHidden } = useContext74(Internals50.SequenceVisibilityToggleContext);
22269
- const { expandedTracks, toggleTrack } = useContext74(ExpandedTracksContext);
22257
+ const { hidden, setHidden } = useContext73(Internals50.SequenceVisibilityToggleContext);
22258
+ const { expandedTracks, toggleTrack } = useContext73(ExpandedTracksContext);
22270
22259
  const originalLocation = useResolvedStack(sequence.stack ?? null);
22271
22260
  const { nodePath, jsxInMapCallback } = useSequencePropsSubscription(sequence, originalLocation, visualModeActive);
22272
22261
  const validatedLocation = useMemo116(() => {
@@ -22469,7 +22458,7 @@ var TimelineListItem = ({ nestedDepth, sequence, isCompact }) => {
22469
22458
  };
22470
22459
 
22471
22460
  // src/components/Timeline/TimelineTimeIndicators.tsx
22472
- import { useContext as useContext75, useEffect as useEffect68, useMemo as useMemo117, useRef as useRef40 } from "react";
22461
+ import { useContext as useContext74, useEffect as useEffect68, useMemo as useMemo117, useRef as useRef40 } from "react";
22473
22462
  import { Internals as Internals52 } from "remotion";
22474
22463
 
22475
22464
  // src/components/TimeValue.tsx
@@ -22624,7 +22613,7 @@ var TimelineTimePadding = () => {
22624
22613
  });
22625
22614
  };
22626
22615
  var TimelineTimeIndicators = () => {
22627
- const sliderTrack = useContext75(TimelineWidthContext);
22616
+ const sliderTrack = useContext74(TimelineWidthContext);
22628
22617
  const video = Internals52.useVideo();
22629
22618
  if (sliderTrack === null) {
22630
22619
  return null;
@@ -22747,15 +22736,15 @@ var TimelineList = ({ timeline }) => {
22747
22736
  };
22748
22737
 
22749
22738
  // src/components/Timeline/TimelinePinchZoom.tsx
22750
- import { useCallback as useCallback112, useContext as useContext76, useEffect as useEffect69, useRef as useRef42 } from "react";
22739
+ import { useCallback as useCallback112, useContext as useContext75, useEffect as useEffect69, useRef as useRef42 } from "react";
22751
22740
  import { Internals as Internals53 } from "remotion";
22752
22741
  var ZOOM_WHEEL_DELTA = 0.06;
22753
22742
  var TimelinePinchZoom = () => {
22754
22743
  const isVideoComposition = useIsVideoComposition();
22755
22744
  const videoConfig = Internals53.useUnsafeVideoConfig();
22756
- const { canvasContent } = useContext76(Internals53.CompositionManager);
22757
- const { zoom, setZoom } = useContext76(TimelineZoomCtx);
22758
- const { editorZoomGestures } = useContext76(EditorZoomGesturesContext);
22745
+ const { canvasContent } = useContext75(Internals53.CompositionManager);
22746
+ const { zoom, setZoom } = useContext75(TimelineZoomCtx);
22747
+ const { editorZoomGestures } = useContext75(EditorZoomGesturesContext);
22759
22748
  const zoomRef = useRef42(zoom);
22760
22749
  zoomRef.current = zoom;
22761
22750
  const pinchBaseZoomRef = useRef42(null);
@@ -22964,15 +22953,15 @@ var TimelinePinchZoom = () => {
22964
22953
  };
22965
22954
 
22966
22955
  // src/components/Timeline/TimelinePlayCursorSyncer.tsx
22967
- import { useContext as useContext77, useEffect as useEffect70 } from "react";
22956
+ import { useContext as useContext76, useEffect as useEffect70 } from "react";
22968
22957
  import { Internals as Internals54 } from "remotion";
22969
22958
  var lastTimelinePositionWhileScrolling = null;
22970
22959
  var TimelinePlayCursorSyncer = () => {
22971
22960
  const video = Internals54.useVideo();
22972
22961
  const timelineContext = Internals54.useTimelineContext();
22973
22962
  const timelinePosition = Internals54.Timeline.useTimelinePosition();
22974
- const { canvasContent } = useContext77(Internals54.CompositionManager);
22975
- const { zoom: zoomMap } = useContext77(TimelineZoomCtx);
22963
+ const { canvasContent } = useContext76(Internals54.CompositionManager);
22964
+ const { zoom: zoomMap } = useContext76(TimelineZoomCtx);
22976
22965
  const compositionId = canvasContent && canvasContent.type === "composition" ? canvasContent.compositionId : null;
22977
22966
  const zoom = compositionId ? zoomMap[compositionId] ?? TIMELINE_MIN_ZOOM : null;
22978
22967
  if (zoom && video) {
@@ -23058,10 +23047,10 @@ var TimelineScrollable = ({ children }) => {
23058
23047
  };
23059
23048
 
23060
23049
  // src/components/Timeline/TimelineTracks.tsx
23061
- import { useContext as useContext79, useMemo as useMemo122 } from "react";
23050
+ import { useContext as useContext78, useMemo as useMemo122 } from "react";
23062
23051
 
23063
23052
  // src/components/Timeline/TimelineSequence.tsx
23064
- import { useContext as useContext78, useMemo as useMemo121 } from "react";
23053
+ import { useContext as useContext77, useMemo as useMemo121 } from "react";
23065
23054
  import { Internals as Internals56, useCurrentFrame as useCurrentFrame2 } from "remotion";
23066
23055
 
23067
23056
  // src/helpers/get-timeline-sequence-layout.ts
@@ -23133,7 +23122,7 @@ var getTimelineSequenceLayout = ({
23133
23122
  // src/helpers/use-max-media-duration.ts
23134
23123
  import { getVideoMetadata as getVideoMetadata2 } from "@remotion/media-utils";
23135
23124
  import { ALL_FORMATS as ALL_FORMATS2, Input as Input2, InputDisposedError, UrlSource as UrlSource2 } from "mediabunny";
23136
- import { useEffect as useEffect71, useState as useState77 } from "react";
23125
+ import { useEffect as useEffect71, useState as useState76 } from "react";
23137
23126
  var cache = new Map;
23138
23127
  var getSrc = (s) => {
23139
23128
  if (s.type === "video") {
@@ -23146,7 +23135,7 @@ var getSrc = (s) => {
23146
23135
  };
23147
23136
  var useMaxMediaDuration = (s, fps) => {
23148
23137
  const src = getSrc(s);
23149
- const [maxMediaDuration, setMaxMediaDuration] = useState77(src ? cache.get(src) ?? null : Infinity);
23138
+ const [maxMediaDuration, setMaxMediaDuration] = useState76(src ? cache.get(src) ?? null : Infinity);
23150
23139
  useEffect71(() => {
23151
23140
  if (!src) {
23152
23141
  return;
@@ -23179,7 +23168,7 @@ var useMaxMediaDuration = (s, fps) => {
23179
23168
  };
23180
23169
 
23181
23170
  // src/components/AudioWaveform.tsx
23182
- import { useEffect as useEffect72, useMemo as useMemo119, useRef as useRef43, useState as useState78 } from "react";
23171
+ import { useEffect as useEffect72, useMemo as useMemo119, useRef as useRef43, useState as useState77 } from "react";
23183
23172
  import { Internals as Internals55 } from "remotion";
23184
23173
 
23185
23174
  // src/components/parse-color.ts
@@ -23275,7 +23264,7 @@ async function loadWaveformPeaks(url, signal) {
23275
23264
  const { sampleRate } = audioTrack;
23276
23265
  const durationInSeconds = await audioTrack.computeDuration();
23277
23266
  const totalPeaks = Math.ceil(durationInSeconds * TARGET_SAMPLE_RATE);
23278
- const samplesPerPeak = Math.floor(sampleRate / TARGET_SAMPLE_RATE);
23267
+ const samplesPerPeak = Math.max(1, Math.floor(sampleRate / TARGET_SAMPLE_RATE));
23279
23268
  const peaks = new Float32Array(totalPeaks);
23280
23269
  let peakIndex = 0;
23281
23270
  let peakMax = 0;
@@ -23292,11 +23281,21 @@ async function loadWaveformPeaks(url, signal) {
23292
23281
  });
23293
23282
  const floats = new Float32Array(bytesNeeded / 4);
23294
23283
  sample.copyTo(floats, { format: "f32", planeIndex: 0 });
23284
+ const channels = Math.max(1, sample.numberOfChannels);
23285
+ const frames = sample.numberOfFrames;
23295
23286
  sample.close();
23296
- for (let i = 0;i < floats.length; i++) {
23297
- const abs = Math.abs(floats[i]);
23298
- if (abs > peakMax)
23299
- peakMax = abs;
23287
+ for (let frame2 = 0;frame2 < frames; frame2++) {
23288
+ let framePeak = 0;
23289
+ for (let channel = 0;channel < channels; channel++) {
23290
+ const sampleIndex = frame2 * channels + channel;
23291
+ const abs = Math.abs(floats[sampleIndex] ?? 0);
23292
+ if (abs > framePeak) {
23293
+ framePeak = abs;
23294
+ }
23295
+ }
23296
+ if (framePeak > peakMax) {
23297
+ peakMax = framePeak;
23298
+ }
23300
23299
  sampleInPeak++;
23301
23300
  if (sampleInPeak >= samplesPerPeak) {
23302
23301
  if (peakIndex < totalPeaks) {
@@ -23352,8 +23351,8 @@ var AudioWaveform = ({
23352
23351
  doesVolumeChange,
23353
23352
  playbackRate
23354
23353
  }) => {
23355
- const [peaks, setPeaks] = useState78(null);
23356
- const [error, setError] = useState78(null);
23354
+ const [peaks, setPeaks] = useState77(null);
23355
+ const [error, setError] = useState77(null);
23357
23356
  const vidConf = Internals55.useUnsafeVideoConfig();
23358
23357
  if (vidConf === null) {
23359
23358
  throw new Error("Expected video config");
@@ -23633,7 +23632,7 @@ var TimelineSequenceFrame = ({ roundedFrame, premounted, postmounted }) => {
23633
23632
  };
23634
23633
 
23635
23634
  // src/components/Timeline/TimelineVideoInfo.tsx
23636
- import { useEffect as useEffect74, useMemo as useMemo120, useRef as useRef45, useState as useState79 } from "react";
23635
+ import { useEffect as useEffect74, useMemo as useMemo120, useRef as useRef45, useState as useState78 } from "react";
23637
23636
  import { useVideoConfig as useVideoConfig5 } from "remotion";
23638
23637
 
23639
23638
  // src/helpers/extract-frames.ts
@@ -23995,7 +23994,7 @@ var TimelineVideoInfo = ({
23995
23994
  }) => {
23996
23995
  const { fps } = useVideoConfig5();
23997
23996
  const ref2 = useRef45(null);
23998
- const [error, setError] = useState79(null);
23997
+ const [error, setError] = useState78(null);
23999
23998
  const aspectRatio = useRef45(getAspectRatioFromCache(src));
24000
23999
  useEffect74(() => {
24001
24000
  if (error) {
@@ -24166,7 +24165,7 @@ var AUDIO_GRADIENT = "linear-gradient(rgb(16 171 58), rgb(43 165 63) 60%)";
24166
24165
  var VIDEO_GRADIENT = "linear-gradient(to top, #8e44ad, #9b59b6)";
24167
24166
  var IMAGE_GRADIENT = "linear-gradient(to top, #2980b9, #3498db)";
24168
24167
  var TimelineSequence = ({ s }) => {
24169
- const windowWidth = useContext78(TimelineWidthContext);
24168
+ const windowWidth = useContext77(TimelineWidthContext);
24170
24169
  if (windowWidth === null) {
24171
24170
  return null;
24172
24171
  }
@@ -24310,8 +24309,8 @@ var getExpandedPlaceholderStyle = (controls) => ({
24310
24309
  height: getExpandedTrackHeight(controls) + TIMELINE_ITEM_BORDER_BOTTOM
24311
24310
  });
24312
24311
  var TimelineTracks = ({ timeline, hasBeenCut }) => {
24313
- const { expandedTracks } = useContext79(ExpandedTracksContext);
24314
- const { previewServerState } = useContext79(StudioServerConnectionCtx);
24312
+ const { expandedTracks } = useContext78(ExpandedTracksContext);
24313
+ const { previewServerState } = useContext78(StudioServerConnectionCtx);
24315
24314
  const visualModeEnabled = Boolean(process.env.EXPERIMENTAL_VISUAL_MODE_ENABLED) && previewServerState.type === "connected";
24316
24315
  const timelineStyle = useMemo122(() => {
24317
24316
  return {
@@ -24369,9 +24368,9 @@ var noop3 = () => {
24369
24368
  return;
24370
24369
  };
24371
24370
  var TimelineInner = () => {
24372
- const { sequences } = useContext80(Internals57.SequenceManager);
24373
- const { expandedTracks } = useContext80(ExpandedTracksContext);
24374
- const { previewServerState } = useContext80(StudioServerConnectionCtx);
24371
+ const { sequences } = useContext79(Internals57.SequenceManager);
24372
+ const { expandedTracks } = useContext79(ExpandedTracksContext);
24373
+ const { previewServerState } = useContext79(StudioServerConnectionCtx);
24375
24374
  const visualModeEnabled = Boolean(process.env.EXPERIMENTAL_VISUAL_MODE_ENABLED) && previewServerState.type === "connected";
24376
24375
  const videoConfig = Internals57.useUnsafeVideoConfig();
24377
24376
  const videoConfigIsNull = videoConfig === null;
@@ -24485,7 +24484,7 @@ var container45 = {
24485
24484
  };
24486
24485
  var EditorContent = ({ readOnlyStudio, children }) => {
24487
24486
  const isStill = useIsStill();
24488
- const { canvasContent } = useContext81(Internals58.CompositionManager);
24487
+ const { canvasContent } = useContext80(Internals58.CompositionManager);
24489
24488
  const showTimeline = canvasContent !== null && !isStill && canvasContent.type === "composition";
24490
24489
  return /* @__PURE__ */ jsxs108("div", {
24491
24490
  style: container45,
@@ -24522,11 +24521,11 @@ var EditorContent = ({ readOnlyStudio, children }) => {
24522
24521
  };
24523
24522
 
24524
24523
  // src/components/GlobalKeybindings.tsx
24525
- import { useContext as useContext82, useEffect as useEffect75 } from "react";
24524
+ import { useContext as useContext81, useEffect as useEffect75 } from "react";
24526
24525
  var GlobalKeybindings = () => {
24527
24526
  const keybindings = useKeybinding();
24528
- const { setSelectedModal } = useContext82(ModalsContext);
24529
- const { setCheckerboard } = useContext82(CheckerboardContext);
24527
+ const { setSelectedModal } = useContext81(ModalsContext);
24528
+ const { setCheckerboard } = useContext81(CheckerboardContext);
24530
24529
  const { navigateToNextComposition, navigateToPreviousComposition } = useCompositionNavigation();
24531
24530
  useEffect75(() => {
24532
24531
  const nKey = keybindings.registerKeybinding({
@@ -24630,7 +24629,7 @@ var GlobalKeybindings = () => {
24630
24629
  };
24631
24630
 
24632
24631
  // src/components/Modals.tsx
24633
- import { useContext as useContext96 } from "react";
24632
+ import { useContext as useContext95 } from "react";
24634
24633
 
24635
24634
  // src/components/InstallPackage.tsx
24636
24635
  import {
@@ -24639,7 +24638,7 @@ import {
24639
24638
  extraPackages,
24640
24639
  installableMap
24641
24640
  } from "@remotion/studio-shared";
24642
- import React154, { useCallback as useCallback114, useContext as useContext84, useEffect as useEffect76 } from "react";
24641
+ import React154, { useCallback as useCallback114, useContext as useContext83, useEffect as useEffect76 } from "react";
24643
24642
  import { VERSION as VERSION2 } from "remotion";
24644
24643
 
24645
24644
  // src/api/install-package.ts
@@ -24727,10 +24726,10 @@ var ModalFooterContainer = ({ children }) => {
24727
24726
  };
24728
24727
 
24729
24728
  // src/components/NewComposition/DismissableModal.tsx
24730
- import { useCallback as useCallback113, useContext as useContext83 } from "react";
24729
+ import { useCallback as useCallback113, useContext as useContext82 } from "react";
24731
24730
  import { jsx as jsx223 } from "react/jsx-runtime";
24732
24731
  var DismissableModal = ({ children }) => {
24733
- const { setSelectedModal } = useContext83(ModalsContext);
24732
+ const { setSelectedModal } = useContext82(ModalsContext);
24734
24733
  const onQuit = useCallback113(() => {
24735
24734
  setSelectedModal(null);
24736
24735
  }, [setSelectedModal]);
@@ -24754,7 +24753,7 @@ var text2 = {
24754
24753
  var InstallPackageModal = ({ packageManager }) => {
24755
24754
  const [state, setState] = React154.useState({ type: "idle" });
24756
24755
  const [map, setMap] = React154.useState({});
24757
- const { previewServerState: ctx } = useContext84(StudioServerConnectionCtx);
24756
+ const { previewServerState: ctx } = useContext83(StudioServerConnectionCtx);
24758
24757
  const selectedPackages = Object.keys(map).filter((pkg) => map[pkg]);
24759
24758
  const onClick = useCallback114(async () => {
24760
24759
  if (state.type === "done") {
@@ -24924,10 +24923,10 @@ var InstallPackageModal = ({ packageManager }) => {
24924
24923
  };
24925
24924
 
24926
24925
  // src/components/NewComposition/DeleteComposition.tsx
24927
- import { useCallback as useCallback116, useContext as useContext87, useMemo as useMemo126 } from "react";
24926
+ import { useCallback as useCallback116, useContext as useContext86, useMemo as useMemo126 } from "react";
24928
24927
 
24929
24928
  // src/components/RenderModal/ResolveCompositionBeforeModal.tsx
24930
- import React155, { useContext as useContext85, useEffect as useEffect77, useMemo as useMemo125 } from "react";
24929
+ import React155, { useContext as useContext84, useEffect as useEffect77, useMemo as useMemo125 } from "react";
24931
24930
  import { Internals as Internals59 } from "remotion";
24932
24931
  import { jsx as jsx225, jsxs as jsxs111 } from "react/jsx-runtime";
24933
24932
  var loaderContainer2 = {
@@ -24949,7 +24948,7 @@ var loaderLabel2 = {
24949
24948
  var ResolvedCompositionContext = React155.createContext(null);
24950
24949
  var ResolveCompositionBeforeModal = ({ compositionId, children }) => {
24951
24950
  const resolved = Internals59.useResolvedVideoConfig(compositionId);
24952
- const unresolvedContext = useContext85(Internals59.CompositionManager);
24951
+ const unresolvedContext = useContext84(Internals59.CompositionManager);
24953
24952
  const unresolved = unresolvedContext.compositions.find((c) => compositionId === c.id);
24954
24953
  useEffect77(() => {
24955
24954
  const { current } = Internals59.resolveCompositionsRef;
@@ -25009,7 +25008,7 @@ var ResolveCompositionBeforeModal = ({ compositionId, children }) => {
25009
25008
  };
25010
25009
 
25011
25010
  // src/components/NewComposition/CodemodFooter.tsx
25012
- import { useCallback as useCallback115, useContext as useContext86, useEffect as useEffect78, useState as useState80 } from "react";
25011
+ import { useCallback as useCallback115, useContext as useContext85, useEffect as useEffect78, useState as useState79 } from "react";
25013
25012
 
25014
25013
  // src/components/NewComposition/DiffPreview.tsx
25015
25014
  import { jsx as jsx226, jsxs as jsxs112 } from "react/jsx-runtime";
@@ -25069,12 +25068,12 @@ var CodemodFooter = ({
25069
25068
  submitLabel,
25070
25069
  onSuccess
25071
25070
  }) => {
25072
- const [submitting, setSubmitting] = useState80(false);
25073
- const { setSelectedModal } = useContext86(ModalsContext);
25074
- const [codemodStatus, setCanApplyCodemod] = useState80({
25071
+ const [submitting, setSubmitting] = useState79(false);
25072
+ const { setSelectedModal } = useContext85(ModalsContext);
25073
+ const [codemodStatus, setCanApplyCodemod] = useState79({
25075
25074
  type: "loading"
25076
25075
  });
25077
- const [projectInfo, setProjectInfo] = useState80(null);
25076
+ const [projectInfo, setProjectInfo] = useState79(null);
25078
25077
  useEffect78(() => {
25079
25078
  const controller = new AbortController;
25080
25079
  getProjectInfo(controller.signal).then((info) => {
@@ -25195,7 +25194,7 @@ var content3 = {
25195
25194
  minWidth: 500
25196
25195
  };
25197
25196
  var DeleteCompositionLoaded = ({ compositionId }) => {
25198
- const context = useContext87(ResolvedCompositionContext);
25197
+ const context = useContext86(ResolvedCompositionContext);
25199
25198
  if (!context) {
25200
25199
  throw new Error("Resolved composition context");
25201
25200
  }
@@ -25270,7 +25269,7 @@ var DeleteComposition = ({ compositionId }) => {
25270
25269
  };
25271
25270
 
25272
25271
  // src/components/NewComposition/DuplicateComposition.tsx
25273
- import { useCallback as useCallback118, useContext as useContext88, useMemo as useMemo127, useState as useState81 } from "react";
25272
+ import { useCallback as useCallback118, useContext as useContext87, useMemo as useMemo127, useState as useState80 } from "react";
25274
25273
  import { Internals as Internals61 } from "remotion";
25275
25274
 
25276
25275
  // src/helpers/validate-new-comp-data.ts
@@ -25376,19 +25375,19 @@ var comboBoxStyle = {
25376
25375
  width: 190
25377
25376
  };
25378
25377
  var DuplicateCompositionLoaded = ({ initialType }) => {
25379
- const context = useContext88(ResolvedCompositionContext);
25378
+ const context = useContext87(ResolvedCompositionContext);
25380
25379
  if (!context) {
25381
25380
  throw new Error("Resolved composition context");
25382
25381
  }
25383
25382
  const { resolved, unresolved } = context;
25384
- const [initialCompType] = useState81(initialType);
25383
+ const [initialCompType] = useState80(initialType);
25385
25384
  const hadDimensionsDefined = unresolved.width && unresolved.height;
25386
25385
  const hadFpsDefined = unresolved.fps !== undefined;
25387
25386
  const hadDurationDefined = unresolved.durationInFrames !== undefined;
25388
- const [selectedFrameRate, setFrameRate] = useState81(resolved.result.fps);
25389
- const { compositions } = useContext88(Internals61.CompositionManager);
25390
- const [type, setType] = useState81(initialCompType);
25391
- const [newId, setName] = useState81(() => {
25387
+ const [selectedFrameRate, setFrameRate] = useState80(resolved.result.fps);
25388
+ const { compositions } = useContext87(Internals61.CompositionManager);
25389
+ const [type, setType] = useState80(initialCompType);
25390
+ const [newId, setName] = useState80(() => {
25392
25391
  const numberAtEnd = resolved.result.id.match(/([0-9]+)$/)?.[0];
25393
25392
  let prefix = numberAtEnd ? Number(numberAtEnd) : 1;
25394
25393
  const initialName = resolved.result.id.replace(/([0-9]+)$/, "");
@@ -25403,11 +25402,11 @@ var DuplicateCompositionLoaded = ({ initialType }) => {
25403
25402
  }
25404
25403
  return currentName;
25405
25404
  });
25406
- const [size4, setSize] = useState81(() => ({
25405
+ const [size4, setSize] = useState80(() => ({
25407
25406
  width: resolved.result.width,
25408
25407
  height: resolved.result.height
25409
25408
  }));
25410
- const [durationInFrames, setDurationInFrames] = useState81(resolved.result.durationInFrames);
25409
+ const [durationInFrames, setDurationInFrames] = useState80(resolved.result.durationInFrames);
25411
25410
  const onTypeChanged = useCallback118((newType) => {
25412
25411
  setType(newType);
25413
25412
  }, []);
@@ -25733,7 +25732,7 @@ var DuplicateComposition = ({ compositionId, compositionType }) => {
25733
25732
  };
25734
25733
 
25735
25734
  // src/components/NewComposition/RenameComposition.tsx
25736
- import { useCallback as useCallback119, useContext as useContext89, useMemo as useMemo128, useState as useState82 } from "react";
25735
+ import { useCallback as useCallback119, useContext as useContext88, useMemo as useMemo128, useState as useState81 } from "react";
25737
25736
  import { Internals as Internals62 } from "remotion";
25738
25737
  import { jsx as jsx231, jsxs as jsxs117, Fragment as Fragment35 } from "react/jsx-runtime";
25739
25738
  var content5 = {
@@ -25744,13 +25743,13 @@ var content5 = {
25744
25743
  minWidth: 500
25745
25744
  };
25746
25745
  var RenameCompositionLoaded = () => {
25747
- const context = useContext89(ResolvedCompositionContext);
25746
+ const context = useContext88(ResolvedCompositionContext);
25748
25747
  if (!context) {
25749
25748
  throw new Error("Resolved composition context");
25750
25749
  }
25751
25750
  const { resolved } = context;
25752
- const { compositions } = useContext89(Internals62.CompositionManager);
25753
- const [newId, setName] = useState82(() => {
25751
+ const { compositions } = useContext88(Internals62.CompositionManager);
25752
+ const [newId, setName] = useState81(() => {
25754
25753
  return resolved.result.id;
25755
25754
  });
25756
25755
  const onNameChange = useCallback119((e) => {
@@ -25844,7 +25843,7 @@ var RenameComposition = ({ compositionId }) => {
25844
25843
  };
25845
25844
 
25846
25845
  // src/components/OverrideInputProps.tsx
25847
- import { useCallback as useCallback120, useContext as useContext90, useMemo as useMemo129, useState as useState83 } from "react";
25846
+ import { useCallback as useCallback120, useContext as useContext89, useMemo as useMemo129, useState as useState82 } from "react";
25848
25847
  import { Internals as Internals63 } from "remotion";
25849
25848
  import { jsx as jsx232, jsxs as jsxs118 } from "react/jsx-runtime";
25850
25849
  var style11 = {
@@ -25880,14 +25879,14 @@ var isValidJSON = (value) => {
25880
25879
  }
25881
25880
  };
25882
25881
  var Inner5 = () => {
25883
- const [value, setValue] = useState83(() => {
25882
+ const [value, setValue] = useState82(() => {
25884
25883
  const override = Internals63.getInputPropsOverride();
25885
25884
  if (override) {
25886
25885
  return JSON.stringify(override, null, 2);
25887
25886
  }
25888
25887
  return null;
25889
25888
  });
25890
- const { setSelectedModal } = useContext90(ModalsContext);
25889
+ const { setSelectedModal } = useContext89(ModalsContext);
25891
25890
  const valid = useMemo129(() => {
25892
25891
  if (!value)
25893
25892
  return true;
@@ -25968,11 +25967,11 @@ var OverrideInputPropsModal = () => {
25968
25967
  // src/components/QuickSwitcher/QuickSwitcherContent.tsx
25969
25968
  import {
25970
25969
  useCallback as useCallback121,
25971
- useContext as useContext91,
25970
+ useContext as useContext90,
25972
25971
  useEffect as useEffect80,
25973
25972
  useMemo as useMemo131,
25974
25973
  useRef as useRef47,
25975
- useState as useState85
25974
+ useState as useState84
25976
25975
  } from "react";
25977
25976
  import { Internals as Internals64 } from "remotion";
25978
25977
 
@@ -26869,7 +26868,7 @@ var QuickSwitcherNoResults = ({ query, mode }) => {
26869
26868
  };
26870
26869
 
26871
26870
  // src/components/QuickSwitcher/QuickSwitcherResult.tsx
26872
- import { useEffect as useEffect79, useMemo as useMemo130, useRef as useRef46, useState as useState84 } from "react";
26871
+ import { useEffect as useEffect79, useMemo as useMemo130, useRef as useRef46, useState as useState83 } from "react";
26873
26872
  import { jsx as jsx236, jsxs as jsxs121, Fragment as Fragment37 } from "react/jsx-runtime";
26874
26873
  var container49 = {
26875
26874
  paddingLeft: 16,
@@ -26898,7 +26897,7 @@ var labelContainer = {
26898
26897
  paddingBottom: 5
26899
26898
  };
26900
26899
  var QuickSwitcherResult = ({ result, selected }) => {
26901
- const [hovered, setIsHovered] = useState84(false);
26900
+ const [hovered, setIsHovered] = useState83(false);
26902
26901
  const ref2 = useRef46(null);
26903
26902
  const keybindings = useKeybinding();
26904
26903
  useEffect79(() => {
@@ -27064,8 +27063,8 @@ var mapModeToQuery = (mode) => {
27064
27063
  throw new Error("no mode" + mode);
27065
27064
  };
27066
27065
  var QuickSwitcherContent = ({ initialMode, invocationTimestamp, readOnlyStudio }) => {
27067
- const { compositions } = useContext91(Internals64.CompositionManager);
27068
- const [state, setState] = useState85(() => {
27066
+ const { compositions } = useContext90(Internals64.CompositionManager);
27067
+ const [state, setState] = useState84(() => {
27069
27068
  return {
27070
27069
  query: mapModeToQuery(initialMode),
27071
27070
  selectedIndex: 0
@@ -27083,8 +27082,8 @@ var QuickSwitcherContent = ({ initialMode, invocationTimestamp, readOnlyStudio }
27083
27082
  return;
27084
27083
  }, []);
27085
27084
  const actions = useMenuStructure(closeMenu, readOnlyStudio);
27086
- const [docResults, setDocResults] = useState85({ type: "initial" });
27087
- const { setSelectedModal } = useContext91(ModalsContext);
27085
+ const [docResults, setDocResults] = useState84({ type: "initial" });
27086
+ const { setSelectedModal } = useContext90(ModalsContext);
27088
27087
  const keybindings = useKeybinding();
27089
27088
  const mode = mapQueryToMode(state.query);
27090
27089
  const actualQuery = useMemo131(() => {
@@ -27349,7 +27348,7 @@ var QuickSwitcher = ({ initialMode, invocationTimestamp, readOnlyStudio }) => {
27349
27348
  var QuickSwitcher_default = QuickSwitcher;
27350
27349
 
27351
27350
  // src/components/RenderModal/RenderStatusModal.tsx
27352
- import { useCallback as useCallback123, useContext as useContext92 } from "react";
27351
+ import { useCallback as useCallback123, useContext as useContext91 } from "react";
27353
27352
 
27354
27353
  // src/components/RenderModal/ClientRenderProgress.tsx
27355
27354
  import { formatBytes as formatBytes3 } from "@remotion/studio-shared";
@@ -27739,8 +27738,8 @@ var buttonRow = {
27739
27738
  var RenderStatusModal = ({
27740
27739
  jobId
27741
27740
  }) => {
27742
- const { setSelectedModal } = useContext92(ModalsContext);
27743
- const { jobs, removeClientJob, cancelClientJob } = useContext92(RenderQueueContext);
27741
+ const { setSelectedModal } = useContext91(ModalsContext);
27742
+ const { jobs, removeClientJob, cancelClientJob } = useContext91(RenderQueueContext);
27744
27743
  const job = jobs.find((j) => j.id === jobId);
27745
27744
  if (!job) {
27746
27745
  throw new Error("job not found");
@@ -27849,12 +27848,12 @@ import { BrowserSafeApis as BrowserSafeApis11 } from "@remotion/renderer/client"
27849
27848
  import { getDefaultOutLocation } from "@remotion/studio-shared";
27850
27849
  import {
27851
27850
  useCallback as useCallback141,
27852
- useContext as useContext94,
27851
+ useContext as useContext93,
27853
27852
  useEffect as useEffect83,
27854
27853
  useMemo as useMemo143,
27855
27854
  useReducer as useReducer2,
27856
27855
  useRef as useRef49,
27857
- useState as useState91
27856
+ useState as useState90
27858
27857
  } from "react";
27859
27858
 
27860
27859
  // src/helpers/convert-env-variables.ts
@@ -28122,9 +28121,9 @@ var makeReadOnlyStudioRenderCommand = ({
28122
28121
  };
28123
28122
 
28124
28123
  // src/helpers/render-modal-sections.ts
28125
- import { useMemo as useMemo133, useState as useState86 } from "react";
28124
+ import { useMemo as useMemo133, useState as useState85 } from "react";
28126
28125
  var useRenderModalSections = (renderMode, codec) => {
28127
- const [selectedTab, setTab] = useState86("general");
28126
+ const [selectedTab, setTab] = useState85("general");
28128
28127
  const shownTabs = useMemo133(() => {
28129
28128
  if (renderMode === "audio") {
28130
28129
  return ["general", "data", "audio", "advanced"];
@@ -28217,7 +28216,7 @@ var GifIcon = (props) => /* @__PURE__ */ jsx247("svg", {
28217
28216
  });
28218
28217
 
28219
28218
  // src/components/Tabs/vertical.tsx
28220
- import { useCallback as useCallback124, useMemo as useMemo134, useState as useState87 } from "react";
28219
+ import { useCallback as useCallback124, useMemo as useMemo134, useState as useState86 } from "react";
28221
28220
  import { jsx as jsx248 } from "react/jsx-runtime";
28222
28221
  var selectorButton2 = {
28223
28222
  border: "none",
@@ -28233,7 +28232,7 @@ var selectorButton2 = {
28233
28232
  WebkitUserSelect: "none"
28234
28233
  };
28235
28234
  var VerticalTab = ({ children, onClick, style: style12, selected }) => {
28236
- const [hovered, setHovered] = useState87(false);
28235
+ const [hovered, setHovered] = useState86(false);
28237
28236
  const { tabIndex } = useZIndex();
28238
28237
  const onPointerEnter = useCallback124(() => {
28239
28238
  setHovered(true);
@@ -28263,7 +28262,7 @@ var VerticalTab = ({ children, onClick, style: style12, selected }) => {
28263
28262
 
28264
28263
  // src/components/RenderModal/CrfSetting.tsx
28265
28264
  import { BrowserSafeApis as BrowserSafeApis3 } from "@remotion/renderer/client";
28266
- import { useState as useState89 } from "react";
28265
+ import { useState as useState88 } from "react";
28267
28266
 
28268
28267
  // src/components/RenderModal/NumberSetting.tsx
28269
28268
  import { useCallback as useCallback126 } from "react";
@@ -28272,7 +28271,7 @@ import { useCallback as useCallback126 } from "react";
28272
28271
  import { BrowserSafeApis as BrowserSafeApis2 } from "@remotion/renderer/client";
28273
28272
 
28274
28273
  // src/components/RenderModal/CliCopyButton.tsx
28275
- import { useCallback as useCallback125, useEffect as useEffect81, useMemo as useMemo135, useState as useState88 } from "react";
28274
+ import { useCallback as useCallback125, useEffect as useEffect81, useMemo as useMemo135, useState as useState87 } from "react";
28276
28275
  import { jsx as jsx249 } from "react/jsx-runtime";
28277
28276
  var svgStyle = {
28278
28277
  width: 16,
@@ -28299,8 +28298,8 @@ var buttonStyle5 = {
28299
28298
  var CliCopyButton = ({
28300
28299
  valueToCopy
28301
28300
  }) => {
28302
- const [copied, setCopied] = useState88(false);
28303
- const [hovered, setHovered] = useState88(false);
28301
+ const [copied, setCopied] = useState87(false);
28302
+ const [hovered, setHovered] = useState87(false);
28304
28303
  const fillColor = useMemo135(() => {
28305
28304
  return hovered ? "white" : LIGHT_TEXT;
28306
28305
  }, [hovered]);
@@ -28588,7 +28587,7 @@ var getDefaultCrfState = () => {
28588
28587
  }, {});
28589
28588
  };
28590
28589
  var useCrfState = (codec) => {
28591
- const [state, setState] = useState89(() => getDefaultCrfState());
28590
+ const [state, setState] = useState88(() => getDefaultCrfState());
28592
28591
  const range = BrowserSafeApis3.getValidCrfRanges(codec);
28593
28592
  const setCrf = (updater) => {
28594
28593
  setState((q) => {
@@ -29860,10 +29859,10 @@ import { BrowserSafeApis as BrowserSafeApis7 } from "@remotion/renderer/client";
29860
29859
  import { useCallback as useCallback133, useMemo as useMemo137 } from "react";
29861
29860
 
29862
29861
  // src/helpers/use-file-existence.ts
29863
- import { useContext as useContext93, useEffect as useEffect82, useRef as useRef48, useState as useState90 } from "react";
29862
+ import { useContext as useContext92, useEffect as useEffect82, useRef as useRef48, useState as useState89 } from "react";
29864
29863
  var useFileExistence = (outName) => {
29865
- const [exists, setExists] = useState90(false);
29866
- const { previewServerState: state, subscribeToEvent } = useContext93(StudioServerConnectionCtx);
29864
+ const [exists, setExists] = useState89(false);
29865
+ const { previewServerState: state, subscribeToEvent } = useContext92(StudioServerConnectionCtx);
29867
29866
  const clientId = state.type === "connected" ? state.clientId : undefined;
29868
29867
  const currentOutName = useRef48("");
29869
29868
  currentOutName.current = outName;
@@ -31292,8 +31291,8 @@ var RenderModal = ({
31292
31291
  initialChromeMode,
31293
31292
  renderDefaults
31294
31293
  }) => {
31295
- const { setSelectedModal } = useContext94(ModalsContext);
31296
- const context = useContext94(ResolvedCompositionContext);
31294
+ const { setSelectedModal } = useContext93(ModalsContext);
31295
+ const context = useContext93(ResolvedCompositionContext);
31297
31296
  if (!context) {
31298
31297
  throw new Error("Should not be able to render without resolving comp first");
31299
31298
  }
@@ -31302,7 +31301,7 @@ var RenderModal = ({
31302
31301
  unresolved: unresolvedComposition
31303
31302
  } = context;
31304
31303
  const isMounted = useRef49(true);
31305
- const [isVideo] = useState91(() => {
31304
+ const [isVideo] = useState90(() => {
31306
31305
  return typeof resolvedComposition.durationInFrames === "undefined" ? true : resolvedComposition.durationInFrames > 1;
31307
31306
  });
31308
31307
  const [
@@ -31313,7 +31312,7 @@ var RenderModal = ({
31313
31312
  initialVideoCodecForAudioTab,
31314
31313
  initialVideoCodecForVideoTab
31315
31314
  }
31316
- ] = useState91(() => {
31315
+ ] = useState90(() => {
31317
31316
  return getDefaultCodecs({
31318
31317
  defaultConfigurationVideoCodec,
31319
31318
  compositionDefaultVideoCodec: resolvedComposition.defaultCodec,
@@ -31322,16 +31321,16 @@ var RenderModal = ({
31322
31321
  });
31323
31322
  });
31324
31323
  const [state, dispatch] = useReducer2(reducer2, initialState2);
31325
- const [unclampedFrame, setFrame] = useState91(() => initialFrame);
31326
- const [stillImageFormat, setStillImageFormat] = useState91(() => initialStillImageFormat);
31327
- const [videoImageFormat, setVideoImageFormat] = useState91(() => initialVideoImageFormat ?? resolvedComposition.defaultVideoImageFormat ?? renderDefaults.videoImageFormat);
31328
- const [sequenceImageFormat, setSequenceImageFormat] = useState91(() => initialStillImageFormat === "jpeg" ? "jpeg" : "png");
31329
- const [concurrency, setConcurrency] = useState91(() => initialConcurrency);
31330
- const [videoCodecForVideoTab, setVideoCodecForVideoTab] = useState91(() => initialVideoCodecForVideoTab);
31331
- const [userSelectedAudioCodec, setUserSelectedAudioCodec] = useState91(() => initialAudioCodec);
31332
- const [separateAudioTo, setSeparateAudioTo] = useState91(null);
31333
- const [envVariables, setEnvVariables] = useState91(() => envVariablesObjectToArray(initialEnvVariables).filter(([key5]) => key5 !== "NODE_ENV"));
31334
- const [initialOutName] = useState91(() => {
31324
+ const [unclampedFrame, setFrame] = useState90(() => initialFrame);
31325
+ const [stillImageFormat, setStillImageFormat] = useState90(() => initialStillImageFormat);
31326
+ const [videoImageFormat, setVideoImageFormat] = useState90(() => initialVideoImageFormat ?? resolvedComposition.defaultVideoImageFormat ?? renderDefaults.videoImageFormat);
31327
+ const [sequenceImageFormat, setSequenceImageFormat] = useState90(() => initialStillImageFormat === "jpeg" ? "jpeg" : "png");
31328
+ const [concurrency, setConcurrency] = useState90(() => initialConcurrency);
31329
+ const [videoCodecForVideoTab, setVideoCodecForVideoTab] = useState90(() => initialVideoCodecForVideoTab);
31330
+ const [userSelectedAudioCodec, setUserSelectedAudioCodec] = useState90(() => initialAudioCodec);
31331
+ const [separateAudioTo, setSeparateAudioTo] = useState90(null);
31332
+ const [envVariables, setEnvVariables] = useState90(() => envVariablesObjectToArray(initialEnvVariables).filter(([key5]) => key5 !== "NODE_ENV"));
31333
+ const [initialOutName] = useState90(() => {
31335
31334
  return getDefaultOutLocation({
31336
31335
  compositionName: resolvedComposition.id,
31337
31336
  defaultExtension: initialRenderType === "still" ? initialStillImageFormat : isVideo ? BrowserSafeApis11.getFileExtensionFromCodec(initialVideoCodec, initialAudioCodec) : initialStillImageFormat,
@@ -31340,26 +31339,26 @@ var RenderModal = ({
31340
31339
  outputLocation: renderDefaults.outputLocation
31341
31340
  });
31342
31341
  });
31343
- const [videoCodecForAudioTab, setVideoCodecForAudioTab] = useState91(() => initialVideoCodecForAudioTab);
31344
- const [mutedState, setMuted] = useState91(() => initialMuted);
31345
- const [repro, setRepro] = useState91(() => initialRepro);
31346
- const [enforceAudioTrackState, setEnforceAudioTrackState] = useState91(() => initialEnforceAudioTrack);
31347
- const [forSeamlessAacConcatenation, setForSeamlessAacConcatenation] = useState91(() => initialForSeamlessAacConcatenation);
31348
- const [sampleRate, setSampleRate] = useState91(() => initialSampleRate);
31349
- const [renderMode, setRenderModeState] = useState91(initialRenderType);
31350
- const [jpegQuality, setJpegQuality] = useState91(() => initialJpegQuality);
31351
- const [scale, setScale] = useState91(() => initialScale);
31352
- const [logLevel, setLogLevel] = useState91(() => initialLogLevel);
31353
- const [disallowParallelEncoding, setDisallowParallelEncoding] = useState91(false);
31354
- const [disableWebSecurity, setDisableWebSecurity] = useState91(() => initialDisableWebSecurity);
31355
- const [headless, setHeadless] = useState91(() => initialHeadless);
31356
- const [beepOnFinish, setBeepOnFinish] = useState91(() => initialBeep);
31357
- const [ignoreCertificateErrors, setIgnoreCertificateErrors] = useState91(() => initialIgnoreCertificateErrors);
31358
- const [multiProcessOnLinux, setChromiumMultiProcessOnLinux] = useState91(() => initialMultiProcessOnLinux);
31359
- const [darkMode, setDarkMode] = useState91(() => initialDarkMode);
31360
- const [openGlOption, setOpenGlOption] = useState91(() => initialGl ?? "default");
31361
- const [colorSpace, setColorSpace] = useState91(() => initialColorSpace);
31362
- const [userAgent, setUserAgent] = useState91(() => initialUserAgent === null ? null : initialUserAgent.trim() === "" ? null : initialUserAgent);
31342
+ const [videoCodecForAudioTab, setVideoCodecForAudioTab] = useState90(() => initialVideoCodecForAudioTab);
31343
+ const [mutedState, setMuted] = useState90(() => initialMuted);
31344
+ const [repro, setRepro] = useState90(() => initialRepro);
31345
+ const [enforceAudioTrackState, setEnforceAudioTrackState] = useState90(() => initialEnforceAudioTrack);
31346
+ const [forSeamlessAacConcatenation, setForSeamlessAacConcatenation] = useState90(() => initialForSeamlessAacConcatenation);
31347
+ const [sampleRate, setSampleRate] = useState90(() => initialSampleRate);
31348
+ const [renderMode, setRenderModeState] = useState90(initialRenderType);
31349
+ const [jpegQuality, setJpegQuality] = useState90(() => initialJpegQuality);
31350
+ const [scale, setScale] = useState90(() => initialScale);
31351
+ const [logLevel, setLogLevel] = useState90(() => initialLogLevel);
31352
+ const [disallowParallelEncoding, setDisallowParallelEncoding] = useState90(false);
31353
+ const [disableWebSecurity, setDisableWebSecurity] = useState90(() => initialDisableWebSecurity);
31354
+ const [headless, setHeadless] = useState90(() => initialHeadless);
31355
+ const [beepOnFinish, setBeepOnFinish] = useState90(() => initialBeep);
31356
+ const [ignoreCertificateErrors, setIgnoreCertificateErrors] = useState90(() => initialIgnoreCertificateErrors);
31357
+ const [multiProcessOnLinux, setChromiumMultiProcessOnLinux] = useState90(() => initialMultiProcessOnLinux);
31358
+ const [darkMode, setDarkMode] = useState90(() => initialDarkMode);
31359
+ const [openGlOption, setOpenGlOption] = useState90(() => initialGl ?? "default");
31360
+ const [colorSpace, setColorSpace] = useState90(() => initialColorSpace);
31361
+ const [userAgent, setUserAgent] = useState90(() => initialUserAgent === null ? null : initialUserAgent.trim() === "" ? null : initialUserAgent);
31363
31362
  const chromiumOptions = useMemo143(() => {
31364
31363
  return {
31365
31364
  headless,
@@ -31379,29 +31378,29 @@ var RenderModal = ({
31379
31378
  multiProcessOnLinux,
31380
31379
  darkMode
31381
31380
  ]);
31382
- const [outName, setOutName] = useState91(() => initialOutName);
31383
- const [endFrameOrNull, setEndFrame] = useState91(() => outFrameMark ?? null);
31384
- const [startFrameOrNull, setStartFrame] = useState91(() => inFrameMark ?? null);
31385
- const [proResProfileSetting, setProResProfile] = useState91(() => initialProResProfile ?? resolvedComposition.defaultProResProfile ?? "hq");
31386
- const [x264PresetSetting, setx264Preset] = useState91(() => initialx264Preset);
31387
- const [hardwareAcceleration, setHardwareAcceleration] = useState91(() => initialHardwareAcceleration);
31388
- const [userPreferredPixelFormat, setPixelFormat] = useState91(() => initialPixelFormat ?? resolvedComposition.defaultPixelFormat ?? renderDefaults.pixelFormat);
31389
- const [preferredQualityControlType, setQualityControl] = useState91(() => initialVideoBitrate === null ? "crf" : "bitrate");
31381
+ const [outName, setOutName] = useState90(() => initialOutName);
31382
+ const [endFrameOrNull, setEndFrame] = useState90(() => outFrameMark ?? null);
31383
+ const [startFrameOrNull, setStartFrame] = useState90(() => inFrameMark ?? null);
31384
+ const [proResProfileSetting, setProResProfile] = useState90(() => initialProResProfile ?? resolvedComposition.defaultProResProfile ?? "hq");
31385
+ const [x264PresetSetting, setx264Preset] = useState90(() => initialx264Preset);
31386
+ const [hardwareAcceleration, setHardwareAcceleration] = useState90(() => initialHardwareAcceleration);
31387
+ const [userPreferredPixelFormat, setPixelFormat] = useState90(() => initialPixelFormat ?? resolvedComposition.defaultPixelFormat ?? renderDefaults.pixelFormat);
31388
+ const [preferredQualityControlType, setQualityControl] = useState90(() => initialVideoBitrate === null ? "crf" : "bitrate");
31390
31389
  const [
31391
31390
  shouldHaveCustomTargetAudioBitrate,
31392
31391
  setShouldHaveCustomTargetAudioBitrate
31393
- ] = useState91(() => initialAudioBitrate !== null);
31394
- const [customTargetAudioBitrate, setCustomTargetAudioBitrateValue] = useState91(() => initialAudioBitrate ?? "320K");
31395
- const [customTargetVideoBitrate, setCustomTargetVideoBitrateValue] = useState91(() => initialVideoBitrate ?? "1M");
31396
- const [encodingMaxRate, setEncodingMaxRate] = useState91(() => initialEncodingMaxRate ?? null);
31397
- const [encodingBufferSize, setEncodingBufferSize] = useState91(() => initialEncodingBufferSize ?? null);
31398
- const [limitNumberOfGifLoops, setLimitNumberOfGifLoops] = useState91(() => initialNumberOfGifLoops !== null);
31399
- const [numberOfGifLoopsSetting, setNumberOfGifLoopsSetting] = useState91(() => initialNumberOfGifLoops ?? 0);
31400
- const [delayRenderTimeout, setDelayRenderTimeout] = useState91(() => initialDelayRenderTimeout);
31401
- const [chromeMode, setChromeMode] = useState91(() => initialChromeMode);
31402
- const [offthreadVideoCacheSizeInBytes, setOffthreadVideoCacheSizeInBytes] = useState91(initialOffthreadVideoCacheSizeInBytes);
31403
- const [mediaCacheSizeInBytes, setMediaCacheSizeInBytes] = useState91(initialMediaCacheSizeInBytes);
31404
- const [offthreadVideoThreads, setOffthreadVideoThreads] = useState91(() => initialOffthreadVideoThreads);
31392
+ ] = useState90(() => initialAudioBitrate !== null);
31393
+ const [customTargetAudioBitrate, setCustomTargetAudioBitrateValue] = useState90(() => initialAudioBitrate ?? "320K");
31394
+ const [customTargetVideoBitrate, setCustomTargetVideoBitrateValue] = useState90(() => initialVideoBitrate ?? "1M");
31395
+ const [encodingMaxRate, setEncodingMaxRate] = useState90(() => initialEncodingMaxRate ?? null);
31396
+ const [encodingBufferSize, setEncodingBufferSize] = useState90(() => initialEncodingBufferSize ?? null);
31397
+ const [limitNumberOfGifLoops, setLimitNumberOfGifLoops] = useState90(() => initialNumberOfGifLoops !== null);
31398
+ const [numberOfGifLoopsSetting, setNumberOfGifLoopsSetting] = useState90(() => initialNumberOfGifLoops ?? 0);
31399
+ const [delayRenderTimeout, setDelayRenderTimeout] = useState90(() => initialDelayRenderTimeout);
31400
+ const [chromeMode, setChromeMode] = useState90(() => initialChromeMode);
31401
+ const [offthreadVideoCacheSizeInBytes, setOffthreadVideoCacheSizeInBytes] = useState90(initialOffthreadVideoCacheSizeInBytes);
31402
+ const [mediaCacheSizeInBytes, setMediaCacheSizeInBytes] = useState90(initialMediaCacheSizeInBytes);
31403
+ const [offthreadVideoThreads, setOffthreadVideoThreads] = useState90(() => initialOffthreadVideoThreads);
31405
31404
  const codec = useMemo143(() => {
31406
31405
  if (renderMode === "audio") {
31407
31406
  return videoCodecForAudioTab;
@@ -31488,11 +31487,11 @@ var RenderModal = ({
31488
31487
  }
31489
31488
  return null;
31490
31489
  }, [codec, x264PresetSetting, renderMode]);
31491
- const [inputProps, _setInputProps] = useState91(() => defaultProps);
31490
+ const [inputProps, _setInputProps] = useState90(() => defaultProps);
31492
31491
  const setInputProps = useCallback141((updater) => {
31493
31492
  _setInputProps(updater);
31494
31493
  }, []);
31495
- const [metadata] = useState91(() => defaultMetadata);
31494
+ const [metadata] = useState90(() => defaultMetadata);
31496
31495
  const endFrame = useMemo143(() => {
31497
31496
  if (endFrameOrNull === null) {
31498
31497
  return resolvedComposition.durationInFrames - 1;
@@ -31571,7 +31570,7 @@ var RenderModal = ({
31571
31570
  setStillImageFormat(format);
31572
31571
  setDefaultOutName({ type: "still", imageFormat: format });
31573
31572
  }, [setDefaultOutName]);
31574
- const { setSidebarCollapsedState } = useContext94(SidebarContext);
31573
+ const { setSidebarCollapsedState } = useContext93(SidebarContext);
31575
31574
  const onClickStill = useCallback141(() => {
31576
31575
  setSidebarCollapsedState({ left: null, right: "expanded" });
31577
31576
  persistSelectedOptionsSidebarPanel2("renders");
@@ -31625,7 +31624,7 @@ var RenderModal = ({
31625
31624
  offthreadVideoThreads,
31626
31625
  mediaCacheSizeInBytes
31627
31626
  ]);
31628
- const [everyNthFrameSetting, setEveryNthFrameSetting] = useState91(() => initialEveryNthFrame);
31627
+ const [everyNthFrameSetting, setEveryNthFrameSetting] = useState90(() => initialEveryNthFrame);
31629
31628
  const everyNthFrame = useMemo143(() => {
31630
31629
  if (codec === "gif") {
31631
31630
  return everyNthFrameSetting;
@@ -32079,7 +32078,7 @@ var RenderModal = ({
32079
32078
  videoBitrate,
32080
32079
  x264Preset
32081
32080
  ]);
32082
- const [commandCopiedAt, setCommandCopiedAt] = useState91(null);
32081
+ const [commandCopiedAt, setCommandCopiedAt] = useState90(null);
32083
32082
  const renderDisabled = readOnlyStudio ? false : !outnameValidation.valid || state.type === "load";
32084
32083
  const trigger = useCallback141(() => {
32085
32084
  if (readOnlyStudio) {
@@ -32435,7 +32434,7 @@ import {
32435
32434
  getDefaultVideoCodecForContainer,
32436
32435
  isAudioOnlyContainer
32437
32436
  } from "@remotion/web-renderer";
32438
- import { useCallback as useCallback145, useContext as useContext95, useMemo as useMemo148, useState as useState95 } from "react";
32437
+ import { useCallback as useCallback145, useContext as useContext94, useMemo as useMemo148, useState as useState94 } from "react";
32439
32438
 
32440
32439
  // src/icons/certificate.tsx
32441
32440
  import { jsx as jsx273 } from "react/jsx-runtime";
@@ -32454,10 +32453,10 @@ import {
32454
32453
  getEncodableAudioCodecs,
32455
32454
  getSupportedAudioCodecsForContainer
32456
32455
  } from "@remotion/web-renderer";
32457
- import { useEffect as useEffect84, useRef as useRef50, useState as useState92 } from "react";
32456
+ import { useEffect as useEffect84, useRef as useRef50, useState as useState91 } from "react";
32458
32457
  var useEncodableAudioCodecs = (container60) => {
32459
32458
  const cacheRef = useRef50({});
32460
- const [codecsByContainer, setCodecsByContainer] = useState92(() => {
32459
+ const [codecsByContainer, setCodecsByContainer] = useState91(() => {
32461
32460
  return {
32462
32461
  [container60]: getSupportedAudioCodecsForContainer(container60)
32463
32462
  };
@@ -32496,10 +32495,10 @@ import {
32496
32495
  getEncodableVideoCodecs,
32497
32496
  getSupportedVideoCodecsForContainer
32498
32497
  } from "@remotion/web-renderer";
32499
- import { useEffect as useEffect85, useRef as useRef51, useState as useState93 } from "react";
32498
+ import { useEffect as useEffect85, useRef as useRef51, useState as useState92 } from "react";
32500
32499
  var useEncodableVideoCodecs = (container60) => {
32501
32500
  const cacheRef = useRef51({});
32502
- const [codecsByContainer, setCodecsByContainer] = useState93(() => {
32501
+ const [codecsByContainer, setCodecsByContainer] = useState92(() => {
32503
32502
  return {
32504
32503
  [container60]: getSupportedVideoCodecsForContainer(container60)
32505
32504
  };
@@ -33192,7 +33191,7 @@ var WebRenderModalBasic = ({
33192
33191
  };
33193
33192
 
33194
33193
  // src/components/RenderModal/WebRenderModalLicense.tsx
33195
- import { useCallback as useCallback143, useEffect as useEffect86, useState as useState94 } from "react";
33194
+ import { useCallback as useCallback143, useEffect as useEffect86, useState as useState93 } from "react";
33196
33195
 
33197
33196
  // src/icons/check-circle-filled.tsx
33198
33197
  import { jsx as jsx279 } from "react/jsx-runtime";
@@ -33412,8 +33411,8 @@ var WebRenderModalLicense = ({
33412
33411
  setLicenseKey,
33413
33412
  initialPublicLicenseKey
33414
33413
  }) => {
33415
- const [licenseValidation, setLicenseValidation] = useState94({ valid: true, message: null, details: null });
33416
- const [isLoading, setIsLoading] = useState94(false);
33414
+ const [licenseValidation, setLicenseValidation] = useState93({ valid: true, message: null, details: null });
33415
+ const [isLoading, setIsLoading] = useState93(false);
33417
33416
  useEffect86(() => {
33418
33417
  if (licenseKey === null || licenseKey === "free-license") {
33419
33418
  return setLicenseValidation({
@@ -33780,10 +33779,10 @@ var WebRenderModal = ({
33780
33779
  initialMuted,
33781
33780
  initialAllowHtmlInCanvas
33782
33781
  }) => {
33783
- const context = useContext95(ResolvedCompositionContext);
33784
- const { setSelectedModal } = useContext95(ModalsContext);
33785
- const { setSidebarCollapsedState } = useContext95(SidebarContext);
33786
- const { addClientStillJob, addClientVideoJob } = useContext95(RenderQueueContext);
33782
+ const context = useContext94(ResolvedCompositionContext);
33783
+ const { setSelectedModal } = useContext94(ModalsContext);
33784
+ const { setSidebarCollapsedState } = useContext94(SidebarContext);
33785
+ const { addClientStillJob, addClientVideoJob } = useContext94(RenderQueueContext);
33787
33786
  if (!context) {
33788
33787
  throw new Error("Should not be able to render without resolving comp first");
33789
33788
  }
@@ -33791,34 +33790,34 @@ var WebRenderModal = ({
33791
33790
  resolved: { result: resolvedComposition },
33792
33791
  unresolved: unresolvedComposition
33793
33792
  } = context;
33794
- const [isVideo] = useState95(() => {
33793
+ const [isVideo] = useState94(() => {
33795
33794
  return typeof resolvedComposition.durationInFrames === "undefined" ? true : resolvedComposition.durationInFrames > 1;
33796
33795
  });
33797
- const [renderMode, setRenderMode] = useState95(initialContainer && isAudioOnlyContainer(initialContainer) ? "audio" : isVideo ? "video" : "still");
33798
- const [tab, setTab] = useState95("general");
33799
- const [imageFormat, setImageFormat] = useState95(() => initialStillImageFormat ?? "png");
33800
- const [frame2, setFrame] = useState95(() => initialFrame);
33801
- const [logLevel, setLogLevel] = useState95(() => initialLogLevel);
33802
- const [inputProps, _setInputProps] = useState95(() => defaultProps);
33796
+ const [renderMode, setRenderMode] = useState94(initialContainer && isAudioOnlyContainer(initialContainer) ? "audio" : isVideo ? "video" : "still");
33797
+ const [tab, setTab] = useState94("general");
33798
+ const [imageFormat, setImageFormat] = useState94(() => initialStillImageFormat ?? "png");
33799
+ const [frame2, setFrame] = useState94(() => initialFrame);
33800
+ const [logLevel, setLogLevel] = useState94(() => initialLogLevel);
33801
+ const [inputProps, _setInputProps] = useState94(() => defaultProps);
33803
33802
  const setInputProps = useCallback145((updater) => {
33804
33803
  _setInputProps(updater);
33805
33804
  }, []);
33806
- const [delayRenderTimeout, setDelayRenderTimeout] = useState95(initialDelayRenderTimeout ?? 30000);
33807
- const [mediaCacheSizeInBytes, setMediaCacheSizeInBytes] = useState95(initialMediaCacheSizeInBytes);
33808
- const [codec, setCodec] = useState95(initialVideoCodec ?? "h264");
33809
- const [container61, setContainer] = useState95(initialContainer ?? "mp4");
33810
- const [audioCodec, setAudioCodec] = useState95(initialAudioCodec ?? "aac");
33811
- const [audioBitrate, setAudioBitrate] = useState95(initialAudioBitrate ?? "medium");
33812
- const [videoBitrate, setVideoBitrate] = useState95(initialVideoBitrate ?? "high");
33813
- const [hardwareAcceleration, setHardwareAcceleration] = useState95(initialHardwareAcceleration ?? "no-preference");
33814
- const [keyframeIntervalInSeconds, setKeyframeIntervalInSeconds] = useState95(initialKeyframeIntervalInSeconds ?? 5);
33815
- const [startFrame, setStartFrame] = useState95(() => inFrameMark);
33816
- const [endFrame, setEndFrame] = useState95(() => outFrameMark);
33817
- const [transparent, setTransparent] = useState95(initialTransparent ?? false);
33818
- const [muted, setMuted] = useState95(initialMuted ?? false);
33819
- const [scale, setScale] = useState95(initialScale ?? 1);
33820
- const [licenseKey, setLicenseKey] = useState95(initialLicenseKey);
33821
- const [allowHtmlInCanvas, setAllowHtmlInCanvas] = useState95(initialAllowHtmlInCanvas ?? false);
33805
+ const [delayRenderTimeout, setDelayRenderTimeout] = useState94(initialDelayRenderTimeout ?? 30000);
33806
+ const [mediaCacheSizeInBytes, setMediaCacheSizeInBytes] = useState94(initialMediaCacheSizeInBytes);
33807
+ const [codec, setCodec] = useState94(initialVideoCodec ?? "h264");
33808
+ const [container61, setContainer] = useState94(initialContainer ?? "mp4");
33809
+ const [audioCodec, setAudioCodec] = useState94(initialAudioCodec ?? "aac");
33810
+ const [audioBitrate, setAudioBitrate] = useState94(initialAudioBitrate ?? "medium");
33811
+ const [videoBitrate, setVideoBitrate] = useState94(initialVideoBitrate ?? "high");
33812
+ const [hardwareAcceleration, setHardwareAcceleration] = useState94(initialHardwareAcceleration ?? "no-preference");
33813
+ const [keyframeIntervalInSeconds, setKeyframeIntervalInSeconds] = useState94(initialKeyframeIntervalInSeconds ?? 5);
33814
+ const [startFrame, setStartFrame] = useState94(() => inFrameMark);
33815
+ const [endFrame, setEndFrame] = useState94(() => outFrameMark);
33816
+ const [transparent, setTransparent] = useState94(initialTransparent ?? false);
33817
+ const [muted, setMuted] = useState94(initialMuted ?? false);
33818
+ const [scale, setScale] = useState94(initialScale ?? 1);
33819
+ const [licenseKey, setLicenseKey] = useState94(initialLicenseKey);
33820
+ const [allowHtmlInCanvas, setAllowHtmlInCanvas] = useState94(initialAllowHtmlInCanvas ?? false);
33822
33821
  const encodableAudioCodecs = useEncodableAudioCodecs(container61);
33823
33822
  const encodableVideoCodecs = useEncodableVideoCodecs(container61);
33824
33823
  const effectiveAudioCodec = useMemo148(() => {
@@ -33845,7 +33844,7 @@ var WebRenderModal = ({
33845
33844
  }
33846
33845
  return Math.max(0, Math.min(finalEndFrame, startFrame));
33847
33846
  }, [finalEndFrame, startFrame]);
33848
- const [initialOutNameState] = useState95(() => {
33847
+ const [initialOutNameState] = useState94(() => {
33849
33848
  if (initialDefaultOutName) {
33850
33849
  return initialDefaultOutName;
33851
33850
  }
@@ -33861,7 +33860,7 @@ var WebRenderModal = ({
33861
33860
  }
33862
33861
  return defaultOut;
33863
33862
  });
33864
- const [outName, setOutName] = useState95(() => initialOutNameState);
33863
+ const [outName, setOutName] = useState94(() => initialOutNameState);
33865
33864
  const updateOutNameExtension = useCallback145((extension) => {
33866
33865
  setOutName((prev) => getStringBeforeSuffix(prev) + "." + extension);
33867
33866
  }, []);
@@ -34301,7 +34300,7 @@ var WebRenderModalWithLoader = (props) => {
34301
34300
  import { useCallback as useCallback148, useMemo as useMemo150 } from "react";
34302
34301
 
34303
34302
  // src/components/CopyButton.tsx
34304
- import { useCallback as useCallback146, useEffect as useEffect87, useState as useState96 } from "react";
34303
+ import { useCallback as useCallback146, useEffect as useEffect87, useState as useState95 } from "react";
34305
34304
  import { jsx as jsx284, jsxs as jsxs152 } from "react/jsx-runtime";
34306
34305
  var iconStyle9 = {
34307
34306
  width: 16,
@@ -34331,7 +34330,7 @@ var labelStyle5 = {
34331
34330
  fontSize: 14
34332
34331
  };
34333
34332
  var CopyButton = ({ textToCopy, label: label12, labelWhenCopied }) => {
34334
- const [copied, setCopied] = useState96(false);
34333
+ const [copied, setCopied] = useState95(false);
34335
34334
  const onClick = useCallback146(() => {
34336
34335
  copyText(textToCopy).then(() => {
34337
34336
  setCopied(Date.now());
@@ -34364,7 +34363,7 @@ var CopyButton = ({ textToCopy, label: label12, labelWhenCopied }) => {
34364
34363
  };
34365
34364
 
34366
34365
  // src/components/UpdateModal/OpenIssueButton.tsx
34367
- import { useCallback as useCallback147, useMemo as useMemo149, useState as useState97 } from "react";
34366
+ import { useCallback as useCallback147, useMemo as useMemo149, useState as useState96 } from "react";
34368
34367
  import { jsx as jsx285 } from "react/jsx-runtime";
34369
34368
  var svgStyle2 = {
34370
34369
  width: "11px",
@@ -34379,7 +34378,7 @@ var buttonStyle7 = {
34379
34378
  alignItems: "center"
34380
34379
  };
34381
34380
  var OpenIssueButton = ({ link: link4 }) => {
34382
- const [hovered, setHovered] = useState97(false);
34381
+ const [hovered, setHovered] = useState96(false);
34383
34382
  const buttonTooltip = `Open GitHub issue in new Tab`;
34384
34383
  const handleClick = useCallback147(() => {
34385
34384
  window.open(link4, "_blank");
@@ -34580,8 +34579,8 @@ var UpdateModal = ({ info, knownBugs }) => {
34580
34579
  // src/components/Modals.tsx
34581
34580
  import { jsx as jsx288, jsxs as jsxs155, Fragment as Fragment53 } from "react/jsx-runtime";
34582
34581
  var Modals = ({ readOnlyStudio }) => {
34583
- const { selectedModal: modalContextType } = useContext96(ModalsContext);
34584
- const canRender = useContext96(StudioServerConnectionCtx).previewServerState.type === "connected";
34582
+ const { selectedModal: modalContextType } = useContext95(ModalsContext);
34583
+ const canRender = useContext95(StudioServerConnectionCtx).previewServerState.type === "connected";
34585
34584
  return /* @__PURE__ */ jsxs155(Fragment53, {
34586
34585
  children: [
34587
34586
  modalContextType && modalContextType.type === "duplicate-comp" && /* @__PURE__ */ jsx288(DuplicateComposition, {
@@ -34702,7 +34701,7 @@ var Editor = ({ Root, readOnlyStudio }) => {
34702
34701
  const MemoRoot = useMemo151(() => {
34703
34702
  return React187.memo(Root);
34704
34703
  }, [Root]);
34705
- const [renderError, setRenderError] = useState98(null);
34704
+ const [renderError, setRenderError] = useState97(null);
34706
34705
  const clearError = useCallback149(() => {
34707
34706
  setRenderError(null);
34708
34707
  }, []);
@@ -34758,7 +34757,7 @@ var Editor = ({ Root, readOnlyStudio }) => {
34758
34757
  import { PlayerInternals as PlayerInternals20 } from "@remotion/player";
34759
34758
 
34760
34759
  // src/state/preview-size.tsx
34761
- import { useCallback as useCallback150, useContext as useContext97, useMemo as useMemo152, useState as useState99 } from "react";
34760
+ import { useCallback as useCallback150, useContext as useContext96, useMemo as useMemo152, useState as useState98 } from "react";
34762
34761
  import { Internals as Internals66 } from "remotion";
34763
34762
  import { jsx as jsx290 } from "react/jsx-runtime";
34764
34763
  var key5 = "remotion.previewSize";
@@ -34779,14 +34778,14 @@ var loadPreviewSizeOption = () => {
34779
34778
  return JSON.parse(item2);
34780
34779
  };
34781
34780
  var PreviewSizeProvider = ({ children }) => {
34782
- const [size4, setSizeState] = useState99(() => loadPreviewSizeOption());
34783
- const [translation, setTranslation] = useState99(() => {
34781
+ const [size4, setSizeState] = useState98(() => loadPreviewSizeOption());
34782
+ const [translation, setTranslation] = useState98(() => {
34784
34783
  return {
34785
34784
  x: 0,
34786
34785
  y: 0
34787
34786
  };
34788
34787
  });
34789
- const { editorZoomGestures } = useContext97(EditorZoomGesturesContext);
34788
+ const { editorZoomGestures } = useContext96(EditorZoomGesturesContext);
34790
34789
  const setSize = useCallback150((newValue) => {
34791
34790
  setSizeState((prevState) => {
34792
34791
  const newVal = newValue(prevState);
@@ -34815,10 +34814,10 @@ var PreviewSizeProvider = ({ children }) => {
34815
34814
  };
34816
34815
 
34817
34816
  // src/components/CheckerboardProvider.tsx
34818
- import { useCallback as useCallback151, useMemo as useMemo153, useState as useState100 } from "react";
34817
+ import { useCallback as useCallback151, useMemo as useMemo153, useState as useState99 } from "react";
34819
34818
  import { jsx as jsx291 } from "react/jsx-runtime";
34820
34819
  var CheckerboardProvider = ({ children }) => {
34821
- const [checkerboard, setCheckerboardState] = useState100(() => loadCheckerboardOption());
34820
+ const [checkerboard, setCheckerboardState] = useState99(() => loadCheckerboardOption());
34822
34821
  const setCheckerboard = useCallback151((newValue) => {
34823
34822
  setCheckerboardState((prevState) => {
34824
34823
  const newVal = newValue(prevState);
@@ -34839,12 +34838,12 @@ var CheckerboardProvider = ({ children }) => {
34839
34838
  };
34840
34839
 
34841
34840
  // src/components/MediaVolumeProvider.tsx
34842
- import { useMemo as useMemo154, useState as useState101 } from "react";
34841
+ import { useMemo as useMemo154, useState as useState100 } from "react";
34843
34842
  import { Internals as Internals67 } from "remotion";
34844
34843
  import { jsx as jsx292 } from "react/jsx-runtime";
34845
34844
  var MediaVolumeProvider = ({ children }) => {
34846
- const [mediaMuted, setMediaMuted] = useState101(() => loadMuteOption());
34847
- const [mediaVolume, setMediaVolume] = useState101(1);
34845
+ const [mediaMuted, setMediaMuted] = useState100(() => loadMuteOption());
34846
+ const [mediaVolume, setMediaVolume] = useState100(1);
34848
34847
  const mediaVolumeContextValue = useMemo154(() => {
34849
34848
  return {
34850
34849
  mediaMuted,
@@ -34867,10 +34866,10 @@ var MediaVolumeProvider = ({ children }) => {
34867
34866
  };
34868
34867
 
34869
34868
  // src/components/ModalsProvider.tsx
34870
- import { useMemo as useMemo155, useState as useState102 } from "react";
34869
+ import { useMemo as useMemo155, useState as useState101 } from "react";
34871
34870
  import { jsx as jsx293 } from "react/jsx-runtime";
34872
34871
  var ModalsProvider = ({ children }) => {
34873
- const [modalContextType, setModalContextType] = useState102(null);
34872
+ const [modalContextType, setModalContextType] = useState101(null);
34874
34873
  const modalsContext = useMemo155(() => {
34875
34874
  return {
34876
34875
  selectedModal: modalContextType,
@@ -34884,7 +34883,7 @@ var ModalsProvider = ({ children }) => {
34884
34883
  };
34885
34884
 
34886
34885
  // src/components/SetTimelineInOutProvider.tsx
34887
- import { useEffect as useEffect88, useMemo as useMemo156, useState as useState103 } from "react";
34886
+ import { useEffect as useEffect88, useMemo as useMemo156, useState as useState102 } from "react";
34888
34887
 
34889
34888
  // src/state/marks.ts
34890
34889
  var localStorageKey5 = () => `remotion.editor.marksv2`;
@@ -34902,7 +34901,7 @@ var loadMarks = () => {
34902
34901
  // src/components/SetTimelineInOutProvider.tsx
34903
34902
  import { jsx as jsx294 } from "react/jsx-runtime";
34904
34903
  var SetTimelineInOutProvider = ({ children }) => {
34905
- const [inAndOutFrames, setInAndOutFrames] = useState103(() => loadMarks());
34904
+ const [inAndOutFrames, setInAndOutFrames] = useState102(() => loadMarks());
34906
34905
  const setTimelineInOutContextValue = useMemo156(() => {
34907
34906
  return {
34908
34907
  setInAndOutFrames
@@ -34921,13 +34920,13 @@ var SetTimelineInOutProvider = ({ children }) => {
34921
34920
  };
34922
34921
 
34923
34922
  // src/components/ShowGuidesProvider.tsx
34924
- import { useCallback as useCallback152, useMemo as useMemo157, useRef as useRef52, useState as useState104 } from "react";
34923
+ import { useCallback as useCallback152, useMemo as useMemo157, useRef as useRef52, useState as useState103 } from "react";
34925
34924
  import { jsx as jsx295 } from "react/jsx-runtime";
34926
34925
  var ShowGuidesProvider = ({ children }) => {
34927
- const [guidesList, setGuidesList] = useState104(() => loadGuidesList());
34928
- const [selectedGuideId, setSelectedGuideId] = useState104(null);
34929
- const [hoveredGuideId, setHoveredGuideId] = useState104(null);
34930
- const [editorShowGuides, setEditorShowGuidesState] = useState104(() => loadEditorShowGuidesOption());
34926
+ const [guidesList, setGuidesList] = useState103(() => loadGuidesList());
34927
+ const [selectedGuideId, setSelectedGuideId] = useState103(null);
34928
+ const [hoveredGuideId, setHoveredGuideId] = useState103(null);
34929
+ const [editorShowGuides, setEditorShowGuidesState] = useState103(() => loadEditorShowGuidesOption());
34931
34930
  const shouldCreateGuideRef = useRef52(false);
34932
34931
  const shouldDeleteGuideRef = useRef52(false);
34933
34932
  const setEditorShowGuides = useCallback152((newValue) => {
@@ -34964,10 +34963,10 @@ var ShowGuidesProvider = ({ children }) => {
34964
34963
  };
34965
34964
 
34966
34965
  // src/components/ShowRulersProvider.tsx
34967
- import { useCallback as useCallback153, useMemo as useMemo158, useState as useState105 } from "react";
34966
+ import { useCallback as useCallback153, useMemo as useMemo158, useState as useState104 } from "react";
34968
34967
  import { jsx as jsx296 } from "react/jsx-runtime";
34969
34968
  var ShowRulersProvider = ({ children }) => {
34970
- const [editorShowRulers, setEditorShowRulersState] = useState105(() => loadEditorShowRulersOption());
34969
+ const [editorShowRulers, setEditorShowRulersState] = useState104(() => loadEditorShowRulersOption());
34971
34970
  const setEditorShowRulers = useCallback153((newValue) => {
34972
34971
  setEditorShowRulersState((prevState) => {
34973
34972
  const newVal = newValue(prevState);
@@ -34988,10 +34987,10 @@ var ShowRulersProvider = ({ children }) => {
34988
34987
  };
34989
34988
 
34990
34989
  // src/components/VisualControls/VisualControlsUndoSync.tsx
34991
- import { useContext as useContext98, useEffect as useEffect89 } from "react";
34990
+ import { useContext as useContext97, useEffect as useEffect89 } from "react";
34992
34991
  var VisualControlsUndoSync = () => {
34993
- const { subscribeToEvent } = useContext98(StudioServerConnectionCtx);
34994
- const { updateValue } = useContext98(SetVisualControlsContext);
34992
+ const { subscribeToEvent } = useContext97(StudioServerConnectionCtx);
34993
+ const { updateValue } = useContext97(SetVisualControlsContext);
34995
34994
  useEffect89(() => {
34996
34995
  const unsub = subscribeToEvent("visual-control-values-changed", (event) => {
34997
34996
  if (event.type !== "visual-control-values-changed") {
@@ -35007,10 +35006,10 @@ var VisualControlsUndoSync = () => {
35007
35006
  };
35008
35007
 
35009
35008
  // src/components/ZoomGesturesProvider.tsx
35010
- import { useCallback as useCallback154, useMemo as useMemo159, useState as useState106 } from "react";
35009
+ import { useCallback as useCallback154, useMemo as useMemo159, useState as useState105 } from "react";
35011
35010
  import { jsx as jsx297 } from "react/jsx-runtime";
35012
35011
  var ZoomGesturesProvider = ({ children }) => {
35013
- const [editorZoomGestures, setEditorZoomGesturesState] = useState106(() => loadEditorZoomGesturesOption());
35012
+ const [editorZoomGestures, setEditorZoomGesturesState] = useState105(() => loadEditorZoomGesturesOption());
35014
35013
  const setEditorZoomGestures = useCallback154((newValue) => {
35015
35014
  setEditorZoomGesturesState((prevState) => {
35016
35015
  const newVal = newValue(prevState);
@@ -35081,7 +35080,7 @@ var EditorContexts = ({ children, readOnlyStudio }) => {
35081
35080
  };
35082
35081
 
35083
35082
  // src/components/Notifications/ServerDisconnected.tsx
35084
- import { useContext as useContext99 } from "react";
35083
+ import { useContext as useContext98 } from "react";
35085
35084
  import { jsx as jsx299, jsxs as jsxs158 } from "react/jsx-runtime";
35086
35085
  var container63 = {
35087
35086
  position: "fixed",
@@ -35116,7 +35115,7 @@ window.addEventListener("beforeunload", () => {
35116
35115
  pageIsGoingToReload = true;
35117
35116
  });
35118
35117
  var ServerDisconnected = () => {
35119
- const { previewServerState: ctx } = useContext99(StudioServerConnectionCtx);
35118
+ const { previewServerState: ctx } = useContext98(StudioServerConnectionCtx);
35120
35119
  const fav = document.getElementById("__remotion_favicon");
35121
35120
  if (ctx.type !== "disconnected") {
35122
35121
  fav.setAttribute("href", "/favicon.ico");
@@ -35155,11 +35154,11 @@ var ServerDisconnected = () => {
35155
35154
  };
35156
35155
 
35157
35156
  // src/FastRefreshProvider.tsx
35158
- import { useCallback as useCallback155, useEffect as useEffect90, useMemo as useMemo160, useState as useState107 } from "react";
35157
+ import { useCallback as useCallback155, useEffect as useEffect90, useMemo as useMemo160, useState as useState106 } from "react";
35159
35158
  import { jsx as jsx300 } from "react/jsx-runtime";
35160
35159
  var FastRefreshProvider = ({ children }) => {
35161
- const [fastRefreshes, setFastRefreshes] = useState107(0);
35162
- const [manualRefreshes, setManualRefreshes] = useState107(0);
35160
+ const [fastRefreshes, setFastRefreshes] = useState106(0);
35161
+ const [manualRefreshes, setManualRefreshes] = useState106(0);
35163
35162
  const increaseManualRefreshes = useCallback155(() => {
35164
35163
  setManualRefreshes((i) => i + 1);
35165
35164
  }, []);
@@ -35346,29 +35345,29 @@ var injectCSS = () => {
35346
35345
  // src/ResolveCompositionConfigInStudio.tsx
35347
35346
  import {
35348
35347
  useCallback as useCallback156,
35349
- useContext as useContext100,
35348
+ useContext as useContext99,
35350
35349
  useEffect as useEffect91,
35351
35350
  useImperativeHandle as useImperativeHandle14,
35352
35351
  useMemo as useMemo161,
35353
- useState as useState108
35352
+ useState as useState107
35354
35353
  } from "react";
35355
35354
  import { getInputProps as getInputProps2, Internals as Internals69 } from "remotion";
35356
35355
  import { jsx as jsx301 } from "react/jsx-runtime";
35357
35356
  var ResolveCompositionConfigInStudio = ({ children }) => {
35358
- const [currentRenderModalComposition, setCurrentRenderModalComposition] = useState108(null);
35359
- const { compositions, canvasContent, currentCompositionMetadata } = useContext100(Internals69.CompositionManager);
35360
- const { fastRefreshes, manualRefreshes } = useContext100(FastRefreshContext);
35357
+ const [currentRenderModalComposition, setCurrentRenderModalComposition] = useState107(null);
35358
+ const { compositions, canvasContent, currentCompositionMetadata } = useContext99(Internals69.CompositionManager);
35359
+ const { fastRefreshes, manualRefreshes } = useContext99(FastRefreshContext);
35361
35360
  if (manualRefreshes) {}
35362
35361
  const selectedComposition = useMemo161(() => {
35363
35362
  return compositions.find((c) => canvasContent && canvasContent.type === "composition" && canvasContent.compositionId === c.id);
35364
35363
  }, [canvasContent, compositions]);
35365
35364
  const renderModalComposition = compositions.find((c) => c.id === currentRenderModalComposition);
35366
- const { props: allEditorProps } = useContext100(Internals69.EditorPropsContext);
35365
+ const { props: allEditorProps } = useContext99(Internals69.EditorPropsContext);
35367
35366
  const env = Internals69.getRemotionEnvironment();
35368
35367
  const inputProps = useMemo161(() => {
35369
35368
  return typeof window === "undefined" || env.isPlayer ? {} : getInputProps2() ?? {};
35370
35369
  }, [env.isPlayer]);
35371
- const [resolvedConfigs, setResolvedConfigs] = useState108({});
35370
+ const [resolvedConfigs, setResolvedConfigs] = useState107({});
35372
35371
  const selectedEditorProps = useMemo161(() => {
35373
35372
  return selectedComposition ? allEditorProps[selectedComposition.id] ?? {} : {};
35374
35373
  }, [allEditorProps, selectedComposition]);
@@ -35625,7 +35624,7 @@ var StudioInner = ({ rootComponent, readOnly, visualModeEnabled }) => {
35625
35624
  videoEnabled: window.remotion_videoEnabled,
35626
35625
  logLevel: window.remotion_logLevel ?? "info",
35627
35626
  numberOfAudioTags: window.remotion_numberOfAudioTags,
35628
- audioLatencyHint: window.remotion_audioLatencyHint ?? "interactive",
35627
+ audioLatencyHint: window.remotion_audioLatencyHint ?? "playback",
35629
35628
  children: /* @__PURE__ */ jsx302(StaticFilesProvider, {
35630
35629
  children: /* @__PURE__ */ jsx302(ResolveCompositionConfigInStudio, {
35631
35630
  children: /* @__PURE__ */ jsxs159(EditorContexts, {
@@ -35644,7 +35643,7 @@ var StudioInner = ({ rootComponent, readOnly, visualModeEnabled }) => {
35644
35643
  });
35645
35644
  };
35646
35645
  var Studio = ({ rootComponent, readOnly, visualModeEnabled }) => {
35647
- useLayoutEffect6(() => {
35646
+ useLayoutEffect5(() => {
35648
35647
  injectCSS();
35649
35648
  }, []);
35650
35649
  return /* @__PURE__ */ jsx302(FastRefreshProvider, {