@remotion/promo-pages 4.0.464 → 4.0.465

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.
package/dist/Homepage.js CHANGED
@@ -1088,8 +1088,7 @@ import {
1088
1088
  useContext as useContext32,
1089
1089
  useImperativeHandle as useImperativeHandle6,
1090
1090
  useLayoutEffect as useLayoutEffect10,
1091
- useRef as useRef21,
1092
- useState as useState17
1091
+ useRef as useRef21
1093
1092
  } from "react";
1094
1093
  import { jsx as jsx26 } from "react/jsx-runtime";
1095
1094
  import { createRef as createRef3 } from "react";
@@ -1099,7 +1098,7 @@ import {
1099
1098
  useImperativeHandle as useImperativeHandle7,
1100
1099
  useMemo as useMemo31,
1101
1100
  useRef as useRef22,
1102
- useState as useState18
1101
+ useState as useState17
1103
1102
  } from "react";
1104
1103
  import { jsx as jsx27 } from "react/jsx-runtime";
1105
1104
  import React29 from "react";
@@ -1116,7 +1115,7 @@ import {
1116
1115
  useEffect as useEffect16,
1117
1116
  useLayoutEffect as useLayoutEffect11,
1118
1117
  useMemo as useMemo34,
1119
- useState as useState19
1118
+ useState as useState18
1120
1119
  } from "react";
1121
1120
  import { jsx as jsx30 } from "react/jsx-runtime";
1122
1121
  import React34, {
@@ -1126,7 +1125,7 @@ import React34, {
1126
1125
  useImperativeHandle as useImperativeHandle8,
1127
1126
  useMemo as useMemo35,
1128
1127
  useRef as useRef23,
1129
- useState as useState20,
1128
+ useState as useState19,
1130
1129
  useCallback as useCallback20
1131
1130
  } from "react";
1132
1131
  import { useEffect as useEffect17 } from "react";
@@ -1188,20 +1187,70 @@ var CompositionRenderErrorContext = createContext3({
1188
1187
  setError: () => {},
1189
1188
  clearError: () => {}
1190
1189
  });
1190
+ var getHot = () => {
1191
+ try {
1192
+ if (typeof __webpack_module__ === "undefined") {
1193
+ return null;
1194
+ }
1195
+ return __webpack_module__.hot ?? null;
1196
+ } catch {
1197
+ return null;
1198
+ }
1199
+ };
1191
1200
 
1192
1201
  class CompositionErrorBoundary extends React2.Component {
1193
1202
  state = { hasError: false };
1203
+ hmrStatusHandler = null;
1194
1204
  static getDerivedStateFromError() {
1195
1205
  return { hasError: true };
1196
1206
  }
1197
1207
  componentDidCatch(error) {
1198
1208
  this.props.onError(error);
1209
+ this.subscribeToHmrReset();
1199
1210
  }
1200
- componentDidUpdate(_prevProps) {
1211
+ componentDidMount() {
1201
1212
  if (!this.state.hasError) {
1202
1213
  this.props.onClear();
1203
1214
  }
1204
1215
  }
1216
+ componentDidUpdate(_prevProps, prevState) {
1217
+ if (prevState.hasError && !this.state.hasError) {
1218
+ this.props.onClear();
1219
+ }
1220
+ }
1221
+ componentWillUnmount() {
1222
+ this.unsubscribeFromHmrReset();
1223
+ }
1224
+ subscribeToHmrReset() {
1225
+ if (this.hmrStatusHandler) {
1226
+ return;
1227
+ }
1228
+ const hot = getHot();
1229
+ if (!hot) {
1230
+ return;
1231
+ }
1232
+ const handler = (status) => {
1233
+ if (status !== "idle") {
1234
+ return;
1235
+ }
1236
+ this.unsubscribeFromHmrReset();
1237
+ this.setState({ hasError: false });
1238
+ };
1239
+ this.hmrStatusHandler = handler;
1240
+ hot.addStatusHandler(handler);
1241
+ }
1242
+ unsubscribeFromHmrReset() {
1243
+ const handler = this.hmrStatusHandler;
1244
+ if (!handler) {
1245
+ return;
1246
+ }
1247
+ this.hmrStatusHandler = null;
1248
+ const hot = getHot();
1249
+ if (!hot) {
1250
+ return;
1251
+ }
1252
+ hot.removeStatusHandler(handler);
1253
+ }
1205
1254
  render() {
1206
1255
  if (this.state.hasError) {
1207
1256
  return null;
@@ -2224,7 +2273,7 @@ var getComponentsToAddStacksTo = () => componentsToAddStacksTo;
2224
2273
  var addSequenceStackTraces = (component) => {
2225
2274
  componentsToAddStacksTo.push(component);
2226
2275
  };
2227
- var VERSION = "4.0.464";
2276
+ var VERSION = "4.0.465";
2228
2277
  var checkMultipleRemotionVersions = () => {
2229
2278
  if (typeof globalThis === "undefined") {
2230
2279
  return;
@@ -3269,7 +3318,7 @@ var RegularSequenceRefForwardingFunction = ({
3269
3318
  showInTimeline = true,
3270
3319
  hidden = false,
3271
3320
  _experimentalControls: controls,
3272
- _experimentalEffects,
3321
+ _remotionInternalEffects,
3273
3322
  _remotionInternalLoopDisplay: loopDisplay,
3274
3323
  _remotionInternalStack: stack,
3275
3324
  _remotionInternalPremountDisplay: premountDisplay,
@@ -3351,28 +3400,49 @@ var RegularSequenceRefForwardingFunction = ({
3351
3400
  return;
3352
3401
  }
3353
3402
  if (isMedia) {
3354
- registerSequence({
3355
- type: isMedia.type,
3356
- controls: controls ?? null,
3357
- effects: _experimentalEffects ?? [],
3358
- displayName: timelineClipName,
3359
- doesVolumeChange: isMedia.data.doesVolumeChange,
3360
- duration: actualDurationInFrames,
3361
- from,
3362
- id,
3363
- loopDisplay,
3364
- nonce: nonce.get(),
3365
- parent: parentSequence?.id ?? null,
3366
- playbackRate: isMedia.data.playbackRate,
3367
- postmountDisplay: postmountDisplay ?? null,
3368
- premountDisplay: premountDisplay ?? null,
3369
- rootId,
3370
- showInTimeline,
3371
- src: isMedia.data.src,
3372
- getStack: () => stackRef.current,
3373
- startMediaFrom: isMedia.data.startMediaFrom,
3374
- volume: isMedia.data.volumes
3375
- });
3403
+ if (isMedia.type === "image") {
3404
+ registerSequence({
3405
+ type: "image",
3406
+ controls: controls ?? null,
3407
+ effects: _remotionInternalEffects ?? [],
3408
+ displayName: timelineClipName,
3409
+ duration: actualDurationInFrames,
3410
+ from,
3411
+ id,
3412
+ loopDisplay,
3413
+ nonce: nonce.get(),
3414
+ parent: parentSequence?.id ?? null,
3415
+ postmountDisplay: postmountDisplay ?? null,
3416
+ premountDisplay: premountDisplay ?? null,
3417
+ rootId,
3418
+ showInTimeline,
3419
+ src: isMedia.src,
3420
+ getStack: () => stackRef.current
3421
+ });
3422
+ } else {
3423
+ registerSequence({
3424
+ type: isMedia.type,
3425
+ controls: controls ?? null,
3426
+ effects: _remotionInternalEffects ?? [],
3427
+ displayName: timelineClipName,
3428
+ doesVolumeChange: isMedia.data.doesVolumeChange,
3429
+ duration: actualDurationInFrames,
3430
+ from,
3431
+ id,
3432
+ loopDisplay,
3433
+ nonce: nonce.get(),
3434
+ parent: parentSequence?.id ?? null,
3435
+ playbackRate: isMedia.data.playbackRate,
3436
+ postmountDisplay: postmountDisplay ?? null,
3437
+ premountDisplay: premountDisplay ?? null,
3438
+ rootId,
3439
+ showInTimeline,
3440
+ src: isMedia.data.src,
3441
+ getStack: () => stackRef.current,
3442
+ startMediaFrom: isMedia.data.startMediaFrom,
3443
+ volume: isMedia.data.volumes
3444
+ });
3445
+ }
3376
3446
  return () => {
3377
3447
  unregisterSequence(id);
3378
3448
  };
@@ -3392,7 +3462,7 @@ var RegularSequenceRefForwardingFunction = ({
3392
3462
  premountDisplay: premountDisplay ?? null,
3393
3463
  postmountDisplay: postmountDisplay ?? null,
3394
3464
  controls: controls ?? null,
3395
- effects: _experimentalEffects ?? []
3465
+ effects: _remotionInternalEffects ?? []
3396
3466
  });
3397
3467
  return () => {
3398
3468
  unregisterSequence(id);
@@ -3415,7 +3485,7 @@ var RegularSequenceRefForwardingFunction = ({
3415
3485
  postmountDisplay,
3416
3486
  env.isStudio,
3417
3487
  controls,
3418
- _experimentalEffects,
3488
+ _remotionInternalEffects,
3419
3489
  isMedia
3420
3490
  ]);
3421
3491
  const endThreshold = Math.ceil(cumulatedFrom + from + durationInFrames - 1);
@@ -3693,6 +3763,7 @@ var runEffectChain = async ({
3693
3763
  if (isCancelled()) {
3694
3764
  return false;
3695
3765
  }
3766
+ let flipWebGLSourceY = true;
3696
3767
  for (let runIndex = 0;runIndex < runs.length; runIndex++) {
3697
3768
  const run = runs[runIndex];
3698
3769
  const [a, b] = state.pool.getPair(run.backend);
@@ -3707,9 +3778,11 @@ var runEffectChain = async ({
3707
3778
  params: eff.params,
3708
3779
  width,
3709
3780
  height,
3710
- gpuDevice
3781
+ gpuDevice,
3782
+ flipSourceY: run.backend === "webgl2" ? flipWebGLSourceY : false
3711
3783
  });
3712
3784
  if (run.backend === "webgl2") {
3785
+ flipWebGLSourceY = false;
3713
3786
  state.pool.assertContextNotLost(dst);
3714
3787
  }
3715
3788
  currentImage = dst;
@@ -3718,12 +3791,20 @@ var runEffectChain = async ({
3718
3791
  lastTarget = currentImage ?? lastTarget;
3719
3792
  const nextRun = runs[runIndex + 1];
3720
3793
  if (nextRun && nextRun.backend !== run.backend && lastTarget) {
3721
- const bitmap = await createImageBitmap(lastTarget);
3722
- if (isCancelled()) {
3723
- bitmap.close();
3724
- return false;
3794
+ if (run.backend === "2d" && nextRun.backend === "webgl2") {
3795
+ currentImage = lastTarget;
3796
+ flipWebGLSourceY = true;
3797
+ } else {
3798
+ const bitmap = await createImageBitmap(lastTarget);
3799
+ if (isCancelled()) {
3800
+ bitmap.close();
3801
+ return false;
3802
+ }
3803
+ currentImage = bitmap;
3804
+ if (nextRun.backend === "webgl2") {
3805
+ flipWebGLSourceY = false;
3806
+ }
3725
3807
  }
3726
- currentImage = bitmap;
3727
3808
  }
3728
3809
  }
3729
3810
  if (!lastTarget) {
@@ -4169,7 +4250,7 @@ var AnimatedImageInner = ({
4169
4250
  className,
4170
4251
  style,
4171
4252
  durationInFrames,
4172
- _experimentalEffects: effects = [],
4253
+ effects = [],
4173
4254
  _experimentalControls: controls,
4174
4255
  ref,
4175
4256
  ...sequenceProps
@@ -4194,7 +4275,7 @@ var AnimatedImageInner = ({
4194
4275
  durationInFrames: resolvedDuration,
4195
4276
  name: "<AnimatedImage>",
4196
4277
  _experimentalControls: controls,
4197
- _experimentalEffects: memoizedEffectDefinitions,
4278
+ _remotionInternalEffects: memoizedEffectDefinitions,
4198
4279
  ...sequenceProps,
4199
4280
  children: /* @__PURE__ */ jsx13(AnimatedImageContent, {
4200
4281
  ...animatedImageProps,
@@ -4233,7 +4314,7 @@ var SolidInner = ({
4233
4314
  color,
4234
4315
  width,
4235
4316
  height,
4236
- _experimentalEffects: experimentalEffects = [],
4317
+ effects = [],
4237
4318
  className,
4238
4319
  style,
4239
4320
  overrideId,
@@ -4242,7 +4323,7 @@ var SolidInner = ({
4242
4323
  const { delayRender: delayRender2, continueRender: continueRender2, cancelRender: cancelRender2 } = useDelayRender();
4243
4324
  const [outputCanvas, setOutputCanvas] = useState7(null);
4244
4325
  const memoizedEffects = useMemoizedEffects({
4245
- effects: experimentalEffects,
4326
+ effects,
4246
4327
  overrideId: overrideId ?? null
4247
4328
  });
4248
4329
  const sourceCanvas = useMemo17(() => {
@@ -4322,7 +4403,7 @@ var SolidInner = ({
4322
4403
  });
4323
4404
  };
4324
4405
  var SolidOuter = forwardRef5(({
4325
- _experimentalEffects = [],
4406
+ effects = [],
4326
4407
  _experimentalControls: controls,
4327
4408
  color,
4328
4409
  height,
@@ -4336,14 +4417,14 @@ var SolidOuter = forwardRef5(({
4336
4417
  showInTimeline,
4337
4418
  ...props
4338
4419
  }, ref) => {
4339
- const memoizedEffectDefinitions = useMemoizedEffectDefinitions(_experimentalEffects);
4420
+ const memoizedEffectDefinitions = useMemoizedEffectDefinitions(effects);
4340
4421
  return /* @__PURE__ */ jsx14(Sequence, {
4341
4422
  layout: "none",
4342
4423
  from,
4343
4424
  hidden,
4344
4425
  showInTimeline,
4345
4426
  _experimentalControls: controls,
4346
- _experimentalEffects: memoizedEffectDefinitions,
4427
+ _remotionInternalEffects: memoizedEffectDefinitions,
4347
4428
  durationInFrames,
4348
4429
  name: name ?? "<Solid>",
4349
4430
  ...props,
@@ -4355,7 +4436,7 @@ var SolidOuter = forwardRef5(({
4355
4436
  width,
4356
4437
  className,
4357
4438
  style,
4358
- _experimentalEffects
4439
+ effects
4359
4440
  })
4360
4441
  });
4361
4442
  });
@@ -4570,7 +4651,7 @@ HtmlInCanvasContent.displayName = "HtmlInCanvasContent";
4570
4651
  var HtmlInCanvasInner = forwardRef6(({
4571
4652
  width,
4572
4653
  height,
4573
- _experimentalEffects: effects = [],
4654
+ effects = [],
4574
4655
  children,
4575
4656
  onPaint,
4576
4657
  onInit,
@@ -4587,7 +4668,7 @@ var HtmlInCanvasInner = forwardRef6(({
4587
4668
  durationInFrames: resolvedDuration,
4588
4669
  name: name ?? "<HtmlInCanvas>",
4589
4670
  _experimentalControls: controls,
4590
- _experimentalEffects: memoizedEffectDefinitions,
4671
+ _remotionInternalEffects: memoizedEffectDefinitions,
4591
4672
  layout: "none",
4592
4673
  ...sequenceProps,
4593
4674
  children: /* @__PURE__ */ jsx15(HtmlInCanvasContent, {
@@ -6109,85 +6190,6 @@ var useBasicMediaInTimeline = ({
6109
6190
  ]);
6110
6191
  return memoizedResult;
6111
6192
  };
6112
- var useImageInTimeline = ({
6113
- src,
6114
- displayName,
6115
- id,
6116
- getStack,
6117
- showInTimeline,
6118
- premountDisplay,
6119
- postmountDisplay,
6120
- loopDisplay,
6121
- controls
6122
- }) => {
6123
- const parentSequence = useContext24(SequenceContext);
6124
- const { registerSequence, unregisterSequence } = useContext24(SequenceManager);
6125
- const { durationInFrames } = useVideoConfig();
6126
- const mediaStartsAt = useMediaStartsAt();
6127
- const { duration, nonce, rootId, finalDisplayName } = useBasicMediaInTimeline({
6128
- volume: undefined,
6129
- mediaVolume: 0,
6130
- mediaType: "image",
6131
- src,
6132
- displayName,
6133
- trimAfter: undefined,
6134
- trimBefore: undefined,
6135
- playbackRate: 1,
6136
- sequenceDurationInFrames: durationInFrames,
6137
- mediaStartsAt,
6138
- loop: false
6139
- });
6140
- const { isStudio } = useRemotionEnvironment();
6141
- useEffect8(() => {
6142
- if (!src) {
6143
- throw new Error("No src passed");
6144
- }
6145
- if (!isStudio && window.process?.env?.NODE_ENV !== "test") {
6146
- return;
6147
- }
6148
- if (!showInTimeline) {
6149
- return;
6150
- }
6151
- registerSequence({
6152
- type: "image",
6153
- src,
6154
- id,
6155
- duration,
6156
- from: 0,
6157
- parent: parentSequence?.id ?? null,
6158
- displayName: finalDisplayName,
6159
- rootId,
6160
- showInTimeline: true,
6161
- nonce: nonce.get(),
6162
- loopDisplay,
6163
- getStack,
6164
- premountDisplay,
6165
- postmountDisplay,
6166
- controls,
6167
- effects: []
6168
- });
6169
- return () => {
6170
- unregisterSequence(id);
6171
- };
6172
- }, [
6173
- duration,
6174
- id,
6175
- parentSequence,
6176
- src,
6177
- registerSequence,
6178
- unregisterSequence,
6179
- nonce,
6180
- getStack,
6181
- showInTimeline,
6182
- premountDisplay,
6183
- postmountDisplay,
6184
- isStudio,
6185
- loopDisplay,
6186
- rootId,
6187
- finalDisplayName,
6188
- controls
6189
- ]);
6190
- };
6191
6193
  var useMediaInTimeline = ({
6192
6194
  volume,
6193
6195
  mediaVolume,
@@ -7874,34 +7876,28 @@ var ImgInner = ({
7874
7876
  stack,
7875
7877
  showInTimeline,
7876
7878
  src,
7879
+ from,
7880
+ durationInFrames,
7877
7881
  _experimentalControls: controls,
7878
7882
  ...props2
7879
7883
  }) => {
7880
- const sequenceContext = useContext32(SequenceContext);
7881
- const [timelineId] = useState17(() => String(Math.random()));
7882
7884
  if (!src) {
7883
7885
  throw new Error('No "src" prop was passed to <Img>.');
7884
7886
  }
7885
- const stackRef = useRef21(null);
7886
- stackRef.current = stack ?? null;
7887
- const getStack = useCallback17(() => stackRef.current, []);
7888
- useImageInTimeline({
7889
- src,
7890
- displayName: name ?? null,
7891
- id: timelineId,
7892
- getStack,
7887
+ return /* @__PURE__ */ jsx26(Sequence, {
7888
+ layout: "none",
7889
+ from: from ?? 0,
7890
+ durationInFrames: durationInFrames ?? Infinity,
7891
+ _remotionInternalStack: stack,
7892
+ _remotionInternalIsMedia: { type: "image", src },
7893
+ name: name ?? "<Img>",
7894
+ _experimentalControls: controls,
7893
7895
  showInTimeline: showInTimeline ?? true,
7894
- premountDisplay: sequenceContext?.premountDisplay ?? null,
7895
- postmountDisplay: sequenceContext?.postmountDisplay ?? null,
7896
- loopDisplay: undefined,
7897
- controls: controls ?? null
7898
- });
7899
- if (hidden) {
7900
- return null;
7901
- }
7902
- return /* @__PURE__ */ jsx26(ImgContent, {
7903
- src,
7904
- ...props2
7896
+ hidden,
7897
+ children: /* @__PURE__ */ jsx26(ImgContent, {
7898
+ src,
7899
+ ...props2
7900
+ })
7905
7901
  });
7906
7902
  };
7907
7903
  var imgSchema = {
@@ -7918,9 +7914,9 @@ var CompositionManagerProvider = ({
7918
7914
  initialCompositions,
7919
7915
  initialCanvasContent
7920
7916
  }) => {
7921
- const [folders, setFolders] = useState18([]);
7922
- const [canvasContent, setCanvasContent] = useState18(initialCanvasContent);
7923
- const [compositions, setCompositions] = useState18(initialCompositions);
7917
+ const [folders, setFolders] = useState17([]);
7918
+ const [canvasContent, setCanvasContent] = useState17(initialCanvasContent);
7919
+ const [compositions, setCompositions] = useState17(initialCompositions);
7924
7920
  const currentcompositionsRef = useRef22(compositions);
7925
7921
  const updateCompositions = useCallback18((updateComps) => {
7926
7922
  setCompositions((comps) => {
@@ -8516,7 +8512,7 @@ var OffthreadVideoForRendering = ({
8516
8512
  toneMapped
8517
8513
  });
8518
8514
  }, [toneMapped, currentTime, src, transparent]);
8519
- const [imageSrc, setImageSrc] = useState19(null);
8515
+ const [imageSrc, setImageSrc] = useState18(null);
8520
8516
  const { delayRender: delayRender2, continueRender: continueRender2 } = useDelayRender();
8521
8517
  useLayoutEffect11(() => {
8522
8518
  if (!window.remotion_videoEnabled) {
@@ -8714,7 +8710,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
8714
8710
  const parentSequence = useContext35(SequenceContext);
8715
8711
  const logLevel = useLogLevel();
8716
8712
  const mountTime = useMountTime();
8717
- const [timelineId] = useState20(() => String(Math.random()));
8713
+ const [timelineId] = useState19(() => String(Math.random()));
8718
8714
  if (typeof acceptableTimeShift !== "undefined") {
8719
8715
  throw new Error("acceptableTimeShift has been removed. Use acceptableTimeShiftInSeconds instead.");
8720
8716
  }
@@ -8783,7 +8779,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
8783
8779
  useImperativeHandle8(ref, () => {
8784
8780
  return videoRef.current;
8785
8781
  }, []);
8786
- useState20(() => playbackLogging({
8782
+ useState19(() => playbackLogging({
8787
8783
  logLevel,
8788
8784
  message: `Mounting video with source = ${actualSrc}, v=${VERSION}, user agent=${typeof navigator === "undefined" ? "server" : navigator.userAgent}`,
8789
8785
  tag: "video",
@@ -11961,7 +11957,7 @@ var getDefaultConfig = () => {
11961
11957
  var twMerge = /* @__PURE__ */ createTailwindMerge(getDefaultConfig);
11962
11958
 
11963
11959
  // ../design/dist/esm/index.mjs
11964
- import React33, { useEffect as useEffect20, useMemo as useMemo42, useState as useState21 } from "react";
11960
+ import React33, { useEffect as useEffect20, useMemo as useMemo42, useState as useState20 } from "react";
11965
11961
 
11966
11962
  // ../paths/dist/esm/index.mjs
11967
11963
  var cutLInstruction = ({
@@ -16702,7 +16698,7 @@ var getAngle = (ref, coordinates) => {
16702
16698
  };
16703
16699
  var lastCoordinates = null;
16704
16700
  var useMousePosition = (ref) => {
16705
- const [angle, setAngle] = useState21(getAngle(ref.current, lastCoordinates));
16701
+ const [angle, setAngle] = useState20(getAngle(ref.current, lastCoordinates));
16706
16702
  useEffect20(() => {
16707
16703
  const element = ref.current;
16708
16704
  if (!element) {
@@ -25372,14 +25368,14 @@ import { createContext as createContext32 } from "react";
25372
25368
  import { jsx as jsx56, jsxs as jsxs13 } from "react/jsx-runtime";
25373
25369
  import { jsx as jsx214, jsxs as jsxs24, Fragment as Fragment11 } from "react/jsx-runtime";
25374
25370
  import React56 from "react";
25375
- import { useContext as useContext210, useEffect as useEffect42, useState as useState38 } from "react";
25371
+ import { useContext as useContext210, useEffect as useEffect42, useState as useState39 } from "react";
25376
25372
  import { useContext as useContext44, useLayoutEffect as useLayoutEffect17 } from "react";
25377
25373
  import { jsx as jsx313 } from "react/jsx-runtime";
25378
- import { useEffect as useEffect24, useState as useState210 } from "react";
25374
+ import { useEffect as useEffect24, useState as useState24 } from "react";
25379
25375
  import { useLayoutEffect as useLayoutEffect23 } from "react";
25380
25376
  import { useContext as useContext45, useEffect as useEffect52, useRef as useRef43 } from "react";
25381
25377
  import { useEffect as useEffect310, useRef as useRef27 } from "react";
25382
- import { useCallback as useCallback35, useContext as useContext39, useMemo as useMemo52, useRef as useRef44, useState as useState39 } from "react";
25378
+ import { useCallback as useCallback35, useContext as useContext39, useMemo as useMemo52, useRef as useRef44, useState as useState310 } from "react";
25383
25379
  import { useEffect as useEffect43, useRef as useRef310 } from "react";
25384
25380
  import { useCallback as useCallback210, useEffect as useEffect62, useMemo as useMemo212, useState as useState42 } from "react";
25385
25381
  import {
@@ -26836,7 +26832,7 @@ var useBufferStateEmitter = (emitter) => {
26836
26832
  }, [bufferManager, emitter]);
26837
26833
  };
26838
26834
  var PlayerEmitterProvider = ({ children, currentPlaybackRate }) => {
26839
- const [emitter] = useState38(() => new PlayerEmitter);
26835
+ const [emitter] = useState39(() => new PlayerEmitter);
26840
26836
  const bufferManager = useContext210(Internals.BufferingContextReact);
26841
26837
  if (!bufferManager) {
26842
26838
  throw new Error("BufferingContextReact not found");
@@ -26853,7 +26849,7 @@ var PlayerEmitterProvider = ({ children, currentPlaybackRate }) => {
26853
26849
  });
26854
26850
  };
26855
26851
  var useHoverState = (ref, hideControlsWhenPointerDoesntMove) => {
26856
- const [hovered, setHovered] = useState210(false);
26852
+ const [hovered, setHovered] = useState24(false);
26857
26853
  useEffect24(() => {
26858
26854
  const { current } = ref;
26859
26855
  if (!current) {
@@ -26894,7 +26890,7 @@ var useHoverState = (ref, hideControlsWhenPointerDoesntMove) => {
26894
26890
  };
26895
26891
  var usePlayer = () => {
26896
26892
  const [playing, setPlaying, imperativePlaying] = Internals.Timeline.usePlayingState();
26897
- const [hasPlayed, setHasPlayed] = useState39(false);
26893
+ const [hasPlayed, setHasPlayed] = useState310(false);
26898
26894
  const frame = Internals.Timeline.useTimelinePosition();
26899
26895
  const playStart = useRef44(frame);
26900
26896
  const setFrame = Internals.Timeline.useTimelineSetFrame();
@@ -29934,7 +29930,7 @@ import {
29934
29930
  useEffect as useEffect58,
29935
29931
  useMemo as useMemo66,
29936
29932
  useRef as useRef55,
29937
- useState as useState56
29933
+ useState as useState54
29938
29934
  } from "react";
29939
29935
 
29940
29936
  // ../../node_modules/.bun/@babel+runtime@7.27.1/node_modules/@babel/runtime/helpers/esm/extends.js
@@ -30708,7 +30704,7 @@ function useColorMode() {
30708
30704
  }
30709
30705
 
30710
30706
  // ../media/dist/esm/index.mjs
30711
- import { useState as useState311 } from "react";
30707
+ import { useState as useState312 } from "react";
30712
30708
  import { useMemo as useMemo312 } from "react";
30713
30709
  import { useContext as useContext212, useEffect as useEffect44, useMemo as useMemo56, useRef as useRef46, useState as useState40 } from "react";
30714
30710
  import { ALL_FORMATS, Input as Input2, UrlSource } from "mediabunny";
@@ -30716,7 +30712,7 @@ import { AudioBufferSink, InputDisposedError } from "mediabunny";
30716
30712
  import { CanvasSink } from "mediabunny";
30717
30713
  import { useContext as useContext48, useLayoutEffect as useLayoutEffect18 } from "react";
30718
30714
  import { jsx as jsx58 } from "react/jsx-runtime";
30719
- import { useContext as useContext311, useLayoutEffect as useLayoutEffect24, useMemo as useMemo213, useState as useState212 } from "react";
30715
+ import { useContext as useContext311, useLayoutEffect as useLayoutEffect24, useMemo as useMemo213, useState as useState210 } from "react";
30720
30716
  import React211 from "react";
30721
30717
  import {
30722
30718
  ALL_FORMATS as ALL_FORMATS2,
@@ -31552,6 +31548,83 @@ var makeNonceManager = () => {
31552
31548
  createAsyncOperation
31553
31549
  };
31554
31550
  };
31551
+
31552
+ class PremountAwareDelayPlayback {
31553
+ isPremounting;
31554
+ isPostmounting;
31555
+ activeHandles = new Set;
31556
+ delayPlayback;
31557
+ constructor({
31558
+ bufferState,
31559
+ isPremounting,
31560
+ isPostmounting
31561
+ }) {
31562
+ this.delayPlayback = bufferState.delayPlayback;
31563
+ this.isPremounting = isPremounting;
31564
+ this.isPostmounting = isPostmounting;
31565
+ }
31566
+ shouldDelayPlayback() {
31567
+ return !this.isPremounting && !this.isPostmounting;
31568
+ }
31569
+ syncHandles() {
31570
+ for (const handle of this.activeHandles) {
31571
+ if (this.shouldDelayPlayback()) {
31572
+ handle.arm();
31573
+ } else {
31574
+ handle.disarm();
31575
+ }
31576
+ }
31577
+ }
31578
+ setIsPremounting(isPremounting) {
31579
+ this.isPremounting = isPremounting;
31580
+ this.syncHandles();
31581
+ }
31582
+ setIsPostmounting(isPostmounting) {
31583
+ this.isPostmounting = isPostmounting;
31584
+ this.syncHandles();
31585
+ }
31586
+ createHandle() {
31587
+ let armed = false;
31588
+ let unblock = null;
31589
+ let disposed = false;
31590
+ const arm = () => {
31591
+ if (armed || disposed) {
31592
+ return;
31593
+ }
31594
+ unblock = this.delayPlayback().unblock;
31595
+ armed = true;
31596
+ };
31597
+ const disarm = () => {
31598
+ if (!armed) {
31599
+ return;
31600
+ }
31601
+ unblock?.();
31602
+ unblock = null;
31603
+ armed = false;
31604
+ };
31605
+ const entry = {
31606
+ arm,
31607
+ disarm,
31608
+ dispose: () => {}
31609
+ };
31610
+ entry.dispose = () => {
31611
+ if (disposed) {
31612
+ return;
31613
+ }
31614
+ disposed = true;
31615
+ disarm();
31616
+ this.activeHandles.delete(entry);
31617
+ };
31618
+ this.activeHandles.add(entry);
31619
+ if (this.shouldDelayPlayback()) {
31620
+ arm();
31621
+ }
31622
+ return {
31623
+ unblock: entry.dispose,
31624
+ [Symbol.dispose]: entry.dispose
31625
+ };
31626
+ }
31627
+ }
31555
31628
  var BUFFER_SIZE = 3;
31556
31629
  var canvasesAheadOfTime = (videoSink, startTimestamp) => {
31557
31630
  const iterator = videoSink.canvases(startTimestamp);
@@ -31972,9 +32045,7 @@ class MediaPlayer {
31972
32045
  getEffects;
31973
32046
  getEffectChainState;
31974
32047
  initializationPromise = null;
31975
- bufferState;
31976
- isPremounting;
31977
- isPostmounting;
32048
+ premountAwareDelayPlayback;
31978
32049
  seekPromiseChain = Promise.resolve();
31979
32050
  constructor({
31980
32051
  canvas,
@@ -32013,9 +32084,11 @@ class MediaPlayer {
32013
32084
  this.audioStreamIndex = audioStreamIndex;
32014
32085
  this.fps = fps;
32015
32086
  this.debugOverlay = debugOverlay;
32016
- this.bufferState = bufferState;
32017
- this.isPremounting = isPremounting;
32018
- this.isPostmounting = isPostmounting;
32087
+ this.premountAwareDelayPlayback = new PremountAwareDelayPlayback({
32088
+ bufferState,
32089
+ isPremounting,
32090
+ isPostmounting
32091
+ });
32019
32092
  this.sequenceDurationInFrames = durationInFrames;
32020
32093
  this.nonceManager = makeNonceManager();
32021
32094
  this.onVideoFrameCallback = onVideoFrameCallback;
@@ -32271,19 +32344,7 @@ class MediaPlayer {
32271
32344
  this.drawDebugOverlay();
32272
32345
  }
32273
32346
  delayPlaybackHandleIfNotPremounting = () => {
32274
- if (this.isPremounting || this.isPostmounting) {
32275
- return {
32276
- unblock: () => {},
32277
- [Symbol.dispose]: () => {}
32278
- };
32279
- }
32280
- const { unblock } = this.bufferState.delayPlayback();
32281
- return {
32282
- unblock,
32283
- [Symbol.dispose]: () => {
32284
- unblock();
32285
- }
32286
- };
32347
+ return this.premountAwareDelayPlayback.createHandle();
32287
32348
  };
32288
32349
  pause() {
32289
32350
  if (!this.playing) {
@@ -32356,10 +32417,10 @@ class MediaPlayer {
32356
32417
  }
32357
32418
  }
32358
32419
  setIsPremounting(isPremounting) {
32359
- this.isPremounting = isPremounting;
32420
+ this.premountAwareDelayPlayback.setIsPremounting(isPremounting);
32360
32421
  }
32361
32422
  setIsPostmounting(isPostmounting) {
32362
- this.isPostmounting = isPostmounting;
32423
+ this.premountAwareDelayPlayback.setIsPostmounting(isPostmounting);
32363
32424
  }
32364
32425
  async setLoop(loop, unloopedTimeInSeconds) {
32365
32426
  const previousLoop = this.loop;
@@ -34805,7 +34866,7 @@ var AudioForRendering2 = ({
34805
34866
  }
34806
34867
  const { fps } = videoConfig;
34807
34868
  const { delayRender: delayRender2, continueRender } = useDelayRender();
34808
- const [replaceWithHtml5Audio, setReplaceWithHtml5Audio] = useState212(false);
34869
+ const [replaceWithHtml5Audio, setReplaceWithHtml5Audio] = useState210(false);
34809
34870
  const sequenceContext = useContext311(Internals.SequenceContext);
34810
34871
  const id = useMemo213(() => `media-audio-${random(src)}-${sequenceContext?.cumulatedFrom}-${sequenceContext?.relativeFrom}-${sequenceContext?.durationInFrames}`, [
34811
34872
  src,
@@ -35021,7 +35082,7 @@ var AudioInner = (props) => {
35021
35082
  mediaStartsAt,
35022
35083
  loop: props.loop ?? false
35023
35084
  });
35024
- const [mediaDurationInSeconds, setMediaDurationInSeconds] = useState311(null);
35085
+ const [mediaDurationInSeconds, setMediaDurationInSeconds] = useState312(null);
35025
35086
  const loopDisplay = useMemo312(() => getLoopDisplay({
35026
35087
  loop: props.loop ?? false,
35027
35088
  mediaDurationInSeconds,
@@ -35148,7 +35209,7 @@ var VideoForPreviewAssertedShowing = ({
35148
35209
  credentials,
35149
35210
  objectFit: objectFitProp,
35150
35211
  _experimentalInitiallyDrawCachedFrame,
35151
- _experimentalEffects,
35212
+ effects,
35152
35213
  setMediaDurationInSeconds
35153
35214
  }) => {
35154
35215
  const src = usePreload22(unpreloadedSrc);
@@ -35178,8 +35239,8 @@ var VideoForPreviewAssertedShowing = ({
35178
35239
  }
35179
35240
  warnAboutTooHighVolume22(userPreferredVolume);
35180
35241
  const effectChainState = useEffectChainState2();
35181
- const experimentalEffectsRef = useRef210(_experimentalEffects);
35182
- experimentalEffectsRef.current = _experimentalEffects;
35242
+ const effectsRef = useRef210(effects);
35243
+ effectsRef.current = effects;
35183
35244
  const effectChainStateRef = useRef210(effectChainState);
35184
35245
  effectChainStateRef.current = effectChainState;
35185
35246
  const parentSequence = useContext47(SequenceContext22);
@@ -35286,7 +35347,7 @@ var VideoForPreviewAssertedShowing = ({
35286
35347
  sequenceOffset: initialSequenceOffset.current,
35287
35348
  credentials,
35288
35349
  tagType: "video",
35289
- getEffects: () => experimentalEffectsRef.current,
35350
+ getEffects: () => effectsRef.current,
35290
35351
  getEffectChainState: (width, height) => effectChainStateRef.current?.get(width, height)
35291
35352
  });
35292
35353
  mediaPlayerRef.current = player;
@@ -35428,7 +35489,7 @@ var VideoForPreviewAssertedShowing = ({
35428
35489
  return;
35429
35490
  }
35430
35491
  mediaPlayer.redrawVideoEffects().catch(() => {});
35431
- }, [_experimentalEffects, mediaPlayerReady, mediaPlayerRef]);
35492
+ }, [effects, mediaPlayerReady, mediaPlayerRef]);
35432
35493
  const actualStyle = useMemo412(() => {
35433
35494
  return {
35434
35495
  ...style2,
@@ -35845,7 +35906,7 @@ var InnerVideo = ({
35845
35906
  _experimentalControls: controls,
35846
35907
  objectFit,
35847
35908
  _experimentalInitiallyDrawCachedFrame,
35848
- _experimentalEffects,
35909
+ effects,
35849
35910
  setMediaDurationInSeconds
35850
35911
  }) => {
35851
35912
  const environment = useRemotionEnvironment();
@@ -35917,7 +35978,7 @@ var InnerVideo = ({
35917
35978
  credentials,
35918
35979
  controls,
35919
35980
  objectFit,
35920
- _experimentalEffects,
35981
+ effects,
35921
35982
  _experimentalInitiallyDrawCachedFrame
35922
35983
  });
35923
35984
  };
@@ -35950,7 +36011,7 @@ var VideoInner = ({
35950
36011
  _experimentalControls: controls,
35951
36012
  objectFit,
35952
36013
  _experimentalInitiallyDrawCachedFrame,
35953
- _experimentalEffects,
36014
+ effects,
35954
36015
  durationInFrames,
35955
36016
  from,
35956
36017
  hidden
@@ -35996,10 +36057,10 @@ var VideoInner = ({
35996
36057
  data: basicInfo
35997
36058
  }), [basicInfo]);
35998
36059
  const memoizedEffects = Internals.useMemoizedEffects({
35999
- effects: _experimentalEffects ?? [],
36060
+ effects: effects ?? [],
36000
36061
  overrideId: controls?.overrideId ?? null
36001
36062
  });
36002
- const memoizedEffectDefinitions = Internals.useMemoizedEffectDefinitions(_experimentalEffects ?? []);
36063
+ const memoizedEffectDefinitions = Internals.useMemoizedEffectDefinitions(effects ?? []);
36003
36064
  if (sequenceDurationInFrames === 0) {
36004
36065
  return null;
36005
36066
  }
@@ -36012,7 +36073,7 @@ var VideoInner = ({
36012
36073
  name: name ?? "<Video>",
36013
36074
  _experimentalControls: controls,
36014
36075
  _remotionInternalLoopDisplay: loopDisplay,
36015
- _experimentalEffects: memoizedEffectDefinitions,
36076
+ _remotionInternalEffects: memoizedEffectDefinitions,
36016
36077
  showInTimeline: showInTimeline ?? true,
36017
36078
  hidden,
36018
36079
  children: /* @__PURE__ */ jsx65(InnerVideo, {
@@ -36043,7 +36104,7 @@ var VideoInner = ({
36043
36104
  _experimentalControls: controls,
36044
36105
  objectFit: objectFit ?? "contain",
36045
36106
  _experimentalInitiallyDrawCachedFrame: _experimentalInitiallyDrawCachedFrame ?? false,
36046
- _experimentalEffects: memoizedEffects,
36107
+ effects: memoizedEffects,
36047
36108
  setMediaDurationInSeconds
36048
36109
  })
36049
36110
  });
@@ -36052,7 +36113,7 @@ var Video = Internals.wrapInSchema(VideoInner, videoSchema);
36052
36113
  Internals.addSequenceStackTraces(Video);
36053
36114
 
36054
36115
  // src/components/homepage/Demo/Comp.tsx
36055
- import { useCallback as useCallback43, useEffect as useEffect50, useMemo as useMemo59, useState as useState48 } from "react";
36116
+ import { useCallback as useCallback43, useEffect as useEffect50, useMemo as useMemo59, useState as useState47 } from "react";
36056
36117
 
36057
36118
  // src/components/homepage/Demo/Cards.tsx
36058
36119
  import {
@@ -36060,7 +36121,7 @@ import {
36060
36121
  useCallback as useCallback41,
36061
36122
  useEffect as useEffect49,
36062
36123
  useRef as useRef50,
36063
- useState as useState47
36124
+ useState as useState46
36064
36125
  } from "react";
36065
36126
 
36066
36127
  // src/components/homepage/Demo/Card.tsx
@@ -36433,7 +36494,7 @@ import {
36433
36494
 
36434
36495
  // ../lottie/dist/esm/index.mjs
36435
36496
  import lottie from "lottie-web";
36436
- import { useEffect as useEffect46, useRef as useRef48, useState as useState44 } from "react";
36497
+ import { useEffect as useEffect46, useRef as useRef48, useState as useState41 } from "react";
36437
36498
  import { jsx as jsx69 } from "react/jsx-runtime";
36438
36499
  var getLottieMetadata = (animationData) => {
36439
36500
  const width2 = animationData.w;
@@ -36508,7 +36569,7 @@ var Lottie = ({
36508
36569
  const onAnimationLoadedRef = useRef48(onAnimationLoaded);
36509
36570
  onAnimationLoadedRef.current = onAnimationLoaded;
36510
36571
  const { delayRender: delayRender2, continueRender } = useDelayRender();
36511
- const [handle] = useState44(() => delayRender2("Waiting for Lottie animation to load"));
36572
+ const [handle] = useState41(() => delayRender2("Waiting for Lottie animation to load"));
36512
36573
  useEffect46(() => {
36513
36574
  return () => {
36514
36575
  continueRender(handle);
@@ -36604,12 +36665,12 @@ var Lottie = ({
36604
36665
  };
36605
36666
 
36606
36667
  // src/components/homepage/Demo/DisplayedEmoji.tsx
36607
- import { useEffect as useEffect47, useMemo as useMemo57, useState as useState46 } from "react";
36668
+ import { useEffect as useEffect47, useMemo as useMemo57, useState as useState44 } from "react";
36608
36669
  import { jsx as jsx70 } from "react/jsx-runtime";
36609
36670
  var DisplayedEmoji = ({ emoji }) => {
36610
- const [data, setData] = useState46(null);
36671
+ const [data, setData] = useState44(null);
36611
36672
  const { durationInFrames, fps } = useVideoConfig();
36612
- const [browser, setBrowser] = useState46(typeof document !== "undefined");
36673
+ const [browser, setBrowser] = useState44(typeof document !== "undefined");
36613
36674
  const { delayRender: delayRender2, continueRender, cancelRender: cancelRender2 } = useDelayRender();
36614
36675
  const src = useMemo57(() => {
36615
36676
  if (emoji === "melting") {
@@ -36623,7 +36684,7 @@ var DisplayedEmoji = ({ emoji }) => {
36623
36684
  }
36624
36685
  throw new Error("Unknown emoji");
36625
36686
  }, [emoji]);
36626
- const [handle] = useState46(() => delayRender2("Loading emojis!"));
36687
+ const [handle] = useState44(() => delayRender2("Loading emojis!"));
36627
36688
  useEffect47(() => {
36628
36689
  fetch(src).then((res) => res.json()).then((json) => {
36629
36690
  setData({
@@ -37155,7 +37216,7 @@ var Cards = ({
37155
37216
  trending
37156
37217
  }) => {
37157
37218
  const container4 = useRef50(null);
37158
- const [refs] = useState47(() => {
37219
+ const [refs] = useState46(() => {
37159
37220
  return new Array(4).fill(true).map(() => {
37160
37221
  return createRef4();
37161
37222
  });
@@ -37253,7 +37314,7 @@ var HomepageVideoComp = ({
37253
37314
  onClickLeft,
37254
37315
  onClickRight
37255
37316
  }) => {
37256
- const [rerenders, setRerenders] = useState48(0);
37317
+ const [rerenders, setRerenders] = useState47(0);
37257
37318
  const onUpdate = useCallback43((newIndices) => {
37258
37319
  setRerenders(rerenders + 1);
37259
37320
  updateCardOrder(newIndices);
@@ -37352,7 +37413,7 @@ import {
37352
37413
  import { BufferTarget, StreamTarget } from "mediabunny";
37353
37414
 
37354
37415
  // ../core/dist/esm/version.mjs
37355
- var VERSION2 = "4.0.464";
37416
+ var VERSION2 = "4.0.465";
37356
37417
 
37357
37418
  // ../web-renderer/dist/esm/index.mjs
37358
37419
  import { AudioSample, VideoSample } from "mediabunny";
@@ -37360,7 +37421,7 @@ import { AudioSampleSource } from "mediabunny";
37360
37421
  import { createRef as createRef6 } from "react";
37361
37422
  import { flushSync as flushSync22 } from "react-dom";
37362
37423
  import ReactDOM6 from "react-dom/client";
37363
- import { useImperativeHandle as useImperativeHandle13, useState as useState49 } from "react";
37424
+ import { useImperativeHandle as useImperativeHandle13, useState as useState48 } from "react";
37364
37425
  import { flushSync as flushSync3 } from "react-dom";
37365
37426
  import { jsx as jsx88 } from "react/jsx-runtime";
37366
37427
  import { jsx as jsx217 } from "react/jsx-runtime";
@@ -37991,7 +38052,7 @@ var UpdateTime = ({
37991
38052
  initialFrame,
37992
38053
  timeUpdater
37993
38054
  }) => {
37994
- const [frame, setFrame] = useState49(initialFrame);
38055
+ const [frame, setFrame] = useState48(initialFrame);
37995
38056
  useImperativeHandle13(timeUpdater, () => ({
37996
38057
  update: (f) => {
37997
38058
  flushSync3(() => {
@@ -42357,12 +42418,12 @@ var DragAndDropNudge = () => {
42357
42418
  };
42358
42419
 
42359
42420
  // src/components/homepage/Demo/PlayerSeekBar.tsx
42360
- import { useCallback as useCallback47, useEffect as useEffect53, useMemo as useMemo64, useRef as useRef51, useState as useState51 } from "react";
42421
+ import { useCallback as useCallback47, useEffect as useEffect53, useMemo as useMemo64, useRef as useRef51, useState as useState50 } from "react";
42361
42422
 
42362
42423
  // src/components/homepage/layout/use-el-size.ts
42363
- import { useCallback as useCallback46, useEffect as useEffect51, useMemo as useMemo61, useState as useState50 } from "react";
42424
+ import { useCallback as useCallback46, useEffect as useEffect51, useMemo as useMemo61, useState as useState49 } from "react";
42364
42425
  var useElementSize2 = (ref) => {
42365
- const [size4, setSize] = useState50(null);
42426
+ const [size4, setSize] = useState49(null);
42366
42427
  const observer = useMemo61(() => {
42367
42428
  if (typeof ResizeObserver === "undefined") {
42368
42429
  return;
@@ -42439,7 +42500,7 @@ var findBodyInWhichDivIsLocated2 = (div) => {
42439
42500
  return current;
42440
42501
  };
42441
42502
  var useHoverState2 = (ref, hideControlsWhenPointerDoesntMove) => {
42442
- const [hovered, setHovered] = useState51(false);
42503
+ const [hovered, setHovered] = useState50(false);
42443
42504
  useEffect53(() => {
42444
42505
  const { current } = ref;
42445
42506
  if (!current) {
@@ -42489,8 +42550,8 @@ var PlayerSeekBar2 = ({
42489
42550
  const containerRef = useRef51(null);
42490
42551
  const barHovered = useHoverState2(containerRef, false);
42491
42552
  const size4 = useElementSize2(containerRef.current);
42492
- const [playing, setPlaying] = useState51(false);
42493
- const [frame, setFrame] = useState51(0);
42553
+ const [playing, setPlaying] = useState50(false);
42554
+ const [frame, setFrame] = useState50(0);
42494
42555
  useEffect53(() => {
42495
42556
  const { current } = playerRef;
42496
42557
  if (!current) {
@@ -42522,7 +42583,7 @@ var PlayerSeekBar2 = ({
42522
42583
  current.removeEventListener("pause", onPause);
42523
42584
  };
42524
42585
  }, [playerRef]);
42525
- const [dragging, setDragging] = useState51({
42586
+ const [dragging, setDragging] = useState50({
42526
42587
  dragging: false
42527
42588
  });
42528
42589
  const width2 = size4?.width ?? 0;
@@ -42635,7 +42696,7 @@ var PlayerSeekBar2 = ({
42635
42696
  };
42636
42697
 
42637
42698
  // src/components/homepage/Demo/PlayerVolume.tsx
42638
- import { useCallback as useCallback48, useEffect as useEffect55, useRef as useRef53, useState as useState54 } from "react";
42699
+ import { useCallback as useCallback48, useEffect as useEffect55, useRef as useRef53, useState as useState51 } from "react";
42639
42700
 
42640
42701
  // src/components/homepage/Demo/icons.tsx
42641
42702
  import { jsx as jsx101 } from "react/jsx-runtime";
@@ -42693,8 +42754,8 @@ var IsMutedIcon = (props) => {
42693
42754
  // src/components/homepage/Demo/PlayerVolume.tsx
42694
42755
  import { jsx as jsx105 } from "react/jsx-runtime";
42695
42756
  var PlayerVolume = ({ playerRef }) => {
42696
- const [muted, setIsMuted] = useState54(() => playerRef.current?.isMuted() ?? true);
42697
- const [isHovered, setIsHovered] = useState54(false);
42757
+ const [muted, setIsMuted] = useState51(() => playerRef.current?.isMuted() ?? true);
42758
+ const [isHovered, setIsHovered] = useState51(false);
42698
42759
  const timerRef = useRef53(null);
42699
42760
  useEffect55(() => {
42700
42761
  const { current } = playerRef;
@@ -42983,12 +43044,12 @@ var playerWrapper = {
42983
43044
  };
42984
43045
  var Demo = () => {
42985
43046
  const { colorMode } = useColorMode();
42986
- const [data2, setData] = useState56(null);
43047
+ const [data2, setData] = useState54(null);
42987
43048
  const ref = useRef55(null);
42988
- const [isFullscreen, setIsFullscreen] = useState56(false);
42989
- const [cardOrder, setCardOrder] = useState56([0, 1, 2, 3]);
42990
- const [emojiIndex, setEmojiIndex] = useState56(0);
42991
- const [error2, setError] = useState56(false);
43049
+ const [isFullscreen, setIsFullscreen] = useState54(false);
43050
+ const [cardOrder, setCardOrder] = useState54([0, 1, 2, 3]);
43051
+ const [emojiIndex, setEmojiIndex] = useState54(0);
43052
+ const [error2, setError] = useState54(false);
42992
43053
  useEffect58(() => {
42993
43054
  getDataAndProps().then((d2) => {
42994
43055
  setData(d2);
@@ -43147,7 +43208,7 @@ import { forwardRef as forwardRef39, useEffect as useEffect60, useImperativeHand
43147
43208
  // src/components/homepage/VideoPlayerWithControls.tsx
43148
43209
  import Hls from "hls.js";
43149
43210
  import"plyr/dist/plyr.css";
43150
- import { forwardRef as forwardRef38, useCallback as useCallback51, useEffect as useEffect59, useRef as useRef56, useState as useState57 } from "react";
43211
+ import { forwardRef as forwardRef38, useCallback as useCallback51, useEffect as useEffect59, useRef as useRef56, useState as useState56 } from "react";
43151
43212
  import { jsx as jsx116 } from "react/jsx-runtime";
43152
43213
  var useCombinedRefs = function(...refs) {
43153
43214
  const targetRef = useRef56(null);
@@ -43168,7 +43229,7 @@ var VideoPlayerWithControls = forwardRef38(({ playbackId, poster, currentTime, o
43168
43229
  const videoRef = useRef56(null);
43169
43230
  const metaRef = useCombinedRefs(ref, videoRef);
43170
43231
  const playerRef = useRef56(null);
43171
- const [playerInitTime] = useState57(Date.now());
43232
+ const [playerInitTime] = useState56(Date.now());
43172
43233
  const videoError = useCallback51((event) => onError(event), [onError]);
43173
43234
  const onImageLoad = useCallback51((event) => {
43174
43235
  const [w, h] = [event.target.width, event.target.height];
@@ -43368,10 +43429,10 @@ var EditorStarterSection = () => {
43368
43429
  var EditorStarterSection_default = EditorStarterSection;
43369
43430
 
43370
43431
  // src/components/homepage/EvaluateRemotion.tsx
43371
- import { useEffect as useEffect61, useState as useState58 } from "react";
43432
+ import { useEffect as useEffect61, useState as useState57 } from "react";
43372
43433
  import { jsx as jsx119, jsxs as jsxs40 } from "react/jsx-runtime";
43373
43434
  var EvaluateRemotionSection = () => {
43374
- const [dailyAvatars, setDailyAvatars] = useState58([]);
43435
+ const [dailyAvatars, setDailyAvatars] = useState57([]);
43375
43436
  useEffect61(() => {
43376
43437
  const avatars = experts.map((expert) => expert.image);
43377
43438
  const selectedAvatars = [];
@@ -43469,7 +43530,7 @@ var EvaluateRemotionSection = () => {
43469
43530
  var EvaluateRemotion_default = EvaluateRemotionSection;
43470
43531
 
43471
43532
  // src/components/homepage/IfYouKnowReact.tsx
43472
- import { useEffect as useEffect63, useState as useState59 } from "react";
43533
+ import { useEffect as useEffect63, useState as useState58 } from "react";
43473
43534
  import { jsx as jsx120, jsxs as jsxs41 } from "react/jsx-runtime";
43474
43535
  var isWebkit = () => {
43475
43536
  if (typeof window === "undefined") {
@@ -43484,7 +43545,7 @@ var icon2 = {
43484
43545
  marginLeft: 10
43485
43546
  };
43486
43547
  var IfYouKnowReact = () => {
43487
- const [vid, setVid] = useState59("/img/compose.webm");
43548
+ const [vid, setVid] = useState58("/img/compose.webm");
43488
43549
  useEffect63(() => {
43489
43550
  if (isWebkit()) {
43490
43551
  setVid("/img/compose.mp4");
@@ -43544,12 +43605,12 @@ var IfYouKnowReact = () => {
43544
43605
  };
43545
43606
 
43546
43607
  // src/components/homepage/NewsletterButton.tsx
43547
- import { useCallback as useCallback53, useState as useState60 } from "react";
43608
+ import { useCallback as useCallback53, useState as useState59 } from "react";
43548
43609
  import { jsx as jsx121, jsxs as jsxs44 } from "react/jsx-runtime";
43549
43610
  var NewsletterButton = () => {
43550
- const [email, setEmail] = useState60("");
43551
- const [submitting, setSubmitting] = useState60(false);
43552
- const [subscribed, setSubscribed] = useState60(false);
43611
+ const [email, setEmail] = useState59("");
43612
+ const [submitting, setSubmitting] = useState59(false);
43613
+ const [subscribed, setSubscribed] = useState59(false);
43553
43614
  const handleSubmit = useCallback53(async (e) => {
43554
43615
  try {
43555
43616
  setSubmitting(true);
@@ -43632,7 +43693,7 @@ var NewsletterButton = () => {
43632
43693
  };
43633
43694
 
43634
43695
  // src/components/homepage/ParameterizeAndEdit.tsx
43635
- import { useEffect as useEffect65, useRef as useRef58, useState as useState61 } from "react";
43696
+ import { useEffect as useEffect65, useRef as useRef58, useState as useState60 } from "react";
43636
43697
  import { jsx as jsx124, jsxs as jsxs46 } from "react/jsx-runtime";
43637
43698
  var icon3 = {
43638
43699
  height: 16,
@@ -43640,7 +43701,7 @@ var icon3 = {
43640
43701
  };
43641
43702
  var ParameterizeAndEdit = () => {
43642
43703
  const ref = useRef58(null);
43643
- const [vid, setVid] = useState61("/img/editing-vp9-chrome.webm");
43704
+ const [vid, setVid] = useState60("/img/editing-vp9-chrome.webm");
43644
43705
  useEffect65(() => {
43645
43706
  if (isWebkit()) {
43646
43707
  setVid("/img/editing-safari.mp4");
@@ -43755,7 +43816,7 @@ var ParameterizeAndEdit = () => {
43755
43816
  };
43756
43817
 
43757
43818
  // src/components/homepage/RealMp4Videos.tsx
43758
- import { useEffect as useEffect66, useRef as useRef59, useState as useState64 } from "react";
43819
+ import { useEffect as useEffect66, useRef as useRef59, useState as useState61 } from "react";
43759
43820
  import { jsx as jsx126, jsxs as jsxs47 } from "react/jsx-runtime";
43760
43821
  var icon4 = {
43761
43822
  height: 16,
@@ -43764,7 +43825,7 @@ var icon4 = {
43764
43825
  var RealMP4Videos = () => {
43765
43826
  const ref = useRef59(null);
43766
43827
  const videoRef = useRef59(null);
43767
- const [vid, setVid] = useState64("/img/render-progress.webm");
43828
+ const [vid, setVid] = useState61("/img/render-progress.webm");
43768
43829
  useEffect66(() => {
43769
43830
  if (isWebkit()) {
43770
43831
  setVid("/img/render-progress.mp4");
@@ -44016,7 +44077,7 @@ var TrustedByBanner = () => {
44016
44077
  var TrustedByBanner_default = TrustedByBanner;
44017
44078
 
44018
44079
  // src/components/homepage/VideoAppsShowcase.tsx
44019
- import { useRef as useRef60, useState as useState66 } from "react";
44080
+ import { useRef as useRef60, useState as useState64 } from "react";
44020
44081
  import { jsx as jsx128, jsxs as jsxs49 } from "react/jsx-runtime";
44021
44082
  var tabs = [
44022
44083
  "Music visualization",
@@ -44069,10 +44130,10 @@ var icon5 = {
44069
44130
  marginLeft: 10
44070
44131
  };
44071
44132
  var VideoAppsShowcase = () => {
44072
- const [activeTab, setActiveTab] = useState66(0);
44073
- const [isMuted, setIsMuted] = useState66(true);
44074
- const [isPlaying, setIsPlaying] = useState66(false);
44075
- const [videoLoaded, setVideoLoaded] = useState66(false);
44133
+ const [activeTab, setActiveTab] = useState64(0);
44134
+ const [isMuted, setIsMuted] = useState64(true);
44135
+ const [isPlaying, setIsPlaying] = useState64(false);
44136
+ const [videoLoaded, setVideoLoaded] = useState64(false);
44076
44137
  const videoRef = useRef60(null);
44077
44138
  const containerRef = useRef60(null);
44078
44139
  const handleTabChange = (index2) => {
@@ -45592,7 +45653,7 @@ var ChooseTemplate = () => {
45592
45653
  };
45593
45654
 
45594
45655
  // src/components/homepage/GetStartedStrip.tsx
45595
- import { useState as useState67 } from "react";
45656
+ import { useState as useState66 } from "react";
45596
45657
 
45597
45658
  // src/components/homepage/GitHubButton.tsx
45598
45659
  import { jsx as jsx164, jsxs as jsxs65 } from "react/jsx-runtime";
@@ -45627,7 +45688,7 @@ var GithubButton = () => {
45627
45688
  // src/components/homepage/GetStartedStrip.tsx
45628
45689
  import { jsx as jsx166, jsxs as jsxs66 } from "react/jsx-runtime";
45629
45690
  var GetStarted = () => {
45630
- const [clicked, setClicked] = useState67(null);
45691
+ const [clicked, setClicked] = useState66(null);
45631
45692
  return /* @__PURE__ */ jsxs66("div", {
45632
45693
  className: "flex flex-col lg:flex-row items-center justify-center text-center w-full",
45633
45694
  children: [