@remotion/promo-pages 4.0.490 → 4.0.492

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/Homepage.js CHANGED
@@ -941,6 +941,7 @@ import * as React6 from "react";
941
941
  import React7, { useMemo as useMemo6, useRef as useRef2 } from "react";
942
942
  import { useContext as useContext8, useMemo as useMemo7 } from "react";
943
943
  import { jsx as jsx7 } from "react/jsx-runtime";
944
+ import React9 from "react";
944
945
  import {
945
946
  forwardRef as forwardRef3,
946
947
  useCallback as useCallback6,
@@ -966,11 +967,11 @@ import { useContext as useContext13 } from "react";
966
967
  import { useContext as useContext12, useMemo as useMemo10 } from "react";
967
968
  import { jsx as jsx9 } from "react/jsx-runtime";
968
969
  import { createContext as createContext14 } from "react";
969
- import React11, { useCallback as useCallback5, useMemo as useMemo12, useRef as useRef4, useState as useState3 } from "react";
970
+ import React12, { useCallback as useCallback5, useMemo as useMemo12, useRef as useRef4, useState as useState3 } from "react";
970
971
  import { jsx as jsx10 } from "react/jsx-runtime";
971
- import React12, { createContext as createContext15 } from "react";
972
+ import React13, { createContext as createContext15 } from "react";
972
973
  import { jsx as jsx11 } from "react/jsx-runtime";
973
- import React13, { forwardRef as forwardRef2, useContext as useContext16, useMemo as useMemo13, useState as useState4 } from "react";
974
+ import React14, { forwardRef as forwardRef2, useContext as useContext16, useMemo as useMemo13, useState as useState4 } from "react";
974
975
  import { useContext as useContext15, useRef as useRef5 } from "react";
975
976
  import { createContext as createContext16 } from "react";
976
977
  import { jsx as jsx12 } from "react/jsx-runtime";
@@ -982,7 +983,7 @@ import {
982
983
  useRef as useRef9,
983
984
  useState as useState6
984
985
  } from "react";
985
- import React15, { useCallback as useCallback7, useImperativeHandle, useMemo as useMemo16, useRef as useRef8 } from "react";
986
+ import React16, { useCallback as useCallback7, useImperativeHandle, useMemo as useMemo16, useRef as useRef8 } from "react";
986
987
  import { useEffect as useEffect4, useMemo as useMemo15, useRef as useRef7 } from "react";
987
988
  import { jsx as jsx13 } from "react/jsx-runtime";
988
989
  import { jsx as jsx14 } from "react/jsx-runtime";
@@ -998,7 +999,7 @@ import {
998
999
  } from "react";
999
1000
  import { jsx as jsx15 } from "react/jsx-runtime";
1000
1001
  import { forwardRef as forwardRef7, useCallback as useCallback14, useContext as useContext30 } from "react";
1001
- import React16, { createContext as createContext18, useMemo as useMemo18 } from "react";
1002
+ import React17, { createContext as createContext18, useMemo as useMemo18 } from "react";
1002
1003
  import { jsx as jsx16 } from "react/jsx-runtime";
1003
1004
  import { useContext as useContext19 } from "react";
1004
1005
  import { createContext as createContext19, useEffect as useEffect6, useState as useState9 } from "react";
@@ -1006,7 +1007,7 @@ import { jsx as jsx17 } from "react/jsx-runtime";
1006
1007
  import { createContext as createContext20, useMemo as useMemo19, useReducer } from "react";
1007
1008
  import { jsx as jsx18 } from "react/jsx-runtime";
1008
1009
  import { useCallback as useCallback13 } from "react";
1009
- import React22, {
1010
+ import React23, {
1010
1011
  forwardRef as forwardRef5,
1011
1012
  useContext as useContext28,
1012
1013
  useEffect as useEffect14,
@@ -1016,7 +1017,7 @@ import React22, {
1016
1017
  useState as useState14
1017
1018
  } from "react";
1018
1019
  import { useContext as useContext21, useLayoutEffect as useLayoutEffect5, useRef as useRef14 } from "react";
1019
- import React19, {
1020
+ import React20, {
1020
1021
  createContext as createContext21,
1021
1022
  createRef as createRef2,
1022
1023
  useCallback as useCallback9,
@@ -1040,7 +1041,7 @@ import {
1040
1041
  } from "react";
1041
1042
  import { useCallback as useCallback11, useMemo as useMemo25, useRef as useRef16 } from "react";
1042
1043
  import { useContext as useContext25, useMemo as useMemo24 } from "react";
1043
- import React20, {
1044
+ import React21, {
1044
1045
  useCallback as useCallback10,
1045
1046
  useContext as useContext24,
1046
1047
  useEffect as useEffect9,
@@ -1050,7 +1051,7 @@ import React20, {
1050
1051
  useState as useState12
1051
1052
  } from "react";
1052
1053
  import { jsx as jsx20 } from "react/jsx-runtime";
1053
- import React21 from "react";
1054
+ import React22 from "react";
1054
1055
  import { useEffect as useEffect10, useState as useState13 } from "react";
1055
1056
  import { useEffect as useEffect11, useRef as useRef17 } from "react";
1056
1057
  import { useEffect as useEffect13 } from "react";
@@ -1108,10 +1109,10 @@ import {
1108
1109
  useState as useState18
1109
1110
  } from "react";
1110
1111
  import { jsx as jsx28 } from "react/jsx-runtime";
1111
- import React29, { forwardRef as forwardRef12, useCallback as useCallback20, useRef as useRef25 } from "react";
1112
+ import React30, { forwardRef as forwardRef12, useCallback as useCallback20, useRef as useRef25 } from "react";
1112
1113
  import { jsx as jsx29 } from "react/jsx-runtime";
1113
1114
  import { createRef as createRef3 } from "react";
1114
- import React30 from "react";
1115
+ import React31 from "react";
1115
1116
  import {
1116
1117
  useCallback as useCallback21,
1117
1118
  useImperativeHandle as useImperativeHandle8,
@@ -1120,14 +1121,14 @@ import {
1120
1121
  useState as useState19
1121
1122
  } from "react";
1122
1123
  import { jsx as jsx30 } from "react/jsx-runtime";
1123
- import React31 from "react";
1124
+ import React32 from "react";
1124
1125
  import { useMemo as useMemo34 } from "react";
1125
1126
  import { createContext as createContext24, useContext as useContext34, useMemo as useMemo33 } from "react";
1126
1127
  import { jsx as jsx31 } from "react/jsx-runtime";
1127
1128
  import { jsx as jsx32 } from "react/jsx-runtime";
1128
- import React33 from "react";
1129
- import React34, { createContext as createContext25 } from "react";
1130
- import React35, { useContext as useContext35 } from "react";
1129
+ import React34 from "react";
1130
+ import React35, { createContext as createContext25 } from "react";
1131
+ import React36, { useContext as useContext35 } from "react";
1131
1132
  import { useCallback as useCallback24 } from "react";
1132
1133
  import {
1133
1134
  useCallback as useCallback22,
@@ -1138,7 +1139,7 @@ import {
1138
1139
  useState as useState20
1139
1140
  } from "react";
1140
1141
  import { jsx as jsx33 } from "react/jsx-runtime";
1141
- import React37, {
1142
+ import React38, {
1142
1143
  forwardRef as forwardRef13,
1143
1144
  useCallback as useCallback23,
1144
1145
  useContext as useContext37,
@@ -1151,16 +1152,15 @@ import React37, {
1151
1152
  import { useEffect as useEffect18 } from "react";
1152
1153
  import { jsx as jsx34 } from "react/jsx-runtime";
1153
1154
  import { jsx as jsx35 } from "react/jsx-runtime";
1154
- import React39, { useMemo as useMemo37 } from "react";
1155
+ import React40, { useMemo as useMemo37 } from "react";
1155
1156
  import { jsx as jsx36 } from "react/jsx-runtime";
1156
- import {
1157
- Children,
1157
+ import React42, {
1158
1158
  forwardRef as forwardRef14,
1159
1159
  useMemo as useMemo38
1160
1160
  } from "react";
1161
- import React40 from "react";
1162
- import { jsx as jsx37 } from "react/jsx-runtime";
1163
- import React42 from "react";
1161
+ import React41 from "react";
1162
+ import { jsx as jsx37, jsxs as jsxs3, Fragment } from "react/jsx-runtime";
1163
+ import React43 from "react";
1164
1164
  import { forwardRef as forwardRef16, useCallback as useCallback25, useContext as useContext39 } from "react";
1165
1165
  import {
1166
1166
  forwardRef as forwardRef15,
@@ -2238,6 +2238,7 @@ var InnerComposition = ({
2238
2238
  }
2239
2239
  const { folderName, parentName } = useContext9(FolderContext);
2240
2240
  const stack = compProps.stack ?? null;
2241
+ const componentFromProps = "component" in compProps ? compProps.component : null;
2241
2242
  useEffect2(() => {
2242
2243
  if (!id) {
2243
2244
  throw new Error("No id for composition passed.");
@@ -2255,6 +2256,7 @@ var InnerComposition = ({
2255
2256
  defaultProps: serializeThenDeserializeInStudio(defaultProps ?? {}),
2256
2257
  nonce: nonce.get(),
2257
2258
  parentFolderName: parentName,
2259
+ componentFromProps,
2258
2260
  schema: schema ?? null,
2259
2261
  calculateMetadata: compProps.calculateMetadata ?? null,
2260
2262
  stack
@@ -2273,6 +2275,7 @@ var InnerComposition = ({
2273
2275
  width,
2274
2276
  nonce,
2275
2277
  parentName,
2278
+ componentFromProps,
2276
2279
  schema,
2277
2280
  compProps.calculateMetadata,
2278
2281
  stack,
@@ -2331,11 +2334,30 @@ var Composition = (props) => {
2331
2334
  });
2332
2335
  };
2333
2336
  var componentsToAddStacksTo = [];
2337
+ var sequenceComponent = null;
2334
2338
  var getComponentsToAddStacksTo = () => componentsToAddStacksTo;
2335
2339
  var addSequenceStackTraces = (component) => {
2336
2340
  componentsToAddStacksTo.push(component);
2337
2341
  };
2338
- var VERSION = "4.0.490";
2342
+ var setSequenceComponent = (component) => {
2343
+ sequenceComponent = component;
2344
+ };
2345
+ var getSequenceComponent = () => sequenceComponent;
2346
+ var getSingleChildComponent = (children) => {
2347
+ const mountedChildren = React9.Children.toArray(children);
2348
+ if (mountedChildren.length !== 1) {
2349
+ return null;
2350
+ }
2351
+ const child = mountedChildren[0];
2352
+ if (!React9.isValidElement(child)) {
2353
+ return null;
2354
+ }
2355
+ if (typeof child.type !== "function" && typeof child.type !== "object") {
2356
+ return null;
2357
+ }
2358
+ return child.type;
2359
+ };
2360
+ var VERSION = "4.0.492";
2339
2361
  var checkMultipleRemotionVersions = () => {
2340
2362
  if (typeof globalThis === "undefined") {
2341
2363
  return;
@@ -2935,7 +2957,7 @@ var sequenceSchemaDefaultLayoutNone = {
2935
2957
  var PremountContext = createContext14({
2936
2958
  premountFramesRemaining: 0
2937
2959
  });
2938
- var SequenceManager = React11.createContext({
2960
+ var SequenceManager = React12.createContext({
2939
2961
  registerSequence: () => {
2940
2962
  throw new Error("SequenceManagerContext not initialized");
2941
2963
  },
@@ -2944,19 +2966,19 @@ var SequenceManager = React11.createContext({
2944
2966
  },
2945
2967
  sequences: []
2946
2968
  });
2947
- var SequenceManagerRefContext = React11.createContext({
2969
+ var SequenceManagerRefContext = React12.createContext({
2948
2970
  current: []
2949
2971
  });
2950
2972
  var makeSequencePropsSubscriptionKey = (key) => {
2951
- return `${key.nodePath.join(".")}.${key.sequenceKeys.join(".")}.${key.effectKeys.map((keys) => keys.join(".")).join(".")}`;
2973
+ return `${key.absolutePath}\x00${key.nodePath.join(".")}\x00${key.sequenceKeys.join(".")}\x00${key.effectKeys.map((keys) => keys.join(".")).join(".")}`;
2952
2974
  };
2953
- var VisualModePropStatusesContext = React11.createContext({
2975
+ var VisualModePropStatusesContext = React12.createContext({
2954
2976
  propStatuses: {}
2955
2977
  });
2956
- var VisualModePropStatusesRefContext = React11.createContext({
2978
+ var VisualModePropStatusesRefContext = React12.createContext({
2957
2979
  current: {}
2958
2980
  });
2959
- var VisualModeDragOverridesContext = React11.createContext({
2981
+ var VisualModeDragOverridesContext = React12.createContext({
2960
2982
  getDragOverrides: () => {
2961
2983
  throw new Error("VisualModeDragOverridesContext not initialized");
2962
2984
  },
@@ -2964,7 +2986,7 @@ var VisualModeDragOverridesContext = React11.createContext({
2964
2986
  throw new Error("VisualModeDragOverridesContext not initialized");
2965
2987
  }
2966
2988
  });
2967
- var VisualModeSettersContext = React11.createContext({
2989
+ var VisualModeSettersContext = React12.createContext({
2968
2990
  setDragOverrides: () => {
2969
2991
  throw new Error("VisualModeSettersContext not initialized");
2970
2992
  },
@@ -3128,7 +3150,7 @@ var IsNotInsideSeriesProvider = ({ children }) => {
3128
3150
  });
3129
3151
  };
3130
3152
  var useRequireToBeInsideSeries = () => {
3131
- const isInsideSeries = React12.useContext(IsInsideSeriesContext);
3153
+ const isInsideSeries = React13.useContext(IsInsideSeriesContext);
3132
3154
  if (!isInsideSeries) {
3133
3155
  throw new Error("This component must be inside a <Series /> component.");
3134
3156
  }
@@ -5197,6 +5219,9 @@ var computeEffectiveSchemaValuesDotNotation = ({
5197
5219
  shouldResortToDefaultValueIfUndefined: false
5198
5220
  });
5199
5221
  }
5222
+ if (field?.type === "asset" && typeof value === "string" && value.startsWith(FILE_TOKEN)) {
5223
+ value = `${window.remotion_staticBase}/${value.slice(FILE_TOKEN.length)}`;
5224
+ }
5200
5225
  if (value === undefined) {
5201
5226
  propsToDelete.add(key);
5202
5227
  }
@@ -5295,7 +5320,7 @@ var withInteractivitySchema = ({
5295
5320
  const Wrapped = forwardRef2((props, ref) => {
5296
5321
  const env = useRemotionEnvironment();
5297
5322
  if (!env.isStudio || env.isReadOnlyStudio || env.isRendering) {
5298
- return React13.createElement(Component, {
5323
+ return React14.createElement(Component, {
5299
5324
  ...props,
5300
5325
  controls: null,
5301
5326
  ref
@@ -5306,7 +5331,7 @@ var withInteractivitySchema = ({
5306
5331
  const nodePathMapping = useContext16(OverrideIdsToNodePathsGettersContext);
5307
5332
  const frame = useCurrentFrame();
5308
5333
  if (props.controls) {
5309
- return React13.createElement(Component, {
5334
+ return React14.createElement(Component, {
5310
5335
  ...props,
5311
5336
  ref
5312
5337
  });
@@ -5364,7 +5389,7 @@ var withInteractivitySchema = ({
5364
5389
  schemaKeys: activeKeys,
5365
5390
  propsToDelete
5366
5391
  });
5367
- return React13.createElement(Component, {
5392
+ return React14.createElement(Component, {
5368
5393
  ...mergedProps,
5369
5394
  controls,
5370
5395
  ref
@@ -5390,6 +5415,7 @@ var RegularSequenceRefForwardingFunction = ({
5390
5415
  _remotionInternalLoopDisplay: loopDisplay,
5391
5416
  _remotionInternalStack: stack,
5392
5417
  _remotionInternalDocumentationLink: documentationLink,
5418
+ _remotionInternalSingleChildComponent: singleChildComponent,
5393
5419
  _remotionInternalPremountDisplay: premountDisplay,
5394
5420
  _remotionInternalPostmountDisplay: postmountDisplay,
5395
5421
  _remotionInternalIsMedia: isMedia,
@@ -5536,7 +5562,8 @@ var RegularSequenceRefForwardingFunction = ({
5536
5562
  getStack: () => stackRef.current,
5537
5563
  refForOutline: refForOutline ?? null,
5538
5564
  isInsideSeries,
5539
- frozenFrame: registeredFrozenFrame
5565
+ frozenFrame: registeredFrozenFrame,
5566
+ singleChildComponent: singleChildComponent ?? null
5540
5567
  });
5541
5568
  } else {
5542
5569
  registerSequence({
@@ -5561,11 +5588,13 @@ var RegularSequenceRefForwardingFunction = ({
5561
5588
  src: isMedia.data.src,
5562
5589
  getStack: () => stackRef.current,
5563
5590
  startMediaFrom: startMediaFrom ?? isMedia.data.startMediaFrom,
5591
+ mediaFrameAtSequenceZero,
5564
5592
  volume: isMedia.data.volumes,
5565
5593
  refForOutline: refForOutline ?? null,
5566
5594
  isInsideSeries,
5567
5595
  frozenFrame: registeredFrozenFrame,
5568
- frozenMediaFrame
5596
+ frozenMediaFrame,
5597
+ singleChildComponent: singleChildComponent ?? null
5569
5598
  });
5570
5599
  }
5571
5600
  return () => {
@@ -5592,7 +5621,8 @@ var RegularSequenceRefForwardingFunction = ({
5592
5621
  effects: _remotionInternalEffects ?? EMPTY_EFFECTS,
5593
5622
  refForOutline: refForOutline ?? null,
5594
5623
  isInsideSeries,
5595
- frozenFrame: registeredFrozenFrame
5624
+ frozenFrame: registeredFrozenFrame,
5625
+ singleChildComponent: singleChildComponent ?? null
5596
5626
  });
5597
5627
  return () => {
5598
5628
  unregisterSequence(id);
@@ -5624,7 +5654,9 @@ var RegularSequenceRefForwardingFunction = ({
5624
5654
  isInsideSeries,
5625
5655
  registeredFrozenFrame,
5626
5656
  startMediaFrom,
5627
- frozenMediaFrame
5657
+ mediaFrameAtSequenceZero,
5658
+ frozenMediaFrame,
5659
+ singleChildComponent
5628
5660
  ]);
5629
5661
  const endThreshold = Math.ceil(cumulatedFrom + from + durationInFrames - 1);
5630
5662
  const content = absoluteFrame < cumulatedFrom + from ? null : absoluteFrame > endThreshold ? null : children;
@@ -6126,7 +6158,7 @@ var CanvasRefForwardingFunction = ({ width, height, fit, className, style, effec
6126
6158
  ...props
6127
6159
  });
6128
6160
  };
6129
- var Canvas = React15.forwardRef(CanvasRefForwardingFunction);
6161
+ var Canvas = React16.forwardRef(CanvasRefForwardingFunction);
6130
6162
  var CACHE_SIZE = 5;
6131
6163
  var getActualTime = ({
6132
6164
  loopBehavior,
@@ -6287,6 +6319,12 @@ var resolveAnimatedImageSource = (src) => {
6287
6319
  return new URL(src, window.origin).href;
6288
6320
  };
6289
6321
  var animatedImageSchema = {
6322
+ src: {
6323
+ type: "asset",
6324
+ default: undefined,
6325
+ description: "Source",
6326
+ keyframable: false
6327
+ },
6290
6328
  ...baseSchema,
6291
6329
  playbackRate: {
6292
6330
  type: "number",
@@ -6704,7 +6742,7 @@ var calculateMediaDuration = ({
6704
6742
  };
6705
6743
  var LoopContext = createContext18(null);
6706
6744
  var useLoop = () => {
6707
- return React16.useContext(LoopContext);
6745
+ return React17.useContext(LoopContext);
6708
6746
  };
6709
6747
  var Loop = ({
6710
6748
  durationInFrames,
@@ -7555,7 +7593,7 @@ var SharedAudioTagsContextProvider = ({ children, numberOfAudioTags }) => {
7555
7593
  };
7556
7594
  });
7557
7595
  }, [audioContext, numberOfAudioTags]);
7558
- const effectToUse = React19.useInsertionEffect ?? React19.useLayoutEffect;
7596
+ const effectToUse = React20.useInsertionEffect ?? React20.useLayoutEffect;
7559
7597
  effectToUse(() => {
7560
7598
  return () => {
7561
7599
  requestAnimationFrame(() => {
@@ -7574,7 +7612,9 @@ var SharedAudioTagsContextProvider = ({ children, numberOfAudioTags }) => {
7574
7612
  return;
7575
7613
  }
7576
7614
  if (data === undefined) {
7577
- current.src = EMPTY_AUDIO;
7615
+ if (current.src !== EMPTY_AUDIO) {
7616
+ current.src = EMPTY_AUDIO;
7617
+ }
7578
7618
  return;
7579
7619
  }
7580
7620
  if (!data) {
@@ -7643,7 +7683,7 @@ var SharedAudioTagsContextProvider = ({ children, numberOfAudioTags }) => {
7643
7683
  if (prevA.id === id) {
7644
7684
  const isTheSame = compareProps(aud, prevA.props) && prevA.premounting === premounting && prevA.postmounting === postmounting;
7645
7685
  if (isTheSame) {
7646
- return prevA;
7686
+ return prevA.audioMounted === audioMounted ? prevA : { ...prevA, audioMounted };
7647
7687
  }
7648
7688
  changed = true;
7649
7689
  return {
@@ -7655,7 +7695,7 @@ var SharedAudioTagsContextProvider = ({ children, numberOfAudioTags }) => {
7655
7695
  audioMounted
7656
7696
  };
7657
7697
  }
7658
- return prevA;
7698
+ return prevA.audioMounted === audioMounted ? prevA : { ...prevA, audioMounted };
7659
7699
  });
7660
7700
  if (changed) {
7661
7701
  rerenderAudios();
@@ -7694,16 +7734,19 @@ var SharedAudioTagsContextProvider = ({ children, numberOfAudioTags }) => {
7694
7734
  unregisterAudio,
7695
7735
  updateAudio
7696
7736
  ]);
7737
+ const sharedAudioTagElements = useMemo21(() => {
7738
+ return refs.map(({ id, ref }) => {
7739
+ return /* @__PURE__ */ jsx19("audio", {
7740
+ ref,
7741
+ preload: "metadata",
7742
+ src: EMPTY_AUDIO
7743
+ }, id);
7744
+ });
7745
+ }, [refs]);
7697
7746
  return /* @__PURE__ */ jsxs22(SharedAudioTagsContext.Provider, {
7698
7747
  value: audioTagsValue,
7699
7748
  children: [
7700
- refs.map(({ id, ref }) => {
7701
- return /* @__PURE__ */ jsx19("audio", {
7702
- ref,
7703
- preload: "metadata",
7704
- src: EMPTY_AUDIO
7705
- }, id);
7706
- }),
7749
+ sharedAudioTagElements,
7707
7750
  children
7708
7751
  ]
7709
7752
  });
@@ -7720,7 +7763,7 @@ var useSharedAudio = ({
7720
7763
  if (tagsCtx && tagsCtx.numberOfAudioTags > 0) {
7721
7764
  return tagsCtx.registerAudio({ aud, audioId, premounting, postmounting });
7722
7765
  }
7723
- const el = React19.createRef();
7766
+ const el = React20.createRef();
7724
7767
  const mediaElementSourceNode = audioCtx?.audioContext ? makeSharedElementSourceNode({
7725
7768
  audioContext: audioCtx.audioContext,
7726
7769
  ref: el
@@ -7739,7 +7782,7 @@ var useSharedAudio = ({
7739
7782
  }
7740
7783
  };
7741
7784
  });
7742
- const effectToUse = React19.useInsertionEffect ?? React19.useLayoutEffect;
7785
+ const effectToUse = React20.useInsertionEffect ?? React20.useLayoutEffect;
7743
7786
  if (typeof document !== "undefined") {
7744
7787
  effectToUse(() => {
7745
7788
  if (tagsCtx && tagsCtx.numberOfAudioTags > 0) {
@@ -8164,6 +8207,7 @@ var useMediaInTimeline = ({
8164
8207
  showInTimeline: true,
8165
8208
  nonce: nonce.get(),
8166
8209
  startMediaFrom: 0 - startsAt,
8210
+ mediaFrameAtSequenceZero: null,
8167
8211
  doesVolumeChange,
8168
8212
  loopDisplay,
8169
8213
  playbackRate,
@@ -8290,7 +8334,7 @@ var useBufferManager = (logLevel, mountTime) => {
8290
8334
  return { addBlock, listenForBuffering, listenForResume, buffering };
8291
8335
  }, [addBlock, buffering, listenForBuffering, listenForResume]);
8292
8336
  };
8293
- var BufferingContextReact = React20.createContext(null);
8337
+ var BufferingContextReact = React21.createContext(null);
8294
8338
  var BufferingProvider = ({ children }) => {
8295
8339
  const { logLevel, mountTime } = useContext24(LogLevelContext);
8296
8340
  const bufferManager = useBufferManager(logLevel ?? "info", mountTime);
@@ -8503,7 +8547,7 @@ var getMediaSyncAction = (input) => {
8503
8547
  return { type: "none" };
8504
8548
  };
8505
8549
  var useCurrentTimeOfMediaTagWithUpdateTimeStamp = (mediaRef) => {
8506
- const lastUpdate = React21.useRef({
8550
+ const lastUpdate = React22.useRef({
8507
8551
  time: mediaRef.current?.currentTime ?? 0,
8508
8552
  lastUpdate: performance.now()
8509
8553
  });
@@ -9256,7 +9300,7 @@ var AudioForDevelopmentForwardRefFunction = (props, ref) => {
9256
9300
  volume: userPreferredVolume,
9257
9301
  shouldUseWebAudioApi: useWebAudioApi ?? false
9258
9302
  });
9259
- const effectToUse = React22.useInsertionEffect ?? React22.useLayoutEffect;
9303
+ const effectToUse = React23.useInsertionEffect ?? React23.useLayoutEffect;
9260
9304
  effectToUse(() => {
9261
9305
  return () => {
9262
9306
  requestAnimationFrame(() => {
@@ -9797,16 +9841,16 @@ var isMissingPaintRecordError = (error2) => {
9797
9841
  return error2 instanceof DOMException && error2.name === "InvalidStateError";
9798
9842
  };
9799
9843
  var missingPaintRecordMessage = "HtmlInCanvas: Expected the element to be inside the viewport during rendering, but Chrome had no cached paint record for it.";
9800
- var resizeOffscreenCanvas = ({
9801
- offscreen,
9844
+ var resizePaintTarget = ({
9845
+ target,
9802
9846
  width,
9803
9847
  height
9804
9848
  }) => {
9805
- if (offscreen.width !== width) {
9806
- offscreen.width = width;
9849
+ if (target.width !== width) {
9850
+ target.width = width;
9807
9851
  }
9808
- if (offscreen.height !== height) {
9809
- offscreen.height = height;
9852
+ if (target.height !== height) {
9853
+ target.height = height;
9810
9854
  }
9811
9855
  };
9812
9856
  var defaultOnPaint = ({
@@ -9822,7 +9866,7 @@ var defaultOnPaint = ({
9822
9866
  const transform = ctx.drawElementImage(elementImage, 0, 0);
9823
9867
  element.style.transform = transform.toString();
9824
9868
  };
9825
- var HtmlInCanvasAncestorContext = createContext23(false);
9869
+ var HtmlInCanvasAncestorContext = createContext23(null);
9826
9870
  var HtmlInCanvasContent = forwardRef9(({
9827
9871
  width,
9828
9872
  height,
@@ -9834,20 +9878,22 @@ var HtmlInCanvasContent = forwardRef9(({
9834
9878
  controls,
9835
9879
  style
9836
9880
  }, ref) => {
9837
- const isInsideAncestorHtmlInCanvas = useContext31(HtmlInCanvasAncestorContext);
9881
+ const ancestor = useContext31(HtmlInCanvasAncestorContext);
9838
9882
  assertHtmlInCanvasDimensions(width, height);
9839
9883
  const resolvedPixelDensity = resolveHtmlInCanvasPixelDensity(pixelDensity);
9840
9884
  const canvasWidth = Math.ceil(width * resolvedPixelDensity);
9841
9885
  const canvasHeight = Math.ceil(height * resolvedPixelDensity);
9842
9886
  const { continueRender: continueRender2, cancelRender: cancelRender2 } = useDelayRender();
9843
- const { isRendering } = useRemotionEnvironment();
9887
+ const { isClientSideRendering, isRendering } = useRemotionEnvironment();
9888
+ const canRetryMissingPaintRecord = !isRendering || isClientSideRendering;
9889
+ const usesDirectLayoutCanvas = onPaint === undefined && onInit === undefined;
9844
9890
  if (!isHtmlInCanvasSupported()) {
9845
9891
  cancelRender2(new Error(HTML_IN_CANVAS_UNSUPPORTED_MESSAGE));
9846
9892
  }
9847
9893
  const canvas2dRef = useRef22(null);
9848
- const offscreenRef = useRef22(null);
9894
+ const paintTargetRef = useRef22(null);
9849
9895
  const divRef = useRef22(null);
9850
- const canvasSizeKey = `${width}x${height}@${resolvedPixelDensity}`;
9896
+ const canvasSizeKey = `${width}x${height}@${resolvedPixelDensity}-${usesDirectLayoutCanvas ? "direct" : "offscreen"}`;
9851
9897
  const setLayoutCanvasRef = useCallback16((node) => {
9852
9898
  canvas2dRef.current = node;
9853
9899
  if (typeof ref === "function") {
@@ -9870,17 +9916,19 @@ var HtmlInCanvasContent = forwardRef9(({
9870
9916
  const initializedRef = useRef22(false);
9871
9917
  const onInitCleanupRef = useRef22(null);
9872
9918
  const unmountedRef = useRef22(false);
9919
+ const ancestorRef = useRef22(ancestor);
9920
+ ancestorRef.current = ancestor;
9873
9921
  const onPaintCb = useCallback16(async () => {
9874
9922
  const element = divRef.current;
9875
9923
  if (!element) {
9876
9924
  throw new Error("Canvas or scene element not found");
9877
9925
  }
9878
- const offscreen = offscreenRef.current;
9879
- if (!offscreen) {
9880
- throw new Error("HtmlInCanvas: offscreen canvas not ready (transferControlToOffscreen failed or canvas is remounting)");
9926
+ const paintTarget = paintTargetRef.current;
9927
+ if (!paintTarget) {
9928
+ throw new Error("HtmlInCanvas: paint target is not ready because the canvas is remounting");
9881
9929
  }
9882
- resizeOffscreenCanvas({
9883
- offscreen,
9930
+ resizePaintTarget({
9931
+ target: paintTarget,
9884
9932
  width: canvasWidth,
9885
9933
  height: canvasHeight
9886
9934
  });
@@ -9891,22 +9939,30 @@ var HtmlInCanvasContent = forwardRef9(({
9891
9939
  }
9892
9940
  const handle = delayRender("onPaint");
9893
9941
  if (!initializedRef.current) {
9894
- let initImage = null;
9895
- try {
9896
- initImage = placeholderCanvas.captureElementImage(element);
9897
- } catch (error2) {
9898
- if (isMissingPaintRecordError(error2) && !isRendering) {} else if (isMissingPaintRecordError(error2)) {
9899
- throw new Error(missingPaintRecordMessage);
9900
- } else {
9942
+ const currentOnInit = onInitRef.current;
9943
+ if (!currentOnInit) {
9944
+ initializedRef.current = true;
9945
+ } else {
9946
+ let initImage;
9947
+ try {
9948
+ initImage = placeholderCanvas.captureElementImage(element);
9949
+ } catch (error2) {
9950
+ if (isMissingPaintRecordError(error2) && canRetryMissingPaintRecord) {
9951
+ continueRender2(handle);
9952
+ return;
9953
+ }
9954
+ if (isMissingPaintRecordError(error2)) {
9955
+ throw new Error(missingPaintRecordMessage);
9956
+ }
9901
9957
  throw error2;
9902
9958
  }
9903
- }
9904
- if (initImage) {
9905
9959
  initializedRef.current = true;
9906
- const currentOnInit = onInitRef.current;
9907
- if (currentOnInit) {
9960
+ try {
9961
+ if (paintTarget instanceof HTMLCanvasElement) {
9962
+ throw new Error("HtmlInCanvas: onInit requires an OffscreenCanvas paint target");
9963
+ }
9908
9964
  const cleanup = await currentOnInit({
9909
- canvas: offscreen,
9965
+ canvas: paintTarget,
9910
9966
  element,
9911
9967
  elementImage: initImage,
9912
9968
  pixelDensity: resolvedPixelDensity
@@ -9919,15 +9975,16 @@ var HtmlInCanvasContent = forwardRef9(({
9919
9975
  } else {
9920
9976
  onInitCleanupRef.current = cleanup;
9921
9977
  }
9978
+ } finally {
9979
+ initImage.close();
9922
9980
  }
9923
9981
  }
9924
9982
  }
9925
- const handler = onPaintRef.current ?? defaultOnPaint;
9926
9983
  let elImage;
9927
9984
  try {
9928
9985
  elImage = placeholderCanvas.captureElementImage(element);
9929
9986
  } catch (error2) {
9930
- if (isMissingPaintRecordError(error2) && !isRendering) {
9987
+ if (isMissingPaintRecordError(error2) && canRetryMissingPaintRecord) {
9931
9988
  continueRender2(handle);
9932
9989
  return;
9933
9990
  }
@@ -9936,20 +9993,41 @@ var HtmlInCanvasContent = forwardRef9(({
9936
9993
  }
9937
9994
  throw error2;
9938
9995
  }
9939
- await handler({
9940
- canvas: offscreen,
9941
- element,
9942
- elementImage: elImage,
9943
- pixelDensity: resolvedPixelDensity
9944
- });
9945
- await runEffectChain({
9946
- state: chainState.get(canvasWidth, canvasHeight),
9947
- source: offscreen,
9948
- effects: effectsRef.current,
9949
- output: offscreen,
9950
- width: canvasWidth,
9951
- height: canvasHeight
9952
- });
9996
+ try {
9997
+ const currentOnPaint = onPaintRef.current;
9998
+ if (currentOnPaint) {
9999
+ if (paintTarget instanceof HTMLCanvasElement) {
10000
+ throw new Error("HtmlInCanvas: onPaint requires an OffscreenCanvas paint target");
10001
+ }
10002
+ const paintResult = currentOnPaint({
10003
+ canvas: paintTarget,
10004
+ element,
10005
+ elementImage: elImage,
10006
+ pixelDensity: resolvedPixelDensity
10007
+ });
10008
+ if (paintResult) {
10009
+ await paintResult;
10010
+ }
10011
+ } else {
10012
+ defaultOnPaint({
10013
+ canvas: paintTarget,
10014
+ element,
10015
+ elementImage: elImage,
10016
+ pixelDensity: resolvedPixelDensity
10017
+ });
10018
+ }
10019
+ await runEffectChain({
10020
+ state: chainState.get(canvasWidth, canvasHeight),
10021
+ source: paintTarget,
10022
+ effects: effectsRef.current,
10023
+ output: paintTarget,
10024
+ width: canvasWidth,
10025
+ height: canvasHeight
10026
+ });
10027
+ } finally {
10028
+ elImage.close();
10029
+ }
10030
+ ancestorRef.current?.requestParentPaint();
9953
10031
  continueRender2(handle);
9954
10032
  } catch (error2) {
9955
10033
  cancelRender2(error2);
@@ -9961,7 +10039,7 @@ var HtmlInCanvasContent = forwardRef9(({
9961
10039
  continueRender2,
9962
10040
  cancelRender2,
9963
10041
  resolvedPixelDensity,
9964
- isRendering
10042
+ canRetryMissingPaintRecord
9965
10043
  ]);
9966
10044
  useLayoutEffect9(() => {
9967
10045
  const placeholder = canvas2dRef.current;
@@ -9969,10 +10047,10 @@ var HtmlInCanvasContent = forwardRef9(({
9969
10047
  throw new Error("Canvas not found");
9970
10048
  }
9971
10049
  placeholder.layoutSubtree = true;
9972
- const offscreen = placeholder.transferControlToOffscreen();
9973
- offscreenRef.current = offscreen;
9974
- resizeOffscreenCanvas({
9975
- offscreen,
10050
+ const paintTarget = usesDirectLayoutCanvas ? placeholder : placeholder.transferControlToOffscreen();
10051
+ paintTargetRef.current = paintTarget;
10052
+ resizePaintTarget({
10053
+ target: paintTarget,
9976
10054
  width: canvasWidth,
9977
10055
  height: canvasHeight
9978
10056
  });
@@ -9981,13 +10059,19 @@ var HtmlInCanvasContent = forwardRef9(({
9981
10059
  placeholder.addEventListener("paint", onPaintCb);
9982
10060
  return () => {
9983
10061
  placeholder.removeEventListener("paint", onPaintCb);
9984
- offscreenRef.current = null;
10062
+ paintTargetRef.current = null;
9985
10063
  initializedRef.current = false;
9986
10064
  unmountedRef.current = true;
9987
10065
  onInitCleanupRef.current?.();
9988
10066
  onInitCleanupRef.current = null;
9989
10067
  };
9990
- }, [onPaintCb, cancelRender2, canvasWidth, canvasHeight]);
10068
+ }, [
10069
+ onPaintCb,
10070
+ cancelRender2,
10071
+ canvasWidth,
10072
+ canvasHeight,
10073
+ usesDirectLayoutCanvas
10074
+ ]);
9991
10075
  const onPaintChangedRef = useRef22(false);
9992
10076
  useLayoutEffect9(() => {
9993
10077
  if (!onPaintChangedRef.current) {
@@ -10026,11 +10110,15 @@ var HtmlInCanvasContent = forwardRef9(({
10026
10110
  ...style ?? {}
10027
10111
  };
10028
10112
  }, [height, style, width]);
10029
- if (isInsideAncestorHtmlInCanvas) {
10030
- 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.");
10031
- }
10113
+ const ancestorValue = useMemo30(() => {
10114
+ return {
10115
+ requestParentPaint: () => {
10116
+ canvas2dRef.current?.requestPaint?.();
10117
+ }
10118
+ };
10119
+ }, []);
10032
10120
  return /* @__PURE__ */ jsx25(HtmlInCanvasAncestorContext.Provider, {
10033
- value: true,
10121
+ value: ancestorValue,
10034
10122
  children: /* @__PURE__ */ jsx25("canvas", {
10035
10123
  ref: setLayoutCanvasRef,
10036
10124
  width: canvasWidth,
@@ -10758,6 +10846,12 @@ var NativeImgInner = ({
10758
10846
  };
10759
10847
  var CanvasImageWithPrivateProps = CanvasImage;
10760
10848
  var imgSchema = {
10849
+ src: {
10850
+ type: "asset",
10851
+ default: undefined,
10852
+ description: "Source",
10853
+ keyframable: false
10854
+ },
10761
10855
  ...baseSchema,
10762
10856
  ...transformSchema
10763
10857
  };
@@ -10968,7 +11062,7 @@ var makeInteractiveElement = (tag, displayName) => {
10968
11062
  _remotionInternalStack: stack,
10969
11063
  _remotionInternalDocumentationLink: "https://www.remotion.dev/docs/interactive",
10970
11064
  outlineRef: refForOutline,
10971
- children: React29.createElement(tag, {
11065
+ children: React30.createElement(tag, {
10972
11066
  ...props2,
10973
11067
  ref: callbackRef
10974
11068
  })
@@ -11032,7 +11126,7 @@ var Interactive = {
11032
11126
  Text: makeInteractiveElement("text", "<Interactive.Text>"),
11033
11127
  Ul: makeInteractiveElement("ul", "<Interactive.Ul>")
11034
11128
  };
11035
- var compositionsRef = React30.createRef();
11129
+ var compositionsRef = React31.createRef();
11036
11130
  var CompositionManagerProvider = ({
11037
11131
  children,
11038
11132
  onlyRenderComposition,
@@ -11181,7 +11275,7 @@ var REMOTION_STUDIO_CONTAINER_ELEMENT = "__remotion-studio-container";
11181
11275
  var getPreviewDomElement = () => {
11182
11276
  return document.getElementById(REMOTION_STUDIO_CONTAINER_ELEMENT);
11183
11277
  };
11184
- var MaxMediaCacheSizeContext = React31.createContext(null);
11278
+ var MaxMediaCacheSizeContext = React32.createContext(null);
11185
11279
  var Root = null;
11186
11280
  var listeners = [];
11187
11281
  var getRoot = () => {
@@ -11454,7 +11548,7 @@ var resolveVideoConfigOrCatch = (params) => {
11454
11548
  };
11455
11549
  }
11456
11550
  };
11457
- var SequenceStackTracesUpdateContext = React33.createContext(() => {});
11551
+ var SequenceStackTracesUpdateContext = React34.createContext(() => {});
11458
11552
  var getEnvVariables = () => {
11459
11553
  if (getRemotionEnvironment().isRendering) {
11460
11554
  const param = window.remotion_envVariables;
@@ -11480,7 +11574,7 @@ var setupEnvVariables = () => {
11480
11574
  window.process.env[key] = env[key];
11481
11575
  });
11482
11576
  };
11483
- var CurrentScaleContext = React34.createContext(null);
11577
+ var CurrentScaleContext = React35.createContext(null);
11484
11578
  var PreviewSizeContext = createContext25({
11485
11579
  setSize: () => {
11486
11580
  return;
@@ -11504,7 +11598,7 @@ var calculateScale = ({
11504
11598
  }
11505
11599
  return Number(previewSize);
11506
11600
  };
11507
- var PixelDensityContext = React35.createContext(null);
11601
+ var PixelDensityContext = React36.createContext(null);
11508
11602
  var getOffthreadVideoSource = ({
11509
11603
  src,
11510
11604
  transparent,
@@ -11771,7 +11865,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
11771
11865
  ref: videoRef
11772
11866
  });
11773
11867
  }, [context.audioContext]);
11774
- const effectToUse = React37.useInsertionEffect ?? React37.useLayoutEffect;
11868
+ const effectToUse = React38.useInsertionEffect ?? React38.useLayoutEffect;
11775
11869
  effectToUse(() => {
11776
11870
  return () => {
11777
11871
  requestAnimationFrame(() => {
@@ -12147,20 +12241,20 @@ var OffthreadVideo = ({
12147
12241
  addSequenceStackTraces(OffthreadVideo);
12148
12242
  var WATCH_REMOTION_STATIC_FILES = "remotion_staticFilesChanged";
12149
12243
  function useRemotionContexts() {
12150
- const compositionManagerCtx = React39.useContext(CompositionManager);
12151
- const timelineContext = React39.useContext(TimelineContext);
12152
- const setTimelineContext = React39.useContext(SetTimelineContext);
12153
- const sequenceContext = React39.useContext(SequenceContext);
12154
- const nonceContext = React39.useContext(NonceContext);
12155
- const canUseRemotionHooksContext = React39.useContext(CanUseRemotionHooks);
12156
- const preloadContext = React39.useContext(PreloadContext);
12157
- const resolveCompositionContext = React39.useContext(ResolveCompositionContext);
12158
- const renderAssetManagerContext = React39.useContext(RenderAssetManager);
12159
- const sequenceManagerContext = React39.useContext(SequenceManager);
12160
- const sequenceManagerRefContext = React39.useContext(SequenceManagerRefContext);
12161
- const visualModePropStatusesRefContext = React39.useContext(VisualModePropStatusesRefContext);
12162
- const bufferManagerContext = React39.useContext(BufferingContextReact);
12163
- const logLevelContext = React39.useContext(LogLevelContext);
12244
+ const compositionManagerCtx = React40.useContext(CompositionManager);
12245
+ const timelineContext = React40.useContext(TimelineContext);
12246
+ const setTimelineContext = React40.useContext(SetTimelineContext);
12247
+ const sequenceContext = React40.useContext(SequenceContext);
12248
+ const nonceContext = React40.useContext(NonceContext);
12249
+ const canUseRemotionHooksContext = React40.useContext(CanUseRemotionHooks);
12250
+ const preloadContext = React40.useContext(PreloadContext);
12251
+ const resolveCompositionContext = React40.useContext(ResolveCompositionContext);
12252
+ const renderAssetManagerContext = React40.useContext(RenderAssetManager);
12253
+ const sequenceManagerContext = React40.useContext(SequenceManager);
12254
+ const sequenceManagerRefContext = React40.useContext(SequenceManagerRefContext);
12255
+ const visualModePropStatusesRefContext = React40.useContext(VisualModePropStatusesRefContext);
12256
+ const bufferManagerContext = React40.useContext(BufferingContextReact);
12257
+ const logLevelContext = React40.useContext(LogLevelContext);
12164
12258
  return useMemo37(() => ({
12165
12259
  compositionManagerCtx,
12166
12260
  timelineContext,
@@ -12334,6 +12428,8 @@ var Internals = {
12334
12428
  BufferingProvider,
12335
12429
  BufferingContextReact,
12336
12430
  getComponentsToAddStacksTo,
12431
+ getSequenceComponent,
12432
+ getSingleChildComponent,
12337
12433
  CurrentScaleContext,
12338
12434
  PixelDensityContext,
12339
12435
  PreviewSizeContext,
@@ -12391,75 +12487,139 @@ var Internals = {
12391
12487
  fromField
12392
12488
  };
12393
12489
  var flattenChildren = (children) => {
12394
- const childrenArray = React40.Children.toArray(children);
12490
+ const childrenArray = React41.Children.toArray(children);
12395
12491
  return childrenArray.reduce((flatChildren, child) => {
12396
- if (child.type === React40.Fragment) {
12492
+ if (child.type === React41.Fragment) {
12397
12493
  return flatChildren.concat(flattenChildren(child.props.children));
12398
12494
  }
12399
12495
  flatChildren.push(child);
12400
12496
  return flatChildren;
12401
12497
  }, []);
12402
12498
  };
12403
- var SeriesSequenceRefForwardingFunction = ({ children }, _ref) => {
12499
+ var seriesSequenceSchema = {
12500
+ durationInFrames: Interactive.baseSchema.durationInFrames,
12501
+ name: Interactive.sequenceSchema.name,
12502
+ hidden: Interactive.sequenceSchema.hidden,
12503
+ showInTimeline: Interactive.sequenceSchema.showInTimeline,
12504
+ freeze: Interactive.baseSchema.freeze,
12505
+ layout: Interactive.sequenceSchema.layout
12506
+ };
12507
+ var SeriesSequenceInner = forwardRef14(({
12508
+ offset = 0,
12509
+ className = "",
12510
+ stack = null,
12511
+ _remotionInternalRender = null,
12512
+ ...props2
12513
+ }, ref) => {
12404
12514
  useRequireToBeInsideSeries();
12515
+ if (_remotionInternalRender) {
12516
+ return _remotionInternalRender({ ...props2, offset, className: className || undefined, stack }, ref);
12517
+ }
12405
12518
  return /* @__PURE__ */ jsx37(IsNotInsideSeriesProvider, {
12406
- children
12519
+ children: props2.children
12407
12520
  });
12408
- };
12409
- var SeriesSequence = forwardRef14(SeriesSequenceRefForwardingFunction);
12521
+ });
12522
+ var SeriesSequence = Interactive.withSchema({
12523
+ Component: SeriesSequenceInner,
12524
+ componentName: "<Series.Sequence>",
12525
+ componentIdentity: "dev.remotion.remotion.Series.Sequence",
12526
+ schema: seriesSequenceSchema,
12527
+ supportsEffects: false
12528
+ });
12410
12529
  var SequenceWithoutSchemaWithRef = SequenceWithoutSchema;
12530
+ var validateSeriesSequenceProps = ({
12531
+ durationInFrames,
12532
+ offset: offsetProp,
12533
+ index,
12534
+ childrenLength
12535
+ }) => {
12536
+ const debugInfo = `index = ${index}, duration = ${durationInFrames}`;
12537
+ if (index !== childrenLength - 1 || durationInFrames !== Infinity) {
12538
+ validateDurationInFrames(durationInFrames, {
12539
+ component: `of a <Series.Sequence /> component`,
12540
+ allowFloats: true
12541
+ });
12542
+ }
12543
+ const offset = offsetProp ?? 0;
12544
+ if (Number.isNaN(offset)) {
12545
+ throw new TypeError(`The "offset" property of a <Series.Sequence /> must not be NaN, but got NaN (${debugInfo}).`);
12546
+ }
12547
+ if (!Number.isFinite(offset)) {
12548
+ throw new TypeError(`The "offset" property of a <Series.Sequence /> must be finite, but got ${offset} (${debugInfo}).`);
12549
+ }
12550
+ if (offset % 1 !== 0) {
12551
+ throw new TypeError(`The "offset" property of a <Series.Sequence /> must be finite, but got ${offset} (${debugInfo}).`);
12552
+ }
12553
+ return offset;
12554
+ };
12411
12555
  var SeriesInner = (props2) => {
12412
12556
  const childrenValue = useMemo38(() => {
12413
- let startFrame = 0;
12414
12557
  const flattenedChildren = flattenChildren(props2.children);
12415
- return Children.map(flattenedChildren, (child, i) => {
12558
+ const renderChildren = (i, startFrame) => {
12559
+ if (i === flattenedChildren.length) {
12560
+ return null;
12561
+ }
12562
+ const child = flattenedChildren[i];
12416
12563
  const castedChild = child;
12417
12564
  if (typeof castedChild === "string") {
12418
12565
  if (castedChild.trim() === "") {
12419
- return null;
12566
+ return renderChildren(i + 1, startFrame);
12420
12567
  }
12421
12568
  throw new TypeError(`The <Series /> component only accepts a list of <Series.Sequence /> components as its children, but you passed a string "${castedChild}"`);
12422
12569
  }
12423
12570
  if (castedChild.type !== SeriesSequence) {
12424
12571
  throw new TypeError(`The <Series /> component only accepts a list of <Series.Sequence /> components as its children, but got ${castedChild} instead`);
12425
12572
  }
12426
- const debugInfo = `index = ${i}, duration = ${castedChild.props.durationInFrames}`;
12427
- const durationInFramesProp = castedChild.props.durationInFrames;
12428
- const {
12429
- durationInFrames,
12430
- children: _children,
12431
- from,
12432
- name,
12433
- ...passedProps
12434
- } = castedChild.props;
12435
- if (i !== flattenedChildren.length - 1 || durationInFramesProp !== Infinity) {
12436
- validateDurationInFrames(durationInFramesProp, {
12437
- component: `of a <Series.Sequence /> component`,
12438
- allowFloats: true
12439
- });
12440
- }
12441
- const offset = castedChild.props.offset ?? 0;
12442
- if (Number.isNaN(offset)) {
12443
- throw new TypeError(`The "offset" property of a <Series.Sequence /> must not be NaN, but got NaN (${debugInfo}).`);
12444
- }
12445
- if (!Number.isFinite(offset)) {
12446
- throw new TypeError(`The "offset" property of a <Series.Sequence /> must be finite, but got ${offset} (${debugInfo}).`);
12447
- }
12448
- if (offset % 1 !== 0) {
12449
- throw new TypeError(`The "offset" property of a <Series.Sequence /> must be finite, but got ${offset} (${debugInfo}).`);
12450
- }
12451
- const currentStartFrame = startFrame + offset;
12452
- startFrame += durationInFramesProp + offset;
12453
- return /* @__PURE__ */ jsx37(SequenceWithoutSchemaWithRef, {
12454
- ref: castedChild.ref,
12455
- name: name || "<Series.Sequence>",
12456
- _remotionInternalDocumentationLink: name ? undefined : "https://www.remotion.dev/docs/series",
12457
- from: currentStartFrame,
12458
- durationInFrames: durationInFramesProp,
12459
- ...passedProps,
12460
- children: child
12573
+ const castedElement = castedChild;
12574
+ validateSeriesSequenceProps({
12575
+ durationInFrames: castedElement.props.durationInFrames,
12576
+ offset: castedElement.props.offset,
12577
+ index: i,
12578
+ childrenLength: flattenedChildren.length
12461
12579
  });
12462
- });
12580
+ return React42.cloneElement(castedElement, {
12581
+ _remotionInternalRender: (resolvedProps, ref) => {
12582
+ const durationInFramesProp = resolvedProps.durationInFrames;
12583
+ const {
12584
+ durationInFrames: _durationInFrames,
12585
+ children: sequenceChildren,
12586
+ offset: offsetProp,
12587
+ controls,
12588
+ stack,
12589
+ from: _from,
12590
+ name,
12591
+ ...passedProps
12592
+ } = resolvedProps;
12593
+ const offset = validateSeriesSequenceProps({
12594
+ durationInFrames: durationInFramesProp,
12595
+ offset: offsetProp,
12596
+ index: i,
12597
+ childrenLength: flattenedChildren.length
12598
+ });
12599
+ const currentStartFrame = startFrame + offset;
12600
+ const nextStartFrame = startFrame + durationInFramesProp + offset;
12601
+ return /* @__PURE__ */ jsxs3(Fragment, {
12602
+ children: [
12603
+ /* @__PURE__ */ jsx37(SequenceWithoutSchemaWithRef, {
12604
+ ref,
12605
+ name: name || "<Series.Sequence>",
12606
+ _remotionInternalDocumentationLink: name ? undefined : "https://www.remotion.dev/docs/series",
12607
+ _remotionInternalStack: stack ?? undefined,
12608
+ controls: controls ?? undefined,
12609
+ from: currentStartFrame,
12610
+ durationInFrames: durationInFramesProp,
12611
+ ...passedProps,
12612
+ children: /* @__PURE__ */ jsx37(IsNotInsideSeriesProvider, {
12613
+ children: sequenceChildren
12614
+ })
12615
+ }),
12616
+ renderChildren(i + 1, nextStartFrame)
12617
+ ]
12618
+ });
12619
+ }
12620
+ });
12621
+ };
12622
+ return renderChildren(0, 0);
12463
12623
  }, [props2.children]);
12464
12624
  return /* @__PURE__ */ jsx37(IsInsideSeriesContainer, {
12465
12625
  children: /* @__PURE__ */ jsx37(Sequence, {
@@ -12575,7 +12735,7 @@ var Still = (props2) => {
12575
12735
  durationInFrames: 1,
12576
12736
  fps: 1
12577
12737
  };
12578
- return React42.createElement(Composition, newProps);
12738
+ return React43.createElement(Composition, newProps);
12579
12739
  };
12580
12740
  addSequenceStackTraces(Still);
12581
12741
  var roundTo6Commas = (num) => {
@@ -13054,11 +13214,12 @@ var Config = new Proxy(proxyObj, {
13054
13214
  });
13055
13215
  Sequence.displayName = "Sequence";
13056
13216
  addSequenceStackTraces(Sequence);
13217
+ setSequenceComponent(Sequence);
13057
13218
  addSequenceStackTraces(Composition);
13058
13219
  addSequenceStackTraces(Folder);
13059
13220
 
13060
13221
  // src/components/team/TeamCards.tsx
13061
- import { jsx as jsx40, jsxs as jsxs3 } from "react/jsx-runtime";
13222
+ import { jsx as jsx40, jsxs as jsxs4 } from "react/jsx-runtime";
13062
13223
  var LinkedInLogo = () => {
13063
13224
  return /* @__PURE__ */ jsx40("svg", {
13064
13225
  xmlns: "http://www.w3.org/2000/svg",
@@ -13113,14 +13274,14 @@ var TeamMemberCard = ({
13113
13274
  github,
13114
13275
  email
13115
13276
  }) => {
13116
- return /* @__PURE__ */ jsxs3("div", {
13277
+ return /* @__PURE__ */ jsxs4("div", {
13117
13278
  className: "flex-1 rounded-[15px] flex flex-col md:flex-row gap-2 md:gap-4",
13118
13279
  children: [
13119
13280
  /* @__PURE__ */ jsx40("img", {
13120
13281
  src: image,
13121
13282
  className: "w-[250px] h-[250px] rounded-xl border-effect"
13122
13283
  }),
13123
- /* @__PURE__ */ jsxs3("div", {
13284
+ /* @__PURE__ */ jsxs4("div", {
13124
13285
  className: "flex flex-col border-effect px-4 py-3 bg-pane",
13125
13286
  children: [
13126
13287
  /* @__PURE__ */ jsx40("h2", {
@@ -13138,7 +13299,7 @@ var TeamMemberCard = ({
13138
13299
  /* @__PURE__ */ jsx40("div", {
13139
13300
  className: "flex-1"
13140
13301
  }),
13141
- /* @__PURE__ */ jsxs3("div", {
13302
+ /* @__PURE__ */ jsxs4("div", {
13142
13303
  className: "gap-3 flex flex-row",
13143
13304
  children: [
13144
13305
  /* @__PURE__ */ jsx40("a", {
@@ -13173,7 +13334,7 @@ var TeamMemberCard = ({
13173
13334
  });
13174
13335
  };
13175
13336
  var TeamCardsLayout = () => {
13176
- return /* @__PURE__ */ jsxs3("div", {
13337
+ return /* @__PURE__ */ jsxs4("div", {
13177
13338
  className: "flex flex-col gap-12 md:gap-4",
13178
13339
  children: [
13179
13340
  /* @__PURE__ */ jsx40(TeamMemberCard, {
@@ -13241,7 +13402,7 @@ var PersonalWebsite = () => {
13241
13402
  };
13242
13403
 
13243
13404
  // src/components/experts/ExpertsPage.tsx
13244
- import { jsx as jsx43, jsxs as jsxs4, Fragment } from "react/jsx-runtime";
13405
+ import { jsx as jsx43, jsxs as jsxs6, Fragment as Fragment2 } from "react/jsx-runtime";
13245
13406
  var arrowIcon = {
13246
13407
  height: 16,
13247
13408
  marginLeft: 10
@@ -13272,7 +13433,7 @@ var wrapperStyle = {
13272
13433
  paddingBottom: 100
13273
13434
  };
13274
13435
  var ExpertCard = ({ expert, Link }) => {
13275
- return /* @__PURE__ */ jsxs4("div", {
13436
+ return /* @__PURE__ */ jsxs6("div", {
13276
13437
  className: "flex-1 rounded-[15px] flex flex-col md:flex-row gap-2 md:gap-4",
13277
13438
  children: [
13278
13439
  /* @__PURE__ */ jsx43(Link, {
@@ -13284,7 +13445,7 @@ var ExpertCard = ({ expert, Link }) => {
13284
13445
  className: "w-[250px] h-[250px] rounded-xl border-effect object-cover"
13285
13446
  })
13286
13447
  }),
13287
- /* @__PURE__ */ jsxs4("div", {
13448
+ /* @__PURE__ */ jsxs6("div", {
13288
13449
  className: "flex flex-col border-effect px-4 py-3 bg-pane flex-1",
13289
13450
  children: [
13290
13451
  /* @__PURE__ */ jsx43(Link, {
@@ -13299,10 +13460,10 @@ var ExpertCard = ({ expert, Link }) => {
13299
13460
  className: "mt-2 mb-3 leading-normal font-brand",
13300
13461
  children: expert.description
13301
13462
  }),
13302
- /* @__PURE__ */ jsxs4("div", {
13463
+ /* @__PURE__ */ jsxs6("div", {
13303
13464
  className: "leading-6 mb-4",
13304
13465
  children: [
13305
- /* @__PURE__ */ jsxs4(Link, {
13466
+ /* @__PURE__ */ jsxs6(Link, {
13306
13467
  className: "no-underline text-brand font-brand font-bold inline-flex flex-row items-center",
13307
13468
  href: `/experts/${expert.slug}`,
13308
13469
  children: [
@@ -13319,10 +13480,10 @@ var ExpertCard = ({ expert, Link }) => {
13319
13480
  })
13320
13481
  ]
13321
13482
  }),
13322
- expert.videocall ? /* @__PURE__ */ jsxs4(Fragment, {
13483
+ expert.videocall ? /* @__PURE__ */ jsxs6(Fragment2, {
13323
13484
  children: [
13324
13485
  /* @__PURE__ */ jsx43("br", {}),
13325
- /* @__PURE__ */ jsxs4("a", {
13486
+ /* @__PURE__ */ jsxs6("a", {
13326
13487
  className: "no-underline text-brand font-brand font-bold inline-flex flex-row items-center",
13327
13488
  target: "_blank",
13328
13489
  href: expert.videocall,
@@ -13347,7 +13508,7 @@ var ExpertCard = ({ expert, Link }) => {
13347
13508
  /* @__PURE__ */ jsx43("div", {
13348
13509
  className: "flex-1"
13349
13510
  }),
13350
- /* @__PURE__ */ jsxs4("div", {
13511
+ /* @__PURE__ */ jsxs6("div", {
13351
13512
  className: "gap-3 flex flex-row flex-wrap",
13352
13513
  children: [
13353
13514
  expert.website ? /* @__PURE__ */ jsx43("a", {
@@ -13403,14 +13564,14 @@ var ExpertsPageContent = ({ Link }) => {
13403
13564
  }, []);
13404
13565
  return /* @__PURE__ */ jsx43("div", {
13405
13566
  className: "relative bg-[var(--background)]",
13406
- children: /* @__PURE__ */ jsxs4("div", {
13567
+ children: /* @__PURE__ */ jsxs6("div", {
13407
13568
  style: wrapperStyle,
13408
13569
  children: [
13409
13570
  /* @__PURE__ */ jsx43("h1", {
13410
13571
  className: "experts-pagetitle",
13411
13572
  children: "Find a Remotion Expert"
13412
13573
  }),
13413
- /* @__PURE__ */ jsxs4("p", {
13574
+ /* @__PURE__ */ jsxs6("p", {
13414
13575
  className: "experts-tagline",
13415
13576
  children: [
13416
13577
  "Get help by booking a call or hiring these freelancers to work on your Remotion project.",
@@ -13428,16 +13589,16 @@ var ExpertsPageContent = ({ Link }) => {
13428
13589
  })
13429
13590
  })
13430
13591
  }),
13431
- /* @__PURE__ */ jsxs4("div", {
13592
+ /* @__PURE__ */ jsxs6("div", {
13432
13593
  style: infoCard,
13433
13594
  children: [
13434
- /* @__PURE__ */ jsxs4("svg", {
13595
+ /* @__PURE__ */ jsxs6("svg", {
13435
13596
  viewBox: "0 0 661 512",
13436
13597
  fill: "none",
13437
13598
  xmlns: "http://www.w3.org/2000/svg",
13438
13599
  style: cardIcon,
13439
13600
  children: [
13440
- /* @__PURE__ */ jsxs4("g", {
13601
+ /* @__PURE__ */ jsxs6("g", {
13441
13602
  clipPath: "url(#clip0_1_2)",
13442
13603
  children: [
13443
13604
  /* @__PURE__ */ jsx43("path", {
@@ -13462,7 +13623,7 @@ var ExpertsPageContent = ({ Link }) => {
13462
13623
  })
13463
13624
  ]
13464
13625
  }),
13465
- /* @__PURE__ */ jsxs4("div", {
13626
+ /* @__PURE__ */ jsxs6("div", {
13466
13627
  style: { flex: 1 },
13467
13628
  children: [
13468
13629
  "Remotion Experts are independent freelancers with proven Remotion expertise and portfolios. However,",
@@ -13496,7 +13657,7 @@ var ExpertsPageContent = ({ Link }) => {
13496
13657
  import { useMemo as useMemo53 } from "react";
13497
13658
 
13498
13659
  // ../design/dist/esm/index.mjs
13499
- import * as React23 from "react";
13660
+ import * as React24 from "react";
13500
13661
  import * as React8 from "react";
13501
13662
  import { Fragment as Fragment22, jsx as jsx46 } from "react/jsx-runtime";
13502
13663
  import React52, { useCallback as useCallback27, useRef as useRef210, useState as useState22 } from "react";
@@ -14841,7 +15002,7 @@ var getDefaultConfig = () => {
14841
15002
  var twMerge = /* @__PURE__ */ createTailwindMerge(getDefaultConfig);
14842
15003
 
14843
15004
  // ../design/dist/esm/index.mjs
14844
- import React32, { useEffect as useEffect21, useMemo as useMemo43, useState as useState23 } from "react";
15005
+ import React33, { useEffect as useEffect21, useMemo as useMemo43, useState as useState23 } from "react";
14845
15006
 
14846
15007
  // ../paths/dist/esm/index.mjs
14847
15008
  var cutLInstruction = ({
@@ -17609,7 +17770,7 @@ var PathInternals = {
17609
17770
  // ../shapes/dist/esm/index.mjs
17610
17771
  import React3, { useCallback as useCallback26, useMemo as useMemo42, useRef as useRef29 } from "react";
17611
17772
  import { version } from "react-dom";
17612
- import { jsx as jsx44, jsxs as jsxs5 } from "react/jsx-runtime";
17773
+ import { jsx as jsx44, jsxs as jsxs7 } from "react/jsx-runtime";
17613
17774
  import { jsx as jsx210 } from "react/jsx-runtime";
17614
17775
  import { jsx as jsx310 } from "react/jsx-runtime";
17615
17776
  import { jsx as jsx45 } from "react/jsx-runtime";
@@ -17811,7 +17972,7 @@ var RenderSvg = ({
17811
17972
  const memoizedEffectDefinitions = Internals.useMemoizedEffectDefinitions(effects);
17812
17973
  const videoConfig = Internals.useUnsafeVideoConfig();
17813
17974
  const reactSupportsTransformOrigin = doesReactSupportTransformOriginProperty(version);
17814
- const svg = /* @__PURE__ */ jsxs5("svg", {
17975
+ const svg = /* @__PURE__ */ jsxs7("svg", {
17815
17976
  ref: effects.length === 0 || !videoConfig ? setSvgRef : undefined,
17816
17977
  width,
17817
17978
  height,
@@ -17837,7 +17998,7 @@ var RenderSvg = ({
17837
17998
  }
17838
17999
  const prevX = prevInstruction.x;
17839
18000
  const prevY = prevInstruction.y;
17840
- return /* @__PURE__ */ jsxs5(React3.Fragment, {
18001
+ return /* @__PURE__ */ jsxs7(React3.Fragment, {
17841
18002
  children: [
17842
18003
  /* @__PURE__ */ jsx44("path", {
17843
18004
  d: `M ${prevX} ${prevY} ${i.cp1x} ${i.cp1y}`,
@@ -20518,8 +20679,8 @@ var extrudeAndTransformElement = (options) => {
20518
20679
  };
20519
20680
 
20520
20681
  // ../design/dist/esm/index.mjs
20521
- import { jsx as jsx212, Fragment as Fragment3 } from "react/jsx-runtime";
20522
- import { jsx as jsx312, jsxs as jsxs6 } from "react/jsx-runtime";
20682
+ import { jsx as jsx212, Fragment as Fragment32 } from "react/jsx-runtime";
20683
+ import { jsx as jsx312, jsxs as jsxs8 } from "react/jsx-runtime";
20523
20684
  import { useEffect as useEffect22, useMemo as useMemo210, useRef as useRef31 } from "react";
20524
20685
  import { jsx as jsx47 } from "react/jsx-runtime";
20525
20686
  import { jsx as jsx53, jsxs as jsxs23 } from "react/jsx-runtime";
@@ -20532,12 +20693,12 @@ import React72 from "react";
20532
20693
  import { jsx as jsx103 } from "react/jsx-runtime";
20533
20694
  import { jsx as jsx113 } from "react/jsx-runtime";
20534
20695
  import { jsx as jsx123 } from "react/jsx-runtime";
20535
- import * as React36 from "react";
20696
+ import * as React362 from "react";
20536
20697
  import * as ReactDOM4 from "react-dom";
20537
- import React112 from "react";
20698
+ import React11 from "react";
20538
20699
  import * as React82 from "react";
20539
20700
  import { jsx as jsx132 } from "react/jsx-runtime";
20540
- import * as React9 from "react";
20701
+ import * as React92 from "react";
20541
20702
  import * as React10 from "react";
20542
20703
  import { Fragment as Fragment5, jsx as jsx142 } from "react/jsx-runtime";
20543
20704
  import { jsx as jsx152 } from "react/jsx-runtime";
@@ -20547,15 +20708,15 @@ import * as React162 from "react";
20547
20708
  import * as React132 from "react";
20548
20709
  import * as ReactDOM from "react-dom";
20549
20710
  import { jsx as jsx172 } from "react/jsx-runtime";
20550
- import * as React14 from "react";
20551
- import * as React152 from "react";
20711
+ import * as React142 from "react";
20712
+ import * as React15 from "react";
20552
20713
  import { jsx as jsx182 } from "react/jsx-runtime";
20553
- import * as React17 from "react";
20714
+ import * as React172 from "react";
20554
20715
  import * as React18 from "react";
20555
20716
  import { jsx as jsx192 } from "react/jsx-runtime";
20556
20717
  import * as React202 from "react";
20557
- import * as React192 from "react";
20558
- import * as React24 from "react";
20718
+ import * as React19 from "react";
20719
+ import * as React242 from "react";
20559
20720
  import * as React212 from "react";
20560
20721
  import { useLayoutEffect as useLayoutEffect32, useEffect as useEffect82 } from "react";
20561
20722
  import * as ReactDOM2 from "react-dom";
@@ -20573,7 +20734,7 @@ import { jsx as jsx232 } from "react/jsx-runtime";
20573
20734
  import * as React352 from "react";
20574
20735
  import * as React312 from "react";
20575
20736
  import { useState as useState112 } from "react";
20576
- import * as React292 from "react";
20737
+ import * as React29 from "react";
20577
20738
  import * as React302 from "react";
20578
20739
  import * as React342 from "react";
20579
20740
  import * as React332 from "react";
@@ -20581,22 +20742,22 @@ import * as React322 from "react";
20581
20742
  import { Fragment as Fragment8, jsx as jsx242, jsxs as jsxs42 } from "react/jsx-runtime";
20582
20743
  import { forwardRef as forwardRef142, createElement as createElement7 } from "react";
20583
20744
  import { forwardRef as forwardRef132, createElement as createElement6 } from "react";
20584
- import * as React372 from "react";
20585
- import { jsx as jsx252, jsxs as jsxs52 } from "react/jsx-runtime";
20745
+ import * as React37 from "react";
20746
+ import { jsx as jsx252, jsxs as jsxs5 } from "react/jsx-runtime";
20586
20747
  import { jsx as jsx262 } from "react/jsx-runtime";
20587
20748
  import * as React49 from "react";
20588
- import * as React38 from "react";
20749
+ import * as React382 from "react";
20589
20750
  import { jsx as jsx272 } from "react/jsx-runtime";
20590
20751
  import * as React47 from "react";
20591
20752
  import React402 from "react";
20592
- import * as React392 from "react";
20753
+ import * as React39 from "react";
20593
20754
  import { Fragment as Fragment222, jsx as jsx282 } from "react/jsx-runtime";
20594
20755
  import { jsx as jsx292 } from "react/jsx-runtime";
20595
20756
  import React210 from "react";
20596
20757
  import { jsx as jsx2102 } from "react/jsx-runtime";
20597
20758
  import * as React422 from "react";
20598
- import * as React41 from "react";
20599
- import * as React43 from "react";
20759
+ import * as React412 from "react";
20760
+ import * as React432 from "react";
20600
20761
  import * as ReactDOM5 from "react-dom";
20601
20762
  import { jsx as jsx302 } from "react/jsx-runtime";
20602
20763
  import * as React44 from "react";
@@ -20648,7 +20809,7 @@ function useComposedRefs(...refs) {
20648
20809
  return React8.useCallback(composeRefs(...refs), refs);
20649
20810
  }
20650
20811
  var REACT_LAZY_TYPE = Symbol.for("react.lazy");
20651
- var use = React23[" use ".trim().toString()];
20812
+ var use = React24[" use ".trim().toString()];
20652
20813
  function isPromiseLike(value) {
20653
20814
  return typeof value === "object" && value !== null && "then" in value;
20654
20815
  }
@@ -20657,25 +20818,25 @@ function isLazyComponent(element) {
20657
20818
  }
20658
20819
  function createSlot(ownerName) {
20659
20820
  const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);
20660
- const Slot2 = React23.forwardRef((props, forwardedRef) => {
20821
+ const Slot2 = React24.forwardRef((props, forwardedRef) => {
20661
20822
  let { children, ...slotProps } = props;
20662
20823
  if (isLazyComponent(children) && typeof use === "function") {
20663
20824
  children = use(children._payload);
20664
20825
  }
20665
- const childrenArray = React23.Children.toArray(children);
20826
+ const childrenArray = React24.Children.toArray(children);
20666
20827
  const slottable = childrenArray.find(isSlottable);
20667
20828
  if (slottable) {
20668
20829
  const newElement = slottable.props.children;
20669
20830
  const newChildren = childrenArray.map((child) => {
20670
20831
  if (child === slottable) {
20671
- if (React23.Children.count(newElement) > 1)
20672
- return React23.Children.only(null);
20673
- return React23.isValidElement(newElement) ? newElement.props.children : null;
20832
+ if (React24.Children.count(newElement) > 1)
20833
+ return React24.Children.only(null);
20834
+ return React24.isValidElement(newElement) ? newElement.props.children : null;
20674
20835
  } else {
20675
20836
  return child;
20676
20837
  }
20677
20838
  });
20678
- return /* @__PURE__ */ jsx46(SlotClone, { ...slotProps, ref: forwardedRef, children: React23.isValidElement(newElement) ? React23.cloneElement(newElement, undefined, newChildren) : null });
20839
+ return /* @__PURE__ */ jsx46(SlotClone, { ...slotProps, ref: forwardedRef, children: React24.isValidElement(newElement) ? React24.cloneElement(newElement, undefined, newChildren) : null });
20679
20840
  }
20680
20841
  return /* @__PURE__ */ jsx46(SlotClone, { ...slotProps, ref: forwardedRef, children });
20681
20842
  });
@@ -20684,20 +20845,20 @@ function createSlot(ownerName) {
20684
20845
  }
20685
20846
  var Slot = /* @__PURE__ */ createSlot("Slot");
20686
20847
  function createSlotClone(ownerName) {
20687
- const SlotClone = React23.forwardRef((props, forwardedRef) => {
20848
+ const SlotClone = React24.forwardRef((props, forwardedRef) => {
20688
20849
  let { children, ...slotProps } = props;
20689
20850
  if (isLazyComponent(children) && typeof use === "function") {
20690
20851
  children = use(children._payload);
20691
20852
  }
20692
- if (React23.isValidElement(children)) {
20853
+ if (React24.isValidElement(children)) {
20693
20854
  const childrenRef = getElementRef(children);
20694
20855
  const props2 = mergeProps(slotProps, children.props);
20695
- if (children.type !== React23.Fragment) {
20856
+ if (children.type !== React24.Fragment) {
20696
20857
  props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;
20697
20858
  }
20698
- return React23.cloneElement(children, props2);
20859
+ return React24.cloneElement(children, props2);
20699
20860
  }
20700
- return React23.Children.count(children) > 1 ? React23.Children.only(null) : null;
20861
+ return React24.Children.count(children) > 1 ? React24.Children.only(null) : null;
20701
20862
  });
20702
20863
  SlotClone.displayName = `${ownerName}.SlotClone`;
20703
20864
  return SlotClone;
@@ -20713,7 +20874,7 @@ function createSlottable(ownerName) {
20713
20874
  }
20714
20875
  var Slottable = /* @__PURE__ */ createSlottable("Slottable");
20715
20876
  function isSlottable(child) {
20716
- return React23.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;
20877
+ return React24.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;
20717
20878
  }
20718
20879
  function mergeProps(slotProps, childProps) {
20719
20880
  const overrideProps = { ...childProps };
@@ -20770,7 +20931,7 @@ var getChildNodeFrom = (htmlElement) => {
20770
20931
  return childNode;
20771
20932
  };
20772
20933
  var useHoverTransforms = (ref, disabled) => {
20773
- const [state, setState] = React32.useState({
20934
+ const [state, setState] = React33.useState({
20774
20935
  progress: 0,
20775
20936
  isActive: false
20776
20937
  });
@@ -20782,7 +20943,7 @@ var useHoverTransforms = (ref, disabled) => {
20782
20943
  eventTarget.dispatchEvent(new Event("enabled"));
20783
20944
  }
20784
20945
  }, [disabled, eventTarget]);
20785
- React32.useEffect(() => {
20946
+ React33.useEffect(() => {
20786
20947
  const element = ref.current;
20787
20948
  if (!element)
20788
20949
  return;
@@ -20857,8 +21018,8 @@ var useHoverTransforms = (ref, disabled) => {
20857
21018
  return state;
20858
21019
  };
20859
21020
  var useClickTransforms = (ref) => {
20860
- const [hoverProgress, setHoverProgress] = React32.useState(0);
20861
- React32.useEffect(() => {
21021
+ const [hoverProgress, setHoverProgress] = React33.useState(0);
21022
+ React33.useEffect(() => {
20862
21023
  const element = getChildNodeFrom(ref.current);
20863
21024
  if (!element) {
20864
21025
  return;
@@ -20943,7 +21104,7 @@ var useMousePosition = (ref) => {
20943
21104
  return angle;
20944
21105
  };
20945
21106
  var Faces = ({ elements, ...svgProps }) => {
20946
- return /* @__PURE__ */ jsx212(Fragment3, {
21107
+ return /* @__PURE__ */ jsx212(Fragment32, {
20947
21108
  children: elements.map(({ points, color, crispEdges }, idx) => {
20948
21109
  return /* @__PURE__ */ jsx212("path", {
20949
21110
  d: threeDIntoSvgPath(points),
@@ -21002,7 +21163,7 @@ var Outer = ({
21002
21163
  description: "rect",
21003
21164
  transformations: centerOriented
21004
21165
  });
21005
- return /* @__PURE__ */ jsxs6("div", {
21166
+ return /* @__PURE__ */ jsxs8("div", {
21006
21167
  className: "relative",
21007
21168
  style: { width, height },
21008
21169
  children: [
@@ -21434,7 +21595,7 @@ function composeRefs2(...refs) {
21434
21595
  return (node) => refs.forEach((ref) => setRef22(ref, node));
21435
21596
  }
21436
21597
  function useComposedRefs2(...refs) {
21437
- return React9.useCallback(composeRefs2(...refs), refs);
21598
+ return React92.useCallback(composeRefs2(...refs), refs);
21438
21599
  }
21439
21600
  var Slot2 = React10.forwardRef((props, forwardedRef) => {
21440
21601
  const { children, ...slotProps } = props;
@@ -21516,13 +21677,13 @@ function createCollection(name) {
21516
21677
  const [CollectionProviderImpl, useCollectionContext] = createCollectionContext(PROVIDER_NAME, { collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map });
21517
21678
  const CollectionProvider = (props) => {
21518
21679
  const { scope, children } = props;
21519
- const ref = React112.useRef(null);
21520
- const itemMap = React112.useRef(/* @__PURE__ */ new Map).current;
21680
+ const ref = React11.useRef(null);
21681
+ const itemMap = React11.useRef(/* @__PURE__ */ new Map).current;
21521
21682
  return /* @__PURE__ */ jsx152(CollectionProviderImpl, { scope, itemMap, collectionRef: ref, children });
21522
21683
  };
21523
21684
  CollectionProvider.displayName = PROVIDER_NAME;
21524
21685
  const COLLECTION_SLOT_NAME = name + "CollectionSlot";
21525
- const CollectionSlot = React112.forwardRef((props, forwardedRef) => {
21686
+ const CollectionSlot = React11.forwardRef((props, forwardedRef) => {
21526
21687
  const { scope, children } = props;
21527
21688
  const context = useCollectionContext(COLLECTION_SLOT_NAME, scope);
21528
21689
  const composedRefs = useComposedRefs2(forwardedRef, context.collectionRef);
@@ -21531,12 +21692,12 @@ function createCollection(name) {
21531
21692
  CollectionSlot.displayName = COLLECTION_SLOT_NAME;
21532
21693
  const ITEM_SLOT_NAME = name + "CollectionItemSlot";
21533
21694
  const ITEM_DATA_ATTR = "data-radix-collection-item";
21534
- const CollectionItemSlot = React112.forwardRef((props, forwardedRef) => {
21695
+ const CollectionItemSlot = React11.forwardRef((props, forwardedRef) => {
21535
21696
  const { scope, children, ...itemData } = props;
21536
- const ref = React112.useRef(null);
21697
+ const ref = React11.useRef(null);
21537
21698
  const composedRefs = useComposedRefs2(forwardedRef, ref);
21538
21699
  const context = useCollectionContext(ITEM_SLOT_NAME, scope);
21539
- React112.useEffect(() => {
21700
+ React11.useEffect(() => {
21540
21701
  context.itemMap.set(ref, { ref, ...itemData });
21541
21702
  return () => void context.itemMap.delete(ref);
21542
21703
  });
@@ -21545,7 +21706,7 @@ function createCollection(name) {
21545
21706
  CollectionItemSlot.displayName = ITEM_SLOT_NAME;
21546
21707
  function useCollection(scope) {
21547
21708
  const context = useCollectionContext(name + "CollectionConsumer", scope);
21548
- const getItems = React112.useCallback(() => {
21709
+ const getItems = React11.useCallback(() => {
21549
21710
  const collectionNode = context.collectionRef.current;
21550
21711
  if (!collectionNode)
21551
21712
  return [];
@@ -21602,15 +21763,15 @@ function dispatchDiscreteCustomEvent(target, event) {
21602
21763
  ReactDOM.flushSync(() => target.dispatchEvent(event));
21603
21764
  }
21604
21765
  function useCallbackRef(callback) {
21605
- const callbackRef = React14.useRef(callback);
21606
- React14.useEffect(() => {
21766
+ const callbackRef = React142.useRef(callback);
21767
+ React142.useEffect(() => {
21607
21768
  callbackRef.current = callback;
21608
21769
  });
21609
- return React14.useMemo(() => (...args) => callbackRef.current?.(...args), []);
21770
+ return React142.useMemo(() => (...args) => callbackRef.current?.(...args), []);
21610
21771
  }
21611
21772
  function useEscapeKeydown(onEscapeKeyDownProp, ownerDocument = globalThis?.document) {
21612
21773
  const onEscapeKeyDown = useCallbackRef(onEscapeKeyDownProp);
21613
- React152.useEffect(() => {
21774
+ React15.useEffect(() => {
21614
21775
  const handleKeyDown = (event) => {
21615
21776
  if (event.key === "Escape") {
21616
21777
  onEscapeKeyDown(event);
@@ -21817,7 +21978,7 @@ function handleAndDispatchCustomEvent(name, handler, detail, { discrete }) {
21817
21978
  }
21818
21979
  var count = 0;
21819
21980
  function useFocusGuards() {
21820
- React17.useEffect(() => {
21981
+ React172.useEffect(() => {
21821
21982
  const edgeGuards = document.querySelectorAll("[data-radix-focus-guard]");
21822
21983
  document.body.insertAdjacentElement("afterbegin", edgeGuards[0] ?? createFocusGuard());
21823
21984
  document.body.insertAdjacentElement("beforeend", edgeGuards[1] ?? createFocusGuard());
@@ -22052,7 +22213,7 @@ function arrayRemove(array, item) {
22052
22213
  function removeLinks(items) {
22053
22214
  return items.filter((item) => item.tagName !== "A");
22054
22215
  }
22055
- var useLayoutEffect22 = Boolean(globalThis?.document) ? React192.useLayoutEffect : () => {};
22216
+ var useLayoutEffect22 = Boolean(globalThis?.document) ? React19.useLayoutEffect : () => {};
22056
22217
  var useReactId = React202["useId".toString()] || (() => {
22057
22218
  return;
22058
22219
  });
@@ -23904,17 +24065,17 @@ var [createPopperContext, createPopperScope] = createContextScope(POPPER_NAME);
23904
24065
  var [PopperProvider, usePopperContext] = createPopperContext(POPPER_NAME);
23905
24066
  var Popper = (props) => {
23906
24067
  const { __scopePopper, children } = props;
23907
- const [anchor, setAnchor] = React24.useState(null);
24068
+ const [anchor, setAnchor] = React242.useState(null);
23908
24069
  return /* @__PURE__ */ jsx213(PopperProvider, { scope: __scopePopper, anchor, onAnchorChange: setAnchor, children });
23909
24070
  };
23910
24071
  Popper.displayName = POPPER_NAME;
23911
24072
  var ANCHOR_NAME = "PopperAnchor";
23912
- var PopperAnchor = React24.forwardRef((props, forwardedRef) => {
24073
+ var PopperAnchor = React242.forwardRef((props, forwardedRef) => {
23913
24074
  const { __scopePopper, virtualRef, ...anchorProps } = props;
23914
24075
  const context = usePopperContext(ANCHOR_NAME, __scopePopper);
23915
- const ref = React24.useRef(null);
24076
+ const ref = React242.useRef(null);
23916
24077
  const composedRefs = useComposedRefs2(forwardedRef, ref);
23917
- React24.useEffect(() => {
24078
+ React242.useEffect(() => {
23918
24079
  context.onAnchorChange(virtualRef?.current || ref.current);
23919
24080
  });
23920
24081
  return virtualRef ? null : /* @__PURE__ */ jsx213(Primitive.div, { ...anchorProps, ref: composedRefs });
@@ -23922,7 +24083,7 @@ var PopperAnchor = React24.forwardRef((props, forwardedRef) => {
23922
24083
  PopperAnchor.displayName = ANCHOR_NAME;
23923
24084
  var CONTENT_NAME = "PopperContent";
23924
24085
  var [PopperContentProvider, useContentContext] = createPopperContext(CONTENT_NAME);
23925
- var PopperContent = React24.forwardRef((props, forwardedRef) => {
24086
+ var PopperContent = React242.forwardRef((props, forwardedRef) => {
23926
24087
  const {
23927
24088
  __scopePopper,
23928
24089
  side = "bottom",
@@ -23940,9 +24101,9 @@ var PopperContent = React24.forwardRef((props, forwardedRef) => {
23940
24101
  ...contentProps
23941
24102
  } = props;
23942
24103
  const context = usePopperContext(CONTENT_NAME, __scopePopper);
23943
- const [content, setContent] = React24.useState(null);
24104
+ const [content, setContent] = React242.useState(null);
23944
24105
  const composedRefs = useComposedRefs2(forwardedRef, (node) => setContent(node));
23945
- const [arrow4, setArrow] = React24.useState(null);
24106
+ const [arrow4, setArrow] = React242.useState(null);
23946
24107
  const arrowSize = useSize(arrow4);
23947
24108
  const arrowWidth = arrowSize?.width ?? 0;
23948
24109
  const arrowHeight = arrowSize?.height ?? 0;
@@ -24002,7 +24163,7 @@ var PopperContent = React24.forwardRef((props, forwardedRef) => {
24002
24163
  const arrowX = middlewareData.arrow?.x;
24003
24164
  const arrowY = middlewareData.arrow?.y;
24004
24165
  const cannotCenterArrow = middlewareData.arrow?.centerOffset !== 0;
24005
- const [contentZIndex, setContentZIndex] = React24.useState();
24166
+ const [contentZIndex, setContentZIndex] = React242.useState();
24006
24167
  useLayoutEffect22(() => {
24007
24168
  if (content)
24008
24169
  setContentZIndex(window.getComputedStyle(content).zIndex);
@@ -24053,7 +24214,7 @@ var OPPOSITE_SIDE = {
24053
24214
  bottom: "top",
24054
24215
  left: "right"
24055
24216
  };
24056
- var PopperArrow = React24.forwardRef(function PopperArrow2(props, forwardedRef) {
24217
+ var PopperArrow = React242.forwardRef(function PopperArrow2(props, forwardedRef) {
24057
24218
  const { __scopePopper, ...arrowProps } = props;
24058
24219
  const contentContext = useContentContext(ARROW_NAME, __scopePopper);
24059
24220
  const baseSide = OPPOSITE_SIDE[contentContext.placedSide];
@@ -24396,7 +24557,7 @@ function useCallbackRef2(initialValue, callback) {
24396
24557
  ref.callback = callback;
24397
24558
  return ref.facade;
24398
24559
  }
24399
- var useIsomorphicLayoutEffect = typeof window !== "undefined" ? React292.useLayoutEffect : React292.useEffect;
24560
+ var useIsomorphicLayoutEffect = typeof window !== "undefined" ? React29.useLayoutEffect : React29.useEffect;
24400
24561
  var currentValues = new WeakMap;
24401
24562
  function useMergeRefs(refs, defaultValue) {
24402
24563
  var callbackRef = useCallbackRef2(defaultValue || null, function(newValue) {
@@ -25032,9 +25193,9 @@ var Select = (props) => {
25032
25193
  required
25033
25194
  } = props;
25034
25195
  const popperScope = usePopperScope(__scopeSelect);
25035
- const [trigger, setTrigger] = React36.useState(null);
25036
- const [valueNode, setValueNode] = React36.useState(null);
25037
- const [valueNodeHasChildren, setValueNodeHasChildren] = React36.useState(false);
25196
+ const [trigger, setTrigger] = React362.useState(null);
25197
+ const [valueNode, setValueNode] = React362.useState(null);
25198
+ const [valueNodeHasChildren, setValueNodeHasChildren] = React362.useState(false);
25038
25199
  const direction = useDirection(dir);
25039
25200
  const [open = false, setOpen] = useControllableState({
25040
25201
  prop: openProp,
@@ -25046,9 +25207,9 @@ var Select = (props) => {
25046
25207
  defaultProp: defaultValue,
25047
25208
  onChange: onValueChange
25048
25209
  });
25049
- const triggerPointerDownPosRef = React36.useRef(null);
25210
+ const triggerPointerDownPosRef = React362.useRef(null);
25050
25211
  const isFormControl = trigger ? Boolean(trigger.closest("form")) : true;
25051
- const [nativeOptionsSet, setNativeOptionsSet] = React36.useState(/* @__PURE__ */ new Set);
25212
+ const [nativeOptionsSet, setNativeOptionsSet] = React362.useState(/* @__PURE__ */ new Set);
25052
25213
  const nativeSelectKey = Array.from(nativeOptionsSet).map((option) => option.props.value).join(";");
25053
25214
  return /* @__PURE__ */ jsx242(Root22, { ...popperScope, children: /* @__PURE__ */ jsxs42(SelectProvider, {
25054
25215
  required,
@@ -25070,10 +25231,10 @@ var Select = (props) => {
25070
25231
  children: [
25071
25232
  /* @__PURE__ */ jsx242(Collection.Provider, { scope: __scopeSelect, children: /* @__PURE__ */ jsx242(SelectNativeOptionsProvider, {
25072
25233
  scope: props.__scopeSelect,
25073
- onNativeOptionAdd: React36.useCallback((option) => {
25234
+ onNativeOptionAdd: React362.useCallback((option) => {
25074
25235
  setNativeOptionsSet((prev) => new Set(prev).add(option));
25075
25236
  }, []),
25076
- onNativeOptionRemove: React36.useCallback((option) => {
25237
+ onNativeOptionRemove: React362.useCallback((option) => {
25077
25238
  setNativeOptionsSet((prev) => {
25078
25239
  const optionsSet = new Set(prev);
25079
25240
  optionsSet.delete(option);
@@ -25101,7 +25262,7 @@ var Select = (props) => {
25101
25262
  };
25102
25263
  Select.displayName = SELECT_NAME;
25103
25264
  var TRIGGER_NAME = "SelectTrigger";
25104
- var SelectTrigger = React36.forwardRef((props, forwardedRef) => {
25265
+ var SelectTrigger = React362.forwardRef((props, forwardedRef) => {
25105
25266
  const { __scopeSelect, disabled = false, ...triggerProps } = props;
25106
25267
  const popperScope = usePopperScope(__scopeSelect);
25107
25268
  const context = useSelectContext(TRIGGER_NAME, __scopeSelect);
@@ -25169,7 +25330,7 @@ var SelectTrigger = React36.forwardRef((props, forwardedRef) => {
25169
25330
  });
25170
25331
  SelectTrigger.displayName = TRIGGER_NAME;
25171
25332
  var VALUE_NAME = "SelectValue";
25172
- var SelectValue = React36.forwardRef((props, forwardedRef) => {
25333
+ var SelectValue = React362.forwardRef((props, forwardedRef) => {
25173
25334
  const { __scopeSelect, className, style, children, placeholder = "", ...valueProps } = props;
25174
25335
  const context = useSelectContext(VALUE_NAME, __scopeSelect);
25175
25336
  const { onValueNodeHasChildrenChange } = context;
@@ -25187,7 +25348,7 @@ var SelectValue = React36.forwardRef((props, forwardedRef) => {
25187
25348
  });
25188
25349
  SelectValue.displayName = VALUE_NAME;
25189
25350
  var ICON_NAME = "SelectIcon";
25190
- var SelectIcon = React36.forwardRef((props, forwardedRef) => {
25351
+ var SelectIcon = React362.forwardRef((props, forwardedRef) => {
25191
25352
  const { __scopeSelect, children, ...iconProps } = props;
25192
25353
  return /* @__PURE__ */ jsx242(Primitive.span, { "aria-hidden": true, ...iconProps, ref: forwardedRef, children: children || "▼" });
25193
25354
  });
@@ -25198,9 +25359,9 @@ var SelectPortal = (props) => {
25198
25359
  };
25199
25360
  SelectPortal.displayName = PORTAL_NAME2;
25200
25361
  var CONTENT_NAME2 = "SelectContent";
25201
- var SelectContent = React36.forwardRef((props, forwardedRef) => {
25362
+ var SelectContent = React362.forwardRef((props, forwardedRef) => {
25202
25363
  const context = useSelectContext(CONTENT_NAME2, props.__scopeSelect);
25203
- const [fragment, setFragment] = React36.useState();
25364
+ const [fragment, setFragment] = React362.useState();
25204
25365
  useLayoutEffect22(() => {
25205
25366
  setFragment(new DocumentFragment);
25206
25367
  }, []);
@@ -25214,7 +25375,7 @@ SelectContent.displayName = CONTENT_NAME2;
25214
25375
  var CONTENT_MARGIN = 10;
25215
25376
  var [SelectContentProvider, useSelectContentContext] = createSelectContext(CONTENT_NAME2);
25216
25377
  var CONTENT_IMPL_NAME = "SelectContentImpl";
25217
- var SelectContentImpl = React36.forwardRef((props, forwardedRef) => {
25378
+ var SelectContentImpl = React362.forwardRef((props, forwardedRef) => {
25218
25379
  const {
25219
25380
  __scopeSelect,
25220
25381
  position = "item-aligned",
@@ -25234,20 +25395,20 @@ var SelectContentImpl = React36.forwardRef((props, forwardedRef) => {
25234
25395
  ...contentProps
25235
25396
  } = props;
25236
25397
  const context = useSelectContext(CONTENT_NAME2, __scopeSelect);
25237
- const [content, setContent] = React36.useState(null);
25238
- const [viewport, setViewport] = React36.useState(null);
25398
+ const [content, setContent] = React362.useState(null);
25399
+ const [viewport, setViewport] = React362.useState(null);
25239
25400
  const composedRefs = useComposedRefs2(forwardedRef, (node) => setContent(node));
25240
- const [selectedItem, setSelectedItem] = React36.useState(null);
25241
- const [selectedItemText, setSelectedItemText] = React36.useState(null);
25401
+ const [selectedItem, setSelectedItem] = React362.useState(null);
25402
+ const [selectedItemText, setSelectedItemText] = React362.useState(null);
25242
25403
  const getItems = useCollection(__scopeSelect);
25243
- const [isPositioned, setIsPositioned] = React36.useState(false);
25244
- const firstValidItemFoundRef = React36.useRef(false);
25245
- React36.useEffect(() => {
25404
+ const [isPositioned, setIsPositioned] = React362.useState(false);
25405
+ const firstValidItemFoundRef = React362.useRef(false);
25406
+ React362.useEffect(() => {
25246
25407
  if (content)
25247
25408
  return hideOthers(content);
25248
25409
  }, [content]);
25249
25410
  useFocusGuards();
25250
- const focusFirst2 = React36.useCallback((candidates) => {
25411
+ const focusFirst2 = React362.useCallback((candidates) => {
25251
25412
  const [firstItem, ...restItems] = getItems().map((item) => item.ref.current);
25252
25413
  const [lastItem] = restItems.slice(-1);
25253
25414
  const PREVIOUSLY_FOCUSED_ELEMENT = document.activeElement;
@@ -25264,14 +25425,14 @@ var SelectContentImpl = React36.forwardRef((props, forwardedRef) => {
25264
25425
  return;
25265
25426
  }
25266
25427
  }, [getItems, viewport]);
25267
- const focusSelectedItem = React36.useCallback(() => focusFirst2([selectedItem, content]), [focusFirst2, selectedItem, content]);
25268
- React36.useEffect(() => {
25428
+ const focusSelectedItem = React362.useCallback(() => focusFirst2([selectedItem, content]), [focusFirst2, selectedItem, content]);
25429
+ React362.useEffect(() => {
25269
25430
  if (isPositioned) {
25270
25431
  focusSelectedItem();
25271
25432
  }
25272
25433
  }, [isPositioned, focusSelectedItem]);
25273
25434
  const { onOpenChange, triggerPointerDownPosRef } = context;
25274
- React36.useEffect(() => {
25435
+ React362.useEffect(() => {
25275
25436
  if (content) {
25276
25437
  let pointerMoveDelta = { x: 0, y: 0 };
25277
25438
  const handlePointerMove = (event) => {
@@ -25301,7 +25462,7 @@ var SelectContentImpl = React36.forwardRef((props, forwardedRef) => {
25301
25462
  };
25302
25463
  }
25303
25464
  }, [content, onOpenChange, triggerPointerDownPosRef]);
25304
- React36.useEffect(() => {
25465
+ React362.useEffect(() => {
25305
25466
  const close = () => onOpenChange(false);
25306
25467
  window.addEventListener("blur", close);
25307
25468
  window.addEventListener("resize", close);
@@ -25318,7 +25479,7 @@ var SelectContentImpl = React36.forwardRef((props, forwardedRef) => {
25318
25479
  setTimeout(() => nextItem.ref.current.focus());
25319
25480
  }
25320
25481
  });
25321
- const itemRefCallback = React36.useCallback((node, value, disabled) => {
25482
+ const itemRefCallback = React362.useCallback((node, value, disabled) => {
25322
25483
  const isFirstValidItem = !firstValidItemFoundRef.current && !disabled;
25323
25484
  const isSelectedItem = context.value !== undefined && context.value === value;
25324
25485
  if (isSelectedItem || isFirstValidItem) {
@@ -25327,8 +25488,8 @@ var SelectContentImpl = React36.forwardRef((props, forwardedRef) => {
25327
25488
  firstValidItemFoundRef.current = true;
25328
25489
  }
25329
25490
  }, [context.value]);
25330
- const handleItemLeave = React36.useCallback(() => content?.focus(), [content]);
25331
- const itemTextRefCallback = React36.useCallback((node, value, disabled) => {
25491
+ const handleItemLeave = React362.useCallback(() => content?.focus(), [content]);
25492
+ const itemTextRefCallback = React362.useCallback((node, value, disabled) => {
25332
25493
  const isFirstValidItem = !firstValidItemFoundRef.current && !disabled;
25333
25494
  const isSelectedItem = context.value !== undefined && context.value === value;
25334
25495
  if (isSelectedItem || isFirstValidItem) {
@@ -25423,18 +25584,18 @@ var SelectContentImpl = React36.forwardRef((props, forwardedRef) => {
25423
25584
  });
25424
25585
  SelectContentImpl.displayName = CONTENT_IMPL_NAME;
25425
25586
  var ITEM_ALIGNED_POSITION_NAME = "SelectItemAlignedPosition";
25426
- var SelectItemAlignedPosition = React36.forwardRef((props, forwardedRef) => {
25587
+ var SelectItemAlignedPosition = React362.forwardRef((props, forwardedRef) => {
25427
25588
  const { __scopeSelect, onPlaced, ...popperProps } = props;
25428
25589
  const context = useSelectContext(CONTENT_NAME2, __scopeSelect);
25429
25590
  const contentContext = useSelectContentContext(CONTENT_NAME2, __scopeSelect);
25430
- const [contentWrapper, setContentWrapper] = React36.useState(null);
25431
- const [content, setContent] = React36.useState(null);
25591
+ const [contentWrapper, setContentWrapper] = React362.useState(null);
25592
+ const [content, setContent] = React362.useState(null);
25432
25593
  const composedRefs = useComposedRefs2(forwardedRef, (node) => setContent(node));
25433
25594
  const getItems = useCollection(__scopeSelect);
25434
- const shouldExpandOnScrollRef = React36.useRef(false);
25435
- const shouldRepositionRef = React36.useRef(true);
25595
+ const shouldExpandOnScrollRef = React362.useRef(false);
25596
+ const shouldRepositionRef = React362.useRef(true);
25436
25597
  const { viewport, selectedItem, selectedItemText, focusSelectedItem } = contentContext;
25437
- const position = React36.useCallback(() => {
25598
+ const position = React362.useCallback(() => {
25438
25599
  if (context.trigger && context.valueNode && contentWrapper && content && viewport && selectedItem && selectedItemText) {
25439
25600
  const triggerRect = context.trigger.getBoundingClientRect();
25440
25601
  const contentRect = content.getBoundingClientRect();
@@ -25515,12 +25676,12 @@ var SelectItemAlignedPosition = React36.forwardRef((props, forwardedRef) => {
25515
25676
  onPlaced
25516
25677
  ]);
25517
25678
  useLayoutEffect22(() => position(), [position]);
25518
- const [contentZIndex, setContentZIndex] = React36.useState();
25679
+ const [contentZIndex, setContentZIndex] = React362.useState();
25519
25680
  useLayoutEffect22(() => {
25520
25681
  if (content)
25521
25682
  setContentZIndex(window.getComputedStyle(content).zIndex);
25522
25683
  }, [content]);
25523
- const handleScrollButtonChange = React36.useCallback((node) => {
25684
+ const handleScrollButtonChange = React362.useCallback((node) => {
25524
25685
  if (node && shouldRepositionRef.current === true) {
25525
25686
  position();
25526
25687
  focusSelectedItem?.();
@@ -25554,7 +25715,7 @@ var SelectItemAlignedPosition = React36.forwardRef((props, forwardedRef) => {
25554
25715
  });
25555
25716
  SelectItemAlignedPosition.displayName = ITEM_ALIGNED_POSITION_NAME;
25556
25717
  var POPPER_POSITION_NAME = "SelectPopperPosition";
25557
- var SelectPopperPosition = React36.forwardRef((props, forwardedRef) => {
25718
+ var SelectPopperPosition = React362.forwardRef((props, forwardedRef) => {
25558
25719
  const {
25559
25720
  __scopeSelect,
25560
25721
  align = "start",
@@ -25584,12 +25745,12 @@ var SelectPopperPosition = React36.forwardRef((props, forwardedRef) => {
25584
25745
  SelectPopperPosition.displayName = POPPER_POSITION_NAME;
25585
25746
  var [SelectViewportProvider, useSelectViewportContext] = createSelectContext(CONTENT_NAME2, {});
25586
25747
  var VIEWPORT_NAME = "SelectViewport";
25587
- var SelectViewport = React36.forwardRef((props, forwardedRef) => {
25748
+ var SelectViewport = React362.forwardRef((props, forwardedRef) => {
25588
25749
  const { __scopeSelect, nonce, ...viewportProps } = props;
25589
25750
  const contentContext = useSelectContentContext(VIEWPORT_NAME, __scopeSelect);
25590
25751
  const viewportContext = useSelectViewportContext(VIEWPORT_NAME, __scopeSelect);
25591
25752
  const composedRefs = useComposedRefs2(forwardedRef, contentContext.onViewportChange);
25592
- const prevScrollTopRef = React36.useRef(0);
25753
+ const prevScrollTopRef = React362.useRef(0);
25593
25754
  return /* @__PURE__ */ jsxs42(Fragment8, { children: [
25594
25755
  /* @__PURE__ */ jsx242("style", {
25595
25756
  dangerouslySetInnerHTML: {
@@ -25638,14 +25799,14 @@ var SelectViewport = React36.forwardRef((props, forwardedRef) => {
25638
25799
  SelectViewport.displayName = VIEWPORT_NAME;
25639
25800
  var GROUP_NAME = "SelectGroup";
25640
25801
  var [SelectGroupContextProvider, useSelectGroupContext] = createSelectContext(GROUP_NAME);
25641
- var SelectGroup = React36.forwardRef((props, forwardedRef) => {
25802
+ var SelectGroup = React362.forwardRef((props, forwardedRef) => {
25642
25803
  const { __scopeSelect, ...groupProps } = props;
25643
25804
  const groupId = useId();
25644
25805
  return /* @__PURE__ */ jsx242(SelectGroupContextProvider, { scope: __scopeSelect, id: groupId, children: /* @__PURE__ */ jsx242(Primitive.div, { role: "group", "aria-labelledby": groupId, ...groupProps, ref: forwardedRef }) });
25645
25806
  });
25646
25807
  SelectGroup.displayName = GROUP_NAME;
25647
25808
  var LABEL_NAME = "SelectLabel";
25648
- var SelectLabel = React36.forwardRef((props, forwardedRef) => {
25809
+ var SelectLabel = React362.forwardRef((props, forwardedRef) => {
25649
25810
  const { __scopeSelect, ...labelProps } = props;
25650
25811
  const groupContext = useSelectGroupContext(LABEL_NAME, __scopeSelect);
25651
25812
  return /* @__PURE__ */ jsx242(Primitive.div, { id: groupContext.id, ...labelProps, ref: forwardedRef });
@@ -25653,7 +25814,7 @@ var SelectLabel = React36.forwardRef((props, forwardedRef) => {
25653
25814
  SelectLabel.displayName = LABEL_NAME;
25654
25815
  var ITEM_NAME = "SelectItem";
25655
25816
  var [SelectItemContextProvider, useSelectItemContext] = createSelectContext(ITEM_NAME);
25656
- var SelectItem = React36.forwardRef((props, forwardedRef) => {
25817
+ var SelectItem = React362.forwardRef((props, forwardedRef) => {
25657
25818
  const {
25658
25819
  __scopeSelect,
25659
25820
  value,
@@ -25664,8 +25825,8 @@ var SelectItem = React36.forwardRef((props, forwardedRef) => {
25664
25825
  const context = useSelectContext(ITEM_NAME, __scopeSelect);
25665
25826
  const contentContext = useSelectContentContext(ITEM_NAME, __scopeSelect);
25666
25827
  const isSelected = context.value === value;
25667
- const [textValue, setTextValue] = React36.useState(textValueProp ?? "");
25668
- const [isFocused, setIsFocused] = React36.useState(false);
25828
+ const [textValue, setTextValue] = React362.useState(textValueProp ?? "");
25829
+ const [isFocused, setIsFocused] = React362.useState(false);
25669
25830
  const composedRefs = useComposedRefs2(forwardedRef, (node) => contentContext.itemRefCallback?.(node, value, disabled));
25670
25831
  const textId = useId();
25671
25832
  const handleSelect = () => {
@@ -25683,7 +25844,7 @@ var SelectItem = React36.forwardRef((props, forwardedRef) => {
25683
25844
  disabled,
25684
25845
  textId,
25685
25846
  isSelected,
25686
- onItemTextChange: React36.useCallback((node) => {
25847
+ onItemTextChange: React362.useCallback((node) => {
25687
25848
  setTextValue((prevTextValue) => prevTextValue || (node?.textContent ?? "").trim());
25688
25849
  }, []),
25689
25850
  children: /* @__PURE__ */ jsx242(Collection.ItemSlot, {
@@ -25732,16 +25893,16 @@ var SelectItem = React36.forwardRef((props, forwardedRef) => {
25732
25893
  });
25733
25894
  SelectItem.displayName = ITEM_NAME;
25734
25895
  var ITEM_TEXT_NAME = "SelectItemText";
25735
- var SelectItemText = React36.forwardRef((props, forwardedRef) => {
25896
+ var SelectItemText = React362.forwardRef((props, forwardedRef) => {
25736
25897
  const { __scopeSelect, className, style, ...itemTextProps } = props;
25737
25898
  const context = useSelectContext(ITEM_TEXT_NAME, __scopeSelect);
25738
25899
  const contentContext = useSelectContentContext(ITEM_TEXT_NAME, __scopeSelect);
25739
25900
  const itemContext = useSelectItemContext(ITEM_TEXT_NAME, __scopeSelect);
25740
25901
  const nativeOptionsContext = useSelectNativeOptionsContext(ITEM_TEXT_NAME, __scopeSelect);
25741
- const [itemTextNode, setItemTextNode] = React36.useState(null);
25902
+ const [itemTextNode, setItemTextNode] = React362.useState(null);
25742
25903
  const composedRefs = useComposedRefs2(forwardedRef, (node) => setItemTextNode(node), itemContext.onItemTextChange, (node) => contentContext.itemTextRefCallback?.(node, itemContext.value, itemContext.disabled));
25743
25904
  const textContent = itemTextNode?.textContent;
25744
- const nativeOption = React36.useMemo(() => /* @__PURE__ */ jsx242("option", { value: itemContext.value, disabled: itemContext.disabled, children: textContent }, itemContext.value), [itemContext.disabled, itemContext.value, textContent]);
25905
+ const nativeOption = React362.useMemo(() => /* @__PURE__ */ jsx242("option", { value: itemContext.value, disabled: itemContext.disabled, children: textContent }, itemContext.value), [itemContext.disabled, itemContext.value, textContent]);
25745
25906
  const { onNativeOptionAdd, onNativeOptionRemove } = nativeOptionsContext;
25746
25907
  useLayoutEffect22(() => {
25747
25908
  onNativeOptionAdd(nativeOption);
@@ -25754,17 +25915,17 @@ var SelectItemText = React36.forwardRef((props, forwardedRef) => {
25754
25915
  });
25755
25916
  SelectItemText.displayName = ITEM_TEXT_NAME;
25756
25917
  var ITEM_INDICATOR_NAME = "SelectItemIndicator";
25757
- var SelectItemIndicator = React36.forwardRef((props, forwardedRef) => {
25918
+ var SelectItemIndicator = React362.forwardRef((props, forwardedRef) => {
25758
25919
  const { __scopeSelect, ...itemIndicatorProps } = props;
25759
25920
  const itemContext = useSelectItemContext(ITEM_INDICATOR_NAME, __scopeSelect);
25760
25921
  return itemContext.isSelected ? /* @__PURE__ */ jsx242(Primitive.span, { "aria-hidden": true, ...itemIndicatorProps, ref: forwardedRef }) : null;
25761
25922
  });
25762
25923
  SelectItemIndicator.displayName = ITEM_INDICATOR_NAME;
25763
25924
  var SCROLL_UP_BUTTON_NAME = "SelectScrollUpButton";
25764
- var SelectScrollUpButton = React36.forwardRef((props, forwardedRef) => {
25925
+ var SelectScrollUpButton = React362.forwardRef((props, forwardedRef) => {
25765
25926
  const contentContext = useSelectContentContext(SCROLL_UP_BUTTON_NAME, props.__scopeSelect);
25766
25927
  const viewportContext = useSelectViewportContext(SCROLL_UP_BUTTON_NAME, props.__scopeSelect);
25767
- const [canScrollUp, setCanScrollUp] = React36.useState(false);
25928
+ const [canScrollUp, setCanScrollUp] = React362.useState(false);
25768
25929
  const composedRefs = useComposedRefs2(forwardedRef, viewportContext.onScrollButtonChange);
25769
25930
  useLayoutEffect22(() => {
25770
25931
  if (contentContext.viewport && contentContext.isPositioned) {
@@ -25792,10 +25953,10 @@ var SelectScrollUpButton = React36.forwardRef((props, forwardedRef) => {
25792
25953
  });
25793
25954
  SelectScrollUpButton.displayName = SCROLL_UP_BUTTON_NAME;
25794
25955
  var SCROLL_DOWN_BUTTON_NAME = "SelectScrollDownButton";
25795
- var SelectScrollDownButton = React36.forwardRef((props, forwardedRef) => {
25956
+ var SelectScrollDownButton = React362.forwardRef((props, forwardedRef) => {
25796
25957
  const contentContext = useSelectContentContext(SCROLL_DOWN_BUTTON_NAME, props.__scopeSelect);
25797
25958
  const viewportContext = useSelectViewportContext(SCROLL_DOWN_BUTTON_NAME, props.__scopeSelect);
25798
- const [canScrollDown, setCanScrollDown] = React36.useState(false);
25959
+ const [canScrollDown, setCanScrollDown] = React362.useState(false);
25799
25960
  const composedRefs = useComposedRefs2(forwardedRef, viewportContext.onScrollButtonChange);
25800
25961
  useLayoutEffect22(() => {
25801
25962
  if (contentContext.viewport && contentContext.isPositioned) {
@@ -25823,18 +25984,18 @@ var SelectScrollDownButton = React36.forwardRef((props, forwardedRef) => {
25823
25984
  }) : null;
25824
25985
  });
25825
25986
  SelectScrollDownButton.displayName = SCROLL_DOWN_BUTTON_NAME;
25826
- var SelectScrollButtonImpl = React36.forwardRef((props, forwardedRef) => {
25987
+ var SelectScrollButtonImpl = React362.forwardRef((props, forwardedRef) => {
25827
25988
  const { __scopeSelect, onAutoScroll, ...scrollIndicatorProps } = props;
25828
25989
  const contentContext = useSelectContentContext("SelectScrollButton", __scopeSelect);
25829
- const autoScrollTimerRef = React36.useRef(null);
25990
+ const autoScrollTimerRef = React362.useRef(null);
25830
25991
  const getItems = useCollection(__scopeSelect);
25831
- const clearAutoScrollTimer = React36.useCallback(() => {
25992
+ const clearAutoScrollTimer = React362.useCallback(() => {
25832
25993
  if (autoScrollTimerRef.current !== null) {
25833
25994
  window.clearInterval(autoScrollTimerRef.current);
25834
25995
  autoScrollTimerRef.current = null;
25835
25996
  }
25836
25997
  }, []);
25837
- React36.useEffect(() => {
25998
+ React362.useEffect(() => {
25838
25999
  return () => clearAutoScrollTimer();
25839
26000
  }, [clearAutoScrollTimer]);
25840
26001
  useLayoutEffect22(() => {
@@ -25863,13 +26024,13 @@ var SelectScrollButtonImpl = React36.forwardRef((props, forwardedRef) => {
25863
26024
  });
25864
26025
  });
25865
26026
  var SEPARATOR_NAME = "SelectSeparator";
25866
- var SelectSeparator = React36.forwardRef((props, forwardedRef) => {
26027
+ var SelectSeparator = React362.forwardRef((props, forwardedRef) => {
25867
26028
  const { __scopeSelect, ...separatorProps } = props;
25868
26029
  return /* @__PURE__ */ jsx242(Primitive.div, { "aria-hidden": true, ...separatorProps, ref: forwardedRef });
25869
26030
  });
25870
26031
  SelectSeparator.displayName = SEPARATOR_NAME;
25871
26032
  var ARROW_NAME2 = "SelectArrow";
25872
- var SelectArrow = React36.forwardRef((props, forwardedRef) => {
26033
+ var SelectArrow = React362.forwardRef((props, forwardedRef) => {
25873
26034
  const { __scopeSelect, ...arrowProps } = props;
25874
26035
  const popperScope = usePopperScope(__scopeSelect);
25875
26036
  const context = useSelectContext(ARROW_NAME2, __scopeSelect);
@@ -25880,12 +26041,12 @@ SelectArrow.displayName = ARROW_NAME2;
25880
26041
  function shouldShowPlaceholder(value) {
25881
26042
  return value === "" || value === undefined;
25882
26043
  }
25883
- var BubbleSelect = React36.forwardRef((props, forwardedRef) => {
26044
+ var BubbleSelect = React362.forwardRef((props, forwardedRef) => {
25884
26045
  const { value, ...selectProps } = props;
25885
- const ref = React36.useRef(null);
26046
+ const ref = React362.useRef(null);
25886
26047
  const composedRefs = useComposedRefs2(forwardedRef, ref);
25887
26048
  const prevValue = usePrevious(value);
25888
- React36.useEffect(() => {
26049
+ React362.useEffect(() => {
25889
26050
  const select = ref.current;
25890
26051
  const selectProto = window.HTMLSelectElement.prototype;
25891
26052
  const descriptor = Object.getOwnPropertyDescriptor(selectProto, "value");
@@ -25901,9 +26062,9 @@ var BubbleSelect = React36.forwardRef((props, forwardedRef) => {
25901
26062
  BubbleSelect.displayName = "BubbleSelect";
25902
26063
  function useTypeaheadSearch(onSearchChange) {
25903
26064
  const handleSearchChange = useCallbackRef(onSearchChange);
25904
- const searchRef = React36.useRef("");
25905
- const timerRef = React36.useRef(0);
25906
- const handleTypeaheadSearch = React36.useCallback((key) => {
26065
+ const searchRef = React362.useRef("");
26066
+ const timerRef = React362.useRef(0);
26067
+ const handleTypeaheadSearch = React362.useCallback((key) => {
25907
26068
  const search = searchRef.current + key;
25908
26069
  handleSearchChange(search);
25909
26070
  (function updateSearch(value) {
@@ -25913,11 +26074,11 @@ function useTypeaheadSearch(onSearchChange) {
25913
26074
  timerRef.current = window.setTimeout(() => updateSearch(""), 1000);
25914
26075
  })(search);
25915
26076
  }, [handleSearchChange]);
25916
- const resetTypeahead = React36.useCallback(() => {
26077
+ const resetTypeahead = React362.useCallback(() => {
25917
26078
  searchRef.current = "";
25918
26079
  window.clearTimeout(timerRef.current);
25919
26080
  }, []);
25920
- React36.useEffect(() => {
26081
+ React362.useEffect(() => {
25921
26082
  return () => window.clearTimeout(timerRef.current);
25922
26083
  }, []);
25923
26084
  return [searchRef, handleTypeaheadSearch, resetTypeahead];
@@ -26006,7 +26167,7 @@ var ChevronDown = createLucideIcon("ChevronDown", [
26006
26167
  var ChevronUp = createLucideIcon("ChevronUp", [["path", { d: "m18 15-6-6-6 6", key: "153udz" }]]);
26007
26168
  var Select2 = Root222;
26008
26169
  var SelectValue2 = Value;
26009
- var SelectTrigger2 = React372.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs52(Trigger, {
26170
+ var SelectTrigger2 = React37.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs5(Trigger, {
26010
26171
  ref,
26011
26172
  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),
26012
26173
  ...props,
@@ -26021,7 +26182,7 @@ var SelectTrigger2 = React372.forwardRef(({ className, children, ...props }, ref
26021
26182
  ]
26022
26183
  }));
26023
26184
  SelectTrigger2.displayName = Trigger.displayName;
26024
- var SelectScrollUpButton2 = React372.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx252(ScrollUpButton, {
26185
+ var SelectScrollUpButton2 = React37.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx252(ScrollUpButton, {
26025
26186
  ref,
26026
26187
  className: cn("flex cursor-default items-center justify-center py-1", className),
26027
26188
  ...props,
@@ -26030,7 +26191,7 @@ var SelectScrollUpButton2 = React372.forwardRef(({ className, ...props }, ref) =
26030
26191
  })
26031
26192
  }));
26032
26193
  SelectScrollUpButton2.displayName = ScrollUpButton.displayName;
26033
- var SelectScrollDownButton2 = React372.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx252(ScrollDownButton, {
26194
+ var SelectScrollDownButton2 = React37.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx252(ScrollDownButton, {
26034
26195
  ref,
26035
26196
  className: cn("flex cursor-default items-center justify-center py-1", className),
26036
26197
  ...props,
@@ -26039,8 +26200,8 @@ var SelectScrollDownButton2 = React372.forwardRef(({ className, ...props }, ref)
26039
26200
  })
26040
26201
  }));
26041
26202
  SelectScrollDownButton2.displayName = ScrollDownButton.displayName;
26042
- var SelectContent2 = React372.forwardRef(({ className, children, position = "popper", ...props }, ref) => /* @__PURE__ */ jsx252(Portal2, {
26043
- children: /* @__PURE__ */ jsxs52(Content2, {
26203
+ var SelectContent2 = React37.forwardRef(({ className, children, position = "popper", ...props }, ref) => /* @__PURE__ */ jsx252(Portal2, {
26204
+ children: /* @__PURE__ */ jsxs5(Content2, {
26044
26205
  ref,
26045
26206
  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),
26046
26207
  position,
@@ -26056,13 +26217,13 @@ var SelectContent2 = React372.forwardRef(({ className, children, position = "pop
26056
26217
  })
26057
26218
  }));
26058
26219
  SelectContent2.displayName = Content2.displayName;
26059
- var SelectLabel2 = React372.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx252(Label, {
26220
+ var SelectLabel2 = React37.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx252(Label, {
26060
26221
  ref,
26061
26222
  className: cn("py-1.5 pl-8 pr-2 text-sm font-semibold", className),
26062
26223
  ...props
26063
26224
  }));
26064
26225
  SelectLabel2.displayName = Label.displayName;
26065
- var SelectItem2 = React372.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs52(Item, {
26226
+ var SelectItem2 = React37.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs5(Item, {
26066
26227
  ref,
26067
26228
  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),
26068
26229
  ...props,
@@ -26081,7 +26242,7 @@ var SelectItem2 = React372.forwardRef(({ className, children, ...props }, ref) =
26081
26242
  ]
26082
26243
  }));
26083
26244
  SelectItem2.displayName = Item.displayName;
26084
- var SelectSeparator2 = React372.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx252(Separator, {
26245
+ var SelectSeparator2 = React37.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx252(Separator, {
26085
26246
  ref,
26086
26247
  className: cn("-mx-1 my-1 h-px bg-muted", className),
26087
26248
  ...props
@@ -26114,19 +26275,19 @@ function composeEventHandlers2(originalEventHandler, ourEventHandler, { checkFor
26114
26275
  function createContextScope2(scopeName, createContextScopeDeps = []) {
26115
26276
  let defaultContexts = [];
26116
26277
  function createContext32(rootComponentName, defaultContext) {
26117
- const BaseContext = React38.createContext(defaultContext);
26278
+ const BaseContext = React382.createContext(defaultContext);
26118
26279
  const index2 = defaultContexts.length;
26119
26280
  defaultContexts = [...defaultContexts, defaultContext];
26120
26281
  const Provider = (props) => {
26121
26282
  const { scope, children, ...context } = props;
26122
26283
  const Context = scope?.[scopeName]?.[index2] || BaseContext;
26123
- const value = React38.useMemo(() => context, Object.values(context));
26284
+ const value = React382.useMemo(() => context, Object.values(context));
26124
26285
  return /* @__PURE__ */ jsx272(Context.Provider, { value, children });
26125
26286
  };
26126
26287
  Provider.displayName = rootComponentName + "Provider";
26127
26288
  function useContext222(consumerName, scope) {
26128
26289
  const Context = scope?.[scopeName]?.[index2] || BaseContext;
26129
- const context = React38.useContext(Context);
26290
+ const context = React382.useContext(Context);
26130
26291
  if (context)
26131
26292
  return context;
26132
26293
  if (defaultContext !== undefined)
@@ -26137,11 +26298,11 @@ function createContextScope2(scopeName, createContextScopeDeps = []) {
26137
26298
  }
26138
26299
  const createScope = () => {
26139
26300
  const scopeContexts = defaultContexts.map((defaultContext) => {
26140
- return React38.createContext(defaultContext);
26301
+ return React382.createContext(defaultContext);
26141
26302
  });
26142
26303
  return function useScope(scope) {
26143
26304
  const contexts = scope?.[scopeName] || scopeContexts;
26144
- return React38.useMemo(() => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }), [scope, contexts]);
26305
+ return React382.useMemo(() => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }), [scope, contexts]);
26145
26306
  };
26146
26307
  };
26147
26308
  createScope.scopeName = scopeName;
@@ -26162,7 +26323,7 @@ function composeContextScopes2(...scopes) {
26162
26323
  const currentScope = scopeProps[`__scope${scopeName}`];
26163
26324
  return { ...nextScopes2, ...currentScope };
26164
26325
  }, {});
26165
- return React38.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);
26326
+ return React382.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);
26166
26327
  };
26167
26328
  };
26168
26329
  createScope.scopeName = baseScope.scopeName;
@@ -26170,22 +26331,22 @@ function composeContextScopes2(...scopes) {
26170
26331
  }
26171
26332
  function createSlot2(ownerName) {
26172
26333
  const SlotClone2 = /* @__PURE__ */ createSlotClone2(ownerName);
26173
- const Slot22 = React392.forwardRef((props, forwardedRef) => {
26334
+ const Slot22 = React39.forwardRef((props, forwardedRef) => {
26174
26335
  const { children, ...slotProps } = props;
26175
- const childrenArray = React392.Children.toArray(children);
26336
+ const childrenArray = React39.Children.toArray(children);
26176
26337
  const slottable = childrenArray.find(isSlottable3);
26177
26338
  if (slottable) {
26178
26339
  const newElement = slottable.props.children;
26179
26340
  const newChildren = childrenArray.map((child) => {
26180
26341
  if (child === slottable) {
26181
- if (React392.Children.count(newElement) > 1)
26182
- return React392.Children.only(null);
26183
- return React392.isValidElement(newElement) ? newElement.props.children : null;
26342
+ if (React39.Children.count(newElement) > 1)
26343
+ return React39.Children.only(null);
26344
+ return React39.isValidElement(newElement) ? newElement.props.children : null;
26184
26345
  } else {
26185
26346
  return child;
26186
26347
  }
26187
26348
  });
26188
- return /* @__PURE__ */ jsx282(SlotClone2, { ...slotProps, ref: forwardedRef, children: React392.isValidElement(newElement) ? React392.cloneElement(newElement, undefined, newChildren) : null });
26349
+ return /* @__PURE__ */ jsx282(SlotClone2, { ...slotProps, ref: forwardedRef, children: React39.isValidElement(newElement) ? React39.cloneElement(newElement, undefined, newChildren) : null });
26189
26350
  }
26190
26351
  return /* @__PURE__ */ jsx282(SlotClone2, { ...slotProps, ref: forwardedRef, children });
26191
26352
  });
@@ -26193,24 +26354,24 @@ function createSlot2(ownerName) {
26193
26354
  return Slot22;
26194
26355
  }
26195
26356
  function createSlotClone2(ownerName) {
26196
- const SlotClone2 = React392.forwardRef((props, forwardedRef) => {
26357
+ const SlotClone2 = React39.forwardRef((props, forwardedRef) => {
26197
26358
  const { children, ...slotProps } = props;
26198
- if (React392.isValidElement(children)) {
26359
+ if (React39.isValidElement(children)) {
26199
26360
  const childrenRef = getElementRef3(children);
26200
26361
  const props2 = mergeProps3(slotProps, children.props);
26201
- if (children.type !== React392.Fragment) {
26362
+ if (children.type !== React39.Fragment) {
26202
26363
  props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;
26203
26364
  }
26204
- return React392.cloneElement(children, props2);
26365
+ return React39.cloneElement(children, props2);
26205
26366
  }
26206
- return React392.Children.count(children) > 1 ? React392.Children.only(null) : null;
26367
+ return React39.Children.count(children) > 1 ? React39.Children.only(null) : null;
26207
26368
  });
26208
26369
  SlotClone2.displayName = `${ownerName}.SlotClone`;
26209
26370
  return SlotClone2;
26210
26371
  }
26211
26372
  var SLOTTABLE_IDENTIFIER2 = Symbol("radix.slottable");
26212
26373
  function isSlottable3(child) {
26213
- return React392.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER2;
26374
+ return React39.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER2;
26214
26375
  }
26215
26376
  function mergeProps3(slotProps, childProps) {
26216
26377
  const overrideProps = { ...childProps };
@@ -26604,7 +26765,7 @@ function toSafeIndex(array, index2) {
26604
26765
  function toSafeInteger(number) {
26605
26766
  return number !== number || number === 0 ? 0 : Math.trunc(number);
26606
26767
  }
26607
- var useLayoutEffect222 = globalThis?.document ? React41.useLayoutEffect : () => {};
26768
+ var useLayoutEffect222 = globalThis?.document ? React412.useLayoutEffect : () => {};
26608
26769
  var useReactId2 = React422[" useId ".trim().toString()] || (() => {
26609
26770
  return;
26610
26771
  });
@@ -26638,7 +26799,7 @@ var NODES2 = [
26638
26799
  ];
26639
26800
  var Primitive2 = NODES2.reduce((primitive, node) => {
26640
26801
  const Slot3 = createSlot2(`Primitive.${node}`);
26641
- const Node2 = React43.forwardRef((props, forwardedRef) => {
26802
+ const Node2 = React432.forwardRef((props, forwardedRef) => {
26642
26803
  const { asChild, ...primitiveProps } = props;
26643
26804
  const Comp = asChild ? Slot3 : node;
26644
26805
  if (typeof window !== "undefined") {
@@ -28540,7 +28701,7 @@ function cn2(...inputs) {
28540
28701
  }
28541
28702
 
28542
28703
  // src/components/homepage/PricingBulletPoint.tsx
28543
- import { jsx as jsx48, jsxs as jsxs7 } from "react/jsx-runtime";
28704
+ import { jsx as jsx48, jsxs as jsxs9 } from "react/jsx-runtime";
28544
28705
  var container3 = {
28545
28706
  display: "flex",
28546
28707
  flexDirection: "row",
@@ -28554,7 +28715,7 @@ var greyCircle = {
28554
28715
  backgroundColor: "var(--footer-border)"
28555
28716
  };
28556
28717
  var PricingBulletPoint = ({ text, checked, children }) => {
28557
- const checkmarkSVG = /* @__PURE__ */ jsxs7("svg", {
28718
+ const checkmarkSVG = /* @__PURE__ */ jsxs9("svg", {
28558
28719
  width: "20",
28559
28720
  height: "20",
28560
28721
  viewBox: "0 0 20 20",
@@ -28576,13 +28737,13 @@ var PricingBulletPoint = ({ text, checked, children }) => {
28576
28737
  })
28577
28738
  ]
28578
28739
  });
28579
- return /* @__PURE__ */ jsxs7("div", {
28740
+ return /* @__PURE__ */ jsxs9("div", {
28580
28741
  style: container3,
28581
28742
  children: [
28582
28743
  checked ? checkmarkSVG : /* @__PURE__ */ jsx48("div", {
28583
28744
  style: greyCircle
28584
28745
  }),
28585
- /* @__PURE__ */ jsxs7("div", {
28746
+ /* @__PURE__ */ jsxs9("div", {
28586
28747
  className: "fontbrand text-lg\t",
28587
28748
  children: [
28588
28749
  text,
@@ -28594,7 +28755,7 @@ var PricingBulletPoint = ({ text, checked, children }) => {
28594
28755
  };
28595
28756
 
28596
28757
  // src/components/homepage/FreePricing.tsx
28597
- import { jsx as jsx49, jsxs as jsxs8, Fragment as Fragment9 } from "react/jsx-runtime";
28758
+ import { jsx as jsx49, jsxs as jsxs10, Fragment as Fragment11 } from "react/jsx-runtime";
28598
28759
  var Container = ({
28599
28760
  children
28600
28761
  }) => {
@@ -28638,7 +28799,7 @@ var icon = {
28638
28799
  };
28639
28800
  var PricingSlider = ({ value, onChange, min: min2, max: max2, step = 1, "aria-label": ariaLabel }) => {
28640
28801
  const percentage = (value - min2) / (max2 - min2) * 100;
28641
- return /* @__PURE__ */ jsxs8(Fragment9, {
28802
+ return /* @__PURE__ */ jsxs10(Fragment11, {
28642
28803
  children: [
28643
28804
  /* @__PURE__ */ jsx49("style", {
28644
28805
  children: `
@@ -28695,7 +28856,7 @@ var textUnitWrapper = {
28695
28856
  flexDirection: "column"
28696
28857
  };
28697
28858
  var FreePricing = () => {
28698
- return /* @__PURE__ */ jsxs8(Container, {
28859
+ return /* @__PURE__ */ jsxs10(Container, {
28699
28860
  children: [
28700
28861
  /* @__PURE__ */ jsx49(Audience, {
28701
28862
  children: "For individuals and companies of up to 3 people"
@@ -28726,7 +28887,7 @@ var FreePricing = () => {
28726
28887
  ...textUnitWrapper,
28727
28888
  alignItems: "flex-end"
28728
28889
  },
28729
- children: /* @__PURE__ */ jsxs8("a", {
28890
+ children: /* @__PURE__ */ jsxs10("a", {
28730
28891
  target: "_blank",
28731
28892
  href: "https://www.remotion.dev/docs",
28732
28893
  className: "font-brand text-brand flex flex-row items-center gap-1 no-underline",
@@ -28750,7 +28911,7 @@ var FreePricing = () => {
28750
28911
  });
28751
28912
  };
28752
28913
  var EnterpriseLicense = () => {
28753
- return /* @__PURE__ */ jsxs8(Container, {
28914
+ return /* @__PURE__ */ jsxs10(Container, {
28754
28915
  children: [
28755
28916
  /* @__PURE__ */ jsx49(Audience, {
28756
28917
  children: "For advanced needs"
@@ -28783,7 +28944,7 @@ var EnterpriseLicense = () => {
28783
28944
  checked: true
28784
28945
  }),
28785
28946
  /* @__PURE__ */ jsx49(PricingBulletPoint, {
28786
- text: /* @__PURE__ */ jsxs8("span", {
28947
+ text: /* @__PURE__ */ jsxs10("span", {
28787
28948
  children: [
28788
28949
  /* @__PURE__ */ jsx49("a", {
28789
28950
  href: "https://www.remotion.dev/editor-starter",
@@ -28801,7 +28962,7 @@ var EnterpriseLicense = () => {
28801
28962
  }),
28802
28963
  /* @__PURE__ */ jsx49("div", {
28803
28964
  className: "flex flex-row justify-end",
28804
- children: /* @__PURE__ */ jsxs8("div", {
28965
+ children: /* @__PURE__ */ jsxs10("div", {
28805
28966
  style: {
28806
28967
  ...textUnitWrapper,
28807
28968
  alignItems: "flex-end"
@@ -28828,7 +28989,7 @@ var EnterpriseLicense = () => {
28828
28989
  var SEAT_PRICE = 25;
28829
28990
  var RENDER_UNIT_PRICE = 10;
28830
28991
  var SectionCheckbox = ({ checked, onChange, title, subtitle, children }) => {
28831
- return /* @__PURE__ */ jsxs8("div", {
28992
+ return /* @__PURE__ */ jsxs10("div", {
28832
28993
  className: "flex flex-row gap-3 cursor-pointer select-none items-center",
28833
28994
  onClick: () => onChange(!checked),
28834
28995
  children: [
@@ -28837,10 +28998,10 @@ var SectionCheckbox = ({ checked, onChange, title, subtitle, children }) => {
28837
28998
  onToggle: () => onChange(!checked),
28838
28999
  "aria-label": title
28839
29000
  }),
28840
- /* @__PURE__ */ jsxs8("div", {
29001
+ /* @__PURE__ */ jsxs10("div", {
28841
29002
  className: "flex flex-col",
28842
29003
  children: [
28843
- /* @__PURE__ */ jsxs8("div", {
29004
+ /* @__PURE__ */ jsxs10("div", {
28844
29005
  className: "fontbrand font-bold text-lg flex flex-row items-center gap-1",
28845
29006
  children: [
28846
29007
  title,
@@ -28890,7 +29051,7 @@ var CompanyPricing = () => {
28890
29051
  }, [formatPrice, totalPrice]);
28891
29052
  const showMinimumMessage = automatorsSelected && creatorsPrice + automatorsPrice < 100;
28892
29053
  const showEnterpriseMessage = totalPrice >= 500;
28893
- return /* @__PURE__ */ jsxs8(Container, {
29054
+ return /* @__PURE__ */ jsxs10(Container, {
28894
29055
  children: [
28895
29056
  /* @__PURE__ */ jsx49(Audience, {
28896
29057
  children: "For collaborations and companies of 4+ people"
@@ -28933,14 +29094,14 @@ var CompanyPricing = () => {
28933
29094
  transition: automatorsSelected ? "grid-template-rows 150ms ease-out, opacity 150ms ease-out 75ms" : "opacity 150ms ease-out, grid-template-rows 150ms ease-out 75ms"
28934
29095
  },
28935
29096
  inert: !automatorsSelected,
28936
- children: /* @__PURE__ */ jsxs8("div", {
29097
+ children: /* @__PURE__ */ jsxs10("div", {
28937
29098
  className: "overflow-hidden",
28938
29099
  children: [
28939
29100
  /* @__PURE__ */ jsx49("p", {
28940
29101
  className: "text-sm text-muted fontbrand pt-3 pb-1",
28941
29102
  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."
28942
29103
  }),
28943
- /* @__PURE__ */ jsxs8("div", {
29104
+ /* @__PURE__ */ jsxs10("div", {
28944
29105
  className: "flex flex-row items-center gap-3 sm:gap-4 w-full pt-3 pb-1",
28945
29106
  children: [
28946
29107
  /* @__PURE__ */ jsx49("div", {
@@ -28954,14 +29115,14 @@ var CompanyPricing = () => {
28954
29115
  "aria-label": "Number of renders"
28955
29116
  })
28956
29117
  }),
28957
- /* @__PURE__ */ jsxs8("div", {
29118
+ /* @__PURE__ */ jsxs10("div", {
28958
29119
  className: "fontbrand shrink-0 whitespace-nowrap w-[135px] sm:w-[150px] text-right tabular-nums",
28959
29120
  children: [
28960
29121
  new Intl.NumberFormat("en-US").format(cloudRenders),
28961
29122
  " Renders"
28962
29123
  ]
28963
29124
  }),
28964
- /* @__PURE__ */ jsxs8("div", {
29125
+ /* @__PURE__ */ jsxs10("div", {
28965
29126
  className: "fontbrand font-bold min-w-[60px] text-right shrink-0 whitespace-nowrap tabular-nums",
28966
29127
  children: [
28967
29128
  "$",
@@ -28990,14 +29151,14 @@ var CompanyPricing = () => {
28990
29151
  transition: creatorsSelected ? "grid-template-rows 150ms ease-out, opacity 150ms ease-out 75ms" : "opacity 150ms ease-out, grid-template-rows 150ms ease-out 75ms"
28991
29152
  },
28992
29153
  inert: !creatorsSelected,
28993
- children: /* @__PURE__ */ jsxs8("div", {
29154
+ children: /* @__PURE__ */ jsxs10("div", {
28994
29155
  className: "overflow-hidden",
28995
29156
  children: [
28996
29157
  /* @__PURE__ */ jsx49("p", {
28997
29158
  className: "text-sm text-muted fontbrand pt-3 pb-1",
28998
29159
  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."
28999
29160
  }),
29000
- /* @__PURE__ */ jsxs8("div", {
29161
+ /* @__PURE__ */ jsxs10("div", {
29001
29162
  className: "flex flex-row items-center gap-3 sm:gap-4 w-full pt-3 pb-1",
29002
29163
  children: [
29003
29164
  /* @__PURE__ */ jsx49("div", {
@@ -29010,7 +29171,7 @@ var CompanyPricing = () => {
29010
29171
  "aria-label": "Number of seats"
29011
29172
  })
29012
29173
  }),
29013
- /* @__PURE__ */ jsxs8("div", {
29174
+ /* @__PURE__ */ jsxs10("div", {
29014
29175
  className: "fontbrand shrink-0 whitespace-nowrap w-[135px] sm:w-[150px] text-center tabular-nums",
29015
29176
  children: [
29016
29177
  devSeatCount,
@@ -29018,7 +29179,7 @@ var CompanyPricing = () => {
29018
29179
  devSeatCount === 1 ? "Seat" : "Seats"
29019
29180
  ]
29020
29181
  }),
29021
- /* @__PURE__ */ jsxs8("div", {
29182
+ /* @__PURE__ */ jsxs10("div", {
29022
29183
  className: "fontbrand font-bold min-w-[60px] text-right shrink-0 whitespace-nowrap tabular-nums",
29023
29184
  children: [
29024
29185
  "$",
@@ -29035,14 +29196,14 @@ var CompanyPricing = () => {
29035
29196
  /* @__PURE__ */ jsx49("div", {
29036
29197
  style: { height: 14 }
29037
29198
  }),
29038
- /* @__PURE__ */ jsxs8("div", {
29199
+ /* @__PURE__ */ jsxs10("div", {
29039
29200
  className: "flex flex-row items-baseline justify-end gap-2",
29040
29201
  children: [
29041
29202
  /* @__PURE__ */ jsx49("div", {
29042
29203
  className: "fontbrand text-muted text-sm",
29043
29204
  children: "Total"
29044
29205
  }),
29045
- /* @__PURE__ */ jsxs8(PriceTag, {
29206
+ /* @__PURE__ */ jsxs10(PriceTag, {
29046
29207
  children: [
29047
29208
  totalPriceString,
29048
29209
  "/month"
@@ -29050,7 +29211,7 @@ var CompanyPricing = () => {
29050
29211
  })
29051
29212
  ]
29052
29213
  }),
29053
- /* @__PURE__ */ jsxs8("div", {
29214
+ /* @__PURE__ */ jsxs10("div", {
29054
29215
  className: "flex flex-col items-end",
29055
29216
  children: [
29056
29217
  /* @__PURE__ */ jsx49(BottomInfo, {
@@ -29058,7 +29219,7 @@ var CompanyPricing = () => {
29058
29219
  className: "opacity-0 data-[visible=true]:opacity-100 transition-opacity mt-1",
29059
29220
  children: "The minimum is $100 per month for Remotion for Automators"
29060
29221
  }),
29061
- /* @__PURE__ */ jsxs8(BottomInfo, {
29222
+ /* @__PURE__ */ jsxs10(BottomInfo, {
29062
29223
  "data-visible": showEnterpriseMessage,
29063
29224
  className: "opacity-0 data-[visible=true]:opacity-100 transition-opacity mt-1",
29064
29225
  children: [
@@ -29084,7 +29245,7 @@ var CompanyPricing = () => {
29084
29245
  ...textUnitWrapper,
29085
29246
  alignItems: "flex-end"
29086
29247
  },
29087
- children: /* @__PURE__ */ jsxs8("a", {
29248
+ children: /* @__PURE__ */ jsxs10("a", {
29088
29249
  href: "https://remotion.pro/dashboard",
29089
29250
  className: "font-brand text-brand flex flex-row items-center gap-1 no-underline",
29090
29251
  children: [
@@ -29108,12 +29269,12 @@ var CompanyPricing = () => {
29108
29269
  };
29109
29270
 
29110
29271
  // src/components/homepage/Pricing.tsx
29111
- import { jsx as jsx50, jsxs as jsxs9 } from "react/jsx-runtime";
29272
+ import { jsx as jsx50, jsxs as jsxs11 } from "react/jsx-runtime";
29112
29273
  var Pricing = ({
29113
29274
  faqHref = "/docs/license/faq",
29114
29275
  faqLabel = "License FAQ",
29115
29276
  licenseHref = "https://github.com/remotion-dev/remotion/blob/main/LICENSE.md",
29116
- termsHref = "https://www.remotion.pro/terms"
29277
+ termsHref = "/docs/license/terms"
29117
29278
  }) => {
29118
29279
  const faqLinkTarget = useMemo53(() => {
29119
29280
  return faqHref.startsWith("http") ? "_blank" : undefined;
@@ -29124,7 +29285,7 @@ var Pricing = ({
29124
29285
  const termsLinkTarget = useMemo53(() => {
29125
29286
  return termsHref.startsWith("http") ? "_blank" : undefined;
29126
29287
  }, [termsHref]);
29127
- return /* @__PURE__ */ jsxs9("div", {
29288
+ return /* @__PURE__ */ jsxs11("div", {
29128
29289
  style: {
29129
29290
  display: "flex",
29130
29291
  flexDirection: "column",
@@ -29140,7 +29301,7 @@ var Pricing = ({
29140
29301
  justifyContent: "center",
29141
29302
  display: "flex"
29142
29303
  },
29143
- children: /* @__PURE__ */ jsxs9("div", {
29304
+ children: /* @__PURE__ */ jsxs11("div", {
29144
29305
  style: {
29145
29306
  fontFamily: "GTPlanar"
29146
29307
  },
@@ -29191,7 +29352,7 @@ var SectionTitle = ({
29191
29352
  };
29192
29353
 
29193
29354
  // src/components/homepage/AutomationsSection.tsx
29194
- import { jsx as jsx54, jsxs as jsxs10, Fragment as Fragment11 } from "react/jsx-runtime";
29355
+ import { jsx as jsx54, jsxs as jsxs12, Fragment as Fragment12 } from "react/jsx-runtime";
29195
29356
  var appPipeline = [
29196
29357
  {
29197
29358
  step: "01",
@@ -29212,7 +29373,7 @@ var appPipeline = [
29212
29373
  {
29213
29374
  step: "03",
29214
29375
  title: "Preview and render",
29215
- description: /* @__PURE__ */ jsxs10(Fragment11, {
29376
+ description: /* @__PURE__ */ jsxs12(Fragment12, {
29216
29377
  children: [
29217
29378
  "Use the",
29218
29379
  " ",
@@ -29263,7 +29424,7 @@ var Arrow3 = () => /* @__PURE__ */ jsx54("svg", {
29263
29424
  })
29264
29425
  });
29265
29426
  var InlineLink = ({ href, children }) => {
29266
- return /* @__PURE__ */ jsxs10("a", {
29427
+ return /* @__PURE__ */ jsxs12("a", {
29267
29428
  href,
29268
29429
  className: "mt-3 inline-flex flex-row items-center font-brand text-base font-semibold text-text no-underline sm:text-sm",
29269
29430
  children: [
@@ -29277,10 +29438,10 @@ var StudioIllustration = () => {
29277
29438
  return /* @__PURE__ */ jsx54("div", {
29278
29439
  className: illustrationFrame,
29279
29440
  "aria-hidden": "true",
29280
- children: /* @__PURE__ */ jsxs10("div", {
29441
+ children: /* @__PURE__ */ jsxs12("div", {
29281
29442
  className: "relative w-full max-w-[220px] rounded-md bg-pane px-4 py-6 fontbrand",
29282
29443
  children: [
29283
- /* @__PURE__ */ jsxs10("div", {
29444
+ /* @__PURE__ */ jsxs12("div", {
29284
29445
  className: "absolute bottom-5 left-1/2 top-3 flex -translate-x-1/2 flex-col items-center",
29285
29446
  children: [
29286
29447
  /* @__PURE__ */ jsx54("div", {
@@ -29291,10 +29452,10 @@ var StudioIllustration = () => {
29291
29452
  })
29292
29453
  ]
29293
29454
  }),
29294
- /* @__PURE__ */ jsxs10("div", {
29455
+ /* @__PURE__ */ jsxs12("div", {
29295
29456
  className: "space-y-4",
29296
29457
  children: [
29297
- /* @__PURE__ */ jsxs10("div", {
29458
+ /* @__PURE__ */ jsxs12("div", {
29298
29459
  className: "grid grid-cols-[28px_1fr] items-center gap-3",
29299
29460
  children: [
29300
29461
  /* @__PURE__ */ jsx54("div", {
@@ -29305,7 +29466,7 @@ var StudioIllustration = () => {
29305
29466
  })
29306
29467
  ]
29307
29468
  }),
29308
- /* @__PURE__ */ jsxs10("div", {
29469
+ /* @__PURE__ */ jsxs12("div", {
29309
29470
  className: "grid grid-cols-[28px_1fr] items-center gap-3",
29310
29471
  children: [
29311
29472
  /* @__PURE__ */ jsx54("div", {
@@ -29316,7 +29477,7 @@ var StudioIllustration = () => {
29316
29477
  })
29317
29478
  ]
29318
29479
  }),
29319
- /* @__PURE__ */ jsxs10("div", {
29480
+ /* @__PURE__ */ jsxs12("div", {
29320
29481
  className: "grid grid-cols-[28px_1fr] items-center gap-3",
29321
29482
  children: [
29322
29483
  /* @__PURE__ */ jsx54("div", {
@@ -29337,7 +29498,7 @@ var PropsIllustration = () => {
29337
29498
  return /* @__PURE__ */ jsx54("div", {
29338
29499
  className: illustrationFrame,
29339
29500
  "aria-hidden": "true",
29340
- children: /* @__PURE__ */ jsxs10("div", {
29501
+ children: /* @__PURE__ */ jsxs12("div", {
29341
29502
  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",
29342
29503
  children: [
29343
29504
  /* @__PURE__ */ jsx54("div", {
@@ -29368,12 +29529,12 @@ var PreviewIllustration = () => {
29368
29529
  return /* @__PURE__ */ jsx54("div", {
29369
29530
  className: illustrationFrame,
29370
29531
  "aria-hidden": "true",
29371
- children: /* @__PURE__ */ jsxs10("div", {
29532
+ children: /* @__PURE__ */ jsxs12("div", {
29372
29533
  className: "w-full max-w-[240px] rounded-md border border-solid border-muted bg-card-bg p-2 fontbrand",
29373
29534
  children: [
29374
29535
  /* @__PURE__ */ jsx54("div", {
29375
29536
  className: "relative flex h-[92px] items-center justify-center rounded-sm border border-solid border-muted bg-pane text-brand",
29376
- children: /* @__PURE__ */ jsxs10("svg", {
29537
+ children: /* @__PURE__ */ jsxs12("svg", {
29377
29538
  className: "h-14 w-14 text-brand",
29378
29539
  viewBox: "-11.5 -10.23174 23 20.46348",
29379
29540
  fill: "none",
@@ -29413,7 +29574,7 @@ var PreviewIllustration = () => {
29413
29574
  ]
29414
29575
  })
29415
29576
  }),
29416
- /* @__PURE__ */ jsxs10("div", {
29577
+ /* @__PURE__ */ jsxs12("div", {
29417
29578
  className: "mt-2 flex items-center gap-2",
29418
29579
  children: [
29419
29580
  /* @__PURE__ */ jsx54("div", {
@@ -29462,7 +29623,7 @@ var PipelineIllustration = ({ kind }) => {
29462
29623
  return /* @__PURE__ */ jsx54(RenderIllustration, {});
29463
29624
  };
29464
29625
  var AutomationsSection = () => {
29465
- return /* @__PURE__ */ jsxs10("div", {
29626
+ return /* @__PURE__ */ jsxs12("div", {
29466
29627
  children: [
29467
29628
  /* @__PURE__ */ jsx54(SectionTitle, {
29468
29629
  children: "Create video apps and automations"
@@ -29475,13 +29636,13 @@ var AutomationsSection = () => {
29475
29636
  className: "py-4",
29476
29637
  children: /* @__PURE__ */ jsx54("dl", {
29477
29638
  className: "grid grid-cols-1 justify-items-stretch gap-5 lg:grid-cols-3 lg:justify-items-center lg:gap-0",
29478
- children: appPipeline.map((item) => /* @__PURE__ */ jsxs10("div", {
29639
+ children: appPipeline.map((item) => /* @__PURE__ */ jsxs12("div", {
29479
29640
  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",
29480
29641
  children: [
29481
29642
  /* @__PURE__ */ jsx54(PipelineIllustration, {
29482
29643
  kind: item.illustration
29483
29644
  }),
29484
- /* @__PURE__ */ jsxs10("div", {
29645
+ /* @__PURE__ */ jsxs12("div", {
29485
29646
  className: "mb-2 flex items-center gap-2.5",
29486
29647
  children: [
29487
29648
  /* @__PURE__ */ jsx54("div", {
@@ -29506,7 +29667,7 @@ var AutomationsSection = () => {
29506
29667
  }, item.step))
29507
29668
  })
29508
29669
  }),
29509
- /* @__PURE__ */ jsxs10("div", {
29670
+ /* @__PURE__ */ jsxs12("div", {
29510
29671
  className: "mt-8 flex flex-wrap justify-center gap-x-5 gap-y-2 fontbrand text-base text-muted sm:text-sm",
29511
29672
  children: [
29512
29673
  /* @__PURE__ */ jsx54("span", {
@@ -29527,7 +29688,7 @@ var AutomationsSection_default = AutomationsSection;
29527
29688
 
29528
29689
  // src/components/homepage/BackgroundAnimation.tsx
29529
29690
  import { useEffect as useEffect40 } from "react";
29530
- import { jsx as jsx56, jsxs as jsxs11 } from "react/jsx-runtime";
29691
+ import { jsx as jsx56, jsxs as jsxs13 } from "react/jsx-runtime";
29531
29692
  "use client";
29532
29693
  var rx = 0.2;
29533
29694
  var ry = 0.45;
@@ -29559,7 +29720,7 @@ var BackgroundAnimation = () => {
29559
29720
  }, [css]);
29560
29721
  return /* @__PURE__ */ jsx56("div", {
29561
29722
  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",
29562
- children: /* @__PURE__ */ jsxs11("svg", {
29723
+ children: /* @__PURE__ */ jsxs13("svg", {
29563
29724
  className: "translate-y-[-30%] lg:translate-y-[-50%]",
29564
29725
  viewBox: "0 0 1 1",
29565
29726
  style: {
@@ -29614,7 +29775,7 @@ var BackgroundAnimation = () => {
29614
29775
  };
29615
29776
 
29616
29777
  // src/components/homepage/CommunityStatsItems.tsx
29617
- import { jsx as jsx57, jsxs as jsxs12 } from "react/jsx-runtime";
29778
+ import { jsx as jsx57, jsxs as jsxs14 } from "react/jsx-runtime";
29618
29779
  var StatItemContent = ({
29619
29780
  content,
29620
29781
  width,
@@ -29647,10 +29808,10 @@ var Pill = ({ children, className }) => {
29647
29808
  });
29648
29809
  };
29649
29810
  var InstallsPerMonth = () => {
29650
- return /* @__PURE__ */ jsxs12(Pill, {
29811
+ return /* @__PURE__ */ jsxs14(Pill, {
29651
29812
  className: "w-[30%] flex-col",
29652
29813
  children: [
29653
- /* @__PURE__ */ jsxs12("div", {
29814
+ /* @__PURE__ */ jsxs14("div", {
29654
29815
  style: {
29655
29816
  display: "flex",
29656
29817
  alignItems: "center",
@@ -29658,7 +29819,7 @@ var InstallsPerMonth = () => {
29658
29819
  },
29659
29820
  children: [
29660
29821
  /* @__PURE__ */ jsx57(StatItemContent, {
29661
- content: "4M+",
29822
+ content: "5M+",
29662
29823
  width: "100px",
29663
29824
  fontSize: "2.5rem",
29664
29825
  fontWeight: "bold"
@@ -29689,10 +29850,10 @@ var InstallsPerMonth = () => {
29689
29850
  });
29690
29851
  };
29691
29852
  var PagesOfDocs = () => {
29692
- return /* @__PURE__ */ jsxs12(Pill, {
29853
+ return /* @__PURE__ */ jsxs14(Pill, {
29693
29854
  className: "flex-col",
29694
29855
  children: [
29695
- /* @__PURE__ */ jsxs12("div", {
29856
+ /* @__PURE__ */ jsxs14("div", {
29696
29857
  style: { display: "flex", alignItems: "center", gap: 8 },
29697
29858
  children: [
29698
29859
  /* @__PURE__ */ jsx57(StatItemContent, {
@@ -29726,7 +29887,7 @@ var PagesOfDocs = () => {
29726
29887
  ]
29727
29888
  });
29728
29889
  };
29729
- var TemplatesAndExamples = () => /* @__PURE__ */ jsxs12(Pill, {
29890
+ var TemplatesAndExamples = () => /* @__PURE__ */ jsxs14(Pill, {
29730
29891
  className: "w-[30%] flex items-center flex-row",
29731
29892
  children: [
29732
29893
  /* @__PURE__ */ jsx57(StatItemContent, {
@@ -29744,10 +29905,10 @@ var TemplatesAndExamples = () => /* @__PURE__ */ jsxs12(Pill, {
29744
29905
  ]
29745
29906
  });
29746
29907
  var GitHubStars = () => {
29747
- return /* @__PURE__ */ jsxs12(Pill, {
29908
+ return /* @__PURE__ */ jsxs14(Pill, {
29748
29909
  className: "w-[30%] flex-col",
29749
29910
  children: [
29750
- /* @__PURE__ */ jsxs12("div", {
29911
+ /* @__PURE__ */ jsxs14("div", {
29751
29912
  style: { display: "flex", alignItems: "center" },
29752
29913
  children: [
29753
29914
  /* @__PURE__ */ jsx57(StatItemContent, {
@@ -29784,7 +29945,7 @@ var GitHubStars = () => {
29784
29945
  var DiscordMembers = () => {
29785
29946
  return /* @__PURE__ */ jsx57(Pill, {
29786
29947
  className: "w-[30%]",
29787
- children: /* @__PURE__ */ jsxs12("div", {
29948
+ children: /* @__PURE__ */ jsxs14("div", {
29788
29949
  style: {
29789
29950
  width: "80%",
29790
29951
  display: "flex",
@@ -29792,7 +29953,7 @@ var DiscordMembers = () => {
29792
29953
  justifyContent: "center"
29793
29954
  },
29794
29955
  children: [
29795
- /* @__PURE__ */ jsxs12("div", {
29956
+ /* @__PURE__ */ jsxs14("div", {
29796
29957
  style: {
29797
29958
  display: "flex",
29798
29959
  flexDirection: "column",
@@ -29841,7 +30002,7 @@ var DiscordMembers = () => {
29841
30002
  var Contributors = () => {
29842
30003
  return /* @__PURE__ */ jsx57(Pill, {
29843
30004
  className: "w-[30%]",
29844
- children: /* @__PURE__ */ jsxs12("div", {
30005
+ children: /* @__PURE__ */ jsxs14("div", {
29845
30006
  style: { display: "flex", justifyContent: "center" },
29846
30007
  children: [
29847
30008
  /* @__PURE__ */ jsx57("div", {
@@ -29861,7 +30022,7 @@ var Contributors = () => {
29861
30022
  width: "65px"
29862
30023
  })
29863
30024
  }),
29864
- /* @__PURE__ */ jsxs12("div", {
30025
+ /* @__PURE__ */ jsxs14("div", {
29865
30026
  style: {
29866
30027
  display: "flex",
29867
30028
  flexDirection: "column",
@@ -29889,14 +30050,14 @@ var Contributors = () => {
29889
30050
  };
29890
30051
 
29891
30052
  // src/components/homepage/CommunityStats.tsx
29892
- import { jsx as jsx58, jsxs as jsxs13 } from "react/jsx-runtime";
30053
+ import { jsx as jsx58, jsxs as jsxs15 } from "react/jsx-runtime";
29893
30054
  var SectionLink = ({ href, children }) => /* @__PURE__ */ jsx58("a", {
29894
30055
  target: "_blank",
29895
30056
  href,
29896
30057
  className: "no-underline text-inherit contents",
29897
30058
  children
29898
30059
  });
29899
- var CommunityStats = () => /* @__PURE__ */ jsxs13("div", {
30060
+ var CommunityStats = () => /* @__PURE__ */ jsxs15("div", {
29900
30061
  className: "m-auto max-w-[700px] text-center",
29901
30062
  children: [
29902
30063
  /* @__PURE__ */ jsx58(SectionTitle, {
@@ -29906,7 +30067,7 @@ var CommunityStats = () => /* @__PURE__ */ jsxs13("div", {
29906
30067
  className: "fontbrand text-center mb-10 -mt-4",
29907
30068
  children: "Join a thriving community of developers."
29908
30069
  }),
29909
- /* @__PURE__ */ jsxs13("div", {
30070
+ /* @__PURE__ */ jsxs15("div", {
29910
30071
  className: "flex flex-wrap justify-between gap-4 w-full items-center",
29911
30072
  children: [
29912
30073
  /* @__PURE__ */ jsx58(SectionLink, {
@@ -29941,8 +30102,8 @@ var CommunityStats_default = CommunityStats;
29941
30102
 
29942
30103
  // ../player/dist/esm/index.mjs
29943
30104
  import { createContext as createContext32 } from "react";
29944
- import { jsx as jsx59, jsxs as jsxs14 } from "react/jsx-runtime";
29945
- import { jsx as jsx214, jsxs as jsxs24, Fragment as Fragment12 } from "react/jsx-runtime";
30105
+ import { jsx as jsx59, jsxs as jsxs16 } from "react/jsx-runtime";
30106
+ import { jsx as jsx214, jsxs as jsxs24, Fragment as Fragment13 } from "react/jsx-runtime";
29946
30107
  import React57 from "react";
29947
30108
  import { useContext as useContext210, useEffect as useEffect41, useState as useState40 } from "react";
29948
30109
  import { useContext as useContext46, useLayoutEffect as useLayoutEffect18 } from "react";
@@ -29986,7 +30147,7 @@ import { jsx as jsx74, jsxs as jsxs33 } from "react/jsx-runtime";
29986
30147
  import { jsx as jsx84, jsxs as jsxs43 } from "react/jsx-runtime";
29987
30148
  import { useCallback as useCallback52, useEffect as useEffect92, useMemo as useMemo55, useState as useState82 } from "react";
29988
30149
  import { useEffect as useEffect83, useRef as useRef62, useState as useState72 } from "react";
29989
- import { jsx as jsx94, jsxs as jsxs53 } from "react/jsx-runtime";
30150
+ import { jsx as jsx94, jsxs as jsxs52 } from "react/jsx-runtime";
29990
30151
  import { useCallback as useCallback62, useEffect as useEffect102, useMemo as useMemo62, useRef as useRef72, useState as useState92 } from "react";
29991
30152
  import { jsx as jsx104, jsxs as jsxs62 } from "react/jsx-runtime";
29992
30153
  import { useMemo as useMemo72 } from "react";
@@ -29995,7 +30156,7 @@ import { useMemo as useMemo82 } from "react";
29995
30156
  import { jsx as jsx114, jsxs as jsxs82, Fragment as Fragment23 } from "react/jsx-runtime";
29996
30157
  import { useCallback as useCallback92, useMemo as useMemo112 } from "react";
29997
30158
  import { useCallback as useCallback82, useMemo as useMemo102, useRef as useRef92 } from "react";
29998
- import { jsx as jsx124, jsxs as jsxs92, Fragment as Fragment32 } from "react/jsx-runtime";
30159
+ import { jsx as jsx124, jsxs as jsxs92, Fragment as Fragment33 } from "react/jsx-runtime";
29999
30160
  import { useCallback as useCallback112, useMemo as useMemo132, useRef as useRef112, useState as useState122 } from "react";
30000
30161
  import { jsx as jsx133 } from "react/jsx-runtime";
30001
30162
 
@@ -31542,7 +31703,7 @@ var PlayIcon = () => {
31542
31703
  });
31543
31704
  };
31544
31705
  var PauseIcon = () => {
31545
- return /* @__PURE__ */ jsxs14("svg", {
31706
+ return /* @__PURE__ */ jsxs16("svg", {
31546
31707
  viewBox: "0 0 100 100",
31547
31708
  width: ICON_SIZE2,
31548
31709
  height: ICON_SIZE2,
@@ -31576,7 +31737,7 @@ var FullscreenIcon = ({
31576
31737
  const out = isFullscreen ? 0 : strokeWidth2 / 2;
31577
31738
  const middleInset = isFullscreen ? strokeWidth2 * 1.6 : strokeWidth2 / 2;
31578
31739
  const inset = isFullscreen ? strokeWidth2 * 1.6 : strokeWidth2 * 2;
31579
- return /* @__PURE__ */ jsxs14("svg", {
31740
+ return /* @__PURE__ */ jsxs16("svg", {
31580
31741
  viewBox: `0 0 ${viewSize} ${viewSize}`,
31581
31742
  height: fullscreenIconSize,
31582
31743
  width: fullscreenIconSize,
@@ -31664,7 +31825,7 @@ var studioStyle = {
31664
31825
  };
31665
31826
  var BufferingIndicator = ({ type }) => {
31666
31827
  const style = type === "player" ? playerStyle : studioStyle;
31667
- return /* @__PURE__ */ jsxs24(Fragment12, {
31828
+ return /* @__PURE__ */ jsxs24(Fragment13, {
31668
31829
  children: [
31669
31830
  /* @__PURE__ */ jsx214("style", {
31670
31831
  type: "text/css",
@@ -33149,7 +33310,7 @@ var PlaybackrateOption = ({ rate, onSelect, selectedRate, keyboardSelectedRate }
33149
33310
  backgroundColor: hovered || isFocused ? "#eee" : "transparent"
33150
33311
  };
33151
33312
  }, [hovered, isFocused]);
33152
- return /* @__PURE__ */ jsxs53("div", {
33313
+ return /* @__PURE__ */ jsxs52("div", {
33153
33314
  onPointerEnter: onMouseEnter,
33154
33315
  onPointerLeave: onMouseLeave,
33155
33316
  tabIndex: 0,
@@ -33276,13 +33437,13 @@ var PlaybackrateControl = ({ playbackRates, canvasSize }) => {
33276
33437
  }, [setIsComponentVisible]);
33277
33438
  return /* @__PURE__ */ jsx94("div", {
33278
33439
  ref,
33279
- children: /* @__PURE__ */ jsxs53("button", {
33440
+ children: /* @__PURE__ */ jsxs52("button", {
33280
33441
  type: "button",
33281
33442
  "aria-label": "Change playback rate",
33282
33443
  style: button,
33283
33444
  onClick,
33284
33445
  children: [
33285
- /* @__PURE__ */ jsxs53("div", {
33446
+ /* @__PURE__ */ jsxs52("div", {
33286
33447
  style: label2,
33287
33448
  children: [
33288
33449
  playbackRate,
@@ -34265,7 +34426,7 @@ var PlayerUI = ({
34265
34426
  showPosterWhenBufferingAndPaused && showBufferIndicator && !player.isPlaying()
34266
34427
  ].some(Boolean);
34267
34428
  const { left, top, width, height, ...outerWithoutScale } = outer;
34268
- const content = /* @__PURE__ */ jsxs92(Fragment32, {
34429
+ const content = /* @__PURE__ */ jsxs92(Fragment33, {
34269
34430
  children: [
34270
34431
  /* @__PURE__ */ jsxs92("div", {
34271
34432
  style: outer,
@@ -36984,6 +37145,7 @@ var makeStableFramePool = () => {
36984
37145
  if (!context) {
36985
37146
  throw new Error("Could not create canvas context");
36986
37147
  }
37148
+ context.clearRect(0, 0, stableCanvas.width, stableCanvas.height);
36987
37149
  context.drawImage(canvas, 0, 0);
36988
37150
  let released = false;
36989
37151
  const stableFrame = {
@@ -37670,6 +37832,9 @@ class MediaPlayer {
37670
37832
  }
37671
37833
  const canDecode = await videoTrack.canDecode();
37672
37834
  if (!canDecode) {
37835
+ if (videoTrack.codec === "prores") {
37836
+ return { type: "cannot-decode-prores" };
37837
+ }
37673
37838
  return { type: "cannot-decode" };
37674
37839
  }
37675
37840
  if (this.isDisposalError()) {
@@ -38379,6 +38544,9 @@ var AudioForPreviewAssertedShowing = ({
38379
38544
  handleError(new Error(`No video or audio tracks found for ${preloadedSrc}.`), `No video or audio tracks found for ${preloadedSrc}, falling back to <Html5Audio>`);
38380
38545
  return;
38381
38546
  }
38547
+ if (result.type === "cannot-decode-prores") {
38548
+ 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.`);
38549
+ }
38382
38550
  if (result.type === "success") {
38383
38551
  setMediaPlayerReady(true);
38384
38552
  setMediaDurationInSeconds(result.durationInSeconds);
@@ -39686,6 +39854,9 @@ var getSinks = async (src, logLevel, credentials, requestInit) => {
39686
39854
  }
39687
39855
  const canDecode = await videoTrack.canDecode();
39688
39856
  if (!canDecode) {
39857
+ if (videoTrack.codec === "prores") {
39858
+ return "cannot-decode-prores";
39859
+ }
39689
39860
  return "cannot-decode";
39690
39861
  }
39691
39862
  const sampleSink = new VideoSampleSink(videoTrack);
@@ -39937,6 +40108,12 @@ var extractFrameInternal = async ({
39937
40108
  if (video === "cannot-decode") {
39938
40109
  return { type: "cannot-decode", durationInSeconds: mediaDurationInSeconds };
39939
40110
  }
40111
+ if (video === "cannot-decode-prores") {
40112
+ return {
40113
+ type: "cannot-decode-prores",
40114
+ durationInSeconds: mediaDurationInSeconds
40115
+ };
40116
+ }
39940
40117
  if (video === "unknown-container-format") {
39941
40118
  return { type: "unknown-container-format" };
39942
40119
  }
@@ -40088,6 +40265,12 @@ var extractFrameAndAudio = async ({
40088
40265
  durationInSeconds: video.durationInSeconds
40089
40266
  };
40090
40267
  }
40268
+ if (video?.type === "cannot-decode-prores") {
40269
+ return {
40270
+ type: "cannot-decode-prores",
40271
+ durationInSeconds: video.durationInSeconds
40272
+ };
40273
+ }
40091
40274
  if (video?.type === "unknown-container-format") {
40092
40275
  return { type: "unknown-container-format" };
40093
40276
  }
@@ -40173,6 +40356,15 @@ var addBroadcastChannelListener = () => {
40173
40356
  window.remotion_broadcastChannel.postMessage(cannotDecodeResponse);
40174
40357
  return;
40175
40358
  }
40359
+ if (result.type === "cannot-decode-prores") {
40360
+ const cannotDecodeProresResponse = {
40361
+ type: "response-cannot-decode-prores",
40362
+ id: data.id,
40363
+ durationInSeconds: result.durationInSeconds
40364
+ };
40365
+ window.remotion_broadcastChannel.postMessage(cannotDecodeProresResponse);
40366
+ return;
40367
+ }
40176
40368
  if (result.type === "cannot-decode-alpha") {
40177
40369
  const cannotDecodeAlphaResponse = {
40178
40370
  type: "response-cannot-decode-alpha",
@@ -40317,6 +40509,14 @@ var extractFrameViaBroadcastChannel = async ({
40317
40509
  window.remotion_broadcastChannel.removeEventListener("message", onMessage);
40318
40510
  return;
40319
40511
  }
40512
+ if (data.type === "response-cannot-decode-prores") {
40513
+ resolve({
40514
+ type: "cannot-decode-prores",
40515
+ durationInSeconds: data.durationInSeconds
40516
+ });
40517
+ window.remotion_broadcastChannel.removeEventListener("message", onMessage);
40518
+ return;
40519
+ }
40320
40520
  if (data.type === "response-network-error") {
40321
40521
  resolve({ type: "network-error" });
40322
40522
  window.remotion_broadcastChannel.removeEventListener("message", onMessage);
@@ -40487,6 +40687,9 @@ var AudioForRendering2 = ({
40487
40687
  if (result.type === "cannot-decode-alpha") {
40488
40688
  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.`);
40489
40689
  }
40690
+ if (result.type === "cannot-decode-prores") {
40691
+ 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.`);
40692
+ }
40490
40693
  if (result.type === "network-error") {
40491
40694
  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>`);
40492
40695
  return;
@@ -40583,6 +40786,12 @@ var AudioForRendering2 = ({
40583
40786
  };
40584
40787
  var { validateMediaProps: validateMediaProps2 } = Internals;
40585
40788
  var audioSchema = {
40789
+ src: {
40790
+ type: "asset",
40791
+ default: undefined,
40792
+ description: "Source",
40793
+ keyframable: false
40794
+ },
40586
40795
  ...Internals.baseSchema,
40587
40796
  volume: {
40588
40797
  type: "number",
@@ -40693,6 +40902,35 @@ var Audio2 = Interactive.withSchema({
40693
40902
  schema: audioSchema,
40694
40903
  supportsEffects: false
40695
40904
  });
40905
+ var getVideoSequenceDuration = ({
40906
+ durationInFrames,
40907
+ loop,
40908
+ playbackRate,
40909
+ trimAfter,
40910
+ trimBefore
40911
+ }) => {
40912
+ if (loop || trimAfter === undefined) {
40913
+ return durationInFrames;
40914
+ }
40915
+ const trimmedDuration = Internals.calculateMediaDuration({
40916
+ trimAfter,
40917
+ trimBefore,
40918
+ playbackRate,
40919
+ mediaDurationInFrames: Infinity
40920
+ });
40921
+ return Math.min(durationInFrames ?? Infinity, trimmedDuration);
40922
+ };
40923
+ var PRORES_DOCS_URL = "https://www.remotion.dev/docs/videos/prores";
40924
+ var proresDecoderNotEnabledMessage = (src) => {
40925
+ 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.)`;
40926
+ };
40927
+
40928
+ class ProResDecoderNotEnabledError extends Error {
40929
+ constructor(src) {
40930
+ super(proresDecoderNotEnabledMessage(src));
40931
+ this.name = "ProResDecoderNotEnabledError";
40932
+ }
40933
+ }
40696
40934
  var cache2 = new Map;
40697
40935
  var cacheVideoFrame = (src, sourceCanvas) => {
40698
40936
  const { width, height } = sourceCanvas;
@@ -40941,6 +41179,9 @@ var VideoForPreviewAssertedShowing = ({
40941
41179
  handleError(new Error(`Cannot decode ${preloadedSrc}.`), `Cannot decode ${preloadedSrc}, falling back to <OffthreadVideo>`);
40942
41180
  return;
40943
41181
  }
41182
+ if (result.type === "cannot-decode-prores") {
41183
+ throw new ProResDecoderNotEnabledError(preloadedSrc);
41184
+ }
40944
41185
  if (result.type === "no-tracks") {
40945
41186
  handleError(new Error(`No video or audio tracks found for ${preloadedSrc}.`), `No video or audio tracks found for ${preloadedSrc}, falling back to <OffthreadVideo>`);
40946
41187
  return;
@@ -40951,6 +41192,10 @@ var VideoForPreviewAssertedShowing = ({
40951
41192
  hasDrawnRealFrameRef.current = true;
40952
41193
  }
40953
41194
  }).catch((error2) => {
41195
+ if (error2 instanceof ProResDecoderNotEnabledError) {
41196
+ onErrorRef.current?.(error2);
41197
+ throw error2;
41198
+ }
40954
41199
  const [action, errorToUse] = callOnErrorAndResolve({
40955
41200
  onError: onErrorRef.current,
40956
41201
  error: error2,
@@ -41248,6 +41493,12 @@ var VideoForRendering2 = ({
41248
41493
  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);
41249
41494
  return;
41250
41495
  }
41496
+ if (result.type === "cannot-decode-prores") {
41497
+ const proresError = new ProResDecoderNotEnabledError(src);
41498
+ onError?.(proresError);
41499
+ cancelRender3(proresError);
41500
+ return;
41501
+ }
41251
41502
  if (result.type === "cannot-decode-alpha") {
41252
41503
  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);
41253
41504
  return;
@@ -41443,6 +41694,12 @@ var VideoForRendering2 = ({
41443
41694
  };
41444
41695
  var { validateMediaTrimProps: validateMediaTrimProps2, resolveTrimProps: resolveTrimProps2, validateMediaProps: validateMediaProps22 } = Internals;
41445
41696
  var videoSchema = {
41697
+ src: {
41698
+ type: "asset",
41699
+ default: undefined,
41700
+ description: "Source",
41701
+ keyframable: false
41702
+ },
41446
41703
  ...Internals.baseSchema,
41447
41704
  volume: {
41448
41705
  type: "number",
@@ -41462,6 +41719,7 @@ var videoSchema = {
41462
41719
  hiddenFromList: false,
41463
41720
  keyframable: false
41464
41721
  },
41722
+ muted: { type: "boolean", default: false, description: "Muted" },
41465
41723
  loop: { type: "boolean", default: false, description: "Loop" },
41466
41724
  ...Internals.transformSchema
41467
41725
  };
@@ -41620,6 +41878,13 @@ var VideoInner = ({
41620
41878
  const mediaStartsAt = Internals.useMediaStartsAt();
41621
41879
  const videoConfig = useVideoConfig();
41622
41880
  const sequenceDurationInFrames = Math.min(durationInFrames ?? Infinity, Math.max(0, videoConfig.durationInFrames - (from ?? 0)));
41881
+ const videoSequenceDuration = getVideoSequenceDuration({
41882
+ durationInFrames,
41883
+ loop: loop ?? false,
41884
+ playbackRate: playbackRate ?? 1,
41885
+ trimAfter,
41886
+ trimBefore
41887
+ });
41623
41888
  const basicInfo = Internals.useBasicMediaInTimeline({
41624
41889
  src,
41625
41890
  volume,
@@ -41667,7 +41932,7 @@ var VideoInner = ({
41667
41932
  return /* @__PURE__ */ jsx65(Sequence, {
41668
41933
  layout: "none",
41669
41934
  from: from ?? 0,
41670
- durationInFrames: basicInfo.duration,
41935
+ durationInFrames: videoSequenceDuration,
41671
41936
  freeze,
41672
41937
  _remotionInternalStack: stack,
41673
41938
  _remotionInternalIsMedia: isMedia,
@@ -41771,7 +42036,7 @@ var getIndexFromPosition = (clientX, clientY) => {
41771
42036
 
41772
42037
  // src/components/homepage/Demo/Switcher.tsx
41773
42038
  import { useCallback as useCallback41 } from "react";
41774
- import { jsx as jsx66, jsxs as jsxs15 } from "react/jsx-runtime";
42039
+ import { jsx as jsx66, jsxs as jsxs17 } from "react/jsx-runtime";
41775
42040
  var Switcher = ({ type, theme, onTap }) => {
41776
42041
  const onPointerDown = useCallback41((e) => {
41777
42042
  e.stopPropagation();
@@ -41796,7 +42061,7 @@ var Switcher = ({ type, theme, onTap }) => {
41796
42061
  alignItems: "center",
41797
42062
  display: "flex"
41798
42063
  },
41799
- children: /* @__PURE__ */ jsxs15("svg", {
42064
+ children: /* @__PURE__ */ jsxs17("svg", {
41800
42065
  style: { height: switcherSize / 2 },
41801
42066
  viewBox: "0 0 320 512",
41802
42067
  children: [
@@ -41814,7 +42079,7 @@ var Switcher = ({ type, theme, onTap }) => {
41814
42079
  };
41815
42080
 
41816
42081
  // src/components/homepage/Demo/Card.tsx
41817
- import { jsx as jsx68, jsxs as jsxs16, Fragment as Fragment13 } from "react/jsx-runtime";
42082
+ import { jsx as jsx68, jsxs as jsxs18, Fragment as Fragment14 } from "react/jsx-runtime";
41818
42083
  var arePositionsEqual = (a2, b2) => {
41819
42084
  return a2.every((pos, i) => {
41820
42085
  return pos.x === b2[i].x && pos.y === b2[i].y;
@@ -41991,7 +42256,7 @@ var Card2 = ({
41991
42256
  borderRadius: 13,
41992
42257
  cursor: "grab"
41993
42258
  },
41994
- children: /* @__PURE__ */ jsxs16(AbsoluteFill, {
42259
+ children: /* @__PURE__ */ jsxs18(AbsoluteFill, {
41995
42260
  style: {
41996
42261
  backgroundColor: color,
41997
42262
  borderRadius: 12
@@ -41999,7 +42264,7 @@ var Card2 = ({
41999
42264
  className: "transition-opacity duration-200",
42000
42265
  children: [
42001
42266
  content,
42002
- withSwitcher ? /* @__PURE__ */ jsxs16(Fragment13, {
42267
+ withSwitcher ? /* @__PURE__ */ jsxs18(Fragment14, {
42003
42268
  children: [
42004
42269
  /* @__PURE__ */ jsx68(Switcher, {
42005
42270
  onTap: onClickLeft,
@@ -42019,7 +42284,7 @@ var Card2 = ({
42019
42284
  };
42020
42285
 
42021
42286
  // src/components/homepage/Demo/CurrentCountry.tsx
42022
- import { jsx as jsx69, jsxs as jsxs17 } from "react/jsx-runtime";
42287
+ import { jsx as jsx69, jsxs as jsxs19 } from "react/jsx-runtime";
42023
42288
  var CurrentCountry = ({ theme, countryPaths, countryLabel }) => {
42024
42289
  const { fps } = useVideoConfig();
42025
42290
  const frame = useCurrentFrame();
@@ -42034,7 +42299,7 @@ var CurrentCountry = ({ theme, countryPaths, countryLabel }) => {
42034
42299
  frame,
42035
42300
  delay: 10
42036
42301
  });
42037
- return /* @__PURE__ */ jsxs17(AbsoluteFill, {
42302
+ return /* @__PURE__ */ jsxs19(AbsoluteFill, {
42038
42303
  style: { overflow: "hidden" },
42039
42304
  children: [
42040
42305
  /* @__PURE__ */ jsx69(AbsoluteFill, {
@@ -42052,7 +42317,7 @@ var CurrentCountry = ({ theme, countryPaths, countryLabel }) => {
42052
42317
  })
42053
42318
  })
42054
42319
  }),
42055
- /* @__PURE__ */ jsxs17(AbsoluteFill, {
42320
+ /* @__PURE__ */ jsxs19(AbsoluteFill, {
42056
42321
  style: {
42057
42322
  alignItems: "center",
42058
42323
  justifyContent: "center"
@@ -42341,7 +42606,7 @@ var DisplayedEmoji = ({ emoji }) => {
42341
42606
  };
42342
42607
 
42343
42608
  // src/components/homepage/Demo/EmojiCard.tsx
42344
- import { jsx as jsx75, jsxs as jsxs18, Fragment as Fragment14 } from "react/jsx-runtime";
42609
+ import { jsx as jsx75, jsxs as jsxs20, Fragment as Fragment15 } from "react/jsx-runtime";
42345
42610
  var applyTransforms = ({ ref1, ref2, ref3, transforms }) => {
42346
42611
  ref1.style.transform = `translateX(${transforms[0]}%)`;
42347
42612
  ref2.style.transform = `translateX(${transforms[1]}%)`;
@@ -42437,7 +42702,7 @@ var EmojiCardRefFn = ({ emojiIndex }, ref) => {
42437
42702
  });
42438
42703
  }, []);
42439
42704
  const env = useRemotionEnvironment();
42440
- return /* @__PURE__ */ jsxs18(AbsoluteFill, {
42705
+ return /* @__PURE__ */ jsxs20(AbsoluteFill, {
42441
42706
  style: {
42442
42707
  justifyContent: "center",
42443
42708
  alignItems: "center",
@@ -42469,7 +42734,7 @@ var EmojiCardRefFn = ({ emojiIndex }, ref) => {
42469
42734
  children: /* @__PURE__ */ jsx75(DisplayedEmoji, {
42470
42735
  emoji: emojiIndex
42471
42736
  })
42472
- }) : /* @__PURE__ */ jsxs18(Fragment14, {
42737
+ }) : /* @__PURE__ */ jsxs20(Fragment15, {
42473
42738
  children: [
42474
42739
  /* @__PURE__ */ jsx75("div", {
42475
42740
  ref: ref1,
@@ -42517,7 +42782,7 @@ var Minus = ({ leftOffset, minusSignOpacity }) => {
42517
42782
  };
42518
42783
 
42519
42784
  // src/components/homepage/Demo/DigitWheel.tsx
42520
- import { jsx as jsx78, jsxs as jsxs19 } from "react/jsx-runtime";
42785
+ import { jsx as jsx78, jsxs as jsxs21 } from "react/jsx-runtime";
42521
42786
  var DURATION = 25;
42522
42787
  var items = 10;
42523
42788
  var NUM_WIDTH = 36;
@@ -42561,7 +42826,7 @@ var Wheel = ({ delay: delay2, digits, renderDigit, isLeadingDigit, isNegative })
42561
42826
  const rotation = progresses.map((p, i) => {
42562
42827
  return p * offsets[i];
42563
42828
  }).reduce((a2, b2) => a2 + b2, 0) + rotations[0];
42564
- return /* @__PURE__ */ jsxs19("div", {
42829
+ return /* @__PURE__ */ jsxs21("div", {
42565
42830
  style: {
42566
42831
  position: "relative",
42567
42832
  width: NUM_WIDTH,
@@ -42622,14 +42887,14 @@ var Wheel = ({ delay: delay2, digits, renderDigit, isLeadingDigit, isNegative })
42622
42887
  };
42623
42888
 
42624
42889
  // src/components/homepage/Demo/TemperatureNumber.tsx
42625
- import { jsx as jsx79, jsxs as jsxs20 } from "react/jsx-runtime";
42890
+ import { jsx as jsx79, jsxs as jsxs25 } from "react/jsx-runtime";
42626
42891
  var TemperatureNumber = ({ theme, temperatureInCelsius }) => {
42627
42892
  const temperatureInFahrenheit = temperatureInCelsius * 9 / 5 + 32;
42628
42893
  const celsiusDegree = Math.abs(temperatureInCelsius);
42629
42894
  const fahrenheitDegree = Math.abs(temperatureInFahrenheit);
42630
42895
  const paddedCelsiusDegree = String(celsiusDegree).padStart(fahrenheitDegree.toFixed(0).length, "0").split("");
42631
42896
  const paddedFahrenheitDegree = fahrenheitDegree.toFixed(0).padStart(paddedCelsiusDegree.length, "0").split("");
42632
- return /* @__PURE__ */ jsxs20("div", {
42897
+ return /* @__PURE__ */ jsxs25("div", {
42633
42898
  style: {
42634
42899
  lineHeight: 1.1,
42635
42900
  fontFamily: "GTPlanar",
@@ -42677,13 +42942,13 @@ var TemperatureNumber = ({ theme, temperatureInCelsius }) => {
42677
42942
  };
42678
42943
 
42679
42944
  // src/components/homepage/Demo/Temperature.tsx
42680
- import { jsx as jsx80, jsxs as jsxs21 } from "react/jsx-runtime";
42945
+ import { jsx as jsx80, jsxs as jsxs27 } from "react/jsx-runtime";
42681
42946
  var Temperature = ({ theme, city, temperatureInCelsius }) => {
42682
42947
  if (temperatureInCelsius === null) {
42683
42948
  return null;
42684
42949
  }
42685
42950
  return /* @__PURE__ */ jsx80(AbsoluteFill, {
42686
- children: /* @__PURE__ */ jsxs21(AbsoluteFill, {
42951
+ children: /* @__PURE__ */ jsxs27(AbsoluteFill, {
42687
42952
  style: {
42688
42953
  alignItems: "center",
42689
42954
  justifyContent: "center",
@@ -42691,7 +42956,7 @@ var Temperature = ({ theme, city, temperatureInCelsius }) => {
42691
42956
  paddingRight: 20
42692
42957
  },
42693
42958
  children: [
42694
- /* @__PURE__ */ jsxs21("div", {
42959
+ /* @__PURE__ */ jsxs27("div", {
42695
42960
  style: {
42696
42961
  color: "#0b84f3",
42697
42962
  fontFamily: "GTPlanar",
@@ -42716,7 +42981,7 @@ var Temperature = ({ theme, city, temperatureInCelsius }) => {
42716
42981
 
42717
42982
  // src/components/homepage/Demo/TrendingRepos.tsx
42718
42983
  import { useMemo as useMemo60 } from "react";
42719
- import { jsx as jsx81, jsxs as jsxs25 } from "react/jsx-runtime";
42984
+ import { jsx as jsx81, jsxs as jsxs28 } from "react/jsx-runtime";
42720
42985
  var TrendingRepoItem = ({ repo, theme, number }) => {
42721
42986
  const frame = useCurrentFrame();
42722
42987
  const { fps } = useVideoConfig();
@@ -42738,7 +43003,7 @@ var TrendingRepoItem = ({ repo, theme, number }) => {
42738
43003
  opacity: progress
42739
43004
  };
42740
43005
  }, [progress, theme]);
42741
- return /* @__PURE__ */ jsxs25("div", {
43006
+ return /* @__PURE__ */ jsxs28("div", {
42742
43007
  style: item,
42743
43008
  children: [
42744
43009
  number,
@@ -42769,7 +43034,7 @@ var TrendingRepos = ({ theme, trending }) => {
42769
43034
  paddingLeft: 20,
42770
43035
  paddingRight: 20
42771
43036
  },
42772
- children: /* @__PURE__ */ jsxs25("div", {
43037
+ children: /* @__PURE__ */ jsxs28("div", {
42773
43038
  children: [
42774
43039
  /* @__PURE__ */ jsx81("div", {
42775
43040
  style: {
@@ -42902,7 +43167,7 @@ var Cards = ({
42902
43167
  };
42903
43168
 
42904
43169
  // src/components/homepage/Demo/Comp.tsx
42905
- import { jsx as jsx87, jsxs as jsxs27 } from "react/jsx-runtime";
43170
+ import { jsx as jsx87, jsxs as jsxs29 } from "react/jsx-runtime";
42906
43171
  var getDataAndProps = async () => {
42907
43172
  const location = await fetch("https://utils.remotion.dev/location").then((res) => res.json());
42908
43173
  const trending = await fetch(`https://bugs.remotion.dev/trending?lat=${location.latitude}&lng=${location.longitude}&country=${location.country}`).then((res) => res.json()).then((data) => {
@@ -42963,7 +43228,7 @@ var HomepageVideoComp = ({
42963
43228
  c2.free();
42964
43229
  };
42965
43230
  }, []);
42966
- return /* @__PURE__ */ jsxs27(AbsoluteFill, {
43231
+ return /* @__PURE__ */ jsxs29(AbsoluteFill, {
42967
43232
  style: {
42968
43233
  backgroundColor: theme === "dark" ? "#222" : "#fafafa"
42969
43234
  },
@@ -43029,7 +43294,7 @@ import {
43029
43294
  import { BufferTarget, StreamTarget } from "mediabunny";
43030
43295
 
43031
43296
  // ../core/dist/esm/version.mjs
43032
- var VERSION2 = "4.0.490";
43297
+ var VERSION2 = "4.0.492";
43033
43298
 
43034
43299
  // ../web-renderer/dist/esm/index.mjs
43035
43300
  import { AudioSample, VideoSample } from "mediabunny";
@@ -43585,6 +43850,8 @@ var createAudioSampleSource = ({
43585
43850
  });
43586
43851
  return { audioSampleSource, [Symbol.dispose]: () => audioSampleSource.close() };
43587
43852
  };
43853
+ var nestedHtmlInCanvasSupport = null;
43854
+ var forceDisableHtmlInCanvasForTesting = false;
43588
43855
  var supportsNativeHtmlInCanvas = () => {
43589
43856
  if (typeof document === "undefined") {
43590
43857
  return false;
@@ -43592,6 +43859,121 @@ var supportsNativeHtmlInCanvas = () => {
43592
43859
  const ctx = document.createElement("canvas").getContext("2d");
43593
43860
  return typeof ctx?.drawElementImage === "function";
43594
43861
  };
43862
+ var runNestedHtmlInCanvasProbe = () => {
43863
+ if (!supportsNativeHtmlInCanvas() || !document.body) {
43864
+ return Promise.resolve(false);
43865
+ }
43866
+ const outer = document.createElement("canvas");
43867
+ const inner2 = document.createElement("canvas");
43868
+ const outerTarget = document.createElement("div");
43869
+ const innerTarget = document.createElement("div");
43870
+ const outerCtx = outer.getContext("2d");
43871
+ const innerCtx = inner2.getContext("2d");
43872
+ if (!outerCtx || !innerCtx || typeof outer.requestPaint !== "function" || typeof inner2.requestPaint !== "function") {
43873
+ return Promise.resolve(false);
43874
+ }
43875
+ outer.layoutSubtree = true;
43876
+ inner2.layoutSubtree = true;
43877
+ outer.width = 4;
43878
+ outer.height = 4;
43879
+ inner2.width = 4;
43880
+ inner2.height = 4;
43881
+ Object.assign(outer.style, {
43882
+ display: "block",
43883
+ height: "4px",
43884
+ left: "0",
43885
+ pointerEvents: "none",
43886
+ position: "fixed",
43887
+ top: "0",
43888
+ visibility: "visible",
43889
+ width: "4px",
43890
+ zIndex: "2147483647"
43891
+ });
43892
+ Object.assign(inner2.style, {
43893
+ display: "block",
43894
+ height: "4px",
43895
+ width: "4px"
43896
+ });
43897
+ Object.assign(outerTarget.style, {
43898
+ display: "block",
43899
+ height: "4px",
43900
+ width: "4px"
43901
+ });
43902
+ Object.assign(innerTarget.style, {
43903
+ backgroundColor: "rgb(255, 0, 0)",
43904
+ display: "block",
43905
+ height: "4px",
43906
+ width: "4px"
43907
+ });
43908
+ inner2.appendChild(innerTarget);
43909
+ outerTarget.appendChild(inner2);
43910
+ outer.appendChild(outerTarget);
43911
+ document.body.appendChild(outer);
43912
+ return new Promise((resolve) => {
43913
+ let innerPainted = false;
43914
+ let settled = false;
43915
+ let timeout = null;
43916
+ const settle = (supported) => {
43917
+ if (settled) {
43918
+ return;
43919
+ }
43920
+ settled = true;
43921
+ if (timeout !== null) {
43922
+ window.clearTimeout(timeout);
43923
+ }
43924
+ outer.remove();
43925
+ resolve(supported);
43926
+ };
43927
+ timeout = window.setTimeout(() => settle(false), 1000);
43928
+ inner2.addEventListener("paint", () => {
43929
+ try {
43930
+ innerCtx.reset();
43931
+ const transform = innerCtx.drawElementImage(innerTarget, 0, 0, 4, 4);
43932
+ innerTarget.style.transform = transform.toString();
43933
+ innerPainted = true;
43934
+ requestAnimationFrame(() => outer.requestPaint());
43935
+ } catch {
43936
+ settle(false);
43937
+ }
43938
+ });
43939
+ outer.addEventListener("paint", () => {
43940
+ if (!innerPainted) {
43941
+ return;
43942
+ }
43943
+ try {
43944
+ outerCtx.reset();
43945
+ if (typeof outer.captureElementImage !== "function") {
43946
+ settle(false);
43947
+ return;
43948
+ }
43949
+ const elementImage = outer.captureElementImage(outerTarget);
43950
+ const transform = outerCtx.drawElementImage(elementImage, 0, 0, 4, 4);
43951
+ elementImage.close();
43952
+ outerTarget.style.transform = transform.toString();
43953
+ const pixel = outerCtx.getImageData(2, 2, 1, 1).data;
43954
+ settle(pixel[0] > 200 && pixel[1] < 20 && pixel[2] < 20 && pixel[3] > 200);
43955
+ } catch {
43956
+ settle(false);
43957
+ }
43958
+ });
43959
+ inner2.requestPaint();
43960
+ });
43961
+ };
43962
+ var supportsNestedHtmlInCanvas = () => {
43963
+ if (forceDisableHtmlInCanvasForTesting) {
43964
+ return Promise.resolve(false);
43965
+ }
43966
+ if (!nestedHtmlInCanvasSupport) {
43967
+ nestedHtmlInCanvasSupport = runNestedHtmlInCanvasProbe();
43968
+ }
43969
+ return nestedHtmlInCanvasSupport;
43970
+ };
43971
+ var countLayoutSubtreeCanvases = (element) => {
43972
+ return Array.from(element.querySelectorAll("canvas")).filter((canvas) => canvas.layoutSubtree === true).length;
43973
+ };
43974
+ var containsLayoutSubtreeCanvas = (element) => {
43975
+ return countLayoutSubtreeCanvases(element) > 0;
43976
+ };
43595
43977
  var setupHtmlInCanvas = ({
43596
43978
  wrapper,
43597
43979
  div,
@@ -43633,14 +44015,36 @@ var drawWithHtmlInCanvas = async ({
43633
44015
  htmlInCanvasContext,
43634
44016
  element,
43635
44017
  scaledWidth,
43636
- scaledHeight
44018
+ scaledHeight,
44019
+ waitForRenderReady,
44020
+ useElementImage
43637
44021
  }) => {
43638
44022
  const { ctx, layoutCanvas } = htmlInCanvasContext;
44023
+ if (layoutCanvas.width !== scaledWidth || layoutCanvas.height !== scaledHeight) {
44024
+ layoutCanvas.width = scaledWidth;
44025
+ layoutCanvas.height = scaledHeight;
44026
+ }
43639
44027
  await waitForPaint(layoutCanvas);
43640
- layoutCanvas.width = scaledWidth;
43641
- layoutCanvas.height = scaledHeight;
44028
+ const nestedPaintCycles = useElementImage ? countLayoutSubtreeCanvases(element) * 2 + 1 : 0;
44029
+ for (let i = 0;i < nestedPaintCycles; i++) {
44030
+ await new Promise((resolve) => requestAnimationFrame(() => resolve()));
44031
+ await waitForRenderReady();
44032
+ await waitForPaint(layoutCanvas);
44033
+ }
43642
44034
  ctx.reset();
43643
- ctx.drawElementImage(element, 0, 0, scaledWidth, scaledHeight);
44035
+ if (useElementImage) {
44036
+ if (typeof layoutCanvas.captureElementImage !== "function") {
44037
+ throw new Error("canvas.captureElementImage() is unavailable");
44038
+ }
44039
+ const elementImage = layoutCanvas.captureElementImage(element);
44040
+ try {
44041
+ ctx.drawElementImage(elementImage, 0, 0, scaledWidth, scaledHeight);
44042
+ } finally {
44043
+ elementImage.close();
44044
+ }
44045
+ } else {
44046
+ ctx.drawElementImage(element, 0, 0, scaledWidth, scaledHeight);
44047
+ }
43644
44048
  const offscreen = new OffscreenCanvas(scaledWidth, scaledHeight);
43645
44049
  const offCtx = offscreen.getContext("2d");
43646
44050
  if (!offCtx) {
@@ -43772,7 +44176,7 @@ function createScaffold({
43772
44176
  videoEnabled,
43773
44177
  defaultCodec,
43774
44178
  defaultOutName,
43775
- allowHtmlInCanvas,
44179
+ useHtmlInCanvas,
43776
44180
  pixelDensity
43777
44181
  }) {
43778
44182
  if (!ReactDOM6.createRoot) {
@@ -43799,7 +44203,7 @@ function createScaffold({
43799
44203
  const cleanupCSS = Internals.CSSUtils.injectCSS(Internals.CSSUtils.makeDefaultPreviewCSS(`.${scaffoldClassName}`, "white"));
43800
44204
  wrapper.appendChild(div);
43801
44205
  document.body.appendChild(wrapper);
43802
- const htmlInCanvasContext = allowHtmlInCanvas ? setupHtmlInCanvas({ wrapper, div, width: width2, height: height2 }) : null;
44206
+ const htmlInCanvasContext = useHtmlInCanvas ? setupHtmlInCanvas({ wrapper, div, width: width2, height: height2 }) : null;
43803
44207
  const errorHolder = { error: null };
43804
44208
  const root = ReactDOM6.createRoot(div, {
43805
44209
  onUncaughtError: (err, errorInfo) => {
@@ -44801,6 +45205,15 @@ var filterRequiresPrecompositing = (filter) => {
44801
45205
  }
44802
45206
  return null;
44803
45207
  };
45208
+ var snapshotTransformStyle = (computedStyle) => {
45209
+ return {
45210
+ display: computedStyle.display,
45211
+ rotate: computedStyle.rotate,
45212
+ scale: computedStyle.scale,
45213
+ transform: computedStyle.transform,
45214
+ transformOrigin: computedStyle.transformOrigin
45215
+ };
45216
+ };
44804
45217
  var isReplacedElement = (element) => {
44805
45218
  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;
44806
45219
  };
@@ -44851,7 +45264,8 @@ var getGlobalTransformOrigin = ({ transform }) => {
44851
45264
  };
44852
45265
  var calculateTransforms = ({
44853
45266
  element,
44854
- rootElement
45267
+ rootElement,
45268
+ transformStyleCache
44855
45269
  }) => {
44856
45270
  let parent = element;
44857
45271
  const transforms = [];
@@ -44861,10 +45275,19 @@ var calculateTransforms = ({
44861
45275
  let maskImageInfo = null;
44862
45276
  let filterForPrecompositing = null;
44863
45277
  while (parent) {
45278
+ const cachedTransformStyle = transformStyleCache.get(parent);
45279
+ const shouldReadComputedStyle = parent === element || cachedTransformStyle === undefined;
44864
45280
  const originalTransition = parent.style.transition;
44865
45281
  parent.style.transition = "none";
44866
- const computedStyle = getComputedStyle(parent);
45282
+ const computedStyle = shouldReadComputedStyle ? getComputedStyle(parent) : null;
45283
+ const transformStyle = computedStyle === null ? cachedTransformStyle : snapshotTransformStyle(computedStyle);
45284
+ if (computedStyle !== null) {
45285
+ transformStyleCache.set(parent, transformStyle);
45286
+ }
44867
45287
  if (parent === element) {
45288
+ if (computedStyle === null) {
45289
+ throw new Error("Element computed style not found");
45290
+ }
44868
45291
  elementComputedStyle = computedStyle;
44869
45292
  opacity2 = parseFloat(computedStyle.opacity);
44870
45293
  const maskImageValue = getMaskImageValue(computedStyle);
@@ -44887,9 +45310,9 @@ var calculateTransforms = ({
44887
45310
  }
44888
45311
  });
44889
45312
  }
44890
- const hasApplicableTransformCssValue = canApplyCssTransforms({ computedStyle, element: parent }) && hasAnyTransformCssValue(computedStyle);
45313
+ const hasApplicableTransformCssValue = canApplyCssTransforms({ computedStyle: transformStyle, element: parent }) && hasAnyTransformCssValue(transformStyle);
44891
45314
  if (hasApplicableTransformCssValue || parent === element) {
44892
- const toParse = hasApplicableTransformCssValue && hasTransformCssValue(computedStyle) ? computedStyle.transform : undefined;
45315
+ const toParse = hasApplicableTransformCssValue && hasTransformCssValue(transformStyle) ? transformStyle.transform : undefined;
44893
45316
  const matrix = new DOMMatrix(toParse);
44894
45317
  const resetTransforms = makeTransformResetter(parent);
44895
45318
  const { scale, rotate: rotate2 } = parent.style;
@@ -44904,7 +45327,7 @@ var calculateTransforms = ({
44904
45327
  const cleanup = resetTransforms(hasApplicableTransformCssValue);
44905
45328
  transforms.push({
44906
45329
  element: parent,
44907
- transformOrigin: computedStyle.transformOrigin,
45330
+ transformOrigin: transformStyle.transformOrigin,
44908
45331
  boundingClientRect: null,
44909
45332
  matrices: additionalMatrices
44910
45333
  });
@@ -45496,7 +45919,8 @@ var drawBackground = async ({
45496
45919
  internalState,
45497
45920
  scale,
45498
45921
  onlyBackgroundClipText: true,
45499
- waitForPageResponsiveness: null
45922
+ waitForPageResponsiveness: null,
45923
+ waitForRenderReady: () => Promise.resolve()
45500
45924
  });
45501
45925
  onlyBackgroundClipText.setTransform(new DOMMatrix().scale(scale, scale));
45502
45926
  element.style.backgroundClip = originalBackgroundClip;
@@ -46650,13 +47074,15 @@ var processNode = async ({
46650
47074
  internalState,
46651
47075
  rootElement,
46652
47076
  scale,
46653
- waitForPageResponsiveness
47077
+ waitForPageResponsiveness,
47078
+ transformStyleCache
46654
47079
  }) => {
46655
47080
  let __stack = [];
46656
47081
  try {
46657
47082
  const transforms = __using2(__stack, calculateTransforms({
46658
47083
  element,
46659
- rootElement
47084
+ rootElement,
47085
+ transformStyleCache
46660
47086
  }), 0);
46661
47087
  const { opacity: opacity2, computedStyle, totalMatrix, dimensions, precompositing } = transforms;
46662
47088
  if (opacity2 === 0) {
@@ -46715,7 +47141,8 @@ var processNode = async ({
46715
47141
  internalState,
46716
47142
  scale,
46717
47143
  onlyBackgroundClipText: false,
46718
- waitForPageResponsiveness
47144
+ waitForPageResponsiveness,
47145
+ waitForRenderReady: () => Promise.resolve()
46719
47146
  });
46720
47147
  if (waitForPageResponsiveness !== null) {
46721
47148
  await waitForPageResponsiveness();
@@ -46816,29 +47243,25 @@ var applyTextTransform = (text, transform) => {
46816
47243
  }
46817
47244
  return text;
46818
47245
  };
47246
+ var wordSegmenter = new Intl.Segmenter("en", { granularity: "word" });
46819
47247
  var findWords = (span) => {
46820
47248
  const originalText = span.textContent;
46821
- const segmenter = new Intl.Segmenter("en", { granularity: "word" });
46822
- const segments = segmenter.segment(span.textContent);
46823
- const words = Array.from(segments).map((s) => s.segment);
47249
+ const segments = Array.from(wordSegmenter.segment(originalText));
46824
47250
  const tokens = [];
46825
- for (let i = 0;i < words.length; i++) {
46826
- const wordsBefore = words.slice(0, i);
46827
- const wordsAfter = words.slice(i + 1);
46828
- const word = words[i];
46829
- const wordsBeforeText = wordsBefore.join("");
46830
- const wordsAfterText = wordsAfter.join("");
47251
+ for (const { index: index2, segment } of segments) {
47252
+ const wordsBeforeText = originalText.slice(0, index2);
47253
+ const wordsAfterText = originalText.slice(index2 + segment.length);
46831
47254
  const beforeNode = document.createTextNode(wordsBeforeText);
46832
47255
  const afterNode = document.createTextNode(wordsAfterText);
46833
47256
  const interstitialNode = document.createElement("span");
46834
- interstitialNode.textContent = word;
47257
+ interstitialNode.textContent = segment;
46835
47258
  span.textContent = "";
46836
47259
  span.appendChild(beforeNode);
46837
47260
  span.appendChild(interstitialNode);
46838
47261
  span.appendChild(afterNode);
46839
47262
  const rect = interstitialNode.getBoundingClientRect();
46840
47263
  span.textContent = originalText;
46841
- tokens.push({ text: word, rect });
47264
+ tokens.push({ text: segment, rect });
46842
47265
  }
46843
47266
  return tokens;
46844
47267
  };
@@ -47127,10 +47550,10 @@ var drawText = ({
47127
47550
  const ctm = contextToDraw.getTransform();
47128
47551
  const blurScale = Math.hypot(ctm.a, ctm.b);
47129
47552
  const { strokeFirst } = parsePaintOrder(paintOrder);
47553
+ const measurements = contextToDraw.measureText(originalText);
47554
+ const { fontBoundingBoxDescent, fontBoundingBoxAscent } = measurements;
47555
+ const fontHeight = fontBoundingBoxAscent + fontBoundingBoxDescent;
47130
47556
  for (const token of tokens) {
47131
- const measurements = contextToDraw.measureText(originalText);
47132
- const { fontBoundingBoxDescent, fontBoundingBoxAscent } = measurements;
47133
- const fontHeight = fontBoundingBoxAscent + fontBoundingBoxDescent;
47134
47557
  const leading = token.rect.height - fontHeight;
47135
47558
  const halfLeading = leading / 2;
47136
47559
  const x = (isRTL2 ? token.rect.right : token.rect.left) - parentRect.x;
@@ -47185,7 +47608,8 @@ var handleTextNode = async ({
47185
47608
  rootElement,
47186
47609
  onlyBackgroundClipText,
47187
47610
  scale,
47188
- waitForPageResponsiveness
47611
+ waitForPageResponsiveness,
47612
+ transformStyleCache
47189
47613
  }) => {
47190
47614
  const span = document.createElement("span");
47191
47615
  const parent = node.parentNode;
@@ -47203,7 +47627,8 @@ var handleTextNode = async ({
47203
47627
  internalState,
47204
47628
  rootElement,
47205
47629
  scale,
47206
- waitForPageResponsiveness
47630
+ waitForPageResponsiveness,
47631
+ transformStyleCache
47207
47632
  });
47208
47633
  parent.insertBefore(node, span);
47209
47634
  parent.removeChild(span);
@@ -47218,7 +47643,8 @@ var walkOverNode = ({
47218
47643
  rootElement,
47219
47644
  onlyBackgroundClipText,
47220
47645
  scale,
47221
- waitForPageResponsiveness
47646
+ waitForPageResponsiveness,
47647
+ transformStyleCache
47222
47648
  }) => {
47223
47649
  if (node instanceof HTMLElement || node instanceof SVGElement) {
47224
47650
  return processNode({
@@ -47230,7 +47656,8 @@ var walkOverNode = ({
47230
47656
  internalState,
47231
47657
  rootElement,
47232
47658
  scale,
47233
- waitForPageResponsiveness
47659
+ waitForPageResponsiveness,
47660
+ transformStyleCache
47234
47661
  });
47235
47662
  }
47236
47663
  if (node instanceof Text) {
@@ -47243,7 +47670,8 @@ var walkOverNode = ({
47243
47670
  rootElement,
47244
47671
  onlyBackgroundClipText,
47245
47672
  scale,
47246
- waitForPageResponsiveness
47673
+ waitForPageResponsiveness,
47674
+ transformStyleCache
47247
47675
  });
47248
47676
  }
47249
47677
  throw new Error("Unknown node type");
@@ -47274,6 +47702,7 @@ var compose = async ({
47274
47702
  let __stack = [];
47275
47703
  try {
47276
47704
  const treeWalker = document.createTreeWalker(element, onlyBackgroundClipText ? NodeFilter.SHOW_TEXT : NodeFilter.SHOW_ELEMENT | NodeFilter.SHOW_TEXT, getFilterFunction);
47705
+ const transformStyleCache = new WeakMap;
47277
47706
  if (onlyBackgroundClipText) {
47278
47707
  treeWalker.nextNode();
47279
47708
  if (!treeWalker.currentNode) {
@@ -47293,7 +47722,8 @@ var compose = async ({
47293
47722
  rootElement: element,
47294
47723
  onlyBackgroundClipText,
47295
47724
  scale,
47296
- waitForPageResponsiveness
47725
+ waitForPageResponsiveness,
47726
+ transformStyleCache
47297
47727
  });
47298
47728
  if (val.type === "skip-children") {
47299
47729
  if (!skipToNextNonDescendant(treeWalker)) {
@@ -47326,17 +47756,21 @@ var createLayer = async ({
47326
47756
  cutout,
47327
47757
  htmlInCanvasContext,
47328
47758
  onHtmlInCanvasLayerOutcome,
47329
- waitForPageResponsiveness
47759
+ waitForPageResponsiveness,
47760
+ waitForRenderReady
47330
47761
  }) => {
47331
47762
  const scaledWidth = Math.ceil(cutout.width * scale);
47332
47763
  const scaledHeight = Math.ceil(cutout.height * scale);
47333
47764
  if (!onlyBackgroundClipText && element instanceof HTMLElement && htmlInCanvasContext && onHtmlInCanvasLayerOutcome) {
47765
+ const hasNestedHtmlInCanvas = containsLayoutSubtreeCanvas(element);
47334
47766
  try {
47335
47767
  const offCtx = await drawWithHtmlInCanvas({
47336
47768
  htmlInCanvasContext,
47337
47769
  element,
47338
47770
  scaledWidth,
47339
- scaledHeight
47771
+ scaledHeight,
47772
+ waitForRenderReady,
47773
+ useElementImage: hasNestedHtmlInCanvas
47340
47774
  });
47341
47775
  onHtmlInCanvasLayerOutcome({ native: true });
47342
47776
  return offCtx;
@@ -47583,7 +48017,6 @@ var internalRenderMediaOnWeb = async ({
47583
48017
  muted,
47584
48018
  scale,
47585
48019
  isProduction,
47586
- allowHtmlInCanvas,
47587
48020
  sampleRate
47588
48021
  }) => {
47589
48022
  let __stack2 = [];
@@ -47597,7 +48030,7 @@ var internalRenderMediaOnWeb = async ({
47597
48030
  }
47598
48031
  htmlInCanvasLayerOutcomeReported = true;
47599
48032
  if (outcome.native) {
47600
- 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");
48033
+ 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");
47601
48034
  } else if (outcome.shouldWarn) {
47602
48035
  Internals.Log.warn({ logLevel, tag: "@remotion/web-renderer" }, `Not using HTML-in-canvas: ${outcome.reason}`);
47603
48036
  }
@@ -47651,6 +48084,7 @@ var internalRenderMediaOnWeb = async ({
47651
48084
  if (signal?.aborted) {
47652
48085
  return Promise.reject(new Error("renderMediaOnWeb() was cancelled"));
47653
48086
  }
48087
+ const useHtmlInCanvas = await supportsNestedHtmlInCanvas();
47654
48088
  const scaffold = __using2(__stack2, createScaffold({
47655
48089
  width: resolved.width,
47656
48090
  height: resolved.height,
@@ -47668,7 +48102,7 @@ var internalRenderMediaOnWeb = async ({
47668
48102
  initialFrame: 0,
47669
48103
  defaultCodec: resolved.defaultCodec,
47670
48104
  defaultOutName: resolved.defaultOutName,
47671
- allowHtmlInCanvas,
48105
+ useHtmlInCanvas,
47672
48106
  pixelDensity: scale
47673
48107
  }), 0);
47674
48108
  const {
@@ -47679,27 +48113,6 @@ var internalRenderMediaOnWeb = async ({
47679
48113
  errorHolder,
47680
48114
  htmlInCanvasContext
47681
48115
  } = scaffold;
47682
- if (allowHtmlInCanvas && !htmlInCanvasContext) {
47683
- if (!supportsNativeHtmlInCanvas()) {
47684
- onHtmlInCanvasLayerOutcome({
47685
- native: false,
47686
- 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.",
47687
- shouldWarn: false
47688
- });
47689
- } else {
47690
- onHtmlInCanvasLayerOutcome({
47691
- native: false,
47692
- reason: "drawElementImage is available but canvas.requestPaint() is missing. Use a Chromium version that ships requestPaint.",
47693
- shouldWarn: true
47694
- });
47695
- }
47696
- } else if (!allowHtmlInCanvas) {
47697
- onHtmlInCanvasLayerOutcome({
47698
- native: false,
47699
- reason: "allowHtmlInCanvas is false; using the built-in DOM composer.",
47700
- shouldWarn: false
47701
- });
47702
- }
47703
48116
  const internalState = __using2(__stack2, makeInternalState(), 0);
47704
48117
  const pageResponsivenessController = createPageResponsivenessController({
47705
48118
  intervalInMilliseconds: pageResponsivenessIntervalInMilliseconds,
@@ -47718,6 +48131,17 @@ var internalRenderMediaOnWeb = async ({
47718
48131
  fps: resolved.fps,
47719
48132
  logLevel
47720
48133
  }), 0);
48134
+ const waitForRenderReady = async () => {
48135
+ await waitForReady({
48136
+ timeoutInMilliseconds: delayRenderTimeoutInMilliseconds,
48137
+ scope: delayRenderScope,
48138
+ signal,
48139
+ apiName: "renderMediaOnWeb",
48140
+ internalState,
48141
+ keepalive
48142
+ });
48143
+ checkForError(errorHolder);
48144
+ };
47721
48145
  const artifactsHandler = handleArtifacts();
47722
48146
  const webFsTarget = outputTarget === "web-fs" ? await createWebFsTarget() : null;
47723
48147
  const target = webFsTarget ? new StreamTarget(webFsTarget.stream) : new BufferTarget;
@@ -47736,15 +48160,7 @@ var internalRenderMediaOnWeb = async ({
47736
48160
  if (signal?.aborted) {
47737
48161
  throw new Error("renderMediaOnWeb() was cancelled");
47738
48162
  }
47739
- await waitForReady({
47740
- timeoutInMilliseconds: delayRenderTimeoutInMilliseconds,
47741
- scope: delayRenderScope,
47742
- signal,
47743
- apiName: "renderMediaOnWeb",
47744
- internalState,
47745
- keepalive
47746
- });
47747
- checkForError(errorHolder);
48163
+ await waitForRenderReady();
47748
48164
  if (signal?.aborted) {
47749
48165
  throw new Error("renderMediaOnWeb() was cancelled");
47750
48166
  }
@@ -47802,15 +48218,7 @@ var internalRenderMediaOnWeb = async ({
47802
48218
  throw new Error("renderMediaOnWeb() was cancelled");
47803
48219
  }
47804
48220
  timeUpdater.current?.update(frame);
47805
- await waitForReady({
47806
- timeoutInMilliseconds: delayRenderTimeoutInMilliseconds,
47807
- scope: delayRenderScope,
47808
- signal,
47809
- apiName: "renderMediaOnWeb",
47810
- keepalive,
47811
- internalState
47812
- });
47813
- checkForError(errorHolder);
48221
+ await waitForRenderReady();
47814
48222
  if (signal?.aborted) {
47815
48223
  throw new Error("renderMediaOnWeb() was cancelled");
47816
48224
  }
@@ -47828,7 +48236,8 @@ var internalRenderMediaOnWeb = async ({
47828
48236
  cutout: new DOMRect(0, 0, resolved.width, resolved.height),
47829
48237
  htmlInCanvasContext,
47830
48238
  onHtmlInCanvasLayerOutcome: htmlInCanvasContext ? onHtmlInCanvasLayerOutcome : undefined,
47831
- waitForPageResponsiveness
48239
+ waitForPageResponsiveness,
48240
+ waitForRenderReady
47832
48241
  });
47833
48242
  internalState.addCreateFrameTime(performance.now() - createFrameStart);
47834
48243
  layerCanvas = layer.canvas;
@@ -47997,7 +48406,6 @@ var renderMediaOnWeb = (options2) => {
47997
48406
  muted: options2.muted ?? false,
47998
48407
  scale: options2.scale ?? 1,
47999
48408
  isProduction: options2.isProduction ?? true,
48000
- allowHtmlInCanvas: options2.allowHtmlInCanvas ?? false,
48001
48409
  sampleRate: options2.sampleRate ?? 48000
48002
48410
  }));
48003
48411
  return onlyOneRenderAtATimeQueue.ref;
@@ -48036,7 +48444,7 @@ var DemoErrorIcon = () => {
48036
48444
  };
48037
48445
 
48038
48446
  // src/components/homepage/Demo/DoneCheckmark.tsx
48039
- import { jsx as jsx91, jsxs as jsxs28 } from "react/jsx-runtime";
48447
+ import { jsx as jsx91, jsxs as jsxs30 } from "react/jsx-runtime";
48040
48448
  var DoneCheckmark = () => {
48041
48449
  return /* @__PURE__ */ jsx91("div", {
48042
48450
  style: {
@@ -48049,7 +48457,7 @@ var DoneCheckmark = () => {
48049
48457
  justifyContent: "center",
48050
48458
  animation: "jump 0.2s ease-out"
48051
48459
  },
48052
- children: /* @__PURE__ */ jsxs28("svg", {
48460
+ children: /* @__PURE__ */ jsxs30("svg", {
48053
48461
  viewBox: "0 0 20 20",
48054
48462
  fill: "none",
48055
48463
  xmlns: "http://www.w3.org/2000/svg",
@@ -48078,7 +48486,7 @@ var DoneCheckmark = () => {
48078
48486
  };
48079
48487
 
48080
48488
  // src/components/homepage/Demo/Progress.tsx
48081
- import { jsx as jsx95, jsxs as jsxs29 } from "react/jsx-runtime";
48489
+ import { jsx as jsx95, jsxs as jsxs31 } from "react/jsx-runtime";
48082
48490
  var Progress = ({ progress }) => {
48083
48491
  const inner2 = makeCircle({
48084
48492
  radius: 10
@@ -48088,7 +48496,7 @@ var Progress = ({ progress }) => {
48088
48496
  closePath: false,
48089
48497
  radius: 10
48090
48498
  });
48091
- return /* @__PURE__ */ jsxs29("svg", {
48499
+ return /* @__PURE__ */ jsxs31("svg", {
48092
48500
  viewBox: `0 0 ${inner2.width} ${inner2.height}`,
48093
48501
  style: { overflow: "visible", height: 22 },
48094
48502
  children: [
@@ -48111,7 +48519,7 @@ var Progress = ({ progress }) => {
48111
48519
 
48112
48520
  // src/components/homepage/Demo/Spinner.tsx
48113
48521
  import { useMemo as useMemo64 } from "react";
48114
- import { jsx as jsx97, jsxs as jsxs30, Fragment as Fragment15 } from "react/jsx-runtime";
48522
+ import { jsx as jsx97, jsxs as jsxs34, Fragment as Fragment16 } from "react/jsx-runtime";
48115
48523
  var viewBox2 = 100;
48116
48524
  var lines2 = 8;
48117
48525
  var className2 = "__remotion_spinner_line";
@@ -48124,7 +48532,7 @@ var Spinner2 = ({ size: size4, duration }) => {
48124
48532
  height: size4
48125
48533
  };
48126
48534
  }, [size4]);
48127
- return /* @__PURE__ */ jsxs30(Fragment15, {
48535
+ return /* @__PURE__ */ jsxs34(Fragment16, {
48128
48536
  children: [
48129
48537
  /* @__PURE__ */ jsx97("style", {
48130
48538
  type: "text/css",
@@ -48280,7 +48688,7 @@ var RenderButton = ({ renderData, onError, playerRef }) => {
48280
48688
  };
48281
48689
 
48282
48690
  // src/components/homepage/Demo/DownloadNudge.tsx
48283
- import { jsx as jsx99, jsxs as jsxs31 } from "react/jsx-runtime";
48691
+ import { jsx as jsx99, jsxs as jsxs36 } from "react/jsx-runtime";
48284
48692
  var origWidth = 77;
48285
48693
  var scale = 0.4;
48286
48694
  var Icon3 = () => {
@@ -48310,7 +48718,7 @@ var DownloadNudge = () => {
48310
48718
  paddingRight: 24,
48311
48719
  paddingTop: 18
48312
48720
  },
48313
- children: /* @__PURE__ */ jsxs31("div", {
48721
+ children: /* @__PURE__ */ jsxs36("div", {
48314
48722
  children: [
48315
48723
  /* @__PURE__ */ jsx99(Icon3, {}),
48316
48724
  /* @__PURE__ */ jsx99("div", {
@@ -48330,7 +48738,7 @@ var DownloadNudge = () => {
48330
48738
  };
48331
48739
 
48332
48740
  // src/components/homepage/Demo/DragAndDropNudge.tsx
48333
- import { jsx as jsx100, jsxs as jsxs34 } from "react/jsx-runtime";
48741
+ import { jsx as jsx100, jsxs as jsxs37 } from "react/jsx-runtime";
48334
48742
  var origWidth2 = 37;
48335
48743
  var scale2 = 0.4;
48336
48744
  var Icon5 = () => {
@@ -48360,7 +48768,7 @@ var DragAndDropNudge = () => {
48360
48768
  marginTop: 18
48361
48769
  },
48362
48770
  className: "ml-4 lg:-ml-5",
48363
- children: /* @__PURE__ */ jsxs34("div", {
48771
+ children: /* @__PURE__ */ jsxs37("div", {
48364
48772
  children: [
48365
48773
  /* @__PURE__ */ jsx100("div", {
48366
48774
  style: {
@@ -48425,7 +48833,7 @@ var useElementSize2 = (ref) => {
48425
48833
  };
48426
48834
 
48427
48835
  // src/components/homepage/Demo/PlayerSeekBar.tsx
48428
- import { jsx as jsx101, jsxs as jsxs36 } from "react/jsx-runtime";
48836
+ import { jsx as jsx101, jsxs as jsxs38 } from "react/jsx-runtime";
48429
48837
  var getFrameFromX2 = (clientX, durationInFrames, width2) => {
48430
48838
  const pos = clientX;
48431
48839
  const frame = Math.round(interpolate(pos, [0, width2], [0, durationInFrames - 1], {
@@ -48634,12 +49042,12 @@ var PlayerSeekBar2 = ({
48634
49042
  position: "absolute"
48635
49043
  };
48636
49044
  }, [durationInFrames, inFrame, outFrame]);
48637
- return /* @__PURE__ */ jsxs36("div", {
49045
+ return /* @__PURE__ */ jsxs38("div", {
48638
49046
  ref: containerRef,
48639
49047
  onPointerDown,
48640
49048
  style: containerStyle3,
48641
49049
  children: [
48642
- /* @__PURE__ */ jsxs36("div", {
49050
+ /* @__PURE__ */ jsxs38("div", {
48643
49051
  style: barBackground2,
48644
49052
  children: [
48645
49053
  /* @__PURE__ */ jsx101("div", {
@@ -48866,7 +49274,7 @@ var TimeDisplay = ({ fps, playerRef }) => {
48866
49274
  };
48867
49275
 
48868
49276
  // src/components/homepage/Demo/PlayerControls.tsx
48869
- import { jsx as jsx110, jsxs as jsxs37 } from "react/jsx-runtime";
49277
+ import { jsx as jsx110, jsxs as jsxs39 } from "react/jsx-runtime";
48870
49278
  var Separator2 = () => {
48871
49279
  return /* @__PURE__ */ jsx110("div", {
48872
49280
  style: {
@@ -48876,7 +49284,7 @@ var Separator2 = () => {
48876
49284
  });
48877
49285
  };
48878
49286
  var PlayerControls = ({ playerRef, durationInFrames, fps, children }) => {
48879
- return /* @__PURE__ */ jsxs37("div", {
49287
+ return /* @__PURE__ */ jsxs39("div", {
48880
49288
  className: "flex flex-row items-center bg-pane",
48881
49289
  children: [
48882
49290
  /* @__PURE__ */ jsx110(PlayPauseButton, {
@@ -48920,7 +49328,7 @@ var PlayerControls = ({ playerRef, durationInFrames, fps, children }) => {
48920
49328
 
48921
49329
  // src/components/homepage/Demo/ThemeNudge.tsx
48922
49330
  import React77 from "react";
48923
- import { jsx as jsx111, jsxs as jsxs38 } from "react/jsx-runtime";
49331
+ import { jsx as jsx111, jsxs as jsxs40 } from "react/jsx-runtime";
48924
49332
  var origWidth3 = 37;
48925
49333
  var scale3 = 0.4;
48926
49334
  var Icon6 = () => {
@@ -48956,9 +49364,9 @@ var ThemeNudge = () => {
48956
49364
  position: "absolute"
48957
49365
  },
48958
49366
  className: "lg:top-3 lg:-right-6 right-0 top-0",
48959
- children: /* @__PURE__ */ jsxs38("div", {
49367
+ children: /* @__PURE__ */ jsxs40("div", {
48960
49368
  children: [
48961
- /* @__PURE__ */ jsxs38("div", {
49369
+ /* @__PURE__ */ jsxs40("div", {
48962
49370
  style: {
48963
49371
  fontFamily: FONTS.GTPLANAR,
48964
49372
  fontSize: 15,
@@ -48969,7 +49377,7 @@ var ThemeNudge = () => {
48969
49377
  marginTop: 5
48970
49378
  },
48971
49379
  children: [
48972
- /* @__PURE__ */ jsxs38("a", {
49380
+ /* @__PURE__ */ jsxs40("a", {
48973
49381
  href: "#",
48974
49382
  onClick: toggleTheme,
48975
49383
  className: "bluelink",
@@ -48991,7 +49399,7 @@ var ThemeNudge = () => {
48991
49399
  };
48992
49400
 
48993
49401
  // src/components/homepage/Demo/index.tsx
48994
- import { jsx as jsx115, jsxs as jsxs39 } from "react/jsx-runtime";
49402
+ import { jsx as jsx115, jsxs as jsxs41 } from "react/jsx-runtime";
48995
49403
  var style3 = {
48996
49404
  width: "100%",
48997
49405
  aspectRatio: "640 / 360",
@@ -49059,7 +49467,7 @@ var Demo = () => {
49059
49467
  const onError = useCallback55(() => {
49060
49468
  setError(true);
49061
49469
  }, []);
49062
- return /* @__PURE__ */ jsxs39("div", {
49470
+ return /* @__PURE__ */ jsxs41("div", {
49063
49471
  id: "demo",
49064
49472
  children: [
49065
49473
  /* @__PURE__ */ jsx115("br", {}),
@@ -49067,17 +49475,17 @@ var Demo = () => {
49067
49475
  /* @__PURE__ */ jsx115(SectionTitle, {
49068
49476
  children: "Interactive demo"
49069
49477
  }),
49070
- /* @__PURE__ */ jsxs39("div", {
49478
+ /* @__PURE__ */ jsxs41("div", {
49071
49479
  className: "max-w-[760px] mx-auto",
49072
49480
  children: [
49073
- /* @__PURE__ */ jsxs39("div", {
49481
+ /* @__PURE__ */ jsxs41("div", {
49074
49482
  className: "h-[105px] relative",
49075
49483
  children: [
49076
49484
  /* @__PURE__ */ jsx115(DragAndDropNudge, {}),
49077
49485
  /* @__PURE__ */ jsx115(ThemeNudge, {})
49078
49486
  ]
49079
49487
  }),
49080
- /* @__PURE__ */ jsxs39("div", {
49488
+ /* @__PURE__ */ jsxs41("div", {
49081
49489
  style: playerWrapper,
49082
49490
  children: [
49083
49491
  /* @__PURE__ */ jsx115(Player, {
@@ -49166,7 +49574,7 @@ var BlueButton = (props) => {
49166
49574
  };
49167
49575
 
49168
49576
  // src/components/homepage/EvaluateRemotion.tsx
49169
- import { jsx as jsx118, jsxs as jsxs40 } from "react/jsx-runtime";
49577
+ import { jsx as jsx118, jsxs as jsxs44 } from "react/jsx-runtime";
49170
49578
  var EvaluateRemotionSection = () => {
49171
49579
  const [dailyAvatars, setDailyAvatars] = useState57([]);
49172
49580
  useEffect58(() => {
@@ -49179,10 +49587,10 @@ var EvaluateRemotionSection = () => {
49179
49587
  }
49180
49588
  setDailyAvatars(selectedAvatars);
49181
49589
  }, []);
49182
- return /* @__PURE__ */ jsxs40("div", {
49590
+ return /* @__PURE__ */ jsxs44("div", {
49183
49591
  className: "flex flex-col lg:flex-row gap-2",
49184
49592
  children: [
49185
- /* @__PURE__ */ jsxs40("div", {
49593
+ /* @__PURE__ */ jsxs44("div", {
49186
49594
  className: "card flex-1 flex flex-col",
49187
49595
  children: [
49188
49596
  /* @__PURE__ */ jsx118("div", {
@@ -49196,7 +49604,7 @@ var EvaluateRemotionSection = () => {
49196
49604
  /* @__PURE__ */ jsx118("div", {
49197
49605
  className: "flex-1"
49198
49606
  }),
49199
- /* @__PURE__ */ jsxs40("div", {
49607
+ /* @__PURE__ */ jsxs44("div", {
49200
49608
  className: "flex flex-row flex-wrap gap-2",
49201
49609
  children: [
49202
49610
  /* @__PURE__ */ jsx118("a", {
@@ -49223,7 +49631,7 @@ var EvaluateRemotionSection = () => {
49223
49631
  })
49224
49632
  ]
49225
49633
  }),
49226
- /* @__PURE__ */ jsxs40("div", {
49634
+ /* @__PURE__ */ jsxs44("div", {
49227
49635
  className: "card flex-1 flex flex-col",
49228
49636
  children: [
49229
49637
  /* @__PURE__ */ jsx118("div", {
@@ -49237,7 +49645,7 @@ var EvaluateRemotionSection = () => {
49237
49645
  /* @__PURE__ */ jsx118("div", {
49238
49646
  className: "flex-1"
49239
49647
  }),
49240
- /* @__PURE__ */ jsxs40("div", {
49648
+ /* @__PURE__ */ jsxs44("div", {
49241
49649
  className: "flex flex-row justify-between",
49242
49650
  children: [
49243
49651
  /* @__PURE__ */ jsx118("a", {
@@ -49270,13 +49678,13 @@ import { useEffect as useEffect59, useRef as useRef60 } from "react";
49270
49678
 
49271
49679
  // src/components/homepage/MakeVideosLinks.tsx
49272
49680
  import React80 from "react";
49273
- import { jsx as jsx119, jsxs as jsxs41, Fragment as Fragment16 } from "react/jsx-runtime";
49681
+ import { jsx as jsx119, jsxs as jsxs46, Fragment as Fragment17 } from "react/jsx-runtime";
49274
49682
  var icon3 = {
49275
49683
  height: 16,
49276
49684
  marginLeft: 10
49277
49685
  };
49278
49686
  var MakeVideosLinkItem = ({ href, label: label3 }) => {
49279
- return /* @__PURE__ */ jsxs41("a", {
49687
+ return /* @__PURE__ */ jsxs46("a", {
49280
49688
  className: "no-underline text-[var(--subtitle)] font-brand font-medium text-sm inline-flex flex-row items-center",
49281
49689
  href,
49282
49690
  children: [
@@ -49297,7 +49705,7 @@ var MakeVideosLinks = ({ links }) => {
49297
49705
  if (links.length === 0) {
49298
49706
  return null;
49299
49707
  }
49300
- return /* @__PURE__ */ jsxs41(Fragment16, {
49708
+ return /* @__PURE__ */ jsxs46(Fragment17, {
49301
49709
  children: [
49302
49710
  /* @__PURE__ */ jsx119("div", {
49303
49711
  className: "h-4"
@@ -49305,7 +49713,7 @@ var MakeVideosLinks = ({ links }) => {
49305
49713
  /* @__PURE__ */ jsx119("div", {
49306
49714
  className: "leading-6",
49307
49715
  children: links.map((link) => {
49308
- return /* @__PURE__ */ jsxs41(React80.Fragment, {
49716
+ return /* @__PURE__ */ jsxs46(React80.Fragment, {
49309
49717
  children: [
49310
49718
  /* @__PURE__ */ jsx119(MakeVideosLinkItem, {
49311
49719
  ...link
@@ -49320,9 +49728,9 @@ var MakeVideosLinks = ({ links }) => {
49320
49728
  };
49321
49729
 
49322
49730
  // src/components/homepage/MakeVideosAgentically.tsx
49323
- import { jsx as jsx120, jsxs as jsxs44, Fragment as Fragment17 } from "react/jsx-runtime";
49731
+ import { jsx as jsx120, jsxs as jsxs47, Fragment as Fragment18 } from "react/jsx-runtime";
49324
49732
  var MakeVideosAgentically = ({
49325
- title = /* @__PURE__ */ jsxs44(Fragment17, {
49733
+ title = /* @__PURE__ */ jsxs47(Fragment18, {
49326
49734
  children: [
49327
49735
  /* @__PURE__ */ jsx120("span", {
49328
49736
  className: "text-[var(--subtitle)]",
@@ -49361,13 +49769,13 @@ var MakeVideosAgentically = ({
49361
49769
  observer.observe(current);
49362
49770
  return () => observer.unobserve(current);
49363
49771
  }, []);
49364
- return /* @__PURE__ */ jsxs44("div", {
49772
+ return /* @__PURE__ */ jsxs47("div", {
49365
49773
  ref,
49366
49774
  className: "flex min-w-0 basis-0 flex-col flex-1",
49367
49775
  children: [
49368
49776
  /* @__PURE__ */ jsx120("div", {
49369
49777
  className: "flex aspect-square w-full items-start",
49370
- children: showVideo ? /* @__PURE__ */ jsxs44("video", {
49778
+ children: showVideo ? /* @__PURE__ */ jsxs47("video", {
49371
49779
  ref: videoRef,
49372
49780
  muted: true,
49373
49781
  autoPlay: true,
@@ -49394,7 +49802,7 @@ var MakeVideosAgentically = ({
49394
49802
  ]
49395
49803
  }) : null
49396
49804
  }),
49397
- /* @__PURE__ */ jsxs44("div", {
49805
+ /* @__PURE__ */ jsxs47("div", {
49398
49806
  className: "font-brand",
49399
49807
  children: [
49400
49808
  /* @__PURE__ */ jsx120("h2", {
@@ -49416,9 +49824,9 @@ var MakeVideosAgentically = ({
49416
49824
 
49417
49825
  // src/components/homepage/MakeVideosInteractively.tsx
49418
49826
  import { useRef as useRef61 } from "react";
49419
- import { jsx as jsx121, jsxs as jsxs46, Fragment as Fragment18 } from "react/jsx-runtime";
49827
+ import { jsx as jsx121, jsxs as jsxs48, Fragment as Fragment19 } from "react/jsx-runtime";
49420
49828
  var MakeVideosInteractively = ({
49421
- title = /* @__PURE__ */ jsxs46(Fragment18, {
49829
+ title = /* @__PURE__ */ jsxs48(Fragment19, {
49422
49830
  children: [
49423
49831
  /* @__PURE__ */ jsx121("span", {
49424
49832
  className: "text-[var(--subtitle)]",
@@ -49436,13 +49844,13 @@ var MakeVideosInteractively = ({
49436
49844
  fallbackVideoSrc = "/img/editing-safari.mp4"
49437
49845
  }) => {
49438
49846
  const ref = useRef61(null);
49439
- return /* @__PURE__ */ jsxs46("div", {
49847
+ return /* @__PURE__ */ jsxs48("div", {
49440
49848
  ref,
49441
49849
  className: "flex min-w-0 basis-0 flex-col justify-start items-start lg:mt-0 flex-1",
49442
49850
  children: [
49443
49851
  /* @__PURE__ */ jsx121("div", {
49444
49852
  className: "flex aspect-square w-full items-start",
49445
- children: showVideo ? /* @__PURE__ */ jsxs46("video", {
49853
+ children: showVideo ? /* @__PURE__ */ jsxs48("video", {
49446
49854
  autoPlay: true,
49447
49855
  muted: true,
49448
49856
  playsInline: true,
@@ -49468,7 +49876,7 @@ var MakeVideosInteractively = ({
49468
49876
  ]
49469
49877
  }) : null
49470
49878
  }),
49471
- /* @__PURE__ */ jsxs46("div", {
49879
+ /* @__PURE__ */ jsxs48("div", {
49472
49880
  className: "font-brand",
49473
49881
  children: [
49474
49882
  /* @__PURE__ */ jsx121("h2", {
@@ -49489,9 +49897,9 @@ var MakeVideosInteractively = ({
49489
49897
  };
49490
49898
 
49491
49899
  // src/components/homepage/MakeVideosProgrammatically.tsx
49492
- import { jsx as jsx125, jsxs as jsxs47, Fragment as Fragment19 } from "react/jsx-runtime";
49900
+ import { jsx as jsx125, jsxs as jsxs49, Fragment as Fragment20 } from "react/jsx-runtime";
49493
49901
  var MakeVideosProgrammatically = ({
49494
- title = /* @__PURE__ */ jsxs47(Fragment19, {
49902
+ title = /* @__PURE__ */ jsxs49(Fragment20, {
49495
49903
  children: [
49496
49904
  /* @__PURE__ */ jsx125("span", {
49497
49905
  className: "text-[var(--subtitle)]",
@@ -49508,12 +49916,12 @@ var MakeVideosProgrammatically = ({
49508
49916
  videoSrc = "/img/what-is-remotion.webm",
49509
49917
  fallbackVideoSrc = "/img/what-is-remotion.mp4"
49510
49918
  }) => {
49511
- return /* @__PURE__ */ jsxs47("div", {
49919
+ return /* @__PURE__ */ jsxs49("div", {
49512
49920
  className: "flex min-w-0 basis-0 flex-col flex-1",
49513
49921
  children: [
49514
49922
  /* @__PURE__ */ jsx125("div", {
49515
49923
  className: "flex aspect-square w-full items-start",
49516
- children: showVideo ? /* @__PURE__ */ jsxs47("video", {
49924
+ children: showVideo ? /* @__PURE__ */ jsxs49("video", {
49517
49925
  muted: true,
49518
49926
  autoPlay: true,
49519
49927
  playsInline: true,
@@ -49532,7 +49940,7 @@ var MakeVideosProgrammatically = ({
49532
49940
  ]
49533
49941
  }) : null
49534
49942
  }),
49535
- /* @__PURE__ */ jsxs47("div", {
49943
+ /* @__PURE__ */ jsxs49("div", {
49536
49944
  className: "font-brand",
49537
49945
  children: [
49538
49946
  /* @__PURE__ */ jsx125("h2", {
@@ -49554,7 +49962,7 @@ var MakeVideosProgrammatically = ({
49554
49962
 
49555
49963
  // src/components/homepage/NewsletterButton.tsx
49556
49964
  import { useCallback as useCallback56, useState as useState58 } from "react";
49557
- import { jsx as jsx127, jsxs as jsxs48 } from "react/jsx-runtime";
49965
+ import { jsx as jsx127, jsxs as jsxs50 } from "react/jsx-runtime";
49558
49966
  var NewsletterButton = () => {
49559
49967
  const [email, setEmail] = useState58("");
49560
49968
  const [submitting, setSubmitting] = useState58(false);
@@ -49586,26 +49994,26 @@ var NewsletterButton = () => {
49586
49994
  className: "flex flex-col",
49587
49995
  children: /* @__PURE__ */ jsx127("div", {
49588
49996
  className: "w-full",
49589
- children: /* @__PURE__ */ jsxs48("div", {
49997
+ children: /* @__PURE__ */ jsxs50("div", {
49590
49998
  className: "flex flex-col flex-1",
49591
49999
  children: [
49592
50000
  /* @__PURE__ */ jsx127(SectionTitle, {
49593
50001
  children: "Newsletter"
49594
50002
  }),
49595
- /* @__PURE__ */ jsxs48("form", {
50003
+ /* @__PURE__ */ jsxs50("form", {
49596
50004
  onSubmit: handleSubmit,
49597
50005
  style: {
49598
50006
  width: "100%"
49599
50007
  },
49600
50008
  children: [
49601
- /* @__PURE__ */ jsxs48("div", {
50009
+ /* @__PURE__ */ jsxs50("div", {
49602
50010
  className: "fontbrand text-center mb-10 -mt-4",
49603
50011
  children: [
49604
50012
  "Read about new features and noteworthy updates we have made on Remotion once in a while.",
49605
50013
  " "
49606
50014
  ]
49607
50015
  }),
49608
- /* @__PURE__ */ jsxs48("div", {
50016
+ /* @__PURE__ */ jsxs50("div", {
49609
50017
  className: "flex flex-col md:flex-row gap-2 justify-center",
49610
50018
  children: [
49611
50019
  /* @__PURE__ */ jsx127(Input, {
@@ -49641,7 +50049,7 @@ var NewsletterButton = () => {
49641
50049
  };
49642
50050
 
49643
50051
  // src/components/homepage/TrustedByBanner.tsx
49644
- import { jsx as jsx128, jsxs as jsxs49, Fragment as Fragment20 } from "react/jsx-runtime";
50052
+ import { jsx as jsx128, jsxs as jsxs51, Fragment as Fragment21 } from "react/jsx-runtime";
49645
50053
  var TrustedByBanner = () => {
49646
50054
  const logos = [
49647
50055
  {
@@ -49661,7 +50069,7 @@ var TrustedByBanner = () => {
49661
50069
  {
49662
50070
  id: "logo2",
49663
50071
  url: "https://www.musixmatch.com/",
49664
- light: /* @__PURE__ */ jsxs49("svg", {
50072
+ light: /* @__PURE__ */ jsxs51("svg", {
49665
50073
  height: "40",
49666
50074
  viewBox: "0 0 229 48",
49667
50075
  fill: "none",
@@ -49721,7 +50129,7 @@ var TrustedByBanner = () => {
49721
50129
  {
49722
50130
  id: "logo3",
49723
50131
  url: "https://www.wistia.com/",
49724
- light: /* @__PURE__ */ jsxs49("svg", {
50132
+ light: /* @__PURE__ */ jsxs51("svg", {
49725
50133
  height: "30",
49726
50134
  viewBox: "0 0 165 36",
49727
50135
  fill: "none",
@@ -49754,7 +50162,7 @@ var TrustedByBanner = () => {
49754
50162
  })
49755
50163
  }
49756
50164
  ];
49757
- return /* @__PURE__ */ jsxs49(Fragment20, {
50165
+ return /* @__PURE__ */ jsxs51(Fragment21, {
49758
50166
  children: [
49759
50167
  /* @__PURE__ */ jsx128("h3", {
49760
50168
  className: "text-center mt-20 mb-10",
@@ -49920,7 +50328,7 @@ var MuxVideoForward = ({ muxId, ...props }, ref) => {
49920
50328
  var MuxVideo = forwardRef41(MuxVideoForward);
49921
50329
 
49922
50330
  // src/components/homepage/VideoAppsShowcase.tsx
49923
- import { jsx as jsx131, jsxs as jsxs50 } from "react/jsx-runtime";
50331
+ import { jsx as jsx131, jsxs as jsxs53 } from "react/jsx-runtime";
49924
50332
  var tabs = [
49925
50333
  "Music visualization",
49926
50334
  "Captions",
@@ -50027,7 +50435,7 @@ var BuiltWithRemotionShowcase = () => {
50027
50435
  setIsMuted(newMutedState);
50028
50436
  }
50029
50437
  };
50030
- return /* @__PURE__ */ jsxs50("div", {
50438
+ return /* @__PURE__ */ jsxs53("div", {
50031
50439
  ref: containerRef,
50032
50440
  children: [
50033
50441
  /* @__PURE__ */ jsx131(SectionTitle, {
@@ -50046,10 +50454,10 @@ var BuiltWithRemotionShowcase = () => {
50046
50454
  /* @__PURE__ */ jsx131("div", {
50047
50455
  className: "card flex p-0 overflow-hidden",
50048
50456
  "data-nosnippet": true,
50049
- children: /* @__PURE__ */ jsxs50("div", {
50457
+ children: /* @__PURE__ */ jsxs53("div", {
50050
50458
  className: "flex-1 grid grid-cols-1 lg:grid-cols-2",
50051
50459
  children: [
50052
- /* @__PURE__ */ jsxs50("div", {
50460
+ /* @__PURE__ */ jsxs53("div", {
50053
50461
  className: "w-full aspect-video lg:aspect-square relative overflow-hidden bg-[#eee] cursor-pointer",
50054
50462
  onClick: handlePlayPause,
50055
50463
  children: [
@@ -50113,7 +50521,7 @@ var BuiltWithRemotionShowcase = () => {
50113
50521
  })
50114
50522
  ]
50115
50523
  }),
50116
- /* @__PURE__ */ jsxs50("div", {
50524
+ /* @__PURE__ */ jsxs53("div", {
50117
50525
  className: "p-6 lg:p-10 flex min-w-0 flex-col justify-center",
50118
50526
  children: [
50119
50527
  /* @__PURE__ */ jsx131("div", {
@@ -50131,7 +50539,7 @@ var BuiltWithRemotionShowcase = () => {
50131
50539
  /* @__PURE__ */ jsx131("div", {
50132
50540
  className: "h-5"
50133
50541
  }),
50134
- /* @__PURE__ */ jsxs50("a", {
50542
+ /* @__PURE__ */ jsxs53("a", {
50135
50543
  className: "no-underline text-brand font-brand font-bold inline-flex flex-row items-center",
50136
50544
  href: videoApps[activeTab].link,
50137
50545
  children: [
@@ -50150,7 +50558,7 @@ var BuiltWithRemotionShowcase = () => {
50150
50558
  justifyContent: "center",
50151
50559
  display: "flex"
50152
50560
  },
50153
- children: /* @__PURE__ */ jsxs50("div", {
50561
+ children: /* @__PURE__ */ jsxs53("div", {
50154
50562
  style: {
50155
50563
  fontFamily: "GTPlanar"
50156
50564
  },
@@ -50174,7 +50582,7 @@ var BuiltWithRemotionShowcase = () => {
50174
50582
  import { useState as useState61 } from "react";
50175
50583
 
50176
50584
  // src/components/homepage/GitHubButton.tsx
50177
- import { jsx as jsx134, jsxs as jsxs51 } from "react/jsx-runtime";
50585
+ import { jsx as jsx134, jsxs as jsxs55 } from "react/jsx-runtime";
50178
50586
  var GithubIcon = () => {
50179
50587
  return /* @__PURE__ */ jsx134("svg", {
50180
50588
  viewBox: "0 0 496 512",
@@ -50186,7 +50594,7 @@ var GithubIcon = () => {
50186
50594
  });
50187
50595
  };
50188
50596
  var GithubButton = () => {
50189
- return /* @__PURE__ */ jsxs51("div", {
50597
+ return /* @__PURE__ */ jsxs55("div", {
50190
50598
  className: "flex flex-row items-center text-base",
50191
50599
  children: [
50192
50600
  /* @__PURE__ */ jsx134(GithubIcon, {}),
@@ -50204,15 +50612,15 @@ var GithubButton = () => {
50204
50612
  };
50205
50613
 
50206
50614
  // src/components/homepage/GetStartedStrip.tsx
50207
- import { jsx as jsx136, jsxs as jsxs54 } from "react/jsx-runtime";
50615
+ import { jsx as jsx136, jsxs as jsxs56 } from "react/jsx-runtime";
50208
50616
  var GetStarted = () => {
50209
50617
  const [clicked, setClicked] = useState61(null);
50210
- return /* @__PURE__ */ jsxs54("div", {
50618
+ return /* @__PURE__ */ jsxs56("div", {
50211
50619
  className: "flex flex-col lg:flex-row items-center justify-center text-center w-full",
50212
50620
  children: [
50213
50621
  /* @__PURE__ */ jsx136("div", {
50214
50622
  className: "w-full lg:w-auto",
50215
- children: /* @__PURE__ */ jsxs54("div", {
50623
+ children: /* @__PURE__ */ jsxs56("div", {
50216
50624
  className: "flex flex-row w-full relative",
50217
50625
  children: [
50218
50626
  clicked ? /* @__PURE__ */ jsx136("div", {
@@ -50275,9 +50683,9 @@ var GetStarted = () => {
50275
50683
  };
50276
50684
 
50277
50685
  // src/components/homepage/WriteInReact.tsx
50278
- import { jsx as jsx137, jsxs as jsxs56 } from "react/jsx-runtime";
50686
+ import { jsx as jsx137, jsxs as jsxs57 } from "react/jsx-runtime";
50279
50687
  var WriteInReact = () => {
50280
- return /* @__PURE__ */ jsxs56("div", {
50688
+ return /* @__PURE__ */ jsxs57("div", {
50281
50689
  children: [
50282
50690
  /* @__PURE__ */ jsx137("h1", {
50283
50691
  className: "text-4xl sm:text-5xl lg:text-[5em] text-center fontbrand font-black leading-none text-balance",
@@ -50286,7 +50694,7 @@ var WriteInReact = () => {
50286
50694
  },
50287
50695
  children: "Make videos programmatically."
50288
50696
  }),
50289
- /* @__PURE__ */ jsxs56("p", {
50697
+ /* @__PURE__ */ jsxs57("p", {
50290
50698
  style: {
50291
50699
  textShadow: "0 5px 30px var(--background)"
50292
50700
  },
@@ -50308,7 +50716,7 @@ var WriteInReact = () => {
50308
50716
  };
50309
50717
 
50310
50718
  // src/components/Homepage.tsx
50311
- import { jsx as jsx138, jsxs as jsxs57 } from "react/jsx-runtime";
50719
+ import { jsx as jsx138, jsxs as jsxs58 } from "react/jsx-runtime";
50312
50720
  "use client";
50313
50721
  var makeVideosRowClassName = "mt-4 md:mt-6 flex flex-col lg:flex-row gap-10";
50314
50722
  var NewLanding = ({ colorMode, setColorMode }) => {
@@ -50317,7 +50725,7 @@ var NewLanding = ({ colorMode, setColorMode }) => {
50317
50725
  setColorMode,
50318
50726
  children: /* @__PURE__ */ jsx138("div", {
50319
50727
  className: "w-full relative",
50320
- children: /* @__PURE__ */ jsxs57("div", {
50728
+ children: /* @__PURE__ */ jsxs58("div", {
50321
50729
  style: { overflow: "hidden" },
50322
50730
  children: [
50323
50731
  /* @__PURE__ */ jsx138("div", {
@@ -50327,12 +50735,12 @@ var NewLanding = ({ colorMode, setColorMode }) => {
50327
50735
  /* @__PURE__ */ jsx138("br", {}),
50328
50736
  /* @__PURE__ */ jsx138("br", {}),
50329
50737
  /* @__PURE__ */ jsx138("br", {}),
50330
- /* @__PURE__ */ jsxs57("div", {
50738
+ /* @__PURE__ */ jsxs58("div", {
50331
50739
  className: "max-w-[500px] lg:max-w-[1000px] m-auto pl-5 pr-5 overflow-x-clip md:overflow-x-visible relative",
50332
50740
  children: [
50333
50741
  /* @__PURE__ */ jsx138(WriteInReact, {}),
50334
50742
  /* @__PURE__ */ jsx138("br", {}),
50335
- /* @__PURE__ */ jsxs57("div", {
50743
+ /* @__PURE__ */ jsxs58("div", {
50336
50744
  className: makeVideosRowClassName,
50337
50745
  children: [
50338
50746
  /* @__PURE__ */ jsx138(MakeVideosAgentically, {