@remotion/promo-pages 4.0.489 → 4.0.491

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (29) hide show
  1. package/dist/Homepage.js +1018 -556
  2. package/dist/components/Homepage.js +5 -17
  3. package/dist/components/homepage/CommunityStatsItems.js +1 -1
  4. package/dist/components/homepage/Demo/Card.d.ts +3 -3
  5. package/dist/components/homepage/Demo/DemoRender.d.ts +1 -1
  6. package/dist/components/homepage/Demo/DisplayedEmoji.js +12 -4
  7. package/dist/components/homepage/Demo/math.d.ts +1 -1
  8. package/dist/components/homepage/GitHubButton.js +1 -1
  9. package/dist/components/homepage/MakeVideosAgentically.d.ts +1 -0
  10. package/dist/components/homepage/MakeVideosAgentically.js +4 -6
  11. package/dist/components/homepage/MakeVideosInteractively.d.ts +2 -0
  12. package/dist/components/homepage/MakeVideosInteractively.js +3 -6
  13. package/dist/components/homepage/MakeVideosLinks.js +1 -1
  14. package/dist/components/homepage/MakeVideosProgrammatically.d.ts +2 -0
  15. package/dist/components/homepage/MakeVideosProgrammatically.js +2 -5
  16. package/dist/components/homepage/Pricing.d.ts +6 -1
  17. package/dist/components/homepage/Pricing.js +12 -2
  18. package/dist/components/homepage/WriteInReact.js +1 -1
  19. package/dist/components/team/TrustSection.js +1 -1
  20. package/dist/design.js +355 -194
  21. package/dist/experts.js +340 -168
  22. package/dist/homepage/Pricing.js +372 -211
  23. package/dist/prompts/PromptsGallery.js +352 -191
  24. package/dist/prompts/PromptsShow.js +358 -197
  25. package/dist/prompts/PromptsSubmit.js +344 -183
  26. package/dist/team.js +329 -168
  27. package/dist/template-modal-content.js +372 -211
  28. package/dist/templates.js +373 -209
  29. package/package.json +13 -13
package/dist/Homepage.js CHANGED
@@ -1153,13 +1153,12 @@ import { jsx as jsx34 } from "react/jsx-runtime";
1153
1153
  import { jsx as jsx35 } from "react/jsx-runtime";
1154
1154
  import React39, { useMemo as useMemo37 } from "react";
1155
1155
  import { jsx as jsx36 } from "react/jsx-runtime";
1156
- import {
1157
- Children,
1156
+ import React41, {
1158
1157
  forwardRef as forwardRef14,
1159
1158
  useMemo as useMemo38
1160
1159
  } from "react";
1161
1160
  import React40 from "react";
1162
- import { jsx as jsx37 } from "react/jsx-runtime";
1161
+ import { jsx as jsx37, jsxs as jsxs3, Fragment } from "react/jsx-runtime";
1163
1162
  import React42 from "react";
1164
1163
  import { forwardRef as forwardRef16, useCallback as useCallback25, useContext as useContext39 } from "react";
1165
1164
  import {
@@ -2049,26 +2048,20 @@ var continueRenderInternal = ({
2049
2048
  if (typeof handle !== "number") {
2050
2049
  throw new TypeError("The parameter passed into continueRender() must be the return value of delayRender() which is a number. Got: " + JSON.stringify(handle));
2051
2050
  }
2052
- scope.remotion_delayRenderHandles = scope.remotion_delayRenderHandles.filter((h) => {
2053
- if (h === handle) {
2054
- if (environment.isRendering && scope !== undefined) {
2055
- if (!scope.remotion_delayRenderTimeouts[handle]) {
2056
- return false;
2057
- }
2058
- const { label: label2, startTime, timeout } = scope.remotion_delayRenderTimeouts[handle];
2059
- clearTimeout(timeout);
2060
- const message = [
2061
- label2 ? `"${label2}"` : "A handle",
2062
- DELAY_RENDER_CLEAR_TOKEN,
2063
- `${Date.now() - startTime}ms`
2064
- ].filter(truthy).join(" ");
2065
- Log.verbose({ logLevel, tag: "delayRender()" }, message);
2066
- delete scope.remotion_delayRenderTimeouts[handle];
2067
- }
2068
- return false;
2069
- }
2070
- return true;
2071
- });
2051
+ const handleExists = scope.remotion_delayRenderHandles.includes(handle);
2052
+ const timeoutEntry = scope.remotion_delayRenderTimeouts[handle];
2053
+ if (handleExists && environment.isRendering && timeoutEntry) {
2054
+ const { label: label2, startTime, timeout } = timeoutEntry;
2055
+ clearTimeout(timeout);
2056
+ const message = [
2057
+ label2 ? `"${label2}"` : "A handle",
2058
+ DELAY_RENDER_CLEAR_TOKEN,
2059
+ `${Date.now() - startTime}ms`
2060
+ ].filter(truthy).join(" ");
2061
+ Log.verbose({ logLevel, tag: "delayRender()" }, message);
2062
+ delete scope.remotion_delayRenderTimeouts[handle];
2063
+ }
2064
+ scope.remotion_delayRenderHandles = scope.remotion_delayRenderHandles.filter((h) => h !== handle);
2072
2065
  if (scope.remotion_delayRenderHandles.length === 0) {
2073
2066
  scope.remotion_renderReady = true;
2074
2067
  }
@@ -2341,7 +2334,7 @@ var getComponentsToAddStacksTo = () => componentsToAddStacksTo;
2341
2334
  var addSequenceStackTraces = (component) => {
2342
2335
  componentsToAddStacksTo.push(component);
2343
2336
  };
2344
- var VERSION = "4.0.489";
2337
+ var VERSION = "4.0.491";
2345
2338
  var checkMultipleRemotionVersions = () => {
2346
2339
  if (typeof globalThis === "undefined") {
2347
2340
  return;
@@ -2722,7 +2715,8 @@ var transformSchema = {
2722
2715
  max: 100,
2723
2716
  step: 0.01,
2724
2717
  default: 1,
2725
- description: "Scale"
2718
+ description: "Scale",
2719
+ defaultKeyframeOutput: "perceptual-scale"
2726
2720
  },
2727
2721
  "style.rotate": {
2728
2722
  type: "rotation-css",
@@ -2953,7 +2947,7 @@ var SequenceManagerRefContext = React11.createContext({
2953
2947
  current: []
2954
2948
  });
2955
2949
  var makeSequencePropsSubscriptionKey = (key) => {
2956
- return `${key.nodePath.join(".")}.${key.sequenceKeys.join(".")}.${key.effectKeys.map((keys) => keys.join(".")).join(".")}`;
2950
+ return `${key.absolutePath}\x00${key.nodePath.join(".")}\x00${key.sequenceKeys.join(".")}\x00${key.effectKeys.map((keys) => keys.join(".")).join(".")}`;
2957
2951
  };
2958
2952
  var VisualModePropStatusesContext = React11.createContext({
2959
2953
  propStatuses: {}
@@ -3526,8 +3520,20 @@ var serializeStringInterpolationValue = ({
3526
3520
  }
3527
3521
  return values.slice(0, dimensions).map((value, index) => `${stringifyNumber(value)}${units[index]}`).join(" ");
3528
3522
  };
3523
+ var toSignedArea = (scale) => {
3524
+ if (scale === 0) {
3525
+ return 0;
3526
+ }
3527
+ return Math.sign(scale) * scale * scale;
3528
+ };
3529
+ var fromSignedArea = (area) => {
3530
+ if (area === 0) {
3531
+ return 0;
3532
+ }
3533
+ return Math.sign(area) * Math.sqrt(Math.abs(area));
3534
+ };
3529
3535
  function interpolateFunction(input, inputRange, outputRange, options) {
3530
- const { extrapolateLeft, extrapolateRight, easing } = options;
3536
+ const { extrapolateLeft, extrapolateRight, easing, output } = options;
3531
3537
  let result = input;
3532
3538
  const [inputMin, inputMax] = inputRange;
3533
3539
  const [outputMin, outputMax] = outputRange;
@@ -3558,7 +3564,13 @@ function interpolateFunction(input, inputRange, outputRange, options) {
3558
3564
  }
3559
3565
  result = (result - inputMin) / (inputMax - inputMin);
3560
3566
  result = easing(result);
3561
- result = result * (outputMax - outputMin) + outputMin;
3567
+ if (output === "perceptual-scale") {
3568
+ const signedAreaMin = toSignedArea(outputMin);
3569
+ const signedAreaMax = toSignedArea(outputMax);
3570
+ result = fromSignedArea(result * (signedAreaMax - signedAreaMin) + signedAreaMin);
3571
+ } else {
3572
+ result = result * (outputMax - outputMin) + outputMin;
3573
+ }
3562
3574
  return result;
3563
3575
  }
3564
3576
  function findRange(input, inputRange) {
@@ -3571,6 +3583,9 @@ function findRange(input, inputRange) {
3571
3583
  return i - 1;
3572
3584
  }
3573
3585
  var defaultEasing = (num) => num;
3586
+ var resolveOutputOption = (output) => {
3587
+ return output ?? "linear";
3588
+ };
3574
3589
  var shouldExtendRightForEasing = (easing) => {
3575
3590
  return easing.remotionShouldExtendRight === true;
3576
3591
  };
@@ -3592,12 +3607,14 @@ var interpolateSegment = ({
3592
3607
  outputRange,
3593
3608
  easing,
3594
3609
  extrapolateLeft,
3595
- extrapolateRight
3610
+ extrapolateRight,
3611
+ output
3596
3612
  }) => {
3597
3613
  return interpolateFunction(input, inputRange, outputRange, {
3598
3614
  easing,
3599
3615
  extrapolateLeft,
3600
- extrapolateRight: input > inputRange[1] && extrapolateRight === "clamp" && shouldExtendRightForEasing(easing) ? "extend" : extrapolateRight
3616
+ extrapolateRight: input > inputRange[1] && extrapolateRight === "clamp" && shouldExtendRightForEasing(easing) ? "extend" : extrapolateRight,
3617
+ output
3601
3618
  });
3602
3619
  };
3603
3620
  var interpolateNumber = ({
@@ -3606,6 +3623,7 @@ var interpolateNumber = ({
3606
3623
  outputRange,
3607
3624
  options
3608
3625
  }) => {
3626
+ const output = resolveOutputOption(options?.output);
3609
3627
  if (inputRange.length === 1) {
3610
3628
  return outputRange[0];
3611
3629
  }
@@ -3630,7 +3648,8 @@ var interpolateNumber = ({
3630
3648
  outputRange: [outputRange[range], outputRange[range + 1]],
3631
3649
  easing,
3632
3650
  extrapolateLeft,
3633
- extrapolateRight
3651
+ extrapolateRight,
3652
+ output
3634
3653
  });
3635
3654
  for (let segmentIndex = 0;segmentIndex < range; segmentIndex++) {
3636
3655
  const previousEasing = resolveEasingForSegment({
@@ -3650,7 +3669,8 @@ var interpolateNumber = ({
3650
3669
  outputRange: [outputRange[segmentIndex], outputRange[segmentIndex + 1]],
3651
3670
  easing: previousEasing,
3652
3671
  extrapolateLeft,
3653
- extrapolateRight: "extend"
3672
+ extrapolateRight: "extend",
3673
+ output
3654
3674
  });
3655
3675
  result += continuedSegmentValue - outputRange[segmentIndex + 1];
3656
3676
  }
@@ -3698,14 +3718,18 @@ var interpolateString = ({
3698
3718
  }
3699
3719
  }
3700
3720
  }
3701
- return serializeStringInterpolationValue({
3702
- kind,
3703
- values: [0, 0, 0].map((_, axis) => interpolateNumber({
3721
+ const values = [0, 0, 0];
3722
+ for (let axis = 0;axis < dimensions; axis++) {
3723
+ values[axis] = interpolateNumber({
3704
3724
  input,
3705
3725
  inputRange,
3706
3726
  outputRange: parsedOutputRange.map((parsed) => parsed.values[axis]),
3707
3727
  options
3708
- })),
3728
+ });
3729
+ }
3730
+ return serializeStringInterpolationValue({
3731
+ kind,
3732
+ values,
3709
3733
  units,
3710
3734
  dimensions
3711
3735
  });
@@ -3789,6 +3813,12 @@ function assertValidInterpolatePosterizeOption(posterize) {
3789
3813
  throw new Error(`posterize must be a positive finite number, but got ${posterize}`);
3790
3814
  }
3791
3815
  }
3816
+ function assertValidInterpolateOutputOption(output) {
3817
+ if (output === undefined || output === "linear" || output === "perceptual-scale") {
3818
+ return;
3819
+ }
3820
+ throw new Error(`output must be "linear" or "perceptual-scale", but got ${String(output)}`);
3821
+ }
3792
3822
  function interpolate(input, inputRange, outputRange, options) {
3793
3823
  if (typeof input === "undefined") {
3794
3824
  throw new Error("input can not be undefined");
@@ -3806,6 +3836,7 @@ function interpolate(input, inputRange, outputRange, options) {
3806
3836
  checkValidInputRange(inputRange);
3807
3837
  assertValidInterpolateEasingOption(options?.easing, inputRange.length);
3808
3838
  assertValidInterpolatePosterizeOption(options?.posterize);
3839
+ assertValidInterpolateOutputOption(options?.output);
3809
3840
  if (typeof input !== "number") {
3810
3841
  throw new TypeError("Cannot interpolate an input which is not a number");
3811
3842
  }
@@ -4750,6 +4781,7 @@ var interpolateKeyframedStatus = ({
4750
4781
  easing: easing.map((e) => easingToFn({ easing: e, forceSpringAllowTail })),
4751
4782
  extrapolateLeft: clamping.left,
4752
4783
  extrapolateRight: clamping.right,
4784
+ output: status.output,
4753
4785
  posterize: status.posterize
4754
4786
  });
4755
4787
  } catch {
@@ -4990,7 +5022,7 @@ var getFlatSchemaWithAllKeys = (schema) => {
4990
5022
  const out = {};
4991
5023
  const addKey = (key, field) => {
4992
5024
  if (key in out) {
4993
- throw new Error(`Duplicate key "${key}" in schema: discriminated union variants must not share keys`);
5025
+ return;
4994
5026
  }
4995
5027
  out[key] = field;
4996
5028
  };
@@ -5528,6 +5560,7 @@ var RegularSequenceRefForwardingFunction = ({
5528
5560
  src: isMedia.data.src,
5529
5561
  getStack: () => stackRef.current,
5530
5562
  startMediaFrom: startMediaFrom ?? isMedia.data.startMediaFrom,
5563
+ mediaFrameAtSequenceZero,
5531
5564
  volume: isMedia.data.volumes,
5532
5565
  refForOutline: refForOutline ?? null,
5533
5566
  isInsideSeries,
@@ -5591,6 +5624,7 @@ var RegularSequenceRefForwardingFunction = ({
5591
5624
  isInsideSeries,
5592
5625
  registeredFrozenFrame,
5593
5626
  startMediaFrom,
5627
+ mediaFrameAtSequenceZero,
5594
5628
  frozenMediaFrame
5595
5629
  ]);
5596
5630
  const endThreshold = Math.ceil(cumulatedFrom + from + durationInFrames - 1);
@@ -7541,7 +7575,9 @@ var SharedAudioTagsContextProvider = ({ children, numberOfAudioTags }) => {
7541
7575
  return;
7542
7576
  }
7543
7577
  if (data === undefined) {
7544
- current.src = EMPTY_AUDIO;
7578
+ if (current.src !== EMPTY_AUDIO) {
7579
+ current.src = EMPTY_AUDIO;
7580
+ }
7545
7581
  return;
7546
7582
  }
7547
7583
  if (!data) {
@@ -7610,7 +7646,7 @@ var SharedAudioTagsContextProvider = ({ children, numberOfAudioTags }) => {
7610
7646
  if (prevA.id === id) {
7611
7647
  const isTheSame = compareProps(aud, prevA.props) && prevA.premounting === premounting && prevA.postmounting === postmounting;
7612
7648
  if (isTheSame) {
7613
- return prevA;
7649
+ return prevA.audioMounted === audioMounted ? prevA : { ...prevA, audioMounted };
7614
7650
  }
7615
7651
  changed = true;
7616
7652
  return {
@@ -7622,7 +7658,7 @@ var SharedAudioTagsContextProvider = ({ children, numberOfAudioTags }) => {
7622
7658
  audioMounted
7623
7659
  };
7624
7660
  }
7625
- return prevA;
7661
+ return prevA.audioMounted === audioMounted ? prevA : { ...prevA, audioMounted };
7626
7662
  });
7627
7663
  if (changed) {
7628
7664
  rerenderAudios();
@@ -7661,16 +7697,19 @@ var SharedAudioTagsContextProvider = ({ children, numberOfAudioTags }) => {
7661
7697
  unregisterAudio,
7662
7698
  updateAudio
7663
7699
  ]);
7700
+ const sharedAudioTagElements = useMemo21(() => {
7701
+ return refs.map(({ id, ref }) => {
7702
+ return /* @__PURE__ */ jsx19("audio", {
7703
+ ref,
7704
+ preload: "metadata",
7705
+ src: EMPTY_AUDIO
7706
+ }, id);
7707
+ });
7708
+ }, [refs]);
7664
7709
  return /* @__PURE__ */ jsxs22(SharedAudioTagsContext.Provider, {
7665
7710
  value: audioTagsValue,
7666
7711
  children: [
7667
- refs.map(({ id, ref }) => {
7668
- return /* @__PURE__ */ jsx19("audio", {
7669
- ref,
7670
- preload: "metadata",
7671
- src: EMPTY_AUDIO
7672
- }, id);
7673
- }),
7712
+ sharedAudioTagElements,
7674
7713
  children
7675
7714
  ]
7676
7715
  });
@@ -8131,6 +8170,7 @@ var useMediaInTimeline = ({
8131
8170
  showInTimeline: true,
8132
8171
  nonce: nonce.get(),
8133
8172
  startMediaFrom: 0 - startsAt,
8173
+ mediaFrameAtSequenceZero: null,
8134
8174
  doesVolumeChange,
8135
8175
  loopDisplay,
8136
8176
  playbackRate,
@@ -9764,16 +9804,16 @@ var isMissingPaintRecordError = (error2) => {
9764
9804
  return error2 instanceof DOMException && error2.name === "InvalidStateError";
9765
9805
  };
9766
9806
  var missingPaintRecordMessage = "HtmlInCanvas: Expected the element to be inside the viewport during rendering, but Chrome had no cached paint record for it.";
9767
- var resizeOffscreenCanvas = ({
9768
- offscreen,
9807
+ var resizePaintTarget = ({
9808
+ target,
9769
9809
  width,
9770
9810
  height
9771
9811
  }) => {
9772
- if (offscreen.width !== width) {
9773
- offscreen.width = width;
9812
+ if (target.width !== width) {
9813
+ target.width = width;
9774
9814
  }
9775
- if (offscreen.height !== height) {
9776
- offscreen.height = height;
9815
+ if (target.height !== height) {
9816
+ target.height = height;
9777
9817
  }
9778
9818
  };
9779
9819
  var defaultOnPaint = ({
@@ -9789,7 +9829,7 @@ var defaultOnPaint = ({
9789
9829
  const transform = ctx.drawElementImage(elementImage, 0, 0);
9790
9830
  element.style.transform = transform.toString();
9791
9831
  };
9792
- var HtmlInCanvasAncestorContext = createContext23(false);
9832
+ var HtmlInCanvasAncestorContext = createContext23(null);
9793
9833
  var HtmlInCanvasContent = forwardRef9(({
9794
9834
  width,
9795
9835
  height,
@@ -9801,20 +9841,22 @@ var HtmlInCanvasContent = forwardRef9(({
9801
9841
  controls,
9802
9842
  style
9803
9843
  }, ref) => {
9804
- const isInsideAncestorHtmlInCanvas = useContext31(HtmlInCanvasAncestorContext);
9844
+ const ancestor = useContext31(HtmlInCanvasAncestorContext);
9805
9845
  assertHtmlInCanvasDimensions(width, height);
9806
9846
  const resolvedPixelDensity = resolveHtmlInCanvasPixelDensity(pixelDensity);
9807
9847
  const canvasWidth = Math.ceil(width * resolvedPixelDensity);
9808
9848
  const canvasHeight = Math.ceil(height * resolvedPixelDensity);
9809
9849
  const { continueRender: continueRender2, cancelRender: cancelRender2 } = useDelayRender();
9810
- const { isRendering } = useRemotionEnvironment();
9850
+ const { isClientSideRendering, isRendering } = useRemotionEnvironment();
9851
+ const canRetryMissingPaintRecord = !isRendering || isClientSideRendering;
9852
+ const usesDirectLayoutCanvas = onPaint === undefined && onInit === undefined;
9811
9853
  if (!isHtmlInCanvasSupported()) {
9812
9854
  cancelRender2(new Error(HTML_IN_CANVAS_UNSUPPORTED_MESSAGE));
9813
9855
  }
9814
9856
  const canvas2dRef = useRef22(null);
9815
- const offscreenRef = useRef22(null);
9857
+ const paintTargetRef = useRef22(null);
9816
9858
  const divRef = useRef22(null);
9817
- const canvasSizeKey = `${width}x${height}@${resolvedPixelDensity}`;
9859
+ const canvasSizeKey = `${width}x${height}@${resolvedPixelDensity}-${usesDirectLayoutCanvas ? "direct" : "offscreen"}`;
9818
9860
  const setLayoutCanvasRef = useCallback16((node) => {
9819
9861
  canvas2dRef.current = node;
9820
9862
  if (typeof ref === "function") {
@@ -9837,17 +9879,19 @@ var HtmlInCanvasContent = forwardRef9(({
9837
9879
  const initializedRef = useRef22(false);
9838
9880
  const onInitCleanupRef = useRef22(null);
9839
9881
  const unmountedRef = useRef22(false);
9882
+ const ancestorRef = useRef22(ancestor);
9883
+ ancestorRef.current = ancestor;
9840
9884
  const onPaintCb = useCallback16(async () => {
9841
9885
  const element = divRef.current;
9842
9886
  if (!element) {
9843
9887
  throw new Error("Canvas or scene element not found");
9844
9888
  }
9845
- const offscreen = offscreenRef.current;
9846
- if (!offscreen) {
9847
- throw new Error("HtmlInCanvas: offscreen canvas not ready (transferControlToOffscreen failed or canvas is remounting)");
9889
+ const paintTarget = paintTargetRef.current;
9890
+ if (!paintTarget) {
9891
+ throw new Error("HtmlInCanvas: paint target is not ready because the canvas is remounting");
9848
9892
  }
9849
- resizeOffscreenCanvas({
9850
- offscreen,
9893
+ resizePaintTarget({
9894
+ target: paintTarget,
9851
9895
  width: canvasWidth,
9852
9896
  height: canvasHeight
9853
9897
  });
@@ -9858,22 +9902,30 @@ var HtmlInCanvasContent = forwardRef9(({
9858
9902
  }
9859
9903
  const handle = delayRender("onPaint");
9860
9904
  if (!initializedRef.current) {
9861
- let initImage = null;
9862
- try {
9863
- initImage = placeholderCanvas.captureElementImage(element);
9864
- } catch (error2) {
9865
- if (isMissingPaintRecordError(error2) && !isRendering) {} else if (isMissingPaintRecordError(error2)) {
9866
- throw new Error(missingPaintRecordMessage);
9867
- } else {
9905
+ const currentOnInit = onInitRef.current;
9906
+ if (!currentOnInit) {
9907
+ initializedRef.current = true;
9908
+ } else {
9909
+ let initImage;
9910
+ try {
9911
+ initImage = placeholderCanvas.captureElementImage(element);
9912
+ } catch (error2) {
9913
+ if (isMissingPaintRecordError(error2) && canRetryMissingPaintRecord) {
9914
+ continueRender2(handle);
9915
+ return;
9916
+ }
9917
+ if (isMissingPaintRecordError(error2)) {
9918
+ throw new Error(missingPaintRecordMessage);
9919
+ }
9868
9920
  throw error2;
9869
9921
  }
9870
- }
9871
- if (initImage) {
9872
9922
  initializedRef.current = true;
9873
- const currentOnInit = onInitRef.current;
9874
- if (currentOnInit) {
9923
+ try {
9924
+ if (paintTarget instanceof HTMLCanvasElement) {
9925
+ throw new Error("HtmlInCanvas: onInit requires an OffscreenCanvas paint target");
9926
+ }
9875
9927
  const cleanup = await currentOnInit({
9876
- canvas: offscreen,
9928
+ canvas: paintTarget,
9877
9929
  element,
9878
9930
  elementImage: initImage,
9879
9931
  pixelDensity: resolvedPixelDensity
@@ -9886,15 +9938,16 @@ var HtmlInCanvasContent = forwardRef9(({
9886
9938
  } else {
9887
9939
  onInitCleanupRef.current = cleanup;
9888
9940
  }
9941
+ } finally {
9942
+ initImage.close();
9889
9943
  }
9890
9944
  }
9891
9945
  }
9892
- const handler = onPaintRef.current ?? defaultOnPaint;
9893
9946
  let elImage;
9894
9947
  try {
9895
9948
  elImage = placeholderCanvas.captureElementImage(element);
9896
9949
  } catch (error2) {
9897
- if (isMissingPaintRecordError(error2) && !isRendering) {
9950
+ if (isMissingPaintRecordError(error2) && canRetryMissingPaintRecord) {
9898
9951
  continueRender2(handle);
9899
9952
  return;
9900
9953
  }
@@ -9903,20 +9956,41 @@ var HtmlInCanvasContent = forwardRef9(({
9903
9956
  }
9904
9957
  throw error2;
9905
9958
  }
9906
- await handler({
9907
- canvas: offscreen,
9908
- element,
9909
- elementImage: elImage,
9910
- pixelDensity: resolvedPixelDensity
9911
- });
9912
- await runEffectChain({
9913
- state: chainState.get(canvasWidth, canvasHeight),
9914
- source: offscreen,
9915
- effects: effectsRef.current,
9916
- output: offscreen,
9917
- width: canvasWidth,
9918
- height: canvasHeight
9919
- });
9959
+ try {
9960
+ const currentOnPaint = onPaintRef.current;
9961
+ if (currentOnPaint) {
9962
+ if (paintTarget instanceof HTMLCanvasElement) {
9963
+ throw new Error("HtmlInCanvas: onPaint requires an OffscreenCanvas paint target");
9964
+ }
9965
+ const paintResult = currentOnPaint({
9966
+ canvas: paintTarget,
9967
+ element,
9968
+ elementImage: elImage,
9969
+ pixelDensity: resolvedPixelDensity
9970
+ });
9971
+ if (paintResult) {
9972
+ await paintResult;
9973
+ }
9974
+ } else {
9975
+ defaultOnPaint({
9976
+ canvas: paintTarget,
9977
+ element,
9978
+ elementImage: elImage,
9979
+ pixelDensity: resolvedPixelDensity
9980
+ });
9981
+ }
9982
+ await runEffectChain({
9983
+ state: chainState.get(canvasWidth, canvasHeight),
9984
+ source: paintTarget,
9985
+ effects: effectsRef.current,
9986
+ output: paintTarget,
9987
+ width: canvasWidth,
9988
+ height: canvasHeight
9989
+ });
9990
+ } finally {
9991
+ elImage.close();
9992
+ }
9993
+ ancestorRef.current?.requestParentPaint();
9920
9994
  continueRender2(handle);
9921
9995
  } catch (error2) {
9922
9996
  cancelRender2(error2);
@@ -9928,7 +10002,7 @@ var HtmlInCanvasContent = forwardRef9(({
9928
10002
  continueRender2,
9929
10003
  cancelRender2,
9930
10004
  resolvedPixelDensity,
9931
- isRendering
10005
+ canRetryMissingPaintRecord
9932
10006
  ]);
9933
10007
  useLayoutEffect9(() => {
9934
10008
  const placeholder = canvas2dRef.current;
@@ -9936,10 +10010,10 @@ var HtmlInCanvasContent = forwardRef9(({
9936
10010
  throw new Error("Canvas not found");
9937
10011
  }
9938
10012
  placeholder.layoutSubtree = true;
9939
- const offscreen = placeholder.transferControlToOffscreen();
9940
- offscreenRef.current = offscreen;
9941
- resizeOffscreenCanvas({
9942
- offscreen,
10013
+ const paintTarget = usesDirectLayoutCanvas ? placeholder : placeholder.transferControlToOffscreen();
10014
+ paintTargetRef.current = paintTarget;
10015
+ resizePaintTarget({
10016
+ target: paintTarget,
9943
10017
  width: canvasWidth,
9944
10018
  height: canvasHeight
9945
10019
  });
@@ -9948,13 +10022,19 @@ var HtmlInCanvasContent = forwardRef9(({
9948
10022
  placeholder.addEventListener("paint", onPaintCb);
9949
10023
  return () => {
9950
10024
  placeholder.removeEventListener("paint", onPaintCb);
9951
- offscreenRef.current = null;
10025
+ paintTargetRef.current = null;
9952
10026
  initializedRef.current = false;
9953
10027
  unmountedRef.current = true;
9954
10028
  onInitCleanupRef.current?.();
9955
10029
  onInitCleanupRef.current = null;
9956
10030
  };
9957
- }, [onPaintCb, cancelRender2, canvasWidth, canvasHeight]);
10031
+ }, [
10032
+ onPaintCb,
10033
+ cancelRender2,
10034
+ canvasWidth,
10035
+ canvasHeight,
10036
+ usesDirectLayoutCanvas
10037
+ ]);
9958
10038
  const onPaintChangedRef = useRef22(false);
9959
10039
  useLayoutEffect9(() => {
9960
10040
  if (!onPaintChangedRef.current) {
@@ -9993,11 +10073,15 @@ var HtmlInCanvasContent = forwardRef9(({
9993
10073
  ...style ?? {}
9994
10074
  };
9995
10075
  }, [height, style, width]);
9996
- if (isInsideAncestorHtmlInCanvas) {
9997
- throw new Error("<HtmlInCanvas> effects cannot be nested together. Chrome will only display the outer effect. Consider merging the effects into one if you can.");
9998
- }
10076
+ const ancestorValue = useMemo30(() => {
10077
+ return {
10078
+ requestParentPaint: () => {
10079
+ canvas2dRef.current?.requestPaint?.();
10080
+ }
10081
+ };
10082
+ }, []);
9999
10083
  return /* @__PURE__ */ jsx25(HtmlInCanvasAncestorContext.Provider, {
10000
- value: true,
10084
+ value: ancestorValue,
10001
10085
  children: /* @__PURE__ */ jsx25("canvas", {
10002
10086
  ref: setLayoutCanvasRef,
10003
10087
  width: canvasWidth,
@@ -10869,6 +10953,22 @@ var Img = withInteractivitySchema({
10869
10953
  supportsEffects: true
10870
10954
  });
10871
10955
  addSequenceStackTraces(Img);
10956
+ var sourcePathToIdentityPrefix = (packageName) => {
10957
+ if (packageName === "remotion") {
10958
+ return "dev.remotion.remotion";
10959
+ }
10960
+ if (packageName.startsWith("@remotion/")) {
10961
+ const normalizedPackageName = packageName.slice("@remotion/".length).replace(/-([a-z])/g, (_, char) => char.toUpperCase());
10962
+ return `dev.remotion.${normalizedPackageName}`;
10963
+ }
10964
+ throw new Error(`Unsupported Remotion package name: ${packageName}`);
10965
+ };
10966
+ var makeRemotionComponentIdentity = ({
10967
+ packageName,
10968
+ componentName
10969
+ }) => {
10970
+ return `${sourcePathToIdentityPrefix(packageName)}.${componentName}`;
10971
+ };
10872
10972
  var interactiveElementSchema = {
10873
10973
  ...baseSchema,
10874
10974
  ...transformSchema,
@@ -10882,6 +10982,11 @@ var setRef = (ref, value) => {
10882
10982
  ref.current = value;
10883
10983
  }
10884
10984
  };
10985
+ var withSchema = (options) => {
10986
+ const Wrapped = withInteractivitySchema(options);
10987
+ addSequenceStackTraces(Wrapped);
10988
+ return Wrapped;
10989
+ };
10885
10990
  var makeInteractiveElement = (tag, displayName) => {
10886
10991
  const Inner = forwardRef12((propsWithControls, ref) => {
10887
10992
  const {
@@ -10921,15 +11026,17 @@ var makeInteractiveElement = (tag, displayName) => {
10921
11026
  });
10922
11027
  });
10923
11028
  Inner.displayName = displayName;
10924
- const Wrapped = withInteractivitySchema({
11029
+ const Wrapped = withSchema({
10925
11030
  Component: Inner,
10926
11031
  componentName: displayName,
10927
- componentIdentity: `dev.remotion.remotion.${displayName.slice(1, -1)}`,
11032
+ componentIdentity: makeRemotionComponentIdentity({
11033
+ packageName: "remotion",
11034
+ componentName: displayName.slice(1, -1)
11035
+ }),
10928
11036
  schema: interactiveElementSchema,
10929
11037
  supportsEffects: false
10930
11038
  });
10931
11039
  Wrapped.displayName = displayName;
10932
- addSequenceStackTraces(Wrapped);
10933
11040
  return Wrapped;
10934
11041
  };
10935
11042
  var Interactive = {
@@ -10938,7 +11045,8 @@ var Interactive = {
10938
11045
  textSchema,
10939
11046
  premountSchema,
10940
11047
  sequenceSchema,
10941
- withSchema: withInteractivitySchema,
11048
+ withSchema,
11049
+ _internalMakeRemotionComponentIdentity: makeRemotionComponentIdentity,
10942
11050
  A: makeInteractiveElement("a", "<Interactive.A>"),
10943
11051
  Article: makeInteractiveElement("article", "<Interactive.Article>"),
10944
11052
  Aside: makeInteractiveElement("aside", "<Interactive.Aside>"),
@@ -12343,66 +12451,130 @@ var flattenChildren = (children) => {
12343
12451
  return flatChildren;
12344
12452
  }, []);
12345
12453
  };
12346
- var SeriesSequenceRefForwardingFunction = ({ children }, _ref) => {
12454
+ var seriesSequenceSchema = {
12455
+ durationInFrames: Interactive.baseSchema.durationInFrames,
12456
+ name: Interactive.sequenceSchema.name,
12457
+ hidden: Interactive.sequenceSchema.hidden,
12458
+ showInTimeline: Interactive.sequenceSchema.showInTimeline,
12459
+ freeze: Interactive.baseSchema.freeze,
12460
+ layout: Interactive.sequenceSchema.layout
12461
+ };
12462
+ var SeriesSequenceInner = forwardRef14(({
12463
+ offset = 0,
12464
+ className = "",
12465
+ stack = null,
12466
+ _remotionInternalRender = null,
12467
+ ...props2
12468
+ }, ref) => {
12347
12469
  useRequireToBeInsideSeries();
12470
+ if (_remotionInternalRender) {
12471
+ return _remotionInternalRender({ ...props2, offset, className: className || undefined, stack }, ref);
12472
+ }
12348
12473
  return /* @__PURE__ */ jsx37(IsNotInsideSeriesProvider, {
12349
- children
12474
+ children: props2.children
12350
12475
  });
12351
- };
12352
- var SeriesSequence = forwardRef14(SeriesSequenceRefForwardingFunction);
12476
+ });
12477
+ var SeriesSequence = Interactive.withSchema({
12478
+ Component: SeriesSequenceInner,
12479
+ componentName: "<Series.Sequence>",
12480
+ componentIdentity: "dev.remotion.remotion.Series.Sequence",
12481
+ schema: seriesSequenceSchema,
12482
+ supportsEffects: false
12483
+ });
12353
12484
  var SequenceWithoutSchemaWithRef = SequenceWithoutSchema;
12485
+ var validateSeriesSequenceProps = ({
12486
+ durationInFrames,
12487
+ offset: offsetProp,
12488
+ index,
12489
+ childrenLength
12490
+ }) => {
12491
+ const debugInfo = `index = ${index}, duration = ${durationInFrames}`;
12492
+ if (index !== childrenLength - 1 || durationInFrames !== Infinity) {
12493
+ validateDurationInFrames(durationInFrames, {
12494
+ component: `of a <Series.Sequence /> component`,
12495
+ allowFloats: true
12496
+ });
12497
+ }
12498
+ const offset = offsetProp ?? 0;
12499
+ if (Number.isNaN(offset)) {
12500
+ throw new TypeError(`The "offset" property of a <Series.Sequence /> must not be NaN, but got NaN (${debugInfo}).`);
12501
+ }
12502
+ if (!Number.isFinite(offset)) {
12503
+ throw new TypeError(`The "offset" property of a <Series.Sequence /> must be finite, but got ${offset} (${debugInfo}).`);
12504
+ }
12505
+ if (offset % 1 !== 0) {
12506
+ throw new TypeError(`The "offset" property of a <Series.Sequence /> must be finite, but got ${offset} (${debugInfo}).`);
12507
+ }
12508
+ return offset;
12509
+ };
12354
12510
  var SeriesInner = (props2) => {
12355
12511
  const childrenValue = useMemo38(() => {
12356
- let startFrame = 0;
12357
12512
  const flattenedChildren = flattenChildren(props2.children);
12358
- return Children.map(flattenedChildren, (child, i) => {
12513
+ const renderChildren = (i, startFrame) => {
12514
+ if (i === flattenedChildren.length) {
12515
+ return null;
12516
+ }
12517
+ const child = flattenedChildren[i];
12359
12518
  const castedChild = child;
12360
12519
  if (typeof castedChild === "string") {
12361
12520
  if (castedChild.trim() === "") {
12362
- return null;
12521
+ return renderChildren(i + 1, startFrame);
12363
12522
  }
12364
12523
  throw new TypeError(`The <Series /> component only accepts a list of <Series.Sequence /> components as its children, but you passed a string "${castedChild}"`);
12365
12524
  }
12366
12525
  if (castedChild.type !== SeriesSequence) {
12367
12526
  throw new TypeError(`The <Series /> component only accepts a list of <Series.Sequence /> components as its children, but got ${castedChild} instead`);
12368
12527
  }
12369
- const debugInfo = `index = ${i}, duration = ${castedChild.props.durationInFrames}`;
12370
- const durationInFramesProp = castedChild.props.durationInFrames;
12371
- const {
12372
- durationInFrames,
12373
- children: _children,
12374
- from,
12375
- name,
12376
- ...passedProps
12377
- } = castedChild.props;
12378
- if (i !== flattenedChildren.length - 1 || durationInFramesProp !== Infinity) {
12379
- validateDurationInFrames(durationInFramesProp, {
12380
- component: `of a <Series.Sequence /> component`,
12381
- allowFloats: true
12382
- });
12383
- }
12384
- const offset = castedChild.props.offset ?? 0;
12385
- if (Number.isNaN(offset)) {
12386
- throw new TypeError(`The "offset" property of a <Series.Sequence /> must not be NaN, but got NaN (${debugInfo}).`);
12387
- }
12388
- if (!Number.isFinite(offset)) {
12389
- throw new TypeError(`The "offset" property of a <Series.Sequence /> must be finite, but got ${offset} (${debugInfo}).`);
12390
- }
12391
- if (offset % 1 !== 0) {
12392
- throw new TypeError(`The "offset" property of a <Series.Sequence /> must be finite, but got ${offset} (${debugInfo}).`);
12393
- }
12394
- const currentStartFrame = startFrame + offset;
12395
- startFrame += durationInFramesProp + offset;
12396
- return /* @__PURE__ */ jsx37(SequenceWithoutSchemaWithRef, {
12397
- ref: castedChild.ref,
12398
- name: name || "<Series.Sequence>",
12399
- _remotionInternalDocumentationLink: name ? undefined : "https://www.remotion.dev/docs/series",
12400
- from: currentStartFrame,
12401
- durationInFrames: durationInFramesProp,
12402
- ...passedProps,
12403
- children: child
12528
+ const castedElement = castedChild;
12529
+ validateSeriesSequenceProps({
12530
+ durationInFrames: castedElement.props.durationInFrames,
12531
+ offset: castedElement.props.offset,
12532
+ index: i,
12533
+ childrenLength: flattenedChildren.length
12404
12534
  });
12405
- });
12535
+ return React41.cloneElement(castedElement, {
12536
+ _remotionInternalRender: (resolvedProps, ref) => {
12537
+ const durationInFramesProp = resolvedProps.durationInFrames;
12538
+ const {
12539
+ durationInFrames: _durationInFrames,
12540
+ children: sequenceChildren,
12541
+ offset: offsetProp,
12542
+ controls,
12543
+ stack,
12544
+ from: _from,
12545
+ name,
12546
+ ...passedProps
12547
+ } = resolvedProps;
12548
+ const offset = validateSeriesSequenceProps({
12549
+ durationInFrames: durationInFramesProp,
12550
+ offset: offsetProp,
12551
+ index: i,
12552
+ childrenLength: flattenedChildren.length
12553
+ });
12554
+ const currentStartFrame = startFrame + offset;
12555
+ const nextStartFrame = startFrame + durationInFramesProp + offset;
12556
+ return /* @__PURE__ */ jsxs3(Fragment, {
12557
+ children: [
12558
+ /* @__PURE__ */ jsx37(SequenceWithoutSchemaWithRef, {
12559
+ ref,
12560
+ name: name || "<Series.Sequence>",
12561
+ _remotionInternalDocumentationLink: name ? undefined : "https://www.remotion.dev/docs/series",
12562
+ _remotionInternalStack: stack ?? undefined,
12563
+ controls: controls ?? undefined,
12564
+ from: currentStartFrame,
12565
+ durationInFrames: durationInFramesProp,
12566
+ ...passedProps,
12567
+ children: /* @__PURE__ */ jsx37(IsNotInsideSeriesProvider, {
12568
+ children: sequenceChildren
12569
+ })
12570
+ }),
12571
+ renderChildren(i + 1, nextStartFrame)
12572
+ ]
12573
+ });
12574
+ }
12575
+ });
12576
+ };
12577
+ return renderChildren(0, 0);
12406
12578
  }, [props2.children]);
12407
12579
  return /* @__PURE__ */ jsx37(IsInsideSeriesContainer, {
12408
12580
  children: /* @__PURE__ */ jsx37(Sequence, {
@@ -13001,7 +13173,7 @@ addSequenceStackTraces(Composition);
13001
13173
  addSequenceStackTraces(Folder);
13002
13174
 
13003
13175
  // src/components/team/TeamCards.tsx
13004
- import { jsx as jsx40, jsxs as jsxs3 } from "react/jsx-runtime";
13176
+ import { jsx as jsx40, jsxs as jsxs4 } from "react/jsx-runtime";
13005
13177
  var LinkedInLogo = () => {
13006
13178
  return /* @__PURE__ */ jsx40("svg", {
13007
13179
  xmlns: "http://www.w3.org/2000/svg",
@@ -13056,14 +13228,14 @@ var TeamMemberCard = ({
13056
13228
  github,
13057
13229
  email
13058
13230
  }) => {
13059
- return /* @__PURE__ */ jsxs3("div", {
13231
+ return /* @__PURE__ */ jsxs4("div", {
13060
13232
  className: "flex-1 rounded-[15px] flex flex-col md:flex-row gap-2 md:gap-4",
13061
13233
  children: [
13062
13234
  /* @__PURE__ */ jsx40("img", {
13063
13235
  src: image,
13064
13236
  className: "w-[250px] h-[250px] rounded-xl border-effect"
13065
13237
  }),
13066
- /* @__PURE__ */ jsxs3("div", {
13238
+ /* @__PURE__ */ jsxs4("div", {
13067
13239
  className: "flex flex-col border-effect px-4 py-3 bg-pane",
13068
13240
  children: [
13069
13241
  /* @__PURE__ */ jsx40("h2", {
@@ -13081,7 +13253,7 @@ var TeamMemberCard = ({
13081
13253
  /* @__PURE__ */ jsx40("div", {
13082
13254
  className: "flex-1"
13083
13255
  }),
13084
- /* @__PURE__ */ jsxs3("div", {
13256
+ /* @__PURE__ */ jsxs4("div", {
13085
13257
  className: "gap-3 flex flex-row",
13086
13258
  children: [
13087
13259
  /* @__PURE__ */ jsx40("a", {
@@ -13116,7 +13288,7 @@ var TeamMemberCard = ({
13116
13288
  });
13117
13289
  };
13118
13290
  var TeamCardsLayout = () => {
13119
- return /* @__PURE__ */ jsxs3("div", {
13291
+ return /* @__PURE__ */ jsxs4("div", {
13120
13292
  className: "flex flex-col gap-12 md:gap-4",
13121
13293
  children: [
13122
13294
  /* @__PURE__ */ jsx40(TeamMemberCard, {
@@ -13184,7 +13356,7 @@ var PersonalWebsite = () => {
13184
13356
  };
13185
13357
 
13186
13358
  // src/components/experts/ExpertsPage.tsx
13187
- import { jsx as jsx43, jsxs as jsxs4, Fragment } from "react/jsx-runtime";
13359
+ import { jsx as jsx43, jsxs as jsxs6, Fragment as Fragment2 } from "react/jsx-runtime";
13188
13360
  var arrowIcon = {
13189
13361
  height: 16,
13190
13362
  marginLeft: 10
@@ -13215,7 +13387,7 @@ var wrapperStyle = {
13215
13387
  paddingBottom: 100
13216
13388
  };
13217
13389
  var ExpertCard = ({ expert, Link }) => {
13218
- return /* @__PURE__ */ jsxs4("div", {
13390
+ return /* @__PURE__ */ jsxs6("div", {
13219
13391
  className: "flex-1 rounded-[15px] flex flex-col md:flex-row gap-2 md:gap-4",
13220
13392
  children: [
13221
13393
  /* @__PURE__ */ jsx43(Link, {
@@ -13227,7 +13399,7 @@ var ExpertCard = ({ expert, Link }) => {
13227
13399
  className: "w-[250px] h-[250px] rounded-xl border-effect object-cover"
13228
13400
  })
13229
13401
  }),
13230
- /* @__PURE__ */ jsxs4("div", {
13402
+ /* @__PURE__ */ jsxs6("div", {
13231
13403
  className: "flex flex-col border-effect px-4 py-3 bg-pane flex-1",
13232
13404
  children: [
13233
13405
  /* @__PURE__ */ jsx43(Link, {
@@ -13242,10 +13414,10 @@ var ExpertCard = ({ expert, Link }) => {
13242
13414
  className: "mt-2 mb-3 leading-normal font-brand",
13243
13415
  children: expert.description
13244
13416
  }),
13245
- /* @__PURE__ */ jsxs4("div", {
13417
+ /* @__PURE__ */ jsxs6("div", {
13246
13418
  className: "leading-6 mb-4",
13247
13419
  children: [
13248
- /* @__PURE__ */ jsxs4(Link, {
13420
+ /* @__PURE__ */ jsxs6(Link, {
13249
13421
  className: "no-underline text-brand font-brand font-bold inline-flex flex-row items-center",
13250
13422
  href: `/experts/${expert.slug}`,
13251
13423
  children: [
@@ -13262,10 +13434,10 @@ var ExpertCard = ({ expert, Link }) => {
13262
13434
  })
13263
13435
  ]
13264
13436
  }),
13265
- expert.videocall ? /* @__PURE__ */ jsxs4(Fragment, {
13437
+ expert.videocall ? /* @__PURE__ */ jsxs6(Fragment2, {
13266
13438
  children: [
13267
13439
  /* @__PURE__ */ jsx43("br", {}),
13268
- /* @__PURE__ */ jsxs4("a", {
13440
+ /* @__PURE__ */ jsxs6("a", {
13269
13441
  className: "no-underline text-brand font-brand font-bold inline-flex flex-row items-center",
13270
13442
  target: "_blank",
13271
13443
  href: expert.videocall,
@@ -13290,7 +13462,7 @@ var ExpertCard = ({ expert, Link }) => {
13290
13462
  /* @__PURE__ */ jsx43("div", {
13291
13463
  className: "flex-1"
13292
13464
  }),
13293
- /* @__PURE__ */ jsxs4("div", {
13465
+ /* @__PURE__ */ jsxs6("div", {
13294
13466
  className: "gap-3 flex flex-row flex-wrap",
13295
13467
  children: [
13296
13468
  expert.website ? /* @__PURE__ */ jsx43("a", {
@@ -13346,14 +13518,14 @@ var ExpertsPageContent = ({ Link }) => {
13346
13518
  }, []);
13347
13519
  return /* @__PURE__ */ jsx43("div", {
13348
13520
  className: "relative bg-[var(--background)]",
13349
- children: /* @__PURE__ */ jsxs4("div", {
13521
+ children: /* @__PURE__ */ jsxs6("div", {
13350
13522
  style: wrapperStyle,
13351
13523
  children: [
13352
13524
  /* @__PURE__ */ jsx43("h1", {
13353
13525
  className: "experts-pagetitle",
13354
13526
  children: "Find a Remotion Expert"
13355
13527
  }),
13356
- /* @__PURE__ */ jsxs4("p", {
13528
+ /* @__PURE__ */ jsxs6("p", {
13357
13529
  className: "experts-tagline",
13358
13530
  children: [
13359
13531
  "Get help by booking a call or hiring these freelancers to work on your Remotion project.",
@@ -13371,16 +13543,16 @@ var ExpertsPageContent = ({ Link }) => {
13371
13543
  })
13372
13544
  })
13373
13545
  }),
13374
- /* @__PURE__ */ jsxs4("div", {
13546
+ /* @__PURE__ */ jsxs6("div", {
13375
13547
  style: infoCard,
13376
13548
  children: [
13377
- /* @__PURE__ */ jsxs4("svg", {
13549
+ /* @__PURE__ */ jsxs6("svg", {
13378
13550
  viewBox: "0 0 661 512",
13379
13551
  fill: "none",
13380
13552
  xmlns: "http://www.w3.org/2000/svg",
13381
13553
  style: cardIcon,
13382
13554
  children: [
13383
- /* @__PURE__ */ jsxs4("g", {
13555
+ /* @__PURE__ */ jsxs6("g", {
13384
13556
  clipPath: "url(#clip0_1_2)",
13385
13557
  children: [
13386
13558
  /* @__PURE__ */ jsx43("path", {
@@ -13405,7 +13577,7 @@ var ExpertsPageContent = ({ Link }) => {
13405
13577
  })
13406
13578
  ]
13407
13579
  }),
13408
- /* @__PURE__ */ jsxs4("div", {
13580
+ /* @__PURE__ */ jsxs6("div", {
13409
13581
  style: { flex: 1 },
13410
13582
  children: [
13411
13583
  "Remotion Experts are independent freelancers with proven Remotion expertise and portfolios. However,",
@@ -17552,7 +17724,7 @@ var PathInternals = {
17552
17724
  // ../shapes/dist/esm/index.mjs
17553
17725
  import React3, { useCallback as useCallback26, useMemo as useMemo42, useRef as useRef29 } from "react";
17554
17726
  import { version } from "react-dom";
17555
- import { jsx as jsx44, jsxs as jsxs5 } from "react/jsx-runtime";
17727
+ import { jsx as jsx44, jsxs as jsxs7 } from "react/jsx-runtime";
17556
17728
  import { jsx as jsx210 } from "react/jsx-runtime";
17557
17729
  import { jsx as jsx310 } from "react/jsx-runtime";
17558
17730
  import { jsx as jsx45 } from "react/jsx-runtime";
@@ -17754,7 +17926,7 @@ var RenderSvg = ({
17754
17926
  const memoizedEffectDefinitions = Internals.useMemoizedEffectDefinitions(effects);
17755
17927
  const videoConfig = Internals.useUnsafeVideoConfig();
17756
17928
  const reactSupportsTransformOrigin = doesReactSupportTransformOriginProperty(version);
17757
- const svg = /* @__PURE__ */ jsxs5("svg", {
17929
+ const svg = /* @__PURE__ */ jsxs7("svg", {
17758
17930
  ref: effects.length === 0 || !videoConfig ? setSvgRef : undefined,
17759
17931
  width,
17760
17932
  height,
@@ -17780,7 +17952,7 @@ var RenderSvg = ({
17780
17952
  }
17781
17953
  const prevX = prevInstruction.x;
17782
17954
  const prevY = prevInstruction.y;
17783
- return /* @__PURE__ */ jsxs5(React3.Fragment, {
17955
+ return /* @__PURE__ */ jsxs7(React3.Fragment, {
17784
17956
  children: [
17785
17957
  /* @__PURE__ */ jsx44("path", {
17786
17958
  d: `M ${prevX} ${prevY} ${i.cp1x} ${i.cp1y}`,
@@ -17970,7 +18142,6 @@ var Arrow = Interactive.withSchema({
17970
18142
  schema: arrowSchema,
17971
18143
  supportsEffects: true
17972
18144
  });
17973
- Internals.addSequenceStackTraces(Arrow);
17974
18145
  var shortenVector = (vector, radius) => {
17975
18146
  const [x, y] = vector;
17976
18147
  const currentLength = Math.sqrt(x * x + y * y);
@@ -18395,7 +18566,6 @@ var Callout = Interactive.withSchema({
18395
18566
  schema: calloutSchema,
18396
18567
  supportsEffects: true
18397
18568
  });
18398
- Internals.addSequenceStackTraces(Callout);
18399
18569
  var makeCircle = ({ radius }) => {
18400
18570
  const instructions = [
18401
18571
  {
@@ -18458,7 +18628,6 @@ var Circle = Interactive.withSchema({
18458
18628
  schema: circleSchema,
18459
18629
  supportsEffects: true
18460
18630
  });
18461
- Internals.addSequenceStackTraces(Circle);
18462
18631
  var makeEllipse = ({ rx, ry }) => {
18463
18632
  const instructions = [
18464
18633
  {
@@ -18516,7 +18685,6 @@ var Ellipse = Interactive.withSchema({
18516
18685
  schema: ellipseSchema,
18517
18686
  supportsEffects: true
18518
18687
  });
18519
- Internals.addSequenceStackTraces(Ellipse);
18520
18688
  var makeHeart = ({
18521
18689
  height,
18522
18690
  aspectRatio = 1.1,
@@ -18655,7 +18823,6 @@ var Heart = Interactive.withSchema({
18655
18823
  schema: heartSchema,
18656
18824
  supportsEffects: true
18657
18825
  });
18658
- Internals.addSequenceStackTraces(Heart);
18659
18826
  var getCoord = ({
18660
18827
  counterClockwise,
18661
18828
  actualProgress,
@@ -18810,7 +18977,6 @@ var Pie = Interactive.withSchema({
18810
18977
  schema: pieSchema,
18811
18978
  supportsEffects: true
18812
18979
  });
18813
- Internals.addSequenceStackTraces(Pie);
18814
18980
  function polygon({
18815
18981
  points,
18816
18982
  radius,
@@ -18910,7 +19076,6 @@ var Polygon = Interactive.withSchema({
18910
19076
  schema: polygonSchema,
18911
19077
  supportsEffects: true
18912
19078
  });
18913
- Internals.addSequenceStackTraces(Polygon);
18914
19079
  var makeRect = ({
18915
19080
  width,
18916
19081
  height,
@@ -18977,7 +19142,6 @@ var Rect = Interactive.withSchema({
18977
19142
  schema: rectSchema,
18978
19143
  supportsEffects: true
18979
19144
  });
18980
- Internals.addSequenceStackTraces(Rect);
18981
19145
  var KAPPA = 0.5522847498307936;
18982
19146
  var CAP_HANDLE = 4 / 3;
18983
19147
  var curve = ({
@@ -19189,7 +19353,6 @@ var Spark = Interactive.withSchema({
19189
19353
  schema: sparkSchema,
19190
19354
  supportsEffects: true
19191
19355
  });
19192
- Internals.addSequenceStackTraces(Spark);
19193
19356
  var star = ({
19194
19357
  centerX,
19195
19358
  centerY,
@@ -19300,7 +19463,6 @@ var Star = Interactive.withSchema({
19300
19463
  schema: starSchema,
19301
19464
  supportsEffects: true
19302
19465
  });
19303
- Internals.addSequenceStackTraces(Star);
19304
19466
  var makeTriangle = ({
19305
19467
  length: length2,
19306
19468
  direction = "right",
@@ -19407,7 +19569,6 @@ var Triangle = Interactive.withSchema({
19407
19569
  schema: triangleSchema,
19408
19570
  supportsEffects: true
19409
19571
  });
19410
- Internals.addSequenceStackTraces(Triangle);
19411
19572
 
19412
19573
  // ../svg-3d-engine/dist/esm/index.mjs
19413
19574
  function truthy2(value) {
@@ -20472,8 +20633,8 @@ var extrudeAndTransformElement = (options) => {
20472
20633
  };
20473
20634
 
20474
20635
  // ../design/dist/esm/index.mjs
20475
- import { jsx as jsx212, Fragment as Fragment3 } from "react/jsx-runtime";
20476
- import { jsx as jsx312, jsxs as jsxs6 } from "react/jsx-runtime";
20636
+ import { jsx as jsx212, Fragment as Fragment32 } from "react/jsx-runtime";
20637
+ import { jsx as jsx312, jsxs as jsxs8 } from "react/jsx-runtime";
20477
20638
  import { useEffect as useEffect22, useMemo as useMemo210, useRef as useRef31 } from "react";
20478
20639
  import { jsx as jsx47 } from "react/jsx-runtime";
20479
20640
  import { jsx as jsx53, jsxs as jsxs23 } from "react/jsx-runtime";
@@ -20536,7 +20697,7 @@ import { Fragment as Fragment8, jsx as jsx242, jsxs as jsxs42 } from "react/jsx-
20536
20697
  import { forwardRef as forwardRef142, createElement as createElement7 } from "react";
20537
20698
  import { forwardRef as forwardRef132, createElement as createElement6 } from "react";
20538
20699
  import * as React372 from "react";
20539
- import { jsx as jsx252, jsxs as jsxs52 } from "react/jsx-runtime";
20700
+ import { jsx as jsx252, jsxs as jsxs5 } from "react/jsx-runtime";
20540
20701
  import { jsx as jsx262 } from "react/jsx-runtime";
20541
20702
  import * as React49 from "react";
20542
20703
  import * as React38 from "react";
@@ -20549,7 +20710,7 @@ import { jsx as jsx292 } from "react/jsx-runtime";
20549
20710
  import React210 from "react";
20550
20711
  import { jsx as jsx2102 } from "react/jsx-runtime";
20551
20712
  import * as React422 from "react";
20552
- import * as React41 from "react";
20713
+ import * as React412 from "react";
20553
20714
  import * as React43 from "react";
20554
20715
  import * as ReactDOM5 from "react-dom";
20555
20716
  import { jsx as jsx302 } from "react/jsx-runtime";
@@ -20897,7 +21058,7 @@ var useMousePosition = (ref) => {
20897
21058
  return angle;
20898
21059
  };
20899
21060
  var Faces = ({ elements, ...svgProps }) => {
20900
- return /* @__PURE__ */ jsx212(Fragment3, {
21061
+ return /* @__PURE__ */ jsx212(Fragment32, {
20901
21062
  children: elements.map(({ points, color, crispEdges }, idx) => {
20902
21063
  return /* @__PURE__ */ jsx212("path", {
20903
21064
  d: threeDIntoSvgPath(points),
@@ -20956,7 +21117,7 @@ var Outer = ({
20956
21117
  description: "rect",
20957
21118
  transformations: centerOriented
20958
21119
  });
20959
- return /* @__PURE__ */ jsxs6("div", {
21120
+ return /* @__PURE__ */ jsxs8("div", {
20960
21121
  className: "relative",
20961
21122
  style: { width, height },
20962
21123
  children: [
@@ -25960,7 +26121,7 @@ var ChevronDown = createLucideIcon("ChevronDown", [
25960
26121
  var ChevronUp = createLucideIcon("ChevronUp", [["path", { d: "m18 15-6-6-6 6", key: "153udz" }]]);
25961
26122
  var Select2 = Root222;
25962
26123
  var SelectValue2 = Value;
25963
- var SelectTrigger2 = React372.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs52(Trigger, {
26124
+ var SelectTrigger2 = React372.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs5(Trigger, {
25964
26125
  ref,
25965
26126
  className: cn("flex h-10 w-full items-center justify-between rounded-md border-black border-2 border-b-4 bg-card-bg px-3 py-5 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1 font-brand", className),
25966
26127
  ...props,
@@ -25994,7 +26155,7 @@ var SelectScrollDownButton2 = React372.forwardRef(({ className, ...props }, ref)
25994
26155
  }));
25995
26156
  SelectScrollDownButton2.displayName = ScrollDownButton.displayName;
25996
26157
  var SelectContent2 = React372.forwardRef(({ className, children, position = "popper", ...props }, ref) => /* @__PURE__ */ jsx252(Portal2, {
25997
- children: /* @__PURE__ */ jsxs52(Content2, {
26158
+ children: /* @__PURE__ */ jsxs5(Content2, {
25998
26159
  ref,
25999
26160
  className: cn(" border-2 border-black relative z-50 max-h-96 min-w-32 overflow-hidden rounded-md font-brand bg-card-bg text-text shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2", position === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1", className),
26000
26161
  position,
@@ -26016,7 +26177,7 @@ var SelectLabel2 = React372.forwardRef(({ className, ...props }, ref) => /* @__P
26016
26177
  ...props
26017
26178
  }));
26018
26179
  SelectLabel2.displayName = Label.displayName;
26019
- var SelectItem2 = React372.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs52(Item, {
26180
+ var SelectItem2 = React372.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs5(Item, {
26020
26181
  ref,
26021
26182
  className: cn("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-hidden focus:bg-slate-200 dark:focus:bg-white/10 data-disabled:pointer-events-none data-disabled:opacity-50 font-brand", className),
26022
26183
  ...props,
@@ -26558,7 +26719,7 @@ function toSafeIndex(array, index2) {
26558
26719
  function toSafeInteger(number) {
26559
26720
  return number !== number || number === 0 ? 0 : Math.trunc(number);
26560
26721
  }
26561
- var useLayoutEffect222 = globalThis?.document ? React41.useLayoutEffect : () => {};
26722
+ var useLayoutEffect222 = globalThis?.document ? React412.useLayoutEffect : () => {};
26562
26723
  var useReactId2 = React422[" useId ".trim().toString()] || (() => {
26563
26724
  return;
26564
26725
  });
@@ -28494,7 +28655,7 @@ function cn2(...inputs) {
28494
28655
  }
28495
28656
 
28496
28657
  // src/components/homepage/PricingBulletPoint.tsx
28497
- import { jsx as jsx48, jsxs as jsxs7 } from "react/jsx-runtime";
28658
+ import { jsx as jsx48, jsxs as jsxs9 } from "react/jsx-runtime";
28498
28659
  var container3 = {
28499
28660
  display: "flex",
28500
28661
  flexDirection: "row",
@@ -28508,7 +28669,7 @@ var greyCircle = {
28508
28669
  backgroundColor: "var(--footer-border)"
28509
28670
  };
28510
28671
  var PricingBulletPoint = ({ text, checked, children }) => {
28511
- const checkmarkSVG = /* @__PURE__ */ jsxs7("svg", {
28672
+ const checkmarkSVG = /* @__PURE__ */ jsxs9("svg", {
28512
28673
  width: "20",
28513
28674
  height: "20",
28514
28675
  viewBox: "0 0 20 20",
@@ -28530,13 +28691,13 @@ var PricingBulletPoint = ({ text, checked, children }) => {
28530
28691
  })
28531
28692
  ]
28532
28693
  });
28533
- return /* @__PURE__ */ jsxs7("div", {
28694
+ return /* @__PURE__ */ jsxs9("div", {
28534
28695
  style: container3,
28535
28696
  children: [
28536
28697
  checked ? checkmarkSVG : /* @__PURE__ */ jsx48("div", {
28537
28698
  style: greyCircle
28538
28699
  }),
28539
- /* @__PURE__ */ jsxs7("div", {
28700
+ /* @__PURE__ */ jsxs9("div", {
28540
28701
  className: "fontbrand text-lg\t",
28541
28702
  children: [
28542
28703
  text,
@@ -28548,7 +28709,7 @@ var PricingBulletPoint = ({ text, checked, children }) => {
28548
28709
  };
28549
28710
 
28550
28711
  // src/components/homepage/FreePricing.tsx
28551
- import { jsx as jsx49, jsxs as jsxs8, Fragment as Fragment9 } from "react/jsx-runtime";
28712
+ import { jsx as jsx49, jsxs as jsxs10, Fragment as Fragment11 } from "react/jsx-runtime";
28552
28713
  var Container = ({
28553
28714
  children
28554
28715
  }) => {
@@ -28592,7 +28753,7 @@ var icon = {
28592
28753
  };
28593
28754
  var PricingSlider = ({ value, onChange, min: min2, max: max2, step = 1, "aria-label": ariaLabel }) => {
28594
28755
  const percentage = (value - min2) / (max2 - min2) * 100;
28595
- return /* @__PURE__ */ jsxs8(Fragment9, {
28756
+ return /* @__PURE__ */ jsxs10(Fragment11, {
28596
28757
  children: [
28597
28758
  /* @__PURE__ */ jsx49("style", {
28598
28759
  children: `
@@ -28649,7 +28810,7 @@ var textUnitWrapper = {
28649
28810
  flexDirection: "column"
28650
28811
  };
28651
28812
  var FreePricing = () => {
28652
- return /* @__PURE__ */ jsxs8(Container, {
28813
+ return /* @__PURE__ */ jsxs10(Container, {
28653
28814
  children: [
28654
28815
  /* @__PURE__ */ jsx49(Audience, {
28655
28816
  children: "For individuals and companies of up to 3 people"
@@ -28680,7 +28841,7 @@ var FreePricing = () => {
28680
28841
  ...textUnitWrapper,
28681
28842
  alignItems: "flex-end"
28682
28843
  },
28683
- children: /* @__PURE__ */ jsxs8("a", {
28844
+ children: /* @__PURE__ */ jsxs10("a", {
28684
28845
  target: "_blank",
28685
28846
  href: "https://www.remotion.dev/docs",
28686
28847
  className: "font-brand text-brand flex flex-row items-center gap-1 no-underline",
@@ -28704,7 +28865,7 @@ var FreePricing = () => {
28704
28865
  });
28705
28866
  };
28706
28867
  var EnterpriseLicense = () => {
28707
- return /* @__PURE__ */ jsxs8(Container, {
28868
+ return /* @__PURE__ */ jsxs10(Container, {
28708
28869
  children: [
28709
28870
  /* @__PURE__ */ jsx49(Audience, {
28710
28871
  children: "For advanced needs"
@@ -28737,7 +28898,7 @@ var EnterpriseLicense = () => {
28737
28898
  checked: true
28738
28899
  }),
28739
28900
  /* @__PURE__ */ jsx49(PricingBulletPoint, {
28740
- text: /* @__PURE__ */ jsxs8("span", {
28901
+ text: /* @__PURE__ */ jsxs10("span", {
28741
28902
  children: [
28742
28903
  /* @__PURE__ */ jsx49("a", {
28743
28904
  href: "https://www.remotion.dev/editor-starter",
@@ -28755,7 +28916,7 @@ var EnterpriseLicense = () => {
28755
28916
  }),
28756
28917
  /* @__PURE__ */ jsx49("div", {
28757
28918
  className: "flex flex-row justify-end",
28758
- children: /* @__PURE__ */ jsxs8("div", {
28919
+ children: /* @__PURE__ */ jsxs10("div", {
28759
28920
  style: {
28760
28921
  ...textUnitWrapper,
28761
28922
  alignItems: "flex-end"
@@ -28782,7 +28943,7 @@ var EnterpriseLicense = () => {
28782
28943
  var SEAT_PRICE = 25;
28783
28944
  var RENDER_UNIT_PRICE = 10;
28784
28945
  var SectionCheckbox = ({ checked, onChange, title, subtitle, children }) => {
28785
- return /* @__PURE__ */ jsxs8("div", {
28946
+ return /* @__PURE__ */ jsxs10("div", {
28786
28947
  className: "flex flex-row gap-3 cursor-pointer select-none items-center",
28787
28948
  onClick: () => onChange(!checked),
28788
28949
  children: [
@@ -28791,10 +28952,10 @@ var SectionCheckbox = ({ checked, onChange, title, subtitle, children }) => {
28791
28952
  onToggle: () => onChange(!checked),
28792
28953
  "aria-label": title
28793
28954
  }),
28794
- /* @__PURE__ */ jsxs8("div", {
28955
+ /* @__PURE__ */ jsxs10("div", {
28795
28956
  className: "flex flex-col",
28796
28957
  children: [
28797
- /* @__PURE__ */ jsxs8("div", {
28958
+ /* @__PURE__ */ jsxs10("div", {
28798
28959
  className: "fontbrand font-bold text-lg flex flex-row items-center gap-1",
28799
28960
  children: [
28800
28961
  title,
@@ -28844,7 +29005,7 @@ var CompanyPricing = () => {
28844
29005
  }, [formatPrice, totalPrice]);
28845
29006
  const showMinimumMessage = automatorsSelected && creatorsPrice + automatorsPrice < 100;
28846
29007
  const showEnterpriseMessage = totalPrice >= 500;
28847
- return /* @__PURE__ */ jsxs8(Container, {
29008
+ return /* @__PURE__ */ jsxs10(Container, {
28848
29009
  children: [
28849
29010
  /* @__PURE__ */ jsx49(Audience, {
28850
29011
  children: "For collaborations and companies of 4+ people"
@@ -28887,14 +29048,14 @@ var CompanyPricing = () => {
28887
29048
  transition: automatorsSelected ? "grid-template-rows 150ms ease-out, opacity 150ms ease-out 75ms" : "opacity 150ms ease-out, grid-template-rows 150ms ease-out 75ms"
28888
29049
  },
28889
29050
  inert: !automatorsSelected,
28890
- children: /* @__PURE__ */ jsxs8("div", {
29051
+ children: /* @__PURE__ */ jsxs10("div", {
28891
29052
  className: "overflow-hidden",
28892
29053
  children: [
28893
29054
  /* @__PURE__ */ jsx49("p", {
28894
29055
  className: "text-sm text-muted fontbrand pt-3 pb-1",
28895
29056
  children: "Intended for companies launching applications and systems; such as video editors, prompt-to-video apps, embedding the Remotion Player, or any other automated video creation. A $100/mo Minimum Spend applies. Developers working on automation projects do not require a Seat."
28896
29057
  }),
28897
- /* @__PURE__ */ jsxs8("div", {
29058
+ /* @__PURE__ */ jsxs10("div", {
28898
29059
  className: "flex flex-row items-center gap-3 sm:gap-4 w-full pt-3 pb-1",
28899
29060
  children: [
28900
29061
  /* @__PURE__ */ jsx49("div", {
@@ -28908,14 +29069,14 @@ var CompanyPricing = () => {
28908
29069
  "aria-label": "Number of renders"
28909
29070
  })
28910
29071
  }),
28911
- /* @__PURE__ */ jsxs8("div", {
29072
+ /* @__PURE__ */ jsxs10("div", {
28912
29073
  className: "fontbrand shrink-0 whitespace-nowrap w-[135px] sm:w-[150px] text-right tabular-nums",
28913
29074
  children: [
28914
29075
  new Intl.NumberFormat("en-US").format(cloudRenders),
28915
29076
  " Renders"
28916
29077
  ]
28917
29078
  }),
28918
- /* @__PURE__ */ jsxs8("div", {
29079
+ /* @__PURE__ */ jsxs10("div", {
28919
29080
  className: "fontbrand font-bold min-w-[60px] text-right shrink-0 whitespace-nowrap tabular-nums",
28920
29081
  children: [
28921
29082
  "$",
@@ -28944,14 +29105,14 @@ var CompanyPricing = () => {
28944
29105
  transition: creatorsSelected ? "grid-template-rows 150ms ease-out, opacity 150ms ease-out 75ms" : "opacity 150ms ease-out, grid-template-rows 150ms ease-out 75ms"
28945
29106
  },
28946
29107
  inert: !creatorsSelected,
28947
- children: /* @__PURE__ */ jsxs8("div", {
29108
+ children: /* @__PURE__ */ jsxs10("div", {
28948
29109
  className: "overflow-hidden",
28949
29110
  children: [
28950
29111
  /* @__PURE__ */ jsx49("p", {
28951
29112
  className: "text-sm text-muted fontbrand pt-3 pb-1",
28952
29113
  children: "Intended for low volume video creations through coding and prompting, and building motion design systems in a local environment. Get 1 Seat per user."
28953
29114
  }),
28954
- /* @__PURE__ */ jsxs8("div", {
29115
+ /* @__PURE__ */ jsxs10("div", {
28955
29116
  className: "flex flex-row items-center gap-3 sm:gap-4 w-full pt-3 pb-1",
28956
29117
  children: [
28957
29118
  /* @__PURE__ */ jsx49("div", {
@@ -28964,7 +29125,7 @@ var CompanyPricing = () => {
28964
29125
  "aria-label": "Number of seats"
28965
29126
  })
28966
29127
  }),
28967
- /* @__PURE__ */ jsxs8("div", {
29128
+ /* @__PURE__ */ jsxs10("div", {
28968
29129
  className: "fontbrand shrink-0 whitespace-nowrap w-[135px] sm:w-[150px] text-center tabular-nums",
28969
29130
  children: [
28970
29131
  devSeatCount,
@@ -28972,7 +29133,7 @@ var CompanyPricing = () => {
28972
29133
  devSeatCount === 1 ? "Seat" : "Seats"
28973
29134
  ]
28974
29135
  }),
28975
- /* @__PURE__ */ jsxs8("div", {
29136
+ /* @__PURE__ */ jsxs10("div", {
28976
29137
  className: "fontbrand font-bold min-w-[60px] text-right shrink-0 whitespace-nowrap tabular-nums",
28977
29138
  children: [
28978
29139
  "$",
@@ -28989,14 +29150,14 @@ var CompanyPricing = () => {
28989
29150
  /* @__PURE__ */ jsx49("div", {
28990
29151
  style: { height: 14 }
28991
29152
  }),
28992
- /* @__PURE__ */ jsxs8("div", {
29153
+ /* @__PURE__ */ jsxs10("div", {
28993
29154
  className: "flex flex-row items-baseline justify-end gap-2",
28994
29155
  children: [
28995
29156
  /* @__PURE__ */ jsx49("div", {
28996
29157
  className: "fontbrand text-muted text-sm",
28997
29158
  children: "Total"
28998
29159
  }),
28999
- /* @__PURE__ */ jsxs8(PriceTag, {
29160
+ /* @__PURE__ */ jsxs10(PriceTag, {
29000
29161
  children: [
29001
29162
  totalPriceString,
29002
29163
  "/month"
@@ -29004,7 +29165,7 @@ var CompanyPricing = () => {
29004
29165
  })
29005
29166
  ]
29006
29167
  }),
29007
- /* @__PURE__ */ jsxs8("div", {
29168
+ /* @__PURE__ */ jsxs10("div", {
29008
29169
  className: "flex flex-col items-end",
29009
29170
  children: [
29010
29171
  /* @__PURE__ */ jsx49(BottomInfo, {
@@ -29012,7 +29173,7 @@ var CompanyPricing = () => {
29012
29173
  className: "opacity-0 data-[visible=true]:opacity-100 transition-opacity mt-1",
29013
29174
  children: "The minimum is $100 per month for Remotion for Automators"
29014
29175
  }),
29015
- /* @__PURE__ */ jsxs8(BottomInfo, {
29176
+ /* @__PURE__ */ jsxs10(BottomInfo, {
29016
29177
  "data-visible": showEnterpriseMessage,
29017
29178
  className: "opacity-0 data-[visible=true]:opacity-100 transition-opacity mt-1",
29018
29179
  children: [
@@ -29038,7 +29199,7 @@ var CompanyPricing = () => {
29038
29199
  ...textUnitWrapper,
29039
29200
  alignItems: "flex-end"
29040
29201
  },
29041
- children: /* @__PURE__ */ jsxs8("a", {
29202
+ children: /* @__PURE__ */ jsxs10("a", {
29042
29203
  href: "https://remotion.pro/dashboard",
29043
29204
  className: "font-brand text-brand flex flex-row items-center gap-1 no-underline",
29044
29205
  children: [
@@ -29062,12 +29223,12 @@ var CompanyPricing = () => {
29062
29223
  };
29063
29224
 
29064
29225
  // src/components/homepage/Pricing.tsx
29065
- import { jsx as jsx50, jsxs as jsxs9 } from "react/jsx-runtime";
29226
+ import { jsx as jsx50, jsxs as jsxs11 } from "react/jsx-runtime";
29066
29227
  var Pricing = ({
29067
29228
  faqHref = "/docs/license/faq",
29068
29229
  faqLabel = "License FAQ",
29069
29230
  licenseHref = "https://github.com/remotion-dev/remotion/blob/main/LICENSE.md",
29070
- termsHref = "https://www.remotion.pro/terms"
29231
+ termsHref = "/docs/license/terms"
29071
29232
  }) => {
29072
29233
  const faqLinkTarget = useMemo53(() => {
29073
29234
  return faqHref.startsWith("http") ? "_blank" : undefined;
@@ -29078,7 +29239,7 @@ var Pricing = ({
29078
29239
  const termsLinkTarget = useMemo53(() => {
29079
29240
  return termsHref.startsWith("http") ? "_blank" : undefined;
29080
29241
  }, [termsHref]);
29081
- return /* @__PURE__ */ jsxs9("div", {
29242
+ return /* @__PURE__ */ jsxs11("div", {
29082
29243
  style: {
29083
29244
  display: "flex",
29084
29245
  flexDirection: "column",
@@ -29094,7 +29255,7 @@ var Pricing = ({
29094
29255
  justifyContent: "center",
29095
29256
  display: "flex"
29096
29257
  },
29097
- children: /* @__PURE__ */ jsxs9("div", {
29258
+ children: /* @__PURE__ */ jsxs11("div", {
29098
29259
  style: {
29099
29260
  fontFamily: "GTPlanar"
29100
29261
  },
@@ -29145,7 +29306,7 @@ var SectionTitle = ({
29145
29306
  };
29146
29307
 
29147
29308
  // src/components/homepage/AutomationsSection.tsx
29148
- import { jsx as jsx54, jsxs as jsxs10, Fragment as Fragment11 } from "react/jsx-runtime";
29309
+ import { jsx as jsx54, jsxs as jsxs12, Fragment as Fragment12 } from "react/jsx-runtime";
29149
29310
  var appPipeline = [
29150
29311
  {
29151
29312
  step: "01",
@@ -29166,7 +29327,7 @@ var appPipeline = [
29166
29327
  {
29167
29328
  step: "03",
29168
29329
  title: "Preview and render",
29169
- description: /* @__PURE__ */ jsxs10(Fragment11, {
29330
+ description: /* @__PURE__ */ jsxs12(Fragment12, {
29170
29331
  children: [
29171
29332
  "Use the",
29172
29333
  " ",
@@ -29217,7 +29378,7 @@ var Arrow3 = () => /* @__PURE__ */ jsx54("svg", {
29217
29378
  })
29218
29379
  });
29219
29380
  var InlineLink = ({ href, children }) => {
29220
- return /* @__PURE__ */ jsxs10("a", {
29381
+ return /* @__PURE__ */ jsxs12("a", {
29221
29382
  href,
29222
29383
  className: "mt-3 inline-flex flex-row items-center font-brand text-base font-semibold text-text no-underline sm:text-sm",
29223
29384
  children: [
@@ -29231,10 +29392,10 @@ var StudioIllustration = () => {
29231
29392
  return /* @__PURE__ */ jsx54("div", {
29232
29393
  className: illustrationFrame,
29233
29394
  "aria-hidden": "true",
29234
- children: /* @__PURE__ */ jsxs10("div", {
29395
+ children: /* @__PURE__ */ jsxs12("div", {
29235
29396
  className: "relative w-full max-w-[220px] rounded-md bg-pane px-4 py-6 fontbrand",
29236
29397
  children: [
29237
- /* @__PURE__ */ jsxs10("div", {
29398
+ /* @__PURE__ */ jsxs12("div", {
29238
29399
  className: "absolute bottom-5 left-1/2 top-3 flex -translate-x-1/2 flex-col items-center",
29239
29400
  children: [
29240
29401
  /* @__PURE__ */ jsx54("div", {
@@ -29245,10 +29406,10 @@ var StudioIllustration = () => {
29245
29406
  })
29246
29407
  ]
29247
29408
  }),
29248
- /* @__PURE__ */ jsxs10("div", {
29409
+ /* @__PURE__ */ jsxs12("div", {
29249
29410
  className: "space-y-4",
29250
29411
  children: [
29251
- /* @__PURE__ */ jsxs10("div", {
29412
+ /* @__PURE__ */ jsxs12("div", {
29252
29413
  className: "grid grid-cols-[28px_1fr] items-center gap-3",
29253
29414
  children: [
29254
29415
  /* @__PURE__ */ jsx54("div", {
@@ -29259,7 +29420,7 @@ var StudioIllustration = () => {
29259
29420
  })
29260
29421
  ]
29261
29422
  }),
29262
- /* @__PURE__ */ jsxs10("div", {
29423
+ /* @__PURE__ */ jsxs12("div", {
29263
29424
  className: "grid grid-cols-[28px_1fr] items-center gap-3",
29264
29425
  children: [
29265
29426
  /* @__PURE__ */ jsx54("div", {
@@ -29270,7 +29431,7 @@ var StudioIllustration = () => {
29270
29431
  })
29271
29432
  ]
29272
29433
  }),
29273
- /* @__PURE__ */ jsxs10("div", {
29434
+ /* @__PURE__ */ jsxs12("div", {
29274
29435
  className: "grid grid-cols-[28px_1fr] items-center gap-3",
29275
29436
  children: [
29276
29437
  /* @__PURE__ */ jsx54("div", {
@@ -29291,7 +29452,7 @@ var PropsIllustration = () => {
29291
29452
  return /* @__PURE__ */ jsx54("div", {
29292
29453
  className: illustrationFrame,
29293
29454
  "aria-hidden": "true",
29294
- children: /* @__PURE__ */ jsxs10("div", {
29455
+ children: /* @__PURE__ */ jsxs12("div", {
29295
29456
  className: "flex h-[124px] w-full max-w-[240px] flex-col justify-center whitespace-nowrap rounded-md bg-pane p-4 text-left font-mono text-base leading-6 text-text sm:text-sm sm:leading-5",
29296
29457
  children: [
29297
29458
  /* @__PURE__ */ jsx54("div", {
@@ -29322,12 +29483,12 @@ var PreviewIllustration = () => {
29322
29483
  return /* @__PURE__ */ jsx54("div", {
29323
29484
  className: illustrationFrame,
29324
29485
  "aria-hidden": "true",
29325
- children: /* @__PURE__ */ jsxs10("div", {
29486
+ children: /* @__PURE__ */ jsxs12("div", {
29326
29487
  className: "w-full max-w-[240px] rounded-md border border-solid border-muted bg-card-bg p-2 fontbrand",
29327
29488
  children: [
29328
29489
  /* @__PURE__ */ jsx54("div", {
29329
29490
  className: "relative flex h-[92px] items-center justify-center rounded-sm border border-solid border-muted bg-pane text-brand",
29330
- children: /* @__PURE__ */ jsxs10("svg", {
29491
+ children: /* @__PURE__ */ jsxs12("svg", {
29331
29492
  className: "h-14 w-14 text-brand",
29332
29493
  viewBox: "-11.5 -10.23174 23 20.46348",
29333
29494
  fill: "none",
@@ -29367,7 +29528,7 @@ var PreviewIllustration = () => {
29367
29528
  ]
29368
29529
  })
29369
29530
  }),
29370
- /* @__PURE__ */ jsxs10("div", {
29531
+ /* @__PURE__ */ jsxs12("div", {
29371
29532
  className: "mt-2 flex items-center gap-2",
29372
29533
  children: [
29373
29534
  /* @__PURE__ */ jsx54("div", {
@@ -29416,7 +29577,7 @@ var PipelineIllustration = ({ kind }) => {
29416
29577
  return /* @__PURE__ */ jsx54(RenderIllustration, {});
29417
29578
  };
29418
29579
  var AutomationsSection = () => {
29419
- return /* @__PURE__ */ jsxs10("div", {
29580
+ return /* @__PURE__ */ jsxs12("div", {
29420
29581
  children: [
29421
29582
  /* @__PURE__ */ jsx54(SectionTitle, {
29422
29583
  children: "Create video apps and automations"
@@ -29429,13 +29590,13 @@ var AutomationsSection = () => {
29429
29590
  className: "py-4",
29430
29591
  children: /* @__PURE__ */ jsx54("dl", {
29431
29592
  className: "grid grid-cols-1 justify-items-stretch gap-5 lg:grid-cols-3 lg:justify-items-center lg:gap-0",
29432
- children: appPipeline.map((item) => /* @__PURE__ */ jsxs10("div", {
29593
+ children: appPipeline.map((item) => /* @__PURE__ */ jsxs12("div", {
29433
29594
  className: "flex w-full flex-col rounded-lg border border-solid border-text/10 bg-card-bg px-4 py-5 text-left sm:px-5 lg:max-w-[300px] lg:rounded-none lg:border-y-0 lg:border-r-0 lg:border-l lg:bg-transparent lg:px-6 lg:py-0 lg:first:border-l-0",
29434
29595
  children: [
29435
29596
  /* @__PURE__ */ jsx54(PipelineIllustration, {
29436
29597
  kind: item.illustration
29437
29598
  }),
29438
- /* @__PURE__ */ jsxs10("div", {
29599
+ /* @__PURE__ */ jsxs12("div", {
29439
29600
  className: "mb-2 flex items-center gap-2.5",
29440
29601
  children: [
29441
29602
  /* @__PURE__ */ jsx54("div", {
@@ -29460,7 +29621,7 @@ var AutomationsSection = () => {
29460
29621
  }, item.step))
29461
29622
  })
29462
29623
  }),
29463
- /* @__PURE__ */ jsxs10("div", {
29624
+ /* @__PURE__ */ jsxs12("div", {
29464
29625
  className: "mt-8 flex flex-wrap justify-center gap-x-5 gap-y-2 fontbrand text-base text-muted sm:text-sm",
29465
29626
  children: [
29466
29627
  /* @__PURE__ */ jsx54("span", {
@@ -29481,7 +29642,7 @@ var AutomationsSection_default = AutomationsSection;
29481
29642
 
29482
29643
  // src/components/homepage/BackgroundAnimation.tsx
29483
29644
  import { useEffect as useEffect40 } from "react";
29484
- import { jsx as jsx56, jsxs as jsxs11 } from "react/jsx-runtime";
29645
+ import { jsx as jsx56, jsxs as jsxs13 } from "react/jsx-runtime";
29485
29646
  "use client";
29486
29647
  var rx = 0.2;
29487
29648
  var ry = 0.45;
@@ -29513,7 +29674,7 @@ var BackgroundAnimation = () => {
29513
29674
  }, [css]);
29514
29675
  return /* @__PURE__ */ jsx56("div", {
29515
29676
  className: " w-full h-full min-w-0 m-auto lg:relative lg:min-w-[700px] lg:max-w-[1200px] lg:ml-auto lg:left-auto pointer-events-none",
29516
- children: /* @__PURE__ */ jsxs11("svg", {
29677
+ children: /* @__PURE__ */ jsxs13("svg", {
29517
29678
  className: "translate-y-[-30%] lg:translate-y-[-50%]",
29518
29679
  viewBox: "0 0 1 1",
29519
29680
  style: {
@@ -29568,7 +29729,7 @@ var BackgroundAnimation = () => {
29568
29729
  };
29569
29730
 
29570
29731
  // src/components/homepage/CommunityStatsItems.tsx
29571
- import { jsx as jsx57, jsxs as jsxs12 } from "react/jsx-runtime";
29732
+ import { jsx as jsx57, jsxs as jsxs14 } from "react/jsx-runtime";
29572
29733
  var StatItemContent = ({
29573
29734
  content,
29574
29735
  width,
@@ -29601,10 +29762,10 @@ var Pill = ({ children, className }) => {
29601
29762
  });
29602
29763
  };
29603
29764
  var InstallsPerMonth = () => {
29604
- return /* @__PURE__ */ jsxs12(Pill, {
29765
+ return /* @__PURE__ */ jsxs14(Pill, {
29605
29766
  className: "w-[30%] flex-col",
29606
29767
  children: [
29607
- /* @__PURE__ */ jsxs12("div", {
29768
+ /* @__PURE__ */ jsxs14("div", {
29608
29769
  style: {
29609
29770
  display: "flex",
29610
29771
  alignItems: "center",
@@ -29612,7 +29773,7 @@ var InstallsPerMonth = () => {
29612
29773
  },
29613
29774
  children: [
29614
29775
  /* @__PURE__ */ jsx57(StatItemContent, {
29615
- content: "4M+",
29776
+ content: "5M+",
29616
29777
  width: "100px",
29617
29778
  fontSize: "2.5rem",
29618
29779
  fontWeight: "bold"
@@ -29643,10 +29804,10 @@ var InstallsPerMonth = () => {
29643
29804
  });
29644
29805
  };
29645
29806
  var PagesOfDocs = () => {
29646
- return /* @__PURE__ */ jsxs12(Pill, {
29807
+ return /* @__PURE__ */ jsxs14(Pill, {
29647
29808
  className: "flex-col",
29648
29809
  children: [
29649
- /* @__PURE__ */ jsxs12("div", {
29810
+ /* @__PURE__ */ jsxs14("div", {
29650
29811
  style: { display: "flex", alignItems: "center", gap: 8 },
29651
29812
  children: [
29652
29813
  /* @__PURE__ */ jsx57(StatItemContent, {
@@ -29680,7 +29841,7 @@ var PagesOfDocs = () => {
29680
29841
  ]
29681
29842
  });
29682
29843
  };
29683
- var TemplatesAndExamples = () => /* @__PURE__ */ jsxs12(Pill, {
29844
+ var TemplatesAndExamples = () => /* @__PURE__ */ jsxs14(Pill, {
29684
29845
  className: "w-[30%] flex items-center flex-row",
29685
29846
  children: [
29686
29847
  /* @__PURE__ */ jsx57(StatItemContent, {
@@ -29698,10 +29859,10 @@ var TemplatesAndExamples = () => /* @__PURE__ */ jsxs12(Pill, {
29698
29859
  ]
29699
29860
  });
29700
29861
  var GitHubStars = () => {
29701
- return /* @__PURE__ */ jsxs12(Pill, {
29862
+ return /* @__PURE__ */ jsxs14(Pill, {
29702
29863
  className: "w-[30%] flex-col",
29703
29864
  children: [
29704
- /* @__PURE__ */ jsxs12("div", {
29865
+ /* @__PURE__ */ jsxs14("div", {
29705
29866
  style: { display: "flex", alignItems: "center" },
29706
29867
  children: [
29707
29868
  /* @__PURE__ */ jsx57(StatItemContent, {
@@ -29719,7 +29880,7 @@ var GitHubStars = () => {
29719
29880
  width: "45px"
29720
29881
  }),
29721
29882
  /* @__PURE__ */ jsx57(StatItemContent, {
29722
- content: "52K",
29883
+ content: "53K",
29723
29884
  width: "80px",
29724
29885
  fontSize: "2.5rem",
29725
29886
  fontWeight: "bold"
@@ -29738,7 +29899,7 @@ var GitHubStars = () => {
29738
29899
  var DiscordMembers = () => {
29739
29900
  return /* @__PURE__ */ jsx57(Pill, {
29740
29901
  className: "w-[30%]",
29741
- children: /* @__PURE__ */ jsxs12("div", {
29902
+ children: /* @__PURE__ */ jsxs14("div", {
29742
29903
  style: {
29743
29904
  width: "80%",
29744
29905
  display: "flex",
@@ -29746,7 +29907,7 @@ var DiscordMembers = () => {
29746
29907
  justifyContent: "center"
29747
29908
  },
29748
29909
  children: [
29749
- /* @__PURE__ */ jsxs12("div", {
29910
+ /* @__PURE__ */ jsxs14("div", {
29750
29911
  style: {
29751
29912
  display: "flex",
29752
29913
  flexDirection: "column",
@@ -29795,7 +29956,7 @@ var DiscordMembers = () => {
29795
29956
  var Contributors = () => {
29796
29957
  return /* @__PURE__ */ jsx57(Pill, {
29797
29958
  className: "w-[30%]",
29798
- children: /* @__PURE__ */ jsxs12("div", {
29959
+ children: /* @__PURE__ */ jsxs14("div", {
29799
29960
  style: { display: "flex", justifyContent: "center" },
29800
29961
  children: [
29801
29962
  /* @__PURE__ */ jsx57("div", {
@@ -29815,7 +29976,7 @@ var Contributors = () => {
29815
29976
  width: "65px"
29816
29977
  })
29817
29978
  }),
29818
- /* @__PURE__ */ jsxs12("div", {
29979
+ /* @__PURE__ */ jsxs14("div", {
29819
29980
  style: {
29820
29981
  display: "flex",
29821
29982
  flexDirection: "column",
@@ -29843,14 +30004,14 @@ var Contributors = () => {
29843
30004
  };
29844
30005
 
29845
30006
  // src/components/homepage/CommunityStats.tsx
29846
- import { jsx as jsx58, jsxs as jsxs13 } from "react/jsx-runtime";
30007
+ import { jsx as jsx58, jsxs as jsxs15 } from "react/jsx-runtime";
29847
30008
  var SectionLink = ({ href, children }) => /* @__PURE__ */ jsx58("a", {
29848
30009
  target: "_blank",
29849
30010
  href,
29850
30011
  className: "no-underline text-inherit contents",
29851
30012
  children
29852
30013
  });
29853
- var CommunityStats = () => /* @__PURE__ */ jsxs13("div", {
30014
+ var CommunityStats = () => /* @__PURE__ */ jsxs15("div", {
29854
30015
  className: "m-auto max-w-[700px] text-center",
29855
30016
  children: [
29856
30017
  /* @__PURE__ */ jsx58(SectionTitle, {
@@ -29860,7 +30021,7 @@ var CommunityStats = () => /* @__PURE__ */ jsxs13("div", {
29860
30021
  className: "fontbrand text-center mb-10 -mt-4",
29861
30022
  children: "Join a thriving community of developers."
29862
30023
  }),
29863
- /* @__PURE__ */ jsxs13("div", {
30024
+ /* @__PURE__ */ jsxs15("div", {
29864
30025
  className: "flex flex-wrap justify-between gap-4 w-full items-center",
29865
30026
  children: [
29866
30027
  /* @__PURE__ */ jsx58(SectionLink, {
@@ -29895,8 +30056,8 @@ var CommunityStats_default = CommunityStats;
29895
30056
 
29896
30057
  // ../player/dist/esm/index.mjs
29897
30058
  import { createContext as createContext32 } from "react";
29898
- import { jsx as jsx59, jsxs as jsxs14 } from "react/jsx-runtime";
29899
- import { jsx as jsx214, jsxs as jsxs24, Fragment as Fragment12 } from "react/jsx-runtime";
30059
+ import { jsx as jsx59, jsxs as jsxs16 } from "react/jsx-runtime";
30060
+ import { jsx as jsx214, jsxs as jsxs24, Fragment as Fragment13 } from "react/jsx-runtime";
29900
30061
  import React57 from "react";
29901
30062
  import { useContext as useContext210, useEffect as useEffect41, useState as useState40 } from "react";
29902
30063
  import { useContext as useContext46, useLayoutEffect as useLayoutEffect18 } from "react";
@@ -29914,7 +30075,7 @@ import {
29914
30075
  useImperativeHandle as useImperativeHandle22,
29915
30076
  useLayoutEffect as useLayoutEffect33,
29916
30077
  useMemo as useMemo142,
29917
- useRef as useRef112,
30078
+ useRef as useRef122,
29918
30079
  useState as useState132
29919
30080
  } from "react";
29920
30081
  import React102, {
@@ -29940,7 +30101,7 @@ import { jsx as jsx74, jsxs as jsxs33 } from "react/jsx-runtime";
29940
30101
  import { jsx as jsx84, jsxs as jsxs43 } from "react/jsx-runtime";
29941
30102
  import { useCallback as useCallback52, useEffect as useEffect92, useMemo as useMemo55, useState as useState82 } from "react";
29942
30103
  import { useEffect as useEffect83, useRef as useRef62, useState as useState72 } from "react";
29943
- import { jsx as jsx94, jsxs as jsxs53 } from "react/jsx-runtime";
30104
+ import { jsx as jsx94, jsxs as jsxs52 } from "react/jsx-runtime";
29944
30105
  import { useCallback as useCallback62, useEffect as useEffect102, useMemo as useMemo62, useRef as useRef72, useState as useState92 } from "react";
29945
30106
  import { jsx as jsx104, jsxs as jsxs62 } from "react/jsx-runtime";
29946
30107
  import { useMemo as useMemo72 } from "react";
@@ -29949,8 +30110,8 @@ import { useMemo as useMemo82 } from "react";
29949
30110
  import { jsx as jsx114, jsxs as jsxs82, Fragment as Fragment23 } from "react/jsx-runtime";
29950
30111
  import { useCallback as useCallback92, useMemo as useMemo112 } from "react";
29951
30112
  import { useCallback as useCallback82, useMemo as useMemo102, useRef as useRef92 } from "react";
29952
- import { jsx as jsx124, jsxs as jsxs92, Fragment as Fragment32 } from "react/jsx-runtime";
29953
- import { useCallback as useCallback112, useMemo as useMemo132, useState as useState122 } from "react";
30113
+ import { jsx as jsx124, jsxs as jsxs92, Fragment as Fragment33 } from "react/jsx-runtime";
30114
+ import { useCallback as useCallback112, useMemo as useMemo132, useRef as useRef112, useState as useState122 } from "react";
29954
30115
  import { jsx as jsx133 } from "react/jsx-runtime";
29955
30116
 
29956
30117
  // ../core/dist/esm/no-react.mjs
@@ -30204,8 +30365,20 @@ var serializeStringInterpolationValue2 = ({
30204
30365
  }
30205
30366
  return values.slice(0, dimensions).map((value, index2) => `${stringifyNumber2(value)}${units[index2]}`).join(" ");
30206
30367
  };
30368
+ var toSignedArea2 = (scale) => {
30369
+ if (scale === 0) {
30370
+ return 0;
30371
+ }
30372
+ return Math.sign(scale) * scale * scale;
30373
+ };
30374
+ var fromSignedArea2 = (area) => {
30375
+ if (area === 0) {
30376
+ return 0;
30377
+ }
30378
+ return Math.sign(area) * Math.sqrt(Math.abs(area));
30379
+ };
30207
30380
  function interpolateFunction2(input, inputRange, outputRange, options2) {
30208
- const { extrapolateLeft, extrapolateRight, easing } = options2;
30381
+ const { extrapolateLeft, extrapolateRight, easing, output } = options2;
30209
30382
  let result = input;
30210
30383
  const [inputMin, inputMax] = inputRange;
30211
30384
  const [outputMin, outputMax] = outputRange;
@@ -30236,7 +30409,13 @@ function interpolateFunction2(input, inputRange, outputRange, options2) {
30236
30409
  }
30237
30410
  result = (result - inputMin) / (inputMax - inputMin);
30238
30411
  result = easing(result);
30239
- result = result * (outputMax - outputMin) + outputMin;
30412
+ if (output === "perceptual-scale") {
30413
+ const signedAreaMin = toSignedArea2(outputMin);
30414
+ const signedAreaMax = toSignedArea2(outputMax);
30415
+ result = fromSignedArea2(result * (signedAreaMax - signedAreaMin) + signedAreaMin);
30416
+ } else {
30417
+ result = result * (outputMax - outputMin) + outputMin;
30418
+ }
30240
30419
  return result;
30241
30420
  }
30242
30421
  function findRange2(input, inputRange) {
@@ -30249,6 +30428,9 @@ function findRange2(input, inputRange) {
30249
30428
  return i - 1;
30250
30429
  }
30251
30430
  var defaultEasing2 = (num) => num;
30431
+ var resolveOutputOption2 = (output) => {
30432
+ return output ?? "linear";
30433
+ };
30252
30434
  var shouldExtendRightForEasing2 = (easing) => {
30253
30435
  return easing.remotionShouldExtendRight === true;
30254
30436
  };
@@ -30270,12 +30452,14 @@ var interpolateSegment2 = ({
30270
30452
  outputRange,
30271
30453
  easing,
30272
30454
  extrapolateLeft,
30273
- extrapolateRight
30455
+ extrapolateRight,
30456
+ output
30274
30457
  }) => {
30275
30458
  return interpolateFunction2(input, inputRange, outputRange, {
30276
30459
  easing,
30277
30460
  extrapolateLeft,
30278
- extrapolateRight: input > inputRange[1] && extrapolateRight === "clamp" && shouldExtendRightForEasing2(easing) ? "extend" : extrapolateRight
30461
+ extrapolateRight: input > inputRange[1] && extrapolateRight === "clamp" && shouldExtendRightForEasing2(easing) ? "extend" : extrapolateRight,
30462
+ output
30279
30463
  });
30280
30464
  };
30281
30465
  var interpolateNumber2 = ({
@@ -30284,6 +30468,7 @@ var interpolateNumber2 = ({
30284
30468
  outputRange,
30285
30469
  options: options2
30286
30470
  }) => {
30471
+ const output = resolveOutputOption2(options2?.output);
30287
30472
  if (inputRange.length === 1) {
30288
30473
  return outputRange[0];
30289
30474
  }
@@ -30308,7 +30493,8 @@ var interpolateNumber2 = ({
30308
30493
  outputRange: [outputRange[range], outputRange[range + 1]],
30309
30494
  easing,
30310
30495
  extrapolateLeft,
30311
- extrapolateRight
30496
+ extrapolateRight,
30497
+ output
30312
30498
  });
30313
30499
  for (let segmentIndex = 0;segmentIndex < range; segmentIndex++) {
30314
30500
  const previousEasing = resolveEasingForSegment2({
@@ -30328,7 +30514,8 @@ var interpolateNumber2 = ({
30328
30514
  outputRange: [outputRange[segmentIndex], outputRange[segmentIndex + 1]],
30329
30515
  easing: previousEasing,
30330
30516
  extrapolateLeft,
30331
- extrapolateRight: "extend"
30517
+ extrapolateRight: "extend",
30518
+ output
30332
30519
  });
30333
30520
  result += continuedSegmentValue - outputRange[segmentIndex + 1];
30334
30521
  }
@@ -30376,14 +30563,18 @@ var interpolateString2 = ({
30376
30563
  }
30377
30564
  }
30378
30565
  }
30379
- return serializeStringInterpolationValue2({
30380
- kind,
30381
- values: [0, 0, 0].map((_, axis) => interpolateNumber2({
30566
+ const values = [0, 0, 0];
30567
+ for (let axis = 0;axis < dimensions; axis++) {
30568
+ values[axis] = interpolateNumber2({
30382
30569
  input,
30383
30570
  inputRange,
30384
30571
  outputRange: parsedOutputRange.map((parsed) => parsed.values[axis]),
30385
30572
  options: options2
30386
- })),
30573
+ });
30574
+ }
30575
+ return serializeStringInterpolationValue2({
30576
+ kind,
30577
+ values,
30387
30578
  units,
30388
30579
  dimensions
30389
30580
  });
@@ -30467,6 +30658,12 @@ function assertValidInterpolatePosterizeOption2(posterize) {
30467
30658
  throw new Error(`posterize must be a positive finite number, but got ${posterize}`);
30468
30659
  }
30469
30660
  }
30661
+ function assertValidInterpolateOutputOption2(output) {
30662
+ if (output === undefined || output === "linear" || output === "perceptual-scale") {
30663
+ return;
30664
+ }
30665
+ throw new Error(`output must be "linear" or "perceptual-scale", but got ${String(output)}`);
30666
+ }
30470
30667
  function interpolate3(input, inputRange, outputRange, options2) {
30471
30668
  if (typeof input === "undefined") {
30472
30669
  throw new Error("input can not be undefined");
@@ -30484,6 +30681,7 @@ function interpolate3(input, inputRange, outputRange, options2) {
30484
30681
  checkValidInputRange2(inputRange);
30485
30682
  assertValidInterpolateEasingOption2(options2?.easing, inputRange.length);
30486
30683
  assertValidInterpolatePosterizeOption2(options2?.posterize);
30684
+ assertValidInterpolateOutputOption2(options2?.output);
30487
30685
  if (typeof input !== "number") {
30488
30686
  throw new TypeError("Cannot interpolate an input which is not a number");
30489
30687
  }
@@ -30616,7 +30814,8 @@ var transformSchema2 = {
30616
30814
  max: 100,
30617
30815
  step: 0.01,
30618
30816
  default: 1,
30619
- description: "Scale"
30817
+ description: "Scale",
30818
+ defaultKeyframeOutput: "perceptual-scale"
30620
30819
  },
30621
30820
  "style.rotate": {
30622
30821
  type: "rotation-css",
@@ -31410,7 +31609,7 @@ import {
31410
31609
  useImperativeHandle as useImperativeHandle42,
31411
31610
  useLayoutEffect as useLayoutEffect42,
31412
31611
  useMemo as useMemo172,
31413
- useRef as useRef132,
31612
+ useRef as useRef142,
31414
31613
  useState as useState142
31415
31614
  } from "react";
31416
31615
  import React133, {
@@ -31419,7 +31618,7 @@ import React133, {
31419
31618
  useCallback as useCallback122,
31420
31619
  useImperativeHandle as useImperativeHandle32,
31421
31620
  useMemo as useMemo162,
31422
- useRef as useRef122
31621
+ useRef as useRef132
31423
31622
  } from "react";
31424
31623
  import { useContext as useContext62, useMemo as useMemo152 } from "react";
31425
31624
  import { jsx as jsx153 } from "react/jsx-runtime";
@@ -31458,7 +31657,7 @@ var PlayIcon = () => {
31458
31657
  });
31459
31658
  };
31460
31659
  var PauseIcon = () => {
31461
- return /* @__PURE__ */ jsxs14("svg", {
31660
+ return /* @__PURE__ */ jsxs16("svg", {
31462
31661
  viewBox: "0 0 100 100",
31463
31662
  width: ICON_SIZE2,
31464
31663
  height: ICON_SIZE2,
@@ -31492,7 +31691,7 @@ var FullscreenIcon = ({
31492
31691
  const out = isFullscreen ? 0 : strokeWidth2 / 2;
31493
31692
  const middleInset = isFullscreen ? strokeWidth2 * 1.6 : strokeWidth2 / 2;
31494
31693
  const inset = isFullscreen ? strokeWidth2 * 1.6 : strokeWidth2 * 2;
31495
- return /* @__PURE__ */ jsxs14("svg", {
31694
+ return /* @__PURE__ */ jsxs16("svg", {
31496
31695
  viewBox: `0 0 ${viewSize} ${viewSize}`,
31497
31696
  height: fullscreenIconSize,
31498
31697
  width: fullscreenIconSize,
@@ -31580,7 +31779,7 @@ var studioStyle = {
31580
31779
  };
31581
31780
  var BufferingIndicator = ({ type }) => {
31582
31781
  const style = type === "player" ? playerStyle : studioStyle;
31583
- return /* @__PURE__ */ jsxs24(Fragment12, {
31782
+ return /* @__PURE__ */ jsxs24(Fragment13, {
31584
31783
  children: [
31585
31784
  /* @__PURE__ */ jsx214("style", {
31586
31785
  type: "text/css",
@@ -33065,7 +33264,7 @@ var PlaybackrateOption = ({ rate, onSelect, selectedRate, keyboardSelectedRate }
33065
33264
  backgroundColor: hovered || isFocused ? "#eee" : "transparent"
33066
33265
  };
33067
33266
  }, [hovered, isFocused]);
33068
- return /* @__PURE__ */ jsxs53("div", {
33267
+ return /* @__PURE__ */ jsxs52("div", {
33069
33268
  onPointerEnter: onMouseEnter,
33070
33269
  onPointerLeave: onMouseLeave,
33071
33270
  tabIndex: 0,
@@ -33192,13 +33391,13 @@ var PlaybackrateControl = ({ playbackRates, canvasSize }) => {
33192
33391
  }, [setIsComponentVisible]);
33193
33392
  return /* @__PURE__ */ jsx94("div", {
33194
33393
  ref,
33195
- children: /* @__PURE__ */ jsxs53("button", {
33394
+ children: /* @__PURE__ */ jsxs52("button", {
33196
33395
  type: "button",
33197
33396
  "aria-label": "Change playback rate",
33198
33397
  style: button,
33199
33398
  onClick,
33200
33399
  children: [
33201
- /* @__PURE__ */ jsxs53("div", {
33400
+ /* @__PURE__ */ jsxs52("div", {
33202
33401
  style: label2,
33203
33402
  children: [
33204
33403
  playbackRate,
@@ -34181,7 +34380,7 @@ var PlayerUI = ({
34181
34380
  showPosterWhenBufferingAndPaused && showBufferIndicator && !player.isPlaying()
34182
34381
  ].some(Boolean);
34183
34382
  const { left, top, width, height, ...outerWithoutScale } = outer;
34184
- const content = /* @__PURE__ */ jsxs92(Fragment32, {
34383
+ const content = /* @__PURE__ */ jsxs92(Fragment33, {
34185
34384
  children: [
34186
34385
  /* @__PURE__ */ jsxs92("div", {
34187
34386
  style: outer,
@@ -34369,7 +34568,9 @@ var SharedPlayerContexts = ({
34369
34568
  mediaVolume
34370
34569
  };
34371
34570
  }, [playerMuted, mediaVolume]);
34372
- const shouldCreateAudioContext = audioEnabled && !playerMuted && mediaVolume > 0;
34571
+ const audioContextWasCreated = useRef112(false);
34572
+ const shouldCreateAudioContext = audioContextWasCreated.current || audioEnabled && !playerMuted && mediaVolume > 0;
34573
+ audioContextWasCreated.current = shouldCreateAudioContext;
34373
34574
  const setMediaVolumeAndPersist = useCallback112((vol) => {
34374
34575
  setMediaVolume(vol);
34375
34576
  if (persistVolumeToStorage) {
@@ -34623,9 +34824,9 @@ var PlayerFn = ({
34623
34824
  }));
34624
34825
  const [playing, setPlaying] = useState132(false);
34625
34826
  const [rootId] = useState132("player-comp");
34626
- const rootRef = useRef112(null);
34627
- const audioAndVideoTags = useRef112([]);
34628
- const imperativePlaying = useRef112(false);
34827
+ const rootRef = useRef122(null);
34828
+ const audioAndVideoTags = useRef122([]);
34829
+ const imperativePlaying = useRef122(false);
34629
34830
  const [currentPlaybackRate, setCurrentPlaybackRate] = useState132(playbackRate);
34630
34831
  if (typeof compositionHeight !== "number") {
34631
34832
  throw new TypeError(`'compositionHeight' must be a number but got '${typeof compositionHeight}' instead`);
@@ -34826,7 +35027,7 @@ var ThumbnailUI = ({
34826
35027
  }, ref) => {
34827
35028
  const config = Internals.useUnsafeVideoConfig();
34828
35029
  const video = Internals.useVideo();
34829
- const container4 = useRef122(null);
35030
+ const container4 = useRef132(null);
34830
35031
  const canvasSize = useElementSize(container4, {
34831
35032
  triggerOnWindowResize: false,
34832
35033
  shouldApplyCssTransforms: false
@@ -34952,7 +35153,7 @@ var ThumbnailFn = ({
34952
35153
  }, []);
34953
35154
  }
34954
35155
  const [thumbnailId] = useState142(() => String(random(null)));
34955
- const rootRef = useRef132(null);
35156
+ const rootRef = useRef142(null);
34956
35157
  const timelineState = useMemo172(() => {
34957
35158
  const value = {
34958
35159
  playing: false,
@@ -35803,11 +36004,11 @@ function useColorMode() {
35803
36004
  // ../media/dist/esm/index.mjs
35804
36005
  import { useMemo as useMemo312, useState as useState312 } from "react";
35805
36006
  import { useContext as useContext212, useEffect as useEffect43, useMemo as useMemo58, useRef as useRef50, useState as useState41 } from "react";
35806
- import { ALL_FORMATS, Input as Input2, UrlSource } from "mediabunny";
35807
36007
  import {
35808
36008
  AudioBufferSink,
35809
36009
  InputDisposedError
35810
36010
  } from "mediabunny";
36011
+ import { ALL_FORMATS, Input as Input2, UrlSource } from "mediabunny";
35811
36012
  import { CanvasSink } from "mediabunny";
35812
36013
  import { useContext as useContext50, useLayoutEffect as useLayoutEffect19 } from "react";
35813
36014
  import { jsx as jsx61 } from "react/jsx-runtime";
@@ -36649,6 +36850,120 @@ var getDurationOrCompute = async (input) => {
36649
36850
  skipLiveWait: true
36650
36851
  }) ?? input.computeDuration(undefined, { skipLiveWait: true });
36651
36852
  };
36853
+ var normalizeMediaHeaders = (headers) => {
36854
+ if (!headers) {
36855
+ return;
36856
+ }
36857
+ const entries = [];
36858
+ if (headers instanceof Headers) {
36859
+ headers.forEach((value, key) => {
36860
+ entries.push([key.toLowerCase(), value]);
36861
+ });
36862
+ } else if (Array.isArray(headers)) {
36863
+ for (const [key, value] of headers) {
36864
+ entries.push([key.toLowerCase(), value]);
36865
+ }
36866
+ } else {
36867
+ for (const [key, value] of Object.entries(headers)) {
36868
+ entries.push([key.toLowerCase(), value]);
36869
+ }
36870
+ }
36871
+ entries.sort(([a2], [b2]) => a2 < b2 ? -1 : a2 > b2 ? 1 : 0);
36872
+ return entries;
36873
+ };
36874
+ var normalizeMediaRequestInit = (requestInit) => {
36875
+ if (!requestInit) {
36876
+ return;
36877
+ }
36878
+ const headers = normalizeMediaHeaders(requestInit.headers);
36879
+ const normalized = {
36880
+ ...requestInit.cache === undefined ? null : { cache: requestInit.cache },
36881
+ ...requestInit.credentials === undefined ? null : { credentials: requestInit.credentials },
36882
+ ...headers === undefined ? null : { headers },
36883
+ ...requestInit.integrity === undefined ? null : { integrity: requestInit.integrity },
36884
+ ...requestInit.mode === undefined ? null : { mode: requestInit.mode },
36885
+ ...requestInit.redirect === undefined ? null : { redirect: requestInit.redirect },
36886
+ ...requestInit.referrer === undefined ? null : { referrer: requestInit.referrer },
36887
+ ...requestInit.referrerPolicy === undefined ? null : { referrerPolicy: requestInit.referrerPolicy }
36888
+ };
36889
+ return Object.keys(normalized).length === 0 ? undefined : normalized;
36890
+ };
36891
+ var getMediaRequestInitFingerprint = (requestInit) => {
36892
+ const normalized = normalizeMediaRequestInit(requestInit);
36893
+ if (!normalized) {
36894
+ return null;
36895
+ }
36896
+ return [
36897
+ normalized.cache ?? null,
36898
+ normalized.credentials ?? null,
36899
+ normalized.integrity ?? null,
36900
+ normalized.mode ?? null,
36901
+ normalized.redirect ?? null,
36902
+ normalized.referrer ?? null,
36903
+ normalized.referrerPolicy ?? null,
36904
+ normalized.headers ?? null
36905
+ ];
36906
+ };
36907
+ var resolveRequestInit = ({
36908
+ credentials,
36909
+ requestInit
36910
+ }) => {
36911
+ if (credentials === undefined) {
36912
+ return normalizeMediaRequestInit(requestInit);
36913
+ }
36914
+ return normalizeMediaRequestInit({
36915
+ credentials,
36916
+ ...requestInit
36917
+ });
36918
+ };
36919
+ var sharedInputs = {};
36920
+ var getSharedInputCacheKey = ({
36921
+ src,
36922
+ credentials,
36923
+ requestInit
36924
+ }) => JSON.stringify([
36925
+ src,
36926
+ credentials ?? null,
36927
+ getMediaRequestInitFingerprint(requestInit)
36928
+ ]);
36929
+ var acquireSharedInput = ({
36930
+ src,
36931
+ credentials,
36932
+ requestInit
36933
+ }) => {
36934
+ const normalizedRequestInit = normalizeMediaRequestInit(requestInit);
36935
+ const cacheKey = getSharedInputCacheKey({
36936
+ src,
36937
+ credentials,
36938
+ requestInit: normalizedRequestInit
36939
+ });
36940
+ const existing = sharedInputs[cacheKey];
36941
+ if (existing) {
36942
+ existing.refCount++;
36943
+ return { input: existing.input, cacheKey };
36944
+ }
36945
+ const resolvedRequestInit = resolveRequestInit({
36946
+ credentials,
36947
+ requestInit: normalizedRequestInit
36948
+ });
36949
+ const input = new Input2({
36950
+ source: new UrlSource(src, resolvedRequestInit ? { requestInit: resolvedRequestInit } : undefined),
36951
+ formats: ALL_FORMATS
36952
+ });
36953
+ sharedInputs[cacheKey] = { input, refCount: 1 };
36954
+ return { input, cacheKey };
36955
+ };
36956
+ var releaseSharedInput = (cacheKey) => {
36957
+ const entry = sharedInputs[cacheKey];
36958
+ if (!entry) {
36959
+ return;
36960
+ }
36961
+ entry.refCount--;
36962
+ if (entry.refCount <= 0) {
36963
+ delete sharedInputs[cacheKey];
36964
+ entry.input.dispose();
36965
+ }
36966
+ };
36652
36967
  var resolveAudioTrack = async ({
36653
36968
  videoTrack,
36654
36969
  audioTracks,
@@ -36761,72 +37076,6 @@ class PremountAwareDelayPlayback {
36761
37076
  };
36762
37077
  }
36763
37078
  }
36764
- var normalizeMediaHeaders = (headers) => {
36765
- if (!headers) {
36766
- return;
36767
- }
36768
- const entries = [];
36769
- if (headers instanceof Headers) {
36770
- headers.forEach((value, key) => {
36771
- entries.push([key.toLowerCase(), value]);
36772
- });
36773
- } else if (Array.isArray(headers)) {
36774
- for (const [key, value] of headers) {
36775
- entries.push([key.toLowerCase(), value]);
36776
- }
36777
- } else {
36778
- for (const [key, value] of Object.entries(headers)) {
36779
- entries.push([key.toLowerCase(), value]);
36780
- }
36781
- }
36782
- entries.sort(([a2], [b2]) => a2 < b2 ? -1 : a2 > b2 ? 1 : 0);
36783
- return entries;
36784
- };
36785
- var normalizeMediaRequestInit = (requestInit) => {
36786
- if (!requestInit) {
36787
- return;
36788
- }
36789
- const headers = normalizeMediaHeaders(requestInit.headers);
36790
- const normalized = {
36791
- ...requestInit.cache === undefined ? null : { cache: requestInit.cache },
36792
- ...requestInit.credentials === undefined ? null : { credentials: requestInit.credentials },
36793
- ...headers === undefined ? null : { headers },
36794
- ...requestInit.integrity === undefined ? null : { integrity: requestInit.integrity },
36795
- ...requestInit.mode === undefined ? null : { mode: requestInit.mode },
36796
- ...requestInit.redirect === undefined ? null : { redirect: requestInit.redirect },
36797
- ...requestInit.referrer === undefined ? null : { referrer: requestInit.referrer },
36798
- ...requestInit.referrerPolicy === undefined ? null : { referrerPolicy: requestInit.referrerPolicy }
36799
- };
36800
- return Object.keys(normalized).length === 0 ? undefined : normalized;
36801
- };
36802
- var getMediaRequestInitFingerprint = (requestInit) => {
36803
- const normalized = normalizeMediaRequestInit(requestInit);
36804
- if (!normalized) {
36805
- return null;
36806
- }
36807
- return [
36808
- normalized.cache ?? null,
36809
- normalized.credentials ?? null,
36810
- normalized.integrity ?? null,
36811
- normalized.mode ?? null,
36812
- normalized.redirect ?? null,
36813
- normalized.referrer ?? null,
36814
- normalized.referrerPolicy ?? null,
36815
- normalized.headers ?? null
36816
- ];
36817
- };
36818
- var resolveRequestInit = ({
36819
- credentials,
36820
- requestInit
36821
- }) => {
36822
- if (credentials === undefined) {
36823
- return normalizeMediaRequestInit(requestInit);
36824
- }
36825
- return normalizeMediaRequestInit({
36826
- credentials,
36827
- ...requestInit
36828
- });
36829
- };
36830
37079
  var roundTo4Digits = (timestamp) => {
36831
37080
  return Math.round(timestamp * 1000) / 1000;
36832
37081
  };
@@ -36850,6 +37099,7 @@ var makeStableFramePool = () => {
36850
37099
  if (!context) {
36851
37100
  throw new Error("Could not create canvas context");
36852
37101
  }
37102
+ context.clearRect(0, 0, stableCanvas.width, stableCanvas.height);
36853
37103
  context.drawImage(canvas, 0, 0);
36854
37104
  let released = false;
36855
37105
  const stableFrame = {
@@ -37432,13 +37682,13 @@ class MediaPlayer {
37432
37682
  this.onVideoFrameCallback = onVideoFrameCallback;
37433
37683
  this.playing = playing;
37434
37684
  this.sequenceOffset = sequenceOffset;
37435
- const resolvedRequestInit = resolveRequestInit({ credentials, requestInit });
37436
- this.input = new Input2({
37437
- source: new UrlSource(this.src, resolvedRequestInit ? {
37438
- requestInit: resolvedRequestInit
37439
- } : undefined),
37440
- formats: ALL_FORMATS
37685
+ const { input, cacheKey } = acquireSharedInput({
37686
+ src: this.src,
37687
+ credentials,
37688
+ requestInit
37441
37689
  });
37690
+ this.input = input;
37691
+ this.inputCacheKey = cacheKey;
37442
37692
  this.tagType = tagType;
37443
37693
  this.getEffects = getEffects;
37444
37694
  this.getEffectChainState = getEffectChainState;
@@ -37456,8 +37706,10 @@ class MediaPlayer {
37456
37706
  }
37457
37707
  }
37458
37708
  input;
37709
+ inputCacheKey;
37710
+ disposed = false;
37459
37711
  isDisposalError() {
37460
- return this.input.disposed === true;
37712
+ return this.disposed || this.input.disposed === true;
37461
37713
  }
37462
37714
  initialize(startTimeUnresolved, initialMuted) {
37463
37715
  const promise = this._initialize(startTimeUnresolved, initialMuted);
@@ -37492,7 +37744,7 @@ class MediaPlayer {
37492
37744
  try {
37493
37745
  const _ = __using(__stack, this.delayPlaybackHandleIfNotPremounting(), 0);
37494
37746
  try {
37495
- if (this.input.disposed) {
37747
+ if (this.isDisposalError()) {
37496
37748
  return { type: "disposed" };
37497
37749
  }
37498
37750
  try {
@@ -37513,7 +37765,7 @@ class MediaPlayer {
37513
37765
  this.input.getPrimaryVideoTrack(),
37514
37766
  this.input.getAudioTracks()
37515
37767
  ]);
37516
- if (this.input.disposed) {
37768
+ if (this.isDisposalError()) {
37517
37769
  return { type: "disposed" };
37518
37770
  }
37519
37771
  this.totalDuration = durationInSeconds;
@@ -37534,9 +37786,12 @@ class MediaPlayer {
37534
37786
  }
37535
37787
  const canDecode = await videoTrack.canDecode();
37536
37788
  if (!canDecode) {
37789
+ if (videoTrack.codec === "prores") {
37790
+ return { type: "cannot-decode-prores" };
37791
+ }
37537
37792
  return { type: "cannot-decode" };
37538
37793
  }
37539
- if (this.input.disposed) {
37794
+ if (this.isDisposalError()) {
37540
37795
  return { type: "disposed" };
37541
37796
  }
37542
37797
  this.videoIteratorManager = await videoIteratorManager({
@@ -37569,7 +37824,7 @@ class MediaPlayer {
37569
37824
  if (!canDecode) {
37570
37825
  return { type: "cannot-decode" };
37571
37826
  }
37572
- if (this.input.disposed) {
37827
+ if (this.isDisposalError()) {
37573
37828
  return { type: "disposed" };
37574
37829
  }
37575
37830
  this.audioIteratorManager = audioIteratorManager({
@@ -37788,6 +38043,10 @@ class MediaPlayer {
37788
38043
  }
37789
38044
  }
37790
38045
  async dispose() {
38046
+ if (this.disposed) {
38047
+ return;
38048
+ }
38049
+ this.disposed = true;
37791
38050
  if (this.initializationPromise) {
37792
38051
  try {
37793
38052
  await this.initializationPromise;
@@ -37796,7 +38055,7 @@ class MediaPlayer {
37796
38055
  this.nonceManager.createAsyncOperation();
37797
38056
  this.videoIteratorManager?.destroy();
37798
38057
  this.audioIteratorManager?.destroyIterator();
37799
- this.input.dispose();
38058
+ releaseSharedInput(this.inputCacheKey);
37800
38059
  }
37801
38060
  getTargetTime = (mediaTimestamp, currentTime) => {
37802
38061
  if (!this.sharedAudioContext) {
@@ -38239,6 +38498,9 @@ var AudioForPreviewAssertedShowing = ({
38239
38498
  handleError(new Error(`No video or audio tracks found for ${preloadedSrc}.`), `No video or audio tracks found for ${preloadedSrc}, falling back to <Html5Audio>`);
38240
38499
  return;
38241
38500
  }
38501
+ if (result.type === "cannot-decode-prores") {
38502
+ throw new Error(`Encountered ProRes media for ${preloadedSrc}. But this should never happen, since you used the <Audio> tag. Please report this as a bug.`);
38503
+ }
38242
38504
  if (result.type === "success") {
38243
38505
  setMediaPlayerReady(true);
38244
38506
  setMediaDurationInSeconds(result.durationInSeconds);
@@ -39546,6 +39808,9 @@ var getSinks = async (src, logLevel, credentials, requestInit) => {
39546
39808
  }
39547
39809
  const canDecode = await videoTrack.canDecode();
39548
39810
  if (!canDecode) {
39811
+ if (videoTrack.codec === "prores") {
39812
+ return "cannot-decode-prores";
39813
+ }
39549
39814
  return "cannot-decode";
39550
39815
  }
39551
39816
  const sampleSink = new VideoSampleSink(videoTrack);
@@ -39797,6 +40062,12 @@ var extractFrameInternal = async ({
39797
40062
  if (video === "cannot-decode") {
39798
40063
  return { type: "cannot-decode", durationInSeconds: mediaDurationInSeconds };
39799
40064
  }
40065
+ if (video === "cannot-decode-prores") {
40066
+ return {
40067
+ type: "cannot-decode-prores",
40068
+ durationInSeconds: mediaDurationInSeconds
40069
+ };
40070
+ }
39800
40071
  if (video === "unknown-container-format") {
39801
40072
  return { type: "unknown-container-format" };
39802
40073
  }
@@ -39948,6 +40219,12 @@ var extractFrameAndAudio = async ({
39948
40219
  durationInSeconds: video.durationInSeconds
39949
40220
  };
39950
40221
  }
40222
+ if (video?.type === "cannot-decode-prores") {
40223
+ return {
40224
+ type: "cannot-decode-prores",
40225
+ durationInSeconds: video.durationInSeconds
40226
+ };
40227
+ }
39951
40228
  if (video?.type === "unknown-container-format") {
39952
40229
  return { type: "unknown-container-format" };
39953
40230
  }
@@ -40033,6 +40310,15 @@ var addBroadcastChannelListener = () => {
40033
40310
  window.remotion_broadcastChannel.postMessage(cannotDecodeResponse);
40034
40311
  return;
40035
40312
  }
40313
+ if (result.type === "cannot-decode-prores") {
40314
+ const cannotDecodeProresResponse = {
40315
+ type: "response-cannot-decode-prores",
40316
+ id: data.id,
40317
+ durationInSeconds: result.durationInSeconds
40318
+ };
40319
+ window.remotion_broadcastChannel.postMessage(cannotDecodeProresResponse);
40320
+ return;
40321
+ }
40036
40322
  if (result.type === "cannot-decode-alpha") {
40037
40323
  const cannotDecodeAlphaResponse = {
40038
40324
  type: "response-cannot-decode-alpha",
@@ -40177,6 +40463,14 @@ var extractFrameViaBroadcastChannel = async ({
40177
40463
  window.remotion_broadcastChannel.removeEventListener("message", onMessage);
40178
40464
  return;
40179
40465
  }
40466
+ if (data.type === "response-cannot-decode-prores") {
40467
+ resolve({
40468
+ type: "cannot-decode-prores",
40469
+ durationInSeconds: data.durationInSeconds
40470
+ });
40471
+ window.remotion_broadcastChannel.removeEventListener("message", onMessage);
40472
+ return;
40473
+ }
40180
40474
  if (data.type === "response-network-error") {
40181
40475
  resolve({ type: "network-error" });
40182
40476
  window.remotion_broadcastChannel.removeEventListener("message", onMessage);
@@ -40347,6 +40641,9 @@ var AudioForRendering2 = ({
40347
40641
  if (result.type === "cannot-decode-alpha") {
40348
40642
  throw new Error(`Cannot decode alpha component for ${src}, and 'disallowFallbackToHtml5Audio' was set. But this should never happen, since you used the <Audio> tag. Please report this as a bug.`);
40349
40643
  }
40644
+ if (result.type === "cannot-decode-prores") {
40645
+ throw new Error(`Encountered ProRes media for ${src}. But this should never happen, since you used the <Audio> tag. Please report this as a bug.`);
40646
+ }
40350
40647
  if (result.type === "network-error") {
40351
40648
  handleError(new Error(`Network error fetching ${src}.`), new Error(`Cannot render audio "${src}": Network error while fetching the audio (possibly CORS).`), `Network error fetching ${src}, falling back to <Html5Audio>`);
40352
40649
  return;
@@ -40553,7 +40850,17 @@ var Audio2 = Interactive.withSchema({
40553
40850
  schema: audioSchema,
40554
40851
  supportsEffects: false
40555
40852
  });
40556
- Internals.addSequenceStackTraces(Audio2);
40853
+ var PRORES_DOCS_URL = "https://www.remotion.dev/docs/videos/prores";
40854
+ var proresDecoderNotEnabledMessage = (src) => {
40855
+ return `Cannot decode "${src}": it is encoded with Apple ProRes, which WebCodecs does not support natively. ` + `ProRes decoding is not enabled by default. Register the ProRes decoder by calling ` + `registerProresDecoder() from "@mediabunny/prores" in your entry point, before registerRoot(). ` + `See ${PRORES_DOCS_URL}. ` + `(This is required to decode a ProRes source for both preview and rendering — it is unrelated to exporting a video as ProRes.)`;
40856
+ };
40857
+
40858
+ class ProResDecoderNotEnabledError extends Error {
40859
+ constructor(src) {
40860
+ super(proresDecoderNotEnabledMessage(src));
40861
+ this.name = "ProResDecoderNotEnabledError";
40862
+ }
40863
+ }
40557
40864
  var cache2 = new Map;
40558
40865
  var cacheVideoFrame = (src, sourceCanvas) => {
40559
40866
  const { width, height } = sourceCanvas;
@@ -40802,6 +41109,9 @@ var VideoForPreviewAssertedShowing = ({
40802
41109
  handleError(new Error(`Cannot decode ${preloadedSrc}.`), `Cannot decode ${preloadedSrc}, falling back to <OffthreadVideo>`);
40803
41110
  return;
40804
41111
  }
41112
+ if (result.type === "cannot-decode-prores") {
41113
+ throw new ProResDecoderNotEnabledError(preloadedSrc);
41114
+ }
40805
41115
  if (result.type === "no-tracks") {
40806
41116
  handleError(new Error(`No video or audio tracks found for ${preloadedSrc}.`), `No video or audio tracks found for ${preloadedSrc}, falling back to <OffthreadVideo>`);
40807
41117
  return;
@@ -40812,6 +41122,10 @@ var VideoForPreviewAssertedShowing = ({
40812
41122
  hasDrawnRealFrameRef.current = true;
40813
41123
  }
40814
41124
  }).catch((error2) => {
41125
+ if (error2 instanceof ProResDecoderNotEnabledError) {
41126
+ onErrorRef.current?.(error2);
41127
+ throw error2;
41128
+ }
40815
41129
  const [action, errorToUse] = callOnErrorAndResolve({
40816
41130
  onError: onErrorRef.current,
40817
41131
  error: error2,
@@ -41109,6 +41423,12 @@ var VideoForRendering2 = ({
41109
41423
  handleError(new Error(`Cannot decode ${src}.`), new Error(`Cannot render video "${src}": The video could not be decoded by the browser.`), `Cannot decode ${src}, falling back to <OffthreadVideo>`, result.durationInSeconds);
41110
41424
  return;
41111
41425
  }
41426
+ if (result.type === "cannot-decode-prores") {
41427
+ const proresError = new ProResDecoderNotEnabledError(src);
41428
+ onError?.(proresError);
41429
+ cancelRender3(proresError);
41430
+ return;
41431
+ }
41112
41432
  if (result.type === "cannot-decode-alpha") {
41113
41433
  handleError(new Error(`Cannot decode alpha component for ${src}.`), new Error(`Cannot render video "${src}": The alpha channel could not be decoded by the browser.`), `Cannot decode alpha component for ${src}, falling back to <OffthreadVideo>`, result.durationInSeconds);
41114
41434
  return;
@@ -41583,7 +41903,6 @@ var Video = Interactive.withSchema({
41583
41903
  schema: videoSchema,
41584
41904
  supportsEffects: true
41585
41905
  });
41586
- Internals.addSequenceStackTraces(Video);
41587
41906
 
41588
41907
  // src/components/homepage/Demo/Comp.tsx
41589
41908
  import { useCallback as useCallback47, useEffect as useEffect49, useMemo as useMemo61, useState as useState48 } from "react";
@@ -41633,7 +41952,7 @@ var getIndexFromPosition = (clientX, clientY) => {
41633
41952
 
41634
41953
  // src/components/homepage/Demo/Switcher.tsx
41635
41954
  import { useCallback as useCallback41 } from "react";
41636
- import { jsx as jsx66, jsxs as jsxs15 } from "react/jsx-runtime";
41955
+ import { jsx as jsx66, jsxs as jsxs17 } from "react/jsx-runtime";
41637
41956
  var Switcher = ({ type, theme, onTap }) => {
41638
41957
  const onPointerDown = useCallback41((e) => {
41639
41958
  e.stopPropagation();
@@ -41658,7 +41977,7 @@ var Switcher = ({ type, theme, onTap }) => {
41658
41977
  alignItems: "center",
41659
41978
  display: "flex"
41660
41979
  },
41661
- children: /* @__PURE__ */ jsxs15("svg", {
41980
+ children: /* @__PURE__ */ jsxs17("svg", {
41662
41981
  style: { height: switcherSize / 2 },
41663
41982
  viewBox: "0 0 320 512",
41664
41983
  children: [
@@ -41676,7 +41995,7 @@ var Switcher = ({ type, theme, onTap }) => {
41676
41995
  };
41677
41996
 
41678
41997
  // src/components/homepage/Demo/Card.tsx
41679
- import { jsx as jsx68, jsxs as jsxs16, Fragment as Fragment13 } from "react/jsx-runtime";
41998
+ import { jsx as jsx68, jsxs as jsxs18, Fragment as Fragment14 } from "react/jsx-runtime";
41680
41999
  var arePositionsEqual = (a2, b2) => {
41681
42000
  return a2.every((pos, i) => {
41682
42001
  return pos.x === b2[i].x && pos.y === b2[i].y;
@@ -41853,7 +42172,7 @@ var Card2 = ({
41853
42172
  borderRadius: 13,
41854
42173
  cursor: "grab"
41855
42174
  },
41856
- children: /* @__PURE__ */ jsxs16(AbsoluteFill, {
42175
+ children: /* @__PURE__ */ jsxs18(AbsoluteFill, {
41857
42176
  style: {
41858
42177
  backgroundColor: color,
41859
42178
  borderRadius: 12
@@ -41861,7 +42180,7 @@ var Card2 = ({
41861
42180
  className: "transition-opacity duration-200",
41862
42181
  children: [
41863
42182
  content,
41864
- withSwitcher ? /* @__PURE__ */ jsxs16(Fragment13, {
42183
+ withSwitcher ? /* @__PURE__ */ jsxs18(Fragment14, {
41865
42184
  children: [
41866
42185
  /* @__PURE__ */ jsx68(Switcher, {
41867
42186
  onTap: onClickLeft,
@@ -41881,7 +42200,7 @@ var Card2 = ({
41881
42200
  };
41882
42201
 
41883
42202
  // src/components/homepage/Demo/CurrentCountry.tsx
41884
- import { jsx as jsx69, jsxs as jsxs17 } from "react/jsx-runtime";
42203
+ import { jsx as jsx69, jsxs as jsxs19 } from "react/jsx-runtime";
41885
42204
  var CurrentCountry = ({ theme, countryPaths, countryLabel }) => {
41886
42205
  const { fps } = useVideoConfig();
41887
42206
  const frame = useCurrentFrame();
@@ -41896,7 +42215,7 @@ var CurrentCountry = ({ theme, countryPaths, countryLabel }) => {
41896
42215
  frame,
41897
42216
  delay: 10
41898
42217
  });
41899
- return /* @__PURE__ */ jsxs17(AbsoluteFill, {
42218
+ return /* @__PURE__ */ jsxs19(AbsoluteFill, {
41900
42219
  style: { overflow: "hidden" },
41901
42220
  children: [
41902
42221
  /* @__PURE__ */ jsx69(AbsoluteFill, {
@@ -41914,7 +42233,7 @@ var CurrentCountry = ({ theme, countryPaths, countryLabel }) => {
41914
42233
  })
41915
42234
  })
41916
42235
  }),
41917
- /* @__PURE__ */ jsxs17(AbsoluteFill, {
42236
+ /* @__PURE__ */ jsxs19(AbsoluteFill, {
41918
42237
  style: {
41919
42238
  alignItems: "center",
41920
42239
  justifyContent: "center"
@@ -42203,7 +42522,7 @@ var DisplayedEmoji = ({ emoji }) => {
42203
42522
  };
42204
42523
 
42205
42524
  // src/components/homepage/Demo/EmojiCard.tsx
42206
- import { jsx as jsx75, jsxs as jsxs18, Fragment as Fragment14 } from "react/jsx-runtime";
42525
+ import { jsx as jsx75, jsxs as jsxs20, Fragment as Fragment15 } from "react/jsx-runtime";
42207
42526
  var applyTransforms = ({ ref1, ref2, ref3, transforms }) => {
42208
42527
  ref1.style.transform = `translateX(${transforms[0]}%)`;
42209
42528
  ref2.style.transform = `translateX(${transforms[1]}%)`;
@@ -42299,7 +42618,7 @@ var EmojiCardRefFn = ({ emojiIndex }, ref) => {
42299
42618
  });
42300
42619
  }, []);
42301
42620
  const env = useRemotionEnvironment();
42302
- return /* @__PURE__ */ jsxs18(AbsoluteFill, {
42621
+ return /* @__PURE__ */ jsxs20(AbsoluteFill, {
42303
42622
  style: {
42304
42623
  justifyContent: "center",
42305
42624
  alignItems: "center",
@@ -42331,7 +42650,7 @@ var EmojiCardRefFn = ({ emojiIndex }, ref) => {
42331
42650
  children: /* @__PURE__ */ jsx75(DisplayedEmoji, {
42332
42651
  emoji: emojiIndex
42333
42652
  })
42334
- }) : /* @__PURE__ */ jsxs18(Fragment14, {
42653
+ }) : /* @__PURE__ */ jsxs20(Fragment15, {
42335
42654
  children: [
42336
42655
  /* @__PURE__ */ jsx75("div", {
42337
42656
  ref: ref1,
@@ -42379,7 +42698,7 @@ var Minus = ({ leftOffset, minusSignOpacity }) => {
42379
42698
  };
42380
42699
 
42381
42700
  // src/components/homepage/Demo/DigitWheel.tsx
42382
- import { jsx as jsx78, jsxs as jsxs19 } from "react/jsx-runtime";
42701
+ import { jsx as jsx78, jsxs as jsxs21 } from "react/jsx-runtime";
42383
42702
  var DURATION = 25;
42384
42703
  var items = 10;
42385
42704
  var NUM_WIDTH = 36;
@@ -42423,7 +42742,7 @@ var Wheel = ({ delay: delay2, digits, renderDigit, isLeadingDigit, isNegative })
42423
42742
  const rotation = progresses.map((p, i) => {
42424
42743
  return p * offsets[i];
42425
42744
  }).reduce((a2, b2) => a2 + b2, 0) + rotations[0];
42426
- return /* @__PURE__ */ jsxs19("div", {
42745
+ return /* @__PURE__ */ jsxs21("div", {
42427
42746
  style: {
42428
42747
  position: "relative",
42429
42748
  width: NUM_WIDTH,
@@ -42484,14 +42803,14 @@ var Wheel = ({ delay: delay2, digits, renderDigit, isLeadingDigit, isNegative })
42484
42803
  };
42485
42804
 
42486
42805
  // src/components/homepage/Demo/TemperatureNumber.tsx
42487
- import { jsx as jsx79, jsxs as jsxs20 } from "react/jsx-runtime";
42806
+ import { jsx as jsx79, jsxs as jsxs25 } from "react/jsx-runtime";
42488
42807
  var TemperatureNumber = ({ theme, temperatureInCelsius }) => {
42489
42808
  const temperatureInFahrenheit = temperatureInCelsius * 9 / 5 + 32;
42490
42809
  const celsiusDegree = Math.abs(temperatureInCelsius);
42491
42810
  const fahrenheitDegree = Math.abs(temperatureInFahrenheit);
42492
42811
  const paddedCelsiusDegree = String(celsiusDegree).padStart(fahrenheitDegree.toFixed(0).length, "0").split("");
42493
42812
  const paddedFahrenheitDegree = fahrenheitDegree.toFixed(0).padStart(paddedCelsiusDegree.length, "0").split("");
42494
- return /* @__PURE__ */ jsxs20("div", {
42813
+ return /* @__PURE__ */ jsxs25("div", {
42495
42814
  style: {
42496
42815
  lineHeight: 1.1,
42497
42816
  fontFamily: "GTPlanar",
@@ -42539,13 +42858,13 @@ var TemperatureNumber = ({ theme, temperatureInCelsius }) => {
42539
42858
  };
42540
42859
 
42541
42860
  // src/components/homepage/Demo/Temperature.tsx
42542
- import { jsx as jsx80, jsxs as jsxs21 } from "react/jsx-runtime";
42861
+ import { jsx as jsx80, jsxs as jsxs27 } from "react/jsx-runtime";
42543
42862
  var Temperature = ({ theme, city, temperatureInCelsius }) => {
42544
42863
  if (temperatureInCelsius === null) {
42545
42864
  return null;
42546
42865
  }
42547
42866
  return /* @__PURE__ */ jsx80(AbsoluteFill, {
42548
- children: /* @__PURE__ */ jsxs21(AbsoluteFill, {
42867
+ children: /* @__PURE__ */ jsxs27(AbsoluteFill, {
42549
42868
  style: {
42550
42869
  alignItems: "center",
42551
42870
  justifyContent: "center",
@@ -42553,7 +42872,7 @@ var Temperature = ({ theme, city, temperatureInCelsius }) => {
42553
42872
  paddingRight: 20
42554
42873
  },
42555
42874
  children: [
42556
- /* @__PURE__ */ jsxs21("div", {
42875
+ /* @__PURE__ */ jsxs27("div", {
42557
42876
  style: {
42558
42877
  color: "#0b84f3",
42559
42878
  fontFamily: "GTPlanar",
@@ -42578,7 +42897,7 @@ var Temperature = ({ theme, city, temperatureInCelsius }) => {
42578
42897
 
42579
42898
  // src/components/homepage/Demo/TrendingRepos.tsx
42580
42899
  import { useMemo as useMemo60 } from "react";
42581
- import { jsx as jsx81, jsxs as jsxs25 } from "react/jsx-runtime";
42900
+ import { jsx as jsx81, jsxs as jsxs28 } from "react/jsx-runtime";
42582
42901
  var TrendingRepoItem = ({ repo, theme, number }) => {
42583
42902
  const frame = useCurrentFrame();
42584
42903
  const { fps } = useVideoConfig();
@@ -42600,7 +42919,7 @@ var TrendingRepoItem = ({ repo, theme, number }) => {
42600
42919
  opacity: progress
42601
42920
  };
42602
42921
  }, [progress, theme]);
42603
- return /* @__PURE__ */ jsxs25("div", {
42922
+ return /* @__PURE__ */ jsxs28("div", {
42604
42923
  style: item,
42605
42924
  children: [
42606
42925
  number,
@@ -42631,7 +42950,7 @@ var TrendingRepos = ({ theme, trending }) => {
42631
42950
  paddingLeft: 20,
42632
42951
  paddingRight: 20
42633
42952
  },
42634
- children: /* @__PURE__ */ jsxs25("div", {
42953
+ children: /* @__PURE__ */ jsxs28("div", {
42635
42954
  children: [
42636
42955
  /* @__PURE__ */ jsx81("div", {
42637
42956
  style: {
@@ -42764,7 +43083,7 @@ var Cards = ({
42764
43083
  };
42765
43084
 
42766
43085
  // src/components/homepage/Demo/Comp.tsx
42767
- import { jsx as jsx87, jsxs as jsxs27 } from "react/jsx-runtime";
43086
+ import { jsx as jsx87, jsxs as jsxs29 } from "react/jsx-runtime";
42768
43087
  var getDataAndProps = async () => {
42769
43088
  const location = await fetch("https://utils.remotion.dev/location").then((res) => res.json());
42770
43089
  const trending = await fetch(`https://bugs.remotion.dev/trending?lat=${location.latitude}&lng=${location.longitude}&country=${location.country}`).then((res) => res.json()).then((data) => {
@@ -42825,7 +43144,7 @@ var HomepageVideoComp = ({
42825
43144
  c2.free();
42826
43145
  };
42827
43146
  }, []);
42828
- return /* @__PURE__ */ jsxs27(AbsoluteFill, {
43147
+ return /* @__PURE__ */ jsxs29(AbsoluteFill, {
42829
43148
  style: {
42830
43149
  backgroundColor: theme === "dark" ? "#222" : "#fafafa"
42831
43150
  },
@@ -42891,7 +43210,7 @@ import {
42891
43210
  import { BufferTarget, StreamTarget } from "mediabunny";
42892
43211
 
42893
43212
  // ../core/dist/esm/version.mjs
42894
- var VERSION2 = "4.0.489";
43213
+ var VERSION2 = "4.0.491";
42895
43214
 
42896
43215
  // ../web-renderer/dist/esm/index.mjs
42897
43216
  import { AudioSample, VideoSample } from "mediabunny";
@@ -43447,6 +43766,8 @@ var createAudioSampleSource = ({
43447
43766
  });
43448
43767
  return { audioSampleSource, [Symbol.dispose]: () => audioSampleSource.close() };
43449
43768
  };
43769
+ var nestedHtmlInCanvasSupport = null;
43770
+ var forceDisableHtmlInCanvasForTesting = false;
43450
43771
  var supportsNativeHtmlInCanvas = () => {
43451
43772
  if (typeof document === "undefined") {
43452
43773
  return false;
@@ -43454,6 +43775,121 @@ var supportsNativeHtmlInCanvas = () => {
43454
43775
  const ctx = document.createElement("canvas").getContext("2d");
43455
43776
  return typeof ctx?.drawElementImage === "function";
43456
43777
  };
43778
+ var runNestedHtmlInCanvasProbe = () => {
43779
+ if (!supportsNativeHtmlInCanvas() || !document.body) {
43780
+ return Promise.resolve(false);
43781
+ }
43782
+ const outer = document.createElement("canvas");
43783
+ const inner2 = document.createElement("canvas");
43784
+ const outerTarget = document.createElement("div");
43785
+ const innerTarget = document.createElement("div");
43786
+ const outerCtx = outer.getContext("2d");
43787
+ const innerCtx = inner2.getContext("2d");
43788
+ if (!outerCtx || !innerCtx || typeof outer.requestPaint !== "function" || typeof inner2.requestPaint !== "function") {
43789
+ return Promise.resolve(false);
43790
+ }
43791
+ outer.layoutSubtree = true;
43792
+ inner2.layoutSubtree = true;
43793
+ outer.width = 4;
43794
+ outer.height = 4;
43795
+ inner2.width = 4;
43796
+ inner2.height = 4;
43797
+ Object.assign(outer.style, {
43798
+ display: "block",
43799
+ height: "4px",
43800
+ left: "0",
43801
+ pointerEvents: "none",
43802
+ position: "fixed",
43803
+ top: "0",
43804
+ visibility: "visible",
43805
+ width: "4px",
43806
+ zIndex: "2147483647"
43807
+ });
43808
+ Object.assign(inner2.style, {
43809
+ display: "block",
43810
+ height: "4px",
43811
+ width: "4px"
43812
+ });
43813
+ Object.assign(outerTarget.style, {
43814
+ display: "block",
43815
+ height: "4px",
43816
+ width: "4px"
43817
+ });
43818
+ Object.assign(innerTarget.style, {
43819
+ backgroundColor: "rgb(255, 0, 0)",
43820
+ display: "block",
43821
+ height: "4px",
43822
+ width: "4px"
43823
+ });
43824
+ inner2.appendChild(innerTarget);
43825
+ outerTarget.appendChild(inner2);
43826
+ outer.appendChild(outerTarget);
43827
+ document.body.appendChild(outer);
43828
+ return new Promise((resolve) => {
43829
+ let innerPainted = false;
43830
+ let settled = false;
43831
+ let timeout = null;
43832
+ const settle = (supported) => {
43833
+ if (settled) {
43834
+ return;
43835
+ }
43836
+ settled = true;
43837
+ if (timeout !== null) {
43838
+ window.clearTimeout(timeout);
43839
+ }
43840
+ outer.remove();
43841
+ resolve(supported);
43842
+ };
43843
+ timeout = window.setTimeout(() => settle(false), 1000);
43844
+ inner2.addEventListener("paint", () => {
43845
+ try {
43846
+ innerCtx.reset();
43847
+ const transform = innerCtx.drawElementImage(innerTarget, 0, 0, 4, 4);
43848
+ innerTarget.style.transform = transform.toString();
43849
+ innerPainted = true;
43850
+ requestAnimationFrame(() => outer.requestPaint());
43851
+ } catch {
43852
+ settle(false);
43853
+ }
43854
+ });
43855
+ outer.addEventListener("paint", () => {
43856
+ if (!innerPainted) {
43857
+ return;
43858
+ }
43859
+ try {
43860
+ outerCtx.reset();
43861
+ if (typeof outer.captureElementImage !== "function") {
43862
+ settle(false);
43863
+ return;
43864
+ }
43865
+ const elementImage = outer.captureElementImage(outerTarget);
43866
+ const transform = outerCtx.drawElementImage(elementImage, 0, 0, 4, 4);
43867
+ elementImage.close();
43868
+ outerTarget.style.transform = transform.toString();
43869
+ const pixel = outerCtx.getImageData(2, 2, 1, 1).data;
43870
+ settle(pixel[0] > 200 && pixel[1] < 20 && pixel[2] < 20 && pixel[3] > 200);
43871
+ } catch {
43872
+ settle(false);
43873
+ }
43874
+ });
43875
+ inner2.requestPaint();
43876
+ });
43877
+ };
43878
+ var supportsNestedHtmlInCanvas = () => {
43879
+ if (forceDisableHtmlInCanvasForTesting) {
43880
+ return Promise.resolve(false);
43881
+ }
43882
+ if (!nestedHtmlInCanvasSupport) {
43883
+ nestedHtmlInCanvasSupport = runNestedHtmlInCanvasProbe();
43884
+ }
43885
+ return nestedHtmlInCanvasSupport;
43886
+ };
43887
+ var countLayoutSubtreeCanvases = (element) => {
43888
+ return Array.from(element.querySelectorAll("canvas")).filter((canvas) => canvas.layoutSubtree === true).length;
43889
+ };
43890
+ var containsLayoutSubtreeCanvas = (element) => {
43891
+ return countLayoutSubtreeCanvases(element) > 0;
43892
+ };
43457
43893
  var setupHtmlInCanvas = ({
43458
43894
  wrapper,
43459
43895
  div,
@@ -43495,14 +43931,36 @@ var drawWithHtmlInCanvas = async ({
43495
43931
  htmlInCanvasContext,
43496
43932
  element,
43497
43933
  scaledWidth,
43498
- scaledHeight
43934
+ scaledHeight,
43935
+ waitForRenderReady,
43936
+ useElementImage
43499
43937
  }) => {
43500
43938
  const { ctx, layoutCanvas } = htmlInCanvasContext;
43939
+ if (layoutCanvas.width !== scaledWidth || layoutCanvas.height !== scaledHeight) {
43940
+ layoutCanvas.width = scaledWidth;
43941
+ layoutCanvas.height = scaledHeight;
43942
+ }
43501
43943
  await waitForPaint(layoutCanvas);
43502
- layoutCanvas.width = scaledWidth;
43503
- layoutCanvas.height = scaledHeight;
43944
+ const nestedPaintCycles = useElementImage ? countLayoutSubtreeCanvases(element) * 2 + 1 : 0;
43945
+ for (let i = 0;i < nestedPaintCycles; i++) {
43946
+ await new Promise((resolve) => requestAnimationFrame(() => resolve()));
43947
+ await waitForRenderReady();
43948
+ await waitForPaint(layoutCanvas);
43949
+ }
43504
43950
  ctx.reset();
43505
- ctx.drawElementImage(element, 0, 0, scaledWidth, scaledHeight);
43951
+ if (useElementImage) {
43952
+ if (typeof layoutCanvas.captureElementImage !== "function") {
43953
+ throw new Error("canvas.captureElementImage() is unavailable");
43954
+ }
43955
+ const elementImage = layoutCanvas.captureElementImage(element);
43956
+ try {
43957
+ ctx.drawElementImage(elementImage, 0, 0, scaledWidth, scaledHeight);
43958
+ } finally {
43959
+ elementImage.close();
43960
+ }
43961
+ } else {
43962
+ ctx.drawElementImage(element, 0, 0, scaledWidth, scaledHeight);
43963
+ }
43506
43964
  const offscreen = new OffscreenCanvas(scaledWidth, scaledHeight);
43507
43965
  const offCtx = offscreen.getContext("2d");
43508
43966
  if (!offCtx) {
@@ -43634,7 +44092,7 @@ function createScaffold({
43634
44092
  videoEnabled,
43635
44093
  defaultCodec,
43636
44094
  defaultOutName,
43637
- allowHtmlInCanvas,
44095
+ useHtmlInCanvas,
43638
44096
  pixelDensity
43639
44097
  }) {
43640
44098
  if (!ReactDOM6.createRoot) {
@@ -43661,7 +44119,7 @@ function createScaffold({
43661
44119
  const cleanupCSS = Internals.CSSUtils.injectCSS(Internals.CSSUtils.makeDefaultPreviewCSS(`.${scaffoldClassName}`, "white"));
43662
44120
  wrapper.appendChild(div);
43663
44121
  document.body.appendChild(wrapper);
43664
- const htmlInCanvasContext = allowHtmlInCanvas ? setupHtmlInCanvas({ wrapper, div, width: width2, height: height2 }) : null;
44122
+ const htmlInCanvasContext = useHtmlInCanvas ? setupHtmlInCanvas({ wrapper, div, width: width2, height: height2 }) : null;
43665
44123
  const errorHolder = { error: null };
43666
44124
  const root = ReactDOM6.createRoot(div, {
43667
44125
  onUncaughtError: (err, errorInfo) => {
@@ -44663,6 +45121,15 @@ var filterRequiresPrecompositing = (filter) => {
44663
45121
  }
44664
45122
  return null;
44665
45123
  };
45124
+ var snapshotTransformStyle = (computedStyle) => {
45125
+ return {
45126
+ display: computedStyle.display,
45127
+ rotate: computedStyle.rotate,
45128
+ scale: computedStyle.scale,
45129
+ transform: computedStyle.transform,
45130
+ transformOrigin: computedStyle.transformOrigin
45131
+ };
45132
+ };
44666
45133
  var isReplacedElement = (element) => {
44667
45134
  return element instanceof HTMLImageElement || element instanceof HTMLVideoElement || element instanceof HTMLCanvasElement || element instanceof HTMLIFrameElement || element instanceof HTMLInputElement || element instanceof HTMLTextAreaElement || element instanceof HTMLSelectElement || element instanceof HTMLObjectElement || element instanceof HTMLEmbedElement;
44668
45135
  };
@@ -44713,7 +45180,8 @@ var getGlobalTransformOrigin = ({ transform }) => {
44713
45180
  };
44714
45181
  var calculateTransforms = ({
44715
45182
  element,
44716
- rootElement
45183
+ rootElement,
45184
+ transformStyleCache
44717
45185
  }) => {
44718
45186
  let parent = element;
44719
45187
  const transforms = [];
@@ -44723,10 +45191,19 @@ var calculateTransforms = ({
44723
45191
  let maskImageInfo = null;
44724
45192
  let filterForPrecompositing = null;
44725
45193
  while (parent) {
45194
+ const cachedTransformStyle = transformStyleCache.get(parent);
45195
+ const shouldReadComputedStyle = parent === element || cachedTransformStyle === undefined;
44726
45196
  const originalTransition = parent.style.transition;
44727
45197
  parent.style.transition = "none";
44728
- const computedStyle = getComputedStyle(parent);
45198
+ const computedStyle = shouldReadComputedStyle ? getComputedStyle(parent) : null;
45199
+ const transformStyle = computedStyle === null ? cachedTransformStyle : snapshotTransformStyle(computedStyle);
45200
+ if (computedStyle !== null) {
45201
+ transformStyleCache.set(parent, transformStyle);
45202
+ }
44729
45203
  if (parent === element) {
45204
+ if (computedStyle === null) {
45205
+ throw new Error("Element computed style not found");
45206
+ }
44730
45207
  elementComputedStyle = computedStyle;
44731
45208
  opacity2 = parseFloat(computedStyle.opacity);
44732
45209
  const maskImageValue = getMaskImageValue(computedStyle);
@@ -44749,9 +45226,9 @@ var calculateTransforms = ({
44749
45226
  }
44750
45227
  });
44751
45228
  }
44752
- const hasApplicableTransformCssValue = canApplyCssTransforms({ computedStyle, element: parent }) && hasAnyTransformCssValue(computedStyle);
45229
+ const hasApplicableTransformCssValue = canApplyCssTransforms({ computedStyle: transformStyle, element: parent }) && hasAnyTransformCssValue(transformStyle);
44753
45230
  if (hasApplicableTransformCssValue || parent === element) {
44754
- const toParse = hasApplicableTransformCssValue && hasTransformCssValue(computedStyle) ? computedStyle.transform : undefined;
45231
+ const toParse = hasApplicableTransformCssValue && hasTransformCssValue(transformStyle) ? transformStyle.transform : undefined;
44755
45232
  const matrix = new DOMMatrix(toParse);
44756
45233
  const resetTransforms = makeTransformResetter(parent);
44757
45234
  const { scale, rotate: rotate2 } = parent.style;
@@ -44766,7 +45243,7 @@ var calculateTransforms = ({
44766
45243
  const cleanup = resetTransforms(hasApplicableTransformCssValue);
44767
45244
  transforms.push({
44768
45245
  element: parent,
44769
- transformOrigin: computedStyle.transformOrigin,
45246
+ transformOrigin: transformStyle.transformOrigin,
44770
45247
  boundingClientRect: null,
44771
45248
  matrices: additionalMatrices
44772
45249
  });
@@ -45358,7 +45835,8 @@ var drawBackground = async ({
45358
45835
  internalState,
45359
45836
  scale,
45360
45837
  onlyBackgroundClipText: true,
45361
- waitForPageResponsiveness: null
45838
+ waitForPageResponsiveness: null,
45839
+ waitForRenderReady: () => Promise.resolve()
45362
45840
  });
45363
45841
  onlyBackgroundClipText.setTransform(new DOMMatrix().scale(scale, scale));
45364
45842
  element.style.backgroundClip = originalBackgroundClip;
@@ -46512,13 +46990,15 @@ var processNode = async ({
46512
46990
  internalState,
46513
46991
  rootElement,
46514
46992
  scale,
46515
- waitForPageResponsiveness
46993
+ waitForPageResponsiveness,
46994
+ transformStyleCache
46516
46995
  }) => {
46517
46996
  let __stack = [];
46518
46997
  try {
46519
46998
  const transforms = __using2(__stack, calculateTransforms({
46520
46999
  element,
46521
- rootElement
47000
+ rootElement,
47001
+ transformStyleCache
46522
47002
  }), 0);
46523
47003
  const { opacity: opacity2, computedStyle, totalMatrix, dimensions, precompositing } = transforms;
46524
47004
  if (opacity2 === 0) {
@@ -46577,7 +47057,8 @@ var processNode = async ({
46577
47057
  internalState,
46578
47058
  scale,
46579
47059
  onlyBackgroundClipText: false,
46580
- waitForPageResponsiveness
47060
+ waitForPageResponsiveness,
47061
+ waitForRenderReady: () => Promise.resolve()
46581
47062
  });
46582
47063
  if (waitForPageResponsiveness !== null) {
46583
47064
  await waitForPageResponsiveness();
@@ -46678,29 +47159,25 @@ var applyTextTransform = (text, transform) => {
46678
47159
  }
46679
47160
  return text;
46680
47161
  };
47162
+ var wordSegmenter = new Intl.Segmenter("en", { granularity: "word" });
46681
47163
  var findWords = (span) => {
46682
47164
  const originalText = span.textContent;
46683
- const segmenter = new Intl.Segmenter("en", { granularity: "word" });
46684
- const segments = segmenter.segment(span.textContent);
46685
- const words = Array.from(segments).map((s) => s.segment);
47165
+ const segments = Array.from(wordSegmenter.segment(originalText));
46686
47166
  const tokens = [];
46687
- for (let i = 0;i < words.length; i++) {
46688
- const wordsBefore = words.slice(0, i);
46689
- const wordsAfter = words.slice(i + 1);
46690
- const word = words[i];
46691
- const wordsBeforeText = wordsBefore.join("");
46692
- const wordsAfterText = wordsAfter.join("");
47167
+ for (const { index: index2, segment } of segments) {
47168
+ const wordsBeforeText = originalText.slice(0, index2);
47169
+ const wordsAfterText = originalText.slice(index2 + segment.length);
46693
47170
  const beforeNode = document.createTextNode(wordsBeforeText);
46694
47171
  const afterNode = document.createTextNode(wordsAfterText);
46695
47172
  const interstitialNode = document.createElement("span");
46696
- interstitialNode.textContent = word;
47173
+ interstitialNode.textContent = segment;
46697
47174
  span.textContent = "";
46698
47175
  span.appendChild(beforeNode);
46699
47176
  span.appendChild(interstitialNode);
46700
47177
  span.appendChild(afterNode);
46701
47178
  const rect = interstitialNode.getBoundingClientRect();
46702
47179
  span.textContent = originalText;
46703
- tokens.push({ text: word, rect });
47180
+ tokens.push({ text: segment, rect });
46704
47181
  }
46705
47182
  return tokens;
46706
47183
  };
@@ -46989,10 +47466,10 @@ var drawText = ({
46989
47466
  const ctm = contextToDraw.getTransform();
46990
47467
  const blurScale = Math.hypot(ctm.a, ctm.b);
46991
47468
  const { strokeFirst } = parsePaintOrder(paintOrder);
47469
+ const measurements = contextToDraw.measureText(originalText);
47470
+ const { fontBoundingBoxDescent, fontBoundingBoxAscent } = measurements;
47471
+ const fontHeight = fontBoundingBoxAscent + fontBoundingBoxDescent;
46992
47472
  for (const token of tokens) {
46993
- const measurements = contextToDraw.measureText(originalText);
46994
- const { fontBoundingBoxDescent, fontBoundingBoxAscent } = measurements;
46995
- const fontHeight = fontBoundingBoxAscent + fontBoundingBoxDescent;
46996
47473
  const leading = token.rect.height - fontHeight;
46997
47474
  const halfLeading = leading / 2;
46998
47475
  const x = (isRTL2 ? token.rect.right : token.rect.left) - parentRect.x;
@@ -47047,7 +47524,8 @@ var handleTextNode = async ({
47047
47524
  rootElement,
47048
47525
  onlyBackgroundClipText,
47049
47526
  scale,
47050
- waitForPageResponsiveness
47527
+ waitForPageResponsiveness,
47528
+ transformStyleCache
47051
47529
  }) => {
47052
47530
  const span = document.createElement("span");
47053
47531
  const parent = node.parentNode;
@@ -47065,7 +47543,8 @@ var handleTextNode = async ({
47065
47543
  internalState,
47066
47544
  rootElement,
47067
47545
  scale,
47068
- waitForPageResponsiveness
47546
+ waitForPageResponsiveness,
47547
+ transformStyleCache
47069
47548
  });
47070
47549
  parent.insertBefore(node, span);
47071
47550
  parent.removeChild(span);
@@ -47080,7 +47559,8 @@ var walkOverNode = ({
47080
47559
  rootElement,
47081
47560
  onlyBackgroundClipText,
47082
47561
  scale,
47083
- waitForPageResponsiveness
47562
+ waitForPageResponsiveness,
47563
+ transformStyleCache
47084
47564
  }) => {
47085
47565
  if (node instanceof HTMLElement || node instanceof SVGElement) {
47086
47566
  return processNode({
@@ -47092,7 +47572,8 @@ var walkOverNode = ({
47092
47572
  internalState,
47093
47573
  rootElement,
47094
47574
  scale,
47095
- waitForPageResponsiveness
47575
+ waitForPageResponsiveness,
47576
+ transformStyleCache
47096
47577
  });
47097
47578
  }
47098
47579
  if (node instanceof Text) {
@@ -47105,7 +47586,8 @@ var walkOverNode = ({
47105
47586
  rootElement,
47106
47587
  onlyBackgroundClipText,
47107
47588
  scale,
47108
- waitForPageResponsiveness
47589
+ waitForPageResponsiveness,
47590
+ transformStyleCache
47109
47591
  });
47110
47592
  }
47111
47593
  throw new Error("Unknown node type");
@@ -47136,6 +47618,7 @@ var compose = async ({
47136
47618
  let __stack = [];
47137
47619
  try {
47138
47620
  const treeWalker = document.createTreeWalker(element, onlyBackgroundClipText ? NodeFilter.SHOW_TEXT : NodeFilter.SHOW_ELEMENT | NodeFilter.SHOW_TEXT, getFilterFunction);
47621
+ const transformStyleCache = new WeakMap;
47139
47622
  if (onlyBackgroundClipText) {
47140
47623
  treeWalker.nextNode();
47141
47624
  if (!treeWalker.currentNode) {
@@ -47155,7 +47638,8 @@ var compose = async ({
47155
47638
  rootElement: element,
47156
47639
  onlyBackgroundClipText,
47157
47640
  scale,
47158
- waitForPageResponsiveness
47641
+ waitForPageResponsiveness,
47642
+ transformStyleCache
47159
47643
  });
47160
47644
  if (val.type === "skip-children") {
47161
47645
  if (!skipToNextNonDescendant(treeWalker)) {
@@ -47188,17 +47672,21 @@ var createLayer = async ({
47188
47672
  cutout,
47189
47673
  htmlInCanvasContext,
47190
47674
  onHtmlInCanvasLayerOutcome,
47191
- waitForPageResponsiveness
47675
+ waitForPageResponsiveness,
47676
+ waitForRenderReady
47192
47677
  }) => {
47193
47678
  const scaledWidth = Math.ceil(cutout.width * scale);
47194
47679
  const scaledHeight = Math.ceil(cutout.height * scale);
47195
47680
  if (!onlyBackgroundClipText && element instanceof HTMLElement && htmlInCanvasContext && onHtmlInCanvasLayerOutcome) {
47681
+ const hasNestedHtmlInCanvas = containsLayoutSubtreeCanvas(element);
47196
47682
  try {
47197
47683
  const offCtx = await drawWithHtmlInCanvas({
47198
47684
  htmlInCanvasContext,
47199
47685
  element,
47200
47686
  scaledWidth,
47201
- scaledHeight
47687
+ scaledHeight,
47688
+ waitForRenderReady,
47689
+ useElementImage: hasNestedHtmlInCanvas
47202
47690
  });
47203
47691
  onHtmlInCanvasLayerOutcome({ native: true });
47204
47692
  return offCtx;
@@ -47445,7 +47933,6 @@ var internalRenderMediaOnWeb = async ({
47445
47933
  muted,
47446
47934
  scale,
47447
47935
  isProduction,
47448
- allowHtmlInCanvas,
47449
47936
  sampleRate
47450
47937
  }) => {
47451
47938
  let __stack2 = [];
@@ -47459,7 +47946,7 @@ var internalRenderMediaOnWeb = async ({
47459
47946
  }
47460
47947
  htmlInCanvasLayerOutcomeReported = true;
47461
47948
  if (outcome.native) {
47462
- Internals.Log.warn({ logLevel, tag: "@remotion/web-renderer" }, "Using Chromium experimental HTML-in-canvas (drawElementImage) for video frames. See https://github.com/WICG/html-in-canvas");
47949
+ Internals.Log.warn({ logLevel, tag: "@remotion/web-renderer" }, "Using Chromium experimental HTML-in-canvas (drawElementImage) for video frames. See https://remotion.dev/docs/client-side-rendering/html-in-canvas");
47463
47950
  } else if (outcome.shouldWarn) {
47464
47951
  Internals.Log.warn({ logLevel, tag: "@remotion/web-renderer" }, `Not using HTML-in-canvas: ${outcome.reason}`);
47465
47952
  }
@@ -47513,6 +48000,7 @@ var internalRenderMediaOnWeb = async ({
47513
48000
  if (signal?.aborted) {
47514
48001
  return Promise.reject(new Error("renderMediaOnWeb() was cancelled"));
47515
48002
  }
48003
+ const useHtmlInCanvas = await supportsNestedHtmlInCanvas();
47516
48004
  const scaffold = __using2(__stack2, createScaffold({
47517
48005
  width: resolved.width,
47518
48006
  height: resolved.height,
@@ -47530,7 +48018,7 @@ var internalRenderMediaOnWeb = async ({
47530
48018
  initialFrame: 0,
47531
48019
  defaultCodec: resolved.defaultCodec,
47532
48020
  defaultOutName: resolved.defaultOutName,
47533
- allowHtmlInCanvas,
48021
+ useHtmlInCanvas,
47534
48022
  pixelDensity: scale
47535
48023
  }), 0);
47536
48024
  const {
@@ -47541,27 +48029,6 @@ var internalRenderMediaOnWeb = async ({
47541
48029
  errorHolder,
47542
48030
  htmlInCanvasContext
47543
48031
  } = scaffold;
47544
- if (allowHtmlInCanvas && !htmlInCanvasContext) {
47545
- if (!supportsNativeHtmlInCanvas()) {
47546
- onHtmlInCanvasLayerOutcome({
47547
- native: false,
47548
- reason: "This browser does not expose CanvasRenderingContext2D.prototype.drawElementImage. In Chromium, enable chrome://flags/#canvas-draw-element and use a version that ships the API.",
47549
- shouldWarn: false
47550
- });
47551
- } else {
47552
- onHtmlInCanvasLayerOutcome({
47553
- native: false,
47554
- reason: "drawElementImage is available but canvas.requestPaint() is missing. Use a Chromium version that ships requestPaint.",
47555
- shouldWarn: true
47556
- });
47557
- }
47558
- } else if (!allowHtmlInCanvas) {
47559
- onHtmlInCanvasLayerOutcome({
47560
- native: false,
47561
- reason: "allowHtmlInCanvas is false; using the built-in DOM composer.",
47562
- shouldWarn: false
47563
- });
47564
- }
47565
48032
  const internalState = __using2(__stack2, makeInternalState(), 0);
47566
48033
  const pageResponsivenessController = createPageResponsivenessController({
47567
48034
  intervalInMilliseconds: pageResponsivenessIntervalInMilliseconds,
@@ -47580,6 +48047,17 @@ var internalRenderMediaOnWeb = async ({
47580
48047
  fps: resolved.fps,
47581
48048
  logLevel
47582
48049
  }), 0);
48050
+ const waitForRenderReady = async () => {
48051
+ await waitForReady({
48052
+ timeoutInMilliseconds: delayRenderTimeoutInMilliseconds,
48053
+ scope: delayRenderScope,
48054
+ signal,
48055
+ apiName: "renderMediaOnWeb",
48056
+ internalState,
48057
+ keepalive
48058
+ });
48059
+ checkForError(errorHolder);
48060
+ };
47583
48061
  const artifactsHandler = handleArtifacts();
47584
48062
  const webFsTarget = outputTarget === "web-fs" ? await createWebFsTarget() : null;
47585
48063
  const target = webFsTarget ? new StreamTarget(webFsTarget.stream) : new BufferTarget;
@@ -47598,15 +48076,7 @@ var internalRenderMediaOnWeb = async ({
47598
48076
  if (signal?.aborted) {
47599
48077
  throw new Error("renderMediaOnWeb() was cancelled");
47600
48078
  }
47601
- await waitForReady({
47602
- timeoutInMilliseconds: delayRenderTimeoutInMilliseconds,
47603
- scope: delayRenderScope,
47604
- signal,
47605
- apiName: "renderMediaOnWeb",
47606
- internalState,
47607
- keepalive
47608
- });
47609
- checkForError(errorHolder);
48079
+ await waitForRenderReady();
47610
48080
  if (signal?.aborted) {
47611
48081
  throw new Error("renderMediaOnWeb() was cancelled");
47612
48082
  }
@@ -47664,15 +48134,7 @@ var internalRenderMediaOnWeb = async ({
47664
48134
  throw new Error("renderMediaOnWeb() was cancelled");
47665
48135
  }
47666
48136
  timeUpdater.current?.update(frame);
47667
- await waitForReady({
47668
- timeoutInMilliseconds: delayRenderTimeoutInMilliseconds,
47669
- scope: delayRenderScope,
47670
- signal,
47671
- apiName: "renderMediaOnWeb",
47672
- keepalive,
47673
- internalState
47674
- });
47675
- checkForError(errorHolder);
48137
+ await waitForRenderReady();
47676
48138
  if (signal?.aborted) {
47677
48139
  throw new Error("renderMediaOnWeb() was cancelled");
47678
48140
  }
@@ -47690,7 +48152,8 @@ var internalRenderMediaOnWeb = async ({
47690
48152
  cutout: new DOMRect(0, 0, resolved.width, resolved.height),
47691
48153
  htmlInCanvasContext,
47692
48154
  onHtmlInCanvasLayerOutcome: htmlInCanvasContext ? onHtmlInCanvasLayerOutcome : undefined,
47693
- waitForPageResponsiveness
48155
+ waitForPageResponsiveness,
48156
+ waitForRenderReady
47694
48157
  });
47695
48158
  internalState.addCreateFrameTime(performance.now() - createFrameStart);
47696
48159
  layerCanvas = layer.canvas;
@@ -47859,7 +48322,6 @@ var renderMediaOnWeb = (options2) => {
47859
48322
  muted: options2.muted ?? false,
47860
48323
  scale: options2.scale ?? 1,
47861
48324
  isProduction: options2.isProduction ?? true,
47862
- allowHtmlInCanvas: options2.allowHtmlInCanvas ?? false,
47863
48325
  sampleRate: options2.sampleRate ?? 48000
47864
48326
  }));
47865
48327
  return onlyOneRenderAtATimeQueue.ref;
@@ -47898,7 +48360,7 @@ var DemoErrorIcon = () => {
47898
48360
  };
47899
48361
 
47900
48362
  // src/components/homepage/Demo/DoneCheckmark.tsx
47901
- import { jsx as jsx91, jsxs as jsxs28 } from "react/jsx-runtime";
48363
+ import { jsx as jsx91, jsxs as jsxs30 } from "react/jsx-runtime";
47902
48364
  var DoneCheckmark = () => {
47903
48365
  return /* @__PURE__ */ jsx91("div", {
47904
48366
  style: {
@@ -47911,7 +48373,7 @@ var DoneCheckmark = () => {
47911
48373
  justifyContent: "center",
47912
48374
  animation: "jump 0.2s ease-out"
47913
48375
  },
47914
- children: /* @__PURE__ */ jsxs28("svg", {
48376
+ children: /* @__PURE__ */ jsxs30("svg", {
47915
48377
  viewBox: "0 0 20 20",
47916
48378
  fill: "none",
47917
48379
  xmlns: "http://www.w3.org/2000/svg",
@@ -47940,7 +48402,7 @@ var DoneCheckmark = () => {
47940
48402
  };
47941
48403
 
47942
48404
  // src/components/homepage/Demo/Progress.tsx
47943
- import { jsx as jsx95, jsxs as jsxs29 } from "react/jsx-runtime";
48405
+ import { jsx as jsx95, jsxs as jsxs31 } from "react/jsx-runtime";
47944
48406
  var Progress = ({ progress }) => {
47945
48407
  const inner2 = makeCircle({
47946
48408
  radius: 10
@@ -47950,7 +48412,7 @@ var Progress = ({ progress }) => {
47950
48412
  closePath: false,
47951
48413
  radius: 10
47952
48414
  });
47953
- return /* @__PURE__ */ jsxs29("svg", {
48415
+ return /* @__PURE__ */ jsxs31("svg", {
47954
48416
  viewBox: `0 0 ${inner2.width} ${inner2.height}`,
47955
48417
  style: { overflow: "visible", height: 22 },
47956
48418
  children: [
@@ -47973,7 +48435,7 @@ var Progress = ({ progress }) => {
47973
48435
 
47974
48436
  // src/components/homepage/Demo/Spinner.tsx
47975
48437
  import { useMemo as useMemo64 } from "react";
47976
- import { jsx as jsx97, jsxs as jsxs30, Fragment as Fragment15 } from "react/jsx-runtime";
48438
+ import { jsx as jsx97, jsxs as jsxs34, Fragment as Fragment16 } from "react/jsx-runtime";
47977
48439
  var viewBox2 = 100;
47978
48440
  var lines2 = 8;
47979
48441
  var className2 = "__remotion_spinner_line";
@@ -47986,7 +48448,7 @@ var Spinner2 = ({ size: size4, duration }) => {
47986
48448
  height: size4
47987
48449
  };
47988
48450
  }, [size4]);
47989
- return /* @__PURE__ */ jsxs30(Fragment15, {
48451
+ return /* @__PURE__ */ jsxs34(Fragment16, {
47990
48452
  children: [
47991
48453
  /* @__PURE__ */ jsx97("style", {
47992
48454
  type: "text/css",
@@ -48142,7 +48604,7 @@ var RenderButton = ({ renderData, onError, playerRef }) => {
48142
48604
  };
48143
48605
 
48144
48606
  // src/components/homepage/Demo/DownloadNudge.tsx
48145
- import { jsx as jsx99, jsxs as jsxs31 } from "react/jsx-runtime";
48607
+ import { jsx as jsx99, jsxs as jsxs36 } from "react/jsx-runtime";
48146
48608
  var origWidth = 77;
48147
48609
  var scale = 0.4;
48148
48610
  var Icon3 = () => {
@@ -48172,7 +48634,7 @@ var DownloadNudge = () => {
48172
48634
  paddingRight: 24,
48173
48635
  paddingTop: 18
48174
48636
  },
48175
- children: /* @__PURE__ */ jsxs31("div", {
48637
+ children: /* @__PURE__ */ jsxs36("div", {
48176
48638
  children: [
48177
48639
  /* @__PURE__ */ jsx99(Icon3, {}),
48178
48640
  /* @__PURE__ */ jsx99("div", {
@@ -48192,7 +48654,7 @@ var DownloadNudge = () => {
48192
48654
  };
48193
48655
 
48194
48656
  // src/components/homepage/Demo/DragAndDropNudge.tsx
48195
- import { jsx as jsx100, jsxs as jsxs34 } from "react/jsx-runtime";
48657
+ import { jsx as jsx100, jsxs as jsxs37 } from "react/jsx-runtime";
48196
48658
  var origWidth2 = 37;
48197
48659
  var scale2 = 0.4;
48198
48660
  var Icon5 = () => {
@@ -48222,7 +48684,7 @@ var DragAndDropNudge = () => {
48222
48684
  marginTop: 18
48223
48685
  },
48224
48686
  className: "ml-4 lg:-ml-5",
48225
- children: /* @__PURE__ */ jsxs34("div", {
48687
+ children: /* @__PURE__ */ jsxs37("div", {
48226
48688
  children: [
48227
48689
  /* @__PURE__ */ jsx100("div", {
48228
48690
  style: {
@@ -48287,7 +48749,7 @@ var useElementSize2 = (ref) => {
48287
48749
  };
48288
48750
 
48289
48751
  // src/components/homepage/Demo/PlayerSeekBar.tsx
48290
- import { jsx as jsx101, jsxs as jsxs36 } from "react/jsx-runtime";
48752
+ import { jsx as jsx101, jsxs as jsxs38 } from "react/jsx-runtime";
48291
48753
  var getFrameFromX2 = (clientX, durationInFrames, width2) => {
48292
48754
  const pos = clientX;
48293
48755
  const frame = Math.round(interpolate(pos, [0, width2], [0, durationInFrames - 1], {
@@ -48496,12 +48958,12 @@ var PlayerSeekBar2 = ({
48496
48958
  position: "absolute"
48497
48959
  };
48498
48960
  }, [durationInFrames, inFrame, outFrame]);
48499
- return /* @__PURE__ */ jsxs36("div", {
48961
+ return /* @__PURE__ */ jsxs38("div", {
48500
48962
  ref: containerRef,
48501
48963
  onPointerDown,
48502
48964
  style: containerStyle3,
48503
48965
  children: [
48504
- /* @__PURE__ */ jsxs36("div", {
48966
+ /* @__PURE__ */ jsxs38("div", {
48505
48967
  style: barBackground2,
48506
48968
  children: [
48507
48969
  /* @__PURE__ */ jsx101("div", {
@@ -48728,7 +49190,7 @@ var TimeDisplay = ({ fps, playerRef }) => {
48728
49190
  };
48729
49191
 
48730
49192
  // src/components/homepage/Demo/PlayerControls.tsx
48731
- import { jsx as jsx110, jsxs as jsxs37 } from "react/jsx-runtime";
49193
+ import { jsx as jsx110, jsxs as jsxs39 } from "react/jsx-runtime";
48732
49194
  var Separator2 = () => {
48733
49195
  return /* @__PURE__ */ jsx110("div", {
48734
49196
  style: {
@@ -48738,7 +49200,7 @@ var Separator2 = () => {
48738
49200
  });
48739
49201
  };
48740
49202
  var PlayerControls = ({ playerRef, durationInFrames, fps, children }) => {
48741
- return /* @__PURE__ */ jsxs37("div", {
49203
+ return /* @__PURE__ */ jsxs39("div", {
48742
49204
  className: "flex flex-row items-center bg-pane",
48743
49205
  children: [
48744
49206
  /* @__PURE__ */ jsx110(PlayPauseButton, {
@@ -48782,7 +49244,7 @@ var PlayerControls = ({ playerRef, durationInFrames, fps, children }) => {
48782
49244
 
48783
49245
  // src/components/homepage/Demo/ThemeNudge.tsx
48784
49246
  import React77 from "react";
48785
- import { jsx as jsx111, jsxs as jsxs38 } from "react/jsx-runtime";
49247
+ import { jsx as jsx111, jsxs as jsxs40 } from "react/jsx-runtime";
48786
49248
  var origWidth3 = 37;
48787
49249
  var scale3 = 0.4;
48788
49250
  var Icon6 = () => {
@@ -48818,9 +49280,9 @@ var ThemeNudge = () => {
48818
49280
  position: "absolute"
48819
49281
  },
48820
49282
  className: "lg:top-3 lg:-right-6 right-0 top-0",
48821
- children: /* @__PURE__ */ jsxs38("div", {
49283
+ children: /* @__PURE__ */ jsxs40("div", {
48822
49284
  children: [
48823
- /* @__PURE__ */ jsxs38("div", {
49285
+ /* @__PURE__ */ jsxs40("div", {
48824
49286
  style: {
48825
49287
  fontFamily: FONTS.GTPLANAR,
48826
49288
  fontSize: 15,
@@ -48831,7 +49293,7 @@ var ThemeNudge = () => {
48831
49293
  marginTop: 5
48832
49294
  },
48833
49295
  children: [
48834
- /* @__PURE__ */ jsxs38("a", {
49296
+ /* @__PURE__ */ jsxs40("a", {
48835
49297
  href: "#",
48836
49298
  onClick: toggleTheme,
48837
49299
  className: "bluelink",
@@ -48853,7 +49315,7 @@ var ThemeNudge = () => {
48853
49315
  };
48854
49316
 
48855
49317
  // src/components/homepage/Demo/index.tsx
48856
- import { jsx as jsx115, jsxs as jsxs39 } from "react/jsx-runtime";
49318
+ import { jsx as jsx115, jsxs as jsxs41 } from "react/jsx-runtime";
48857
49319
  var style3 = {
48858
49320
  width: "100%",
48859
49321
  aspectRatio: "640 / 360",
@@ -48921,7 +49383,7 @@ var Demo = () => {
48921
49383
  const onError = useCallback55(() => {
48922
49384
  setError(true);
48923
49385
  }, []);
48924
- return /* @__PURE__ */ jsxs39("div", {
49386
+ return /* @__PURE__ */ jsxs41("div", {
48925
49387
  id: "demo",
48926
49388
  children: [
48927
49389
  /* @__PURE__ */ jsx115("br", {}),
@@ -48929,17 +49391,17 @@ var Demo = () => {
48929
49391
  /* @__PURE__ */ jsx115(SectionTitle, {
48930
49392
  children: "Interactive demo"
48931
49393
  }),
48932
- /* @__PURE__ */ jsxs39("div", {
49394
+ /* @__PURE__ */ jsxs41("div", {
48933
49395
  className: "max-w-[760px] mx-auto",
48934
49396
  children: [
48935
- /* @__PURE__ */ jsxs39("div", {
49397
+ /* @__PURE__ */ jsxs41("div", {
48936
49398
  className: "h-[105px] relative",
48937
49399
  children: [
48938
49400
  /* @__PURE__ */ jsx115(DragAndDropNudge, {}),
48939
49401
  /* @__PURE__ */ jsx115(ThemeNudge, {})
48940
49402
  ]
48941
49403
  }),
48942
- /* @__PURE__ */ jsxs39("div", {
49404
+ /* @__PURE__ */ jsxs41("div", {
48943
49405
  style: playerWrapper,
48944
49406
  children: [
48945
49407
  /* @__PURE__ */ jsx115(Player, {
@@ -49028,7 +49490,7 @@ var BlueButton = (props) => {
49028
49490
  };
49029
49491
 
49030
49492
  // src/components/homepage/EvaluateRemotion.tsx
49031
- import { jsx as jsx118, jsxs as jsxs40 } from "react/jsx-runtime";
49493
+ import { jsx as jsx118, jsxs as jsxs44 } from "react/jsx-runtime";
49032
49494
  var EvaluateRemotionSection = () => {
49033
49495
  const [dailyAvatars, setDailyAvatars] = useState57([]);
49034
49496
  useEffect58(() => {
@@ -49041,10 +49503,10 @@ var EvaluateRemotionSection = () => {
49041
49503
  }
49042
49504
  setDailyAvatars(selectedAvatars);
49043
49505
  }, []);
49044
- return /* @__PURE__ */ jsxs40("div", {
49506
+ return /* @__PURE__ */ jsxs44("div", {
49045
49507
  className: "flex flex-col lg:flex-row gap-2",
49046
49508
  children: [
49047
- /* @__PURE__ */ jsxs40("div", {
49509
+ /* @__PURE__ */ jsxs44("div", {
49048
49510
  className: "card flex-1 flex flex-col",
49049
49511
  children: [
49050
49512
  /* @__PURE__ */ jsx118("div", {
@@ -49058,7 +49520,7 @@ var EvaluateRemotionSection = () => {
49058
49520
  /* @__PURE__ */ jsx118("div", {
49059
49521
  className: "flex-1"
49060
49522
  }),
49061
- /* @__PURE__ */ jsxs40("div", {
49523
+ /* @__PURE__ */ jsxs44("div", {
49062
49524
  className: "flex flex-row flex-wrap gap-2",
49063
49525
  children: [
49064
49526
  /* @__PURE__ */ jsx118("a", {
@@ -49085,7 +49547,7 @@ var EvaluateRemotionSection = () => {
49085
49547
  })
49086
49548
  ]
49087
49549
  }),
49088
- /* @__PURE__ */ jsxs40("div", {
49550
+ /* @__PURE__ */ jsxs44("div", {
49089
49551
  className: "card flex-1 flex flex-col",
49090
49552
  children: [
49091
49553
  /* @__PURE__ */ jsx118("div", {
@@ -49099,7 +49561,7 @@ var EvaluateRemotionSection = () => {
49099
49561
  /* @__PURE__ */ jsx118("div", {
49100
49562
  className: "flex-1"
49101
49563
  }),
49102
- /* @__PURE__ */ jsxs40("div", {
49564
+ /* @__PURE__ */ jsxs44("div", {
49103
49565
  className: "flex flex-row justify-between",
49104
49566
  children: [
49105
49567
  /* @__PURE__ */ jsx118("a", {
@@ -49132,13 +49594,13 @@ import { useEffect as useEffect59, useRef as useRef60 } from "react";
49132
49594
 
49133
49595
  // src/components/homepage/MakeVideosLinks.tsx
49134
49596
  import React80 from "react";
49135
- import { jsx as jsx119, jsxs as jsxs41, Fragment as Fragment16 } from "react/jsx-runtime";
49597
+ import { jsx as jsx119, jsxs as jsxs46, Fragment as Fragment17 } from "react/jsx-runtime";
49136
49598
  var icon3 = {
49137
49599
  height: 16,
49138
49600
  marginLeft: 10
49139
49601
  };
49140
49602
  var MakeVideosLinkItem = ({ href, label: label3 }) => {
49141
- return /* @__PURE__ */ jsxs41("a", {
49603
+ return /* @__PURE__ */ jsxs46("a", {
49142
49604
  className: "no-underline text-[var(--subtitle)] font-brand font-medium text-sm inline-flex flex-row items-center",
49143
49605
  href,
49144
49606
  children: [
@@ -49159,7 +49621,7 @@ var MakeVideosLinks = ({ links }) => {
49159
49621
  if (links.length === 0) {
49160
49622
  return null;
49161
49623
  }
49162
- return /* @__PURE__ */ jsxs41(Fragment16, {
49624
+ return /* @__PURE__ */ jsxs46(Fragment17, {
49163
49625
  children: [
49164
49626
  /* @__PURE__ */ jsx119("div", {
49165
49627
  className: "h-4"
@@ -49167,7 +49629,7 @@ var MakeVideosLinks = ({ links }) => {
49167
49629
  /* @__PURE__ */ jsx119("div", {
49168
49630
  className: "leading-6",
49169
49631
  children: links.map((link) => {
49170
- return /* @__PURE__ */ jsxs41(React80.Fragment, {
49632
+ return /* @__PURE__ */ jsxs46(React80.Fragment, {
49171
49633
  children: [
49172
49634
  /* @__PURE__ */ jsx119(MakeVideosLinkItem, {
49173
49635
  ...link
@@ -49182,9 +49644,9 @@ var MakeVideosLinks = ({ links }) => {
49182
49644
  };
49183
49645
 
49184
49646
  // src/components/homepage/MakeVideosAgentically.tsx
49185
- import { jsx as jsx120, jsxs as jsxs44, Fragment as Fragment17 } from "react/jsx-runtime";
49647
+ import { jsx as jsx120, jsxs as jsxs47, Fragment as Fragment18 } from "react/jsx-runtime";
49186
49648
  var MakeVideosAgentically = ({
49187
- title = /* @__PURE__ */ jsxs44(Fragment17, {
49649
+ title = /* @__PURE__ */ jsxs47(Fragment18, {
49188
49650
  children: [
49189
49651
  /* @__PURE__ */ jsx120("span", {
49190
49652
  className: "text-[var(--subtitle)]",
@@ -49223,13 +49685,13 @@ var MakeVideosAgentically = ({
49223
49685
  observer.observe(current);
49224
49686
  return () => observer.unobserve(current);
49225
49687
  }, []);
49226
- return /* @__PURE__ */ jsxs44("div", {
49688
+ return /* @__PURE__ */ jsxs47("div", {
49227
49689
  ref,
49228
49690
  className: "flex min-w-0 basis-0 flex-col flex-1",
49229
49691
  children: [
49230
49692
  /* @__PURE__ */ jsx120("div", {
49231
49693
  className: "flex aspect-square w-full items-start",
49232
- children: showVideo ? /* @__PURE__ */ jsxs44("video", {
49694
+ children: showVideo ? /* @__PURE__ */ jsxs47("video", {
49233
49695
  ref: videoRef,
49234
49696
  muted: true,
49235
49697
  autoPlay: true,
@@ -49256,7 +49718,7 @@ var MakeVideosAgentically = ({
49256
49718
  ]
49257
49719
  }) : null
49258
49720
  }),
49259
- /* @__PURE__ */ jsxs44("div", {
49721
+ /* @__PURE__ */ jsxs47("div", {
49260
49722
  className: "font-brand",
49261
49723
  children: [
49262
49724
  /* @__PURE__ */ jsx120("h2", {
@@ -49278,9 +49740,9 @@ var MakeVideosAgentically = ({
49278
49740
 
49279
49741
  // src/components/homepage/MakeVideosInteractively.tsx
49280
49742
  import { useRef as useRef61 } from "react";
49281
- import { jsx as jsx121, jsxs as jsxs46, Fragment as Fragment18 } from "react/jsx-runtime";
49743
+ import { jsx as jsx121, jsxs as jsxs48, Fragment as Fragment19 } from "react/jsx-runtime";
49282
49744
  var MakeVideosInteractively = ({
49283
- title = /* @__PURE__ */ jsxs46(Fragment18, {
49745
+ title = /* @__PURE__ */ jsxs48(Fragment19, {
49284
49746
  children: [
49285
49747
  /* @__PURE__ */ jsx121("span", {
49286
49748
  className: "text-[var(--subtitle)]",
@@ -49298,13 +49760,13 @@ var MakeVideosInteractively = ({
49298
49760
  fallbackVideoSrc = "/img/editing-safari.mp4"
49299
49761
  }) => {
49300
49762
  const ref = useRef61(null);
49301
- return /* @__PURE__ */ jsxs46("div", {
49763
+ return /* @__PURE__ */ jsxs48("div", {
49302
49764
  ref,
49303
49765
  className: "flex min-w-0 basis-0 flex-col justify-start items-start lg:mt-0 flex-1",
49304
49766
  children: [
49305
49767
  /* @__PURE__ */ jsx121("div", {
49306
49768
  className: "flex aspect-square w-full items-start",
49307
- children: showVideo ? /* @__PURE__ */ jsxs46("video", {
49769
+ children: showVideo ? /* @__PURE__ */ jsxs48("video", {
49308
49770
  autoPlay: true,
49309
49771
  muted: true,
49310
49772
  playsInline: true,
@@ -49330,7 +49792,7 @@ var MakeVideosInteractively = ({
49330
49792
  ]
49331
49793
  }) : null
49332
49794
  }),
49333
- /* @__PURE__ */ jsxs46("div", {
49795
+ /* @__PURE__ */ jsxs48("div", {
49334
49796
  className: "font-brand",
49335
49797
  children: [
49336
49798
  /* @__PURE__ */ jsx121("h2", {
@@ -49351,9 +49813,9 @@ var MakeVideosInteractively = ({
49351
49813
  };
49352
49814
 
49353
49815
  // src/components/homepage/MakeVideosProgrammatically.tsx
49354
- import { jsx as jsx125, jsxs as jsxs47, Fragment as Fragment19 } from "react/jsx-runtime";
49816
+ import { jsx as jsx125, jsxs as jsxs49, Fragment as Fragment20 } from "react/jsx-runtime";
49355
49817
  var MakeVideosProgrammatically = ({
49356
- title = /* @__PURE__ */ jsxs47(Fragment19, {
49818
+ title = /* @__PURE__ */ jsxs49(Fragment20, {
49357
49819
  children: [
49358
49820
  /* @__PURE__ */ jsx125("span", {
49359
49821
  className: "text-[var(--subtitle)]",
@@ -49370,12 +49832,12 @@ var MakeVideosProgrammatically = ({
49370
49832
  videoSrc = "/img/what-is-remotion.webm",
49371
49833
  fallbackVideoSrc = "/img/what-is-remotion.mp4"
49372
49834
  }) => {
49373
- return /* @__PURE__ */ jsxs47("div", {
49835
+ return /* @__PURE__ */ jsxs49("div", {
49374
49836
  className: "flex min-w-0 basis-0 flex-col flex-1",
49375
49837
  children: [
49376
49838
  /* @__PURE__ */ jsx125("div", {
49377
49839
  className: "flex aspect-square w-full items-start",
49378
- children: showVideo ? /* @__PURE__ */ jsxs47("video", {
49840
+ children: showVideo ? /* @__PURE__ */ jsxs49("video", {
49379
49841
  muted: true,
49380
49842
  autoPlay: true,
49381
49843
  playsInline: true,
@@ -49394,7 +49856,7 @@ var MakeVideosProgrammatically = ({
49394
49856
  ]
49395
49857
  }) : null
49396
49858
  }),
49397
- /* @__PURE__ */ jsxs47("div", {
49859
+ /* @__PURE__ */ jsxs49("div", {
49398
49860
  className: "font-brand",
49399
49861
  children: [
49400
49862
  /* @__PURE__ */ jsx125("h2", {
@@ -49416,7 +49878,7 @@ var MakeVideosProgrammatically = ({
49416
49878
 
49417
49879
  // src/components/homepage/NewsletterButton.tsx
49418
49880
  import { useCallback as useCallback56, useState as useState58 } from "react";
49419
- import { jsx as jsx127, jsxs as jsxs48 } from "react/jsx-runtime";
49881
+ import { jsx as jsx127, jsxs as jsxs50 } from "react/jsx-runtime";
49420
49882
  var NewsletterButton = () => {
49421
49883
  const [email, setEmail] = useState58("");
49422
49884
  const [submitting, setSubmitting] = useState58(false);
@@ -49448,26 +49910,26 @@ var NewsletterButton = () => {
49448
49910
  className: "flex flex-col",
49449
49911
  children: /* @__PURE__ */ jsx127("div", {
49450
49912
  className: "w-full",
49451
- children: /* @__PURE__ */ jsxs48("div", {
49913
+ children: /* @__PURE__ */ jsxs50("div", {
49452
49914
  className: "flex flex-col flex-1",
49453
49915
  children: [
49454
49916
  /* @__PURE__ */ jsx127(SectionTitle, {
49455
49917
  children: "Newsletter"
49456
49918
  }),
49457
- /* @__PURE__ */ jsxs48("form", {
49919
+ /* @__PURE__ */ jsxs50("form", {
49458
49920
  onSubmit: handleSubmit,
49459
49921
  style: {
49460
49922
  width: "100%"
49461
49923
  },
49462
49924
  children: [
49463
- /* @__PURE__ */ jsxs48("div", {
49925
+ /* @__PURE__ */ jsxs50("div", {
49464
49926
  className: "fontbrand text-center mb-10 -mt-4",
49465
49927
  children: [
49466
49928
  "Read about new features and noteworthy updates we have made on Remotion once in a while.",
49467
49929
  " "
49468
49930
  ]
49469
49931
  }),
49470
- /* @__PURE__ */ jsxs48("div", {
49932
+ /* @__PURE__ */ jsxs50("div", {
49471
49933
  className: "flex flex-col md:flex-row gap-2 justify-center",
49472
49934
  children: [
49473
49935
  /* @__PURE__ */ jsx127(Input, {
@@ -49503,7 +49965,7 @@ var NewsletterButton = () => {
49503
49965
  };
49504
49966
 
49505
49967
  // src/components/homepage/TrustedByBanner.tsx
49506
- import { jsx as jsx128, jsxs as jsxs49, Fragment as Fragment20 } from "react/jsx-runtime";
49968
+ import { jsx as jsx128, jsxs as jsxs51, Fragment as Fragment21 } from "react/jsx-runtime";
49507
49969
  var TrustedByBanner = () => {
49508
49970
  const logos = [
49509
49971
  {
@@ -49523,7 +49985,7 @@ var TrustedByBanner = () => {
49523
49985
  {
49524
49986
  id: "logo2",
49525
49987
  url: "https://www.musixmatch.com/",
49526
- light: /* @__PURE__ */ jsxs49("svg", {
49988
+ light: /* @__PURE__ */ jsxs51("svg", {
49527
49989
  height: "40",
49528
49990
  viewBox: "0 0 229 48",
49529
49991
  fill: "none",
@@ -49583,7 +50045,7 @@ var TrustedByBanner = () => {
49583
50045
  {
49584
50046
  id: "logo3",
49585
50047
  url: "https://www.wistia.com/",
49586
- light: /* @__PURE__ */ jsxs49("svg", {
50048
+ light: /* @__PURE__ */ jsxs51("svg", {
49587
50049
  height: "30",
49588
50050
  viewBox: "0 0 165 36",
49589
50051
  fill: "none",
@@ -49616,7 +50078,7 @@ var TrustedByBanner = () => {
49616
50078
  })
49617
50079
  }
49618
50080
  ];
49619
- return /* @__PURE__ */ jsxs49(Fragment20, {
50081
+ return /* @__PURE__ */ jsxs51(Fragment21, {
49620
50082
  children: [
49621
50083
  /* @__PURE__ */ jsx128("h3", {
49622
50084
  className: "text-center mt-20 mb-10",
@@ -49782,7 +50244,7 @@ var MuxVideoForward = ({ muxId, ...props }, ref) => {
49782
50244
  var MuxVideo = forwardRef41(MuxVideoForward);
49783
50245
 
49784
50246
  // src/components/homepage/VideoAppsShowcase.tsx
49785
- import { jsx as jsx131, jsxs as jsxs50 } from "react/jsx-runtime";
50247
+ import { jsx as jsx131, jsxs as jsxs53 } from "react/jsx-runtime";
49786
50248
  var tabs = [
49787
50249
  "Music visualization",
49788
50250
  "Captions",
@@ -49889,7 +50351,7 @@ var BuiltWithRemotionShowcase = () => {
49889
50351
  setIsMuted(newMutedState);
49890
50352
  }
49891
50353
  };
49892
- return /* @__PURE__ */ jsxs50("div", {
50354
+ return /* @__PURE__ */ jsxs53("div", {
49893
50355
  ref: containerRef,
49894
50356
  children: [
49895
50357
  /* @__PURE__ */ jsx131(SectionTitle, {
@@ -49908,10 +50370,10 @@ var BuiltWithRemotionShowcase = () => {
49908
50370
  /* @__PURE__ */ jsx131("div", {
49909
50371
  className: "card flex p-0 overflow-hidden",
49910
50372
  "data-nosnippet": true,
49911
- children: /* @__PURE__ */ jsxs50("div", {
50373
+ children: /* @__PURE__ */ jsxs53("div", {
49912
50374
  className: "flex-1 grid grid-cols-1 lg:grid-cols-2",
49913
50375
  children: [
49914
- /* @__PURE__ */ jsxs50("div", {
50376
+ /* @__PURE__ */ jsxs53("div", {
49915
50377
  className: "w-full aspect-video lg:aspect-square relative overflow-hidden bg-[#eee] cursor-pointer",
49916
50378
  onClick: handlePlayPause,
49917
50379
  children: [
@@ -49975,7 +50437,7 @@ var BuiltWithRemotionShowcase = () => {
49975
50437
  })
49976
50438
  ]
49977
50439
  }),
49978
- /* @__PURE__ */ jsxs50("div", {
50440
+ /* @__PURE__ */ jsxs53("div", {
49979
50441
  className: "p-6 lg:p-10 flex min-w-0 flex-col justify-center",
49980
50442
  children: [
49981
50443
  /* @__PURE__ */ jsx131("div", {
@@ -49993,7 +50455,7 @@ var BuiltWithRemotionShowcase = () => {
49993
50455
  /* @__PURE__ */ jsx131("div", {
49994
50456
  className: "h-5"
49995
50457
  }),
49996
- /* @__PURE__ */ jsxs50("a", {
50458
+ /* @__PURE__ */ jsxs53("a", {
49997
50459
  className: "no-underline text-brand font-brand font-bold inline-flex flex-row items-center",
49998
50460
  href: videoApps[activeTab].link,
49999
50461
  children: [
@@ -50012,7 +50474,7 @@ var BuiltWithRemotionShowcase = () => {
50012
50474
  justifyContent: "center",
50013
50475
  display: "flex"
50014
50476
  },
50015
- children: /* @__PURE__ */ jsxs50("div", {
50477
+ children: /* @__PURE__ */ jsxs53("div", {
50016
50478
  style: {
50017
50479
  fontFamily: "GTPlanar"
50018
50480
  },
@@ -50036,7 +50498,7 @@ var BuiltWithRemotionShowcase = () => {
50036
50498
  import { useState as useState61 } from "react";
50037
50499
 
50038
50500
  // src/components/homepage/GitHubButton.tsx
50039
- import { jsx as jsx134, jsxs as jsxs51 } from "react/jsx-runtime";
50501
+ import { jsx as jsx134, jsxs as jsxs55 } from "react/jsx-runtime";
50040
50502
  var GithubIcon = () => {
50041
50503
  return /* @__PURE__ */ jsx134("svg", {
50042
50504
  viewBox: "0 0 496 512",
@@ -50048,7 +50510,7 @@ var GithubIcon = () => {
50048
50510
  });
50049
50511
  };
50050
50512
  var GithubButton = () => {
50051
- return /* @__PURE__ */ jsxs51("div", {
50513
+ return /* @__PURE__ */ jsxs55("div", {
50052
50514
  className: "flex flex-row items-center text-base",
50053
50515
  children: [
50054
50516
  /* @__PURE__ */ jsx134(GithubIcon, {}),
@@ -50059,22 +50521,22 @@ var GithubButton = () => {
50059
50521
  " ",
50060
50522
  /* @__PURE__ */ jsx134("div", {
50061
50523
  className: "text-xs inline-block ml-2 leading-none mt-[3px] self-center",
50062
- children: "52k"
50524
+ children: "53k"
50063
50525
  })
50064
50526
  ]
50065
50527
  });
50066
50528
  };
50067
50529
 
50068
50530
  // src/components/homepage/GetStartedStrip.tsx
50069
- import { jsx as jsx136, jsxs as jsxs54 } from "react/jsx-runtime";
50531
+ import { jsx as jsx136, jsxs as jsxs56 } from "react/jsx-runtime";
50070
50532
  var GetStarted = () => {
50071
50533
  const [clicked, setClicked] = useState61(null);
50072
- return /* @__PURE__ */ jsxs54("div", {
50534
+ return /* @__PURE__ */ jsxs56("div", {
50073
50535
  className: "flex flex-col lg:flex-row items-center justify-center text-center w-full",
50074
50536
  children: [
50075
50537
  /* @__PURE__ */ jsx136("div", {
50076
50538
  className: "w-full lg:w-auto",
50077
- children: /* @__PURE__ */ jsxs54("div", {
50539
+ children: /* @__PURE__ */ jsxs56("div", {
50078
50540
  className: "flex flex-row w-full relative",
50079
50541
  children: [
50080
50542
  clicked ? /* @__PURE__ */ jsx136("div", {
@@ -50137,9 +50599,9 @@ var GetStarted = () => {
50137
50599
  };
50138
50600
 
50139
50601
  // src/components/homepage/WriteInReact.tsx
50140
- import { jsx as jsx137, jsxs as jsxs56 } from "react/jsx-runtime";
50602
+ import { jsx as jsx137, jsxs as jsxs57 } from "react/jsx-runtime";
50141
50603
  var WriteInReact = () => {
50142
- return /* @__PURE__ */ jsxs56("div", {
50604
+ return /* @__PURE__ */ jsxs57("div", {
50143
50605
  children: [
50144
50606
  /* @__PURE__ */ jsx137("h1", {
50145
50607
  className: "text-4xl sm:text-5xl lg:text-[5em] text-center fontbrand font-black leading-none text-balance",
@@ -50148,7 +50610,7 @@ var WriteInReact = () => {
50148
50610
  },
50149
50611
  children: "Make videos programmatically."
50150
50612
  }),
50151
- /* @__PURE__ */ jsxs56("p", {
50613
+ /* @__PURE__ */ jsxs57("p", {
50152
50614
  style: {
50153
50615
  textShadow: "0 5px 30px var(--background)"
50154
50616
  },
@@ -50170,7 +50632,7 @@ var WriteInReact = () => {
50170
50632
  };
50171
50633
 
50172
50634
  // src/components/Homepage.tsx
50173
- import { jsx as jsx138, jsxs as jsxs57 } from "react/jsx-runtime";
50635
+ import { jsx as jsx138, jsxs as jsxs58 } from "react/jsx-runtime";
50174
50636
  "use client";
50175
50637
  var makeVideosRowClassName = "mt-4 md:mt-6 flex flex-col lg:flex-row gap-10";
50176
50638
  var NewLanding = ({ colorMode, setColorMode }) => {
@@ -50179,7 +50641,7 @@ var NewLanding = ({ colorMode, setColorMode }) => {
50179
50641
  setColorMode,
50180
50642
  children: /* @__PURE__ */ jsx138("div", {
50181
50643
  className: "w-full relative",
50182
- children: /* @__PURE__ */ jsxs57("div", {
50644
+ children: /* @__PURE__ */ jsxs58("div", {
50183
50645
  style: { overflow: "hidden" },
50184
50646
  children: [
50185
50647
  /* @__PURE__ */ jsx138("div", {
@@ -50189,12 +50651,12 @@ var NewLanding = ({ colorMode, setColorMode }) => {
50189
50651
  /* @__PURE__ */ jsx138("br", {}),
50190
50652
  /* @__PURE__ */ jsx138("br", {}),
50191
50653
  /* @__PURE__ */ jsx138("br", {}),
50192
- /* @__PURE__ */ jsxs57("div", {
50654
+ /* @__PURE__ */ jsxs58("div", {
50193
50655
  className: "max-w-[500px] lg:max-w-[1000px] m-auto pl-5 pr-5 overflow-x-clip md:overflow-x-visible relative",
50194
50656
  children: [
50195
50657
  /* @__PURE__ */ jsx138(WriteInReact, {}),
50196
50658
  /* @__PURE__ */ jsx138("br", {}),
50197
- /* @__PURE__ */ jsxs57("div", {
50659
+ /* @__PURE__ */ jsxs58("div", {
50198
50660
  className: makeVideosRowClassName,
50199
50661
  children: [
50200
50662
  /* @__PURE__ */ jsx138(MakeVideosAgentically, {