@remotion/promo-pages 4.0.475 → 4.0.476
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 +415 -364
- package/dist/cn.d.ts +2 -0
- package/dist/cn.js +5 -0
- package/dist/components/3DEngine/ButtonDemo.d.ts +2 -0
- package/dist/components/3DEngine/ButtonDemo.js +43 -0
- package/dist/components/3DEngine/Faces.d.ts +5 -0
- package/dist/components/3DEngine/Faces.js +7 -0
- package/dist/components/3DEngine/Outer.d.ts +8 -0
- package/dist/components/3DEngine/Outer.js +56 -0
- package/dist/components/3DEngine/Switch.d.ts +4 -0
- package/dist/components/3DEngine/Switch.js +4 -0
- package/dist/components/3DEngine/get-child-node-from.d.ts +1 -0
- package/dist/components/3DEngine/get-child-node-from.js +14 -0
- package/dist/components/3DEngine/hover-transforms.d.ts +9 -0
- package/dist/components/3DEngine/hover-transforms.js +177 -0
- package/dist/components/BackButton.d.ts +6 -0
- package/dist/components/BackButton.js +9 -0
- package/dist/components/CommandCopyButton.d.ts +5 -0
- package/dist/components/CommandCopyButton.js +4 -0
- package/dist/components/Homepage.d.ts +6 -0
- package/dist/components/Homepage.js +20 -0
- package/dist/components/ManageTeamMembers.d.ts +2 -0
- package/dist/components/ManageTeamMembers.js +42 -0
- package/dist/components/Spinner.d.ts +3 -0
- package/dist/components/Spinner.js +4 -0
- package/dist/components/TeamPicture.d.ts +1 -0
- package/dist/components/TeamPicture.js +4 -0
- package/dist/components/design.d.ts +1 -0
- package/dist/components/design.js +33 -0
- package/dist/components/experts/ExpertsPage.d.ts +11 -0
- package/dist/components/experts/ExpertsPage.js +50 -0
- package/dist/components/experts/experts-data.d.ts +19 -0
- package/dist/components/experts/experts-data.js +391 -0
- package/dist/components/experts/experts-icons.d.ts +8 -0
- package/dist/components/experts/experts-icons.js +42 -0
- package/dist/components/experts.d.ts +3 -0
- package/dist/components/experts.js +2 -0
- package/dist/components/homepage/AutomationsSection.d.ts +3 -0
- package/dist/components/homepage/AutomationsSection.js +85 -0
- package/dist/components/homepage/BackgroundAnimation.d.ts +2 -0
- package/dist/components/homepage/BackgroundAnimation.js +66 -0
- package/dist/components/homepage/ChooseTemplate.d.ts +2 -0
- package/dist/components/homepage/ChooseTemplate.js +25 -0
- package/dist/components/homepage/CommunityStats.d.ts +3 -0
- package/dist/components/homepage/CommunityStats.js +6 -0
- package/dist/components/homepage/CommunityStatsItems.d.ts +7 -0
- package/dist/components/homepage/CommunityStatsItems.js +58 -0
- package/dist/components/homepage/Demo/Card.d.ts +15 -0
- package/dist/components/homepage/Demo/Card.js +174 -0
- package/dist/components/homepage/Demo/Cards.d.ts +15 -0
- package/dist/components/homepage/Demo/Cards.js +57 -0
- package/dist/components/homepage/Demo/Comp.d.ts +38 -0
- package/dist/components/homepage/Demo/Comp.js +72 -0
- package/dist/components/homepage/Demo/CurrentCountry.d.ts +9 -0
- package/dist/components/homepage/Demo/CurrentCountry.js +48 -0
- package/dist/components/homepage/Demo/DemoError.d.ts +2 -0
- package/dist/components/homepage/Demo/DemoError.js +10 -0
- package/dist/components/homepage/Demo/DemoErrorIcon.d.ts +2 -0
- package/dist/components/homepage/Demo/DemoErrorIcon.js +16 -0
- package/dist/components/homepage/Demo/DemoRender.d.ts +33 -0
- package/dist/components/homepage/Demo/DemoRender.js +107 -0
- package/dist/components/homepage/Demo/DigitWheel.d.ts +9 -0
- package/dist/components/homepage/Demo/DigitWheel.js +94 -0
- package/dist/components/homepage/Demo/DisplayedEmoji.d.ts +5 -0
- package/dist/components/homepage/Demo/DisplayedEmoji.js +59 -0
- package/dist/components/homepage/Demo/DoneCheckmark.d.ts +2 -0
- package/dist/components/homepage/Demo/DoneCheckmark.js +20 -0
- package/dist/components/homepage/Demo/DownloadNudge.d.ts +2 -0
- package/dist/components/homepage/Demo/DownloadNudge.js +27 -0
- package/dist/components/homepage/Demo/DragAndDropNudge.d.ts +3 -0
- package/dist/components/homepage/Demo/DragAndDropNudge.js +26 -0
- package/dist/components/homepage/Demo/EmojiCard.d.ts +10 -0
- package/dist/components/homepage/Demo/EmojiCard.js +120 -0
- package/dist/components/homepage/Demo/Minus.d.ts +5 -0
- package/dist/components/homepage/Demo/Minus.js +11 -0
- package/dist/components/homepage/Demo/PlayPauseButton.d.ts +5 -0
- package/dist/components/homepage/Demo/PlayPauseButton.js +47 -0
- package/dist/components/homepage/Demo/PlayerControls.d.ts +8 -0
- package/dist/components/homepage/Demo/PlayerControls.js +15 -0
- package/dist/components/homepage/Demo/PlayerSeekBar.d.ts +11 -0
- package/dist/components/homepage/Demo/PlayerSeekBar.js +216 -0
- package/dist/components/homepage/Demo/PlayerVolume.d.ts +5 -0
- package/dist/components/homepage/Demo/PlayerVolume.js +53 -0
- package/dist/components/homepage/Demo/Progress.d.ts +4 -0
- package/dist/components/homepage/Demo/Progress.js +14 -0
- package/dist/components/homepage/Demo/Spinner.d.ts +5 -0
- package/dist/components/homepage/Demo/Spinner.js +37 -0
- package/dist/components/homepage/Demo/Switcher.d.ts +6 -0
- package/dist/components/homepage/Demo/Switcher.js +25 -0
- package/dist/components/homepage/Demo/Temperature.d.ts +6 -0
- package/dist/components/homepage/Demo/Temperature.js +21 -0
- package/dist/components/homepage/Demo/TemperatureNumber.d.ts +5 -0
- package/dist/components/homepage/Demo/TemperatureNumber.js +36 -0
- package/dist/components/homepage/Demo/ThemeNudge.d.ts +3 -0
- package/dist/components/homepage/Demo/ThemeNudge.js +35 -0
- package/dist/components/homepage/Demo/TimeDisplay.d.ts +6 -0
- package/dist/components/homepage/Demo/TimeDisplay.js +27 -0
- package/dist/components/homepage/Demo/TrendingRepos.d.ts +6 -0
- package/dist/components/homepage/Demo/TrendingRepos.js +65 -0
- package/dist/components/homepage/Demo/icons.d.ts +10 -0
- package/dist/components/homepage/Demo/icons.js +22 -0
- package/dist/components/homepage/Demo/index.d.ts +2 -0
- package/dist/components/homepage/Demo/index.js +95 -0
- package/dist/components/homepage/Demo/math.d.ts +10 -0
- package/dist/components/homepage/Demo/math.js +29 -0
- package/dist/components/homepage/Demo/types.d.ts +6 -0
- package/dist/components/homepage/Demo/types.js +0 -0
- package/dist/components/homepage/EvaluateRemotion.d.ts +3 -0
- package/dist/components/homepage/EvaluateRemotion.js +21 -0
- package/dist/components/homepage/FreePricing.d.ts +4 -0
- package/dist/components/homepage/FreePricing.js +133 -0
- package/dist/components/homepage/GetStartedStrip.d.ts +2 -0
- package/dist/components/homepage/GetStartedStrip.js +14 -0
- package/dist/components/homepage/GitHubButton.d.ts +2 -0
- package/dist/components/homepage/GitHubButton.js +7 -0
- package/dist/components/homepage/IconForTemplate.d.ts +6 -0
- package/dist/components/homepage/IconForTemplate.js +105 -0
- package/dist/components/homepage/IfYouKnowReact.d.ts +3 -0
- package/dist/components/homepage/IfYouKnowReact.js +23 -0
- package/dist/components/homepage/MoreTemplatesButton.d.ts +2 -0
- package/dist/components/homepage/MoreTemplatesButton.js +11 -0
- package/dist/components/homepage/MuxVideo.d.ts +7 -0
- package/dist/components/homepage/MuxVideo.js +45 -0
- package/dist/components/homepage/NewsletterButton.d.ts +2 -0
- package/dist/components/homepage/NewsletterButton.js +38 -0
- package/dist/components/homepage/ParameterizeAndEdit.d.ts +2 -0
- package/dist/components/homepage/ParameterizeAndEdit.js +22 -0
- package/dist/components/homepage/Pricing.d.ts +2 -0
- package/dist/components/homepage/Pricing.js +15 -0
- package/dist/components/homepage/PricingBulletPoint.d.ts +6 -0
- package/dist/components/homepage/PricingBulletPoint.js +19 -0
- package/dist/components/homepage/RealMp4Videos.d.ts +2 -0
- package/dist/components/homepage/RealMp4Videos.js +41 -0
- package/dist/components/homepage/Spacer.d.ts +2 -0
- package/dist/components/homepage/Spacer.js +4 -0
- package/dist/components/homepage/TemplateIcon.d.ts +5 -0
- package/dist/components/homepage/TemplateIcon.js +24 -0
- package/dist/components/homepage/TextInput.d.ts +7 -0
- package/dist/components/homepage/TextInput.js +34 -0
- package/dist/components/homepage/TrustedByBanner.d.ts +2 -0
- package/dist/components/homepage/TrustedByBanner.js +27 -0
- package/dist/components/homepage/VideoApps.d.ts +4 -0
- package/dist/components/homepage/VideoApps.js +72 -0
- package/dist/components/homepage/VideoAppsShowcase.d.ts +2 -0
- package/dist/components/homepage/VideoAppsShowcase.js +139 -0
- package/dist/components/homepage/VideoAppsTitle.d.ts +4 -0
- package/dist/components/homepage/VideoAppsTitle.js +4 -0
- package/dist/components/homepage/VideoPlayerWithControls.d.ts +20 -0
- package/dist/components/homepage/VideoPlayerWithControls.js +105 -0
- package/dist/components/homepage/WriteInReact.d.ts +2 -0
- package/dist/components/homepage/WriteInReact.js +10 -0
- package/dist/components/homepage/YouAreHere.d.ts +2 -0
- package/dist/components/homepage/YouAreHere.js +23 -0
- package/dist/components/homepage/layout/Button.d.ts +22 -0
- package/dist/components/homepage/layout/Button.js +30 -0
- package/dist/components/homepage/layout/colors.d.ts +13 -0
- package/dist/components/homepage/layout/colors.js +14 -0
- package/dist/components/homepage/layout/use-color-mode.d.ts +21 -0
- package/dist/components/homepage/layout/use-color-mode.js +22 -0
- package/dist/components/homepage/layout/use-el-size.d.ts +5 -0
- package/dist/components/homepage/layout/use-el-size.js +40 -0
- package/dist/components/homepage/layout/use-mobile-layout.d.ts +1 -0
- package/dist/components/homepage/layout/use-mobile-layout.js +6 -0
- package/dist/components/icons/blank.d.ts +3 -0
- package/dist/components/icons/blank.js +4 -0
- package/dist/components/icons/brain.d.ts +2 -0
- package/dist/components/icons/brain.js +4 -0
- package/dist/components/icons/clone.d.ts +2 -0
- package/dist/components/icons/clone.js +2 -0
- package/dist/components/icons/code-hike.d.ts +3 -0
- package/dist/components/icons/code-hike.js +4 -0
- package/dist/components/icons/cubes.d.ts +3 -0
- package/dist/components/icons/cubes.js +4 -0
- package/dist/components/icons/editor.d.ts +3 -0
- package/dist/components/icons/editor.js +4 -0
- package/dist/components/icons/electron.d.ts +4 -0
- package/dist/components/icons/electron.js +4 -0
- package/dist/components/icons/js.d.ts +3 -0
- package/dist/components/icons/js.js +4 -0
- package/dist/components/icons/music.d.ts +2 -0
- package/dist/components/icons/music.js +4 -0
- package/dist/components/icons/next.d.ts +4 -0
- package/dist/components/icons/next.js +4 -0
- package/dist/components/icons/overlay.d.ts +3 -0
- package/dist/components/icons/overlay.js +4 -0
- package/dist/components/icons/prompt-to-video.d.ts +2 -0
- package/dist/components/icons/prompt-to-video.js +4 -0
- package/dist/components/icons/recorder.d.ts +3 -0
- package/dist/components/icons/recorder.js +4 -0
- package/dist/components/icons/remix.d.ts +3 -0
- package/dist/components/icons/remix.js +4 -0
- package/dist/components/icons/render-server.d.ts +3 -0
- package/dist/components/icons/render-server.js +4 -0
- package/dist/components/icons/skia.d.ts +3 -0
- package/dist/components/icons/skia.js +4 -0
- package/dist/components/icons/stargazer.d.ts +3 -0
- package/dist/components/icons/stargazer.js +4 -0
- package/dist/components/icons/still.d.ts +3 -0
- package/dist/components/icons/still.js +4 -0
- package/dist/components/icons/tailwind.d.ts +3 -0
- package/dist/components/icons/tailwind.js +4 -0
- package/dist/components/icons/tiktok.d.ts +3 -0
- package/dist/components/icons/tiktok.js +4 -0
- package/dist/components/icons/timeline.d.ts +3 -0
- package/dist/components/icons/timeline.js +4 -0
- package/dist/components/icons/ts.d.ts +3 -0
- package/dist/components/icons/ts.js +4 -0
- package/dist/components/icons/undo.d.ts +3 -0
- package/dist/components/icons/undo.js +2 -0
- package/dist/components/icons/vercel.d.ts +4 -0
- package/dist/components/icons/vercel.js +4 -0
- package/dist/components/icons/waveform.d.ts +3 -0
- package/dist/components/icons/waveform.js +4 -0
- package/dist/components/prompts/CardLikeButton.d.ts +5 -0
- package/dist/components/prompts/CardLikeButton.js +49 -0
- package/dist/components/prompts/ClipboardIcon.d.ts +5 -0
- package/dist/components/prompts/ClipboardIcon.js +4 -0
- package/dist/components/prompts/CopyPromptButton.d.ts +4 -0
- package/dist/components/prompts/CopyPromptButton.js +13 -0
- package/dist/components/prompts/LikeButton.d.ts +5 -0
- package/dist/components/prompts/LikeButton.js +49 -0
- package/dist/components/prompts/MuxPlayer.d.ts +8 -0
- package/dist/components/prompts/MuxPlayer.js +21 -0
- package/dist/components/prompts/NewBackButton.d.ts +5 -0
- package/dist/components/prompts/NewBackButton.js +8 -0
- package/dist/components/prompts/Page.d.ts +8 -0
- package/dist/components/prompts/Page.js +7 -0
- package/dist/components/prompts/PromptsGallery.d.ts +7 -0
- package/dist/components/prompts/PromptsGallery.js +60 -0
- package/dist/components/prompts/PromptsShow.d.ts +5 -0
- package/dist/components/prompts/PromptsShow.js +17 -0
- package/dist/components/prompts/PromptsSubmit.d.ts +2 -0
- package/dist/components/prompts/PromptsSubmit.js +173 -0
- package/dist/components/prompts/config.d.ts +1 -0
- package/dist/components/prompts/config.js +1 -0
- package/dist/components/prompts/prompt-helpers.d.ts +8 -0
- package/dist/components/prompts/prompt-helpers.js +76 -0
- package/dist/components/prompts/prompt-types.d.ts +14 -0
- package/dist/components/prompts/prompt-types.js +0 -0
- package/dist/components/prompts/use-heart-animation.d.ts +5 -0
- package/dist/components/prompts/use-heart-animation.js +29 -0
- package/dist/components/team/TeamCards.d.ts +6 -0
- package/dist/components/team/TeamCards.js +19 -0
- package/dist/components/team/TitleTeamCards.d.ts +2 -0
- package/dist/components/team/TitleTeamCards.js +6 -0
- package/dist/components/team/TrustSection.d.ts +2 -0
- package/dist/components/team/TrustSection.js +59 -0
- package/dist/components/team.d.ts +3 -0
- package/dist/components/team.js +15 -0
- package/dist/components/template-modal-content.d.ts +5 -0
- package/dist/components/template-modal-content.js +73 -0
- package/dist/components/templates.d.ts +2 -0
- package/dist/components/templates.js +27 -0
- package/dist/design.js +527 -490
- package/dist/experts.js +527 -490
- package/dist/helpers/mobile-layout.d.ts +1 -0
- package/dist/helpers/mobile-layout.js +6 -0
- package/dist/helpers/use-el-size.d.ts +5 -0
- package/dist/helpers/use-el-size.js +40 -0
- package/dist/homepage/Pricing.js +527 -490
- package/dist/main.d.ts +1 -0
- package/dist/main.js +6 -0
- package/dist/prompts/PromptsGallery.js +527 -490
- package/dist/prompts/PromptsShow.js +527 -490
- package/dist/prompts/PromptsSubmit.js +527 -490
- package/dist/prompts-show.d.ts +1 -0
- package/dist/prompts-show.js +20 -0
- package/dist/prompts-submit.d.ts +1 -0
- package/dist/prompts-submit.js +6 -0
- package/dist/prompts.d.ts +1 -0
- package/dist/prompts.js +6 -0
- package/dist/team.d.ts +1 -0
- package/dist/team.js +527 -490
- package/dist/template-modal-content.js +527 -490
- package/dist/templates.js +527 -490
- package/package.json +13 -13
|
@@ -22898,7 +22898,7 @@ var getComponentsToAddStacksTo = () => componentsToAddStacksTo;
|
|
|
22898
22898
|
var addSequenceStackTraces = (component) => {
|
|
22899
22899
|
componentsToAddStacksTo.push(component);
|
|
22900
22900
|
};
|
|
22901
|
-
var VERSION = "4.0.
|
|
22901
|
+
var VERSION = "4.0.476";
|
|
22902
22902
|
var checkMultipleRemotionVersions = () => {
|
|
22903
22903
|
if (typeof globalThis === "undefined") {
|
|
22904
22904
|
return;
|
|
@@ -23332,6 +23332,18 @@ var hiddenField = {
|
|
|
23332
23332
|
default: false,
|
|
23333
23333
|
description: "Hidden"
|
|
23334
23334
|
};
|
|
23335
|
+
var showInTimelineField = {
|
|
23336
|
+
type: "hidden"
|
|
23337
|
+
};
|
|
23338
|
+
var sequenceNameField = {
|
|
23339
|
+
type: "hidden"
|
|
23340
|
+
};
|
|
23341
|
+
var extendSchemaWithSequenceName = (schema) => {
|
|
23342
|
+
return {
|
|
23343
|
+
name: sequenceNameField,
|
|
23344
|
+
...schema
|
|
23345
|
+
};
|
|
23346
|
+
};
|
|
23335
23347
|
var durationInFramesField = {
|
|
23336
23348
|
type: "number",
|
|
23337
23349
|
default: undefined,
|
|
@@ -23345,8 +23357,9 @@ var fromField = {
|
|
|
23345
23357
|
step: 1,
|
|
23346
23358
|
hiddenFromList: true
|
|
23347
23359
|
};
|
|
23348
|
-
var sequenceSchema = {
|
|
23360
|
+
var sequenceSchema = extendSchemaWithSequenceName({
|
|
23349
23361
|
hidden: hiddenField,
|
|
23362
|
+
showInTimeline: showInTimelineField,
|
|
23350
23363
|
from: fromField,
|
|
23351
23364
|
durationInFrames: durationInFramesField,
|
|
23352
23365
|
layout: {
|
|
@@ -23358,12 +23371,13 @@ var sequenceSchema = {
|
|
|
23358
23371
|
none: {}
|
|
23359
23372
|
}
|
|
23360
23373
|
}
|
|
23361
|
-
};
|
|
23362
|
-
var sequenceSchemaWithoutFrom = {
|
|
23374
|
+
});
|
|
23375
|
+
var sequenceSchemaWithoutFrom = extendSchemaWithSequenceName({
|
|
23363
23376
|
hidden: hiddenField,
|
|
23377
|
+
showInTimeline: showInTimelineField,
|
|
23364
23378
|
durationInFrames: durationInFramesField,
|
|
23365
23379
|
layout: sequenceSchema.layout
|
|
23366
|
-
};
|
|
23380
|
+
});
|
|
23367
23381
|
var sequenceSchemaDefaultLayoutNone = {
|
|
23368
23382
|
...sequenceSchema,
|
|
23369
23383
|
layout: {
|
|
@@ -23707,81 +23721,6 @@ function bezier(mX1, mY1, mX2, mY2) {
|
|
|
23707
23721
|
return calcBezier(getTForX(clampedX), mY1, mY2);
|
|
23708
23722
|
};
|
|
23709
23723
|
}
|
|
23710
|
-
var clampUnit = (t) => Math.min(1, Math.max(0, t));
|
|
23711
|
-
|
|
23712
|
-
class Easing {
|
|
23713
|
-
static step0(n) {
|
|
23714
|
-
return n > 0 ? 1 : 0;
|
|
23715
|
-
}
|
|
23716
|
-
static step1(n) {
|
|
23717
|
-
return n >= 1 ? 1 : 0;
|
|
23718
|
-
}
|
|
23719
|
-
static linear(t) {
|
|
23720
|
-
return t;
|
|
23721
|
-
}
|
|
23722
|
-
static ease(t) {
|
|
23723
|
-
return Easing.bezier(0.42, 0, 1, 1)(t);
|
|
23724
|
-
}
|
|
23725
|
-
static quad(t) {
|
|
23726
|
-
return t * t;
|
|
23727
|
-
}
|
|
23728
|
-
static cubic(t) {
|
|
23729
|
-
return t * t * t;
|
|
23730
|
-
}
|
|
23731
|
-
static poly(n) {
|
|
23732
|
-
return (t) => t ** n;
|
|
23733
|
-
}
|
|
23734
|
-
static sin(t) {
|
|
23735
|
-
return 1 - Math.cos(t * Math.PI / 2);
|
|
23736
|
-
}
|
|
23737
|
-
static circle(t) {
|
|
23738
|
-
const u = clampUnit(t);
|
|
23739
|
-
return 1 - Math.sqrt(1 - u * u);
|
|
23740
|
-
}
|
|
23741
|
-
static exp(t) {
|
|
23742
|
-
return 2 ** (10 * (t - 1));
|
|
23743
|
-
}
|
|
23744
|
-
static elastic(bounciness = 1) {
|
|
23745
|
-
const p = bounciness * Math.PI;
|
|
23746
|
-
return (t) => 1 - Math.cos(t * Math.PI / 2) ** 3 * Math.cos(t * p);
|
|
23747
|
-
}
|
|
23748
|
-
static back(s = 1.70158) {
|
|
23749
|
-
return (t) => t * t * ((s + 1) * t - s);
|
|
23750
|
-
}
|
|
23751
|
-
static bounce(t) {
|
|
23752
|
-
const u = clampUnit(t);
|
|
23753
|
-
if (u < 1 / 2.75) {
|
|
23754
|
-
return 7.5625 * u * u;
|
|
23755
|
-
}
|
|
23756
|
-
if (u < 2 / 2.75) {
|
|
23757
|
-
const t2_ = u - 1.5 / 2.75;
|
|
23758
|
-
return 7.5625 * t2_ * t2_ + 0.75;
|
|
23759
|
-
}
|
|
23760
|
-
if (u < 2.5 / 2.75) {
|
|
23761
|
-
const t2_ = u - 2.25 / 2.75;
|
|
23762
|
-
return 7.5625 * t2_ * t2_ + 0.9375;
|
|
23763
|
-
}
|
|
23764
|
-
const t2 = u - 2.625 / 2.75;
|
|
23765
|
-
return 7.5625 * t2 * t2 + 0.984375;
|
|
23766
|
-
}
|
|
23767
|
-
static bezier(x1, y1, x2, y2) {
|
|
23768
|
-
return bezier(x1, y1, x2, y2);
|
|
23769
|
-
}
|
|
23770
|
-
static in(easing) {
|
|
23771
|
-
return easing;
|
|
23772
|
-
}
|
|
23773
|
-
static out(easing) {
|
|
23774
|
-
return (t) => 1 - easing(1 - t);
|
|
23775
|
-
}
|
|
23776
|
-
static inOut(easing) {
|
|
23777
|
-
return (t) => {
|
|
23778
|
-
if (t < 0.5) {
|
|
23779
|
-
return easing(t * 2) / 2;
|
|
23780
|
-
}
|
|
23781
|
-
return 1 - easing((1 - t) * 2) / 2;
|
|
23782
|
-
};
|
|
23783
|
-
}
|
|
23784
|
-
}
|
|
23785
23724
|
var normalizeNumber = (value) => {
|
|
23786
23725
|
return Math.round(value * 1e6) / 1e6;
|
|
23787
23726
|
};
|
|
@@ -24284,130 +24223,480 @@ function interpolate(input, inputRange, outputRange, options) {
|
|
|
24284
24223
|
checkInfiniteRange("outputRange", outputRange);
|
|
24285
24224
|
return interpolateNumber({ input, inputRange, outputRange, options });
|
|
24286
24225
|
}
|
|
24287
|
-
var
|
|
24288
|
-
|
|
24289
|
-
|
|
24290
|
-
|
|
24291
|
-
}
|
|
24292
|
-
|
|
24293
|
-
|
|
24294
|
-
return new RegExp(name + "\\(\\s*(" + MODERN_VALUE + ")\\s+(" + MODERN_VALUE + ")\\s+(" + MODERN_VALUE + ")(?:\\s*\\/\\s*(" + MODERN_VALUE + "))?\\s*\\)");
|
|
24295
|
-
}
|
|
24296
|
-
function getMatchers() {
|
|
24297
|
-
const cachedMatchers = {
|
|
24298
|
-
rgb: undefined,
|
|
24299
|
-
rgba: undefined,
|
|
24300
|
-
hsl: undefined,
|
|
24301
|
-
hsla: undefined,
|
|
24302
|
-
hex3: undefined,
|
|
24303
|
-
hex4: undefined,
|
|
24304
|
-
hex5: undefined,
|
|
24305
|
-
hex6: undefined,
|
|
24306
|
-
hex8: undefined,
|
|
24307
|
-
oklch: undefined,
|
|
24308
|
-
oklab: undefined,
|
|
24309
|
-
lab: undefined,
|
|
24310
|
-
lch: undefined,
|
|
24311
|
-
hwb: undefined
|
|
24312
|
-
};
|
|
24313
|
-
if (cachedMatchers.rgb === undefined) {
|
|
24314
|
-
cachedMatchers.rgb = new RegExp("rgb" + call(NUMBER, NUMBER, NUMBER));
|
|
24315
|
-
cachedMatchers.rgba = new RegExp("rgba" + call(NUMBER, NUMBER, NUMBER, NUMBER));
|
|
24316
|
-
cachedMatchers.hsl = new RegExp("hsl" + call(NUMBER, PERCENTAGE, PERCENTAGE));
|
|
24317
|
-
cachedMatchers.hsla = new RegExp("hsla" + call(NUMBER, PERCENTAGE, PERCENTAGE, NUMBER));
|
|
24318
|
-
cachedMatchers.hex3 = /^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/;
|
|
24319
|
-
cachedMatchers.hex4 = /^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/;
|
|
24320
|
-
cachedMatchers.hex6 = /^#([0-9a-fA-F]{6})$/;
|
|
24321
|
-
cachedMatchers.hex8 = /^#([0-9a-fA-F]{8})$/;
|
|
24322
|
-
cachedMatchers.oklch = modernColorCall("oklch");
|
|
24323
|
-
cachedMatchers.oklab = modernColorCall("oklab");
|
|
24324
|
-
cachedMatchers.lab = modernColorCall("lab");
|
|
24325
|
-
cachedMatchers.lch = modernColorCall("lch");
|
|
24326
|
-
cachedMatchers.hwb = modernColorCall("hwb");
|
|
24327
|
-
}
|
|
24328
|
-
return cachedMatchers;
|
|
24329
|
-
}
|
|
24330
|
-
function hue2rgb(p, q, t) {
|
|
24331
|
-
if (t < 0) {
|
|
24332
|
-
t += 1;
|
|
24226
|
+
var validateFrame = ({
|
|
24227
|
+
allowFloats,
|
|
24228
|
+
durationInFrames,
|
|
24229
|
+
frame
|
|
24230
|
+
}) => {
|
|
24231
|
+
if (typeof frame === "undefined") {
|
|
24232
|
+
throw new TypeError(`Argument missing for parameter "frame"`);
|
|
24333
24233
|
}
|
|
24334
|
-
if (
|
|
24335
|
-
|
|
24234
|
+
if (typeof frame !== "number") {
|
|
24235
|
+
throw new TypeError(`Argument passed for "frame" is not a number: ${frame}`);
|
|
24336
24236
|
}
|
|
24337
|
-
if (
|
|
24338
|
-
|
|
24237
|
+
if (!Number.isFinite(frame)) {
|
|
24238
|
+
throw new RangeError(`Frame ${frame} is not finite`);
|
|
24339
24239
|
}
|
|
24340
|
-
if (
|
|
24341
|
-
|
|
24240
|
+
if (frame % 1 !== 0 && !allowFloats) {
|
|
24241
|
+
throw new RangeError(`Argument for frame must be an integer, but got ${frame}`);
|
|
24342
24242
|
}
|
|
24343
|
-
if (
|
|
24344
|
-
|
|
24243
|
+
if (frame < 0 && frame < -durationInFrames) {
|
|
24244
|
+
throw new RangeError(`Cannot use frame ${frame}: Duration of composition is ${durationInFrames}, therefore the lowest frame that can be rendered is ${-durationInFrames}`);
|
|
24345
24245
|
}
|
|
24346
|
-
|
|
24347
|
-
}
|
|
24348
|
-
function hslToRgb(h, s, l) {
|
|
24349
|
-
const q = l < 0.5 ? l * (1 + s) : l + s - l * s;
|
|
24350
|
-
const p = 2 * l - q;
|
|
24351
|
-
const r2 = hue2rgb(p, q, h + 1 / 3);
|
|
24352
|
-
const g = hue2rgb(p, q, h);
|
|
24353
|
-
const b2 = hue2rgb(p, q, h - 1 / 3);
|
|
24354
|
-
return Math.round(r2 * 255) << 24 | Math.round(g * 255) << 16 | Math.round(b2 * 255) << 8;
|
|
24355
|
-
}
|
|
24356
|
-
function parse255(str) {
|
|
24357
|
-
const int = Number.parseInt(str, 10);
|
|
24358
|
-
if (int < 0) {
|
|
24359
|
-
return 0;
|
|
24246
|
+
if (frame > durationInFrames - 1) {
|
|
24247
|
+
throw new RangeError(`Cannot use frame ${frame}: Duration of composition is ${durationInFrames}, therefore the highest frame that can be rendered is ${durationInFrames - 1}`);
|
|
24360
24248
|
}
|
|
24361
|
-
|
|
24362
|
-
|
|
24249
|
+
};
|
|
24250
|
+
var validateSpringDuration = (dur) => {
|
|
24251
|
+
if (typeof dur === "undefined") {
|
|
24252
|
+
return;
|
|
24363
24253
|
}
|
|
24364
|
-
|
|
24365
|
-
}
|
|
24366
|
-
function parse360(str) {
|
|
24367
|
-
const int = Number.parseFloat(str);
|
|
24368
|
-
return (int % 360 + 360) % 360 / 360;
|
|
24369
|
-
}
|
|
24370
|
-
function parse1(str) {
|
|
24371
|
-
const num = Number.parseFloat(str);
|
|
24372
|
-
if (num < 0) {
|
|
24373
|
-
return 0;
|
|
24254
|
+
if (typeof dur !== "number") {
|
|
24255
|
+
throw new TypeError(`A "duration" of a spring must be a "number" but is "${typeof dur}"`);
|
|
24374
24256
|
}
|
|
24375
|
-
if (
|
|
24376
|
-
|
|
24257
|
+
if (Number.isNaN(dur)) {
|
|
24258
|
+
throw new TypeError('A "duration" of a spring is NaN, which it must not be');
|
|
24377
24259
|
}
|
|
24378
|
-
|
|
24379
|
-
|
|
24380
|
-
function parsePercentage(str) {
|
|
24381
|
-
const int = Number.parseFloat(str);
|
|
24382
|
-
if (int < 0) {
|
|
24383
|
-
return 0;
|
|
24260
|
+
if (!Number.isFinite(dur)) {
|
|
24261
|
+
throw new TypeError('A "duration" of a spring must be finite, but is ' + dur);
|
|
24384
24262
|
}
|
|
24385
|
-
if (
|
|
24386
|
-
|
|
24263
|
+
if (dur <= 0) {
|
|
24264
|
+
throw new TypeError('A "duration" of a spring must be positive, but is ' + dur);
|
|
24387
24265
|
}
|
|
24388
|
-
|
|
24389
|
-
|
|
24390
|
-
|
|
24391
|
-
|
|
24392
|
-
|
|
24393
|
-
|
|
24394
|
-
|
|
24266
|
+
};
|
|
24267
|
+
var defaultSpringConfig = {
|
|
24268
|
+
damping: 10,
|
|
24269
|
+
mass: 1,
|
|
24270
|
+
stiffness: 100,
|
|
24271
|
+
overshootClamping: false
|
|
24272
|
+
};
|
|
24273
|
+
var advanceCache = {};
|
|
24274
|
+
function advance({
|
|
24275
|
+
animation,
|
|
24276
|
+
now,
|
|
24277
|
+
config
|
|
24278
|
+
}) {
|
|
24279
|
+
const { toValue: toValue2, lastTimestamp, current, velocity } = animation;
|
|
24280
|
+
const deltaTime = Math.min(now - lastTimestamp, 64);
|
|
24281
|
+
if (config.damping <= 0) {
|
|
24282
|
+
throw new Error("Spring damping must be greater than 0, otherwise the spring() animation will never end, causing an infinite loop.");
|
|
24395
24283
|
}
|
|
24396
|
-
|
|
24397
|
-
|
|
24398
|
-
|
|
24399
|
-
|
|
24400
|
-
|
|
24401
|
-
|
|
24402
|
-
|
|
24284
|
+
const c2 = config.damping;
|
|
24285
|
+
const m = config.mass;
|
|
24286
|
+
const k = config.stiffness;
|
|
24287
|
+
const cacheKey = [
|
|
24288
|
+
toValue2,
|
|
24289
|
+
lastTimestamp,
|
|
24290
|
+
current,
|
|
24291
|
+
velocity,
|
|
24292
|
+
c2,
|
|
24293
|
+
m,
|
|
24294
|
+
k,
|
|
24295
|
+
now
|
|
24296
|
+
].join("-");
|
|
24297
|
+
if (advanceCache[cacheKey]) {
|
|
24298
|
+
return advanceCache[cacheKey];
|
|
24403
24299
|
}
|
|
24404
|
-
|
|
24405
|
-
|
|
24406
|
-
|
|
24407
|
-
|
|
24408
|
-
|
|
24409
|
-
|
|
24410
|
-
|
|
24300
|
+
const v0 = -velocity;
|
|
24301
|
+
const x0 = toValue2 - current;
|
|
24302
|
+
const zeta = c2 / (2 * Math.sqrt(k * m));
|
|
24303
|
+
const omega0 = Math.sqrt(k / m);
|
|
24304
|
+
const omega1 = omega0 * Math.sqrt(1 - zeta ** 2);
|
|
24305
|
+
const t = deltaTime / 1000;
|
|
24306
|
+
const sin1 = Math.sin(omega1 * t);
|
|
24307
|
+
const cos1 = Math.cos(omega1 * t);
|
|
24308
|
+
const underDampedEnvelope = Math.exp(-zeta * omega0 * t);
|
|
24309
|
+
const underDampedFrag1 = underDampedEnvelope * (sin1 * ((v0 + zeta * omega0 * x0) / omega1) + x0 * cos1);
|
|
24310
|
+
const underDampedPosition = toValue2 - underDampedFrag1;
|
|
24311
|
+
const underDampedVelocity = zeta * omega0 * underDampedFrag1 - underDampedEnvelope * (cos1 * (v0 + zeta * omega0 * x0) - omega1 * x0 * sin1);
|
|
24312
|
+
const criticallyDampedEnvelope = Math.exp(-omega0 * t);
|
|
24313
|
+
const criticallyDampedPosition = toValue2 - criticallyDampedEnvelope * (x0 + (v0 + omega0 * x0) * t);
|
|
24314
|
+
const criticallyDampedVelocity = criticallyDampedEnvelope * (v0 * (t * omega0 - 1) + t * x0 * omega0 * omega0);
|
|
24315
|
+
const animationNode = {
|
|
24316
|
+
toValue: toValue2,
|
|
24317
|
+
prevPosition: current,
|
|
24318
|
+
lastTimestamp: now,
|
|
24319
|
+
current: zeta < 1 ? underDampedPosition : criticallyDampedPosition,
|
|
24320
|
+
velocity: zeta < 1 ? underDampedVelocity : criticallyDampedVelocity
|
|
24321
|
+
};
|
|
24322
|
+
advanceCache[cacheKey] = animationNode;
|
|
24323
|
+
return animationNode;
|
|
24324
|
+
}
|
|
24325
|
+
var calculationCache = {};
|
|
24326
|
+
function springCalculation({
|
|
24327
|
+
frame,
|
|
24328
|
+
fps,
|
|
24329
|
+
config = {}
|
|
24330
|
+
}) {
|
|
24331
|
+
const from = 0;
|
|
24332
|
+
const to = 1;
|
|
24333
|
+
const cacheKey = [
|
|
24334
|
+
frame,
|
|
24335
|
+
fps,
|
|
24336
|
+
config.damping,
|
|
24337
|
+
config.mass,
|
|
24338
|
+
config.overshootClamping,
|
|
24339
|
+
config.stiffness
|
|
24340
|
+
].join("-");
|
|
24341
|
+
if (calculationCache[cacheKey]) {
|
|
24342
|
+
return calculationCache[cacheKey];
|
|
24343
|
+
}
|
|
24344
|
+
let animation = {
|
|
24345
|
+
lastTimestamp: 0,
|
|
24346
|
+
current: from,
|
|
24347
|
+
toValue: to,
|
|
24348
|
+
velocity: 0,
|
|
24349
|
+
prevPosition: 0
|
|
24350
|
+
};
|
|
24351
|
+
const frameClamped = Math.max(0, frame);
|
|
24352
|
+
const unevenRest = frameClamped % 1;
|
|
24353
|
+
for (let f = 0;f <= Math.floor(frameClamped); f++) {
|
|
24354
|
+
if (f === Math.floor(frameClamped)) {
|
|
24355
|
+
f += unevenRest;
|
|
24356
|
+
}
|
|
24357
|
+
const time = f / fps * 1000;
|
|
24358
|
+
animation = advance({
|
|
24359
|
+
animation,
|
|
24360
|
+
now: time,
|
|
24361
|
+
config: {
|
|
24362
|
+
...defaultSpringConfig,
|
|
24363
|
+
...config
|
|
24364
|
+
}
|
|
24365
|
+
});
|
|
24366
|
+
}
|
|
24367
|
+
calculationCache[cacheKey] = animation;
|
|
24368
|
+
return animation;
|
|
24369
|
+
}
|
|
24370
|
+
var cache = new Map;
|
|
24371
|
+
function measureSpring({
|
|
24372
|
+
fps,
|
|
24373
|
+
config = {},
|
|
24374
|
+
threshold = 0.005
|
|
24375
|
+
}) {
|
|
24376
|
+
if (typeof threshold !== "number") {
|
|
24377
|
+
throw new TypeError(`threshold must be a number, got ${threshold} of type ${typeof threshold}`);
|
|
24378
|
+
}
|
|
24379
|
+
if (threshold === 0) {
|
|
24380
|
+
return Infinity;
|
|
24381
|
+
}
|
|
24382
|
+
if (threshold === 1) {
|
|
24383
|
+
return 0;
|
|
24384
|
+
}
|
|
24385
|
+
if (isNaN(threshold)) {
|
|
24386
|
+
throw new TypeError("Threshold is NaN");
|
|
24387
|
+
}
|
|
24388
|
+
if (!Number.isFinite(threshold)) {
|
|
24389
|
+
throw new TypeError("Threshold is not finite");
|
|
24390
|
+
}
|
|
24391
|
+
if (threshold < 0) {
|
|
24392
|
+
throw new TypeError("Threshold is below 0");
|
|
24393
|
+
}
|
|
24394
|
+
const cacheKey = [
|
|
24395
|
+
fps,
|
|
24396
|
+
config.damping,
|
|
24397
|
+
config.mass,
|
|
24398
|
+
config.overshootClamping,
|
|
24399
|
+
config.stiffness,
|
|
24400
|
+
threshold
|
|
24401
|
+
].join("-");
|
|
24402
|
+
if (cache.has(cacheKey)) {
|
|
24403
|
+
return cache.get(cacheKey);
|
|
24404
|
+
}
|
|
24405
|
+
validateFps(fps, "to the measureSpring() function", false);
|
|
24406
|
+
let frame = 0;
|
|
24407
|
+
let finishedFrame = 0;
|
|
24408
|
+
const calc = () => {
|
|
24409
|
+
return springCalculation({
|
|
24410
|
+
fps,
|
|
24411
|
+
frame,
|
|
24412
|
+
config
|
|
24413
|
+
});
|
|
24414
|
+
};
|
|
24415
|
+
let animation = calc();
|
|
24416
|
+
const calcDifference = () => {
|
|
24417
|
+
return Math.abs(animation.current - animation.toValue);
|
|
24418
|
+
};
|
|
24419
|
+
let difference = calcDifference();
|
|
24420
|
+
while (difference >= threshold) {
|
|
24421
|
+
frame++;
|
|
24422
|
+
animation = calc();
|
|
24423
|
+
difference = calcDifference();
|
|
24424
|
+
}
|
|
24425
|
+
finishedFrame = frame;
|
|
24426
|
+
for (let i = 0;i < 20; i++) {
|
|
24427
|
+
frame++;
|
|
24428
|
+
animation = calc();
|
|
24429
|
+
difference = calcDifference();
|
|
24430
|
+
if (difference >= threshold) {
|
|
24431
|
+
i = 0;
|
|
24432
|
+
finishedFrame = frame + 1;
|
|
24433
|
+
}
|
|
24434
|
+
}
|
|
24435
|
+
cache.set(cacheKey, finishedFrame);
|
|
24436
|
+
return finishedFrame;
|
|
24437
|
+
}
|
|
24438
|
+
function spring({
|
|
24439
|
+
frame: passedFrame,
|
|
24440
|
+
fps,
|
|
24441
|
+
config = {},
|
|
24442
|
+
from = 0,
|
|
24443
|
+
to = 1,
|
|
24444
|
+
durationInFrames: passedDurationInFrames,
|
|
24445
|
+
durationRestThreshold,
|
|
24446
|
+
delay = 0,
|
|
24447
|
+
reverse = false
|
|
24448
|
+
}) {
|
|
24449
|
+
validateSpringDuration(passedDurationInFrames);
|
|
24450
|
+
validateFrame({
|
|
24451
|
+
frame: passedFrame,
|
|
24452
|
+
durationInFrames: Infinity,
|
|
24453
|
+
allowFloats: true
|
|
24454
|
+
});
|
|
24455
|
+
validateFps(fps, "to spring()", false);
|
|
24456
|
+
const needsToCalculateNaturalDuration = reverse || typeof passedDurationInFrames !== "undefined";
|
|
24457
|
+
const naturalDuration = needsToCalculateNaturalDuration ? measureSpring({
|
|
24458
|
+
fps,
|
|
24459
|
+
config,
|
|
24460
|
+
threshold: durationRestThreshold
|
|
24461
|
+
}) : undefined;
|
|
24462
|
+
const naturalDurationGetter = needsToCalculateNaturalDuration ? {
|
|
24463
|
+
get: () => naturalDuration
|
|
24464
|
+
} : {
|
|
24465
|
+
get: () => {
|
|
24466
|
+
throw new Error("did not calculate natural duration, this is an error with Remotion. Please report");
|
|
24467
|
+
}
|
|
24468
|
+
};
|
|
24469
|
+
const reverseProcessed = reverse ? (passedDurationInFrames ?? naturalDurationGetter.get()) - passedFrame : passedFrame;
|
|
24470
|
+
const delayProcessed = reverseProcessed + (reverse ? delay : -delay);
|
|
24471
|
+
const durationProcessed = passedDurationInFrames === undefined ? delayProcessed : delayProcessed / (passedDurationInFrames / naturalDurationGetter.get());
|
|
24472
|
+
if (passedDurationInFrames && delayProcessed > passedDurationInFrames) {
|
|
24473
|
+
return to;
|
|
24474
|
+
}
|
|
24475
|
+
const spr = springCalculation({
|
|
24476
|
+
fps,
|
|
24477
|
+
frame: durationProcessed,
|
|
24478
|
+
config
|
|
24479
|
+
});
|
|
24480
|
+
const inner = config.overshootClamping ? to >= from ? Math.min(spr.current, to) : Math.max(spr.current, to) : spr.current;
|
|
24481
|
+
const interpolated = from === 0 && to === 1 ? inner : interpolate(inner, [0, 1], [from, to]);
|
|
24482
|
+
return interpolated;
|
|
24483
|
+
}
|
|
24484
|
+
var clampUnit = (t) => Math.min(1, Math.max(0, t));
|
|
24485
|
+
var springEasingDurationInFrames = 30;
|
|
24486
|
+
|
|
24487
|
+
class Easing {
|
|
24488
|
+
static step0(n) {
|
|
24489
|
+
return n > 0 ? 1 : 0;
|
|
24490
|
+
}
|
|
24491
|
+
static step1(n) {
|
|
24492
|
+
return n >= 1 ? 1 : 0;
|
|
24493
|
+
}
|
|
24494
|
+
static linear(t) {
|
|
24495
|
+
return t;
|
|
24496
|
+
}
|
|
24497
|
+
static ease(t) {
|
|
24498
|
+
return Easing.bezier(0.42, 0, 1, 1)(t);
|
|
24499
|
+
}
|
|
24500
|
+
static quad(t) {
|
|
24501
|
+
return t * t;
|
|
24502
|
+
}
|
|
24503
|
+
static cubic(t) {
|
|
24504
|
+
return t * t * t;
|
|
24505
|
+
}
|
|
24506
|
+
static poly(n) {
|
|
24507
|
+
return (t) => t ** n;
|
|
24508
|
+
}
|
|
24509
|
+
static sin(t) {
|
|
24510
|
+
return 1 - Math.cos(t * Math.PI / 2);
|
|
24511
|
+
}
|
|
24512
|
+
static circle(t) {
|
|
24513
|
+
const u = clampUnit(t);
|
|
24514
|
+
return 1 - Math.sqrt(1 - u * u);
|
|
24515
|
+
}
|
|
24516
|
+
static exp(t) {
|
|
24517
|
+
return 2 ** (10 * (t - 1));
|
|
24518
|
+
}
|
|
24519
|
+
static elastic(bounciness = 1) {
|
|
24520
|
+
const p = bounciness * Math.PI;
|
|
24521
|
+
return (t) => 1 - Math.cos(t * Math.PI / 2) ** 3 * Math.cos(t * p);
|
|
24522
|
+
}
|
|
24523
|
+
static back(s = 1.70158) {
|
|
24524
|
+
return (t) => t * t * ((s + 1) * t - s);
|
|
24525
|
+
}
|
|
24526
|
+
static spring(config = {}) {
|
|
24527
|
+
return (t) => {
|
|
24528
|
+
if (t <= 0) {
|
|
24529
|
+
return 0;
|
|
24530
|
+
}
|
|
24531
|
+
if (t >= 1) {
|
|
24532
|
+
return 1;
|
|
24533
|
+
}
|
|
24534
|
+
return spring({
|
|
24535
|
+
fps: springEasingDurationInFrames,
|
|
24536
|
+
frame: t * springEasingDurationInFrames,
|
|
24537
|
+
config,
|
|
24538
|
+
durationInFrames: springEasingDurationInFrames
|
|
24539
|
+
});
|
|
24540
|
+
};
|
|
24541
|
+
}
|
|
24542
|
+
static bounce(t) {
|
|
24543
|
+
const u = clampUnit(t);
|
|
24544
|
+
if (u < 1 / 2.75) {
|
|
24545
|
+
return 7.5625 * u * u;
|
|
24546
|
+
}
|
|
24547
|
+
if (u < 2 / 2.75) {
|
|
24548
|
+
const t2_ = u - 1.5 / 2.75;
|
|
24549
|
+
return 7.5625 * t2_ * t2_ + 0.75;
|
|
24550
|
+
}
|
|
24551
|
+
if (u < 2.5 / 2.75) {
|
|
24552
|
+
const t2_ = u - 2.25 / 2.75;
|
|
24553
|
+
return 7.5625 * t2_ * t2_ + 0.9375;
|
|
24554
|
+
}
|
|
24555
|
+
const t2 = u - 2.625 / 2.75;
|
|
24556
|
+
return 7.5625 * t2 * t2 + 0.984375;
|
|
24557
|
+
}
|
|
24558
|
+
static bezier(x1, y1, x2, y2) {
|
|
24559
|
+
return bezier(x1, y1, x2, y2);
|
|
24560
|
+
}
|
|
24561
|
+
static in(easing) {
|
|
24562
|
+
return easing;
|
|
24563
|
+
}
|
|
24564
|
+
static out(easing) {
|
|
24565
|
+
return (t) => 1 - easing(1 - t);
|
|
24566
|
+
}
|
|
24567
|
+
static inOut(easing) {
|
|
24568
|
+
return (t) => {
|
|
24569
|
+
if (t < 0.5) {
|
|
24570
|
+
return easing(t * 2) / 2;
|
|
24571
|
+
}
|
|
24572
|
+
return 1 - easing((1 - t) * 2) / 2;
|
|
24573
|
+
};
|
|
24574
|
+
}
|
|
24575
|
+
}
|
|
24576
|
+
var NUMBER = "[-+]?\\d*\\.?\\d+";
|
|
24577
|
+
var PERCENTAGE = NUMBER + "%";
|
|
24578
|
+
function call(...args) {
|
|
24579
|
+
return "\\(\\s*(" + args.join(")\\s*,\\s*(") + ")\\s*\\)";
|
|
24580
|
+
}
|
|
24581
|
+
var MODERN_VALUE = "(?:none|[-+]?\\d*\\.?\\d+(?:%|deg|rad|grad|turn)?)";
|
|
24582
|
+
function modernColorCall(name) {
|
|
24583
|
+
return new RegExp(name + "\\(\\s*(" + MODERN_VALUE + ")\\s+(" + MODERN_VALUE + ")\\s+(" + MODERN_VALUE + ")(?:\\s*\\/\\s*(" + MODERN_VALUE + "))?\\s*\\)");
|
|
24584
|
+
}
|
|
24585
|
+
function getMatchers() {
|
|
24586
|
+
const cachedMatchers = {
|
|
24587
|
+
rgb: undefined,
|
|
24588
|
+
rgba: undefined,
|
|
24589
|
+
hsl: undefined,
|
|
24590
|
+
hsla: undefined,
|
|
24591
|
+
hex3: undefined,
|
|
24592
|
+
hex4: undefined,
|
|
24593
|
+
hex5: undefined,
|
|
24594
|
+
hex6: undefined,
|
|
24595
|
+
hex8: undefined,
|
|
24596
|
+
oklch: undefined,
|
|
24597
|
+
oklab: undefined,
|
|
24598
|
+
lab: undefined,
|
|
24599
|
+
lch: undefined,
|
|
24600
|
+
hwb: undefined
|
|
24601
|
+
};
|
|
24602
|
+
if (cachedMatchers.rgb === undefined) {
|
|
24603
|
+
cachedMatchers.rgb = new RegExp("rgb" + call(NUMBER, NUMBER, NUMBER));
|
|
24604
|
+
cachedMatchers.rgba = new RegExp("rgba" + call(NUMBER, NUMBER, NUMBER, NUMBER));
|
|
24605
|
+
cachedMatchers.hsl = new RegExp("hsl" + call(NUMBER, PERCENTAGE, PERCENTAGE));
|
|
24606
|
+
cachedMatchers.hsla = new RegExp("hsla" + call(NUMBER, PERCENTAGE, PERCENTAGE, NUMBER));
|
|
24607
|
+
cachedMatchers.hex3 = /^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/;
|
|
24608
|
+
cachedMatchers.hex4 = /^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/;
|
|
24609
|
+
cachedMatchers.hex6 = /^#([0-9a-fA-F]{6})$/;
|
|
24610
|
+
cachedMatchers.hex8 = /^#([0-9a-fA-F]{8})$/;
|
|
24611
|
+
cachedMatchers.oklch = modernColorCall("oklch");
|
|
24612
|
+
cachedMatchers.oklab = modernColorCall("oklab");
|
|
24613
|
+
cachedMatchers.lab = modernColorCall("lab");
|
|
24614
|
+
cachedMatchers.lch = modernColorCall("lch");
|
|
24615
|
+
cachedMatchers.hwb = modernColorCall("hwb");
|
|
24616
|
+
}
|
|
24617
|
+
return cachedMatchers;
|
|
24618
|
+
}
|
|
24619
|
+
function hue2rgb(p, q, t) {
|
|
24620
|
+
if (t < 0) {
|
|
24621
|
+
t += 1;
|
|
24622
|
+
}
|
|
24623
|
+
if (t > 1) {
|
|
24624
|
+
t -= 1;
|
|
24625
|
+
}
|
|
24626
|
+
if (t < 1 / 6) {
|
|
24627
|
+
return p + (q - p) * 6 * t;
|
|
24628
|
+
}
|
|
24629
|
+
if (t < 1 / 2) {
|
|
24630
|
+
return q;
|
|
24631
|
+
}
|
|
24632
|
+
if (t < 2 / 3) {
|
|
24633
|
+
return p + (q - p) * (2 / 3 - t) * 6;
|
|
24634
|
+
}
|
|
24635
|
+
return p;
|
|
24636
|
+
}
|
|
24637
|
+
function hslToRgb(h, s, l) {
|
|
24638
|
+
const q = l < 0.5 ? l * (1 + s) : l + s - l * s;
|
|
24639
|
+
const p = 2 * l - q;
|
|
24640
|
+
const r2 = hue2rgb(p, q, h + 1 / 3);
|
|
24641
|
+
const g = hue2rgb(p, q, h);
|
|
24642
|
+
const b2 = hue2rgb(p, q, h - 1 / 3);
|
|
24643
|
+
return Math.round(r2 * 255) << 24 | Math.round(g * 255) << 16 | Math.round(b2 * 255) << 8;
|
|
24644
|
+
}
|
|
24645
|
+
function parse255(str) {
|
|
24646
|
+
const int = Number.parseInt(str, 10);
|
|
24647
|
+
if (int < 0) {
|
|
24648
|
+
return 0;
|
|
24649
|
+
}
|
|
24650
|
+
if (int > 255) {
|
|
24651
|
+
return 255;
|
|
24652
|
+
}
|
|
24653
|
+
return int;
|
|
24654
|
+
}
|
|
24655
|
+
function parse360(str) {
|
|
24656
|
+
const int = Number.parseFloat(str);
|
|
24657
|
+
return (int % 360 + 360) % 360 / 360;
|
|
24658
|
+
}
|
|
24659
|
+
function parse1(str) {
|
|
24660
|
+
const num = Number.parseFloat(str);
|
|
24661
|
+
if (num < 0) {
|
|
24662
|
+
return 0;
|
|
24663
|
+
}
|
|
24664
|
+
if (num > 1) {
|
|
24665
|
+
return 255;
|
|
24666
|
+
}
|
|
24667
|
+
return Math.round(num * 255);
|
|
24668
|
+
}
|
|
24669
|
+
function parsePercentage(str) {
|
|
24670
|
+
const int = Number.parseFloat(str);
|
|
24671
|
+
if (int < 0) {
|
|
24672
|
+
return 0;
|
|
24673
|
+
}
|
|
24674
|
+
if (int > 100) {
|
|
24675
|
+
return 1;
|
|
24676
|
+
}
|
|
24677
|
+
return int / 100;
|
|
24678
|
+
}
|
|
24679
|
+
function parseModernComponent(str, percentScale) {
|
|
24680
|
+
if (str === "none")
|
|
24681
|
+
return 0;
|
|
24682
|
+
if (str.endsWith("%")) {
|
|
24683
|
+
return Number.parseFloat(str) / 100 * percentScale;
|
|
24684
|
+
}
|
|
24685
|
+
return Number.parseFloat(str);
|
|
24686
|
+
}
|
|
24687
|
+
function parseHueAngle(str) {
|
|
24688
|
+
if (str === "none")
|
|
24689
|
+
return 0;
|
|
24690
|
+
if (str.endsWith("rad")) {
|
|
24691
|
+
return Number.parseFloat(str) * 180 / Math.PI;
|
|
24692
|
+
}
|
|
24693
|
+
if (str.endsWith("grad"))
|
|
24694
|
+
return Number.parseFloat(str) * 0.9;
|
|
24695
|
+
if (str.endsWith("turn"))
|
|
24696
|
+
return Number.parseFloat(str) * 360;
|
|
24697
|
+
return Number.parseFloat(str);
|
|
24698
|
+
}
|
|
24699
|
+
function parseModernAlpha(str) {
|
|
24411
24700
|
if (str === undefined || str === "none")
|
|
24412
24701
|
return 1;
|
|
24413
24702
|
if (str.endsWith("%")) {
|
|
@@ -25280,7 +25569,8 @@ var wrapInSchema = ({
|
|
|
25280
25569
|
schema,
|
|
25281
25570
|
supportsEffects
|
|
25282
25571
|
}) => {
|
|
25283
|
-
const
|
|
25572
|
+
const schemaWithSequenceName = extendSchemaWithSequenceName(schema);
|
|
25573
|
+
const flatSchema = getFlatSchemaWithAllKeys(schemaWithSequenceName);
|
|
25284
25574
|
const flatKeys = Object.keys(flatSchema);
|
|
25285
25575
|
const Wrapped = forwardRef2((props, ref) => {
|
|
25286
25576
|
const env = useRemotionEnvironment();
|
|
@@ -25319,7 +25609,7 @@ var wrapInSchema = ({
|
|
|
25319
25609
|
const currentRuntimeValueDotNotation = useMemo13(() => readValuesFromProps(props, flatKeys), runtimeValues);
|
|
25320
25610
|
const controls = useMemo13(() => {
|
|
25321
25611
|
return {
|
|
25322
|
-
schema,
|
|
25612
|
+
schema: schemaWithSequenceName,
|
|
25323
25613
|
currentRuntimeValueDotNotation,
|
|
25324
25614
|
overrideId,
|
|
25325
25615
|
supportsEffects
|
|
@@ -25327,7 +25617,7 @@ var wrapInSchema = ({
|
|
|
25327
25617
|
}, [currentRuntimeValueDotNotation, overrideId]);
|
|
25328
25618
|
const { merged: valuesDotNotation, propsToDelete } = useMemo13(() => {
|
|
25329
25619
|
return computeEffectiveSchemaValuesDotNotation({
|
|
25330
|
-
schema,
|
|
25620
|
+
schema: schemaWithSequenceName,
|
|
25331
25621
|
currentValue: currentRuntimeValueDotNotation,
|
|
25332
25622
|
overrideValues: nodePath === null ? {} : getDragOverrides(nodePath),
|
|
25333
25623
|
propStatus: nodePath === null ? undefined : getPropStatusesCtx(propStatuses, nodePath),
|
|
@@ -25340,7 +25630,7 @@ var wrapInSchema = ({
|
|
|
25340
25630
|
propStatuses,
|
|
25341
25631
|
frame
|
|
25342
25632
|
]);
|
|
25343
|
-
const activeKeys = selectActiveKeys(
|
|
25633
|
+
const activeKeys = selectActiveKeys(schemaWithSequenceName, valuesDotNotation);
|
|
25344
25634
|
const mergedProps = mergeValues({
|
|
25345
25635
|
props,
|
|
25346
25636
|
valuesDotNotation,
|
|
@@ -25382,6 +25672,7 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
25382
25672
|
const parentSequence = useContext17(SequenceContext);
|
|
25383
25673
|
const { rootId } = useTimelineContext();
|
|
25384
25674
|
const cumulatedFrom = parentSequence ? parentSequence.cumulatedFrom + parentSequence.relativeFrom : 0;
|
|
25675
|
+
const absoluteFrom = (parentSequence?.absoluteFrom ?? 0) + from;
|
|
25385
25676
|
const nonce = useNonce();
|
|
25386
25677
|
if (layout !== "absolute-fill" && layout !== "none") {
|
|
25387
25678
|
throw new TypeError(`The layout prop of <Sequence /> expects either "absolute-fill" or "none", but you passed: ${layout}`);
|
|
@@ -25419,6 +25710,7 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
25419
25710
|
const cumulatedNegativeFrom = currentSequenceStart - firstFrame;
|
|
25420
25711
|
const contextValue = useMemo14(() => {
|
|
25421
25712
|
return {
|
|
25713
|
+
absoluteFrom,
|
|
25422
25714
|
cumulatedFrom,
|
|
25423
25715
|
relativeFrom: from,
|
|
25424
25716
|
cumulatedNegativeFrom,
|
|
@@ -25434,6 +25726,7 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
25434
25726
|
};
|
|
25435
25727
|
}, [
|
|
25436
25728
|
cumulatedFrom,
|
|
25729
|
+
absoluteFrom,
|
|
25437
25730
|
from,
|
|
25438
25731
|
actualDurationInFrames,
|
|
25439
25732
|
parentSequence,
|
|
@@ -25449,7 +25742,7 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
25449
25742
|
const timelineClipName = useMemo14(() => {
|
|
25450
25743
|
return name ?? "";
|
|
25451
25744
|
}, [name]);
|
|
25452
|
-
const resolvedDocumentationLink = documentationLink ??
|
|
25745
|
+
const resolvedDocumentationLink = documentationLink ?? "https://www.remotion.dev/docs/sequence";
|
|
25453
25746
|
const env = useRemotionEnvironment();
|
|
25454
25747
|
const isInsideSeries = useContext17(IsInsideSeriesContext);
|
|
25455
25748
|
const inheritedStack = other?.stack ?? null;
|
|
@@ -26076,10 +26369,10 @@ var decodeImage = async ({
|
|
|
26076
26369
|
if (!selectedTrack) {
|
|
26077
26370
|
throw new Error("No selected track");
|
|
26078
26371
|
}
|
|
26079
|
-
const
|
|
26372
|
+
const cache2 = [];
|
|
26080
26373
|
let durationFound = null;
|
|
26081
26374
|
const getFrameByIndex = async (frameIndex) => {
|
|
26082
|
-
const foundInCache =
|
|
26375
|
+
const foundInCache = cache2.find((c2) => c2.frameIndex === frameIndex);
|
|
26083
26376
|
if (foundInCache && foundInCache.frame) {
|
|
26084
26377
|
return foundInCache;
|
|
26085
26378
|
}
|
|
@@ -26090,7 +26383,7 @@ var decodeImage = async ({
|
|
|
26090
26383
|
if (foundInCache) {
|
|
26091
26384
|
foundInCache.frame = frame.image;
|
|
26092
26385
|
} else {
|
|
26093
|
-
|
|
26386
|
+
cache2.push({
|
|
26094
26387
|
frame: frame.image,
|
|
26095
26388
|
frameIndex,
|
|
26096
26389
|
timeInSeconds: frame.image.timestamp / 1e6
|
|
@@ -26103,7 +26396,7 @@ var decodeImage = async ({
|
|
|
26103
26396
|
};
|
|
26104
26397
|
};
|
|
26105
26398
|
const clearCache = (closeToTimeInSec) => {
|
|
26106
|
-
const itemsInCache =
|
|
26399
|
+
const itemsInCache = cache2.filter((c2) => c2.frame);
|
|
26107
26400
|
const sortByClosestToCurrentTime = itemsInCache.sort((a2, b2) => {
|
|
26108
26401
|
const aDiff = Math.abs(a2.timeInSeconds - closeToTimeInSec);
|
|
26109
26402
|
const bDiff = Math.abs(b2.timeInSeconds - closeToTimeInSec);
|
|
@@ -26126,7 +26419,7 @@ var decodeImage = async ({
|
|
|
26126
26419
|
loopBehavior,
|
|
26127
26420
|
timeInSec
|
|
26128
26421
|
});
|
|
26129
|
-
const framesBefore =
|
|
26422
|
+
const framesBefore = cache2.filter((c2) => c2.timeInSeconds <= actualTimeInSec);
|
|
26130
26423
|
const biggestIndex = framesBefore.map((c2) => c2.frameIndex).reduce((a2, b2) => Math.max(a2, b2), 0);
|
|
26131
26424
|
let i = biggestIndex;
|
|
26132
26425
|
while (true) {
|
|
@@ -26169,7 +26462,7 @@ var decodeImage = async ({
|
|
|
26169
26462
|
timeInSec
|
|
26170
26463
|
});
|
|
26171
26464
|
await ensureFrameBeforeAndAfter({ timeInSec: actualTimeInSec, loopBehavior });
|
|
26172
|
-
const itemsInCache =
|
|
26465
|
+
const itemsInCache = cache2.filter((c2) => c2.frame);
|
|
26173
26466
|
const closest = itemsInCache.reduce((a2, b2) => {
|
|
26174
26467
|
const aDiff = Math.abs(a2.timeInSeconds - actualTimeInSec);
|
|
26175
26468
|
const bDiff = Math.abs(b2.timeInSeconds - actualTimeInSec);
|
|
@@ -26630,7 +26923,7 @@ var Loop = ({
|
|
|
26630
26923
|
durationInFrames,
|
|
26631
26924
|
from,
|
|
26632
26925
|
name: name ?? "<Loop>",
|
|
26633
|
-
_remotionInternalDocumentationLink:
|
|
26926
|
+
_remotionInternalDocumentationLink: "https://www.remotion.dev/docs/loop",
|
|
26634
26927
|
_remotionInternalLoopDisplay: loopDisplay,
|
|
26635
26928
|
layout: props.layout,
|
|
26636
26929
|
style,
|
|
@@ -29019,7 +29312,7 @@ var AudioForDevelopmentForwardRefFunction = (props, ref) => {
|
|
|
29019
29312
|
premountDisplay: sequenceContext?.premountDisplay ?? null,
|
|
29020
29313
|
postmountDisplay: sequenceContext?.postmountDisplay ?? null,
|
|
29021
29314
|
loopDisplay: undefined,
|
|
29022
|
-
documentationLink:
|
|
29315
|
+
documentationLink: "https://www.remotion.dev/docs/html5-audio",
|
|
29023
29316
|
refForOutline: null
|
|
29024
29317
|
});
|
|
29025
29318
|
useMediaPlayback({
|
|
@@ -29513,7 +29806,7 @@ var SolidOuter = forwardRef8(({
|
|
|
29513
29806
|
durationInFrames,
|
|
29514
29807
|
name: name ?? "<Solid>",
|
|
29515
29808
|
_remotionInternalRefForOutline: actualRef,
|
|
29516
|
-
_remotionInternalDocumentationLink:
|
|
29809
|
+
_remotionInternalDocumentationLink: "https://www.remotion.dev/docs/solid",
|
|
29517
29810
|
...props2,
|
|
29518
29811
|
children: /* @__PURE__ */ jsx24(SolidInner, {
|
|
29519
29812
|
reference: actualRef,
|
|
@@ -29825,7 +30118,7 @@ var HtmlInCanvasInner = forwardRef9(({
|
|
|
29825
30118
|
return /* @__PURE__ */ jsx25(Sequence, {
|
|
29826
30119
|
durationInFrames: resolvedDuration,
|
|
29827
30120
|
name: name ?? "<HtmlInCanvas>",
|
|
29828
|
-
_remotionInternalDocumentationLink:
|
|
30121
|
+
_remotionInternalDocumentationLink: "https://www.remotion.dev/docs/remotion/html-in-canvas",
|
|
29829
30122
|
_experimentalControls: controls,
|
|
29830
30123
|
_remotionInternalEffects: memoizedEffectDefinitions,
|
|
29831
30124
|
_remotionInternalRefForOutline: actualRef,
|
|
@@ -30389,7 +30682,7 @@ var NativeImgInner = ({
|
|
|
30389
30682
|
from: from ?? 0,
|
|
30390
30683
|
durationInFrames: durationInFrames ?? Infinity,
|
|
30391
30684
|
_remotionInternalStack: stack,
|
|
30392
|
-
_remotionInternalDocumentationLink:
|
|
30685
|
+
_remotionInternalDocumentationLink: "https://www.remotion.dev/docs/img",
|
|
30393
30686
|
_remotionInternalIsMedia: { type: "image", src },
|
|
30394
30687
|
name: name ?? "<Img>",
|
|
30395
30688
|
_experimentalControls: controls,
|
|
@@ -30531,7 +30824,7 @@ var ImgInner = ({
|
|
|
30531
30824
|
name: name ?? "<Img>",
|
|
30532
30825
|
showInTimeline,
|
|
30533
30826
|
stack,
|
|
30534
|
-
_remotionInternalDocumentationLink:
|
|
30827
|
+
_remotionInternalDocumentationLink: "https://www.remotion.dev/docs/img",
|
|
30535
30828
|
_experimentalControls: controls,
|
|
30536
30829
|
_remotionInternalRefForOutline: refForOutline,
|
|
30537
30830
|
...canvasProps
|
|
@@ -30582,6 +30875,7 @@ var makeInteractiveElement = (tag, displayName) => {
|
|
|
30582
30875
|
showInTimeline: showInTimeline ?? true,
|
|
30583
30876
|
_experimentalControls,
|
|
30584
30877
|
_remotionInternalStack: stack,
|
|
30878
|
+
_remotionInternalDocumentationLink: "https://www.remotion.dev/docs/interactive",
|
|
30585
30879
|
_remotionInternalRefForOutline: refForOutline,
|
|
30586
30880
|
children: React29.createElement(tag, {
|
|
30587
30881
|
...props2,
|
|
@@ -31479,7 +31773,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
|
31479
31773
|
premountDisplay: parentSequence?.premountDisplay ?? null,
|
|
31480
31774
|
postmountDisplay: parentSequence?.postmountDisplay ?? null,
|
|
31481
31775
|
loopDisplay: undefined,
|
|
31482
|
-
documentationLink:
|
|
31776
|
+
documentationLink: onlyWarnForMediaSeekingError ? "https://www.remotion.dev/docs/offthreadvideo" : "https://www.remotion.dev/docs/html5-video",
|
|
31483
31777
|
refForOutline: videoRef
|
|
31484
31778
|
});
|
|
31485
31779
|
useMediaPlayback({
|
|
@@ -31610,6 +31904,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
|
31610
31904
|
isClientSideRendering: false
|
|
31611
31905
|
});
|
|
31612
31906
|
return /* @__PURE__ */ jsx34("video", {
|
|
31907
|
+
...nativeProps,
|
|
31613
31908
|
ref: videoRef,
|
|
31614
31909
|
muted: muted || mediaMuted || userPreferredVolume <= 0,
|
|
31615
31910
|
playsInline: true,
|
|
@@ -31618,7 +31913,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
|
31618
31913
|
style: actualStyle,
|
|
31619
31914
|
disableRemotePlayback: true,
|
|
31620
31915
|
crossOrigin: crossOriginValue,
|
|
31621
|
-
|
|
31916
|
+
controls: false
|
|
31622
31917
|
});
|
|
31623
31918
|
};
|
|
31624
31919
|
var VideoForPreview = forwardRef13(VideoForDevelopmentRefForwardingFunction);
|
|
@@ -31996,52 +32291,28 @@ var Internals = {
|
|
|
31996
32291
|
CompositionRenderErrorContext,
|
|
31997
32292
|
useEffectChainState,
|
|
31998
32293
|
createEffectChainState,
|
|
31999
|
-
cleanupEffectChainState,
|
|
32000
|
-
runEffectChain,
|
|
32001
|
-
useMemoizedEffects,
|
|
32002
|
-
useMemoizedEffectDefinitions,
|
|
32003
|
-
createEffect,
|
|
32004
|
-
createWebGLContextError,
|
|
32005
|
-
createWebGL2ContextError,
|
|
32006
|
-
computeEffectiveSchemaValuesDotNotation,
|
|
32007
|
-
interpolateKeyframedStatus,
|
|
32008
|
-
makeStaticDragOverride,
|
|
32009
|
-
makeKeyframedDragOverride,
|
|
32010
|
-
resolveDragOverrideValue,
|
|
32011
|
-
getStaticDragOverrideValue,
|
|
32012
|
-
OverrideIdsToNodePathsGettersContext,
|
|
32013
|
-
OverrideIdsToNodePathsSettersContext,
|
|
32014
|
-
findPropsToDelete,
|
|
32015
|
-
makeSequencePropsSubscriptionKey,
|
|
32016
|
-
getPropStatusesCtx,
|
|
32017
|
-
getEffectPropStatusesCtx,
|
|
32018
|
-
hiddenField,
|
|
32019
|
-
durationInFramesField,
|
|
32020
|
-
fromField
|
|
32021
|
-
};
|
|
32022
|
-
var validateFrame = ({
|
|
32023
|
-
allowFloats,
|
|
32024
|
-
durationInFrames,
|
|
32025
|
-
frame
|
|
32026
|
-
}) => {
|
|
32027
|
-
if (typeof frame === "undefined") {
|
|
32028
|
-
throw new TypeError(`Argument missing for parameter "frame"`);
|
|
32029
|
-
}
|
|
32030
|
-
if (typeof frame !== "number") {
|
|
32031
|
-
throw new TypeError(`Argument passed for "frame" is not a number: ${frame}`);
|
|
32032
|
-
}
|
|
32033
|
-
if (!Number.isFinite(frame)) {
|
|
32034
|
-
throw new RangeError(`Frame ${frame} is not finite`);
|
|
32035
|
-
}
|
|
32036
|
-
if (frame % 1 !== 0 && !allowFloats) {
|
|
32037
|
-
throw new RangeError(`Argument for frame must be an integer, but got ${frame}`);
|
|
32038
|
-
}
|
|
32039
|
-
if (frame < 0 && frame < -durationInFrames) {
|
|
32040
|
-
throw new RangeError(`Cannot use frame ${frame}: Duration of composition is ${durationInFrames}, therefore the lowest frame that can be rendered is ${-durationInFrames}`);
|
|
32041
|
-
}
|
|
32042
|
-
if (frame > durationInFrames - 1) {
|
|
32043
|
-
throw new RangeError(`Cannot use frame ${frame}: Duration of composition is ${durationInFrames}, therefore the highest frame that can be rendered is ${durationInFrames - 1}`);
|
|
32044
|
-
}
|
|
32294
|
+
cleanupEffectChainState,
|
|
32295
|
+
runEffectChain,
|
|
32296
|
+
useMemoizedEffects,
|
|
32297
|
+
useMemoizedEffectDefinitions,
|
|
32298
|
+
createEffect,
|
|
32299
|
+
createWebGLContextError,
|
|
32300
|
+
createWebGL2ContextError,
|
|
32301
|
+
computeEffectiveSchemaValuesDotNotation,
|
|
32302
|
+
interpolateKeyframedStatus,
|
|
32303
|
+
makeStaticDragOverride,
|
|
32304
|
+
makeKeyframedDragOverride,
|
|
32305
|
+
resolveDragOverrideValue,
|
|
32306
|
+
getStaticDragOverrideValue,
|
|
32307
|
+
OverrideIdsToNodePathsGettersContext,
|
|
32308
|
+
OverrideIdsToNodePathsSettersContext,
|
|
32309
|
+
findPropsToDelete,
|
|
32310
|
+
makeSequencePropsSubscriptionKey,
|
|
32311
|
+
getPropStatusesCtx,
|
|
32312
|
+
getEffectPropStatusesCtx,
|
|
32313
|
+
hiddenField,
|
|
32314
|
+
durationInFramesField,
|
|
32315
|
+
fromField
|
|
32045
32316
|
};
|
|
32046
32317
|
var flattenChildren = (children) => {
|
|
32047
32318
|
const childrenArray = React40.Children.toArray(children);
|
|
@@ -32132,240 +32403,6 @@ var Series = Object.assign(wrapInSchema({
|
|
|
32132
32403
|
Sequence: SeriesSequence
|
|
32133
32404
|
});
|
|
32134
32405
|
addSequenceStackTraces(Series);
|
|
32135
|
-
var validateSpringDuration = (dur) => {
|
|
32136
|
-
if (typeof dur === "undefined") {
|
|
32137
|
-
return;
|
|
32138
|
-
}
|
|
32139
|
-
if (typeof dur !== "number") {
|
|
32140
|
-
throw new TypeError(`A "duration" of a spring must be a "number" but is "${typeof dur}"`);
|
|
32141
|
-
}
|
|
32142
|
-
if (Number.isNaN(dur)) {
|
|
32143
|
-
throw new TypeError('A "duration" of a spring is NaN, which it must not be');
|
|
32144
|
-
}
|
|
32145
|
-
if (!Number.isFinite(dur)) {
|
|
32146
|
-
throw new TypeError('A "duration" of a spring must be finite, but is ' + dur);
|
|
32147
|
-
}
|
|
32148
|
-
if (dur <= 0) {
|
|
32149
|
-
throw new TypeError('A "duration" of a spring must be positive, but is ' + dur);
|
|
32150
|
-
}
|
|
32151
|
-
};
|
|
32152
|
-
var defaultSpringConfig = {
|
|
32153
|
-
damping: 10,
|
|
32154
|
-
mass: 1,
|
|
32155
|
-
stiffness: 100,
|
|
32156
|
-
overshootClamping: false
|
|
32157
|
-
};
|
|
32158
|
-
var advanceCache = {};
|
|
32159
|
-
function advance({
|
|
32160
|
-
animation,
|
|
32161
|
-
now,
|
|
32162
|
-
config
|
|
32163
|
-
}) {
|
|
32164
|
-
const { toValue: toValue2, lastTimestamp, current, velocity } = animation;
|
|
32165
|
-
const deltaTime = Math.min(now - lastTimestamp, 64);
|
|
32166
|
-
if (config.damping <= 0) {
|
|
32167
|
-
throw new Error("Spring damping must be greater than 0, otherwise the spring() animation will never end, causing an infinite loop.");
|
|
32168
|
-
}
|
|
32169
|
-
const c2 = config.damping;
|
|
32170
|
-
const m = config.mass;
|
|
32171
|
-
const k = config.stiffness;
|
|
32172
|
-
const cacheKey = [
|
|
32173
|
-
toValue2,
|
|
32174
|
-
lastTimestamp,
|
|
32175
|
-
current,
|
|
32176
|
-
velocity,
|
|
32177
|
-
c2,
|
|
32178
|
-
m,
|
|
32179
|
-
k,
|
|
32180
|
-
now
|
|
32181
|
-
].join("-");
|
|
32182
|
-
if (advanceCache[cacheKey]) {
|
|
32183
|
-
return advanceCache[cacheKey];
|
|
32184
|
-
}
|
|
32185
|
-
const v0 = -velocity;
|
|
32186
|
-
const x0 = toValue2 - current;
|
|
32187
|
-
const zeta = c2 / (2 * Math.sqrt(k * m));
|
|
32188
|
-
const omega0 = Math.sqrt(k / m);
|
|
32189
|
-
const omega1 = omega0 * Math.sqrt(1 - zeta ** 2);
|
|
32190
|
-
const t = deltaTime / 1000;
|
|
32191
|
-
const sin1 = Math.sin(omega1 * t);
|
|
32192
|
-
const cos1 = Math.cos(omega1 * t);
|
|
32193
|
-
const underDampedEnvelope = Math.exp(-zeta * omega0 * t);
|
|
32194
|
-
const underDampedFrag1 = underDampedEnvelope * (sin1 * ((v0 + zeta * omega0 * x0) / omega1) + x0 * cos1);
|
|
32195
|
-
const underDampedPosition = toValue2 - underDampedFrag1;
|
|
32196
|
-
const underDampedVelocity = zeta * omega0 * underDampedFrag1 - underDampedEnvelope * (cos1 * (v0 + zeta * omega0 * x0) - omega1 * x0 * sin1);
|
|
32197
|
-
const criticallyDampedEnvelope = Math.exp(-omega0 * t);
|
|
32198
|
-
const criticallyDampedPosition = toValue2 - criticallyDampedEnvelope * (x0 + (v0 + omega0 * x0) * t);
|
|
32199
|
-
const criticallyDampedVelocity = criticallyDampedEnvelope * (v0 * (t * omega0 - 1) + t * x0 * omega0 * omega0);
|
|
32200
|
-
const animationNode = {
|
|
32201
|
-
toValue: toValue2,
|
|
32202
|
-
prevPosition: current,
|
|
32203
|
-
lastTimestamp: now,
|
|
32204
|
-
current: zeta < 1 ? underDampedPosition : criticallyDampedPosition,
|
|
32205
|
-
velocity: zeta < 1 ? underDampedVelocity : criticallyDampedVelocity
|
|
32206
|
-
};
|
|
32207
|
-
advanceCache[cacheKey] = animationNode;
|
|
32208
|
-
return animationNode;
|
|
32209
|
-
}
|
|
32210
|
-
var calculationCache = {};
|
|
32211
|
-
function springCalculation({
|
|
32212
|
-
frame,
|
|
32213
|
-
fps,
|
|
32214
|
-
config = {}
|
|
32215
|
-
}) {
|
|
32216
|
-
const from = 0;
|
|
32217
|
-
const to = 1;
|
|
32218
|
-
const cacheKey = [
|
|
32219
|
-
frame,
|
|
32220
|
-
fps,
|
|
32221
|
-
config.damping,
|
|
32222
|
-
config.mass,
|
|
32223
|
-
config.overshootClamping,
|
|
32224
|
-
config.stiffness
|
|
32225
|
-
].join("-");
|
|
32226
|
-
if (calculationCache[cacheKey]) {
|
|
32227
|
-
return calculationCache[cacheKey];
|
|
32228
|
-
}
|
|
32229
|
-
let animation = {
|
|
32230
|
-
lastTimestamp: 0,
|
|
32231
|
-
current: from,
|
|
32232
|
-
toValue: to,
|
|
32233
|
-
velocity: 0,
|
|
32234
|
-
prevPosition: 0
|
|
32235
|
-
};
|
|
32236
|
-
const frameClamped = Math.max(0, frame);
|
|
32237
|
-
const unevenRest = frameClamped % 1;
|
|
32238
|
-
for (let f = 0;f <= Math.floor(frameClamped); f++) {
|
|
32239
|
-
if (f === Math.floor(frameClamped)) {
|
|
32240
|
-
f += unevenRest;
|
|
32241
|
-
}
|
|
32242
|
-
const time = f / fps * 1000;
|
|
32243
|
-
animation = advance({
|
|
32244
|
-
animation,
|
|
32245
|
-
now: time,
|
|
32246
|
-
config: {
|
|
32247
|
-
...defaultSpringConfig,
|
|
32248
|
-
...config
|
|
32249
|
-
}
|
|
32250
|
-
});
|
|
32251
|
-
}
|
|
32252
|
-
calculationCache[cacheKey] = animation;
|
|
32253
|
-
return animation;
|
|
32254
|
-
}
|
|
32255
|
-
var cache = new Map;
|
|
32256
|
-
function measureSpring({
|
|
32257
|
-
fps,
|
|
32258
|
-
config = {},
|
|
32259
|
-
threshold = 0.005
|
|
32260
|
-
}) {
|
|
32261
|
-
if (typeof threshold !== "number") {
|
|
32262
|
-
throw new TypeError(`threshold must be a number, got ${threshold} of type ${typeof threshold}`);
|
|
32263
|
-
}
|
|
32264
|
-
if (threshold === 0) {
|
|
32265
|
-
return Infinity;
|
|
32266
|
-
}
|
|
32267
|
-
if (threshold === 1) {
|
|
32268
|
-
return 0;
|
|
32269
|
-
}
|
|
32270
|
-
if (isNaN(threshold)) {
|
|
32271
|
-
throw new TypeError("Threshold is NaN");
|
|
32272
|
-
}
|
|
32273
|
-
if (!Number.isFinite(threshold)) {
|
|
32274
|
-
throw new TypeError("Threshold is not finite");
|
|
32275
|
-
}
|
|
32276
|
-
if (threshold < 0) {
|
|
32277
|
-
throw new TypeError("Threshold is below 0");
|
|
32278
|
-
}
|
|
32279
|
-
const cacheKey = [
|
|
32280
|
-
fps,
|
|
32281
|
-
config.damping,
|
|
32282
|
-
config.mass,
|
|
32283
|
-
config.overshootClamping,
|
|
32284
|
-
config.stiffness,
|
|
32285
|
-
threshold
|
|
32286
|
-
].join("-");
|
|
32287
|
-
if (cache.has(cacheKey)) {
|
|
32288
|
-
return cache.get(cacheKey);
|
|
32289
|
-
}
|
|
32290
|
-
validateFps(fps, "to the measureSpring() function", false);
|
|
32291
|
-
let frame = 0;
|
|
32292
|
-
let finishedFrame = 0;
|
|
32293
|
-
const calc = () => {
|
|
32294
|
-
return springCalculation({
|
|
32295
|
-
fps,
|
|
32296
|
-
frame,
|
|
32297
|
-
config
|
|
32298
|
-
});
|
|
32299
|
-
};
|
|
32300
|
-
let animation = calc();
|
|
32301
|
-
const calcDifference = () => {
|
|
32302
|
-
return Math.abs(animation.current - animation.toValue);
|
|
32303
|
-
};
|
|
32304
|
-
let difference = calcDifference();
|
|
32305
|
-
while (difference >= threshold) {
|
|
32306
|
-
frame++;
|
|
32307
|
-
animation = calc();
|
|
32308
|
-
difference = calcDifference();
|
|
32309
|
-
}
|
|
32310
|
-
finishedFrame = frame;
|
|
32311
|
-
for (let i = 0;i < 20; i++) {
|
|
32312
|
-
frame++;
|
|
32313
|
-
animation = calc();
|
|
32314
|
-
difference = calcDifference();
|
|
32315
|
-
if (difference >= threshold) {
|
|
32316
|
-
i = 0;
|
|
32317
|
-
finishedFrame = frame + 1;
|
|
32318
|
-
}
|
|
32319
|
-
}
|
|
32320
|
-
cache.set(cacheKey, finishedFrame);
|
|
32321
|
-
return finishedFrame;
|
|
32322
|
-
}
|
|
32323
|
-
function spring({
|
|
32324
|
-
frame: passedFrame,
|
|
32325
|
-
fps,
|
|
32326
|
-
config = {},
|
|
32327
|
-
from = 0,
|
|
32328
|
-
to = 1,
|
|
32329
|
-
durationInFrames: passedDurationInFrames,
|
|
32330
|
-
durationRestThreshold,
|
|
32331
|
-
delay = 0,
|
|
32332
|
-
reverse = false
|
|
32333
|
-
}) {
|
|
32334
|
-
validateSpringDuration(passedDurationInFrames);
|
|
32335
|
-
validateFrame({
|
|
32336
|
-
frame: passedFrame,
|
|
32337
|
-
durationInFrames: Infinity,
|
|
32338
|
-
allowFloats: true
|
|
32339
|
-
});
|
|
32340
|
-
validateFps(fps, "to spring()", false);
|
|
32341
|
-
const needsToCalculateNaturalDuration = reverse || typeof passedDurationInFrames !== "undefined";
|
|
32342
|
-
const naturalDuration = needsToCalculateNaturalDuration ? measureSpring({
|
|
32343
|
-
fps,
|
|
32344
|
-
config,
|
|
32345
|
-
threshold: durationRestThreshold
|
|
32346
|
-
}) : undefined;
|
|
32347
|
-
const naturalDurationGetter = needsToCalculateNaturalDuration ? {
|
|
32348
|
-
get: () => naturalDuration
|
|
32349
|
-
} : {
|
|
32350
|
-
get: () => {
|
|
32351
|
-
throw new Error("did not calculate natural duration, this is an error with Remotion. Please report");
|
|
32352
|
-
}
|
|
32353
|
-
};
|
|
32354
|
-
const reverseProcessed = reverse ? (passedDurationInFrames ?? naturalDurationGetter.get()) - passedFrame : passedFrame;
|
|
32355
|
-
const delayProcessed = reverseProcessed + (reverse ? delay : -delay);
|
|
32356
|
-
const durationProcessed = passedDurationInFrames === undefined ? delayProcessed : delayProcessed / (passedDurationInFrames / naturalDurationGetter.get());
|
|
32357
|
-
if (passedDurationInFrames && delayProcessed > passedDurationInFrames) {
|
|
32358
|
-
return to;
|
|
32359
|
-
}
|
|
32360
|
-
const spr = springCalculation({
|
|
32361
|
-
fps,
|
|
32362
|
-
frame: durationProcessed,
|
|
32363
|
-
config
|
|
32364
|
-
});
|
|
32365
|
-
const inner = config.overshootClamping ? to >= from ? Math.min(spr.current, to) : Math.max(spr.current, to) : spr.current;
|
|
32366
|
-
const interpolated = from === 0 && to === 1 ? inner : interpolate(inner, [0, 1], [from, to]);
|
|
32367
|
-
return interpolated;
|
|
32368
|
-
}
|
|
32369
32406
|
var problematicCharacters = {
|
|
32370
32407
|
"%3A": ":",
|
|
32371
32408
|
"%2F": "/",
|