1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8410],{90140:function(e,t,r){r.d(t,{MX:function(){return eI},ND:function(){return eQ},ST:function(){return oe},T9:function(){return e6},fS:function(){return eS},hU:function(){return M},rf:function(){return eX},sX:function(){return rn},wQ:function(){return rQ}});var o=r(2265),n=r(54887),i=r(57437),a=r(40257),l=Object.defineProperty,u=(e,t)=>{for(var r in t)l(e,r,{get:t[r],enumerable:!0,configurable:!0,set:e=>t[r]=()=>e})};if("function"!=typeof o.createContext)throw Error('Remotion requires React.createContext, but it is "undefined".\nIf you are in a React Server Component, turn it into a client component by adding "use client" at the top of the file.\n\nBefore:\n import {useCurrentFrame} from "remotion";\n\nAfter:\n "use client";\n import {useCurrentFrame} from "remotion";');var s=(0,o.createContext)(!1),d=e=>{let{children:t}=e;return(0,i.jsx)(s.Provider,{value:!0,children:t})},c=(0,o.createContext)({setError:()=>{},clearError:()=>{}});class m extends o.Component{static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(e){this.props.onError(e)}componentDidUpdate(e){this.state.hasError||this.props.onClear()}render(){return this.state.hasError?null:this.props.children}constructor(...e){super(...e),this.state={hasError:!1}}}var f=(0,o.createContext)({compositions:[],folders:[],currentCompositionMetadata:null,canvasContent:null}),p=(0,o.createContext)({registerComposition:()=>{},unregisterComposition:()=>{},registerFolder:()=>{},unregisterFolder:()=>{},setCanvasContent:()=>{},onlyRenderComposition:null}),v=(0,o.createContext)({getNonce:()=>0}),h=0;try{e.hot&&e.hot.addStatusHandler(e=>{"idle"===e&&h++})}catch(e){}var y=()=>{let e=(0,o.useContext)(v).getNonce(),t=(0,o.useRef)(e);t.current=e;let r=(0,o.useRef)([[h,e]]),n=(0,o.useCallback)(()=>(h!==r.current[r.current.length-1][0]&&(r.current=[...r.current,[h,t.current]]),r.current),[r]);return(0,o.useMemo)(()=>({get:n}),[n])};function g(e){return!!e}String(/^([a-zA-Z0-9-\u4E00-\u9FFF])+$/g);var w=(0,o.createContext)({folderName:null,parentName:null});function b(){return"NODE_ENV"}var E=()=>"env",x=()=>{let e="undefined"!=typeof window&&window.remotion_isPlayer,t="undefined"!=typeof window&&void 0!==window.process&&void 0!==window.process.env&&("test"===window.process[E()][b()]||"production"===window.process[E()][b()]&&"undefined"!=typeof window&&void 0!==window.remotion_puppeteerTimeout);return{isStudio:"undefined"!=typeof window&&window.remotion_isStudio,isRendering:t,isPlayer:e,isReadOnlyStudio:"undefined"!=typeof window&&window.remotion_isReadOnlyStudio,isClientSideRendering:!1}},C="remotion-date:",R="remotion-file:",T=e=>{let{data:t,indent:r,staticBase:o}=e,n=!1,i=!1,a=!1,l=!1;try{return{serializedString:JSON.stringify(t,function(e,t){let r=this[e];return r instanceof Date?(n=!0,"".concat(C).concat(r.toISOString())):r instanceof Map?(a=!0,t):r instanceof Set?(l=!0,t):"string"==typeof r&&null!==o&&r.startsWith(o)?(i=!0,"".concat(R).concat(r.replace(o+"/",""))):t},r),customDateUsed:n,customFileUsed:i,mapUsed:a,setUsed:l}}catch(e){throw Error("Could not serialize the passed input props to JSON: "+e.message)}},F=e=>JSON.parse(e,(e,t)=>"string"==typeof t&&t.startsWith(C)?new Date(t.replace(C,"")):"string"==typeof t&&t.startsWith(R)?"".concat(window.remotion_staticBase,"/").concat(t.replace(R,"")):t),S=e=>F(T({data:e,indent:2,staticBase:window.remotion_staticBase}).serializedString),V=e=>x().isStudio?S(e):e,P=(0,o.createContext)(!1),N=()=>(0,o.useContext)(P),k=e=>{let{className:t,classPrefix:r,type:o}=e;if(!t)return!1;if("exact"===o){let e=t.split(" ");return r.some(t=>e.some(e=>e.trim()===t||e.trim().endsWith(":".concat(t))||e.trim().endsWith("!".concat(t))))}return r.some(e=>t.startsWith(e)||t.includes(" ".concat(e))||t.includes("!".concat(e))||t.includes(":".concat(e)))},M=(0,o.forwardRef)((e,t)=>{let{style:r,...n}=e,a=(0,o.useMemo)(()=>({position:"absolute",top:k({className:n.className,classPrefix:["top-","inset-"],type:"prefix"})?void 0:0,left:k({className:n.className,classPrefix:["left-","inset-"],type:"prefix"})?void 0:0,right:k({className:n.className,classPrefix:["right-","inset-"],type:"prefix"})?void 0:0,bottom:k({className:n.className,classPrefix:["bottom-","inset-"],type:"prefix"})?void 0:0,width:k({className:n.className,classPrefix:["w-"],type:"prefix"})?void 0:"100%",height:k({className:n.className,classPrefix:["h-"],type:"prefix"})?void 0:"100%",display:k({className:n.className,classPrefix:["block","inline-block","inline","flex","inline-flex","flow-root","grid","inline-grid","contents","list-item","hidden"],type:"exact"})?void 0:"flex",flexDirection:k({className:n.className,classPrefix:["flex-row","flex-col","flex-row-reverse","flex-col-reverse"],type:"exact"})?void 0:"column",...r}),[n.className,r]);return(0,i.jsx)("div",{ref:t,style:a,...n})}),A={transform:"rotate(90deg)"},I={color:"white",fontSize:14,fontFamily:"sans-serif"},j={justifyContent:"center",alignItems:"center"},_=()=>(0,i.jsxs)(M,{style:j,id:"remotion-comp-loading",children:[(0,i.jsx)("style",{type:"text/css",children:"\n @keyframes anim {\n from {\n opacity: 0\n }\n to {\n opacity: 1\n }\n }\n #remotion-comp-loading {\n animation: anim 2s;\n animation-fill-mode: forwards;\n }\n "}),(0,i.jsx)("svg",{width:40,height:40,viewBox:"-100 -100 400 400",style:A,children:(0,i.jsx)("path",{fill:"#555",stroke:"#555",strokeWidth:"100",strokeLinejoin:"round",d:"M 2 172 a 196 100 0 0 0 195 5 A 196 240 0 0 0 100 2.259 A 196 240 0 0 0 2 172 z"})}),(0,i.jsxs)("p",{style:I,children:["Resolving ","<Suspense>","..."]})]}),L=null,D=()=>
1{if(!L){if("undefined"==typeof document)throw Error("Tried to call an API that only works in the browser from outside the browser");(L=document.createElement("div")).style.position="absolute",L.style.top="0px",L.style.left="0px",L.style.right="0px",L.style.bottom="0px",L.style.width="100%",L.style.height="100%",L.style.display="flex",L.style.flexDirection="column";let e=document.createElement("div");e.style.position="fixed",e.style.top="-999999px",e.appendChild(L),document.body.appendChild(e)}return L},O=()=>"remotion_inputPropsOverride"+window.location.origin,U=()=>{if("undefined"==typeof localStorage)return null;let e=localStorage.getItem(O());return e?JSON.parse(e):null},q=!1,B=()=>{q||(q=!0,console.warn("Called `getInputProps()` on the server. This function is not available server-side and has returned an empty object."),console.warn("To hide this warning, don't call this function on the server:"),console.warn(" typeof window === 'undefined' ? {} : getInputProps()"))},H=()=>{if("undefined"==typeof window)return B(),{};if(x().isPlayer)throw Error("You cannot call `getInputProps()` from a <Player>. Instead, the props are available as React props from component that you passed as `component` prop.");let e=U();if(e)return e;if("undefined"==typeof window||void 0===window.remotion_inputProps)throw Error("Cannot call `getInputProps()` - window.remotion_inputProps is not set. This API is only available if you are in the Studio, or while you are rendering server-side.");let t=window.remotion_inputProps;return t?F(t):{}},W=(0,o.createContext)({props:{},updateProps:()=>{throw Error("Not implemented")}}),z=o.createRef(),Y=e=>{let{children:t}=e,[r,n]=o.useState({}),a=(0,o.useCallback)(e=>{let{defaultProps:t,id:r,newProps:o}=e;n(e=>{var n;return{...e,[r]:"function"==typeof o?o(null!==(n=e[r])&&void 0!==n?n:t):o}})},[]),l=(0,o.useMemo)(()=>({props:r,updateProps:a}),[r,a]);return(0,i.jsx)(W.Provider,{value:l,children:t})},J=o.createContext(null),G=()=>{let e=(0,o.useContext)(J),[t]=(0,o.useState)(()=>x());return null!=e?e:t};function Q(e,t,r){if("number"!=typeof e)throw Error('The "'.concat(t,'" prop ').concat(r," must be a number, but you passed a value of type ").concat(typeof e));if(isNaN(e))throw TypeError('The "'.concat(t,'" prop ').concat(r," must not be NaN, but is NaN."));if(!Number.isFinite(e))throw TypeError('The "'.concat(t,'" prop ').concat(r," must be finite, but is ").concat(e,"."));if(e%1!=0)throw TypeError('The "'.concat(t,'" prop ').concat(r," must be an integer, but is ").concat(e,"."));if(e<=0)throw TypeError('The "'.concat(t,'" prop ').concat(r," must be positive, but got ").concat(e,"."))}function Z(e,t){let{allowFloats:r,component:o}=t;if(void 0===e)throw Error('The "durationInFrames" prop '.concat(o," is missing."));if("number"!=typeof e)throw Error('The "durationInFrames" prop '.concat(o," must be a number, but you passed a value of type ").concat(typeof e));if(e<=0)throw TypeError('The "durationInFrames" prop '.concat(o," must be positive, but got ").concat(e,"."));if(!r&&e%1!=0)throw TypeError('The "durationInFrames" prop '.concat(o," must be an integer, but got ").concat(e,"."));if(!Number.isFinite(e))throw TypeError('The "durationInFrames" prop '.concat(o," must be finite, but got ").concat(e,"."))}function X(e,t,r){if("number"!=typeof e)throw Error('"fps" must be a number, but you passed a value of type '.concat(typeof e," ").concat(t));if(!Number.isFinite(e))throw Error('"fps" must be a finite, but you passed '.concat(e," ").concat(t));if(isNaN(e))throw Error('"fps" must not be NaN, but got '.concat(e," ").concat(t));if(e<=0)throw TypeError('"fps" must be positive, but got '.concat(e," ").concat(t));if(r&&e>50)throw TypeError("The FPS for a GIF cannot be higher than 50. Use the --every-nth-frame option to lower the FPS: https://remotion.dev/docs/render-as-gif")}var $=(0,o.createContext)(null),K=(0,o.createRef)(),ee=e=>!!e.calculateMetadata,et=e=>{let t=(0,o.useContext)($),{props:r}=(0,o.useContext)(W),{compositions:n,canvasContent:i,currentCompositionMetadata:a}=(0,o.useContext)(f),l=(null==i?void 0:i.type)==="composition"?i.compositionId:null,u=null!=e?e:l,s=n.find(e=>e.id===u),d=(0,o.useMemo)(()=>{var e;return s&&null!==(e=r[s.id])&&void 0!==e?e:{}},[r,s]),c=G();return(0,o.useMemo)(()=>{var e,r,o,n;return s?a?{type:"success",result:{...a,id:s.id,defaultProps:null!==(e=s.defaultProps)&&void 0!==e?e:{}}}:ee(s)?t&&t[s.id]?t[s.id]:null:(Z(s.durationInFrames,{allowFloats:!1,component:'in <Composition id="'.concat(s.id,'">')}),X(s.fps,'in <Composition id="'.concat(s.id,'">'),!1),Q(s.width,"width",'in <Composition id="'.concat(s.id,'">')),Q(s.height,"height",'in <Composition id="'.concat(s.id,'">')),{type:"success",result:{width:s.width,height:s.height,fps:s.fps,id:s.id,durationInFrames:s.durationInFrames,defaultProps:null!==(r=s.defaultProps)&&void 0!==r?r:{},props:{...null!==(o=s.defaultProps)&&void 0!==o?o:{},...null!=d?d:{},..."undefined"==typeof window||c.isPlayer||!window.remotion_inputProps?{}:null!==(n=H())&&void 0!==n?n:{}},defaultCodec:null,defaultOutName:null,defaultVideoImageFormat:null,defaultPixelFormat:null,defaultProResProfile:null}}):null},[s,t,a,d,c.isPlayer])},er=e=>{var t;let r=null!==(t=e.stack)&&void 0!==t?t:"";return r.startsWith("Error:")?r:"".concat(e.message,"\n").concat(r)},eo=e=>e instanceof Error||null!==e&&"object"==typeof e&&"stack"in e&&"string"==typeof e.stack&&"message"in e&&"string"==typeof e.message;function en(e,t){let r;throw eo(t)?(r=t).stack||(r.stack=Error(r.message).stack):r="string"==typeof t?Error(t):Error("Rendering was cancelled"),e&&(e.remotion_cancelledError=er(r)),r}function ei(e){return en("undefined"!=typeof window?window:void 0,e)}var ea=["trace","verbose","info","warn","error"],el=e=>ea.indexOf(e),eu=(e,t)=>
1el(e)<=el(t),es=e=>{let{args:t,logLevel:r,tag:o}=e,n=[...t];return x().isRendering&&!x().isClientSideRendering&&n.unshift(Symbol.for("__remotion_level_".concat(r))),o&&x().isRendering&&!x().isClientSideRendering&&n.unshift(Symbol.for("__remotion_tag_".concat(o))),n},ed={trace:function(e){for(var t=arguments.length,r=Array(t>1?t-1:0),o=1;o<t;o++)r[o-1]=arguments[o];if(eu(e.logLevel,"trace"))return console.debug(...es({args:r,logLevel:"trace",tag:e.tag}))},verbose:function(e){for(var t=arguments.length,r=Array(t>1?t-1:0),o=1;o<t;o++)r[o-1]=arguments[o];if(eu(e.logLevel,"verbose"))return console.debug(...es({args:r,logLevel:"verbose",tag:e.tag}))},info:function(e){for(var t=arguments.length,r=Array(t>1?t-1:0),o=1;o<t;o++)r[o-1]=arguments[o];if(eu(e.logLevel,"info"))return console.log(...es({args:r,logLevel:"info",tag:e.tag}))},warn:function(e){for(var t=arguments.length,r=Array(t>1?t-1:0),o=1;o<t;o++)r[o-1]=arguments[o];if(eu(e.logLevel,"warn"))return console.warn(...es({args:r,logLevel:"warn",tag:e.tag}))},error:function(e){for(var t=arguments.length,r=Array(t>1?t-1:0),o=1;o<t;o++)r[o-1]=arguments[o];return console.error(...es({args:r,logLevel:"error",tag:e.tag}))}};"undefined"!=typeof window&&(window.remotion_renderReady=!1,window.remotion_delayRenderTimeouts||(window.remotion_delayRenderTimeouts={}),window.remotion_delayRenderHandles=[]);var ec=e=>{var t,r,o,n,i;let{scope:a,environment:l,label:u,options:s}=e;if("string"!=typeof u&&null!==u)throw Error("The label parameter of delayRender() must be a string or undefined, got: "+JSON.stringify(u));let d=Math.random();a.remotion_delayRenderHandles.push(d);let c=null!==(r=null===(t=Error().stack)||void 0===t?void 0:t.replace(/^Error/g,""))&&void 0!==r?r:"";if(l.isRendering){let e=(null!==(n=null!==(o=null==s?void 0:s.timeoutInMilliseconds)&&void 0!==o?o:a.remotion_puppeteerTimeout)&&void 0!==n?n:3e4)-2e3,t=(null!==(i=null==s?void 0:s.retries)&&void 0!==i?i:0)-(a.remotion_attempt-1);a.remotion_delayRenderTimeouts[d]={label:null!=u?u:null,startTime:Date.now(),timeout:setTimeout(()=>{let r=["A delayRender()",u?'"'.concat(u,'"'):null,"was called but not cleared after ".concat(e,"ms. See https://remotion.dev/docs/timeout for help."),t>0?"Retries left: "+t:null,t>0?"- Rendering the frame will be retried.":null,"The delayRender was called:",c].filter(g).join(" ");l.isClientSideRendering?a.remotion_cancelledError=er(Error(r)):en(a,Error(r))},e)}}return a.remotion_renderReady=!1,d},em=e=>{let{scope:t,handle:r,environment:o,logLevel:n}=e;if(void 0===r)throw TypeError("The continueRender() method must be called with a parameter that is the return value of delayRender(). No value was passed.");if("number"!=typeof r)throw TypeError("The parameter passed into continueRender() must be the return value of delayRender() which is a number. Got: "+JSON.stringify(r));t.remotion_delayRenderHandles=t.remotion_delayRenderHandles.filter(e=>{if(e===r){if(o.isRendering&&void 0!==t){if(!t.remotion_delayRenderTimeouts[r])return!1;let{label:e,startTime:o,timeout:i}=t.remotion_delayRenderTimeouts[r];clearTimeout(i);let a=[e?'"'.concat(e,'"'):"A handle","handle was cleared after","".concat(Date.now()-o,"ms")].filter(g).join(" ");ed.verbose({logLevel:n,tag:"delayRender()"},a),delete t.remotion_delayRenderTimeouts[r]}return!1}return!0}),0===t.remotion_delayRenderHandles.length&&(t.remotion_renderReady=!0)},ef=(0,o.createContext)({logLevel:"info",mountTime:0}),ep=()=>{let{logLevel:e}=o.useContext(ef);if(null===e)throw Error("useLogLevel must be used within a LogLevelProvider");return e},ev=()=>{let{mountTime:e}=o.useContext(ef);if(null===e)throw Error("useMountTime must be used within a LogLevelProvider");return e},eh=(0,o.createContext)(null),ey=()=>{var e;let t=G(),r=null!==(e=(0,o.useContext)(eh))&&void 0!==e?e:"undefined"!=typeof window?window:void 0,n=ep();return{delayRender:(0,o.useCallback)((e,o)=>r?ec({scope:r,environment:t,label:null!=e?e:null,options:null!=o?o:{}}):Math.random(),[t,r]),continueRender:(0,o.useCallback)(e=>{r&&em({scope:r,handle:e,environment:t,logLevel:n})},[t,n,r]),cancelRender:(0,o.useCallback)(e=>en(null!=r?r:"undefined"!=typeof window?window:void 0,e),[r])}},eg=e=>
1{let{compProps:t,componentName:r,noSuspense:n}=e,i=(0,o.useRef)(null);return"component"in t&&(i.current=t.component),(0,o.useMemo)(()=>{if("component"in t){if("undefined"==typeof document||n)return t.component;if(void 0===t.component)throw Error("A value of `undefined` was passed to the `component` prop. Check the value you are passing to the <".concat(r,"/> component."));return e=>{let t=i.current;return o.createElement(t,e)}}if("lazyComponent"in t&&void 0!==t.lazyComponent){if(void 0===t.lazyComponent)throw Error("A value of `undefined` was passed to the `lazyComponent` prop. Check the value you are passing to the <".concat(r,"/> component."));return o.lazy(t.lazyComponent)}throw Error("You must pass either 'component' or 'lazyComponent'")},[t.lazyComponent])},ew=()=>{var e;let{canvasContent:t,compositions:r,currentCompositionMetadata:n}=(0,o.useContext)(f),i=r.find(e=>(null==t?void 0:t.type)==="composition"&&e.id===t.compositionId),a=et(null!==(e=null==i?void 0:i.id)&&void 0!==e?e:null);return(0,o.useMemo)(()=>{var e;return a&&"error"!==a.type&&"loading"!==a.type&&i?{...a.result,defaultProps:null!==(e=i.defaultProps)&&void 0!==e?e:{},id:i.id,...null!=n?n:{},component:i.component}:null},[n,a,i])},eb=()=>/^([a-zA-Z0-9-\u4E00-\u9FFF])+$/g,eE=e=>e.match(eb()),ex=e=>{if(!eE(e))throw Error("Composition id can only contain a-z, A-Z, 0-9, CJK characters and -. You passed ".concat(e))},eC="Composition ID must match ".concat(String(eb())),eR=(e,t,r)=>{if(e){if("object"!=typeof e)throw Error('"'.concat(t,'" must be an object, but you passed a value of type ').concat(typeof e));if(Array.isArray(e))throw Error('"'.concat(t,'" must be an object, an array was passed ').concat(r?'for composition "'.concat(r,'"'):""))}},eT=()=>{let{continueRender:e,delayRender:t}=ey();return(0,o.useEffect)(()=>{let r=t("Waiting for Root component to unsuspend");return()=>e(r)},[e,t]),null},eF=e=>{var t,r,a,l;let{width:u,height:f,fps:v,durationInFrames:h,id:g,defaultProps:b,schema:E,...x}=e,{registerComposition:C,unregisterComposition:R}=(0,o.useContext)(p),T=ew(),F=eg({compProps:x,componentName:"Composition",noSuspense:!1}),S=y(),P=N(),k=G(),M=(0,o.useContext)(s);if("undefined"!=typeof window&&(window.remotion_seenCompositionIds=Array.from(new Set([...null!==(t=window.remotion_seenCompositionIds)&&void 0!==t?t:[],g]))),M){if(P)throw Error("<Composition> was mounted inside the `component` that was passed to the <Player>. See https://remotion.dev/docs/wrong-composition-mount for help.");throw Error("<Composition> mounted inside another composition. See https://remotion.dev/docs/wrong-composition-mount for help.")}let{folderName:A,parentName:I}=(0,o.useContext)(w),j=null!==(r=x.stack)&&void 0!==r?r:null;(0,o.useEffect)(()=>{var e;if(!g)throw Error("No id for composition passed.");return ex(g),eR(b,"defaultProps",g),C({durationInFrames:null!=h?h:void 0,fps:null!=v?v:void 0,height:null!=f?f:void 0,width:null!=u?u:void 0,id:g,folderName:A,component:F,defaultProps:V(null!=b?b:{}),nonce:S.get(),parentFolderName:I,schema:null!=E?E:null,calculateMetadata:null!==(e=x.calculateMetadata)&&void 0!==e?e:null,stack:j}),()=>{R(g)}},[h,v,f,F,g,A,b,u,S,I,E,x.calculateMetadata,j,C,R]);let L=et(g),{setError:O,clearError:U}=(0,o.useContext)(c),q=(0,o.useCallback)(e=>{O(e)},[O]),B=(0,o.useCallback)(()=>{U()},[U]);return k.isStudio&&T&&T.component===F&&T.id===g?null===L||"success"!==L.type&&"success-and-refreshing"!==L.type?null:(0,n.createPortal)((0,i.jsx)(d,{children:(0,i.jsx)(m,{onError:q,onClear:B,children:(0,i.jsx)(o.Suspense,{fallback:(0,i.jsx)(_,{}),children:(0,i.jsx)(F,{...null!==(a=L.result.props)&&void 0!==a?a:{}})})})}),D()):k.isRendering&&T&&T.component===F&&T.id===g?null===L||"success"!==L.type&&"success-and-refreshing"!==L.type?null:(0,n.createPortal)((0,i.jsx)(d,{children:(0,i.jsx)(o.Suspense,{fallback:(0,i.jsx)(eT,{}),children:(0,i.jsx)(F,{...null!==(l=L.result.props)&&void 0!==l?l:{}})})}),D()):null},eS=e=>{let{onlyRenderComposition:t}=(0,o.useContext)(p);return t&&t!==e.id?null:(0,i.jsx)(eF,{...e})},eV=[],eP=e=>{eV.push(e)},eN="4.0.446",ek=(0,o.createContext)(null),eM={};function eA(e){let t=e+1831565813;return t=Math.imul(t^t>>>15,1|t),(((t^=t+Math.imul(t^t>>>7,61|t))^t>>>14)>>>0)/4294967296}u(eM,{useTimelineSetFrame:()=>eJ,useTimelinePosition:()=>ez,useTimelineContext:()=>eW,usePlayingState:()=>eG,useAbsoluteTimelinePosition:()=>eY,persistCurrentFrame:()=>eU,getInitialFrameState:()=>eq,getFrameForComposition:()=>eB});var eI=(e,t)=>{if(void 0!==t)throw TypeError("random() takes only one argument");
1if(null===e)return Math.random();if("string"==typeof e)return eA(function(e){let t=0,r=0;for(t=0;t<e.length;t++)r=(r<<5)-r+e.charCodeAt(t)|0;return r}(e));if("number"==typeof e)return eA(1e10*e);throw Error("random() argument must be a number or a string")},ej=(0,o.createContext)({setFrame:()=>{throw Error("default")},setPlaying:()=>{throw Error("default")}}),e_=(0,o.createContext)(null),eL=(0,o.createContext)(null),eD=e=>{let{children:t,frameState:r}=e,[n,a]=(0,o.useState)(!1),l=(0,o.useRef)(!1),[u,s]=(0,o.useState)(1),d=(0,o.useRef)([]),[c]=(0,o.useState)(()=>String(eI(null))),[m,f]=(0,o.useState)(()=>eq()),p=null!=r?r:m,{delayRender:v,continueRender:h}=ey();"undefined"!=typeof window&&(0,o.useLayoutEffect)(()=>{window.remotion_setFrame=(e,t,r)=>{window.remotion_attempt=r;let o=v("Setting the current frame to ".concat(e)),n=!0;f(r=>{var o;return(null!==(o=r[t])&&void 0!==o?o:window.remotion_initialFrame)===e?(n=!1,r):{...r,[t]:e}}),n?requestAnimationFrame(()=>h(o)):h(o)},window.remotion_isPlayer=!1},[h,v]);let y=(0,o.useMemo)(()=>({frame:p,playing:n,imperativePlaying:l,rootId:c,playbackRate:u,setPlaybackRate:s,audioAndVideoTags:d}),[p,u,n,c]),g=(0,o.useMemo)(()=>({setFrame:f,setPlaying:a}),[]);return(0,i.jsx)(eL.Provider,{value:y,children:(0,i.jsx)(e_.Provider,{value:y,children:(0,i.jsx)(ej.Provider,{value:g,children:t})})})},eO=()=>"remotion.time-all",eU=e=>{localStorage.setItem(eO(),JSON.stringify(e))},eq=()=>{var e;return JSON.parse(null!==(e=localStorage.getItem(eO()))&&void 0!==e?e:"{}")},eB=e=>{var t,r;let o=JSON.parse(null!==(t=localStorage.getItem(eO()))&&void 0!==t?t:"{}");return void 0!==o[e]?Number(o[e]):"undefined"==typeof window?0:null!==(r=window.remotion_initialFrame)&&void 0!==r?r:0},eH=e=>{var t,r;let o=ew(),n=G();if(!o)return"undefined"==typeof window?0:null!==(t=window.remotion_initialFrame)&&void 0!==t?t:0;let i=null!==(r=e.frame[o.id])&&void 0!==r?r:n.isPlayer?0:eB(o.id);return Math.min(o.durationInFrames-1,i)},eW=()=>{let e=(0,o.useContext)(e_);if(null===e)throw Error("TimelineContext is not available. This hook must be used inside a <Player> or the Remotion Studio.");return e},ez=()=>eH(eW()),eY=()=>{let e=(0,o.useContext)(eL);if(null===e)throw Error("AbsoluteTimeContext is not available. This hook must be used inside a <Player> or the Remotion Studio.");return eH(e)},eJ=()=>{let{setFrame:e}=(0,o.useContext)(ej);return e},eG=()=>{let{playing:e,imperativePlaying:t}=eW(),{setPlaying:r}=(0,o.useContext)(ej);return(0,o.useMemo)(()=>[e,r,t],[t,e,r])},eQ=()=>{let e=(0,o.useContext)(s),t=G();if(!e){if(t.isPlayer)throw Error("useCurrentFrame can only be called inside a component that was passed to <Player>. See: https://www.remotion.dev/docs/player/examples");throw Error("useCurrentFrame() can only be called inside a component that was registered as a composition. See https://www.remotion.dev/docs/the-fundamentals#defining-compositions")}let r=ez(),n=(0,o.useContext)(ek);return r-(n?n.cumulatedFrom+n.relativeFrom:0)},eZ=()=>{var e,t,r;let n=(0,o.useContext)(ek),i=null!==(e=null==n?void 0:n.width)&&void 0!==e?e:null,a=null!==(t=null==n?void 0:n.height)&&void 0!==t?t:null,l=null!==(r=null==n?void 0:n.durationInFrames)&&void 0!==r?r:null,u=ew();return(0,o.useMemo)(()=>{if(!u)return null;let{id:e,durationInFrames:t,fps:r,height:o,width:n,defaultProps:s,props:d,defaultCodec:c,defaultOutName:m,defaultVideoImageFormat:f,defaultPixelFormat:p,defaultProResProfile:v}=u;return{id:e,width:null!=i?i:n,height:null!=a?a:o,fps:r,durationInFrames:null!=l?l:t,defaultProps:s,props:d,defaultCodec:c,defaultOutName:m,defaultVideoImageFormat:f,defaultPixelFormat:p,defaultProResProfile:v}},[l,a,i,u])},eX=()=>{let e=eZ(),t=(0,o.useContext)(s),r=N();if(!e){if("undefined"!=typeof window&&window.remotion_isPlayer||r)throw Error("No video config found. Likely reasons:-- You are probably calling useVideoConfig() from outside the component passed to <Player />. See https://www.remotion.dev/docs/player/examples for how to set up the Player correctly.-- You have multiple versions of Remotion installed which causes the React context to get lost.");throw Error("No video config found. You are probably calling useVideoConfig() from a component which has not been registered as a <Composition />. See https://www.remotion.dev/docs/the-fundamentals#defining-compositions for more information.")}if(!t)throw Error("Called useVideoConfig() outside a Remotion composition.");return e},e$=e=>{var t;let{frame:r,children:n,active:a=!0}=e,l=eQ(),u=eX();if(void 0===r)throw Error("The <Freeze /> component requires a 'frame' prop, but none was passed.");if("number"!=typeof r)throw Error("The 'frame' prop of <Freeze /> must be a number, but is of type ".concat(typeof r));if(Number.isNaN(r))throw Error("The 'frame' prop of <Freeze /> must be a real number, but it is NaN.");
1if(!Number.isFinite(r))throw Error("The 'frame' prop of <Freeze /> must be a finite number, but it is ".concat(r,"."));let s=(0,o.useMemo)(()=>"boolean"==typeof a?a:"function"==typeof a?a(l):void 0,[a,l]),d=eW(),c=(0,o.useContext)(ek),m=null!==(t=null==c?void 0:c.relativeFrom)&&void 0!==t?t:0,f=(0,o.useMemo)(()=>s?{...d,playing:!1,imperativePlaying:{current:!1},frame:{[u.id]:r+m}}:d,[s,d,u.id,r,m]),p=(0,o.useMemo)(()=>c?s?{...c,cumulatedFrom:0}:c:null,[c,s]);return(0,i.jsx)(e_.Provider,{value:f,children:(0,i.jsx)(ek.Provider,{value:p,children:n})})},eK=(0,o.createContext)({premountFramesRemaining:0,playing:!1}),e0=o.createContext({registerSequence:()=>{throw Error("SequenceManagerContext not initialized")},unregisterSequence:()=>{throw Error("SequenceManagerContext not initialized")},sequences:[]}),e1=o.createContext({hidden:{},setHidden:()=>{throw Error("SequenceVisibilityToggle not initialized")}}),e5=o.createContext({dragOverrides:{},setDragOverrides:()=>{throw Error("VisualModeOverridesContext not initialized")},clearDragOverrides:()=>{throw Error("VisualModeOverridesContext not initialized")},codeValues:{},setCodeValues:()=>{throw Error("VisualModeOverridesContext not initialized")},visualModeEnabled:!1}),e4=e=>{let{children:t,visualModeEnabled:r}=e,[n,a]=(0,o.useState)([]),[l,u]=(0,o.useState)({}),[s,d]=(0,o.useState)({});(0,o.useRef)(s).current=s;let[c,m]=(0,o.useState)({}),f=(0,o.useCallback)((e,t,r)=>{d(o=>({...o,[e]:{...o[e],[t]:r}}))},[]),p=(0,o.useCallback)(e=>{d(t=>{if(!t[e])return t;let r={...t};return delete r[e],r})},[]),v=(0,o.useCallback)((e,t)=>{m(r=>{if(r[e]===t)return r;if(null===t){if(!(e in r))return r;let t={...r};return delete t[e],t}return{...r,[e]:t}})},[]),h=(0,o.useCallback)(e=>{a(t=>[...t,e])},[]),y=(0,o.useCallback)(e=>{a(t=>t.filter(t=>t.id!==e))},[]),g=(0,o.useMemo)(()=>({registerSequence:h,sequences:n,unregisterSequence:y}),[h,n,y]),w=(0,o.useMemo)(()=>({hidden:l,setHidden:u}),[l]),b=(0,o.useMemo)(()=>({visualModeEnabled:r,dragOverrides:s,setDragOverrides:f,clearDragOverrides:p,codeValues:c,setCodeValues:v}),[r,s,f,p,c,v]);return(0,i.jsx)(e0.Provider,{value:g,children:(0,i.jsx)(e1.Provider,{value:w,children:(0,i.jsx)(e5.Provider,{value:b,children:t})})})},e2=(0,o.forwardRef)((e,t)=>{var r,n;let{from:a=0,durationInFrames:l=1/0,children:u,name:s,height:d,width:c,showInTimeline:m=!0,controls:f,_remotionInternalLoopDisplay:p,_remotionInternalStack:v,_remotionInternalPremountDisplay:h,_remotionInternalPostmountDisplay:g,...w}=e,{layout:b="absolute-fill"}=w,[E]=(0,o.useState)(()=>String(Math.random())),x=(0,o.useContext)(ek),{rootId:C}=eW(),R=x?x.cumulatedFrom+x.relativeFrom:0,T=y();if("absolute-fill"!==b&&"none"!==b)throw TypeError('The layout prop of <Sequence /> expects either "absolute-fill" or "none", but you passed: '.concat(b));if("none"===b&&void 0!==w.style)throw TypeError('If layout="none", you may not pass a style.');if("number"!=typeof l)throw TypeError("You passed to durationInFrames an argument of type ".concat(typeof l,", but it must be a number."));if(l<=0)throw TypeError("durationInFrames must be positive, but got ".concat(l));if("number"!=typeof a)throw TypeError('You passed to the "from" props of your <Sequence> an argument of type '.concat(typeof a,", but it must be a number."));if(!Number.isFinite(a))throw TypeError('The "from" prop of a sequence must be finite, but got '.concat(a,"."));let F=ez(),S=eX(),V=x?Math.min(x.durationInFrames-a,l):l,P=Math.max(0,Math.min(S.durationInFrames-a,V)),{registerSequence:N,unregisterSequence:k}=(0,o.useContext)(e0),{hidden:A}=(0,o.useContext)(e1),I=(0,o.useMemo)(()=>(null==x?void 0:x.premounting)||!!w._remotionInternalIsPremounting,[w._remotionInternalIsPremounting,null==x?void 0:x.premounting]),j=(0,o.useMemo)(()=>(null==x?void 0:x.postmounting)||!!w._remotionInternalIsPostmounting,[w._remotionInternalIsPostmounting,null==x?void 0:x.postmounting]),_=(0,o.useMemo)(()=>{var e,t,r;return{cumulatedFrom:R,relativeFrom:a,durationInFrames:P,parentFrom:null!==(e=null==x?void 0:x.relativeFrom)&&void 0!==e?e:0,id:E,height:null!==(t=null!=d?d:null==x?void 0:x.height)&&void 0!==t?t:null,width:null!==(r=null!=c?c:null==x?void 0:x.width)&&void 0!==r?r:null,premounting:I,postmounting:j,premountDisplay:null!=h?h:null,postmountDisplay:null!=g?g:null}}
1,[R,a,P,x,E,d,c,I,j,h,g]),L=(0,o.useMemo)(()=>null!=s?s:"",[s]),D=G(),O=null!==(r=null==w?void 0:w.stack)&&void 0!==r?r:null;(0,o.useEffect)(()=>{var e;if(D.isStudio)return N({from:a,duration:P,id:E,displayName:L,parent:null!==(e=null==x?void 0:x.id)&&void 0!==e?e:null,type:"sequence",rootId:C,showInTimeline:m,nonce:T.get(),loopDisplay:p,stack:null!=v?v:O,premountDisplay:null!=h?h:null,postmountDisplay:null!=g?g:null,controls:null!=f?f:null}),()=>{k(E)}},[l,E,s,N,L,k,null==x?void 0:x.id,P,C,a,m,T,p,v,h,g,D.isStudio,O,f]);let U=Math.ceil(R+a+l-1),q=F<R+a?null:F>U?null:u,B="none"===w.layout?void 0:w.style,H=(0,o.useMemo)(()=>({flexDirection:void 0,...c?{width:c}:{},...d?{height:d}:{},...null!=B?B:{}}),[d,B,c]);if(null!==t&&"none"===b)throw TypeError('It is not supported to pass both a `ref` and `layout="none"` to <Sequence />.');return null!==(n=A[E])&&void 0!==n&&n?null:(0,i.jsx)(ek.Provider,{value:_,children:null===q?null:"none"===w.layout?q:(0,i.jsx)(M,{ref:t,style:H,className:w.className,children:q})})}),e9=(0,o.forwardRef)((e,t)=>{let r=(0,o.useContext)(eK),n=eQ()-r.premountFramesRemaining;if("none"===e.layout)throw Error('`<Sequence>` with `premountFor` and `postmountFor` props does not support layout="none"');let{style:a,from:l=0,durationInFrames:u=1/0,premountFor:s=0,postmountFor:d=0,styleWhilePremounted:c,styleWhilePostmounted:m,...f}=e,p=Math.ceil(l+u-1),v=n<l&&n>=l-s,h=n>p&&n<=p+d,y=v?l:h?l+u-1:0,g=v||h,w=(0,o.useMemo)(()=>{var e;return{...a,opacity:v||h?0:1,pointerEvents:v||h?"none":null!==(e=null==a?void 0:a.pointerEvents)&&void 0!==e?e:void 0,...v?c:{},...h?m:{}}},[a,v,h,c,m]),{playing:b}=eW(),E=v?l-n:0,x=(0,o.useMemo)(()=>({premountFramesRemaining:E,playing:r.playing||b}),[E,r.playing,b]);return(0,i.jsx)(eK.Provider,{value:x,children:(0,i.jsx)(e$,{frame:y,active:g,children:(0,i.jsx)(e6,{ref:t,from:l,durationInFrames:u,style:w,_remotionInternalPremountDisplay:s,_remotionInternalPostmountDisplay:d,_remotionInternalIsPremounting:v,_remotionInternalIsPostmounting:h,...f})})})}),e6=(0,o.forwardRef)((e,t)=>{let r=G(),{fps:o}=eX();if("none"!==e.layout&&!r.isRendering){let r=e.premountFor;if(r||e.postmountFor)return(0,i.jsx)(e9,{ref:t,...e,premountFor:r})}return(0,i.jsx)(e2,{...e,ref:t})}),e3=e=>{if("string"!=typeof e)throw TypeError('The "filename" must be a string, but you passed a value of type '.concat(typeof e));if(""===e.trim())throw Error("The `filename` must not be empty");if(!e.match(/^([0-9a-zA-Z-!_.*'()/:&$@=;+,?]+)/g))throw Error('The `filename` must match "/^([0-9a-zA-Z-!_.*\'()/:&$@=;+,?]+)/g". Use forward slashes only, even on Windows.')},e8=e=>{if("string"!=typeof e&&!(e instanceof Uint8Array))throw TypeError('The "content" must be a string or Uint8Array, but you passed a value of type '.concat(typeof e));if("string"==typeof e&&""===e.trim())throw Error("The `content` must not be empty")},e7=e=>{"artifact"===e.type&&(e3(e.filename),"thumbnail"!==e.contentType&&e8(e.content))},te=(0,o.createContext)({registerRenderAsset:()=>{},unregisterRenderAsset:()=>{},renderAssets:[]});Symbol("Thumbnail");var tt=e=>"undefined"==typeof window||e.startsWith("http://")||e.startsWith("https://")||e.startsWith("file://")||e.startsWith("blob:")||e.startsWith("data:")?e:ne
1w URL(e,window.origin).href,tr=e=>{let{trimAfter:t,mediaDurationInFrames:r,playbackRate:o,trimBefore:n}=e,i=r;return void 0!==t&&(i=t),void 0!==n&&(i-=n),Math.floor(i/o)},to=(0,o.createContext)(null),tn=e=>{let{durationInFrames:t,times:r=1/0,children:n,name:a,...l}=e,u=eQ(),{durationInFrames:s}=eX();if(Z(t,{component:"of the <Loop /> component",allowFloats:!0}),"number"!=typeof r)throw TypeError('You passed to "times" an argument of type '.concat(typeof r,", but it must be a number."));if(r!==1/0&&r%1!=0)throw TypeError('The "times" prop of a loop must be an integer, but got '.concat(r,"."));if(r<0)throw TypeError('The "times" prop of a loop must be at least 0, but got '.concat(r));let d=Math.min(Math.ceil(s/t),r),c="none"===l.layout?void 0:l.style,m=t*(d-1),f=Math.min(Math.floor(u/t)*t,m),p=(0,o.useMemo)(()=>({numberOfTimes:Math.min(s/t,r),startOffset:-f,durationInFrames:t}),[s,t,f,r]),v=(0,o.useMemo)(()=>({iteration:Math.floor(u/t),durationInFrames:t}),[u,t]);return(0,i.jsx)(to.Provider,{value:v,children:(0,i.jsx)(e6,{durationInFrames:t,from:f,name:null!=a?a:"<Loop>",_remotionInternalLoopDisplay:p,layout:l.layout,style:c,children:n})})};tn.useLoop=()=>o.useContext(to);var ti=e=>{let{logLevel:t,tag:r,message:o,mountTime:n}=e,i=[n?Date.now()-n+"ms ":null,r].filter(Boolean).join(" ");ed.trace({logLevel:t,tag:null},"[".concat(i,"]"),o)},ta=(0,o.createContext)({}),tl={},tu=[],ts=e=>{let{children:t}=e,[r,n]=(0,o.useState)(()=>tl);return(0,o.useEffect)(()=>{let e=()=>{n(tl)};return tu.push(e),()=>{tu=tu.filter(t=>t!==e)}},[]),(0,i.jsx)(ta.Provider,{value:r,children:t})},td=e=>{let t=e.indexOf("#");return -1===t?null:t},tc=e=>{let t=td(e);return null===t?e:e.slice(0,t)},tm=e=>{let t=(0,o.useContext)(ta),r=td(e),n=tc(e);return t[n]?null!==r?t[n]+e.slice(r):t[n]:e},tf=(e,t)=>{if("number"!=typeof e.volume&&"function"!=typeof e.volume&&void 0!==e.volume)throw TypeError("You have passed a volume of type ".concat(typeof e.volume," to your <").concat(t," /> component. Volume must be a number or a function with the signature '(frame: number) => number' undefined."));if("number"==typeof e.volume&&e.volume<0)throw TypeError("You have passed a volume below 0 to your <".concat(t," /> component. Volume must be between 0 and 1"));if("number"!=typeof e.playbackRate&&void 0!==e.playbackRate)throw TypeError("You have passed a playbackRate of type ".concat(typeof e.playbackRate," to your <").concat(t," /> component. Playback rate must a real number or undefined."));if("number"==typeof e.playbackRate&&(isNaN(e.playbackRate)||!Number.isFinite(e.playbackRate)||e.playbackRate<=0))throw TypeError("You have passed a playbackRate of ".concat(e.playbackRate," to your <").concat(t," /> component. Playback rate must be a real number above 0."))},tp=(e,t)=>{if(void 0!==e){if("number"!=typeof e)throw TypeError("type of startFrom prop must be a number, instead got type ".concat(typeof e,"."));if(isNaN(e)||e===1/0)throw TypeError("startFrom prop can not be NaN or Infinity.");if(e<0)throw TypeError("startFrom must be greater than equal to 0 instead got ".concat(e,"."))}if(void 0!==t){if("number"!=typeof t)throw TypeError("type of endAt prop must be a number, instead got type ".concat(typeof t,"."));if(isNaN(t))throw TypeError("endAt prop can not be NaN.");if(t<=0)throw TypeError("endAt must be a positive number, instead got ".concat(t,"."))}if(t<e)throw TypeError("endAt prop must be greater than startFrom prop.")},tv=(e,t)=>{if(void 0!==e){if("number"!=typeof e)throw TypeError("type of trimBefore prop must be a number, instead got type ".concat(typeof e,"."));if(isNaN(e)||e===1/0)throw TypeError("trimBefore prop can not be NaN or Infinity.");if(e<0)throw TypeError("trimBefore must be greater than equal to 0 instead got ".concat(e,"."))}if(void 0!==t){if("number"!=typeof t)throw TypeError("type of trimAfter prop must be a number, instead got type ".concat(typeof t,"."));if(isNaN(t))throw TypeError("trimAfter prop can not be NaN.");if(t<=0)throw TypeError("trimAfter must be a positive number, instead got ".concat(t,"."))}if(t<=e)throw TypeError("trimAfter prop must be greater than trimBefore prop.")},th=e=>{let{startFrom:t,endAt:r,trimBefore:o,trimAfter:n}=e;if(void 0!==t&&void 0!==o)throw TypeError("Cannot use both startFrom and trimBefore props. Use trimBefore instead as startFrom is deprecated.");
1if(void 0!==r&&void 0!==n)throw TypeError("Cannot use both endAt and trimAfter props. Use trimAfter instead as endAt is deprecated.");let i=void 0!==t||void 0!==r;void 0!==o||void 0!==n?tv(o,n):i&&tp(t,r)},ty=e=>{var t,r;let{startFrom:o,endAt:n,trimBefore:i,trimAfter:a}=e;return{trimBeforeValue:null!==(t=null!=i?i:o)&&void 0!==t?t:void 0,trimAfterValue:null!==(r=null!=a?a:n)&&void 0!==r?r:void 0}},tg=(e,t)=>{if("got-duration"===t.type){let r=tt(t.src);return e[r]===t.durationInSeconds?e:{...e,[r]:t.durationInSeconds}}return e},tw=(0,o.createContext)({durations:{},setDurations:()=>{throw Error("context missing")}}),tb=e=>{let{children:t}=e,[r,n]=(0,o.useReducer)(tg,{}),a=(0,o.useMemo)(()=>({durations:r,setDurations:n}),[r]);return(0,i.jsx)(tw.Provider,{value:a,children:t})},tE=e=>{let{crossOrigin:t,requestsVideoFrame:r,isClientSideRendering:o}=e;return null!=t?t:o||r?"anonymous":void 0},tx=e=>{let{mediaRef:t,mediaType:r,onAutoPlayError:o,logLevel:n,mountTime:i,reason:a,isPlayer:l}=e,{current:u}=t;if(!u)return;ti({logLevel:n,tag:"play",message:"Attempting to play ".concat(u.src,". Reason: ").concat(a),mountTime:i});let s=u.play();s.catch&&s.catch(e=>{if(!(!u||e.message.includes("request was interrupted by a call to pause")||e.message.includes("The operation was aborted.")||e.message.includes("The fetching process for the media resource was aborted by the user agent")||e.message.includes("request was interrupted by a new load request")||e.message.includes("because the media was removed from the document")||e.message.includes("user didn't interact with the document")&&u.muted)&&(console.log("Could not play ".concat(r," due to following error: "),e),!u.muted)){if(o){o();return}"video"===r&&l&&(ed.info({logLevel:n,tag:"<"+r+">"},"The video will be muted and we'll retry playing it."),ed.info({logLevel:n,tag:"<"+r+">"},"Use onAutoPlayError() to handle this error yourself."),u.muted=!0,u.play())}})},tC=e=>{let{audioContext:t,ref:r}=e,o=null,n=!1;return{attemptToConnect:()=>{if(n)throw Error("SharedElementSourceNode has been disposed");!o&&r.current&&(o=t.createMediaElementSource(r.current))},get:()=>{if(!o)throw Error("Audio element not connected");return o},cleanup:()=>{o&&(o.disconnect(),o=null),n=!0}}},tR=!1,tT=e=>{tR||(tR=!0,"undefined"!=typeof window&&ed.warn({logLevel:e,tag:null},"AudioContext is not supported in this browser"))},tF=e=>{let{logLevel:t,latencyHint:r,audioEnabled:n}=e,i=G();return(0,o.useMemo)(()=>i.isRendering||!n?null:"undefined"==typeof AudioContext?(tT(t),null):new AudioContext({latencyHint:r,sampleRate:48e3}),[t,r,i.isRendering,n])},tS="data:audio/mp3;base64,/+MYxAAJcAV8AAgAABn//////+/gQ5BAMA+D4Pg+BAQBAEAwD4Pg+D4EBAEAQDAPg++hYBH///hUFQVBUFREDQNHmf///////+MYxBUGkAGIMAAAAP/29Xt6lUxBTUUzLjEwMFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV/+MYxDUAAANIAAAAAFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV",tV=(e,t)=>{let r=Object.keys(e).sort(),o=Object.keys(t).sort();if(r.length!==o.length)return!1;for(let n=0;n<r.length;n++)if(r[n]!==o[n]||e[r[n]]!==t[o[n]])return!1;return!0},tP=(e,t,r)=>"src"!==e||r.startsWith("data:")||t.startsWith("data:")?r!==t:new URL(r,window.origin).toString()!==new URL(t,window.origin).toString(),tN=(0,o.createContext)(null),tk=e=>{var t;let{children:r,numberOfAudioTags:n,audioLatencyHint:a,audioEnabled:l}=e,u=(0,o.useRef)([]),[s]=(0,o.useState)(n);if(n!==s)throw Error("The number of shared audio tags has changed dynamically. Once you have set this property, you cannot change it afterwards.");let d=ep(),c=tF({logLevel:d,latencyHint:a,audioEnabled:l}),m=(0,o.useMemo)(()=>({value:0}),[]),f=(0,o.useRef)({scheduledEndTime:null,mediaEndTime:null}),p=(0,o.useMemo)(()=>e=>{var t,r;let{node:o,mediaTimestamp:n,targetTime:i,currentTime:a,sequenceEndTime:l,sequenceStartTime:u,debugAudioScheduling:s}=e;if(!c)throw Error("Audio context not found");let m=null!==(r=null===(t=o.buffer)||void 0===t?void 0:t.duration)&&void 0!==r?r:0,p=n+m,v=n<u?u-n:0,h=i<0?-i:0,y=v+h,g=p>l?m-Math.max(0,p-l)-y:m-y,w=i+a+y;if(y<0)throw Error("offset < 0: "+JSON.stringify({offset:y,targetTime:i,currentTime:a,offsetBecauseOfTrim:v,offsetBecauseOfTooLate:h}));g>0&&o.start(w,y,g);let b=w+g/o.playbackRate.value,E=n+y,x=E+g,C=c.baseLatency+c.outputLatency,R=w-a-C,T=f.current,F=null!==T.scheduledEndTime&&Math.abs(w-T.sc
1heduledEndTime)>.001,S=null!==T.mediaEndTime&&Math.abs(E-T.mediaEndTime)>.001;return s&&ed.info({logLevel:d,tag:"audio-scheduling"},"scheduled %c%s%c %s %c%s%c %s %c%s%c %s %s %s",F?"color: red; font-weight: bold":"",w.toFixed(4),"",b.toFixed(4),S?"color: red; font-weight: bold":"",E.toFixed(4),"",x.toFixed(4),g<0?"color: red; font-weight: bold":R<0?"color: red; font-weight: bold":"color: blue; font-weight: bold",g<0?"missed "+Math.abs(y).toFixed(2)+"s":Math.abs(R).toFixed(2)+(R<0?" delay":" ahead"),"","current="+a.toFixed(4),"offset="+y.toFixed(4),"latency="+C.toFixed(4),"state="+c.state),T.scheduledEndTime=b,T.mediaEndTime=x,g>0?{type:"started",scheduledTime:w}:{type:"not-started"}},[c,d]),v=(0,o.useMemo)(()=>Array(n).fill(!0).map(()=>{let e=(0,o.createRef)();return{id:Math.random(),ref:e,mediaElementSourceNode:c?tC({audioContext:c,ref:e}):null}}),[c,n]);(null!==(t=o.useInsertionEffect)&&void 0!==t?t:o.useLayoutEffect)(()=>()=>{requestAnimationFrame(()=>{v.forEach(e=>{let{mediaElementSourceNode:t}=e;null==t||t.cleanup()})})},[v]);let h=(0,o.useRef)(Array(n).fill(!1)),y=(0,o.useCallback)(()=>{v.forEach(e=>{var t;let{ref:r,id:o}=e,n=null===(t=u.current)||void 0===t?void 0:t.find(e=>e.id===o),{current:i}=r;if(i){if(void 0===n){i.src=tS;return}if(!n)throw TypeError("Expected audio data to be there");Object.keys(n.props).forEach(e=>{tP(e,n.props[e],i[e])&&(i[e]=n.props[e])})}})},[v]),g=(0,o.useCallback)(e=>{var t,r;let{aud:o,audioId:i,premounting:a,postmounting:l}=e,s=null===(t=u.current)||void 0===t?void 0:t.find(e=>e.audioId===i);if(s)return s;let d=h.current.findIndex(e=>!1===e);if(-1===d)throw Error("Tried to simultaneously mount ".concat(n+1," <Html5Audio /> tags at the same time. With the current settings, the maximum amount of <Html5Audio /> tags is limited to ").concat(n," at the same time. Remotion pre-mounts silent audio tags to help avoid browser autoplay restrictions. See https://remotion.dev/docs/player/autoplay#using-the-numberofsharedaudiotags-prop for more information on how to increase this limit."));let{id:c,ref:m,mediaElementSourceNode:f}=v[d],p=[...h.current];p[d]=c,h.current=p;let g={props:o,id:c,el:m,audioId:i,mediaElementSourceNode:f,premounting:a,audioMounted:!!m.current,postmounting:l,cleanupOnMediaTagUnmount:()=>{}};return null===(r=u.current)||void 0===r||r.push(g),y(),g},[n,v,y]),w=(0,o.useCallback)(e=>{var t;let r=[...h.current],o=v.findIndex(t=>t.id===e);if(-1===o)throw TypeError("Error occured in ");r[o]=!1,h.current=r,u.current=null===(t=u.current)||void 0===t?void 0:t.filter(t=>t.id!==e),y()},[v,y]),b=(0,o.useCallback)(e=>{var t;let{aud:r,audioId:o,id:n,premounting:i,postmounting:a}=e,l=!1;u.current=null===(t=u.current)||void 0===t?void 0:t.map(e=>{let t=!!e.el.current;return(e.audioMounted!==t&&(l=!0),e.id===n)?tV(r,e.props)&&e.premounting===i&&e.postmounting===a?e:(l=!0,{...e,props:r,premounting:i,postmounting:a,audioId:o,audioMounted:t}):e}),l&&y()},[y]),E=ev(),x=G(),C=(0,o.useCallback)(()=>{v.forEach(e=>{let t=u.current.find(t=>t.el===e.ref);null!=t&&t.premounting||tx({mediaRef:e.ref,mediaType:"audio",onAutoPlayError:null,logLevel:d,mountTime:E,reason:"playing all audios",isPlayer:x.isPlayer})}),null==c||c.resume()},[c,d,E,v,x.isPlayer]),R=(0,o.useMemo)(()=>({registerAudio:g,unregisterAudio:w,updateAudio:b,playAllAudios:C,numberOfAudioTags:n,audioContext:c,audioSyncAnchor:m,scheduleAudioNode:p}),[n,C,g,w,b,c,m,p]);return(0,i.jsxs)(tN.Provider,{value:R,children:[v.map(e=>{let{id:t,ref:r}=e;return(0,i.jsx)("audio",{ref:r,preload:"metadata",src:tS},t)}),r]})},tM=e=>{var t;let{aud:r,audioId:n,premounting:i,postmounting:a}=e,l=(0,o.useContext)(tN),[u]=(0,o.useState)(()=>{if(l&&l.numberOfAudioTags>0)return l.registerAudio({aud:r,audioId:n,premounting:i,postmounting:a});let e=o.createRef(),t=(null==l?void 0:l.audioContext)?tC({audioContext:l.audioContext,ref:e}):null;return{el:e,id:Math.random(),props:r,audioId:n,mediaElementSourceNode:t,premounting:i,audioMounted:!!e.current,postmounting:a,cleanupOnMediaTagUnmount:()=>{null==t||t.cleanup()}}}),s=null!==(t=o.useInsertionEffect)&&void 0!==t?t:o.useLayoutEffect;return"undefined"!=typeof document&&(s(()=>{l&&l.numberOfAudioTags>0&&l.updateAudio({id:u.id,aud:r,audioId:n,premounting:i,postmounting:a})},[r,l,u.id,n,i,a]),s(()=>()=>{l&&l.numberOfAudioTags>0&&l.unregisterAudio(u.id)},[l,u.id])),u},tA=(e,t)=>
11e-5>Math.abs(e-t),tI=(e,t)=>Math.round(e/t*100)/100,tj=()=>!!("undefined"!=typeof window&&/AppleWebKit/.test(window.navigator.userAgent))&&!window.navigator.userAgent.includes("Chrome/"),t_=()=>"undefined"!=typeof window&&/iP(ad|od|hone)/i.test(window.navigator.userAgent)&&tj(),tL=e=>t_()&&e.startsWith("blob:"),tD=e=>{let{actualFrom:t,fps:r}=e;return tI(Math.max(0,-t),r)},tO=e=>{let{duration:t,fps:r}=e;return tI(t,r)},tU=e=>{var t;let{actualSrc:r,actualFrom:o,duration:n,fps:i}=e;if(tL(r)||r.startsWith("data:")||new URL(r,null!==(t="undefined"==typeof window?null:window.location.href)&&void 0!==t?t:"http://localhost:3000").hash||!Number.isFinite(o))return r;let a="".concat(r,"#t=").concat(tD({actualFrom:o,fps:i}));return Number.isFinite(n)?"".concat(a,",").concat(tO({duration:n,fps:i})):a},tq=e=>{let{prevStartFrom:t,newStartFrom:r,prevDuration:o,newDuration:n,fps:i}=e,a=tD({actualFrom:t,fps:i}),l=tD({actualFrom:r,fps:i}),u=tO({duration:o,fps:i}),s=tO({duration:n,fps:i});return!(l<a)&&!(s>u)},tB=e=>{let{actualSrc:t,actualFrom:r,duration:n,fps:i}=e,a=(0,o.useRef)(r),l=(0,o.useRef)(n),u=(0,o.useRef)(t);return tq({prevStartFrom:a.current,newStartFrom:r,prevDuration:l.current,newDuration:n,fps:i})&&t===u.current||(a.current=r,l.current=n,u.current=t),tU({actualSrc:u.current,actualFrom:a.current,duration:l.current,fps:i})},tH=!1,tW=e=>{tH||(tH=!0,ed.warn({logLevel:e,tag:null},"In Safari, setting a volume and a playback rate at the same time is buggy."),ed.warn({logLevel:e,tag:null},"In Desktop Safari, only volumes <= 1 will be applied."),ed.warn({logLevel:e,tag:null},e,"In Mobile Safari, the volume will be ignored and set to 1 if a playbackRate is set."))},tz=e=>{var t,r,n;let{mediaRef:i,volume:a,logLevel:l,source:u,shouldUseWebAudioApi:s}=e,d=(0,o.useRef)(null),c=(0,o.useRef)(a);c.current=a;let m=(0,o.useContext)(tN);if(!m)throw Error("useAmplification must be used within a SharedAudioContext");let{audioContext:f}=m;return"undefined"!=typeof window&&(0,o.useLayoutEffect)(()=>{var e,t;if(!f||!i.current||!s)return;if(1!==i.current.playbackRate&&tj()){tW(l);return}if(!u)return;let r=new GainNode(f,{gain:c.current});return u.attemptToConnect(),u.get().connect(r),r.connect(f.destination),d.current={gainNode:r},ed.trace({logLevel:l,tag:null},"Starting to amplify ".concat(null===(e=i.current)||void 0===e?void 0:e.src,". Gain = ").concat(c.current,", playbackRate = ").concat(null===(t=i.current)||void 0===t?void 0:t.playbackRate)),()=>{d.current=null,r.disconnect(),u.get().disconnect()}},[l,i,f,u,s]),d.current&&!tA(d.current.gainNode.gain.value,a)&&(d.current.gainNode.gain.value=a,ed.trace({logLevel:l,tag:null},"Setting gain to ".concat(a," for ").concat(null===(n=i.current)||void 0===n?void 0:n.src))),(tj()&&i.current&&(null===(t=i.current)||void 0===t?void 0:t.playbackRate)!==1||!s)&&i.current&&!tA(a,null===(r=i.current)||void 0===r?void 0:r.volume)&&(i.current.volume=Math.min(a,1)),d},tY=()=>{var e;let t=(0,o.useContext)(ek);return Math.min(0,null!==(e=null==t?void 0:t.relativeFrom)&&void 0!==e?e:0)},tJ=e=>{let t=tn.useLoop(),r=eQ(),o=tY();return"repeat"===e||null===t?r+o:r+o+t.durationInFrames*t.iteration},tG=e=>{if(/data:|blob:/.test(e.substring(0,5)))return"Data URL";let t=e.split("/").map(e=>e.split("\\")).flat(1);return t[t.length-1]},tQ=e=>{let{compositionDurationInFrames:t,playbackRate:r,trimBefore:o,trimAfter:n,parentSequenceDurationInFrames:i}=e,a=tr({mediaDurationInFrames:t*r+(null!=o?o:0),playbackRate:r,trimBefore:o,trimAfter:n});return null!==i?Math.floor(Math.min(i*r,a)):a},tZ=e=>{let{frame:t,volume:r,mediaVolume:o=1}=e;if("number"==typeof r)return r*o;if(void 0===r)return Number(o);let n=r(t)*o;if("number"!=typeof n)throw TypeError("You passed in a a function to the volume prop but it did not return a number but a value of type ".concat(typeof n," for frame ").concat(t));if(Number.isNaN(n))throw TypeError("You passed in a function to the volume prop but it returned NaN for frame ".concat(t,"."));if(!Number.isFinite(n))throw TypeError("You passed in a function to the volume prop but it returned a non-finite number for frame ".concat(t,"."));return Math.max(0,n)},tX={},t$=e=>{tX[e]||(console.warn(e),tX[e]=!0)},tK=e=>{var t;let{volume:r,mediaVolume:n,mediaType:i,src:a,displayName:l,trimBefore:u,trimAfter:s,playbackRate:d}=e;if(!a)throw Error("No src passed");let c=tY(),m=(0,o.useContext)(ek),f=eX(),[p]=(0,o.useState)(()=>r),v=tQ({compositionDurationInFrames:f.durationInFrames,playbackRate:d,trimBefore:u,trimAfter:s,parentSequenceDurationInFrames:null!==(t=null==m?void 0:m.durationInFrames)&&void 0!==t?t:null}),h=(0,o.useMemo)(()=>"number"==typeof r?r:Array(Math.floor(Math.max(0,v+c))).fill(!0).map((e,t)=>tZ({frame:t+c,volume:r,mediaVolume:n})).join(","),[v,c,r,n]);(0,o.useEffect)(()=>{"number"==typeof r&&r!==p&&t$("Remotion: The ".concat(i," with src ").concat(a," has changed it's volume. Prefer the callback syntax for setting volume to get better timeline display: https://www.remotion.dev/docs/audio/volume"))},[p,i,a,r]);let g="function"==typeof r,w=y(),{rootId:b}=eW();return{volumes:h,duration:v,doesVolumeChange:g,nonce:w,rootId:b,isStudio:G().isStudio,finalDisplayName:null!=l?l:tG(a)}},t0=e=>
1{let{src:t,displayName:r,id:n,stack:i,showInTimeline:a,premountDisplay:l,postmountDisplay:u,loopDisplay:s,controls:d}=e,c=(0,o.useContext)(ek),{registerSequence:m,unregisterSequence:f}=(0,o.useContext)(e0),{duration:p,nonce:v,rootId:h,isStudio:y,finalDisplayName:g}=tK({volume:void 0,mediaVolume:0,mediaType:"image",src:t,displayName:r,trimAfter:void 0,trimBefore:void 0,playbackRate:1});(0,o.useEffect)(()=>{var e,r,o;if(!t)throw Error("No src passed");if((y||(null===(r=window.process)||void 0===r?void 0:null===(e=r.env)||void 0===e?void 0:e.NODE_ENV)==="test")&&a)return m({type:"image",src:t,id:n,duration:p,from:0,parent:null!==(o=null==c?void 0:c.id)&&void 0!==o?o:null,displayName:g,rootId:h,showInTimeline:!0,nonce:v.get(),loopDisplay:s,stack:i,premountDisplay:l,postmountDisplay:u,controls:d}),()=>{f(n)}},[p,n,c,t,m,f,v,i,a,l,u,y,s,h,g,d])},t1=e=>{let{volume:t,mediaVolume:r,src:n,mediaType:i,playbackRate:a,displayName:l,id:u,stack:s,showInTimeline:d,premountDisplay:c,postmountDisplay:m,loopDisplay:f}=e,p=(0,o.useContext)(ek),v=tY(),{registerSequence:h,unregisterSequence:y}=(0,o.useContext)(e0),{volumes:g,duration:w,doesVolumeChange:b,nonce:E,rootId:x,isStudio:C,finalDisplayName:R}=tK({volume:t,mediaVolume:r,mediaType:i,src:n,displayName:l,trimAfter:void 0,trimBefore:void 0,playbackRate:a});(0,o.useEffect)(()=>{var e,t,r;if(!n)throw Error("No src passed");if((C||(null===(t=window.process)||void 0===t?void 0:null===(e=t.env)||void 0===e?void 0:e.NODE_ENV)==="test")&&d)return h({type:i,src:n,id:u,duration:w,from:0,parent:null!==(r=null==p?void 0:p.id)&&void 0!==r?r:null,displayName:R,rootId:x,volume:g,showInTimeline:!0,nonce:E.get(),startMediaFrom:0-v,doesVolumeChange:b,loopDisplay:f,playbackRate:a,stack:s,premountDisplay:c,postmountDisplay:m,controls:null}),()=>{y(u)}},[w,u,p,n,h,y,g,b,E,i,v,a,s,d,c,m,C,f,x,R])},t5=(e,t)=>{let[r,n]=(0,o.useState)([]),[i,a]=(0,o.useState)([]),[l,u]=(0,o.useState)([]),s=G().isRendering,d=(0,o.useRef)(!1),c=(0,o.useCallback)(e=>s?{unblock:()=>{}}:(n(t=>[...t,e]),{unblock:()=>{n(t=>{let r=t.filter(t=>t!==e);return r.length===t.length?t:r})}}),[s]),m=(0,o.useCallback)(e=>(a(t=>[...t,e]),{remove:()=>{a(t=>t.filter(t=>t!==e))}}),[]),f=(0,o.useCallback)(e=>(u(t=>[...t,e]),{remove:()=>{u(t=>t.filter(t=>t!==e))}}),[]);return(0,o.useEffect)(()=>{!s&&r.length>0&&(i.forEach(e=>e()),ti({logLevel:e,message:"Player is entering buffer state",mountTime:t,tag:"player"}))},[r]),"undefined"!=typeof window&&(0,o.useLayoutEffect)(()=>{s||0!==r.length||(l.forEach(e=>e()),ti({logLevel:e,message:"Player is exiting buffer state",mountTime:t,tag:"player"}))},[r]),(0,o.useMemo)(()=>({addBlock:c,listenForBuffering:m,listenForResume:f,buffering:d}),[c,d,m,f])},t4=o.createContext(null),t2=e=>{let{children:t}=e,{logLevel:r,mountTime:n}=(0,o.useContext)(ef),a=t5(null!=r?r:"info",n);return(0,i.jsx)(t4.Provider,{value:a,children:t})},t9=e=>{let[t,r]=(0,o.useState)(e.buffering.current);return(0,o.useEffect)(()=>(e.listenForBuffering(()=>{r(!0)}),e.listenForResume(()=>{r(!1)}),()=>{e.listenForBuffering(()=>{}),e.listenForResume(()=>{})}),[e]),t},t6=()=>{let e=(0,o.useContext)(t4),t=e?e.addBlock:null;return(0,o.useMemo)(()=>({delayPlayback:()=>{if(!t)throw Error("Tried to enable the buffering state, but a Remotion context was not found. This API can only be called in a component that was passed to the Remotion Player or a <Composition>. Or you might have experienced a version mismatch - run `npx remotion versions` and ensure all packages have the same version. This error is thrown by the buffer state https://remotion.dev/docs/player/buffer-state");let{unblock:e}=t({id:String(Math.random())});return{unblock:e}}}),[t])},t3=()=>/^((?!chrome|android).)*safari/i.test(window.navigator.userAgent),t8=e=>{let{mediaRef:t,mediaType:r,onVariableFpsVideoDetected:n,pauseWhenBuffering:i,logLevel:a,mountTime:l}=e,u=(0,o.useRef)(!1),{delayPlayback:s}=t6(),d=(0,o.useCallback)(e=>{var o;if("video"!==r||!i)return;let d=t.current;if(!d)return;if(d.readyState>=d.HAVE_FUTURE_DATA&&!t3()){ti({logLevel:a,message:"Not using buffer until first frame, because readyState is ".concat(d.readyState," and is not Safari or Desktop Chrome"),mountTime:l,tag:"buffer"});return}if(!d.requestVideoFrameCallback){ti({logLevel:a,message:"Not using buffer until first frame, because requestVideoFrameCallback is not supported",mountTime:l,tag:"buffer"});return}u.current=!0,ti({logLevel:a,message:"Buffering ".concat(null===(o=t.current)||void 0===o?void 0:o.src," until the first frame is received"),mountTime:l,tag:"buffer"});let c=s(),m=()=>{c.unblock(),d.removeEventListener("ended",m,{once:!0}),d.removeEventListener("pause",m,{once:!0}),u.current=!1},f=()=>{m()};d.requestVideoFrameCallback((t,r)=>{Math.abs(r.mediaTime-e)>.5&&n(),m()}),d.addEventListener("ended",f,{once:!0}),d.addEventListener("pause",f,{once:!0}),d.addEventListener("canplay",f,{once:!0})},[s,a,t,r,l,n,i]);return(0,o.useMemo)(()=>({isBuffering:()=>u.current,bufferUntilFirstFrame:d}),[d])},t7=e=>{var t,r,n,i;let a=o.useRef({time:null!==(n=null===(t=e.current)||void 0===t?void 0:t.currentTime)&&void 0!==n?n:0,lastUpdate:performance.now()}),l=null!==(i=null===(r=e.current)||void 0===r?void 0:r.currentTime)&&void 0!==i?i:null;return null!==l&&a.current.time!==l&&(a.current.time=l,a.current.lastUpdate=performance.now()),a},re=e=>{let{mediaRef:t,time:r,logLevel:o,why:n,mountTime:i}=e,a=t_()?Number(r.toFixed(1)):r;return ti({logLevel:o,tag:"seek",message:"Seeking from ".concat(t.currentTime," to ").concat(a,". src= ").concat(t.src," Reason: ").concat(n),mountTime:i}),t.currentTime=a,a},rt=e=>{let{element:t,shouldBuffer:r,isPremounting:n,isPostmounting:i,logLevel:a,mountTime:l,src:u}=e,s=t6(),[d,c]=(0,o.useState)(!1);return(0,o.useEffect)(()=>{let e=[],{current:o}=t;if(!o||!r)return;if(n||i){if((n||i)&&o.readyState<o.HAVE_FUTURE_DATA&&!navigator.userAgent.includes("Firefox/")){ti({logLevel:a,message:"Calling .load() on ".concat(o.src," because readyState is ").concat(o.readyState," and it is not Firefox. Element is premounted ").concat(o.playbackRate),tag:"load",mountTime:l});let e=o.playbackRate;o.load(),o.playbackRate=e}return}let d=t=>{let r=!1;
1e.forEach(e=>{e(t),r=!0}),e=[],c(e=>(e&&(r=!0),!1)),r&&ti({logLevel:a,message:"Unmarking as buffering: ".concat(o.src,". Reason: ").concat(t),tag:"buffer",mountTime:l})},m=t=>{c(!0),ti({logLevel:a,message:"Marking as buffering: ".concat(o.src,". Reason: ").concat(t),tag:"buffer",mountTime:l});let{unblock:r}=s.delayPlayback(),n=()=>{d('"canplay" was fired'),f()},i=()=>{d('"error" event was occurred'),f()};o.addEventListener("canplay",n,{once:!0}),e.push(()=>{o.removeEventListener("canplay",n)}),o.addEventListener("error",i,{once:!0}),e.push(()=>{o.removeEventListener("error",i)}),e.push(e=>{ti({logLevel:a,message:"Unblocking ".concat(o.src," from buffer. Reason: ").concat(e),tag:"buffer",mountTime:l}),r()})},f=()=>{if(o.readyState<o.HAVE_FUTURE_DATA){if(m("readyState is ".concat(o.readyState,", which is less than HAVE_FUTURE_DATA")),!navigator.userAgent.includes("Firefox/")){ti({logLevel:a,message:"Calling .load() on ".concat(u," because readyState is ").concat(o.readyState," and it is not Firefox. ").concat(o.playbackRate),tag:"load",mountTime:l});let e=o.playbackRate;o.load(),o.playbackRate=e}}else{let t=()=>{m('"waiting" event was fired')};o.addEventListener("waiting",t),e.push(()=>{o.removeEventListener("waiting",t)})}};return f(),()=>{d("element was unmounted or prop changed")}},[s,u,t,n,i,a,r,l]),d},rr=e=>{let{mediaRef:t,mediaType:r,lastSeek:n,onVariableFpsVideoDetected:i}=e,a=(0,o.useRef)(null);return(0,o.useEffect)(()=>{let{current:e}=t;if(e)a.current={time:e.currentTime,lastUpdate:performance.now()};else{a.current=null;return}if("video"!==r){a.current=null;return}if(!e.requestVideoFrameCallback)return;let o=()=>{},l=()=>{if(!e)return;let t=e.requestVideoFrameCallback((e,t)=>{if(null!==a.current){let e=Math.abs(a.current.time-t.mediaTime),r=Math.abs(null===n.current?1/0:t.mediaTime-n.current);e>.5&&r>.5&&t.mediaTime>a.current.time&&i()}a.current={time:t.mediaTime,lastUpdate:performance.now()},l()});o=()=>{e.cancelVideoFrameCallback(t),o=()=>{}}};return l(),()=>{o()}},[n,t,r,i]),a};function ro(e,t){if(t.length<2)throw Error(e+" must have at least 2 elements");for(let r of t){if("number"!=typeof r)throw Error("".concat(e," must contain only numbers"));if(!Number.isFinite(r))throw Error("".concat(e," must contain only finite numbers, but got [").concat(t.join(","),"]"))}}function rn(e,t,r,o){var n;if(void 0===e)throw Error("input can not be undefined");if(void 0===t)throw Error("inputRange can not be undefined");if(void 0===r)throw Error("outputRange can not be undefined");if(t.length!==r.length)throw Error("inputRange ("+t.length+") and outputRange ("+r.length+") must have the same length");ro("inputRange",t),ro("outputRange",r),function(e){for(let t=1;t<e.length;++t)if(!(e[t]>e[t-1]))throw Error("inputRange must be strictly monotonically increasing but got [".concat(e.join(","),"]"))}(t);let i=null!==(n=null==o?void 0:o.easing)&&void 0!==n?n:e=>e,a="extend";(null==o?void 0:o.extrapolateLeft)!==void 0&&(a=o.extrapolateLeft);let l="extend";if((null==o?void 0:o.extrapolateRight)!==void 0&&(l=o.extrapolateRight),"number"!=typeof e)throw TypeError("Cannot interpolate an input which is not a number");let u=function(e,t){let r;for(r=1;r<t.length-1&&!(t[r]>=e);++r);return r-1}(e,t);return function(e,t,r,o){let{extrapolateLeft:n,extrapolateRight:i,easing:a}=o,l=e,[u,s]=t,[d,c]=r;if(l<u){if("identity"===n)return l;if("clamp"===n)l=u;else if("wrap"===n){let e=s-u;l=((l-u)%e+e)%e+u}}if(l>s){if("identity"===i)return l;if("clamp"===i)l=s;else if("wrap"===i){let e=s-u;l=((l-u)%e+e)%e+u}}return d===c?d:l=(l=a(l=(l-u)/(s-u)))*(c-d)+d}(e,[t[u],t[u+1]],[r[u],r[u+1]],{easing:i,extrapolateLeft:a,extrapolateRight:l})}var ri=e=>{let{frame:t,playbackRate:r,startFrom:o}=e;return rn(t,[-1,o,o+1],[-1,o,o+r])},ra=e=>{let{fps:t,frame:r,playbackRate:o,startFrom:n}=e;return 1e3/t*ri({frame:r,playbackRate:o,startFrom:n})/1e3},rl={},ru=(e,t)=>{if(null===e||0===e.seekable.length||e.seekable.length>1||rl[e.src])return;let r={start:e.seekable.start(0),end:e.seekable.end(0)};if(0===r.start&&0===r.end){let r=["The media ".concat(e.src," cannot be seeked. This could be one of few reasons:"),"1) The media resource was replaced while the video is playing but it was not loaded yet.","2) The media does not support seeking.","3) The media was loaded with security headers prventing it from being included.","Please see https://remotion.dev/docs/non-seekable-media for assistance."].join("\n");if("console-error"===t)console.error(r);else if("console-warning"===t)console.warn("The media ".concat(e.src," does not support seeking. The video will render fine, but may
1not play correctly in the Remotion Studio and in the <Player>. See https://remotion.dev/docs/non-seekable-media for an explanation."));else throw Error(r);rl[e.src]=!0}},rs=e=>{var t;let{mediaRef:r,src:n,mediaType:i,playbackRate:a,onlyWarnForMediaSeekingError:l,acceptableTimeshift:u,pauseWhenBuffering:s,isPremounting:d,isPostmounting:c,onAutoPlayError:m}=e,{playbackRate:f}=eW(),p=eQ(),v=ez(),[h]=eG(),y=(0,o.useContext)(t4),{fps:g}=eX(),w=tY(),b=(0,o.useRef)(null),E=(0,o.useRef)(null),x=ep(),C=ev();if(!y)throw Error("useMediaPlayback must be used inside a <BufferingContext>");let R=(0,o.useRef)({}),T=(0,o.useCallback)(()=>{n&&!R.current[n]&&(ed.verbose({logLevel:x,tag:null},"Detected ".concat(n," as a variable FPS video. Disabling buffering while seeking.")),R.current[n]=!0)},[x,n]),F=rr({mediaRef:r,mediaType:i,lastSeek:E,onVariableFpsVideoDetected:T}),S=t7(r),V=ra({frame:p,playbackRate:a,startFrom:-w,fps:g}),P=rt({element:r,shouldBuffer:s,isPremounting:d,isPostmounting:c,logLevel:x,mountTime:C,src:null!=n?n:null}),{bufferUntilFirstFrame:N,isBuffering:k}=t8({mediaRef:r,mediaType:i,onVariableFpsVideoDetected:T,pauseWhenBuffering:s,logLevel:x,mountTime:C}),M=a*f,A=(null===(t=r.current)||void 0===t?void 0:t.duration)?Math.min(r.current.duration,null!=u?u:.65):null!=u?u:.65,I=t9(y);(0,o.useEffect)(()=>{var e,t,o,n,i;if(null===(e=r.current)||void 0===e?void 0:e.paused)return;if(!h){ti({logLevel:x,tag:"pause",message:"Pausing ".concat(null===(t=r.current)||void 0===t?void 0:t.src," because ").concat(d?"media is premounting":c?"media is postmounting":"Player is not playing"),mountTime:C}),null===(o=r.current)||void 0===o||o.pause();return}let a=P||k();y.buffering.current&&!a&&(ti({logLevel:x,tag:"pause",message:"Pausing ".concat(null===(n=r.current)||void 0===n?void 0:n.src," because player is buffering but media tag is not"),mountTime:C}),null===(i=r.current)||void 0===i||i.pause())},[k,P,y,I,d,x,r,i,C,h,c]);let j=G();(0,o.useLayoutEffect)(()=>{let e=Math.max(0,M);r.current&&r.current.playbackRate!==e&&(r.current.playbackRate=e)},[r,M]),(0,o.useEffect)(()=>{var e,t,o;let a="audio"===i?"<Html5Audio>":"<Html5Video>";if(!r.current)throw Error("No ".concat(i," ref found"));if(!n)throw Error("No 'src' attribute was passed to the ".concat(a," element."));let{duration:u}=r.current,f=!Number.isNaN(u)&&Number.isFinite(u)?Math.min(u,V):V,p=S.current.time,g=null!==(o=null===(e=F.current)||void 0===e?void 0:e.time)&&void 0!==o?o:null,w=R.current[n],T=Math.abs(f-p),I=g?Math.abs(f-g):null,_=(null===(t=F.current)||void 0===t?void 0:t.lastUpdate)&&F.current.time>S.current.lastUpdate?I:T,L=I&&!w?_:T;if(L>A&&b.current!==f){E.current=re({mediaRef:r.current,time:f,logLevel:x,why:"because time shift is too big. shouldBeTime = ".concat(f,", isTime = ").concat(p,", requestVideoCallbackTime = ").concat(g,", timeShift = ").concat(L).concat(w?", isVariableFpsVideo = true":"",", isPremounting = ").concat(d,", isPostmounting = ").concat(c,", pauseWhenBuffering = ").concat(s),mountTime:C}),b.current=E.current,h&&(M>0&&N(f),r.current.paused&&tx({mediaRef:r,mediaType:i,onAutoPlayError:m,logLevel:x,mountTime:C,reason:"player is playing but media tag is paused, and just seeked",isPlayer:j.isPlayer})),l||ru(r.current,l?"console-warning":"console-error");return}let D=h?.15:.01,O=Math.abs(r.current.currentTime-f)>D,U=P||k(),q=y.buffering.current&&!U;if(!h||q){O&&(E.current=re({mediaRef:r.current,time:f,logLevel:x,why:"not playing or something else is buffering. time offset is over seek threshold (".concat(D,")"),mountTime:C}));return}if(!h||y.buffering.current)return;let B=r.current.paused&&!r.current.ended,H=0===v;if(B||H){let e=B?"media tag is paused":"absolute frame is 0";O&&(E.current=re({mediaRef:r.current,time:f,logLevel:x,why:"is over timeshift threshold (threshold = ".concat(D,") and ").concat(e),mountTime:C})),tx({mediaRef:r,mediaType:i,onAutoPlayError:m,logLevel:x,mountTime:C,reason:"player is playing and ".concat(e),isPlayer:j.isPlayer}),!w&&M>0&&N(f)}},[v,A,N,y.buffering,F,x,V,k,P,r,i,l,M,h,n,m,d,c,s,C,S,j.isPlayer])},rd=e=>{let{mediaRef:t,id:r,mediaType:n,onAutoPlayError:i,isPremounting:a,isPostmounting:l}=e,{audioAndVideoTags:u,imperativePlaying:s}=eW(),d=ep(),c=ev(),m=G();(0,o.useEffect)(()=>(u.current.push({id:r,play:e=>{if(s.current&&!a&&!l)return tx({mediaRef:t,mediaType:n,onAutoPlayError:i,logLevel:d,mou
1ntTime:c,reason:e,isPlayer:m.isPlayer})}}),()=>{u.current=u.current.filter(e=>e.id!==r)}),[u,r,t,n,i,s,a,l,d,c,m.isPlayer])},rc=(0,o.createContext)({mediaMuted:!1,mediaVolume:1}),rm=(0,o.createContext)({setMediaMuted:()=>{throw Error("default")},setMediaVolume:()=>{throw Error("default")}}),rf=()=>{let{mediaVolume:e}=(0,o.useContext)(rc),{setMediaVolume:t}=(0,o.useContext)(rm);return(0,o.useMemo)(()=>[e,t],[e,t])},rp=()=>{let{mediaMuted:e}=(0,o.useContext)(rc),{setMediaMuted:t}=(0,o.useContext)(rm);return(0,o.useMemo)(()=>[e,t],[e,t])},rv=e=>{if(e>=100)throw Error("Volume was set to ".concat(e,", but regular volume is 1, not 100. Did you forget to divide by 100? Set a volume of less than 100 to dismiss this error."))},rh=(0,o.forwardRef)((e,t)=>{var r,n,a,l;let[u]=(0,o.useState)(e.shouldPreMountAudioTags);if(e.shouldPreMountAudioTags!==u)throw Error("Cannot change the behavior for pre-mounting audio tags dynamically.");let s=ep(),{volume:d,muted:c,playbackRate:m,shouldPreMountAudioTags:f,src:p,onDuration:v,acceptableTimeShiftInSeconds:h,_remotionInternalNeedsDurationCalculation:y,_remotionInternalNativeLoopPassed:g,_remotionInternalStack:w,allowAmplificationDuringRender:b,name:E,pauseWhenBuffering:x,showInTimeline:C,loopVolumeCurveBehavior:R,stack:T,crossOrigin:F,delayRenderRetries:S,delayRenderTimeoutInMilliseconds:V,toneFrequency:P,useWebAudioApi:N,onError:k,onNativeError:M,audioStreamIndex:A,...I}=e,[j]=rf(),[_]=rp(),L=tJ(null!=R?R:"repeat"),{hidden:D}=(0,o.useContext)(e1);if(!p)throw TypeError("No 'src' was passed to <Html5Audio>.");let O=tm(p),U=(0,o.useContext)(ek),[q]=(0,o.useState)(()=>String(Math.random())),B=null!==(r=D[q])&&void 0!==r&&r,H=tZ({frame:L,volume:d,mediaVolume:j});rv(H);let W=tE({crossOrigin:F,requestsVideoFrame:!1,isClientSideRendering:!1}),z=(0,o.useMemo)(()=>({muted:c||_||B||H<=0,src:O,loop:g,crossOrigin:W,...I}),[g,B,_,c,I,O,H,W]),{el:Y,mediaElementSourceNode:J,cleanupOnMediaTagUnmount:G}=tM({aud:z,audioId:(0,o.useMemo)(()=>"audio-".concat(eI(null!=p?p:""),"-").concat(null==U?void 0:U.relativeFrom,"-").concat(null==U?void 0:U.cumulatedFrom,"-").concat(null==U?void 0:U.durationInFrames,"-muted:").concat(e.muted,"-loop:").concat(e.loop),[p,null==U?void 0:U.relativeFrom,null==U?void 0:U.cumulatedFrom,null==U?void 0:U.durationInFrames,e.muted,e.loop]),premounting:!!(null==U?void 0:U.premounting),postmounting:!!(null==U?void 0:U.postmounting)});t1({volume:d,mediaVolume:j,src:p,mediaType:"audio",playbackRate:null!=m?m:1,displayName:null!=E?E:null,id:q,stack:w,showInTimeline:C,premountDisplay:null!==(n=null==U?void 0:U.premountDisplay)&&void 0!==n?n:null,postmountDisplay:null!==(a=null==U?void 0:U.postmountDisplay)&&void 0!==a?a:null,loopDisplay:void 0}),rs({mediaRef:Y,src:p,mediaType:"audio",playbackRate:null!=m?m:1,onlyWarnForMediaSeekingError:!1,acceptableTimeshift:null!=h?h:null,isPremounting:!!(null==U?void 0:U.premounting),isPostmounting:!!(null==U?void 0:U.postmounting),pauseWhenBuffering:x,onAutoPlayError:null}),rd({id:q,isPostmounting:!!(null==U?void 0:U.postmounting),isPremounting:!!(null==U?void 0:U.premounting),mediaRef:Y,mediaType:"audio",onAutoPlayError:null}),tz({logLevel:s,mediaRef:Y,source:J,volume:H,shouldUseWebAudioApi:null!=N&&N}),(null!==(l=o.useInsertionEffect)&&void 0!==l?l:o.useLayoutEffect)(()=>()=>{requestAnimationFrame(()=>{G()})},[G]),(0,o.useImperativeHandle)(t,()=>Y.current,[Y]);let Q=(0,o.useRef)(v);return(Q.current=v,(0,o.useEffect)(()=>{let{current:e}=Y;if(!e)return;if(e.duration){var t;null===(t=Q.current)||void 0===t||t.call(Q,e.src,e.duration);return}let r=()=>{var t;null===(t=Q.current)||void 0===t||t.call(Q,e.src,e.duration)};return e.addEventListener("loadedmetadata",r),()=>{e.removeEventListener("loadedmetadata",r)}},[Y,p]),u)?null:(0,i.jsx)("audio",{ref:Y,preload:"metadata",crossOrigin:W,...z})}),ry=(0,o.forwardRef)((e,t)=>{let r=(0,o.useRef)(null),{volume:n,playbackRate:a,allowAmplificationDuringRender:l,onDuration:u,toneFrequency:s,_remotionInternalNeedsDurationCalculation:d,_remotionInternalNativeLoopPassed:c,acceptableTimeShiftInSeconds:m,name:f,onNativeError:p,delayRenderRetries:v,delayRenderTimeoutInMilliseconds:h,loopVolumeCurveBehavior:y,pauseWhenBuffering:g,audioStreamIndex:w,...b}=e,E=ez(),x=tJ(null!=y?y:"repeat"),C=eQ(),R=(0,o.useContext)(ek),{registerRenderAsset:T,unregisterRenderAsset:F}=(0,o.useContext)(te),{delayRender:S,continueRender:V}=ey(),P=(0,o.useMemo)(()=>{var t;return"audio-".concat(eI(null!==(t=e.src)&&void 0!==t?t:""),"-").concat(null==R?void 0:R.relativeFrom,"-").concat(null==R?void 0:R.cumulatedFrom,"-").concat(null==R?void 0:R.durationInFrames)},[e.src,null==R?void 0:R.relativeFrom,null==R?void 0:R.cumulatedFrom,null==R?void 0:R.durationInFrames]),N=tZ({volume:n,frame:x,mediaVolume:1});rv(N),(0,o.useImperativeHandle)(t,()=>r.current,[]),(0,o.useEffect)(()=>{var t,r;if(!e.src)throw Error("No src passed");if(window.remotion_audioEnabled&&!e.muted&&!(N<=0))return T({type:"audio",src:tt(e.src),id:P,frame:E,volume:N,mediaFrame:C,playbackRate:null!==(t=e.playbackRate)&&void 0!==t?t:1,toneFrequency:null!=s?s:1,audioStartFrame:Math.max(0,-(null!==(r=null==R?void 0:R.relativeFrom)&&void 0!==r?r:0)),audioStreamIndex:null!=w?w:0}),()=>F(P)},[e.muted,e.src,T,E,P,F,N,x,C,a,e.playbackRate,s,null==R?void 0:R.relativeFrom,w]);let{src:k}=e,M=t||d;return((0,o.useLayoutEffect)(()=>{var e,t;if((null===(t=window.process)||void 0===t?void 0:null===(e=t.env)||void 0===e?void 0:e.NODE_ENV)==="test"||!M)return;let o=S("Loading <Html5Audio> duration with src="+k,{retries:null!=v?v:void 0,timeoutInMilliseconds:null!=h?h:void 0}),{current:n}=r,i=()=>{(null==n?void 0:n.duration)&&u(n.src,n.duration),V(o)};return(null==n?void 0:n.duration)?(u(n.src,n.duration),V(o)):null==n||n.addEventListener("loadedmetadata",i,{once:!0}),()=>{null==n||n.removeEventListener("loadedmetadata",i),V(o)}},[k,u,M,v,h,V,S]),M)?(0,i.jsx)("audio",{ref:r,...b,onError:p}):null}),rg=(0,o.forwardRef)((e,t)=>{var r,n,a;let l=(0,o.useContext)(tN),{startFrom:u,endAt:s,trimBefore:d,trimAfter:c,name:m,stack:f,pauseWhenBuffering:p,showInTimeline:v,onError:h,...y}=e,{loop:g,...w}=e,{fps:b}=eX(),E=G();if(E.isClientSideRendering)throw Error("<Html5Audio> is not supported in @remotion/web-renderer. Use <Audio> from @remotion/media instead. See https://remotion.dev/docs/client-side-rendering/limitations");let{durations:x,setDurations:C}=(0,o.useContext)(tw);if("string"!=typeof e.src)throw TypeError("The `<Html5Audio>` tag requires a string for `src`, but got ".concat(JSON.stringify(e.src)," instead."));let R=tm(e.src),T=(0,o.useCallback)(e=>{console.log(e.currentTarget.error);let t="Could not play audio with src ".concat(R,": ").concat(e.currentTarget.error,". See https://remotion.dev/docs/media-playback-error for help.");if(g){if(h){h(Error(t));return}ei(Error(t))}else null==h||h(Error(t)),console.warn(t)},[g,h,R]),F=(0,o.useCallback)((e,t)=>{C({type:"got-duration",durationInSeconds:t,src:e})},[C]),S=null!==(r=x[tt(R)])&&void 0!==r?r:x[tt(e.src)];th({startFrom:u,endAt:s,trimBefore:d,trimAfter:c});let{trimBeforeValue:V,trimAfterValue:P}=ty({startFrom:u,endAt:s,trimBefore:d,trimAfter:c});return g&&void 0!==S?Number.isFinite(S)?(0,i.jsx)(tn,{layout:"none",durationInFrames:tr({trimAfter:P,mediaDurationInFrames:S*b,playbackRate:null!==(n=e.playbackRate)&&void 0!==n?n:1,trimBefore:V}),children:(0,i.jsx)(rg,{...w,ref:t,_remotionInternalNativeLoopPassed:!0})}):(0,i.jsx)(rg,{...w,ref:t,_remotionInternalNativeLoopPassed:!0}):void 0!==V||void 0!==P?(0,i.jsx)(e6,{layout:"none",from:0-(null!=V?V:0),showInTimeline:!1,durationInFrames:P,name:m,children:(0,i.jsx)(rg,{_remotionInternalNeedsDurationCalculation:!!g,pauseWhenBuffering:null!=p&&p,...y,ref:t})}):(tf({playbackRate:e.playbackRate,volume:e.volume},"Html5Audio"),E.isRendering)?(0,i.jsx)(ry,{onDuration:F,...e,ref:t,onNativeError:T,_remotionInternalNeedsDurationCalculation:!!g}):(0,i.jsx)(rh,{_remotionInternalNativeLoopPassed:null!==(a=e._remotionInternalNativeLoopPassed)&&void 0!==a&&a,_remotionInternalStack:null!=f?f:null,shouldPreMountAudioTags:null!==l&&l.numberOfAudioTags>0,...e,ref:t,onNativeError:T,onDuration:F,pauseWhenBuffering:null!=p&&p,_remotionInternalNeedsDurationCalculation:!!g,showInTimeline:null==v||v})});eP(rg);var rw=e=>{let{codeValue:t,runtimeValue:r,dragOverrideValue:o,defaultValue:n,shouldResortToDefaultValueIfUndef
1ined:i=!1}=e;return void 0!==o?o:t&&t.canUpdate?void 0===t.codeValue&&i?n:t.codeValue:r},rb=(e,t)=>{let r=G(),n=(0,o.useMemo)(()=>{if(!r.isStudio||r.isReadOnlyStudio)return{controls:void 0,values:null!=t?t:{}}},[r.isStudio,r.isReadOnlyStudio,t]);if(n)return n;let[i]=(0,o.useState)(()=>String(Math.random())),{visualModeEnabled:a,dragOverrides:l,codeValues:u}=(0,o.useContext)(e5),s=(0,o.useMemo)(()=>{if(a&&null!==e&&null!==t)return{schema:e,currentValue:t,overrideId:i}},[e,t,i,a]);return(0,o.useMemo)(()=>{var r,o,n;if(void 0===s||null===t||null===e||!a)return{controls:void 0,values:null!=t?t:{}};let d=null!==(r=l[i])&&void 0!==r?r:{},c=u[i],m=[...new Set(Object.keys(t))],f={};for(let r of m){let i=null!==(n=null==c?void 0:c[r])&&void 0!==n?n:null;f[r]=rw({codeValue:i,runtimeValue:t[r],dragOverrideValue:d[r],defaultValue:null===(o=e[r])||void 0===o?void 0:o.default,shouldResortToDefaultValueIfUndefined:!1})}return{controls:s,values:f}},[s,t,i,l,u,e,a])},rE=(e,t)=>{let r=t.split("."),o=e;for(let e of r){if(null==o||"object"!=typeof o)return;o=o[e]}return o},rx=(e,t,r)=>{let o={...e};for(let e of r){let r=t[e],n=e.split(".");if(1===n.length){o[e]=r;continue}let i=o;for(let e=0;e<n.length-1;e++){let t=n[e];"object"==typeof i[t]&&null!==i[t]?i[t]={...i[t]}:i[t]={},i=i[t]}i[n[n.length-1]]=r}return o},rC=(e,t)=>{let r=Object.keys(t),n=(0,o.forwardRef)((n,i)=>{let l=G();if(!l.isStudio||l.isReadOnlyStudio||l.isRendering||!a.env.EXPERIMENTAL_VISUAL_MODE_ENABLED)return o.createElement(e,{...n,controls:null,ref:i});let{controls:u,values:s}=rb(t,(0,o.useMemo)(()=>{let e={};for(let t of r)e[t]=rE(n,t);return e},r.map(e=>rE(n,e)))),d=rx(n,s,r);return o.createElement(e,{...d,controls:u,ref:i})});return n.displayName="wrapInSchema(".concat(e.displayName||e.name||"Component",")"),n},rR=rC(e=>{var t,r;let{onError:n,maxRetries:a=2,src:l,pauseWhenLoading:u,delayRenderRetries:s,delayRenderTimeoutInMilliseconds:d,onImageFrame:c,crossOrigin:m,showInTimeline:f,name:p,stack:v,ref:h,controls:y,...g}=e,w=(0,o.useRef)(null),b=(0,o.useRef)({}),{delayPlayback:E}=t6(),x=(0,o.useContext)(ek),[C]=(0,o.useState)(()=>String(Math.random()));if(!l)throw Error('No "src" prop was passed to <Img>.');(0,o.useImperativeHandle)(h,()=>w.current,[]),t0({src:l,displayName:null!=p?p:null,id:C,stack:null!=v?v:null,showInTimeline:null==f||f,premountDisplay:null!==(t=null==x?void 0:x.premountDisplay)&&void 0!==t?t:null,postmountDisplay:null!==(r=null==x?void 0:x.postmountDisplay)&&void 0!==r?r:null,loopDisplay:void 0,controls:null!=y?y:null});let R=tm(l),T=(0,o.useCallback)(e=>{if(!w.current)return;let t=w.current.src;setTimeout(()=>{var e;if(!w.current)return;let r=null===(e=w.current)||void 0===e?void 0:e.src;r===t&&(w.current.removeAttribute("src"),w.current.setAttribute("src",r))},e)},[]),{delayRender:F,continueRender:S,cancelRender:V}=ey(),P=(0,o.useCallback)(e=>{var t,r,o,i,l,u,s,d,c,m,f;if(b.current){if(b.current[null===(t=w.current)||void 0===t?void 0:t.src]=(null!==(l=b.current[null===(r=w.current)||void 0===r?void 0:r.src])&&void 0!==l?l:0)+1,n&&(null!==(u=b.current[null===(o=w.current)||void 0===o?void 0:o.src])&&void 0!==u?u:0)>a){n(e);return}if((null!==(s=b.current[null===(i=w.current)||void 0===i?void 0:i.src])&&void 0!==s?s:0)<=a){let e=1e3*2**((null!==(m=b.current[null===(d=w.current)||void 0===d?void 0:d.src])&&void 0!==m?m:0)-1);console.warn("Could not load image with source ".concat(null===(c=w.current)||void 0===c?void 0:c.src,", retrying again in ").concat(e,"ms")),T(e);return}try{V("Error loading image with src: "+(null===(f=w.current)||void 0===f?void 0:f.src))}catch(e){}}},[V,a,n,T]);if("undefined"!=typeof window){let e=!!(null==x?void 0:x.premounting),t=!!(null==x?void 0:x.postmounting);(0,o.useLayoutEffect)(()=>{var r,o;if((null===(o=window.process)||void 0===o?void 0:null===(r=o.env)||void 0===r?void 0:r.NODE_ENV)==="test"){w.current&&(w.current.src=R);return}let{current:n}=w;if(!n)return;let i=F("Loading <Img> with src="+R,{retries:null!=s?s:void 0,timeoutInMilliseconds:null!=d?d:void 0}),a=!u||e||t?()=>{}:E().unblock,l=!1,m=()=>{var e,t,r,o;if(l){S(i);return}(null!==(t=b.current[null===(e=w.current)||void 0===e?void 0:e.src])&&void 0!==t?t:0)>0&&(delete b.current[null===(r=w.current)||void 0===r?void 0:r.src],console.info("Retry successful - ".concat(null===(o=w.current)||void 0===o?void 0:o.src," is now loaded"))),n&&(null==c||c(n)),a(),S(i)};if(!w.current){m();return}return n.src=R,n.decode().then(m).catch(e=>
1{console.warn(e),n.complete&&n.naturalWidth>0&&n.naturalHeight>0?m():n.addEventListener("load",m)}),()=>{l=!0,n.removeEventListener("load",m),a(),S(i)}},[R,E,s,d,u,e,t,c,S,F])}let{isClientSideRendering:N}=G(),k=tE({crossOrigin:m,requestsVideoFrame:!1,isClientSideRendering:N});return(0,i.jsx)("img",{...g,ref:w,crossOrigin:k,onError:P,decoding:"sync"})},{"style.translate":{type:"translate",step:1,default:"0px 0px",description:"Position"},"style.scale":{type:"number",min:.05,max:100,step:.01,default:1,description:"Scale"},"style.rotate":{type:"rotation",step:1,default:"0deg",description:"Rotation"},"style.opacity":{type:"number",min:0,max:1,step:.01,default:1,description:"Opacity"}});eP(rR);var rT=o.createRef(),rF={};u(rF,{makeDefaultPreviewCSS:()=>rN,injectCSS:()=>rV,OBJECTFIT_CONTAIN_CLASS_NAME:()=>rP});var rS={},rV=e=>{if("undefined"==typeof document||rS[e])return()=>{};let t=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");return r.appendChild(document.createTextNode(e)),t.prepend(r),rS[e]=r,()=>{let t=rS[e];t&&(t.parentNode&&t.parentNode.removeChild(t),delete rS[e])}},rP="__remotion_objectfitcontain",rN=(e,t)=>e?"\n ".concat(e," * {\n box-sizing: border-box;\n }\n ").concat(e," *:-webkit-full-screen {\n width: 100%;\n height: 100%;\n }\n ").concat(e," .").concat(rP," {\n object-fit: contain;\n }\n "):"\n * {\n box-sizing: border-box;\n }\n body {\n margin: 0;\n background-color: ".concat(t,";\n }\n .").concat(rP," {\n object-fit: contain;\n }\n "),rk="__remotion-studio-container",rM=o.createContext(null),rA=[],rI=(0,o.createContext)(null),rj=e=>{let{children:t,videoEnabled:r,audioEnabled:n}=e,a=(0,o.useMemo)(()=>({videoEnabled:r,audioEnabled:n}),[r,n]);return(0,i.jsx)(rI.Provider,{value:a,children:t})},r_=["h264","h265","vp8","vp9","av1","mp3","aac","wav","prores","h264-mkv","h264-ts","gif"],rL=e=>{var t,r,o,n,i,a,l,u;let{calculated:s,compositionId:d,compositionFps:c,compositionHeight:m,compositionWidth:f,compositionDurationInFrames:p}=e,v='calculated by calculateMetadata() for the composition "'.concat(d,'"'),h='of the "<Composition />" component with the id "'.concat(d,'"'),y=null!==(r=null!==(t=null==s?void 0:s.width)&&void 0!==t?t:f)&&void 0!==r?r:void 0;Q(y,"width",(null==s?void 0:s.width)?v:h);let g=null!==(n=null!==(o=null==s?void 0:s.height)&&void 0!==o?o:m)&&void 0!==n?n:void 0;Q(g,"height",(null==s?void 0:s.height)?v:h);let w=null!==(a=null!==(i=null==s?void 0:s.fps)&&void 0!==i?i:c)&&void 0!==a?a:null;X(w,(null==s?void 0:s.fps)?v:h,!1);let b=null!==(u=null!==(l=null==s?void 0:s.durationInFrames)&&void 0!==l?l:p)&&void 0!==u?u:null;Z(b,{allowFloats:!1,component:'of the "<Composition />" component with the id "'.concat(d,'"')});let E=null==s?void 0:s.defaultCodec;!function(e,t,r){if(void 0!==e){if("string"!=typeof e)throw TypeError('The "'.concat(r,'" prop ').concat(t," must be a string, but you passed a value of type ").concat(typeof e,"."));if(!r_.includes(e))throw Error('The "'.concat(r,'" prop ').concat(t," must be one of ").concat(r_.join(", "),", but you passed ").concat(e,"."))}}(E,v,"defaultCodec");let x=null==s?void 0:s.defaultOutName;return{width:y,height:g,fps:w,durationInFrames:b,defaultCodec:E,defaultOutName:x,defaultVideoImageFormat:null==s?void 0:s.defaultVideoImageFormat,defaultPixelFormat:null==s?void 0:s.defaultPixelFormat,defaultProResProfile:null==s?void 0:s.defaultProResProfile}},rD=e=>{var t,r,o,n,i,a;let{calculateMetadata:l,signal:u,defaultProps:s,inputProps:d,compositionId:c,compositionDurationInFrames:m,compositionFps:f,compositionHeight:p,compositionWidth:v}=e,h=l?l({defaultProps:s,props:d,abortSignal:u,compositionId:c,isRendering:x().isRendering}):null;if(null!==h&&"object"==typeof h&&"then"in h)return h.then(e=>{var t;let{height:r,width:o,durationInFrames:n,fps:i,defaultCodec:a,defaultOutName:l,defaultVideoImageFormat:u,defaultPixelFormat:h,defaultProResProfile:y}=rL({calculated:e,compositionDurationInFrames:m,compositionFps:f,compositionHeight:p,compositionWidth:v,compositionId:c});return{width:o,height:r,fps:i,durationInFrames:n,id:c,defaultProps:V(s),props:V(null!==(t=e.props)&&void 0!==t?t:d),defaultCodec:null!=a?a:null,defaultOutName:null!=l?l:null,defaultVideoImageFormat:null!=u?u:null,defaultPixelFormat:null!=h?h:null,defaultProResProfile:null!=y?y:null}});let y=rL({calculated:h,compositionDurationInFrames:m,compositionFps:f,compositionHeight:p,compositionWidth:v,compositionId:c});return null===h?{...y,id:c,defaultProps:V(null!=s?s:{}),props:V(d),defaultCodec:null,defaultOutName:null,defaultVideoImageFormat:null,defaultPixelFormat:null,defaultProResProfile:null}:{...y,id:c,defaultProps:V(null!=s?s:{}),props:V(null!==(t=h.props)&&void 0!==t?t:d),defaultCodec:null!==(r=h.defaultCodec)&&void 0!==r?r:null,defaultOutName:null!==(o=h.defaultOutName)&&void 0!==o?o:null,defaultVideoImageFormat:null!==(n=h.defaultVideoImageFormat)&&void 0!==n?n:null,defaultPixelFormat:null!==(i=h.defaultPixelFormat)&&void 0!==i?i:null,defaultProResProfile:null!==(a=h.defaultProResProfile)&&void 0!==a?a:null}},rO=o.createContext(()=>{}),rU=()=>
1{if(x().isRendering){let e=window.remotion_envVariables;return e?{...JSON.parse(e),NODE_ENV:"production"}:{}}return{NODE_ENV:"production"}},rq=o.createContext(null),rB=(0,o.createContext)({setSize:()=>{},size:{size:"auto",translation:{x:0,y:0}}}),rH=e=>{let{src:t,transparent:r,currentTime:o,toneMapped:n}=e;return"http://localhost:".concat(window.remotion_proxyPort,"/proxy?src=").concat(encodeURIComponent(tt(t)),"&time=").concat(encodeURIComponent(Math.max(0,o)),"&transparent=").concat(String(r),"&toneMapped=").concat(String(n))},rW=e=>{let{onError:t,volume:r,playbackRate:n,src:a,muted:l,allowAmplificationDuringRender:u,transparent:s,toneMapped:d,toneFrequency:c,name:m,loopVolumeCurveBehavior:f,delayRenderRetries:p,delayRenderTimeoutInMilliseconds:v,onVideoFrame:h,crossOrigin:y,audioStreamIndex:w,...b}=e,E=ez(),x=eQ(),C=tJ(f),R=eZ(),T=(0,o.useContext)(ek),F=tY(),{registerRenderAsset:S,unregisterRenderAsset:V}=(0,o.useContext)(te);if(!a)throw TypeError("No `src` was passed to <OffthreadVideo>.");let P=(0,o.useMemo)(()=>"offthreadvideo-".concat(eI(a),"-").concat(null==T?void 0:T.cumulatedFrom,"-").concat(null==T?void 0:T.relativeFrom,"-").concat(null==T?void 0:T.durationInFrames),[a,null==T?void 0:T.cumulatedFrom,null==T?void 0:T.relativeFrom,null==T?void 0:T.durationInFrames]);if(!R)throw Error("No video config found");let N=tZ({volume:r,frame:C,mediaVolume:1});rv(N),(0,o.useEffect)(()=>{var e;if(!a)throw Error("No src passed");if(window.remotion_audioEnabled&&!l&&!(N<=0))return S({type:"video",src:tt(a),id:P,frame:E,volume:N,mediaFrame:x,playbackRate:n,toneFrequency:c,audioStartFrame:Math.max(0,-(null!==(e=null==T?void 0:T.relativeFrom)&&void 0!==e?e:0)),audioStreamIndex:w}),()=>V(P)},[l,a,S,P,V,N,x,E,n,c,null==T?void 0:T.relativeFrom,w]);let k=(0,o.useMemo)(()=>ri({frame:x,playbackRate:n||1,startFrom:-F})/R.fps,[x,F,n,R.fps]),M=(0,o.useMemo)(()=>rH({src:a,currentTime:k,transparent:s,toneMapped:d}),[d,k,a,s]),[A,I]=(0,o.useState)(null),{delayRender:j,continueRender:_}=ey();(0,o.useLayoutEffect)(()=>{if(!window.remotion_videoEnabled)return;let e=[];I(null);let r=new AbortController,o=j("Fetching ".concat(M," from server"),{retries:null!=p?p:void 0,timeoutInMilliseconds:null!=v?v:void 0});return(async()=>{try{let t=await fetch(M,{signal:r.signal,cache:"no-store"});if(200!==t.status){if(500===t.status){let e=await t.json();if(e.error){let t=e.error.replace(/^Error: /,"");throw Error(t)}}throw Error("Server returned status ".concat(t.status," while fetching ").concat(M))}let n=await t.blob(),i=URL.createObjectURL(n);e.push(()=>URL.revokeObjectURL(i)),I({src:i,handle:o})}catch(e){if(e.message.includes("aborted")||r.signal.aborted){_(o);return}e.message.includes("Failed to fetch")&&(e=Error("Failed to fetch ".concat(M,". This could be caused by Chrome rejecting the request because the disk space is low. Consider increasing the disk size of your environment."),{cause:e})),t?t(e):ei(e)}})(),e.push(()=>{r.signal.aborted||r.abort()}),()=>{e.forEach(e=>e())}},[M,p,v,t,_,j]);let L=(0,o.useCallback)(()=>{t?null==t||t(Error("Failed to load image with src "+A)):ei("Failed to load image with src "+A)},[A,t]),D=(0,o.useMemo)(()=>[rP,b.className].filter(g).join(" "),[b.className]),O=(0,o.useCallback)(e=>{h&&h(e)},[h]);return A&&window.remotion_videoEnabled?(_(A.handle),(0,i.jsx)(rR,{src:A.src,delayRenderRetries:p,delayRenderTimeoutInMilliseconds:v,onImageFrame:O,...b,onError:L,className:D})):null},rz=e=>{let{ref:t,onVideoFrame:r}=e;(0,o.useEffect)(()=>{let{current:e}=t;if(!e||!r)return;let o=0,n=()=>{t.current&&(r(t.current),o=t.current.requestVideoFrameCallback(n))};return n(),()=>{e.cancelVideoFrameCallback(o)}},[r,t])};class rY extends Error{constructor({message:e,src:t}){super(e),this.name="MediaPlaybackError",this.src=t}}var rJ=(0,o.forwardRef)((e,t)=>{var r,n,a,l,u,s;let d=(0,o.useContext)(tN);if(!d)throw Error("SharedAudioContext not found");let c=(0,o.useRef)(null),m=(0,o.useMemo)(()=>d.audioContext?tC({audioContext:d.audioContext,ref:c}):null,[d.audioContext]);(null!==(r=o.useInsertionEffect)&&void 0!==r?r:o.useLayoutEffect)(()=>()=>{requestAnimationFrame(()=>{null==m||m.cleanup()})},[m]);let{volume:f,muted:p,playbackRate:v,onlyWarnForMediaSeekingError:h,src:y,onDuration:g,acceptableTimeShift:w,acceptableTimeShiftInSeconds:b,toneFrequency:E,name:x,_remotionInternalNativeLoopPassed:C,_remotionInternalStack:R,style:T,pauseWhenBuffering:F,showInTimeline:S,loopVolumeCurveBehavior:V,onError:P,onAutoPlayError:N,onVideoFrame:k,crossOrigin:M,delayRenderRetries:A,delayRenderTimeoutInMilliseconds:I,allowAmplificationDuringRender:j,useWebAudioApi:_,audioStreamIndex:L,...D}=e,O=tJ(null!=V?V:"repeat"),{fps:U,durationInFrames:q}=eX(),B=(0,o.useContext)(ek),{hidden:H}=(0,o.useContext)(e1),W=ep(),z=ev(),[Y]=(0,o.useState)(()=>String(Math.random())),J=null!==(n=H[Y])&&void 0!==n&&n;if(void 0!==w)throw Error("acceptableTimeShift has been removed. Use acceptableTimeShiftInSeconds instead.");let[G]=rf(),[Q]=rp(),Z=tZ({frame:O,volume:f,mediaVolume:G});rv(Z),t1({volume:f,mediaVolume:G,mediaType:"video",src:y,playbackRate:null!==(a=e.playbackRate)&&void 0!==a?a:1,displayName:null!=x?x:null,id:Y,stack:R,showInTimeline:S,premountDisplay:null!==(l=null==B?void 0:B.premou
1ntDisplay)&&void 0!==l?l:null,postmountDisplay:null!==(u=null==B?void 0:B.postmountDisplay)&&void 0!==u?u:null,loopDisplay:void 0}),rs({mediaRef:c,src:y,mediaType:"video",playbackRate:null!==(s=e.playbackRate)&&void 0!==s?s:1,onlyWarnForMediaSeekingError:h,acceptableTimeshift:null!=b?b:null,isPremounting:!!(null==B?void 0:B.premounting),isPostmounting:!!(null==B?void 0:B.postmounting),pauseWhenBuffering:F,onAutoPlayError:null!=N?N:null}),rd({id:Y,isPostmounting:!!(null==B?void 0:B.postmounting),isPremounting:!!(null==B?void 0:B.premounting),mediaRef:c,mediaType:"video",onAutoPlayError:null!=N?N:null}),tz({logLevel:W,mediaRef:c,volume:Z,source:m,shouldUseWebAudioApi:null!=_&&_});let X=B?B.relativeFrom:0,$=B?Math.min(B.durationInFrames,q):q,K=tB({actualSrc:tm(y),actualFrom:X,duration:$,fps:U});(0,o.useImperativeHandle)(t,()=>c.current,[]),(0,o.useState)(()=>ti({logLevel:W,message:"Mounting video with source = ".concat(K,", v=").concat(eN,", user agent=").concat("undefined"==typeof navigator?"server":navigator.userAgent),tag:"video",mountTime:z})),(0,o.useEffect)(()=>{let{current:e}=c;if(!e)return;let t=()=>{if(e.error){var t;if(console.error("Error occurred in video",null==e?void 0:e.error),P){P(new rY({message:"Code ".concat(e.error.code,": ").concat(e.error.message),src:y}));return}throw new rY({message:"The browser threw an error while playing the video ".concat(y,": Code ").concat(e.error.code," - ").concat(null==e?void 0:null===(t=e.error)||void 0===t?void 0:t.message,". See https://remotion.dev/docs/media-playback-error for help. Pass an onError() prop to handle the error."),src:y})}if(P){P(new rY({message:"The browser threw an error while playing the video ".concat(y),src:y}));return}throw new rY({message:"The browser threw an error while playing the video",src:y})};return e.addEventListener("error",t,{once:!0}),()=>{e.removeEventListener("error",t)}},[P,y]);let ee=(0,o.useRef)(g);ee.current=g,rz({ref:c,onVideoFrame:k}),(0,o.useEffect)(()=>{let{current:e}=c;if(!e)return;if(e.duration){var t;null===(t=ee.current)||void 0===t||t.call(ee,y,e.duration);return}let r=()=>{var t;null===(t=ee.current)||void 0===t||t.call(ee,y,e.duration)};return e.addEventListener("loadedmetadata",r),()=>{e.removeEventListener("loadedmetadata",r)}},[y]),(0,o.useEffect)(()=>{let{current:e}=c;e&&(t_()?e.preload="metadata":e.preload="auto")},[]);let et=(0,o.useMemo)(()=>{var e;return{...T,opacity:J?0:null!==(e=null==T?void 0:T.opacity)&&void 0!==e?e:1}},[J,T]),er=tE({crossOrigin:M,requestsVideoFrame:!!k,isClientSideRendering:!1});return(0,i.jsx)("video",{ref:c,muted:p||Q||J||Z<=0,playsInline:!0,src:K,loop:C,style:et,disableRemotePlayback:!0,crossOrigin:er,...D})}),rG=e=>{let{startFrom:t,endAt:r,trimBefore:n,trimAfter:a,name:l,pauseWhenBuffering:u,stack:s,showInTimeline:d,...c}=e,m=G();if(m.isClientSideRendering)throw Error("<OffthreadVideo> is not supported in @remotion/web-renderer. Use <Video> from @remotion/media instead. See https://remotion.dev/docs/client-side-rendering/limitations");let f=(0,o.useCallback)(()=>{},[]);if("string"!=typeof e.src)throw TypeError("The `<OffthreadVideo>` tag requires a string for `src`, but got ".concat(JSON.stringify(e.src)," instead."));th({startFrom:t,endAt:r,trimBefore:n,trimAfter:a});let{trimBeforeValue:p,trimAfterValue:v}=ty({startFrom:t,endAt:r,trimBefore:n,trimAfter:a});if(void 0!==p||void 0!==v)return(0,i.jsx)(e6,{layout:"none",from:0-(null!=p?p:0),showInTimeline:!1,durationInFrames:v,name:l,children:(0,i.jsx)(rG,{pauseWhenBuffering:null!=u&&u,...c,trimAfter:void 0,name:void 0,showInTimeline:d,trimBefore:void 0,stack:void 0,startFrom:void 0,endAt:void 0})});if(tf(e,"Video"),m.isRendering)return(0,i.jsx)(rW,{pauseWhenBuffering:null!=u&&u,...c,trimAfter:void 0,name:void 0,showInTimeline:d,trimBefore:void 0,stack:void 0,startFrom:void 0,endAt:void 0});let{transparent:h,toneMapped:y,onAutoPlayError:g,onVideoFrame:w,crossOrigin:b,delayRenderRetries:E,delayRenderTimeoutInMilliseconds:x,...C}=c;return(0,i.jsx)(rJ,{_remotionInternalStack:null!=s?s:null,onDuration:f,onlyWarnForMediaSeekingError:!0,pauseWhenBuffering:null!=u&&u,showInTimeline:null==d||d,onAutoPlayError:null!=g?g:void 0,onVideoFrame:null!=w?w:null,crossOrigin:b,...C,_remotionInternalNativeLoopPassed:!1}
1)};eP(e=>{let{src:t,acceptableTimeShiftInSeconds:r,allowAmplificationDuringRender:o,audioStreamIndex:n,className:a,crossOrigin:l,delayRenderRetries:u,delayRenderTimeoutInMilliseconds:s,id:d,loopVolumeCurveBehavior:c,muted:m,name:f,onAutoPlayError:p,onError:v,onVideoFrame:h,pauseWhenBuffering:y,playbackRate:g,showInTimeline:w,style:b,toneFrequency:E,toneMapped:x,transparent:C,trimAfter:R,trimBefore:T,useWebAudioApi:F,volume:S,_remotionInternalNativeLoopPassed:V,endAt:P,stack:N,startFrom:k,imageFormat:M}=e;if(M)throw TypeError("The `<OffthreadVideo>` tag does no longer accept `imageFormat`. Use the `transparent` prop if you want to render a transparent video.");return(0,i.jsx)(rG,{acceptableTimeShiftInSeconds:r,allowAmplificationDuringRender:null==o||o,audioStreamIndex:null!=n?n:0,className:a,crossOrigin:l,delayRenderRetries:u,delayRenderTimeoutInMilliseconds:s,id:d,loopVolumeCurveBehavior:null!=c?c:"repeat",muted:null!=m&&m,name:f,onAutoPlayError:null!=p?p:null,onError:v,onVideoFrame:h,pauseWhenBuffering:null==y||y,playbackRate:null!=g?g:1,toneFrequency:null!=E?E:1,showInTimeline:null==w||w,src:t,stack:N,startFrom:k,_remotionInternalNativeLoopPassed:null!=V&&V,endAt:P,style:b,toneMapped:null==x||x,transparent:null!=C&&C,trimAfter:R,trimBefore:T,useWebAudioApi:null!=F&&F,volume:S})});var rQ={MaxMediaCacheSizeContext:rM,useUnsafeVideoConfig:eZ,useFrameForVolumeProp:tJ,useTimelinePosition:ez,useAbsoluteTimelinePosition:eY,evaluateVolume:tZ,getAbsoluteSrc:tt,Timeline:eM,validateMediaTrimProps:th,validateMediaProps:tf,resolveTrimProps:ty,VideoForPreview:rJ,CompositionManager:f,CompositionSetters:p,VisualModeOverridesContext:e5,SequenceManager:e0,SequenceStackTracesUpdateContext:rO,SequenceVisibilityToggleContext:e1,useSchema:rb,wrapInSchema:rC,useSequenceControlOverride:e=>{var t;let r=(0,o.useContext)(ek),{dragOverrides:n}=(0,o.useContext)(e5);if(r)return null===(t=n[r.id])||void 0===t?void 0:t[e]},RemotionRootContexts:e=>{let{children:t,numberOfAudioTags:r,logLevel:n,audioLatencyHint:a,videoEnabled:l,audioEnabled:u,frameState:s,visualModeEnabled:d}=e,c=(0,o.useMemo)(()=>{let e=0;return{getNonce:()=>e++}},[]),m=(0,o.useMemo)(()=>({logLevel:n,mountTime:Date.now()}),[n]);return(0,i.jsx)(ef.Provider,{value:m,children:(0,i.jsx)(v.Provider,{value:c,children:(0,i.jsx)(eD,{frameState:s,children:(0,i.jsx)(rj,{videoEnabled:l,audioEnabled:u,children:(0,i.jsx)(Y,{children:(0,i.jsx)(ts,{children:(0,i.jsx)(e4,{visualModeEnabled:d,children:(0,i.jsx)(tk,{numberOfAudioTags:r,audioLatencyHint:a,audioEnabled:u,children:(0,i.jsx)(tb,{children:(0,i.jsx)(t2,{children:t})})})})})})})})})})},CompositionManagerProvider:e=>{let{children:t,onlyRenderComposition:r,currentCompositionMetadata:n,initialCompositions:a,initialCanvasContent:l}=e,[u,s]=(0,o.useState)([]),[d,c]=(0,o.useState)(l),[m,v]=(0,o.useState)(a),h=(0,o.useRef)(m),y=(0,o.useCallback)(e=>{v(t=>{let r=e(t);return h.current=r,r})},[]),g=(0,o.useCallback)(e=>{y(t=>{if(t.find(t=>t.id===e.id))throw Error("Multiple composition with id ".concat(e.id," are registered."));return[...t,e]})},[y]),w=(0,o.useCallback)(e=>{v(t=>t.filter(t=>t.id!==e))},[]),b=(0,o.useCallback)((e,t,r)=>{s(o=>[...o,{name:e,parent:t,nonce:r}])},[]),E=(0,o.useCallback)((e,t)=>{s(r=>r.filter(r=>!(r.name===e&&r.parent===t)))},[]);(0,o.useImperativeHandle)(rT,()=>({getCompositions:()=>h.current}),[]);let x=(0,o.useMemo)(()=>({registerComposition:g,unregisterComposition:w,registerFolder:b,unregisterFolder:E,setCanvasContent:c,onlyRenderComposition:r}),[g,b,w,E,r]),C=(0,o.useMemo)(()=>({compositions:m,folders:u,currentCompositionMetadata:n,canvasContent:d}),[m,u,n,d]);return(0,i.jsx)(f.Provider,{value:C,children:(0,i.jsx)(p.Provider,{value:x,children:t})})},useVideo:ew,getRoot:()=>null,useMediaVolumeState:rf,useMediaMutedState:rp,useMediaInTimeline:t1,useLazyComponent:eg,truthy:g,SequenceContext:ek,PremountContext:eK,useRemotionContexts:function(){let e=o.useContext(f),t=o.useContext(e_),r=o.useContext(ej),n=o.useContext(ek),i=o.useContext(v),a=o.useContext(s),l=o.useContext(ta),u=o.useContext($),d=o.useContext(te),c=o.useContext(e0),m=o.useContext(t4),p=o.useContext(ef);return(0,o.useMemo)(()=>({compositionManagerCtx:e,timelineContext:t,setTimelineContext:r,sequenceContext:n,nonceContext:i,canUseRemotionHooksContext:a,preloadContext:l,resolve
1CompositionContext:u,renderAssetManagerContext:d,sequenceManagerContext:c,bufferManagerContext:m,logLevelContext:p}),[e,i,n,r,t,a,l,u,d,c,m,p])},RemotionContextProvider:e=>{let{children:t,contexts:r}=e;return(0,i.jsx)(ef.Provider,{value:r.logLevelContext,children:(0,i.jsx)(s.Provider,{value:r.canUseRemotionHooksContext,children:(0,i.jsx)(v.Provider,{value:r.nonceContext,children:(0,i.jsx)(ta.Provider,{value:r.preloadContext,children:(0,i.jsx)(f.Provider,{value:r.compositionManagerCtx,children:(0,i.jsx)(e0.Provider,{value:r.sequenceManagerContext,children:(0,i.jsx)(te.Provider,{value:r.renderAssetManagerContext,children:(0,i.jsx)($.Provider,{value:r.resolveCompositionContext,children:(0,i.jsx)(e_.Provider,{value:r.timelineContext,children:(0,i.jsx)(ej.Provider,{value:r.setTimelineContext,children:(0,i.jsx)(ek.Provider,{value:r.sequenceContext,children:(0,i.jsx)(t4.Provider,{value:r.bufferManagerContext,children:t})})})})})})})})})})})})},CSSUtils:rF,setupEnvVariables:()=>{let e=rU();window.process||(window.process={}),window.process.env||(window.process.env={}),Object.keys(e).forEach(t=>{window.process.env[t]=e[t]})},MediaVolumeContext:rc,SetMediaVolumeContext:rm,getRemotionEnvironment:x,SharedAudioContext:tN,SharedAudioContextProvider:tk,invalidCompositionErrorMessage:eC,calculateMediaDuration:tr,isCompositionIdValid:eE,getPreviewDomElement:()=>document.getElementById(rk),compositionsRef:rT,portalNode:D,waitForRoot:e=>(rA.push(e),()=>{rA=rA.filter(t=>t!==e)}),SetTimelineContext:ej,CanUseRemotionHooksProvider:d,CanUseRemotionHooks:s,PrefetchProvider:ts,DurationsContextProvider:tb,IsPlayerContextProvider:e=>{let{children:t}=e;return(0,i.jsx)(P.Provider,{value:!0,children:t})},useIsPlayer:N,EditorPropsProvider:Y,EditorPropsContext:W,usePreload:tm,NonceContext:v,resolveVideoConfig:rD,resolveVideoConfigOrCatch:e=>{try{let t=rD(e);return{type:"success",result:t}}catch(e){return{type:"error",error:e}}},ResolveCompositionContext:$,useResolvedVideoConfig:et,resolveCompositionsRef:K,REMOTION_STUDIO_CONTAINER_ELEMENT:rk,RenderAssetManager:te,persistCurrentFrame:eU,useTimelineContext:eW,useTimelineSetFrame:eJ,isIosSafari:t_,WATCH_REMOTION_STATIC_FILES:"remotion_staticFilesChanged",addSequenceStackTraces:eP,useMediaStartsAt:tY,BufferingProvider:t2,BufferingContextReact:t4,getComponentsToAddStacksTo:()=>eV,CurrentScaleContext:rq,PreviewSizeContext:rB,calculateScale:e=>{let{canvasSize:t,compositionHeight:r,compositionWidth:o,previewSize:n}=e,i=Math.min(t.height/r,t.width/o);return"auto"===n?0===i?1:i:Number(n)},validateRenderAsset:e7,Log:ed,LogLevelContext:ef,useLogLevel:ep,playbackLogging:ti,timeValueRef:z,compositionSelectorRef:(0,o.createRef)(),RemotionEnvironmentContext:J,warnAboutTooHighVolume:rv,AudioForPreview:rh,OBJECTFIT_CONTAIN_CLASS_NAME:rP,InnerOffthreadVideo:rG,useBasicMediaInTimeline:tK,getInputPropsOverride:U,setInputPropsOverride:e=>{if("undefined"!=typeof localStorage){if(null===e){localStorage.removeItem(O());return}localStorage.setItem(O(),JSON.stringify(e))}},useVideoEnabled:()=>{let e=(0,o.useContext)(rI);return e&&null!==e.videoEnabled?e.videoEnabled:window.remotion_videoEnabled},useAudioEnabled:()=>{let e=(0,o.useContext)(rI);return e&&null!==e.audioEnabled?e.audioEnabled:window.remotion_audioEnabled},useIsPlayerBuffering:t9,TimelinePosition:eM,DelayRenderContextType:eh,TimelineContext:e_,AbsoluteTimeContext:eL,RenderAssetManagerProvider:e=>{let{children:t,collectAssets:r}=e,[n,a]=(0,o.useState)([]),l=(0,o.useRef)([]),u=(0,o.useCallback)(e=>{e7(e),l.current=[...l.current,e],a(l.current)},[]);r&&(0,o.useImperativeHandle)(r,()=>({collectAssets:()=>{let e=l.current;return l.current=[],a([]),e}}),[]);let s=(0,o.useCallback)(e=>{l.current=l.current.filter(t=>t.id!==e),a(l.current)},[]);(0,o.useLayoutEffect)(()=>{"undefined"!=typeof window&&(window.remotion_collectAssets=()=>{let e=l.current;return l.current=[],a([]),e})},[]);let d=(0,o.useMemo)(()=>({registerRenderAsset:u,unregisterRenderAsset:s,renderAssets:n}),[n,u,s]);return(0,i.jsx)(te.Provider,{value:d,children:t})},getEffectiveVisualModeValue:rw,CompositionRenderErrorContext:c},rZ=e=>{let{allowFloats:t,durationInFrames:r,frame:o}=e;if(void 0===o)throw TypeError('Argument missing for parameter "frame"');if("number"!=typeof o)throw TypeError('Argument passed for "frame" is not a number: '.concat(o));if(!Number.isFinite(o))throw RangeError("Frame ".concat(o," is not finite"));if(o%1!=0&&!t)throw RangeError("Argument for frame must be an integer, but got ".concat(o));if(o<0&&o<-r)throw RangeError("Cannot use frame ".concat(o,": Duration of composition is ").concat(r,", therefore the lowest frame that can be rendered is ").concat(-r));if(o>r-1)throw RangeError("Cannot use frame ".concat(o,": Duration of composition is ").concat(r,", therefore the highest frame that can be rendered is ").concat(r-1))},rX=e=>o.Children.toArray(e).reduce((e,t)=>
1t.type===o.Fragment?e.concat(rX(t.props.children)):(e.push(t),e),[]),r$=(0,o.createContext)(!1),rK=e=>{let{children:t}=e;return(0,i.jsx)(r$.Provider,{value:!0,children:t})},r0=e=>{let{children:t}=e;return(0,i.jsx)(r$.Provider,{value:!1,children:t})},r1=()=>{if(!o.useContext(r$))throw Error("This component must be inside a <Series /> component.")},r5=(0,o.forwardRef)((e,t)=>{let{children:r}=e;return r1(),(0,i.jsx)(r0,{children:r})}),r4=e=>{let t=(0,o.useMemo)(()=>{let t=0,r=rX(e.children);return o.Children.map(r,(e,o)=>{var n;if("string"==typeof e){if(""===e.trim())return null;throw TypeError('The <Series /> component only accepts a list of <Series.Sequence /> components as its children, but you passed a string "'.concat(e,'"'))}if(e.type!==r5)throw TypeError("The <Series /> component only accepts a list of <Series.Sequence /> components as its children, but got ".concat(e," instead"));let a="index = ".concat(o,", duration = ").concat(e.props.durationInFrames);if(!(null==e?void 0:e.props.children))throw TypeError("A <Series.Sequence /> component (".concat(a,") was detected to not have any children. Delete it to fix this error."));let l=e.props.durationInFrames,{durationInFrames:u,children:s,from:d,name:c,...m}=e.props;(o!==r.length-1||l!==1/0)&&Z(l,{component:"of a <Series.Sequence /> component",allowFloats:!0});let f=null!==(n=e.props.offset)&&void 0!==n?n:0;if(Number.isNaN(f))throw TypeError('The "offset" property of a <Series.Sequence /> must not be NaN, but got NaN ('.concat(a,")."));if(!Number.isFinite(f)||f%1!=0)throw TypeError('The "offset" property of a <Series.Sequence /> must be finite, but got '.concat(f," (").concat(a,")."));let p=t+f;return t+=l+f,(0,i.jsx)(e6,{name:c||"<Series.Sequence>",from:p,durationInFrames:l,...m,ref:e.ref,children:e})})},[e.children]);return(0,i.jsx)(rK,{children:(0,i.jsx)(e6,{layout:"none",name:"<Series>",...e,children:t})})};r4.Sequence=r5,eP(r4),eP(r5);var r2=e=>{if(void 0!==e){if("number"!=typeof e)throw TypeError('A "duration" of a spring must be a "number" but is "'.concat(typeof e,'"'));if(Number.isNaN(e))throw TypeError('A "duration" of a spring is NaN, which it must not be');if(!Number.isFinite(e))throw TypeError('A "duration" of a spring must be finite, but is '+e);if(e<=0)throw TypeError('A "duration" of a spring must be positive, but is '+e)}},r9={damping:10,mass:1,stiffness:100,overshootClamping:!1},r6={},r3={};function r8(e){let{frame:t,fps:r,config:o={}}=e,n=[t,r,o.damping,o.mass,o.overshootClamping,o.stiffness].join("-");if(r3[n])return r3[n];let i={lastTimestamp:0,current:0,toValue:1,velocity:0,prevPosition:0},a=Math.max(0,t),l=a%1;for(let e=0;e<=Math.floor(a);e++)e===Math.floor(a)&&(e+=l),i=function(e){let{animation:t,now:r,config:o}=e,{toValue:n,lastTimestamp:i,current:a,velocity:l}=t;if(o.damping<=0)throw Error("Spring damping must be greater than 0, otherwise the spring() animation will never end, causing an infinite loop.");let u=o.damping,s=o.mass,d=o.stiffness,c=[n,i,a,l,u,s,d,r].join("-");if(r6[c])return r6[c];let m=-l,f=n-a,p=u/(2*Math.sqrt(d*s)),v=Math.sqrt(d/s),h=v*Math.sqrt(1-p**2),y=Math.min(r-i,64)/1e3,g=Math.sin(h*y),w=Math.cos(h*y),b=Math.exp(-p*v*y),E=b*((m+p*v*f)/h*g+f*w),x=Math.exp(-v*y),C={toValue:n,prevPosition:a,lastTimestamp:r,current:p<1?n-E:n-x*(f+(m+v*f)*y),velocity:p<1?p*v*E-b*(w*(m+p*v*f)-h*f*g):x*(m*(y*v-1)+y*f*v*v)};return r6[c]=C,C}({animation:i,now:e/r*1e3,config:{...r9,...o}});return r3[n]=i,i}var r7=new Map;function oe(e){let{frame:t,fps:r,config:o={},from:n=0,to:i=1,durationInFrames:a,durationRestThreshold:l,delay:u=0,reverse:s=!1}=e;r2(a),rZ({frame:t,durationInFrames:1/0,allowFloats:!0}),X(r,"to spring()",!1);let d=s||void 0!==a,c=d?function(e){let{fps:t,config:r={},threshold:o=.005}=e;if("number"!=typeof o)throw TypeError("threshold must be a number, got ".concat(o," of type ").concat(typeof o));if(0===o)return 1/0;if(1===o)return 0;if(isNaN(o))throw TypeError("Threshold is NaN");if(!Number.isFinite(o))throw TypeError("Threshold is not finite");if(o<0)throw TypeError("Threshold is below 0");let n=[t,r.damping,r.mass,r.overshootClamping,r.stiffness,o].join("-");if(r7.has(n))return r7.get(n);X(t,"to the measureSpring() function",!1);let i=0,a=0,l=()=>r8({fps:t,frame:i,config:r}),u=l(),s=()=>Math.abs(u.current-u.toValue),d=s();for(;d>=o;)i++,u=l(),d=s();a=i;for(let e=0;e<20;e++)i++,u=l(),(d=s())>=o&&(e=0,a=i+1);return r7.set(n,a),a}({fps:r,config:o,threshold:l}):void 0,m=d?{get:()=>c}:{get:()=>{throw Error("did not calculate natural duration, this is an error with Remotion. Please report")}},f=(s?(null!=a?a:m.get())-t:t)+(s?u:-u),p=void 0===a?f:f/(a/m.get());if(a&&f>a)return i;let v=r8({fps:r,frame:p,config:o}),h=o.overshootClamping?i>=n?Math.min(v.current,i):Math.max(v.current,i):v.current;return 0===n&&1===i?h:rn(h,[0,1],[n,i])}var ot=e=>Math.round(1e5*e)/1e5,or=e=>{let t,{element:r,desiredTime:o,logLevel:n,mountTime:i}=e;if(tA(r.currentTime,o))return{wait:Promise.resolve(o),cancel:()=>{}};re({logLevel:n,mediaRef:r,time:o,why:"Seeking during rendering",mountTime:i});let a=null;return{wait:Promise.all([new Promise(e=>{t=r.requestVideoFrameCallback((t,r)=>{let o=r.expectedDisplayTime-t;if(o<=0){e(r.mediaTime);return}setTimeout(()=>{e(r.mediaTime)},o+150)})}),new Promise(e=>{let t=()=>{e()};r.addEventListener("seeked",t,{once:!0}),a=()=>{r.removeEventListener("seeked",t)}})]).then(e=>{let[t]=e;return t}),cancel:()=>{null==a||a(),r.cancelVideoFrameCallback(t)}}},oo=e=>{let{element:t,desiredTime:r,fps:o,logLevel:n,mountTime:i}=e,a=1/o/2,l=()=>{};return Number.isFinite(t.duration)&&t.currentTime>=t.duration&&r>=t.duration?{prom:Promise.resolve(),cancel:()=>{}}:{prom:new Promise((e,o)=>{let u=or({element:t,desiredTime:r+a,logLevel:n,mountTime:i});u.wait.then(u=>{if(Math.abs(r-u)<=a)return e();let s=or({element:t,desiredTime:u+a*(r>u?1:-1),logLevel:n,mountTime:i});l=s.cancel,s.wait.then(u=>{if(ot(Math.abs(r-u))<=ot(a))return e();let s=or({element:t,desiredTime:r+a,logLevel:n,mountTime:i});return l=s.cancel,s.wait.then(()=>{e()}).catch(e=>{o(e)})}).catch(e=>{o(e)})}),l=u.cancel}),cancel:()=>{l()}}},on=(0,o.forwardRef)((e,t)=>{let{onError:r,volume:n,allowAmplificationDuringRender:a,playbackRate:l,onDuration:u,toneFrequency:s,name:d,acceptableTimeShiftInSeconds:c,delayRenderRetries:m,delayRenderTimeoutInMilliseconds:f,loopVolumeCurveBehavior:p,audioStreamIndex:v,onVideoFrame:h,...y}=e,g=ez(),w=eQ(),b=tJ(null!=p?p:"repeat"),E=eZ(),x=(0,o.useRef)(null),C=(0,o.useContext)(ek),R=tY(),T=G(),F=ep(),S=ev(),{delayRender:V,continueRender:P}=ey(),{registerRenderAsset:N,unregisterRenderAsset:k}=(0,o.useContext)(te),M=(0,o.useMemo)(()=>{var e;return"video-".concat(eI(null!==(e=y.src)&&void 0!==e?e:""),"-").concat(null==C?void 0:C.cumulatedFrom,"-").concat(null==C?void 0:C.relativeFrom,"-").concat(null==C?void 0:C.durationInFrames)},[y.src,null==C?void 0:C.cumulatedFrom,null==C?void 0:C.relativeFrom,null==C?void 0:C.durationInFrames]);if(!E)throw Error("No video config found");let A=tZ({volume:n,frame:b,mediaVolume:1});rv(A),(0,o.useEffect)(()=>{var e;if(!y.src)throw Error("No src passed");if(!y.muted&&!(A<=0)&&window.remotion_audioEnabled)return N({type:"video",src:tt(y.src),id:M,frame:g,volume:A,mediaFrame:w,playbackRate:null!=l?l:1,toneFrequency:null!=s?s:1,audioStartFrame:Math.max(0,-(null!==(e=null==C?void 0:C.relativeFrom)&&void 0!==e?e:0)),audioStreamIndex:null!=v?v:0}),()=>k(M)},[y.muted,y.src,N,M,k,A,w,g,l,s,null==C?void 0:C.relativeFrom,v]),(0,o.useImperativeHandle)(t,()=>x.current,[]),(0,o.useEffect)(()=>{var e,t;if(!window.remotion_videoEnabled)return;let{current:o}=x;if(!o)return;let n=ra({frame:w,playbackRate:l||1,startFrom:-R,fps:E.fps}),i=V('Rendering <Html5Video /> with src="'.concat(y.src,'" at time ').concat(n),{retries:null!=m?m:void 0,timeoutInMilliseconds:null!=f?f:void 0});if((null===(t=window.process)||void 0===t?void 0:null===(e=t.env)||void 0===e?void 0:e.NODE_ENV)==="test"){P(i);return}if(tA(o.currentTime,n)){if(o.readyState>=2){P(i);return}let e=()=>{P(i)};return o.addEventListener("loadeddata",e,{once:!0}),()=>{o.removeEventListener("loadeddata",e)}}let a=()=>{P(i)},u=oo({element:o,desiredTime:n,fps:E.fps,logLevel:F,mountTime:S});u.prom.then(()=>{P(i)}),o.addEventListener("ended",a,{once:!0});let s=()=>
1{if(null==o?void 0:o.error){var e;if(console.error("Error occurred in video",null==o?void 0:o.error),r)return;throw new rY({message:"The browser threw an error while playing the video ".concat(y.src,": Code ").concat(o.error.code," - ").concat(null==o?void 0:null===(e=o.error)||void 0===e?void 0:e.message,". See https://remotion.dev/docs/media-playback-error for help. Pass an onError() prop to handle the error."),src:y.src})}throw new rY({message:"The browser threw an error",src:y.src})};return o.addEventListener("error",s,{once:!0}),()=>{u.cancel(),o.removeEventListener("ended",a),o.removeEventListener("error",s),P(i)}},[b,y.src,l,E.fps,w,R,r,m,f,F,S,P,V]);let{src:I}=y;return T.isRendering&&(0,o.useLayoutEffect)(()=>{var e,t;if((null===(t=window.process)||void 0===t?void 0:null===(e=t.env)||void 0===e?void 0:e.NODE_ENV)==="test")return;let r=V("Loading <Html5Video> duration with src="+I,{retries:null!=m?m:void 0,timeoutInMilliseconds:null!=f?f:void 0}),{current:o}=x,n=()=>{(null==o?void 0:o.duration)&&u(I,o.duration),P(r)};return(null==o?void 0:o.duration)?(u(I,o.duration),P(r)):null==o||o.addEventListener("loadedmetadata",n,{once:!0}),()=>{null==o||o.removeEventListener("loadedmetadata",n),P(r)}},[I,u,m,f,P,V]),(0,i.jsx)("video",{ref:x,disableRemotePlayback:!0,...y})}),oi=(0,o.forwardRef)((e,t)=>{var r,n,a;let{startFrom:l,endAt:u,trimBefore:s,trimAfter:d,name:c,pauseWhenBuffering:m,stack:f,_remotionInternalNativeLoopPassed:p,showInTimeline:v,onAutoPlayError:h,...y}=e,{loop:g,...w}=e,{fps:b}=eX(),E=G();if(E.isClientSideRendering)throw Error("<Html5Video> is not supported in @remotion/web-renderer. Use <Video> from @remotion/media instead. See https://remotion.dev/docs/client-side-rendering/limitations");let{durations:x,setDurations:C}=(0,o.useContext)(tw);if("string"==typeof t)throw Error("string refs are not supported");if("string"!=typeof e.src)throw TypeError("The `<Html5Video>` tag requires a string for `src`, but got ".concat(JSON.stringify(e.src)," instead."));let R=tm(e.src),T=(0,o.useCallback)((e,t)=>{C({type:"got-duration",durationInSeconds:t,src:e})},[C]),F=(0,o.useCallback)(()=>{},[]),S=null!==(r=x[tt(R)])&&void 0!==r?r:x[tt(e.src)];th({startFrom:l,endAt:u,trimBefore:s,trimAfter:d});let{trimBeforeValue:V,trimAfterValue:P}=ty({startFrom:l,endAt:u,trimBefore:s,trimAfter:d});return g&&void 0!==S?Number.isFinite(S)?(0,i.jsx)(tn,{durationInFrames:tr({trimAfter:P,mediaDurationInFrames:S*b,playbackRate:null!==(n=e.playbackRate)&&void 0!==n?n:1,trimBefore:V}),layout:"none",name:c,children:(0,i.jsx)(oi,{...w,ref:t,stack:f,_remotionInternalNativeLoopPassed:!0})}):(0,i.jsx)(oi,{...w,ref:t,stack:f,_remotionInternalNativeLoopPassed:!0}):void 0!==V||void 0!==P?(0,i.jsx)(e6,{layout:"none",from:0-(null!=V?V:0),showInTimeline:!1,durationInFrames:void 0===P?void 0:P/(null!==(a=e.playbackRate)&&void 0!==a?a:1),name:c,children:(0,i.jsx)(oi,{pauseWhenBuffering:null!=m&&m,...y,ref:t,stack:f})}):(tf({playbackRate:e.playbackRate,volume:e.volume},"Html5Video"),E.isRendering)?(0,i.jsx)(on,{onDuration:T,onVideoFrame:null!=F?F:null,...y,ref:t}):(0,i.jsx)(rJ,{onlyWarnForMediaSeekingError:!1,...y,ref:t,onVideoFrame:null,pauseWhenBuffering:null!=m&&m,onDuration:T,_remotionInternalStack:null!=f?f:null,_remotionInternalNativeLoopPassed:null!=p&&p,showInTimeline:null==v||v,onAutoPlayError:null!=h?h:void 0})});eP(oi),(()=>{if("undefined"==typeof globalThis)return;let e=()=>{globalThis.remotion_imported=eN,"undefined"!=typeof window&&(window.remotion_imported=eN)},t=globalThis.remotion_imported||"undefined"!=typeof window&&window.remotion_imported;if(t){if(t===eN)return;if("string"==typeof t&&t.includes("webcodecs")){e();return}throw TypeError("\uD83D\uDEA8 Multiple versions of Remotion detected: ".concat([eN,"string"==typeof t?t:"an older version"].filter(g).join(" and "),". This will cause things to break in an unexpected way.\nCheck that all your Remotion packages are on the same version. If your dependencies depend on Remotion, make them peer dependencies. You can also run `npx remotion versions` from your terminal to see which versions are mismatching."))}e()})();var oa=new Proxy({},{get:(e,t)=>"Bundling"===t||"Rendering"===t||"Log"===t||"Puppeteer"===t||"Output"===t?oa:()=>{console.warn("â ï¸ The CLI configuration has been extracted from Remotion Core."),console.warn("Update the import from the config file:"),console.warn(),console.warn("- Delete:"),console.warn('import {Config} from "remotion";'),console.warn("+ Replace:"),console.warn('import {Config} from "@remotion/cli/config";'),console.warn(),console.warn("For more information, see https://www.remotion.dev/docs/4-0-migration."),a.exit(1)}});e6.displayName="Sequence",eP(e6),eP(eS)}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.