@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.
Files changed (276) hide show
  1. package/dist/Homepage.js +415 -364
  2. package/dist/cn.d.ts +2 -0
  3. package/dist/cn.js +5 -0
  4. package/dist/components/3DEngine/ButtonDemo.d.ts +2 -0
  5. package/dist/components/3DEngine/ButtonDemo.js +43 -0
  6. package/dist/components/3DEngine/Faces.d.ts +5 -0
  7. package/dist/components/3DEngine/Faces.js +7 -0
  8. package/dist/components/3DEngine/Outer.d.ts +8 -0
  9. package/dist/components/3DEngine/Outer.js +56 -0
  10. package/dist/components/3DEngine/Switch.d.ts +4 -0
  11. package/dist/components/3DEngine/Switch.js +4 -0
  12. package/dist/components/3DEngine/get-child-node-from.d.ts +1 -0
  13. package/dist/components/3DEngine/get-child-node-from.js +14 -0
  14. package/dist/components/3DEngine/hover-transforms.d.ts +9 -0
  15. package/dist/components/3DEngine/hover-transforms.js +177 -0
  16. package/dist/components/BackButton.d.ts +6 -0
  17. package/dist/components/BackButton.js +9 -0
  18. package/dist/components/CommandCopyButton.d.ts +5 -0
  19. package/dist/components/CommandCopyButton.js +4 -0
  20. package/dist/components/Homepage.d.ts +6 -0
  21. package/dist/components/Homepage.js +20 -0
  22. package/dist/components/ManageTeamMembers.d.ts +2 -0
  23. package/dist/components/ManageTeamMembers.js +42 -0
  24. package/dist/components/Spinner.d.ts +3 -0
  25. package/dist/components/Spinner.js +4 -0
  26. package/dist/components/TeamPicture.d.ts +1 -0
  27. package/dist/components/TeamPicture.js +4 -0
  28. package/dist/components/design.d.ts +1 -0
  29. package/dist/components/design.js +33 -0
  30. package/dist/components/experts/ExpertsPage.d.ts +11 -0
  31. package/dist/components/experts/ExpertsPage.js +50 -0
  32. package/dist/components/experts/experts-data.d.ts +19 -0
  33. package/dist/components/experts/experts-data.js +391 -0
  34. package/dist/components/experts/experts-icons.d.ts +8 -0
  35. package/dist/components/experts/experts-icons.js +42 -0
  36. package/dist/components/experts.d.ts +3 -0
  37. package/dist/components/experts.js +2 -0
  38. package/dist/components/homepage/AutomationsSection.d.ts +3 -0
  39. package/dist/components/homepage/AutomationsSection.js +85 -0
  40. package/dist/components/homepage/BackgroundAnimation.d.ts +2 -0
  41. package/dist/components/homepage/BackgroundAnimation.js +66 -0
  42. package/dist/components/homepage/ChooseTemplate.d.ts +2 -0
  43. package/dist/components/homepage/ChooseTemplate.js +25 -0
  44. package/dist/components/homepage/CommunityStats.d.ts +3 -0
  45. package/dist/components/homepage/CommunityStats.js +6 -0
  46. package/dist/components/homepage/CommunityStatsItems.d.ts +7 -0
  47. package/dist/components/homepage/CommunityStatsItems.js +58 -0
  48. package/dist/components/homepage/Demo/Card.d.ts +15 -0
  49. package/dist/components/homepage/Demo/Card.js +174 -0
  50. package/dist/components/homepage/Demo/Cards.d.ts +15 -0
  51. package/dist/components/homepage/Demo/Cards.js +57 -0
  52. package/dist/components/homepage/Demo/Comp.d.ts +38 -0
  53. package/dist/components/homepage/Demo/Comp.js +72 -0
  54. package/dist/components/homepage/Demo/CurrentCountry.d.ts +9 -0
  55. package/dist/components/homepage/Demo/CurrentCountry.js +48 -0
  56. package/dist/components/homepage/Demo/DemoError.d.ts +2 -0
  57. package/dist/components/homepage/Demo/DemoError.js +10 -0
  58. package/dist/components/homepage/Demo/DemoErrorIcon.d.ts +2 -0
  59. package/dist/components/homepage/Demo/DemoErrorIcon.js +16 -0
  60. package/dist/components/homepage/Demo/DemoRender.d.ts +33 -0
  61. package/dist/components/homepage/Demo/DemoRender.js +107 -0
  62. package/dist/components/homepage/Demo/DigitWheel.d.ts +9 -0
  63. package/dist/components/homepage/Demo/DigitWheel.js +94 -0
  64. package/dist/components/homepage/Demo/DisplayedEmoji.d.ts +5 -0
  65. package/dist/components/homepage/Demo/DisplayedEmoji.js +59 -0
  66. package/dist/components/homepage/Demo/DoneCheckmark.d.ts +2 -0
  67. package/dist/components/homepage/Demo/DoneCheckmark.js +20 -0
  68. package/dist/components/homepage/Demo/DownloadNudge.d.ts +2 -0
  69. package/dist/components/homepage/Demo/DownloadNudge.js +27 -0
  70. package/dist/components/homepage/Demo/DragAndDropNudge.d.ts +3 -0
  71. package/dist/components/homepage/Demo/DragAndDropNudge.js +26 -0
  72. package/dist/components/homepage/Demo/EmojiCard.d.ts +10 -0
  73. package/dist/components/homepage/Demo/EmojiCard.js +120 -0
  74. package/dist/components/homepage/Demo/Minus.d.ts +5 -0
  75. package/dist/components/homepage/Demo/Minus.js +11 -0
  76. package/dist/components/homepage/Demo/PlayPauseButton.d.ts +5 -0
  77. package/dist/components/homepage/Demo/PlayPauseButton.js +47 -0
  78. package/dist/components/homepage/Demo/PlayerControls.d.ts +8 -0
  79. package/dist/components/homepage/Demo/PlayerControls.js +15 -0
  80. package/dist/components/homepage/Demo/PlayerSeekBar.d.ts +11 -0
  81. package/dist/components/homepage/Demo/PlayerSeekBar.js +216 -0
  82. package/dist/components/homepage/Demo/PlayerVolume.d.ts +5 -0
  83. package/dist/components/homepage/Demo/PlayerVolume.js +53 -0
  84. package/dist/components/homepage/Demo/Progress.d.ts +4 -0
  85. package/dist/components/homepage/Demo/Progress.js +14 -0
  86. package/dist/components/homepage/Demo/Spinner.d.ts +5 -0
  87. package/dist/components/homepage/Demo/Spinner.js +37 -0
  88. package/dist/components/homepage/Demo/Switcher.d.ts +6 -0
  89. package/dist/components/homepage/Demo/Switcher.js +25 -0
  90. package/dist/components/homepage/Demo/Temperature.d.ts +6 -0
  91. package/dist/components/homepage/Demo/Temperature.js +21 -0
  92. package/dist/components/homepage/Demo/TemperatureNumber.d.ts +5 -0
  93. package/dist/components/homepage/Demo/TemperatureNumber.js +36 -0
  94. package/dist/components/homepage/Demo/ThemeNudge.d.ts +3 -0
  95. package/dist/components/homepage/Demo/ThemeNudge.js +35 -0
  96. package/dist/components/homepage/Demo/TimeDisplay.d.ts +6 -0
  97. package/dist/components/homepage/Demo/TimeDisplay.js +27 -0
  98. package/dist/components/homepage/Demo/TrendingRepos.d.ts +6 -0
  99. package/dist/components/homepage/Demo/TrendingRepos.js +65 -0
  100. package/dist/components/homepage/Demo/icons.d.ts +10 -0
  101. package/dist/components/homepage/Demo/icons.js +22 -0
  102. package/dist/components/homepage/Demo/index.d.ts +2 -0
  103. package/dist/components/homepage/Demo/index.js +95 -0
  104. package/dist/components/homepage/Demo/math.d.ts +10 -0
  105. package/dist/components/homepage/Demo/math.js +29 -0
  106. package/dist/components/homepage/Demo/types.d.ts +6 -0
  107. package/dist/components/homepage/Demo/types.js +0 -0
  108. package/dist/components/homepage/EvaluateRemotion.d.ts +3 -0
  109. package/dist/components/homepage/EvaluateRemotion.js +21 -0
  110. package/dist/components/homepage/FreePricing.d.ts +4 -0
  111. package/dist/components/homepage/FreePricing.js +133 -0
  112. package/dist/components/homepage/GetStartedStrip.d.ts +2 -0
  113. package/dist/components/homepage/GetStartedStrip.js +14 -0
  114. package/dist/components/homepage/GitHubButton.d.ts +2 -0
  115. package/dist/components/homepage/GitHubButton.js +7 -0
  116. package/dist/components/homepage/IconForTemplate.d.ts +6 -0
  117. package/dist/components/homepage/IconForTemplate.js +105 -0
  118. package/dist/components/homepage/IfYouKnowReact.d.ts +3 -0
  119. package/dist/components/homepage/IfYouKnowReact.js +23 -0
  120. package/dist/components/homepage/MoreTemplatesButton.d.ts +2 -0
  121. package/dist/components/homepage/MoreTemplatesButton.js +11 -0
  122. package/dist/components/homepage/MuxVideo.d.ts +7 -0
  123. package/dist/components/homepage/MuxVideo.js +45 -0
  124. package/dist/components/homepage/NewsletterButton.d.ts +2 -0
  125. package/dist/components/homepage/NewsletterButton.js +38 -0
  126. package/dist/components/homepage/ParameterizeAndEdit.d.ts +2 -0
  127. package/dist/components/homepage/ParameterizeAndEdit.js +22 -0
  128. package/dist/components/homepage/Pricing.d.ts +2 -0
  129. package/dist/components/homepage/Pricing.js +15 -0
  130. package/dist/components/homepage/PricingBulletPoint.d.ts +6 -0
  131. package/dist/components/homepage/PricingBulletPoint.js +19 -0
  132. package/dist/components/homepage/RealMp4Videos.d.ts +2 -0
  133. package/dist/components/homepage/RealMp4Videos.js +41 -0
  134. package/dist/components/homepage/Spacer.d.ts +2 -0
  135. package/dist/components/homepage/Spacer.js +4 -0
  136. package/dist/components/homepage/TemplateIcon.d.ts +5 -0
  137. package/dist/components/homepage/TemplateIcon.js +24 -0
  138. package/dist/components/homepage/TextInput.d.ts +7 -0
  139. package/dist/components/homepage/TextInput.js +34 -0
  140. package/dist/components/homepage/TrustedByBanner.d.ts +2 -0
  141. package/dist/components/homepage/TrustedByBanner.js +27 -0
  142. package/dist/components/homepage/VideoApps.d.ts +4 -0
  143. package/dist/components/homepage/VideoApps.js +72 -0
  144. package/dist/components/homepage/VideoAppsShowcase.d.ts +2 -0
  145. package/dist/components/homepage/VideoAppsShowcase.js +139 -0
  146. package/dist/components/homepage/VideoAppsTitle.d.ts +4 -0
  147. package/dist/components/homepage/VideoAppsTitle.js +4 -0
  148. package/dist/components/homepage/VideoPlayerWithControls.d.ts +20 -0
  149. package/dist/components/homepage/VideoPlayerWithControls.js +105 -0
  150. package/dist/components/homepage/WriteInReact.d.ts +2 -0
  151. package/dist/components/homepage/WriteInReact.js +10 -0
  152. package/dist/components/homepage/YouAreHere.d.ts +2 -0
  153. package/dist/components/homepage/YouAreHere.js +23 -0
  154. package/dist/components/homepage/layout/Button.d.ts +22 -0
  155. package/dist/components/homepage/layout/Button.js +30 -0
  156. package/dist/components/homepage/layout/colors.d.ts +13 -0
  157. package/dist/components/homepage/layout/colors.js +14 -0
  158. package/dist/components/homepage/layout/use-color-mode.d.ts +21 -0
  159. package/dist/components/homepage/layout/use-color-mode.js +22 -0
  160. package/dist/components/homepage/layout/use-el-size.d.ts +5 -0
  161. package/dist/components/homepage/layout/use-el-size.js +40 -0
  162. package/dist/components/homepage/layout/use-mobile-layout.d.ts +1 -0
  163. package/dist/components/homepage/layout/use-mobile-layout.js +6 -0
  164. package/dist/components/icons/blank.d.ts +3 -0
  165. package/dist/components/icons/blank.js +4 -0
  166. package/dist/components/icons/brain.d.ts +2 -0
  167. package/dist/components/icons/brain.js +4 -0
  168. package/dist/components/icons/clone.d.ts +2 -0
  169. package/dist/components/icons/clone.js +2 -0
  170. package/dist/components/icons/code-hike.d.ts +3 -0
  171. package/dist/components/icons/code-hike.js +4 -0
  172. package/dist/components/icons/cubes.d.ts +3 -0
  173. package/dist/components/icons/cubes.js +4 -0
  174. package/dist/components/icons/editor.d.ts +3 -0
  175. package/dist/components/icons/editor.js +4 -0
  176. package/dist/components/icons/electron.d.ts +4 -0
  177. package/dist/components/icons/electron.js +4 -0
  178. package/dist/components/icons/js.d.ts +3 -0
  179. package/dist/components/icons/js.js +4 -0
  180. package/dist/components/icons/music.d.ts +2 -0
  181. package/dist/components/icons/music.js +4 -0
  182. package/dist/components/icons/next.d.ts +4 -0
  183. package/dist/components/icons/next.js +4 -0
  184. package/dist/components/icons/overlay.d.ts +3 -0
  185. package/dist/components/icons/overlay.js +4 -0
  186. package/dist/components/icons/prompt-to-video.d.ts +2 -0
  187. package/dist/components/icons/prompt-to-video.js +4 -0
  188. package/dist/components/icons/recorder.d.ts +3 -0
  189. package/dist/components/icons/recorder.js +4 -0
  190. package/dist/components/icons/remix.d.ts +3 -0
  191. package/dist/components/icons/remix.js +4 -0
  192. package/dist/components/icons/render-server.d.ts +3 -0
  193. package/dist/components/icons/render-server.js +4 -0
  194. package/dist/components/icons/skia.d.ts +3 -0
  195. package/dist/components/icons/skia.js +4 -0
  196. package/dist/components/icons/stargazer.d.ts +3 -0
  197. package/dist/components/icons/stargazer.js +4 -0
  198. package/dist/components/icons/still.d.ts +3 -0
  199. package/dist/components/icons/still.js +4 -0
  200. package/dist/components/icons/tailwind.d.ts +3 -0
  201. package/dist/components/icons/tailwind.js +4 -0
  202. package/dist/components/icons/tiktok.d.ts +3 -0
  203. package/dist/components/icons/tiktok.js +4 -0
  204. package/dist/components/icons/timeline.d.ts +3 -0
  205. package/dist/components/icons/timeline.js +4 -0
  206. package/dist/components/icons/ts.d.ts +3 -0
  207. package/dist/components/icons/ts.js +4 -0
  208. package/dist/components/icons/undo.d.ts +3 -0
  209. package/dist/components/icons/undo.js +2 -0
  210. package/dist/components/icons/vercel.d.ts +4 -0
  211. package/dist/components/icons/vercel.js +4 -0
  212. package/dist/components/icons/waveform.d.ts +3 -0
  213. package/dist/components/icons/waveform.js +4 -0
  214. package/dist/components/prompts/CardLikeButton.d.ts +5 -0
  215. package/dist/components/prompts/CardLikeButton.js +49 -0
  216. package/dist/components/prompts/ClipboardIcon.d.ts +5 -0
  217. package/dist/components/prompts/ClipboardIcon.js +4 -0
  218. package/dist/components/prompts/CopyPromptButton.d.ts +4 -0
  219. package/dist/components/prompts/CopyPromptButton.js +13 -0
  220. package/dist/components/prompts/LikeButton.d.ts +5 -0
  221. package/dist/components/prompts/LikeButton.js +49 -0
  222. package/dist/components/prompts/MuxPlayer.d.ts +8 -0
  223. package/dist/components/prompts/MuxPlayer.js +21 -0
  224. package/dist/components/prompts/NewBackButton.d.ts +5 -0
  225. package/dist/components/prompts/NewBackButton.js +8 -0
  226. package/dist/components/prompts/Page.d.ts +8 -0
  227. package/dist/components/prompts/Page.js +7 -0
  228. package/dist/components/prompts/PromptsGallery.d.ts +7 -0
  229. package/dist/components/prompts/PromptsGallery.js +60 -0
  230. package/dist/components/prompts/PromptsShow.d.ts +5 -0
  231. package/dist/components/prompts/PromptsShow.js +17 -0
  232. package/dist/components/prompts/PromptsSubmit.d.ts +2 -0
  233. package/dist/components/prompts/PromptsSubmit.js +173 -0
  234. package/dist/components/prompts/config.d.ts +1 -0
  235. package/dist/components/prompts/config.js +1 -0
  236. package/dist/components/prompts/prompt-helpers.d.ts +8 -0
  237. package/dist/components/prompts/prompt-helpers.js +76 -0
  238. package/dist/components/prompts/prompt-types.d.ts +14 -0
  239. package/dist/components/prompts/prompt-types.js +0 -0
  240. package/dist/components/prompts/use-heart-animation.d.ts +5 -0
  241. package/dist/components/prompts/use-heart-animation.js +29 -0
  242. package/dist/components/team/TeamCards.d.ts +6 -0
  243. package/dist/components/team/TeamCards.js +19 -0
  244. package/dist/components/team/TitleTeamCards.d.ts +2 -0
  245. package/dist/components/team/TitleTeamCards.js +6 -0
  246. package/dist/components/team/TrustSection.d.ts +2 -0
  247. package/dist/components/team/TrustSection.js +59 -0
  248. package/dist/components/team.d.ts +3 -0
  249. package/dist/components/team.js +15 -0
  250. package/dist/components/template-modal-content.d.ts +5 -0
  251. package/dist/components/template-modal-content.js +73 -0
  252. package/dist/components/templates.d.ts +2 -0
  253. package/dist/components/templates.js +27 -0
  254. package/dist/design.js +527 -490
  255. package/dist/experts.js +527 -490
  256. package/dist/helpers/mobile-layout.d.ts +1 -0
  257. package/dist/helpers/mobile-layout.js +6 -0
  258. package/dist/helpers/use-el-size.d.ts +5 -0
  259. package/dist/helpers/use-el-size.js +40 -0
  260. package/dist/homepage/Pricing.js +527 -490
  261. package/dist/main.d.ts +1 -0
  262. package/dist/main.js +6 -0
  263. package/dist/prompts/PromptsGallery.js +527 -490
  264. package/dist/prompts/PromptsShow.js +527 -490
  265. package/dist/prompts/PromptsSubmit.js +527 -490
  266. package/dist/prompts-show.d.ts +1 -0
  267. package/dist/prompts-show.js +20 -0
  268. package/dist/prompts-submit.d.ts +1 -0
  269. package/dist/prompts-submit.js +6 -0
  270. package/dist/prompts.d.ts +1 -0
  271. package/dist/prompts.js +6 -0
  272. package/dist/team.d.ts +1 -0
  273. package/dist/team.js +527 -490
  274. package/dist/template-modal-content.js +527 -490
  275. package/dist/templates.js +527 -490
  276. package/package.json +13 -13
package/dist/team.js CHANGED
@@ -5745,7 +5745,7 @@ var getComponentsToAddStacksTo = () => componentsToAddStacksTo;
5745
5745
  var addSequenceStackTraces = (component) => {
5746
5746
  componentsToAddStacksTo.push(component);
5747
5747
  };
5748
- var VERSION = "4.0.475";
5748
+ var VERSION = "4.0.476";
5749
5749
  var checkMultipleRemotionVersions = () => {
5750
5750
  if (typeof globalThis === "undefined") {
5751
5751
  return;
@@ -6179,6 +6179,18 @@ var hiddenField = {
6179
6179
  default: false,
6180
6180
  description: "Hidden"
6181
6181
  };
6182
+ var showInTimelineField = {
6183
+ type: "hidden"
6184
+ };
6185
+ var sequenceNameField = {
6186
+ type: "hidden"
6187
+ };
6188
+ var extendSchemaWithSequenceName = (schema) => {
6189
+ return {
6190
+ name: sequenceNameField,
6191
+ ...schema
6192
+ };
6193
+ };
6182
6194
  var durationInFramesField = {
6183
6195
  type: "number",
6184
6196
  default: undefined,
@@ -6192,8 +6204,9 @@ var fromField = {
6192
6204
  step: 1,
6193
6205
  hiddenFromList: true
6194
6206
  };
6195
- var sequenceSchema = {
6207
+ var sequenceSchema = extendSchemaWithSequenceName({
6196
6208
  hidden: hiddenField,
6209
+ showInTimeline: showInTimelineField,
6197
6210
  from: fromField,
6198
6211
  durationInFrames: durationInFramesField,
6199
6212
  layout: {
@@ -6205,12 +6218,13 @@ var sequenceSchema = {
6205
6218
  none: {}
6206
6219
  }
6207
6220
  }
6208
- };
6209
- var sequenceSchemaWithoutFrom = {
6221
+ });
6222
+ var sequenceSchemaWithoutFrom = extendSchemaWithSequenceName({
6210
6223
  hidden: hiddenField,
6224
+ showInTimeline: showInTimelineField,
6211
6225
  durationInFrames: durationInFramesField,
6212
6226
  layout: sequenceSchema.layout
6213
- };
6227
+ });
6214
6228
  var sequenceSchemaDefaultLayoutNone = {
6215
6229
  ...sequenceSchema,
6216
6230
  layout: {
@@ -6554,81 +6568,6 @@ function bezier(mX1, mY1, mX2, mY2) {
6554
6568
  return calcBezier(getTForX(clampedX), mY1, mY2);
6555
6569
  };
6556
6570
  }
6557
- var clampUnit = (t) => Math.min(1, Math.max(0, t));
6558
-
6559
- class Easing {
6560
- static step0(n) {
6561
- return n > 0 ? 1 : 0;
6562
- }
6563
- static step1(n) {
6564
- return n >= 1 ? 1 : 0;
6565
- }
6566
- static linear(t) {
6567
- return t;
6568
- }
6569
- static ease(t) {
6570
- return Easing.bezier(0.42, 0, 1, 1)(t);
6571
- }
6572
- static quad(t) {
6573
- return t * t;
6574
- }
6575
- static cubic(t) {
6576
- return t * t * t;
6577
- }
6578
- static poly(n) {
6579
- return (t) => t ** n;
6580
- }
6581
- static sin(t) {
6582
- return 1 - Math.cos(t * Math.PI / 2);
6583
- }
6584
- static circle(t) {
6585
- const u = clampUnit(t);
6586
- return 1 - Math.sqrt(1 - u * u);
6587
- }
6588
- static exp(t) {
6589
- return 2 ** (10 * (t - 1));
6590
- }
6591
- static elastic(bounciness = 1) {
6592
- const p = bounciness * Math.PI;
6593
- return (t) => 1 - Math.cos(t * Math.PI / 2) ** 3 * Math.cos(t * p);
6594
- }
6595
- static back(s = 1.70158) {
6596
- return (t) => t * t * ((s + 1) * t - s);
6597
- }
6598
- static bounce(t) {
6599
- const u = clampUnit(t);
6600
- if (u < 1 / 2.75) {
6601
- return 7.5625 * u * u;
6602
- }
6603
- if (u < 2 / 2.75) {
6604
- const t2_ = u - 1.5 / 2.75;
6605
- return 7.5625 * t2_ * t2_ + 0.75;
6606
- }
6607
- if (u < 2.5 / 2.75) {
6608
- const t2_ = u - 2.25 / 2.75;
6609
- return 7.5625 * t2_ * t2_ + 0.9375;
6610
- }
6611
- const t2 = u - 2.625 / 2.75;
6612
- return 7.5625 * t2 * t2 + 0.984375;
6613
- }
6614
- static bezier(x1, y1, x2, y2) {
6615
- return bezier(x1, y1, x2, y2);
6616
- }
6617
- static in(easing) {
6618
- return easing;
6619
- }
6620
- static out(easing) {
6621
- return (t) => 1 - easing(1 - t);
6622
- }
6623
- static inOut(easing) {
6624
- return (t) => {
6625
- if (t < 0.5) {
6626
- return easing(t * 2) / 2;
6627
- }
6628
- return 1 - easing((1 - t) * 2) / 2;
6629
- };
6630
- }
6631
- }
6632
6571
  var normalizeNumber = (value) => {
6633
6572
  return Math.round(value * 1e6) / 1e6;
6634
6573
  };
@@ -7131,130 +7070,480 @@ function interpolate(input, inputRange, outputRange, options) {
7131
7070
  checkInfiniteRange("outputRange", outputRange);
7132
7071
  return interpolateNumber({ input, inputRange, outputRange, options });
7133
7072
  }
7134
- var NUMBER = "[-+]?\\d*\\.?\\d+";
7135
- var PERCENTAGE = NUMBER + "%";
7136
- function call(...args) {
7137
- return "\\(\\s*(" + args.join(")\\s*,\\s*(") + ")\\s*\\)";
7138
- }
7139
- var MODERN_VALUE = "(?:none|[-+]?\\d*\\.?\\d+(?:%|deg|rad|grad|turn)?)";
7140
- function modernColorCall(name) {
7141
- return new RegExp(name + "\\(\\s*(" + MODERN_VALUE + ")\\s+(" + MODERN_VALUE + ")\\s+(" + MODERN_VALUE + ")(?:\\s*\\/\\s*(" + MODERN_VALUE + "))?\\s*\\)");
7142
- }
7143
- function getMatchers() {
7144
- const cachedMatchers = {
7145
- rgb: undefined,
7146
- rgba: undefined,
7147
- hsl: undefined,
7148
- hsla: undefined,
7149
- hex3: undefined,
7150
- hex4: undefined,
7151
- hex5: undefined,
7152
- hex6: undefined,
7153
- hex8: undefined,
7154
- oklch: undefined,
7155
- oklab: undefined,
7156
- lab: undefined,
7157
- lch: undefined,
7158
- hwb: undefined
7159
- };
7160
- if (cachedMatchers.rgb === undefined) {
7161
- cachedMatchers.rgb = new RegExp("rgb" + call(NUMBER, NUMBER, NUMBER));
7162
- cachedMatchers.rgba = new RegExp("rgba" + call(NUMBER, NUMBER, NUMBER, NUMBER));
7163
- cachedMatchers.hsl = new RegExp("hsl" + call(NUMBER, PERCENTAGE, PERCENTAGE));
7164
- cachedMatchers.hsla = new RegExp("hsla" + call(NUMBER, PERCENTAGE, PERCENTAGE, NUMBER));
7165
- cachedMatchers.hex3 = /^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/;
7166
- cachedMatchers.hex4 = /^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/;
7167
- cachedMatchers.hex6 = /^#([0-9a-fA-F]{6})$/;
7168
- cachedMatchers.hex8 = /^#([0-9a-fA-F]{8})$/;
7169
- cachedMatchers.oklch = modernColorCall("oklch");
7170
- cachedMatchers.oklab = modernColorCall("oklab");
7171
- cachedMatchers.lab = modernColorCall("lab");
7172
- cachedMatchers.lch = modernColorCall("lch");
7173
- cachedMatchers.hwb = modernColorCall("hwb");
7174
- }
7175
- return cachedMatchers;
7176
- }
7177
- function hue2rgb(p, q, t) {
7178
- if (t < 0) {
7179
- t += 1;
7073
+ var validateFrame = ({
7074
+ allowFloats,
7075
+ durationInFrames,
7076
+ frame
7077
+ }) => {
7078
+ if (typeof frame === "undefined") {
7079
+ throw new TypeError(`Argument missing for parameter "frame"`);
7180
7080
  }
7181
- if (t > 1) {
7182
- t -= 1;
7081
+ if (typeof frame !== "number") {
7082
+ throw new TypeError(`Argument passed for "frame" is not a number: ${frame}`);
7183
7083
  }
7184
- if (t < 1 / 6) {
7185
- return p + (q - p) * 6 * t;
7084
+ if (!Number.isFinite(frame)) {
7085
+ throw new RangeError(`Frame ${frame} is not finite`);
7186
7086
  }
7187
- if (t < 1 / 2) {
7188
- return q;
7087
+ if (frame % 1 !== 0 && !allowFloats) {
7088
+ throw new RangeError(`Argument for frame must be an integer, but got ${frame}`);
7189
7089
  }
7190
- if (t < 2 / 3) {
7191
- return p + (q - p) * (2 / 3 - t) * 6;
7090
+ if (frame < 0 && frame < -durationInFrames) {
7091
+ throw new RangeError(`Cannot use frame ${frame}: Duration of composition is ${durationInFrames}, therefore the lowest frame that can be rendered is ${-durationInFrames}`);
7192
7092
  }
7193
- return p;
7194
- }
7195
- function hslToRgb(h, s, l) {
7196
- const q = l < 0.5 ? l * (1 + s) : l + s - l * s;
7197
- const p = 2 * l - q;
7198
- const r2 = hue2rgb(p, q, h + 1 / 3);
7199
- const g = hue2rgb(p, q, h);
7200
- const b2 = hue2rgb(p, q, h - 1 / 3);
7201
- return Math.round(r2 * 255) << 24 | Math.round(g * 255) << 16 | Math.round(b2 * 255) << 8;
7202
- }
7203
- function parse255(str) {
7204
- const int = Number.parseInt(str, 10);
7205
- if (int < 0) {
7206
- return 0;
7093
+ if (frame > durationInFrames - 1) {
7094
+ throw new RangeError(`Cannot use frame ${frame}: Duration of composition is ${durationInFrames}, therefore the highest frame that can be rendered is ${durationInFrames - 1}`);
7207
7095
  }
7208
- if (int > 255) {
7209
- return 255;
7096
+ };
7097
+ var validateSpringDuration = (dur) => {
7098
+ if (typeof dur === "undefined") {
7099
+ return;
7210
7100
  }
7211
- return int;
7212
- }
7213
- function parse360(str) {
7214
- const int = Number.parseFloat(str);
7215
- return (int % 360 + 360) % 360 / 360;
7216
- }
7217
- function parse1(str) {
7218
- const num = Number.parseFloat(str);
7219
- if (num < 0) {
7220
- return 0;
7101
+ if (typeof dur !== "number") {
7102
+ throw new TypeError(`A "duration" of a spring must be a "number" but is "${typeof dur}"`);
7221
7103
  }
7222
- if (num > 1) {
7223
- return 255;
7104
+ if (Number.isNaN(dur)) {
7105
+ throw new TypeError('A "duration" of a spring is NaN, which it must not be');
7224
7106
  }
7225
- return Math.round(num * 255);
7226
- }
7227
- function parsePercentage(str) {
7228
- const int = Number.parseFloat(str);
7229
- if (int < 0) {
7230
- return 0;
7107
+ if (!Number.isFinite(dur)) {
7108
+ throw new TypeError('A "duration" of a spring must be finite, but is ' + dur);
7231
7109
  }
7232
- if (int > 100) {
7233
- return 1;
7110
+ if (dur <= 0) {
7111
+ throw new TypeError('A "duration" of a spring must be positive, but is ' + dur);
7234
7112
  }
7235
- return int / 100;
7236
- }
7237
- function parseModernComponent(str, percentScale) {
7238
- if (str === "none")
7239
- return 0;
7240
- if (str.endsWith("%")) {
7241
- return Number.parseFloat(str) / 100 * percentScale;
7113
+ };
7114
+ var defaultSpringConfig = {
7115
+ damping: 10,
7116
+ mass: 1,
7117
+ stiffness: 100,
7118
+ overshootClamping: false
7119
+ };
7120
+ var advanceCache = {};
7121
+ function advance({
7122
+ animation,
7123
+ now,
7124
+ config
7125
+ }) {
7126
+ const { toValue: toValue2, lastTimestamp, current, velocity } = animation;
7127
+ const deltaTime = Math.min(now - lastTimestamp, 64);
7128
+ if (config.damping <= 0) {
7129
+ throw new Error("Spring damping must be greater than 0, otherwise the spring() animation will never end, causing an infinite loop.");
7242
7130
  }
7243
- return Number.parseFloat(str);
7244
- }
7245
- function parseHueAngle(str) {
7246
- if (str === "none")
7247
- return 0;
7248
- if (str.endsWith("rad")) {
7249
- return Number.parseFloat(str) * 180 / Math.PI;
7131
+ const c2 = config.damping;
7132
+ const m = config.mass;
7133
+ const k = config.stiffness;
7134
+ const cacheKey = [
7135
+ toValue2,
7136
+ lastTimestamp,
7137
+ current,
7138
+ velocity,
7139
+ c2,
7140
+ m,
7141
+ k,
7142
+ now
7143
+ ].join("-");
7144
+ if (advanceCache[cacheKey]) {
7145
+ return advanceCache[cacheKey];
7250
7146
  }
7251
- if (str.endsWith("grad"))
7252
- return Number.parseFloat(str) * 0.9;
7253
- if (str.endsWith("turn"))
7254
- return Number.parseFloat(str) * 360;
7255
- return Number.parseFloat(str);
7256
- }
7257
- function parseModernAlpha(str) {
7147
+ const v0 = -velocity;
7148
+ const x0 = toValue2 - current;
7149
+ const zeta = c2 / (2 * Math.sqrt(k * m));
7150
+ const omega0 = Math.sqrt(k / m);
7151
+ const omega1 = omega0 * Math.sqrt(1 - zeta ** 2);
7152
+ const t = deltaTime / 1000;
7153
+ const sin1 = Math.sin(omega1 * t);
7154
+ const cos1 = Math.cos(omega1 * t);
7155
+ const underDampedEnvelope = Math.exp(-zeta * omega0 * t);
7156
+ const underDampedFrag1 = underDampedEnvelope * (sin1 * ((v0 + zeta * omega0 * x0) / omega1) + x0 * cos1);
7157
+ const underDampedPosition = toValue2 - underDampedFrag1;
7158
+ const underDampedVelocity = zeta * omega0 * underDampedFrag1 - underDampedEnvelope * (cos1 * (v0 + zeta * omega0 * x0) - omega1 * x0 * sin1);
7159
+ const criticallyDampedEnvelope = Math.exp(-omega0 * t);
7160
+ const criticallyDampedPosition = toValue2 - criticallyDampedEnvelope * (x0 + (v0 + omega0 * x0) * t);
7161
+ const criticallyDampedVelocity = criticallyDampedEnvelope * (v0 * (t * omega0 - 1) + t * x0 * omega0 * omega0);
7162
+ const animationNode = {
7163
+ toValue: toValue2,
7164
+ prevPosition: current,
7165
+ lastTimestamp: now,
7166
+ current: zeta < 1 ? underDampedPosition : criticallyDampedPosition,
7167
+ velocity: zeta < 1 ? underDampedVelocity : criticallyDampedVelocity
7168
+ };
7169
+ advanceCache[cacheKey] = animationNode;
7170
+ return animationNode;
7171
+ }
7172
+ var calculationCache = {};
7173
+ function springCalculation({
7174
+ frame,
7175
+ fps,
7176
+ config = {}
7177
+ }) {
7178
+ const from = 0;
7179
+ const to = 1;
7180
+ const cacheKey = [
7181
+ frame,
7182
+ fps,
7183
+ config.damping,
7184
+ config.mass,
7185
+ config.overshootClamping,
7186
+ config.stiffness
7187
+ ].join("-");
7188
+ if (calculationCache[cacheKey]) {
7189
+ return calculationCache[cacheKey];
7190
+ }
7191
+ let animation = {
7192
+ lastTimestamp: 0,
7193
+ current: from,
7194
+ toValue: to,
7195
+ velocity: 0,
7196
+ prevPosition: 0
7197
+ };
7198
+ const frameClamped = Math.max(0, frame);
7199
+ const unevenRest = frameClamped % 1;
7200
+ for (let f = 0;f <= Math.floor(frameClamped); f++) {
7201
+ if (f === Math.floor(frameClamped)) {
7202
+ f += unevenRest;
7203
+ }
7204
+ const time = f / fps * 1000;
7205
+ animation = advance({
7206
+ animation,
7207
+ now: time,
7208
+ config: {
7209
+ ...defaultSpringConfig,
7210
+ ...config
7211
+ }
7212
+ });
7213
+ }
7214
+ calculationCache[cacheKey] = animation;
7215
+ return animation;
7216
+ }
7217
+ var cache = new Map;
7218
+ function measureSpring({
7219
+ fps,
7220
+ config = {},
7221
+ threshold = 0.005
7222
+ }) {
7223
+ if (typeof threshold !== "number") {
7224
+ throw new TypeError(`threshold must be a number, got ${threshold} of type ${typeof threshold}`);
7225
+ }
7226
+ if (threshold === 0) {
7227
+ return Infinity;
7228
+ }
7229
+ if (threshold === 1) {
7230
+ return 0;
7231
+ }
7232
+ if (isNaN(threshold)) {
7233
+ throw new TypeError("Threshold is NaN");
7234
+ }
7235
+ if (!Number.isFinite(threshold)) {
7236
+ throw new TypeError("Threshold is not finite");
7237
+ }
7238
+ if (threshold < 0) {
7239
+ throw new TypeError("Threshold is below 0");
7240
+ }
7241
+ const cacheKey = [
7242
+ fps,
7243
+ config.damping,
7244
+ config.mass,
7245
+ config.overshootClamping,
7246
+ config.stiffness,
7247
+ threshold
7248
+ ].join("-");
7249
+ if (cache.has(cacheKey)) {
7250
+ return cache.get(cacheKey);
7251
+ }
7252
+ validateFps(fps, "to the measureSpring() function", false);
7253
+ let frame = 0;
7254
+ let finishedFrame = 0;
7255
+ const calc = () => {
7256
+ return springCalculation({
7257
+ fps,
7258
+ frame,
7259
+ config
7260
+ });
7261
+ };
7262
+ let animation = calc();
7263
+ const calcDifference = () => {
7264
+ return Math.abs(animation.current - animation.toValue);
7265
+ };
7266
+ let difference = calcDifference();
7267
+ while (difference >= threshold) {
7268
+ frame++;
7269
+ animation = calc();
7270
+ difference = calcDifference();
7271
+ }
7272
+ finishedFrame = frame;
7273
+ for (let i = 0;i < 20; i++) {
7274
+ frame++;
7275
+ animation = calc();
7276
+ difference = calcDifference();
7277
+ if (difference >= threshold) {
7278
+ i = 0;
7279
+ finishedFrame = frame + 1;
7280
+ }
7281
+ }
7282
+ cache.set(cacheKey, finishedFrame);
7283
+ return finishedFrame;
7284
+ }
7285
+ function spring({
7286
+ frame: passedFrame,
7287
+ fps,
7288
+ config = {},
7289
+ from = 0,
7290
+ to = 1,
7291
+ durationInFrames: passedDurationInFrames,
7292
+ durationRestThreshold,
7293
+ delay = 0,
7294
+ reverse = false
7295
+ }) {
7296
+ validateSpringDuration(passedDurationInFrames);
7297
+ validateFrame({
7298
+ frame: passedFrame,
7299
+ durationInFrames: Infinity,
7300
+ allowFloats: true
7301
+ });
7302
+ validateFps(fps, "to spring()", false);
7303
+ const needsToCalculateNaturalDuration = reverse || typeof passedDurationInFrames !== "undefined";
7304
+ const naturalDuration = needsToCalculateNaturalDuration ? measureSpring({
7305
+ fps,
7306
+ config,
7307
+ threshold: durationRestThreshold
7308
+ }) : undefined;
7309
+ const naturalDurationGetter = needsToCalculateNaturalDuration ? {
7310
+ get: () => naturalDuration
7311
+ } : {
7312
+ get: () => {
7313
+ throw new Error("did not calculate natural duration, this is an error with Remotion. Please report");
7314
+ }
7315
+ };
7316
+ const reverseProcessed = reverse ? (passedDurationInFrames ?? naturalDurationGetter.get()) - passedFrame : passedFrame;
7317
+ const delayProcessed = reverseProcessed + (reverse ? delay : -delay);
7318
+ const durationProcessed = passedDurationInFrames === undefined ? delayProcessed : delayProcessed / (passedDurationInFrames / naturalDurationGetter.get());
7319
+ if (passedDurationInFrames && delayProcessed > passedDurationInFrames) {
7320
+ return to;
7321
+ }
7322
+ const spr = springCalculation({
7323
+ fps,
7324
+ frame: durationProcessed,
7325
+ config
7326
+ });
7327
+ const inner = config.overshootClamping ? to >= from ? Math.min(spr.current, to) : Math.max(spr.current, to) : spr.current;
7328
+ const interpolated = from === 0 && to === 1 ? inner : interpolate(inner, [0, 1], [from, to]);
7329
+ return interpolated;
7330
+ }
7331
+ var clampUnit = (t) => Math.min(1, Math.max(0, t));
7332
+ var springEasingDurationInFrames = 30;
7333
+
7334
+ class Easing {
7335
+ static step0(n) {
7336
+ return n > 0 ? 1 : 0;
7337
+ }
7338
+ static step1(n) {
7339
+ return n >= 1 ? 1 : 0;
7340
+ }
7341
+ static linear(t) {
7342
+ return t;
7343
+ }
7344
+ static ease(t) {
7345
+ return Easing.bezier(0.42, 0, 1, 1)(t);
7346
+ }
7347
+ static quad(t) {
7348
+ return t * t;
7349
+ }
7350
+ static cubic(t) {
7351
+ return t * t * t;
7352
+ }
7353
+ static poly(n) {
7354
+ return (t) => t ** n;
7355
+ }
7356
+ static sin(t) {
7357
+ return 1 - Math.cos(t * Math.PI / 2);
7358
+ }
7359
+ static circle(t) {
7360
+ const u = clampUnit(t);
7361
+ return 1 - Math.sqrt(1 - u * u);
7362
+ }
7363
+ static exp(t) {
7364
+ return 2 ** (10 * (t - 1));
7365
+ }
7366
+ static elastic(bounciness = 1) {
7367
+ const p = bounciness * Math.PI;
7368
+ return (t) => 1 - Math.cos(t * Math.PI / 2) ** 3 * Math.cos(t * p);
7369
+ }
7370
+ static back(s = 1.70158) {
7371
+ return (t) => t * t * ((s + 1) * t - s);
7372
+ }
7373
+ static spring(config = {}) {
7374
+ return (t) => {
7375
+ if (t <= 0) {
7376
+ return 0;
7377
+ }
7378
+ if (t >= 1) {
7379
+ return 1;
7380
+ }
7381
+ return spring({
7382
+ fps: springEasingDurationInFrames,
7383
+ frame: t * springEasingDurationInFrames,
7384
+ config,
7385
+ durationInFrames: springEasingDurationInFrames
7386
+ });
7387
+ };
7388
+ }
7389
+ static bounce(t) {
7390
+ const u = clampUnit(t);
7391
+ if (u < 1 / 2.75) {
7392
+ return 7.5625 * u * u;
7393
+ }
7394
+ if (u < 2 / 2.75) {
7395
+ const t2_ = u - 1.5 / 2.75;
7396
+ return 7.5625 * t2_ * t2_ + 0.75;
7397
+ }
7398
+ if (u < 2.5 / 2.75) {
7399
+ const t2_ = u - 2.25 / 2.75;
7400
+ return 7.5625 * t2_ * t2_ + 0.9375;
7401
+ }
7402
+ const t2 = u - 2.625 / 2.75;
7403
+ return 7.5625 * t2 * t2 + 0.984375;
7404
+ }
7405
+ static bezier(x1, y1, x2, y2) {
7406
+ return bezier(x1, y1, x2, y2);
7407
+ }
7408
+ static in(easing) {
7409
+ return easing;
7410
+ }
7411
+ static out(easing) {
7412
+ return (t) => 1 - easing(1 - t);
7413
+ }
7414
+ static inOut(easing) {
7415
+ return (t) => {
7416
+ if (t < 0.5) {
7417
+ return easing(t * 2) / 2;
7418
+ }
7419
+ return 1 - easing((1 - t) * 2) / 2;
7420
+ };
7421
+ }
7422
+ }
7423
+ var NUMBER = "[-+]?\\d*\\.?\\d+";
7424
+ var PERCENTAGE = NUMBER + "%";
7425
+ function call(...args) {
7426
+ return "\\(\\s*(" + args.join(")\\s*,\\s*(") + ")\\s*\\)";
7427
+ }
7428
+ var MODERN_VALUE = "(?:none|[-+]?\\d*\\.?\\d+(?:%|deg|rad|grad|turn)?)";
7429
+ function modernColorCall(name) {
7430
+ return new RegExp(name + "\\(\\s*(" + MODERN_VALUE + ")\\s+(" + MODERN_VALUE + ")\\s+(" + MODERN_VALUE + ")(?:\\s*\\/\\s*(" + MODERN_VALUE + "))?\\s*\\)");
7431
+ }
7432
+ function getMatchers() {
7433
+ const cachedMatchers = {
7434
+ rgb: undefined,
7435
+ rgba: undefined,
7436
+ hsl: undefined,
7437
+ hsla: undefined,
7438
+ hex3: undefined,
7439
+ hex4: undefined,
7440
+ hex5: undefined,
7441
+ hex6: undefined,
7442
+ hex8: undefined,
7443
+ oklch: undefined,
7444
+ oklab: undefined,
7445
+ lab: undefined,
7446
+ lch: undefined,
7447
+ hwb: undefined
7448
+ };
7449
+ if (cachedMatchers.rgb === undefined) {
7450
+ cachedMatchers.rgb = new RegExp("rgb" + call(NUMBER, NUMBER, NUMBER));
7451
+ cachedMatchers.rgba = new RegExp("rgba" + call(NUMBER, NUMBER, NUMBER, NUMBER));
7452
+ cachedMatchers.hsl = new RegExp("hsl" + call(NUMBER, PERCENTAGE, PERCENTAGE));
7453
+ cachedMatchers.hsla = new RegExp("hsla" + call(NUMBER, PERCENTAGE, PERCENTAGE, NUMBER));
7454
+ cachedMatchers.hex3 = /^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/;
7455
+ cachedMatchers.hex4 = /^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/;
7456
+ cachedMatchers.hex6 = /^#([0-9a-fA-F]{6})$/;
7457
+ cachedMatchers.hex8 = /^#([0-9a-fA-F]{8})$/;
7458
+ cachedMatchers.oklch = modernColorCall("oklch");
7459
+ cachedMatchers.oklab = modernColorCall("oklab");
7460
+ cachedMatchers.lab = modernColorCall("lab");
7461
+ cachedMatchers.lch = modernColorCall("lch");
7462
+ cachedMatchers.hwb = modernColorCall("hwb");
7463
+ }
7464
+ return cachedMatchers;
7465
+ }
7466
+ function hue2rgb(p, q, t) {
7467
+ if (t < 0) {
7468
+ t += 1;
7469
+ }
7470
+ if (t > 1) {
7471
+ t -= 1;
7472
+ }
7473
+ if (t < 1 / 6) {
7474
+ return p + (q - p) * 6 * t;
7475
+ }
7476
+ if (t < 1 / 2) {
7477
+ return q;
7478
+ }
7479
+ if (t < 2 / 3) {
7480
+ return p + (q - p) * (2 / 3 - t) * 6;
7481
+ }
7482
+ return p;
7483
+ }
7484
+ function hslToRgb(h, s, l) {
7485
+ const q = l < 0.5 ? l * (1 + s) : l + s - l * s;
7486
+ const p = 2 * l - q;
7487
+ const r2 = hue2rgb(p, q, h + 1 / 3);
7488
+ const g = hue2rgb(p, q, h);
7489
+ const b2 = hue2rgb(p, q, h - 1 / 3);
7490
+ return Math.round(r2 * 255) << 24 | Math.round(g * 255) << 16 | Math.round(b2 * 255) << 8;
7491
+ }
7492
+ function parse255(str) {
7493
+ const int = Number.parseInt(str, 10);
7494
+ if (int < 0) {
7495
+ return 0;
7496
+ }
7497
+ if (int > 255) {
7498
+ return 255;
7499
+ }
7500
+ return int;
7501
+ }
7502
+ function parse360(str) {
7503
+ const int = Number.parseFloat(str);
7504
+ return (int % 360 + 360) % 360 / 360;
7505
+ }
7506
+ function parse1(str) {
7507
+ const num = Number.parseFloat(str);
7508
+ if (num < 0) {
7509
+ return 0;
7510
+ }
7511
+ if (num > 1) {
7512
+ return 255;
7513
+ }
7514
+ return Math.round(num * 255);
7515
+ }
7516
+ function parsePercentage(str) {
7517
+ const int = Number.parseFloat(str);
7518
+ if (int < 0) {
7519
+ return 0;
7520
+ }
7521
+ if (int > 100) {
7522
+ return 1;
7523
+ }
7524
+ return int / 100;
7525
+ }
7526
+ function parseModernComponent(str, percentScale) {
7527
+ if (str === "none")
7528
+ return 0;
7529
+ if (str.endsWith("%")) {
7530
+ return Number.parseFloat(str) / 100 * percentScale;
7531
+ }
7532
+ return Number.parseFloat(str);
7533
+ }
7534
+ function parseHueAngle(str) {
7535
+ if (str === "none")
7536
+ return 0;
7537
+ if (str.endsWith("rad")) {
7538
+ return Number.parseFloat(str) * 180 / Math.PI;
7539
+ }
7540
+ if (str.endsWith("grad"))
7541
+ return Number.parseFloat(str) * 0.9;
7542
+ if (str.endsWith("turn"))
7543
+ return Number.parseFloat(str) * 360;
7544
+ return Number.parseFloat(str);
7545
+ }
7546
+ function parseModernAlpha(str) {
7258
7547
  if (str === undefined || str === "none")
7259
7548
  return 1;
7260
7549
  if (str.endsWith("%")) {
@@ -8127,7 +8416,8 @@ var wrapInSchema = ({
8127
8416
  schema,
8128
8417
  supportsEffects
8129
8418
  }) => {
8130
- const flatSchema = getFlatSchemaWithAllKeys(schema);
8419
+ const schemaWithSequenceName = extendSchemaWithSequenceName(schema);
8420
+ const flatSchema = getFlatSchemaWithAllKeys(schemaWithSequenceName);
8131
8421
  const flatKeys = Object.keys(flatSchema);
8132
8422
  const Wrapped = forwardRef2((props, ref) => {
8133
8423
  const env = useRemotionEnvironment();
@@ -8166,7 +8456,7 @@ var wrapInSchema = ({
8166
8456
  const currentRuntimeValueDotNotation = useMemo13(() => readValuesFromProps(props, flatKeys), runtimeValues);
8167
8457
  const controls = useMemo13(() => {
8168
8458
  return {
8169
- schema,
8459
+ schema: schemaWithSequenceName,
8170
8460
  currentRuntimeValueDotNotation,
8171
8461
  overrideId,
8172
8462
  supportsEffects
@@ -8174,7 +8464,7 @@ var wrapInSchema = ({
8174
8464
  }, [currentRuntimeValueDotNotation, overrideId]);
8175
8465
  const { merged: valuesDotNotation, propsToDelete } = useMemo13(() => {
8176
8466
  return computeEffectiveSchemaValuesDotNotation({
8177
- schema,
8467
+ schema: schemaWithSequenceName,
8178
8468
  currentValue: currentRuntimeValueDotNotation,
8179
8469
  overrideValues: nodePath === null ? {} : getDragOverrides(nodePath),
8180
8470
  propStatus: nodePath === null ? undefined : getPropStatusesCtx(propStatuses, nodePath),
@@ -8187,7 +8477,7 @@ var wrapInSchema = ({
8187
8477
  propStatuses,
8188
8478
  frame
8189
8479
  ]);
8190
- const activeKeys = selectActiveKeys(schema, valuesDotNotation);
8480
+ const activeKeys = selectActiveKeys(schemaWithSequenceName, valuesDotNotation);
8191
8481
  const mergedProps = mergeValues({
8192
8482
  props,
8193
8483
  valuesDotNotation,
@@ -8229,6 +8519,7 @@ var RegularSequenceRefForwardingFunction = ({
8229
8519
  const parentSequence = useContext17(SequenceContext);
8230
8520
  const { rootId } = useTimelineContext();
8231
8521
  const cumulatedFrom = parentSequence ? parentSequence.cumulatedFrom + parentSequence.relativeFrom : 0;
8522
+ const absoluteFrom = (parentSequence?.absoluteFrom ?? 0) + from;
8232
8523
  const nonce = useNonce();
8233
8524
  if (layout !== "absolute-fill" && layout !== "none") {
8234
8525
  throw new TypeError(`The layout prop of <Sequence /> expects either "absolute-fill" or "none", but you passed: ${layout}`);
@@ -8266,6 +8557,7 @@ var RegularSequenceRefForwardingFunction = ({
8266
8557
  const cumulatedNegativeFrom = currentSequenceStart - firstFrame;
8267
8558
  const contextValue = useMemo14(() => {
8268
8559
  return {
8560
+ absoluteFrom,
8269
8561
  cumulatedFrom,
8270
8562
  relativeFrom: from,
8271
8563
  cumulatedNegativeFrom,
@@ -8281,6 +8573,7 @@ var RegularSequenceRefForwardingFunction = ({
8281
8573
  };
8282
8574
  }, [
8283
8575
  cumulatedFrom,
8576
+ absoluteFrom,
8284
8577
  from,
8285
8578
  actualDurationInFrames,
8286
8579
  parentSequence,
@@ -8296,7 +8589,7 @@ var RegularSequenceRefForwardingFunction = ({
8296
8589
  const timelineClipName = useMemo14(() => {
8297
8590
  return name ?? "";
8298
8591
  }, [name]);
8299
- const resolvedDocumentationLink = documentationLink ?? (name === undefined ? "https://www.remotion.dev/docs/sequence" : null);
8592
+ const resolvedDocumentationLink = documentationLink ?? "https://www.remotion.dev/docs/sequence";
8300
8593
  const env = useRemotionEnvironment();
8301
8594
  const isInsideSeries = useContext17(IsInsideSeriesContext);
8302
8595
  const inheritedStack = other?.stack ?? null;
@@ -8923,10 +9216,10 @@ var decodeImage = async ({
8923
9216
  if (!selectedTrack) {
8924
9217
  throw new Error("No selected track");
8925
9218
  }
8926
- const cache = [];
9219
+ const cache2 = [];
8927
9220
  let durationFound = null;
8928
9221
  const getFrameByIndex = async (frameIndex) => {
8929
- const foundInCache = cache.find((c2) => c2.frameIndex === frameIndex);
9222
+ const foundInCache = cache2.find((c2) => c2.frameIndex === frameIndex);
8930
9223
  if (foundInCache && foundInCache.frame) {
8931
9224
  return foundInCache;
8932
9225
  }
@@ -8937,7 +9230,7 @@ var decodeImage = async ({
8937
9230
  if (foundInCache) {
8938
9231
  foundInCache.frame = frame.image;
8939
9232
  } else {
8940
- cache.push({
9233
+ cache2.push({
8941
9234
  frame: frame.image,
8942
9235
  frameIndex,
8943
9236
  timeInSeconds: frame.image.timestamp / 1e6
@@ -8950,7 +9243,7 @@ var decodeImage = async ({
8950
9243
  };
8951
9244
  };
8952
9245
  const clearCache = (closeToTimeInSec) => {
8953
- const itemsInCache = cache.filter((c2) => c2.frame);
9246
+ const itemsInCache = cache2.filter((c2) => c2.frame);
8954
9247
  const sortByClosestToCurrentTime = itemsInCache.sort((a2, b2) => {
8955
9248
  const aDiff = Math.abs(a2.timeInSeconds - closeToTimeInSec);
8956
9249
  const bDiff = Math.abs(b2.timeInSeconds - closeToTimeInSec);
@@ -8973,7 +9266,7 @@ var decodeImage = async ({
8973
9266
  loopBehavior,
8974
9267
  timeInSec
8975
9268
  });
8976
- const framesBefore = cache.filter((c2) => c2.timeInSeconds <= actualTimeInSec);
9269
+ const framesBefore = cache2.filter((c2) => c2.timeInSeconds <= actualTimeInSec);
8977
9270
  const biggestIndex = framesBefore.map((c2) => c2.frameIndex).reduce((a2, b2) => Math.max(a2, b2), 0);
8978
9271
  let i = biggestIndex;
8979
9272
  while (true) {
@@ -9016,7 +9309,7 @@ var decodeImage = async ({
9016
9309
  timeInSec
9017
9310
  });
9018
9311
  await ensureFrameBeforeAndAfter({ timeInSec: actualTimeInSec, loopBehavior });
9019
- const itemsInCache = cache.filter((c2) => c2.frame);
9312
+ const itemsInCache = cache2.filter((c2) => c2.frame);
9020
9313
  const closest = itemsInCache.reduce((a2, b2) => {
9021
9314
  const aDiff = Math.abs(a2.timeInSeconds - actualTimeInSec);
9022
9315
  const bDiff = Math.abs(b2.timeInSeconds - actualTimeInSec);
@@ -9477,7 +9770,7 @@ var Loop = ({
9477
9770
  durationInFrames,
9478
9771
  from,
9479
9772
  name: name ?? "<Loop>",
9480
- _remotionInternalDocumentationLink: name === undefined ? "https://www.remotion.dev/docs/loop" : undefined,
9773
+ _remotionInternalDocumentationLink: "https://www.remotion.dev/docs/loop",
9481
9774
  _remotionInternalLoopDisplay: loopDisplay,
9482
9775
  layout: props.layout,
9483
9776
  style,
@@ -11866,7 +12159,7 @@ var AudioForDevelopmentForwardRefFunction = (props, ref) => {
11866
12159
  premountDisplay: sequenceContext?.premountDisplay ?? null,
11867
12160
  postmountDisplay: sequenceContext?.postmountDisplay ?? null,
11868
12161
  loopDisplay: undefined,
11869
- documentationLink: name === undefined ? "https://www.remotion.dev/docs/html5-audio" : null,
12162
+ documentationLink: "https://www.remotion.dev/docs/html5-audio",
11870
12163
  refForOutline: null
11871
12164
  });
11872
12165
  useMediaPlayback({
@@ -12360,7 +12653,7 @@ var SolidOuter = forwardRef8(({
12360
12653
  durationInFrames,
12361
12654
  name: name ?? "<Solid>",
12362
12655
  _remotionInternalRefForOutline: actualRef,
12363
- _remotionInternalDocumentationLink: name === undefined ? "https://www.remotion.dev/docs/solid" : undefined,
12656
+ _remotionInternalDocumentationLink: "https://www.remotion.dev/docs/solid",
12364
12657
  ...props2,
12365
12658
  children: /* @__PURE__ */ jsx24(SolidInner, {
12366
12659
  reference: actualRef,
@@ -12672,7 +12965,7 @@ var HtmlInCanvasInner = forwardRef9(({
12672
12965
  return /* @__PURE__ */ jsx25(Sequence, {
12673
12966
  durationInFrames: resolvedDuration,
12674
12967
  name: name ?? "<HtmlInCanvas>",
12675
- _remotionInternalDocumentationLink: name === undefined ? "https://www.remotion.dev/docs/remotion/html-in-canvas" : undefined,
12968
+ _remotionInternalDocumentationLink: "https://www.remotion.dev/docs/remotion/html-in-canvas",
12676
12969
  _experimentalControls: controls,
12677
12970
  _remotionInternalEffects: memoizedEffectDefinitions,
12678
12971
  _remotionInternalRefForOutline: actualRef,
@@ -13236,7 +13529,7 @@ var NativeImgInner = ({
13236
13529
  from: from ?? 0,
13237
13530
  durationInFrames: durationInFrames ?? Infinity,
13238
13531
  _remotionInternalStack: stack,
13239
- _remotionInternalDocumentationLink: name === undefined ? "https://www.remotion.dev/docs/img" : undefined,
13532
+ _remotionInternalDocumentationLink: "https://www.remotion.dev/docs/img",
13240
13533
  _remotionInternalIsMedia: { type: "image", src },
13241
13534
  name: name ?? "<Img>",
13242
13535
  _experimentalControls: controls,
@@ -13378,7 +13671,7 @@ var ImgInner = ({
13378
13671
  name: name ?? "<Img>",
13379
13672
  showInTimeline,
13380
13673
  stack,
13381
- _remotionInternalDocumentationLink: name === undefined ? "https://www.remotion.dev/docs/img" : undefined,
13674
+ _remotionInternalDocumentationLink: "https://www.remotion.dev/docs/img",
13382
13675
  _experimentalControls: controls,
13383
13676
  _remotionInternalRefForOutline: refForOutline,
13384
13677
  ...canvasProps
@@ -13429,6 +13722,7 @@ var makeInteractiveElement = (tag, displayName) => {
13429
13722
  showInTimeline: showInTimeline ?? true,
13430
13723
  _experimentalControls,
13431
13724
  _remotionInternalStack: stack,
13725
+ _remotionInternalDocumentationLink: "https://www.remotion.dev/docs/interactive",
13432
13726
  _remotionInternalRefForOutline: refForOutline,
13433
13727
  children: React29.createElement(tag, {
13434
13728
  ...props2,
@@ -14326,7 +14620,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
14326
14620
  premountDisplay: parentSequence?.premountDisplay ?? null,
14327
14621
  postmountDisplay: parentSequence?.postmountDisplay ?? null,
14328
14622
  loopDisplay: undefined,
14329
- documentationLink: name === undefined ? onlyWarnForMediaSeekingError ? "https://www.remotion.dev/docs/offthreadvideo" : "https://www.remotion.dev/docs/html5-video" : null,
14623
+ documentationLink: onlyWarnForMediaSeekingError ? "https://www.remotion.dev/docs/offthreadvideo" : "https://www.remotion.dev/docs/html5-video",
14330
14624
  refForOutline: videoRef
14331
14625
  });
14332
14626
  useMediaPlayback({
@@ -14457,6 +14751,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
14457
14751
  isClientSideRendering: false
14458
14752
  });
14459
14753
  return /* @__PURE__ */ jsx34("video", {
14754
+ ...nativeProps,
14460
14755
  ref: videoRef,
14461
14756
  muted: muted || mediaMuted || userPreferredVolume <= 0,
14462
14757
  playsInline: true,
@@ -14465,7 +14760,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
14465
14760
  style: actualStyle,
14466
14761
  disableRemotePlayback: true,
14467
14762
  crossOrigin: crossOriginValue,
14468
- ...nativeProps
14763
+ controls: false
14469
14764
  });
14470
14765
  };
14471
14766
  var VideoForPreview = forwardRef13(VideoForDevelopmentRefForwardingFunction);
@@ -14843,52 +15138,28 @@ var Internals = {
14843
15138
  CompositionRenderErrorContext,
14844
15139
  useEffectChainState,
14845
15140
  createEffectChainState,
14846
- cleanupEffectChainState,
14847
- runEffectChain,
14848
- useMemoizedEffects,
14849
- useMemoizedEffectDefinitions,
14850
- createEffect,
14851
- createWebGLContextError,
14852
- createWebGL2ContextError,
14853
- computeEffectiveSchemaValuesDotNotation,
14854
- interpolateKeyframedStatus,
14855
- makeStaticDragOverride,
14856
- makeKeyframedDragOverride,
14857
- resolveDragOverrideValue,
14858
- getStaticDragOverrideValue,
14859
- OverrideIdsToNodePathsGettersContext,
14860
- OverrideIdsToNodePathsSettersContext,
14861
- findPropsToDelete,
14862
- makeSequencePropsSubscriptionKey,
14863
- getPropStatusesCtx,
14864
- getEffectPropStatusesCtx,
14865
- hiddenField,
14866
- durationInFramesField,
14867
- fromField
14868
- };
14869
- var validateFrame = ({
14870
- allowFloats,
14871
- durationInFrames,
14872
- frame
14873
- }) => {
14874
- if (typeof frame === "undefined") {
14875
- throw new TypeError(`Argument missing for parameter "frame"`);
14876
- }
14877
- if (typeof frame !== "number") {
14878
- throw new TypeError(`Argument passed for "frame" is not a number: ${frame}`);
14879
- }
14880
- if (!Number.isFinite(frame)) {
14881
- throw new RangeError(`Frame ${frame} is not finite`);
14882
- }
14883
- if (frame % 1 !== 0 && !allowFloats) {
14884
- throw new RangeError(`Argument for frame must be an integer, but got ${frame}`);
14885
- }
14886
- if (frame < 0 && frame < -durationInFrames) {
14887
- throw new RangeError(`Cannot use frame ${frame}: Duration of composition is ${durationInFrames}, therefore the lowest frame that can be rendered is ${-durationInFrames}`);
14888
- }
14889
- if (frame > durationInFrames - 1) {
14890
- throw new RangeError(`Cannot use frame ${frame}: Duration of composition is ${durationInFrames}, therefore the highest frame that can be rendered is ${durationInFrames - 1}`);
14891
- }
15141
+ cleanupEffectChainState,
15142
+ runEffectChain,
15143
+ useMemoizedEffects,
15144
+ useMemoizedEffectDefinitions,
15145
+ createEffect,
15146
+ createWebGLContextError,
15147
+ createWebGL2ContextError,
15148
+ computeEffectiveSchemaValuesDotNotation,
15149
+ interpolateKeyframedStatus,
15150
+ makeStaticDragOverride,
15151
+ makeKeyframedDragOverride,
15152
+ resolveDragOverrideValue,
15153
+ getStaticDragOverrideValue,
15154
+ OverrideIdsToNodePathsGettersContext,
15155
+ OverrideIdsToNodePathsSettersContext,
15156
+ findPropsToDelete,
15157
+ makeSequencePropsSubscriptionKey,
15158
+ getPropStatusesCtx,
15159
+ getEffectPropStatusesCtx,
15160
+ hiddenField,
15161
+ durationInFramesField,
15162
+ fromField
14892
15163
  };
14893
15164
  var flattenChildren = (children) => {
14894
15165
  const childrenArray = React40.Children.toArray(children);
@@ -14979,240 +15250,6 @@ var Series = Object.assign(wrapInSchema({
14979
15250
  Sequence: SeriesSequence
14980
15251
  });
14981
15252
  addSequenceStackTraces(Series);
14982
- var validateSpringDuration = (dur) => {
14983
- if (typeof dur === "undefined") {
14984
- return;
14985
- }
14986
- if (typeof dur !== "number") {
14987
- throw new TypeError(`A "duration" of a spring must be a "number" but is "${typeof dur}"`);
14988
- }
14989
- if (Number.isNaN(dur)) {
14990
- throw new TypeError('A "duration" of a spring is NaN, which it must not be');
14991
- }
14992
- if (!Number.isFinite(dur)) {
14993
- throw new TypeError('A "duration" of a spring must be finite, but is ' + dur);
14994
- }
14995
- if (dur <= 0) {
14996
- throw new TypeError('A "duration" of a spring must be positive, but is ' + dur);
14997
- }
14998
- };
14999
- var defaultSpringConfig = {
15000
- damping: 10,
15001
- mass: 1,
15002
- stiffness: 100,
15003
- overshootClamping: false
15004
- };
15005
- var advanceCache = {};
15006
- function advance({
15007
- animation,
15008
- now,
15009
- config
15010
- }) {
15011
- const { toValue: toValue2, lastTimestamp, current, velocity } = animation;
15012
- const deltaTime = Math.min(now - lastTimestamp, 64);
15013
- if (config.damping <= 0) {
15014
- throw new Error("Spring damping must be greater than 0, otherwise the spring() animation will never end, causing an infinite loop.");
15015
- }
15016
- const c2 = config.damping;
15017
- const m = config.mass;
15018
- const k = config.stiffness;
15019
- const cacheKey = [
15020
- toValue2,
15021
- lastTimestamp,
15022
- current,
15023
- velocity,
15024
- c2,
15025
- m,
15026
- k,
15027
- now
15028
- ].join("-");
15029
- if (advanceCache[cacheKey]) {
15030
- return advanceCache[cacheKey];
15031
- }
15032
- const v0 = -velocity;
15033
- const x0 = toValue2 - current;
15034
- const zeta = c2 / (2 * Math.sqrt(k * m));
15035
- const omega0 = Math.sqrt(k / m);
15036
- const omega1 = omega0 * Math.sqrt(1 - zeta ** 2);
15037
- const t = deltaTime / 1000;
15038
- const sin1 = Math.sin(omega1 * t);
15039
- const cos1 = Math.cos(omega1 * t);
15040
- const underDampedEnvelope = Math.exp(-zeta * omega0 * t);
15041
- const underDampedFrag1 = underDampedEnvelope * (sin1 * ((v0 + zeta * omega0 * x0) / omega1) + x0 * cos1);
15042
- const underDampedPosition = toValue2 - underDampedFrag1;
15043
- const underDampedVelocity = zeta * omega0 * underDampedFrag1 - underDampedEnvelope * (cos1 * (v0 + zeta * omega0 * x0) - omega1 * x0 * sin1);
15044
- const criticallyDampedEnvelope = Math.exp(-omega0 * t);
15045
- const criticallyDampedPosition = toValue2 - criticallyDampedEnvelope * (x0 + (v0 + omega0 * x0) * t);
15046
- const criticallyDampedVelocity = criticallyDampedEnvelope * (v0 * (t * omega0 - 1) + t * x0 * omega0 * omega0);
15047
- const animationNode = {
15048
- toValue: toValue2,
15049
- prevPosition: current,
15050
- lastTimestamp: now,
15051
- current: zeta < 1 ? underDampedPosition : criticallyDampedPosition,
15052
- velocity: zeta < 1 ? underDampedVelocity : criticallyDampedVelocity
15053
- };
15054
- advanceCache[cacheKey] = animationNode;
15055
- return animationNode;
15056
- }
15057
- var calculationCache = {};
15058
- function springCalculation({
15059
- frame,
15060
- fps,
15061
- config = {}
15062
- }) {
15063
- const from = 0;
15064
- const to = 1;
15065
- const cacheKey = [
15066
- frame,
15067
- fps,
15068
- config.damping,
15069
- config.mass,
15070
- config.overshootClamping,
15071
- config.stiffness
15072
- ].join("-");
15073
- if (calculationCache[cacheKey]) {
15074
- return calculationCache[cacheKey];
15075
- }
15076
- let animation = {
15077
- lastTimestamp: 0,
15078
- current: from,
15079
- toValue: to,
15080
- velocity: 0,
15081
- prevPosition: 0
15082
- };
15083
- const frameClamped = Math.max(0, frame);
15084
- const unevenRest = frameClamped % 1;
15085
- for (let f = 0;f <= Math.floor(frameClamped); f++) {
15086
- if (f === Math.floor(frameClamped)) {
15087
- f += unevenRest;
15088
- }
15089
- const time = f / fps * 1000;
15090
- animation = advance({
15091
- animation,
15092
- now: time,
15093
- config: {
15094
- ...defaultSpringConfig,
15095
- ...config
15096
- }
15097
- });
15098
- }
15099
- calculationCache[cacheKey] = animation;
15100
- return animation;
15101
- }
15102
- var cache = new Map;
15103
- function measureSpring({
15104
- fps,
15105
- config = {},
15106
- threshold = 0.005
15107
- }) {
15108
- if (typeof threshold !== "number") {
15109
- throw new TypeError(`threshold must be a number, got ${threshold} of type ${typeof threshold}`);
15110
- }
15111
- if (threshold === 0) {
15112
- return Infinity;
15113
- }
15114
- if (threshold === 1) {
15115
- return 0;
15116
- }
15117
- if (isNaN(threshold)) {
15118
- throw new TypeError("Threshold is NaN");
15119
- }
15120
- if (!Number.isFinite(threshold)) {
15121
- throw new TypeError("Threshold is not finite");
15122
- }
15123
- if (threshold < 0) {
15124
- throw new TypeError("Threshold is below 0");
15125
- }
15126
- const cacheKey = [
15127
- fps,
15128
- config.damping,
15129
- config.mass,
15130
- config.overshootClamping,
15131
- config.stiffness,
15132
- threshold
15133
- ].join("-");
15134
- if (cache.has(cacheKey)) {
15135
- return cache.get(cacheKey);
15136
- }
15137
- validateFps(fps, "to the measureSpring() function", false);
15138
- let frame = 0;
15139
- let finishedFrame = 0;
15140
- const calc = () => {
15141
- return springCalculation({
15142
- fps,
15143
- frame,
15144
- config
15145
- });
15146
- };
15147
- let animation = calc();
15148
- const calcDifference = () => {
15149
- return Math.abs(animation.current - animation.toValue);
15150
- };
15151
- let difference = calcDifference();
15152
- while (difference >= threshold) {
15153
- frame++;
15154
- animation = calc();
15155
- difference = calcDifference();
15156
- }
15157
- finishedFrame = frame;
15158
- for (let i = 0;i < 20; i++) {
15159
- frame++;
15160
- animation = calc();
15161
- difference = calcDifference();
15162
- if (difference >= threshold) {
15163
- i = 0;
15164
- finishedFrame = frame + 1;
15165
- }
15166
- }
15167
- cache.set(cacheKey, finishedFrame);
15168
- return finishedFrame;
15169
- }
15170
- function spring({
15171
- frame: passedFrame,
15172
- fps,
15173
- config = {},
15174
- from = 0,
15175
- to = 1,
15176
- durationInFrames: passedDurationInFrames,
15177
- durationRestThreshold,
15178
- delay = 0,
15179
- reverse = false
15180
- }) {
15181
- validateSpringDuration(passedDurationInFrames);
15182
- validateFrame({
15183
- frame: passedFrame,
15184
- durationInFrames: Infinity,
15185
- allowFloats: true
15186
- });
15187
- validateFps(fps, "to spring()", false);
15188
- const needsToCalculateNaturalDuration = reverse || typeof passedDurationInFrames !== "undefined";
15189
- const naturalDuration = needsToCalculateNaturalDuration ? measureSpring({
15190
- fps,
15191
- config,
15192
- threshold: durationRestThreshold
15193
- }) : undefined;
15194
- const naturalDurationGetter = needsToCalculateNaturalDuration ? {
15195
- get: () => naturalDuration
15196
- } : {
15197
- get: () => {
15198
- throw new Error("did not calculate natural duration, this is an error with Remotion. Please report");
15199
- }
15200
- };
15201
- const reverseProcessed = reverse ? (passedDurationInFrames ?? naturalDurationGetter.get()) - passedFrame : passedFrame;
15202
- const delayProcessed = reverseProcessed + (reverse ? delay : -delay);
15203
- const durationProcessed = passedDurationInFrames === undefined ? delayProcessed : delayProcessed / (passedDurationInFrames / naturalDurationGetter.get());
15204
- if (passedDurationInFrames && delayProcessed > passedDurationInFrames) {
15205
- return to;
15206
- }
15207
- const spr = springCalculation({
15208
- fps,
15209
- frame: durationProcessed,
15210
- config
15211
- });
15212
- const inner = config.overshootClamping ? to >= from ? Math.min(spr.current, to) : Math.max(spr.current, to) : spr.current;
15213
- const interpolated = from === 0 && to === 1 ? inner : interpolate(inner, [0, 1], [from, to]);
15214
- return interpolated;
15215
- }
15216
15253
  var problematicCharacters = {
15217
15254
  "%3A": ":",
15218
15255
  "%2F": "/",