@remotion/promo-pages 4.0.461 → 4.0.463
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 +1496 -953
- package/dist/design.js +1837 -1416
- package/dist/experts/experts-data.js +5 -16
- package/dist/experts.js +1624 -1203
- package/dist/homepage/Pricing.js +1865 -1444
- package/dist/prompts/PromptsGallery.js +1709 -1288
- package/dist/prompts/PromptsShow.js +1379 -958
- package/dist/prompts/PromptsSubmit.js +1381 -960
- package/dist/team.js +1705 -1284
- package/dist/template-modal-content.js +1715 -1294
- package/dist/templates.js +1706 -1284
- package/package.json +17 -17
- package/dist/cn.d.ts +0 -2
- package/dist/cn.js +0 -5
- package/dist/components/3DEngine/ButtonDemo.d.ts +0 -2
- package/dist/components/3DEngine/ButtonDemo.js +0 -43
- package/dist/components/3DEngine/Faces.d.ts +0 -5
- package/dist/components/3DEngine/Faces.js +0 -7
- package/dist/components/3DEngine/Outer.d.ts +0 -8
- package/dist/components/3DEngine/Outer.js +0 -56
- package/dist/components/3DEngine/Switch.d.ts +0 -4
- package/dist/components/3DEngine/Switch.js +0 -4
- package/dist/components/3DEngine/get-child-node-from.d.ts +0 -1
- package/dist/components/3DEngine/get-child-node-from.js +0 -14
- package/dist/components/3DEngine/hover-transforms.d.ts +0 -9
- package/dist/components/3DEngine/hover-transforms.js +0 -177
- package/dist/components/BackButton.d.ts +0 -6
- package/dist/components/BackButton.js +0 -9
- package/dist/components/CommandCopyButton.d.ts +0 -5
- package/dist/components/CommandCopyButton.js +0 -4
- package/dist/components/Homepage.d.ts +0 -6
- package/dist/components/Homepage.js +0 -20
- package/dist/components/ManageTeamMembers.d.ts +0 -2
- package/dist/components/ManageTeamMembers.js +0 -42
- package/dist/components/Spinner.d.ts +0 -3
- package/dist/components/Spinner.js +0 -4
- package/dist/components/TeamPicture.d.ts +0 -1
- package/dist/components/TeamPicture.js +0 -4
- package/dist/components/design.d.ts +0 -1
- package/dist/components/design.js +0 -33
- package/dist/components/experts/ExpertsPage.d.ts +0 -11
- package/dist/components/experts/ExpertsPage.js +0 -50
- package/dist/components/experts/experts-data.d.ts +0 -15
- package/dist/components/experts/experts-data.js +0 -289
- package/dist/components/experts/experts-icons.d.ts +0 -7
- package/dist/components/experts/experts-icons.js +0 -36
- package/dist/components/experts.d.ts +0 -3
- package/dist/components/experts.js +0 -2
- package/dist/components/homepage/BackgroundAnimation.d.ts +0 -2
- package/dist/components/homepage/BackgroundAnimation.js +0 -66
- package/dist/components/homepage/ChooseTemplate.d.ts +0 -2
- package/dist/components/homepage/ChooseTemplate.js +0 -25
- package/dist/components/homepage/CommunityStats.d.ts +0 -3
- package/dist/components/homepage/CommunityStats.js +0 -6
- package/dist/components/homepage/CommunityStatsItems.d.ts +0 -7
- package/dist/components/homepage/CommunityStatsItems.js +0 -58
- package/dist/components/homepage/Demo/Card.d.ts +0 -15
- package/dist/components/homepage/Demo/Card.js +0 -174
- package/dist/components/homepage/Demo/Cards.d.ts +0 -15
- package/dist/components/homepage/Demo/Cards.js +0 -57
- package/dist/components/homepage/Demo/Comp.d.ts +0 -38
- package/dist/components/homepage/Demo/Comp.js +0 -72
- package/dist/components/homepage/Demo/CurrentCountry.d.ts +0 -9
- package/dist/components/homepage/Demo/CurrentCountry.js +0 -48
- package/dist/components/homepage/Demo/DemoError.d.ts +0 -2
- package/dist/components/homepage/Demo/DemoError.js +0 -10
- package/dist/components/homepage/Demo/DemoErrorIcon.d.ts +0 -2
- package/dist/components/homepage/Demo/DemoErrorIcon.js +0 -16
- package/dist/components/homepage/Demo/DemoRender.d.ts +0 -33
- package/dist/components/homepage/Demo/DemoRender.js +0 -107
- package/dist/components/homepage/Demo/DigitWheel.d.ts +0 -9
- package/dist/components/homepage/Demo/DigitWheel.js +0 -94
- package/dist/components/homepage/Demo/DisplayedEmoji.d.ts +0 -5
- package/dist/components/homepage/Demo/DisplayedEmoji.js +0 -59
- package/dist/components/homepage/Demo/DoneCheckmark.d.ts +0 -2
- package/dist/components/homepage/Demo/DoneCheckmark.js +0 -20
- package/dist/components/homepage/Demo/DownloadNudge.d.ts +0 -2
- package/dist/components/homepage/Demo/DownloadNudge.js +0 -27
- package/dist/components/homepage/Demo/DragAndDropNudge.d.ts +0 -3
- package/dist/components/homepage/Demo/DragAndDropNudge.js +0 -26
- package/dist/components/homepage/Demo/EmojiCard.d.ts +0 -10
- package/dist/components/homepage/Demo/EmojiCard.js +0 -120
- package/dist/components/homepage/Demo/Minus.d.ts +0 -5
- package/dist/components/homepage/Demo/Minus.js +0 -11
- package/dist/components/homepage/Demo/PlayPauseButton.d.ts +0 -5
- package/dist/components/homepage/Demo/PlayPauseButton.js +0 -47
- package/dist/components/homepage/Demo/PlayerControls.d.ts +0 -8
- package/dist/components/homepage/Demo/PlayerControls.js +0 -15
- package/dist/components/homepage/Demo/PlayerSeekBar.d.ts +0 -11
- package/dist/components/homepage/Demo/PlayerSeekBar.js +0 -216
- package/dist/components/homepage/Demo/PlayerVolume.d.ts +0 -5
- package/dist/components/homepage/Demo/PlayerVolume.js +0 -53
- package/dist/components/homepage/Demo/Progress.d.ts +0 -4
- package/dist/components/homepage/Demo/Progress.js +0 -14
- package/dist/components/homepage/Demo/Spinner.d.ts +0 -5
- package/dist/components/homepage/Demo/Spinner.js +0 -37
- package/dist/components/homepage/Demo/Switcher.d.ts +0 -6
- package/dist/components/homepage/Demo/Switcher.js +0 -25
- package/dist/components/homepage/Demo/Temperature.d.ts +0 -6
- package/dist/components/homepage/Demo/Temperature.js +0 -21
- package/dist/components/homepage/Demo/TemperatureNumber.d.ts +0 -5
- package/dist/components/homepage/Demo/TemperatureNumber.js +0 -36
- package/dist/components/homepage/Demo/ThemeNudge.d.ts +0 -3
- package/dist/components/homepage/Demo/ThemeNudge.js +0 -35
- package/dist/components/homepage/Demo/TimeDisplay.d.ts +0 -6
- package/dist/components/homepage/Demo/TimeDisplay.js +0 -27
- package/dist/components/homepage/Demo/TrendingRepos.d.ts +0 -6
- package/dist/components/homepage/Demo/TrendingRepos.js +0 -65
- package/dist/components/homepage/Demo/icons.d.ts +0 -10
- package/dist/components/homepage/Demo/icons.js +0 -22
- package/dist/components/homepage/Demo/index.d.ts +0 -2
- package/dist/components/homepage/Demo/index.js +0 -95
- package/dist/components/homepage/Demo/math.d.ts +0 -10
- package/dist/components/homepage/Demo/math.js +0 -29
- package/dist/components/homepage/Demo/types.d.ts +0 -6
- package/dist/components/homepage/Demo/types.js +0 -0
- package/dist/components/homepage/EditorStarterSection.d.ts +0 -3
- package/dist/components/homepage/EditorStarterSection.js +0 -8
- package/dist/components/homepage/EvaluateRemotion.d.ts +0 -3
- package/dist/components/homepage/EvaluateRemotion.js +0 -21
- package/dist/components/homepage/FreePricing.d.ts +0 -4
- package/dist/components/homepage/FreePricing.js +0 -133
- package/dist/components/homepage/GetStartedStrip.d.ts +0 -2
- package/dist/components/homepage/GetStartedStrip.js +0 -14
- package/dist/components/homepage/GitHubButton.d.ts +0 -2
- package/dist/components/homepage/GitHubButton.js +0 -7
- package/dist/components/homepage/IconForTemplate.d.ts +0 -6
- package/dist/components/homepage/IconForTemplate.js +0 -105
- package/dist/components/homepage/IfYouKnowReact.d.ts +0 -3
- package/dist/components/homepage/IfYouKnowReact.js +0 -23
- package/dist/components/homepage/MoreTemplatesButton.d.ts +0 -2
- package/dist/components/homepage/MoreTemplatesButton.js +0 -11
- package/dist/components/homepage/MuxVideo.d.ts +0 -7
- package/dist/components/homepage/MuxVideo.js +0 -45
- package/dist/components/homepage/NewsletterButton.d.ts +0 -2
- package/dist/components/homepage/NewsletterButton.js +0 -38
- package/dist/components/homepage/ParameterizeAndEdit.d.ts +0 -2
- package/dist/components/homepage/ParameterizeAndEdit.js +0 -22
- package/dist/components/homepage/Pricing.d.ts +0 -2
- package/dist/components/homepage/Pricing.js +0 -15
- package/dist/components/homepage/PricingBulletPoint.d.ts +0 -6
- package/dist/components/homepage/PricingBulletPoint.js +0 -19
- package/dist/components/homepage/RealMp4Videos.d.ts +0 -2
- package/dist/components/homepage/RealMp4Videos.js +0 -41
- package/dist/components/homepage/Spacer.d.ts +0 -2
- package/dist/components/homepage/Spacer.js +0 -4
- package/dist/components/homepage/TemplateIcon.d.ts +0 -5
- package/dist/components/homepage/TemplateIcon.js +0 -24
- package/dist/components/homepage/TextInput.d.ts +0 -7
- package/dist/components/homepage/TextInput.js +0 -34
- package/dist/components/homepage/TrustedByBanner.d.ts +0 -2
- package/dist/components/homepage/TrustedByBanner.js +0 -27
- package/dist/components/homepage/VideoApps.d.ts +0 -4
- package/dist/components/homepage/VideoApps.js +0 -72
- package/dist/components/homepage/VideoAppsShowcase.d.ts +0 -3
- package/dist/components/homepage/VideoAppsShowcase.js +0 -139
- package/dist/components/homepage/VideoAppsTitle.d.ts +0 -4
- package/dist/components/homepage/VideoAppsTitle.js +0 -4
- package/dist/components/homepage/VideoPlayerWithControls.d.ts +0 -20
- package/dist/components/homepage/VideoPlayerWithControls.js +0 -105
- package/dist/components/homepage/WriteInReact.d.ts +0 -2
- package/dist/components/homepage/WriteInReact.js +0 -10
- package/dist/components/homepage/YouAreHere.d.ts +0 -2
- package/dist/components/homepage/YouAreHere.js +0 -23
- package/dist/components/homepage/layout/Button.d.ts +0 -22
- package/dist/components/homepage/layout/Button.js +0 -30
- package/dist/components/homepage/layout/colors.d.ts +0 -13
- package/dist/components/homepage/layout/colors.js +0 -14
- package/dist/components/homepage/layout/use-color-mode.d.ts +0 -21
- package/dist/components/homepage/layout/use-color-mode.js +0 -22
- package/dist/components/homepage/layout/use-el-size.d.ts +0 -5
- package/dist/components/homepage/layout/use-el-size.js +0 -40
- package/dist/components/homepage/layout/use-mobile-layout.d.ts +0 -1
- package/dist/components/homepage/layout/use-mobile-layout.js +0 -6
- package/dist/components/icons/blank.d.ts +0 -3
- package/dist/components/icons/blank.js +0 -4
- package/dist/components/icons/brain.d.ts +0 -2
- package/dist/components/icons/brain.js +0 -4
- package/dist/components/icons/clone.d.ts +0 -2
- package/dist/components/icons/clone.js +0 -2
- package/dist/components/icons/code-hike.d.ts +0 -3
- package/dist/components/icons/code-hike.js +0 -4
- package/dist/components/icons/cubes.d.ts +0 -3
- package/dist/components/icons/cubes.js +0 -4
- package/dist/components/icons/editor.d.ts +0 -3
- package/dist/components/icons/editor.js +0 -4
- package/dist/components/icons/electron.d.ts +0 -4
- package/dist/components/icons/electron.js +0 -4
- package/dist/components/icons/js.d.ts +0 -3
- package/dist/components/icons/js.js +0 -4
- package/dist/components/icons/music.d.ts +0 -2
- package/dist/components/icons/music.js +0 -4
- package/dist/components/icons/next.d.ts +0 -4
- package/dist/components/icons/next.js +0 -4
- package/dist/components/icons/overlay.d.ts +0 -3
- package/dist/components/icons/overlay.js +0 -4
- package/dist/components/icons/prompt-to-video.d.ts +0 -2
- package/dist/components/icons/prompt-to-video.js +0 -4
- package/dist/components/icons/recorder.d.ts +0 -3
- package/dist/components/icons/recorder.js +0 -4
- package/dist/components/icons/remix.d.ts +0 -3
- package/dist/components/icons/remix.js +0 -4
- package/dist/components/icons/render-server.d.ts +0 -3
- package/dist/components/icons/render-server.js +0 -4
- package/dist/components/icons/skia.d.ts +0 -3
- package/dist/components/icons/skia.js +0 -4
- package/dist/components/icons/stargazer.d.ts +0 -3
- package/dist/components/icons/stargazer.js +0 -4
- package/dist/components/icons/still.d.ts +0 -3
- package/dist/components/icons/still.js +0 -4
- package/dist/components/icons/tailwind.d.ts +0 -3
- package/dist/components/icons/tailwind.js +0 -4
- package/dist/components/icons/tiktok.d.ts +0 -3
- package/dist/components/icons/tiktok.js +0 -4
- package/dist/components/icons/timeline.d.ts +0 -3
- package/dist/components/icons/timeline.js +0 -4
- package/dist/components/icons/ts.d.ts +0 -3
- package/dist/components/icons/ts.js +0 -4
- package/dist/components/icons/undo.d.ts +0 -3
- package/dist/components/icons/undo.js +0 -2
- package/dist/components/icons/vercel.d.ts +0 -4
- package/dist/components/icons/vercel.js +0 -4
- package/dist/components/icons/waveform.d.ts +0 -3
- package/dist/components/icons/waveform.js +0 -4
- package/dist/components/prompts/CardLikeButton.d.ts +0 -5
- package/dist/components/prompts/CardLikeButton.js +0 -49
- package/dist/components/prompts/ClipboardIcon.d.ts +0 -5
- package/dist/components/prompts/ClipboardIcon.js +0 -4
- package/dist/components/prompts/CopyPromptButton.d.ts +0 -4
- package/dist/components/prompts/CopyPromptButton.js +0 -13
- package/dist/components/prompts/LikeButton.d.ts +0 -5
- package/dist/components/prompts/LikeButton.js +0 -49
- package/dist/components/prompts/MuxPlayer.d.ts +0 -8
- package/dist/components/prompts/MuxPlayer.js +0 -21
- package/dist/components/prompts/NewBackButton.d.ts +0 -5
- package/dist/components/prompts/NewBackButton.js +0 -8
- package/dist/components/prompts/Page.d.ts +0 -8
- package/dist/components/prompts/Page.js +0 -7
- package/dist/components/prompts/PromptsGallery.d.ts +0 -7
- package/dist/components/prompts/PromptsGallery.js +0 -60
- package/dist/components/prompts/PromptsShow.d.ts +0 -5
- package/dist/components/prompts/PromptsShow.js +0 -17
- package/dist/components/prompts/PromptsSubmit.d.ts +0 -2
- package/dist/components/prompts/PromptsSubmit.js +0 -173
- package/dist/components/prompts/config.d.ts +0 -1
- package/dist/components/prompts/config.js +0 -1
- package/dist/components/prompts/prompt-helpers.d.ts +0 -8
- package/dist/components/prompts/prompt-helpers.js +0 -76
- package/dist/components/prompts/prompt-types.d.ts +0 -14
- package/dist/components/prompts/prompt-types.js +0 -0
- package/dist/components/prompts/use-heart-animation.d.ts +0 -5
- package/dist/components/prompts/use-heart-animation.js +0 -29
- package/dist/components/team/TeamCards.d.ts +0 -6
- package/dist/components/team/TeamCards.js +0 -19
- package/dist/components/team/TitleTeamCards.d.ts +0 -2
- package/dist/components/team/TitleTeamCards.js +0 -6
- package/dist/components/team/TrustSection.d.ts +0 -2
- package/dist/components/team/TrustSection.js +0 -59
- package/dist/components/team.d.ts +0 -3
- package/dist/components/team.js +0 -15
- package/dist/components/template-modal-content.d.ts +0 -5
- package/dist/components/template-modal-content.js +0 -73
- package/dist/components/templates.d.ts +0 -2
- package/dist/components/templates.js +0 -27
- package/dist/helpers/mobile-layout.d.ts +0 -1
- package/dist/helpers/mobile-layout.js +0 -6
- package/dist/helpers/use-el-size.d.ts +0 -5
- package/dist/helpers/use-el-size.js +0 -40
- package/dist/main.d.ts +0 -1
- package/dist/main.js +0 -6
- package/dist/prompts/PromptsShow.css +0 -2578
- package/dist/prompts-show.d.ts +0 -1
- package/dist/prompts-show.js +0 -20
- package/dist/prompts-submit.d.ts +0 -1
- package/dist/prompts-submit.js +0 -6
- package/dist/prompts.d.ts +0 -1
- package/dist/prompts.js +0 -6
- package/dist/team.d.ts +0 -1
- package/dist/template-modal-content.css +0 -35
|
@@ -1,26 +1,15 @@
|
|
|
1
|
-
var __create = Object.create;
|
|
2
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
3
1
|
var __defProp = Object.defineProperty;
|
|
4
|
-
var
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
|
|
9
|
-
for (let key of __getOwnPropNames(mod))
|
|
10
|
-
if (!__hasOwnProp.call(to, key))
|
|
11
|
-
__defProp(to, key, {
|
|
12
|
-
get: () => mod[key],
|
|
13
|
-
enumerable: true
|
|
14
|
-
});
|
|
15
|
-
return to;
|
|
16
|
-
};
|
|
2
|
+
var __returnValue = (v) => v;
|
|
3
|
+
function __exportSetter(name, newValue) {
|
|
4
|
+
this[name] = __returnValue.bind(null, newValue);
|
|
5
|
+
}
|
|
17
6
|
var __export = (target, all) => {
|
|
18
7
|
for (var name in all)
|
|
19
8
|
__defProp(target, name, {
|
|
20
9
|
get: all[name],
|
|
21
10
|
enumerable: true,
|
|
22
11
|
configurable: true,
|
|
23
|
-
set: (
|
|
12
|
+
set: __exportSetter.bind(all, name)
|
|
24
13
|
});
|
|
25
14
|
};
|
|
26
15
|
var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
|
|
@@ -45,7 +34,7 @@ __export(exports_vidstack_CZgUA94N, {
|
|
|
45
34
|
useSignal: () => useSignal,
|
|
46
35
|
useReactScope: () => useReactScope,
|
|
47
36
|
useReactContext: () => useReactContext,
|
|
48
|
-
useContext: () =>
|
|
37
|
+
useContext: () => useContext45,
|
|
49
38
|
uppercaseFirstChar: () => uppercaseFirstChar,
|
|
50
39
|
untrack: () => untrack,
|
|
51
40
|
toggleClass: () => toggleClass,
|
|
@@ -619,7 +608,7 @@ function provideContext(context, value, scope = getScope()) {
|
|
|
619
608
|
const hasProvidedValue = !isUndefined(value);
|
|
620
609
|
setContext(context.id, hasProvidedValue ? value : context.provide?.(), scope);
|
|
621
610
|
}
|
|
622
|
-
function
|
|
611
|
+
function useContext45(context) {
|
|
623
612
|
const value = getContext(context.id);
|
|
624
613
|
return value;
|
|
625
614
|
}
|
|
@@ -679,7 +668,7 @@ class State {
|
|
|
679
668
|
}
|
|
680
669
|
}
|
|
681
670
|
function useState41(state) {
|
|
682
|
-
return
|
|
671
|
+
return useContext45(state);
|
|
683
672
|
}
|
|
684
673
|
function camelToKebabCase(str) {
|
|
685
674
|
return str.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase();
|
|
@@ -717,7 +706,7 @@ function composeRefs3(...refs) {
|
|
|
717
706
|
return (node) => refs.forEach((ref) => setRef3(ref, node));
|
|
718
707
|
}
|
|
719
708
|
function createClientComponent(Component2, options2) {
|
|
720
|
-
const forwardComponent = React53.forwardRef((props,
|
|
709
|
+
const forwardComponent = React53.forwardRef((props, forwardRef16) => {
|
|
721
710
|
let parentScopeRef = React53.useContext(ReactScopeContext), scopeRef = React53.useRef(null), stateRef = React53.useRef();
|
|
722
711
|
if (!stateRef.current) {
|
|
723
712
|
const state2 = createInternalState(), component = initComponent(Component2, state2, props, parentScopeRef.current);
|
|
@@ -740,7 +729,7 @@ function createClientComponent(Component2, options2) {
|
|
|
740
729
|
attachToHost(state2, state2.el);
|
|
741
730
|
}
|
|
742
731
|
if (!state2.forwardRef) {
|
|
743
|
-
setRef3(
|
|
732
|
+
setRef3(forwardRef16, state2.component);
|
|
744
733
|
state2.forwardRef = true;
|
|
745
734
|
}
|
|
746
735
|
return () => detachFromHost(state2);
|
|
@@ -1061,7 +1050,7 @@ function createServerComponent(Component2, options2) {
|
|
|
1061
1050
|
let scope = React53.useContext(ReactScopeContext), component = createComponent(Component2, {
|
|
1062
1051
|
props,
|
|
1063
1052
|
scope: scope.current
|
|
1064
|
-
}), host = new MaverickServerElement(component), attrs = {}, { style = {}, children, forwardRef:
|
|
1053
|
+
}), host = new MaverickServerElement(component), attrs = {}, { style = {}, children, forwardRef: forwardRef16, ...renderProps } = props;
|
|
1065
1054
|
if (options2.props.size) {
|
|
1066
1055
|
for (const prop2 of Object.keys(renderProps)) {
|
|
1067
1056
|
if (!options2.props.has(prop2))
|
|
@@ -7061,7 +7050,7 @@ function boundTime(time, store) {
|
|
|
7061
7050
|
return Math.min(Math.max(store.seekableStart() + 0.1, clippedTime), store.seekableEnd() - 0.1);
|
|
7062
7051
|
}
|
|
7063
7052
|
function useMediaContext() {
|
|
7064
|
-
return
|
|
7053
|
+
return useContext45(mediaContext);
|
|
7065
7054
|
}
|
|
7066
7055
|
|
|
7067
7056
|
class MediaRemoteControl {
|
|
@@ -13976,7 +13965,7 @@ var init_vidstack_D5Pzx_k5 = __esm(() => {
|
|
|
13976
13965
|
if (!this.connectScope)
|
|
13977
13966
|
return;
|
|
13978
13967
|
this.#attach();
|
|
13979
|
-
const tooltip =
|
|
13968
|
+
const tooltip = useContext45(tooltipContext);
|
|
13980
13969
|
onDispose(() => {
|
|
13981
13970
|
const button = this.#getButton();
|
|
13982
13971
|
button && tooltip.detachTrigger(button);
|
|
@@ -13984,7 +13973,7 @@ var init_vidstack_D5Pzx_k5 = __esm(() => {
|
|
|
13984
13973
|
}));
|
|
13985
13974
|
}
|
|
13986
13975
|
#attach() {
|
|
13987
|
-
const button = this.#getButton(), tooltip =
|
|
13976
|
+
const button = this.#getButton(), tooltip = useContext45(tooltipContext);
|
|
13988
13977
|
button && tooltip.attachTrigger(button);
|
|
13989
13978
|
}
|
|
13990
13979
|
#getButton() {
|
|
@@ -14017,7 +14006,7 @@ var init_vidstack_D5Pzx_k5 = __esm(() => {
|
|
|
14017
14006
|
}
|
|
14018
14007
|
onConnect(el) {
|
|
14019
14008
|
this.#attach(el);
|
|
14020
|
-
const tooltip =
|
|
14009
|
+
const tooltip = useContext45(tooltipContext);
|
|
14021
14010
|
onDispose(() => tooltip.detachContent(el));
|
|
14022
14011
|
onDispose(requestScopedAnimationFrame(() => {
|
|
14023
14012
|
if (!this.connectScope)
|
|
@@ -14026,11 +14015,11 @@ var init_vidstack_D5Pzx_k5 = __esm(() => {
|
|
|
14026
14015
|
}));
|
|
14027
14016
|
}
|
|
14028
14017
|
#attach(el) {
|
|
14029
|
-
const tooltip =
|
|
14018
|
+
const tooltip = useContext45(tooltipContext);
|
|
14030
14019
|
tooltip.attachContent(el);
|
|
14031
14020
|
}
|
|
14032
14021
|
#watchPlacement() {
|
|
14033
|
-
const { showing } =
|
|
14022
|
+
const { showing } = useContext45(tooltipContext);
|
|
14034
14023
|
if (!showing())
|
|
14035
14024
|
return;
|
|
14036
14025
|
const { placement, offset: mainOffset, alignOffset } = this.$props;
|
|
@@ -14041,7 +14030,7 @@ var init_vidstack_D5Pzx_k5 = __esm(() => {
|
|
|
14041
14030
|
});
|
|
14042
14031
|
}
|
|
14043
14032
|
#getTrigger() {
|
|
14044
|
-
return
|
|
14033
|
+
return useContext45(tooltipContext).trigger();
|
|
14045
14034
|
}
|
|
14046
14035
|
};
|
|
14047
14036
|
ToggleButtonController = class ToggleButtonController extends ViewController {
|
|
@@ -14537,7 +14526,7 @@ var init_vidstack_D5Pzx_k5 = __esm(() => {
|
|
|
14537
14526
|
}
|
|
14538
14527
|
onSetup() {
|
|
14539
14528
|
if (hasProvidedContext(sliderObserverContext)) {
|
|
14540
|
-
this.#observer =
|
|
14529
|
+
this.#observer = useContext45(sliderObserverContext);
|
|
14541
14530
|
}
|
|
14542
14531
|
}
|
|
14543
14532
|
onConnect(el) {
|
|
@@ -15153,7 +15142,7 @@ var init_vidstack_D5Pzx_k5 = __esm(() => {
|
|
|
15153
15142
|
#slider;
|
|
15154
15143
|
onSetup() {
|
|
15155
15144
|
this.#slider = useState41(Slider.state);
|
|
15156
|
-
this.#format =
|
|
15145
|
+
this.#format = useContext45(sliderValueFormatContext);
|
|
15157
15146
|
this.#text = computed(this.getValueText.bind(this));
|
|
15158
15147
|
}
|
|
15159
15148
|
getValueText() {
|
|
@@ -15192,7 +15181,7 @@ var init_vidstack_D5Pzx_k5 = __esm(() => {
|
|
|
15192
15181
|
};
|
|
15193
15182
|
#slider;
|
|
15194
15183
|
onSetup() {
|
|
15195
|
-
this.#slider =
|
|
15184
|
+
this.#slider = useContext45(sliderContext);
|
|
15196
15185
|
const { active } = useState41(Slider.state);
|
|
15197
15186
|
this.setAttributes({
|
|
15198
15187
|
"data-visible": active
|
|
@@ -15620,7 +15609,7 @@ var init_vidstack_D5Pzx_k5 = __esm(() => {
|
|
|
15620
15609
|
}
|
|
15621
15610
|
}
|
|
15622
15611
|
#watchPreviewing() {
|
|
15623
|
-
const player = this.#media.player.el, { preview } =
|
|
15612
|
+
const player = this.#media.player.el, { preview } = useContext45(sliderContext);
|
|
15624
15613
|
player && preview() && setAttribute(player, "data-preview", this.$state.active());
|
|
15625
15614
|
}
|
|
15626
15615
|
#seeking(time, event2) {
|
|
@@ -16058,7 +16047,7 @@ var init_vidstack_D5Pzx_k5 = __esm(() => {
|
|
|
16058
16047
|
closeMenu: this.close.bind(this)
|
|
16059
16048
|
});
|
|
16060
16049
|
if (hasProvidedContext(menuContext)) {
|
|
16061
|
-
this.#parentMenu =
|
|
16050
|
+
this.#parentMenu = useContext45(menuContext);
|
|
16062
16051
|
}
|
|
16063
16052
|
this.#observeSliders();
|
|
16064
16053
|
this.setAttributes({
|
|
@@ -16103,7 +16092,7 @@ var init_vidstack_D5Pzx_k5 = __esm(() => {
|
|
|
16103
16092
|
this.#transitionCallbacks.clear();
|
|
16104
16093
|
}
|
|
16105
16094
|
#observeSliders() {
|
|
16106
|
-
let sliderActiveTimer = -1, parentSliderObserver = hasProvidedContext(sliderObserverContext) ?
|
|
16095
|
+
let sliderActiveTimer = -1, parentSliderObserver = hasProvidedContext(sliderObserverContext) ? useContext45(sliderObserverContext) : null;
|
|
16107
16096
|
provideContext(sliderObserverContext, {
|
|
16108
16097
|
onDragStart: () => {
|
|
16109
16098
|
parentSliderObserver?.onDragStart?.();
|
|
@@ -16430,7 +16419,7 @@ var init_vidstack_D5Pzx_k5 = __esm(() => {
|
|
|
16430
16419
|
new FocusVisibleController;
|
|
16431
16420
|
}
|
|
16432
16421
|
onSetup() {
|
|
16433
|
-
this.#menu =
|
|
16422
|
+
this.#menu = useContext45(menuContext);
|
|
16434
16423
|
}
|
|
16435
16424
|
onAttach(el) {
|
|
16436
16425
|
this.#menu.attachMenuButton(this);
|
|
@@ -16546,10 +16535,10 @@ var init_vidstack_D5Pzx_k5 = __esm(() => {
|
|
|
16546
16535
|
});
|
|
16547
16536
|
}
|
|
16548
16537
|
onAttach(el) {
|
|
16549
|
-
this.#menu =
|
|
16538
|
+
this.#menu = useContext45(menuContext);
|
|
16550
16539
|
this.#menu.attachMenuItems(this);
|
|
16551
16540
|
if (hasProvidedContext(menuPortalContext)) {
|
|
16552
|
-
const portal =
|
|
16541
|
+
const portal = useContext45(menuPortalContext);
|
|
16553
16542
|
if (portal) {
|
|
16554
16543
|
provideContext(menuPortalContext, null);
|
|
16555
16544
|
portal.attach(el);
|
|
@@ -16724,12 +16713,12 @@ var init_vidstack_D5Pzx_k5 = __esm(() => {
|
|
|
16724
16713
|
}
|
|
16725
16714
|
#onDisconnect() {
|
|
16726
16715
|
scoped(() => {
|
|
16727
|
-
const group =
|
|
16716
|
+
const group = useContext45(radioControllerContext);
|
|
16728
16717
|
group.remove(this.#controller);
|
|
16729
16718
|
}, this.connectScope);
|
|
16730
16719
|
}
|
|
16731
16720
|
#addToGroup() {
|
|
16732
|
-
const group =
|
|
16721
|
+
const group = useContext45(radioControllerContext);
|
|
16733
16722
|
group.add(this.#controller);
|
|
16734
16723
|
}
|
|
16735
16724
|
#watchValue() {
|
|
@@ -23077,8 +23066,21 @@ import * as React6 from "react";
|
|
|
23077
23066
|
import React7, { useMemo as useMemo6, useRef as useRef2 } from "react";
|
|
23078
23067
|
import { useContext as useContext8, useMemo as useMemo7 } from "react";
|
|
23079
23068
|
import { jsx as jsx72 } from "react/jsx-runtime";
|
|
23080
|
-
import {
|
|
23081
|
-
|
|
23069
|
+
import {
|
|
23070
|
+
forwardRef as forwardRef4,
|
|
23071
|
+
useCallback as useCallback6,
|
|
23072
|
+
useEffect as useEffect5,
|
|
23073
|
+
useMemo as useMemo16,
|
|
23074
|
+
useState as useState6
|
|
23075
|
+
} from "react";
|
|
23076
|
+
import {
|
|
23077
|
+
forwardRef as forwardRef3,
|
|
23078
|
+
useContext as useContext17,
|
|
23079
|
+
useEffect as useEffect3,
|
|
23080
|
+
useMemo as useMemo14,
|
|
23081
|
+
useState as useState5
|
|
23082
|
+
} from "react";
|
|
23083
|
+
import { useContext as useContext14, useMemo as useMemo11 } from "react";
|
|
23082
23084
|
import { createContext as createContext12 } from "react";
|
|
23083
23085
|
import { useContext as useContext10, useMemo as useMemo9 } from "react";
|
|
23084
23086
|
import {
|
|
@@ -23089,52 +23091,45 @@ import {
|
|
|
23089
23091
|
useState as useState2
|
|
23090
23092
|
} from "react";
|
|
23091
23093
|
import { jsx as jsx82 } from "react/jsx-runtime";
|
|
23092
|
-
import {
|
|
23093
|
-
import { useRef as useRef5 } from "react";
|
|
23094
|
-
import { jsx as jsx92 } from "react/jsx-runtime";
|
|
23095
|
-
import {
|
|
23096
|
-
forwardRef as forwardRef3,
|
|
23097
|
-
useContext as useContext16,
|
|
23098
|
-
useEffect as useEffect5,
|
|
23099
|
-
useMemo as useMemo16,
|
|
23100
|
-
useState as useState6
|
|
23101
|
-
} from "react";
|
|
23102
|
-
import { useContext as useContext14, useMemo as useMemo13 } from "react";
|
|
23094
|
+
import { useContext as useContext11 } from "react";
|
|
23103
23095
|
import { useContext as useContext13 } from "react";
|
|
23104
|
-
import { useContext as useContext12, useMemo as
|
|
23105
|
-
import { jsx as
|
|
23096
|
+
import { useContext as useContext12, useMemo as useMemo10 } from "react";
|
|
23097
|
+
import { jsx as jsx92 } from "react/jsx-runtime";
|
|
23106
23098
|
import { createContext as createContext14 } from "react";
|
|
23107
|
-
import
|
|
23108
|
-
import { jsx as
|
|
23109
|
-
import
|
|
23099
|
+
import React11, { useCallback as useCallback5, useMemo as useMemo12, useRef as useRef4, useState as useState3 } from "react";
|
|
23100
|
+
import { jsx as jsx102 } from "react/jsx-runtime";
|
|
23101
|
+
import React12, { forwardRef as forwardRef2, useState as useState4, useContext as useContext16, useMemo as useMemo13 } from "react";
|
|
23102
|
+
import { useContext as useContext15, useRef as useRef5 } from "react";
|
|
23110
23103
|
import { createContext as createContext15 } from "react";
|
|
23104
|
+
import { jsx as jsx112 } from "react/jsx-runtime";
|
|
23105
|
+
import { useEffect as useEffect4, useMemo as useMemo15, useRef as useRef6 } from "react";
|
|
23111
23106
|
import { jsx as jsx12 } from "react/jsx-runtime";
|
|
23112
23107
|
import {
|
|
23113
|
-
forwardRef as
|
|
23108
|
+
forwardRef as forwardRef5,
|
|
23114
23109
|
useEffect as useEffect6,
|
|
23115
23110
|
useImperativeHandle as useImperativeHandle2,
|
|
23116
23111
|
useLayoutEffect as useLayoutEffect2,
|
|
23117
23112
|
useRef as useRef8,
|
|
23118
23113
|
useState as useState7
|
|
23119
23114
|
} from "react";
|
|
23120
|
-
import React15, { useCallback as
|
|
23115
|
+
import React15, { useCallback as useCallback7, useImperativeHandle, useRef as useRef7 } from "react";
|
|
23121
23116
|
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
23122
23117
|
import { jsx as jsx14 } from "react/jsx-runtime";
|
|
23123
23118
|
import {
|
|
23124
23119
|
createContext as createContext16,
|
|
23125
|
-
forwardRef as
|
|
23126
|
-
useCallback as
|
|
23127
|
-
useContext as
|
|
23120
|
+
forwardRef as forwardRef6,
|
|
23121
|
+
useCallback as useCallback8,
|
|
23122
|
+
useContext as useContext18,
|
|
23128
23123
|
useLayoutEffect as useLayoutEffect3,
|
|
23129
23124
|
useMemo as useMemo17,
|
|
23130
23125
|
useRef as useRef9,
|
|
23131
23126
|
useState as useState8
|
|
23132
23127
|
} from "react";
|
|
23133
23128
|
import { jsx as jsx15 } from "react/jsx-runtime";
|
|
23134
|
-
import { useContext as
|
|
23129
|
+
import { useContext as useContext19, useLayoutEffect as useLayoutEffect5, useState as useState10 } from "react";
|
|
23135
23130
|
import {
|
|
23136
23131
|
createContext as createContext17,
|
|
23137
|
-
useCallback as
|
|
23132
|
+
useCallback as useCallback9,
|
|
23138
23133
|
useImperativeHandle as useImperativeHandle3,
|
|
23139
23134
|
useLayoutEffect as useLayoutEffect4,
|
|
23140
23135
|
useMemo as useMemo18,
|
|
@@ -23142,29 +23137,29 @@ import {
|
|
|
23142
23137
|
useState as useState9
|
|
23143
23138
|
} from "react";
|
|
23144
23139
|
import { jsx as jsx16 } from "react/jsx-runtime";
|
|
23145
|
-
import { forwardRef as
|
|
23140
|
+
import { forwardRef as forwardRef9, useCallback as useCallback14, useContext as useContext31 } from "react";
|
|
23146
23141
|
import React17, { createContext as createContext18, useMemo as useMemo19 } from "react";
|
|
23147
23142
|
import { jsx as jsx17 } from "react/jsx-runtime";
|
|
23148
|
-
import { useContext as
|
|
23143
|
+
import { useContext as useContext20 } from "react";
|
|
23149
23144
|
import { createContext as createContext19, useEffect as useEffect7, useState as useState11 } from "react";
|
|
23150
23145
|
import { jsx as jsx18 } from "react/jsx-runtime";
|
|
23151
23146
|
import { createContext as createContext20, useMemo as useMemo20, useReducer } from "react";
|
|
23152
23147
|
import { jsx as jsx19 } from "react/jsx-runtime";
|
|
23153
23148
|
import React23, {
|
|
23154
|
-
forwardRef as
|
|
23155
|
-
useContext as
|
|
23149
|
+
forwardRef as forwardRef7,
|
|
23150
|
+
useContext as useContext29,
|
|
23156
23151
|
useEffect as useEffect14,
|
|
23157
23152
|
useImperativeHandle as useImperativeHandle4,
|
|
23158
23153
|
useMemo as useMemo28,
|
|
23159
23154
|
useRef as useRef18,
|
|
23160
23155
|
useState as useState16
|
|
23161
23156
|
} from "react";
|
|
23162
|
-
import { useContext as
|
|
23157
|
+
import { useContext as useContext22, useLayoutEffect as useLayoutEffect6, useRef as useRef13 } from "react";
|
|
23163
23158
|
import React20, {
|
|
23164
23159
|
createContext as createContext21,
|
|
23165
23160
|
createRef as createRef2,
|
|
23166
|
-
useCallback as
|
|
23167
|
-
useContext as
|
|
23161
|
+
useCallback as useCallback10,
|
|
23162
|
+
useContext as useContext21,
|
|
23168
23163
|
useMemo as useMemo22,
|
|
23169
23164
|
useRef as useRef11,
|
|
23170
23165
|
useState as useState12
|
|
@@ -23172,20 +23167,20 @@ import React20, {
|
|
|
23172
23167
|
import { useMemo as useMemo21 } from "react";
|
|
23173
23168
|
import { jsx as jsx20, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
23174
23169
|
import { useRef as useRef12 } from "react";
|
|
23175
|
-
import { useContext as
|
|
23176
|
-
import { useContext as
|
|
23170
|
+
import { useContext as useContext24, useEffect as useEffect8, useMemo as useMemo23, useState as useState13 } from "react";
|
|
23171
|
+
import { useContext as useContext23 } from "react";
|
|
23177
23172
|
import {
|
|
23178
|
-
useCallback as
|
|
23179
|
-
useContext as
|
|
23173
|
+
useCallback as useCallback13,
|
|
23174
|
+
useContext as useContext27,
|
|
23180
23175
|
useEffect as useEffect12,
|
|
23181
23176
|
useLayoutEffect as useLayoutEffect8,
|
|
23182
23177
|
useRef as useRef17
|
|
23183
23178
|
} from "react";
|
|
23184
|
-
import { useCallback as
|
|
23185
|
-
import { useContext as
|
|
23179
|
+
import { useCallback as useCallback12, useMemo as useMemo26, useRef as useRef15 } from "react";
|
|
23180
|
+
import { useContext as useContext26, useMemo as useMemo25 } from "react";
|
|
23186
23181
|
import React21, {
|
|
23187
|
-
useCallback as
|
|
23188
|
-
useContext as
|
|
23182
|
+
useCallback as useCallback11,
|
|
23183
|
+
useContext as useContext25,
|
|
23189
23184
|
useEffect as useEffect9,
|
|
23190
23185
|
useLayoutEffect as useLayoutEffect7,
|
|
23191
23186
|
useMemo as useMemo24,
|
|
@@ -23197,11 +23192,11 @@ import React22 from "react";
|
|
|
23197
23192
|
import { useEffect as useEffect10, useState as useState15 } from "react";
|
|
23198
23193
|
import { useEffect as useEffect11, useRef as useRef16 } from "react";
|
|
23199
23194
|
import { useEffect as useEffect13 } from "react";
|
|
23200
|
-
import { createContext as createContext22, useContext as
|
|
23195
|
+
import { createContext as createContext22, useContext as useContext28, useMemo as useMemo27 } from "react";
|
|
23201
23196
|
import { jsx as jsx222 } from "react/jsx-runtime";
|
|
23202
23197
|
import {
|
|
23203
|
-
forwardRef as
|
|
23204
|
-
useContext as
|
|
23198
|
+
forwardRef as forwardRef8,
|
|
23199
|
+
useContext as useContext30,
|
|
23205
23200
|
useEffect as useEffect15,
|
|
23206
23201
|
useImperativeHandle as useImperativeHandle5,
|
|
23207
23202
|
useLayoutEffect as useLayoutEffect9,
|
|
@@ -23210,11 +23205,11 @@ import {
|
|
|
23210
23205
|
} from "react";
|
|
23211
23206
|
import { jsx as jsx23 } from "react/jsx-runtime";
|
|
23212
23207
|
import { jsx as jsx24 } from "react/jsx-runtime";
|
|
23213
|
-
import { forwardRef as
|
|
23208
|
+
import { forwardRef as forwardRef10, useCallback as useCallback15, useState as useState17 } from "react";
|
|
23214
23209
|
import { jsx as jsx25 } from "react/jsx-runtime";
|
|
23215
23210
|
import {
|
|
23216
|
-
useCallback as
|
|
23217
|
-
useContext as
|
|
23211
|
+
useCallback as useCallback16,
|
|
23212
|
+
useContext as useContext32,
|
|
23218
23213
|
useImperativeHandle as useImperativeHandle6,
|
|
23219
23214
|
useLayoutEffect as useLayoutEffect10,
|
|
23220
23215
|
useRef as useRef20,
|
|
@@ -23224,7 +23219,7 @@ import { jsx as jsx26 } from "react/jsx-runtime";
|
|
|
23224
23219
|
import { createRef as createRef3 } from "react";
|
|
23225
23220
|
import React28 from "react";
|
|
23226
23221
|
import {
|
|
23227
|
-
useCallback as
|
|
23222
|
+
useCallback as useCallback17,
|
|
23228
23223
|
useImperativeHandle as useImperativeHandle7,
|
|
23229
23224
|
useMemo as useMemo30,
|
|
23230
23225
|
useRef as useRef21,
|
|
@@ -23233,15 +23228,15 @@ import {
|
|
|
23233
23228
|
import { jsx as jsx27 } from "react/jsx-runtime";
|
|
23234
23229
|
import React29 from "react";
|
|
23235
23230
|
import { useMemo as useMemo322 } from "react";
|
|
23236
|
-
import { createContext as createContext23, useContext as
|
|
23231
|
+
import { createContext as createContext23, useContext as useContext33, useMemo as useMemo31 } from "react";
|
|
23237
23232
|
import { jsx as jsx28 } from "react/jsx-runtime";
|
|
23238
23233
|
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
23239
23234
|
import React31 from "react";
|
|
23240
23235
|
import React32, { createContext as createContext24 } from "react";
|
|
23241
|
-
import { useCallback as
|
|
23236
|
+
import { useCallback as useCallback19 } from "react";
|
|
23242
23237
|
import {
|
|
23243
|
-
useCallback as
|
|
23244
|
-
useContext as
|
|
23238
|
+
useCallback as useCallback18,
|
|
23239
|
+
useContext as useContext34,
|
|
23245
23240
|
useEffect as useEffect16,
|
|
23246
23241
|
useLayoutEffect as useLayoutEffect11,
|
|
23247
23242
|
useMemo as useMemo33,
|
|
@@ -23249,8 +23244,8 @@ import {
|
|
|
23249
23244
|
} from "react";
|
|
23250
23245
|
import { jsx as jsx30 } from "react/jsx-runtime";
|
|
23251
23246
|
import React34, {
|
|
23252
|
-
forwardRef as
|
|
23253
|
-
useContext as
|
|
23247
|
+
forwardRef as forwardRef11,
|
|
23248
|
+
useContext as useContext35,
|
|
23254
23249
|
useEffect as useEffect18,
|
|
23255
23250
|
useImperativeHandle as useImperativeHandle8,
|
|
23256
23251
|
useMemo as useMemo34,
|
|
@@ -23262,16 +23257,16 @@ import { jsx as jsx31 } from "react/jsx-runtime";
|
|
|
23262
23257
|
import { jsx as jsx322 } from "react/jsx-runtime";
|
|
23263
23258
|
import React36, { useMemo as useMemo35 } from "react";
|
|
23264
23259
|
import { jsx as jsx33 } from "react/jsx-runtime";
|
|
23265
|
-
import { Children, forwardRef as
|
|
23260
|
+
import { Children, forwardRef as forwardRef12, useMemo as useMemo36 } from "react";
|
|
23266
23261
|
import React37 from "react";
|
|
23267
23262
|
import React38, { createContext as createContext25 } from "react";
|
|
23268
23263
|
import { jsx as jsx34 } from "react/jsx-runtime";
|
|
23269
23264
|
import { jsx as jsx35 } from "react/jsx-runtime";
|
|
23270
23265
|
import React40 from "react";
|
|
23271
|
-
import { forwardRef as
|
|
23266
|
+
import { forwardRef as forwardRef14, useCallback as useCallback20, useContext as useContext37 } from "react";
|
|
23272
23267
|
import {
|
|
23273
|
-
forwardRef as
|
|
23274
|
-
useContext as
|
|
23268
|
+
forwardRef as forwardRef13,
|
|
23269
|
+
useContext as useContext36,
|
|
23275
23270
|
useEffect as useEffect19,
|
|
23276
23271
|
useImperativeHandle as useImperativeHandle9,
|
|
23277
23272
|
useLayoutEffect as useLayoutEffect12,
|
|
@@ -23281,13 +23276,17 @@ import {
|
|
|
23281
23276
|
import { jsx as jsx36 } from "react/jsx-runtime";
|
|
23282
23277
|
import { jsx as jsx37 } from "react/jsx-runtime";
|
|
23283
23278
|
var __defProp2 = Object.defineProperty;
|
|
23279
|
+
var __returnValue2 = (v) => v;
|
|
23280
|
+
function __exportSetter2(name, newValue) {
|
|
23281
|
+
this[name] = __returnValue2.bind(null, newValue);
|
|
23282
|
+
}
|
|
23284
23283
|
var __export2 = (target, all) => {
|
|
23285
23284
|
for (var name in all)
|
|
23286
23285
|
__defProp2(target, name, {
|
|
23287
23286
|
get: all[name],
|
|
23288
23287
|
enumerable: true,
|
|
23289
23288
|
configurable: true,
|
|
23290
|
-
set: (
|
|
23289
|
+
set: __exportSetter2.bind(all, name)
|
|
23291
23290
|
});
|
|
23292
23291
|
};
|
|
23293
23292
|
if (typeof createContext !== "function") {
|
|
@@ -24347,6 +24346,81 @@ var Composition = (props) => {
|
|
|
24347
24346
|
...props
|
|
24348
24347
|
});
|
|
24349
24348
|
};
|
|
24349
|
+
var componentsToAddStacksTo = [];
|
|
24350
|
+
var getComponentsToAddStacksTo = () => componentsToAddStacksTo;
|
|
24351
|
+
var addSequenceStackTraces = (component) => {
|
|
24352
|
+
componentsToAddStacksTo.push(component);
|
|
24353
|
+
};
|
|
24354
|
+
var sequenceStyleSchema = {
|
|
24355
|
+
"style.translate": {
|
|
24356
|
+
type: "translate",
|
|
24357
|
+
step: 1,
|
|
24358
|
+
default: "0px 0px",
|
|
24359
|
+
description: "Offset"
|
|
24360
|
+
},
|
|
24361
|
+
"style.scale": {
|
|
24362
|
+
type: "number",
|
|
24363
|
+
min: 0.05,
|
|
24364
|
+
max: 100,
|
|
24365
|
+
step: 0.01,
|
|
24366
|
+
default: 1,
|
|
24367
|
+
description: "Scale"
|
|
24368
|
+
},
|
|
24369
|
+
"style.rotate": {
|
|
24370
|
+
type: "rotation",
|
|
24371
|
+
step: 1,
|
|
24372
|
+
default: "0deg",
|
|
24373
|
+
description: "Rotation"
|
|
24374
|
+
},
|
|
24375
|
+
"style.opacity": {
|
|
24376
|
+
type: "number",
|
|
24377
|
+
min: 0,
|
|
24378
|
+
max: 1,
|
|
24379
|
+
step: 0.01,
|
|
24380
|
+
default: 1,
|
|
24381
|
+
description: "Opacity"
|
|
24382
|
+
},
|
|
24383
|
+
premountFor: {
|
|
24384
|
+
type: "number",
|
|
24385
|
+
default: 0,
|
|
24386
|
+
description: "Premount For",
|
|
24387
|
+
min: 0,
|
|
24388
|
+
step: 1
|
|
24389
|
+
},
|
|
24390
|
+
postmountFor: {
|
|
24391
|
+
type: "hidden"
|
|
24392
|
+
},
|
|
24393
|
+
styleWhilePremounted: {
|
|
24394
|
+
type: "hidden"
|
|
24395
|
+
},
|
|
24396
|
+
styleWhilePostmounted: {
|
|
24397
|
+
type: "hidden"
|
|
24398
|
+
}
|
|
24399
|
+
};
|
|
24400
|
+
var hiddenField = {
|
|
24401
|
+
type: "boolean",
|
|
24402
|
+
default: false,
|
|
24403
|
+
description: "Hidden"
|
|
24404
|
+
};
|
|
24405
|
+
var sequenceSchema = {
|
|
24406
|
+
hidden: hiddenField,
|
|
24407
|
+
layout: {
|
|
24408
|
+
type: "enum",
|
|
24409
|
+
default: "absolute-fill",
|
|
24410
|
+
description: "Layout",
|
|
24411
|
+
variants: {
|
|
24412
|
+
"absolute-fill": sequenceStyleSchema,
|
|
24413
|
+
none: {}
|
|
24414
|
+
}
|
|
24415
|
+
}
|
|
24416
|
+
};
|
|
24417
|
+
var sequenceSchemaDefaultLayoutNone = {
|
|
24418
|
+
...sequenceSchema,
|
|
24419
|
+
layout: {
|
|
24420
|
+
...sequenceSchema.layout,
|
|
24421
|
+
default: "none"
|
|
24422
|
+
}
|
|
24423
|
+
};
|
|
24350
24424
|
var SequenceContext = createContext12(null);
|
|
24351
24425
|
var exports_timeline_position_state = {};
|
|
24352
24426
|
__export2(exports_timeline_position_state, {
|
|
@@ -24552,314 +24626,13 @@ var useCurrentFrame = () => {
|
|
|
24552
24626
|
const contextOffset = context ? context.cumulatedFrom + context.relativeFrom : 0;
|
|
24553
24627
|
return frame - contextOffset;
|
|
24554
24628
|
};
|
|
24555
|
-
var flattenEffects = (effects) => {
|
|
24556
|
-
const out = [];
|
|
24557
|
-
for (const item of effects) {
|
|
24558
|
-
if (Array.isArray(item)) {
|
|
24559
|
-
for (const inner of item) {
|
|
24560
|
-
out.push(inner);
|
|
24561
|
-
}
|
|
24562
|
-
} else {
|
|
24563
|
-
out.push(item);
|
|
24564
|
-
}
|
|
24565
|
-
}
|
|
24566
|
-
return out;
|
|
24567
|
-
};
|
|
24568
|
-
var groupByBackend = (effects) => {
|
|
24569
|
-
const runs = [];
|
|
24570
|
-
let current = [];
|
|
24571
|
-
let currentBackend = null;
|
|
24572
|
-
for (const eff of effects) {
|
|
24573
|
-
const { backend } = eff.definition;
|
|
24574
|
-
if (currentBackend === null || backend === currentBackend) {
|
|
24575
|
-
current.push(eff);
|
|
24576
|
-
currentBackend = backend;
|
|
24577
|
-
} else {
|
|
24578
|
-
runs.push({ backend: currentBackend, effects: current });
|
|
24579
|
-
current = [eff];
|
|
24580
|
-
currentBackend = backend;
|
|
24581
|
-
}
|
|
24582
|
-
}
|
|
24583
|
-
if (currentBackend !== null && current.length > 0) {
|
|
24584
|
-
runs.push({ backend: currentBackend, effects: current });
|
|
24585
|
-
}
|
|
24586
|
-
return runs;
|
|
24587
|
-
};
|
|
24588
|
-
|
|
24589
|
-
class CanvasPool {
|
|
24590
|
-
width;
|
|
24591
|
-
height;
|
|
24592
|
-
pairs = new Map;
|
|
24593
|
-
lostContexts = new Set;
|
|
24594
|
-
constructor(width, height) {
|
|
24595
|
-
this.width = width;
|
|
24596
|
-
this.height = height;
|
|
24597
|
-
}
|
|
24598
|
-
getPair(backend) {
|
|
24599
|
-
const existing = this.pairs.get(backend);
|
|
24600
|
-
if (existing) {
|
|
24601
|
-
return existing;
|
|
24602
|
-
}
|
|
24603
|
-
const pair = [
|
|
24604
|
-
this.allocateCanvas(backend),
|
|
24605
|
-
this.allocateCanvas(backend)
|
|
24606
|
-
];
|
|
24607
|
-
this.pairs.set(backend, pair);
|
|
24608
|
-
return pair;
|
|
24609
|
-
}
|
|
24610
|
-
assertContextNotLost(canvas) {
|
|
24611
|
-
if (this.lostContexts.has(canvas)) {
|
|
24612
|
-
throw new Error("WebGL context was lost during canvas effect rendering. " + "This typically happens in headless or memory-constrained environments (e.g. Remotion Lambda). " + "Try reducing concurrency or increasing the Lambda function memory.");
|
|
24613
|
-
}
|
|
24614
|
-
}
|
|
24615
|
-
allocateCanvas(backend) {
|
|
24616
|
-
const canvas = document.createElement("canvas");
|
|
24617
|
-
canvas.width = this.width;
|
|
24618
|
-
canvas.height = this.height;
|
|
24619
|
-
switch (backend) {
|
|
24620
|
-
case "2d": {
|
|
24621
|
-
const ctx = canvas.getContext("2d", {
|
|
24622
|
-
colorSpace: "srgb"
|
|
24623
|
-
});
|
|
24624
|
-
if (!ctx) {
|
|
24625
|
-
throw new Error("Failed to acquire 2D context for canvas effect");
|
|
24626
|
-
}
|
|
24627
|
-
return canvas;
|
|
24628
|
-
}
|
|
24629
|
-
case "webgl2": {
|
|
24630
|
-
const ctx = canvas.getContext("webgl2", {
|
|
24631
|
-
premultipliedAlpha: true,
|
|
24632
|
-
alpha: true,
|
|
24633
|
-
preserveDrawingBuffer: true
|
|
24634
|
-
});
|
|
24635
|
-
if (!ctx) {
|
|
24636
|
-
throw new Error("Failed to acquire WebGL2 context for canvas effect");
|
|
24637
|
-
}
|
|
24638
|
-
canvas.addEventListener("webglcontextlost", (e) => {
|
|
24639
|
-
e.preventDefault();
|
|
24640
|
-
this.lostContexts.add(canvas);
|
|
24641
|
-
});
|
|
24642
|
-
canvas.addEventListener("webglcontextrestored", () => {
|
|
24643
|
-
this.lostContexts.delete(canvas);
|
|
24644
|
-
});
|
|
24645
|
-
ctx.pixelStorei(ctx.UNPACK_PREMULTIPLY_ALPHA_WEBGL, true);
|
|
24646
|
-
return canvas;
|
|
24647
|
-
}
|
|
24648
|
-
case "webgpu": {
|
|
24649
|
-
if (typeof navigator === "undefined" || !("gpu" in navigator)) {
|
|
24650
|
-
throw new Error("WebGPU is not available in this environment for canvas effect");
|
|
24651
|
-
}
|
|
24652
|
-
return canvas;
|
|
24653
|
-
}
|
|
24654
|
-
default: {
|
|
24655
|
-
const exhaustive = backend;
|
|
24656
|
-
throw new Error(`Unknown effect backend: ${exhaustive}`);
|
|
24657
|
-
}
|
|
24658
|
-
}
|
|
24659
|
-
}
|
|
24660
|
-
}
|
|
24661
|
-
var devicePromise = null;
|
|
24662
|
-
var getGpuDevice = () => {
|
|
24663
|
-
if (devicePromise) {
|
|
24664
|
-
return devicePromise;
|
|
24665
|
-
}
|
|
24666
|
-
devicePromise = (async () => {
|
|
24667
|
-
if (typeof navigator === "undefined" || !("gpu" in navigator)) {
|
|
24668
|
-
throw new Error("WebGPU is not available in this environment");
|
|
24669
|
-
}
|
|
24670
|
-
const { gpu } = navigator;
|
|
24671
|
-
const adapter = await gpu.requestAdapter();
|
|
24672
|
-
if (!adapter) {
|
|
24673
|
-
throw new Error("No WebGPU adapter available");
|
|
24674
|
-
}
|
|
24675
|
-
return adapter.requestDevice();
|
|
24676
|
-
})();
|
|
24677
|
-
return devicePromise;
|
|
24678
|
-
};
|
|
24679
|
-
var createEffectChainState = (width, height) => ({
|
|
24680
|
-
pool: new CanvasPool(width, height),
|
|
24681
|
-
setupCache: new WeakMap,
|
|
24682
|
-
cleanupRegistry: [],
|
|
24683
|
-
currentRunId: 0
|
|
24684
|
-
});
|
|
24685
|
-
var cleanupEffectChainState = (state) => {
|
|
24686
|
-
state.currentRunId++;
|
|
24687
|
-
for (const entry of state.cleanupRegistry) {
|
|
24688
|
-
entry.definition.cleanup(entry.state);
|
|
24689
|
-
}
|
|
24690
|
-
};
|
|
24691
|
-
var ensureSetup = (state, def, target) => {
|
|
24692
|
-
const widened = def;
|
|
24693
|
-
if (state.setupCache.has(widened)) {
|
|
24694
|
-
return state.setupCache.get(widened);
|
|
24695
|
-
}
|
|
24696
|
-
const setupState = def.setup(target);
|
|
24697
|
-
state.setupCache.set(widened, setupState);
|
|
24698
|
-
state.cleanupRegistry.push({ definition: widened, state: setupState });
|
|
24699
|
-
return setupState;
|
|
24700
|
-
};
|
|
24701
|
-
var runEffectChain = async ({
|
|
24702
|
-
state,
|
|
24703
|
-
source,
|
|
24704
|
-
effects,
|
|
24705
|
-
output,
|
|
24706
|
-
frame,
|
|
24707
|
-
width,
|
|
24708
|
-
height
|
|
24709
|
-
}) => {
|
|
24710
|
-
const runId = ++state.currentRunId;
|
|
24711
|
-
const isCancelled = () => state.currentRunId !== runId;
|
|
24712
|
-
const runs = groupByBackend(effects);
|
|
24713
|
-
let currentImage = source;
|
|
24714
|
-
let lastTarget = null;
|
|
24715
|
-
if (runs.length === 0) {
|
|
24716
|
-
if (source === output) {
|
|
24717
|
-
return true;
|
|
24718
|
-
}
|
|
24719
|
-
const ctx = output.getContext("2d");
|
|
24720
|
-
if (!ctx) {
|
|
24721
|
-
throw new Error("Failed to acquire 2D context for output canvas");
|
|
24722
|
-
}
|
|
24723
|
-
ctx.clearRect(0, 0, width, height);
|
|
24724
|
-
ctx.drawImage(currentImage, 0, 0, width, height);
|
|
24725
|
-
return true;
|
|
24726
|
-
}
|
|
24727
|
-
let needsGpuDevice = false;
|
|
24728
|
-
for (const run of runs) {
|
|
24729
|
-
if (run.backend === "webgpu") {
|
|
24730
|
-
needsGpuDevice = true;
|
|
24731
|
-
break;
|
|
24732
|
-
}
|
|
24733
|
-
}
|
|
24734
|
-
const gpuDevice = needsGpuDevice ? await getGpuDevice() : null;
|
|
24735
|
-
if (isCancelled()) {
|
|
24736
|
-
return false;
|
|
24737
|
-
}
|
|
24738
|
-
for (let runIndex = 0;runIndex < runs.length; runIndex++) {
|
|
24739
|
-
const run = runs[runIndex];
|
|
24740
|
-
const [a, b] = state.pool.getPair(run.backend);
|
|
24741
|
-
let dst = a;
|
|
24742
|
-
for (const eff of run.effects) {
|
|
24743
|
-
const def = eff.definition;
|
|
24744
|
-
const setupState = ensureSetup(state, def, dst);
|
|
24745
|
-
def.apply({
|
|
24746
|
-
source: currentImage,
|
|
24747
|
-
target: dst,
|
|
24748
|
-
state: setupState,
|
|
24749
|
-
params: eff.params,
|
|
24750
|
-
frame,
|
|
24751
|
-
width,
|
|
24752
|
-
height,
|
|
24753
|
-
gpuDevice
|
|
24754
|
-
});
|
|
24755
|
-
if (run.backend === "webgl2") {
|
|
24756
|
-
state.pool.assertContextNotLost(dst);
|
|
24757
|
-
}
|
|
24758
|
-
currentImage = dst;
|
|
24759
|
-
dst = dst === a ? b : a;
|
|
24760
|
-
}
|
|
24761
|
-
lastTarget = currentImage ?? lastTarget;
|
|
24762
|
-
const nextRun = runs[runIndex + 1];
|
|
24763
|
-
if (nextRun && nextRun.backend !== run.backend && lastTarget) {
|
|
24764
|
-
const bitmap = await createImageBitmap(lastTarget);
|
|
24765
|
-
if (isCancelled()) {
|
|
24766
|
-
bitmap.close();
|
|
24767
|
-
return false;
|
|
24768
|
-
}
|
|
24769
|
-
currentImage = bitmap;
|
|
24770
|
-
}
|
|
24771
|
-
}
|
|
24772
|
-
if (!lastTarget) {
|
|
24773
|
-
return true;
|
|
24774
|
-
}
|
|
24775
|
-
const outCtx = output.getContext("2d");
|
|
24776
|
-
if (!outCtx) {
|
|
24777
|
-
throw new Error("Failed to acquire 2D context for output canvas");
|
|
24778
|
-
}
|
|
24779
|
-
outCtx.clearRect(0, 0, width, height);
|
|
24780
|
-
outCtx.drawImage(lastTarget, 0, 0, width, height);
|
|
24781
|
-
return true;
|
|
24782
|
-
};
|
|
24783
|
-
var useEffectChainState = () => {
|
|
24784
|
-
const chainStateRef = useRef4(null);
|
|
24785
|
-
const sizeRef = useRef4(null);
|
|
24786
|
-
useEffect3(() => {
|
|
24787
|
-
return () => {
|
|
24788
|
-
if (chainStateRef.current) {
|
|
24789
|
-
cleanupEffectChainState(chainStateRef.current);
|
|
24790
|
-
}
|
|
24791
|
-
};
|
|
24792
|
-
}, []);
|
|
24793
|
-
return useMemo10(() => ({
|
|
24794
|
-
get: (width, height) => {
|
|
24795
|
-
if (!sizeRef.current || sizeRef.current.width !== width || sizeRef.current.height !== height) {
|
|
24796
|
-
if (chainStateRef.current) {
|
|
24797
|
-
cleanupEffectChainState(chainStateRef.current);
|
|
24798
|
-
}
|
|
24799
|
-
chainStateRef.current = createEffectChainState(width, height);
|
|
24800
|
-
sizeRef.current = { width, height };
|
|
24801
|
-
}
|
|
24802
|
-
return chainStateRef.current;
|
|
24803
|
-
}
|
|
24804
|
-
}), []);
|
|
24805
|
-
};
|
|
24806
|
-
var useMemoizedEffects = (effects) => {
|
|
24807
|
-
const previousRef = useRef5(null);
|
|
24808
|
-
const previous = previousRef.current;
|
|
24809
|
-
const isSame = previous !== null && previous.length === effects.length && previous.every((p, i) => p.definition === effects[i].definition && p.effectKey === effects[i].effectKey);
|
|
24810
|
-
if (isSame) {
|
|
24811
|
-
return previous;
|
|
24812
|
-
}
|
|
24813
|
-
const next = effects.map((e) => ({
|
|
24814
|
-
definition: e.definition,
|
|
24815
|
-
stack: e.stack,
|
|
24816
|
-
effectKey: e.effectKey,
|
|
24817
|
-
params: e.params,
|
|
24818
|
-
memoized: true
|
|
24819
|
-
}));
|
|
24820
|
-
previousRef.current = next;
|
|
24821
|
-
return next;
|
|
24822
|
-
};
|
|
24823
|
-
var componentsToAddStacksTo = [];
|
|
24824
|
-
var getComponentsToAddStacksTo = () => componentsToAddStacksTo;
|
|
24825
|
-
var addSequenceStackTraces = (component) => {
|
|
24826
|
-
componentsToAddStacksTo.push(component);
|
|
24827
|
-
};
|
|
24828
|
-
var VERSION = "4.0.461";
|
|
24829
|
-
var checkMultipleRemotionVersions = () => {
|
|
24830
|
-
if (typeof globalThis === "undefined") {
|
|
24831
|
-
return;
|
|
24832
|
-
}
|
|
24833
|
-
const set = () => {
|
|
24834
|
-
globalThis.remotion_imported = VERSION;
|
|
24835
|
-
if (typeof window !== "undefined") {
|
|
24836
|
-
window.remotion_imported = VERSION;
|
|
24837
|
-
}
|
|
24838
|
-
};
|
|
24839
|
-
const alreadyImported = globalThis.remotion_imported || typeof window !== "undefined" && window.remotion_imported;
|
|
24840
|
-
if (alreadyImported) {
|
|
24841
|
-
if (alreadyImported === VERSION) {
|
|
24842
|
-
return;
|
|
24843
|
-
}
|
|
24844
|
-
if (typeof alreadyImported === "string" && alreadyImported.includes("webcodecs")) {
|
|
24845
|
-
set();
|
|
24846
|
-
return;
|
|
24847
|
-
}
|
|
24848
|
-
throw new TypeError(`\uD83D\uDEA8 Multiple versions of Remotion detected: ${[
|
|
24849
|
-
VERSION,
|
|
24850
|
-
typeof alreadyImported === "string" ? alreadyImported : "an older version"
|
|
24851
|
-
].filter(truthy2).join(" and ")}. This will cause things to break in an unexpected way.
|
|
24852
|
-
Check that all your Remotion packages are on the same version. If your dependencies depend on Remotion, make them peer dependencies. You can also run \`npx remotion versions\` from your terminal to see which versions are mismatching.`);
|
|
24853
|
-
}
|
|
24854
|
-
set();
|
|
24855
|
-
};
|
|
24856
24629
|
var useUnsafeVideoConfig = () => {
|
|
24857
24630
|
const context = useContext12(SequenceContext);
|
|
24858
24631
|
const ctxWidth = context?.width ?? null;
|
|
24859
24632
|
const ctxHeight = context?.height ?? null;
|
|
24860
24633
|
const ctxDuration = context?.durationInFrames ?? null;
|
|
24861
24634
|
const video = useVideo();
|
|
24862
|
-
return
|
|
24635
|
+
return useMemo10(() => {
|
|
24863
24636
|
if (!video) {
|
|
24864
24637
|
return null;
|
|
24865
24638
|
}
|
|
@@ -24933,7 +24706,7 @@ var Freeze = ({
|
|
|
24933
24706
|
if (!Number.isFinite(frameToFreeze)) {
|
|
24934
24707
|
throw new Error(`The 'frame' prop of <Freeze /> must be a finite number, but it is ${frameToFreeze}.`);
|
|
24935
24708
|
}
|
|
24936
|
-
const isActive =
|
|
24709
|
+
const isActive = useMemo11(() => {
|
|
24937
24710
|
if (typeof active === "boolean") {
|
|
24938
24711
|
return active;
|
|
24939
24712
|
}
|
|
@@ -24944,7 +24717,7 @@ var Freeze = ({
|
|
|
24944
24717
|
const timelineContext = useTimelineContext();
|
|
24945
24718
|
const sequenceContext = useContext14(SequenceContext);
|
|
24946
24719
|
const relativeFrom = sequenceContext?.relativeFrom ?? 0;
|
|
24947
|
-
const timelineValue =
|
|
24720
|
+
const timelineValue = useMemo11(() => {
|
|
24948
24721
|
if (!isActive) {
|
|
24949
24722
|
return timelineContext;
|
|
24950
24723
|
}
|
|
@@ -24959,7 +24732,7 @@ var Freeze = ({
|
|
|
24959
24732
|
}
|
|
24960
24733
|
};
|
|
24961
24734
|
}, [isActive, timelineContext, videoConfig.id, frameToFreeze, relativeFrom]);
|
|
24962
|
-
const newSequenceContext =
|
|
24735
|
+
const newSequenceContext = useMemo11(() => {
|
|
24963
24736
|
if (!sequenceContext) {
|
|
24964
24737
|
return null;
|
|
24965
24738
|
}
|
|
@@ -24971,9 +24744,9 @@ var Freeze = ({
|
|
|
24971
24744
|
cumulatedFrom: 0
|
|
24972
24745
|
};
|
|
24973
24746
|
}, [sequenceContext, isActive]);
|
|
24974
|
-
return /* @__PURE__ */
|
|
24747
|
+
return /* @__PURE__ */ jsx92(TimelineContext.Provider, {
|
|
24975
24748
|
value: timelineValue,
|
|
24976
|
-
children: /* @__PURE__ */
|
|
24749
|
+
children: /* @__PURE__ */ jsx92(SequenceContext.Provider, {
|
|
24977
24750
|
value: newSequenceContext,
|
|
24978
24751
|
children
|
|
24979
24752
|
})
|
|
@@ -24982,74 +24755,7 @@ var Freeze = ({
|
|
|
24982
24755
|
var PremountContext = createContext14({
|
|
24983
24756
|
premountFramesRemaining: 0
|
|
24984
24757
|
});
|
|
24985
|
-
var
|
|
24986
|
-
"style.translate": {
|
|
24987
|
-
type: "translate",
|
|
24988
|
-
step: 1,
|
|
24989
|
-
default: "0px 0px",
|
|
24990
|
-
description: "Offset"
|
|
24991
|
-
},
|
|
24992
|
-
"style.scale": {
|
|
24993
|
-
type: "number",
|
|
24994
|
-
min: 0.05,
|
|
24995
|
-
max: 100,
|
|
24996
|
-
step: 0.01,
|
|
24997
|
-
default: 1,
|
|
24998
|
-
description: "Scale"
|
|
24999
|
-
},
|
|
25000
|
-
"style.rotate": {
|
|
25001
|
-
type: "rotation",
|
|
25002
|
-
step: 1,
|
|
25003
|
-
default: "0deg",
|
|
25004
|
-
description: "Rotation"
|
|
25005
|
-
},
|
|
25006
|
-
"style.opacity": {
|
|
25007
|
-
type: "number",
|
|
25008
|
-
min: 0,
|
|
25009
|
-
max: 1,
|
|
25010
|
-
step: 0.01,
|
|
25011
|
-
default: 1,
|
|
25012
|
-
description: "Opacity"
|
|
25013
|
-
},
|
|
25014
|
-
premountFor: {
|
|
25015
|
-
type: "number",
|
|
25016
|
-
default: 0,
|
|
25017
|
-
description: "Premount For",
|
|
25018
|
-
min: 0,
|
|
25019
|
-
step: 1
|
|
25020
|
-
},
|
|
25021
|
-
postmountFor: {
|
|
25022
|
-
type: "hidden"
|
|
25023
|
-
},
|
|
25024
|
-
styleWhilePremounted: {
|
|
25025
|
-
type: "hidden"
|
|
25026
|
-
},
|
|
25027
|
-
styleWhilePostmounted: {
|
|
25028
|
-
type: "hidden"
|
|
25029
|
-
}
|
|
25030
|
-
};
|
|
25031
|
-
var sequenceSchema = {
|
|
25032
|
-
layout: {
|
|
25033
|
-
type: "enum",
|
|
25034
|
-
default: "absolute-fill",
|
|
25035
|
-
description: "Layout",
|
|
25036
|
-
variants: {
|
|
25037
|
-
"absolute-fill": sequenceStyleSchema,
|
|
25038
|
-
none: {}
|
|
25039
|
-
}
|
|
25040
|
-
}
|
|
25041
|
-
};
|
|
25042
|
-
var sequenceSchemaDefaultLayoutNone = {
|
|
25043
|
-
...sequenceSchema,
|
|
25044
|
-
layout: {
|
|
25045
|
-
...sequenceSchema.layout,
|
|
25046
|
-
default: "none"
|
|
25047
|
-
}
|
|
25048
|
-
};
|
|
25049
|
-
var nodePathToString = (nodePath) => {
|
|
25050
|
-
return nodePath.join(".");
|
|
25051
|
-
};
|
|
25052
|
-
var SequenceManager = React12.createContext({
|
|
24758
|
+
var SequenceManager = React11.createContext({
|
|
25053
24759
|
registerSequence: () => {
|
|
25054
24760
|
throw new Error("SequenceManagerContext not initialized");
|
|
25055
24761
|
},
|
|
@@ -25058,62 +24764,57 @@ var SequenceManager = React12.createContext({
|
|
|
25058
24764
|
},
|
|
25059
24765
|
sequences: []
|
|
25060
24766
|
});
|
|
25061
|
-
var
|
|
25062
|
-
|
|
25063
|
-
setHidden: () => {
|
|
25064
|
-
throw new Error("SequenceVisibilityToggle not initialized");
|
|
25065
|
-
}
|
|
25066
|
-
});
|
|
25067
|
-
var getCodeValuesCtx = (codeValues, nodePath) => {
|
|
25068
|
-
const status = codeValues[nodePathToString(nodePath)];
|
|
25069
|
-
if (!status) {
|
|
25070
|
-
return;
|
|
25071
|
-
}
|
|
25072
|
-
if (!status.canUpdate) {
|
|
25073
|
-
return;
|
|
25074
|
-
}
|
|
25075
|
-
return status.props;
|
|
24767
|
+
var makeSequencePropsSubscriptionKey = (key) => {
|
|
24768
|
+
return `${key.nodePath.join(".")}.${key.sequenceKeys.join(".")}.${key.effectKeys.map((keys) => keys.join(".")).join(".")}`;
|
|
25076
24769
|
};
|
|
25077
|
-
var VisualModeCodeValuesContext =
|
|
25078
|
-
|
|
25079
|
-
throw new Error("VisualModeCodeValuesContext not initialized");
|
|
25080
|
-
}
|
|
24770
|
+
var VisualModeCodeValuesContext = React11.createContext({
|
|
24771
|
+
codeValues: {}
|
|
25081
24772
|
});
|
|
25082
|
-
var VisualModeDragOverridesContext =
|
|
24773
|
+
var VisualModeDragOverridesContext = React11.createContext({
|
|
25083
24774
|
getDragOverrides: () => {
|
|
25084
24775
|
throw new Error("VisualModeDragOverridesContext not initialized");
|
|
24776
|
+
},
|
|
24777
|
+
getEffectDragOverrides: () => {
|
|
24778
|
+
throw new Error("VisualModeDragOverridesContext not initialized");
|
|
25085
24779
|
}
|
|
25086
24780
|
});
|
|
25087
|
-
var VisualModeSettersContext =
|
|
24781
|
+
var VisualModeSettersContext = React11.createContext({
|
|
25088
24782
|
setDragOverrides: () => {
|
|
25089
24783
|
throw new Error("VisualModeSettersContext not initialized");
|
|
25090
24784
|
},
|
|
25091
24785
|
clearDragOverrides: () => {
|
|
25092
24786
|
throw new Error("VisualModeSettersContext not initialized");
|
|
25093
24787
|
},
|
|
24788
|
+
setEffectDragOverrides: () => {
|
|
24789
|
+
throw new Error("VisualModeSettersContext not initialized");
|
|
24790
|
+
},
|
|
24791
|
+
clearEffectDragOverrides: () => {
|
|
24792
|
+
throw new Error("VisualModeSettersContext not initialized");
|
|
24793
|
+
},
|
|
25094
24794
|
setCodeValues: () => {
|
|
25095
24795
|
throw new Error("VisualModeSettersContext not initialized");
|
|
25096
24796
|
}
|
|
25097
24797
|
});
|
|
24798
|
+
var effectDragOverridesKey = (nodePath, effectIndex) => `${makeSequencePropsSubscriptionKey(nodePath)}.effects.${effectIndex}`;
|
|
25098
24799
|
var SequenceManagerProvider = ({ children }) => {
|
|
25099
|
-
const [sequences, setSequences] =
|
|
25100
|
-
const [
|
|
25101
|
-
const
|
|
25102
|
-
const controlOverridesRef = useRef6(dragOverrides);
|
|
24800
|
+
const [sequences, setSequences] = useState3([]);
|
|
24801
|
+
const [dragOverrides, setControlOverrides] = useState3({});
|
|
24802
|
+
const controlOverridesRef = useRef4(dragOverrides);
|
|
25103
24803
|
controlOverridesRef.current = dragOverrides;
|
|
25104
|
-
const [
|
|
24804
|
+
const [effectDragOverridesState, setEffectDragOverridesState] = useState3({});
|
|
24805
|
+
const [codeValues, setCodeValuesMapState] = useState3({});
|
|
25105
24806
|
const setDragOverrides = useCallback5((nodePath, key, value) => {
|
|
25106
24807
|
setControlOverrides((prev) => ({
|
|
25107
24808
|
...prev,
|
|
25108
|
-
[
|
|
25109
|
-
...prev[
|
|
24809
|
+
[makeSequencePropsSubscriptionKey(nodePath)]: {
|
|
24810
|
+
...prev[makeSequencePropsSubscriptionKey(nodePath)],
|
|
25110
24811
|
[key]: value
|
|
25111
24812
|
}
|
|
25112
24813
|
}));
|
|
25113
24814
|
}, []);
|
|
25114
24815
|
const clearDragOverrides = useCallback5((nodePath) => {
|
|
25115
24816
|
setControlOverrides((prev) => {
|
|
25116
|
-
const key =
|
|
24817
|
+
const key = makeSequencePropsSubscriptionKey(nodePath);
|
|
25117
24818
|
if (!prev[key]) {
|
|
25118
24819
|
return prev;
|
|
25119
24820
|
}
|
|
@@ -25122,9 +24823,32 @@ var SequenceManagerProvider = ({ children }) => {
|
|
|
25122
24823
|
return next;
|
|
25123
24824
|
});
|
|
25124
24825
|
}, []);
|
|
24826
|
+
const setEffectDragOverrides = useCallback5((nodePath, effectIndex, key, value) => {
|
|
24827
|
+
setEffectDragOverridesState((prev) => {
|
|
24828
|
+
const mapKey = effectDragOverridesKey(nodePath, effectIndex);
|
|
24829
|
+
return {
|
|
24830
|
+
...prev,
|
|
24831
|
+
[mapKey]: {
|
|
24832
|
+
...prev[mapKey],
|
|
24833
|
+
[key]: value
|
|
24834
|
+
}
|
|
24835
|
+
};
|
|
24836
|
+
});
|
|
24837
|
+
}, []);
|
|
24838
|
+
const clearEffectDragOverrides = useCallback5((nodePath, effectIndex) => {
|
|
24839
|
+
setEffectDragOverridesState((prev) => {
|
|
24840
|
+
const mapKey = effectDragOverridesKey(nodePath, effectIndex);
|
|
24841
|
+
if (!prev[mapKey]) {
|
|
24842
|
+
return prev;
|
|
24843
|
+
}
|
|
24844
|
+
const next = { ...prev };
|
|
24845
|
+
delete next[mapKey];
|
|
24846
|
+
return next;
|
|
24847
|
+
});
|
|
24848
|
+
}, []);
|
|
25125
24849
|
const setCodeValues = useCallback5((nodePath, values) => {
|
|
25126
24850
|
setCodeValuesMapState((prev) => {
|
|
25127
|
-
const key =
|
|
24851
|
+
const key = makeSequencePropsSubscriptionKey(nodePath);
|
|
25128
24852
|
const prevKey = prev[key];
|
|
25129
24853
|
const newKey = values(prevKey);
|
|
25130
24854
|
if (prevKey === newKey) {
|
|
@@ -25141,54 +24865,54 @@ var SequenceManagerProvider = ({ children }) => {
|
|
|
25141
24865
|
const unregisterSequence = useCallback5((seq) => {
|
|
25142
24866
|
setSequences((seqs) => seqs.filter((s) => s.id !== seq));
|
|
25143
24867
|
}, []);
|
|
25144
|
-
const sequenceContext =
|
|
24868
|
+
const sequenceContext = useMemo12(() => {
|
|
25145
24869
|
return {
|
|
25146
24870
|
registerSequence,
|
|
25147
24871
|
sequences,
|
|
25148
24872
|
unregisterSequence
|
|
25149
24873
|
};
|
|
25150
24874
|
}, [registerSequence, sequences, unregisterSequence]);
|
|
25151
|
-
const hiddenContext = useMemo14(() => {
|
|
25152
|
-
return {
|
|
25153
|
-
hidden,
|
|
25154
|
-
setHidden
|
|
25155
|
-
};
|
|
25156
|
-
}, [hidden]);
|
|
25157
24875
|
const getDragOverrides = useCallback5((nodePath) => {
|
|
25158
|
-
return dragOverrides[
|
|
24876
|
+
return dragOverrides[makeSequencePropsSubscriptionKey(nodePath)] ?? {};
|
|
25159
24877
|
}, [dragOverrides]);
|
|
25160
|
-
const
|
|
25161
|
-
return
|
|
25162
|
-
}, [
|
|
25163
|
-
const codeValuesContext =
|
|
24878
|
+
const getEffectDragOverrides = useCallback5((nodePath, effectIndex) => {
|
|
24879
|
+
return effectDragOverridesState[effectDragOverridesKey(nodePath, effectIndex)] ?? {};
|
|
24880
|
+
}, [effectDragOverridesState]);
|
|
24881
|
+
const codeValuesContext = useMemo12(() => {
|
|
25164
24882
|
return {
|
|
25165
|
-
|
|
24883
|
+
codeValues
|
|
25166
24884
|
};
|
|
25167
|
-
}, [
|
|
25168
|
-
const dragOverridesContext =
|
|
24885
|
+
}, [codeValues]);
|
|
24886
|
+
const dragOverridesContext = useMemo12(() => {
|
|
25169
24887
|
return {
|
|
25170
|
-
getDragOverrides
|
|
24888
|
+
getDragOverrides,
|
|
24889
|
+
getEffectDragOverrides
|
|
25171
24890
|
};
|
|
25172
|
-
}, [getDragOverrides]);
|
|
25173
|
-
const settersContext =
|
|
24891
|
+
}, [getDragOverrides, getEffectDragOverrides]);
|
|
24892
|
+
const settersContext = useMemo12(() => {
|
|
25174
24893
|
return {
|
|
25175
24894
|
setDragOverrides,
|
|
25176
24895
|
clearDragOverrides,
|
|
24896
|
+
setEffectDragOverrides,
|
|
24897
|
+
clearEffectDragOverrides,
|
|
25177
24898
|
setCodeValues
|
|
25178
24899
|
};
|
|
25179
|
-
}, [
|
|
25180
|
-
|
|
24900
|
+
}, [
|
|
24901
|
+
setDragOverrides,
|
|
24902
|
+
clearDragOverrides,
|
|
24903
|
+
setEffectDragOverrides,
|
|
24904
|
+
clearEffectDragOverrides,
|
|
24905
|
+
setCodeValues
|
|
24906
|
+
]);
|
|
24907
|
+
return /* @__PURE__ */ jsx102(SequenceManager.Provider, {
|
|
25181
24908
|
value: sequenceContext,
|
|
25182
|
-
children: /* @__PURE__ */
|
|
25183
|
-
value:
|
|
25184
|
-
children: /* @__PURE__ */
|
|
25185
|
-
value:
|
|
25186
|
-
children: /* @__PURE__ */
|
|
25187
|
-
value:
|
|
25188
|
-
children
|
|
25189
|
-
value: settersContext,
|
|
25190
|
-
children
|
|
25191
|
-
})
|
|
24909
|
+
children: /* @__PURE__ */ jsx102(VisualModeCodeValuesContext.Provider, {
|
|
24910
|
+
value: codeValuesContext,
|
|
24911
|
+
children: /* @__PURE__ */ jsx102(VisualModeDragOverridesContext.Provider, {
|
|
24912
|
+
value: dragOverridesContext,
|
|
24913
|
+
children: /* @__PURE__ */ jsx102(VisualModeSettersContext.Provider, {
|
|
24914
|
+
value: settersContext,
|
|
24915
|
+
children
|
|
25192
24916
|
})
|
|
25193
24917
|
})
|
|
25194
24918
|
})
|
|
@@ -25226,6 +24950,144 @@ var deleteNestedKey = (obj, keysToRemove) => {
|
|
|
25226
24950
|
}
|
|
25227
24951
|
return obj;
|
|
25228
24952
|
};
|
|
24953
|
+
var OverrideIdsToNodePathsGettersContext = createContext15({
|
|
24954
|
+
overrideIdToNodePathMappings: {}
|
|
24955
|
+
});
|
|
24956
|
+
var OverrideIdsToNodePathsSettersContext = createContext15({
|
|
24957
|
+
setOverrideIdToNodePath: () => {
|
|
24958
|
+
throw new Error("OverrideIdsToNodePathsSettersContext not initialized");
|
|
24959
|
+
}
|
|
24960
|
+
});
|
|
24961
|
+
var mergeOverrides = ({
|
|
24962
|
+
descriptor,
|
|
24963
|
+
codeOverrides,
|
|
24964
|
+
dragOverrides
|
|
24965
|
+
}) => {
|
|
24966
|
+
if (!codeOverrides && !dragOverrides) {
|
|
24967
|
+
return { params: descriptor.params, effectKey: descriptor.effectKey };
|
|
24968
|
+
}
|
|
24969
|
+
const merged = {
|
|
24970
|
+
...descriptor.params
|
|
24971
|
+
};
|
|
24972
|
+
if (codeOverrides) {
|
|
24973
|
+
for (const [key, value] of Object.entries(codeOverrides)) {
|
|
24974
|
+
if (value !== undefined) {
|
|
24975
|
+
merged[key] = value;
|
|
24976
|
+
}
|
|
24977
|
+
}
|
|
24978
|
+
}
|
|
24979
|
+
if (dragOverrides) {
|
|
24980
|
+
for (const [key, value] of Object.entries(dragOverrides)) {
|
|
24981
|
+
merged[key] = value;
|
|
24982
|
+
}
|
|
24983
|
+
}
|
|
24984
|
+
return {
|
|
24985
|
+
params: merged,
|
|
24986
|
+
effectKey: descriptor.definition.calculateKey(merged)
|
|
24987
|
+
};
|
|
24988
|
+
};
|
|
24989
|
+
var extractCodeOverrides = (propStatus) => {
|
|
24990
|
+
if (!propStatus) {
|
|
24991
|
+
return null;
|
|
24992
|
+
}
|
|
24993
|
+
const out = {};
|
|
24994
|
+
let hasAny = false;
|
|
24995
|
+
for (const [key, status] of Object.entries(propStatus)) {
|
|
24996
|
+
if (status.canUpdate) {
|
|
24997
|
+
out[key] = status.codeValue;
|
|
24998
|
+
hasAny = true;
|
|
24999
|
+
}
|
|
25000
|
+
}
|
|
25001
|
+
return hasAny ? out : null;
|
|
25002
|
+
};
|
|
25003
|
+
var useMemoizedEffectDefinitions = (effects) => {
|
|
25004
|
+
const previousRef = useRef5(null);
|
|
25005
|
+
const definitions = effects.map((descriptor) => descriptor.definition);
|
|
25006
|
+
const previous = previousRef.current;
|
|
25007
|
+
const isSame = previous !== null && previous.length === definitions.length && previous.every((def, i) => def === definitions[i]);
|
|
25008
|
+
if (isSame) {
|
|
25009
|
+
return previous;
|
|
25010
|
+
}
|
|
25011
|
+
previousRef.current = definitions;
|
|
25012
|
+
return definitions;
|
|
25013
|
+
};
|
|
25014
|
+
var getEffectCodeValuesCtx = ({
|
|
25015
|
+
codeValues,
|
|
25016
|
+
nodePath,
|
|
25017
|
+
effectIndex
|
|
25018
|
+
}) => {
|
|
25019
|
+
const status = codeValues[makeSequencePropsSubscriptionKey(nodePath)];
|
|
25020
|
+
if (!status) {
|
|
25021
|
+
return { type: "cannot-update-sequence", reason: "not-found" };
|
|
25022
|
+
}
|
|
25023
|
+
if (!status.canUpdate) {
|
|
25024
|
+
return { type: "cannot-update-sequence", reason: status.reason };
|
|
25025
|
+
}
|
|
25026
|
+
const effect = status.effects.find((e) => e.effectIndex === effectIndex);
|
|
25027
|
+
if (!effect) {
|
|
25028
|
+
return { type: "cannot-update-effect", reason: "not-found" };
|
|
25029
|
+
}
|
|
25030
|
+
if (!effect.canUpdate) {
|
|
25031
|
+
return { type: "cannot-update-effect", reason: effect.reason };
|
|
25032
|
+
}
|
|
25033
|
+
return { type: "can-update-effect", props: effect.props };
|
|
25034
|
+
};
|
|
25035
|
+
var getCodeValuesCtx = (codeValues, nodePath) => {
|
|
25036
|
+
const status = codeValues[makeSequencePropsSubscriptionKey(nodePath)];
|
|
25037
|
+
if (!status) {
|
|
25038
|
+
return;
|
|
25039
|
+
}
|
|
25040
|
+
if (!status.canUpdate) {
|
|
25041
|
+
return;
|
|
25042
|
+
}
|
|
25043
|
+
return status.props;
|
|
25044
|
+
};
|
|
25045
|
+
var useMemoizedEffects = ({
|
|
25046
|
+
effects,
|
|
25047
|
+
overrideId
|
|
25048
|
+
}) => {
|
|
25049
|
+
const previousRef = useRef5(null);
|
|
25050
|
+
const { codeValues } = useContext15(VisualModeCodeValuesContext);
|
|
25051
|
+
const { getEffectDragOverrides } = useContext15(VisualModeDragOverridesContext);
|
|
25052
|
+
const { overrideIdToNodePathMappings } = useContext15(OverrideIdsToNodePathsGettersContext);
|
|
25053
|
+
const previous = previousRef.current;
|
|
25054
|
+
const nodePath = overrideId ? overrideIdToNodePathMappings[overrideId] ?? null : null;
|
|
25055
|
+
const resolved = effects.map((descriptor, index) => {
|
|
25056
|
+
if (nodePath === null) {
|
|
25057
|
+
return {
|
|
25058
|
+
descriptor,
|
|
25059
|
+
params: descriptor.params,
|
|
25060
|
+
effectKey: descriptor.effectKey
|
|
25061
|
+
};
|
|
25062
|
+
}
|
|
25063
|
+
const effectStatus = getEffectCodeValuesCtx({
|
|
25064
|
+
codeValues,
|
|
25065
|
+
nodePath,
|
|
25066
|
+
effectIndex: index
|
|
25067
|
+
});
|
|
25068
|
+
const codeOverrides = effectStatus.type === "can-update-effect" ? extractCodeOverrides(effectStatus.props) : null;
|
|
25069
|
+
const dragOverridesMap = getEffectDragOverrides(nodePath, index);
|
|
25070
|
+
const dragOverrides = Object.keys(dragOverridesMap).length === 0 ? null : dragOverridesMap;
|
|
25071
|
+
const { params, effectKey } = mergeOverrides({
|
|
25072
|
+
descriptor,
|
|
25073
|
+
codeOverrides,
|
|
25074
|
+
dragOverrides
|
|
25075
|
+
});
|
|
25076
|
+
return { descriptor, params, effectKey };
|
|
25077
|
+
});
|
|
25078
|
+
const isSame = previous !== null && previous.length === resolved.length && previous.every((p, i) => p.definition === resolved[i].descriptor.definition && p.effectKey === resolved[i].effectKey);
|
|
25079
|
+
if (isSame) {
|
|
25080
|
+
return previous;
|
|
25081
|
+
}
|
|
25082
|
+
const next = resolved.map(({ descriptor, params, effectKey }) => ({
|
|
25083
|
+
definition: descriptor.definition,
|
|
25084
|
+
effectKey,
|
|
25085
|
+
params,
|
|
25086
|
+
memoized: true
|
|
25087
|
+
}));
|
|
25088
|
+
previousRef.current = next;
|
|
25089
|
+
return next;
|
|
25090
|
+
};
|
|
25229
25091
|
var flattenActiveSchema = (schema, resolve) => {
|
|
25230
25092
|
const out = {};
|
|
25231
25093
|
for (const key of Object.keys(schema)) {
|
|
@@ -25267,14 +25129,6 @@ var getFlatSchemaWithAllKeys = (schema) => {
|
|
|
25267
25129
|
}
|
|
25268
25130
|
return out;
|
|
25269
25131
|
};
|
|
25270
|
-
var OverrideIdsToNodePathsGettersContext = createContext15({
|
|
25271
|
-
overrideIdToNodePathMappings: {}
|
|
25272
|
-
});
|
|
25273
|
-
var OverrideIdsToNodePathsSettersContext = createContext15({
|
|
25274
|
-
setOverrideIdToNodePath: () => {
|
|
25275
|
-
throw new Error("OverrideIdsToNodePathsSettersContext not initialized");
|
|
25276
|
-
}
|
|
25277
|
-
});
|
|
25278
25132
|
var findPropsToDelete = ({
|
|
25279
25133
|
schema,
|
|
25280
25134
|
key,
|
|
@@ -25307,7 +25161,6 @@ var findPropsToDelete = ({
|
|
|
25307
25161
|
};
|
|
25308
25162
|
var getEffectiveVisualModeValue = ({
|
|
25309
25163
|
codeValue,
|
|
25310
|
-
runtimeValue,
|
|
25311
25164
|
dragOverrideValue,
|
|
25312
25165
|
defaultValue,
|
|
25313
25166
|
shouldResortToDefaultValueIfUndefined = false
|
|
@@ -25315,12 +25168,6 @@ var getEffectiveVisualModeValue = ({
|
|
|
25315
25168
|
if (dragOverrideValue !== undefined) {
|
|
25316
25169
|
return dragOverrideValue;
|
|
25317
25170
|
}
|
|
25318
|
-
if (!codeValue) {
|
|
25319
|
-
return runtimeValue;
|
|
25320
|
-
}
|
|
25321
|
-
if (!codeValue.canUpdate) {
|
|
25322
|
-
return runtimeValue;
|
|
25323
|
-
}
|
|
25324
25171
|
if (codeValue.codeValue === undefined && shouldResortToDefaultValueIfUndefined) {
|
|
25325
25172
|
return defaultValue;
|
|
25326
25173
|
}
|
|
@@ -25357,9 +25204,8 @@ var computeEffectiveSchemaValuesDotNotation = ({
|
|
|
25357
25204
|
if (field?.type === "hidden") {
|
|
25358
25205
|
continue;
|
|
25359
25206
|
}
|
|
25360
|
-
const value = getEffectiveVisualModeValue({
|
|
25207
|
+
const value = codeValueStatus === null || codeValueStatus.canUpdate === false ? currentValue[key] : getEffectiveVisualModeValue({
|
|
25361
25208
|
codeValue: codeValueStatus,
|
|
25362
|
-
runtimeValue: currentValue[key],
|
|
25363
25209
|
dragOverrideValue: overrideValues[key],
|
|
25364
25210
|
defaultValue: field?.default,
|
|
25365
25211
|
shouldResortToDefaultValueIfUndefined: false
|
|
@@ -25439,22 +25285,22 @@ var wrapInSchema = (Component, schema) => {
|
|
|
25439
25285
|
const Wrapped = forwardRef2((props, ref) => {
|
|
25440
25286
|
const env = useRemotionEnvironment();
|
|
25441
25287
|
if (!env.isStudio || env.isReadOnlyStudio || env.isRendering) {
|
|
25442
|
-
return
|
|
25288
|
+
return React12.createElement(Component, {
|
|
25443
25289
|
...props,
|
|
25444
25290
|
_experimentalControls: null,
|
|
25445
25291
|
ref
|
|
25446
25292
|
});
|
|
25447
25293
|
}
|
|
25448
|
-
const {
|
|
25449
|
-
const { getDragOverrides } =
|
|
25450
|
-
const nodePathMapping =
|
|
25294
|
+
const { codeValues } = useContext16(VisualModeCodeValuesContext);
|
|
25295
|
+
const { getDragOverrides } = useContext16(VisualModeDragOverridesContext);
|
|
25296
|
+
const nodePathMapping = useContext16(OverrideIdsToNodePathsGettersContext);
|
|
25451
25297
|
if (props._experimentalControls) {
|
|
25452
|
-
return
|
|
25298
|
+
return React12.createElement(Component, {
|
|
25453
25299
|
...props,
|
|
25454
25300
|
ref
|
|
25455
25301
|
});
|
|
25456
25302
|
}
|
|
25457
|
-
const [overrideId] =
|
|
25303
|
+
const [overrideId] = useState4(() => {
|
|
25458
25304
|
const { stack } = props;
|
|
25459
25305
|
if (!stack) {
|
|
25460
25306
|
return String(Math.random());
|
|
@@ -25469,26 +25315,26 @@ var wrapInSchema = (Component, schema) => {
|
|
|
25469
25315
|
});
|
|
25470
25316
|
const nodePath = nodePathMapping.overrideIdToNodePathMappings[overrideId] ?? null;
|
|
25471
25317
|
const runtimeValues = flatKeys.map((k) => getNestedValue(props, k));
|
|
25472
|
-
const currentRuntimeValueDotNotation =
|
|
25473
|
-
const controls =
|
|
25318
|
+
const currentRuntimeValueDotNotation = useMemo13(() => readValuesFromProps(props, flatKeys), runtimeValues);
|
|
25319
|
+
const controls = useMemo13(() => {
|
|
25474
25320
|
return {
|
|
25475
25321
|
schema,
|
|
25476
25322
|
currentRuntimeValueDotNotation,
|
|
25477
25323
|
overrideId
|
|
25478
25324
|
};
|
|
25479
25325
|
}, [currentRuntimeValueDotNotation, overrideId]);
|
|
25480
|
-
const { merged: valuesDotNotation, propsToDelete } =
|
|
25326
|
+
const { merged: valuesDotNotation, propsToDelete } = useMemo13(() => {
|
|
25481
25327
|
return computeEffectiveSchemaValuesDotNotation({
|
|
25482
25328
|
schema,
|
|
25483
25329
|
currentValue: currentRuntimeValueDotNotation,
|
|
25484
25330
|
overrideValues: nodePath === null ? {} : getDragOverrides(nodePath),
|
|
25485
|
-
propStatus: nodePath === null ? undefined :
|
|
25331
|
+
propStatus: nodePath === null ? undefined : getCodeValuesCtx(codeValues, nodePath)
|
|
25486
25332
|
});
|
|
25487
25333
|
}, [
|
|
25488
25334
|
currentRuntimeValueDotNotation,
|
|
25489
25335
|
getDragOverrides,
|
|
25490
25336
|
nodePath,
|
|
25491
|
-
|
|
25337
|
+
codeValues
|
|
25492
25338
|
]);
|
|
25493
25339
|
const activeKeys = selectActiveKeys(schema, valuesDotNotation);
|
|
25494
25340
|
const mergedProps = mergeValues({
|
|
@@ -25497,7 +25343,7 @@ var wrapInSchema = (Component, schema) => {
|
|
|
25497
25343
|
schemaKeys: activeKeys,
|
|
25498
25344
|
propsToDelete
|
|
25499
25345
|
});
|
|
25500
|
-
return
|
|
25346
|
+
return React12.createElement(Component, {
|
|
25501
25347
|
...mergedProps,
|
|
25502
25348
|
_experimentalControls: controls,
|
|
25503
25349
|
ref
|
|
@@ -25514,6 +25360,7 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
25514
25360
|
height,
|
|
25515
25361
|
width,
|
|
25516
25362
|
showInTimeline = true,
|
|
25363
|
+
hidden = false,
|
|
25517
25364
|
_experimentalControls: controls,
|
|
25518
25365
|
_experimentalEffects,
|
|
25519
25366
|
_remotionInternalLoopDisplay: loopDisplay,
|
|
@@ -25524,8 +25371,8 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
25524
25371
|
...other
|
|
25525
25372
|
}, ref) => {
|
|
25526
25373
|
const { layout = "absolute-fill" } = other;
|
|
25527
|
-
const [id] =
|
|
25528
|
-
const parentSequence =
|
|
25374
|
+
const [id] = useState5(() => String(Math.random()));
|
|
25375
|
+
const parentSequence = useContext17(SequenceContext);
|
|
25529
25376
|
const { rootId } = useTimelineContext();
|
|
25530
25377
|
const cumulatedFrom = parentSequence ? parentSequence.cumulatedFrom + parentSequence.relativeFrom : 0;
|
|
25531
25378
|
const nonce = useNonce();
|
|
@@ -25551,15 +25398,14 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
25551
25398
|
const videoConfig = useVideoConfig();
|
|
25552
25399
|
const parentSequenceDuration = parentSequence ? Math.min(parentSequence.durationInFrames - from, durationInFrames) : durationInFrames;
|
|
25553
25400
|
const actualDurationInFrames = Math.max(0, Math.min(videoConfig.durationInFrames - from, parentSequenceDuration));
|
|
25554
|
-
const { registerSequence, unregisterSequence } =
|
|
25555
|
-
const
|
|
25556
|
-
const premounting = useMemo16(() => {
|
|
25401
|
+
const { registerSequence, unregisterSequence } = useContext17(SequenceManager);
|
|
25402
|
+
const premounting = useMemo14(() => {
|
|
25557
25403
|
return parentSequence?.premounting || Boolean(other._remotionInternalIsPremounting);
|
|
25558
25404
|
}, [other._remotionInternalIsPremounting, parentSequence?.premounting]);
|
|
25559
|
-
const postmounting =
|
|
25405
|
+
const postmounting = useMemo14(() => {
|
|
25560
25406
|
return parentSequence?.postmounting || Boolean(other._remotionInternalIsPostmounting);
|
|
25561
25407
|
}, [other._remotionInternalIsPostmounting, parentSequence?.postmounting]);
|
|
25562
|
-
const contextValue =
|
|
25408
|
+
const contextValue = useMemo14(() => {
|
|
25563
25409
|
return {
|
|
25564
25410
|
cumulatedFrom,
|
|
25565
25411
|
relativeFrom: from,
|
|
@@ -25586,12 +25432,13 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
25586
25432
|
premountDisplay,
|
|
25587
25433
|
postmountDisplay
|
|
25588
25434
|
]);
|
|
25589
|
-
const timelineClipName =
|
|
25435
|
+
const timelineClipName = useMemo14(() => {
|
|
25590
25436
|
return name ?? "";
|
|
25591
25437
|
}, [name]);
|
|
25592
25438
|
const env = useRemotionEnvironment();
|
|
25593
25439
|
const inheritedStack = other?.stack ?? null;
|
|
25594
|
-
|
|
25440
|
+
const [stackDoesntChange] = useState5(() => stack ?? inheritedStack);
|
|
25441
|
+
useEffect3(() => {
|
|
25595
25442
|
if (!env.isStudio) {
|
|
25596
25443
|
return;
|
|
25597
25444
|
}
|
|
@@ -25614,7 +25461,7 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
25614
25461
|
rootId,
|
|
25615
25462
|
showInTimeline,
|
|
25616
25463
|
src: isMedia.data.src,
|
|
25617
|
-
stack:
|
|
25464
|
+
stack: stackDoesntChange,
|
|
25618
25465
|
startMediaFrom: isMedia.data.startMediaFrom,
|
|
25619
25466
|
volume: isMedia.data.volumes
|
|
25620
25467
|
});
|
|
@@ -25633,7 +25480,7 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
25633
25480
|
showInTimeline,
|
|
25634
25481
|
nonce: nonce.get(),
|
|
25635
25482
|
loopDisplay,
|
|
25636
|
-
stack:
|
|
25483
|
+
stack: stackDoesntChange,
|
|
25637
25484
|
premountDisplay: premountDisplay ?? null,
|
|
25638
25485
|
postmountDisplay: postmountDisplay ?? null,
|
|
25639
25486
|
controls: controls ?? null,
|
|
@@ -25656,11 +25503,10 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
25656
25503
|
showInTimeline,
|
|
25657
25504
|
nonce,
|
|
25658
25505
|
loopDisplay,
|
|
25659
|
-
|
|
25506
|
+
stackDoesntChange,
|
|
25660
25507
|
premountDisplay,
|
|
25661
25508
|
postmountDisplay,
|
|
25662
25509
|
env.isStudio,
|
|
25663
|
-
inheritedStack,
|
|
25664
25510
|
controls,
|
|
25665
25511
|
_experimentalEffects,
|
|
25666
25512
|
isMedia
|
|
@@ -25668,7 +25514,7 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
25668
25514
|
const endThreshold = Math.ceil(cumulatedFrom + from + durationInFrames - 1);
|
|
25669
25515
|
const content = absoluteFrame < cumulatedFrom + from ? null : absoluteFrame > endThreshold ? null : children;
|
|
25670
25516
|
const styleIfThere = other.layout === "none" ? undefined : other.style;
|
|
25671
|
-
const defaultStyle =
|
|
25517
|
+
const defaultStyle = useMemo14(() => {
|
|
25672
25518
|
return {
|
|
25673
25519
|
flexDirection: undefined,
|
|
25674
25520
|
...width ? { width } : {},
|
|
@@ -25679,13 +25525,12 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
25679
25525
|
if (ref !== null && layout === "none") {
|
|
25680
25526
|
throw new TypeError('It is not supported to pass both a `ref` and `layout="none"` to <Sequence />.');
|
|
25681
25527
|
}
|
|
25682
|
-
|
|
25683
|
-
if (isSequenceHidden) {
|
|
25528
|
+
if (hidden) {
|
|
25684
25529
|
return null;
|
|
25685
25530
|
}
|
|
25686
|
-
return /* @__PURE__ */
|
|
25531
|
+
return /* @__PURE__ */ jsx112(SequenceContext.Provider, {
|
|
25687
25532
|
value: contextValue,
|
|
25688
|
-
children: content === null ? null : other.layout === "none" ? content : /* @__PURE__ */
|
|
25533
|
+
children: content === null ? null : other.layout === "none" ? content : /* @__PURE__ */ jsx112(AbsoluteFill, {
|
|
25689
25534
|
ref,
|
|
25690
25535
|
style: defaultStyle,
|
|
25691
25536
|
className: other.className,
|
|
@@ -25695,7 +25540,7 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
25695
25540
|
};
|
|
25696
25541
|
var RegularSequence = forwardRef3(RegularSequenceRefForwardingFunction);
|
|
25697
25542
|
var PremountedPostmountedSequenceRefForwardingFunction = (props, ref) => {
|
|
25698
|
-
const parentPremountContext =
|
|
25543
|
+
const parentPremountContext = useContext17(PremountContext);
|
|
25699
25544
|
const frame = useCurrentFrame() - parentPremountContext.premountFramesRemaining;
|
|
25700
25545
|
if (props.layout === "none") {
|
|
25701
25546
|
throw new Error('`<Sequence>` with `premountFor` and `postmountFor` props does not support layout="none"');
|
|
@@ -25715,7 +25560,7 @@ var PremountedPostmountedSequenceRefForwardingFunction = (props, ref) => {
|
|
|
25715
25560
|
const postmountingActive = frame > endThreshold && frame <= endThreshold + postmountFor;
|
|
25716
25561
|
const freezeFrame = premountingActive ? from : postmountingActive ? from + durationInFrames - 1 : 0;
|
|
25717
25562
|
const isFreezingActive = premountingActive || postmountingActive;
|
|
25718
|
-
const style =
|
|
25563
|
+
const style = useMemo14(() => {
|
|
25719
25564
|
return {
|
|
25720
25565
|
...passedStyle,
|
|
25721
25566
|
opacity: premountingActive || postmountingActive ? 0 : 1,
|
|
@@ -25730,10 +25575,10 @@ var PremountedPostmountedSequenceRefForwardingFunction = (props, ref) => {
|
|
|
25730
25575
|
styleWhilePremounted,
|
|
25731
25576
|
styleWhilePostmounted
|
|
25732
25577
|
]);
|
|
25733
|
-
return /* @__PURE__ */
|
|
25578
|
+
return /* @__PURE__ */ jsx112(Freeze, {
|
|
25734
25579
|
frame: freezeFrame,
|
|
25735
25580
|
active: isFreezingActive,
|
|
25736
|
-
children: /* @__PURE__ */
|
|
25581
|
+
children: /* @__PURE__ */ jsx112(SequenceInner, {
|
|
25737
25582
|
ref,
|
|
25738
25583
|
from,
|
|
25739
25584
|
durationInFrames,
|
|
@@ -25753,20 +25598,437 @@ var SequenceRefForwardingFunction = (props, ref) => {
|
|
|
25753
25598
|
if (props.layout !== "none" && !env.isRendering) {
|
|
25754
25599
|
const effectivePremountFor = ENABLE_V5_BREAKING_CHANGES ? props.premountFor ?? fps : props.premountFor;
|
|
25755
25600
|
if (effectivePremountFor || props.postmountFor) {
|
|
25756
|
-
return /* @__PURE__ */
|
|
25601
|
+
return /* @__PURE__ */ jsx112(PremountedPostmountedSequence, {
|
|
25757
25602
|
ref,
|
|
25758
25603
|
...props,
|
|
25759
25604
|
premountFor: effectivePremountFor
|
|
25760
25605
|
});
|
|
25761
25606
|
}
|
|
25762
25607
|
}
|
|
25763
|
-
return /* @__PURE__ */
|
|
25608
|
+
return /* @__PURE__ */ jsx112(RegularSequence, {
|
|
25764
25609
|
...props,
|
|
25765
25610
|
ref
|
|
25766
25611
|
});
|
|
25767
25612
|
};
|
|
25768
25613
|
var SequenceInner = forwardRef3(SequenceRefForwardingFunction);
|
|
25769
25614
|
var Sequence = wrapInSchema(SequenceInner, sequenceSchema);
|
|
25615
|
+
|
|
25616
|
+
class CanvasPool {
|
|
25617
|
+
width;
|
|
25618
|
+
height;
|
|
25619
|
+
pairs = new Map;
|
|
25620
|
+
lostContexts = new Set;
|
|
25621
|
+
constructor(width, height) {
|
|
25622
|
+
this.width = width;
|
|
25623
|
+
this.height = height;
|
|
25624
|
+
}
|
|
25625
|
+
getPair(backend) {
|
|
25626
|
+
const existing = this.pairs.get(backend);
|
|
25627
|
+
if (existing) {
|
|
25628
|
+
return existing;
|
|
25629
|
+
}
|
|
25630
|
+
const pair = [
|
|
25631
|
+
this.allocateCanvas(backend),
|
|
25632
|
+
this.allocateCanvas(backend)
|
|
25633
|
+
];
|
|
25634
|
+
this.pairs.set(backend, pair);
|
|
25635
|
+
return pair;
|
|
25636
|
+
}
|
|
25637
|
+
assertContextNotLost(canvas) {
|
|
25638
|
+
if (this.lostContexts.has(canvas)) {
|
|
25639
|
+
throw new Error("WebGL context was lost during canvas effect rendering. " + "This typically happens in headless or memory-constrained environments (e.g. Remotion Lambda). " + "Try reducing concurrency or increasing the Lambda function memory.");
|
|
25640
|
+
}
|
|
25641
|
+
}
|
|
25642
|
+
allocateCanvas(backend) {
|
|
25643
|
+
const canvas = document.createElement("canvas");
|
|
25644
|
+
canvas.width = this.width;
|
|
25645
|
+
canvas.height = this.height;
|
|
25646
|
+
switch (backend) {
|
|
25647
|
+
case "2d": {
|
|
25648
|
+
const ctx = canvas.getContext("2d", {
|
|
25649
|
+
colorSpace: "srgb"
|
|
25650
|
+
});
|
|
25651
|
+
if (!ctx) {
|
|
25652
|
+
throw new Error("Failed to acquire 2D context for canvas effect");
|
|
25653
|
+
}
|
|
25654
|
+
return canvas;
|
|
25655
|
+
}
|
|
25656
|
+
case "webgl2": {
|
|
25657
|
+
const ctx = canvas.getContext("webgl2", {
|
|
25658
|
+
premultipliedAlpha: true,
|
|
25659
|
+
alpha: true,
|
|
25660
|
+
preserveDrawingBuffer: true
|
|
25661
|
+
});
|
|
25662
|
+
if (!ctx) {
|
|
25663
|
+
throw new Error("Failed to acquire WebGL2 context for canvas effect");
|
|
25664
|
+
}
|
|
25665
|
+
canvas.addEventListener("webglcontextlost", (e) => {
|
|
25666
|
+
e.preventDefault();
|
|
25667
|
+
this.lostContexts.add(canvas);
|
|
25668
|
+
});
|
|
25669
|
+
canvas.addEventListener("webglcontextrestored", () => {
|
|
25670
|
+
this.lostContexts.delete(canvas);
|
|
25671
|
+
});
|
|
25672
|
+
ctx.pixelStorei(ctx.UNPACK_PREMULTIPLY_ALPHA_WEBGL, true);
|
|
25673
|
+
return canvas;
|
|
25674
|
+
}
|
|
25675
|
+
case "webgpu": {
|
|
25676
|
+
if (typeof navigator === "undefined" || !("gpu" in navigator)) {
|
|
25677
|
+
throw new Error("WebGPU is not available in this environment for canvas effect");
|
|
25678
|
+
}
|
|
25679
|
+
return canvas;
|
|
25680
|
+
}
|
|
25681
|
+
default: {
|
|
25682
|
+
const exhaustive = backend;
|
|
25683
|
+
throw new Error(`Unknown effect backend: ${exhaustive}`);
|
|
25684
|
+
}
|
|
25685
|
+
}
|
|
25686
|
+
}
|
|
25687
|
+
}
|
|
25688
|
+
var groupByBackend = (effects) => {
|
|
25689
|
+
const runs = [];
|
|
25690
|
+
let current = [];
|
|
25691
|
+
let currentBackend = null;
|
|
25692
|
+
for (const eff of effects) {
|
|
25693
|
+
const { backend } = eff.definition;
|
|
25694
|
+
if (currentBackend === null || backend === currentBackend) {
|
|
25695
|
+
current.push(eff);
|
|
25696
|
+
currentBackend = backend;
|
|
25697
|
+
} else {
|
|
25698
|
+
runs.push({ backend: currentBackend, effects: current });
|
|
25699
|
+
current = [eff];
|
|
25700
|
+
currentBackend = backend;
|
|
25701
|
+
}
|
|
25702
|
+
}
|
|
25703
|
+
if (currentBackend !== null && current.length > 0) {
|
|
25704
|
+
runs.push({ backend: currentBackend, effects: current });
|
|
25705
|
+
}
|
|
25706
|
+
return runs;
|
|
25707
|
+
};
|
|
25708
|
+
var devicePromise = null;
|
|
25709
|
+
var getGpuDevice = () => {
|
|
25710
|
+
if (devicePromise) {
|
|
25711
|
+
return devicePromise;
|
|
25712
|
+
}
|
|
25713
|
+
devicePromise = (async () => {
|
|
25714
|
+
if (typeof navigator === "undefined" || !("gpu" in navigator)) {
|
|
25715
|
+
throw new Error("WebGPU is not available in this environment");
|
|
25716
|
+
}
|
|
25717
|
+
const { gpu } = navigator;
|
|
25718
|
+
const adapter = await gpu.requestAdapter();
|
|
25719
|
+
if (!adapter) {
|
|
25720
|
+
throw new Error("No WebGPU adapter available");
|
|
25721
|
+
}
|
|
25722
|
+
return adapter.requestDevice();
|
|
25723
|
+
})();
|
|
25724
|
+
return devicePromise;
|
|
25725
|
+
};
|
|
25726
|
+
var createEffectChainState = (width, height) => ({
|
|
25727
|
+
pool: new CanvasPool(width, height),
|
|
25728
|
+
setupCache: new WeakMap,
|
|
25729
|
+
cleanupRegistry: [],
|
|
25730
|
+
currentRunId: 0
|
|
25731
|
+
});
|
|
25732
|
+
var cleanupEffectChainState = (state) => {
|
|
25733
|
+
state.currentRunId++;
|
|
25734
|
+
for (const entry of state.cleanupRegistry) {
|
|
25735
|
+
entry.definition.cleanup(entry.state);
|
|
25736
|
+
}
|
|
25737
|
+
};
|
|
25738
|
+
var ensureSetup = (state, def, target) => {
|
|
25739
|
+
const widened = def;
|
|
25740
|
+
if (state.setupCache.has(widened)) {
|
|
25741
|
+
return state.setupCache.get(widened);
|
|
25742
|
+
}
|
|
25743
|
+
const setupState = def.setup(target);
|
|
25744
|
+
state.setupCache.set(widened, setupState);
|
|
25745
|
+
state.cleanupRegistry.push({ definition: widened, state: setupState });
|
|
25746
|
+
return setupState;
|
|
25747
|
+
};
|
|
25748
|
+
var runEffectChain = async ({
|
|
25749
|
+
state,
|
|
25750
|
+
source,
|
|
25751
|
+
effects,
|
|
25752
|
+
output,
|
|
25753
|
+
width,
|
|
25754
|
+
height
|
|
25755
|
+
}) => {
|
|
25756
|
+
const runId = ++state.currentRunId;
|
|
25757
|
+
const isCancelled = () => state.currentRunId !== runId;
|
|
25758
|
+
const enabledEffects = effects.filter((e) => !e.params.disabled);
|
|
25759
|
+
const runs = groupByBackend(enabledEffects);
|
|
25760
|
+
let currentImage = source;
|
|
25761
|
+
let lastTarget = null;
|
|
25762
|
+
if (runs.length === 0) {
|
|
25763
|
+
if (source === output) {
|
|
25764
|
+
return true;
|
|
25765
|
+
}
|
|
25766
|
+
const ctx = output.getContext("2d");
|
|
25767
|
+
if (!ctx) {
|
|
25768
|
+
throw new Error("Failed to acquire 2D context for output canvas");
|
|
25769
|
+
}
|
|
25770
|
+
ctx.clearRect(0, 0, width, height);
|
|
25771
|
+
ctx.drawImage(currentImage, 0, 0, width, height);
|
|
25772
|
+
return true;
|
|
25773
|
+
}
|
|
25774
|
+
let needsGpuDevice = false;
|
|
25775
|
+
for (const run of runs) {
|
|
25776
|
+
if (run.backend === "webgpu") {
|
|
25777
|
+
needsGpuDevice = true;
|
|
25778
|
+
break;
|
|
25779
|
+
}
|
|
25780
|
+
}
|
|
25781
|
+
const gpuDevice = needsGpuDevice ? await getGpuDevice() : null;
|
|
25782
|
+
if (isCancelled()) {
|
|
25783
|
+
return false;
|
|
25784
|
+
}
|
|
25785
|
+
for (let runIndex = 0;runIndex < runs.length; runIndex++) {
|
|
25786
|
+
const run = runs[runIndex];
|
|
25787
|
+
const [a, b] = state.pool.getPair(run.backend);
|
|
25788
|
+
let dst = a;
|
|
25789
|
+
for (const eff of run.effects) {
|
|
25790
|
+
const def = eff.definition;
|
|
25791
|
+
const setupState = ensureSetup(state, def, dst);
|
|
25792
|
+
def.apply({
|
|
25793
|
+
source: currentImage,
|
|
25794
|
+
target: dst,
|
|
25795
|
+
state: setupState,
|
|
25796
|
+
params: eff.params,
|
|
25797
|
+
width,
|
|
25798
|
+
height,
|
|
25799
|
+
gpuDevice
|
|
25800
|
+
});
|
|
25801
|
+
if (run.backend === "webgl2") {
|
|
25802
|
+
state.pool.assertContextNotLost(dst);
|
|
25803
|
+
}
|
|
25804
|
+
currentImage = dst;
|
|
25805
|
+
dst = dst === a ? b : a;
|
|
25806
|
+
}
|
|
25807
|
+
lastTarget = currentImage ?? lastTarget;
|
|
25808
|
+
const nextRun = runs[runIndex + 1];
|
|
25809
|
+
if (nextRun && nextRun.backend !== run.backend && lastTarget) {
|
|
25810
|
+
const bitmap = await createImageBitmap(lastTarget);
|
|
25811
|
+
if (isCancelled()) {
|
|
25812
|
+
bitmap.close();
|
|
25813
|
+
return false;
|
|
25814
|
+
}
|
|
25815
|
+
currentImage = bitmap;
|
|
25816
|
+
}
|
|
25817
|
+
}
|
|
25818
|
+
if (!lastTarget) {
|
|
25819
|
+
return true;
|
|
25820
|
+
}
|
|
25821
|
+
const outCtx = output.getContext("2d");
|
|
25822
|
+
if (!outCtx) {
|
|
25823
|
+
throw new Error("Failed to acquire 2D context for output canvas");
|
|
25824
|
+
}
|
|
25825
|
+
outCtx.clearRect(0, 0, width, height);
|
|
25826
|
+
outCtx.drawImage(lastTarget, 0, 0, width, height);
|
|
25827
|
+
return true;
|
|
25828
|
+
};
|
|
25829
|
+
var useEffectChainState = () => {
|
|
25830
|
+
const chainStateRef = useRef6(null);
|
|
25831
|
+
const sizeRef = useRef6(null);
|
|
25832
|
+
useEffect4(() => {
|
|
25833
|
+
return () => {
|
|
25834
|
+
if (chainStateRef.current) {
|
|
25835
|
+
cleanupEffectChainState(chainStateRef.current);
|
|
25836
|
+
}
|
|
25837
|
+
};
|
|
25838
|
+
}, []);
|
|
25839
|
+
return useMemo15(() => ({
|
|
25840
|
+
get: (width, height) => {
|
|
25841
|
+
if (!sizeRef.current || sizeRef.current.width !== width || sizeRef.current.height !== height) {
|
|
25842
|
+
if (chainStateRef.current) {
|
|
25843
|
+
cleanupEffectChainState(chainStateRef.current);
|
|
25844
|
+
}
|
|
25845
|
+
chainStateRef.current = createEffectChainState(width, height);
|
|
25846
|
+
sizeRef.current = { width, height };
|
|
25847
|
+
}
|
|
25848
|
+
return chainStateRef.current;
|
|
25849
|
+
}
|
|
25850
|
+
}), []);
|
|
25851
|
+
};
|
|
25852
|
+
var solidSchema = {
|
|
25853
|
+
color: {
|
|
25854
|
+
type: "color",
|
|
25855
|
+
default: "#ffffff",
|
|
25856
|
+
description: "Color"
|
|
25857
|
+
},
|
|
25858
|
+
width: {
|
|
25859
|
+
type: "number",
|
|
25860
|
+
min: 1,
|
|
25861
|
+
step: 1,
|
|
25862
|
+
default: 1920,
|
|
25863
|
+
description: "Width"
|
|
25864
|
+
},
|
|
25865
|
+
height: {
|
|
25866
|
+
type: "number",
|
|
25867
|
+
min: 1,
|
|
25868
|
+
step: 1,
|
|
25869
|
+
default: 1080,
|
|
25870
|
+
description: "Height"
|
|
25871
|
+
},
|
|
25872
|
+
...sequenceStyleSchema
|
|
25873
|
+
};
|
|
25874
|
+
var SolidInner = ({
|
|
25875
|
+
color,
|
|
25876
|
+
width,
|
|
25877
|
+
height,
|
|
25878
|
+
_experimentalEffects: experimentalEffects = [],
|
|
25879
|
+
className,
|
|
25880
|
+
style,
|
|
25881
|
+
overrideId,
|
|
25882
|
+
ref
|
|
25883
|
+
}) => {
|
|
25884
|
+
const { delayRender: delayRender2, continueRender: continueRender2, cancelRender: cancelRender2 } = useDelayRender();
|
|
25885
|
+
const [outputCanvas, setOutputCanvas] = useState6(null);
|
|
25886
|
+
const memoizedEffects = useMemoizedEffects({
|
|
25887
|
+
effects: experimentalEffects,
|
|
25888
|
+
overrideId: overrideId ?? null
|
|
25889
|
+
});
|
|
25890
|
+
const sourceCanvas = useMemo16(() => {
|
|
25891
|
+
if (typeof document === "undefined") {
|
|
25892
|
+
return null;
|
|
25893
|
+
}
|
|
25894
|
+
const canvas = document.createElement("canvas");
|
|
25895
|
+
canvas.width = 1;
|
|
25896
|
+
canvas.height = 1;
|
|
25897
|
+
return canvas;
|
|
25898
|
+
}, []);
|
|
25899
|
+
const chainState = useEffectChainState();
|
|
25900
|
+
const canvasRef = useCallback6((canvas) => {
|
|
25901
|
+
setOutputCanvas(canvas);
|
|
25902
|
+
if (typeof ref === "function") {
|
|
25903
|
+
ref(canvas);
|
|
25904
|
+
} else if (ref) {
|
|
25905
|
+
ref.current = canvas;
|
|
25906
|
+
}
|
|
25907
|
+
}, [ref]);
|
|
25908
|
+
useEffect5(() => {
|
|
25909
|
+
if (!outputCanvas || !sourceCanvas) {
|
|
25910
|
+
return;
|
|
25911
|
+
}
|
|
25912
|
+
const handle = delayRender2("Solid effect chain");
|
|
25913
|
+
if (!chainState) {
|
|
25914
|
+
continueRender2(handle);
|
|
25915
|
+
return () => {
|
|
25916
|
+
continueRender2(handle);
|
|
25917
|
+
};
|
|
25918
|
+
}
|
|
25919
|
+
const ctx = sourceCanvas.getContext("2d", { colorSpace: "srgb" });
|
|
25920
|
+
if (!ctx) {
|
|
25921
|
+
cancelRender2(new Error("Failed to acquire 2D context for <Solid> source"));
|
|
25922
|
+
return;
|
|
25923
|
+
}
|
|
25924
|
+
ctx.fillStyle = color;
|
|
25925
|
+
ctx.fillRect(0, 0, 1, 1);
|
|
25926
|
+
runEffectChain({
|
|
25927
|
+
state: chainState.get(width, height),
|
|
25928
|
+
source: sourceCanvas,
|
|
25929
|
+
effects: memoizedEffects,
|
|
25930
|
+
output: outputCanvas,
|
|
25931
|
+
width,
|
|
25932
|
+
height
|
|
25933
|
+
}).then((completed) => {
|
|
25934
|
+
if (completed) {
|
|
25935
|
+
continueRender2(handle);
|
|
25936
|
+
}
|
|
25937
|
+
}).catch((err) => {
|
|
25938
|
+
cancelRender2(err);
|
|
25939
|
+
});
|
|
25940
|
+
return () => {
|
|
25941
|
+
continueRender2(handle);
|
|
25942
|
+
};
|
|
25943
|
+
}, [
|
|
25944
|
+
color,
|
|
25945
|
+
outputCanvas,
|
|
25946
|
+
sourceCanvas,
|
|
25947
|
+
chainState,
|
|
25948
|
+
width,
|
|
25949
|
+
height,
|
|
25950
|
+
delayRender2,
|
|
25951
|
+
continueRender2,
|
|
25952
|
+
cancelRender2,
|
|
25953
|
+
memoizedEffects
|
|
25954
|
+
]);
|
|
25955
|
+
return /* @__PURE__ */ jsx12("canvas", {
|
|
25956
|
+
ref: canvasRef,
|
|
25957
|
+
width,
|
|
25958
|
+
height,
|
|
25959
|
+
className,
|
|
25960
|
+
style
|
|
25961
|
+
});
|
|
25962
|
+
};
|
|
25963
|
+
var SolidOuter = forwardRef4(({
|
|
25964
|
+
_experimentalEffects = [],
|
|
25965
|
+
_experimentalControls: controls,
|
|
25966
|
+
color,
|
|
25967
|
+
height,
|
|
25968
|
+
width,
|
|
25969
|
+
className,
|
|
25970
|
+
durationInFrames,
|
|
25971
|
+
style,
|
|
25972
|
+
name,
|
|
25973
|
+
from,
|
|
25974
|
+
hidden,
|
|
25975
|
+
showInTimeline,
|
|
25976
|
+
...props
|
|
25977
|
+
}, ref) => {
|
|
25978
|
+
const memoizedEffectDefinitions = useMemoizedEffectDefinitions(_experimentalEffects);
|
|
25979
|
+
return /* @__PURE__ */ jsx12(Sequence, {
|
|
25980
|
+
layout: "none",
|
|
25981
|
+
from,
|
|
25982
|
+
hidden,
|
|
25983
|
+
showInTimeline,
|
|
25984
|
+
_experimentalControls: controls,
|
|
25985
|
+
_experimentalEffects: memoizedEffectDefinitions,
|
|
25986
|
+
durationInFrames,
|
|
25987
|
+
name: name ?? "<Solid>",
|
|
25988
|
+
...props,
|
|
25989
|
+
children: /* @__PURE__ */ jsx12(SolidInner, {
|
|
25990
|
+
ref,
|
|
25991
|
+
overrideId: controls?.overrideId ?? null,
|
|
25992
|
+
color,
|
|
25993
|
+
height,
|
|
25994
|
+
width,
|
|
25995
|
+
className,
|
|
25996
|
+
style,
|
|
25997
|
+
_experimentalEffects
|
|
25998
|
+
})
|
|
25999
|
+
});
|
|
26000
|
+
});
|
|
26001
|
+
var Solid = wrapInSchema(SolidOuter, solidSchema);
|
|
26002
|
+
Solid.displayName = "Solid";
|
|
26003
|
+
addSequenceStackTraces(Solid);
|
|
26004
|
+
var VERSION = "4.0.463";
|
|
26005
|
+
var checkMultipleRemotionVersions = () => {
|
|
26006
|
+
if (typeof globalThis === "undefined") {
|
|
26007
|
+
return;
|
|
26008
|
+
}
|
|
26009
|
+
const set = () => {
|
|
26010
|
+
globalThis.remotion_imported = VERSION;
|
|
26011
|
+
if (typeof window !== "undefined") {
|
|
26012
|
+
window.remotion_imported = VERSION;
|
|
26013
|
+
}
|
|
26014
|
+
};
|
|
26015
|
+
const alreadyImported = globalThis.remotion_imported || typeof window !== "undefined" && window.remotion_imported;
|
|
26016
|
+
if (alreadyImported) {
|
|
26017
|
+
if (alreadyImported === VERSION) {
|
|
26018
|
+
return;
|
|
26019
|
+
}
|
|
26020
|
+
if (typeof alreadyImported === "string" && alreadyImported.includes("webcodecs")) {
|
|
26021
|
+
set();
|
|
26022
|
+
return;
|
|
26023
|
+
}
|
|
26024
|
+
throw new TypeError(`\uD83D\uDEA8 Multiple versions of Remotion detected: ${[
|
|
26025
|
+
VERSION,
|
|
26026
|
+
typeof alreadyImported === "string" ? alreadyImported : "an older version"
|
|
26027
|
+
].filter(truthy2).join(" and ")}. This will cause things to break in an unexpected way.
|
|
26028
|
+
Check that all your Remotion packages are on the same version. If your dependencies depend on Remotion, make them peer dependencies. You can also run \`npx remotion versions\` from your terminal to see which versions are mismatching.`);
|
|
26029
|
+
}
|
|
26030
|
+
set();
|
|
26031
|
+
};
|
|
25770
26032
|
var calcArgs = (fit, frameSize, canvasSize) => {
|
|
25771
26033
|
switch (fit) {
|
|
25772
26034
|
case "fill": {
|
|
@@ -25817,7 +26079,7 @@ var calcArgs = (fit, frameSize, canvasSize) => {
|
|
|
25817
26079
|
};
|
|
25818
26080
|
var CanvasRefForwardingFunction = ({ width, height, fit, className, style }, ref) => {
|
|
25819
26081
|
const canvasRef = useRef7(null);
|
|
25820
|
-
const draw =
|
|
26082
|
+
const draw = useCallback7((imageData) => {
|
|
25821
26083
|
const canvas = canvasRef.current;
|
|
25822
26084
|
const canvasWidth = width ?? imageData.displayWidth;
|
|
25823
26085
|
const canvasHeight = height ?? imageData.displayHeight;
|
|
@@ -26009,7 +26271,19 @@ var resolveAnimatedImageSource = (src) => {
|
|
|
26009
26271
|
}
|
|
26010
26272
|
return new URL(src, window.origin).href;
|
|
26011
26273
|
};
|
|
26012
|
-
var
|
|
26274
|
+
var animatedImageSchema = {
|
|
26275
|
+
playbackRate: {
|
|
26276
|
+
type: "number",
|
|
26277
|
+
min: 0,
|
|
26278
|
+
max: 10,
|
|
26279
|
+
step: 0.1,
|
|
26280
|
+
default: 1,
|
|
26281
|
+
description: "Playback Rate"
|
|
26282
|
+
},
|
|
26283
|
+
...sequenceStyleSchema,
|
|
26284
|
+
hidden: hiddenField
|
|
26285
|
+
};
|
|
26286
|
+
var AnimatedImageContent = forwardRef5(({
|
|
26013
26287
|
src,
|
|
26014
26288
|
width,
|
|
26015
26289
|
height,
|
|
@@ -26116,6 +26390,52 @@ var AnimatedImage = forwardRef4(({
|
|
|
26116
26390
|
...props
|
|
26117
26391
|
});
|
|
26118
26392
|
});
|
|
26393
|
+
AnimatedImageContent.displayName = "AnimatedImageContent";
|
|
26394
|
+
var AnimatedImageInner = ({
|
|
26395
|
+
src,
|
|
26396
|
+
width,
|
|
26397
|
+
height,
|
|
26398
|
+
onError,
|
|
26399
|
+
fit,
|
|
26400
|
+
playbackRate,
|
|
26401
|
+
loopBehavior,
|
|
26402
|
+
id,
|
|
26403
|
+
className,
|
|
26404
|
+
style,
|
|
26405
|
+
durationInFrames,
|
|
26406
|
+
_experimentalControls: controls,
|
|
26407
|
+
ref,
|
|
26408
|
+
...sequenceProps
|
|
26409
|
+
}) => {
|
|
26410
|
+
const { durationInFrames: videoDuration } = useVideoConfig();
|
|
26411
|
+
const resolvedDuration = durationInFrames ?? videoDuration;
|
|
26412
|
+
const animatedImageProps = {
|
|
26413
|
+
src,
|
|
26414
|
+
width,
|
|
26415
|
+
height,
|
|
26416
|
+
onError,
|
|
26417
|
+
fit,
|
|
26418
|
+
playbackRate,
|
|
26419
|
+
loopBehavior,
|
|
26420
|
+
id,
|
|
26421
|
+
className,
|
|
26422
|
+
style
|
|
26423
|
+
};
|
|
26424
|
+
return /* @__PURE__ */ jsx14(Sequence, {
|
|
26425
|
+
layout: "none",
|
|
26426
|
+
durationInFrames: resolvedDuration,
|
|
26427
|
+
name: "<AnimatedImage>",
|
|
26428
|
+
_experimentalControls: controls,
|
|
26429
|
+
...sequenceProps,
|
|
26430
|
+
children: /* @__PURE__ */ jsx14(AnimatedImageContent, {
|
|
26431
|
+
...animatedImageProps,
|
|
26432
|
+
ref
|
|
26433
|
+
})
|
|
26434
|
+
});
|
|
26435
|
+
};
|
|
26436
|
+
var AnimatedImage = wrapInSchema(AnimatedImageInner, animatedImageSchema);
|
|
26437
|
+
AnimatedImage.displayName = "AnimatedImage";
|
|
26438
|
+
addSequenceStackTraces(AnimatedImage);
|
|
26119
26439
|
var cachedSupport = null;
|
|
26120
26440
|
var isHtmlInCanvasSupported = () => {
|
|
26121
26441
|
if (cachedSupport !== null) {
|
|
@@ -26129,6 +26449,7 @@ var isHtmlInCanvasSupported = () => {
|
|
|
26129
26449
|
cachedSupport = typeof ctx?.drawElementImage === "function" && typeof canvas.requestPaint === "function" && typeof canvas.captureElementImage === "function";
|
|
26130
26450
|
return cachedSupport;
|
|
26131
26451
|
};
|
|
26452
|
+
var HTML_IN_CANVAS_UNSUPPORTED_MESSAGE = "HTML in Canvas is not supported. Two common causes: Chrome is older than version 148 (update Chrome), or the HTML-in-Canvas flag is disabled at chrome://flags/#canvas-draw-element (enable it and restart Chrome).";
|
|
26132
26453
|
function assertHtmlInCanvasDimensions(width, height) {
|
|
26133
26454
|
if (typeof width !== "number" || typeof height !== "number") {
|
|
26134
26455
|
throw new Error(`HtmlInCanvas: \`width\` and \`height\` must be numbers. Received width=${String(width)}, height=${String(height)}.`);
|
|
@@ -26154,30 +26475,16 @@ var defaultOnPaint = ({
|
|
|
26154
26475
|
element.style.transform = transform.toString();
|
|
26155
26476
|
};
|
|
26156
26477
|
var HtmlInCanvasAncestorContext = createContext16(false);
|
|
26157
|
-
var
|
|
26158
|
-
|
|
26159
|
-
height,
|
|
26160
|
-
_experimentalEffects: effects = [],
|
|
26161
|
-
children,
|
|
26162
|
-
onPaint,
|
|
26163
|
-
onInit,
|
|
26164
|
-
_experimentalControls: controls,
|
|
26165
|
-
style,
|
|
26166
|
-
durationInFrames,
|
|
26167
|
-
...sequenceProps
|
|
26168
|
-
}, ref) => {
|
|
26169
|
-
const isInsideAncestorHtmlInCanvas = useContext17(HtmlInCanvasAncestorContext);
|
|
26478
|
+
var HtmlInCanvasContent = forwardRef6(({ width, height, effects, children, onPaint, onInit, controls, style }, ref) => {
|
|
26479
|
+
const isInsideAncestorHtmlInCanvas = useContext18(HtmlInCanvasAncestorContext);
|
|
26170
26480
|
assertHtmlInCanvasDimensions(width, height);
|
|
26171
26481
|
const { continueRender: continueRender2, cancelRender: cancelRender2 } = useDelayRender();
|
|
26172
26482
|
if (!isHtmlInCanvasSupported()) {
|
|
26173
|
-
cancelRender2(new Error(
|
|
26483
|
+
cancelRender2(new Error(HTML_IN_CANVAS_UNSUPPORTED_MESSAGE));
|
|
26174
26484
|
}
|
|
26175
|
-
const { durationInFrames: videoDuration } = useVideoConfig();
|
|
26176
|
-
const resolvedDuration = durationInFrames ?? videoDuration;
|
|
26177
|
-
const frame = useCurrentFrame();
|
|
26178
26485
|
const canvas2dRef = useRef9(null);
|
|
26179
26486
|
const divRef = useRef9(null);
|
|
26180
|
-
const setLayoutCanvasRef =
|
|
26487
|
+
const setLayoutCanvasRef = useCallback8((node) => {
|
|
26181
26488
|
canvas2dRef.current = node;
|
|
26182
26489
|
if (typeof ref === "function") {
|
|
26183
26490
|
ref(node);
|
|
@@ -26187,11 +26494,12 @@ var HtmlInCanvasInner = forwardRef5(({
|
|
|
26187
26494
|
}, [ref]);
|
|
26188
26495
|
const [offscreenCanvas] = useState8(() => new OffscreenCanvas(1, 1));
|
|
26189
26496
|
const chainState = useEffectChainState();
|
|
26190
|
-
const memoizedEffects = useMemoizedEffects(
|
|
26497
|
+
const memoizedEffects = useMemoizedEffects({
|
|
26498
|
+
effects,
|
|
26499
|
+
overrideId: controls?.overrideId ?? null
|
|
26500
|
+
});
|
|
26191
26501
|
const effectsRef = useRef9(memoizedEffects);
|
|
26192
26502
|
effectsRef.current = memoizedEffects;
|
|
26193
|
-
const frameRef = useRef9(frame);
|
|
26194
|
-
frameRef.current = frame;
|
|
26195
26503
|
const onPaintRef = useRef9(onPaint);
|
|
26196
26504
|
onPaintRef.current = onPaint;
|
|
26197
26505
|
const onInitRef = useRef9(onInit);
|
|
@@ -26199,7 +26507,7 @@ var HtmlInCanvasInner = forwardRef5(({
|
|
|
26199
26507
|
const initializedRef = useRef9(false);
|
|
26200
26508
|
const onInitCleanupRef = useRef9(null);
|
|
26201
26509
|
const unmountedRef = useRef9(false);
|
|
26202
|
-
const onPaintCb =
|
|
26510
|
+
const onPaintCb = useCallback8(async () => {
|
|
26203
26511
|
const element = divRef.current;
|
|
26204
26512
|
if (!element) {
|
|
26205
26513
|
throw new Error("Canvas or scene element not found");
|
|
@@ -26248,7 +26556,6 @@ var HtmlInCanvasInner = forwardRef5(({
|
|
|
26248
26556
|
source: offscreenCanvas,
|
|
26249
26557
|
effects: effectsRef.current,
|
|
26250
26558
|
output: canvas2dRef.current,
|
|
26251
|
-
frame: frameRef.current,
|
|
26252
26559
|
width,
|
|
26253
26560
|
height
|
|
26254
26561
|
});
|
|
@@ -26312,31 +26619,64 @@ var HtmlInCanvasInner = forwardRef5(({
|
|
|
26312
26619
|
if (isInsideAncestorHtmlInCanvas) {
|
|
26313
26620
|
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.");
|
|
26314
26621
|
}
|
|
26622
|
+
return /* @__PURE__ */ jsx15(HtmlInCanvasAncestorContext.Provider, {
|
|
26623
|
+
value: true,
|
|
26624
|
+
children: /* @__PURE__ */ jsx15("canvas", {
|
|
26625
|
+
ref: setLayoutCanvasRef,
|
|
26626
|
+
width,
|
|
26627
|
+
height,
|
|
26628
|
+
style,
|
|
26629
|
+
children: /* @__PURE__ */ jsx15("div", {
|
|
26630
|
+
ref: divRef,
|
|
26631
|
+
style: innerStyle,
|
|
26632
|
+
children
|
|
26633
|
+
})
|
|
26634
|
+
})
|
|
26635
|
+
});
|
|
26636
|
+
});
|
|
26637
|
+
HtmlInCanvasContent.displayName = "HtmlInCanvasContent";
|
|
26638
|
+
var HtmlInCanvasInner = forwardRef6(({
|
|
26639
|
+
width,
|
|
26640
|
+
height,
|
|
26641
|
+
_experimentalEffects: effects = [],
|
|
26642
|
+
children,
|
|
26643
|
+
onPaint,
|
|
26644
|
+
onInit,
|
|
26645
|
+
_experimentalControls: controls,
|
|
26646
|
+
style,
|
|
26647
|
+
durationInFrames,
|
|
26648
|
+
name,
|
|
26649
|
+
...sequenceProps
|
|
26650
|
+
}, ref) => {
|
|
26651
|
+
const { durationInFrames: videoDuration } = useVideoConfig();
|
|
26652
|
+
const resolvedDuration = durationInFrames ?? videoDuration;
|
|
26653
|
+
const memoizedEffectDefinitions = useMemoizedEffectDefinitions(effects);
|
|
26315
26654
|
return /* @__PURE__ */ jsx15(Sequence, {
|
|
26316
26655
|
durationInFrames: resolvedDuration,
|
|
26317
|
-
name: "<HtmlInCanvas>",
|
|
26656
|
+
name: name ?? "<HtmlInCanvas>",
|
|
26318
26657
|
_experimentalControls: controls,
|
|
26319
|
-
_experimentalEffects:
|
|
26658
|
+
_experimentalEffects: memoizedEffectDefinitions,
|
|
26320
26659
|
layout: "none",
|
|
26321
26660
|
...sequenceProps,
|
|
26322
|
-
children: /* @__PURE__ */ jsx15(
|
|
26323
|
-
|
|
26324
|
-
|
|
26325
|
-
|
|
26326
|
-
|
|
26327
|
-
|
|
26328
|
-
|
|
26329
|
-
|
|
26330
|
-
|
|
26331
|
-
|
|
26332
|
-
children
|
|
26333
|
-
})
|
|
26334
|
-
})
|
|
26661
|
+
children: /* @__PURE__ */ jsx15(HtmlInCanvasContent, {
|
|
26662
|
+
ref,
|
|
26663
|
+
width,
|
|
26664
|
+
height,
|
|
26665
|
+
effects,
|
|
26666
|
+
onPaint,
|
|
26667
|
+
onInit,
|
|
26668
|
+
controls,
|
|
26669
|
+
style,
|
|
26670
|
+
children
|
|
26335
26671
|
})
|
|
26336
26672
|
});
|
|
26337
26673
|
});
|
|
26338
26674
|
HtmlInCanvasInner.displayName = "HtmlInCanvas";
|
|
26339
|
-
var
|
|
26675
|
+
var htmlInCanvasSchema = {
|
|
26676
|
+
...sequenceStyleSchema,
|
|
26677
|
+
hidden: hiddenField
|
|
26678
|
+
};
|
|
26679
|
+
var HtmlInCanvasWrapped = wrapInSchema(HtmlInCanvasInner, htmlInCanvasSchema);
|
|
26340
26680
|
var HtmlInCanvas = Object.assign(HtmlInCanvasWrapped, {
|
|
26341
26681
|
isSupported: isHtmlInCanvasSupported
|
|
26342
26682
|
});
|
|
@@ -26383,7 +26723,7 @@ var RenderAssetManager = createContext17({
|
|
|
26383
26723
|
var RenderAssetManagerProvider = ({ children, collectAssets }) => {
|
|
26384
26724
|
const [renderAssets, setRenderAssets] = useState9([]);
|
|
26385
26725
|
const renderAssetsRef = useRef10([]);
|
|
26386
|
-
const registerRenderAsset =
|
|
26726
|
+
const registerRenderAsset = useCallback9((renderAsset) => {
|
|
26387
26727
|
validateRenderAsset(renderAsset);
|
|
26388
26728
|
renderAssetsRef.current = [...renderAssetsRef.current, renderAsset];
|
|
26389
26729
|
setRenderAssets(renderAssetsRef.current);
|
|
@@ -26400,7 +26740,7 @@ var RenderAssetManagerProvider = ({ children, collectAssets }) => {
|
|
|
26400
26740
|
};
|
|
26401
26741
|
}, []);
|
|
26402
26742
|
}
|
|
26403
|
-
const unregisterRenderAsset =
|
|
26743
|
+
const unregisterRenderAsset = useCallback9((id) => {
|
|
26404
26744
|
renderAssetsRef.current = renderAssetsRef.current.filter((a) => a.id !== id);
|
|
26405
26745
|
setRenderAssets(renderAssetsRef.current);
|
|
26406
26746
|
}, []);
|
|
@@ -26428,7 +26768,7 @@ var RenderAssetManagerProvider = ({ children, collectAssets }) => {
|
|
|
26428
26768
|
};
|
|
26429
26769
|
var ArtifactThumbnail = Symbol("Thumbnail");
|
|
26430
26770
|
var Artifact = ({ filename, content, downloadBehavior }) => {
|
|
26431
|
-
const { registerRenderAsset, unregisterRenderAsset } =
|
|
26771
|
+
const { registerRenderAsset, unregisterRenderAsset } = useContext19(RenderAssetManager);
|
|
26432
26772
|
const env = useRemotionEnvironment();
|
|
26433
26773
|
const frame = useCurrentFrame();
|
|
26434
26774
|
const [id] = useState10(() => {
|
|
@@ -26618,7 +26958,7 @@ var getSrcWithoutHash = (src) => {
|
|
|
26618
26958
|
return src.slice(0, hashIndex);
|
|
26619
26959
|
};
|
|
26620
26960
|
var usePreload = (src) => {
|
|
26621
|
-
const preloads2 =
|
|
26961
|
+
const preloads2 = useContext20(PreloadContext);
|
|
26622
26962
|
const hashFragmentIndex = removeAndGetHashFragment(src);
|
|
26623
26963
|
const withoutHashFragment = getSrcWithoutHash(src);
|
|
26624
26964
|
if (!preloads2[withoutHashFragment]) {
|
|
@@ -26800,6 +27140,9 @@ var validateMediaProps = (props, component) => {
|
|
|
26800
27140
|
if (typeof props.playbackRate === "number" && (isNaN(props.playbackRate) || !Number.isFinite(props.playbackRate) || props.playbackRate <= 0)) {
|
|
26801
27141
|
throw new TypeError(`You have passed a playbackRate of ${props.playbackRate} to your <${component} /> component. Playback rate must be a real number above 0.`);
|
|
26802
27142
|
}
|
|
27143
|
+
if (typeof props.preservePitch !== "boolean" && typeof props.preservePitch !== "undefined") {
|
|
27144
|
+
throw new TypeError(`'preservePitch' must be a boolean or undefined but got '${typeof props.preservePitch}' instead`);
|
|
27145
|
+
}
|
|
26803
27146
|
};
|
|
26804
27147
|
var validateStartFromProps = (startFrom, endAt) => {
|
|
26805
27148
|
if (typeof startFrom !== "undefined") {
|
|
@@ -27145,7 +27488,7 @@ var SharedAudioContextProvider = ({ children, audioLatencyHint, audioEnabled })
|
|
|
27145
27488
|
}, []);
|
|
27146
27489
|
const prevEndTimes = useRef11({ scheduledEndTime: null, mediaEndTime: null });
|
|
27147
27490
|
const nodesToResume = useRef11(new Map);
|
|
27148
|
-
const unscheduleAudioNode =
|
|
27491
|
+
const unscheduleAudioNode = useCallback10((node) => {
|
|
27149
27492
|
nodesToResume.current.delete(node);
|
|
27150
27493
|
}, []);
|
|
27151
27494
|
const scheduleAudioNode = useMemo22(() => {
|
|
@@ -27193,7 +27536,7 @@ var SharedAudioContextProvider = ({ children, audioLatencyHint, audioEnabled })
|
|
|
27193
27536
|
};
|
|
27194
27537
|
};
|
|
27195
27538
|
}, [ctxAndGain, logLevel]);
|
|
27196
|
-
const resume =
|
|
27539
|
+
const resume = useCallback10(() => {
|
|
27197
27540
|
if (!ctxAndGain) {
|
|
27198
27541
|
return Promise.resolve();
|
|
27199
27542
|
}
|
|
@@ -27220,10 +27563,10 @@ var SharedAudioContextProvider = ({ children, audioLatencyHint, audioEnabled })
|
|
|
27220
27563
|
});
|
|
27221
27564
|
return resumePromise.catch(() => {});
|
|
27222
27565
|
}, [ctxAndGain, logLevel]);
|
|
27223
|
-
const getIsResumingAudioContext =
|
|
27566
|
+
const getIsResumingAudioContext = useCallback10(() => {
|
|
27224
27567
|
return isResuming.current;
|
|
27225
27568
|
}, []);
|
|
27226
|
-
const suspend =
|
|
27569
|
+
const suspend = useCallback10(() => {
|
|
27227
27570
|
if (!ctxAndGain) {
|
|
27228
27571
|
return;
|
|
27229
27572
|
}
|
|
@@ -27269,7 +27612,7 @@ var SharedAudioTagsContextProvider = ({ children, numberOfAudioTags }) => {
|
|
|
27269
27612
|
const logLevel = useLogLevel();
|
|
27270
27613
|
const mountTime = useMountTime();
|
|
27271
27614
|
const env = useRemotionEnvironment();
|
|
27272
|
-
const audioCtx =
|
|
27615
|
+
const audioCtx = useContext21(SharedAudioContext);
|
|
27273
27616
|
const audioContext = audioCtx?.audioContext ?? null;
|
|
27274
27617
|
const resume = audioCtx?.resume;
|
|
27275
27618
|
const refs = useMemo22(() => {
|
|
@@ -27296,7 +27639,7 @@ var SharedAudioTagsContextProvider = ({ children, numberOfAudioTags }) => {
|
|
|
27296
27639
|
};
|
|
27297
27640
|
}, [refs]);
|
|
27298
27641
|
const takenAudios = useRef11(new Array(numberOfAudioTags).fill(false));
|
|
27299
|
-
const rerenderAudios =
|
|
27642
|
+
const rerenderAudios = useCallback10(() => {
|
|
27300
27643
|
refs.forEach(({ ref, id }) => {
|
|
27301
27644
|
const data = audios.current?.find((a) => a.id === id);
|
|
27302
27645
|
const { current } = ref;
|
|
@@ -27317,7 +27660,7 @@ var SharedAudioTagsContextProvider = ({ children, numberOfAudioTags }) => {
|
|
|
27317
27660
|
});
|
|
27318
27661
|
});
|
|
27319
27662
|
}, [refs]);
|
|
27320
|
-
const registerAudio =
|
|
27663
|
+
const registerAudio = useCallback10((options) => {
|
|
27321
27664
|
const { aud, audioId, premounting, postmounting } = options;
|
|
27322
27665
|
const found = audios.current?.find((a) => a.audioId === audioId);
|
|
27323
27666
|
if (found) {
|
|
@@ -27346,7 +27689,7 @@ var SharedAudioTagsContextProvider = ({ children, numberOfAudioTags }) => {
|
|
|
27346
27689
|
rerenderAudios();
|
|
27347
27690
|
return newElem;
|
|
27348
27691
|
}, [numberOfAudioTags, refs, rerenderAudios]);
|
|
27349
|
-
const unregisterAudio =
|
|
27692
|
+
const unregisterAudio = useCallback10((id) => {
|
|
27350
27693
|
const cloned = [...takenAudios.current];
|
|
27351
27694
|
const index = refs.findIndex((r2) => r2.id === id);
|
|
27352
27695
|
if (index === -1) {
|
|
@@ -27357,7 +27700,7 @@ var SharedAudioTagsContextProvider = ({ children, numberOfAudioTags }) => {
|
|
|
27357
27700
|
audios.current = audios.current?.filter((a) => a.id !== id);
|
|
27358
27701
|
rerenderAudios();
|
|
27359
27702
|
}, [refs, rerenderAudios]);
|
|
27360
|
-
const updateAudio =
|
|
27703
|
+
const updateAudio = useCallback10(({
|
|
27361
27704
|
aud,
|
|
27362
27705
|
audioId,
|
|
27363
27706
|
id,
|
|
@@ -27391,7 +27734,7 @@ var SharedAudioTagsContextProvider = ({ children, numberOfAudioTags }) => {
|
|
|
27391
27734
|
rerenderAudios();
|
|
27392
27735
|
}
|
|
27393
27736
|
}, [rerenderAudios]);
|
|
27394
|
-
const playAllAudios =
|
|
27737
|
+
const playAllAudios = useCallback10(() => {
|
|
27395
27738
|
refs.forEach((ref) => {
|
|
27396
27739
|
const audio = audios.current.find((a) => a.el === ref.ref);
|
|
27397
27740
|
if (audio?.premounting) {
|
|
@@ -27444,8 +27787,8 @@ var useSharedAudio = ({
|
|
|
27444
27787
|
premounting,
|
|
27445
27788
|
postmounting
|
|
27446
27789
|
}) => {
|
|
27447
|
-
const audioCtx =
|
|
27448
|
-
const tagsCtx =
|
|
27790
|
+
const audioCtx = useContext21(SharedAudioContext);
|
|
27791
|
+
const tagsCtx = useContext21(SharedAudioTagsContext);
|
|
27449
27792
|
const [elem] = useState12(() => {
|
|
27450
27793
|
if (tagsCtx && tagsCtx.numberOfAudioTags > 0) {
|
|
27451
27794
|
return tagsCtx.registerAudio({ aud, audioId, premounting, postmounting });
|
|
@@ -27624,7 +27967,7 @@ var useVolume = ({
|
|
|
27624
27967
|
const audioStuffRef = useRef13(null);
|
|
27625
27968
|
const currentVolumeRef = useRef13(volume);
|
|
27626
27969
|
currentVolumeRef.current = volume;
|
|
27627
|
-
const sharedAudioContext =
|
|
27970
|
+
const sharedAudioContext = useContext22(SharedAudioContext);
|
|
27628
27971
|
if (!sharedAudioContext) {
|
|
27629
27972
|
throw new Error("useAmplification must be used within a SharedAudioContext");
|
|
27630
27973
|
}
|
|
@@ -27689,7 +28032,7 @@ var useVolume = ({
|
|
|
27689
28032
|
return audioStuffRef;
|
|
27690
28033
|
};
|
|
27691
28034
|
var useMediaStartsAt = () => {
|
|
27692
|
-
const parentSequence =
|
|
28035
|
+
const parentSequence = useContext23(SequenceContext);
|
|
27693
28036
|
const startsAt = Math.min(0, parentSequence?.relativeFrom ?? 0);
|
|
27694
28037
|
return startsAt;
|
|
27695
28038
|
};
|
|
@@ -27778,7 +28121,7 @@ var useBasicMediaInTimeline = ({
|
|
|
27778
28121
|
if (!src) {
|
|
27779
28122
|
throw new Error("No src passed");
|
|
27780
28123
|
}
|
|
27781
|
-
const parentSequence =
|
|
28124
|
+
const parentSequence = useContext24(SequenceContext);
|
|
27782
28125
|
const [initialVolume] = useState13(() => volume);
|
|
27783
28126
|
const duration = getTimelineDuration({
|
|
27784
28127
|
compositionDurationInFrames: sequenceDurationInFrames,
|
|
@@ -27845,8 +28188,8 @@ var useImageInTimeline = ({
|
|
|
27845
28188
|
loopDisplay,
|
|
27846
28189
|
controls
|
|
27847
28190
|
}) => {
|
|
27848
|
-
const parentSequence =
|
|
27849
|
-
const { registerSequence, unregisterSequence } =
|
|
28191
|
+
const parentSequence = useContext24(SequenceContext);
|
|
28192
|
+
const { registerSequence, unregisterSequence } = useContext24(SequenceManager);
|
|
27850
28193
|
const { durationInFrames } = useVideoConfig();
|
|
27851
28194
|
const mediaStartsAt = useMediaStartsAt();
|
|
27852
28195
|
const { duration, nonce, rootId, finalDisplayName } = useBasicMediaInTimeline({
|
|
@@ -27927,9 +28270,9 @@ var useMediaInTimeline = ({
|
|
|
27927
28270
|
postmountDisplay,
|
|
27928
28271
|
loopDisplay
|
|
27929
28272
|
}) => {
|
|
27930
|
-
const parentSequence =
|
|
28273
|
+
const parentSequence = useContext24(SequenceContext);
|
|
27931
28274
|
const startsAt = useMediaStartsAt();
|
|
27932
|
-
const { registerSequence, unregisterSequence } =
|
|
28275
|
+
const { registerSequence, unregisterSequence } = useContext24(SequenceManager);
|
|
27933
28276
|
const { durationInFrames } = useVideoConfig();
|
|
27934
28277
|
const mediaStartsAt = useMediaStartsAt();
|
|
27935
28278
|
const { volumes, duration, doesVolumeChange, nonce, rootId, finalDisplayName } = useBasicMediaInTimeline({
|
|
@@ -28011,7 +28354,7 @@ var useBufferManager = (logLevel, mountTime) => {
|
|
|
28011
28354
|
const env = useRemotionEnvironment();
|
|
28012
28355
|
const rendering = env.isRendering;
|
|
28013
28356
|
const buffering = useRef14(false);
|
|
28014
|
-
const addBlock =
|
|
28357
|
+
const addBlock = useCallback11((block) => {
|
|
28015
28358
|
if (rendering) {
|
|
28016
28359
|
return {
|
|
28017
28360
|
unblock: () => {
|
|
@@ -28037,7 +28380,7 @@ var useBufferManager = (logLevel, mountTime) => {
|
|
|
28037
28380
|
}
|
|
28038
28381
|
};
|
|
28039
28382
|
}, [rendering]);
|
|
28040
|
-
const listenForBuffering =
|
|
28383
|
+
const listenForBuffering = useCallback11((callback) => {
|
|
28041
28384
|
setOnBufferingCallbacks((c) => [...c, callback]);
|
|
28042
28385
|
return {
|
|
28043
28386
|
remove: () => {
|
|
@@ -28045,7 +28388,7 @@ var useBufferManager = (logLevel, mountTime) => {
|
|
|
28045
28388
|
}
|
|
28046
28389
|
};
|
|
28047
28390
|
}, []);
|
|
28048
|
-
const listenForResume =
|
|
28391
|
+
const listenForResume = useCallback11((callback) => {
|
|
28049
28392
|
setOnResumeCallbacks((c) => [...c, callback]);
|
|
28050
28393
|
return {
|
|
28051
28394
|
remove: () => {
|
|
@@ -28089,7 +28432,7 @@ var useBufferManager = (logLevel, mountTime) => {
|
|
|
28089
28432
|
};
|
|
28090
28433
|
var BufferingContextReact = React21.createContext(null);
|
|
28091
28434
|
var BufferingProvider = ({ children }) => {
|
|
28092
|
-
const { logLevel, mountTime } =
|
|
28435
|
+
const { logLevel, mountTime } = useContext25(LogLevelContext);
|
|
28093
28436
|
const bufferManager = useBufferManager(logLevel ?? "info", mountTime);
|
|
28094
28437
|
return /* @__PURE__ */ jsx21(BufferingContextReact.Provider, {
|
|
28095
28438
|
value: bufferManager,
|
|
@@ -28119,7 +28462,7 @@ var useIsPlayerBuffering = (bufferManager) => {
|
|
|
28119
28462
|
return isBuffering;
|
|
28120
28463
|
};
|
|
28121
28464
|
var useBufferState = () => {
|
|
28122
|
-
const buffer =
|
|
28465
|
+
const buffer = useContext26(BufferingContextReact);
|
|
28123
28466
|
const logLevel = useLogLevel();
|
|
28124
28467
|
const addBlock = buffer ? buffer.addBlock : null;
|
|
28125
28468
|
return useMemo25(() => ({
|
|
@@ -28159,7 +28502,7 @@ var useBufferUntilFirstFrame = ({
|
|
|
28159
28502
|
}) => {
|
|
28160
28503
|
const bufferingRef = useRef15(false);
|
|
28161
28504
|
const { delayPlayback } = useBufferState();
|
|
28162
|
-
const bufferUntilFirstFrame =
|
|
28505
|
+
const bufferUntilFirstFrame = useCallback12((requestedTime) => {
|
|
28163
28506
|
if (mediaType !== "video") {
|
|
28164
28507
|
return;
|
|
28165
28508
|
}
|
|
@@ -28530,6 +28873,23 @@ function checkInfiniteRange(name, arr) {
|
|
|
28530
28873
|
}
|
|
28531
28874
|
}
|
|
28532
28875
|
}
|
|
28876
|
+
function assertValidInterpolateEasingOption(easing, inputRangeLength) {
|
|
28877
|
+
if (easing === undefined) {
|
|
28878
|
+
return;
|
|
28879
|
+
}
|
|
28880
|
+
if (typeof easing === "function") {
|
|
28881
|
+
return;
|
|
28882
|
+
}
|
|
28883
|
+
const expectedLength = inputRangeLength - 1;
|
|
28884
|
+
if (easing.length !== expectedLength) {
|
|
28885
|
+
throw new Error(`When easing is an array, it must have one entry per segment between keyframes (length inputRange.length - 1 = ${expectedLength}), but got length ${easing.length}`);
|
|
28886
|
+
}
|
|
28887
|
+
for (let i = 0;i < easing.length; i++) {
|
|
28888
|
+
if (typeof easing[i] !== "function") {
|
|
28889
|
+
throw new Error(`easing[${i}] must be a function`);
|
|
28890
|
+
}
|
|
28891
|
+
}
|
|
28892
|
+
}
|
|
28533
28893
|
function interpolate2(input, inputRange, outputRange, options) {
|
|
28534
28894
|
if (typeof input === "undefined") {
|
|
28535
28895
|
throw new Error("input can not be undefined");
|
|
@@ -28546,7 +28906,18 @@ function interpolate2(input, inputRange, outputRange, options) {
|
|
|
28546
28906
|
checkInfiniteRange("inputRange", inputRange);
|
|
28547
28907
|
checkInfiniteRange("outputRange", outputRange);
|
|
28548
28908
|
checkValidInputRange(inputRange);
|
|
28549
|
-
|
|
28909
|
+
assertValidInterpolateEasingOption(options?.easing, inputRange.length);
|
|
28910
|
+
const easingOption = options?.easing;
|
|
28911
|
+
const defaultEasing = (num) => num;
|
|
28912
|
+
const resolveEasingForSegment = (segmentIndex) => {
|
|
28913
|
+
if (easingOption === undefined) {
|
|
28914
|
+
return defaultEasing;
|
|
28915
|
+
}
|
|
28916
|
+
if (typeof easingOption === "function") {
|
|
28917
|
+
return easingOption;
|
|
28918
|
+
}
|
|
28919
|
+
return easingOption[segmentIndex];
|
|
28920
|
+
};
|
|
28550
28921
|
let extrapolateLeft = "extend";
|
|
28551
28922
|
if (options?.extrapolateLeft !== undefined) {
|
|
28552
28923
|
extrapolateLeft = options.extrapolateLeft;
|
|
@@ -28560,7 +28931,7 @@ function interpolate2(input, inputRange, outputRange, options) {
|
|
|
28560
28931
|
}
|
|
28561
28932
|
const range = findRange(input, inputRange);
|
|
28562
28933
|
return interpolateFunction(input, [inputRange[range], inputRange[range + 1]], [outputRange[range], outputRange[range + 1]], {
|
|
28563
|
-
easing,
|
|
28934
|
+
easing: resolveEasingForSegment(range),
|
|
28564
28935
|
extrapolateLeft,
|
|
28565
28936
|
extrapolateRight
|
|
28566
28937
|
});
|
|
@@ -28625,6 +28996,7 @@ var useMediaPlayback = ({
|
|
|
28625
28996
|
src,
|
|
28626
28997
|
mediaType,
|
|
28627
28998
|
playbackRate: localPlaybackRate,
|
|
28999
|
+
preservePitch = true,
|
|
28628
29000
|
onlyWarnForMediaSeekingError,
|
|
28629
29001
|
acceptableTimeshift,
|
|
28630
29002
|
pauseWhenBuffering,
|
|
@@ -28636,7 +29008,7 @@ var useMediaPlayback = ({
|
|
|
28636
29008
|
const frame = useCurrentFrame();
|
|
28637
29009
|
const absoluteFrame = useTimelinePosition();
|
|
28638
29010
|
const [playing] = usePlayingState();
|
|
28639
|
-
const buffering =
|
|
29011
|
+
const buffering = useContext27(BufferingContextReact);
|
|
28640
29012
|
const { fps } = useVideoConfig();
|
|
28641
29013
|
const mediaStartsAt = useMediaStartsAt();
|
|
28642
29014
|
const lastSeekDueToShift = useRef17(null);
|
|
@@ -28647,7 +29019,7 @@ var useMediaPlayback = ({
|
|
|
28647
29019
|
throw new Error("useMediaPlayback must be used inside a <BufferingContext>");
|
|
28648
29020
|
}
|
|
28649
29021
|
const isVariableFpsVideoMap = useRef17({});
|
|
28650
|
-
const onVariableFpsVideoDetected =
|
|
29022
|
+
const onVariableFpsVideoDetected = useCallback13(() => {
|
|
28651
29023
|
if (!src) {
|
|
28652
29024
|
return;
|
|
28653
29025
|
}
|
|
@@ -28742,7 +29114,10 @@ var useMediaPlayback = ({
|
|
|
28742
29114
|
if (mediaRef.current && mediaRef.current.playbackRate !== playbackRateToSet) {
|
|
28743
29115
|
mediaRef.current.playbackRate = playbackRateToSet;
|
|
28744
29116
|
}
|
|
28745
|
-
|
|
29117
|
+
if (mediaRef.current && mediaRef.current.preservesPitch !== preservePitch) {
|
|
29118
|
+
mediaRef.current.preservesPitch = preservePitch;
|
|
29119
|
+
}
|
|
29120
|
+
}, [mediaRef, playbackRate, preservePitch]);
|
|
28746
29121
|
useEffect12(() => {
|
|
28747
29122
|
const tagName = mediaType === "audio" ? "<Html5Audio>" : "<Html5Video>";
|
|
28748
29123
|
if (!mediaRef.current) {
|
|
@@ -28924,15 +29299,15 @@ var SetMediaVolumeContext = createContext22({
|
|
|
28924
29299
|
}
|
|
28925
29300
|
});
|
|
28926
29301
|
var useMediaVolumeState = () => {
|
|
28927
|
-
const { mediaVolume } =
|
|
28928
|
-
const { setMediaVolume } =
|
|
29302
|
+
const { mediaVolume } = useContext28(MediaVolumeContext);
|
|
29303
|
+
const { setMediaVolume } = useContext28(SetMediaVolumeContext);
|
|
28929
29304
|
return useMemo27(() => {
|
|
28930
29305
|
return [mediaVolume, setMediaVolume];
|
|
28931
29306
|
}, [mediaVolume, setMediaVolume]);
|
|
28932
29307
|
};
|
|
28933
29308
|
var useMediaMutedState = () => {
|
|
28934
|
-
const { mediaMuted } =
|
|
28935
|
-
const { setMediaMuted } =
|
|
29309
|
+
const { mediaMuted } = useContext28(MediaVolumeContext);
|
|
29310
|
+
const { setMediaMuted } = useContext28(SetMediaVolumeContext);
|
|
28936
29311
|
return useMemo27(() => {
|
|
28937
29312
|
return [mediaMuted, setMediaMuted];
|
|
28938
29313
|
}, [mediaMuted, setMediaMuted]);
|
|
@@ -28952,6 +29327,7 @@ var AudioForDevelopmentForwardRefFunction = (props, ref) => {
|
|
|
28952
29327
|
volume,
|
|
28953
29328
|
muted,
|
|
28954
29329
|
playbackRate,
|
|
29330
|
+
preservePitch,
|
|
28955
29331
|
shouldPreMountAudioTags,
|
|
28956
29332
|
src,
|
|
28957
29333
|
onDuration,
|
|
@@ -28982,14 +29358,12 @@ var AudioForDevelopmentForwardRefFunction = (props, ref) => {
|
|
|
28982
29358
|
const [mediaVolume] = useMediaVolumeState();
|
|
28983
29359
|
const [mediaMuted] = useMediaMutedState();
|
|
28984
29360
|
const volumePropFrame = useFrameForVolumeProp(loopVolumeCurveBehavior ?? "repeat");
|
|
28985
|
-
const { hidden } = useContext28(SequenceVisibilityToggleContext);
|
|
28986
29361
|
if (!src) {
|
|
28987
29362
|
throw new TypeError("No 'src' was passed to <Html5Audio>.");
|
|
28988
29363
|
}
|
|
28989
29364
|
const preloadedSrc = usePreload(src);
|
|
28990
|
-
const sequenceContext =
|
|
29365
|
+
const sequenceContext = useContext29(SequenceContext);
|
|
28991
29366
|
const [timelineId] = useState16(() => String(Math.random()));
|
|
28992
|
-
const isSequenceHidden = hidden[timelineId] ?? false;
|
|
28993
29367
|
const userPreferredVolume = evaluateVolume({
|
|
28994
29368
|
frame: volumePropFrame,
|
|
28995
29369
|
volume,
|
|
@@ -29003,7 +29377,7 @@ var AudioForDevelopmentForwardRefFunction = (props, ref) => {
|
|
|
29003
29377
|
});
|
|
29004
29378
|
const propsToPass = useMemo28(() => {
|
|
29005
29379
|
return {
|
|
29006
|
-
muted: muted || mediaMuted ||
|
|
29380
|
+
muted: muted || mediaMuted || userPreferredVolume <= 0,
|
|
29007
29381
|
src: preloadedSrc,
|
|
29008
29382
|
loop: _remotionInternalNativeLoopPassed,
|
|
29009
29383
|
crossOrigin: crossOriginValue,
|
|
@@ -29011,7 +29385,6 @@ var AudioForDevelopmentForwardRefFunction = (props, ref) => {
|
|
|
29011
29385
|
};
|
|
29012
29386
|
}, [
|
|
29013
29387
|
_remotionInternalNativeLoopPassed,
|
|
29014
|
-
isSequenceHidden,
|
|
29015
29388
|
mediaMuted,
|
|
29016
29389
|
muted,
|
|
29017
29390
|
nativeProps,
|
|
@@ -29056,6 +29429,7 @@ var AudioForDevelopmentForwardRefFunction = (props, ref) => {
|
|
|
29056
29429
|
src,
|
|
29057
29430
|
mediaType: "audio",
|
|
29058
29431
|
playbackRate: playbackRate ?? 1,
|
|
29432
|
+
preservePitch,
|
|
29059
29433
|
onlyWarnForMediaSeekingError: false,
|
|
29060
29434
|
acceptableTimeshift: acceptableTimeShiftInSeconds ?? null,
|
|
29061
29435
|
isPremounting: Boolean(sequenceContext?.premounting),
|
|
@@ -29118,7 +29492,7 @@ var AudioForDevelopmentForwardRefFunction = (props, ref) => {
|
|
|
29118
29492
|
...propsToPass
|
|
29119
29493
|
});
|
|
29120
29494
|
};
|
|
29121
|
-
var AudioForPreview =
|
|
29495
|
+
var AudioForPreview = forwardRef7(AudioForDevelopmentForwardRefFunction);
|
|
29122
29496
|
var AudioForRenderingRefForwardingFunction = (props, ref) => {
|
|
29123
29497
|
const audioRef = useRef19(null);
|
|
29124
29498
|
const {
|
|
@@ -29137,13 +29511,14 @@ var AudioForRenderingRefForwardingFunction = (props, ref) => {
|
|
|
29137
29511
|
loopVolumeCurveBehavior,
|
|
29138
29512
|
pauseWhenBuffering,
|
|
29139
29513
|
audioStreamIndex,
|
|
29514
|
+
preservePitch: _preservePitch,
|
|
29140
29515
|
...nativeProps
|
|
29141
29516
|
} = props;
|
|
29142
29517
|
const absoluteFrame = useTimelinePosition();
|
|
29143
29518
|
const volumePropFrame = useFrameForVolumeProp(loopVolumeCurveBehavior ?? "repeat");
|
|
29144
29519
|
const frame = useCurrentFrame();
|
|
29145
|
-
const sequenceContext =
|
|
29146
|
-
const { registerRenderAsset, unregisterRenderAsset } =
|
|
29520
|
+
const sequenceContext = useContext30(SequenceContext);
|
|
29521
|
+
const { registerRenderAsset, unregisterRenderAsset } = useContext30(RenderAssetManager);
|
|
29147
29522
|
const { delayRender: delayRender2, continueRender: continueRender2 } = useDelayRender();
|
|
29148
29523
|
const id = useMemo29(() => `audio-${random(props.src ?? "")}-${sequenceContext?.relativeFrom}-${sequenceContext?.cumulatedFrom}-${sequenceContext?.durationInFrames}`, [
|
|
29149
29524
|
props.src,
|
|
@@ -29250,9 +29625,9 @@ var AudioForRenderingRefForwardingFunction = (props, ref) => {
|
|
|
29250
29625
|
onError: onNativeError
|
|
29251
29626
|
});
|
|
29252
29627
|
};
|
|
29253
|
-
var AudioForRendering =
|
|
29628
|
+
var AudioForRendering = forwardRef8(AudioForRenderingRefForwardingFunction);
|
|
29254
29629
|
var AudioRefForwardingFunction = (props, ref) => {
|
|
29255
|
-
const audioTagsContext =
|
|
29630
|
+
const audioTagsContext = useContext31(SharedAudioTagsContext);
|
|
29256
29631
|
const {
|
|
29257
29632
|
startFrom,
|
|
29258
29633
|
endAt,
|
|
@@ -29271,12 +29646,12 @@ var AudioRefForwardingFunction = (props, ref) => {
|
|
|
29271
29646
|
if (environment.isClientSideRendering) {
|
|
29272
29647
|
throw new Error("<Html5Audio> is not supported in @remotion/web-renderer. Use <Audio> from @remotion/media instead. See https://remotion.dev/docs/client-side-rendering/limitations");
|
|
29273
29648
|
}
|
|
29274
|
-
const { durations, setDurations } =
|
|
29649
|
+
const { durations, setDurations } = useContext31(DurationsContext);
|
|
29275
29650
|
if (typeof props.src !== "string") {
|
|
29276
29651
|
throw new TypeError(`The \`<Html5Audio>\` tag requires a string for \`src\`, but got ${JSON.stringify(props.src)} instead.`);
|
|
29277
29652
|
}
|
|
29278
29653
|
const preloadedSrc = usePreload(props.src);
|
|
29279
|
-
const onError =
|
|
29654
|
+
const onError = useCallback14((e) => {
|
|
29280
29655
|
console.log(e.currentTarget.error);
|
|
29281
29656
|
const errMessage = `Could not play audio with src ${preloadedSrc}: ${e.currentTarget.error}. See https://remotion.dev/docs/media-playback-error for help.`;
|
|
29282
29657
|
if (loop) {
|
|
@@ -29290,7 +29665,7 @@ var AudioRefForwardingFunction = (props, ref) => {
|
|
|
29290
29665
|
console.warn(errMessage);
|
|
29291
29666
|
}
|
|
29292
29667
|
}, [loop, onRemotionError, preloadedSrc]);
|
|
29293
|
-
const onDuration =
|
|
29668
|
+
const onDuration = useCallback14((src, durationInSeconds) => {
|
|
29294
29669
|
setDurations({ type: "got-duration", durationInSeconds, src });
|
|
29295
29670
|
}, [setDurations]);
|
|
29296
29671
|
const durationFetched = durations[getAbsoluteSrc(preloadedSrc)] ?? durations[getAbsoluteSrc(props.src)];
|
|
@@ -29340,7 +29715,11 @@ var AudioRefForwardingFunction = (props, ref) => {
|
|
|
29340
29715
|
})
|
|
29341
29716
|
});
|
|
29342
29717
|
}
|
|
29343
|
-
validateMediaProps({
|
|
29718
|
+
validateMediaProps({
|
|
29719
|
+
playbackRate: props.playbackRate,
|
|
29720
|
+
preservePitch: props.preservePitch,
|
|
29721
|
+
volume: props.volume
|
|
29722
|
+
}, "Html5Audio");
|
|
29344
29723
|
if (environment.isRendering) {
|
|
29345
29724
|
return /* @__PURE__ */ jsx24(AudioForRendering, {
|
|
29346
29725
|
onDuration,
|
|
@@ -29363,7 +29742,7 @@ var AudioRefForwardingFunction = (props, ref) => {
|
|
|
29363
29742
|
showInTimeline: showInTimeline ?? true
|
|
29364
29743
|
});
|
|
29365
29744
|
};
|
|
29366
|
-
var Html5Audio =
|
|
29745
|
+
var Html5Audio = forwardRef9(AudioRefForwardingFunction);
|
|
29367
29746
|
addSequenceStackTraces(Html5Audio);
|
|
29368
29747
|
var Audio = Html5Audio;
|
|
29369
29748
|
var kSplineTableSize = 11;
|
|
@@ -29380,11 +29759,11 @@ var IFrameRefForwarding = ({
|
|
|
29380
29759
|
retries: delayRenderRetries ?? undefined,
|
|
29381
29760
|
timeoutInMilliseconds: delayRenderTimeoutInMilliseconds ?? undefined
|
|
29382
29761
|
}));
|
|
29383
|
-
const didLoad =
|
|
29762
|
+
const didLoad = useCallback15((e) => {
|
|
29384
29763
|
continueRender2(handle);
|
|
29385
29764
|
onLoad?.(e);
|
|
29386
29765
|
}, [handle, onLoad, continueRender2]);
|
|
29387
|
-
const didGetError =
|
|
29766
|
+
const didGetError = useCallback15((e) => {
|
|
29388
29767
|
continueRender2(handle);
|
|
29389
29768
|
if (onError) {
|
|
29390
29769
|
onError(e);
|
|
@@ -29400,7 +29779,7 @@ var IFrameRefForwarding = ({
|
|
|
29400
29779
|
onLoad: didLoad
|
|
29401
29780
|
});
|
|
29402
29781
|
};
|
|
29403
|
-
var IFrame =
|
|
29782
|
+
var IFrame = forwardRef10(IFrameRefForwarding);
|
|
29404
29783
|
function exponentialBackoff(errorCount) {
|
|
29405
29784
|
return 1000 * 2 ** (errorCount - 1);
|
|
29406
29785
|
}
|
|
@@ -29410,7 +29789,7 @@ function truncateSrcForLabel(src) {
|
|
|
29410
29789
|
}
|
|
29411
29790
|
return src;
|
|
29412
29791
|
}
|
|
29413
|
-
var
|
|
29792
|
+
var ImgContent = ({
|
|
29414
29793
|
onError,
|
|
29415
29794
|
maxRetries = 2,
|
|
29416
29795
|
src,
|
|
@@ -29419,21 +29798,13 @@ var ImgInner = ({
|
|
|
29419
29798
|
delayRenderTimeoutInMilliseconds,
|
|
29420
29799
|
onImageFrame,
|
|
29421
29800
|
crossOrigin,
|
|
29422
|
-
showInTimeline,
|
|
29423
|
-
name,
|
|
29424
|
-
stack,
|
|
29425
29801
|
ref,
|
|
29426
|
-
_experimentalControls: controls,
|
|
29427
29802
|
...props2
|
|
29428
29803
|
}) => {
|
|
29429
29804
|
const imageRef = useRef20(null);
|
|
29430
29805
|
const errors = useRef20({});
|
|
29431
29806
|
const { delayPlayback } = useBufferState();
|
|
29432
|
-
const sequenceContext =
|
|
29433
|
-
const [timelineId] = useState18(() => String(Math.random()));
|
|
29434
|
-
if (!src) {
|
|
29435
|
-
throw new Error('No "src" prop was passed to <Img>.');
|
|
29436
|
-
}
|
|
29807
|
+
const sequenceContext = useContext32(SequenceContext);
|
|
29437
29808
|
const _propsValid = true;
|
|
29438
29809
|
if (!_propsValid) {
|
|
29439
29810
|
throw new Error("typecheck error");
|
|
@@ -29441,19 +29812,8 @@ var ImgInner = ({
|
|
|
29441
29812
|
useImperativeHandle6(ref, () => {
|
|
29442
29813
|
return imageRef.current;
|
|
29443
29814
|
}, []);
|
|
29444
|
-
useImageInTimeline({
|
|
29445
|
-
src,
|
|
29446
|
-
displayName: name ?? null,
|
|
29447
|
-
id: timelineId,
|
|
29448
|
-
stack: stack ?? null,
|
|
29449
|
-
showInTimeline: showInTimeline ?? true,
|
|
29450
|
-
premountDisplay: sequenceContext?.premountDisplay ?? null,
|
|
29451
|
-
postmountDisplay: sequenceContext?.postmountDisplay ?? null,
|
|
29452
|
-
loopDisplay: undefined,
|
|
29453
|
-
controls: controls ?? null
|
|
29454
|
-
});
|
|
29455
29815
|
const actualSrc = usePreload(src);
|
|
29456
|
-
const retryIn =
|
|
29816
|
+
const retryIn = useCallback16((timeout) => {
|
|
29457
29817
|
if (!imageRef.current) {
|
|
29458
29818
|
return;
|
|
29459
29819
|
}
|
|
@@ -29471,7 +29831,7 @@ var ImgInner = ({
|
|
|
29471
29831
|
}, timeout);
|
|
29472
29832
|
}, []);
|
|
29473
29833
|
const { delayRender: delayRender2, continueRender: continueRender2, cancelRender: cancelRender2 } = useDelayRender();
|
|
29474
|
-
const didGetError =
|
|
29834
|
+
const didGetError = useCallback16((e) => {
|
|
29475
29835
|
if (!errors.current) {
|
|
29476
29836
|
return;
|
|
29477
29837
|
}
|
|
@@ -29573,7 +29933,44 @@ var ImgInner = ({
|
|
|
29573
29933
|
decoding: "sync"
|
|
29574
29934
|
});
|
|
29575
29935
|
};
|
|
29576
|
-
var
|
|
29936
|
+
var ImgInner = ({
|
|
29937
|
+
hidden,
|
|
29938
|
+
name,
|
|
29939
|
+
stack,
|
|
29940
|
+
showInTimeline,
|
|
29941
|
+
src,
|
|
29942
|
+
_experimentalControls: controls,
|
|
29943
|
+
...props2
|
|
29944
|
+
}) => {
|
|
29945
|
+
const sequenceContext = useContext32(SequenceContext);
|
|
29946
|
+
const [timelineId] = useState18(() => String(Math.random()));
|
|
29947
|
+
if (!src) {
|
|
29948
|
+
throw new Error('No "src" prop was passed to <Img>.');
|
|
29949
|
+
}
|
|
29950
|
+
useImageInTimeline({
|
|
29951
|
+
src,
|
|
29952
|
+
displayName: name ?? null,
|
|
29953
|
+
id: timelineId,
|
|
29954
|
+
stack: stack ?? null,
|
|
29955
|
+
showInTimeline: showInTimeline ?? true,
|
|
29956
|
+
premountDisplay: sequenceContext?.premountDisplay ?? null,
|
|
29957
|
+
postmountDisplay: sequenceContext?.postmountDisplay ?? null,
|
|
29958
|
+
loopDisplay: undefined,
|
|
29959
|
+
controls: controls ?? null
|
|
29960
|
+
});
|
|
29961
|
+
if (hidden) {
|
|
29962
|
+
return null;
|
|
29963
|
+
}
|
|
29964
|
+
return /* @__PURE__ */ jsx26(ImgContent, {
|
|
29965
|
+
src,
|
|
29966
|
+
...props2
|
|
29967
|
+
});
|
|
29968
|
+
};
|
|
29969
|
+
var imgSchema = {
|
|
29970
|
+
...sequenceStyleSchema,
|
|
29971
|
+
hidden: hiddenField
|
|
29972
|
+
};
|
|
29973
|
+
var Img = wrapInSchema(ImgInner, imgSchema);
|
|
29577
29974
|
addSequenceStackTraces(Img);
|
|
29578
29975
|
var compositionsRef = React28.createRef();
|
|
29579
29976
|
var CompositionManagerProvider = ({
|
|
@@ -29587,14 +29984,14 @@ var CompositionManagerProvider = ({
|
|
|
29587
29984
|
const [canvasContent, setCanvasContent] = useState19(initialCanvasContent);
|
|
29588
29985
|
const [compositions, setCompositions] = useState19(initialCompositions);
|
|
29589
29986
|
const currentcompositionsRef = useRef21(compositions);
|
|
29590
|
-
const updateCompositions =
|
|
29987
|
+
const updateCompositions = useCallback17((updateComps) => {
|
|
29591
29988
|
setCompositions((comps) => {
|
|
29592
29989
|
const updated = updateComps(comps);
|
|
29593
29990
|
currentcompositionsRef.current = updated;
|
|
29594
29991
|
return updated;
|
|
29595
29992
|
});
|
|
29596
29993
|
}, []);
|
|
29597
|
-
const registerComposition =
|
|
29994
|
+
const registerComposition = useCallback17((comp) => {
|
|
29598
29995
|
updateCompositions((comps) => {
|
|
29599
29996
|
if (comps.find((c2) => c2.id === comp.id)) {
|
|
29600
29997
|
throw new Error(`Multiple composition with id ${comp.id} are registered.`);
|
|
@@ -29602,12 +29999,12 @@ var CompositionManagerProvider = ({
|
|
|
29602
29999
|
return [...comps, comp];
|
|
29603
30000
|
});
|
|
29604
30001
|
}, [updateCompositions]);
|
|
29605
|
-
const unregisterComposition =
|
|
30002
|
+
const unregisterComposition = useCallback17((id) => {
|
|
29606
30003
|
setCompositions((comps) => {
|
|
29607
30004
|
return comps.filter((c2) => c2.id !== id);
|
|
29608
30005
|
});
|
|
29609
30006
|
}, []);
|
|
29610
|
-
const registerFolder =
|
|
30007
|
+
const registerFolder = useCallback17((name, parent, nonce) => {
|
|
29611
30008
|
setFolders((prevFolders) => {
|
|
29612
30009
|
return [
|
|
29613
30010
|
...prevFolders,
|
|
@@ -29619,7 +30016,7 @@ var CompositionManagerProvider = ({
|
|
|
29619
30016
|
];
|
|
29620
30017
|
});
|
|
29621
30018
|
}, []);
|
|
29622
|
-
const unregisterFolder =
|
|
30019
|
+
const unregisterFolder = useCallback17((name, parent) => {
|
|
29623
30020
|
setFolders((prevFolders) => {
|
|
29624
30021
|
return prevFolders.filter((p) => !(p.name === name && p.parent === parent));
|
|
29625
30022
|
});
|
|
@@ -29719,16 +30116,31 @@ var makeDefaultPreviewCSS = (scope, backgroundColor) => {
|
|
|
29719
30116
|
}
|
|
29720
30117
|
`;
|
|
29721
30118
|
};
|
|
29722
|
-
var
|
|
29723
|
-
|
|
29724
|
-
|
|
29725
|
-
|
|
30119
|
+
var disabledEffectField = {
|
|
30120
|
+
type: "boolean",
|
|
30121
|
+
default: false,
|
|
30122
|
+
description: "Disabled"
|
|
30123
|
+
};
|
|
30124
|
+
var createEffect = (definition) => {
|
|
30125
|
+
const userCalculateKey = definition.calculateKey;
|
|
30126
|
+
const widened = {
|
|
30127
|
+
...definition,
|
|
30128
|
+
calculateKey: (params) => {
|
|
30129
|
+
const disabled = params.disabled ?? false;
|
|
30130
|
+
return `${userCalculateKey(params)}-disabled-${disabled}`;
|
|
30131
|
+
},
|
|
30132
|
+
schema: {
|
|
30133
|
+
disabled: disabledEffectField,
|
|
30134
|
+
...definition.schema
|
|
30135
|
+
}
|
|
30136
|
+
};
|
|
30137
|
+
const factory = (params = {}) => ({
|
|
29726
30138
|
definition: widened,
|
|
29727
30139
|
params,
|
|
29728
|
-
stack: new Error().stack,
|
|
29729
30140
|
effectKey: widened.calculateKey(params),
|
|
29730
30141
|
memoized: false
|
|
29731
|
-
};
|
|
30142
|
+
});
|
|
30143
|
+
return factory;
|
|
29732
30144
|
};
|
|
29733
30145
|
var REMOTION_STUDIO_CONTAINER_ELEMENT = "__remotion-studio-container";
|
|
29734
30146
|
var getPreviewDomElement = () => {
|
|
@@ -29754,7 +30166,7 @@ var waitForRoot = (fn) => {
|
|
|
29754
30166
|
};
|
|
29755
30167
|
var MediaEnabledContext = createContext23(null);
|
|
29756
30168
|
var useVideoEnabled = () => {
|
|
29757
|
-
const context =
|
|
30169
|
+
const context = useContext33(MediaEnabledContext);
|
|
29758
30170
|
if (!context) {
|
|
29759
30171
|
return window.remotion_videoEnabled;
|
|
29760
30172
|
}
|
|
@@ -29764,7 +30176,7 @@ var useVideoEnabled = () => {
|
|
|
29764
30176
|
return context.videoEnabled;
|
|
29765
30177
|
};
|
|
29766
30178
|
var useAudioEnabled = () => {
|
|
29767
|
-
const context =
|
|
30179
|
+
const context = useContext33(MediaEnabledContext);
|
|
29768
30180
|
if (!context) {
|
|
29769
30181
|
return window.remotion_audioEnabled;
|
|
29770
30182
|
}
|
|
@@ -30080,15 +30492,16 @@ var OffthreadVideoForRendering = ({
|
|
|
30080
30492
|
onVideoFrame,
|
|
30081
30493
|
crossOrigin,
|
|
30082
30494
|
audioStreamIndex,
|
|
30495
|
+
preservePitch: _preservePitch,
|
|
30083
30496
|
...props2
|
|
30084
30497
|
}) => {
|
|
30085
30498
|
const absoluteFrame = useTimelinePosition();
|
|
30086
30499
|
const frame = useCurrentFrame();
|
|
30087
30500
|
const volumePropsFrame = useFrameForVolumeProp(loopVolumeCurveBehavior);
|
|
30088
30501
|
const videoConfig = useUnsafeVideoConfig();
|
|
30089
|
-
const sequenceContext =
|
|
30502
|
+
const sequenceContext = useContext34(SequenceContext);
|
|
30090
30503
|
const mediaStartsAt = useMediaStartsAt();
|
|
30091
|
-
const { registerRenderAsset, unregisterRenderAsset } =
|
|
30504
|
+
const { registerRenderAsset, unregisterRenderAsset } = useContext34(RenderAssetManager);
|
|
30092
30505
|
if (!src) {
|
|
30093
30506
|
throw new TypeError("No `src` was passed to <OffthreadVideo>.");
|
|
30094
30507
|
}
|
|
@@ -30235,7 +30648,7 @@ var OffthreadVideoForRendering = ({
|
|
|
30235
30648
|
continueRender2,
|
|
30236
30649
|
delayRender2
|
|
30237
30650
|
]);
|
|
30238
|
-
const onErr =
|
|
30651
|
+
const onErr = useCallback18(() => {
|
|
30239
30652
|
if (onError) {
|
|
30240
30653
|
onError?.(new Error("Failed to load image with src " + imageSrc));
|
|
30241
30654
|
} else {
|
|
@@ -30245,7 +30658,7 @@ var OffthreadVideoForRendering = ({
|
|
|
30245
30658
|
const className = useMemo33(() => {
|
|
30246
30659
|
return [OBJECTFIT_CONTAIN_CLASS_NAME, props2.className].filter(truthy2).join(" ");
|
|
30247
30660
|
}, [props2.className]);
|
|
30248
|
-
const onImageFrame =
|
|
30661
|
+
const onImageFrame = useCallback18((img) => {
|
|
30249
30662
|
if (onVideoFrame) {
|
|
30250
30663
|
onVideoFrame(img);
|
|
30251
30664
|
}
|
|
@@ -30300,7 +30713,7 @@ class MediaPlaybackError extends Error {
|
|
|
30300
30713
|
}
|
|
30301
30714
|
}
|
|
30302
30715
|
var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
30303
|
-
const context =
|
|
30716
|
+
const context = useContext35(SharedAudioContext);
|
|
30304
30717
|
if (!context) {
|
|
30305
30718
|
throw new Error("SharedAudioContext not found");
|
|
30306
30719
|
}
|
|
@@ -30326,6 +30739,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
|
30326
30739
|
volume,
|
|
30327
30740
|
muted,
|
|
30328
30741
|
playbackRate,
|
|
30742
|
+
preservePitch,
|
|
30329
30743
|
onlyWarnForMediaSeekingError,
|
|
30330
30744
|
src,
|
|
30331
30745
|
onDuration,
|
|
@@ -30356,12 +30770,10 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
|
30356
30770
|
}
|
|
30357
30771
|
const volumePropFrame = useFrameForVolumeProp(loopVolumeCurveBehavior ?? "repeat");
|
|
30358
30772
|
const { fps, durationInFrames } = useVideoConfig();
|
|
30359
|
-
const parentSequence =
|
|
30360
|
-
const { hidden } = useContext34(SequenceVisibilityToggleContext);
|
|
30773
|
+
const parentSequence = useContext35(SequenceContext);
|
|
30361
30774
|
const logLevel = useLogLevel();
|
|
30362
30775
|
const mountTime = useMountTime();
|
|
30363
30776
|
const [timelineId] = useState21(() => String(Math.random()));
|
|
30364
|
-
const isSequenceHidden = hidden[timelineId] ?? false;
|
|
30365
30777
|
if (typeof acceptableTimeShift !== "undefined") {
|
|
30366
30778
|
throw new Error("acceptableTimeShift has been removed. Use acceptableTimeShiftInSeconds instead.");
|
|
30367
30779
|
}
|
|
@@ -30392,6 +30804,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
|
30392
30804
|
src,
|
|
30393
30805
|
mediaType: "video",
|
|
30394
30806
|
playbackRate: props2.playbackRate ?? 1,
|
|
30807
|
+
preservePitch,
|
|
30395
30808
|
onlyWarnForMediaSeekingError,
|
|
30396
30809
|
acceptableTimeshift: acceptableTimeShiftInSeconds ?? null,
|
|
30397
30810
|
isPremounting: Boolean(parentSequence?.premounting),
|
|
@@ -30505,10 +30918,9 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
|
30505
30918
|
}, []);
|
|
30506
30919
|
const actualStyle = useMemo34(() => {
|
|
30507
30920
|
return {
|
|
30508
|
-
...style
|
|
30509
|
-
opacity: isSequenceHidden ? 0 : style?.opacity ?? 1
|
|
30921
|
+
...style
|
|
30510
30922
|
};
|
|
30511
|
-
}, [
|
|
30923
|
+
}, [style]);
|
|
30512
30924
|
const crossOriginValue = getCrossOriginValue({
|
|
30513
30925
|
crossOrigin,
|
|
30514
30926
|
requestsVideoFrame: Boolean(onVideoFrame),
|
|
@@ -30516,7 +30928,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
|
30516
30928
|
});
|
|
30517
30929
|
return /* @__PURE__ */ jsx31("video", {
|
|
30518
30930
|
ref: videoRef,
|
|
30519
|
-
muted: muted || mediaMuted ||
|
|
30931
|
+
muted: muted || mediaMuted || userPreferredVolume <= 0,
|
|
30520
30932
|
playsInline: true,
|
|
30521
30933
|
src: actualSrc,
|
|
30522
30934
|
loop: _remotionInternalNativeLoopPassed,
|
|
@@ -30526,7 +30938,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
|
30526
30938
|
...nativeProps
|
|
30527
30939
|
});
|
|
30528
30940
|
};
|
|
30529
|
-
var VideoForPreview =
|
|
30941
|
+
var VideoForPreview = forwardRef11(VideoForDevelopmentRefForwardingFunction);
|
|
30530
30942
|
var InnerOffthreadVideo = (props2) => {
|
|
30531
30943
|
const {
|
|
30532
30944
|
startFrom,
|
|
@@ -30543,7 +30955,7 @@ var InnerOffthreadVideo = (props2) => {
|
|
|
30543
30955
|
if (environment.isClientSideRendering) {
|
|
30544
30956
|
throw new Error("<OffthreadVideo> is not supported in @remotion/web-renderer. Use <Video> from @remotion/media instead. See https://remotion.dev/docs/client-side-rendering/limitations");
|
|
30545
30957
|
}
|
|
30546
|
-
const onDuration =
|
|
30958
|
+
const onDuration = useCallback19(() => {
|
|
30547
30959
|
return;
|
|
30548
30960
|
}, []);
|
|
30549
30961
|
if (typeof props2.src !== "string") {
|
|
@@ -30631,6 +31043,7 @@ var OffthreadVideo = ({
|
|
|
30631
31043
|
onVideoFrame,
|
|
30632
31044
|
pauseWhenBuffering,
|
|
30633
31045
|
playbackRate,
|
|
31046
|
+
preservePitch,
|
|
30634
31047
|
showInTimeline,
|
|
30635
31048
|
style,
|
|
30636
31049
|
toneFrequency,
|
|
@@ -30666,6 +31079,7 @@ var OffthreadVideo = ({
|
|
|
30666
31079
|
onVideoFrame,
|
|
30667
31080
|
pauseWhenBuffering: pauseWhenBuffering ?? true,
|
|
30668
31081
|
playbackRate: playbackRate ?? 1,
|
|
31082
|
+
preservePitch,
|
|
30669
31083
|
toneFrequency: toneFrequency ?? 1,
|
|
30670
31084
|
showInTimeline: showInTimeline ?? true,
|
|
30671
31085
|
src,
|
|
@@ -30786,7 +31200,6 @@ var Internals = {
|
|
|
30786
31200
|
VisualModeSettersContext,
|
|
30787
31201
|
SequenceManager,
|
|
30788
31202
|
SequenceStackTracesUpdateContext,
|
|
30789
|
-
SequenceVisibilityToggleContext,
|
|
30790
31203
|
wrapInSchema,
|
|
30791
31204
|
sequenceSchema,
|
|
30792
31205
|
sequenceStyleSchema,
|
|
@@ -30882,13 +31295,16 @@ var Internals = {
|
|
|
30882
31295
|
useEffectChainState,
|
|
30883
31296
|
runEffectChain,
|
|
30884
31297
|
useMemoizedEffects,
|
|
30885
|
-
|
|
30886
|
-
|
|
31298
|
+
useMemoizedEffectDefinitions,
|
|
31299
|
+
createEffect,
|
|
30887
31300
|
computeEffectiveSchemaValuesDotNotation,
|
|
30888
31301
|
OverrideIdsToNodePathsGettersContext,
|
|
30889
31302
|
OverrideIdsToNodePathsSettersContext,
|
|
30890
31303
|
findPropsToDelete,
|
|
30891
|
-
|
|
31304
|
+
makeSequencePropsSubscriptionKey,
|
|
31305
|
+
getCodeValuesCtx,
|
|
31306
|
+
getEffectCodeValuesCtx,
|
|
31307
|
+
hiddenField
|
|
30892
31308
|
};
|
|
30893
31309
|
var NUMBER = "[-+]?\\d*\\.?\\d+";
|
|
30894
31310
|
var PERCENTAGE = NUMBER + "%";
|
|
@@ -30951,7 +31367,7 @@ var SeriesSequenceRefForwardingFunction = ({ children }, _ref) => {
|
|
|
30951
31367
|
children
|
|
30952
31368
|
});
|
|
30953
31369
|
};
|
|
30954
|
-
var SeriesSequence =
|
|
31370
|
+
var SeriesSequence = forwardRef12(SeriesSequenceRefForwardingFunction);
|
|
30955
31371
|
var SeriesInner = (props2) => {
|
|
30956
31372
|
const childrenValue = useMemo36(() => {
|
|
30957
31373
|
let startFrame = 0;
|
|
@@ -31476,6 +31892,7 @@ var VideoForRenderingForwardFunction = ({
|
|
|
31476
31892
|
loopVolumeCurveBehavior,
|
|
31477
31893
|
audioStreamIndex,
|
|
31478
31894
|
onVideoFrame,
|
|
31895
|
+
preservePitch: _preservePitch,
|
|
31479
31896
|
...props2
|
|
31480
31897
|
}, ref) => {
|
|
31481
31898
|
const absoluteFrame = useTimelinePosition();
|
|
@@ -31483,13 +31900,13 @@ var VideoForRenderingForwardFunction = ({
|
|
|
31483
31900
|
const volumePropsFrame = useFrameForVolumeProp(loopVolumeCurveBehavior ?? "repeat");
|
|
31484
31901
|
const videoConfig = useUnsafeVideoConfig();
|
|
31485
31902
|
const videoRef = useRef23(null);
|
|
31486
|
-
const sequenceContext =
|
|
31903
|
+
const sequenceContext = useContext36(SequenceContext);
|
|
31487
31904
|
const mediaStartsAt = useMediaStartsAt();
|
|
31488
31905
|
const environment = useRemotionEnvironment();
|
|
31489
31906
|
const logLevel = useLogLevel();
|
|
31490
31907
|
const mountTime = useMountTime();
|
|
31491
31908
|
const { delayRender: delayRender2, continueRender: continueRender2 } = useDelayRender();
|
|
31492
|
-
const { registerRenderAsset, unregisterRenderAsset } =
|
|
31909
|
+
const { registerRenderAsset, unregisterRenderAsset } = useContext36(RenderAssetManager);
|
|
31493
31910
|
const id = useMemo37(() => `video-${random(props2.src ?? "")}-${sequenceContext?.cumulatedFrom}-${sequenceContext?.relativeFrom}-${sequenceContext?.durationInFrames}`, [
|
|
31494
31911
|
props2.src,
|
|
31495
31912
|
sequenceContext?.cumulatedFrom,
|
|
@@ -31678,7 +32095,7 @@ var VideoForRenderingForwardFunction = ({
|
|
|
31678
32095
|
...props2
|
|
31679
32096
|
});
|
|
31680
32097
|
};
|
|
31681
|
-
var VideoForRendering =
|
|
32098
|
+
var VideoForRendering = forwardRef13(VideoForRenderingForwardFunction);
|
|
31682
32099
|
var VideoForwardingFunction = (props2, ref) => {
|
|
31683
32100
|
const {
|
|
31684
32101
|
startFrom,
|
|
@@ -31699,7 +32116,7 @@ var VideoForwardingFunction = (props2, ref) => {
|
|
|
31699
32116
|
if (environment.isClientSideRendering) {
|
|
31700
32117
|
throw new Error("<Html5Video> is not supported in @remotion/web-renderer. Use <Video> from @remotion/media instead. See https://remotion.dev/docs/client-side-rendering/limitations");
|
|
31701
32118
|
}
|
|
31702
|
-
const { durations, setDurations } =
|
|
32119
|
+
const { durations, setDurations } = useContext37(DurationsContext);
|
|
31703
32120
|
if (typeof ref === "string") {
|
|
31704
32121
|
throw new Error("string refs are not supported");
|
|
31705
32122
|
}
|
|
@@ -31707,10 +32124,10 @@ var VideoForwardingFunction = (props2, ref) => {
|
|
|
31707
32124
|
throw new TypeError(`The \`<Html5Video>\` tag requires a string for \`src\`, but got ${JSON.stringify(props2.src)} instead.`);
|
|
31708
32125
|
}
|
|
31709
32126
|
const preloadedSrc = usePreload(props2.src);
|
|
31710
|
-
const onDuration =
|
|
32127
|
+
const onDuration = useCallback20((src, durationInSeconds) => {
|
|
31711
32128
|
setDurations({ type: "got-duration", durationInSeconds, src });
|
|
31712
32129
|
}, [setDurations]);
|
|
31713
|
-
const onVideoFrame =
|
|
32130
|
+
const onVideoFrame = useCallback20(() => {}, []);
|
|
31714
32131
|
const durationFetched = durations[getAbsoluteSrc(preloadedSrc)] ?? durations[getAbsoluteSrc(props2.src)];
|
|
31715
32132
|
validateMediaTrimProps({ startFrom, endAt, trimBefore, trimAfter });
|
|
31716
32133
|
const { trimBeforeValue, trimAfterValue } = resolveTrimProps({
|
|
@@ -31762,7 +32179,11 @@ var VideoForwardingFunction = (props2, ref) => {
|
|
|
31762
32179
|
})
|
|
31763
32180
|
});
|
|
31764
32181
|
}
|
|
31765
|
-
validateMediaProps({
|
|
32182
|
+
validateMediaProps({
|
|
32183
|
+
playbackRate: props2.playbackRate,
|
|
32184
|
+
preservePitch: props2.preservePitch,
|
|
32185
|
+
volume: props2.volume
|
|
32186
|
+
}, "Html5Video");
|
|
31766
32187
|
if (environment.isRendering) {
|
|
31767
32188
|
return /* @__PURE__ */ jsx37(VideoForRendering, {
|
|
31768
32189
|
onDuration,
|
|
@@ -31784,7 +32205,7 @@ var VideoForwardingFunction = (props2, ref) => {
|
|
|
31784
32205
|
onAutoPlayError: onAutoPlayError ?? undefined
|
|
31785
32206
|
});
|
|
31786
32207
|
};
|
|
31787
|
-
var Html5Video =
|
|
32208
|
+
var Html5Video = forwardRef14(VideoForwardingFunction);
|
|
31788
32209
|
addSequenceStackTraces(Html5Video);
|
|
31789
32210
|
checkMultipleRemotionVersions();
|
|
31790
32211
|
var proxyObj = {};
|
|
@@ -31828,7 +32249,7 @@ import { jsx as jsx113 } from "react/jsx-runtime";
|
|
|
31828
32249
|
import { jsx as jsx122 } from "react/jsx-runtime";
|
|
31829
32250
|
import * as React362 from "react";
|
|
31830
32251
|
import * as ReactDOM4 from "react-dom";
|
|
31831
|
-
import
|
|
32252
|
+
import React112 from "react";
|
|
31832
32253
|
import * as React8 from "react";
|
|
31833
32254
|
import { jsx as jsx132 } from "react/jsx-runtime";
|
|
31834
32255
|
import * as React9 from "react";
|
|
@@ -31838,7 +32259,7 @@ import { jsx as jsx152 } from "react/jsx-runtime";
|
|
|
31838
32259
|
import * as React122 from "react";
|
|
31839
32260
|
import { jsx as jsx162 } from "react/jsx-runtime";
|
|
31840
32261
|
import * as React16 from "react";
|
|
31841
|
-
import * as
|
|
32262
|
+
import * as React13 from "react";
|
|
31842
32263
|
import * as ReactDOM from "react-dom";
|
|
31843
32264
|
import { jsx as jsx172 } from "react/jsx-runtime";
|
|
31844
32265
|
import * as React14 from "react";
|
|
@@ -31866,8 +32287,8 @@ import * as React282 from "react";
|
|
|
31866
32287
|
import { jsx as jsx232 } from "react/jsx-runtime";
|
|
31867
32288
|
import * as React35 from "react";
|
|
31868
32289
|
import * as React312 from "react";
|
|
31869
|
-
import { useState as useState112 } from "react";
|
|
31870
32290
|
import * as React292 from "react";
|
|
32291
|
+
import { useState as useState112 } from "react";
|
|
31871
32292
|
import * as React30 from "react";
|
|
31872
32293
|
import * as React342 from "react";
|
|
31873
32294
|
import * as React332 from "react";
|
|
@@ -32810,13 +33231,13 @@ function createCollection(name) {
|
|
|
32810
33231
|
const [CollectionProviderImpl, useCollectionContext] = createCollectionContext(PROVIDER_NAME, { collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map });
|
|
32811
33232
|
const CollectionProvider = (props) => {
|
|
32812
33233
|
const { scope, children } = props;
|
|
32813
|
-
const ref =
|
|
32814
|
-
const itemMap =
|
|
33234
|
+
const ref = React112.useRef(null);
|
|
33235
|
+
const itemMap = React112.useRef(/* @__PURE__ */ new Map).current;
|
|
32815
33236
|
return /* @__PURE__ */ jsx152(CollectionProviderImpl, { scope, itemMap, collectionRef: ref, children });
|
|
32816
33237
|
};
|
|
32817
33238
|
CollectionProvider.displayName = PROVIDER_NAME;
|
|
32818
33239
|
const COLLECTION_SLOT_NAME = name + "CollectionSlot";
|
|
32819
|
-
const CollectionSlot =
|
|
33240
|
+
const CollectionSlot = React112.forwardRef((props, forwardedRef) => {
|
|
32820
33241
|
const { scope, children } = props;
|
|
32821
33242
|
const context = useCollectionContext(COLLECTION_SLOT_NAME, scope);
|
|
32822
33243
|
const composedRefs = useComposedRefs2(forwardedRef, context.collectionRef);
|
|
@@ -32825,12 +33246,12 @@ function createCollection(name) {
|
|
|
32825
33246
|
CollectionSlot.displayName = COLLECTION_SLOT_NAME;
|
|
32826
33247
|
const ITEM_SLOT_NAME = name + "CollectionItemSlot";
|
|
32827
33248
|
const ITEM_DATA_ATTR = "data-radix-collection-item";
|
|
32828
|
-
const CollectionItemSlot =
|
|
33249
|
+
const CollectionItemSlot = React112.forwardRef((props, forwardedRef) => {
|
|
32829
33250
|
const { scope, children, ...itemData } = props;
|
|
32830
|
-
const ref =
|
|
33251
|
+
const ref = React112.useRef(null);
|
|
32831
33252
|
const composedRefs = useComposedRefs2(forwardedRef, ref);
|
|
32832
33253
|
const context = useCollectionContext(ITEM_SLOT_NAME, scope);
|
|
32833
|
-
|
|
33254
|
+
React112.useEffect(() => {
|
|
32834
33255
|
context.itemMap.set(ref, { ref, ...itemData });
|
|
32835
33256
|
return () => void context.itemMap.delete(ref);
|
|
32836
33257
|
});
|
|
@@ -32839,7 +33260,7 @@ function createCollection(name) {
|
|
|
32839
33260
|
CollectionItemSlot.displayName = ITEM_SLOT_NAME;
|
|
32840
33261
|
function useCollection(scope) {
|
|
32841
33262
|
const context = useCollectionContext(name + "CollectionConsumer", scope);
|
|
32842
|
-
const getItems =
|
|
33263
|
+
const getItems = React112.useCallback(() => {
|
|
32843
33264
|
const collectionNode = context.collectionRef.current;
|
|
32844
33265
|
if (!collectionNode)
|
|
32845
33266
|
return [];
|
|
@@ -32880,7 +33301,7 @@ var NODES = [
|
|
|
32880
33301
|
"ul"
|
|
32881
33302
|
];
|
|
32882
33303
|
var Primitive = NODES.reduce((primitive, node) => {
|
|
32883
|
-
const Node2 =
|
|
33304
|
+
const Node2 = React13.forwardRef((props, forwardedRef) => {
|
|
32884
33305
|
const { asChild, ...primitiveProps } = props;
|
|
32885
33306
|
const Comp = asChild ? Slot2 : node;
|
|
32886
33307
|
if (typeof window !== "undefined") {
|
|
@@ -35622,7 +36043,7 @@ var hideOthers = function(originalTarget, parentNode, markerName) {
|
|
|
35622
36043
|
return applyAttributeToOthers(targets, activeParentNode, markerName, "aria-hidden");
|
|
35623
36044
|
};
|
|
35624
36045
|
var __assign = function() {
|
|
35625
|
-
__assign = Object.assign || function
|
|
36046
|
+
__assign = Object.assign || function __assign2(t) {
|
|
35626
36047
|
for (var s, i = 1, n = arguments.length;i < n; i++) {
|
|
35627
36048
|
s = arguments[i];
|
|
35628
36049
|
for (var p in s)
|
|
@@ -37409,17 +37830,17 @@ function createContextScope2(scopeName, createContextScopeDeps = []) {
|
|
|
37409
37830
|
let defaultContexts = [];
|
|
37410
37831
|
function createContext32(rootComponentName, defaultContext) {
|
|
37411
37832
|
const BaseContext = React382.createContext(defaultContext);
|
|
37412
|
-
const
|
|
37833
|
+
const index3 = defaultContexts.length;
|
|
37413
37834
|
defaultContexts = [...defaultContexts, defaultContext];
|
|
37414
37835
|
const Provider = (props) => {
|
|
37415
37836
|
const { scope, children, ...context } = props;
|
|
37416
|
-
const Context = scope?.[scopeName]?.[
|
|
37837
|
+
const Context = scope?.[scopeName]?.[index3] || BaseContext;
|
|
37417
37838
|
const value = React382.useMemo(() => context, Object.values(context));
|
|
37418
37839
|
return /* @__PURE__ */ jsx272(Context.Provider, { value, children });
|
|
37419
37840
|
};
|
|
37420
37841
|
Provider.displayName = rootComponentName + "Provider";
|
|
37421
37842
|
function useContext222(consumerName, scope) {
|
|
37422
|
-
const Context = scope?.[scopeName]?.[
|
|
37843
|
+
const Context = scope?.[scopeName]?.[index3] || BaseContext;
|
|
37423
37844
|
const context = React382.useContext(Context);
|
|
37424
37845
|
if (context)
|
|
37425
37846
|
return context;
|
|
@@ -37616,10 +38037,10 @@ var OrderedDict = class _OrderedDict extends Map {
|
|
|
37616
38037
|
super.set(key, value);
|
|
37617
38038
|
return this;
|
|
37618
38039
|
}
|
|
37619
|
-
insert(
|
|
38040
|
+
insert(index3, key, value) {
|
|
37620
38041
|
const has = this.has(key);
|
|
37621
38042
|
const length2 = this.#keys.length;
|
|
37622
|
-
const relativeIndex = toSafeInteger(
|
|
38043
|
+
const relativeIndex = toSafeInteger(index3);
|
|
37623
38044
|
let actualIndex = relativeIndex >= 0 ? relativeIndex : length2 + relativeIndex;
|
|
37624
38045
|
const safeIndex = actualIndex < 0 || actualIndex >= length2 ? -1 : actualIndex;
|
|
37625
38046
|
if (safeIndex === this.size || has && safeIndex === this.size - 1 || safeIndex === -1) {
|
|
@@ -37657,39 +38078,39 @@ var OrderedDict = class _OrderedDict extends Map {
|
|
|
37657
38078
|
}
|
|
37658
38079
|
return this;
|
|
37659
38080
|
}
|
|
37660
|
-
with(
|
|
38081
|
+
with(index3, key, value) {
|
|
37661
38082
|
const copy = new _OrderedDict(this);
|
|
37662
|
-
copy.insert(
|
|
38083
|
+
copy.insert(index3, key, value);
|
|
37663
38084
|
return copy;
|
|
37664
38085
|
}
|
|
37665
38086
|
before(key) {
|
|
37666
|
-
const
|
|
37667
|
-
if (
|
|
38087
|
+
const index3 = this.#keys.indexOf(key) - 1;
|
|
38088
|
+
if (index3 < 0) {
|
|
37668
38089
|
return;
|
|
37669
38090
|
}
|
|
37670
|
-
return this.entryAt(
|
|
38091
|
+
return this.entryAt(index3);
|
|
37671
38092
|
}
|
|
37672
38093
|
setBefore(key, newKey, value) {
|
|
37673
|
-
const
|
|
37674
|
-
if (
|
|
38094
|
+
const index3 = this.#keys.indexOf(key);
|
|
38095
|
+
if (index3 === -1) {
|
|
37675
38096
|
return this;
|
|
37676
38097
|
}
|
|
37677
|
-
return this.insert(
|
|
38098
|
+
return this.insert(index3, newKey, value);
|
|
37678
38099
|
}
|
|
37679
38100
|
after(key) {
|
|
37680
|
-
let
|
|
37681
|
-
|
|
37682
|
-
if (
|
|
38101
|
+
let index3 = this.#keys.indexOf(key);
|
|
38102
|
+
index3 = index3 === -1 || index3 === this.size - 1 ? -1 : index3 + 1;
|
|
38103
|
+
if (index3 === -1) {
|
|
37683
38104
|
return;
|
|
37684
38105
|
}
|
|
37685
|
-
return this.entryAt(
|
|
38106
|
+
return this.entryAt(index3);
|
|
37686
38107
|
}
|
|
37687
38108
|
setAfter(key, newKey, value) {
|
|
37688
|
-
const
|
|
37689
|
-
if (
|
|
38109
|
+
const index3 = this.#keys.indexOf(key);
|
|
38110
|
+
if (index3 === -1) {
|
|
37690
38111
|
return this;
|
|
37691
38112
|
}
|
|
37692
|
-
return this.insert(
|
|
38113
|
+
return this.insert(index3 + 1, newKey, value);
|
|
37693
38114
|
}
|
|
37694
38115
|
first() {
|
|
37695
38116
|
return this.entryAt(0);
|
|
@@ -37708,21 +38129,21 @@ var OrderedDict = class _OrderedDict extends Map {
|
|
|
37708
38129
|
}
|
|
37709
38130
|
return deleted;
|
|
37710
38131
|
}
|
|
37711
|
-
deleteAt(
|
|
37712
|
-
const key = this.keyAt(
|
|
38132
|
+
deleteAt(index3) {
|
|
38133
|
+
const key = this.keyAt(index3);
|
|
37713
38134
|
if (key !== undefined) {
|
|
37714
38135
|
return this.delete(key);
|
|
37715
38136
|
}
|
|
37716
38137
|
return false;
|
|
37717
38138
|
}
|
|
37718
|
-
at(
|
|
37719
|
-
const key = at(this.#keys,
|
|
38139
|
+
at(index3) {
|
|
38140
|
+
const key = at(this.#keys, index3);
|
|
37720
38141
|
if (key !== undefined) {
|
|
37721
38142
|
return this.get(key);
|
|
37722
38143
|
}
|
|
37723
38144
|
}
|
|
37724
|
-
entryAt(
|
|
37725
|
-
const key = at(this.#keys,
|
|
38145
|
+
entryAt(index3) {
|
|
38146
|
+
const key = at(this.#keys, index3);
|
|
37726
38147
|
if (key !== undefined) {
|
|
37727
38148
|
return [key, this.get(key)];
|
|
37728
38149
|
}
|
|
@@ -37730,15 +38151,15 @@ var OrderedDict = class _OrderedDict extends Map {
|
|
|
37730
38151
|
indexOf(key) {
|
|
37731
38152
|
return this.#keys.indexOf(key);
|
|
37732
38153
|
}
|
|
37733
|
-
keyAt(
|
|
37734
|
-
return at(this.#keys,
|
|
38154
|
+
keyAt(index3) {
|
|
38155
|
+
return at(this.#keys, index3);
|
|
37735
38156
|
}
|
|
37736
38157
|
from(key, offset4) {
|
|
37737
|
-
const
|
|
37738
|
-
if (
|
|
38158
|
+
const index3 = this.indexOf(key);
|
|
38159
|
+
if (index3 === -1) {
|
|
37739
38160
|
return;
|
|
37740
38161
|
}
|
|
37741
|
-
let dest =
|
|
38162
|
+
let dest = index3 + offset4;
|
|
37742
38163
|
if (dest < 0)
|
|
37743
38164
|
dest = 0;
|
|
37744
38165
|
if (dest >= this.size)
|
|
@@ -37746,11 +38167,11 @@ var OrderedDict = class _OrderedDict extends Map {
|
|
|
37746
38167
|
return this.at(dest);
|
|
37747
38168
|
}
|
|
37748
38169
|
keyFrom(key, offset4) {
|
|
37749
|
-
const
|
|
37750
|
-
if (
|
|
38170
|
+
const index3 = this.indexOf(key);
|
|
38171
|
+
if (index3 === -1) {
|
|
37751
38172
|
return;
|
|
37752
38173
|
}
|
|
37753
|
-
let dest =
|
|
38174
|
+
let dest = index3 + offset4;
|
|
37754
38175
|
if (dest < 0)
|
|
37755
38176
|
dest = 0;
|
|
37756
38177
|
if (dest >= this.size)
|
|
@@ -37758,68 +38179,68 @@ var OrderedDict = class _OrderedDict extends Map {
|
|
|
37758
38179
|
return this.keyAt(dest);
|
|
37759
38180
|
}
|
|
37760
38181
|
find(predicate, thisArg) {
|
|
37761
|
-
let
|
|
38182
|
+
let index3 = 0;
|
|
37762
38183
|
for (const entry of this) {
|
|
37763
|
-
if (Reflect.apply(predicate, thisArg, [entry,
|
|
38184
|
+
if (Reflect.apply(predicate, thisArg, [entry, index3, this])) {
|
|
37764
38185
|
return entry;
|
|
37765
38186
|
}
|
|
37766
|
-
|
|
38187
|
+
index3++;
|
|
37767
38188
|
}
|
|
37768
38189
|
return;
|
|
37769
38190
|
}
|
|
37770
38191
|
findIndex(predicate, thisArg) {
|
|
37771
|
-
let
|
|
38192
|
+
let index3 = 0;
|
|
37772
38193
|
for (const entry of this) {
|
|
37773
|
-
if (Reflect.apply(predicate, thisArg, [entry,
|
|
37774
|
-
return
|
|
38194
|
+
if (Reflect.apply(predicate, thisArg, [entry, index3, this])) {
|
|
38195
|
+
return index3;
|
|
37775
38196
|
}
|
|
37776
|
-
|
|
38197
|
+
index3++;
|
|
37777
38198
|
}
|
|
37778
38199
|
return -1;
|
|
37779
38200
|
}
|
|
37780
38201
|
filter(predicate, thisArg) {
|
|
37781
38202
|
const entries = [];
|
|
37782
|
-
let
|
|
38203
|
+
let index3 = 0;
|
|
37783
38204
|
for (const entry of this) {
|
|
37784
|
-
if (Reflect.apply(predicate, thisArg, [entry,
|
|
38205
|
+
if (Reflect.apply(predicate, thisArg, [entry, index3, this])) {
|
|
37785
38206
|
entries.push(entry);
|
|
37786
38207
|
}
|
|
37787
|
-
|
|
38208
|
+
index3++;
|
|
37788
38209
|
}
|
|
37789
38210
|
return new _OrderedDict(entries);
|
|
37790
38211
|
}
|
|
37791
38212
|
map(callbackfn, thisArg) {
|
|
37792
38213
|
const entries = [];
|
|
37793
|
-
let
|
|
38214
|
+
let index3 = 0;
|
|
37794
38215
|
for (const entry of this) {
|
|
37795
|
-
entries.push([entry[0], Reflect.apply(callbackfn, thisArg, [entry,
|
|
37796
|
-
|
|
38216
|
+
entries.push([entry[0], Reflect.apply(callbackfn, thisArg, [entry, index3, this])]);
|
|
38217
|
+
index3++;
|
|
37797
38218
|
}
|
|
37798
38219
|
return new _OrderedDict(entries);
|
|
37799
38220
|
}
|
|
37800
38221
|
reduce(...args) {
|
|
37801
38222
|
const [callbackfn, initialValue] = args;
|
|
37802
|
-
let
|
|
38223
|
+
let index3 = 0;
|
|
37803
38224
|
let accumulator = initialValue ?? this.at(0);
|
|
37804
38225
|
for (const entry of this) {
|
|
37805
|
-
if (
|
|
38226
|
+
if (index3 === 0 && args.length === 1) {
|
|
37806
38227
|
accumulator = entry;
|
|
37807
38228
|
} else {
|
|
37808
|
-
accumulator = Reflect.apply(callbackfn, this, [accumulator, entry,
|
|
38229
|
+
accumulator = Reflect.apply(callbackfn, this, [accumulator, entry, index3, this]);
|
|
37809
38230
|
}
|
|
37810
|
-
|
|
38231
|
+
index3++;
|
|
37811
38232
|
}
|
|
37812
38233
|
return accumulator;
|
|
37813
38234
|
}
|
|
37814
38235
|
reduceRight(...args) {
|
|
37815
38236
|
const [callbackfn, initialValue] = args;
|
|
37816
38237
|
let accumulator = initialValue ?? this.at(-1);
|
|
37817
|
-
for (let
|
|
37818
|
-
const entry = this.at(
|
|
37819
|
-
if (
|
|
38238
|
+
for (let index3 = this.size - 1;index3 >= 0; index3--) {
|
|
38239
|
+
const entry = this.at(index3);
|
|
38240
|
+
if (index3 === this.size - 1 && args.length === 1) {
|
|
37820
38241
|
accumulator = entry;
|
|
37821
38242
|
} else {
|
|
37822
|
-
accumulator = Reflect.apply(callbackfn, this, [accumulator, entry,
|
|
38243
|
+
accumulator = Reflect.apply(callbackfn, this, [accumulator, entry, index3, this]);
|
|
37823
38244
|
}
|
|
37824
38245
|
}
|
|
37825
38246
|
return accumulator;
|
|
@@ -37830,8 +38251,8 @@ var OrderedDict = class _OrderedDict extends Map {
|
|
|
37830
38251
|
}
|
|
37831
38252
|
toReversed() {
|
|
37832
38253
|
const reversed = new _OrderedDict;
|
|
37833
|
-
for (let
|
|
37834
|
-
const key = this.keyAt(
|
|
38254
|
+
for (let index3 = this.size - 1;index3 >= 0; index3--) {
|
|
38255
|
+
const key = this.keyAt(index3);
|
|
37835
38256
|
const element = this.get(key);
|
|
37836
38257
|
reversed.set(key, element);
|
|
37837
38258
|
}
|
|
@@ -37854,44 +38275,44 @@ var OrderedDict = class _OrderedDict extends Map {
|
|
|
37854
38275
|
if (end !== undefined && end > 0) {
|
|
37855
38276
|
stop = end - 1;
|
|
37856
38277
|
}
|
|
37857
|
-
for (let
|
|
37858
|
-
const key = this.keyAt(
|
|
38278
|
+
for (let index3 = start;index3 <= stop; index3++) {
|
|
38279
|
+
const key = this.keyAt(index3);
|
|
37859
38280
|
const element = this.get(key);
|
|
37860
38281
|
result.set(key, element);
|
|
37861
38282
|
}
|
|
37862
38283
|
return result;
|
|
37863
38284
|
}
|
|
37864
38285
|
every(predicate, thisArg) {
|
|
37865
|
-
let
|
|
38286
|
+
let index3 = 0;
|
|
37866
38287
|
for (const entry of this) {
|
|
37867
|
-
if (!Reflect.apply(predicate, thisArg, [entry,
|
|
38288
|
+
if (!Reflect.apply(predicate, thisArg, [entry, index3, this])) {
|
|
37868
38289
|
return false;
|
|
37869
38290
|
}
|
|
37870
|
-
|
|
38291
|
+
index3++;
|
|
37871
38292
|
}
|
|
37872
38293
|
return true;
|
|
37873
38294
|
}
|
|
37874
38295
|
some(predicate, thisArg) {
|
|
37875
|
-
let
|
|
38296
|
+
let index3 = 0;
|
|
37876
38297
|
for (const entry of this) {
|
|
37877
|
-
if (Reflect.apply(predicate, thisArg, [entry,
|
|
38298
|
+
if (Reflect.apply(predicate, thisArg, [entry, index3, this])) {
|
|
37878
38299
|
return true;
|
|
37879
38300
|
}
|
|
37880
|
-
|
|
38301
|
+
index3++;
|
|
37881
38302
|
}
|
|
37882
38303
|
return false;
|
|
37883
38304
|
}
|
|
37884
38305
|
};
|
|
37885
|
-
function at(array,
|
|
38306
|
+
function at(array, index3) {
|
|
37886
38307
|
if ("at" in Array.prototype) {
|
|
37887
|
-
return Array.prototype.at.call(array,
|
|
38308
|
+
return Array.prototype.at.call(array, index3);
|
|
37888
38309
|
}
|
|
37889
|
-
const actualIndex = toSafeIndex(array,
|
|
38310
|
+
const actualIndex = toSafeIndex(array, index3);
|
|
37890
38311
|
return actualIndex === -1 ? undefined : array[actualIndex];
|
|
37891
38312
|
}
|
|
37892
|
-
function toSafeIndex(array,
|
|
38313
|
+
function toSafeIndex(array, index3) {
|
|
37893
38314
|
const length2 = array.length;
|
|
37894
|
-
const relativeIndex = toSafeInteger(
|
|
38315
|
+
const relativeIndex = toSafeInteger(index3);
|
|
37895
38316
|
const actualIndex = relativeIndex >= 0 ? relativeIndex : length2 + relativeIndex;
|
|
37896
38317
|
return actualIndex < 0 || actualIndex >= length2 ? -1 : actualIndex;
|
|
37897
38318
|
}
|
|
@@ -37943,7 +38364,7 @@ var Primitive2 = NODES2.reduce((primitive, node) => {
|
|
|
37943
38364
|
Node2.displayName = `Primitive.${node}`;
|
|
37944
38365
|
return { ...primitive, [node]: Node2 };
|
|
37945
38366
|
}, {});
|
|
37946
|
-
function
|
|
38367
|
+
function useCallbackRef4(callback) {
|
|
37947
38368
|
const callbackRef = React44.useRef(callback);
|
|
37948
38369
|
React44.useEffect(() => {
|
|
37949
38370
|
callbackRef.current = callback;
|
|
@@ -38047,7 +38468,7 @@ var RovingFocusGroupImpl = React47.forwardRef((props, forwardedRef) => {
|
|
|
38047
38468
|
caller: GROUP_NAME2
|
|
38048
38469
|
});
|
|
38049
38470
|
const [isTabbingBackOut, setIsTabbingBackOut] = React47.useState(false);
|
|
38050
|
-
const handleEntryFocus =
|
|
38471
|
+
const handleEntryFocus = useCallbackRef4(onEntryFocus);
|
|
38051
38472
|
const getItems = useCollection2(__scopeRovingFocusGroup);
|
|
38052
38473
|
const isClickFocusRef = React47.useRef(false);
|
|
38053
38474
|
const [focusableItemsCount, setFocusableItemsCount] = React47.useState(0);
|
|
@@ -38200,7 +38621,7 @@ function focusFirst2(candidates, preventScroll = false) {
|
|
|
38200
38621
|
}
|
|
38201
38622
|
}
|
|
38202
38623
|
function wrapArray2(array, startIndex) {
|
|
38203
|
-
return array.map((_,
|
|
38624
|
+
return array.map((_, index3) => array[(startIndex + index3) % array.length]);
|
|
38204
38625
|
}
|
|
38205
38626
|
var Root3 = RovingFocusGroup;
|
|
38206
38627
|
var Item2 = RovingFocusGroupItem;
|
|
@@ -38515,7 +38936,7 @@ var Triangle2 = (props) => {
|
|
|
38515
38936
|
};
|
|
38516
38937
|
|
|
38517
38938
|
// src/components/prompts/PromptsSubmit.tsx
|
|
38518
|
-
import { useCallback as
|
|
38939
|
+
import { useCallback as useCallback34, useEffect as useEffect47, useRef as useRef45, useState as useState47 } from "react";
|
|
38519
38940
|
|
|
38520
38941
|
// src/components/prompts/config.ts
|
|
38521
38942
|
var REMOTION_PRO_ORIGIN = "https://www.remotion.pro";
|
|
@@ -38543,80 +38964,80 @@ function useMediaContext2() {
|
|
|
38543
38964
|
var AirPlayButtonBridge = createReactComponent(AirPlayButtonInstance, {
|
|
38544
38965
|
domEventsRegex: /^onMedia/
|
|
38545
38966
|
});
|
|
38546
|
-
var AirPlayButton2 = React56.forwardRef(({ children, ...props },
|
|
38967
|
+
var AirPlayButton2 = React56.forwardRef(({ children, ...props }, forwardRef16) => {
|
|
38547
38968
|
return /* @__PURE__ */ React56.createElement(AirPlayButtonBridge, { ...props }, (props2) => /* @__PURE__ */ React56.createElement(Primitive3.button, {
|
|
38548
38969
|
...props2,
|
|
38549
|
-
ref: composeRefs3(props2.ref,
|
|
38970
|
+
ref: composeRefs3(props2.ref, forwardRef16)
|
|
38550
38971
|
}, children));
|
|
38551
38972
|
});
|
|
38552
38973
|
AirPlayButton2.displayName = "AirPlayButton";
|
|
38553
38974
|
var PlayButtonBridge = createReactComponent(PlayButtonInstance, {
|
|
38554
38975
|
domEventsRegex: /^onMedia/
|
|
38555
38976
|
});
|
|
38556
|
-
var PlayButton2 = React56.forwardRef(({ children, ...props },
|
|
38977
|
+
var PlayButton2 = React56.forwardRef(({ children, ...props }, forwardRef16) => {
|
|
38557
38978
|
return /* @__PURE__ */ React56.createElement(PlayButtonBridge, { ...props }, (props2) => /* @__PURE__ */ React56.createElement(Primitive3.button, {
|
|
38558
38979
|
...props2,
|
|
38559
|
-
ref: composeRefs3(props2.ref,
|
|
38980
|
+
ref: composeRefs3(props2.ref, forwardRef16)
|
|
38560
38981
|
}, children));
|
|
38561
38982
|
});
|
|
38562
38983
|
PlayButton2.displayName = "PlayButton";
|
|
38563
38984
|
var CaptionButtonBridge = createReactComponent(CaptionButtonInstance, {
|
|
38564
38985
|
domEventsRegex: /^onMedia/
|
|
38565
38986
|
});
|
|
38566
|
-
var CaptionButton2 = React56.forwardRef(({ children, ...props },
|
|
38987
|
+
var CaptionButton2 = React56.forwardRef(({ children, ...props }, forwardRef16) => {
|
|
38567
38988
|
return /* @__PURE__ */ React56.createElement(CaptionButtonBridge, { ...props }, (props2) => /* @__PURE__ */ React56.createElement(Primitive3.button, {
|
|
38568
38989
|
...props2,
|
|
38569
|
-
ref: composeRefs3(props2.ref,
|
|
38990
|
+
ref: composeRefs3(props2.ref, forwardRef16)
|
|
38570
38991
|
}, children));
|
|
38571
38992
|
});
|
|
38572
38993
|
CaptionButton2.displayName = "CaptionButton";
|
|
38573
38994
|
var FullscreenButtonBridge = createReactComponent(FullscreenButtonInstance, {
|
|
38574
38995
|
domEventsRegex: /^onMedia/
|
|
38575
38996
|
});
|
|
38576
|
-
var FullscreenButton2 = React56.forwardRef(({ children, ...props },
|
|
38997
|
+
var FullscreenButton2 = React56.forwardRef(({ children, ...props }, forwardRef16) => {
|
|
38577
38998
|
return /* @__PURE__ */ React56.createElement(FullscreenButtonBridge, { ...props }, (props2) => /* @__PURE__ */ React56.createElement(Primitive3.button, {
|
|
38578
38999
|
...props2,
|
|
38579
|
-
ref: composeRefs3(props2.ref,
|
|
39000
|
+
ref: composeRefs3(props2.ref, forwardRef16)
|
|
38580
39001
|
}, children));
|
|
38581
39002
|
});
|
|
38582
39003
|
FullscreenButton2.displayName = "FullscreenButton";
|
|
38583
39004
|
var MuteButtonBridge = createReactComponent(MuteButtonInstance, {
|
|
38584
39005
|
domEventsRegex: /^onMedia/
|
|
38585
39006
|
});
|
|
38586
|
-
var MuteButton2 = React56.forwardRef(({ children, ...props },
|
|
39007
|
+
var MuteButton2 = React56.forwardRef(({ children, ...props }, forwardRef16) => {
|
|
38587
39008
|
return /* @__PURE__ */ React56.createElement(MuteButtonBridge, { ...props }, (props2) => /* @__PURE__ */ React56.createElement(Primitive3.button, {
|
|
38588
39009
|
...props2,
|
|
38589
|
-
ref: composeRefs3(props2.ref,
|
|
39010
|
+
ref: composeRefs3(props2.ref, forwardRef16)
|
|
38590
39011
|
}, children));
|
|
38591
39012
|
});
|
|
38592
39013
|
MuteButton2.displayName = "MuteButton";
|
|
38593
39014
|
var PIPButtonBridge = createReactComponent(PIPButtonInstance, {
|
|
38594
39015
|
domEventsRegex: /^onMedia/
|
|
38595
39016
|
});
|
|
38596
|
-
var PIPButton2 = React56.forwardRef(({ children, ...props },
|
|
39017
|
+
var PIPButton2 = React56.forwardRef(({ children, ...props }, forwardRef16) => {
|
|
38597
39018
|
return /* @__PURE__ */ React56.createElement(PIPButtonBridge, { ...props }, (props2) => /* @__PURE__ */ React56.createElement(Primitive3.button, {
|
|
38598
39019
|
...props2,
|
|
38599
|
-
ref: composeRefs3(props2.ref,
|
|
39020
|
+
ref: composeRefs3(props2.ref, forwardRef16)
|
|
38600
39021
|
}, children));
|
|
38601
39022
|
});
|
|
38602
39023
|
PIPButton2.displayName = "PIPButton";
|
|
38603
39024
|
var SeekButtonBridge = createReactComponent(SeekButtonInstance, {
|
|
38604
39025
|
domEventsRegex: /^onMedia/
|
|
38605
39026
|
});
|
|
38606
|
-
var SeekButton2 = React56.forwardRef(({ children, ...props },
|
|
39027
|
+
var SeekButton2 = React56.forwardRef(({ children, ...props }, forwardRef16) => {
|
|
38607
39028
|
return /* @__PURE__ */ React56.createElement(SeekButtonBridge, { ...props }, (props2) => /* @__PURE__ */ React56.createElement(Primitive3.button, {
|
|
38608
39029
|
...props2,
|
|
38609
|
-
ref: composeRefs3(props2.ref,
|
|
39030
|
+
ref: composeRefs3(props2.ref, forwardRef16)
|
|
38610
39031
|
}, children));
|
|
38611
39032
|
});
|
|
38612
39033
|
SeekButton2.displayName = "SeekButton";
|
|
38613
39034
|
var LiveButtonBridge = createReactComponent(LiveButtonInstance, {
|
|
38614
39035
|
domEventsRegex: /^onMedia/
|
|
38615
39036
|
});
|
|
38616
|
-
var LiveButton2 = React56.forwardRef(({ children, ...props },
|
|
39037
|
+
var LiveButton2 = React56.forwardRef(({ children, ...props }, forwardRef16) => {
|
|
38617
39038
|
return /* @__PURE__ */ React56.createElement(LiveButtonBridge, { ...props }, (props2) => /* @__PURE__ */ React56.createElement(Primitive3.button, {
|
|
38618
39039
|
...props2,
|
|
38619
|
-
ref: composeRefs3(props2.ref,
|
|
39040
|
+
ref: composeRefs3(props2.ref, forwardRef16)
|
|
38620
39041
|
}, children));
|
|
38621
39042
|
});
|
|
38622
39043
|
LiveButton2.displayName = "LiveButton";
|
|
@@ -38631,42 +39052,42 @@ var SliderValueBridge = createReactComponent(SliderValueInstance);
|
|
|
38631
39052
|
var SliderBridge = createReactComponent(SliderInstance, {
|
|
38632
39053
|
events: sliderCallbacks
|
|
38633
39054
|
});
|
|
38634
|
-
var Root$5 = React56.forwardRef(({ children, ...props },
|
|
38635
|
-
return /* @__PURE__ */ React56.createElement(SliderBridge, { ...props, ref:
|
|
39055
|
+
var Root$5 = React56.forwardRef(({ children, ...props }, forwardRef16) => {
|
|
39056
|
+
return /* @__PURE__ */ React56.createElement(SliderBridge, { ...props, ref: forwardRef16 }, (props2) => /* @__PURE__ */ React56.createElement(Primitive3.div, { ...props2 }, children));
|
|
38636
39057
|
});
|
|
38637
39058
|
Root$5.displayName = "Slider";
|
|
38638
|
-
var Thumb = React56.forwardRef((props,
|
|
39059
|
+
var Thumb = React56.forwardRef((props, forwardRef16) => /* @__PURE__ */ React56.createElement(Primitive3.div, { ...props, ref: forwardRef16 }));
|
|
38639
39060
|
Thumb.displayName = "SliderThumb";
|
|
38640
|
-
var Track = React56.forwardRef((props,
|
|
39061
|
+
var Track = React56.forwardRef((props, forwardRef16) => /* @__PURE__ */ React56.createElement(Primitive3.div, { ...props, ref: forwardRef16 }));
|
|
38641
39062
|
Track.displayName = "SliderTrack";
|
|
38642
|
-
var TrackFill = React56.forwardRef((props,
|
|
39063
|
+
var TrackFill = React56.forwardRef((props, forwardRef16) => /* @__PURE__ */ React56.createElement(Primitive3.div, { ...props, ref: forwardRef16 }));
|
|
38643
39064
|
TrackFill.displayName = "SliderTrackFill";
|
|
38644
39065
|
var PreviewBridge = createReactComponent(SliderPreviewInstance);
|
|
38645
|
-
var Preview = React56.forwardRef(({ children, ...props },
|
|
39066
|
+
var Preview = React56.forwardRef(({ children, ...props }, forwardRef16) => {
|
|
38646
39067
|
return /* @__PURE__ */ React56.createElement(PreviewBridge, { ...props }, (props2) => /* @__PURE__ */ React56.createElement(Primitive3.div, {
|
|
38647
39068
|
...props2,
|
|
38648
|
-
ref: composeRefs3(props2.ref,
|
|
39069
|
+
ref: composeRefs3(props2.ref, forwardRef16)
|
|
38649
39070
|
}, children));
|
|
38650
39071
|
});
|
|
38651
39072
|
Preview.displayName = "SliderPreview";
|
|
38652
|
-
var Value2 = React56.forwardRef(({ children, ...props },
|
|
39073
|
+
var Value2 = React56.forwardRef(({ children, ...props }, forwardRef16) => {
|
|
38653
39074
|
return /* @__PURE__ */ React56.createElement(SliderValueBridge, { ...props }, (props2, instance) => {
|
|
38654
39075
|
const $text = useSignal(() => instance.getValueText(), instance);
|
|
38655
|
-
return /* @__PURE__ */ React56.createElement(Primitive3.div, { ...props2, ref:
|
|
39076
|
+
return /* @__PURE__ */ React56.createElement(Primitive3.div, { ...props2, ref: forwardRef16 }, $text, children);
|
|
38656
39077
|
});
|
|
38657
39078
|
});
|
|
38658
39079
|
Value2.displayName = "SliderValue";
|
|
38659
|
-
var Steps = React56.forwardRef(({ children, ...props },
|
|
39080
|
+
var Steps = React56.forwardRef(({ children, ...props }, forwardRef16) => {
|
|
38660
39081
|
const $min = useSliderState("min"), $max = useSliderState("max"), $step = useSliderState("step"), steps = ($max - $min) / $step;
|
|
38661
|
-
return /* @__PURE__ */ React56.createElement(Primitive3.div, { ...props, ref:
|
|
39082
|
+
return /* @__PURE__ */ React56.createElement(Primitive3.div, { ...props, ref: forwardRef16 }, Array.from({ length: Math.floor(steps) + 1 }).map((_, step) => children(step)));
|
|
38662
39083
|
});
|
|
38663
39084
|
Steps.displayName = "SliderSteps";
|
|
38664
39085
|
var VolumeSliderBridge = createReactComponent(VolumeSliderInstance, {
|
|
38665
39086
|
events: sliderCallbacks,
|
|
38666
39087
|
domEventsRegex: /^onMedia/
|
|
38667
39088
|
});
|
|
38668
|
-
var Root$4 = React56.forwardRef(({ children, ...props },
|
|
38669
|
-
return /* @__PURE__ */ React56.createElement(VolumeSliderBridge, { ...props, ref:
|
|
39089
|
+
var Root$4 = React56.forwardRef(({ children, ...props }, forwardRef16) => {
|
|
39090
|
+
return /* @__PURE__ */ React56.createElement(VolumeSliderBridge, { ...props, ref: forwardRef16 }, (props2) => /* @__PURE__ */ React56.createElement(Primitive3.div, { ...props2 }, children));
|
|
38670
39091
|
});
|
|
38671
39092
|
Root$4.displayName = "VolumeSlider";
|
|
38672
39093
|
function createVTTCue(startTime = 0, endTime = 0, text = "") {
|
|
@@ -38690,20 +39111,20 @@ function appendParamsToURL2(baseUrl, params) {
|
|
|
38690
39111
|
return url.toString();
|
|
38691
39112
|
}
|
|
38692
39113
|
var ThumbnailBridge = createReactComponent(ThumbnailInstance);
|
|
38693
|
-
var Root$3 = React56.forwardRef(({ children, ...props },
|
|
39114
|
+
var Root$3 = React56.forwardRef(({ children, ...props }, forwardRef16) => {
|
|
38694
39115
|
return /* @__PURE__ */ React56.createElement(ThumbnailBridge, { ...props }, (props2) => /* @__PURE__ */ React56.createElement(Primitive3.div, {
|
|
38695
39116
|
...props2,
|
|
38696
|
-
ref: composeRefs3(props2.ref,
|
|
39117
|
+
ref: composeRefs3(props2.ref, forwardRef16)
|
|
38697
39118
|
}, children));
|
|
38698
39119
|
});
|
|
38699
39120
|
Root$3.displayName = "Thumbnail";
|
|
38700
|
-
var Img2 = React56.forwardRef(({ children, ...props },
|
|
39121
|
+
var Img2 = React56.forwardRef(({ children, ...props }, forwardRef16) => {
|
|
38701
39122
|
const { src, img, crossOrigin } = useStateContext(ThumbnailInstance.state), $src = useSignal(src), $crossOrigin = useSignal(crossOrigin);
|
|
38702
39123
|
return /* @__PURE__ */ React56.createElement(Primitive3.img, {
|
|
38703
39124
|
crossOrigin: $crossOrigin,
|
|
38704
39125
|
...props,
|
|
38705
39126
|
src: $src || undefined,
|
|
38706
|
-
ref: composeRefs3(img.set,
|
|
39127
|
+
ref: composeRefs3(img.set, forwardRef16)
|
|
38707
39128
|
}, children);
|
|
38708
39129
|
});
|
|
38709
39130
|
Img2.displayName = "ThumbnailImg";
|
|
@@ -38715,16 +39136,16 @@ var TimeSliderBridge = createReactComponent(TimeSliderInstance, {
|
|
|
38715
39136
|
events: sliderCallbacks,
|
|
38716
39137
|
domEventsRegex: /^onMedia/
|
|
38717
39138
|
});
|
|
38718
|
-
var Root$2 = React56.forwardRef(({ children, ...props },
|
|
39139
|
+
var Root$2 = React56.forwardRef(({ children, ...props }, forwardRef16) => {
|
|
38719
39140
|
const $chapters = React56.useMemo(() => signal(null), []);
|
|
38720
|
-
return /* @__PURE__ */ React56.createElement(TimeSliderContext.Provider, { value: { $chapters } }, /* @__PURE__ */ React56.createElement(TimeSliderBridge, { ...props, ref:
|
|
39141
|
+
return /* @__PURE__ */ React56.createElement(TimeSliderContext.Provider, { value: { $chapters } }, /* @__PURE__ */ React56.createElement(TimeSliderBridge, { ...props, ref: forwardRef16 }, (props2) => /* @__PURE__ */ React56.createElement(Primitive3.div, { ...props2 }, children)));
|
|
38721
39142
|
});
|
|
38722
39143
|
Root$2.displayName = "TimeSlider";
|
|
38723
39144
|
var SliderChaptersBridge = createReactComponent(SliderChaptersInstance);
|
|
38724
|
-
var Chapters = React56.forwardRef(({ children, ...props },
|
|
39145
|
+
var Chapters = React56.forwardRef(({ children, ...props }, forwardRef16) => {
|
|
38725
39146
|
return /* @__PURE__ */ React56.createElement(SliderChaptersBridge, { ...props }, (props2, instance) => /* @__PURE__ */ React56.createElement(Primitive3.div, {
|
|
38726
39147
|
...props2,
|
|
38727
|
-
ref: composeRefs3(props2.ref,
|
|
39148
|
+
ref: composeRefs3(props2.ref, forwardRef16)
|
|
38728
39149
|
}, /* @__PURE__ */ React56.createElement(ChapterTracks, { instance }, children)));
|
|
38729
39150
|
});
|
|
38730
39151
|
Chapters.displayName = "SliderChapters";
|
|
@@ -38749,7 +39170,7 @@ function ChapterTracks({ instance, children }) {
|
|
|
38749
39170
|
});
|
|
38750
39171
|
}
|
|
38751
39172
|
ChapterTracks.displayName = "SliderChapterTracks";
|
|
38752
|
-
var ChapterTitle = React56.forwardRef(({ children, ...props },
|
|
39173
|
+
var ChapterTitle = React56.forwardRef(({ children, ...props }, forwardRef16) => {
|
|
38753
39174
|
const { $chapters } = React56.useContext(TimeSliderContext), [title, setTitle] = React56.useState();
|
|
38754
39175
|
React56.useEffect(() => {
|
|
38755
39176
|
return effect(() => {
|
|
@@ -38757,14 +39178,14 @@ var ChapterTitle = React56.forwardRef(({ children, ...props }, forwardRef15) =>
|
|
|
38757
39178
|
setTitle(cue?.text || "");
|
|
38758
39179
|
});
|
|
38759
39180
|
}, []);
|
|
38760
|
-
return /* @__PURE__ */ React56.createElement(Primitive3.div, { ...props, ref:
|
|
39181
|
+
return /* @__PURE__ */ React56.createElement(Primitive3.div, { ...props, ref: forwardRef16 }, title, children);
|
|
38761
39182
|
});
|
|
38762
39183
|
ChapterTitle.displayName = "SliderChapterTitle";
|
|
38763
|
-
var Progress = React56.forwardRef((props,
|
|
39184
|
+
var Progress = React56.forwardRef((props, forwardRef16) => /* @__PURE__ */ React56.createElement(Primitive3.div, { ...props, ref: forwardRef16 }));
|
|
38764
39185
|
Progress.displayName = "SliderProgress";
|
|
38765
39186
|
var SliderThumbnailBridge = createReactComponent(SliderThumbnailInstance);
|
|
38766
|
-
var ThumbnailRoot = React56.forwardRef(({ children, ...props },
|
|
38767
|
-
return /* @__PURE__ */ React56.createElement(SliderThumbnailBridge, { ...props }, (props2) => /* @__PURE__ */ React56.createElement(Primitive3.div, { ...props2, ref: composeRefs3(props2.ref,
|
|
39187
|
+
var ThumbnailRoot = React56.forwardRef(({ children, ...props }, forwardRef16) => {
|
|
39188
|
+
return /* @__PURE__ */ React56.createElement(SliderThumbnailBridge, { ...props }, (props2) => /* @__PURE__ */ React56.createElement(Primitive3.div, { ...props2, ref: composeRefs3(props2.ref, forwardRef16) }, children));
|
|
38768
39189
|
});
|
|
38769
39190
|
ThumbnailRoot.displayName = "SliderThumbnail";
|
|
38770
39191
|
var Thumbnail2 = {
|
|
@@ -38774,15 +39195,15 @@ var Thumbnail2 = {
|
|
|
38774
39195
|
var VideoBridge = createReactComponent(SliderVideoInstance, {
|
|
38775
39196
|
events: ["onCanPlay", "onError"]
|
|
38776
39197
|
});
|
|
38777
|
-
var Video = React56.forwardRef(({ children, ...props },
|
|
39198
|
+
var Video = React56.forwardRef(({ children, ...props }, forwardRef16) => {
|
|
38778
39199
|
return /* @__PURE__ */ React56.createElement(VideoBridge, { ...props }, (props2, instance) => /* @__PURE__ */ React56.createElement(VideoProvider2, {
|
|
38779
39200
|
...props2,
|
|
38780
39201
|
instance,
|
|
38781
|
-
ref: composeRefs3(props2.ref,
|
|
39202
|
+
ref: composeRefs3(props2.ref, forwardRef16)
|
|
38782
39203
|
}, children));
|
|
38783
39204
|
});
|
|
38784
39205
|
Video.displayName = "SliderVideo";
|
|
38785
|
-
var VideoProvider2 = React56.forwardRef(({ instance, children, ...props },
|
|
39206
|
+
var VideoProvider2 = React56.forwardRef(({ instance, children, ...props }, forwardRef16) => {
|
|
38786
39207
|
const { canLoad } = useStateContext(mediaState), { src, video, crossOrigin } = instance.$state, $src = useSignal(src), $canLoad = useSignal(canLoad), $crossOrigin = useSignal(crossOrigin);
|
|
38787
39208
|
return /* @__PURE__ */ React56.createElement(Primitive3.video, {
|
|
38788
39209
|
style: { maxWidth: "unset" },
|
|
@@ -38792,24 +39213,24 @@ var VideoProvider2 = React56.forwardRef(({ instance, children, ...props }, forwa
|
|
|
38792
39213
|
playsInline: true,
|
|
38793
39214
|
preload: $canLoad ? "auto" : "none",
|
|
38794
39215
|
crossOrigin: $crossOrigin || undefined,
|
|
38795
|
-
ref: composeRefs3(video.set,
|
|
39216
|
+
ref: composeRefs3(video.set, forwardRef16)
|
|
38796
39217
|
}, children);
|
|
38797
39218
|
});
|
|
38798
39219
|
VideoProvider2.displayName = "SliderVideoProvider";
|
|
38799
39220
|
var RadioGroupBridge = createReactComponent(RadioGroupInstance, {
|
|
38800
39221
|
events: ["onChange"]
|
|
38801
39222
|
});
|
|
38802
|
-
var Root$1 = React56.forwardRef(({ children, ...props },
|
|
38803
|
-
return /* @__PURE__ */ React56.createElement(RadioGroupBridge, { ...props, ref:
|
|
39223
|
+
var Root$1 = React56.forwardRef(({ children, ...props }, forwardRef16) => {
|
|
39224
|
+
return /* @__PURE__ */ React56.createElement(RadioGroupBridge, { ...props, ref: forwardRef16 }, (props2) => /* @__PURE__ */ React56.createElement(Primitive3.div, { ...props2 }, children));
|
|
38804
39225
|
});
|
|
38805
39226
|
Root$1.displayName = "RadioGroup";
|
|
38806
39227
|
var ItemBridge$1 = createReactComponent(RadioInstance, {
|
|
38807
39228
|
events: ["onChange", "onSelect"]
|
|
38808
39229
|
});
|
|
38809
|
-
var Item$1 = React56.forwardRef(({ children, ...props },
|
|
39230
|
+
var Item$1 = React56.forwardRef(({ children, ...props }, forwardRef16) => {
|
|
38810
39231
|
return /* @__PURE__ */ React56.createElement(ItemBridge$1, { ...props }, (props2) => /* @__PURE__ */ React56.createElement(Primitive3.div, {
|
|
38811
39232
|
...props2,
|
|
38812
|
-
ref: composeRefs3(props2.ref,
|
|
39233
|
+
ref: composeRefs3(props2.ref, forwardRef16)
|
|
38813
39234
|
}, children));
|
|
38814
39235
|
});
|
|
38815
39236
|
Item$1.displayName = "RadioItem";
|
|
@@ -38817,8 +39238,8 @@ var MenuBridge = createReactComponent(MenuInstance, {
|
|
|
38817
39238
|
events: ["onOpen", "onClose"],
|
|
38818
39239
|
domEventsRegex: /^onMedia/
|
|
38819
39240
|
});
|
|
38820
|
-
var Root4 = React56.forwardRef(({ children, ...props },
|
|
38821
|
-
return /* @__PURE__ */ React56.createElement(MenuBridge, { ...props, ref:
|
|
39241
|
+
var Root4 = React56.forwardRef(({ children, ...props }, forwardRef16) => {
|
|
39242
|
+
return /* @__PURE__ */ React56.createElement(MenuBridge, { ...props, ref: forwardRef16 }, (props2, instance) => /* @__PURE__ */ React56.createElement(Primitive3.div, {
|
|
38822
39243
|
...props2,
|
|
38823
39244
|
style: { display: !instance.isSubmenu ? "contents" : undefined, ...props2.style }
|
|
38824
39245
|
}, children));
|
|
@@ -38827,14 +39248,14 @@ Root4.displayName = "Menu";
|
|
|
38827
39248
|
var ButtonBridge = createReactComponent(MenuButtonInstance, {
|
|
38828
39249
|
events: ["onSelect"]
|
|
38829
39250
|
});
|
|
38830
|
-
var Button2 = React56.forwardRef(({ children, ...props },
|
|
39251
|
+
var Button2 = React56.forwardRef(({ children, ...props }, forwardRef16) => {
|
|
38831
39252
|
return /* @__PURE__ */ React56.createElement(ButtonBridge, { ...props }, (props2) => /* @__PURE__ */ React56.createElement(Primitive3.button, {
|
|
38832
39253
|
...props2,
|
|
38833
|
-
ref: composeRefs3(props2.ref,
|
|
39254
|
+
ref: composeRefs3(props2.ref, forwardRef16)
|
|
38834
39255
|
}, children));
|
|
38835
39256
|
});
|
|
38836
39257
|
Button2.displayName = "MenuButton";
|
|
38837
|
-
var Portal3 = React56.forwardRef(({ container: container3 = null, disabled = false, children, ...props },
|
|
39258
|
+
var Portal3 = React56.forwardRef(({ container: container3 = null, disabled = false, children, ...props }, forwardRef16) => {
|
|
38838
39259
|
let fullscreen = useMediaState("fullscreen"), shouldPortal = disabled === "fullscreen" ? !fullscreen : !disabled;
|
|
38839
39260
|
const target = React56.useMemo(() => {
|
|
38840
39261
|
if (IS_SERVER3)
|
|
@@ -38845,45 +39266,45 @@ var Portal3 = React56.forwardRef(({ container: container3 = null, disabled = fal
|
|
|
38845
39266
|
return !target || !shouldPortal ? children : createPortal3(/* @__PURE__ */ React56.createElement(Primitive3.div, {
|
|
38846
39267
|
...props,
|
|
38847
39268
|
style: { display: "contents", ...props.style },
|
|
38848
|
-
ref:
|
|
39269
|
+
ref: forwardRef16
|
|
38849
39270
|
}, children), target);
|
|
38850
39271
|
});
|
|
38851
39272
|
Portal3.displayName = "MenuPortal";
|
|
38852
39273
|
var ItemsBridge = createReactComponent(MenuItemsInstance);
|
|
38853
|
-
var Items = React56.forwardRef(({ children, ...props },
|
|
39274
|
+
var Items = React56.forwardRef(({ children, ...props }, forwardRef16) => {
|
|
38854
39275
|
return /* @__PURE__ */ React56.createElement(ItemsBridge, { ...props }, (props2) => /* @__PURE__ */ React56.createElement(Primitive3.div, {
|
|
38855
39276
|
...props2,
|
|
38856
|
-
ref: composeRefs3(props2.ref,
|
|
39277
|
+
ref: composeRefs3(props2.ref, forwardRef16)
|
|
38857
39278
|
}, children));
|
|
38858
39279
|
});
|
|
38859
39280
|
Items.displayName = "MenuItems";
|
|
38860
39281
|
var ItemBridge = createReactComponent(MenuItemInstance);
|
|
38861
|
-
var Item3 = React56.forwardRef(({ children, ...props },
|
|
39282
|
+
var Item3 = React56.forwardRef(({ children, ...props }, forwardRef16) => {
|
|
38862
39283
|
return /* @__PURE__ */ React56.createElement(ItemBridge, { ...props }, (props2) => /* @__PURE__ */ React56.createElement(Primitive3.div, {
|
|
38863
39284
|
...props2,
|
|
38864
|
-
ref: composeRefs3(props2.ref,
|
|
39285
|
+
ref: composeRefs3(props2.ref, forwardRef16)
|
|
38865
39286
|
}, children));
|
|
38866
39287
|
});
|
|
38867
39288
|
Item3.displayName = "MenuItem";
|
|
38868
39289
|
var GestureBridge = createReactComponent(GestureInstance, {
|
|
38869
39290
|
events: ["onWillTrigger", "onTrigger"]
|
|
38870
39291
|
});
|
|
38871
|
-
var Gesture2 = React56.forwardRef(({ children, ...props },
|
|
38872
|
-
return /* @__PURE__ */ React56.createElement(GestureBridge, { ...props, ref:
|
|
39292
|
+
var Gesture2 = React56.forwardRef(({ children, ...props }, forwardRef16) => {
|
|
39293
|
+
return /* @__PURE__ */ React56.createElement(GestureBridge, { ...props, ref: forwardRef16 }, (props2) => /* @__PURE__ */ React56.createElement(Primitive3.div, { ...props2 }, children));
|
|
38873
39294
|
});
|
|
38874
39295
|
Gesture2.displayName = "Gesture";
|
|
38875
39296
|
var TimeBridge = createReactComponent(TimeInstance);
|
|
38876
|
-
var Time2 = React56.forwardRef(({ children, ...props },
|
|
39297
|
+
var Time2 = React56.forwardRef(({ children, ...props }, forwardRef16) => {
|
|
38877
39298
|
return /* @__PURE__ */ React56.createElement(TimeBridge, { ...props }, (props2, instance) => /* @__PURE__ */ React56.createElement(TimeText, {
|
|
38878
39299
|
...props2,
|
|
38879
39300
|
instance,
|
|
38880
|
-
ref: composeRefs3(props2.ref,
|
|
39301
|
+
ref: composeRefs3(props2.ref, forwardRef16)
|
|
38881
39302
|
}, children));
|
|
38882
39303
|
});
|
|
38883
39304
|
Time2.displayName = "Time";
|
|
38884
|
-
var TimeText = React56.forwardRef(({ instance, children, ...props },
|
|
39305
|
+
var TimeText = React56.forwardRef(({ instance, children, ...props }, forwardRef16) => {
|
|
38885
39306
|
const { timeText } = instance.$state, $timeText = useSignal(timeText);
|
|
38886
|
-
return /* @__PURE__ */ React56.createElement(Primitive3.div, { ...props, ref:
|
|
39307
|
+
return /* @__PURE__ */ React56.createElement(Primitive3.div, { ...props, ref: forwardRef16 }, $timeText, children);
|
|
38887
39308
|
});
|
|
38888
39309
|
TimeText.displayName = "TimeText";
|
|
38889
39310
|
function useMediaPlayer() {
|
|
@@ -38987,27 +39408,27 @@ function getTrackValue(track) {
|
|
|
38987
39408
|
var MediaAnnouncerBridge = createReactComponent(MediaAnnouncerInstance, {
|
|
38988
39409
|
events: ["onChange"]
|
|
38989
39410
|
});
|
|
38990
|
-
var MediaAnnouncer2 = React57.forwardRef(({ style, children, ...props },
|
|
39411
|
+
var MediaAnnouncer2 = React57.forwardRef(({ style, children, ...props }, forwardRef16) => {
|
|
38991
39412
|
return /* @__PURE__ */ React57.createElement(MediaAnnouncerBridge, { ...props }, (props2) => /* @__PURE__ */ React57.createElement(Primitive3.div, {
|
|
38992
39413
|
...props2,
|
|
38993
39414
|
style: { display: "contents", ...style },
|
|
38994
|
-
ref: composeRefs3(props2.ref,
|
|
39415
|
+
ref: composeRefs3(props2.ref, forwardRef16)
|
|
38995
39416
|
}, children));
|
|
38996
39417
|
});
|
|
38997
39418
|
MediaAnnouncer2.displayName = "MediaAnnouncer";
|
|
38998
39419
|
var ControlsBridge = createReactComponent(ControlsInstance);
|
|
38999
|
-
var Root$52 = React57.forwardRef(({ children, ...props },
|
|
39420
|
+
var Root$52 = React57.forwardRef(({ children, ...props }, forwardRef16) => {
|
|
39000
39421
|
return /* @__PURE__ */ React57.createElement(ControlsBridge, { ...props }, (props2) => /* @__PURE__ */ React57.createElement(Primitive3.div, {
|
|
39001
39422
|
...props2,
|
|
39002
|
-
ref: composeRefs3(props2.ref,
|
|
39423
|
+
ref: composeRefs3(props2.ref, forwardRef16)
|
|
39003
39424
|
}, children));
|
|
39004
39425
|
});
|
|
39005
39426
|
Root$52.displayName = "Controls";
|
|
39006
39427
|
var ControlsGroupBridge = createReactComponent(ControlsGroupInstance);
|
|
39007
|
-
var Group = React57.forwardRef(({ children, ...props },
|
|
39428
|
+
var Group = React57.forwardRef(({ children, ...props }, forwardRef16) => {
|
|
39008
39429
|
return /* @__PURE__ */ React57.createElement(ControlsGroupBridge, { ...props }, (props2) => /* @__PURE__ */ React57.createElement(Primitive3.div, {
|
|
39009
39430
|
...props2,
|
|
39010
|
-
ref: composeRefs3(props2.ref,
|
|
39431
|
+
ref: composeRefs3(props2.ref, forwardRef16)
|
|
39011
39432
|
}, children));
|
|
39012
39433
|
});
|
|
39013
39434
|
Group.displayName = "ControlsGroup";
|
|
@@ -39017,28 +39438,28 @@ function Root$42({ children, ...props }) {
|
|
|
39017
39438
|
}
|
|
39018
39439
|
Root$42.displayName = "Tooltip";
|
|
39019
39440
|
var TriggerBridge = createReactComponent(TooltipTriggerInstance);
|
|
39020
|
-
var Trigger3 = React57.forwardRef(({ children, ...props },
|
|
39441
|
+
var Trigger3 = React57.forwardRef(({ children, ...props }, forwardRef16) => {
|
|
39021
39442
|
return /* @__PURE__ */ React57.createElement(TriggerBridge, { ...props }, (props2) => /* @__PURE__ */ React57.createElement(Primitive3.button, {
|
|
39022
39443
|
...props2,
|
|
39023
|
-
ref: composeRefs3(props2.ref,
|
|
39444
|
+
ref: composeRefs3(props2.ref, forwardRef16)
|
|
39024
39445
|
}, children));
|
|
39025
39446
|
});
|
|
39026
39447
|
Trigger3.displayName = "TooltipTrigger";
|
|
39027
39448
|
var ContentBridge = createReactComponent(TooltipContentInstance);
|
|
39028
|
-
var Content4 = React57.forwardRef(({ children, ...props },
|
|
39449
|
+
var Content4 = React57.forwardRef(({ children, ...props }, forwardRef16) => {
|
|
39029
39450
|
return /* @__PURE__ */ React57.createElement(ContentBridge, { ...props }, (props2) => /* @__PURE__ */ React57.createElement(Primitive3.div, {
|
|
39030
39451
|
...props2,
|
|
39031
|
-
ref: composeRefs3(props2.ref,
|
|
39452
|
+
ref: composeRefs3(props2.ref, forwardRef16)
|
|
39032
39453
|
}, children));
|
|
39033
39454
|
});
|
|
39034
39455
|
Content4.displayName = "TooltipContent";
|
|
39035
39456
|
var GoogleCastButtonBridge = createReactComponent(GoogleCastButtonInstance, {
|
|
39036
39457
|
domEventsRegex: /^onMedia/
|
|
39037
39458
|
});
|
|
39038
|
-
var GoogleCastButton2 = React57.forwardRef(({ children, ...props },
|
|
39459
|
+
var GoogleCastButton2 = React57.forwardRef(({ children, ...props }, forwardRef16) => {
|
|
39039
39460
|
return /* @__PURE__ */ React57.createElement(GoogleCastButtonBridge, { ...props }, (props2) => /* @__PURE__ */ React57.createElement(Primitive3.button, {
|
|
39040
39461
|
...props2,
|
|
39041
|
-
ref: composeRefs3(props2.ref,
|
|
39462
|
+
ref: composeRefs3(props2.ref, forwardRef16)
|
|
39042
39463
|
}, children));
|
|
39043
39464
|
});
|
|
39044
39465
|
GoogleCastButton2.displayName = "GoogleCastButton";
|
|
@@ -39046,29 +39467,29 @@ var QualitySliderBridge = createReactComponent(QualitySliderInstance, {
|
|
|
39046
39467
|
events: sliderCallbacks,
|
|
39047
39468
|
domEventsRegex: /^onMedia/
|
|
39048
39469
|
});
|
|
39049
|
-
var Root$32 = React57.forwardRef(({ children, ...props },
|
|
39050
|
-
return /* @__PURE__ */ React57.createElement(QualitySliderBridge, { ...props, ref:
|
|
39470
|
+
var Root$32 = React57.forwardRef(({ children, ...props }, forwardRef16) => {
|
|
39471
|
+
return /* @__PURE__ */ React57.createElement(QualitySliderBridge, { ...props, ref: forwardRef16 }, (props2) => /* @__PURE__ */ React57.createElement(Primitive3.div, { ...props2 }, children));
|
|
39051
39472
|
});
|
|
39052
39473
|
Root$32.displayName = "QualitySlider";
|
|
39053
39474
|
var AudioGainSliderBridge = createReactComponent(AudioGainSliderInstance, {
|
|
39054
39475
|
events: sliderCallbacks,
|
|
39055
39476
|
domEventsRegex: /^onMedia/
|
|
39056
39477
|
});
|
|
39057
|
-
var Root$22 = React57.forwardRef(({ children, ...props },
|
|
39058
|
-
return /* @__PURE__ */ React57.createElement(AudioGainSliderBridge, { ...props, ref:
|
|
39478
|
+
var Root$22 = React57.forwardRef(({ children, ...props }, forwardRef16) => {
|
|
39479
|
+
return /* @__PURE__ */ React57.createElement(AudioGainSliderBridge, { ...props, ref: forwardRef16 }, (props2) => /* @__PURE__ */ React57.createElement(Primitive3.div, { ...props2 }, children));
|
|
39059
39480
|
});
|
|
39060
39481
|
Root$22.displayName = "AudioGainSlider";
|
|
39061
39482
|
var SpeedSliderBridge = createReactComponent(SpeedSliderInstance, {
|
|
39062
39483
|
events: sliderCallbacks,
|
|
39063
39484
|
domEventsRegex: /^onMedia/
|
|
39064
39485
|
});
|
|
39065
|
-
var Root$12 = React57.forwardRef(({ children, ...props },
|
|
39066
|
-
return /* @__PURE__ */ React57.createElement(SpeedSliderBridge, { ...props, ref:
|
|
39486
|
+
var Root$12 = React57.forwardRef(({ children, ...props }, forwardRef16) => {
|
|
39487
|
+
return /* @__PURE__ */ React57.createElement(SpeedSliderBridge, { ...props, ref: forwardRef16 }, (props2) => /* @__PURE__ */ React57.createElement(Primitive3.div, { ...props2 }, children));
|
|
39067
39488
|
});
|
|
39068
39489
|
Root$12.displayName = "SpeedSlider";
|
|
39069
|
-
var Title = React57.forwardRef(({ children, ...props },
|
|
39490
|
+
var Title = React57.forwardRef(({ children, ...props }, forwardRef16) => {
|
|
39070
39491
|
const $title = useMediaState("title");
|
|
39071
|
-
return /* @__PURE__ */ React57.createElement(Primitive3.span, { ...props, ref:
|
|
39492
|
+
return /* @__PURE__ */ React57.createElement(Primitive3.span, { ...props, ref: forwardRef16 }, $title, children);
|
|
39072
39493
|
});
|
|
39073
39494
|
Title.displayName = "Title";
|
|
39074
39495
|
function useActiveTextCues(track) {
|
|
@@ -39098,17 +39519,17 @@ function useChapterTitle() {
|
|
|
39098
39519
|
const $track = useActiveTextTrack("chapters"), $cues = useActiveTextCues($track);
|
|
39099
39520
|
return $cues[0]?.text || "";
|
|
39100
39521
|
}
|
|
39101
|
-
var ChapterTitle2 = React57.forwardRef(({ defaultText = "", children, ...props },
|
|
39522
|
+
var ChapterTitle2 = React57.forwardRef(({ defaultText = "", children, ...props }, forwardRef16) => {
|
|
39102
39523
|
const $chapterTitle = useChapterTitle();
|
|
39103
|
-
return /* @__PURE__ */ React57.createElement(Primitive3.span, { ...props, ref:
|
|
39524
|
+
return /* @__PURE__ */ React57.createElement(Primitive3.span, { ...props, ref: forwardRef16 }, $chapterTitle || defaultText, children);
|
|
39104
39525
|
});
|
|
39105
39526
|
ChapterTitle2.displayName = "ChapterTitle";
|
|
39106
39527
|
var CaptionsBridge = createReactComponent(CaptionsInstance);
|
|
39107
|
-
var Captions2 = React57.forwardRef(({ children, ...props },
|
|
39108
|
-
return /* @__PURE__ */ React57.createElement(CaptionsBridge, { ...props, ref:
|
|
39528
|
+
var Captions2 = React57.forwardRef(({ children, ...props }, forwardRef16) => {
|
|
39529
|
+
return /* @__PURE__ */ React57.createElement(CaptionsBridge, { ...props, ref: forwardRef16 }, (props2) => /* @__PURE__ */ React57.createElement(Primitive3.div, { ...props2 }, children));
|
|
39109
39530
|
});
|
|
39110
39531
|
Captions2.displayName = "Captions";
|
|
39111
|
-
var Root6 = React57.forwardRef(({ size: size5 = 96, children, ...props },
|
|
39532
|
+
var Root6 = React57.forwardRef(({ size: size5 = 96, children, ...props }, forwardRef16) => {
|
|
39112
39533
|
return /* @__PURE__ */ React57.createElement("svg", {
|
|
39113
39534
|
width: size5,
|
|
39114
39535
|
height: size5,
|
|
@@ -39117,7 +39538,7 @@ var Root6 = React57.forwardRef(({ size: size5 = 96, children, ...props }, forwar
|
|
|
39117
39538
|
"aria-hidden": "true",
|
|
39118
39539
|
"data-part": "root",
|
|
39119
39540
|
...props,
|
|
39120
|
-
ref:
|
|
39541
|
+
ref: forwardRef16
|
|
39121
39542
|
}, children);
|
|
39122
39543
|
});
|
|
39123
39544
|
var Track2 = React57.forwardRef(({ width = 8, children, ...props }, ref) => /* @__PURE__ */ React57.createElement("circle", {
|
|
@@ -39151,7 +39572,7 @@ function createComputed(compute2, deps = []) {
|
|
|
39151
39572
|
const scope = useReactScope();
|
|
39152
39573
|
return React57.useMemo(() => scoped(() => computed(compute2), scope), [scope, ...deps]);
|
|
39153
39574
|
}
|
|
39154
|
-
function
|
|
39575
|
+
function createEffect2(compute2, deps = []) {
|
|
39155
39576
|
const scope = useReactScope();
|
|
39156
39577
|
React57.useEffect(() => scoped(() => effect(compute2), scope), [scope, ...deps]);
|
|
39157
39578
|
}
|
|
@@ -39394,7 +39815,7 @@ class AudioGainRadioGroup extends Component {
|
|
|
39394
39815
|
onSetup() {
|
|
39395
39816
|
this.#media = useMediaContext();
|
|
39396
39817
|
if (hasProvidedContext(menuContext)) {
|
|
39397
|
-
this.#menu =
|
|
39818
|
+
this.#menu = useContext45(menuContext);
|
|
39398
39819
|
}
|
|
39399
39820
|
}
|
|
39400
39821
|
onConnect(el) {
|
|
@@ -39500,11 +39921,11 @@ var MediaPlayerBridge = createReactComponent(MediaPlayerInstance, {
|
|
|
39500
39921
|
eventsRegex: /^onHls/,
|
|
39501
39922
|
domEventsRegex: /^onMedia/
|
|
39502
39923
|
});
|
|
39503
|
-
var MediaPlayer2 = React59.forwardRef(({ aspectRatio, children, ...props },
|
|
39924
|
+
var MediaPlayer2 = React59.forwardRef(({ aspectRatio, children, ...props }, forwardRef16) => {
|
|
39504
39925
|
return /* @__PURE__ */ React59.createElement(MediaPlayerBridge, {
|
|
39505
39926
|
...props,
|
|
39506
39927
|
src: props.src,
|
|
39507
|
-
ref:
|
|
39928
|
+
ref: forwardRef16,
|
|
39508
39929
|
style: {
|
|
39509
39930
|
aspectRatio,
|
|
39510
39931
|
...props.style
|
|
@@ -39513,9 +39934,9 @@ var MediaPlayer2 = React59.forwardRef(({ aspectRatio, children, ...props }, forw
|
|
|
39513
39934
|
});
|
|
39514
39935
|
MediaPlayer2.displayName = "MediaPlayer";
|
|
39515
39936
|
var MediaProviderBridge = createReactComponent(MediaProviderInstance);
|
|
39516
|
-
var MediaProvider2 = React59.forwardRef(({ loaders = [], children, iframeProps, mediaProps, ...props },
|
|
39937
|
+
var MediaProvider2 = React59.forwardRef(({ loaders = [], children, iframeProps, mediaProps, ...props }, forwardRef16) => {
|
|
39517
39938
|
const reactLoaders = React59.useMemo(() => loaders.map((Loader) => new Loader), loaders);
|
|
39518
|
-
return /* @__PURE__ */ React59.createElement(MediaProviderBridge, { ...props, loaders: reactLoaders, ref:
|
|
39939
|
+
return /* @__PURE__ */ React59.createElement(MediaProviderBridge, { ...props, loaders: reactLoaders, ref: forwardRef16 }, (props2, instance) => /* @__PURE__ */ React59.createElement("div", { ...props2 }, /* @__PURE__ */ React59.createElement(MediaOutlet, { provider: instance, mediaProps, iframeProps }), children));
|
|
39519
39940
|
});
|
|
39520
39941
|
MediaProvider2.displayName = "MediaProvider";
|
|
39521
39942
|
function MediaOutlet({ provider: provider2, mediaProps, iframeProps }) {
|
|
@@ -39585,48 +40006,48 @@ function Track3({ lang, ...props }) {
|
|
|
39585
40006
|
}
|
|
39586
40007
|
Track3.displayName = "Track";
|
|
39587
40008
|
var ToggleButtonBridge = createReactComponent(ToggleButtonInstance);
|
|
39588
|
-
var ToggleButton2 = React59.forwardRef(({ children, ...props },
|
|
40009
|
+
var ToggleButton2 = React59.forwardRef(({ children, ...props }, forwardRef16) => {
|
|
39589
40010
|
return /* @__PURE__ */ React59.createElement(ToggleButtonBridge, { ...props }, (props2) => /* @__PURE__ */ React59.createElement(Primitive3.button, {
|
|
39590
40011
|
...props2,
|
|
39591
|
-
ref: composeRefs3(props2.ref,
|
|
40012
|
+
ref: composeRefs3(props2.ref, forwardRef16)
|
|
39592
40013
|
}, children));
|
|
39593
40014
|
});
|
|
39594
40015
|
ToggleButton2.displayName = "ToggleButton";
|
|
39595
40016
|
var PosterBridge = createReactComponent(PosterInstance);
|
|
39596
|
-
var Poster2 = React59.forwardRef(({ children, ...props },
|
|
40017
|
+
var Poster2 = React59.forwardRef(({ children, ...props }, forwardRef16) => {
|
|
39597
40018
|
return /* @__PURE__ */ React59.createElement(PosterBridge, {
|
|
39598
40019
|
src: props.asChild && React59.isValidElement(children) ? children.props.src : undefined,
|
|
39599
40020
|
...props
|
|
39600
40021
|
}, (props2, instance) => /* @__PURE__ */ React59.createElement(PosterImg, {
|
|
39601
40022
|
...props2,
|
|
39602
40023
|
instance,
|
|
39603
|
-
ref: composeRefs3(props2.ref,
|
|
40024
|
+
ref: composeRefs3(props2.ref, forwardRef16)
|
|
39604
40025
|
}, children));
|
|
39605
40026
|
});
|
|
39606
40027
|
Poster2.displayName = "Poster";
|
|
39607
|
-
var PosterImg = React59.forwardRef(({ instance, children, ...props },
|
|
40028
|
+
var PosterImg = React59.forwardRef(({ instance, children, ...props }, forwardRef16) => {
|
|
39608
40029
|
const { src, img, alt, crossOrigin, hidden } = instance.$state, $src = useSignal(src), $alt = useSignal(alt), $crossOrigin = useSignal(crossOrigin), $hidden = useSignal(hidden);
|
|
39609
40030
|
return /* @__PURE__ */ React59.createElement(Primitive3.img, {
|
|
39610
40031
|
...props,
|
|
39611
40032
|
src: $src || undefined,
|
|
39612
40033
|
alt: $alt || undefined,
|
|
39613
40034
|
crossOrigin: $crossOrigin || undefined,
|
|
39614
|
-
ref: composeRefs3(img.set,
|
|
40035
|
+
ref: composeRefs3(img.set, forwardRef16),
|
|
39615
40036
|
style: { display: $hidden ? "none" : undefined }
|
|
39616
40037
|
}, children);
|
|
39617
40038
|
});
|
|
39618
40039
|
PosterImg.displayName = "PosterImg";
|
|
39619
|
-
var Root7 = React59.forwardRef(({ children, ...props },
|
|
40040
|
+
var Root7 = React59.forwardRef(({ children, ...props }, forwardRef16) => {
|
|
39620
40041
|
return /* @__PURE__ */ React59.createElement(Primitive3.div, {
|
|
39621
40042
|
translate: "yes",
|
|
39622
40043
|
"aria-live": "off",
|
|
39623
40044
|
"aria-atomic": "true",
|
|
39624
40045
|
...props,
|
|
39625
|
-
ref:
|
|
40046
|
+
ref: forwardRef16
|
|
39626
40047
|
}, children);
|
|
39627
40048
|
});
|
|
39628
40049
|
Root7.displayName = "Caption";
|
|
39629
|
-
var Text = React59.forwardRef((props,
|
|
40050
|
+
var Text = React59.forwardRef((props, forwardRef16) => {
|
|
39630
40051
|
const textTrack = useMediaState("textTrack"), [activeCue, setActiveCue] = React59.useState();
|
|
39631
40052
|
React59.useEffect(() => {
|
|
39632
40053
|
if (!textTrack)
|
|
@@ -39646,7 +40067,7 @@ var Text = React59.forwardRef((props, forwardRef15) => {
|
|
|
39646
40067
|
dangerouslySetInnerHTML: {
|
|
39647
40068
|
__html: activeCue?.text || ""
|
|
39648
40069
|
},
|
|
39649
|
-
ref:
|
|
40070
|
+
ref: forwardRef16
|
|
39650
40071
|
});
|
|
39651
40072
|
});
|
|
39652
40073
|
Text.displayName = "CaptionText";
|
|
@@ -39796,7 +40217,7 @@ function createDefaultMediaLayout({
|
|
|
39796
40217
|
thumbnails = null,
|
|
39797
40218
|
translations,
|
|
39798
40219
|
...props
|
|
39799
|
-
},
|
|
40220
|
+
}, forwardRef16) => {
|
|
39800
40221
|
const media = useMediaContext2(), $load = useSignal(media.$props.load), $canLoad = useMediaState("canLoad"), $viewType = useMediaState("viewType"), $streamType = useMediaState("streamType"), $smallWhen = createComputed(() => {
|
|
39801
40222
|
return isBoolean(smallLayoutWhen) ? smallLayoutWhen : smallLayoutWhen(media.player.state);
|
|
39802
40223
|
}, [smallLayoutWhen]), userPrefersAnnouncements = createSignal(true), userPrefersKeyboardAnimations = createSignal(true), isMatch = $viewType === type, isSmallLayout = $smallWhen(), isForcedLayout = isBoolean(smallLayoutWhen), isLoadLayout = $load === "play" && !$canLoad, canRender = $canLoad || isForcedLayout || isLoadLayout, colorSchemeClass = useColorSchemeClass(colorScheme), layoutEl = createSignal(null);
|
|
@@ -39809,7 +40230,7 @@ function createDefaultMediaLayout({
|
|
|
39809
40230
|
"data-lg": !isSmallLayout ? "" : null,
|
|
39810
40231
|
"data-size": isSmallLayout ? "sm" : "lg",
|
|
39811
40232
|
"data-no-scrub-gesture": noScrubGesture ? "" : null,
|
|
39812
|
-
ref: composeRefs3(layoutEl.set,
|
|
40233
|
+
ref: composeRefs3(layoutEl.set, forwardRef16)
|
|
39813
40234
|
}, canRender && isMatch ? /* @__PURE__ */ React61.createElement(DefaultLayoutContext.Provider, {
|
|
39814
40235
|
value: {
|
|
39815
40236
|
disableTimeSlider,
|
|
@@ -39870,9 +40291,9 @@ function DefaultPlayButton({ tooltip }) {
|
|
|
39870
40291
|
return /* @__PURE__ */ React61.createElement(DefaultTooltip, { content: $paused ? playText : pauseText, placement: tooltip }, /* @__PURE__ */ React61.createElement(PlayButton2, { className: "vds-play-button vds-button", "aria-label": playText }, $ended ? /* @__PURE__ */ React61.createElement(Icons.PlayButton.Replay, { className: "vds-icon" }) : $paused ? /* @__PURE__ */ React61.createElement(Icons.PlayButton.Play, { className: "vds-icon" }) : /* @__PURE__ */ React61.createElement(Icons.PlayButton.Pause, { className: "vds-icon" })));
|
|
39871
40292
|
}
|
|
39872
40293
|
DefaultPlayButton.displayName = "DefaultPlayButton";
|
|
39873
|
-
var DefaultMuteButton = React61.forwardRef(({ tooltip },
|
|
40294
|
+
var DefaultMuteButton = React61.forwardRef(({ tooltip }, forwardRef16) => {
|
|
39874
40295
|
const { icons: Icons } = useDefaultLayoutContext(), muteText = useDefaultLayoutWord("Mute"), unmuteText = useDefaultLayoutWord("Unmute"), $muted = useMediaState("muted"), $volume = useMediaState("volume");
|
|
39875
|
-
return /* @__PURE__ */ React61.createElement(DefaultTooltip, { content: $muted ? unmuteText : muteText, placement: tooltip }, /* @__PURE__ */ React61.createElement(MuteButton2, { className: "vds-mute-button vds-button", "aria-label": muteText, ref:
|
|
40296
|
+
return /* @__PURE__ */ React61.createElement(DefaultTooltip, { content: $muted ? unmuteText : muteText, placement: tooltip }, /* @__PURE__ */ React61.createElement(MuteButton2, { className: "vds-mute-button vds-button", "aria-label": muteText, ref: forwardRef16 }, $muted || $volume == 0 ? /* @__PURE__ */ React61.createElement(Icons.MuteButton.Mute, { className: "vds-icon" }) : $volume < 0.5 ? /* @__PURE__ */ React61.createElement(Icons.MuteButton.VolumeLow, { className: "vds-icon" }) : /* @__PURE__ */ React61.createElement(Icons.MuteButton.VolumeHigh, { className: "vds-icon" })));
|
|
39876
40297
|
});
|
|
39877
40298
|
DefaultMuteButton.displayName = "DefaultMuteButton";
|
|
39878
40299
|
function DefaultCaptionButton({ tooltip }) {
|
|
@@ -40648,7 +41069,7 @@ function DefaultTimeSlider() {
|
|
|
40648
41069
|
}, /* @__PURE__ */ React61.createElement(Chapters, {
|
|
40649
41070
|
className: "vds-slider-chapters",
|
|
40650
41071
|
disabled: width < sliderChaptersMinWidth
|
|
40651
|
-
}, (cues,
|
|
41072
|
+
}, (cues, forwardRef16) => cues.map((cue) => /* @__PURE__ */ React61.createElement("div", { className: "vds-slider-chapter", key: cue.startTime, ref: forwardRef16 }, /* @__PURE__ */ React61.createElement(Track, { className: "vds-slider-track" }), /* @__PURE__ */ React61.createElement(TrackFill, { className: "vds-slider-track-fill vds-slider-track" }), /* @__PURE__ */ React61.createElement(Progress, { className: "vds-slider-progress vds-slider-track" })))), /* @__PURE__ */ React61.createElement(Thumb, { className: "vds-slider-thumb" }), /* @__PURE__ */ React61.createElement(Preview, { className: "vds-slider-preview" }, thumbnails ? /* @__PURE__ */ React61.createElement(Thumbnail2.Root, {
|
|
40652
41073
|
src: thumbnails,
|
|
40653
41074
|
className: "vds-slider-thumbnail vds-thumbnail"
|
|
40654
41075
|
}, /* @__PURE__ */ React61.createElement(Thumbnail2.Img, null)) : $RemotionSliderThumbnail && isRemotionSrc($src) ? /* @__PURE__ */ React61.createElement($RemotionSliderThumbnail, { className: "vds-slider-thumbnail vds-thumbnail" }) : null, /* @__PURE__ */ React61.createElement(ChapterTitle, { className: "vds-slider-chapter-title" }), /* @__PURE__ */ React61.createElement(Value2, { className: "vds-slider-value" })));
|
|
@@ -40752,7 +41173,7 @@ function AudioTitle({ title, chapterTitle }) {
|
|
|
40752
41173
|
return /* @__PURE__ */ React61.createElement("span", { className: "vds-title-text" }, slot(slots, "title", title), slot(slots, "chapterTitle", /* @__PURE__ */ React61.createElement("span", { className: "vds-chapter-title" }, chapterTitle)));
|
|
40753
41174
|
}
|
|
40754
41175
|
AudioTitle.displayName = "AudioTitle";
|
|
40755
|
-
var DefaultKeyboardDisplay = React61.forwardRef(({ icons: Icons, ...props },
|
|
41176
|
+
var DefaultKeyboardDisplay = React61.forwardRef(({ icons: Icons, ...props }, forwardRef16) => {
|
|
40756
41177
|
const [visible, setVisible] = React61.useState(false), [Icon4, setIcon] = React61.useState(null), [count4, setCount] = React61.useState(0), $lastKeyboardAction = useMediaState("lastKeyboardAction");
|
|
40757
41178
|
React61.useEffect(() => {
|
|
40758
41179
|
setCount((n2) => n2 + 1);
|
|
@@ -40763,7 +41184,7 @@ var DefaultKeyboardDisplay = React61.forwardRef(({ icons: Icons, ...props }, for
|
|
|
40763
41184
|
}, [visible, $lastKeyboardAction]);
|
|
40764
41185
|
const className = React61.useMemo(() => `vds-kb-action${!visible ? " hidden" : ""}${props.className ? ` ${props.className}` : ""}`, [visible]);
|
|
40765
41186
|
const $$text = createComputed(getText), $text = useSignal($$text);
|
|
40766
|
-
|
|
41187
|
+
createEffect2(() => {
|
|
40767
41188
|
const Icon22 = getIcon(Icons);
|
|
40768
41189
|
setIcon(() => Icon22);
|
|
40769
41190
|
}, [Icons]);
|
|
@@ -40779,12 +41200,12 @@ var DefaultKeyboardDisplay = React61.forwardRef(({ icons: Icons, ...props }, for
|
|
|
40779
41200
|
...props,
|
|
40780
41201
|
className,
|
|
40781
41202
|
"data-action": actionDataAttr,
|
|
40782
|
-
ref:
|
|
41203
|
+
ref: forwardRef16
|
|
40783
41204
|
}, /* @__PURE__ */ React61.createElement("div", { className: "vds-kb-text-wrapper" }, /* @__PURE__ */ React61.createElement("div", { className: "vds-kb-text" }, $text)), /* @__PURE__ */ React61.createElement("div", { className: "vds-kb-bezel", key: count4 }, /* @__PURE__ */ React61.createElement("div", { className: "vds-kb-icon" }, /* @__PURE__ */ React61.createElement(Icon4, null)))) : null;
|
|
40784
41205
|
});
|
|
40785
41206
|
DefaultKeyboardDisplay.displayName = "DefaultKeyboardDisplay";
|
|
40786
41207
|
function getText() {
|
|
40787
|
-
const { $state } =
|
|
41208
|
+
const { $state } = useContext45(mediaContext), action = $state.lastKeyboardAction()?.action, audioGain = $state.audioGain() ?? 1;
|
|
40788
41209
|
switch (action) {
|
|
40789
41210
|
case "toggleMuted":
|
|
40790
41211
|
return $state.muted() ? "0%" : getVolumeText($state.volume(), audioGain);
|
|
@@ -40799,7 +41220,7 @@ function getVolumeText(volume, gain) {
|
|
|
40799
41220
|
return `${Math.round(volume * gain * 100)}%`;
|
|
40800
41221
|
}
|
|
40801
41222
|
function getIcon(Icons) {
|
|
40802
|
-
const { $state } =
|
|
41223
|
+
const { $state } = useContext45(mediaContext), action = $state.lastKeyboardAction()?.action;
|
|
40803
41224
|
switch (action) {
|
|
40804
41225
|
case "togglePaused":
|
|
40805
41226
|
return !$state.paused() ? Icons.Play : Icons.Pause;
|
|
@@ -40991,10 +41412,10 @@ import"react-dom";
|
|
|
40991
41412
|
"use client";
|
|
40992
41413
|
|
|
40993
41414
|
// src/components/prompts/MuxPlayer.tsx
|
|
40994
|
-
import { useCallback as
|
|
41415
|
+
import { useCallback as useCallback33 } from "react";
|
|
40995
41416
|
import { jsx as jsx40, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
40996
41417
|
var MuxPlayer = ({ playbackId, title, rounded = true }) => {
|
|
40997
|
-
const onProviderChange =
|
|
41418
|
+
const onProviderChange = useCallback33((provider2, _e) => {
|
|
40998
41419
|
if (isHLSProvider(provider2)) {
|
|
40999
41420
|
provider2.library = () => import("hls.js");
|
|
41000
41421
|
}
|
|
@@ -41091,7 +41512,7 @@ var PromptsSubmitPage = () => {
|
|
|
41091
41512
|
};
|
|
41092
41513
|
}, []);
|
|
41093
41514
|
const fileInputRef = useRef45(null);
|
|
41094
|
-
const startUpload =
|
|
41515
|
+
const startUpload = useCallback34(async (file) => {
|
|
41095
41516
|
setUploadState({ type: "uploading", progress: 0 });
|
|
41096
41517
|
try {
|
|
41097
41518
|
const res = await fetch(`${REMOTION_PRO_ORIGIN}/api/prompts/upload`, {
|
|
@@ -41140,13 +41561,13 @@ var PromptsSubmitPage = () => {
|
|
|
41140
41561
|
});
|
|
41141
41562
|
}
|
|
41142
41563
|
}, []);
|
|
41143
|
-
const onFileSelect =
|
|
41564
|
+
const onFileSelect = useCallback34((e2) => {
|
|
41144
41565
|
const file = e2.target.files?.[0];
|
|
41145
41566
|
if (!file)
|
|
41146
41567
|
return;
|
|
41147
41568
|
startUpload(file);
|
|
41148
41569
|
}, [startUpload]);
|
|
41149
|
-
const onDrop =
|
|
41570
|
+
const onDrop = useCallback34((e2) => {
|
|
41150
41571
|
e2.preventDefault();
|
|
41151
41572
|
setIsDragging(false);
|
|
41152
41573
|
if (uploadState.type !== "idle")
|
|
@@ -41158,21 +41579,21 @@ var PromptsSubmitPage = () => {
|
|
|
41158
41579
|
return;
|
|
41159
41580
|
startUpload(file);
|
|
41160
41581
|
}, [startUpload, uploadState.type]);
|
|
41161
|
-
const onDragOver =
|
|
41582
|
+
const onDragOver = useCallback34((e2) => {
|
|
41162
41583
|
e2.preventDefault();
|
|
41163
41584
|
}, []);
|
|
41164
|
-
const onDragEnter =
|
|
41585
|
+
const onDragEnter = useCallback34(() => {
|
|
41165
41586
|
if (uploadState.type === "idle") {
|
|
41166
41587
|
setIsDragging(true);
|
|
41167
41588
|
}
|
|
41168
41589
|
}, [uploadState.type]);
|
|
41169
|
-
const onDragLeave =
|
|
41590
|
+
const onDragLeave = useCallback34((e2) => {
|
|
41170
41591
|
if (e2.currentTarget === e2.target) {
|
|
41171
41592
|
setIsDragging(false);
|
|
41172
41593
|
}
|
|
41173
41594
|
}, []);
|
|
41174
41595
|
const submitPossible = title.length > 0 && title.length <= 80 && prompt.length > 0 && usernameType && username.length > 0 && uploadState.type === "ready" && (submitStatus.type === "idle" || submitStatus.type === "error");
|
|
41175
|
-
const submit =
|
|
41596
|
+
const submit = useCallback34(async () => {
|
|
41176
41597
|
if (!submitPossible || uploadState.type !== "ready")
|
|
41177
41598
|
return;
|
|
41178
41599
|
setSubmitStatus({ type: "submitting" });
|