@cliquify.me/transitions 0.11.5 → 0.11.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"index.es.js","sources":["../../../node_modules/.pnpm/react@18.3.1/node_modules/react/cjs/react-jsx-runtime.production.min.js","../../../node_modules/.pnpm/react@18.3.1/node_modules/react/cjs/react-jsx-runtime.development.js","../../../node_modules/.pnpm/react@18.3.1/node_modules/react/jsx-runtime.js","../../../node_modules/.pnpm/remotion@4.0.221_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/remotion/dist/esm/index.mjs","../../../node_modules/.pnpm/remotion@4.0.221_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/remotion/dist/esm/no-react.mjs","../../../node_modules/.pnpm/@remotion+transitions@4.0.221_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@remotion/transitions/dist/esm/index.mjs","../../../node_modules/.pnpm/@remotion+transitions@4.0.221_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@remotion/transitions/dist/esm/fade.mjs","../../../node_modules/.pnpm/@remotion+transitions@4.0.221_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@remotion/transitions/dist/esm/slide.mjs","../../../node_modules/.pnpm/@remotion+transitions@4.0.221_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@remotion/transitions/dist/esm/wipe.mjs","../../../node_modules/.pnpm/@remotion+transitions@4.0.221_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@remotion/transitions/dist/esm/flip.mjs","../../../node_modules/.pnpm/@remotion+paths@4.0.221/node_modules/@remotion/paths/dist/cut-instruction.js","../../../node_modules/.pnpm/@remotion+paths@4.0.221/node_modules/@remotion/paths/dist/helpers/bezier-values.js","../../../node_modules/.pnpm/@remotion+paths@4.0.221/node_modules/@remotion/paths/dist/helpers/bezier-functions.js","../../../node_modules/.pnpm/@remotion+paths@4.0.221/node_modules/@remotion/paths/dist/helpers/bezier.js","../../../node_modules/.pnpm/@remotion+paths@4.0.221/node_modules/@remotion/paths/dist/helpers/linear.js","../../../node_modules/.pnpm/@remotion+paths@4.0.221/node_modules/@remotion/paths/dist/helpers/reduced-analysis.js","../../../node_modules/.pnpm/@remotion+paths@4.0.221/node_modules/@remotion/paths/dist/parse-path.js","../../../node_modules/.pnpm/@remotion+paths@4.0.221/node_modules/@remotion/paths/dist/helpers/convert-q-to-c-instruction.js","../../../node_modules/.pnpm/@remotion+paths@4.0.221/node_modules/@remotion/paths/dist/helpers/iterate.js","../../../node_modules/.pnpm/@remotion+paths@4.0.221/node_modules/@remotion/paths/dist/helpers/remove-a-s-t-curves.js","../../../node_modules/.pnpm/@remotion+paths@4.0.221/node_modules/@remotion/paths/dist/serialize-instructions.js","../../../node_modules/.pnpm/@remotion+paths@4.0.221/node_modules/@remotion/paths/dist/normalize-path.js","../../../node_modules/.pnpm/@remotion+paths@4.0.221/node_modules/@remotion/paths/dist/reduce-instructions.js","../../../node_modules/.pnpm/@remotion+paths@4.0.221/node_modules/@remotion/paths/dist/cut-path.js","../../../node_modules/.pnpm/@remotion+paths@4.0.221/node_modules/@remotion/paths/dist/debug-path.js","../../../node_modules/.pnpm/@remotion+paths@4.0.221/node_modules/@remotion/paths/dist/get-bounding-box.js","../../../node_modules/.pnpm/@remotion+paths@4.0.221/node_modules/@remotion/paths/dist/helpers/arc.js","../../../node_modules/.pnpm/@remotion+paths@4.0.221/node_modules/@remotion/paths/dist/helpers/construct.js","../../../node_modules/.pnpm/@remotion+paths@4.0.221/node_modules/@remotion/paths/dist/get-length.js","../../../node_modules/.pnpm/@remotion+paths@4.0.221/node_modules/@remotion/paths/dist/evolve-path.js","../../../node_modules/.pnpm/@remotion+paths@4.0.221/node_modules/@remotion/paths/dist/extend-viewbox.js","../../../node_modules/.pnpm/@remotion+paths@4.0.221/node_modules/@remotion/paths/dist/get-instruction-index-at-length.js","../../../node_modules/.pnpm/@remotion+paths@4.0.221/node_modules/@remotion/paths/dist/get-point-at-length.js","../../../node_modules/.pnpm/@remotion+paths@4.0.221/node_modules/@remotion/paths/dist/get-subpaths.js","../../../node_modules/.pnpm/@remotion+paths@4.0.221/node_modules/@remotion/paths/dist/get-tangent-at-length.js","../../../node_modules/.pnpm/@remotion+paths@4.0.221/node_modules/@remotion/paths/dist/get-end-position.js","../../../node_modules/.pnpm/@remotion+paths@4.0.221/node_modules/@remotion/paths/dist/interpolate-path/convert-to-same-instruction-type.js","../../../node_modules/.pnpm/@remotion+paths@4.0.221/node_modules/@remotion/paths/dist/interpolate-path/points-to-command.js","../../../node_modules/.pnpm/@remotion+paths@4.0.221/node_modules/@remotion/paths/dist/interpolate-path/de-casteljau.js","../../../node_modules/.pnpm/@remotion+paths@4.0.221/node_modules/@remotion/paths/dist/interpolate-path/split-curve-as-points.js","../../../node_modules/.pnpm/@remotion+paths@4.0.221/node_modules/@remotion/paths/dist/interpolate-path/split-curve.js","../../../node_modules/.pnpm/@remotion+paths@4.0.221/node_modules/@remotion/paths/dist/interpolate-path/split-segment.js","../../../node_modules/.pnpm/@remotion+paths@4.0.221/node_modules/@remotion/paths/dist/interpolate-path/extend-command.js","../../../node_modules/.pnpm/@remotion+paths@4.0.221/node_modules/@remotion/paths/dist/interpolate-path/interpolate-instruction-of-same-kind.js","../../../node_modules/.pnpm/@remotion+paths@4.0.221/node_modules/@remotion/paths/dist/interpolate-path/interpolate-instructions.js","../../../node_modules/.pnpm/@remotion+paths@4.0.221/node_modules/@remotion/paths/dist/interpolate-path/interpolate-path.js","../../../node_modules/.pnpm/@remotion+paths@4.0.221/node_modules/@remotion/paths/dist/translate-path.js","../../../node_modules/.pnpm/@remotion+paths@4.0.221/node_modules/@remotion/paths/dist/reset-path.js","../../../node_modules/.pnpm/@remotion+paths@4.0.221/node_modules/@remotion/paths/dist/reverse-path.js","../../../node_modules/.pnpm/@remotion+paths@4.0.221/node_modules/@remotion/paths/dist/scale-path.js","../../../node_modules/.pnpm/@remotion+paths@4.0.221/node_modules/@remotion/paths/dist/warp-path/warp-helpers.js","../../../node_modules/.pnpm/@remotion+paths@4.0.221/node_modules/@remotion/paths/dist/warp-path/index.js","../../../node_modules/.pnpm/@remotion+paths@4.0.221/node_modules/@remotion/paths/dist/index.js","../../../node_modules/.pnpm/@remotion+shapes@4.0.221_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@remotion/shapes/dist/utils/make-circle.js","../../../node_modules/.pnpm/@remotion+shapes@4.0.221_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@remotion/shapes/dist/utils/does-react-support-canary.js","../../../node_modules/.pnpm/@remotion+shapes@4.0.221_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@remotion/shapes/dist/components/render-svg.js","../../../node_modules/.pnpm/@remotion+shapes@4.0.221_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@remotion/shapes/dist/components/circle.js","../../../node_modules/.pnpm/@remotion+shapes@4.0.221_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@remotion/shapes/dist/utils/make-ellipse.js","../../../node_modules/.pnpm/@remotion+shapes@4.0.221_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@remotion/shapes/dist/components/ellipse.js","../../../node_modules/.pnpm/@remotion+shapes@4.0.221_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@remotion/shapes/dist/utils/make-pie.js","../../../node_modules/.pnpm/@remotion+shapes@4.0.221_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@remotion/shapes/dist/components/pie.js","../../../node_modules/.pnpm/@remotion+shapes@4.0.221_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@remotion/shapes/dist/utils/join-points.js","../../../node_modules/.pnpm/@remotion+shapes@4.0.221_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@remotion/shapes/dist/utils/make-polygon.js","../../../node_modules/.pnpm/@remotion+shapes@4.0.221_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@remotion/shapes/dist/components/polygon.js","../../../node_modules/.pnpm/@remotion+shapes@4.0.221_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@remotion/shapes/dist/utils/make-rect.js","../../../node_modules/.pnpm/@remotion+shapes@4.0.221_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@remotion/shapes/dist/components/rect.js","../../../node_modules/.pnpm/@remotion+shapes@4.0.221_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@remotion/shapes/dist/utils/make-star.js","../../../node_modules/.pnpm/@remotion+shapes@4.0.221_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@remotion/shapes/dist/components/star.js","../../../node_modules/.pnpm/@remotion+shapes@4.0.221_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@remotion/shapes/dist/utils/make-triangle.js","../../../node_modules/.pnpm/@remotion+shapes@4.0.221_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@remotion/shapes/dist/components/triangle.js","../../../node_modules/.pnpm/@remotion+shapes@4.0.221_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@remotion/shapes/dist/index.js","../../../node_modules/.pnpm/@remotion+transitions@4.0.221_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@remotion/transitions/dist/esm/clock-wipe.mjs","../src/presentations/circle.tsx","../src/presentations/rectangle.tsx","../src/presentations/star.tsx","../src/presentations/sliding-doors.tsx"],"sourcesContent":["/**\n * @license React\n * react-jsx-runtime.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';var f=require(\"react\"),k=Symbol.for(\"react.element\"),l=Symbol.for(\"react.fragment\"),m=Object.prototype.hasOwnProperty,n=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,p={key:!0,ref:!0,__self:!0,__source:!0};\nfunction q(c,a,g){var b,d={},e=null,h=null;void 0!==g&&(e=\"\"+g);void 0!==a.key&&(e=\"\"+a.key);void 0!==a.ref&&(h=a.ref);for(b in a)m.call(a,b)&&!p.hasOwnProperty(b)&&(d[b]=a[b]);if(c&&c.defaultProps)for(b in a=c.defaultProps,a)void 0===d[b]&&(d[b]=a[b]);return{$$typeof:k,type:c,key:e,ref:h,props:d,_owner:n.current}}exports.Fragment=l;exports.jsx=q;exports.jsxs=q;\n","/**\n * @license React\n * react-jsx-runtime.development.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nif (process.env.NODE_ENV !== \"production\") {\n (function() {\n'use strict';\n\nvar React = require('react');\n\n// ATTENTION\n// When adding new symbols to this file,\n// Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'\n// The Symbol used to tag the ReactElement-like types.\nvar REACT_ELEMENT_TYPE = Symbol.for('react.element');\nvar REACT_PORTAL_TYPE = Symbol.for('react.portal');\nvar REACT_FRAGMENT_TYPE = Symbol.for('react.fragment');\nvar REACT_STRICT_MODE_TYPE = Symbol.for('react.strict_mode');\nvar REACT_PROFILER_TYPE = Symbol.for('react.profiler');\nvar REACT_PROVIDER_TYPE = Symbol.for('react.provider');\nvar REACT_CONTEXT_TYPE = Symbol.for('react.context');\nvar REACT_FORWARD_REF_TYPE = Symbol.for('react.forward_ref');\nvar REACT_SUSPENSE_TYPE = Symbol.for('react.suspense');\nvar REACT_SUSPENSE_LIST_TYPE = Symbol.for('react.suspense_list');\nvar REACT_MEMO_TYPE = Symbol.for('react.memo');\nvar REACT_LAZY_TYPE = Symbol.for('react.lazy');\nvar REACT_OFFSCREEN_TYPE = Symbol.for('react.offscreen');\nvar MAYBE_ITERATOR_SYMBOL = Symbol.iterator;\nvar FAUX_ITERATOR_SYMBOL = '@@iterator';\nfunction getIteratorFn(maybeIterable) {\n if (maybeIterable === null || typeof maybeIterable !== 'object') {\n return null;\n }\n\n var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];\n\n if (typeof maybeIterator === 'function') {\n return maybeIterator;\n }\n\n return null;\n}\n\nvar ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;\n\nfunction error(format) {\n {\n {\n for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n args[_key2 - 1] = arguments[_key2];\n }\n\n printWarning('error', format, args);\n }\n }\n}\n\nfunction printWarning(level, format, args) {\n // When changing this logic, you might want to also\n // update consoleWithStackDev.www.js as well.\n {\n var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;\n var stack = ReactDebugCurrentFrame.getStackAddendum();\n\n if (stack !== '') {\n format += '%s';\n args = args.concat([stack]);\n } // eslint-disable-next-line react-internal/safe-string-coercion\n\n\n var argsWithFormat = args.map(function (item) {\n return String(item);\n }); // Careful: RN currently depends on this prefix\n\n argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it\n // breaks IE9: https://github.com/facebook/react/issues/13610\n // eslint-disable-next-line react-internal/no-production-logging\n\n Function.prototype.apply.call(console[level], console, argsWithFormat);\n }\n}\n\n// -----------------------------------------------------------------------------\n\nvar enableScopeAPI = false; // Experimental Create Event Handle API.\nvar enableCacheElement = false;\nvar enableTransitionTracing = false; // No known bugs, but needs performance testing\n\nvar enableLegacyHidden = false; // Enables unstable_avoidThisFallback feature in Fiber\n// stuff. Intended to enable React core members to more easily debug scheduling\n// issues in DEV builds.\n\nvar enableDebugTracing = false; // Track which Fiber(s) schedule render work.\n\nvar REACT_MODULE_REFERENCE;\n\n{\n REACT_MODULE_REFERENCE = Symbol.for('react.module.reference');\n}\n\nfunction isValidElementType(type) {\n if (typeof type === 'string' || typeof type === 'function') {\n return true;\n } // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill).\n\n\n if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing ) {\n return true;\n }\n\n if (typeof type === 'object' && type !== null) {\n if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object\n // types supported by any Flight configuration anywhere since\n // we don't know which Flight build this will end up being used\n // with.\n type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== undefined) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction getWrappedName(outerType, innerType, wrapperName) {\n var displayName = outerType.displayName;\n\n if (displayName) {\n return displayName;\n }\n\n var functionName = innerType.displayName || innerType.name || '';\n return functionName !== '' ? wrapperName + \"(\" + functionName + \")\" : wrapperName;\n} // Keep in sync with react-reconciler/getComponentNameFromFiber\n\n\nfunction getContextName(type) {\n return type.displayName || 'Context';\n} // Note that the reconciler package should generally prefer to use getComponentNameFromFiber() instead.\n\n\nfunction getComponentNameFromType(type) {\n if (type == null) {\n // Host root, text node or just invalid type.\n return null;\n }\n\n {\n if (typeof type.tag === 'number') {\n error('Received an unexpected object in getComponentNameFromType(). ' + 'This is likely a bug in React. Please file an issue.');\n }\n }\n\n if (typeof type === 'function') {\n return type.displayName || type.name || null;\n }\n\n if (typeof type === 'string') {\n return type;\n }\n\n switch (type) {\n case REACT_FRAGMENT_TYPE:\n return 'Fragment';\n\n case REACT_PORTAL_TYPE:\n return 'Portal';\n\n case REACT_PROFILER_TYPE:\n return 'Profiler';\n\n case REACT_STRICT_MODE_TYPE:\n return 'StrictMode';\n\n case REACT_SUSPENSE_TYPE:\n return 'Suspense';\n\n case REACT_SUSPENSE_LIST_TYPE:\n return 'SuspenseList';\n\n }\n\n if (typeof type === 'object') {\n switch (type.$$typeof) {\n case REACT_CONTEXT_TYPE:\n var context = type;\n return getContextName(context) + '.Consumer';\n\n case REACT_PROVIDER_TYPE:\n var provider = type;\n return getContextName(provider._context) + '.Provider';\n\n case REACT_FORWARD_REF_TYPE:\n return getWrappedName(type, type.render, 'ForwardRef');\n\n case REACT_MEMO_TYPE:\n var outerName = type.displayName || null;\n\n if (outerName !== null) {\n return outerName;\n }\n\n return getComponentNameFromType(type.type) || 'Memo';\n\n case REACT_LAZY_TYPE:\n {\n var lazyComponent = type;\n var payload = lazyComponent._payload;\n var init = lazyComponent._init;\n\n try {\n return getComponentNameFromType(init(payload));\n } catch (x) {\n return null;\n }\n }\n\n // eslint-disable-next-line no-fallthrough\n }\n }\n\n return null;\n}\n\nvar assign = Object.assign;\n\n// Helpers to patch console.logs to avoid logging during side-effect free\n// replaying on render function. This currently only patches the object\n// lazily which won't cover if the log function was extracted eagerly.\n// We could also eagerly patch the method.\nvar disabledDepth = 0;\nvar prevLog;\nvar prevInfo;\nvar prevWarn;\nvar prevError;\nvar prevGroup;\nvar prevGroupCollapsed;\nvar prevGroupEnd;\n\nfunction disabledLog() {}\n\ndisabledLog.__reactDisabledLog = true;\nfunction disableLogs() {\n {\n if (disabledDepth === 0) {\n /* eslint-disable react-internal/no-production-logging */\n prevLog = console.log;\n prevInfo = console.info;\n prevWarn = console.warn;\n prevError = console.error;\n prevGroup = console.group;\n prevGroupCollapsed = console.groupCollapsed;\n prevGroupEnd = console.groupEnd; // https://github.com/facebook/react/issues/19099\n\n var props = {\n configurable: true,\n enumerable: true,\n value: disabledLog,\n writable: true\n }; // $FlowFixMe Flow thinks console is immutable.\n\n Object.defineProperties(console, {\n info: props,\n log: props,\n warn: props,\n error: props,\n group: props,\n groupCollapsed: props,\n groupEnd: props\n });\n /* eslint-enable react-internal/no-production-logging */\n }\n\n disabledDepth++;\n }\n}\nfunction reenableLogs() {\n {\n disabledDepth--;\n\n if (disabledDepth === 0) {\n /* eslint-disable react-internal/no-production-logging */\n var props = {\n configurable: true,\n enumerable: true,\n writable: true\n }; // $FlowFixMe Flow thinks console is immutable.\n\n Object.defineProperties(console, {\n log: assign({}, props, {\n value: prevLog\n }),\n info: assign({}, props, {\n value: prevInfo\n }),\n warn: assign({}, props, {\n value: prevWarn\n }),\n error: assign({}, props, {\n value: prevError\n }),\n group: assign({}, props, {\n value: prevGroup\n }),\n groupCollapsed: assign({}, props, {\n value: prevGroupCollapsed\n }),\n groupEnd: assign({}, props, {\n value: prevGroupEnd\n })\n });\n /* eslint-enable react-internal/no-production-logging */\n }\n\n if (disabledDepth < 0) {\n error('disabledDepth fell below zero. ' + 'This is a bug in React. Please file an issue.');\n }\n }\n}\n\nvar ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;\nvar prefix;\nfunction describeBuiltInComponentFrame(name, source, ownerFn) {\n {\n if (prefix === undefined) {\n // Extract the VM specific prefix used by each line.\n try {\n throw Error();\n } catch (x) {\n var match = x.stack.trim().match(/\\n( *(at )?)/);\n prefix = match && match[1] || '';\n }\n } // We use the prefix to ensure our stacks line up with native stack frames.\n\n\n return '\\n' + prefix + name;\n }\n}\nvar reentry = false;\nvar componentFrameCache;\n\n{\n var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map;\n componentFrameCache = new PossiblyWeakMap();\n}\n\nfunction describeNativeComponentFrame(fn, construct) {\n // If something asked for a stack inside a fake render, it should get ignored.\n if ( !fn || reentry) {\n return '';\n }\n\n {\n var frame = componentFrameCache.get(fn);\n\n if (frame !== undefined) {\n return frame;\n }\n }\n\n var control;\n reentry = true;\n var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe It does accept undefined.\n\n Error.prepareStackTrace = undefined;\n var previousDispatcher;\n\n {\n previousDispatcher = ReactCurrentDispatcher.current; // Set the dispatcher in DEV because this might be call in the render function\n // for warnings.\n\n ReactCurrentDispatcher.current = null;\n disableLogs();\n }\n\n try {\n // This should throw.\n if (construct) {\n // Something should be setting the props in the constructor.\n var Fake = function () {\n throw Error();\n }; // $FlowFixMe\n\n\n Object.defineProperty(Fake.prototype, 'props', {\n set: function () {\n // We use a throwing setter instead of frozen or non-writable props\n // because that won't throw in a non-strict mode function.\n throw Error();\n }\n });\n\n if (typeof Reflect === 'object' && Reflect.construct) {\n // We construct a different control for this case to include any extra\n // frames added by the construct call.\n try {\n Reflect.construct(Fake, []);\n } catch (x) {\n control = x;\n }\n\n Reflect.construct(fn, [], Fake);\n } else {\n try {\n Fake.call();\n } catch (x) {\n control = x;\n }\n\n fn.call(Fake.prototype);\n }\n } else {\n try {\n throw Error();\n } catch (x) {\n control = x;\n }\n\n fn();\n }\n } catch (sample) {\n // This is inlined manually because closure doesn't do it for us.\n if (sample && control && typeof sample.stack === 'string') {\n // This extracts the first frame from the sample that isn't also in the control.\n // Skipping one frame that we assume is the frame that calls the two.\n var sampleLines = sample.stack.split('\\n');\n var controlLines = control.stack.split('\\n');\n var s = sampleLines.length - 1;\n var c = controlLines.length - 1;\n\n while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {\n // We expect at least one stack frame to be shared.\n // Typically this will be the root most one. However, stack frames may be\n // cut off due to maximum stack limits. In this case, one maybe cut off\n // earlier than the other. We assume that the sample is longer or the same\n // and there for cut off earlier. So we should find the root most frame in\n // the sample somewhere in the control.\n c--;\n }\n\n for (; s >= 1 && c >= 0; s--, c--) {\n // Next we find the first one that isn't the same which should be the\n // frame that called our sample function and the control.\n if (sampleLines[s] !== controlLines[c]) {\n // In V8, the first line is describing the message but other VMs don't.\n // If we're about to return the first line, and the control is also on the same\n // line, that's a pretty good indicator that our sample threw at same line as\n // the control. I.e. before we entered the sample frame. So we ignore this result.\n // This can happen if you passed a class to function component, or non-function.\n if (s !== 1 || c !== 1) {\n do {\n s--;\n c--; // We may still have similar intermediate frames from the construct call.\n // The next one that isn't the same should be our match though.\n\n if (c < 0 || sampleLines[s] !== controlLines[c]) {\n // V8 adds a \"new\" prefix for native classes. Let's remove it to make it prettier.\n var _frame = '\\n' + sampleLines[s].replace(' at new ', ' at '); // If our component frame is labeled \"<anonymous>\"\n // but we have a user-provided \"displayName\"\n // splice it in to make the stack more readable.\n\n\n if (fn.displayName && _frame.includes('<anonymous>')) {\n _frame = _frame.replace('<anonymous>', fn.displayName);\n }\n\n {\n if (typeof fn === 'function') {\n componentFrameCache.set(fn, _frame);\n }\n } // Return the line we found.\n\n\n return _frame;\n }\n } while (s >= 1 && c >= 0);\n }\n\n break;\n }\n }\n }\n } finally {\n reentry = false;\n\n {\n ReactCurrentDispatcher.current = previousDispatcher;\n reenableLogs();\n }\n\n Error.prepareStackTrace = previousPrepareStackTrace;\n } // Fallback to just using the name if we couldn't make it throw.\n\n\n var name = fn ? fn.displayName || fn.name : '';\n var syntheticFrame = name ? describeBuiltInComponentFrame(name) : '';\n\n {\n if (typeof fn === 'function') {\n componentFrameCache.set(fn, syntheticFrame);\n }\n }\n\n return syntheticFrame;\n}\nfunction describeFunctionComponentFrame(fn, source, ownerFn) {\n {\n return describeNativeComponentFrame(fn, false);\n }\n}\n\nfunction shouldConstruct(Component) {\n var prototype = Component.prototype;\n return !!(prototype && prototype.isReactComponent);\n}\n\nfunction describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {\n\n if (type == null) {\n return '';\n }\n\n if (typeof type === 'function') {\n {\n return describeNativeComponentFrame(type, shouldConstruct(type));\n }\n }\n\n if (typeof type === 'string') {\n return describeBuiltInComponentFrame(type);\n }\n\n switch (type) {\n case REACT_SUSPENSE_TYPE:\n return describeBuiltInComponentFrame('Suspense');\n\n case REACT_SUSPENSE_LIST_TYPE:\n return describeBuiltInComponentFrame('SuspenseList');\n }\n\n if (typeof type === 'object') {\n switch (type.$$typeof) {\n case REACT_FORWARD_REF_TYPE:\n return describeFunctionComponentFrame(type.render);\n\n case REACT_MEMO_TYPE:\n // Memo may contain any component type so we recursively resolve it.\n return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);\n\n case REACT_LAZY_TYPE:\n {\n var lazyComponent = type;\n var payload = lazyComponent._payload;\n var init = lazyComponent._init;\n\n try {\n // Lazy may contain any component type so we recursively resolve it.\n return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);\n } catch (x) {}\n }\n }\n }\n\n return '';\n}\n\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n\nvar loggedTypeFailures = {};\nvar ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;\n\nfunction setCurrentlyValidatingElement(element) {\n {\n if (element) {\n var owner = element._owner;\n var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);\n ReactDebugCurrentFrame.setExtraStackFrame(stack);\n } else {\n ReactDebugCurrentFrame.setExtraStackFrame(null);\n }\n }\n}\n\nfunction checkPropTypes(typeSpecs, values, location, componentName, element) {\n {\n // $FlowFixMe This is okay but Flow doesn't know it.\n var has = Function.call.bind(hasOwnProperty);\n\n for (var typeSpecName in typeSpecs) {\n if (has(typeSpecs, typeSpecName)) {\n var error$1 = void 0; // Prop type validation may throw. In case they do, we don't want to\n // fail the render phase where it didn't fail before. So we log it.\n // After these have been cleaned up, we'll let them throw.\n\n try {\n // This is intentionally an invariant that gets caught. It's the same\n // behavior as without this statement except with a better message.\n if (typeof typeSpecs[typeSpecName] !== 'function') {\n // eslint-disable-next-line react-internal/prod-error-codes\n var err = Error((componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' + 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' + 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.');\n err.name = 'Invariant Violation';\n throw err;\n }\n\n error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED');\n } catch (ex) {\n error$1 = ex;\n }\n\n if (error$1 && !(error$1 instanceof Error)) {\n setCurrentlyValidatingElement(element);\n\n error('%s: type specification of %s' + ' `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error$1);\n\n setCurrentlyValidatingElement(null);\n }\n\n if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {\n // Only monitor this failure once because there tends to be a lot of the\n // same error.\n loggedTypeFailures[error$1.message] = true;\n setCurrentlyValidatingElement(element);\n\n error('Failed %s type: %s', location, error$1.message);\n\n setCurrentlyValidatingElement(null);\n }\n }\n }\n }\n}\n\nvar isArrayImpl = Array.isArray; // eslint-disable-next-line no-redeclare\n\nfunction isArray(a) {\n return isArrayImpl(a);\n}\n\n/*\n * The `'' + value` pattern (used in in perf-sensitive code) throws for Symbol\n * and Temporal.* types. See https://github.com/facebook/react/pull/22064.\n *\n * The functions in this module will throw an easier-to-understand,\n * easier-to-debug exception with a clear errors message message explaining the\n * problem. (Instead of a confusing exception thrown inside the implementation\n * of the `value` object).\n */\n// $FlowFixMe only called in DEV, so void return is not possible.\nfunction typeName(value) {\n {\n // toStringTag is needed for namespaced types like Temporal.Instant\n var hasToStringTag = typeof Symbol === 'function' && Symbol.toStringTag;\n var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || 'Object';\n return type;\n }\n} // $FlowFixMe only called in DEV, so void return is not possible.\n\n\nfunction willCoercionThrow(value) {\n {\n try {\n testStringCoercion(value);\n return false;\n } catch (e) {\n return true;\n }\n }\n}\n\nfunction testStringCoercion(value) {\n // If you ended up here by following an exception call stack, here's what's\n // happened: you supplied an object or symbol value to React (as a prop, key,\n // DOM attribute, CSS property, string ref, etc.) and when React tried to\n // coerce it to a string using `'' + value`, an exception was thrown.\n //\n // The most common types that will cause this exception are `Symbol` instances\n // and Temporal objects like `Temporal.Instant`. But any object that has a\n // `valueOf` or `[Symbol.toPrimitive]` method that throws will also cause this\n // exception. (Library authors do this to prevent users from using built-in\n // numeric operators like `+` or comparison operators like `>=` because custom\n // methods are needed to perform accurate arithmetic or comparison.)\n //\n // To fix the problem, coerce this object or symbol value to a string before\n // passing it to React. The most reliable way is usually `String(value)`.\n //\n // To find which value is throwing, check the browser or debugger console.\n // Before this exception was thrown, there should be `console.error` output\n // that shows the type (Symbol, Temporal.PlainDate, etc.) that caused the\n // problem and how that type was used: key, atrribute, input value prop, etc.\n // In most cases, this console output also shows the component and its\n // ancestor components where the exception happened.\n //\n // eslint-disable-next-line react-internal/safe-string-coercion\n return '' + value;\n}\nfunction checkKeyStringCoercion(value) {\n {\n if (willCoercionThrow(value)) {\n error('The provided key is an unsupported type %s.' + ' This value must be coerced to a string before before using it here.', typeName(value));\n\n return testStringCoercion(value); // throw (to help callers find troubleshooting comments)\n }\n }\n}\n\nvar ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;\nvar RESERVED_PROPS = {\n key: true,\n ref: true,\n __self: true,\n __source: true\n};\nvar specialPropKeyWarningShown;\nvar specialPropRefWarningShown;\nvar didWarnAboutStringRefs;\n\n{\n didWarnAboutStringRefs = {};\n}\n\nfunction hasValidRef(config) {\n {\n if (hasOwnProperty.call(config, 'ref')) {\n var getter = Object.getOwnPropertyDescriptor(config, 'ref').get;\n\n if (getter && getter.isReactWarning) {\n return false;\n }\n }\n }\n\n return config.ref !== undefined;\n}\n\nfunction hasValidKey(config) {\n {\n if (hasOwnProperty.call(config, 'key')) {\n var getter = Object.getOwnPropertyDescriptor(config, 'key').get;\n\n if (getter && getter.isReactWarning) {\n return false;\n }\n }\n }\n\n return config.key !== undefined;\n}\n\nfunction warnIfStringRefCannotBeAutoConverted(config, self) {\n {\n if (typeof config.ref === 'string' && ReactCurrentOwner.current && self && ReactCurrentOwner.current.stateNode !== self) {\n var componentName = getComponentNameFromType(ReactCurrentOwner.current.type);\n\n if (!didWarnAboutStringRefs[componentName]) {\n error('Component \"%s\" contains the string ref \"%s\". ' + 'Support for string refs will be removed in a future major release. ' + 'This case cannot be automatically converted to an arrow function. ' + 'We ask you to manually fix this case by using useRef() or createRef() instead. ' + 'Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-string-ref', getComponentNameFromType(ReactCurrentOwner.current.type), config.ref);\n\n didWarnAboutStringRefs[componentName] = true;\n }\n }\n }\n}\n\nfunction defineKeyPropWarningGetter(props, displayName) {\n {\n var warnAboutAccessingKey = function () {\n if (!specialPropKeyWarningShown) {\n specialPropKeyWarningShown = true;\n\n error('%s: `key` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName);\n }\n };\n\n warnAboutAccessingKey.isReactWarning = true;\n Object.defineProperty(props, 'key', {\n get: warnAboutAccessingKey,\n configurable: true\n });\n }\n}\n\nfunction defineRefPropWarningGetter(props, displayName) {\n {\n var warnAboutAccessingRef = function () {\n if (!specialPropRefWarningShown) {\n specialPropRefWarningShown = true;\n\n error('%s: `ref` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName);\n }\n };\n\n warnAboutAccessingRef.isReactWarning = true;\n Object.defineProperty(props, 'ref', {\n get: warnAboutAccessingRef,\n configurable: true\n });\n }\n}\n/**\n * Factory method to create a new React element. This no longer adheres to\n * the class pattern, so do not use new to call it. Also, instanceof check\n * will not work. Instead test $$typeof field against Symbol.for('react.element') to check\n * if something is a React Element.\n *\n * @param {*} type\n * @param {*} props\n * @param {*} key\n * @param {string|object} ref\n * @param {*} owner\n * @param {*} self A *temporary* helper to detect places where `this` is\n * different from the `owner` when React.createElement is called, so that we\n * can warn. We want to get rid of owner and replace string `ref`s with arrow\n * functions, and as long as `this` and owner are the same, there will be no\n * change in behavior.\n * @param {*} source An annotation object (added by a transpiler or otherwise)\n * indicating filename, line number, and/or other information.\n * @internal\n */\n\n\nvar ReactElement = function (type, key, ref, self, source, owner, props) {\n var element = {\n // This tag allows us to uniquely identify this as a React Element\n $$typeof: REACT_ELEMENT_TYPE,\n // Built-in properties that belong on the element\n type: type,\n key: key,\n ref: ref,\n props: props,\n // Record the component responsible for creating this element.\n _owner: owner\n };\n\n {\n // The validation flag is currently mutative. We put it on\n // an external backing store so that we can freeze the whole object.\n // This can be replaced with a WeakMap once they are implemented in\n // commonly used development environments.\n element._store = {}; // To make comparing ReactElements easier for testing purposes, we make\n // the validation flag non-enumerable (where possible, which should\n // include every environment we run tests in), so the test framework\n // ignores it.\n\n Object.defineProperty(element._store, 'validated', {\n configurable: false,\n enumerable: false,\n writable: true,\n value: false\n }); // self and source are DEV only properties.\n\n Object.defineProperty(element, '_self', {\n configurable: false,\n enumerable: false,\n writable: false,\n value: self\n }); // Two elements created in two different places should be considered\n // equal for testing purposes and therefore we hide it from enumeration.\n\n Object.defineProperty(element, '_source', {\n configurable: false,\n enumerable: false,\n writable: false,\n value: source\n });\n\n if (Object.freeze) {\n Object.freeze(element.props);\n Object.freeze(element);\n }\n }\n\n return element;\n};\n/**\n * https://github.com/reactjs/rfcs/pull/107\n * @param {*} type\n * @param {object} props\n * @param {string} key\n */\n\nfunction jsxDEV(type, config, maybeKey, source, self) {\n {\n var propName; // Reserved names are extracted\n\n var props = {};\n var key = null;\n var ref = null; // Currently, key can be spread in as a prop. This causes a potential\n // issue if key is also explicitly declared (ie. <div {...props} key=\"Hi\" />\n // or <div key=\"Hi\" {...props} /> ). We want to deprecate key spread,\n // but as an intermediary step, we will use jsxDEV for everything except\n // <div {...props} key=\"Hi\" />, because we aren't currently able to tell if\n // key is explicitly declared to be undefined or not.\n\n if (maybeKey !== undefined) {\n {\n checkKeyStringCoercion(maybeKey);\n }\n\n key = '' + maybeKey;\n }\n\n if (hasValidKey(config)) {\n {\n checkKeyStringCoercion(config.key);\n }\n\n key = '' + config.key;\n }\n\n if (hasValidRef(config)) {\n ref = config.ref;\n warnIfStringRefCannotBeAutoConverted(config, self);\n } // Remaining properties are added to a new props object\n\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n } // Resolve default props\n\n\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n\n if (key || ref) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n }\n}\n\nvar ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner;\nvar ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;\n\nfunction setCurrentlyValidatingElement$1(element) {\n {\n if (element) {\n var owner = element._owner;\n var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);\n ReactDebugCurrentFrame$1.setExtraStackFrame(stack);\n } else {\n ReactDebugCurrentFrame$1.setExtraStackFrame(null);\n }\n }\n}\n\nvar propTypesMisspellWarningShown;\n\n{\n propTypesMisspellWarningShown = false;\n}\n/**\n * Verifies the object is a ReactElement.\n * See https://reactjs.org/docs/react-api.html#isvalidelement\n * @param {?object} object\n * @return {boolean} True if `object` is a ReactElement.\n * @final\n */\n\n\nfunction isValidElement(object) {\n {\n return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;\n }\n}\n\nfunction getDeclarationErrorAddendum() {\n {\n if (ReactCurrentOwner$1.current) {\n var name = getComponentNameFromType(ReactCurrentOwner$1.current.type);\n\n if (name) {\n return '\\n\\nCheck the render method of `' + name + '`.';\n }\n }\n\n return '';\n }\n}\n\nfunction getSourceInfoErrorAddendum(source) {\n {\n if (source !== undefined) {\n var fileName = source.fileName.replace(/^.*[\\\\\\/]/, '');\n var lineNumber = source.lineNumber;\n return '\\n\\nCheck your code at ' + fileName + ':' + lineNumber + '.';\n }\n\n return '';\n }\n}\n/**\n * Warn if there's no key explicitly set on dynamic arrays of children or\n * object keys are not valid. This allows us to keep track of children between\n * updates.\n */\n\n\nvar ownerHasKeyUseWarning = {};\n\nfunction getCurrentComponentErrorInfo(parentType) {\n {\n var info = getDeclarationErrorAddendum();\n\n if (!info) {\n var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name;\n\n if (parentName) {\n info = \"\\n\\nCheck the top-level render call using <\" + parentName + \">.\";\n }\n }\n\n return info;\n }\n}\n/**\n * Warn if the element doesn't have an explicit key assigned to it.\n * This element is in an array. The array could grow and shrink or be\n * reordered. All children that haven't already been validated are required to\n * have a \"key\" property assigned to it. Error statuses are cached so a warning\n * will only be shown once.\n *\n * @internal\n * @param {ReactElement} element Element that requires a key.\n * @param {*} parentType element's parent's type.\n */\n\n\nfunction validateExplicitKey(element, parentType) {\n {\n if (!element._store || element._store.validated || element.key != null) {\n return;\n }\n\n element._store.validated = true;\n var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);\n\n if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {\n return;\n }\n\n ownerHasKeyUseWarning[currentComponentErrorInfo] = true; // Usually the current owner is the offender, but if it accepts children as a\n // property, it may be the creator of the child that's responsible for\n // assigning it a key.\n\n var childOwner = '';\n\n if (element && element._owner && element._owner !== ReactCurrentOwner$1.current) {\n // Give the component that originally created this child.\n childOwner = \" It was passed a child from \" + getComponentNameFromType(element._owner.type) + \".\";\n }\n\n setCurrentlyValidatingElement$1(element);\n\n error('Each child in a list should have a unique \"key\" prop.' + '%s%s See https://reactjs.org/link/warning-keys for more information.', currentComponentErrorInfo, childOwner);\n\n setCurrentlyValidatingElement$1(null);\n }\n}\n/**\n * Ensure that every element either is passed in a static location, in an\n * array with an explicit keys property defined, or in an object literal\n * with valid key property.\n *\n * @internal\n * @param {ReactNode} node Statically passed child of any type.\n * @param {*} parentType node's parent's type.\n */\n\n\nfunction validateChildKeys(node, parentType) {\n {\n if (typeof node !== 'object') {\n return;\n }\n\n if (isArray(node)) {\n for (var i = 0; i < node.length; i++) {\n var child = node[i];\n\n if (isValidElement(child)) {\n validateExplicitKey(child, parentType);\n }\n }\n } else if (isValidElement(node)) {\n // This element was passed in a valid location.\n if (node._store) {\n node._store.validated = true;\n }\n } else if (node) {\n var iteratorFn = getIteratorFn(node);\n\n if (typeof iteratorFn === 'function') {\n // Entry iterators used to provide implicit keys,\n // but now we print a separate warning for them later.\n if (iteratorFn !== node.entries) {\n var iterator = iteratorFn.call(node);\n var step;\n\n while (!(step = iterator.next()).done) {\n if (isValidElement(step.value)) {\n validateExplicitKey(step.value, parentType);\n }\n }\n }\n }\n }\n }\n}\n/**\n * Given an element, validate that its props follow the propTypes definition,\n * provided by the type.\n *\n * @param {ReactElement} element\n */\n\n\nfunction validatePropTypes(element) {\n {\n var type = element.type;\n\n if (type === null || type === undefined || typeof type === 'string') {\n return;\n }\n\n var propTypes;\n\n if (typeof type === 'function') {\n propTypes = type.propTypes;\n } else if (typeof type === 'object' && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here.\n // Inner props are checked in the reconciler.\n type.$$typeof === REACT_MEMO_TYPE)) {\n propTypes = type.propTypes;\n } else {\n return;\n }\n\n if (propTypes) {\n // Intentionally inside to avoid triggering lazy initializers:\n var name = getComponentNameFromType(type);\n checkPropTypes(propTypes, element.props, 'prop', name, element);\n } else if (type.PropTypes !== undefined && !propTypesMisspellWarningShown) {\n propTypesMisspellWarningShown = true; // Intentionally inside to avoid triggering lazy initializers:\n\n var _name = getComponentNameFromType(type);\n\n error('Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', _name || 'Unknown');\n }\n\n if (typeof type.getDefaultProps === 'function' && !type.getDefaultProps.isReactClassApproved) {\n error('getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.');\n }\n }\n}\n/**\n * Given a fragment, validate that it can only be provided with fragment props\n * @param {ReactElement} fragment\n */\n\n\nfunction validateFragmentProps(fragment) {\n {\n var keys = Object.keys(fragment.props);\n\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n\n if (key !== 'children' && key !== 'key') {\n setCurrentlyValidatingElement$1(fragment);\n\n error('Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.', key);\n\n setCurrentlyValidatingElement$1(null);\n break;\n }\n }\n\n if (fragment.ref !== null) {\n setCurrentlyValidatingElement$1(fragment);\n\n error('Invalid attribute `ref` supplied to `React.Fragment`.');\n\n setCurrentlyValidatingElement$1(null);\n }\n }\n}\n\nvar didWarnAboutKeySpread = {};\nfunction jsxWithValidation(type, props, key, isStaticChildren, source, self) {\n {\n var validType = isValidElementType(type); // We warn in this case but don't throw. We expect the element creation to\n // succeed and there will likely be errors in render.\n\n if (!validType) {\n var info = '';\n\n if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {\n info += ' You likely forgot to export your component from the file ' + \"it's defined in, or you might have mixed up default and named imports.\";\n }\n\n var sourceInfo = getSourceInfoErrorAddendum(source);\n\n if (sourceInfo) {\n info += sourceInfo;\n } else {\n info += getDeclarationErrorAddendum();\n }\n\n var typeString;\n\n if (type === null) {\n typeString = 'null';\n } else if (isArray(type)) {\n typeString = 'array';\n } else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) {\n typeString = \"<\" + (getComponentNameFromType(type.type) || 'Unknown') + \" />\";\n info = ' Did you accidentally export a JSX literal instead of a component?';\n } else {\n typeString = typeof type;\n }\n\n error('React.jsx: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', typeString, info);\n }\n\n var element = jsxDEV(type, props, key, source, self); // The result can be nullish if a mock or a custom function is used.\n // TODO: Drop this when these are no longer allowed as the type argument.\n\n if (element == null) {\n return element;\n } // Skip key warning if the type isn't valid since our key validation logic\n // doesn't expect a non-string/function type and can throw confusing errors.\n // We don't want exception behavior to differ between dev and prod.\n // (Rendering will throw with a helpful message and as soon as the type is\n // fixed, the key warnings will appear.)\n\n\n if (validType) {\n var children = props.children;\n\n if (children !== undefined) {\n if (isStaticChildren) {\n if (isArray(children)) {\n for (var i = 0; i < children.length; i++) {\n validateChildKeys(children[i], type);\n }\n\n if (Object.freeze) {\n Object.freeze(children);\n }\n } else {\n error('React.jsx: Static children should always be an array. ' + 'You are likely explicitly calling React.jsxs or React.jsxDEV. ' + 'Use the Babel transform instead.');\n }\n } else {\n validateChildKeys(children, type);\n }\n }\n }\n\n {\n if (hasOwnProperty.call(props, 'key')) {\n var componentName = getComponentNameFromType(type);\n var keys = Object.keys(props).filter(function (k) {\n return k !== 'key';\n });\n var beforeExample = keys.length > 0 ? '{key: someKey, ' + keys.join(': ..., ') + ': ...}' : '{key: someKey}';\n\n if (!didWarnAboutKeySpread[componentName + beforeExample]) {\n var afterExample = keys.length > 0 ? '{' + keys.join(': ..., ') + ': ...}' : '{}';\n\n error('A props object containing a \"key\" prop is being spread into JSX:\\n' + ' let props = %s;\\n' + ' <%s {...props} />\\n' + 'React keys must be passed directly to JSX without using spread:\\n' + ' let props = %s;\\n' + ' <%s key={someKey} {...props} />', beforeExample, componentName, afterExample, componentName);\n\n didWarnAboutKeySpread[componentName + beforeExample] = true;\n }\n }\n }\n\n if (type === REACT_FRAGMENT_TYPE) {\n validateFragmentProps(element);\n } else {\n validatePropTypes(element);\n }\n\n return element;\n }\n} // These two functions exist to still get child warnings in dev\n// even with the prod transform. This means that jsxDEV is purely\n// opt-in behavior for better messages but that we won't stop\n// giving you warnings if you use production apis.\n\nfunction jsxWithValidationStatic(type, props, key) {\n {\n return jsxWithValidation(type, props, key, true);\n }\n}\nfunction jsxWithValidationDynamic(type, props, key) {\n {\n return jsxWithValidation(type, props, key, false);\n }\n}\n\nvar jsx = jsxWithValidationDynamic ; // we may want to special case jsxs internally to take advantage of static children.\n// for now we can ship identical prod functions\n\nvar jsxs = jsxWithValidationStatic ;\n\nexports.Fragment = REACT_FRAGMENT_TYPE;\nexports.jsx = jsx;\nexports.jsxs = jsxs;\n })();\n}\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-jsx-runtime.production.min.js');\n} else {\n module.exports = require('./cjs/react-jsx-runtime.development.js');\n}\n","var __defProp = Object.defineProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, {\n get: all[name],\n enumerable: true,\n configurable: true,\n set: (newValue) => all[name] = () => newValue\n });\n};\n\n// src/_check-rsc.ts\nimport { createContext } from \"react\";\nif (typeof createContext !== \"function\") {\n const err = [\n 'Remotion requires React.createContext, but it is \"undefined\".',\n 'If you are in a React Server Component, turn it into a client component by adding \"use client\" at the top of the file.',\n \"\",\n \"Before:\",\n ' import {useCurrentFrame} from \"remotion\";',\n \"\",\n \"After:\",\n ' \"use client\";',\n ' import {useCurrentFrame} from \"remotion\";'\n ];\n throw new Error(err.join(\"\\n\"));\n}\n\n// src/Clipper.tsx\nimport { useContext, useEffect } from \"react\";\n\n// src/NativeLayers.tsx\nimport { createContext as createContext2, useLayoutEffect, useMemo, useState } from \"react\";\nimport { jsx } from \"react/jsx-runtime\";\nvar NativeLayersContext = createContext2({\n setClipRegion: () => {\n throw new Error(\"NativeLayers not set\");\n },\n clipRegion: null\n});\nvar NativeLayersProvider = ({\n children\n}) => {\n const [clipRegion, setClipRegion] = useState(null);\n const context = useMemo(() => {\n return {\n setClipRegion,\n clipRegion\n };\n }, [clipRegion, setClipRegion]);\n if (typeof window !== \"undefined\") {\n useLayoutEffect(() => {\n window.remotion_getClipRegion = () => {\n return clipRegion;\n };\n }, [clipRegion, setClipRegion]);\n }\n return /* @__PURE__ */ jsx(NativeLayersContext.Provider, {\n value: context,\n children\n });\n};\n\n// src/Clipper.tsx\nvar Clipper = ({ height, width, x, y }) => {\n const { setClipRegion } = useContext(NativeLayersContext);\n useEffect(() => {\n setClipRegion((c) => {\n if (c === \"hide\") {\n throw new Error(\"Cannot render <Clipper>, because another <Null> is already rendered\");\n }\n if (c === null) {\n return { height, width, x, y };\n }\n throw new Error(\"Cannot render <Clipper>, because another component clipping the region was already rendered (most likely <Clipper>)\");\n });\n return () => {\n setClipRegion(null);\n };\n }, [height, setClipRegion, width, x, y]);\n return null;\n};\n\n// src/enable-sequence-stack-traces.ts\nimport React from \"react\";\n\n// src/get-remotion-environment.ts\nfunction getNodeEnvString() {\n return [\"NOD\", \"E_EN\", \"V\"].join(\"\");\n}\nvar getEnvString = () => {\n return [\"e\", \"nv\"].join(\"\");\n};\nvar getRemotionEnvironment = () => {\n const isPlayer = typeof window !== \"undefined\" && window.remotion_isPlayer;\n const isRendering = typeof window !== \"undefined\" && typeof window.process !== \"undefined\" && typeof window.process.env !== \"undefined\" && (window.process[getEnvString()][getNodeEnvString()] === \"test\" || window.process[getEnvString()][getNodeEnvString()] === \"production\" && typeof window !== \"undefined\" && typeof window.remotion_puppeteerTimeout !== \"undefined\");\n const isStudio = typeof window !== \"undefined\" && window.remotion_isStudio;\n return {\n isStudio,\n isRendering,\n isPlayer\n };\n};\n\n// src/enable-sequence-stack-traces.ts\nvar originalCreateElement = React.createElement;\nvar componentsToAddStacksTo = [];\nvar enableSequenceStackTraces = () => {\n if (!getRemotionEnvironment().isStudio) {\n return;\n }\n const proxy = new Proxy(originalCreateElement, {\n apply(target, thisArg, argArray) {\n if (componentsToAddStacksTo.includes(argArray[0])) {\n const [first, props, ...rest] = argArray;\n const newProps = {\n ...props ?? {},\n stack: new Error().stack\n };\n return Reflect.apply(target, thisArg, [first, newProps, ...rest]);\n }\n return Reflect.apply(target, thisArg, argArray);\n }\n });\n React.createElement = proxy;\n};\nvar addSequenceStackTraces = (component) => {\n componentsToAddStacksTo.push(component);\n enableSequenceStackTraces();\n};\n\n// src/is-player.tsx\nimport { createContext as createContext3, useContext as useContext2 } from \"react\";\nimport { jsx as jsx2 } from \"react/jsx-runtime\";\nvar IsPlayerContext = createContext3(false);\nvar IsPlayerContextProvider = ({\n children\n}) => {\n return /* @__PURE__ */ jsx2(IsPlayerContext.Provider, {\n value: true,\n children\n });\n};\nvar useIsPlayer = () => {\n return useContext2(IsPlayerContext);\n};\n\n// src/truthy.ts\nfunction truthy(value) {\n return Boolean(value);\n}\n\n// src/version.ts\nvar VERSION = \"4.0.221\";\n\n// src/multiple-versions-warning.ts\nvar checkMultipleRemotionVersions = () => {\n if (typeof globalThis === \"undefined\") {\n return;\n }\n const alreadyImported = globalThis.remotion_imported || typeof window !== \"undefined\" && window.remotion_imported;\n if (alreadyImported) {\n if (alreadyImported === VERSION) {\n return;\n }\n throw new TypeError(`\\uD83D\\uDEA8 Multiple versions of Remotion detected: ${[\n VERSION,\n typeof alreadyImported === \"string\" ? alreadyImported : \"an older version\"\n ].filter(truthy).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.`);\n }\n globalThis.remotion_imported = VERSION;\n if (typeof window !== \"undefined\") {\n window.remotion_imported = VERSION;\n }\n};\n\n// src/Null.tsx\nimport { useContext as useContext3, useEffect as useEffect2 } from \"react\";\nvar Null = () => {\n const { setClipRegion } = useContext3(NativeLayersContext);\n useEffect2(() => {\n setClipRegion((c) => {\n if (c === null) {\n return \"hide\";\n }\n if (c === \"hide\") {\n return \"hide\";\n }\n throw new Error(\"Cannot render <Null>, because another component clipping the region was already rendered (most likely <Clipper>)\");\n });\n return () => {\n setClipRegion(null);\n };\n }, [setClipRegion]);\n return null;\n};\n\n// src/Sequence.tsx\nimport {\n forwardRef as forwardRef2,\n useContext as useContext12,\n useEffect as useEffect5,\n useMemo as useMemo10,\n useState as useState5\n} from \"react\";\n\n// src/AbsoluteFill.tsx\nimport { forwardRef, useMemo as useMemo2 } from \"react\";\nimport { jsx as jsx3 } from \"react/jsx-runtime\";\nvar AbsoluteFillRefForwarding = (props, ref) => {\n const { style, ...other } = props;\n const actualStyle = useMemo2(() => {\n return {\n position: \"absolute\",\n top: 0,\n left: 0,\n right: 0,\n bottom: 0,\n width: \"100%\",\n height: \"100%\",\n display: \"flex\",\n flexDirection: \"column\",\n ...style\n };\n }, [style]);\n return /* @__PURE__ */ jsx3(\"div\", {\n ref,\n style: actualStyle,\n ...other\n });\n};\nvar AbsoluteFill = forwardRef(AbsoluteFillRefForwarding);\n\n// src/SequenceContext.tsx\nimport { createContext as createContext4 } from \"react\";\nvar SequenceContext = createContext4(null);\n\n// src/SequenceManager.tsx\nimport React3, { useCallback, useMemo as useMemo3, useState as useState2 } from \"react\";\nimport { jsx as jsx4 } from \"react/jsx-runtime\";\nvar SequenceManager = React3.createContext({\n registerSequence: () => {\n throw new Error(\"SequenceManagerContext not initialized\");\n },\n unregisterSequence: () => {\n throw new Error(\"SequenceManagerContext not initialized\");\n },\n sequences: []\n});\nvar SequenceVisibilityToggleContext = React3.createContext({\n hidden: {},\n setHidden: () => {\n throw new Error(\"SequenceVisibilityToggle not initialized\");\n }\n});\nvar SequenceManagerProvider = ({ children }) => {\n const [sequences, setSequences] = useState2([]);\n const [hidden, setHidden] = useState2({});\n const registerSequence = useCallback((seq) => {\n setSequences((seqs) => {\n return [...seqs, seq];\n });\n }, []);\n const unregisterSequence = useCallback((seq) => {\n setSequences((seqs) => seqs.filter((s) => s.id !== seq));\n }, []);\n const sequenceContext = useMemo3(() => {\n return {\n registerSequence,\n sequences,\n unregisterSequence\n };\n }, [registerSequence, sequences, unregisterSequence]);\n const hiddenContext = useMemo3(() => {\n return {\n hidden,\n setHidden\n };\n }, [hidden]);\n return /* @__PURE__ */ jsx4(SequenceManager.Provider, {\n value: sequenceContext,\n children: /* @__PURE__ */ jsx4(SequenceVisibilityToggleContext.Provider, {\n value: hiddenContext,\n children\n })\n });\n};\n\n// src/nonce.ts\nimport { createContext as createContext5, useContext as useContext4, useEffect as useEffect3, useRef, useState as useState3 } from \"react\";\nvar NonceContext = createContext5({\n getNonce: () => 0,\n fastRefreshes: 0\n});\nvar useNonce = () => {\n const context = useContext4(NonceContext);\n const [nonce, setNonce] = useState3(() => context.getNonce());\n const lastContext = useRef(context);\n useEffect3(() => {\n if (lastContext.current === context) {\n return;\n }\n lastContext.current = context;\n setNonce(context.getNonce);\n }, [context]);\n return nonce;\n};\n\n// src/timeline-position-state.ts\nvar exports_timeline_position_state = {};\n__export(exports_timeline_position_state, {\n useTimelineSetFrame: () => useTimelineSetFrame,\n useTimelinePosition: () => useTimelinePosition,\n usePlayingState: () => usePlayingState,\n persistCurrentFrame: () => persistCurrentFrame,\n getInitialFrameState: () => getInitialFrameState,\n getFrameForComposition: () => getFrameForComposition,\n TimelineContext: () => TimelineContext,\n SetTimelineContext: () => SetTimelineContext\n});\nimport { createContext as createContext9, useContext as useContext7, useMemo as useMemo7 } from \"react\";\n\n// src/use-video.ts\nimport { useContext as useContext6, useMemo as useMemo6 } from \"react\";\n\n// src/CompositionManagerContext.tsx\nimport { createContext as createContext6 } from \"react\";\nvar CompositionManager = createContext6({\n compositions: [],\n registerComposition: () => {\n return;\n },\n unregisterComposition: () => {\n return;\n },\n registerFolder: () => {\n return;\n },\n unregisterFolder: () => {\n return;\n },\n setCurrentCompositionMetadata: () => {\n return;\n },\n updateCompositionDefaultProps: () => {\n return;\n },\n folders: [],\n currentCompositionMetadata: null,\n canvasContent: null,\n setCanvasContent: () => {\n return;\n }\n});\n\n// src/ResolveCompositionConfig.tsx\nimport {\n createContext as createContext8,\n createRef,\n useCallback as useCallback3,\n useContext as useContext5,\n useEffect as useEffect4,\n useImperativeHandle as useImperativeHandle2,\n useMemo as useMemo5,\n useState as useState4\n} from \"react\";\n\n// src/EditorProps.tsx\nimport React4, {\n createContext as createContext7,\n useCallback as useCallback2,\n useImperativeHandle,\n useMemo as useMemo4\n} from \"react\";\nimport { jsx as jsx5 } from \"react/jsx-runtime\";\nvar EditorPropsContext = createContext7({\n props: {},\n updateProps: () => {\n throw new Error(\"Not implemented\");\n },\n resetUnsaved: () => {\n throw new Error(\"Not implemented\");\n }\n});\nvar editorPropsProviderRef = React4.createRef();\nvar EditorPropsProvider = ({ children }) => {\n const [props, setProps] = React4.useState({});\n const updateProps = useCallback2(({\n defaultProps,\n id,\n newProps\n }) => {\n setProps((prev) => {\n return {\n ...prev,\n [id]: typeof newProps === \"function\" ? newProps(prev[id] ?? defaultProps) : newProps\n };\n });\n }, []);\n const resetUnsaved = useCallback2(() => {\n setProps({});\n }, []);\n useImperativeHandle(editorPropsProviderRef, () => {\n return {\n getProps: () => props,\n setProps\n };\n }, [props]);\n const ctx = useMemo4(() => {\n return { props, updateProps, resetUnsaved };\n }, [props, resetUnsaved, updateProps]);\n return /* @__PURE__ */ jsx5(EditorPropsContext.Provider, {\n value: ctx,\n children\n });\n};\n\n// src/static-file.ts\nvar problematicCharacters = {\n \"%3A\": \":\",\n \"%2F\": \"/\",\n \"%3F\": \"?\",\n \"%23\": \"#\",\n \"%5B\": \"[\",\n \"%5D\": \"]\",\n \"%40\": \"@\",\n \"%21\": \"!\",\n \"%24\": \"$\",\n \"%26\": \"&\",\n \"%27\": \"'\",\n \"%28\": \"(\",\n \"%29\": \")\",\n \"%2A\": \"*\",\n \"%2B\": \"+\",\n \"%2C\": \",\",\n \"%3B\": \";\"\n};\nvar didWarn = {};\nvar warnOnce = (message) => {\n if (didWarn[message]) {\n return;\n }\n console.warn(message);\n didWarn[message] = true;\n};\nvar includesHexOfUnsafeChar = (path) => {\n for (const key of Object.keys(problematicCharacters)) {\n if (path.includes(key)) {\n return { containsHex: true, hexCode: key };\n }\n }\n return { containsHex: false };\n};\nvar trimLeadingSlash = (path) => {\n if (path.startsWith(\"/\")) {\n return trimLeadingSlash(path.substring(1));\n }\n return path;\n};\nvar inner = (path) => {\n if (typeof window !== \"undefined\" && window.remotion_staticBase) {\n if (path.startsWith(window.remotion_staticBase)) {\n throw new Error(`The value \"${path}\" is already prefixed with the static base ${window.remotion_staticBase}. You don't need to call staticFile() on it.`);\n }\n return `${window.remotion_staticBase}/${trimLeadingSlash(path)}`;\n }\n return `/${trimLeadingSlash(path)}`;\n};\nvar encodeBySplitting = (path) => {\n const splitBySlash = path.split(\"/\");\n const encodedArray = splitBySlash.map((element) => {\n return encodeURIComponent(element);\n });\n const merged = encodedArray.join(\"/\");\n return merged;\n};\nvar staticFile = (path) => {\n if (path.startsWith(\"http://\") || path.startsWith(\"https://\")) {\n throw new TypeError(`staticFile() does not support remote URLs - got \"${path}\". Instead, pass the URL without wrapping it in staticFile(). See: https://remotion.dev/docs/staticfile-remote-urls`);\n }\n if (path.startsWith(\"..\") || path.startsWith(\"./\")) {\n throw new TypeError(`staticFile() does not support relative paths - got \"${path}\". Instead, pass the name of a file that is inside the public/ folder. See: https://remotion.dev/docs/staticfile-relative-paths`);\n }\n if (path.startsWith(\"/Users\") || path.startsWith(\"/home\") || path.startsWith(\"/tmp\") || path.startsWith(\"/etc\") || path.startsWith(\"/opt\") || path.startsWith(\"/var\") || path.startsWith(\"C:\") || path.startsWith(\"D:\") || path.startsWith(\"E:\")) {\n throw new TypeError(`staticFile() does not support absolute paths - got \"${path}\". Instead, pass the name of a file that is inside the public/ folder. See: https://remotion.dev/docs/staticfile-relative-paths`);\n }\n if (path.startsWith(\"public/\")) {\n throw new TypeError(`Do not include the public/ prefix when using staticFile() - got \"${path}\". See: https://remotion.dev/docs/staticfile-relative-paths`);\n }\n const includesHex = includesHexOfUnsafeChar(path);\n if (includesHex.containsHex) {\n warnOnce(`WARNING: You seem to pass an already encoded path (path contains ${includesHex.hexCode}). Since Remotion 4.0, the encoding is done by staticFile() itself. You may want to remove a encodeURIComponent() wrapping.`);\n }\n const preprocessed = encodeBySplitting(path);\n const preparsed = inner(preprocessed);\n if (!preparsed.startsWith(\"/\")) {\n return `/${preparsed}`;\n }\n return preparsed;\n};\n\n// src/input-props-serialization.ts\nvar DATE_TOKEN = \"remotion-date:\";\nvar FILE_TOKEN = \"remotion-file:\";\nvar serializeJSONWithDate = ({\n data,\n indent,\n staticBase\n}) => {\n let customDateUsed = false;\n let customFileUsed = false;\n let mapUsed = false;\n let setUsed = false;\n try {\n const serializedString = JSON.stringify(data, function(key, value) {\n const item = this[key];\n if (item instanceof Date) {\n customDateUsed = true;\n return `${DATE_TOKEN}${item.toISOString()}`;\n }\n if (item instanceof Map) {\n mapUsed = true;\n return value;\n }\n if (item instanceof Set) {\n setUsed = true;\n return value;\n }\n if (typeof item === \"string\" && staticBase !== null && item.startsWith(staticBase)) {\n customFileUsed = true;\n return `${FILE_TOKEN}${item.replace(staticBase + \"/\", \"\")}`;\n }\n return value;\n }, indent);\n return { serializedString, customDateUsed, customFileUsed, mapUsed, setUsed };\n } catch (err) {\n throw new Error(\"Could not serialize the passed input props to JSON: \" + err.message);\n }\n};\nvar deserializeJSONWithCustomFields = (data) => {\n return JSON.parse(data, (_, value) => {\n if (typeof value === \"string\" && value.startsWith(DATE_TOKEN)) {\n return new Date(value.replace(DATE_TOKEN, \"\"));\n }\n if (typeof value === \"string\" && value.startsWith(FILE_TOKEN)) {\n return staticFile(value.replace(FILE_TOKEN, \"\"));\n }\n return value;\n });\n};\nvar serializeThenDeserializeInStudio = (props) => {\n if (getRemotionEnvironment().isStudio) {\n return deserializeJSONWithCustomFields(serializeJSONWithDate({\n data: props,\n indent: 2,\n staticBase: window.remotion_staticBase\n }).serializedString);\n }\n return props;\n};\n\n// src/config/input-props.ts\nvar didWarnSSRImport = false;\nvar warnOnceSSRImport = () => {\n if (didWarnSSRImport) {\n return;\n }\n didWarnSSRImport = true;\n console.warn(\"Called `getInputProps()` on the server. This function is not available server-side and has returned an empty object.\");\n console.warn(\"To hide this warning, don't call this function on the server:\");\n console.warn(\" typeof window === 'undefined' ? {} : getInputProps()\");\n};\nvar getInputProps = () => {\n if (typeof window === \"undefined\") {\n warnOnceSSRImport();\n return {};\n }\n if (getRemotionEnvironment().isPlayer) {\n throw new Error(\"You cannot call `getInputProps()` from a <Player>. Instead, the props are available as React props from component that you passed as `component` prop.\");\n }\n const param = window.remotion_inputProps;\n if (!param) {\n return {};\n }\n const parsed = deserializeJSONWithCustomFields(param);\n return parsed;\n};\n\n// src/codec.ts\nvar validCodecs = [\n \"h264\",\n \"h265\",\n \"vp8\",\n \"vp9\",\n \"mp3\",\n \"aac\",\n \"wav\",\n \"prores\",\n \"h264-mkv\",\n \"h264-ts\",\n \"gif\"\n];\n\n// src/validation/validate-default-codec.ts\nfunction validateDefaultCodec(defaultCodec, location) {\n if (typeof defaultCodec === \"undefined\") {\n return;\n }\n if (typeof defaultCodec !== \"string\") {\n throw new TypeError(`The \"defaultCodec\" prop ${location} must be a string, but you passed a value of type ${typeof defaultCodec}.`);\n }\n if (!validCodecs.includes(defaultCodec)) {\n throw new Error(`The \"defaultCodec\" prop ${location} must be one of ${validCodecs.join(\", \")}, but you passed ${defaultCodec}.`);\n }\n}\n\n// src/validation/validate-dimensions.ts\nfunction validateDimension(amount, nameOfProp, location) {\n if (typeof amount !== \"number\") {\n throw new Error(`The \"${nameOfProp}\" prop ${location} must be a number, but you passed a value of type ${typeof amount}`);\n }\n if (isNaN(amount)) {\n throw new TypeError(`The \"${nameOfProp}\" prop ${location} must not be NaN, but is NaN.`);\n }\n if (!Number.isFinite(amount)) {\n throw new TypeError(`The \"${nameOfProp}\" prop ${location} must be finite, but is ${amount}.`);\n }\n if (amount % 1 !== 0) {\n throw new TypeError(`The \"${nameOfProp}\" prop ${location} must be an integer, but is ${amount}.`);\n }\n if (amount <= 0) {\n throw new TypeError(`The \"${nameOfProp}\" prop ${location} must be positive, but got ${amount}.`);\n }\n}\n\n// src/validation/validate-duration-in-frames.ts\nfunction validateDurationInFrames(durationInFrames, options) {\n const { allowFloats, component } = options;\n if (typeof durationInFrames === \"undefined\") {\n throw new Error(`The \"durationInFrames\" prop ${component} is missing.`);\n }\n if (typeof durationInFrames !== \"number\") {\n throw new Error(`The \"durationInFrames\" prop ${component} must be a number, but you passed a value of type ${typeof durationInFrames}`);\n }\n if (durationInFrames <= 0) {\n throw new TypeError(`The \"durationInFrames\" prop ${component} must be positive, but got ${durationInFrames}.`);\n }\n if (!allowFloats && durationInFrames % 1 !== 0) {\n throw new TypeError(`The \"durationInFrames\" prop ${component} must be an integer, but got ${durationInFrames}.`);\n }\n if (!Number.isFinite(durationInFrames)) {\n throw new TypeError(`The \"durationInFrames\" prop ${component} must be finite, but got ${durationInFrames}.`);\n }\n}\n\n// src/validation/validate-fps.ts\nfunction validateFps(fps, location, isGif) {\n if (typeof fps !== \"number\") {\n throw new Error(`\"fps\" must be a number, but you passed a value of type ${typeof fps} ${location}`);\n }\n if (!Number.isFinite(fps)) {\n throw new Error(`\"fps\" must be a finite, but you passed ${fps} ${location}`);\n }\n if (isNaN(fps)) {\n throw new Error(`\"fps\" must not be NaN, but got ${fps} ${location}`);\n }\n if (fps <= 0) {\n throw new TypeError(`\"fps\" must be positive, but got ${fps} ${location}`);\n }\n if (isGif && fps > 50) {\n throw new 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`);\n }\n}\n\n// src/resolve-video-config.ts\nvar validateCalculated = ({\n calculated,\n compositionId,\n compositionFps,\n compositionHeight,\n compositionWidth,\n compositionDurationInFrames\n}) => {\n const calculateMetadataErrorLocation = `calculated by calculateMetadata() for the composition \"${compositionId}\"`;\n const defaultErrorLocation = `of the \"<Composition />\" component with the id \"${compositionId}\"`;\n const width = calculated?.width ?? compositionWidth ?? undefined;\n validateDimension(width, \"width\", calculated?.width ? calculateMetadataErrorLocation : defaultErrorLocation);\n const height = calculated?.height ?? compositionHeight ?? undefined;\n validateDimension(height, \"height\", calculated?.height ? calculateMetadataErrorLocation : defaultErrorLocation);\n const fps = calculated?.fps ?? compositionFps ?? null;\n validateFps(fps, calculated?.fps ? calculateMetadataErrorLocation : defaultErrorLocation, false);\n const durationInFrames = calculated?.durationInFrames ?? compositionDurationInFrames ?? null;\n validateDurationInFrames(durationInFrames, {\n allowFloats: false,\n component: `of the \"<Composition />\" component with the id \"${compositionId}\"`\n });\n const defaultCodec = calculated?.defaultCodec;\n validateDefaultCodec(defaultCodec, calculateMetadataErrorLocation);\n return { width, height, fps, durationInFrames, defaultCodec };\n};\nvar resolveVideoConfig = ({\n calculateMetadata,\n signal,\n defaultProps,\n originalProps,\n compositionId,\n compositionDurationInFrames,\n compositionFps,\n compositionHeight,\n compositionWidth\n}) => {\n const calculatedProm = calculateMetadata ? calculateMetadata({\n defaultProps,\n props: originalProps,\n abortSignal: signal,\n compositionId\n }) : null;\n if (calculatedProm !== null && typeof calculatedProm === \"object\" && \"then\" in calculatedProm) {\n return calculatedProm.then((c) => {\n const { height, width, durationInFrames, fps, defaultCodec } = validateCalculated({\n calculated: c,\n compositionDurationInFrames,\n compositionFps,\n compositionHeight,\n compositionWidth,\n compositionId\n });\n return {\n width,\n height,\n fps,\n durationInFrames,\n id: compositionId,\n defaultProps: serializeThenDeserializeInStudio(defaultProps),\n props: serializeThenDeserializeInStudio(c.props ?? originalProps),\n defaultCodec: defaultCodec ?? null\n };\n });\n }\n const data = validateCalculated({\n calculated: calculatedProm,\n compositionDurationInFrames,\n compositionFps,\n compositionHeight,\n compositionWidth,\n compositionId\n });\n if (calculatedProm === null) {\n return {\n ...data,\n id: compositionId,\n defaultProps: serializeThenDeserializeInStudio(defaultProps ?? {}),\n props: serializeThenDeserializeInStudio(originalProps),\n defaultCodec: null\n };\n }\n return {\n ...data,\n id: compositionId,\n defaultProps: serializeThenDeserializeInStudio(defaultProps ?? {}),\n props: serializeThenDeserializeInStudio(calculatedProm.props ?? originalProps),\n defaultCodec: calculatedProm.defaultCodec ?? null\n };\n};\nvar resolveVideoConfigOrCatch = (params) => {\n try {\n const promiseOrReturnValue = resolveVideoConfig(params);\n return {\n type: \"success\",\n result: promiseOrReturnValue\n };\n } catch (err) {\n return {\n type: \"error\",\n error: err\n };\n }\n};\n\n// src/ResolveCompositionConfig.tsx\nimport { jsx as jsx6 } from \"react/jsx-runtime\";\nvar ResolveCompositionContext = createContext8(null);\nvar resolveCompositionsRef = createRef();\nvar needsResolution = (composition) => {\n return Boolean(composition.calculateMetadata);\n};\nvar PROPS_UPDATED_EXTERNALLY = \"remotion.propsUpdatedExternally\";\nvar ResolveCompositionConfig = ({ children }) => {\n const [currentRenderModalComposition, setCurrentRenderModalComposition] = useState4(null);\n const { compositions, canvasContent, currentCompositionMetadata } = useContext5(CompositionManager);\n const { fastRefreshes } = useContext5(NonceContext);\n const selectedComposition = useMemo5(() => {\n return compositions.find((c) => canvasContent && canvasContent.type === \"composition\" && canvasContent.compositionId === c.id);\n }, [canvasContent, compositions]);\n const renderModalComposition = compositions.find((c) => c.id === currentRenderModalComposition);\n const { props: allEditorProps } = useContext5(EditorPropsContext);\n const inputProps = useMemo5(() => {\n return typeof window === \"undefined\" || getRemotionEnvironment().isPlayer ? {} : getInputProps() ?? {};\n }, []);\n const [resolvedConfigs, setResolvedConfigs] = useState4({});\n const selectedEditorProps = useMemo5(() => {\n return selectedComposition ? allEditorProps[selectedComposition.id] ?? {} : {};\n }, [allEditorProps, selectedComposition]);\n const renderModalProps = useMemo5(() => {\n return renderModalComposition ? allEditorProps[renderModalComposition.id] ?? {} : {};\n }, [allEditorProps, renderModalComposition]);\n const hasResolution = Boolean(currentCompositionMetadata);\n const doResolution = useCallback3(({\n calculateMetadata,\n combinedProps,\n compositionDurationInFrames,\n compositionFps,\n compositionHeight,\n compositionId,\n compositionWidth,\n defaultProps\n }) => {\n const controller = new AbortController;\n if (hasResolution) {\n return controller;\n }\n const { signal } = controller;\n const result = resolveVideoConfigOrCatch({\n compositionId,\n calculateMetadata,\n originalProps: combinedProps,\n signal,\n defaultProps,\n compositionDurationInFrames,\n compositionFps,\n compositionHeight,\n compositionWidth\n });\n if (result.type === \"error\") {\n setResolvedConfigs((r) => ({\n ...r,\n [compositionId]: {\n type: \"error\",\n error: result.error\n }\n }));\n return controller;\n }\n const promOrNot = result.result;\n if (typeof promOrNot === \"object\" && \"then\" in promOrNot) {\n setResolvedConfigs((r) => {\n const prev = r[compositionId];\n if (prev?.type === \"success\" || prev?.type === \"success-and-refreshing\") {\n return {\n ...r,\n [compositionId]: {\n type: \"success-and-refreshing\",\n result: prev.result\n }\n };\n }\n return {\n ...r,\n [compositionId]: {\n type: \"loading\"\n }\n };\n });\n promOrNot.then((c) => {\n if (controller.signal.aborted) {\n return;\n }\n setResolvedConfigs((r) => ({\n ...r,\n [compositionId]: {\n type: \"success\",\n result: c\n }\n }));\n }).catch((err) => {\n if (controller.signal.aborted) {\n return;\n }\n setResolvedConfigs((r) => ({\n ...r,\n [compositionId]: {\n type: \"error\",\n error: err\n }\n }));\n });\n } else {\n setResolvedConfigs((r) => ({\n ...r,\n [compositionId]: {\n type: \"success\",\n result: promOrNot\n }\n }));\n }\n return controller;\n }, [hasResolution]);\n const currentComposition = canvasContent?.type === \"composition\" ? canvasContent.compositionId : null;\n useImperativeHandle2(resolveCompositionsRef, () => {\n return {\n setCurrentRenderModalComposition: (id) => {\n setCurrentRenderModalComposition(id);\n },\n reloadCurrentlySelectedComposition: () => {\n if (!currentComposition) {\n return;\n }\n const composition = compositions.find((c) => c.id === currentComposition);\n if (!composition) {\n throw new Error(`Could not find composition with id ${currentComposition}`);\n }\n const editorProps = allEditorProps[currentComposition] ?? {};\n const defaultProps = {\n ...composition.defaultProps ?? {},\n ...editorProps ?? {}\n };\n const props = {\n ...defaultProps,\n ...inputProps ?? {}\n };\n doResolution({\n defaultProps,\n calculateMetadata: composition.calculateMetadata,\n combinedProps: props,\n compositionDurationInFrames: composition.durationInFrames ?? null,\n compositionFps: composition.fps ?? null,\n compositionHeight: composition.height ?? null,\n compositionWidth: composition.width ?? null,\n compositionId: composition.id\n });\n }\n };\n }, [\n allEditorProps,\n compositions,\n currentComposition,\n doResolution,\n inputProps\n ]);\n const isTheSame = selectedComposition?.id === renderModalComposition?.id;\n const currentDefaultProps = useMemo5(() => {\n return {\n ...selectedComposition?.defaultProps ?? {},\n ...selectedEditorProps ?? {}\n };\n }, [selectedComposition?.defaultProps, selectedEditorProps]);\n const originalProps = useMemo5(() => {\n return {\n ...currentDefaultProps,\n ...inputProps ?? {}\n };\n }, [currentDefaultProps, inputProps]);\n const canResolve = selectedComposition && needsResolution(selectedComposition);\n const shouldIgnoreUpdate = typeof window !== \"undefined\" && window.remotion_ignoreFastRefreshUpdate && fastRefreshes <= window.remotion_ignoreFastRefreshUpdate;\n useEffect4(() => {\n if (shouldIgnoreUpdate) {\n return;\n }\n if (canResolve) {\n const controller = doResolution({\n calculateMetadata: selectedComposition.calculateMetadata,\n combinedProps: originalProps,\n compositionDurationInFrames: selectedComposition.durationInFrames ?? null,\n compositionFps: selectedComposition.fps ?? null,\n compositionHeight: selectedComposition.height ?? null,\n compositionWidth: selectedComposition.width ?? null,\n defaultProps: currentDefaultProps,\n compositionId: selectedComposition.id\n });\n return () => {\n controller.abort();\n };\n }\n }, [\n canResolve,\n currentDefaultProps,\n doResolution,\n originalProps,\n selectedComposition?.calculateMetadata,\n selectedComposition?.durationInFrames,\n selectedComposition?.fps,\n selectedComposition?.height,\n selectedComposition?.id,\n selectedComposition?.width,\n shouldIgnoreUpdate\n ]);\n useEffect4(() => {\n if (shouldIgnoreUpdate) {\n return;\n }\n window.dispatchEvent(new CustomEvent(\"remotion.propsUpdatedExternally\"));\n }, [fastRefreshes]);\n useEffect4(() => {\n if (renderModalComposition && !isTheSame) {\n const combinedProps = {\n ...renderModalComposition.defaultProps ?? {},\n ...renderModalProps ?? {},\n ...inputProps ?? {}\n };\n const controller = doResolution({\n calculateMetadata: renderModalComposition.calculateMetadata,\n compositionDurationInFrames: renderModalComposition.durationInFrames ?? null,\n compositionFps: renderModalComposition.fps ?? null,\n compositionHeight: renderModalComposition.height ?? null,\n compositionId: renderModalComposition.id,\n compositionWidth: renderModalComposition.width ?? null,\n defaultProps: currentDefaultProps,\n combinedProps\n });\n return () => {\n controller.abort();\n };\n }\n }, [\n currentDefaultProps,\n doResolution,\n inputProps,\n isTheSame,\n renderModalComposition,\n renderModalProps\n ]);\n const resolvedConfigsIncludingStaticOnes = useMemo5(() => {\n const staticComps = compositions.filter((c) => {\n return c.calculateMetadata === null;\n });\n return {\n ...resolvedConfigs,\n ...staticComps.reduce((acc, curr) => {\n return {\n ...acc,\n [curr.id]: {\n type: \"success\",\n result: { ...curr, defaultProps: curr.defaultProps ?? {} }\n }\n };\n }, {})\n };\n }, [compositions, resolvedConfigs]);\n return /* @__PURE__ */ jsx6(ResolveCompositionContext.Provider, {\n value: resolvedConfigsIncludingStaticOnes,\n children\n });\n};\nvar useResolvedVideoConfig = (preferredCompositionId) => {\n const context = useContext5(ResolveCompositionContext);\n const { props: allEditorProps } = useContext5(EditorPropsContext);\n const { compositions, canvasContent, currentCompositionMetadata } = useContext5(CompositionManager);\n const currentComposition = canvasContent?.type === \"composition\" ? canvasContent.compositionId : null;\n const compositionId = preferredCompositionId ?? currentComposition;\n const composition = compositions.find((c) => c.id === compositionId);\n const selectedEditorProps = useMemo5(() => {\n return composition ? allEditorProps[composition.id] ?? {} : {};\n }, [allEditorProps, composition]);\n return useMemo5(() => {\n if (!composition) {\n return null;\n }\n if (currentCompositionMetadata) {\n return {\n type: \"success\",\n result: {\n ...currentCompositionMetadata,\n id: composition.id,\n props: currentCompositionMetadata.props,\n defaultProps: composition.defaultProps ?? {},\n defaultCodec: currentCompositionMetadata.defaultCodec\n }\n };\n }\n if (!needsResolution(composition)) {\n validateDurationInFrames(composition.durationInFrames, {\n allowFloats: false,\n component: `in <Composition id=\"${composition.id}\">`\n });\n validateFps(composition.fps, `in <Composition id=\"${composition.id}\">`, false);\n validateDimension(composition.width, \"width\", `in <Composition id=\"${composition.id}\">`);\n validateDimension(composition.height, \"height\", `in <Composition id=\"${composition.id}\">`);\n return {\n type: \"success\",\n result: {\n width: composition.width,\n height: composition.height,\n fps: composition.fps,\n id: composition.id,\n durationInFrames: composition.durationInFrames,\n defaultProps: composition.defaultProps ?? {},\n props: {\n ...composition.defaultProps ?? {},\n ...selectedEditorProps ?? {},\n ...typeof window === \"undefined\" || getRemotionEnvironment().isPlayer ? {} : getInputProps() ?? {}\n },\n defaultCodec: null\n }\n };\n }\n if (!context[composition.id]) {\n return null;\n }\n return context[composition.id];\n }, [composition, context, currentCompositionMetadata, selectedEditorProps]);\n};\n\n// src/use-video.ts\nvar useVideo = () => {\n const { canvasContent, compositions, currentCompositionMetadata } = useContext6(CompositionManager);\n const selected = compositions.find((c) => {\n return canvasContent?.type === \"composition\" && c.id === canvasContent.compositionId;\n });\n const resolved = useResolvedVideoConfig(selected?.id ?? null);\n return useMemo6(() => {\n if (!resolved) {\n return null;\n }\n if (resolved.type === \"error\") {\n return null;\n }\n if (resolved.type === \"loading\") {\n return null;\n }\n if (!selected) {\n return null;\n }\n return {\n ...resolved.result,\n defaultProps: selected.defaultProps ?? {},\n id: selected.id,\n ...currentCompositionMetadata ?? {},\n component: selected.component\n };\n }, [currentCompositionMetadata, resolved, selected]);\n};\n\n// src/timeline-position-state.ts\nvar TimelineContext = createContext9({\n frame: {},\n playing: false,\n playbackRate: 1,\n rootId: \"\",\n imperativePlaying: {\n current: false\n },\n setPlaybackRate: () => {\n throw new Error(\"default\");\n },\n audioAndVideoTags: { current: [] }\n});\nvar SetTimelineContext = createContext9({\n setFrame: () => {\n throw new Error(\"default\");\n },\n setPlaying: () => {\n throw new Error(\"default\");\n }\n});\nvar makeKey = () => {\n return `remotion.time-all`;\n};\nvar persistCurrentFrame = (time) => {\n localStorage.setItem(makeKey(), JSON.stringify(time));\n};\nvar getInitialFrameState = () => {\n const item = localStorage.getItem(makeKey()) ?? \"{}\";\n const obj = JSON.parse(item);\n return obj;\n};\nvar getFrameForComposition = (composition) => {\n const item = localStorage.getItem(makeKey()) ?? \"{}\";\n const obj = JSON.parse(item);\n if (obj[composition] !== undefined) {\n return Number(obj[composition]);\n }\n if (typeof window === \"undefined\") {\n return 0;\n }\n return window.remotion_initialFrame ?? 0;\n};\nvar useTimelinePosition = () => {\n const videoConfig = useVideo();\n const state = useContext7(TimelineContext);\n if (!videoConfig) {\n return typeof window === \"undefined\" ? 0 : window.remotion_initialFrame ?? 0;\n }\n const unclamped = state.frame[videoConfig.id] ?? (getRemotionEnvironment().isPlayer ? 0 : getFrameForComposition(videoConfig.id));\n return Math.min(videoConfig.durationInFrames - 1, unclamped);\n};\nvar useTimelineSetFrame = () => {\n const { setFrame } = useContext7(SetTimelineContext);\n return setFrame;\n};\nvar usePlayingState = () => {\n const { playing, imperativePlaying } = useContext7(TimelineContext);\n const { setPlaying } = useContext7(SetTimelineContext);\n return useMemo7(() => [playing, setPlaying, imperativePlaying], [imperativePlaying, playing, setPlaying]);\n};\n\n// src/use-video-config.ts\nimport { useContext as useContext9 } from \"react\";\n\n// src/CanUseRemotionHooks.tsx\nimport { createContext as createContext10 } from \"react\";\nimport { jsx as jsx7 } from \"react/jsx-runtime\";\nvar CanUseRemotionHooks = createContext10(false);\nvar CanUseRemotionHooksProvider = ({ children }) => {\n return /* @__PURE__ */ jsx7(CanUseRemotionHooks.Provider, {\n value: true,\n children\n });\n};\n\n// src/use-unsafe-video-config.ts\nimport { useContext as useContext8, useMemo as useMemo8 } from \"react\";\nvar useUnsafeVideoConfig = () => {\n const context = useContext8(SequenceContext);\n const ctxWidth = context?.width ?? null;\n const ctxHeight = context?.height ?? null;\n const ctxDuration = context?.durationInFrames ?? null;\n const video = useVideo();\n return useMemo8(() => {\n if (!video) {\n return null;\n }\n const {\n id,\n durationInFrames,\n fps,\n height,\n width,\n defaultProps,\n props,\n defaultCodec\n } = video;\n return {\n id,\n width: ctxWidth ?? width,\n height: ctxHeight ?? height,\n fps,\n durationInFrames: ctxDuration ?? durationInFrames,\n defaultProps,\n props,\n defaultCodec\n };\n }, [ctxDuration, ctxHeight, ctxWidth, video]);\n};\n\n// src/use-video-config.ts\nvar useVideoConfig = () => {\n const videoConfig = useUnsafeVideoConfig();\n const context = useContext9(CanUseRemotionHooks);\n const isPlayer = useIsPlayer();\n if (!videoConfig) {\n if (typeof window !== \"undefined\" && window.remotion_isPlayer || isPlayer) {\n throw new Error([\n \"No video config found. Likely reasons:\",\n \"- 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.\",\n \"- You have multiple versions of Remotion installed which causes the React context to get lost.\"\n ].join(\"-\"));\n }\n throw new 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.\");\n }\n if (!context) {\n throw new Error(\"Called useVideoConfig() outside a Remotion composition.\");\n }\n return videoConfig;\n};\n\n// src/freeze.tsx\nimport { useContext as useContext11, useMemo as useMemo9 } from \"react\";\n\n// src/use-current-frame.ts\nimport { useContext as useContext10 } from \"react\";\nvar useCurrentFrame = () => {\n const canUseRemotionHooks = useContext10(CanUseRemotionHooks);\n if (!canUseRemotionHooks) {\n if (getRemotionEnvironment().isPlayer) {\n throw new Error(`useCurrentFrame can only be called inside a component that was passed to <Player>. See: https://www.remotion.dev/docs/player/examples`);\n }\n throw new 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`);\n }\n const frame = useTimelinePosition();\n const context = useContext10(SequenceContext);\n const contextOffset = context ? context.cumulatedFrom + context.relativeFrom : 0;\n return frame - contextOffset;\n};\n\n// src/freeze.tsx\nimport { jsx as jsx8 } from \"react/jsx-runtime\";\nvar Freeze = ({\n frame: frameToFreeze,\n children,\n active = true\n}) => {\n const frame = useCurrentFrame();\n const videoConfig = useVideoConfig();\n if (typeof frameToFreeze === \"undefined\") {\n throw new Error(`The <Freeze /> component requires a 'frame' prop, but none was passed.`);\n }\n if (typeof frameToFreeze !== \"number\") {\n throw new Error(`The 'frame' prop of <Freeze /> must be a number, but is of type ${typeof frameToFreeze}`);\n }\n if (Number.isNaN(frameToFreeze)) {\n throw new Error(`The 'frame' prop of <Freeze /> must be a real number, but it is NaN.`);\n }\n if (!Number.isFinite(frameToFreeze)) {\n throw new Error(`The 'frame' prop of <Freeze /> must be a finite number, but it is ${frameToFreeze}.`);\n }\n const isActive = useMemo9(() => {\n if (typeof active === \"boolean\") {\n return active;\n }\n if (typeof active === \"function\") {\n return active(frame);\n }\n }, [active, frame]);\n const timelineContext = useContext11(TimelineContext);\n const sequenceContext = useContext11(SequenceContext);\n const relativeFrom = sequenceContext?.relativeFrom ?? 0;\n const timelineValue = useMemo9(() => {\n if (!isActive) {\n return timelineContext;\n }\n return {\n ...timelineContext,\n playing: false,\n imperativePlaying: {\n current: false\n },\n frame: {\n [videoConfig.id]: frameToFreeze + relativeFrom\n }\n };\n }, [isActive, timelineContext, videoConfig.id, frameToFreeze, relativeFrom]);\n return /* @__PURE__ */ jsx8(TimelineContext.Provider, {\n value: timelineValue,\n children\n });\n};\n\n// src/Sequence.tsx\nimport { jsx as jsx9 } from \"react/jsx-runtime\";\nvar RegularSequenceRefForwardingFunction = ({\n from = 0,\n durationInFrames = Infinity,\n children,\n name,\n height,\n width,\n showInTimeline = true,\n _remotionInternalLoopDisplay: loopDisplay,\n _remotionInternalStack: stack,\n _remotionInternalPremountDisplay: premountDisplay,\n ...other\n}, ref) => {\n const { layout = \"absolute-fill\" } = other;\n const [id] = useState5(() => String(Math.random()));\n const parentSequence = useContext12(SequenceContext);\n const { rootId } = useContext12(TimelineContext);\n const cumulatedFrom = parentSequence ? parentSequence.cumulatedFrom + parentSequence.relativeFrom : 0;\n const nonce = useNonce();\n if (layout !== \"absolute-fill\" && layout !== \"none\") {\n throw new TypeError(`The layout prop of <Sequence /> expects either \"absolute-fill\" or \"none\", but you passed: ${layout}`);\n }\n if (layout === \"none\" && typeof other.style !== \"undefined\") {\n throw new TypeError('If layout=\"none\", you may not pass a style.');\n }\n if (typeof durationInFrames !== \"number\") {\n throw new TypeError(`You passed to durationInFrames an argument of type ${typeof durationInFrames}, but it must be a number.`);\n }\n if (durationInFrames <= 0) {\n throw new TypeError(`durationInFrames must be positive, but got ${durationInFrames}`);\n }\n if (typeof from !== \"number\") {\n throw new TypeError(`You passed to the \"from\" props of your <Sequence> an argument of type ${typeof from}, but it must be a number.`);\n }\n if (!Number.isFinite(from)) {\n throw new TypeError(`The \"from\" prop of a sequence must be finite, but got ${from}.`);\n }\n const absoluteFrame = useTimelinePosition();\n const videoConfig = useVideoConfig();\n const parentSequenceDuration = parentSequence ? Math.min(parentSequence.durationInFrames - from, durationInFrames) : durationInFrames;\n const actualDurationInFrames = Math.max(0, Math.min(videoConfig.durationInFrames - from, parentSequenceDuration));\n const { registerSequence, unregisterSequence } = useContext12(SequenceManager);\n const { hidden } = useContext12(SequenceVisibilityToggleContext);\n const premounting = useMemo10(() => {\n return parentSequence?.premounting ?? Boolean(other._remotionInternalIsPremounting);\n }, [other._remotionInternalIsPremounting, parentSequence?.premounting]);\n const contextValue = useMemo10(() => {\n return {\n cumulatedFrom,\n relativeFrom: from,\n durationInFrames: actualDurationInFrames,\n parentFrom: parentSequence?.relativeFrom ?? 0,\n id,\n height: height ?? parentSequence?.height ?? null,\n width: width ?? parentSequence?.width ?? null,\n premounting\n };\n }, [\n cumulatedFrom,\n from,\n actualDurationInFrames,\n parentSequence,\n id,\n height,\n width,\n premounting\n ]);\n const timelineClipName = useMemo10(() => {\n return name ?? \"\";\n }, [name]);\n useEffect5(() => {\n if (!getRemotionEnvironment().isStudio) {\n return;\n }\n registerSequence({\n from,\n duration: actualDurationInFrames,\n id,\n displayName: timelineClipName,\n parent: parentSequence?.id ?? null,\n type: \"sequence\",\n rootId,\n showInTimeline,\n nonce,\n loopDisplay,\n stack: stack ?? null,\n premountDisplay: premountDisplay ?? null\n });\n return () => {\n unregisterSequence(id);\n };\n }, [\n durationInFrames,\n id,\n name,\n registerSequence,\n timelineClipName,\n unregisterSequence,\n parentSequence?.id,\n actualDurationInFrames,\n rootId,\n from,\n showInTimeline,\n nonce,\n loopDisplay,\n stack,\n premountDisplay\n ]);\n const endThreshold = Math.ceil(cumulatedFrom + from + durationInFrames - 1);\n const content = absoluteFrame < cumulatedFrom + from ? null : absoluteFrame > endThreshold ? null : children;\n const styleIfThere = other.layout === \"none\" ? undefined : other.style;\n const defaultStyle = useMemo10(() => {\n return {\n flexDirection: undefined,\n ...width ? { width } : {},\n ...height ? { height } : {},\n ...styleIfThere ?? {}\n };\n }, [height, styleIfThere, width]);\n if (ref !== null && layout === \"none\") {\n throw new TypeError('It is not supported to pass both a `ref` and `layout=\"none\"` to <Sequence />.');\n }\n const isSequenceHidden = hidden[id] ?? false;\n if (isSequenceHidden) {\n return null;\n }\n return /* @__PURE__ */ jsx9(SequenceContext.Provider, {\n value: contextValue,\n children: content === null ? null : other.layout === \"none\" ? content : /* @__PURE__ */ jsx9(AbsoluteFill, {\n ref,\n style: defaultStyle,\n className: other.className,\n children: content\n })\n });\n};\nvar RegularSequence = forwardRef2(RegularSequenceRefForwardingFunction);\nvar PremountedSequenceRefForwardingFunction = (props, ref) => {\n const frame = useCurrentFrame();\n if (props.layout === \"none\") {\n throw new Error('`<Sequence>` with `premountFor` prop does not support layout=\"none\"');\n }\n const { style: passedStyle, from = 0, premountFor = 0, ...otherProps } = props;\n const premountingActive = frame < from && frame >= from - premountFor;\n const style = useMemo10(() => {\n return {\n ...passedStyle,\n opacity: premountingActive ? 0 : 1,\n pointerEvents: premountingActive ? \"none\" : passedStyle?.pointerEvents ?? undefined\n };\n }, [premountingActive, passedStyle]);\n return /* @__PURE__ */ jsx9(Freeze, {\n frame: from,\n active: premountingActive,\n children: /* @__PURE__ */ jsx9(Sequence, {\n ref,\n from,\n style,\n _remotionInternalPremountDisplay: premountFor,\n _remotionInternalIsPremounting: premountingActive,\n ...otherProps\n })\n });\n};\nvar PremountedSequence = forwardRef2(PremountedSequenceRefForwardingFunction);\nvar SequenceRefForwardingFunction = (props, ref) => {\n if (props.layout !== \"none\" && props.premountFor && !getRemotionEnvironment().isRendering) {\n return /* @__PURE__ */ jsx9(PremountedSequence, {\n ...props,\n ref\n });\n }\n return /* @__PURE__ */ jsx9(RegularSequence, {\n ...props,\n ref\n });\n};\nvar Sequence = forwardRef2(SequenceRefForwardingFunction);\n// src/Artifact.tsx\nimport { useContext as useContext13, useEffect as useEffect6, useState as useState7 } from \"react\";\n\n// src/RenderAssetManager.tsx\nimport {\n createContext as createContext11,\n useCallback as useCallback4,\n useLayoutEffect as useLayoutEffect2,\n useMemo as useMemo11,\n useState as useState6\n} from \"react\";\n\n// src/validation/validate-artifact.ts\nvar validateArtifactFilename = (filename) => {\n if (typeof filename !== \"string\") {\n throw new TypeError(`The \"filename\" must be a string, but you passed a value of type ${typeof filename}`);\n }\n if (filename.trim() === \"\") {\n throw new Error(\"The `filename` must not be empty\");\n }\n if (!filename.match(/^([0-9a-zA-Z-!_.*'()/:&$@=;+,?]+)/g)) {\n throw new Error('The `filename` must match \"/^([0-9a-zA-Z-!_.*\\'()/:&$@=;+,?]+)/g\". Use forward slashes only, even on Windows.');\n }\n};\nvar validateContent = (content) => {\n if (typeof content !== \"string\" && !(content instanceof Uint8Array)) {\n throw new TypeError(`The \"content\" must be a string or Uint8Array, but you passed a value of type ${typeof content}`);\n }\n if (typeof content === \"string\" && content.trim() === \"\") {\n throw new Error(\"The `content` must not be empty\");\n }\n};\nvar validateRenderAsset = (artifact) => {\n if (artifact.type !== \"artifact\") {\n return;\n }\n validateArtifactFilename(artifact.filename);\n validateContent(artifact.content);\n};\n\n// src/RenderAssetManager.tsx\nimport { jsx as jsx10 } from \"react/jsx-runtime\";\nvar RenderAssetManager = createContext11({\n registerRenderAsset: () => {\n return;\n },\n unregisterRenderAsset: () => {\n return;\n },\n renderAssets: []\n});\nvar RenderAssetManagerProvider = ({ children }) => {\n const [renderAssets, setRenderAssets] = useState6([]);\n const registerRenderAsset = useCallback4((renderAsset) => {\n validateRenderAsset(renderAsset);\n setRenderAssets((assets) => {\n return [...assets, renderAsset];\n });\n }, []);\n const unregisterRenderAsset = useCallback4((id) => {\n setRenderAssets((assts) => {\n return assts.filter((a) => a.id !== id);\n });\n }, []);\n useLayoutEffect2(() => {\n if (typeof window !== \"undefined\") {\n window.remotion_collectAssets = () => {\n setRenderAssets([]);\n return renderAssets;\n };\n }\n }, [renderAssets]);\n const contextValue = useMemo11(() => {\n return {\n registerRenderAsset,\n unregisterRenderAsset,\n renderAssets\n };\n }, [renderAssets, registerRenderAsset, unregisterRenderAsset]);\n return /* @__PURE__ */ jsx10(RenderAssetManager.Provider, {\n value: contextValue,\n children\n });\n};\n\n// src/Artifact.tsx\nvar Artifact = ({ filename, content }) => {\n const { registerRenderAsset, unregisterRenderAsset } = useContext13(RenderAssetManager);\n const [env] = useState7(() => getRemotionEnvironment());\n const frame = useCurrentFrame();\n const [id] = useState7(() => {\n return String(Math.random());\n });\n useEffect6(() => {\n if (!env.isRendering) {\n return;\n }\n if (content instanceof Uint8Array) {\n registerRenderAsset({\n type: \"artifact\",\n id,\n content: btoa(new TextDecoder(\"utf8\").decode(content)),\n filename,\n frame,\n binary: true\n });\n } else {\n registerRenderAsset({\n type: \"artifact\",\n id,\n content,\n filename,\n frame,\n binary: false\n });\n }\n return () => {\n return unregisterRenderAsset(id);\n };\n }, [\n content,\n env.isRendering,\n filename,\n frame,\n id,\n registerRenderAsset,\n unregisterRenderAsset\n ]);\n return null;\n};\n// src/audio/Audio.tsx\nimport { forwardRef as forwardRef5, useCallback as useCallback9, useContext as useContext23 } from \"react\";\n\n// src/absolute-src.ts\nvar getAbsoluteSrc = (relativeSrc) => {\n if (typeof window === \"undefined\") {\n return relativeSrc;\n }\n return new URL(relativeSrc, window.origin).href;\n};\n\n// src/calculate-loop.ts\nvar calculateLoopDuration = ({\n endAt,\n mediaDuration,\n playbackRate,\n startFrom\n}) => {\n let duration = mediaDuration;\n if (typeof endAt !== \"undefined\") {\n duration = endAt;\n }\n if (typeof startFrom !== \"undefined\") {\n duration -= startFrom;\n }\n const actualDuration = duration / playbackRate;\n return Math.floor(actualDuration);\n};\n\n// src/cancel-render.ts\nfunction cancelRender(err) {\n let error;\n if (isErrorLike(err)) {\n error = err;\n if (!error.stack) {\n error.stack = new Error(error.message).stack;\n }\n } else if (typeof err === \"string\") {\n error = Error(err);\n } else {\n error = Error(\"Rendering was cancelled\");\n }\n window.remotion_cancelledError = error.stack;\n throw error;\n}\nvar isErrorLike = (err) => {\n if (err instanceof Error) {\n return true;\n }\n if (err === null) {\n return false;\n }\n if (typeof err !== \"object\") {\n return false;\n }\n if (!(\"stack\" in err)) {\n return false;\n }\n if (typeof err.stack !== \"string\") {\n return false;\n }\n if (!(\"message\" in err)) {\n return false;\n }\n if (typeof err.message !== \"string\") {\n return false;\n }\n return true;\n};\n\n// src/loop/index.tsx\nimport React8, { createContext as createContext12, useMemo as useMemo12 } from \"react\";\nimport { jsx as jsx11 } from \"react/jsx-runtime\";\nvar LoopContext = createContext12(null);\nvar useLoop = () => {\n return React8.useContext(LoopContext);\n};\nvar Loop = ({ durationInFrames, times = Infinity, children, name, ...props }) => {\n const currentFrame = useCurrentFrame();\n const { durationInFrames: compDuration } = useVideoConfig();\n validateDurationInFrames(durationInFrames, {\n component: \"of the <Loop /> component\",\n allowFloats: true\n });\n if (typeof times !== \"number\") {\n throw new TypeError(`You passed to \"times\" an argument of type ${typeof times}, but it must be a number.`);\n }\n if (times !== Infinity && times % 1 !== 0) {\n throw new TypeError(`The \"times\" prop of a loop must be an integer, but got ${times}.`);\n }\n if (times < 0) {\n throw new TypeError(`The \"times\" prop of a loop must be at least 0, but got ${times}`);\n }\n const maxTimes = Math.ceil(compDuration / durationInFrames);\n const actualTimes = Math.min(maxTimes, times);\n const style = props.layout === \"none\" ? undefined : props.style;\n const maxFrame = durationInFrames * (actualTimes - 1);\n const iteration = Math.floor(currentFrame / durationInFrames);\n const start = iteration * durationInFrames;\n const from = Math.min(start, maxFrame);\n const loopDisplay = useMemo12(() => {\n return {\n numberOfTimes: actualTimes,\n startOffset: -from,\n durationInFrames\n };\n }, [actualTimes, durationInFrames, from]);\n const loopContext = useMemo12(() => {\n return {\n iteration: Math.floor(currentFrame / durationInFrames),\n durationInFrames\n };\n }, [currentFrame, durationInFrames]);\n return /* @__PURE__ */ jsx11(LoopContext.Provider, {\n value: loopContext,\n children: /* @__PURE__ */ jsx11(Sequence, {\n durationInFrames,\n from,\n name: name ?? \"<Loop>\",\n _remotionInternalLoopDisplay: loopDisplay,\n layout: props.layout,\n style,\n children\n })\n });\n};\nLoop.useLoop = useLoop;\n\n// src/prefetch.ts\nimport { useContext as useContext14 } from \"react\";\n\n// src/prefetch-state.tsx\nimport { createContext as createContext13, useEffect as useEffect7, useState as useState8 } from \"react\";\nimport { jsx as jsx12 } from \"react/jsx-runtime\";\nvar PreloadContext = createContext13({});\nvar preloads = {};\nvar updaters = [];\nvar setPreloads = (updater) => {\n preloads = updater(preloads);\n updaters.forEach((u) => u());\n};\nvar PrefetchProvider = ({ children }) => {\n const [_preloads, _setPreloads] = useState8(() => preloads);\n useEffect7(() => {\n const updaterFunction = () => {\n _setPreloads(preloads);\n };\n updaters.push(updaterFunction);\n return () => {\n updaters = updaters.filter((u) => u !== updaterFunction);\n };\n }, []);\n return /* @__PURE__ */ jsx12(PreloadContext.Provider, {\n value: _preloads,\n children\n });\n};\n\n// src/prefetch.ts\nvar usePreload = (src) => {\n const preloads2 = useContext14(PreloadContext);\n return preloads2[src] ?? src;\n};\nvar blobToBase64 = function(blob) {\n const reader = new FileReader;\n return new Promise((resolve, reject) => {\n reader.onload = function() {\n const dataUrl = reader.result;\n resolve(dataUrl);\n };\n reader.onerror = (err) => {\n return reject(err);\n };\n reader.readAsDataURL(blob);\n });\n};\nvar getBlobFromReader = async ({\n reader,\n contentType,\n contentLength,\n onProgress\n}) => {\n let receivedLength = 0;\n const chunks = [];\n while (true) {\n const { done, value } = await reader.read();\n if (done) {\n break;\n }\n chunks.push(value);\n receivedLength += value.length;\n if (onProgress) {\n onProgress({ loadedBytes: receivedLength, totalBytes: contentLength });\n }\n }\n const chunksAll = new Uint8Array(receivedLength);\n let position = 0;\n for (const chunk of chunks) {\n chunksAll.set(chunk, position);\n position += chunk.length;\n }\n return new Blob([chunksAll], {\n type: contentType ?? undefined\n });\n};\nvar prefetch = (src, options) => {\n const method = options?.method ?? \"blob-url\";\n if (getRemotionEnvironment().isRendering) {\n return {\n free: () => {\n return;\n },\n waitUntilDone: () => Promise.resolve(src)\n };\n }\n let canceled = false;\n let objectUrl = null;\n let resolve = () => {\n return;\n };\n let reject = () => {\n return;\n };\n const waitUntilDone = new Promise((res, rej) => {\n resolve = res;\n reject = rej;\n });\n const controller = new AbortController;\n let canBeAborted = true;\n fetch(src, {\n signal: controller.signal\n }).then((res) => {\n canBeAborted = false;\n if (canceled) {\n return null;\n }\n if (!res.ok) {\n throw new Error(`HTTP error, status = ${res.status}`);\n }\n const headerContentType = res.headers.get(\"Content-Type\");\n const contentType = options?.contentType ?? headerContentType;\n const hasProperContentType = contentType && (contentType.startsWith(\"video/\") || contentType.startsWith(\"audio/\") || contentType.startsWith(\"image/\"));\n if (!hasProperContentType) {\n console.warn(`Called prefetch() on ${src} which returned a \"Content-Type\" of ${headerContentType}. Prefetched content should have a proper content type (video/... or audio/...) or a contentType passed the options of prefetch(). Otherwise, prefetching will not work properly in all browsers.`);\n }\n if (!res.body) {\n throw new Error(`HTTP response of ${src} has no body`);\n }\n const reader = res.body.getReader();\n return getBlobFromReader({\n reader,\n contentType: options?.contentType ?? headerContentType ?? null,\n contentLength: res.headers.get(\"Content-Length\") ? parseInt(res.headers.get(\"Content-Length\"), 10) : null,\n onProgress: options?.onProgress\n });\n }).then((buf) => {\n if (!buf) {\n return;\n }\n const actualBlob = options?.contentType ? new Blob([buf], { type: options.contentType }) : buf;\n if (method === \"base64\") {\n return blobToBase64(actualBlob);\n }\n return URL.createObjectURL(actualBlob);\n }).then((url) => {\n if (canceled) {\n return;\n }\n objectUrl = url;\n setPreloads((p) => ({\n ...p,\n [src]: objectUrl\n }));\n resolve(objectUrl);\n }).catch((err) => {\n reject(err);\n });\n return {\n free: () => {\n if (objectUrl) {\n if (method === \"blob-url\") {\n URL.revokeObjectURL(objectUrl);\n }\n setPreloads((p) => {\n const copy = { ...p };\n delete copy[src];\n return copy;\n });\n } else {\n canceled = true;\n if (canBeAborted) {\n try {\n controller.abort(new Error(\"free() called\"));\n } catch (e) {\n }\n }\n }\n },\n waitUntilDone: () => {\n return waitUntilDone;\n }\n };\n};\n\n// src/validate-media-props.ts\nvar validateMediaProps = (props, component) => {\n if (typeof props.volume !== \"number\" && typeof props.volume !== \"function\" && typeof props.volume !== \"undefined\") {\n throw new TypeError(`You have passed a volume of type ${typeof props.volume} to your <${component} /> component. Volume must be a number or a function with the signature '(frame: number) => number' undefined.`);\n }\n if (typeof props.volume === \"number\" && props.volume < 0) {\n throw new TypeError(`You have passed a volume below 0 to your <${component} /> component. Volume must be between 0 and 1`);\n }\n if (typeof props.playbackRate !== \"number\" && typeof props.playbackRate !== \"undefined\") {\n throw new TypeError(`You have passed a playbackRate of type ${typeof props.playbackRate} to your <${component} /> component. Playback rate must a real number or undefined.`);\n }\n if (typeof props.playbackRate === \"number\" && (isNaN(props.playbackRate) || !Number.isFinite(props.playbackRate) || props.playbackRate <= 0)) {\n throw new TypeError(`You have passed a playbackRate of ${props.playbackRate} to your <${component} /> component. Playback rate must be a real number above 0.`);\n }\n};\n\n// src/validate-start-from-props.ts\nvar validateStartFromProps = (startFrom, endAt) => {\n if (typeof startFrom !== \"undefined\") {\n if (typeof startFrom !== \"number\") {\n throw new TypeError(`type of startFrom prop must be a number, instead got type ${typeof startFrom}.`);\n }\n if (isNaN(startFrom) || startFrom === Infinity) {\n throw new TypeError(\"startFrom prop can not be NaN or Infinity.\");\n }\n if (startFrom < 0) {\n throw new TypeError(`startFrom must be greater than equal to 0 instead got ${startFrom}.`);\n }\n }\n if (typeof endAt !== \"undefined\") {\n if (typeof endAt !== \"number\") {\n throw new TypeError(`type of endAt prop must be a number, instead got type ${typeof endAt}.`);\n }\n if (isNaN(endAt)) {\n throw new TypeError(\"endAt prop can not be NaN.\");\n }\n if (endAt <= 0) {\n throw new TypeError(`endAt must be a positive number, instead got ${endAt}.`);\n }\n }\n if (endAt < startFrom) {\n throw new TypeError(\"endAt prop must be greater than startFrom prop.\");\n }\n};\n\n// src/video/duration-state.tsx\nimport { createContext as createContext14, useMemo as useMemo13, useReducer } from \"react\";\nimport { jsx as jsx13 } from \"react/jsx-runtime\";\nvar durationReducer = (state, action) => {\n switch (action.type) {\n case \"got-duration\": {\n const absoluteSrc = getAbsoluteSrc(action.src);\n if (state[absoluteSrc] === action.durationInSeconds) {\n return state;\n }\n return {\n ...state,\n [absoluteSrc]: action.durationInSeconds\n };\n }\n default:\n return state;\n }\n};\nvar DurationsContext = createContext14({\n durations: {},\n setDurations: () => {\n throw new Error(\"context missing\");\n }\n});\nvar DurationsContextProvider = ({ children }) => {\n const [durations, setDurations] = useReducer(durationReducer, {});\n const value = useMemo13(() => {\n return {\n durations,\n setDurations\n };\n }, [durations]);\n return /* @__PURE__ */ jsx13(DurationsContext.Provider, {\n value,\n children\n });\n};\n\n// src/audio/AudioForPreview.tsx\nimport {\n forwardRef as forwardRef3,\n useContext as useContext21,\n useEffect as useEffect16,\n useImperativeHandle as useImperativeHandle3,\n useMemo as useMemo20,\n useRef as useRef8,\n useState as useState14\n} from \"react\";\n\n// src/random.ts\nfunction mulberry32(a) {\n let t = a + 1831565813;\n t = Math.imul(t ^ t >>> 15, t | 1);\n t ^= t + Math.imul(t ^ t >>> 7, t | 61);\n return ((t ^ t >>> 14) >>> 0) / 4294967296;\n}\nfunction hashCode(str) {\n let i = 0;\n let chr = 0;\n let hash = 0;\n for (i = 0;i < str.length; i++) {\n chr = str.charCodeAt(i);\n hash = (hash << 5) - hash + chr;\n hash |= 0;\n }\n return hash;\n}\nvar random = (seed, dummy) => {\n if (dummy !== undefined) {\n throw new TypeError(\"random() takes only one argument\");\n }\n if (seed === null) {\n return Math.random();\n }\n if (typeof seed === \"string\") {\n return mulberry32(hashCode(seed));\n }\n if (typeof seed === \"number\") {\n return mulberry32(seed * 10000000000);\n }\n throw new Error(\"random() argument must be a number or a string\");\n};\n\n// src/use-media-in-timeline.ts\nimport { useContext as useContext16, useEffect as useEffect8, useMemo as useMemo14, useState as useState9 } from \"react\";\n\n// src/audio/use-audio-frame.ts\nimport { useContext as useContext15 } from \"react\";\nvar useMediaStartsAt = () => {\n const parentSequence = useContext15(SequenceContext);\n const startsAt = Math.min(0, parentSequence?.relativeFrom ?? 0);\n return startsAt;\n};\nvar useFrameForVolumeProp = (behavior) => {\n const loop = Loop.useLoop();\n const frame = useCurrentFrame();\n const startsAt = useMediaStartsAt();\n if (behavior === \"repeat\" || loop === null) {\n return frame + startsAt;\n }\n return frame + startsAt + loop.durationInFrames * loop.iteration;\n};\n\n// src/get-asset-file-name.ts\nvar getAssetDisplayName = (filename) => {\n if (/data:|blob:/.test(filename.substring(0, 5))) {\n return \"Data URL\";\n }\n const splitted = filename.split(\"/\").map((s) => s.split(\"\\\\\")).flat(1);\n return splitted[splitted.length - 1];\n};\n\n// src/play-and-handle-not-allowed-error.ts\nvar playAndHandleNotAllowedError = (mediaRef, mediaType, onAutoPlayError) => {\n const { current } = mediaRef;\n if (!current) {\n return;\n }\n const prom = current.play();\n if (prom.catch) {\n prom.catch((err) => {\n if (!current) {\n return;\n }\n if (err.message.includes(\"request was interrupted by a call to pause\")) {\n return;\n }\n if (err.message.includes(\"The operation was aborted.\")) {\n return;\n }\n if (err.message.includes(\"The fetching process for the media resource was aborted by the user agent\")) {\n return;\n }\n if (err.message.includes(\"request was interrupted by a new load request\")) {\n return;\n }\n if (err.message.includes(\"because the media was removed from the document\")) {\n return;\n }\n console.log(`Could not play ${mediaType} due to following error: `, err);\n if (!current.muted) {\n if (onAutoPlayError) {\n onAutoPlayError();\n return;\n }\n console.log(`The video will be muted and we'll retry playing it.`);\n if (mediaType === \"video\" && getRemotionEnvironment().isPlayer) {\n console.log(\"Use onAutoPlayError() to handle this error yourself.\");\n }\n current.muted = true;\n current.play();\n }\n });\n }\n};\n\n// src/volume-prop.ts\nvar evaluateVolume = ({\n frame,\n volume,\n mediaVolume = 1,\n allowAmplificationDuringRender\n}) => {\n const maxVolume = allowAmplificationDuringRender ? Infinity : 1;\n if (typeof volume === \"number\") {\n return Math.min(maxVolume, volume * mediaVolume);\n }\n if (typeof volume === \"undefined\") {\n return Number(mediaVolume);\n }\n const evaluated = volume(frame) * mediaVolume;\n if (typeof evaluated !== \"number\") {\n throw new TypeError(`You passed in a a function to the volume prop but it did not return a number but a value of type ${typeof evaluated} for frame ${frame}`);\n }\n if (Number.isNaN(evaluated)) {\n throw new TypeError(`You passed in a function to the volume prop but it returned NaN for frame ${frame}.`);\n }\n if (!Number.isFinite(evaluated)) {\n throw new TypeError(`You passed in a function to the volume prop but it returned a non-finite number for frame ${frame}.`);\n }\n return Math.max(0, Math.min(maxVolume, evaluated));\n};\n\n// src/use-media-in-timeline.ts\nvar didWarn2 = {};\nvar warnOnce2 = (message) => {\n if (didWarn2[message]) {\n return;\n }\n console.warn(message);\n didWarn2[message] = true;\n};\nvar useMediaInTimeline = ({\n volume,\n mediaVolume,\n mediaRef,\n src,\n mediaType,\n playbackRate,\n displayName,\n id,\n stack,\n showInTimeline,\n premountDisplay,\n onAutoPlayError\n}) => {\n const videoConfig = useVideoConfig();\n const { rootId, audioAndVideoTags } = useContext16(TimelineContext);\n const parentSequence = useContext16(SequenceContext);\n const actualFrom = parentSequence ? parentSequence.relativeFrom + parentSequence.cumulatedFrom : 0;\n const [playing] = usePlayingState();\n const startsAt = useMediaStartsAt();\n const { registerSequence, unregisterSequence } = useContext16(SequenceManager);\n const [initialVolume] = useState9(() => volume);\n const nonce = useNonce();\n const duration = parentSequence ? Math.min(parentSequence.durationInFrames, videoConfig.durationInFrames) : videoConfig.durationInFrames;\n const doesVolumeChange = typeof volume === \"function\";\n const volumes = useMemo14(() => {\n if (typeof volume === \"number\") {\n return volume;\n }\n return new Array(Math.floor(Math.max(0, duration + startsAt))).fill(true).map((_, i) => {\n return evaluateVolume({\n frame: i + startsAt,\n volume,\n mediaVolume,\n allowAmplificationDuringRender: false\n });\n }).join(\",\");\n }, [duration, startsAt, volume, mediaVolume]);\n useEffect8(() => {\n if (typeof volume === \"number\" && volume !== initialVolume) {\n warnOnce2(`Remotion: The ${mediaType} with src ${src} has changed it's volume. Prefer the callback syntax for setting volume to get better timeline display: https://www.remotion.dev/docs/using-audio/#controlling-volume`);\n }\n }, [initialVolume, mediaType, src, volume]);\n useEffect8(() => {\n if (!mediaRef.current) {\n return;\n }\n if (!src) {\n throw new Error(\"No src passed\");\n }\n if (!getRemotionEnvironment().isStudio && window.process?.env?.NODE_ENV !== \"test\") {\n return;\n }\n if (!showInTimeline) {\n return;\n }\n registerSequence({\n type: mediaType,\n src,\n id,\n duration,\n from: 0,\n parent: parentSequence?.id ?? null,\n displayName: displayName ?? getAssetDisplayName(src),\n rootId,\n volume: volumes,\n showInTimeline: true,\n nonce,\n startMediaFrom: 0 - startsAt,\n doesVolumeChange,\n loopDisplay: undefined,\n playbackRate,\n stack,\n premountDisplay\n });\n return () => {\n unregisterSequence(id);\n };\n }, [\n actualFrom,\n duration,\n id,\n parentSequence,\n src,\n registerSequence,\n rootId,\n unregisterSequence,\n videoConfig,\n volumes,\n doesVolumeChange,\n nonce,\n mediaRef,\n mediaType,\n startsAt,\n playbackRate,\n displayName,\n stack,\n showInTimeline,\n premountDisplay\n ]);\n useEffect8(() => {\n const tag = {\n id,\n play: () => {\n if (!playing) {\n return;\n }\n return playAndHandleNotAllowedError(mediaRef, mediaType, onAutoPlayError);\n }\n };\n audioAndVideoTags.current.push(tag);\n return () => {\n audioAndVideoTags.current = audioAndVideoTags.current.filter((a) => a.id !== id);\n };\n }, [audioAndVideoTags, id, mediaRef, mediaType, onAutoPlayError, playing]);\n};\n\n// src/use-media-playback.ts\nimport { useCallback as useCallback7, useContext as useContext18, useEffect as useEffect12, useRef as useRef6 } from \"react\";\n\n// src/buffer-until-first-frame.ts\nimport { useCallback as useCallback6, useMemo as useMemo17, useRef as useRef3 } from \"react\";\n\n// src/use-buffer-state.ts\nimport { useContext as useContext17, useMemo as useMemo16 } from \"react\";\n\n// src/buffering.tsx\nimport React11, { useCallback as useCallback5, useEffect as useEffect9, useMemo as useMemo15, useRef as useRef2, useState as useState10 } from \"react\";\nimport { jsx as jsx14 } from \"react/jsx-runtime\";\nvar useBufferManager = () => {\n const [blocks, setBlocks] = useState10([]);\n const [onBufferingCallbacks, setOnBufferingCallbacks] = useState10([]);\n const [onResumeCallbacks, setOnResumeCallbacks] = useState10([]);\n const buffering = useRef2(false);\n const addBlock = useCallback5((block) => {\n setBlocks((b) => [...b, block]);\n return {\n unblock: () => {\n setBlocks((b) => {\n const newArr = b.filter((bx) => bx !== block);\n if (newArr.length === b.length) {\n return b;\n }\n return newArr;\n });\n }\n };\n }, []);\n const listenForBuffering = useCallback5((callback) => {\n setOnBufferingCallbacks((c) => [...c, callback]);\n return {\n remove: () => {\n setOnBufferingCallbacks((c) => c.filter((cb) => cb !== callback));\n }\n };\n }, []);\n const listenForResume = useCallback5((callback) => {\n setOnResumeCallbacks((c) => [...c, callback]);\n return {\n remove: () => {\n setOnResumeCallbacks((c) => c.filter((cb) => cb !== callback));\n }\n };\n }, []);\n useEffect9(() => {\n if (blocks.length > 0) {\n onBufferingCallbacks.forEach((c) => c());\n }\n }, [blocks]);\n useEffect9(() => {\n if (blocks.length === 0) {\n onResumeCallbacks.forEach((c) => c());\n }\n }, [blocks]);\n return useMemo15(() => {\n return { addBlock, listenForBuffering, listenForResume, buffering };\n }, [addBlock, buffering, listenForBuffering, listenForResume]);\n};\nvar BufferingContextReact = React11.createContext(null);\nvar BufferingProvider = ({ children }) => {\n const bufferManager = useBufferManager();\n return /* @__PURE__ */ jsx14(BufferingContextReact.Provider, {\n value: bufferManager,\n children\n });\n};\nvar useIsPlayerBuffering = (bufferManager) => {\n const [isBuffering, setIsBuffering] = useState10(bufferManager.buffering.current);\n useEffect9(() => {\n const onBuffer = () => {\n setIsBuffering(true);\n };\n const onResume = () => {\n setIsBuffering(false);\n };\n bufferManager.listenForBuffering(onBuffer);\n bufferManager.listenForResume(onResume);\n return () => {\n bufferManager.listenForBuffering(() => {\n return;\n });\n bufferManager.listenForResume(() => {\n return;\n });\n };\n }, [bufferManager]);\n return isBuffering;\n};\n\n// src/use-buffer-state.ts\nvar useBufferState = () => {\n const buffer = useContext17(BufferingContextReact);\n const addBlock = buffer ? buffer.addBlock : null;\n return useMemo16(() => ({\n delayPlayback: () => {\n if (!addBlock) {\n throw new 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\");\n }\n const { unblock } = addBlock({\n id: String(Math.random())\n });\n return { unblock };\n }\n }), [addBlock]);\n};\n\n// src/buffer-until-first-frame.ts\nvar useBufferUntilFirstFrame = ({\n mediaRef,\n mediaType,\n onVariableFpsVideoDetected,\n pauseWhenBuffering\n}) => {\n const bufferingRef = useRef3(false);\n const { delayPlayback } = useBufferState();\n const bufferUntilFirstFrame = useCallback6((requestedTime) => {\n if (mediaType !== \"video\") {\n return;\n }\n if (!pauseWhenBuffering) {\n return;\n }\n const current = mediaRef.current;\n if (!current) {\n return;\n }\n if (!current.requestVideoFrameCallback) {\n return;\n }\n bufferingRef.current = true;\n const playback = delayPlayback();\n const unblock = () => {\n playback.unblock();\n current.removeEventListener(\"ended\", unblock, {\n once: true\n });\n current.removeEventListener(\"pause\", unblock, {\n once: true\n });\n bufferingRef.current = false;\n };\n const onEndedOrPauseOrCanPlay = () => {\n unblock();\n };\n current.requestVideoFrameCallback((_, info) => {\n const differenceFromRequested = Math.abs(info.mediaTime - requestedTime);\n if (differenceFromRequested > 0.5) {\n onVariableFpsVideoDetected();\n }\n unblock();\n });\n current.addEventListener(\"ended\", onEndedOrPauseOrCanPlay, { once: true });\n current.addEventListener(\"pause\", onEndedOrPauseOrCanPlay, { once: true });\n current.addEventListener(\"canplay\", onEndedOrPauseOrCanPlay, {\n once: true\n });\n }, [\n delayPlayback,\n mediaRef,\n mediaType,\n onVariableFpsVideoDetected,\n pauseWhenBuffering\n ]);\n return useMemo17(() => {\n return {\n isBuffering: () => bufferingRef.current,\n bufferUntilFirstFrame\n };\n }, [bufferUntilFirstFrame]);\n};\n\n// src/use-media-buffering.ts\nimport { useEffect as useEffect10, useState as useState11 } from \"react\";\nvar useMediaBuffering = ({\n element,\n shouldBuffer,\n isPremounting\n}) => {\n const buffer = useBufferState();\n const [isBuffering, setIsBuffering] = useState11(false);\n useEffect10(() => {\n let cleanupFns = [];\n const { current } = element;\n if (!current) {\n return;\n }\n if (!shouldBuffer) {\n return;\n }\n if (isPremounting) {\n return;\n }\n const cleanup = () => {\n cleanupFns.forEach((fn) => fn());\n cleanupFns = [];\n setIsBuffering(false);\n };\n const onWaiting = () => {\n setIsBuffering(true);\n const { unblock } = buffer.delayPlayback();\n const onCanPlay = () => {\n cleanup();\n init();\n };\n const onError = () => {\n cleanup();\n init();\n };\n current.addEventListener(\"canplay\", onCanPlay, {\n once: true\n });\n cleanupFns.push(() => {\n current.removeEventListener(\"canplay\", onCanPlay);\n });\n current.addEventListener(\"error\", onError, {\n once: true\n });\n cleanupFns.push(() => {\n current.removeEventListener(\"error\", onError);\n });\n cleanupFns.push(() => {\n unblock();\n });\n };\n const init = () => {\n if (current.readyState < current.HAVE_FUTURE_DATA) {\n onWaiting();\n if (!navigator.userAgent.includes(\"Firefox/\")) {\n current.load();\n }\n } else {\n current.addEventListener(\"waiting\", onWaiting);\n cleanupFns.push(() => {\n current.removeEventListener(\"waiting\", onWaiting);\n });\n }\n };\n init();\n return () => {\n cleanup();\n };\n }, [buffer, element, isPremounting, shouldBuffer]);\n return isBuffering;\n};\n\n// src/use-request-video-callback-time.ts\nimport { useEffect as useEffect11, useRef as useRef4 } from \"react\";\nvar useRequestVideoCallbackTime = ({\n mediaRef,\n mediaType,\n lastSeek,\n onVariableFpsVideoDetected\n}) => {\n const currentTime = useRef4(null);\n useEffect11(() => {\n const { current } = mediaRef;\n if (current) {\n currentTime.current = current.currentTime;\n } else {\n currentTime.current = null;\n return;\n }\n if (mediaType !== \"video\") {\n currentTime.current = null;\n return;\n }\n const videoTag = current;\n if (!videoTag.requestVideoFrameCallback) {\n return;\n }\n let cancel = () => {\n return;\n };\n const request = () => {\n if (!videoTag) {\n return;\n }\n const cb = videoTag.requestVideoFrameCallback((_, info) => {\n if (currentTime.current !== null) {\n const difference = Math.abs(currentTime.current - info.mediaTime);\n const differenceToLastSeek = Math.abs(lastSeek.current === null ? Infinity : info.mediaTime - lastSeek.current);\n if (difference > 0.5 && differenceToLastSeek > 0.5 && info.mediaTime > currentTime.current) {\n onVariableFpsVideoDetected();\n }\n }\n currentTime.current = info.mediaTime;\n request();\n });\n cancel = () => {\n videoTag.cancelVideoFrameCallback(cb);\n cancel = () => {\n return;\n };\n };\n };\n request();\n return () => {\n cancel();\n };\n }, [lastSeek, mediaRef, mediaType, onVariableFpsVideoDetected]);\n return currentTime;\n};\n\n// src/interpolate.ts\nfunction interpolateFunction(input, inputRange, outputRange, options) {\n const { extrapolateLeft, extrapolateRight, easing } = options;\n let result = input;\n const [inputMin, inputMax] = inputRange;\n const [outputMin, outputMax] = outputRange;\n if (result < inputMin) {\n if (extrapolateLeft === \"identity\") {\n return result;\n }\n if (extrapolateLeft === \"clamp\") {\n result = inputMin;\n } else if (extrapolateLeft === \"wrap\") {\n const range = inputMax - inputMin;\n result = ((result - inputMin) % range + range) % range + inputMin;\n } else if (extrapolateLeft === \"extend\") {\n }\n }\n if (result > inputMax) {\n if (extrapolateRight === \"identity\") {\n return result;\n }\n if (extrapolateRight === \"clamp\") {\n result = inputMax;\n } else if (extrapolateRight === \"wrap\") {\n const range = inputMax - inputMin;\n result = ((result - inputMin) % range + range) % range + inputMin;\n } else if (extrapolateRight === \"extend\") {\n }\n }\n if (outputMin === outputMax) {\n return outputMin;\n }\n result = (result - inputMin) / (inputMax - inputMin);\n result = easing(result);\n result = result * (outputMax - outputMin) + outputMin;\n return result;\n}\nfunction findRange(input, inputRange) {\n let i;\n for (i = 1;i < inputRange.length - 1; ++i) {\n if (inputRange[i] >= input) {\n break;\n }\n }\n return i - 1;\n}\nfunction checkValidInputRange(arr) {\n for (let i = 1;i < arr.length; ++i) {\n if (!(arr[i] > arr[i - 1])) {\n throw new Error(`inputRange must be strictly monotonically increasing but got [${arr.join(\",\")}]`);\n }\n }\n}\nfunction checkInfiniteRange(name, arr) {\n if (arr.length < 2) {\n throw new Error(name + \" must have at least 2 elements\");\n }\n for (const element of arr) {\n if (typeof element !== \"number\") {\n throw new Error(`${name} must contain only numbers`);\n }\n if (!Number.isFinite(element)) {\n throw new Error(`${name} must contain only finite numbers, but got [${arr.join(\",\")}]`);\n }\n }\n}\nfunction interpolate(input, inputRange, outputRange, options) {\n if (typeof input === \"undefined\") {\n throw new Error(\"input can not be undefined\");\n }\n if (typeof inputRange === \"undefined\") {\n throw new Error(\"inputRange can not be undefined\");\n }\n if (typeof outputRange === \"undefined\") {\n throw new Error(\"outputRange can not be undefined\");\n }\n if (inputRange.length !== outputRange.length) {\n throw new Error(\"inputRange (\" + inputRange.length + \") and outputRange (\" + outputRange.length + \") must have the same length\");\n }\n checkInfiniteRange(\"inputRange\", inputRange);\n checkInfiniteRange(\"outputRange\", outputRange);\n checkValidInputRange(inputRange);\n const easing = options?.easing ?? ((num) => num);\n let extrapolateLeft = \"extend\";\n if (options?.extrapolateLeft !== undefined) {\n extrapolateLeft = options.extrapolateLeft;\n }\n let extrapolateRight = \"extend\";\n if (options?.extrapolateRight !== undefined) {\n extrapolateRight = options.extrapolateRight;\n }\n if (typeof input !== \"number\") {\n throw new TypeError(\"Cannot interpolate an input which is not a number\");\n }\n const range = findRange(input, inputRange);\n return interpolateFunction(input, [inputRange[range], inputRange[range + 1]], [outputRange[range], outputRange[range + 1]], {\n easing,\n extrapolateLeft,\n extrapolateRight\n });\n}\n\n// src/video/get-current-time.ts\nvar getExpectedMediaFrameUncorrected = ({\n frame,\n playbackRate,\n startFrom\n}) => {\n return interpolate(frame, [-1, startFrom, startFrom + 1], [-1, startFrom, startFrom + playbackRate]);\n};\nvar getMediaTime = ({\n fps,\n frame,\n playbackRate,\n startFrom\n}) => {\n const expectedFrame = getExpectedMediaFrameUncorrected({\n frame,\n playbackRate,\n startFrom\n });\n const msPerFrame = 1000 / fps;\n return expectedFrame * msPerFrame / 1000;\n};\n\n// src/video/video-fragment.ts\nimport { useRef as useRef5 } from \"react\";\nvar toSeconds = (time, fps) => {\n return Math.round(time / fps * 100) / 100;\n};\nvar isIosSafari = () => {\n if (typeof window === \"undefined\") {\n return false;\n }\n const isIpadIPodIPhone = /iP(ad|od|hone)/i.test(window.navigator.userAgent);\n const isAppleWebKit = /AppleWebKit/.test(window.navigator.userAgent);\n return isIpadIPodIPhone && isAppleWebKit;\n};\nvar isIOSSafariAndBlob = (actualSrc) => {\n return isIosSafari() && actualSrc.startsWith(\"blob:\");\n};\nvar getVideoFragmentStart = ({\n actualFrom,\n fps\n}) => {\n return toSeconds(Math.max(0, -actualFrom), fps);\n};\nvar getVideoFragmentEnd = ({\n duration,\n fps\n}) => {\n return toSeconds(duration, fps);\n};\nvar appendVideoFragment = ({\n actualSrc,\n actualFrom,\n duration,\n fps\n}) => {\n if (isIOSSafariAndBlob(actualSrc)) {\n return actualSrc;\n }\n if (actualSrc.startsWith(\"data:\")) {\n return actualSrc;\n }\n const existingHash = Boolean(new URL(actualSrc, (typeof window === \"undefined\" ? null : window.location.href) ?? \"http://localhost:3000\").hash);\n if (existingHash) {\n return actualSrc;\n }\n if (!Number.isFinite(actualFrom)) {\n return actualSrc;\n }\n const withStartHash = `${actualSrc}#t=${getVideoFragmentStart({ actualFrom, fps })}`;\n if (!Number.isFinite(duration)) {\n return withStartHash;\n }\n return `${withStartHash},${getVideoFragmentEnd({ duration, fps })}`;\n};\nvar isSubsetOfDuration = ({\n prevStartFrom,\n newStartFrom,\n prevDuration,\n newDuration,\n fps\n}) => {\n const previousFrom = getVideoFragmentStart({ actualFrom: prevStartFrom, fps });\n const newFrom = getVideoFragmentStart({ actualFrom: newStartFrom, fps });\n const previousEnd = getVideoFragmentEnd({ duration: prevDuration, fps });\n const newEnd = getVideoFragmentEnd({ duration: newDuration, fps });\n if (newFrom < previousFrom) {\n return false;\n }\n if (newEnd > previousEnd) {\n return false;\n }\n return true;\n};\nvar useAppendVideoFragment = ({\n actualSrc: initialActualSrc,\n actualFrom: initialActualFrom,\n duration: initialDuration,\n fps\n}) => {\n const actualFromRef = useRef5(initialActualFrom);\n const actualDuration = useRef5(initialDuration);\n const actualSrc = useRef5(initialActualSrc);\n if (!isSubsetOfDuration({\n prevStartFrom: actualFromRef.current,\n newStartFrom: initialActualFrom,\n prevDuration: actualDuration.current,\n newDuration: initialDuration,\n fps\n }) || initialActualSrc !== actualSrc.current) {\n actualFromRef.current = initialActualFrom;\n actualDuration.current = initialDuration;\n actualSrc.current = initialActualSrc;\n }\n const appended = appendVideoFragment({\n actualSrc: actualSrc.current,\n actualFrom: actualFromRef.current,\n duration: actualDuration.current,\n fps\n });\n return appended;\n};\n\n// src/warn-about-non-seekable-media.ts\nvar alreadyWarned = {};\nvar warnAboutNonSeekableMedia = (ref, type) => {\n if (ref === null) {\n return;\n }\n if (ref.seekable.length === 0) {\n return;\n }\n if (ref.seekable.length > 1) {\n return;\n }\n if (alreadyWarned[ref.src]) {\n return;\n }\n const range = { start: ref.seekable.start(0), end: ref.seekable.end(0) };\n if (range.start === 0 && range.end === 0) {\n const msg = [\n `The media ${ref.src} cannot be seeked. This could be one of few reasons:`,\n \"1) The media resource was replaced while the video is playing but it was not loaded yet.\",\n \"2) The media does not support seeking.\",\n \"3) The media was loaded with security headers prventing it from being included.\",\n \"Please see https://remotion.dev/docs/non-seekable-media for assistance.\"\n ].join(\"\\n\");\n if (type === \"console-error\") {\n console.error(msg);\n } else if (type === \"console-warning\") {\n console.warn(`The media ${ref.src} does not support seeking. The video will render fine, but may not play correctly in the Remotion Studio and in the <Player>. See https://remotion.dev/docs/non-seekable-media for an explanation.`);\n } else {\n throw new Error(msg);\n }\n alreadyWarned[ref.src] = true;\n }\n};\n\n// src/use-media-playback.ts\nvar DEFAULT_ACCEPTABLE_TIMESHIFT = 0.45;\nvar seek = (mediaRef, time) => {\n if (!mediaRef.current) {\n return;\n }\n const timeToSet = isIosSafari() ? Number(time.toFixed(1)) : time;\n mediaRef.current.currentTime = timeToSet;\n};\nvar useMediaPlayback = ({\n mediaRef,\n src,\n mediaType,\n playbackRate: localPlaybackRate,\n onlyWarnForMediaSeekingError,\n acceptableTimeshift,\n pauseWhenBuffering,\n isPremounting,\n debugSeeking,\n onAutoPlayError\n}) => {\n const { playbackRate: globalPlaybackRate } = useContext18(TimelineContext);\n const frame = useCurrentFrame();\n const absoluteFrame = useTimelinePosition();\n const [playing] = usePlayingState();\n const buffering = useContext18(BufferingContextReact);\n const { fps } = useVideoConfig();\n const mediaStartsAt = useMediaStartsAt();\n const lastSeekDueToShift = useRef6(null);\n const lastSeek = useRef6(null);\n if (!buffering) {\n throw new Error(\"useMediaPlayback must be used inside a <BufferingContext>\");\n }\n const isVariableFpsVideoMap = useRef6({});\n const onVariableFpsVideoDetected = useCallback7(() => {\n if (!src) {\n return;\n }\n if (debugSeeking) {\n console.log(`Detected ${src} as a variable FPS video. Disabling buffering while seeking.`);\n }\n isVariableFpsVideoMap.current[src] = true;\n }, [debugSeeking, src]);\n const currentTime = useRequestVideoCallbackTime({\n mediaRef,\n mediaType,\n lastSeek,\n onVariableFpsVideoDetected\n });\n const desiredUnclampedTime = getMediaTime({\n frame,\n playbackRate: localPlaybackRate,\n startFrom: -mediaStartsAt,\n fps\n });\n const isMediaTagBuffering = useMediaBuffering({\n element: mediaRef,\n shouldBuffer: pauseWhenBuffering,\n isPremounting\n });\n const { bufferUntilFirstFrame, isBuffering } = useBufferUntilFirstFrame({\n mediaRef,\n mediaType,\n onVariableFpsVideoDetected,\n pauseWhenBuffering\n });\n const playbackRate = localPlaybackRate * globalPlaybackRate;\n const acceptableTimeShiftButLessThanDuration = (() => {\n if (mediaRef.current?.duration) {\n return Math.min(mediaRef.current.duration, acceptableTimeshift ?? DEFAULT_ACCEPTABLE_TIMESHIFT);\n }\n return acceptableTimeshift;\n })();\n const isPlayerBuffering = useIsPlayerBuffering(buffering);\n useEffect12(() => {\n if (!playing) {\n mediaRef.current?.pause();\n return;\n }\n const isMediaTagBufferingOrStalled = isMediaTagBuffering || isBuffering();\n if (isPlayerBuffering && !isMediaTagBufferingOrStalled) {\n mediaRef.current?.pause();\n }\n }, [isBuffering, isMediaTagBuffering, isPlayerBuffering, mediaRef, playing]);\n useEffect12(() => {\n const tagName = mediaType === \"audio\" ? \"<Audio>\" : \"<Video>\";\n if (!mediaRef.current) {\n throw new Error(`No ${mediaType} ref found`);\n }\n if (!src) {\n throw new Error(`No 'src' attribute was passed to the ${tagName} element.`);\n }\n const playbackRateToSet = Math.max(0, playbackRate);\n if (mediaRef.current.playbackRate !== playbackRateToSet) {\n mediaRef.current.playbackRate = playbackRateToSet;\n }\n const { duration } = mediaRef.current;\n const shouldBeTime = !Number.isNaN(duration) && Number.isFinite(duration) ? Math.min(duration, desiredUnclampedTime) : desiredUnclampedTime;\n const mediaTagTime = mediaRef.current.currentTime;\n const rvcTime = currentTime.current ?? null;\n const isVariableFpsVideo = isVariableFpsVideoMap.current[src];\n const timeShiftMediaTag = Math.abs(shouldBeTime - mediaTagTime);\n const timeShiftRvcTag = rvcTime ? Math.abs(shouldBeTime - rvcTime) : null;\n const timeShift = timeShiftRvcTag && !isVariableFpsVideo ? timeShiftRvcTag : timeShiftMediaTag;\n if (debugSeeking) {\n console.log({\n mediaTagTime,\n rvcTime,\n shouldBeTime,\n state: mediaRef.current.readyState,\n playing: !mediaRef.current.paused,\n isVariableFpsVideo\n });\n }\n if (timeShift > acceptableTimeShiftButLessThanDuration && lastSeekDueToShift.current !== shouldBeTime) {\n if (debugSeeking) {\n console.log(\"Seeking\", {\n shouldBeTime,\n isTime: mediaTagTime,\n rvcTime,\n timeShift,\n isVariableFpsVideo\n });\n }\n seek(mediaRef, shouldBeTime);\n lastSeek.current = shouldBeTime;\n lastSeekDueToShift.current = shouldBeTime;\n if (playing && !isVariableFpsVideo) {\n if (playbackRate > 0) {\n bufferUntilFirstFrame(shouldBeTime);\n }\n if (mediaRef.current.paused) {\n playAndHandleNotAllowedError(mediaRef, mediaType, onAutoPlayError);\n }\n }\n if (!onlyWarnForMediaSeekingError) {\n warnAboutNonSeekableMedia(mediaRef.current, onlyWarnForMediaSeekingError ? \"console-warning\" : \"console-error\");\n }\n return;\n }\n const seekThreshold = playing ? 0.15 : 0.00001;\n const makesSenseToSeek = Math.abs(mediaRef.current.currentTime - shouldBeTime) > seekThreshold;\n const isMediaTagBufferingOrStalled = isMediaTagBuffering || isBuffering();\n const isSomethingElseBuffering = buffering.buffering.current && !isMediaTagBufferingOrStalled;\n if (!playing || isSomethingElseBuffering) {\n if (makesSenseToSeek) {\n seek(mediaRef, shouldBeTime);\n lastSeek.current = shouldBeTime;\n }\n return;\n }\n if (mediaRef.current.paused && !mediaRef.current.ended || absoluteFrame === 0) {\n if (makesSenseToSeek) {\n seek(mediaRef, shouldBeTime);\n lastSeek.current = shouldBeTime;\n }\n playAndHandleNotAllowedError(mediaRef, mediaType, onAutoPlayError);\n if (!isVariableFpsVideo) {\n if (playbackRate > 0) {\n bufferUntilFirstFrame(shouldBeTime);\n }\n }\n }\n }, [\n absoluteFrame,\n acceptableTimeShiftButLessThanDuration,\n bufferUntilFirstFrame,\n buffering.buffering,\n currentTime,\n debugSeeking,\n desiredUnclampedTime,\n isBuffering,\n isMediaTagBuffering,\n mediaRef,\n mediaType,\n onlyWarnForMediaSeekingError,\n playbackRate,\n playing,\n src,\n onAutoPlayError\n ]);\n};\n\n// src/use-media-tag-volume.ts\nimport { useEffect as useEffect13, useState as useState12 } from \"react\";\nvar useMediaTagVolume = (mediaRef) => {\n const [actualVolume, setActualVolume] = useState12(1);\n useEffect13(() => {\n const ref = mediaRef.current;\n if (!ref) {\n return;\n }\n const onChange = () => {\n setActualVolume(ref.volume);\n };\n ref.addEventListener(\"volumechange\", onChange);\n return () => ref.removeEventListener(\"volumechange\", onChange);\n }, [mediaRef]);\n useEffect13(() => {\n const ref = mediaRef.current;\n if (!ref) {\n return;\n }\n if (ref.volume !== actualVolume) {\n setActualVolume(ref.volume);\n }\n }, [actualVolume, mediaRef]);\n return actualVolume;\n};\n\n// src/use-sync-volume-with-media-tag.ts\nimport { useEffect as useEffect14 } from \"react\";\n\n// src/is-approximately-the-same.ts\nvar FLOATING_POINT_ERROR_THRESHOLD = 0.00001;\nvar isApproximatelyTheSame = (num1, num2) => {\n return Math.abs(num1 - num2) < FLOATING_POINT_ERROR_THRESHOLD;\n};\n\n// src/use-sync-volume-with-media-tag.ts\nvar useSyncVolumeWithMediaTag = ({\n volumePropFrame,\n actualVolume,\n volume,\n mediaVolume,\n mediaRef\n}) => {\n useEffect14(() => {\n const userPreferredVolume = evaluateVolume({\n frame: volumePropFrame,\n volume,\n mediaVolume,\n allowAmplificationDuringRender: false\n });\n if (!isApproximatelyTheSame(userPreferredVolume, actualVolume) && mediaRef.current) {\n mediaRef.current.volume = userPreferredVolume;\n }\n }, [actualVolume, volumePropFrame, mediaRef, volume, mediaVolume]);\n};\n\n// src/volume-position-state.ts\nimport { createContext as createContext15, useContext as useContext19, useMemo as useMemo18 } from \"react\";\nvar MediaVolumeContext = createContext15({\n mediaMuted: false,\n mediaVolume: 1\n});\nvar SetMediaVolumeContext = createContext15({\n setMediaMuted: () => {\n throw new Error(\"default\");\n },\n setMediaVolume: () => {\n throw new Error(\"default\");\n }\n});\nvar useMediaVolumeState = () => {\n const { mediaVolume } = useContext19(MediaVolumeContext);\n const { setMediaVolume } = useContext19(SetMediaVolumeContext);\n return useMemo18(() => {\n return [mediaVolume, setMediaVolume];\n }, [mediaVolume, setMediaVolume]);\n};\nvar useMediaMutedState = () => {\n const { mediaMuted } = useContext19(MediaVolumeContext);\n const { setMediaMuted } = useContext19(SetMediaVolumeContext);\n return useMemo18(() => {\n return [mediaMuted, setMediaMuted];\n }, [mediaMuted, setMediaMuted]);\n};\n\n// src/audio/shared-audio-tags.tsx\nimport React12, {\n createContext as createContext16,\n createRef as createRef2,\n useCallback as useCallback8,\n useContext as useContext20,\n useEffect as useEffect15,\n useMemo as useMemo19,\n useRef as useRef7,\n useState as useState13\n} from \"react\";\nimport { jsx as jsx15, jsxs } from \"react/jsx-runtime\";\nvar EMPTY_AUDIO = \"data:audio/mp3;base64,/+MYxAAJcAV8AAgAABn//////+/gQ5BAMA+D4Pg+BAQBAEAwD4Pg+D4EBAEAQDAPg++hYBH///hUFQVBUFREDQNHmf///////+MYxBUGkAGIMAAAAP/29Xt6lUxBTUUzLjEwMFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV/+MYxDUAAANIAAAAAFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV\";\nvar compareProps = (obj1, obj2) => {\n const keysA = Object.keys(obj1).sort();\n const keysB = Object.keys(obj2).sort();\n if (keysA.length !== keysB.length) {\n return false;\n }\n for (let i = 0;i < keysA.length; i++) {\n if (keysA[i] !== keysB[i]) {\n return false;\n }\n if (obj1[keysA[i]] !== obj2[keysB[i]]) {\n return false;\n }\n }\n return true;\n};\nvar didPropChange = (key, newProp, prevProp) => {\n if (key === \"src\" && !prevProp.startsWith(\"data:\") && !newProp.startsWith(\"data:\")) {\n return new URL(prevProp, window.origin).toString() !== new URL(newProp, window.origin).toString();\n }\n if (prevProp === newProp) {\n return false;\n }\n return true;\n};\nvar SharedAudioContext = createContext16(null);\nvar SharedAudioContextProvider = ({ children, numberOfAudioTags, component }) => {\n const audios = useRef7([]);\n const [initialNumberOfAudioTags] = useState13(numberOfAudioTags);\n if (numberOfAudioTags !== initialNumberOfAudioTags) {\n throw new Error(\"The number of shared audio tags has changed dynamically. Once you have set this property, you cannot change it afterwards.\");\n }\n const refs = useMemo19(() => {\n return new Array(numberOfAudioTags).fill(true).map(() => {\n return { id: Math.random(), ref: createRef2() };\n });\n }, [numberOfAudioTags]);\n const takenAudios = useRef7(new Array(numberOfAudioTags).fill(false));\n const rerenderAudios = useCallback8(() => {\n refs.forEach(({ ref, id }) => {\n const data = audios.current?.find((a) => a.id === id);\n const { current } = ref;\n if (!current) {\n return;\n }\n if (data === undefined) {\n current.src = EMPTY_AUDIO;\n return;\n }\n if (!data) {\n throw new TypeError(\"Expected audio data to be there\");\n }\n Object.keys(data.props).forEach((key) => {\n if (didPropChange(key, data.props[key], current[key])) {\n current[key] = data.props[key];\n }\n });\n });\n }, [refs]);\n const registerAudio = useCallback8((aud, audioId) => {\n const found = audios.current?.find((a) => a.audioId === audioId);\n if (found) {\n return found;\n }\n const firstFreeAudio = takenAudios.current.findIndex((a) => a === false);\n if (firstFreeAudio === -1) {\n throw new Error(`Tried to simultaneously mount ${numberOfAudioTags + 1} <Audio /> tags at the same time. With the current settings, the maximum amount of <Audio /> tags is limited to ${numberOfAudioTags} at the same time. Remotion pre-mounts silent audio tags to help avoid browser autoplay restrictions. See https://remotion.dev/docs/player/autoplay#use-the-numberofsharedaudiotags-property for more information on how to increase this limit.`);\n }\n const { id, ref } = refs[firstFreeAudio];\n const cloned = [...takenAudios.current];\n cloned[firstFreeAudio] = id;\n takenAudios.current = cloned;\n const newElem = {\n props: aud,\n id,\n el: ref,\n audioId\n };\n audios.current?.push(newElem);\n rerenderAudios();\n return newElem;\n }, [numberOfAudioTags, refs, rerenderAudios]);\n const unregisterAudio = useCallback8((id) => {\n const cloned = [...takenAudios.current];\n const index = refs.findIndex((r) => r.id === id);\n if (index === -1) {\n throw new TypeError(\"Error occured in \");\n }\n cloned[index] = false;\n takenAudios.current = cloned;\n audios.current = audios.current?.filter((a) => a.id !== id);\n rerenderAudios();\n }, [refs, rerenderAudios]);\n const updateAudio = useCallback8(({\n aud,\n audioId,\n id\n }) => {\n let changed = false;\n audios.current = audios.current?.map((prevA) => {\n if (prevA.id === id) {\n const isTheSame = compareProps(aud, prevA.props);\n if (isTheSame) {\n return prevA;\n }\n changed = true;\n return {\n ...prevA,\n props: aud,\n audioId\n };\n }\n return prevA;\n });\n if (changed) {\n rerenderAudios();\n }\n }, [rerenderAudios]);\n const playAllAudios = useCallback8(() => {\n refs.forEach((ref) => {\n playAndHandleNotAllowedError(ref.ref, \"audio\", null);\n });\n }, [refs]);\n const value = useMemo19(() => {\n return {\n registerAudio,\n unregisterAudio,\n updateAudio,\n playAllAudios,\n numberOfAudioTags\n };\n }, [\n numberOfAudioTags,\n playAllAudios,\n registerAudio,\n unregisterAudio,\n updateAudio\n ]);\n const resetAudio = useCallback8(() => {\n takenAudios.current = new Array(numberOfAudioTags).fill(false);\n audios.current = [];\n rerenderAudios();\n }, [numberOfAudioTags, rerenderAudios]);\n useEffect15(() => {\n return () => {\n resetAudio();\n };\n }, [component, resetAudio]);\n return /* @__PURE__ */ jsxs(SharedAudioContext.Provider, {\n value,\n children: [\n refs.map(({ id, ref }) => {\n return /* @__PURE__ */ jsx15(\"audio\", {\n ref,\n preload: \"metadata\",\n src: EMPTY_AUDIO\n }, id);\n }),\n children\n ]\n });\n};\nvar useSharedAudio = (aud, audioId) => {\n const ctx = useContext20(SharedAudioContext);\n const [elem] = useState13(() => {\n if (ctx && ctx.numberOfAudioTags > 0) {\n return ctx.registerAudio(aud, audioId);\n }\n return {\n el: React12.createRef(),\n id: Math.random(),\n props: aud,\n audioId\n };\n });\n const effectToUse = React12.useInsertionEffect ?? React12.useLayoutEffect;\n if (typeof document !== \"undefined\") {\n effectToUse(() => {\n if (ctx && ctx.numberOfAudioTags > 0) {\n ctx.updateAudio({ id: elem.id, aud, audioId });\n }\n }, [aud, ctx, elem.id, audioId]);\n effectToUse(() => {\n return () => {\n if (ctx && ctx.numberOfAudioTags > 0) {\n ctx.unregisterAudio(elem.id);\n }\n };\n }, [ctx, elem.id]);\n }\n return elem;\n};\n\n// src/audio/AudioForPreview.tsx\nimport { jsx as jsx16 } from \"react/jsx-runtime\";\nvar AudioForDevelopmentForwardRefFunction = (props, ref) => {\n const [initialShouldPreMountAudioElements] = useState14(props.shouldPreMountAudioTags);\n if (props.shouldPreMountAudioTags !== initialShouldPreMountAudioElements) {\n throw new Error(\"Cannot change the behavior for pre-mounting audio tags dynamically.\");\n }\n const {\n volume,\n muted,\n playbackRate,\n shouldPreMountAudioTags,\n src,\n onDuration,\n acceptableTimeShiftInSeconds,\n _remotionInternalNeedsDurationCalculation,\n _remotionInternalNativeLoopPassed,\n _remotionInternalStack,\n _remotionDebugSeeking,\n allowAmplificationDuringRender,\n name,\n pauseWhenBuffering,\n showInTimeline,\n loopVolumeCurveBehavior,\n stack,\n ...nativeProps\n } = props;\n const [mediaVolume] = useMediaVolumeState();\n const [mediaMuted] = useMediaMutedState();\n const volumePropFrame = useFrameForVolumeProp(loopVolumeCurveBehavior ?? \"repeat\");\n const { hidden } = useContext21(SequenceVisibilityToggleContext);\n if (!src) {\n throw new TypeError(\"No 'src' was passed to <Audio>.\");\n }\n const preloadedSrc = usePreload(src);\n const sequenceContext = useContext21(SequenceContext);\n const [timelineId] = useState14(() => String(Math.random()));\n const isSequenceHidden = hidden[timelineId] ?? false;\n const userPreferredVolume = evaluateVolume({\n frame: volumePropFrame,\n volume,\n mediaVolume,\n allowAmplificationDuringRender: false\n });\n const propsToPass = useMemo20(() => {\n return {\n muted: muted || mediaMuted || isSequenceHidden || userPreferredVolume <= 0,\n src: preloadedSrc,\n loop: _remotionInternalNativeLoopPassed,\n ...nativeProps\n };\n }, [\n _remotionInternalNativeLoopPassed,\n isSequenceHidden,\n mediaMuted,\n muted,\n nativeProps,\n preloadedSrc,\n userPreferredVolume\n ]);\n const id = useMemo20(() => `audio-${random(src ?? \"\")}-${sequenceContext?.relativeFrom}-${sequenceContext?.cumulatedFrom}-${sequenceContext?.durationInFrames}-muted:${props.muted}-loop:${props.loop}`, [\n src,\n sequenceContext?.relativeFrom,\n sequenceContext?.cumulatedFrom,\n sequenceContext?.durationInFrames,\n props.muted,\n props.loop\n ]);\n const audioRef = useSharedAudio(propsToPass, id).el;\n const actualVolume = useMediaTagVolume(audioRef);\n useSyncVolumeWithMediaTag({\n volumePropFrame,\n actualVolume,\n volume,\n mediaVolume,\n mediaRef: audioRef\n });\n useMediaInTimeline({\n volume,\n mediaVolume,\n mediaRef: audioRef,\n src,\n mediaType: \"audio\",\n playbackRate: playbackRate ?? 1,\n displayName: name ?? null,\n id: timelineId,\n stack: _remotionInternalStack,\n showInTimeline,\n premountDisplay: null,\n onAutoPlayError: null\n });\n useMediaPlayback({\n mediaRef: audioRef,\n src,\n mediaType: \"audio\",\n playbackRate: playbackRate ?? 1,\n onlyWarnForMediaSeekingError: false,\n acceptableTimeshift: acceptableTimeShiftInSeconds ?? DEFAULT_ACCEPTABLE_TIMESHIFT,\n isPremounting: Boolean(sequenceContext?.premounting),\n pauseWhenBuffering,\n debugSeeking: _remotionDebugSeeking,\n onAutoPlayError: null\n });\n useImperativeHandle3(ref, () => {\n return audioRef.current;\n }, [audioRef]);\n const currentOnDurationCallback = useRef8();\n currentOnDurationCallback.current = onDuration;\n useEffect16(() => {\n const { current } = audioRef;\n if (!current) {\n return;\n }\n if (current.duration) {\n currentOnDurationCallback.current?.(current.src, current.duration);\n return;\n }\n const onLoadedMetadata = () => {\n currentOnDurationCallback.current?.(current.src, current.duration);\n };\n current.addEventListener(\"loadedmetadata\", onLoadedMetadata);\n return () => {\n current.removeEventListener(\"loadedmetadata\", onLoadedMetadata);\n };\n }, [audioRef, src]);\n if (initialShouldPreMountAudioElements) {\n return null;\n }\n return /* @__PURE__ */ jsx16(\"audio\", {\n ref: audioRef,\n preload: \"metadata\",\n ...propsToPass\n });\n};\nvar AudioForPreview = forwardRef3(AudioForDevelopmentForwardRefFunction);\n\n// src/audio/AudioForRendering.tsx\nimport {\n forwardRef as forwardRef4,\n useContext as useContext22,\n useEffect as useEffect17,\n useImperativeHandle as useImperativeHandle4,\n useLayoutEffect as useLayoutEffect3,\n useMemo as useMemo21,\n useRef as useRef9\n} from \"react\";\n\n// src/delay-render.ts\nif (typeof window !== \"undefined\") {\n window.remotion_renderReady = false;\n}\nvar handles = [];\nif (typeof window !== \"undefined\") {\n window.remotion_delayRenderTimeouts = {};\n}\nvar DELAY_RENDER_CALLSTACK_TOKEN = \"The delayRender was called:\";\nvar DELAY_RENDER_RETRIES_LEFT = \"Retries left: \";\nvar DELAY_RENDER_RETRY_TOKEN = \"- Rendering the frame will be retried.\";\nvar defaultTimeout = 30000;\nvar delayRender = (label, options) => {\n if (typeof label !== \"string\" && typeof label !== \"undefined\") {\n throw new Error(\"The label parameter of delayRender() must be a string or undefined, got: \" + JSON.stringify(label));\n }\n const handle = Math.random();\n handles.push(handle);\n const called = Error().stack?.replace(/^Error/g, \"\") ?? \"\";\n if (getRemotionEnvironment().isRendering) {\n const timeoutToUse = (options?.timeoutInMilliseconds ?? (typeof window === \"undefined\" ? defaultTimeout : window.remotion_puppeteerTimeout ?? defaultTimeout)) - 2000;\n if (typeof window !== \"undefined\") {\n const retriesLeft = (options?.retries ?? 0) - (window.remotion_attempt - 1);\n window.remotion_delayRenderTimeouts[handle] = {\n label: label ?? null,\n timeout: setTimeout(() => {\n const message = [\n `A delayRender()`,\n label ? `\"${label}\"` : null,\n `was called but not cleared after ${timeoutToUse}ms. See https://remotion.dev/docs/timeout for help.`,\n retriesLeft > 0 ? DELAY_RENDER_RETRIES_LEFT + retriesLeft : null,\n retriesLeft > 0 ? DELAY_RENDER_RETRY_TOKEN : null,\n DELAY_RENDER_CALLSTACK_TOKEN,\n called\n ].filter(truthy).join(\" \");\n cancelRender(Error(message));\n }, timeoutToUse)\n };\n }\n }\n if (typeof window !== \"undefined\") {\n window.remotion_renderReady = false;\n }\n return handle;\n};\nvar continueRender = (handle) => {\n if (typeof handle === \"undefined\") {\n throw new TypeError(\"The continueRender() method must be called with a parameter that is the return value of delayRender(). No value was passed.\");\n }\n if (typeof handle !== \"number\") {\n throw new TypeError(\"The parameter passed into continueRender() must be the return value of delayRender() which is a number. Got: \" + JSON.stringify(handle));\n }\n handles = handles.filter((h) => {\n if (h === handle) {\n if (getRemotionEnvironment().isRendering) {\n clearTimeout(window.remotion_delayRenderTimeouts[handle].timeout);\n delete window.remotion_delayRenderTimeouts[handle];\n }\n return false;\n }\n return true;\n });\n if (handles.length === 0 && typeof window !== \"undefined\") {\n window.remotion_renderReady = true;\n }\n};\n\n// src/audio/AudioForRendering.tsx\nimport { jsx as jsx17 } from \"react/jsx-runtime\";\nvar AudioForRenderingRefForwardingFunction = (props, ref) => {\n const audioRef = useRef9(null);\n const {\n volume: volumeProp,\n playbackRate,\n allowAmplificationDuringRender,\n onDuration,\n toneFrequency,\n _remotionInternalNeedsDurationCalculation,\n _remotionInternalNativeLoopPassed,\n acceptableTimeShiftInSeconds,\n name,\n onError,\n delayRenderRetries,\n delayRenderTimeoutInMilliseconds,\n loopVolumeCurveBehavior,\n pauseWhenBuffering,\n ...nativeProps\n } = props;\n const absoluteFrame = useTimelinePosition();\n const volumePropFrame = useFrameForVolumeProp(loopVolumeCurveBehavior ?? \"repeat\");\n const frame = useCurrentFrame();\n const sequenceContext = useContext22(SequenceContext);\n const { registerRenderAsset, unregisterRenderAsset } = useContext22(RenderAssetManager);\n const id = useMemo21(() => `audio-${random(props.src ?? \"\")}-${sequenceContext?.relativeFrom}-${sequenceContext?.cumulatedFrom}-${sequenceContext?.durationInFrames}`, [\n props.src,\n sequenceContext?.relativeFrom,\n sequenceContext?.cumulatedFrom,\n sequenceContext?.durationInFrames\n ]);\n const volume = evaluateVolume({\n volume: volumeProp,\n frame: volumePropFrame,\n mediaVolume: 1,\n allowAmplificationDuringRender: allowAmplificationDuringRender ?? false\n });\n useImperativeHandle4(ref, () => {\n return audioRef.current;\n }, []);\n useEffect17(() => {\n if (!props.src) {\n throw new Error(\"No src passed\");\n }\n if (!window.remotion_audioEnabled) {\n return;\n }\n if (props.muted) {\n return;\n }\n if (volume <= 0) {\n return;\n }\n registerRenderAsset({\n type: \"audio\",\n src: getAbsoluteSrc(props.src),\n id,\n frame: absoluteFrame,\n volume,\n mediaFrame: frame,\n playbackRate: props.playbackRate ?? 1,\n allowAmplificationDuringRender: allowAmplificationDuringRender ?? false,\n toneFrequency: toneFrequency ?? null,\n audioStartFrame: Math.max(0, -(sequenceContext?.relativeFrom ?? 0))\n });\n return () => unregisterRenderAsset(id);\n }, [\n props.muted,\n props.src,\n registerRenderAsset,\n absoluteFrame,\n id,\n unregisterRenderAsset,\n volume,\n volumePropFrame,\n frame,\n playbackRate,\n props.playbackRate,\n allowAmplificationDuringRender,\n toneFrequency,\n sequenceContext?.relativeFrom\n ]);\n const { src } = props;\n const needsToRenderAudioTag = ref || _remotionInternalNeedsDurationCalculation;\n useLayoutEffect3(() => {\n if (window.process?.env?.NODE_ENV === \"test\") {\n return;\n }\n if (!needsToRenderAudioTag) {\n return;\n }\n const newHandle = delayRender(\"Loading <Audio> duration with src=\" + src, {\n retries: delayRenderRetries ?? undefined,\n timeoutInMilliseconds: delayRenderTimeoutInMilliseconds ?? undefined\n });\n const { current } = audioRef;\n const didLoad = () => {\n if (current?.duration) {\n onDuration(current.src, current.duration);\n }\n continueRender(newHandle);\n };\n if (current?.duration) {\n onDuration(current.src, current.duration);\n continueRender(newHandle);\n } else {\n current?.addEventListener(\"loadedmetadata\", didLoad, { once: true });\n }\n return () => {\n current?.removeEventListener(\"loadedmetadata\", didLoad);\n continueRender(newHandle);\n };\n }, [\n src,\n onDuration,\n needsToRenderAudioTag,\n delayRenderRetries,\n delayRenderTimeoutInMilliseconds\n ]);\n if (!needsToRenderAudioTag) {\n return null;\n }\n return /* @__PURE__ */ jsx17(\"audio\", {\n ref: audioRef,\n ...nativeProps\n });\n};\nvar AudioForRendering = forwardRef4(AudioForRenderingRefForwardingFunction);\n\n// src/audio/Audio.tsx\nimport { jsx as jsx18 } from \"react/jsx-runtime\";\nvar AudioRefForwardingFunction = (props, ref) => {\n const audioContext = useContext23(SharedAudioContext);\n const {\n startFrom,\n endAt,\n name,\n stack,\n pauseWhenBuffering,\n showInTimeline,\n _remotionDebugSeeking,\n ...otherProps\n } = props;\n const { loop, ...propsOtherThanLoop } = props;\n const { fps } = useVideoConfig();\n const environment = getRemotionEnvironment();\n const { durations, setDurations } = useContext23(DurationsContext);\n if (typeof props.src !== \"string\") {\n throw new TypeError(`The \\`<Audio>\\` tag requires a string for \\`src\\`, but got ${JSON.stringify(props.src)} instead.`);\n }\n const preloadedSrc = usePreload(props.src);\n const onError = useCallback9((e) => {\n console.log(e.currentTarget.error);\n const errMessage = `Could not play audio with src ${preloadedSrc}: ${e.currentTarget.error}. See https://remotion.dev/docs/media-playback-error for help.`;\n if (loop) {\n cancelRender(new Error(errMessage));\n } else {\n console.warn(errMessage);\n }\n }, [loop, preloadedSrc]);\n const onDuration = useCallback9((src, durationInSeconds) => {\n setDurations({ type: \"got-duration\", durationInSeconds, src });\n }, [setDurations]);\n const durationFetched = durations[getAbsoluteSrc(preloadedSrc)] ?? durations[getAbsoluteSrc(props.src)];\n if (loop && durationFetched !== undefined) {\n const duration = durationFetched * fps;\n return /* @__PURE__ */ jsx18(Loop, {\n layout: \"none\",\n durationInFrames: calculateLoopDuration({\n endAt,\n mediaDuration: duration,\n playbackRate: props.playbackRate ?? 1,\n startFrom\n }),\n children: /* @__PURE__ */ jsx18(Audio, {\n ...propsOtherThanLoop,\n ref,\n _remotionInternalNativeLoopPassed: true\n })\n });\n }\n if (typeof startFrom !== \"undefined\" || typeof endAt !== \"undefined\") {\n validateStartFromProps(startFrom, endAt);\n const startFromFrameNo = startFrom ?? 0;\n const endAtFrameNo = endAt ?? Infinity;\n return /* @__PURE__ */ jsx18(Sequence, {\n layout: \"none\",\n from: 0 - startFromFrameNo,\n showInTimeline: false,\n durationInFrames: endAtFrameNo,\n name,\n children: /* @__PURE__ */ jsx18(Audio, {\n _remotionInternalNeedsDurationCalculation: Boolean(loop),\n pauseWhenBuffering: pauseWhenBuffering ?? false,\n ...otherProps,\n ref\n })\n });\n }\n validateMediaProps(props, \"Audio\");\n if (environment.isRendering) {\n return /* @__PURE__ */ jsx18(AudioForRendering, {\n onDuration,\n ...props,\n ref,\n onError,\n _remotionInternalNeedsDurationCalculation: Boolean(loop)\n });\n }\n return /* @__PURE__ */ jsx18(AudioForPreview, {\n _remotionInternalNativeLoopPassed: props._remotionInternalNativeLoopPassed ?? false,\n _remotionDebugSeeking: _remotionDebugSeeking ?? false,\n _remotionInternalStack: stack ?? null,\n shouldPreMountAudioTags: audioContext !== null && audioContext.numberOfAudioTags > 0,\n ...props,\n ref,\n onError,\n onDuration,\n pauseWhenBuffering: pauseWhenBuffering ?? false,\n _remotionInternalNeedsDurationCalculation: Boolean(loop),\n showInTimeline: showInTimeline ?? true\n });\n};\nvar Audio = forwardRef5(AudioRefForwardingFunction);\naddSequenceStackTraces(Audio);\n// src/Composition.tsx\nimport { Suspense, useContext as useContext25, useEffect as useEffect19, useMemo as useMemo24 } from \"react\";\nimport { createPortal } from \"react-dom\";\n\n// src/Folder.tsx\nimport { createContext as createContext17, useContext as useContext24, useEffect as useEffect18, useMemo as useMemo22 } from \"react\";\n\n// src/validation/validate-folder-name.ts\nvar getRegex = () => /^([a-zA-Z0-9-\\u4E00-\\u9FFF])+$/g;\nvar isFolderNameValid = (name) => name.match(getRegex());\nvar validateFolderName = (name) => {\n if (name === undefined || name === null) {\n throw new TypeError(\"You must pass a name to a <Folder />.\");\n }\n if (typeof name !== \"string\") {\n throw new TypeError(`The \"name\" you pass into <Folder /> must be a string. Got: ${typeof name}`);\n }\n if (!isFolderNameValid(name)) {\n throw new Error(`Folder name can only contain a-z, A-Z, 0-9 and -. You passed ${name}`);\n }\n};\nvar invalidFolderNameErrorMessage = `Folder name must match ${String(getRegex())}`;\n\n// src/Folder.tsx\nimport { jsx as jsx19 } from \"react/jsx-runtime\";\nvar FolderContext = createContext17({\n folderName: null,\n parentName: null\n});\nvar Folder = ({\n name,\n children\n}) => {\n const parent = useContext24(FolderContext);\n const { registerFolder, unregisterFolder } = useContext24(CompositionManager);\n validateFolderName(name);\n const parentNameArr = [parent.parentName, parent.folderName].filter(truthy);\n const parentName = parentNameArr.length === 0 ? null : parentNameArr.join(\"/\");\n const value = useMemo22(() => {\n return {\n folderName: name,\n parentName\n };\n }, [name, parentName]);\n useEffect18(() => {\n registerFolder(name, parentName);\n return () => {\n unregisterFolder(name, parentName);\n };\n }, [name, parent.folderName, parentName, registerFolder, unregisterFolder]);\n return /* @__PURE__ */ jsx19(FolderContext.Provider, {\n value,\n children\n });\n};\n\n// src/loading-indicator.tsx\nimport { jsx as jsx20, jsxs as jsxs2 } from \"react/jsx-runtime\";\nvar rotate = {\n transform: `rotate(90deg)`\n};\nvar ICON_SIZE = 40;\nvar label = {\n color: \"white\",\n fontSize: 14,\n fontFamily: \"sans-serif\"\n};\nvar container = {\n justifyContent: \"center\",\n alignItems: \"center\"\n};\nvar Loading = () => {\n return /* @__PURE__ */ jsxs2(AbsoluteFill, {\n style: container,\n id: \"remotion-comp-loading\",\n children: [\n /* @__PURE__ */ jsx20(\"style\", {\n type: \"text/css\",\n children: `\n\t\t\t\t@keyframes anim {\n\t\t\t\t\tfrom {\n\t\t\t\t\t\topacity: 0\n\t\t\t\t\t}\n\t\t\t\t\tto {\n\t\t\t\t\t\topacity: 1\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t#remotion-comp-loading {\n\t\t\t\t\tanimation: anim 2s;\n\t\t\t\t\tanimation-fill-mode: forwards;\n\t\t\t\t}\n\t\t\t`\n }),\n /* @__PURE__ */ jsx20(\"svg\", {\n width: ICON_SIZE,\n height: ICON_SIZE,\n viewBox: \"-100 -100 400 400\",\n style: rotate,\n children: /* @__PURE__ */ jsx20(\"path\", {\n fill: \"#555\",\n stroke: \"#555\",\n strokeWidth: \"100\",\n strokeLinejoin: \"round\",\n 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\"\n })\n }),\n /* @__PURE__ */ jsxs2(\"p\", {\n style: label,\n children: [\n \"Resolving \",\n \"<Suspense>\",\n \"...\"\n ]\n })\n ]\n });\n};\n\n// src/portal-node.ts\nvar _portalNode = null;\nvar portalNode = () => {\n if (!_portalNode) {\n if (typeof document === \"undefined\") {\n throw new Error(\"Tried to call an API that only works in the browser from outside the browser\");\n }\n _portalNode = document.createElement(\"div\");\n _portalNode.style.position = \"absolute\";\n _portalNode.style.top = \"0px\";\n _portalNode.style.left = \"0px\";\n _portalNode.style.right = \"0px\";\n _portalNode.style.bottom = \"0px\";\n _portalNode.style.width = \"100%\";\n _portalNode.style.height = \"100%\";\n _portalNode.style.display = \"flex\";\n _portalNode.style.flexDirection = \"column\";\n const containerNode = document.createElement(\"div\");\n containerNode.style.position = \"fixed\";\n containerNode.style.top = -999999 + \"px\";\n containerNode.appendChild(_portalNode);\n document.body.appendChild(containerNode);\n }\n return _portalNode;\n};\n\n// src/use-lazy-component.ts\nimport React16, { useMemo as useMemo23 } from \"react\";\nvar useLazyComponent = (compProps) => {\n const lazy = useMemo23(() => {\n if (\"lazyComponent\" in compProps && typeof compProps.lazyComponent !== \"undefined\") {\n return React16.lazy(compProps.lazyComponent);\n }\n if (\"component\" in compProps) {\n if (typeof document === \"undefined\") {\n return compProps.component;\n }\n return React16.lazy(() => Promise.resolve({ default: compProps.component }));\n }\n throw new Error(\"You must pass either 'component' or 'lazyComponent'\");\n }, [compProps.component, compProps.lazyComponent]);\n return lazy;\n};\n\n// src/validation/validate-composition-id.ts\nvar getRegex2 = () => /^([a-zA-Z0-9-\\u4E00-\\u9FFF])+$/g;\nvar isCompositionIdValid = (id) => id.match(getRegex2());\nvar validateCompositionId = (id) => {\n if (!isCompositionIdValid(id)) {\n throw new Error(`Composition id can only contain a-z, A-Z, 0-9, CJK characters and -. You passed ${id}`);\n }\n};\nvar invalidCompositionErrorMessage = `Composition ID must match ${String(getRegex2())}`;\n\n// src/validation/validate-default-props.ts\nvar validateDefaultAndInputProps = (defaultProps, name, compositionId) => {\n if (!defaultProps) {\n return;\n }\n if (typeof defaultProps !== \"object\") {\n throw new Error(`\"${name}\" must be an object, but you passed a value of type ${typeof defaultProps}`);\n }\n if (Array.isArray(defaultProps)) {\n throw new Error(`\"${name}\" must be an object, an array was passed ${compositionId ? `for composition \"${compositionId}\"` : \"\"}`);\n }\n};\n\n// src/Composition.tsx\nimport { jsx as jsx21 } from \"react/jsx-runtime\";\nvar ClipComposition = ({ children }) => {\n const { clipRegion } = useContext25(NativeLayersContext);\n const style = useMemo24(() => {\n return {\n display: \"flex\",\n flexDirection: \"row\",\n opacity: clipRegion === \"hide\" ? 0 : 1,\n clipPath: clipRegion && clipRegion !== \"hide\" ? `polygon(${clipRegion.x}px ${clipRegion.y}px, ${clipRegion.x}px ${clipRegion.height + clipRegion.y}px, ${clipRegion.width + clipRegion.x}px ${clipRegion.height + clipRegion.y}px, ${clipRegion.width + clipRegion.x}px ${clipRegion.y}px)` : undefined\n };\n }, [clipRegion]);\n return /* @__PURE__ */ jsx21(AbsoluteFill, {\n style,\n children\n });\n};\nvar Fallback = () => {\n useEffect19(() => {\n const fallback = delayRender(\"Waiting for Root component to unsuspend\");\n return () => continueRender(fallback);\n }, []);\n return null;\n};\nvar Composition = ({\n width,\n height,\n fps,\n durationInFrames,\n id,\n defaultProps,\n schema,\n ...compProps\n}) => {\n const { registerComposition, unregisterComposition } = useContext25(CompositionManager);\n const video = useVideo();\n const lazy = useLazyComponent(compProps);\n const nonce = useNonce();\n const isPlayer = useIsPlayer();\n const environment = getRemotionEnvironment();\n const canUseComposition = useContext25(CanUseRemotionHooks);\n if (canUseComposition) {\n if (isPlayer) {\n throw new Error(\"<Composition> was mounted inside the `component` that was passed to the <Player>. See https://remotion.dev/docs/wrong-composition-mount for help.\");\n }\n throw new Error(\"<Composition> mounted inside another composition. See https://remotion.dev/docs/wrong-composition-mount for help.\");\n }\n const { folderName, parentName } = useContext25(FolderContext);\n useEffect19(() => {\n if (!id) {\n throw new Error(\"No id for composition passed.\");\n }\n validateCompositionId(id);\n validateDefaultAndInputProps(defaultProps, \"defaultProps\", id);\n registerComposition({\n durationInFrames: durationInFrames ?? undefined,\n fps: fps ?? undefined,\n height: height ?? undefined,\n width: width ?? undefined,\n id,\n folderName,\n component: lazy,\n defaultProps: serializeThenDeserializeInStudio(defaultProps ?? {}),\n nonce,\n parentFolderName: parentName,\n schema: schema ?? null,\n calculateMetadata: compProps.calculateMetadata ?? null\n });\n return () => {\n unregisterComposition(id);\n };\n }, [\n durationInFrames,\n fps,\n height,\n lazy,\n id,\n folderName,\n defaultProps,\n registerComposition,\n unregisterComposition,\n width,\n nonce,\n parentName,\n schema,\n compProps.calculateMetadata\n ]);\n const resolved = useResolvedVideoConfig(id);\n if (environment.isStudio && video && video.component === lazy) {\n const Comp = lazy;\n if (resolved === null || resolved.type !== \"success\") {\n return null;\n }\n return createPortal(/* @__PURE__ */ jsx21(ClipComposition, {\n children: /* @__PURE__ */ jsx21(CanUseRemotionHooksProvider, {\n children: /* @__PURE__ */ jsx21(Suspense, {\n fallback: /* @__PURE__ */ jsx21(Loading, {}),\n children: /* @__PURE__ */ jsx21(Comp, {\n ...resolved.result.props ?? {}\n })\n })\n })\n }), portalNode());\n }\n if (environment.isRendering && video && video.component === lazy) {\n const Comp = lazy;\n if (resolved === null || resolved.type !== \"success\") {\n return null;\n }\n return createPortal(/* @__PURE__ */ jsx21(CanUseRemotionHooksProvider, {\n children: /* @__PURE__ */ jsx21(Suspense, {\n fallback: /* @__PURE__ */ jsx21(Fallback, {}),\n children: /* @__PURE__ */ jsx21(Comp, {\n ...resolved.result.props ?? {}\n })\n })\n }), portalNode());\n }\n return null;\n};\n// src/CompositionManager.tsx\nimport React18, {\n useCallback as useCallback10,\n useImperativeHandle as useImperativeHandle5,\n useMemo as useMemo25,\n useRef as useRef10,\n useState as useState15\n} from \"react\";\nimport { jsx as jsx22 } from \"react/jsx-runtime\";\nvar compositionsRef = React18.createRef();\nvar CompositionManagerProvider = ({ children, numberOfAudioTags }) => {\n const [compositions, setCompositions] = useState15([]);\n const currentcompositionsRef = useRef10(compositions);\n const [folders, setFolders] = useState15([]);\n const [canvasContent, setCanvasContent] = useState15(null);\n const [currentCompositionMetadata, setCurrentCompositionMetadata] = useState15(null);\n const updateCompositions = useCallback10((updateComps) => {\n setCompositions((comps) => {\n const updated = updateComps(comps);\n currentcompositionsRef.current = updated;\n return updated;\n });\n }, []);\n const registerComposition = useCallback10((comp) => {\n updateCompositions((comps) => {\n if (comps.find((c) => c.id === comp.id)) {\n throw new Error(`Multiple composition with id ${comp.id} are registered.`);\n }\n const value = [...comps, comp].slice().sort((a, b) => a.nonce - b.nonce);\n return value;\n });\n }, [updateCompositions]);\n const unregisterComposition = useCallback10((id) => {\n setCompositions((comps) => {\n return comps.filter((c) => c.id !== id);\n });\n }, []);\n const registerFolder = useCallback10((name, parent) => {\n setFolders((prevFolders) => {\n return [\n ...prevFolders,\n {\n name,\n parent\n }\n ];\n });\n }, []);\n const unregisterFolder = useCallback10((name, parent) => {\n setFolders((prevFolders) => {\n return prevFolders.filter((p) => !(p.name === name && p.parent === parent));\n });\n }, []);\n useImperativeHandle5(compositionsRef, () => {\n return {\n getCompositions: () => currentcompositionsRef.current\n };\n }, []);\n const composition = compositions.find((c) => canvasContent?.type === \"composition\" ? c.id === canvasContent.compositionId : null);\n const updateCompositionDefaultProps = useCallback10((id, newDefaultProps) => {\n setCompositions((comps) => {\n const updated = comps.map((c) => {\n if (c.id === id) {\n return {\n ...c,\n defaultProps: newDefaultProps\n };\n }\n return c;\n });\n return updated;\n });\n }, []);\n const contextValue = useMemo25(() => {\n return {\n compositions,\n registerComposition,\n unregisterComposition,\n folders,\n registerFolder,\n unregisterFolder,\n currentCompositionMetadata,\n setCurrentCompositionMetadata,\n canvasContent,\n setCanvasContent,\n updateCompositionDefaultProps\n };\n }, [\n compositions,\n registerComposition,\n unregisterComposition,\n folders,\n registerFolder,\n unregisterFolder,\n currentCompositionMetadata,\n canvasContent,\n updateCompositionDefaultProps\n ]);\n return /* @__PURE__ */ jsx22(CompositionManager.Provider, {\n value: contextValue,\n children: /* @__PURE__ */ jsx22(SequenceManagerProvider, {\n children: /* @__PURE__ */ jsx22(RenderAssetManagerProvider, {\n children: /* @__PURE__ */ jsx22(ResolveCompositionConfig, {\n children: /* @__PURE__ */ jsx22(SharedAudioContextProvider, {\n numberOfAudioTags,\n component: composition?.component ?? null,\n children\n })\n })\n })\n })\n });\n};\n// src/bezier.ts\nfunction a(aA1, aA2) {\n return 1 - 3 * aA2 + 3 * aA1;\n}\nfunction b(aA1, aA2) {\n return 3 * aA2 - 6 * aA1;\n}\nfunction c(aA1) {\n return 3 * aA1;\n}\nfunction calcBezier(aT, aA1, aA2) {\n return ((a(aA1, aA2) * aT + b(aA1, aA2)) * aT + c(aA1)) * aT;\n}\nfunction getSlope(aT, aA1, aA2) {\n return 3 * a(aA1, aA2) * aT * aT + 2 * b(aA1, aA2) * aT + c(aA1);\n}\nfunction binarySubdivide({\n aX,\n _aA,\n _aB,\n mX1,\n mX2\n}) {\n let currentX;\n let currentT;\n let i = 0;\n let aA = _aA;\n let aB = _aB;\n do {\n currentT = aA + (aB - aA) / 2;\n currentX = calcBezier(currentT, mX1, mX2) - aX;\n if (currentX > 0) {\n aB = currentT;\n } else {\n aA = currentT;\n }\n } while (Math.abs(currentX) > SUBDIVISION_PRECISION && ++i < SUBDIVISION_MAX_ITERATIONS);\n return currentT;\n}\nfunction newtonRaphsonIterate(aX, _aGuessT, mX1, mX2) {\n let aGuessT = _aGuessT;\n for (let i = 0;i < NEWTON_ITERATIONS; ++i) {\n const currentSlope = getSlope(aGuessT, mX1, mX2);\n if (currentSlope === 0) {\n return aGuessT;\n }\n const currentX = calcBezier(aGuessT, mX1, mX2) - aX;\n aGuessT -= currentX / currentSlope;\n }\n return aGuessT;\n}\nfunction bezier(mX1, mY1, mX2, mY2) {\n if (!(mX1 >= 0 && mX1 <= 1 && mX2 >= 0 && mX2 <= 1)) {\n throw new Error(\"bezier x values must be in [0, 1] range\");\n }\n const sampleValues = float32ArraySupported ? new Float32Array(kSplineTableSize) : new Array(kSplineTableSize);\n if (mX1 !== mY1 || mX2 !== mY2) {\n for (let i = 0;i < kSplineTableSize; ++i) {\n sampleValues[i] = calcBezier(i * kSampleStepSize, mX1, mX2);\n }\n }\n function getTForX(aX) {\n let intervalStart = 0;\n let currentSample = 1;\n const lastSample = kSplineTableSize - 1;\n for (;currentSample !== lastSample && sampleValues[currentSample] <= aX; ++currentSample) {\n intervalStart += kSampleStepSize;\n }\n --currentSample;\n const dist = (aX - sampleValues[currentSample]) / (sampleValues[currentSample + 1] - sampleValues[currentSample]);\n const guessForT = intervalStart + dist * kSampleStepSize;\n const initialSlope = getSlope(guessForT, mX1, mX2);\n if (initialSlope >= NEWTON_MIN_SLOPE) {\n return newtonRaphsonIterate(aX, guessForT, mX1, mX2);\n }\n if (initialSlope === 0) {\n return guessForT;\n }\n return binarySubdivide({\n aX,\n _aA: intervalStart,\n _aB: intervalStart + kSampleStepSize,\n mX1,\n mX2\n });\n }\n return function(x) {\n if (mX1 === mY1 && mX2 === mY2) {\n return x;\n }\n if (x === 0) {\n return 0;\n }\n if (x === 1) {\n return 1;\n }\n return calcBezier(getTForX(x), mY1, mY2);\n };\n}\nvar NEWTON_ITERATIONS = 4;\nvar NEWTON_MIN_SLOPE = 0.001;\nvar SUBDIVISION_PRECISION = 0.0000001;\nvar SUBDIVISION_MAX_ITERATIONS = 10;\nvar kSplineTableSize = 11;\nvar kSampleStepSize = 1 / (kSplineTableSize - 1);\nvar float32ArraySupported = typeof Float32Array === \"function\";\n\n// src/easing.ts\nclass Easing {\n static step0(n) {\n return n > 0 ? 1 : 0;\n }\n static step1(n) {\n return n >= 1 ? 1 : 0;\n }\n static linear(t) {\n return t;\n }\n static ease(t) {\n return Easing.bezier(0.42, 0, 1, 1)(t);\n }\n static quad(t) {\n return t * t;\n }\n static cubic(t) {\n return t * t * t;\n }\n static poly(n) {\n return (t) => t ** n;\n }\n static sin(t) {\n return 1 - Math.cos(t * Math.PI / 2);\n }\n static circle(t) {\n return 1 - Math.sqrt(1 - t * t);\n }\n static exp(t) {\n return 2 ** (10 * (t - 1));\n }\n static elastic(bounciness = 1) {\n const p = bounciness * Math.PI;\n return (t) => 1 - Math.cos(t * Math.PI / 2) ** 3 * Math.cos(t * p);\n }\n static back(s = 1.70158) {\n return (t) => t * t * ((s + 1) * t - s);\n }\n static bounce(t) {\n if (t < 1 / 2.75) {\n return 7.5625 * t * t;\n }\n if (t < 2 / 2.75) {\n const t2_ = t - 1.5 / 2.75;\n return 7.5625 * t2_ * t2_ + 0.75;\n }\n if (t < 2.5 / 2.75) {\n const t2_ = t - 2.25 / 2.75;\n return 7.5625 * t2_ * t2_ + 0.9375;\n }\n const t2 = t - 2.625 / 2.75;\n return 7.5625 * t2 * t2 + 0.984375;\n }\n static bezier(x1, y1, x2, y2) {\n return bezier(x1, y1, x2, y2);\n }\n static in(easing) {\n return easing;\n }\n static out(easing) {\n return (t) => 1 - easing(1 - t);\n }\n static inOut(easing) {\n return (t) => {\n if (t < 0.5) {\n return easing(t * 2) / 2;\n }\n return 1 - easing((1 - t) * 2) / 2;\n };\n }\n}\n// src/v5-flag.ts\nvar ENABLE_V5_BREAKING_CHANGES = false;\n\n// src/get-static-files.ts\nvar warnedServer = false;\nvar warnedPlayer = false;\nvar warnServerOnce = () => {\n if (warnedServer) {\n return;\n }\n warnedServer = true;\n console.warn(\"Called getStaticFiles() on the server. The API is only available in the browser. An empty array was returned.\");\n};\nvar warnPlayerOnce = () => {\n if (warnedPlayer) {\n return;\n }\n warnedPlayer = true;\n console.warn(\"Called getStaticFiles() while using the Remotion Player. The API is only available while using the Remotion Studio. An empty array was returned.\");\n};\nvar getStaticFiles = () => {\n if (ENABLE_V5_BREAKING_CHANGES) {\n throw new Error(\"getStaticFiles() has moved into the `@remotion/studio` package. Update your imports.\");\n }\n if (typeof document === \"undefined\") {\n warnServerOnce();\n return [];\n }\n if (window.remotion_isPlayer) {\n warnPlayerOnce();\n return [];\n }\n return window.remotion_staticFiles;\n};\n// src/IFrame.tsx\nimport { forwardRef as forwardRef6, useCallback as useCallback11, useState as useState16 } from \"react\";\nimport { jsx as jsx23 } from \"react/jsx-runtime\";\nvar IFrameRefForwarding = ({\n onLoad,\n onError,\n delayRenderRetries,\n delayRenderTimeoutInMilliseconds,\n ...props2\n}, ref) => {\n const [handle] = useState16(() => delayRender(`Loading <IFrame> with source ${props2.src}`, {\n retries: delayRenderRetries ?? undefined,\n timeoutInMilliseconds: delayRenderTimeoutInMilliseconds ?? undefined\n }));\n const didLoad = useCallback11((e) => {\n continueRender(handle);\n onLoad?.(e);\n }, [handle, onLoad]);\n const didGetError = useCallback11((e) => {\n continueRender(handle);\n if (onError) {\n onError(e);\n } else {\n console.error(\"Error loading iframe:\", e, \"Handle the event using the onError() prop to make this message disappear.\");\n }\n }, [handle, onError]);\n return /* @__PURE__ */ jsx23(\"iframe\", {\n ...props2,\n ref,\n onError: didGetError,\n onLoad: didLoad\n });\n};\nvar IFrame = forwardRef6(IFrameRefForwarding);\n// src/Img.tsx\nimport {\n forwardRef as forwardRef7,\n useCallback as useCallback12,\n useContext as useContext26,\n useImperativeHandle as useImperativeHandle6,\n useLayoutEffect as useLayoutEffect4,\n useRef as useRef11\n} from \"react\";\nfunction exponentialBackoff(errorCount) {\n return 1000 * 2 ** (errorCount - 1);\n}\nimport { jsx as jsx24 } from \"react/jsx-runtime\";\nvar ImgRefForwarding = ({\n onError,\n maxRetries = 2,\n src,\n pauseWhenLoading,\n delayRenderRetries,\n delayRenderTimeoutInMilliseconds,\n onImageFrame,\n ...props2\n}, ref) => {\n const imageRef = useRef11(null);\n const errors = useRef11({});\n const { delayPlayback } = useBufferState();\n const sequenceContext = useContext26(SequenceContext);\n if (!src) {\n throw new Error('No \"src\" prop was passed to <Img>.');\n }\n useImperativeHandle6(ref, () => {\n return imageRef.current;\n }, []);\n const actualSrc = usePreload(src);\n const retryIn = useCallback12((timeout) => {\n if (!imageRef.current) {\n return;\n }\n const currentSrc = imageRef.current.src;\n setTimeout(() => {\n if (!imageRef.current) {\n return;\n }\n const newSrc = imageRef.current?.src;\n if (newSrc !== currentSrc) {\n return;\n }\n imageRef.current.removeAttribute(\"src\");\n imageRef.current.setAttribute(\"src\", newSrc);\n }, timeout);\n }, []);\n const didGetError = useCallback12((e) => {\n if (!errors.current) {\n return;\n }\n errors.current[imageRef.current?.src] = (errors.current[imageRef.current?.src] ?? 0) + 1;\n if (onError && (errors.current[imageRef.current?.src] ?? 0) > maxRetries) {\n onError(e);\n return;\n }\n if ((errors.current[imageRef.current?.src] ?? 0) <= maxRetries) {\n const backoff = exponentialBackoff(errors.current[imageRef.current?.src] ?? 0);\n console.warn(`Could not load image with source ${imageRef.current?.src}, retrying again in ${backoff}ms`);\n retryIn(backoff);\n return;\n }\n cancelRender(\"Error loading image with src: \" + imageRef.current?.src);\n }, [maxRetries, onError, retryIn]);\n if (typeof window !== \"undefined\") {\n const isPremounting = Boolean(sequenceContext?.premounting);\n useLayoutEffect4(() => {\n if (window.process?.env?.NODE_ENV === \"test\") {\n if (imageRef.current) {\n imageRef.current.src = actualSrc;\n }\n return;\n }\n const newHandle = delayRender(\"Loading <Img> with src=\" + actualSrc, {\n retries: delayRenderRetries ?? undefined,\n timeoutInMilliseconds: delayRenderTimeoutInMilliseconds ?? undefined\n });\n const unblock = pauseWhenLoading && !isPremounting ? delayPlayback().unblock : () => {\n return;\n };\n const { current } = imageRef;\n let unmounted = false;\n const onComplete = () => {\n if (unmounted) {\n return;\n }\n if ((errors.current[imageRef.current?.src] ?? 0) > 0) {\n delete errors.current[imageRef.current?.src];\n console.info(`Retry successful - ${imageRef.current?.src} is now loaded`);\n }\n if (current) {\n current.src = actualSrc;\n onImageFrame?.(current);\n }\n unblock();\n continueRender(newHandle);\n };\n const newImg = new Image;\n newImg.src = actualSrc;\n newImg.decode().then(onComplete).catch((err) => {\n console.warn(err);\n if (newImg.complete) {\n onComplete();\n } else {\n newImg.addEventListener(\"load\", onComplete);\n }\n });\n return () => {\n unmounted = true;\n newImg.removeEventListener(\"load\", onComplete);\n unblock();\n continueRender(newHandle);\n };\n }, [\n actualSrc,\n delayPlayback,\n delayRenderRetries,\n delayRenderTimeoutInMilliseconds,\n pauseWhenLoading,\n isPremounting,\n onImageFrame\n ]);\n }\n return /* @__PURE__ */ jsx24(\"img\", {\n ...props2,\n ref: imageRef,\n onError: didGetError\n });\n};\nvar Img = forwardRef7(ImgRefForwarding);\n// src/default-css.ts\nvar exports_default_css = {};\n__export(exports_default_css, {\n makeDefaultPreviewCSS: () => makeDefaultPreviewCSS,\n injectCSS: () => injectCSS,\n OFFTHREAD_VIDEO_CLASS_NAME: () => OFFTHREAD_VIDEO_CLASS_NAME\n});\nvar injected = {};\nvar injectCSS = (css) => {\n if (typeof document === \"undefined\") {\n return;\n }\n if (injected[css]) {\n return;\n }\n const head = document.head || document.getElementsByTagName(\"head\")[0];\n const style = document.createElement(\"style\");\n style.appendChild(document.createTextNode(css));\n head.prepend(style);\n injected[css] = true;\n};\nvar OFFTHREAD_VIDEO_CLASS_NAME = \"__remotion_offthreadvideo\";\nvar makeDefaultPreviewCSS = (scope, backgroundColor) => {\n if (!scope) {\n return `\n * {\n box-sizing: border-box;\n }\n body {\n margin: 0;\n\t background-color: ${backgroundColor};\n }\n .${OFFTHREAD_VIDEO_CLASS_NAME} {\n object-fit: contain;\n }\n `;\n }\n return `\n ${scope} * {\n box-sizing: border-box;\n }\n ${scope} *:-webkit-full-screen {\n width: 100%;\n height: 100%;\n }\n ${scope} .${OFFTHREAD_VIDEO_CLASS_NAME} {\n object-fit: contain;\n }\n `;\n};\n\n// src/get-preview-dom-element.ts\nvar REMOTION_STUDIO_CONTAINER_ELEMENT = \"__remotion-studio-container\";\nvar getPreviewDomElement = () => {\n return document.getElementById(REMOTION_STUDIO_CONTAINER_ELEMENT);\n};\n\n// src/register-root.ts\nvar Root = null;\nvar listeners = [];\nvar registerRoot = (comp) => {\n if (!comp) {\n throw new Error(`You must pass a React component to registerRoot(), but ${JSON.stringify(comp)} was passed.`);\n }\n if (Root) {\n throw new Error(\"registerRoot() was called more than once.\");\n }\n Root = comp;\n listeners.forEach((l) => {\n l(comp);\n });\n};\nvar getRoot = () => {\n return Root;\n};\nvar waitForRoot = (fn) => {\n if (Root) {\n fn(Root);\n return () => {\n return;\n };\n }\n listeners.push(fn);\n return () => {\n listeners = listeners.filter((l) => l !== fn);\n };\n};\n\n// src/RemotionRoot.tsx\nimport {\n useEffect as useEffect20,\n useLayoutEffect as useLayoutEffect5,\n useMemo as useMemo26,\n useRef as useRef12,\n useState as useState17\n} from \"react\";\nimport { jsx as jsx25 } from \"react/jsx-runtime\";\nvar RemotionRoot = ({ children, numberOfAudioTags }) => {\n const [remotionRootId] = useState17(() => String(random(null)));\n const [frame, setFrame] = useState17(() => getInitialFrameState());\n const [playing, setPlaying] = useState17(false);\n const imperativePlaying = useRef12(false);\n const [fastRefreshes, setFastRefreshes] = useState17(0);\n const [playbackRate, setPlaybackRate] = useState17(1);\n const audioAndVideoTags = useRef12([]);\n if (typeof window !== \"undefined\") {\n useLayoutEffect5(() => {\n window.remotion_setFrame = (f, composition, attempt) => {\n window.remotion_attempt = attempt;\n const id = delayRender(`Setting the current frame to ${f}`);\n let asyncUpdate = true;\n setFrame((s) => {\n const currentFrame = s[composition] ?? window.remotion_initialFrame;\n if (currentFrame === f) {\n asyncUpdate = false;\n return s;\n }\n return {\n ...s,\n [composition]: f\n };\n });\n if (asyncUpdate) {\n requestAnimationFrame(() => continueRender(id));\n } else {\n continueRender(id);\n }\n };\n window.remotion_isPlayer = false;\n }, []);\n }\n const timelineContextValue = useMemo26(() => {\n return {\n frame,\n playing,\n imperativePlaying,\n rootId: remotionRootId,\n playbackRate,\n setPlaybackRate,\n audioAndVideoTags\n };\n }, [frame, playbackRate, playing, remotionRootId]);\n const setTimelineContextValue = useMemo26(() => {\n return {\n setFrame,\n setPlaying\n };\n }, []);\n const nonceContext = useMemo26(() => {\n let counter = 0;\n return {\n getNonce: () => counter++,\n fastRefreshes\n };\n }, [fastRefreshes]);\n useEffect20(() => {\n if (typeof __webpack_module__ !== \"undefined\") {\n if (__webpack_module__.hot) {\n __webpack_module__.hot.addStatusHandler((status) => {\n if (status === \"idle\") {\n setFastRefreshes((i) => i + 1);\n }\n });\n }\n }\n }, []);\n return /* @__PURE__ */ jsx25(NonceContext.Provider, {\n value: nonceContext,\n children: /* @__PURE__ */ jsx25(TimelineContext.Provider, {\n value: timelineContextValue,\n children: /* @__PURE__ */ jsx25(SetTimelineContext.Provider, {\n value: setTimelineContextValue,\n children: /* @__PURE__ */ jsx25(EditorPropsProvider, {\n children: /* @__PURE__ */ jsx25(PrefetchProvider, {\n children: /* @__PURE__ */ jsx25(NativeLayersProvider, {\n children: /* @__PURE__ */ jsx25(CompositionManagerProvider, {\n numberOfAudioTags,\n children: /* @__PURE__ */ jsx25(DurationsContextProvider, {\n children: /* @__PURE__ */ jsx25(BufferingProvider, {\n children\n })\n })\n })\n })\n })\n })\n })\n })\n });\n};\n\n// src/setup-env-variables.ts\nvar getEnvVariables = () => {\n if (getRemotionEnvironment().isRendering) {\n const param = window.remotion_envVariables;\n if (!param) {\n return {};\n }\n return { ...JSON.parse(param), NODE_ENV: \"production\" };\n }\n if (false) {\n }\n return {\n NODE_ENV: \"production\"\n };\n};\nvar setupEnvVariables = () => {\n const env = getEnvVariables();\n if (!window.process) {\n window.process = {};\n }\n if (!window.process.env) {\n window.process.env = {};\n }\n Object.keys(env).forEach((key) => {\n window.process.env[key] = env[key];\n });\n};\n\n// src/use-current-scale.ts\nimport React22, { createContext as createContext18 } from \"react\";\nvar CurrentScaleContext = React22.createContext(null);\nvar PreviewSizeContext = createContext18({\n setSize: () => {\n return;\n },\n size: { size: \"auto\", translation: { x: 0, y: 0 } }\n});\nvar calculateScale = ({\n canvasSize,\n compositionHeight,\n compositionWidth,\n previewSize\n}) => {\n const heightRatio = canvasSize.height / compositionHeight;\n const widthRatio = canvasSize.width / compositionWidth;\n const ratio = Math.min(heightRatio, widthRatio);\n return previewSize === \"auto\" ? ratio : Number(previewSize);\n};\nvar useCurrentScale = (options) => {\n const hasContext = React22.useContext(CurrentScaleContext);\n const zoomContext = React22.useContext(PreviewSizeContext);\n const config = useUnsafeVideoConfig();\n if (hasContext === null || config === null || zoomContext === null) {\n if (options?.dontThrowIfOutsideOfRemotion) {\n return 1;\n }\n if (getRemotionEnvironment().isRendering) {\n return 1;\n }\n throw new Error([\n \"useCurrentScale() was called outside of a Remotion context.\",\n \"This hook can only be called in a component that is being rendered by Remotion.\",\n \"If you want to this hook to return 1 outside of Remotion, pass {dontThrowIfOutsideOfRemotion: true} as an option.\",\n \"If you think you called this hook in a Remotion component, make sure all versions of Remotion are aligned.\"\n ].join(\"\\n\"));\n }\n if (hasContext.type === \"scale\") {\n return hasContext.scale;\n }\n return calculateScale({\n canvasSize: hasContext.canvasSize,\n compositionHeight: config.height,\n compositionWidth: config.width,\n previewSize: zoomContext.size.size\n });\n};\n\n// src/watch-static-file.ts\nvar WATCH_REMOTION_STATIC_FILES = \"remotion_staticFilesChanged\";\nvar watchStaticFile = (fileName, callback) => {\n if (ENABLE_V5_BREAKING_CHANGES) {\n throw new Error(\"watchStaticFile() has moved into the `@remotion/studio` package. Update your imports.\");\n }\n if (!getRemotionEnvironment().isStudio) {\n console.warn(\"The API is only available while using the Remotion Studio.\");\n return { cancel: () => {\n return;\n } };\n }\n const withoutStaticBase = fileName.startsWith(window.remotion_staticBase) ? fileName.replace(window.remotion_staticBase, \"\") : fileName;\n const withoutLeadingSlash = withoutStaticBase.startsWith(\"/\") ? withoutStaticBase.slice(1) : withoutStaticBase;\n let prevFileData = window.remotion_staticFiles.find((file) => file.name === withoutLeadingSlash);\n const checkFile = (event) => {\n const staticFiles = event.detail.files;\n const newFileData = staticFiles.find((file) => file.name === withoutLeadingSlash);\n if (!newFileData) {\n if (prevFileData !== undefined) {\n callback(null);\n }\n prevFileData = undefined;\n return;\n }\n if (prevFileData === undefined || prevFileData.lastModified !== newFileData.lastModified) {\n callback(newFileData);\n prevFileData = newFileData;\n }\n };\n window.addEventListener(WATCH_REMOTION_STATIC_FILES, checkFile);\n const cancel = () => {\n return window.removeEventListener(WATCH_REMOTION_STATIC_FILES, checkFile);\n };\n return { cancel };\n};\n\n// src/wrap-remotion-context.tsx\nimport React23, { useMemo as useMemo27 } from \"react\";\nfunction useRemotionContexts() {\n const compositionManagerCtx = React23.useContext(CompositionManager);\n const timelineContext = React23.useContext(TimelineContext);\n const setTimelineContext = React23.useContext(SetTimelineContext);\n const sequenceContext = React23.useContext(SequenceContext);\n const nonceContext = React23.useContext(NonceContext);\n const canUseRemotionHooksContext = React23.useContext(CanUseRemotionHooks);\n const nativeLayersContext = React23.useContext(NativeLayersContext);\n const preloadContext = React23.useContext(PreloadContext);\n const resolveCompositionContext = React23.useContext(ResolveCompositionContext);\n const renderAssetManagerContext = React23.useContext(RenderAssetManager);\n const sequenceManagerContext = React23.useContext(SequenceManager);\n const bufferManagerContext = React23.useContext(BufferingContextReact);\n return useMemo27(() => ({\n compositionManagerCtx,\n timelineContext,\n setTimelineContext,\n sequenceContext,\n nonceContext,\n canUseRemotionHooksContext,\n nativeLayersContext,\n preloadContext,\n resolveCompositionContext,\n renderAssetManagerContext,\n sequenceManagerContext,\n bufferManagerContext\n }), [\n compositionManagerCtx,\n nonceContext,\n sequenceContext,\n setTimelineContext,\n timelineContext,\n canUseRemotionHooksContext,\n nativeLayersContext,\n preloadContext,\n resolveCompositionContext,\n renderAssetManagerContext,\n sequenceManagerContext,\n bufferManagerContext\n ]);\n}\nimport { jsx as jsx26 } from \"react/jsx-runtime\";\nvar RemotionContextProvider = (props2) => {\n const { children, contexts } = props2;\n return /* @__PURE__ */ jsx26(CanUseRemotionHooks.Provider, {\n value: contexts.canUseRemotionHooksContext,\n children: /* @__PURE__ */ jsx26(NonceContext.Provider, {\n value: contexts.nonceContext,\n children: /* @__PURE__ */ jsx26(NativeLayersContext.Provider, {\n value: contexts.nativeLayersContext,\n children: /* @__PURE__ */ jsx26(PreloadContext.Provider, {\n value: contexts.preloadContext,\n children: /* @__PURE__ */ jsx26(CompositionManager.Provider, {\n value: contexts.compositionManagerCtx,\n children: /* @__PURE__ */ jsx26(SequenceManager.Provider, {\n value: contexts.sequenceManagerContext,\n children: /* @__PURE__ */ jsx26(RenderAssetManager.Provider, {\n value: contexts.renderAssetManagerContext,\n children: /* @__PURE__ */ jsx26(ResolveCompositionContext.Provider, {\n value: contexts.resolveCompositionContext,\n children: /* @__PURE__ */ jsx26(TimelineContext.Provider, {\n value: contexts.timelineContext,\n children: /* @__PURE__ */ jsx26(SetTimelineContext.Provider, {\n value: contexts.setTimelineContext,\n children: /* @__PURE__ */ jsx26(SequenceContext.Provider, {\n value: contexts.sequenceContext,\n children: /* @__PURE__ */ jsx26(BufferingContextReact.Provider, {\n value: contexts.bufferManagerContext,\n children\n })\n })\n })\n })\n })\n })\n })\n })\n })\n })\n })\n });\n};\n\n// src/internals.ts\nvar Internals = {\n useUnsafeVideoConfig,\n Timeline: exports_timeline_position_state,\n CompositionManager,\n SequenceManager,\n SequenceVisibilityToggleContext,\n RemotionRoot,\n useVideo,\n getRoot,\n useMediaVolumeState,\n useMediaMutedState,\n useLazyComponent,\n truthy,\n SequenceContext,\n useRemotionContexts,\n RemotionContextProvider,\n CSSUtils: exports_default_css,\n setupEnvVariables,\n MediaVolumeContext,\n SetMediaVolumeContext,\n getRemotionEnvironment,\n SharedAudioContext,\n SharedAudioContextProvider,\n invalidCompositionErrorMessage,\n isCompositionIdValid,\n getPreviewDomElement,\n compositionsRef,\n portalNode,\n waitForRoot,\n CanUseRemotionHooksProvider,\n CanUseRemotionHooks,\n PrefetchProvider,\n DurationsContextProvider,\n IsPlayerContextProvider,\n useIsPlayer,\n EditorPropsProvider,\n EditorPropsContext,\n usePreload,\n NonceContext,\n resolveVideoConfig,\n useResolvedVideoConfig,\n resolveCompositionsRef,\n ResolveCompositionConfig,\n REMOTION_STUDIO_CONTAINER_ELEMENT,\n RenderAssetManager,\n persistCurrentFrame,\n useTimelineSetFrame,\n NativeLayersProvider,\n ClipComposition,\n isIosSafari,\n WATCH_REMOTION_STATIC_FILES,\n addSequenceStackTraces,\n useMediaStartsAt,\n BufferingProvider,\n BufferingContextReact,\n enableSequenceStackTraces,\n CurrentScaleContext,\n PreviewSizeContext,\n calculateScale,\n editorPropsProviderRef,\n PROPS_UPDATED_EXTERNALLY,\n validateRenderAsset\n};\n// src/interpolate-colors.ts\nfunction call(...args) {\n return \"\\\\(\\\\s*(\" + args.join(\")\\\\s*,\\\\s*(\") + \")\\\\s*\\\\)\";\n}\nfunction getMatchers() {\n const cachedMatchers = {\n rgb: undefined,\n rgba: undefined,\n hsl: undefined,\n hsla: undefined,\n hex3: undefined,\n hex4: undefined,\n hex5: undefined,\n hex6: undefined,\n hex8: undefined\n };\n if (cachedMatchers.rgb === undefined) {\n cachedMatchers.rgb = new RegExp(\"rgb\" + call(NUMBER, NUMBER, NUMBER));\n cachedMatchers.rgba = new RegExp(\"rgba\" + call(NUMBER, NUMBER, NUMBER, NUMBER));\n cachedMatchers.hsl = new RegExp(\"hsl\" + call(NUMBER, PERCENTAGE, PERCENTAGE));\n cachedMatchers.hsla = new RegExp(\"hsla\" + call(NUMBER, PERCENTAGE, PERCENTAGE, NUMBER));\n cachedMatchers.hex3 = /^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/;\n cachedMatchers.hex4 = /^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/;\n cachedMatchers.hex6 = /^#([0-9a-fA-F]{6})$/;\n cachedMatchers.hex8 = /^#([0-9a-fA-F]{8})$/;\n }\n return cachedMatchers;\n}\nfunction hue2rgb(p, q, t) {\n if (t < 0) {\n t += 1;\n }\n if (t > 1) {\n t -= 1;\n }\n if (t < 1 / 6) {\n return p + (q - p) * 6 * t;\n }\n if (t < 1 / 2) {\n return q;\n }\n if (t < 2 / 3) {\n return p + (q - p) * (2 / 3 - t) * 6;\n }\n return p;\n}\nfunction hslToRgb(h, s, l) {\n const q = l < 0.5 ? l * (1 + s) : l + s - l * s;\n const p = 2 * l - q;\n const r = hue2rgb(p, q, h + 1 / 3);\n const g = hue2rgb(p, q, h);\n const b2 = hue2rgb(p, q, h - 1 / 3);\n return Math.round(r * 255) << 24 | Math.round(g * 255) << 16 | Math.round(b2 * 255) << 8;\n}\nfunction parse255(str) {\n const int = Number.parseInt(str, 10);\n if (int < 0) {\n return 0;\n }\n if (int > 255) {\n return 255;\n }\n return int;\n}\nfunction parse360(str) {\n const int = Number.parseFloat(str);\n return (int % 360 + 360) % 360 / 360;\n}\nfunction parse1(str) {\n const num = Number.parseFloat(str);\n if (num < 0) {\n return 0;\n }\n if (num > 1) {\n return 255;\n }\n return Math.round(num * 255);\n}\nfunction parsePercentage(str) {\n const int = Number.parseFloat(str);\n if (int < 0) {\n return 0;\n }\n if (int > 100) {\n return 1;\n }\n return int / 100;\n}\nfunction normalizeColor(color) {\n const matchers = getMatchers();\n let match;\n if (matchers.hex6) {\n if (match = matchers.hex6.exec(color)) {\n return Number.parseInt(match[1] + \"ff\", 16) >>> 0;\n }\n }\n if (colorNames[color] !== undefined) {\n return colorNames[color];\n }\n if (matchers.rgb) {\n if (match = matchers.rgb.exec(color)) {\n return (parse255(match[1]) << 24 | parse255(match[2]) << 16 | parse255(match[3]) << 8 | 255) >>> 0;\n }\n }\n if (matchers.rgba) {\n if (match = matchers.rgba.exec(color)) {\n return (parse255(match[1]) << 24 | parse255(match[2]) << 16 | parse255(match[3]) << 8 | parse1(match[4])) >>> 0;\n }\n }\n if (matchers.hex3) {\n if (match = matchers.hex3.exec(color)) {\n return Number.parseInt(match[1] + match[1] + match[2] + match[2] + match[3] + match[3] + \"ff\", 16) >>> 0;\n }\n }\n if (matchers.hex8) {\n if (match = matchers.hex8.exec(color)) {\n return Number.parseInt(match[1], 16) >>> 0;\n }\n }\n if (matchers.hex4) {\n if (match = matchers.hex4.exec(color)) {\n return Number.parseInt(match[1] + match[1] + match[2] + match[2] + match[3] + match[3] + match[4] + match[4], 16) >>> 0;\n }\n }\n if (matchers.hsl) {\n if (match = matchers.hsl.exec(color)) {\n return (hslToRgb(parse360(match[1]), parsePercentage(match[2]), parsePercentage(match[3])) | 255) >>> 0;\n }\n }\n if (matchers.hsla) {\n if (match = matchers.hsla.exec(color)) {\n return (hslToRgb(parse360(match[1]), parsePercentage(match[2]), parsePercentage(match[3])) | parse1(match[4])) >>> 0;\n }\n }\n throw new Error(`invalid color string ${color} provided`);\n}\nfunction processColor(color) {\n const normalizedColor = normalizeColor(color);\n return (normalizedColor << 24 | normalizedColor >>> 8) >>> 0;\n}\nvar NUMBER = \"[-+]?\\\\d*\\\\.?\\\\d+\";\nvar PERCENTAGE = NUMBER + \"%\";\nvar colorNames = {\n transparent: 0,\n aliceblue: 4042850303,\n antiquewhite: 4209760255,\n aqua: 16777215,\n aquamarine: 2147472639,\n azure: 4043309055,\n beige: 4126530815,\n bisque: 4293182719,\n black: 255,\n blanchedalmond: 4293643775,\n blue: 65535,\n blueviolet: 2318131967,\n brown: 2771004159,\n burlywood: 3736635391,\n burntsienna: 3934150143,\n cadetblue: 1604231423,\n chartreuse: 2147418367,\n chocolate: 3530104575,\n coral: 4286533887,\n cornflowerblue: 1687547391,\n cornsilk: 4294499583,\n crimson: 3692313855,\n cyan: 16777215,\n darkblue: 35839,\n darkcyan: 9145343,\n darkgoldenrod: 3095792639,\n darkgray: 2846468607,\n darkgreen: 6553855,\n darkgrey: 2846468607,\n darkkhaki: 3182914559,\n darkmagenta: 2332068863,\n darkolivegreen: 1433087999,\n darkorange: 4287365375,\n darkorchid: 2570243327,\n darkred: 2332033279,\n darksalmon: 3918953215,\n darkseagreen: 2411499519,\n darkslateblue: 1211993087,\n darkslategray: 793726975,\n darkslategrey: 793726975,\n darkturquoise: 13554175,\n darkviolet: 2483082239,\n deeppink: 4279538687,\n deepskyblue: 12582911,\n dimgray: 1768516095,\n dimgrey: 1768516095,\n dodgerblue: 512819199,\n firebrick: 2988581631,\n floralwhite: 4294635775,\n forestgreen: 579543807,\n fuchsia: 4278255615,\n gainsboro: 3705462015,\n ghostwhite: 4177068031,\n gold: 4292280575,\n goldenrod: 3668254975,\n gray: 2155905279,\n green: 8388863,\n greenyellow: 2919182335,\n grey: 2155905279,\n honeydew: 4043305215,\n hotpink: 4285117695,\n indianred: 3445382399,\n indigo: 1258324735,\n ivory: 4294963455,\n khaki: 4041641215,\n lavender: 3873897215,\n lavenderblush: 4293981695,\n lawngreen: 2096890111,\n lemonchiffon: 4294626815,\n lightblue: 2916673279,\n lightcoral: 4034953471,\n lightcyan: 3774873599,\n lightgoldenrodyellow: 4210742015,\n lightgray: 3553874943,\n lightgreen: 2431553791,\n lightgrey: 3553874943,\n lightpink: 4290167295,\n lightsalmon: 4288707327,\n lightseagreen: 548580095,\n lightskyblue: 2278488831,\n lightslategray: 2005441023,\n lightslategrey: 2005441023,\n lightsteelblue: 2965692159,\n lightyellow: 4294959359,\n lime: 16711935,\n limegreen: 852308735,\n linen: 4210091775,\n magenta: 4278255615,\n maroon: 2147483903,\n mediumaquamarine: 1724754687,\n mediumblue: 52735,\n mediumorchid: 3126187007,\n mediumpurple: 2473647103,\n mediumseagreen: 1018393087,\n mediumslateblue: 2070474495,\n mediumspringgreen: 16423679,\n mediumturquoise: 1221709055,\n mediumvioletred: 3340076543,\n midnightblue: 421097727,\n mintcream: 4127193855,\n mistyrose: 4293190143,\n moccasin: 4293178879,\n navajowhite: 4292783615,\n navy: 33023,\n oldlace: 4260751103,\n olive: 2155872511,\n olivedrab: 1804477439,\n orange: 4289003775,\n orangered: 4282712319,\n orchid: 3664828159,\n palegoldenrod: 4008225535,\n palegreen: 2566625535,\n paleturquoise: 2951671551,\n palevioletred: 3681588223,\n papayawhip: 4293907967,\n peachpuff: 4292524543,\n peru: 3448061951,\n pink: 4290825215,\n plum: 3718307327,\n powderblue: 2967529215,\n purple: 2147516671,\n rebeccapurple: 1714657791,\n red: 4278190335,\n rosybrown: 3163525119,\n royalblue: 1097458175,\n saddlebrown: 2336560127,\n salmon: 4202722047,\n sandybrown: 4104413439,\n seagreen: 780883967,\n seashell: 4294307583,\n sienna: 2689740287,\n silver: 3233857791,\n skyblue: 2278484991,\n slateblue: 1784335871,\n slategray: 1887473919,\n slategrey: 1887473919,\n snow: 4294638335,\n springgreen: 16744447,\n steelblue: 1182971135,\n tan: 3535047935,\n teal: 8421631,\n thistle: 3636451583,\n tomato: 4284696575,\n turquoise: 1088475391,\n violet: 4001558271,\n wheat: 4125012991,\n white: 4294967295,\n whitesmoke: 4126537215,\n yellow: 4294902015,\n yellowgreen: 2597139199\n};\nvar opacity = (c2) => {\n return (c2 >> 24 & 255) / 255;\n};\nvar red = (c2) => {\n return c2 >> 16 & 255;\n};\nvar green = (c2) => {\n return c2 >> 8 & 255;\n};\nvar blue = (c2) => {\n return c2 & 255;\n};\nvar rgbaColor = (r, g, b2, alpha) => {\n return `rgba(${r}, ${g}, ${b2}, ${alpha})`;\n};\nvar interpolateColorsRGB = (value, inputRange, colors) => {\n const [r, g, b2, a2] = [red, green, blue, opacity].map((f) => {\n const unrounded = interpolate(value, inputRange, colors.map((c2) => f(c2)), {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\"\n });\n if (f === opacity) {\n return Number(unrounded.toFixed(3));\n }\n return Math.round(unrounded);\n });\n return rgbaColor(r, g, b2, a2);\n};\nvar interpolateColors = (input, inputRange, outputRange) => {\n if (typeof input === \"undefined\") {\n throw new TypeError(\"input can not be undefined\");\n }\n if (typeof inputRange === \"undefined\") {\n throw new TypeError(\"inputRange can not be undefined\");\n }\n if (typeof outputRange === \"undefined\") {\n throw new TypeError(\"outputRange can not be undefined\");\n }\n if (inputRange.length !== outputRange.length) {\n throw new TypeError(\"inputRange (\" + inputRange.length + \" values provided) and outputRange (\" + outputRange.length + \" values provided) must have the same length\");\n }\n const processedOutputRange = outputRange.map((c2) => processColor(c2));\n return interpolateColorsRGB(input, inputRange, processedOutputRange);\n};\n// src/validate-frame.ts\nvar validateFrame = ({\n allowFloats,\n durationInFrames,\n frame\n}) => {\n if (typeof frame === \"undefined\") {\n throw new TypeError(`Argument missing for parameter \"frame\"`);\n }\n if (typeof frame !== \"number\") {\n throw new TypeError(`Argument passed for \"frame\" is not a number: ${frame}`);\n }\n if (!Number.isFinite(frame)) {\n throw new RangeError(`Frame ${frame} is not finite`);\n }\n if (frame % 1 !== 0 && !allowFloats) {\n throw new RangeError(`Argument for frame must be an integer, but got ${frame}`);\n }\n if (frame < 0 && frame < -durationInFrames) {\n throw new RangeError(`Cannot use frame ${frame}: Duration of composition is ${durationInFrames}, therefore the lowest frame that can be rendered is ${-durationInFrames}`);\n }\n if (frame > durationInFrames - 1) {\n throw new RangeError(`Cannot use frame ${frame}: Duration of composition is ${durationInFrames}, therefore the highest frame that can be rendered is ${durationInFrames - 1}`);\n }\n};\n\n// src/video/offthread-video-source.ts\nvar getOffthreadVideoSource = ({\n src,\n transparent,\n currentTime,\n toneMapped\n}) => {\n return `http://localhost:${window.remotion_proxyPort}/proxy?src=${encodeURIComponent(getAbsoluteSrc(src))}&time=${encodeURIComponent(currentTime)}&transparent=${String(transparent)}&toneMapped=${String(toneMapped)}`;\n};\n// src/series/index.tsx\nimport { Children, forwardRef as forwardRef8, useMemo as useMemo28 } from \"react\";\n\n// src/series/flatten-children.tsx\nimport React24 from \"react\";\nvar flattenChildren = (children) => {\n const childrenArray = React24.Children.toArray(children);\n return childrenArray.reduce((flatChildren, child) => {\n if (child.type === React24.Fragment) {\n return flatChildren.concat(flattenChildren(child.props.children));\n }\n flatChildren.push(child);\n return flatChildren;\n }, []);\n};\n\n// src/series/is-inside-series.tsx\nimport React25, { createContext as createContext19 } from \"react\";\nimport { jsx as jsx27 } from \"react/jsx-runtime\";\nvar IsInsideSeriesContext = createContext19(false);\nvar IsInsideSeriesContainer = ({ children }) => {\n return /* @__PURE__ */ jsx27(IsInsideSeriesContext.Provider, {\n value: true,\n children\n });\n};\nvar IsNotInsideSeriesProvider = ({ children }) => {\n return /* @__PURE__ */ jsx27(IsInsideSeriesContext.Provider, {\n value: false,\n children\n });\n};\nvar useRequireToBeInsideSeries = () => {\n const isInsideSeries = React25.useContext(IsInsideSeriesContext);\n if (!isInsideSeries) {\n throw new Error(\"This component must be inside a <Series /> component.\");\n }\n};\n\n// src/series/index.tsx\nimport { jsx as jsx28 } from \"react/jsx-runtime\";\nvar SeriesSequenceRefForwardingFunction = ({ children }, _ref) => {\n useRequireToBeInsideSeries();\n return /* @__PURE__ */ jsx28(IsNotInsideSeriesProvider, {\n children\n });\n};\nvar SeriesSequence = forwardRef8(SeriesSequenceRefForwardingFunction);\nvar Series = (props2) => {\n const childrenValue = useMemo28(() => {\n let startFrame = 0;\n const flattenedChildren = flattenChildren(props2.children);\n return Children.map(flattenedChildren, (child, i) => {\n const castedChild = child;\n if (typeof castedChild === \"string\") {\n if (castedChild.trim() === \"\") {\n return null;\n }\n throw new TypeError(`The <Series /> component only accepts a list of <Series.Sequence /> components as its children, but you passed a string \"${castedChild}\"`);\n }\n if (castedChild.type !== SeriesSequence) {\n throw new TypeError(`The <Series /> component only accepts a list of <Series.Sequence /> components as its children, but got ${castedChild} instead`);\n }\n const debugInfo = `index = ${i}, duration = ${castedChild.props.durationInFrames}`;\n if (!castedChild?.props.children) {\n throw new TypeError(`A <Series.Sequence /> component (${debugInfo}) was detected to not have any children. Delete it to fix this error.`);\n }\n const durationInFramesProp = castedChild.props.durationInFrames;\n const {\n durationInFrames,\n children: _children,\n from,\n name,\n ...passedProps\n } = castedChild.props;\n if (i !== flattenedChildren.length - 1 || durationInFramesProp !== Infinity) {\n validateDurationInFrames(durationInFramesProp, {\n component: `of a <Series.Sequence /> component`,\n allowFloats: true\n });\n }\n const offset = castedChild.props.offset ?? 0;\n if (Number.isNaN(offset)) {\n throw new TypeError(`The \"offset\" property of a <Series.Sequence /> must not be NaN, but got NaN (${debugInfo}).`);\n }\n if (!Number.isFinite(offset)) {\n throw new TypeError(`The \"offset\" property of a <Series.Sequence /> must be finite, but got ${offset} (${debugInfo}).`);\n }\n if (offset % 1 !== 0) {\n throw new TypeError(`The \"offset\" property of a <Series.Sequence /> must be finite, but got ${offset} (${debugInfo}).`);\n }\n const currentStartFrame = startFrame + offset;\n startFrame += durationInFramesProp + offset;\n return /* @__PURE__ */ jsx28(Sequence, {\n name: name || \"<Series.Sequence>\",\n from: currentStartFrame,\n durationInFrames: durationInFramesProp,\n ...passedProps,\n ref: castedChild.ref,\n children: child\n });\n });\n }, [props2.children]);\n if (ENABLE_V5_BREAKING_CHANGES) {\n return /* @__PURE__ */ jsx28(IsInsideSeriesContainer, {\n children: /* @__PURE__ */ jsx28(Sequence, {\n ...props2,\n children: childrenValue\n })\n });\n }\n return /* @__PURE__ */ jsx28(IsInsideSeriesContainer, {\n children: childrenValue\n });\n};\nSeries.Sequence = SeriesSequence;\naddSequenceStackTraces(SeriesSequence);\n// src/validation/validation-spring-duration.ts\nvar validateSpringDuration = (dur) => {\n if (typeof dur === \"undefined\") {\n return;\n }\n if (typeof dur !== \"number\") {\n throw new TypeError(`A \"duration\" of a spring must be a \"number\" but is \"${typeof dur}\"`);\n }\n if (Number.isNaN(dur)) {\n throw new TypeError('A \"duration\" of a spring is NaN, which it must not be');\n }\n if (!Number.isFinite(dur)) {\n throw new TypeError('A \"duration\" of a spring must be finite, but is ' + dur);\n }\n if (dur <= 0) {\n throw new TypeError('A \"duration\" of a spring must be positive, but is ' + dur);\n }\n};\n\n// src/spring/spring-utils.ts\nfunction advance({\n animation,\n now,\n config\n}) {\n const { toValue, lastTimestamp, current, velocity } = animation;\n const deltaTime = Math.min(now - lastTimestamp, 64);\n if (config.damping <= 0) {\n throw new Error(\"Spring damping must be greater than 0, otherwise the spring() animation will never end, causing an infinite loop.\");\n }\n const c2 = config.damping;\n const m = config.mass;\n const k = config.stiffness;\n const cacheKey = [\n toValue,\n lastTimestamp,\n current,\n velocity,\n c2,\n m,\n k,\n now\n ].join(\"-\");\n if (advanceCache[cacheKey]) {\n return advanceCache[cacheKey];\n }\n const v0 = -velocity;\n const x0 = toValue - current;\n const zeta = c2 / (2 * Math.sqrt(k * m));\n const omega0 = Math.sqrt(k / m);\n const omega1 = omega0 * Math.sqrt(1 - zeta ** 2);\n const t = deltaTime / 1000;\n const sin1 = Math.sin(omega1 * t);\n const cos1 = Math.cos(omega1 * t);\n const underDampedEnvelope = Math.exp(-zeta * omega0 * t);\n const underDampedFrag1 = underDampedEnvelope * (sin1 * ((v0 + zeta * omega0 * x0) / omega1) + x0 * cos1);\n const underDampedPosition = toValue - underDampedFrag1;\n const underDampedVelocity = zeta * omega0 * underDampedFrag1 - underDampedEnvelope * (cos1 * (v0 + zeta * omega0 * x0) - omega1 * x0 * sin1);\n const criticallyDampedEnvelope = Math.exp(-omega0 * t);\n const criticallyDampedPosition = toValue - criticallyDampedEnvelope * (x0 + (v0 + omega0 * x0) * t);\n const criticallyDampedVelocity = criticallyDampedEnvelope * (v0 * (t * omega0 - 1) + t * x0 * omega0 * omega0);\n const animationNode = {\n toValue,\n prevPosition: current,\n lastTimestamp: now,\n current: zeta < 1 ? underDampedPosition : criticallyDampedPosition,\n velocity: zeta < 1 ? underDampedVelocity : criticallyDampedVelocity\n };\n advanceCache[cacheKey] = animationNode;\n return animationNode;\n}\nfunction springCalculation({\n frame,\n fps,\n config = {}\n}) {\n const from = 0;\n const to = 1;\n const cacheKey = [\n frame,\n fps,\n config.damping,\n config.mass,\n config.overshootClamping,\n config.stiffness\n ].join(\"-\");\n if (calculationCache[cacheKey]) {\n return calculationCache[cacheKey];\n }\n let animation = {\n lastTimestamp: 0,\n current: from,\n toValue: to,\n velocity: 0,\n prevPosition: 0\n };\n const frameClamped = Math.max(0, frame);\n const unevenRest = frameClamped % 1;\n for (let f = 0;f <= Math.floor(frameClamped); f++) {\n if (f === Math.floor(frameClamped)) {\n f += unevenRest;\n }\n const time = f / fps * 1000;\n animation = advance({\n animation,\n now: time,\n config: {\n ...defaultSpringConfig,\n ...config\n }\n });\n }\n calculationCache[cacheKey] = animation;\n return animation;\n}\nvar defaultSpringConfig = {\n damping: 10,\n mass: 1,\n stiffness: 100,\n overshootClamping: false\n};\nvar advanceCache = {};\nvar calculationCache = {};\n\n// src/spring/measure-spring.ts\nfunction measureSpring({\n fps,\n config = {},\n threshold = 0.005\n}) {\n if (typeof threshold !== \"number\") {\n throw new TypeError(`threshold must be a number, got ${threshold} of type ${typeof threshold}`);\n }\n if (threshold === 0) {\n return Infinity;\n }\n if (threshold === 1) {\n return 0;\n }\n if (isNaN(threshold)) {\n throw new TypeError(\"Threshold is NaN\");\n }\n if (!Number.isFinite(threshold)) {\n throw new TypeError(\"Threshold is not finite\");\n }\n if (threshold < 0) {\n throw new TypeError(\"Threshold is below 0\");\n }\n const cacheKey = [\n fps,\n config.damping,\n config.mass,\n config.overshootClamping,\n config.stiffness,\n threshold\n ].join(\"-\");\n if (cache.has(cacheKey)) {\n return cache.get(cacheKey);\n }\n validateFps(fps, \"to the measureSpring() function\", false);\n let frame = 0;\n let finishedFrame = 0;\n const calc = () => {\n return springCalculation({\n fps,\n frame,\n config\n });\n };\n let animation = calc();\n const calcDifference = () => {\n return Math.abs(animation.current - animation.toValue);\n };\n let difference = calcDifference();\n while (difference >= threshold) {\n frame++;\n animation = calc();\n difference = calcDifference();\n }\n finishedFrame = frame;\n for (let i = 0;i < 20; i++) {\n frame++;\n animation = calc();\n difference = calcDifference();\n if (difference >= threshold) {\n i = 0;\n finishedFrame = frame + 1;\n }\n }\n cache.set(cacheKey, finishedFrame);\n return finishedFrame;\n}\nvar cache = new Map;\n\n// src/spring/index.ts\nfunction spring({\n frame: passedFrame,\n fps,\n config = {},\n from = 0,\n to = 1,\n durationInFrames: passedDurationInFrames,\n durationRestThreshold,\n delay = 0,\n reverse = false\n}) {\n validateSpringDuration(passedDurationInFrames);\n validateFrame({\n frame: passedFrame,\n durationInFrames: Infinity,\n allowFloats: true\n });\n validateFps(fps, \"to spring()\", false);\n const needsToCalculateNaturalDuration = reverse || typeof passedDurationInFrames !== \"undefined\";\n const naturalDuration = needsToCalculateNaturalDuration ? measureSpring({\n fps,\n config,\n threshold: durationRestThreshold\n }) : undefined;\n const naturalDurationGetter = needsToCalculateNaturalDuration ? {\n get: () => naturalDuration\n } : {\n get: () => {\n throw new Error(\"did not calculate natural duration, this is an error with Remotion. Please report\");\n }\n };\n const reverseProcessed = reverse ? (passedDurationInFrames ?? naturalDurationGetter.get()) - passedFrame : passedFrame;\n const delayProcessed = reverseProcessed + (reverse ? delay : -delay);\n const durationProcessed = passedDurationInFrames === undefined ? delayProcessed : delayProcessed / (passedDurationInFrames / naturalDurationGetter.get());\n if (passedDurationInFrames && delayProcessed > passedDurationInFrames) {\n return to;\n }\n const spr = springCalculation({\n fps,\n frame: durationProcessed,\n config\n });\n const inner2 = config.overshootClamping ? to >= from ? Math.min(spr.current, to) : Math.max(spr.current, to) : spr.current;\n const interpolated = from === 0 && to === 1 ? inner2 : interpolate(inner2, [0, 1], [from, to]);\n return interpolated;\n}\n// src/Still.tsx\nimport React27 from \"react\";\nvar Still = (props2) => {\n const newProps = {\n ...props2,\n durationInFrames: 1,\n fps: 1\n };\n return React27.createElement(Composition, newProps);\n};\n// src/video/OffthreadVideo.tsx\nimport { useCallback as useCallback14 } from \"react\";\n\n// src/video/OffthreadVideoForRendering.tsx\nimport {\n useCallback as useCallback13,\n useContext as useContext27,\n useEffect as useEffect21,\n useLayoutEffect as useLayoutEffect6,\n useMemo as useMemo29,\n useState as useState18\n} from \"react\";\nimport { jsx as jsx29 } from \"react/jsx-runtime\";\nvar OffthreadVideoForRendering = ({\n onError,\n volume: volumeProp,\n playbackRate,\n src,\n muted,\n allowAmplificationDuringRender,\n transparent = false,\n toneMapped = true,\n toneFrequency,\n name,\n loopVolumeCurveBehavior,\n delayRenderRetries,\n delayRenderTimeoutInMilliseconds,\n onVideoFrame,\n ...props2\n}) => {\n const absoluteFrame = useTimelinePosition();\n const frame = useCurrentFrame();\n const volumePropsFrame = useFrameForVolumeProp(loopVolumeCurveBehavior ?? \"repeat\");\n const videoConfig = useUnsafeVideoConfig();\n const sequenceContext = useContext27(SequenceContext);\n const mediaStartsAt = useMediaStartsAt();\n const { registerRenderAsset, unregisterRenderAsset } = useContext27(RenderAssetManager);\n if (!src) {\n throw new TypeError(\"No `src` was passed to <OffthreadVideo>.\");\n }\n const id = useMemo29(() => `offthreadvideo-${random(src ?? \"\")}-${sequenceContext?.cumulatedFrom}-${sequenceContext?.relativeFrom}-${sequenceContext?.durationInFrames}`, [\n src,\n sequenceContext?.cumulatedFrom,\n sequenceContext?.relativeFrom,\n sequenceContext?.durationInFrames\n ]);\n if (!videoConfig) {\n throw new Error(\"No video config found\");\n }\n const volume = evaluateVolume({\n volume: volumeProp,\n frame: volumePropsFrame,\n mediaVolume: 1,\n allowAmplificationDuringRender: allowAmplificationDuringRender ?? false\n });\n useEffect21(() => {\n if (!src) {\n throw new Error(\"No src passed\");\n }\n if (!window.remotion_audioEnabled) {\n return;\n }\n if (muted) {\n return;\n }\n if (volume <= 0) {\n return;\n }\n registerRenderAsset({\n type: \"video\",\n src: getAbsoluteSrc(src),\n id,\n frame: absoluteFrame,\n volume,\n mediaFrame: frame,\n playbackRate: playbackRate ?? 1,\n allowAmplificationDuringRender: allowAmplificationDuringRender ?? false,\n toneFrequency: toneFrequency ?? null,\n audioStartFrame: Math.max(0, -(sequenceContext?.relativeFrom ?? 0))\n });\n return () => unregisterRenderAsset(id);\n }, [\n muted,\n src,\n registerRenderAsset,\n id,\n unregisterRenderAsset,\n volume,\n frame,\n absoluteFrame,\n playbackRate,\n allowAmplificationDuringRender,\n toneFrequency,\n sequenceContext?.relativeFrom\n ]);\n const currentTime = useMemo29(() => {\n return getExpectedMediaFrameUncorrected({\n frame,\n playbackRate: playbackRate || 1,\n startFrom: -mediaStartsAt\n }) / videoConfig.fps;\n }, [frame, mediaStartsAt, playbackRate, videoConfig.fps]);\n const actualSrc = useMemo29(() => {\n return getOffthreadVideoSource({\n src,\n currentTime,\n transparent,\n toneMapped\n });\n }, [toneMapped, currentTime, src, transparent]);\n const [imageSrc, setImageSrc] = useState18(null);\n useLayoutEffect6(() => {\n if (!window.remotion_videoEnabled) {\n return;\n }\n const cleanup = [];\n setImageSrc(null);\n const controller = new AbortController;\n const newHandle = delayRender(`Fetching ${actualSrc} from server`, {\n retries: delayRenderRetries ?? undefined,\n timeoutInMilliseconds: delayRenderTimeoutInMilliseconds ?? undefined\n });\n const execute = async () => {\n try {\n const res = await fetch(actualSrc, {\n signal: controller.signal\n });\n if (res.status !== 200) {\n if (res.status === 500) {\n const json = await res.json();\n if (json.error) {\n const cleanedUpErrorMessage = json.error.replace(/^Error: /, \"\");\n throw new Error(cleanedUpErrorMessage);\n }\n }\n throw new Error(`Server returned status ${res.status} while fetching ${actualSrc}`);\n }\n const blob = await res.blob();\n const url = URL.createObjectURL(blob);\n cleanup.push(() => URL.revokeObjectURL(url));\n setImageSrc({\n src: url,\n handle: newHandle\n });\n } catch (err) {\n if (err.message.includes(\"aborted\")) {\n continueRender(newHandle);\n return;\n }\n if (controller.signal.aborted) {\n continueRender(newHandle);\n return;\n }\n if (err.message.includes(\"Failed to fetch\")) {\n err = new Error(`Failed to fetch ${actualSrc}. This could be caused by Chrome rejecting the request because the disk space is low. Consider increasing the disk size of your environment.`, { cause: err });\n }\n if (onError) {\n onError(err);\n } else {\n cancelRender(err);\n }\n }\n };\n execute();\n cleanup.push(() => {\n if (controller.signal.aborted) {\n return;\n }\n controller.abort();\n });\n return () => {\n cleanup.forEach((c2) => c2());\n };\n }, [\n actualSrc,\n delayRenderRetries,\n delayRenderTimeoutInMilliseconds,\n onError\n ]);\n const onErr = useCallback13(() => {\n if (onError) {\n onError?.(new Error(\"Failed to load image with src \" + imageSrc));\n } else {\n cancelRender(\"Failed to load image with src \" + imageSrc);\n }\n }, [imageSrc, onError]);\n const className = useMemo29(() => {\n return [OFFTHREAD_VIDEO_CLASS_NAME, props2.className].filter(truthy).join(\" \");\n }, [props2.className]);\n const onImageFrame = useCallback13((img) => {\n if (onVideoFrame) {\n onVideoFrame(img);\n }\n }, [onVideoFrame]);\n if (!imageSrc || !window.remotion_videoEnabled) {\n return null;\n }\n continueRender(imageSrc.handle);\n return /* @__PURE__ */ jsx29(Img, {\n src: imageSrc.src,\n className,\n delayRenderRetries,\n delayRenderTimeoutInMilliseconds,\n onImageFrame,\n ...props2,\n onError: onErr\n });\n};\n\n// src/video/VideoForPreview.tsx\nimport {\n forwardRef as forwardRef9,\n useContext as useContext28,\n useEffect as useEffect23,\n useImperativeHandle as useImperativeHandle7,\n useMemo as useMemo30,\n useRef as useRef13,\n useState as useState19\n} from \"react\";\n\n// src/video/emit-video-frame.ts\nimport { useEffect as useEffect22 } from \"react\";\nvar useEmitVideoFrame = ({\n ref,\n onVideoFrame\n}) => {\n useEffect22(() => {\n const { current } = ref;\n if (!current) {\n return;\n }\n if (!onVideoFrame) {\n return;\n }\n let handle = 0;\n const callback = () => {\n if (!ref.current) {\n return;\n }\n onVideoFrame(ref.current);\n handle = ref.current.requestVideoFrameCallback(callback);\n };\n callback();\n return () => {\n current.cancelVideoFrameCallback(handle);\n };\n }, [onVideoFrame, ref]);\n};\n\n// src/video/VideoForPreview.tsx\nimport { jsx as jsx30 } from \"react/jsx-runtime\";\nvar VideoForDevelopmentRefForwardingFunction = (props2, ref) => {\n const videoRef = useRef13(null);\n const {\n volume,\n muted,\n playbackRate,\n onlyWarnForMediaSeekingError,\n src,\n onDuration,\n acceptableTimeShift,\n acceptableTimeShiftInSeconds,\n toneFrequency,\n name,\n _remotionInternalNativeLoopPassed,\n _remotionInternalStack,\n _remotionDebugSeeking,\n style,\n pauseWhenBuffering,\n showInTimeline,\n loopVolumeCurveBehavior,\n onError,\n onAutoPlayError,\n onVideoFrame,\n crossOrigin,\n ...nativeProps\n } = props2;\n const volumePropFrame = useFrameForVolumeProp(loopVolumeCurveBehavior ?? \"repeat\");\n const { fps, durationInFrames } = useVideoConfig();\n const parentSequence = useContext28(SequenceContext);\n const { hidden } = useContext28(SequenceVisibilityToggleContext);\n const [timelineId] = useState19(() => String(Math.random()));\n const isSequenceHidden = hidden[timelineId] ?? false;\n if (typeof acceptableTimeShift !== \"undefined\") {\n throw new Error(\"acceptableTimeShift has been removed. Use acceptableTimeShiftInSeconds instead.\");\n }\n const actualVolume = useMediaTagVolume(videoRef);\n const [mediaVolume] = useMediaVolumeState();\n const [mediaMuted] = useMediaMutedState();\n useMediaInTimeline({\n mediaRef: videoRef,\n volume,\n mediaVolume,\n mediaType: \"video\",\n src,\n playbackRate: props2.playbackRate ?? 1,\n displayName: name ?? null,\n id: timelineId,\n stack: _remotionInternalStack,\n showInTimeline,\n premountDisplay: null,\n onAutoPlayError: onAutoPlayError ?? null\n });\n useSyncVolumeWithMediaTag({\n volumePropFrame,\n actualVolume,\n volume,\n mediaVolume,\n mediaRef: videoRef\n });\n useMediaPlayback({\n mediaRef: videoRef,\n src,\n mediaType: \"video\",\n playbackRate: props2.playbackRate ?? 1,\n onlyWarnForMediaSeekingError,\n acceptableTimeshift: acceptableTimeShiftInSeconds ?? DEFAULT_ACCEPTABLE_TIMESHIFT,\n isPremounting: Boolean(parentSequence?.premounting),\n pauseWhenBuffering,\n debugSeeking: _remotionDebugSeeking,\n onAutoPlayError: onAutoPlayError ?? null\n });\n const actualFrom = parentSequence ? parentSequence.relativeFrom : 0;\n const duration = parentSequence ? Math.min(parentSequence.durationInFrames, durationInFrames) : durationInFrames;\n const actualSrc = useAppendVideoFragment({\n actualSrc: usePreload(src),\n actualFrom,\n duration,\n fps\n });\n useImperativeHandle7(ref, () => {\n return videoRef.current;\n }, []);\n useEffect23(() => {\n const { current } = videoRef;\n if (!current) {\n return;\n }\n const errorHandler = () => {\n if (current.error) {\n console.error(\"Error occurred in video\", current?.error);\n if (onError) {\n const err = new Error(`Code ${current.error.code}: ${current.error.message}`);\n onError(err);\n return;\n }\n throw new Error(`The browser threw an error while playing the video ${src}: Code ${current.error.code} - ${current?.error?.message}. See https://remotion.dev/docs/media-playback-error for help. Pass an onError() prop to handle the error.`);\n } else {\n if (onError) {\n const err = new Error(`The browser threw an error while playing the video ${src}`);\n onError(err);\n return;\n }\n throw new Error(\"The browser threw an error while playing the video\");\n }\n };\n current.addEventListener(\"error\", errorHandler, { once: true });\n return () => {\n current.removeEventListener(\"error\", errorHandler);\n };\n }, [onError, src]);\n const currentOnDurationCallback = useRef13();\n currentOnDurationCallback.current = onDuration;\n useEmitVideoFrame({ ref: videoRef, onVideoFrame });\n useEffect23(() => {\n const { current } = videoRef;\n if (!current) {\n return;\n }\n if (current.duration) {\n currentOnDurationCallback.current?.(src, current.duration);\n return;\n }\n const onLoadedMetadata = () => {\n currentOnDurationCallback.current?.(src, current.duration);\n };\n current.addEventListener(\"loadedmetadata\", onLoadedMetadata);\n return () => {\n current.removeEventListener(\"loadedmetadata\", onLoadedMetadata);\n };\n }, [src]);\n useEffect23(() => {\n const { current } = videoRef;\n if (!current) {\n return;\n }\n if (isIosSafari()) {\n current.preload = \"metadata\";\n } else {\n current.preload = \"auto\";\n }\n }, []);\n const actualStyle = useMemo30(() => {\n return {\n ...style,\n opacity: isSequenceHidden ? 0 : style?.opacity ?? 1\n };\n }, [isSequenceHidden, style]);\n const crossOriginValue = crossOrigin ?? (onVideoFrame ? \"anonymous\" : undefined);\n return /* @__PURE__ */ jsx30(\"video\", {\n ref: videoRef,\n muted: muted || mediaMuted,\n playsInline: true,\n src: actualSrc,\n loop: _remotionInternalNativeLoopPassed,\n style: actualStyle,\n disableRemotePlayback: true,\n crossOrigin: crossOriginValue,\n ...nativeProps\n });\n};\nvar VideoForPreview = forwardRef9(VideoForDevelopmentRefForwardingFunction);\n\n// src/video/OffthreadVideo.tsx\nimport { jsx as jsx31 } from \"react/jsx-runtime\";\nvar OffthreadVideo = (props2) => {\n const {\n startFrom,\n endAt,\n name,\n pauseWhenBuffering,\n stack,\n showInTimeline,\n ...otherProps\n } = props2;\n const environment = getRemotionEnvironment();\n const onDuration = useCallback14(() => {\n return;\n }, []);\n if (typeof props2.src !== \"string\") {\n throw new TypeError(`The \\`<OffthreadVideo>\\` tag requires a string for \\`src\\`, but got ${JSON.stringify(props2.src)} instead.`);\n }\n if (props2.imageFormat) {\n throw new TypeError(`The \\`<OffthreadVideo>\\` tag does no longer accept \\`imageFormat\\`. Use the \\`transparent\\` prop if you want to render a transparent video.`);\n }\n if (typeof startFrom !== \"undefined\" || typeof endAt !== \"undefined\") {\n validateStartFromProps(startFrom, endAt);\n const startFromFrameNo = startFrom ?? 0;\n const endAtFrameNo = endAt ?? Infinity;\n return /* @__PURE__ */ jsx31(Sequence, {\n layout: \"none\",\n from: 0 - startFromFrameNo,\n showInTimeline: false,\n durationInFrames: endAtFrameNo,\n name,\n children: /* @__PURE__ */ jsx31(OffthreadVideo, {\n pauseWhenBuffering: pauseWhenBuffering ?? false,\n ...otherProps\n })\n });\n }\n validateMediaProps(props2, \"Video\");\n if (environment.isRendering) {\n return /* @__PURE__ */ jsx31(OffthreadVideoForRendering, {\n ...otherProps\n });\n }\n const {\n transparent,\n toneMapped,\n _remotionDebugSeeking,\n onAutoPlayError,\n onVideoFrame,\n crossOrigin,\n ...withoutTransparent\n } = otherProps;\n return /* @__PURE__ */ jsx31(VideoForPreview, {\n _remotionInternalStack: stack ?? null,\n _remotionInternalNativeLoopPassed: false,\n _remotionDebugSeeking: _remotionDebugSeeking ?? false,\n onDuration,\n onlyWarnForMediaSeekingError: true,\n pauseWhenBuffering: pauseWhenBuffering ?? false,\n showInTimeline: showInTimeline ?? true,\n onAutoPlayError: onAutoPlayError ?? undefined,\n onVideoFrame: onVideoFrame ?? null,\n crossOrigin,\n ...withoutTransparent\n });\n};\n// src/video/Video.tsx\nimport { forwardRef as forwardRef11, useCallback as useCallback15, useContext as useContext30 } from \"react\";\n\n// src/video/VideoForRendering.tsx\nimport {\n forwardRef as forwardRef10,\n useContext as useContext29,\n useEffect as useEffect24,\n useImperativeHandle as useImperativeHandle8,\n useLayoutEffect as useLayoutEffect7,\n useMemo as useMemo31,\n useRef as useRef14\n} from \"react\";\n\n// src/video/seek-until-right.ts\nvar roundTo6Commas = (num) => {\n return Math.round(num * 1e5) / 1e5;\n};\nvar seekToTime = (element, desiredTime) => {\n element.currentTime = desiredTime;\n let cancel;\n let cancelSeeked = null;\n const prom = new Promise((resolve) => {\n cancel = element.requestVideoFrameCallback((now, metadata) => {\n const displayIn = metadata.expectedDisplayTime - now;\n if (displayIn <= 0) {\n resolve(metadata.mediaTime);\n return;\n }\n setTimeout(() => {\n resolve(metadata.mediaTime);\n }, displayIn + 150);\n });\n });\n const waitForSeekedEvent = new Promise((resolve) => {\n const onDone = () => {\n resolve();\n };\n element.addEventListener(\"seeked\", onDone, {\n once: true\n });\n cancelSeeked = () => {\n element.removeEventListener(\"seeked\", onDone);\n };\n });\n return {\n wait: Promise.all([prom, waitForSeekedEvent]).then(([time]) => time),\n cancel: () => {\n cancelSeeked?.();\n element.cancelVideoFrameCallback(cancel);\n }\n };\n};\nvar seekToTimeMultipleUntilRight = (element, desiredTime, fps) => {\n const threshold = 1 / fps / 2;\n let currentCancel = () => {\n return;\n };\n if (Number.isFinite(element.duration) && element.currentTime >= element.duration && desiredTime >= element.duration) {\n return {\n prom: Promise.resolve(),\n cancel: () => {\n }\n };\n }\n const prom = new Promise((resolve, reject) => {\n const firstSeek = seekToTime(element, desiredTime + threshold);\n firstSeek.wait.then((seekedTo) => {\n const difference = Math.abs(desiredTime - seekedTo);\n if (difference <= threshold) {\n return resolve();\n }\n const sign = desiredTime > seekedTo ? 1 : -1;\n const newSeek = seekToTime(element, seekedTo + threshold * sign);\n currentCancel = newSeek.cancel;\n newSeek.wait.then((newTime) => {\n const newDifference = Math.abs(desiredTime - newTime);\n if (roundTo6Commas(newDifference) <= roundTo6Commas(threshold)) {\n return resolve();\n }\n const thirdSeek = seekToTime(element, desiredTime + threshold);\n currentCancel = thirdSeek.cancel;\n return thirdSeek.wait.then(() => {\n resolve();\n }).catch((err) => {\n reject(err);\n });\n }).catch((err) => {\n reject(err);\n });\n });\n currentCancel = firstSeek.cancel;\n });\n return {\n prom,\n cancel: () => {\n currentCancel();\n }\n };\n};\n\n// src/video/VideoForRendering.tsx\nimport { jsx as jsx32 } from \"react/jsx-runtime\";\nvar VideoForRenderingForwardFunction = ({\n onError,\n volume: volumeProp,\n allowAmplificationDuringRender,\n playbackRate,\n onDuration,\n toneFrequency,\n name,\n acceptableTimeShiftInSeconds,\n delayRenderRetries,\n delayRenderTimeoutInMilliseconds,\n loopVolumeCurveBehavior,\n ...props2\n}, ref) => {\n const absoluteFrame = useTimelinePosition();\n const frame = useCurrentFrame();\n const volumePropsFrame = useFrameForVolumeProp(loopVolumeCurveBehavior ?? \"repeat\");\n const videoConfig = useUnsafeVideoConfig();\n const videoRef = useRef14(null);\n const sequenceContext = useContext29(SequenceContext);\n const mediaStartsAt = useMediaStartsAt();\n const environment = getRemotionEnvironment();\n const { registerRenderAsset, unregisterRenderAsset } = useContext29(RenderAssetManager);\n const id = useMemo31(() => `video-${random(props2.src ?? \"\")}-${sequenceContext?.cumulatedFrom}-${sequenceContext?.relativeFrom}-${sequenceContext?.durationInFrames}`, [\n props2.src,\n sequenceContext?.cumulatedFrom,\n sequenceContext?.relativeFrom,\n sequenceContext?.durationInFrames\n ]);\n if (!videoConfig) {\n throw new Error(\"No video config found\");\n }\n const volume = evaluateVolume({\n volume: volumeProp,\n frame: volumePropsFrame,\n mediaVolume: 1,\n allowAmplificationDuringRender: allowAmplificationDuringRender ?? false\n });\n useEffect24(() => {\n if (!props2.src) {\n throw new Error(\"No src passed\");\n }\n if (props2.muted) {\n return;\n }\n if (volume <= 0) {\n return;\n }\n if (!window.remotion_audioEnabled) {\n return;\n }\n registerRenderAsset({\n type: \"video\",\n src: getAbsoluteSrc(props2.src),\n id,\n frame: absoluteFrame,\n volume,\n mediaFrame: frame,\n playbackRate: playbackRate ?? 1,\n allowAmplificationDuringRender: allowAmplificationDuringRender ?? false,\n toneFrequency: toneFrequency ?? null,\n audioStartFrame: Math.max(0, -(sequenceContext?.relativeFrom ?? 0))\n });\n return () => unregisterRenderAsset(id);\n }, [\n props2.muted,\n props2.src,\n registerRenderAsset,\n id,\n unregisterRenderAsset,\n volume,\n frame,\n absoluteFrame,\n playbackRate,\n allowAmplificationDuringRender,\n toneFrequency,\n sequenceContext?.relativeFrom\n ]);\n useImperativeHandle8(ref, () => {\n return videoRef.current;\n }, []);\n useEffect24(() => {\n if (!window.remotion_videoEnabled) {\n return;\n }\n const { current } = videoRef;\n if (!current) {\n return;\n }\n const currentTime = getMediaTime({\n frame,\n playbackRate: playbackRate || 1,\n startFrom: -mediaStartsAt,\n fps: videoConfig.fps\n });\n const handle = delayRender(`Rendering <Video /> with src=\"${props2.src}\"`, {\n retries: delayRenderRetries ?? undefined,\n timeoutInMilliseconds: delayRenderTimeoutInMilliseconds ?? undefined\n });\n if (window.process?.env?.NODE_ENV === \"test\") {\n continueRender(handle);\n return;\n }\n if (isApproximatelyTheSame(current.currentTime, currentTime)) {\n if (current.readyState >= 2) {\n continueRender(handle);\n return;\n }\n const loadedDataHandler = () => {\n continueRender(handle);\n };\n current.addEventListener(\"loadeddata\", loadedDataHandler, { once: true });\n return () => {\n current.removeEventListener(\"loadeddata\", loadedDataHandler);\n };\n }\n const endedHandler = () => {\n continueRender(handle);\n };\n const seek2 = seekToTimeMultipleUntilRight(current, currentTime, videoConfig.fps);\n seek2.prom.then(() => {\n continueRender(handle);\n });\n current.addEventListener(\"ended\", endedHandler, { once: true });\n const errorHandler = () => {\n if (current?.error) {\n console.error(\"Error occurred in video\", current?.error);\n if (onError) {\n return;\n }\n throw new Error(`The browser threw an error while playing the video ${props2.src}: Code ${current.error.code} - ${current?.error?.message}. See https://remotion.dev/docs/media-playback-error for help. Pass an onError() prop to handle the error.`);\n } else {\n throw new Error(\"The browser threw an error\");\n }\n };\n current.addEventListener(\"error\", errorHandler, { once: true });\n return () => {\n seek2.cancel();\n current.removeEventListener(\"ended\", endedHandler);\n current.removeEventListener(\"error\", errorHandler);\n continueRender(handle);\n };\n }, [\n volumePropsFrame,\n props2.src,\n playbackRate,\n videoConfig.fps,\n frame,\n mediaStartsAt,\n onError,\n delayRenderRetries,\n delayRenderTimeoutInMilliseconds\n ]);\n const { src } = props2;\n if (environment.isRendering) {\n useLayoutEffect7(() => {\n if (window.process?.env?.NODE_ENV === \"test\") {\n return;\n }\n const newHandle = delayRender(\"Loading <Video> duration with src=\" + src, {\n retries: delayRenderRetries ?? undefined,\n timeoutInMilliseconds: delayRenderTimeoutInMilliseconds ?? undefined\n });\n const { current } = videoRef;\n const didLoad = () => {\n if (current?.duration) {\n onDuration(src, current.duration);\n }\n continueRender(newHandle);\n };\n if (current?.duration) {\n onDuration(src, current.duration);\n continueRender(newHandle);\n } else {\n current?.addEventListener(\"loadedmetadata\", didLoad, { once: true });\n }\n return () => {\n current?.removeEventListener(\"loadedmetadata\", didLoad);\n continueRender(newHandle);\n };\n }, [src, onDuration, delayRenderRetries, delayRenderTimeoutInMilliseconds]);\n }\n return /* @__PURE__ */ jsx32(\"video\", {\n ref: videoRef,\n ...props2\n });\n};\nvar VideoForRendering = forwardRef10(VideoForRenderingForwardFunction);\n\n// src/video/Video.tsx\nimport { jsx as jsx33 } from \"react/jsx-runtime\";\nvar VideoForwardingFunction = (props2, ref) => {\n const {\n startFrom,\n endAt,\n name,\n pauseWhenBuffering,\n stack,\n _remotionInternalNativeLoopPassed,\n showInTimeline,\n onAutoPlayError,\n ...otherProps\n } = props2;\n const { loop, _remotionDebugSeeking, ...propsOtherThanLoop } = props2;\n const { fps } = useVideoConfig();\n const environment = getRemotionEnvironment();\n const { durations, setDurations } = useContext30(DurationsContext);\n if (typeof ref === \"string\") {\n throw new Error(\"string refs are not supported\");\n }\n if (typeof props2.src !== \"string\") {\n throw new TypeError(`The \\`<Video>\\` tag requires a string for \\`src\\`, but got ${JSON.stringify(props2.src)} instead.`);\n }\n const preloadedSrc = usePreload(props2.src);\n const onDuration = useCallback15((src, durationInSeconds) => {\n setDurations({ type: \"got-duration\", durationInSeconds, src });\n }, [setDurations]);\n const onVideoFrame = useCallback15(() => {\n }, []);\n const durationFetched = durations[getAbsoluteSrc(preloadedSrc)] ?? durations[getAbsoluteSrc(props2.src)];\n if (loop && durationFetched !== undefined) {\n const mediaDuration = durationFetched * fps;\n return /* @__PURE__ */ jsx33(Loop, {\n durationInFrames: calculateLoopDuration({\n endAt,\n mediaDuration,\n playbackRate: props2.playbackRate ?? 1,\n startFrom\n }),\n layout: \"none\",\n name,\n children: /* @__PURE__ */ jsx33(Video, {\n ...propsOtherThanLoop,\n ref,\n _remotionInternalNativeLoopPassed: true\n })\n });\n }\n if (typeof startFrom !== \"undefined\" || typeof endAt !== \"undefined\") {\n validateStartFromProps(startFrom, endAt);\n const startFromFrameNo = startFrom ?? 0;\n const endAtFrameNo = endAt ?? Infinity;\n return /* @__PURE__ */ jsx33(Sequence, {\n layout: \"none\",\n from: 0 - startFromFrameNo,\n showInTimeline: false,\n durationInFrames: endAtFrameNo,\n name,\n children: /* @__PURE__ */ jsx33(Video, {\n pauseWhenBuffering: pauseWhenBuffering ?? false,\n ...otherProps,\n ref\n })\n });\n }\n validateMediaProps(props2, \"Video\");\n if (environment.isRendering) {\n return /* @__PURE__ */ jsx33(VideoForRendering, {\n onDuration,\n onVideoFrame: onVideoFrame ?? null,\n ...otherProps,\n ref\n });\n }\n return /* @__PURE__ */ jsx33(VideoForPreview, {\n onlyWarnForMediaSeekingError: false,\n ...otherProps,\n ref,\n onVideoFrame: null,\n pauseWhenBuffering: pauseWhenBuffering ?? false,\n onDuration,\n _remotionInternalStack: stack ?? null,\n _remotionInternalNativeLoopPassed: _remotionInternalNativeLoopPassed ?? false,\n _remotionDebugSeeking: _remotionDebugSeeking ?? false,\n showInTimeline: showInTimeline ?? true,\n onAutoPlayError: onAutoPlayError ?? undefined\n });\n};\nvar Video = forwardRef11(VideoForwardingFunction);\naddSequenceStackTraces(Video);\n// src/index.ts\ncheckMultipleRemotionVersions();\nvar Experimental = {\n Clipper,\n Null,\n useIsPlayer\n};\nvar proxyObj = {};\nvar Config = new Proxy(proxyObj, {\n get(_, prop) {\n if (prop === \"Bundling\" || prop === \"Rendering\" || prop === \"Log\" || prop === \"Puppeteer\" || prop === \"Output\") {\n return Config;\n }\n return () => {\n console.warn(\"\\u26A0\\uFE0F The CLI configuration has been extracted from Remotion Core.\");\n console.warn(\"Update the import from the config file:\");\n console.warn();\n console.warn(\"- Delete:\");\n console.warn('import {Config} from \"remotion\";');\n console.warn(\"+ Replace:\");\n console.warn('import {Config} from \"@remotion/cli/config\";');\n console.warn();\n console.warn(\"For more information, see https://www.remotion.dev/docs/4-0-migration.\");\n process.exit(1);\n };\n }\n});\naddSequenceStackTraces(Sequence);\nexport {\n watchStaticFile,\n useVideoConfig,\n useCurrentScale,\n useCurrentFrame,\n useBufferState,\n staticFile,\n spring,\n registerRoot,\n random,\n prefetch,\n measureSpring,\n interpolateColors,\n interpolate,\n getStaticFiles,\n getRemotionEnvironment,\n getInputProps,\n delayRender,\n continueRender,\n cancelRender,\n Video,\n VERSION,\n Still,\n Series,\n Sequence,\n OffthreadVideo,\n Loop,\n Internals,\n Img,\n IFrame,\n Freeze,\n FolderContext,\n Folder,\n Experimental,\n Easing,\n Config,\n Composition,\n Audio,\n Artifact,\n AbsoluteFill\n};\n","// src/interpolate.ts\nfunction interpolateFunction(input, inputRange, outputRange, options) {\n const { extrapolateLeft, extrapolateRight, easing } = options;\n let result = input;\n const [inputMin, inputMax] = inputRange;\n const [outputMin, outputMax] = outputRange;\n if (result < inputMin) {\n if (extrapolateLeft === \"identity\") {\n return result;\n }\n if (extrapolateLeft === \"clamp\") {\n result = inputMin;\n } else if (extrapolateLeft === \"wrap\") {\n const range = inputMax - inputMin;\n result = ((result - inputMin) % range + range) % range + inputMin;\n } else if (extrapolateLeft === \"extend\") {\n }\n }\n if (result > inputMax) {\n if (extrapolateRight === \"identity\") {\n return result;\n }\n if (extrapolateRight === \"clamp\") {\n result = inputMax;\n } else if (extrapolateRight === \"wrap\") {\n const range = inputMax - inputMin;\n result = ((result - inputMin) % range + range) % range + inputMin;\n } else if (extrapolateRight === \"extend\") {\n }\n }\n if (outputMin === outputMax) {\n return outputMin;\n }\n result = (result - inputMin) / (inputMax - inputMin);\n result = easing(result);\n result = result * (outputMax - outputMin) + outputMin;\n return result;\n}\nfunction findRange(input, inputRange) {\n let i;\n for (i = 1;i < inputRange.length - 1; ++i) {\n if (inputRange[i] >= input) {\n break;\n }\n }\n return i - 1;\n}\nfunction checkValidInputRange(arr) {\n for (let i = 1;i < arr.length; ++i) {\n if (!(arr[i] > arr[i - 1])) {\n throw new Error(`inputRange must be strictly monotonically increasing but got [${arr.join(\",\")}]`);\n }\n }\n}\nfunction checkInfiniteRange(name, arr) {\n if (arr.length < 2) {\n throw new Error(name + \" must have at least 2 elements\");\n }\n for (const element of arr) {\n if (typeof element !== \"number\") {\n throw new Error(`${name} must contain only numbers`);\n }\n if (!Number.isFinite(element)) {\n throw new Error(`${name} must contain only finite numbers, but got [${arr.join(\",\")}]`);\n }\n }\n}\nfunction interpolate(input, inputRange, outputRange, options) {\n if (typeof input === \"undefined\") {\n throw new Error(\"input can not be undefined\");\n }\n if (typeof inputRange === \"undefined\") {\n throw new Error(\"inputRange can not be undefined\");\n }\n if (typeof outputRange === \"undefined\") {\n throw new Error(\"outputRange can not be undefined\");\n }\n if (inputRange.length !== outputRange.length) {\n throw new Error(\"inputRange (\" + inputRange.length + \") and outputRange (\" + outputRange.length + \") must have the same length\");\n }\n checkInfiniteRange(\"inputRange\", inputRange);\n checkInfiniteRange(\"outputRange\", outputRange);\n checkValidInputRange(inputRange);\n const easing = options?.easing ?? ((num) => num);\n let extrapolateLeft = \"extend\";\n if (options?.extrapolateLeft !== undefined) {\n extrapolateLeft = options.extrapolateLeft;\n }\n let extrapolateRight = \"extend\";\n if (options?.extrapolateRight !== undefined) {\n extrapolateRight = options.extrapolateRight;\n }\n if (typeof input !== \"number\") {\n throw new TypeError(\"Cannot interpolate an input which is not a number\");\n }\n const range = findRange(input, inputRange);\n return interpolateFunction(input, [inputRange[range], inputRange[range + 1]], [outputRange[range], outputRange[range + 1]], {\n easing,\n extrapolateLeft,\n extrapolateRight\n });\n}\n// src/random.ts\nfunction mulberry32(a) {\n let t = a + 1831565813;\n t = Math.imul(t ^ t >>> 15, t | 1);\n t ^= t + Math.imul(t ^ t >>> 7, t | 61);\n return ((t ^ t >>> 14) >>> 0) / 4294967296;\n}\nfunction hashCode(str) {\n let i = 0;\n let chr = 0;\n let hash = 0;\n for (i = 0;i < str.length; i++) {\n chr = str.charCodeAt(i);\n hash = (hash << 5) - hash + chr;\n hash |= 0;\n }\n return hash;\n}\nvar random = (seed, dummy) => {\n if (dummy !== undefined) {\n throw new TypeError(\"random() takes only one argument\");\n }\n if (seed === null) {\n return Math.random();\n }\n if (typeof seed === \"string\") {\n return mulberry32(hashCode(seed));\n }\n if (typeof seed === \"number\") {\n return mulberry32(seed * 10000000000);\n }\n throw new Error(\"random() argument must be a number or a string\");\n};\n// src/truthy.ts\nfunction truthy(value) {\n return Boolean(value);\n}\n\n// src/delay-render.ts\nif (typeof window !== \"undefined\") {\n window.remotion_renderReady = false;\n}\nif (typeof window !== \"undefined\") {\n window.remotion_delayRenderTimeouts = {};\n}\nvar DELAY_RENDER_CALLSTACK_TOKEN = \"The delayRender was called:\";\nvar DELAY_RENDER_RETRIES_LEFT = \"Retries left: \";\nvar DELAY_RENDER_RETRY_TOKEN = \"- Rendering the frame will be retried.\";\n\n// src/static-file.ts\nvar problematicCharacters = {\n \"%3A\": \":\",\n \"%2F\": \"/\",\n \"%3F\": \"?\",\n \"%23\": \"#\",\n \"%5B\": \"[\",\n \"%5D\": \"]\",\n \"%40\": \"@\",\n \"%21\": \"!\",\n \"%24\": \"$\",\n \"%26\": \"&\",\n \"%27\": \"'\",\n \"%28\": \"(\",\n \"%29\": \")\",\n \"%2A\": \"*\",\n \"%2B\": \"+\",\n \"%2C\": \",\",\n \"%3B\": \";\"\n};\nvar didWarn = {};\nvar warnOnce = (message) => {\n if (didWarn[message]) {\n return;\n }\n console.warn(message);\n didWarn[message] = true;\n};\nvar includesHexOfUnsafeChar = (path) => {\n for (const key of Object.keys(problematicCharacters)) {\n if (path.includes(key)) {\n return { containsHex: true, hexCode: key };\n }\n }\n return { containsHex: false };\n};\nvar trimLeadingSlash = (path) => {\n if (path.startsWith(\"/\")) {\n return trimLeadingSlash(path.substring(1));\n }\n return path;\n};\nvar inner = (path) => {\n if (typeof window !== \"undefined\" && window.remotion_staticBase) {\n if (path.startsWith(window.remotion_staticBase)) {\n throw new Error(`The value \"${path}\" is already prefixed with the static base ${window.remotion_staticBase}. You don't need to call staticFile() on it.`);\n }\n return `${window.remotion_staticBase}/${trimLeadingSlash(path)}`;\n }\n return `/${trimLeadingSlash(path)}`;\n};\nvar encodeBySplitting = (path) => {\n const splitBySlash = path.split(\"/\");\n const encodedArray = splitBySlash.map((element) => {\n return encodeURIComponent(element);\n });\n const merged = encodedArray.join(\"/\");\n return merged;\n};\nvar staticFile = (path) => {\n if (path.startsWith(\"http://\") || path.startsWith(\"https://\")) {\n throw new TypeError(`staticFile() does not support remote URLs - got \"${path}\". Instead, pass the URL without wrapping it in staticFile(). See: https://remotion.dev/docs/staticfile-remote-urls`);\n }\n if (path.startsWith(\"..\") || path.startsWith(\"./\")) {\n throw new TypeError(`staticFile() does not support relative paths - got \"${path}\". Instead, pass the name of a file that is inside the public/ folder. See: https://remotion.dev/docs/staticfile-relative-paths`);\n }\n if (path.startsWith(\"/Users\") || path.startsWith(\"/home\") || path.startsWith(\"/tmp\") || path.startsWith(\"/etc\") || path.startsWith(\"/opt\") || path.startsWith(\"/var\") || path.startsWith(\"C:\") || path.startsWith(\"D:\") || path.startsWith(\"E:\")) {\n throw new TypeError(`staticFile() does not support absolute paths - got \"${path}\". Instead, pass the name of a file that is inside the public/ folder. See: https://remotion.dev/docs/staticfile-relative-paths`);\n }\n if (path.startsWith(\"public/\")) {\n throw new TypeError(`Do not include the public/ prefix when using staticFile() - got \"${path}\". See: https://remotion.dev/docs/staticfile-relative-paths`);\n }\n const includesHex = includesHexOfUnsafeChar(path);\n if (includesHex.containsHex) {\n warnOnce(`WARNING: You seem to pass an already encoded path (path contains ${includesHex.hexCode}). Since Remotion 4.0, the encoding is done by staticFile() itself. You may want to remove a encodeURIComponent() wrapping.`);\n }\n const preprocessed = encodeBySplitting(path);\n const preparsed = inner(preprocessed);\n if (!preparsed.startsWith(\"/\")) {\n return `/${preparsed}`;\n }\n return preparsed;\n};\n\n// src/input-props-serialization.ts\nvar DATE_TOKEN = \"remotion-date:\";\nvar FILE_TOKEN = \"remotion-file:\";\nvar serializeJSONWithDate = ({\n data,\n indent,\n staticBase\n}) => {\n let customDateUsed = false;\n let customFileUsed = false;\n let mapUsed = false;\n let setUsed = false;\n try {\n const serializedString = JSON.stringify(data, function(key, value) {\n const item = this[key];\n if (item instanceof Date) {\n customDateUsed = true;\n return `${DATE_TOKEN}${item.toISOString()}`;\n }\n if (item instanceof Map) {\n mapUsed = true;\n return value;\n }\n if (item instanceof Set) {\n setUsed = true;\n return value;\n }\n if (typeof item === \"string\" && staticBase !== null && item.startsWith(staticBase)) {\n customFileUsed = true;\n return `${FILE_TOKEN}${item.replace(staticBase + \"/\", \"\")}`;\n }\n return value;\n }, indent);\n return { serializedString, customDateUsed, customFileUsed, mapUsed, setUsed };\n } catch (err) {\n throw new Error(\"Could not serialize the passed input props to JSON: \" + err.message);\n }\n};\nvar deserializeJSONWithCustomFields = (data) => {\n return JSON.parse(data, (_, value) => {\n if (typeof value === \"string\" && value.startsWith(DATE_TOKEN)) {\n return new Date(value.replace(DATE_TOKEN, \"\"));\n }\n if (typeof value === \"string\" && value.startsWith(FILE_TOKEN)) {\n return staticFile(value.replace(FILE_TOKEN, \"\"));\n }\n return value;\n });\n};\n\n// src/interpolate-colors.ts\nfunction call(...args) {\n return \"\\\\(\\\\s*(\" + args.join(\")\\\\s*,\\\\s*(\") + \")\\\\s*\\\\)\";\n}\nfunction getMatchers() {\n const cachedMatchers = {\n rgb: undefined,\n rgba: undefined,\n hsl: undefined,\n hsla: undefined,\n hex3: undefined,\n hex4: undefined,\n hex5: undefined,\n hex6: undefined,\n hex8: undefined\n };\n if (cachedMatchers.rgb === undefined) {\n cachedMatchers.rgb = new RegExp(\"rgb\" + call(NUMBER, NUMBER, NUMBER));\n cachedMatchers.rgba = new RegExp(\"rgba\" + call(NUMBER, NUMBER, NUMBER, NUMBER));\n cachedMatchers.hsl = new RegExp(\"hsl\" + call(NUMBER, PERCENTAGE, PERCENTAGE));\n cachedMatchers.hsla = new RegExp(\"hsla\" + call(NUMBER, PERCENTAGE, PERCENTAGE, NUMBER));\n cachedMatchers.hex3 = /^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/;\n cachedMatchers.hex4 = /^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/;\n cachedMatchers.hex6 = /^#([0-9a-fA-F]{6})$/;\n cachedMatchers.hex8 = /^#([0-9a-fA-F]{8})$/;\n }\n return cachedMatchers;\n}\nfunction hue2rgb(p, q, t) {\n if (t < 0) {\n t += 1;\n }\n if (t > 1) {\n t -= 1;\n }\n if (t < 1 / 6) {\n return p + (q - p) * 6 * t;\n }\n if (t < 1 / 2) {\n return q;\n }\n if (t < 2 / 3) {\n return p + (q - p) * (2 / 3 - t) * 6;\n }\n return p;\n}\nfunction hslToRgb(h, s, l) {\n const q = l < 0.5 ? l * (1 + s) : l + s - l * s;\n const p = 2 * l - q;\n const r = hue2rgb(p, q, h + 1 / 3);\n const g = hue2rgb(p, q, h);\n const b = hue2rgb(p, q, h - 1 / 3);\n return Math.round(r * 255) << 24 | Math.round(g * 255) << 16 | Math.round(b * 255) << 8;\n}\nfunction parse255(str) {\n const int = Number.parseInt(str, 10);\n if (int < 0) {\n return 0;\n }\n if (int > 255) {\n return 255;\n }\n return int;\n}\nfunction parse360(str) {\n const int = Number.parseFloat(str);\n return (int % 360 + 360) % 360 / 360;\n}\nfunction parse1(str) {\n const num = Number.parseFloat(str);\n if (num < 0) {\n return 0;\n }\n if (num > 1) {\n return 255;\n }\n return Math.round(num * 255);\n}\nfunction parsePercentage(str) {\n const int = Number.parseFloat(str);\n if (int < 0) {\n return 0;\n }\n if (int > 100) {\n return 1;\n }\n return int / 100;\n}\nfunction normalizeColor(color) {\n const matchers = getMatchers();\n let match;\n if (matchers.hex6) {\n if (match = matchers.hex6.exec(color)) {\n return Number.parseInt(match[1] + \"ff\", 16) >>> 0;\n }\n }\n if (colorNames[color] !== undefined) {\n return colorNames[color];\n }\n if (matchers.rgb) {\n if (match = matchers.rgb.exec(color)) {\n return (parse255(match[1]) << 24 | parse255(match[2]) << 16 | parse255(match[3]) << 8 | 255) >>> 0;\n }\n }\n if (matchers.rgba) {\n if (match = matchers.rgba.exec(color)) {\n return (parse255(match[1]) << 24 | parse255(match[2]) << 16 | parse255(match[3]) << 8 | parse1(match[4])) >>> 0;\n }\n }\n if (matchers.hex3) {\n if (match = matchers.hex3.exec(color)) {\n return Number.parseInt(match[1] + match[1] + match[2] + match[2] + match[3] + match[3] + \"ff\", 16) >>> 0;\n }\n }\n if (matchers.hex8) {\n if (match = matchers.hex8.exec(color)) {\n return Number.parseInt(match[1], 16) >>> 0;\n }\n }\n if (matchers.hex4) {\n if (match = matchers.hex4.exec(color)) {\n return Number.parseInt(match[1] + match[1] + match[2] + match[2] + match[3] + match[3] + match[4] + match[4], 16) >>> 0;\n }\n }\n if (matchers.hsl) {\n if (match = matchers.hsl.exec(color)) {\n return (hslToRgb(parse360(match[1]), parsePercentage(match[2]), parsePercentage(match[3])) | 255) >>> 0;\n }\n }\n if (matchers.hsla) {\n if (match = matchers.hsla.exec(color)) {\n return (hslToRgb(parse360(match[1]), parsePercentage(match[2]), parsePercentage(match[3])) | parse1(match[4])) >>> 0;\n }\n }\n throw new Error(`invalid color string ${color} provided`);\n}\nfunction processColor(color) {\n const normalizedColor = normalizeColor(color);\n return (normalizedColor << 24 | normalizedColor >>> 8) >>> 0;\n}\nvar NUMBER = \"[-+]?\\\\d*\\\\.?\\\\d+\";\nvar PERCENTAGE = NUMBER + \"%\";\nvar colorNames = {\n transparent: 0,\n aliceblue: 4042850303,\n antiquewhite: 4209760255,\n aqua: 16777215,\n aquamarine: 2147472639,\n azure: 4043309055,\n beige: 4126530815,\n bisque: 4293182719,\n black: 255,\n blanchedalmond: 4293643775,\n blue: 65535,\n blueviolet: 2318131967,\n brown: 2771004159,\n burlywood: 3736635391,\n burntsienna: 3934150143,\n cadetblue: 1604231423,\n chartreuse: 2147418367,\n chocolate: 3530104575,\n coral: 4286533887,\n cornflowerblue: 1687547391,\n cornsilk: 4294499583,\n crimson: 3692313855,\n cyan: 16777215,\n darkblue: 35839,\n darkcyan: 9145343,\n darkgoldenrod: 3095792639,\n darkgray: 2846468607,\n darkgreen: 6553855,\n darkgrey: 2846468607,\n darkkhaki: 3182914559,\n darkmagenta: 2332068863,\n darkolivegreen: 1433087999,\n darkorange: 4287365375,\n darkorchid: 2570243327,\n darkred: 2332033279,\n darksalmon: 3918953215,\n darkseagreen: 2411499519,\n darkslateblue: 1211993087,\n darkslategray: 793726975,\n darkslategrey: 793726975,\n darkturquoise: 13554175,\n darkviolet: 2483082239,\n deeppink: 4279538687,\n deepskyblue: 12582911,\n dimgray: 1768516095,\n dimgrey: 1768516095,\n dodgerblue: 512819199,\n firebrick: 2988581631,\n floralwhite: 4294635775,\n forestgreen: 579543807,\n fuchsia: 4278255615,\n gainsboro: 3705462015,\n ghostwhite: 4177068031,\n gold: 4292280575,\n goldenrod: 3668254975,\n gray: 2155905279,\n green: 8388863,\n greenyellow: 2919182335,\n grey: 2155905279,\n honeydew: 4043305215,\n hotpink: 4285117695,\n indianred: 3445382399,\n indigo: 1258324735,\n ivory: 4294963455,\n khaki: 4041641215,\n lavender: 3873897215,\n lavenderblush: 4293981695,\n lawngreen: 2096890111,\n lemonchiffon: 4294626815,\n lightblue: 2916673279,\n lightcoral: 4034953471,\n lightcyan: 3774873599,\n lightgoldenrodyellow: 4210742015,\n lightgray: 3553874943,\n lightgreen: 2431553791,\n lightgrey: 3553874943,\n lightpink: 4290167295,\n lightsalmon: 4288707327,\n lightseagreen: 548580095,\n lightskyblue: 2278488831,\n lightslategray: 2005441023,\n lightslategrey: 2005441023,\n lightsteelblue: 2965692159,\n lightyellow: 4294959359,\n lime: 16711935,\n limegreen: 852308735,\n linen: 4210091775,\n magenta: 4278255615,\n maroon: 2147483903,\n mediumaquamarine: 1724754687,\n mediumblue: 52735,\n mediumorchid: 3126187007,\n mediumpurple: 2473647103,\n mediumseagreen: 1018393087,\n mediumslateblue: 2070474495,\n mediumspringgreen: 16423679,\n mediumturquoise: 1221709055,\n mediumvioletred: 3340076543,\n midnightblue: 421097727,\n mintcream: 4127193855,\n mistyrose: 4293190143,\n moccasin: 4293178879,\n navajowhite: 4292783615,\n navy: 33023,\n oldlace: 4260751103,\n olive: 2155872511,\n olivedrab: 1804477439,\n orange: 4289003775,\n orangered: 4282712319,\n orchid: 3664828159,\n palegoldenrod: 4008225535,\n palegreen: 2566625535,\n paleturquoise: 2951671551,\n palevioletred: 3681588223,\n papayawhip: 4293907967,\n peachpuff: 4292524543,\n peru: 3448061951,\n pink: 4290825215,\n plum: 3718307327,\n powderblue: 2967529215,\n purple: 2147516671,\n rebeccapurple: 1714657791,\n red: 4278190335,\n rosybrown: 3163525119,\n royalblue: 1097458175,\n saddlebrown: 2336560127,\n salmon: 4202722047,\n sandybrown: 4104413439,\n seagreen: 780883967,\n seashell: 4294307583,\n sienna: 2689740287,\n silver: 3233857791,\n skyblue: 2278484991,\n slateblue: 1784335871,\n slategray: 1887473919,\n slategrey: 1887473919,\n snow: 4294638335,\n springgreen: 16744447,\n steelblue: 1182971135,\n tan: 3535047935,\n teal: 8421631,\n thistle: 3636451583,\n tomato: 4284696575,\n turquoise: 1088475391,\n violet: 4001558271,\n wheat: 4125012991,\n white: 4294967295,\n whitesmoke: 4126537215,\n yellow: 4294902015,\n yellowgreen: 2597139199\n};\n\n// src/v5-flag.ts\nvar ENABLE_V5_BREAKING_CHANGES = false;\n\n// src/validate-frame.ts\nvar validateFrame = ({\n allowFloats,\n durationInFrames,\n frame\n}) => {\n if (typeof frame === \"undefined\") {\n throw new TypeError(`Argument missing for parameter \"frame\"`);\n }\n if (typeof frame !== \"number\") {\n throw new TypeError(`Argument passed for \"frame\" is not a number: ${frame}`);\n }\n if (!Number.isFinite(frame)) {\n throw new RangeError(`Frame ${frame} is not finite`);\n }\n if (frame % 1 !== 0 && !allowFloats) {\n throw new RangeError(`Argument for frame must be an integer, but got ${frame}`);\n }\n if (frame < 0 && frame < -durationInFrames) {\n throw new RangeError(`Cannot use frame ${frame}: Duration of composition is ${durationInFrames}, therefore the lowest frame that can be rendered is ${-durationInFrames}`);\n }\n if (frame > durationInFrames - 1) {\n throw new RangeError(`Cannot use frame ${frame}: Duration of composition is ${durationInFrames}, therefore the highest frame that can be rendered is ${durationInFrames - 1}`);\n }\n};\n\n// src/validation/validate-default-props.ts\nvar validateDefaultAndInputProps = (defaultProps, name, compositionId) => {\n if (!defaultProps) {\n return;\n }\n if (typeof defaultProps !== \"object\") {\n throw new Error(`\"${name}\" must be an object, but you passed a value of type ${typeof defaultProps}`);\n }\n if (Array.isArray(defaultProps)) {\n throw new Error(`\"${name}\" must be an object, an array was passed ${compositionId ? `for composition \"${compositionId}\"` : \"\"}`);\n }\n};\n\n// src/validation/validate-dimensions.ts\nfunction validateDimension(amount, nameOfProp, location) {\n if (typeof amount !== \"number\") {\n throw new Error(`The \"${nameOfProp}\" prop ${location} must be a number, but you passed a value of type ${typeof amount}`);\n }\n if (isNaN(amount)) {\n throw new TypeError(`The \"${nameOfProp}\" prop ${location} must not be NaN, but is NaN.`);\n }\n if (!Number.isFinite(amount)) {\n throw new TypeError(`The \"${nameOfProp}\" prop ${location} must be finite, but is ${amount}.`);\n }\n if (amount % 1 !== 0) {\n throw new TypeError(`The \"${nameOfProp}\" prop ${location} must be an integer, but is ${amount}.`);\n }\n if (amount <= 0) {\n throw new TypeError(`The \"${nameOfProp}\" prop ${location} must be positive, but got ${amount}.`);\n }\n}\n\n// src/validation/validate-duration-in-frames.ts\nfunction validateDurationInFrames(durationInFrames, options) {\n const { allowFloats, component } = options;\n if (typeof durationInFrames === \"undefined\") {\n throw new Error(`The \"durationInFrames\" prop ${component} is missing.`);\n }\n if (typeof durationInFrames !== \"number\") {\n throw new Error(`The \"durationInFrames\" prop ${component} must be a number, but you passed a value of type ${typeof durationInFrames}`);\n }\n if (durationInFrames <= 0) {\n throw new TypeError(`The \"durationInFrames\" prop ${component} must be positive, but got ${durationInFrames}.`);\n }\n if (!allowFloats && durationInFrames % 1 !== 0) {\n throw new TypeError(`The \"durationInFrames\" prop ${component} must be an integer, but got ${durationInFrames}.`);\n }\n if (!Number.isFinite(durationInFrames)) {\n throw new TypeError(`The \"durationInFrames\" prop ${component} must be finite, but got ${durationInFrames}.`);\n }\n}\n\n// src/validation/validate-fps.ts\nfunction validateFps(fps, location, isGif) {\n if (typeof fps !== \"number\") {\n throw new Error(`\"fps\" must be a number, but you passed a value of type ${typeof fps} ${location}`);\n }\n if (!Number.isFinite(fps)) {\n throw new Error(`\"fps\" must be a finite, but you passed ${fps} ${location}`);\n }\n if (isNaN(fps)) {\n throw new Error(`\"fps\" must not be NaN, but got ${fps} ${location}`);\n }\n if (fps <= 0) {\n throw new TypeError(`\"fps\" must be positive, but got ${fps} ${location}`);\n }\n if (isGif && fps > 50) {\n throw new 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`);\n }\n}\n\n// src/video/get-current-time.ts\nvar getExpectedMediaFrameUncorrected = ({\n frame,\n playbackRate,\n startFrom\n}) => {\n return interpolate(frame, [-1, startFrom, startFrom + 1], [-1, startFrom, startFrom + playbackRate]);\n};\n\n// src/absolute-src.ts\nvar getAbsoluteSrc = (relativeSrc) => {\n if (typeof window === \"undefined\") {\n return relativeSrc;\n }\n return new URL(relativeSrc, window.origin).href;\n};\n\n// src/video/offthread-video-source.ts\nvar getOffthreadVideoSource = ({\n src,\n transparent,\n currentTime,\n toneMapped\n}) => {\n return `http://localhost:${window.remotion_proxyPort}/proxy?src=${encodeURIComponent(getAbsoluteSrc(src))}&time=${encodeURIComponent(currentTime)}&transparent=${String(transparent)}&toneMapped=${String(toneMapped)}`;\n};\n\n// src/no-react.ts\nvar NoReactInternals = {\n processColor,\n truthy,\n validateFps,\n validateDimension,\n validateDurationInFrames,\n validateDefaultAndInputProps,\n validateFrame,\n serializeJSONWithDate,\n bundleName: \"bundle.js\",\n bundleMapName: \"bundle.js.map\",\n deserializeJSONWithCustomFields,\n DELAY_RENDER_CALLSTACK_TOKEN,\n DELAY_RENDER_RETRY_TOKEN,\n DELAY_RENDER_ATTEMPT_TOKEN: DELAY_RENDER_RETRIES_LEFT,\n getOffthreadVideoSource,\n getExpectedMediaFrameUncorrected,\n ENABLE_V5_BREAKING_CHANGES,\n MIN_NODE_VERSION: ENABLE_V5_BREAKING_CHANGES ? 18 : 16,\n MIN_BUN_VERSION: ENABLE_V5_BREAKING_CHANGES ? \"1.1.3\" : \"1.0.3\",\n colorNames,\n DATE_TOKEN,\n FILE_TOKEN\n};\nexport {\n random,\n interpolate,\n NoReactInternals\n};\n","// src/presentations/slide.tsx\nimport { useMemo } from \"react\";\nimport { AbsoluteFill } from \"remotion\";\nimport { jsx } from \"react/jsx-runtime\";\nvar epsilon = 0.01;\nvar SlidePresentation = ({\n children,\n presentationProgress,\n presentationDirection,\n passedProps: { direction = \"from-left\", enterStyle, exitStyle }\n}) => {\n const directionStyle = useMemo(() => {\n const presentationProgressWithEpsilonCorrection = presentationProgress === 1 ? presentationProgress * 100 : presentationProgress * 100 - epsilon;\n if (presentationDirection === \"exiting\") {\n switch (direction) {\n case \"from-left\":\n return {\n transform: `translateX(${presentationProgressWithEpsilonCorrection}%)`\n };\n case \"from-right\":\n return {\n transform: `translateX(${-presentationProgress * 100}%)`\n };\n case \"from-top\":\n return {\n transform: `translateY(${presentationProgressWithEpsilonCorrection}%)`\n };\n case \"from-bottom\":\n return {\n transform: `translateY(${-presentationProgress * 100}%)`\n };\n default:\n throw new Error(`Invalid direction: ${direction}`);\n }\n }\n switch (direction) {\n case \"from-left\":\n return {\n transform: `translateX(${-100 + presentationProgress * 100}%)`\n };\n case \"from-right\":\n return {\n transform: `translateX(${100 - presentationProgressWithEpsilonCorrection}%)`\n };\n case \"from-top\":\n return {\n transform: `translateY(${-100 + presentationProgress * 100}%)`\n };\n case \"from-bottom\":\n return {\n transform: `translateY(${100 - presentationProgressWithEpsilonCorrection}%)`\n };\n default:\n throw new Error(`Invalid direction: ${direction}`);\n }\n }, [presentationDirection, presentationProgress, direction]);\n const style = useMemo(() => {\n return {\n width: \"100%\",\n height: \"100%\",\n justifyContent: \"center\",\n alignItems: \"center\",\n ...directionStyle,\n ...presentationDirection === \"entering\" ? enterStyle : exitStyle\n };\n }, [directionStyle, enterStyle, exitStyle, presentationDirection]);\n return /* @__PURE__ */ jsx(AbsoluteFill, {\n style,\n children\n });\n};\nvar slide = (props) => {\n return {\n component: SlidePresentation,\n props: props ?? {}\n };\n};\n\n// src/timings/linear-timing.ts\nimport { interpolate } from \"remotion\";\nvar linearTiming = (options) => {\n return {\n getDurationInFrames: () => {\n return options.durationInFrames;\n },\n getProgress: ({ frame }) => {\n return interpolate(frame, [0, options.durationInFrames], [0, 1], {\n easing: options.easing,\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\"\n });\n }\n };\n};\n// src/timings/spring-timing.ts\nimport { measureSpring, spring } from \"remotion\";\nvar springTiming = (options = {}) => {\n return {\n getDurationInFrames: ({ fps }) => {\n if (options.durationInFrames) {\n return options.durationInFrames;\n }\n return measureSpring({\n config: options.config,\n threshold: options.durationRestThreshold,\n fps\n });\n },\n getProgress: ({ fps, frame }) => {\n const to = options.reverse ? 0 : 1;\n const from = options.reverse ? 1 : 0;\n return spring({\n fps,\n frame,\n to,\n from,\n config: options.config,\n durationInFrames: options.durationInFrames,\n durationRestThreshold: options.durationRestThreshold,\n reverse: options.reverse\n });\n }\n };\n};\n// src/TransitionSeries.tsx\nimport { Children, useMemo as useMemo3 } from \"react\";\nimport { Internals, Sequence, useCurrentFrame, useVideoConfig } from \"remotion\";\nimport { NoReactInternals as NoReactInternals2 } from \"remotion/no-react\";\n\n// src/context.tsx\nimport React2, { useMemo as useMemo2 } from \"react\";\nimport { jsx as jsx2 } from \"react/jsx-runtime\";\nvar EnteringContext = React2.createContext(null);\nvar ExitingContext = React2.createContext(null);\nvar WrapInEnteringProgressContext = ({ presentationProgress, children }) => {\n const value = useMemo2(() => {\n return {\n enteringProgress: presentationProgress\n };\n }, [presentationProgress]);\n return /* @__PURE__ */ jsx2(EnteringContext.Provider, {\n value,\n children\n });\n};\nvar WrapInExitingProgressContext = ({ presentationProgress, children }) => {\n const value = useMemo2(() => {\n return {\n exitingProgress: presentationProgress\n };\n }, [presentationProgress]);\n return /* @__PURE__ */ jsx2(ExitingContext.Provider, {\n value,\n children\n });\n};\n\n// src/flatten-children.ts\nimport React3 from \"react\";\nvar flattenChildren = (children) => {\n const childrenArray = React3.Children.toArray(children);\n return childrenArray.reduce((flatChildren, child) => {\n if (child.type === React3.Fragment) {\n return flatChildren.concat(flattenChildren(child.props.children));\n }\n flatChildren.push(child);\n return flatChildren;\n }, []);\n};\n\n// src/validate.ts\nimport { NoReactInternals } from \"remotion/no-react\";\nvar validateDurationInFrames = NoReactInternals.validateDurationInFrames;\n\n// src/TransitionSeries.tsx\nimport { jsx as jsx3, Fragment } from \"react/jsx-runtime\";\nvar TransitionSeriesTransition = function(_props) {\n return null;\n};\nvar SeriesSequence = ({ children }) => {\n return /* @__PURE__ */ jsx3(Fragment, {\n children\n });\n};\nvar TransitionSeriesChildren = ({\n children\n}) => {\n const { fps } = useVideoConfig();\n const frame = useCurrentFrame();\n const childrenValue = useMemo3(() => {\n let transitionOffsets = 0;\n let startFrame = 0;\n const flattedChildren = flattenChildren(children);\n return Children.map(flattedChildren, (child, i) => {\n const current = child;\n if (typeof current === \"string\") {\n if (current.trim() === \"\") {\n return null;\n }\n throw new TypeError(`The <TransitionSeries /> component only accepts a list of <TransitionSeries.Sequence /> components as its children, but you passed a string \"${current}\"`);\n }\n const hasPrev = flattedChildren[i - 1];\n const nextPrev = flattedChildren[i + 1];\n const prev = typeof hasPrev === \"string\" || typeof hasPrev === \"undefined\" ? null : hasPrev.type === TransitionSeriesTransition ? hasPrev : null;\n const next = typeof nextPrev === \"string\" || typeof nextPrev === \"undefined\" ? null : nextPrev.type === TransitionSeriesTransition ? nextPrev : null;\n const prevIsTransition = typeof hasPrev === \"string\" || typeof hasPrev === \"undefined\" ? false : hasPrev.type === TransitionSeriesTransition;\n if (current.type === TransitionSeriesTransition) {\n if (prevIsTransition) {\n throw new TypeError(`A <TransitionSeries.Transition /> component must not be followed by another <TransitionSeries.Transition /> component (nth children = ${i - 1} and ${i})`);\n }\n return null;\n }\n if (current.type !== SeriesSequence) {\n throw new TypeError(`The <TransitionSeries /> component only accepts a list of <TransitionSeries.Sequence /> and <TransitionSeries.Transition /> components as its children, but got ${current} instead`);\n }\n const castedChildAgain = current;\n const debugInfo = `index = ${i}, duration = ${castedChildAgain.props.durationInFrames}`;\n if (!castedChildAgain?.props.children) {\n throw new TypeError(`A <TransitionSeries.Sequence /> component (${debugInfo}) was detected to not have any children. Delete it to fix this error.`);\n }\n const durationInFramesProp = castedChildAgain.props.durationInFrames;\n const {\n durationInFrames,\n children: _children,\n ...passedProps\n } = castedChildAgain.props;\n validateDurationInFrames(durationInFramesProp, {\n component: `of a <TransitionSeries.Sequence /> component`,\n allowFloats: true\n });\n const offset = castedChildAgain.props.offset ?? 0;\n if (Number.isNaN(offset)) {\n throw new TypeError(`The \"offset\" property of a <TransitionSeries.Sequence /> must not be NaN, but got NaN (${debugInfo}).`);\n }\n if (!Number.isFinite(offset)) {\n throw new TypeError(`The \"offset\" property of a <TransitionSeries.Sequence /> must be finite, but got ${offset} (${debugInfo}).`);\n }\n if (offset % 1 !== 0) {\n throw new TypeError(`The \"offset\" property of a <TransitionSeries.Sequence /> must be finite, but got ${offset} (${debugInfo}).`);\n }\n const currentStartFrame = startFrame + offset;\n let duration = 0;\n if (prev) {\n duration = prev.props.timing.getDurationInFrames({\n fps\n });\n transitionOffsets -= duration;\n }\n let actualStartFrame = currentStartFrame + transitionOffsets;\n startFrame += durationInFramesProp + offset;\n if (actualStartFrame < 0) {\n startFrame -= actualStartFrame;\n actualStartFrame = 0;\n }\n const nextProgress = next ? next.props.timing.getProgress({\n frame: frame - actualStartFrame - durationInFrames + next.props.timing.getDurationInFrames({ fps }),\n fps\n }) : null;\n const prevProgress = prev ? prev.props.timing.getProgress({\n frame: frame - actualStartFrame,\n fps\n }) : null;\n if (next && durationInFramesProp < next.props.timing.getDurationInFrames({ fps })) {\n throw new Error(`The duration of a <TransitionSeries.Sequence /> must not be shorter than the duration of the next <TransitionSeries.Transition />. The transition is ${next.props.timing.getDurationInFrames({ fps })} frames long, but the sequence is only ${durationInFramesProp} frames long (${debugInfo})`);\n }\n if (prev && durationInFramesProp < prev.props.timing.getDurationInFrames({ fps })) {\n throw new Error(`The duration of a <TransitionSeries.Sequence /> must not be shorter than the duration of the previous <TransitionSeries.Transition />. The transition is ${prev.props.timing.getDurationInFrames({ fps })} frames long, but the sequence is only ${durationInFramesProp} frames long (${debugInfo})`);\n }\n if (next && prev && nextProgress !== null && prevProgress !== null) {\n const nextPresentation = next.props.presentation ?? slide();\n const prevPresentation = prev.props.presentation ?? slide();\n const UppercaseNextPresentation = nextPresentation.component;\n const UppercasePrevPresentation = prevPresentation.component;\n return /* @__PURE__ */ jsx3(Sequence, {\n from: Math.floor(actualStartFrame),\n durationInFrames: durationInFramesProp,\n ...passedProps,\n name: passedProps.name || \"<TS.Sequence>\",\n children: /* @__PURE__ */ jsx3(UppercaseNextPresentation, {\n passedProps: nextPresentation.props ?? {},\n presentationDirection: \"exiting\",\n presentationProgress: nextProgress,\n presentationDurationInFrames: next.props.timing.getDurationInFrames({ fps }),\n children: /* @__PURE__ */ jsx3(WrapInExitingProgressContext, {\n presentationProgress: nextProgress,\n children: /* @__PURE__ */ jsx3(UppercasePrevPresentation, {\n passedProps: prevPresentation.props ?? {},\n presentationDirection: \"entering\",\n presentationProgress: prevProgress,\n presentationDurationInFrames: prev.props.timing.getDurationInFrames({ fps }),\n children: /* @__PURE__ */ jsx3(WrapInEnteringProgressContext, {\n presentationProgress: prevProgress,\n children: child\n })\n })\n })\n })\n }, i);\n }\n if (prevProgress !== null && prev) {\n const prevPresentation = prev.props.presentation ?? slide();\n const UppercasePrevPresentation = prevPresentation.component;\n return /* @__PURE__ */ jsx3(Sequence, {\n from: Math.floor(actualStartFrame),\n durationInFrames: durationInFramesProp,\n ...passedProps,\n name: passedProps.name || \"<TS.Sequence>\",\n children: /* @__PURE__ */ jsx3(UppercasePrevPresentation, {\n passedProps: prevPresentation.props ?? {},\n presentationDirection: \"entering\",\n presentationProgress: prevProgress,\n presentationDurationInFrames: prev.props.timing.getDurationInFrames({ fps }),\n children: /* @__PURE__ */ jsx3(WrapInEnteringProgressContext, {\n presentationProgress: prevProgress,\n children: child\n })\n })\n }, i);\n }\n if (nextProgress !== null && next) {\n const nextPresentation = next.props.presentation ?? slide();\n const UppercaseNextPresentation = nextPresentation.component;\n return /* @__PURE__ */ jsx3(Sequence, {\n from: Math.floor(actualStartFrame),\n durationInFrames: durationInFramesProp,\n ...passedProps,\n name: passedProps.name || \"<TS.Sequence>\",\n children: /* @__PURE__ */ jsx3(UppercaseNextPresentation, {\n passedProps: nextPresentation.props ?? {},\n presentationDirection: \"exiting\",\n presentationProgress: nextProgress,\n presentationDurationInFrames: next.props.timing.getDurationInFrames({ fps }),\n children: /* @__PURE__ */ jsx3(WrapInExitingProgressContext, {\n presentationProgress: nextProgress,\n children: child\n })\n })\n }, i);\n }\n return /* @__PURE__ */ jsx3(Sequence, {\n from: Math.floor(actualStartFrame),\n durationInFrames: durationInFramesProp,\n ...passedProps,\n name: passedProps.name || \"<TS.Sequence>\",\n children: child\n }, i);\n });\n }, [children, fps, frame]);\n return /* @__PURE__ */ jsx3(Fragment, {\n children: childrenValue\n });\n};\nvar TransitionSeries = ({ children, name, layout: passedLayout, ...otherProps }) => {\n const displayName = name ?? \"<TransitionSeries>\";\n const layout = passedLayout ?? \"absolute-fill\";\n if (NoReactInternals2.ENABLE_V5_BREAKING_CHANGES && layout !== \"absolute-fill\") {\n throw new TypeError(`The \"layout\" prop of <TransitionSeries /> is not supported anymore in v5. TransitionSeries' must be absolutely positioned.`);\n }\n return /* @__PURE__ */ jsx3(Sequence, {\n name: displayName,\n layout,\n ...otherProps,\n children: /* @__PURE__ */ jsx3(TransitionSeriesChildren, {\n children\n })\n });\n};\nTransitionSeries.Sequence = SeriesSequence;\nTransitionSeries.Transition = TransitionSeriesTransition;\nInternals.addSequenceStackTraces(TransitionSeries);\nInternals.addSequenceStackTraces(SeriesSequence);\n// src/use-transition-progress.ts\nimport React4 from \"react\";\nvar useTransitionProgress = () => {\n const entering = React4.useContext(EnteringContext);\n const exiting = React4.useContext(ExitingContext);\n if (!entering && !exiting) {\n return {\n isInTransitionSeries: false,\n entering: 1,\n exiting: 0\n };\n }\n return {\n isInTransitionSeries: true,\n entering: entering?.enteringProgress ?? 1,\n exiting: exiting?.exitingProgress ?? 0\n };\n};\nexport {\n useTransitionProgress,\n springTiming,\n linearTiming,\n TransitionSeries\n};\n","// src/presentations/fade.tsx\nimport { useMemo } from \"react\";\nimport { AbsoluteFill } from \"remotion\";\nimport { jsx } from \"react/jsx-runtime\";\nvar FadePresentation = ({ children, presentationDirection, presentationProgress, passedProps }) => {\n const isEntering = presentationDirection === \"entering\";\n const style = useMemo(() => {\n return {\n opacity: isEntering ? presentationProgress : passedProps.shouldFadeOutExitingScene ? 1 - presentationProgress : 1,\n ...presentationDirection === \"entering\" ? passedProps.enterStyle : passedProps.exitStyle\n };\n }, [\n isEntering,\n passedProps.enterStyle,\n passedProps.exitStyle,\n passedProps.shouldFadeOutExitingScene,\n presentationDirection,\n presentationProgress\n ]);\n return /* @__PURE__ */ jsx(AbsoluteFill, {\n style,\n children\n });\n};\nvar fade = (props) => {\n return {\n component: FadePresentation,\n props: props ?? {}\n };\n};\nexport {\n fade\n};\n","// src/presentations/slide.tsx\nimport { useMemo } from \"react\";\nimport { AbsoluteFill } from \"remotion\";\nimport { jsx } from \"react/jsx-runtime\";\nvar epsilon = 0.01;\nvar SlidePresentation = ({\n children,\n presentationProgress,\n presentationDirection,\n passedProps: { direction = \"from-left\", enterStyle, exitStyle }\n}) => {\n const directionStyle = useMemo(() => {\n const presentationProgressWithEpsilonCorrection = presentationProgress === 1 ? presentationProgress * 100 : presentationProgress * 100 - epsilon;\n if (presentationDirection === \"exiting\") {\n switch (direction) {\n case \"from-left\":\n return {\n transform: `translateX(${presentationProgressWithEpsilonCorrection}%)`\n };\n case \"from-right\":\n return {\n transform: `translateX(${-presentationProgress * 100}%)`\n };\n case \"from-top\":\n return {\n transform: `translateY(${presentationProgressWithEpsilonCorrection}%)`\n };\n case \"from-bottom\":\n return {\n transform: `translateY(${-presentationProgress * 100}%)`\n };\n default:\n throw new Error(`Invalid direction: ${direction}`);\n }\n }\n switch (direction) {\n case \"from-left\":\n return {\n transform: `translateX(${-100 + presentationProgress * 100}%)`\n };\n case \"from-right\":\n return {\n transform: `translateX(${100 - presentationProgressWithEpsilonCorrection}%)`\n };\n case \"from-top\":\n return {\n transform: `translateY(${-100 + presentationProgress * 100}%)`\n };\n case \"from-bottom\":\n return {\n transform: `translateY(${100 - presentationProgressWithEpsilonCorrection}%)`\n };\n default:\n throw new Error(`Invalid direction: ${direction}`);\n }\n }, [presentationDirection, presentationProgress, direction]);\n const style = useMemo(() => {\n return {\n width: \"100%\",\n height: \"100%\",\n justifyContent: \"center\",\n alignItems: \"center\",\n ...directionStyle,\n ...presentationDirection === \"entering\" ? enterStyle : exitStyle\n };\n }, [directionStyle, enterStyle, exitStyle, presentationDirection]);\n return /* @__PURE__ */ jsx(AbsoluteFill, {\n style,\n children\n });\n};\nvar slide = (props) => {\n return {\n component: SlidePresentation,\n props: props ?? {}\n };\n};\nexport {\n slide\n};\n","// src/presentations/wipe.tsx\nimport { useMemo, useState } from \"react\";\nimport { AbsoluteFill, random } from \"remotion\";\nimport { jsx, jsxs } from \"react/jsx-runtime\";\nvar makePathIn = (progress, direction) => {\n switch (direction) {\n case \"from-left\":\n return `\nM 0 0\nL ${progress} 0\nL ${progress} 1\nL 0 1\nZ`;\n case \"from-top-left\":\n return `\nM 0 0\nL ${progress * 2} 0\nL 0 ${progress * 2}\nZ`;\n case \"from-top\":\n return `\nM 0 0\nL 1 0\nL 1 ${progress}\nL 0 ${progress}\nZ`;\n case \"from-top-right\":\n return `\nM 1 0\nL ${1 - progress * 2} 0\nL 1 ${progress * 2}\nZ`;\n case \"from-right\":\n return `\nM 1 0\nL 1 1\nL ${1 - progress} 1\nL ${1 - progress} 0\nZ`;\n case \"from-bottom-right\":\n return `\nM 1 1\nL ${1 - progress * 2} 1\nL 1 ${1 - progress * 2}\nZ`;\n case \"from-bottom\":\n return `\nM 0 1\nL 1 1\nL 1 ${1 - progress}\nL 0 ${1 - progress}\nZ`;\n case \"from-bottom-left\":\n return `\nM 0 1\nL 0 ${1 - progress * 2}\nL ${progress * 2} 1\nZ`;\n default:\n throw new Error(`Unknown direction ${JSON.stringify(direction)}`);\n }\n};\nvar makePathOut = (progress, direction) => {\n switch (direction) {\n case \"from-left\":\n return `\nM 1 1\nL ${1 - progress} 1\nL ${1 - progress} 0\nL 1 0\nZ`;\n case \"from-top-left\":\n return `\nM 1 1\nL ${1 - 2 * progress} 1\nL 1 ${1 - 2 * progress}\nZ`;\n case \"from-top\":\n return `\nM 1 1\nL 0 1\nL 0 ${1 - progress}\nL 1 ${1 - progress}\nZ`;\n case \"from-top-right\":\n return `\nM 0 1\nL ${progress * 2} 1\nL 0 ${1 - progress * 2}\nZ`;\n case \"from-right\":\n return `\nM 0 0\nL ${progress} 0\nL ${progress} 1\nL 0 1\nZ`;\n case \"from-bottom-right\":\n return `\nM 0 0\nL ${progress * 2} 0\nL 0 ${progress * 2}\nZ`;\n case \"from-bottom\":\n return `\nM 1 0\nL 0 0\nL 0 ${progress}\nL 1 ${progress}\nZ`;\n case \"from-bottom-left\":\n return `\nM 1 0\nL ${1 - progress * 2} 0\nL 1 ${progress * 2}\nZ`;\n default:\n throw new Error(`Unknown direction ${JSON.stringify(direction)}`);\n }\n};\nvar WipePresentation = ({\n children,\n presentationProgress,\n presentationDirection,\n passedProps: {\n direction = \"from-left\",\n innerEnterStyle,\n innerExitStyle,\n outerEnterStyle,\n outerExitStyle\n }\n}) => {\n const [clipId] = useState(() => String(random(null)));\n const progressInDirection = presentationDirection === \"entering\" ? presentationProgress : 1 - presentationProgress;\n const path = presentationDirection === \"entering\" ? makePathIn(progressInDirection, direction) : makePathOut(progressInDirection, direction);\n const style = useMemo(() => {\n return {\n width: \"100%\",\n height: \"100%\",\n justifyContent: \"center\",\n alignItems: \"center\",\n clipPath: `url(#${clipId})`,\n ...presentationDirection === \"entering\" ? innerEnterStyle : innerExitStyle\n };\n }, [clipId, innerEnterStyle, innerExitStyle, presentationDirection]);\n const outerStyle = useMemo(() => {\n return presentationDirection === \"entering\" ? outerEnterStyle : outerExitStyle;\n }, [outerEnterStyle, outerExitStyle, presentationDirection]);\n const svgStyle = useMemo(() => {\n return {\n width: \"100%\",\n height: \"100%\",\n pointerEvents: \"none\"\n };\n }, []);\n return /* @__PURE__ */ jsxs(AbsoluteFill, {\n style: outerStyle,\n children: [\n /* @__PURE__ */ jsx(AbsoluteFill, {\n style,\n children\n }),\n /* @__PURE__ */ jsx(AbsoluteFill, {\n children: /* @__PURE__ */ jsx(\"svg\", {\n viewBox: \"0 0 1 1\",\n style: svgStyle,\n children: /* @__PURE__ */ jsx(\"defs\", {\n children: /* @__PURE__ */ jsx(\"clipPath\", {\n id: clipId,\n clipPathUnits: \"objectBoundingBox\",\n children: /* @__PURE__ */ jsx(\"path\", {\n d: path,\n fill: \"black\"\n })\n })\n })\n })\n })\n ]\n });\n};\nvar wipe = (props) => {\n return {\n component: WipePresentation,\n props: props ?? {}\n };\n};\nexport {\n wipe\n};\n","// src/presentations/flip.tsx\nimport { useMemo } from \"react\";\nimport { AbsoluteFill, interpolate } from \"remotion\";\nimport { jsx } from \"react/jsx-runtime\";\nvar Flip = ({\n children,\n presentationDirection,\n presentationProgress,\n passedProps: {\n direction = \"from-left\",\n perspective = 1000,\n innerEnterStyle,\n innerExitStyle,\n outerEnterStyle,\n outerExitStyle\n }\n}) => {\n const style = useMemo(() => {\n const startRotationEntering = direction === \"from-right\" || direction === \"from-top\" ? 180 : -180;\n const endRotationEntering = direction === \"from-right\" || direction === \"from-top\" ? -180 : 180;\n const rotation = presentationDirection === \"entering\" ? interpolate(presentationProgress, [0, 1], [startRotationEntering, 0]) : interpolate(presentationProgress, [0, 1], [0, endRotationEntering]);\n const rotateProperty = direction === \"from-top\" || direction === \"from-bottom\" ? \"rotateX\" : \"rotateY\";\n return {\n width: \"100%\",\n height: \"100%\",\n transform: `${rotateProperty}(${rotation}deg)`,\n backfaceVisibility: \"hidden\",\n WebkitBackfaceVisibility: \"hidden\",\n ...presentationDirection === \"entering\" ? innerEnterStyle : innerExitStyle\n };\n }, [\n direction,\n innerEnterStyle,\n innerExitStyle,\n presentationDirection,\n presentationProgress\n ]);\n const outer = useMemo(() => {\n return {\n perspective,\n transformStyle: \"preserve-3d\",\n ...presentationDirection === \"entering\" ? outerEnterStyle : outerExitStyle\n };\n }, [outerEnterStyle, outerExitStyle, perspective, presentationDirection]);\n return /* @__PURE__ */ jsx(AbsoluteFill, {\n style: outer,\n children: /* @__PURE__ */ jsx(AbsoluteFill, {\n style,\n children\n })\n });\n};\nvar flip = (props) => {\n return { component: Flip, props: props ?? {} };\n};\nexport {\n flip\n};\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.cutInstruction = void 0;\nexports.cutCInstruction = cutCInstruction;\nconst cutLInstruction = ({ instruction, lastPoint, progress, }) => {\n const x = lastPoint.x + (instruction.x - lastPoint.x) * progress;\n const y = lastPoint.y + (instruction.y - lastPoint.y) * progress;\n return {\n type: 'L',\n x,\n y,\n };\n};\nfunction interpolatePoint(pA, pB, factor) {\n return {\n x: pA.x + (pB.x - pA.x) * factor,\n y: pA.y + (pB.y - pA.y) * factor,\n };\n}\nfunction cutCInstruction({ progress, lastPoint, instruction, }) {\n // De Casteljau's algorithm for Bezier splitting\n const u = progress;\n // Points of original curve\n const p0 = { x: lastPoint.x, y: lastPoint.y };\n const p1 = { x: instruction.cp1x, y: instruction.cp1y };\n const p2 = { x: instruction.cp2x, y: instruction.cp2y };\n const p3 = { x: instruction.x, y: instruction.y };\n // First level of interpolation\n const p01 = interpolatePoint(p0, p1, u);\n const p12 = interpolatePoint(p1, p2, u);\n const p23 = interpolatePoint(p2, p3, u);\n // Second level of interpolation\n const p012 = interpolatePoint(p01, p12, u);\n const p123 = interpolatePoint(p12, p23, u);\n // Third level of interpolation (this is the mid-point of the curve at u)\n const p0123 = interpolatePoint(p012, p123, u);\n return {\n type: 'C',\n cp1x: p01.x,\n cp1y: p01.y,\n cp2x: p012.x,\n cp2y: p012.y,\n x: p0123.x,\n y: p0123.y,\n };\n}\nconst cutInstruction = ({ instruction, lastPoint, progress, }) => {\n if (instruction.type === 'M') {\n return instruction;\n }\n if (instruction.type === 'L') {\n return cutLInstruction({ instruction, lastPoint, progress });\n }\n if (instruction.type === 'C') {\n return cutCInstruction({ instruction, lastPoint, progress });\n }\n // TODO: Could we cut it as well?\n if (instruction.type === 'Z') {\n return instruction;\n }\n // @ts-expect-error\n throw new TypeError(`${instruction.type} is not supported.`);\n};\nexports.cutInstruction = cutInstruction;\n","\"use strict\";\n// Copied from: https://github.com/rveciana/svg-path-properties\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.binomialCoefficients = exports.cValues = exports.tValues = void 0;\n/* eslint-disable @typescript-eslint/no-loss-of-precision */\n/* eslint-disable no-loss-of-precision */\n// Legendre-Gauss abscissae (xi values, defined at i=n as the roots of the nth order Legendre polynomial Pn(x))\nexports.tValues = [\n [],\n [],\n [\n -0.5773502691896257645091487805019574556476,\n 0.5773502691896257645091487805019574556476,\n ],\n [\n 0, -0.7745966692414833770358530799564799221665,\n 0.7745966692414833770358530799564799221665,\n ],\n [\n -0.3399810435848562648026657591032446872005,\n 0.3399810435848562648026657591032446872005,\n -0.8611363115940525752239464888928095050957,\n 0.8611363115940525752239464888928095050957,\n ],\n [\n 0, -0.5384693101056830910363144207002088049672,\n 0.5384693101056830910363144207002088049672,\n -0.9061798459386639927976268782993929651256,\n 0.9061798459386639927976268782993929651256,\n ],\n [\n 0.6612093864662645136613995950199053470064,\n -0.6612093864662645136613995950199053470064,\n -0.2386191860831969086305017216807119354186,\n 0.2386191860831969086305017216807119354186,\n -0.9324695142031520278123015544939946091347,\n 0.9324695142031520278123015544939946091347,\n ],\n [\n 0, 0.4058451513773971669066064120769614633473,\n -0.4058451513773971669066064120769614633473,\n -0.7415311855993944398638647732807884070741,\n 0.7415311855993944398638647732807884070741,\n -0.9491079123427585245261896840478512624007,\n 0.9491079123427585245261896840478512624007,\n ],\n [\n -0.1834346424956498049394761423601839806667,\n 0.1834346424956498049394761423601839806667,\n -0.5255324099163289858177390491892463490419,\n 0.5255324099163289858177390491892463490419,\n -0.7966664774136267395915539364758304368371,\n 0.7966664774136267395915539364758304368371,\n -0.9602898564975362316835608685694729904282,\n 0.9602898564975362316835608685694729904282,\n ],\n [\n 0, -0.8360311073266357942994297880697348765441,\n 0.8360311073266357942994297880697348765441,\n -0.9681602395076260898355762029036728700494,\n 0.9681602395076260898355762029036728700494,\n -0.3242534234038089290385380146433366085719,\n 0.3242534234038089290385380146433366085719,\n -0.6133714327005903973087020393414741847857,\n 0.6133714327005903973087020393414741847857,\n ],\n [\n -0.1488743389816312108848260011297199846175,\n 0.1488743389816312108848260011297199846175,\n -0.4333953941292471907992659431657841622,\n 0.4333953941292471907992659431657841622,\n -0.6794095682990244062343273651148735757692,\n 0.6794095682990244062343273651148735757692,\n -0.8650633666889845107320966884234930485275,\n 0.8650633666889845107320966884234930485275,\n -0.9739065285171717200779640120844520534282,\n 0.9739065285171717200779640120844520534282,\n ],\n [\n 0, -0.2695431559523449723315319854008615246796,\n 0.2695431559523449723315319854008615246796,\n -0.5190961292068118159257256694586095544802,\n 0.5190961292068118159257256694586095544802,\n -0.7301520055740493240934162520311534580496,\n 0.7301520055740493240934162520311534580496,\n -0.8870625997680952990751577693039272666316,\n 0.8870625997680952990751577693039272666316,\n -0.9782286581460569928039380011228573907714,\n 0.9782286581460569928039380011228573907714,\n ],\n [\n -0.1252334085114689154724413694638531299833,\n 0.1252334085114689154724413694638531299833,\n -0.3678314989981801937526915366437175612563,\n 0.3678314989981801937526915366437175612563,\n -0.587317954286617447296702418940534280369,\n 0.587317954286617447296702418940534280369,\n -0.7699026741943046870368938332128180759849,\n 0.7699026741943046870368938332128180759849,\n -0.9041172563704748566784658661190961925375,\n 0.9041172563704748566784658661190961925375,\n -0.9815606342467192506905490901492808229601,\n 0.9815606342467192506905490901492808229601,\n ],\n [\n 0, -0.2304583159551347940655281210979888352115,\n 0.2304583159551347940655281210979888352115,\n -0.4484927510364468528779128521276398678019,\n 0.4484927510364468528779128521276398678019,\n -0.6423493394403402206439846069955156500716,\n 0.6423493394403402206439846069955156500716,\n -0.8015780907333099127942064895828598903056,\n 0.8015780907333099127942064895828598903056,\n -0.9175983992229779652065478365007195123904,\n 0.9175983992229779652065478365007195123904,\n -0.9841830547185881494728294488071096110649,\n 0.9841830547185881494728294488071096110649,\n ],\n [\n -0.1080549487073436620662446502198347476119,\n 0.1080549487073436620662446502198347476119,\n -0.3191123689278897604356718241684754668342,\n 0.3191123689278897604356718241684754668342,\n -0.5152486363581540919652907185511886623088,\n 0.5152486363581540919652907185511886623088,\n -0.6872929048116854701480198030193341375384,\n 0.6872929048116854701480198030193341375384,\n -0.8272013150697649931897947426503949610397,\n 0.8272013150697649931897947426503949610397,\n -0.928434883663573517336391139377874264477,\n 0.928434883663573517336391139377874264477,\n -0.986283808696812338841597266704052801676,\n 0.986283808696812338841597266704052801676,\n ],\n [\n 0, -0.2011940939974345223006283033945962078128,\n 0.2011940939974345223006283033945962078128,\n -0.3941513470775633698972073709810454683627,\n 0.3941513470775633698972073709810454683627,\n -0.5709721726085388475372267372539106412383,\n 0.5709721726085388475372267372539106412383,\n -0.7244177313601700474161860546139380096308,\n 0.7244177313601700474161860546139380096308,\n -0.8482065834104272162006483207742168513662,\n 0.8482065834104272162006483207742168513662,\n -0.9372733924007059043077589477102094712439,\n 0.9372733924007059043077589477102094712439,\n -0.9879925180204854284895657185866125811469,\n 0.9879925180204854284895657185866125811469,\n ],\n [\n -0.0950125098376374401853193354249580631303,\n 0.0950125098376374401853193354249580631303,\n -0.281603550779258913230460501460496106486,\n 0.281603550779258913230460501460496106486,\n -0.45801677765722738634241944298357757354,\n 0.45801677765722738634241944298357757354,\n -0.6178762444026437484466717640487910189918,\n 0.6178762444026437484466717640487910189918,\n -0.7554044083550030338951011948474422683538,\n 0.7554044083550030338951011948474422683538,\n -0.8656312023878317438804678977123931323873,\n 0.8656312023878317438804678977123931323873,\n -0.9445750230732325760779884155346083450911,\n 0.9445750230732325760779884155346083450911,\n -0.9894009349916499325961541734503326274262,\n 0.9894009349916499325961541734503326274262,\n ],\n [\n 0, -0.1784841814958478558506774936540655574754,\n 0.1784841814958478558506774936540655574754,\n -0.3512317634538763152971855170953460050405,\n 0.3512317634538763152971855170953460050405,\n -0.5126905370864769678862465686295518745829,\n 0.5126905370864769678862465686295518745829,\n -0.6576711592166907658503022166430023351478,\n 0.6576711592166907658503022166430023351478,\n -0.7815140038968014069252300555204760502239,\n 0.7815140038968014069252300555204760502239,\n -0.8802391537269859021229556944881556926234,\n 0.8802391537269859021229556944881556926234,\n -0.9506755217687677612227169578958030214433,\n 0.9506755217687677612227169578958030214433,\n -0.9905754753144173356754340199406652765077,\n 0.9905754753144173356754340199406652765077,\n ],\n [\n -0.0847750130417353012422618529357838117333,\n 0.0847750130417353012422618529357838117333,\n -0.2518862256915055095889728548779112301628,\n 0.2518862256915055095889728548779112301628,\n -0.4117511614628426460359317938330516370789,\n 0.4117511614628426460359317938330516370789,\n -0.5597708310739475346078715485253291369276,\n 0.5597708310739475346078715485253291369276,\n -0.6916870430603532078748910812888483894522,\n 0.6916870430603532078748910812888483894522,\n -0.8037049589725231156824174550145907971032,\n 0.8037049589725231156824174550145907971032,\n -0.8926024664975557392060605911271455154078,\n 0.8926024664975557392060605911271455154078,\n -0.9558239495713977551811958929297763099728,\n 0.9558239495713977551811958929297763099728,\n -0.9915651684209309467300160047061507702525,\n 0.9915651684209309467300160047061507702525,\n ],\n [\n 0, -0.1603586456402253758680961157407435495048,\n 0.1603586456402253758680961157407435495048,\n -0.3165640999636298319901173288498449178922,\n 0.3165640999636298319901173288498449178922,\n -0.4645707413759609457172671481041023679762,\n 0.4645707413759609457172671481041023679762,\n -0.6005453046616810234696381649462392798683,\n 0.6005453046616810234696381649462392798683,\n -0.7209661773352293786170958608237816296571,\n 0.7209661773352293786170958608237816296571,\n -0.8227146565371428249789224867127139017745,\n 0.8227146565371428249789224867127139017745,\n -0.9031559036148179016426609285323124878093,\n 0.9031559036148179016426609285323124878093,\n -0.960208152134830030852778840687651526615,\n 0.960208152134830030852778840687651526615,\n -0.9924068438435844031890176702532604935893,\n 0.9924068438435844031890176702532604935893,\n ],\n [\n -0.0765265211334973337546404093988382110047,\n 0.0765265211334973337546404093988382110047,\n -0.227785851141645078080496195368574624743,\n 0.227785851141645078080496195368574624743,\n -0.3737060887154195606725481770249272373957,\n 0.3737060887154195606725481770249272373957,\n -0.5108670019508270980043640509552509984254,\n 0.5108670019508270980043640509552509984254,\n -0.6360536807265150254528366962262859367433,\n 0.6360536807265150254528366962262859367433,\n -0.7463319064601507926143050703556415903107,\n 0.7463319064601507926143050703556415903107,\n -0.8391169718222188233945290617015206853296,\n 0.8391169718222188233945290617015206853296,\n -0.9122344282513259058677524412032981130491,\n 0.9122344282513259058677524412032981130491,\n -0.963971927277913791267666131197277221912,\n 0.963971927277913791267666131197277221912,\n -0.9931285991850949247861223884713202782226,\n 0.9931285991850949247861223884713202782226,\n ],\n [\n 0, -0.1455618541608950909370309823386863301163,\n 0.1455618541608950909370309823386863301163,\n -0.288021316802401096600792516064600319909,\n 0.288021316802401096600792516064600319909,\n -0.4243421202074387835736688885437880520964,\n 0.4243421202074387835736688885437880520964,\n -0.551618835887219807059018796724313286622,\n 0.551618835887219807059018796724313286622,\n -0.667138804197412319305966669990339162597,\n 0.667138804197412319305966669990339162597,\n -0.7684399634756779086158778513062280348209,\n 0.7684399634756779086158778513062280348209,\n -0.8533633645833172836472506385875676702761,\n 0.8533633645833172836472506385875676702761,\n -0.9200993341504008287901871337149688941591,\n 0.9200993341504008287901871337149688941591,\n -0.9672268385663062943166222149076951614246,\n 0.9672268385663062943166222149076951614246,\n -0.9937521706203895002602420359379409291933,\n 0.9937521706203895002602420359379409291933,\n ],\n [\n -0.0697392733197222212138417961186280818222,\n 0.0697392733197222212138417961186280818222,\n -0.2078604266882212854788465339195457342156,\n 0.2078604266882212854788465339195457342156,\n -0.3419358208920842251581474204273796195591,\n 0.3419358208920842251581474204273796195591,\n -0.4693558379867570264063307109664063460953,\n 0.4693558379867570264063307109664063460953,\n -0.5876404035069115929588769276386473488776,\n 0.5876404035069115929588769276386473488776,\n -0.6944872631866827800506898357622567712673,\n 0.6944872631866827800506898357622567712673,\n -0.7878168059792081620042779554083515213881,\n 0.7878168059792081620042779554083515213881,\n -0.8658125777203001365364256370193787290847,\n 0.8658125777203001365364256370193787290847,\n -0.9269567721871740005206929392590531966353,\n 0.9269567721871740005206929392590531966353,\n -0.9700604978354287271239509867652687108059,\n 0.9700604978354287271239509867652687108059,\n -0.994294585482399292073031421161298980393,\n 0.994294585482399292073031421161298980393,\n ],\n [\n 0, -0.1332568242984661109317426822417661370104,\n 0.1332568242984661109317426822417661370104,\n -0.264135680970344930533869538283309602979,\n 0.264135680970344930533869538283309602979,\n -0.390301038030290831421488872880605458578,\n 0.390301038030290831421488872880605458578,\n -0.5095014778460075496897930478668464305448,\n 0.5095014778460075496897930478668464305448,\n -0.6196098757636461563850973116495956533871,\n 0.6196098757636461563850973116495956533871,\n -0.7186613631319501944616244837486188483299,\n 0.7186613631319501944616244837486188483299,\n -0.8048884016188398921511184069967785579414,\n 0.8048884016188398921511184069967785579414,\n -0.8767523582704416673781568859341456716389,\n 0.8767523582704416673781568859341456716389,\n -0.9329710868260161023491969890384229782357,\n 0.9329710868260161023491969890384229782357,\n -0.9725424712181152319560240768207773751816,\n 0.9725424712181152319560240768207773751816,\n -0.9947693349975521235239257154455743605736,\n 0.9947693349975521235239257154455743605736,\n ],\n [\n -0.0640568928626056260850430826247450385909,\n 0.0640568928626056260850430826247450385909,\n -0.1911188674736163091586398207570696318404,\n 0.1911188674736163091586398207570696318404,\n -0.3150426796961633743867932913198102407864,\n 0.3150426796961633743867932913198102407864,\n -0.4337935076260451384870842319133497124524,\n 0.4337935076260451384870842319133497124524,\n -0.5454214713888395356583756172183723700107,\n 0.5454214713888395356583756172183723700107,\n -0.6480936519369755692524957869107476266696,\n 0.6480936519369755692524957869107476266696,\n -0.7401241915785543642438281030999784255232,\n 0.7401241915785543642438281030999784255232,\n -0.8200019859739029219539498726697452080761,\n 0.8200019859739029219539498726697452080761,\n -0.8864155270044010342131543419821967550873,\n 0.8864155270044010342131543419821967550873,\n -0.9382745520027327585236490017087214496548,\n 0.9382745520027327585236490017087214496548,\n -0.9747285559713094981983919930081690617411,\n 0.9747285559713094981983919930081690617411,\n -0.9951872199970213601799974097007368118745,\n 0.9951872199970213601799974097007368118745,\n ],\n];\n// Legendre-Gauss weights (wi values, defined by a function linked to in the Bezier primer article)\nexports.cValues = [\n [],\n [],\n [1.0, 1.0],\n [\n 0.8888888888888888888888888888888888888888,\n 0.5555555555555555555555555555555555555555,\n 0.5555555555555555555555555555555555555555,\n ],\n [\n 0.6521451548625461426269360507780005927646,\n 0.6521451548625461426269360507780005927646,\n 0.3478548451374538573730639492219994072353,\n 0.3478548451374538573730639492219994072353,\n ],\n [\n 0.5688888888888888888888888888888888888888,\n 0.4786286704993664680412915148356381929122,\n 0.4786286704993664680412915148356381929122,\n 0.2369268850561890875142640407199173626432,\n 0.2369268850561890875142640407199173626432,\n ],\n [\n 0.3607615730481386075698335138377161116615,\n 0.3607615730481386075698335138377161116615,\n 0.4679139345726910473898703439895509948116,\n 0.4679139345726910473898703439895509948116,\n 0.1713244923791703450402961421727328935268,\n 0.1713244923791703450402961421727328935268,\n ],\n [\n 0.4179591836734693877551020408163265306122,\n 0.3818300505051189449503697754889751338783,\n 0.3818300505051189449503697754889751338783,\n 0.2797053914892766679014677714237795824869,\n 0.2797053914892766679014677714237795824869,\n 0.1294849661688696932706114326790820183285,\n 0.1294849661688696932706114326790820183285,\n ],\n [\n 0.3626837833783619829651504492771956121941,\n 0.3626837833783619829651504492771956121941,\n 0.3137066458778872873379622019866013132603,\n 0.3137066458778872873379622019866013132603,\n 0.2223810344533744705443559944262408844301,\n 0.2223810344533744705443559944262408844301,\n 0.1012285362903762591525313543099621901153,\n 0.1012285362903762591525313543099621901153,\n ],\n [\n 0.3302393550012597631645250692869740488788,\n 0.1806481606948574040584720312429128095143,\n 0.1806481606948574040584720312429128095143,\n 0.0812743883615744119718921581105236506756,\n 0.0812743883615744119718921581105236506756,\n 0.3123470770400028400686304065844436655987,\n 0.3123470770400028400686304065844436655987,\n 0.2606106964029354623187428694186328497718,\n 0.2606106964029354623187428694186328497718,\n ],\n [\n 0.295524224714752870173892994651338329421,\n 0.295524224714752870173892994651338329421,\n 0.2692667193099963550912269215694693528597,\n 0.2692667193099963550912269215694693528597,\n 0.2190863625159820439955349342281631924587,\n 0.2190863625159820439955349342281631924587,\n 0.1494513491505805931457763396576973324025,\n 0.1494513491505805931457763396576973324025,\n 0.0666713443086881375935688098933317928578,\n 0.0666713443086881375935688098933317928578,\n ],\n [\n 0.272925086777900630714483528336342189156,\n 0.2628045445102466621806888698905091953727,\n 0.2628045445102466621806888698905091953727,\n 0.2331937645919904799185237048431751394317,\n 0.2331937645919904799185237048431751394317,\n 0.1862902109277342514260976414316558916912,\n 0.1862902109277342514260976414316558916912,\n 0.1255803694649046246346942992239401001976,\n 0.1255803694649046246346942992239401001976,\n 0.0556685671161736664827537204425485787285,\n 0.0556685671161736664827537204425485787285,\n ],\n [\n 0.2491470458134027850005624360429512108304,\n 0.2491470458134027850005624360429512108304,\n 0.2334925365383548087608498989248780562594,\n 0.2334925365383548087608498989248780562594,\n 0.2031674267230659217490644558097983765065,\n 0.2031674267230659217490644558097983765065,\n 0.160078328543346226334652529543359071872,\n 0.160078328543346226334652529543359071872,\n 0.1069393259953184309602547181939962242145,\n 0.1069393259953184309602547181939962242145,\n 0.047175336386511827194615961485017060317,\n 0.047175336386511827194615961485017060317,\n ],\n [\n 0.2325515532308739101945895152688359481566,\n 0.2262831802628972384120901860397766184347,\n 0.2262831802628972384120901860397766184347,\n 0.2078160475368885023125232193060527633865,\n 0.2078160475368885023125232193060527633865,\n 0.1781459807619457382800466919960979955128,\n 0.1781459807619457382800466919960979955128,\n 0.1388735102197872384636017768688714676218,\n 0.1388735102197872384636017768688714676218,\n 0.0921214998377284479144217759537971209236,\n 0.0921214998377284479144217759537971209236,\n 0.0404840047653158795200215922009860600419,\n 0.0404840047653158795200215922009860600419,\n ],\n [\n 0.2152638534631577901958764433162600352749,\n 0.2152638534631577901958764433162600352749,\n 0.2051984637212956039659240656612180557103,\n 0.2051984637212956039659240656612180557103,\n 0.1855383974779378137417165901251570362489,\n 0.1855383974779378137417165901251570362489,\n 0.1572031671581935345696019386238421566056,\n 0.1572031671581935345696019386238421566056,\n 0.1215185706879031846894148090724766259566,\n 0.1215185706879031846894148090724766259566,\n 0.0801580871597602098056332770628543095836,\n 0.0801580871597602098056332770628543095836,\n 0.0351194603317518630318328761381917806197,\n 0.0351194603317518630318328761381917806197,\n ],\n [\n 0.2025782419255612728806201999675193148386,\n 0.1984314853271115764561183264438393248186,\n 0.1984314853271115764561183264438393248186,\n 0.1861610000155622110268005618664228245062,\n 0.1861610000155622110268005618664228245062,\n 0.1662692058169939335532008604812088111309,\n 0.1662692058169939335532008604812088111309,\n 0.1395706779261543144478047945110283225208,\n 0.1395706779261543144478047945110283225208,\n 0.1071592204671719350118695466858693034155,\n 0.1071592204671719350118695466858693034155,\n 0.0703660474881081247092674164506673384667,\n 0.0703660474881081247092674164506673384667,\n 0.0307532419961172683546283935772044177217,\n 0.0307532419961172683546283935772044177217,\n ],\n [\n 0.1894506104550684962853967232082831051469,\n 0.1894506104550684962853967232082831051469,\n 0.1826034150449235888667636679692199393835,\n 0.1826034150449235888667636679692199393835,\n 0.1691565193950025381893120790303599622116,\n 0.1691565193950025381893120790303599622116,\n 0.1495959888165767320815017305474785489704,\n 0.1495959888165767320815017305474785489704,\n 0.1246289712555338720524762821920164201448,\n 0.1246289712555338720524762821920164201448,\n 0.0951585116824927848099251076022462263552,\n 0.0951585116824927848099251076022462263552,\n 0.0622535239386478928628438369943776942749,\n 0.0622535239386478928628438369943776942749,\n 0.0271524594117540948517805724560181035122,\n 0.0271524594117540948517805724560181035122,\n ],\n [\n 0.1794464703562065254582656442618856214487,\n 0.1765627053669926463252709901131972391509,\n 0.1765627053669926463252709901131972391509,\n 0.1680041021564500445099706637883231550211,\n 0.1680041021564500445099706637883231550211,\n 0.1540457610768102880814315948019586119404,\n 0.1540457610768102880814315948019586119404,\n 0.1351363684685254732863199817023501973721,\n 0.1351363684685254732863199817023501973721,\n 0.1118838471934039710947883856263559267358,\n 0.1118838471934039710947883856263559267358,\n 0.0850361483171791808835353701910620738504,\n 0.0850361483171791808835353701910620738504,\n 0.0554595293739872011294401653582446605128,\n 0.0554595293739872011294401653582446605128,\n 0.0241483028685479319601100262875653246916,\n 0.0241483028685479319601100262875653246916,\n ],\n [\n 0.1691423829631435918406564701349866103341,\n 0.1691423829631435918406564701349866103341,\n 0.1642764837458327229860537764659275904123,\n 0.1642764837458327229860537764659275904123,\n 0.1546846751262652449254180038363747721932,\n 0.1546846751262652449254180038363747721932,\n 0.1406429146706506512047313037519472280955,\n 0.1406429146706506512047313037519472280955,\n 0.1225552067114784601845191268002015552281,\n 0.1225552067114784601845191268002015552281,\n 0.1009420441062871655628139849248346070628,\n 0.1009420441062871655628139849248346070628,\n 0.0764257302548890565291296776166365256053,\n 0.0764257302548890565291296776166365256053,\n 0.0497145488949697964533349462026386416808,\n 0.0497145488949697964533349462026386416808,\n 0.0216160135264833103133427102664524693876,\n 0.0216160135264833103133427102664524693876,\n ],\n [\n 0.1610544498487836959791636253209167350399,\n 0.1589688433939543476499564394650472016787,\n 0.1589688433939543476499564394650472016787,\n 0.152766042065859666778855400897662998461,\n 0.152766042065859666778855400897662998461,\n 0.1426067021736066117757461094419029724756,\n 0.1426067021736066117757461094419029724756,\n 0.1287539625393362276755157848568771170558,\n 0.1287539625393362276755157848568771170558,\n 0.1115666455473339947160239016817659974813,\n 0.1115666455473339947160239016817659974813,\n 0.0914900216224499994644620941238396526609,\n 0.0914900216224499994644620941238396526609,\n 0.0690445427376412265807082580060130449618,\n 0.0690445427376412265807082580060130449618,\n 0.0448142267656996003328381574019942119517,\n 0.0448142267656996003328381574019942119517,\n 0.0194617882297264770363120414644384357529,\n 0.0194617882297264770363120414644384357529,\n ],\n [\n 0.1527533871307258506980843319550975934919,\n 0.1527533871307258506980843319550975934919,\n 0.1491729864726037467878287370019694366926,\n 0.1491729864726037467878287370019694366926,\n 0.1420961093183820513292983250671649330345,\n 0.1420961093183820513292983250671649330345,\n 0.1316886384491766268984944997481631349161,\n 0.1316886384491766268984944997481631349161,\n 0.118194531961518417312377377711382287005,\n 0.118194531961518417312377377711382287005,\n 0.1019301198172404350367501354803498761666,\n 0.1019301198172404350367501354803498761666,\n 0.0832767415767047487247581432220462061001,\n 0.0832767415767047487247581432220462061001,\n 0.0626720483341090635695065351870416063516,\n 0.0626720483341090635695065351870416063516,\n 0.040601429800386941331039952274932109879,\n 0.040601429800386941331039952274932109879,\n 0.0176140071391521183118619623518528163621,\n 0.0176140071391521183118619623518528163621,\n ],\n [\n 0.1460811336496904271919851476833711882448,\n 0.1445244039899700590638271665537525436099,\n 0.1445244039899700590638271665537525436099,\n 0.1398873947910731547221334238675831108927,\n 0.1398873947910731547221334238675831108927,\n 0.132268938633337461781052574496775604329,\n 0.132268938633337461781052574496775604329,\n 0.1218314160537285341953671771257335983563,\n 0.1218314160537285341953671771257335983563,\n 0.1087972991671483776634745780701056420336,\n 0.1087972991671483776634745780701056420336,\n 0.0934444234560338615532897411139320884835,\n 0.0934444234560338615532897411139320884835,\n 0.0761001136283793020170516533001831792261,\n 0.0761001136283793020170516533001831792261,\n 0.0571344254268572082836358264724479574912,\n 0.0571344254268572082836358264724479574912,\n 0.0369537897708524937999506682993296661889,\n 0.0369537897708524937999506682993296661889,\n 0.0160172282577743333242246168584710152658,\n 0.0160172282577743333242246168584710152658,\n ],\n [\n 0.1392518728556319933754102483418099578739,\n 0.1392518728556319933754102483418099578739,\n 0.1365414983460151713525738312315173965863,\n 0.1365414983460151713525738312315173965863,\n 0.1311735047870623707329649925303074458757,\n 0.1311735047870623707329649925303074458757,\n 0.1232523768105124242855609861548144719594,\n 0.1232523768105124242855609861548144719594,\n 0.1129322960805392183934006074217843191142,\n 0.1129322960805392183934006074217843191142,\n 0.1004141444428809649320788378305362823508,\n 0.1004141444428809649320788378305362823508,\n 0.0859416062170677274144436813727028661891,\n 0.0859416062170677274144436813727028661891,\n 0.0697964684245204880949614189302176573987,\n 0.0697964684245204880949614189302176573987,\n 0.0522933351526832859403120512732112561121,\n 0.0522933351526832859403120512732112561121,\n 0.0337749015848141547933022468659129013491,\n 0.0337749015848141547933022468659129013491,\n 0.0146279952982722006849910980471854451902,\n 0.0146279952982722006849910980471854451902,\n ],\n [\n 0.1336545721861061753514571105458443385831,\n 0.132462039404696617371642464703316925805,\n 0.132462039404696617371642464703316925805,\n 0.1289057221880821499785953393997936532597,\n 0.1289057221880821499785953393997936532597,\n 0.1230490843067295304675784006720096548158,\n 0.1230490843067295304675784006720096548158,\n 0.1149966402224113649416435129339613014914,\n 0.1149966402224113649416435129339613014914,\n 0.1048920914645414100740861850147438548584,\n 0.1048920914645414100740861850147438548584,\n 0.0929157660600351474770186173697646486034,\n 0.0929157660600351474770186173697646486034,\n 0.0792814117767189549228925247420432269137,\n 0.0792814117767189549228925247420432269137,\n 0.0642324214085258521271696151589109980391,\n 0.0642324214085258521271696151589109980391,\n 0.0480376717310846685716410716320339965612,\n 0.0480376717310846685716410716320339965612,\n 0.0309880058569794443106942196418845053837,\n 0.0309880058569794443106942196418845053837,\n 0.0134118594871417720813094934586150649766,\n 0.0134118594871417720813094934586150649766,\n ],\n [\n 0.1279381953467521569740561652246953718517,\n 0.1279381953467521569740561652246953718517,\n 0.1258374563468282961213753825111836887264,\n 0.1258374563468282961213753825111836887264,\n 0.121670472927803391204463153476262425607,\n 0.121670472927803391204463153476262425607,\n 0.1155056680537256013533444839067835598622,\n 0.1155056680537256013533444839067835598622,\n 0.1074442701159656347825773424466062227946,\n 0.1074442701159656347825773424466062227946,\n 0.0976186521041138882698806644642471544279,\n 0.0976186521041138882698806644642471544279,\n 0.086190161531953275917185202983742667185,\n 0.086190161531953275917185202983742667185,\n 0.0733464814110803057340336152531165181193,\n 0.0733464814110803057340336152531165181193,\n 0.0592985849154367807463677585001085845412,\n 0.0592985849154367807463677585001085845412,\n 0.0442774388174198061686027482113382288593,\n 0.0442774388174198061686027482113382288593,\n 0.0285313886289336631813078159518782864491,\n 0.0285313886289336631813078159518782864491,\n 0.0123412297999871995468056670700372915759,\n 0.0123412297999871995468056670700372915759,\n ],\n];\n// LUT for binomial coefficient arrays per curve order 'n'\nexports.binomialCoefficients = [[1], [1, 1], [1, 2, 1], [1, 3, 3, 1]];\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.t2length = exports.quadraticDerivative = exports.getQuadraticArcLength = exports.cubicDerivative = exports.quadraticPoint = exports.getCubicArcLength = exports.cubicPoint = void 0;\nconst bezier_values_1 = require(\"./bezier-values\");\nconst cubicPoint = (xs, ys, t) => {\n const x = (1 - t) * (1 - t) * (1 - t) * xs[0] +\n 3 * (1 - t) * (1 - t) * t * xs[1] +\n 3 * (1 - t) * t * t * xs[2] +\n t * t * t * xs[3];\n const y = (1 - t) * (1 - t) * (1 - t) * ys[0] +\n 3 * (1 - t) * (1 - t) * t * ys[1] +\n 3 * (1 - t) * t * t * ys[2] +\n t * t * t * ys[3];\n return { x, y };\n};\nexports.cubicPoint = cubicPoint;\n/**\n * Compute the curve derivative (hodograph) at t.\n */\nconst getDerivative = (derivative, t, vs) => {\n // the derivative of any 't'-less function is zero.\n const n = vs.length - 1;\n let value;\n if (n === 0) {\n return 0;\n }\n // direct values? compute!\n if (derivative === 0) {\n value = 0;\n for (let k = 0; k <= n; k++) {\n value += bezier_values_1.binomialCoefficients[n][k] * (1 - t) ** (n - k) * t ** k * vs[k];\n }\n return value;\n }\n // Still some derivative? go down one order, then try\n // for the lower order curve's.\n const _vs = new Array(n);\n for (let k = 0; k < n; k++) {\n _vs[k] = n * (vs[k + 1] - vs[k]);\n }\n return getDerivative(derivative - 1, t, _vs);\n};\nfunction bFunc(xs, ys, t) {\n const xbase = getDerivative(1, t, xs);\n const ybase = getDerivative(1, t, ys);\n const combined = xbase * xbase + ybase * ybase;\n return Math.sqrt(combined);\n}\nconst getCubicArcLength = ({ sx, sy, t, }) => {\n let correctedT;\n const n = 20;\n const z = t / 2;\n let sum = 0;\n for (let i = 0; i < n; i++) {\n correctedT = z * bezier_values_1.tValues[n][i] + z;\n sum += bezier_values_1.cValues[n][i] * bFunc(sx, sy, correctedT);\n }\n return z * sum;\n};\nexports.getCubicArcLength = getCubicArcLength;\nconst quadraticPoint = (xs, ys, t) => {\n const x = (1 - t) * (1 - t) * xs[0] + 2 * (1 - t) * t * xs[1] + t * t * xs[2];\n const y = (1 - t) * (1 - t) * ys[0] + 2 * (1 - t) * t * ys[1] + t * t * ys[2];\n return { x, y };\n};\nexports.quadraticPoint = quadraticPoint;\nconst cubicDerivative = (xs, ys, t) => {\n const derivative = (0, exports.quadraticPoint)([3 * (xs[1] - xs[0]), 3 * (xs[2] - xs[1]), 3 * (xs[3] - xs[2])], [3 * (ys[1] - ys[0]), 3 * (ys[2] - ys[1]), 3 * (ys[3] - ys[2])], t);\n return derivative;\n};\nexports.cubicDerivative = cubicDerivative;\nconst getQuadraticArcLength = (xs, ys, t) => {\n if (t === undefined) {\n t = 1;\n }\n const ax = xs[0] - 2 * xs[1] + xs[2];\n const ay = ys[0] - 2 * ys[1] + ys[2];\n const bx = 2 * xs[1] - 2 * xs[0];\n const by = 2 * ys[1] - 2 * ys[0];\n const A = 4 * (ax * ax + ay * ay);\n const B = 4 * (ax * bx + ay * by);\n const C = bx * bx + by * by;\n if (A === 0) {\n return t * Math.sqrt((xs[2] - xs[0]) ** 2 + (ys[2] - ys[0]) ** 2);\n }\n const b = B / (2 * A);\n const c = C / A;\n const u = t + b;\n const k = c - b * b;\n const uuk = u * u + k > 0 ? Math.sqrt(u * u + k) : 0;\n const bbk = b * b + k > 0 ? Math.sqrt(b * b + k) : 0;\n const term = b + Math.sqrt(b * b + k) === 0\n ? 0\n : k * Math.log(Math.abs((u + uuk) / (b + bbk)));\n return (Math.sqrt(A) / 2) * (u * uuk - b * bbk + term);\n};\nexports.getQuadraticArcLength = getQuadraticArcLength;\nconst quadraticDerivative = (xs, ys, t) => {\n return {\n x: (1 - t) * 2 * (xs[1] - xs[0]) + t * 2 * (xs[2] - xs[1]),\n y: (1 - t) * 2 * (ys[1] - ys[0]) + t * 2 * (ys[2] - ys[1]),\n };\n};\nexports.quadraticDerivative = quadraticDerivative;\nconst t2length = ({ length, totalLength, func, }) => {\n let error = 1;\n let t = length / totalLength;\n let step = (length - func(t)) / totalLength;\n let numIterations = 0;\n while (error > 0.001) {\n const increasedTLength = func(t + step);\n const increasedTError = Math.abs(length - increasedTLength) / totalLength;\n if (increasedTError < error) {\n error = increasedTError;\n t += step;\n }\n else {\n const decreasedTLength = func(t - step);\n const decreasedTError = Math.abs(length - decreasedTLength) / totalLength;\n if (decreasedTError < error) {\n error = decreasedTError;\n t -= step;\n }\n else {\n step /= 2;\n }\n }\n numIterations++;\n if (numIterations > 500) {\n break;\n }\n }\n return t;\n};\nexports.t2length = t2length;\n","\"use strict\";\n// Copied from: https://github.com/rveciana/svg-path-properties\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.makeCubic = exports.makeQuadratic = void 0;\nconst bezier_functions_1 = require(\"./bezier-functions\");\nconst makeQuadratic = ({ startX, startY, cpx, cpy, x, y, }) => {\n const a = { x: startX, y: startY };\n const b = { x: cpx, y: cpy };\n const c = { x, y };\n const length = (0, bezier_functions_1.getQuadraticArcLength)([a.x, b.x, c.x, 0], [a.y, b.y, c.y, 0], 1);\n const getTotalLength = () => {\n return length;\n };\n const getPointAtLength = (len) => {\n const xs = [a.x, b.x, c.x, 0];\n const xy = [a.y, b.y, c.y, 0];\n const t = (0, bezier_functions_1.t2length)({\n length: len,\n totalLength: length,\n func: (i) => (0, bezier_functions_1.getQuadraticArcLength)(xs, xy, i),\n });\n return (0, bezier_functions_1.quadraticPoint)(xs, xy, t);\n };\n const getTangentAtLength = (len) => {\n const xs = [a.x, b.x, c.x, 0];\n const xy = [a.y, b.y, c.y, 0];\n const t = (0, bezier_functions_1.t2length)({\n length: len,\n totalLength: length,\n func: (i) => (0, bezier_functions_1.getQuadraticArcLength)(xs, xy, i),\n });\n const derivative = (0, bezier_functions_1.quadraticDerivative)(xs, xy, t);\n const mdl = Math.sqrt(derivative.x * derivative.x + derivative.y * derivative.y);\n let tangent;\n if (mdl > 0) {\n tangent = { x: derivative.x / mdl, y: derivative.y / mdl };\n }\n else {\n tangent = { x: 0, y: 0 };\n }\n return tangent;\n };\n const getC = () => {\n return c;\n };\n return {\n getPointAtLength,\n getTangentAtLength,\n getTotalLength,\n getC,\n type: 'quadratic-bezier',\n getD: () => ({ x: 0, y: 0 }),\n };\n};\nexports.makeQuadratic = makeQuadratic;\nconst makeCubic = ({ startX, startY, cp1x, cp1y, cp2x, cp2y, x, y, }) => {\n const a = { x: startX, y: startY };\n const b = { x: cp1x, y: cp1y };\n const c = { x: cp2x, y: cp2y };\n const d = { x, y };\n const length = (0, bezier_functions_1.getCubicArcLength)({\n sx: [a.x, b.x, c.x, d.x],\n sy: [a.y, b.y, c.y, d.y],\n t: 1,\n });\n const getTotalLength = () => {\n return length;\n };\n const getPointAtLength = (len) => {\n const sx = [a.x, b.x, c.x, d.x];\n const sy = [a.y, b.y, c.y, d.y];\n const t = (0, bezier_functions_1.t2length)({\n length: len,\n totalLength: length,\n func: (i) => {\n return (0, bezier_functions_1.getCubicArcLength)({ sx, sy, t: i });\n },\n });\n return (0, bezier_functions_1.cubicPoint)(sx, sy, t);\n };\n const getTangentAtLength = (len) => {\n const xs = [a.x, b.x, c.x, d.x];\n const xy = [a.y, b.y, c.y, d.y];\n const t = (0, bezier_functions_1.t2length)({\n length: len,\n totalLength: length,\n func: (i) => (0, bezier_functions_1.getCubicArcLength)({ sx: xs, sy: xy, t: i }),\n });\n const derivative = (0, bezier_functions_1.cubicDerivative)(xs, xy, t);\n const mdl = Math.sqrt(derivative.x * derivative.x + derivative.y * derivative.y);\n let tangent;\n if (mdl > 0) {\n tangent = { x: derivative.x / mdl, y: derivative.y / mdl };\n }\n else {\n tangent = { x: 0, y: 0 };\n }\n return tangent;\n };\n const getC = () => {\n return c;\n };\n const getD = () => {\n return d;\n };\n return {\n getPointAtLength,\n getTangentAtLength,\n getTotalLength,\n getC,\n getD,\n type: 'cubic-bezier',\n };\n};\nexports.makeCubic = makeCubic;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.makeLinearPosition = void 0;\nconst makeLinearPosition = ({ x0, x1, y0, y1, }) => {\n return {\n getTotalLength: () => {\n return Math.sqrt((x0 - x1) ** 2 + (y0 - y1) ** 2);\n },\n getPointAtLength: (pos) => {\n let fraction = pos / Math.sqrt((x0 - x1) ** 2 + (y0 - y1) ** 2);\n fraction = Number.isNaN(fraction) ? 1 : fraction;\n const newDeltaX = (x1 - x0) * fraction;\n const newDeltaY = (y1 - y0) * fraction;\n return { x: x0 + newDeltaX, y: y0 + newDeltaY };\n },\n getTangentAtLength: () => {\n const module = Math.sqrt((x1 - x0) * (x1 - x0) + (y1 - y0) * (y1 - y0));\n return { x: (x1 - x0) / module, y: (y1 - y0) / module };\n },\n type: 'linear',\n };\n};\nexports.makeLinearPosition = makeLinearPosition;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.conductAnalysis = void 0;\nconst bezier_1 = require(\"./bezier\");\nconst linear_1 = require(\"./linear\");\nconst conductAnalysis = (instructions) => {\n let currentPoint = { x: 0, y: 0 };\n let moveStart = { x: 0, y: 0 };\n const segments = [];\n for (let i = 0; i < instructions.length; i++) {\n const instruction = instructions[i];\n // moveTo\n if (instruction.type === 'M') {\n currentPoint = { x: instruction.x, y: instruction.y };\n moveStart = { x: currentPoint.x, y: currentPoint.y };\n segments.push({\n startPoint: { x: instruction.x, y: instruction.y },\n instructionsAndInfo: [\n {\n instruction,\n function: null,\n length: 0,\n startPoint: currentPoint,\n },\n ],\n });\n }\n if (instruction.type === 'L') {\n if (segments.length > 0) {\n const length = Math.sqrt((currentPoint.x - instruction.x) ** 2 +\n (currentPoint.y - instruction.y) ** 2);\n segments[segments.length - 1].instructionsAndInfo.push({\n instruction,\n length,\n function: (0, linear_1.makeLinearPosition)({\n x0: currentPoint.x,\n x1: instruction.x,\n y0: currentPoint.y,\n y1: instruction.y,\n }),\n startPoint: currentPoint,\n });\n }\n currentPoint = { x: instruction.x, y: instruction.y };\n }\n if (instruction.type === 'Z') {\n if (segments.length > 0) {\n const length = Math.sqrt((segments[segments.length - 1].startPoint.x - currentPoint.x) ** 2 +\n (segments[segments.length - 1].startPoint.y - currentPoint.y) ** 2);\n segments[segments.length - 1].instructionsAndInfo.push({\n instruction,\n function: (0, linear_1.makeLinearPosition)({\n x0: currentPoint.x,\n x1: moveStart.x,\n y0: currentPoint.y,\n y1: moveStart.y,\n }),\n length,\n startPoint: { ...currentPoint },\n });\n }\n currentPoint = { x: moveStart.x, y: moveStart.y };\n }\n if (instruction.type === 'C') {\n const curve = (0, bezier_1.makeCubic)({\n startX: currentPoint.x,\n startY: currentPoint.y,\n cp1x: instruction.cp1x,\n cp1y: instruction.cp1y,\n cp2x: instruction.cp2x,\n cp2y: instruction.cp2y,\n x: instruction.x,\n y: instruction.y,\n });\n const length = curve.getTotalLength();\n if (segments.length > 0) {\n segments[segments.length - 1].instructionsAndInfo.push({\n instruction,\n length,\n function: curve,\n startPoint: { ...currentPoint },\n });\n }\n currentPoint = { x: instruction.x, y: instruction.y };\n }\n }\n return segments;\n};\nexports.conductAnalysis = conductAnalysis;\n","\"use strict\";\n// Copied from: https://github.com/rveciana/svg-path-properties\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.parsePath = void 0;\nconst length = {\n a: 7,\n A: 7,\n C: 6,\n c: 6,\n H: 1,\n h: 1,\n L: 2,\n l: 2,\n M: 2,\n m: 2,\n Q: 4,\n q: 4,\n S: 4,\n s: 4,\n T: 2,\n t: 2,\n V: 1,\n v: 1,\n Z: 0,\n z: 0,\n};\nconst chunkExact = (array, instruction) => {\n const chunks = [];\n const expectedSize = length[instruction];\n if (array.length % expectedSize !== 0) {\n throw new Error(`Expected number of arguments of SVG instruction \"${instruction} ${array.join(' ')}\" to be a multiple of ${expectedSize}`);\n }\n for (let i = 0; i < array.length; i += expectedSize) {\n chunks.push(array.slice(i, i + expectedSize));\n }\n return chunks;\n};\nconst makeInstructions = (arr, instruction, cb) => {\n return chunkExact(arr, instruction).map((args) => {\n return cb(args);\n });\n};\nconst segmentRegExp = /([astvzqmhlc])([^astvzqmhlc]*)/gi;\nconst numberRegExp = /-?[0-9]*\\.?[0-9]+(?:e[-+]?\\d+)?/gi;\nconst parseValues = (args, instructionType) => {\n const numbers = args.match(numberRegExp);\n if (!numbers) {\n if (instructionType === 'Z' || instructionType === 'z') {\n return [];\n }\n throw new Error(`Malformed path data: ${instructionType} was expected to have numbers afterwards`);\n }\n const expectedArguments = length[instructionType];\n if (numbers.length % expectedArguments !== 0) {\n throw new Error(`Malformed path data: ${instructionType} was expected to have a multiple of ${expectedArguments} numbers, but got \"${instructionType} ${numbers.join(' ')} instead\"`);\n }\n return numbers.map(Number);\n};\n/**\n * @description Parses an SVG string path into an array of Instruction's.\n * @param {string} path\n * @returns an array of objects containing the Instructions\n * @see [Documentation](https://www.remotion.dev/docs/paths/parse-path)\n */\nconst parsePath = (path) => {\n if (!path) {\n throw new Error('No path provided');\n }\n const segments = path.match(segmentRegExp);\n if (!segments) {\n throw new Error(`No path elements found in string ${path}`);\n }\n return segments\n .map((segmentString) => {\n const command = segmentString.charAt(0);\n const args = parseValues(segmentString.substring(1), command);\n // overloaded moveTo\n if (command === 'M' && args.length > 2) {\n const segmentsArray = [];\n segmentsArray.push({\n type: command,\n x: args[0],\n y: args[1],\n });\n segmentsArray.push(...makeInstructions(args.slice(2), 'L', (numbers) => ({\n type: 'L',\n x: numbers[0],\n y: numbers[1],\n })));\n return segmentsArray;\n }\n if (command === 'm' && args.length > 2) {\n const segmentsArray = [];\n segmentsArray.push({\n type: command,\n dx: args[0],\n dy: args[1],\n });\n segmentsArray.push(...makeInstructions(args.slice(2), 'l', (numbers) => ({\n type: 'l',\n dx: numbers[0],\n dy: numbers[1],\n })));\n return segmentsArray;\n }\n if (command === 'Z' || command === 'z') {\n return [\n {\n type: 'Z',\n },\n ];\n }\n if (command === 'A') {\n return makeInstructions(args, command, (numbers) => ({\n type: command,\n rx: numbers[0],\n ry: numbers[1],\n xAxisRotation: numbers[2],\n largeArcFlag: numbers[3] === 1,\n sweepFlag: numbers[4] === 1,\n x: numbers[5],\n y: numbers[6],\n }));\n }\n if (command === 'a') {\n return makeInstructions(args, command, (numbers) => ({\n type: command,\n rx: numbers[0],\n ry: numbers[1],\n xAxisRotation: numbers[2],\n largeArcFlag: numbers[3] === 1,\n sweepFlag: numbers[4] === 1,\n dx: numbers[5],\n dy: numbers[6],\n }));\n }\n if (command === 'C') {\n return makeInstructions(args, command, (numbers) => ({\n type: command,\n cp1x: numbers[0],\n cp1y: numbers[1],\n cp2x: numbers[2],\n cp2y: numbers[3],\n x: numbers[4],\n y: numbers[5],\n }));\n }\n if (command === 'c') {\n return makeInstructions(args, command, (numbers) => ({\n type: command,\n cp1dx: numbers[0],\n cp1dy: numbers[1],\n cp2dx: numbers[2],\n cp2dy: numbers[3],\n dx: numbers[4],\n dy: numbers[5],\n }));\n }\n if (command === 'S') {\n return makeInstructions(args, command, (numbers) => ({\n type: command,\n cpx: numbers[0],\n cpy: numbers[1],\n x: numbers[2],\n y: numbers[3],\n }));\n }\n if (command === 's') {\n return makeInstructions(args, command, (numbers) => ({\n type: command,\n cpdx: numbers[0],\n cpdy: numbers[1],\n dx: numbers[2],\n dy: numbers[3],\n }));\n }\n if (command === 'H') {\n return makeInstructions(args, command, (numbers) => ({\n type: command,\n x: numbers[0],\n }));\n }\n if (command === 'h') {\n return makeInstructions(args, command, (numbers) => ({\n type: command,\n dx: numbers[0],\n }));\n }\n if (command === 'V') {\n return makeInstructions(args, command, (numbers) => ({\n type: command,\n y: numbers[0],\n }));\n }\n if (command === 'v') {\n return makeInstructions(args, command, (numbers) => ({\n type: command,\n dy: numbers[0],\n }));\n }\n if (command === 'L') {\n return makeInstructions(args, command, (numbers) => ({\n type: command,\n x: numbers[0],\n y: numbers[1],\n }));\n }\n if (command === 'M') {\n return makeInstructions(args, command, (numbers) => ({\n type: command,\n x: numbers[0],\n y: numbers[1],\n }));\n }\n if (command === 'm') {\n return makeInstructions(args, command, (numbers) => ({\n type: command,\n dx: numbers[0],\n dy: numbers[1],\n }));\n }\n if (command === 'l') {\n return makeInstructions(args, command, (numbers) => ({\n type: command,\n dx: numbers[0],\n dy: numbers[1],\n }));\n }\n if (command === 'Q') {\n return makeInstructions(args, command, (numbers) => ({\n type: command,\n cpx: numbers[0],\n cpy: numbers[1],\n x: numbers[2],\n y: numbers[3],\n }));\n }\n if (command === 'q') {\n return makeInstructions(args, command, (numbers) => ({\n type: command,\n cpdx: numbers[0],\n cpdy: numbers[1],\n dx: numbers[2],\n dy: numbers[3],\n }));\n }\n if (command === 'T') {\n return makeInstructions(args, command, (numbers) => ({\n type: command,\n x: numbers[0],\n y: numbers[1],\n }));\n }\n if (command === 't') {\n return makeInstructions(args, command, (numbers) => ({\n type: command,\n dx: numbers[0],\n dy: numbers[1],\n }));\n }\n throw new Error(`Invalid path element ${segmentString}`);\n }, [])\n .flat(1);\n};\nexports.parsePath = parsePath;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.convertQToCInstruction = void 0;\nconst convertQToCInstruction = (instruction, startPoint) => {\n const cp1x = startPoint.x + (2 / 3) * (instruction.cpx - startPoint.x);\n const cp1y = startPoint.y + (2 / 3) * (instruction.cpy - startPoint.y);\n const cp2x = instruction.x + (2 / 3) * (instruction.cpx - instruction.x);\n const cp2y = instruction.y + (2 / 3) * (instruction.cpy - instruction.y);\n return {\n type: 'C',\n cp1x,\n cp1y,\n cp2x,\n cp2y,\n x: instruction.x,\n y: instruction.y,\n };\n};\nexports.convertQToCInstruction = convertQToCInstruction;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.iterateOverSegments = void 0;\nconst iterateOverSegments = ({ segments, iterate, }) => {\n let x = 0;\n let y = 0;\n let initialX = 0;\n let initialY = 0;\n let cpX = null;\n let cpY = null;\n const newSegments = segments.map((s, i) => {\n var _a;\n const newSeg = iterate({\n segment: s,\n x,\n y,\n prevSegment: (_a = segments[i - 1]) !== null && _a !== void 0 ? _a : null,\n initialX,\n initialY,\n cpX,\n cpY,\n });\n switch (s.type) {\n case 'M':\n initialX = s.x;\n initialY = s.y;\n x = s.x;\n y = s.y;\n cpX = null;\n cpY = null;\n break;\n case 'Q':\n x = s.x;\n y = s.y;\n cpX = s.cpx;\n cpY = s.cpy;\n break;\n case 'A':\n x = s.x;\n y = s.y;\n cpX = null;\n cpY = null;\n break;\n case 'C':\n x = s.x;\n y = s.y;\n cpX = s.cp2x;\n cpY = s.cp2y;\n break;\n case 'S':\n x = s.x;\n y = s.y;\n cpX = s.cpx;\n cpY = s.cpy;\n break;\n case 'T':\n // Order of if statement is important here\n if (cpX !== null && cpY !== null) {\n cpX = x - (cpX - x);\n cpY = y - (cpY - y);\n }\n x = s.x;\n y = s.y;\n break;\n case 'L':\n x = s.x;\n y = s.y;\n cpX = null;\n cpY = null;\n break;\n case 'V':\n y = s.y;\n cpX = null;\n cpY = null;\n break;\n case 'H':\n x = s.x;\n cpX = null;\n cpY = null;\n break;\n case 'Z':\n x = initialX;\n y = initialY;\n cpX = null;\n cpY = null;\n break;\n default:\n // @ts-expect-error\n throw new Error(`Unexpected instruction ${s.type}`);\n }\n return newSeg;\n });\n return newSegments.flat(1);\n};\nexports.iterateOverSegments = iterateOverSegments;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.removeATSHVQInstructions = void 0;\nconst convert_q_to_c_instruction_1 = require(\"./convert-q-to-c-instruction\");\nconst iterate_1 = require(\"./iterate\");\nconst TAU = Math.PI * 2;\nfunction approximate_unit_arc(theta1, delta_theta) {\n const alpha = (4 / 3) * Math.tan(delta_theta / 4);\n const x1 = Math.cos(theta1);\n const y1 = Math.sin(theta1);\n const x2 = Math.cos(theta1 + delta_theta);\n const y2 = Math.sin(theta1 + delta_theta);\n return [\n x1,\n y1,\n x1 - y1 * alpha,\n y1 + x1 * alpha,\n x2 + y2 * alpha,\n y2 - x2 * alpha,\n x2,\n y2,\n ];\n}\nfunction unit_vector_angle(ux, uy, vx, vy) {\n const sign = ux * vy - uy * vx < 0 ? -1 : 1;\n let dot = ux * vx + uy * vy;\n // Add this to work with arbitrary vectors:\n // dot /= Math.sqrt(ux * ux + uy * uy) * Math.sqrt(vx * vx + vy * vy);\n // rounding errors, e.g. -1.0000000000000002 can screw up this\n if (dot > 1.0) {\n dot = 1.0;\n }\n if (dot < -1.0) {\n dot = -1.0;\n }\n return sign * Math.acos(dot);\n}\nfunction get_arc_center({ x1, y1, x2, y2, largeArcFlag, sweepFlag, rx, ry, sin_phi, cos_phi, }) {\n // Step 1.\n //\n // Moving an ellipse so origin will be the middlepoint between our two\n // points. After that, rotate it to line up ellipse axes with coordinate\n // axes.\n //\n const x1p = (cos_phi * (x1 - x2)) / 2 + (sin_phi * (y1 - y2)) / 2;\n const y1p = (-sin_phi * (x1 - x2)) / 2 + (cos_phi * (y1 - y2)) / 2;\n const rx_sq = rx * rx;\n const ry_sq = ry * ry;\n const x1p_sq = x1p * x1p;\n const y1p_sq = y1p * y1p;\n // Step 2.\n //\n // Compute coordinates of the centre of this ellipse (cx', cy')\n // in the new coordinate system.\n //\n let radicant = rx_sq * ry_sq - rx_sq * y1p_sq - ry_sq * x1p_sq;\n if (radicant < 0) {\n // due to rounding errors it might be e.g. -1.3877787807814457e-17\n radicant = 0;\n }\n radicant /= rx_sq * y1p_sq + ry_sq * x1p_sq;\n radicant = Math.sqrt(radicant) * (largeArcFlag === sweepFlag ? -1 : 1);\n const cxp = ((radicant * rx) / ry) * y1p;\n const cyp = ((radicant * -ry) / rx) * x1p;\n // Step 3.\n //\n // Transform back to get centre coordinates (cx, cy) in the original\n // coordinate system.\n //\n const cx = cos_phi * cxp - sin_phi * cyp + (x1 + x2) / 2;\n const cy = sin_phi * cxp + cos_phi * cyp + (y1 + y2) / 2;\n // Step 4.\n //\n // Compute angles (theta1, delta_theta).\n //\n const v1x = (x1p - cxp) / rx;\n const v1y = (y1p - cyp) / ry;\n const v2x = (-x1p - cxp) / rx;\n const v2y = (-y1p - cyp) / ry;\n const theta1 = unit_vector_angle(1, 0, v1x, v1y);\n let delta_theta = unit_vector_angle(v1x, v1y, v2x, v2y);\n if (sweepFlag === false && delta_theta > 0) {\n delta_theta -= TAU;\n }\n if (sweepFlag === true && delta_theta < 0) {\n delta_theta += TAU;\n }\n return [cx, cy, theta1, delta_theta];\n}\nfunction arcToCircle({ x1, y1, x2, y2, largeArcFlag, sweepFlag, rx, ry, phi, }) {\n const sin_phi = Math.sin((phi * TAU) / 360);\n const cos_phi = Math.cos((phi * TAU) / 360);\n // Make sure radii are valid\n //\n const x1p = (cos_phi * (x1 - x2)) / 2 + (sin_phi * (y1 - y2)) / 2;\n const y1p = (-sin_phi * (x1 - x2)) / 2 + (cos_phi * (y1 - y2)) / 2;\n if (x1p === 0 && y1p === 0) {\n // we're asked to draw line to itself\n return [];\n }\n if (rx === 0 || ry === 0) {\n // one of the radii is zero\n return [];\n }\n // Compensate out-of-range radii\n //\n rx = Math.abs(rx);\n ry = Math.abs(ry);\n const lambda = (x1p * x1p) / (rx * rx) + (y1p * y1p) / (ry * ry);\n if (lambda > 1) {\n rx *= Math.sqrt(lambda);\n ry *= Math.sqrt(lambda);\n }\n // Get center parameters (cx, cy, theta1, delta_theta)\n //\n const cc = get_arc_center({\n x1,\n y1,\n x2,\n y2,\n largeArcFlag,\n sweepFlag,\n rx,\n ry,\n sin_phi,\n cos_phi,\n });\n const result = [];\n let theta1 = cc[2];\n let delta_theta = cc[3];\n // Split an arc to multiple segments, so each segment\n // will be less than τ/4 (= 90°)\n //\n const segments = Math.max(Math.ceil(Math.abs(delta_theta) / (TAU / 4)), 1);\n delta_theta /= segments;\n for (let i = 0; i < segments; i++) {\n result.push(approximate_unit_arc(theta1, delta_theta));\n theta1 += delta_theta;\n }\n // We have a bezier approximation of a unit circle,\n // now need to transform back to the original ellipse\n //\n return result.map((curve) => {\n for (let i = 0; i < curve.length; i += 2) {\n let x = curve[i + 0];\n let y = curve[i + 1];\n // scale\n x *= rx;\n y *= ry;\n // rotate\n const xp = cos_phi * x - sin_phi * y;\n const yp = sin_phi * x + cos_phi * y;\n // translate\n curve[i + 0] = xp + cc[0];\n curve[i + 1] = yp + cc[1];\n }\n return curve;\n });\n}\n// Requires path to be normalized\nconst removeATSHVQInstructions = (segments) => {\n return (0, iterate_1.iterateOverSegments)({\n segments,\n iterate: ({ segment, prevSegment, x, y, cpX, cpY }) => {\n if (segment.type === 'H') {\n return [{ type: 'L', x: segment.x, y }];\n }\n if (segment.type === 'V') {\n return [{ type: 'L', x, y: segment.y }];\n }\n if (segment.type === 'A') {\n const nextX = segment.x;\n const nextY = segment.y;\n const new_segments = arcToCircle({\n x1: x,\n y1: y,\n x2: nextX,\n y2: nextY,\n largeArcFlag: segment.largeArcFlag,\n sweepFlag: segment.sweepFlag,\n rx: segment.rx,\n ry: segment.ry,\n phi: segment.xAxisRotation,\n });\n // Degenerated arcs can be ignored by renderer, but should not be dropped\n // to avoid collisions with `S A S` and so on. Replace with empty line.\n if (new_segments.length === 0) {\n return [\n {\n type: 'L',\n x: segment.x,\n y: segment.y,\n },\n ];\n }\n const result = new_segments.map((_s) => {\n return {\n type: 'C',\n cp1x: _s[2],\n cp1y: _s[3],\n cp2x: _s[4],\n cp2y: _s[5],\n x: _s[6],\n y: _s[7],\n };\n });\n return result;\n }\n if (segment.type === 'T') {\n let prevControlX = 0;\n let prevControlY = 0;\n if (prevSegment &&\n (prevSegment.type === 'Q' || prevSegment.type === 'T')) {\n prevControlX = cpX;\n prevControlY = cpY;\n }\n else {\n prevControlX = x;\n prevControlY = y;\n }\n // New first control point is reflection of previous second control point\n const vectorX = prevControlX - x;\n const vectorY = prevControlY - y;\n const newControlX = x - vectorX;\n const newControlY = y - vectorY;\n return [\n (0, convert_q_to_c_instruction_1.convertQToCInstruction)({\n type: 'Q',\n cpx: newControlX,\n cpy: newControlY,\n x: segment.x,\n y: segment.y,\n }, { x, y }),\n ];\n }\n if (segment.type === 'S') {\n let prevControlX = 0;\n let prevControlY = 0;\n if (prevSegment && prevSegment.type === 'C') {\n prevControlX = prevSegment.cp2x;\n prevControlY = prevSegment.cp2y;\n }\n else if (prevSegment && prevSegment.type === 'S') {\n prevControlX = prevSegment.cpx;\n prevControlY = prevSegment.cpy;\n }\n else {\n prevControlX = x;\n prevControlY = y;\n }\n // New first control point is reflection of previous second control point\n const vectorX = prevControlX - x;\n const vectorY = prevControlY - y;\n const newControlX = x - vectorX;\n const newControlY = y - vectorY;\n return [\n {\n type: 'C',\n cp1x: newControlX,\n cp1y: newControlY,\n cp2x: segment.cpx,\n cp2y: segment.cpy,\n x: segment.x,\n y: segment.y,\n },\n ];\n }\n if (segment.type === 'Q') {\n return [(0, convert_q_to_c_instruction_1.convertQToCInstruction)(segment, { x, y })];\n }\n return [segment];\n },\n });\n};\nexports.removeATSHVQInstructions = removeATSHVQInstructions;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.serializeInstructions = void 0;\n/**\n * @description Takes an array of Instruction's and serializes it into an SVG path string.\n * @param {Array} instruction\n * @returns a serialized SVG path string\n * @see [Documentation](https://www.remotion.dev/docs/paths/serialize-instructions)\n */\nconst serializeInstruction = (instruction) => {\n if (instruction.type === 'A') {\n return `A ${instruction.rx} ${instruction.ry} ${instruction.xAxisRotation} ${Number(instruction.largeArcFlag)} ${Number(instruction.sweepFlag)} ${instruction.x} ${instruction.y}`;\n }\n if (instruction.type === 'a') {\n return `a ${instruction.rx} ${instruction.ry} ${instruction.xAxisRotation} ${Number(instruction.largeArcFlag)} ${Number(instruction.sweepFlag)} ${instruction.dx} ${instruction.dy}`;\n }\n if (instruction.type === 'C') {\n return `C ${instruction.cp1x} ${instruction.cp1y} ${instruction.cp2x} ${instruction.cp2y} ${instruction.x} ${instruction.y}`;\n }\n if (instruction.type === 'c') {\n return `c ${instruction.cp1dx} ${instruction.cp1dy} ${instruction.cp2dx} ${instruction.cp2dy} ${instruction.dx} ${instruction.dy}`;\n }\n if (instruction.type === 'S') {\n return `S ${instruction.cpx} ${instruction.cpy} ${instruction.x} ${instruction.y}`;\n }\n if (instruction.type === 's') {\n return `s ${instruction.cpdx} ${instruction.cpdy} ${instruction.dx} ${instruction.dy}`;\n }\n if (instruction.type === 'Q') {\n return `Q ${instruction.cpx} ${instruction.cpy} ${instruction.x} ${instruction.y}`;\n }\n if (instruction.type === 'q') {\n return `q ${instruction.cpdx} ${instruction.cpdy} ${instruction.dx} ${instruction.dy}`;\n }\n if (instruction.type === 'Z') {\n return 'Z';\n }\n if (instruction.type === 'H') {\n return `H ${instruction.x}`;\n }\n if (instruction.type === 'h') {\n return `h ${instruction.dx}`;\n }\n if (instruction.type === 'V') {\n return `V ${instruction.y}`;\n }\n if (instruction.type === 'v') {\n return `v ${instruction.dy}`;\n }\n if (instruction.type === 'L') {\n return `L ${instruction.x} ${instruction.y}`;\n }\n if (instruction.type === 'l') {\n return `l ${instruction.dx} ${instruction.dy}`;\n }\n if (instruction.type === 'M') {\n return `M ${instruction.x} ${instruction.y}`;\n }\n if (instruction.type === 'm') {\n return `m ${instruction.dx} ${instruction.dy}`;\n }\n if (instruction.type === 'T') {\n return `T ${instruction.x} ${instruction.y}`;\n }\n if (instruction.type === 't') {\n return `t ${instruction.dx} ${instruction.dy}`;\n }\n // @ts-expect-error\n throw new Error(`Unknown instruction type: ${instruction.type}`);\n};\nconst serializeInstructions = (path) => {\n return path\n .map((p) => {\n return serializeInstruction(p);\n })\n .join(' ');\n};\nexports.serializeInstructions = serializeInstructions;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.normalizePath = exports.normalizeInstructions = void 0;\nconst parse_path_1 = require(\"./parse-path\");\nconst serialize_instructions_1 = require(\"./serialize-instructions\");\nconst normalizeInstructions = (instructions) => {\n // Extended properties must already be normalized\n const normalized = [];\n let x = 0;\n let y = 0;\n let moveX = 0;\n let moveY = 0;\n for (let i = 0; i < instructions.length; i++) {\n const instruction = instructions[i];\n if (instruction.type === 'M') {\n moveX = instruction.x;\n moveY = instruction.y;\n }\n else if (instruction.type === 'm') {\n moveX += instruction.dx;\n moveY += instruction.dy;\n }\n if (instruction.type === 'A' ||\n instruction.type === 'C' ||\n instruction.type === 'L' ||\n instruction.type === 'M' ||\n instruction.type === 'Q' ||\n instruction.type === 'S' ||\n instruction.type === 'T') {\n normalized.push(instruction);\n x = instruction.x;\n y = instruction.y;\n continue;\n }\n if (instruction.type === 'a' ||\n instruction.type === 'c' ||\n instruction.type === 'l' ||\n instruction.type === 'm' ||\n instruction.type === 'q' ||\n instruction.type === 's' ||\n instruction.type === 't') {\n const currentX = x;\n const currentY = y;\n x += instruction.dx;\n y += instruction.dy;\n if (instruction.type === 'a') {\n normalized.push({\n type: 'A',\n largeArcFlag: instruction.largeArcFlag,\n rx: instruction.rx,\n ry: instruction.ry,\n sweepFlag: instruction.sweepFlag,\n xAxisRotation: instruction.xAxisRotation,\n x,\n y,\n });\n continue;\n }\n if (instruction.type === 'c') {\n normalized.push({\n type: 'C',\n cp1x: instruction.cp1dx + currentX,\n cp1y: instruction.cp1dy + currentY,\n cp2x: instruction.cp2dx + currentX,\n cp2y: instruction.cp2dy + currentY,\n x,\n y,\n });\n continue;\n }\n if (instruction.type === 'l') {\n normalized.push({\n type: 'L',\n x,\n y,\n });\n continue;\n }\n if (instruction.type === 'm') {\n normalized.push({\n type: 'M',\n x,\n y,\n });\n continue;\n }\n if (instruction.type === 'q') {\n normalized.push({\n type: 'Q',\n cpx: instruction.cpdx + currentX,\n cpy: instruction.cpdy + currentY,\n x,\n y,\n });\n continue;\n }\n if (instruction.type === 's') {\n normalized.push({\n type: 'S',\n cpx: instruction.cpdx + currentX,\n cpy: instruction.cpdy + currentY,\n x,\n y,\n });\n continue;\n }\n if (instruction.type === 't') {\n normalized.push({\n type: 'T',\n x,\n y,\n });\n continue;\n }\n }\n if (instruction.type === 'H') {\n normalized.push(instruction);\n x = instruction.x;\n continue;\n }\n if (instruction.type === 'V') {\n normalized.push(instruction);\n y = instruction.y;\n continue;\n }\n if (instruction.type === 'Z') {\n normalized.push(instruction);\n x = moveX;\n y = moveY;\n continue;\n }\n if (instruction.type === 'h') {\n x += instruction.dx;\n normalized.push({\n type: 'H',\n x,\n });\n continue;\n }\n if (instruction.type === 'v') {\n y += instruction.dy;\n normalized.push({\n type: 'V',\n y,\n });\n continue;\n }\n // @ts-expect-error\n throw new Error('Unknown instruction type: ' + instruction.type);\n }\n return normalized;\n};\nexports.normalizeInstructions = normalizeInstructions;\n/**\n * @description Removes all relative coordinates from an SVG path and converts them into absolute coordinates.\n * @see [Documentation](https://remotion.dev/docs/paths/normalize-path)\n * @param {string} path A valid SVG path\n * @returns {string} A string representation of the SVG path with absolute coordinates.\n */\nconst normalizePath = (path) => {\n const instructions = (0, parse_path_1.parsePath)(path);\n const normalized = (0, exports.normalizeInstructions)(instructions);\n return (0, serialize_instructions_1.serializeInstructions)(normalized);\n};\nexports.normalizePath = normalizePath;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.reduceInstructions = void 0;\nconst remove_a_s_t_curves_1 = require(\"./helpers/remove-a-s-t-curves\");\nconst normalize_path_1 = require(\"./normalize-path\");\n/**\n * @description Takes an array of Instruction's and reduces the amount of instruction types them so the path only consists of M, L, C, Q and Z instructions.\n * @param {Array} instruction\n * @see [Documentation](https://www.remotion.dev/docs/paths/reduce-instructions)\n */\nconst reduceInstructions = (instruction) => {\n const simplified = (0, normalize_path_1.normalizeInstructions)(instruction);\n return (0, remove_a_s_t_curves_1.removeATSHVQInstructions)(simplified);\n};\nexports.reduceInstructions = reduceInstructions;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.cutPath = void 0;\nconst cut_instruction_1 = require(\"./cut-instruction\");\nconst reduced_analysis_1 = require(\"./helpers/reduced-analysis\");\nconst parse_path_1 = require(\"./parse-path\");\nconst reduce_instructions_1 = require(\"./reduce-instructions\");\nconst serialize_instructions_1 = require(\"./serialize-instructions\");\nconst cutPath = (d, length) => {\n const parsed = (0, parse_path_1.parsePath)(d);\n const reduced = (0, reduce_instructions_1.reduceInstructions)(parsed);\n const constructed = (0, reduced_analysis_1.conductAnalysis)(reduced);\n const newInstructions = [];\n let summedUpLength = 0;\n for (const segment of constructed) {\n for (const instructionAndInfo of segment.instructionsAndInfo) {\n if (summedUpLength + instructionAndInfo.length > length) {\n const remainingLength = length - summedUpLength;\n const progress = remainingLength / instructionAndInfo.length;\n // cut\n const cut = (0, cut_instruction_1.cutInstruction)({\n instruction: instructionAndInfo.instruction,\n lastPoint: instructionAndInfo.startPoint,\n progress,\n });\n newInstructions.push(cut);\n return (0, serialize_instructions_1.serializeInstructions)(newInstructions);\n }\n summedUpLength += instructionAndInfo.length;\n newInstructions.push(instructionAndInfo.instruction);\n if (summedUpLength === length) {\n return (0, serialize_instructions_1.serializeInstructions)(newInstructions);\n }\n }\n }\n return (0, serialize_instructions_1.serializeInstructions)(newInstructions);\n};\nexports.cutPath = cutPath;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.debugPath = void 0;\nconst normalize_path_1 = require(\"./normalize-path\");\nconst parse_path_1 = require(\"./parse-path\");\nconst serialize_instructions_1 = require(\"./serialize-instructions\");\nconst debugPath = (d) => {\n const instructions = (0, normalize_path_1.normalizeInstructions)((0, parse_path_1.parsePath)(d));\n return instructions\n .map((inst, i) => {\n if (inst.type === 'Z') {\n return null;\n }\n if (inst.type === 'H' || inst.type === 'V') {\n return null;\n }\n const topLeft = [inst.x - 5, inst.y - 5];\n const topRight = [inst.x + 5, inst.y - 5];\n const bottomLeft = [inst.x - 5, inst.y + 5];\n const bottomRight = [inst.x + 5, inst.y + 5];\n const triangle = [\n {\n type: 'M',\n x: topLeft[0],\n y: topLeft[1],\n },\n {\n type: 'L',\n x: topRight[0],\n y: topRight[1],\n },\n {\n type: 'L',\n x: bottomRight[0],\n y: bottomRight[1],\n },\n {\n type: 'L',\n x: bottomLeft[0],\n y: bottomLeft[1],\n },\n {\n type: 'Z',\n },\n ];\n return {\n d: (0, serialize_instructions_1.serializeInstructions)(triangle),\n color: i === instructions.length - 1\n ? 'red'\n : inst.type === 'M'\n ? 'blue'\n : 'green',\n };\n })\n .filter(Boolean);\n};\nexports.debugPath = debugPath;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getBoundingBox = exports.getBoundingBoxFromInstructions = void 0;\nconst remove_a_s_t_curves_1 = require(\"./helpers/remove-a-s-t-curves\");\nconst normalize_path_1 = require(\"./normalize-path\");\nconst parse_path_1 = require(\"./parse-path\");\n// Precision for consider cubic polynom as quadratic one\nconst CBEZIER_MINMAX_EPSILON = 0.00000001;\n// https://github.com/kpym/SVGPathy/blob/acd1a50c626b36d81969f6e98e8602e128ba4302/lib/box.js#L89\nfunction minmaxQ(A) {\n const min = Math.min(A[0], A[2]);\n const max = Math.max(A[0], A[2]);\n if (A[1] > A[0] ? A[2] >= A[1] : A[2] <= A[1]) {\n // if no extremum in ]0,1[\n return [min, max];\n }\n // check if the extremum E is min or max\n const E = (A[0] * A[2] - A[1] * A[1]) / (A[0] - 2 * A[1] + A[2]);\n return E < min ? [E, max] : [min, E];\n}\n// https://github.com/kpym/SVGPathy/blob/acd1a50c626b36d81969f6e98e8602e128ba4302/lib/box.js#L127\nfunction minmaxC(A) {\n const K = A[0] - 3 * A[1] + 3 * A[2] - A[3];\n // if the polynomial is (almost) quadratic and not cubic\n if (Math.abs(K) < CBEZIER_MINMAX_EPSILON) {\n if (A[0] === A[3] && A[0] === A[1]) {\n // no curve, point targeting same location\n return [A[0], A[3]];\n }\n return minmaxQ([\n A[0],\n -0.5 * A[0] + 1.5 * A[1],\n A[0] - 3 * A[1] + 3 * A[2],\n ]);\n }\n // the reduced discriminant of the derivative\n const T = -A[0] * A[2] +\n A[0] * A[3] -\n A[1] * A[2] -\n A[1] * A[3] +\n A[1] * A[1] +\n A[2] * A[2];\n // if the polynomial is monotone in [0,1]\n if (T <= 0) {\n return [Math.min(A[0], A[3]), Math.max(A[0], A[3])];\n }\n const S = Math.sqrt(T);\n // potential extrema\n let min = Math.min(A[0], A[3]);\n let max = Math.max(A[0], A[3]);\n const L = A[0] - 2 * A[1] + A[2];\n // check local extrema\n for (let R = (L + S) / K, i = 1; i <= 2; R = (L - S) / K, i++) {\n if (R > 0 && R < 1) {\n // if the extrema is for R in [0,1]\n const Q = A[0] * (1 - R) * (1 - R) * (1 - R) +\n A[1] * 3 * (1 - R) * (1 - R) * R +\n A[2] * 3 * (1 - R) * R * R +\n A[3] * R * R * R;\n if (Q < min) {\n min = Q;\n }\n if (Q > max) {\n max = Q;\n }\n }\n }\n return [min, max];\n}\nconst getBoundingBoxFromInstructions = (instructions) => {\n let minX = Infinity;\n let minY = Infinity;\n let maxX = -Infinity;\n let maxY = -Infinity;\n let x = 0;\n let y = 0;\n let lastMoveX = 0;\n let lastMoveY = 0;\n for (const seg of instructions) {\n switch (seg.type) {\n case 'M': {\n lastMoveX = seg.x;\n lastMoveY = seg.y;\n if (minX > seg.x) {\n minX = seg.x;\n }\n if (minY > seg.y) {\n minY = seg.y;\n }\n if (maxX < seg.x) {\n maxX = seg.x;\n }\n if (maxY < seg.y) {\n maxY = seg.y;\n }\n x = seg.x;\n y = seg.y;\n break;\n }\n case 'L': {\n if (minX > seg.x) {\n minX = seg.x;\n }\n if (minY > seg.y) {\n minY = seg.y;\n }\n if (maxX < seg.x) {\n maxX = seg.x;\n }\n if (maxY < seg.y) {\n maxY = seg.y;\n }\n x = seg.x;\n y = seg.y;\n break;\n }\n case 'C': {\n const cxMinMax = minmaxC([x, seg.cp1x, seg.cp2x, seg.x]);\n if (minX > cxMinMax[0]) {\n minX = cxMinMax[0];\n }\n if (maxX < cxMinMax[1]) {\n maxX = cxMinMax[1];\n }\n const cyMinMax = minmaxC([y, seg.cp1y, seg.cp2y, seg.y]);\n if (minY > cyMinMax[0]) {\n minY = cyMinMax[0];\n }\n if (maxY < cyMinMax[1]) {\n maxY = cyMinMax[1];\n }\n x = seg.x;\n y = seg.y;\n break;\n }\n case 'Z':\n x = lastMoveX;\n y = lastMoveY;\n break;\n default:\n // @ts-expect-error\n throw new Error(`Unknown instruction ${seg.type}`);\n }\n }\n return {\n x1: minX,\n y1: minY,\n x2: maxX,\n y2: maxY,\n viewBox: `${minX} ${minY} ${maxX - minX} ${maxY - minY}`,\n width: maxX - minX,\n height: maxY - minY,\n };\n};\nexports.getBoundingBoxFromInstructions = getBoundingBoxFromInstructions;\n/**\n * @description Returns the bounding box of the given path, suitable for calculating the viewBox value that you need to pass to an SVG.\n * @param {string} d\n * @see [Documentation](https://www.remotion.dev/docs/paths/get-bounding-box)\n */\nconst getBoundingBox = (d) => {\n const parsed = (0, parse_path_1.parsePath)(d);\n const unarced = (0, remove_a_s_t_curves_1.removeATSHVQInstructions)((0, normalize_path_1.normalizeInstructions)(parsed));\n return (0, exports.getBoundingBoxFromInstructions)(unarced);\n};\nexports.getBoundingBox = getBoundingBox;\n","\"use strict\";\n// Copied from: https://github.com/rveciana/svg-path-properties\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.makeArc = void 0;\nconst mod = (x, m) => {\n return ((x % m) + m) % m;\n};\nconst toRadians = (angle) => {\n return angle * (Math.PI / 180);\n};\nconst distance = (p0, p1) => {\n return Math.sqrt((p1.x - p0.x) ** 2 + (p1.y - p0.y) ** 2);\n};\nconst clamp = (val, min, max) => {\n return Math.min(Math.max(val, min), max);\n};\nconst angleBetween = (v0, v1) => {\n const p = v0.x * v1.x + v0.y * v1.y;\n const n = Math.sqrt((v0.x ** 2 + v0.y ** 2) * (v1.x ** 2 + v1.y ** 2));\n const sign = v0.x * v1.y - v0.y * v1.x < 0 ? -1 : 1;\n const angle = sign * Math.acos(p / n);\n return angle;\n};\nconst pointOnEllipticalArc = ({ p0, rx, ry, xAxisRotation, largeArcFlag, sweepFlag, p1, t, }) => {\n // In accordance to: http://www.w3.org/TR/SVG/implnote.html#ArcOutOfRangeParameters\n rx = Math.abs(rx);\n ry = Math.abs(ry);\n xAxisRotation = mod(xAxisRotation, 360);\n const xAxisRotationRadians = toRadians(xAxisRotation);\n // If the endpoints are identical, then this is equivalent to omitting the elliptical arc segment entirely.\n if (p0.x === p1.x && p0.y === p1.y) {\n return { x: p0.x, y: p0.y, ellipticalArcAngle: 0 }; // Check if angle is correct\n }\n // If rx = 0 or ry = 0 then this arc is treated as a straight line segment joining the endpoints.\n if (rx === 0 || ry === 0) {\n // return this.pointOnLine(p0, p1, t);\n return { x: 0, y: 0, ellipticalArcAngle: 0 }; // Check if angle is correct\n }\n // Following \"Conversion from endpoint to center parameterization\"\n // http://www.w3.org/TR/SVG/implnote.html#ArcConversionEndpointToCenter\n // Step #1: Compute transformedPoint\n const dx = (p0.x - p1.x) / 2;\n const dy = (p0.y - p1.y) / 2;\n const transformedPoint = {\n x: Math.cos(xAxisRotationRadians) * dx + Math.sin(xAxisRotationRadians) * dy,\n y: -Math.sin(xAxisRotationRadians) * dx +\n Math.cos(xAxisRotationRadians) * dy,\n };\n // Ensure radii are large enough\n const radiiCheck = transformedPoint.x ** 2 / rx ** 2 + transformedPoint.y ** 2 / ry ** 2;\n if (radiiCheck > 1) {\n rx *= Math.sqrt(radiiCheck);\n ry *= Math.sqrt(radiiCheck);\n }\n // Step #2: Compute transformedCenter\n const cSquareNumerator = rx ** 2 * ry ** 2 -\n rx ** 2 * transformedPoint.y ** 2 -\n ry ** 2 * transformedPoint.x ** 2;\n const cSquareRootDenom = rx ** 2 * transformedPoint.y ** 2 + ry ** 2 * transformedPoint.x ** 2;\n let cRadicand = cSquareNumerator / cSquareRootDenom;\n // Make sure this never drops below zero because of precision\n cRadicand = cRadicand < 0 ? 0 : cRadicand;\n const cCoef = (largeArcFlag === sweepFlag ? -1 : 1) * Math.sqrt(cRadicand);\n const transformedCenter = {\n x: cCoef * ((rx * transformedPoint.y) / ry),\n y: cCoef * (-(ry * transformedPoint.x) / rx),\n };\n // Step #3: Compute center\n const center = {\n x: Math.cos(xAxisRotationRadians) * transformedCenter.x -\n Math.sin(xAxisRotationRadians) * transformedCenter.y +\n (p0.x + p1.x) / 2,\n y: Math.sin(xAxisRotationRadians) * transformedCenter.x +\n Math.cos(xAxisRotationRadians) * transformedCenter.y +\n (p0.y + p1.y) / 2,\n };\n // Step #4: Compute start/sweep angles\n // Start angle of the elliptical arc prior to the stretch and rotate operations.\n // Difference between the start and end angles\n const startVector = {\n x: (transformedPoint.x - transformedCenter.x) / rx,\n y: (transformedPoint.y - transformedCenter.y) / ry,\n };\n const startAngle = angleBetween({\n x: 1,\n y: 0,\n }, startVector);\n const endVector = {\n x: (-transformedPoint.x - transformedCenter.x) / rx,\n y: (-transformedPoint.y - transformedCenter.y) / ry,\n };\n let sweepAngle = angleBetween(startVector, endVector);\n if (!sweepFlag && sweepAngle > 0) {\n sweepAngle -= 2 * Math.PI;\n }\n else if (sweepFlag && sweepAngle < 0) {\n sweepAngle += 2 * Math.PI;\n }\n // We use % instead of `mod(..)` because we want it to be -360deg to 360deg(but actually in radians)\n sweepAngle %= 2 * Math.PI;\n // From http://www.w3.org/TR/SVG/implnote.html#ArcParameterizationAlternatives\n const angle = startAngle + sweepAngle * t;\n const ellipseComponentX = rx * Math.cos(angle);\n const ellipseComponentY = ry * Math.sin(angle);\n const point = {\n x: Math.cos(xAxisRotationRadians) * ellipseComponentX -\n Math.sin(xAxisRotationRadians) * ellipseComponentY +\n center.x,\n y: Math.sin(xAxisRotationRadians) * ellipseComponentX +\n Math.cos(xAxisRotationRadians) * ellipseComponentY +\n center.y,\n ellipticalArcStartAngle: startAngle,\n ellipticalArcEndAngle: startAngle + sweepAngle,\n ellipticalArcAngle: angle,\n ellipticalArcCenter: center,\n resultantRx: rx,\n resultantRy: ry,\n };\n return point;\n};\nconst approximateArcLengthOfCurve = (resolution, pointOnCurveFunc) => {\n // Resolution is the number of segments we use\n resolution = resolution ? resolution : 500;\n let resultantArcLength = 0;\n const arcLengthMap = [];\n const approximationLines = [];\n let prevPoint = pointOnCurveFunc(0);\n let nextPoint;\n for (let i = 0; i < resolution; i++) {\n const t = clamp(i * (1 / resolution), 0, 1);\n nextPoint = pointOnCurveFunc(t);\n resultantArcLength += distance(prevPoint, nextPoint);\n approximationLines.push([prevPoint, nextPoint]);\n arcLengthMap.push({\n t,\n arcLength: resultantArcLength,\n });\n prevPoint = nextPoint;\n }\n // Last stretch to the endpoint\n nextPoint = pointOnCurveFunc(1);\n approximationLines.push([prevPoint, nextPoint]);\n resultantArcLength += distance(prevPoint, nextPoint);\n arcLengthMap.push({\n t: 1,\n arcLength: resultantArcLength,\n });\n return {\n arcLength: resultantArcLength,\n arcLengthMap,\n approximationLines,\n };\n};\nconst makeArc = ({ x0, y0, rx, ry, xAxisRotate, LargeArcFlag, SweepFlag, x1, y1, }) => {\n const lengthProperties = approximateArcLengthOfCurve(300, (t) => {\n return pointOnEllipticalArc({\n p0: { x: x0, y: y0 },\n rx,\n ry,\n xAxisRotation: xAxisRotate,\n largeArcFlag: LargeArcFlag,\n sweepFlag: SweepFlag,\n p1: { x: x1, y: y1 },\n t,\n });\n });\n const length = lengthProperties.arcLength;\n const getPointAtLength = (fractionLength) => {\n if (fractionLength < 0) {\n fractionLength = 0;\n }\n else if (fractionLength > length) {\n fractionLength = length;\n }\n const position = pointOnEllipticalArc({\n p0: { x: x0, y: y0 },\n rx,\n ry,\n xAxisRotation: xAxisRotate,\n largeArcFlag: LargeArcFlag,\n sweepFlag: SweepFlag,\n p1: { x: x1, y: y1 },\n t: fractionLength / length,\n });\n return { x: position.x, y: position.y };\n };\n return {\n getPointAtLength,\n getTangentAtLength: (fractionLength) => {\n if (fractionLength < 0) {\n fractionLength = 0;\n }\n else if (fractionLength > length) {\n fractionLength = length;\n }\n const point_dist = 0.05; // needs testing\n const p1 = getPointAtLength(fractionLength);\n let p2;\n if (fractionLength < 0) {\n fractionLength = 0;\n }\n else if (fractionLength > length) {\n fractionLength = length;\n }\n if (fractionLength < length - point_dist) {\n p2 = getPointAtLength(fractionLength + point_dist);\n }\n else {\n p2 = getPointAtLength(fractionLength - point_dist);\n }\n const xDist = p2.x - p1.x;\n const yDist = p2.y - p1.y;\n const dist = Math.sqrt(xDist * xDist + yDist * yDist);\n if (fractionLength < length - point_dist) {\n return { x: -xDist / dist, y: -yDist / dist };\n }\n return { x: xDist / dist, y: yDist / dist };\n },\n getTotalLength: () => {\n return length;\n },\n type: 'arc',\n };\n};\nexports.makeArc = makeArc;\n","\"use strict\";\n// Copied from: https://github.com/rveciana/svg-path-properties\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.construct = exports.constructFromInstructions = void 0;\nconst parse_path_1 = require(\"../parse-path\");\nconst arc_1 = require(\"./arc\");\nconst bezier_1 = require(\"./bezier\");\nconst linear_1 = require(\"./linear\");\nconst constructFromInstructions = (instructions) => {\n let totalLength = 0;\n const partialLengths = [];\n const functions = [];\n let initialPoint = null;\n let cur = [0, 0];\n let prev_point = [0, 0];\n let curve;\n let ringStart = [0, 0];\n const segments = [];\n for (let i = 0; i < instructions.length; i++) {\n const instruction = instructions[i];\n if (instruction.type !== 'm' &&\n instruction.type !== 'M' &&\n segments.length > 0) {\n segments[segments.length - 1].push(instruction);\n }\n // moveTo\n if (instruction.type === 'M') {\n cur = [instruction.x, instruction.y];\n ringStart = [cur[0], cur[1]];\n segments.push([instruction]);\n functions.push(null);\n if (i === 0) {\n initialPoint = { x: instruction.x, y: instruction.y };\n }\n }\n if (instruction.type === 'm') {\n cur = [instruction.dx + cur[0], instruction.dy + cur[1]];\n ringStart = [cur[0], cur[1]];\n segments.push([{ type: 'M', x: cur[0], y: cur[1] }]);\n functions.push(null);\n // lineTo\n }\n if (instruction.type === 'L') {\n totalLength += Math.sqrt((cur[0] - instruction.x) ** 2 + (cur[1] - instruction.y) ** 2);\n functions.push((0, linear_1.makeLinearPosition)({\n x0: cur[0],\n x1: instruction.x,\n y0: cur[1],\n y1: instruction.y,\n }));\n cur = [instruction.x, instruction.y];\n }\n if (instruction.type === 'l') {\n totalLength += Math.sqrt(instruction.dx ** 2 + instruction.dy ** 2);\n functions.push((0, linear_1.makeLinearPosition)({\n x0: cur[0],\n x1: instruction.dx + cur[0],\n y0: cur[1],\n y1: instruction.dy + cur[1],\n }));\n cur = [instruction.dx + cur[0], instruction.dy + cur[1]];\n }\n if (instruction.type === 'H') {\n totalLength += Math.abs(cur[0] - instruction.x);\n functions.push((0, linear_1.makeLinearPosition)({\n x0: cur[0],\n x1: instruction.x,\n y0: cur[1],\n y1: cur[1],\n }));\n cur[0] = instruction.x;\n }\n if (instruction.type === 'h') {\n totalLength += Math.abs(instruction.dx);\n functions.push((0, linear_1.makeLinearPosition)({\n x0: cur[0],\n x1: cur[0] + instruction.dx,\n y0: cur[1],\n y1: cur[1],\n }));\n cur[0] = instruction.dx + cur[0];\n }\n else if (instruction.type === 'V') {\n totalLength += Math.abs(cur[1] - instruction.y);\n functions.push((0, linear_1.makeLinearPosition)({\n x0: cur[0],\n x1: cur[0],\n y0: cur[1],\n y1: instruction.y,\n }));\n cur[1] = instruction.y;\n }\n if (instruction.type === 'v') {\n totalLength += Math.abs(instruction.dy);\n functions.push((0, linear_1.makeLinearPosition)({\n x0: cur[0],\n x1: cur[0],\n y0: cur[1],\n y1: cur[1] + instruction.dy,\n }));\n cur[1] = instruction.dy + cur[1];\n // Close path\n }\n else if (instruction.type === 'Z') {\n totalLength += Math.sqrt((ringStart[0] - cur[0]) ** 2 + (ringStart[1] - cur[1]) ** 2);\n functions.push((0, linear_1.makeLinearPosition)({\n x0: cur[0],\n x1: ringStart[0],\n y0: cur[1],\n y1: ringStart[1],\n }));\n cur = [ringStart[0], ringStart[1]];\n // Cubic Bezier curves\n }\n if (instruction.type === 'C') {\n curve = (0, bezier_1.makeCubic)({\n startX: cur[0],\n startY: cur[1],\n cp1x: instruction.cp1x,\n cp1y: instruction.cp1y,\n cp2x: instruction.cp2x,\n cp2y: instruction.cp2y,\n x: instruction.x,\n y: instruction.y,\n });\n totalLength += curve.getTotalLength();\n cur = [instruction.x, instruction.y];\n functions.push(curve);\n }\n else if (instruction.type === 'c') {\n curve = (0, bezier_1.makeCubic)({\n startX: cur[0],\n startY: cur[1],\n cp1x: cur[0] + instruction.cp1dx,\n cp1y: cur[1] + instruction.cp1dy,\n cp2x: cur[0] + instruction.cp2dx,\n cp2y: cur[1] + instruction.cp2dy,\n x: cur[0] + instruction.dx,\n y: cur[1] + instruction.dy,\n });\n if (curve.getTotalLength() > 0) {\n totalLength += curve.getTotalLength();\n functions.push(curve);\n cur = [instruction.dx + cur[0], instruction.dy + cur[1]];\n }\n else {\n functions.push((0, linear_1.makeLinearPosition)({ x0: cur[0], x1: cur[0], y0: cur[1], y1: cur[1] }));\n }\n }\n if (instruction.type === 'S') {\n const prev = instructions[i - 1];\n const prevWasCurve = prev.type === 'C' ||\n prev.type === 'c' ||\n prev.type === 'S' ||\n prev.type === 's';\n if (i > 0 && prevWasCurve) {\n if (curve) {\n const c = curve.getC();\n curve = (0, bezier_1.makeCubic)({\n startX: cur[0],\n startY: cur[1],\n cp1x: 2 * cur[0] - c.x,\n cp1y: 2 * cur[1] - c.y,\n cp2x: instruction.cpx,\n cp2y: instruction.cpy,\n x: instruction.x,\n y: instruction.y,\n });\n }\n }\n else {\n curve = (0, bezier_1.makeCubic)({\n startX: cur[0],\n startY: cur[1],\n cp1x: cur[0],\n cp1y: cur[1],\n cp2x: instruction.cpx,\n cp2y: instruction.cpy,\n x: instruction.x,\n y: instruction.y,\n });\n }\n if (curve) {\n totalLength += curve.getTotalLength();\n cur = [instruction.x, instruction.y];\n functions.push(curve);\n }\n }\n if (instruction.type === 's') {\n const prev = instructions[i - 1];\n const prevWasCurve = prev.type === 'C' ||\n prev.type === 'c' ||\n prev.type === 'S' ||\n prev.type === 's';\n if (i > 0 && prevWasCurve) {\n if (curve) {\n const c = curve.getC();\n const d = curve.getD();\n curve = (0, bezier_1.makeCubic)({\n startX: cur[0],\n startY: cur[1],\n cp1x: cur[0] + d.x - c.x,\n cp1y: cur[1] + d.y - c.y,\n cp2x: cur[0] + instruction.cpdx,\n cp2y: cur[1] + instruction.cpdy,\n x: cur[0] + instruction.dx,\n y: cur[1] + instruction.dy,\n });\n }\n }\n else {\n curve = (0, bezier_1.makeCubic)({\n startX: cur[0],\n startY: cur[1],\n cp1x: cur[0],\n cp1y: cur[1],\n cp2x: cur[0] + instruction.cpdx,\n cp2y: cur[1] + instruction.cpdy,\n x: cur[0] + instruction.dx,\n y: cur[1] + instruction.dy,\n });\n }\n if (curve) {\n totalLength += curve.getTotalLength();\n cur = [instruction.dx + cur[0], instruction.dy + cur[1]];\n functions.push(curve);\n }\n }\n // Quadratic Bezier curves\n if (instruction.type === 'Q') {\n if (cur[0] === instruction.cpx && cur[1] === instruction.cpy) {\n const linearCurve = (0, linear_1.makeLinearPosition)({\n x0: instruction.cpx,\n x1: instruction.x,\n y0: instruction.cpy,\n y1: instruction.y,\n });\n totalLength += linearCurve.getTotalLength();\n functions.push(linearCurve);\n }\n else {\n curve = (0, bezier_1.makeQuadratic)({\n startX: cur[0],\n startY: cur[1],\n cpx: instruction.cpx,\n cpy: instruction.cpy,\n x: instruction.x,\n y: instruction.y,\n });\n totalLength += curve.getTotalLength();\n functions.push(curve);\n }\n cur = [instruction.x, instruction.y];\n prev_point = [instruction.cpx, instruction.cpy];\n }\n if (instruction.type === 'q') {\n if (instruction.cpdx === 0 && instruction.cpdy === 0) {\n const linearCurve = (0, linear_1.makeLinearPosition)({\n x0: cur[0] + instruction.cpdx,\n x1: cur[0] + instruction.cpdy,\n y0: cur[1] + instruction.dx,\n y1: cur[1] + instruction.dy,\n });\n totalLength += linearCurve.getTotalLength();\n functions.push(linearCurve);\n }\n else {\n curve = (0, bezier_1.makeQuadratic)({\n startX: cur[0],\n startY: cur[1],\n cpx: cur[0] + instruction.cpdx,\n cpy: cur[1] + instruction.cpdy,\n x: cur[0] + instruction.dx,\n y: cur[1] + instruction.dy,\n });\n totalLength += curve.getTotalLength();\n functions.push(curve);\n }\n prev_point = [cur[0] + instruction.cpdx, cur[1] + instruction.cpdy];\n cur = [instruction.dx + cur[0], instruction.dy + cur[1]];\n }\n if (instruction.type === 'T') {\n const prev = instructions[i - 1];\n const prevWasQ = prev.type === 'Q' ||\n prev.type === 'q' ||\n prev.type === 'T' ||\n prev.type === 't';\n if (i > 0 && prevWasQ) {\n curve = (0, bezier_1.makeQuadratic)({\n startX: cur[0],\n startY: cur[1],\n cpx: 2 * cur[0] - prev_point[0],\n cpy: 2 * cur[1] - prev_point[1],\n x: instruction.x,\n y: instruction.y,\n });\n functions.push(curve);\n totalLength += curve.getTotalLength();\n }\n else {\n const linearCurve = (0, linear_1.makeLinearPosition)({\n x0: cur[0],\n x1: instruction.x,\n y0: cur[1],\n y1: instruction.y,\n });\n functions.push(linearCurve);\n totalLength += linearCurve.getTotalLength();\n }\n prev_point = [2 * cur[0] - prev_point[0], 2 * cur[1] - prev_point[1]];\n cur = [instruction.x, instruction.y];\n }\n if (instruction.type === 't') {\n const prev = instructions[i - 1];\n const prevWasQ = prev.type === 'Q' ||\n prev.type === 'q' ||\n prev.type === 'T' ||\n prev.type === 't';\n if (i > 0 && prevWasQ) {\n curve = (0, bezier_1.makeQuadratic)({\n startX: cur[0],\n startY: cur[1],\n cpx: 2 * cur[0] - prev_point[0],\n cpy: 2 * cur[1] - prev_point[1],\n x: cur[0] + instruction.dx,\n y: cur[1] + instruction.dy,\n });\n totalLength += curve.getTotalLength();\n functions.push(curve);\n }\n else {\n const linearCurve = (0, linear_1.makeLinearPosition)({\n x0: cur[0],\n x1: cur[0] + instruction.dx,\n y0: cur[1],\n y1: cur[1] + instruction.dy,\n });\n totalLength += linearCurve.getTotalLength();\n functions.push(linearCurve);\n }\n prev_point = [2 * cur[0] - prev_point[0], 2 * cur[1] - prev_point[1]];\n cur = [instruction.dx + cur[0], instruction.dy + cur[1]];\n }\n if (instruction.type === 'A') {\n const arcCurve = (0, arc_1.makeArc)({\n x0: cur[0],\n y0: cur[1],\n rx: instruction.rx,\n ry: instruction.ry,\n xAxisRotate: instruction.xAxisRotation,\n LargeArcFlag: instruction.largeArcFlag,\n SweepFlag: instruction.sweepFlag,\n x1: instruction.x,\n y1: instruction.y,\n });\n totalLength += arcCurve.getTotalLength();\n cur = [instruction.x, instruction.y];\n functions.push(arcCurve);\n }\n if (instruction.type === 'a') {\n const arcCurve = (0, arc_1.makeArc)({\n x0: cur[0],\n y0: cur[1],\n rx: instruction.rx,\n ry: instruction.ry,\n xAxisRotate: instruction.xAxisRotation,\n LargeArcFlag: instruction.largeArcFlag,\n SweepFlag: instruction.sweepFlag,\n x1: cur[0] + instruction.dx,\n y1: cur[1] + instruction.dy,\n });\n totalLength += arcCurve.getTotalLength();\n cur = [cur[0] + instruction.dx, cur[1] + instruction.dy];\n functions.push(arcCurve);\n }\n partialLengths.push(totalLength);\n }\n return {\n segments,\n initialPoint,\n totalLength,\n partialLengths,\n functions,\n };\n};\nexports.constructFromInstructions = constructFromInstructions;\nconst construct = (string) => {\n const parsed = (0, parse_path_1.parsePath)(string);\n return (0, exports.constructFromInstructions)(parsed);\n};\nexports.construct = construct;\n","\"use strict\";\n// Copied from: https://github.com/rveciana/svg-path-properties\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getLength = void 0;\nconst construct_1 = require(\"./helpers/construct\");\n/**\n * @description Gets the length of an SVG path.\n * @param {string} path A valid SVG path\n * @see [Documentation](https://remotion.dev/docs/paths/get-length)\n */\nconst getLength = (path) => {\n const constructucted = (0, construct_1.construct)(path);\n return constructucted.totalLength;\n};\nexports.getLength = getLength;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.evolvePath = void 0;\nconst get_length_1 = require(\"./get-length\");\n/**\n * @description Animates an SVG from being invisible to it's full length.\n * @param {string} path A valid SVG path\n * @param {number} progress The first valid SVG path\n * @see [Documentation](https://remotion.dev/docs/paths/evolve-path)\n */\nconst evolvePath = (progress, path) => {\n const length = (0, get_length_1.getLength)(path);\n if (progress === 0) {\n // Because Remotion has not the same rounding as the browser, the length may be a bit too short.\n // This causes a browser artifact https://github.com/remotion-dev/remotion/issues/3960\n // But any line inbetween length and length * 2 will be invisible.\n // So we just select the middle I guess!\n const extendedLength = length * 1.5;\n return {\n strokeDasharray: `${extendedLength} ${extendedLength}`,\n strokeDashoffset: extendedLength,\n };\n }\n const strokeDasharray = `${length} ${length}`;\n const strokeDashoffset = length - progress * length;\n return { strokeDasharray, strokeDashoffset };\n};\nexports.evolvePath = evolvePath;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.extendViewBox = void 0;\n/**\n * @description Extends a viewbox in all directions by a scale factor.\n * @param {string} currentViewBox A valid SVG viewBox\n * @see [Documentation](https://remotion.dev/docs/paths/extend-viewbox)\n */\nconst extendViewBox = (currentViewBox, scale) => {\n const relativeScale = scale - 1;\n const splitted = currentViewBox\n .split(' ')\n .map((a) => a.trim())\n .filter((a) => a !== '')\n .map(Number);\n if (splitted.length !== 4) {\n throw new Error(`currentViewBox must be 4 valid numbers, but got \"${currentViewBox}\"`);\n }\n for (const part of splitted) {\n if (Number.isNaN(part)) {\n throw new Error(`currentViewBox must be 4 valid numbers, but got \"${currentViewBox}\"`);\n }\n if (!Number.isFinite(part)) {\n throw new Error(`currentViewBox must be 4 valid numbers, but got \"${currentViewBox}\"`);\n }\n }\n const [x, y, width, height] = splitted;\n return [\n x - (relativeScale * width) / 2,\n y - (relativeScale * height) / 2,\n width + relativeScale * width,\n height + relativeScale * height,\n ].join(' ');\n};\nexports.extendViewBox = extendViewBox;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getInstructionIndexAtLength = exports.getInstructionIndexAtLengthFromConstructed = void 0;\nconst construct_1 = require(\"./helpers/construct\");\nconst getInstructionIndexAtLengthFromConstructed = (constructed, fractionLength) => {\n if (fractionLength < 0) {\n throw new Error('Length less than 0 was passed');\n }\n if (fractionLength > constructed.totalLength) {\n fractionLength = constructed.totalLength;\n }\n let index = constructed.partialLengths.length - 1;\n while (constructed.partialLengths[index] >= fractionLength && index > 0) {\n index--;\n }\n return {\n lengthIntoInstruction: fractionLength - constructed.partialLengths[index],\n index,\n };\n};\nexports.getInstructionIndexAtLengthFromConstructed = getInstructionIndexAtLengthFromConstructed;\n/**\n * @description Gets the index of the instruction and the part length into the instruction at a specified length along an SVG path.\n * @see [Documentation](https://remotion.dev/docs/paths/get-instruction-index-at-length)\n * @param path The SVG path data as a string.\n * @param length The length along the path at which to find the instruction index and the part length into the instruction.\n * @returns {InstructionAtLength} Object containing the index of the instruction and the part length into the instruction at the given length.\n * @throws {Error} If the given length is less than 0 or greater than the total length of the path, or if the path is invalid.\n */\nconst getInstructionIndexAtLength = (path, length) => {\n const constructed = (0, construct_1.construct)(path);\n if (length > constructed.totalLength) {\n throw new Error(`A length of ${length} was passed to getInstructionIndexAtLength() but the total length of the path is only ${constructed.totalLength}`);\n }\n return (0, exports.getInstructionIndexAtLengthFromConstructed)(constructed, length);\n};\nexports.getInstructionIndexAtLength = getInstructionIndexAtLength;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getPointAtLength = void 0;\nconst get_instruction_index_at_length_1 = require(\"./get-instruction-index-at-length\");\nconst construct_1 = require(\"./helpers/construct\");\n/**\n * @description Gets the coordinates of a point which is on an SVG path.\n * @param {string} path A valid SVG path\n * @param {number} length The length at which the point should be sampled\n * @see [Documentation](https://remotion.dev/docs/paths/get-point-at-length)\n */\nconst getPointAtLength = (path, length) => {\n const constructed = (0, construct_1.construct)(path);\n const fractionPart = (0, get_instruction_index_at_length_1.getInstructionIndexAtLengthFromConstructed)(constructed, length);\n const functionAtPart = constructed.functions[fractionPart.index + 1];\n if (functionAtPart) {\n return functionAtPart.getPointAtLength(fractionPart.lengthIntoInstruction);\n }\n if (constructed.initialPoint) {\n return constructed.initialPoint;\n }\n throw new Error('Wrong function at this part.');\n};\nexports.getPointAtLength = getPointAtLength;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getSubpaths = void 0;\nconst construct_1 = require(\"./helpers/construct\");\nconst parse_path_1 = require(\"./parse-path\");\nconst serialize_instructions_1 = require(\"./serialize-instructions\");\n/**\n * @description Splits a valid SVG path into it's parts.\n * @param {string} path A valid SVG path\n * @see [Documentation](https://remotion.dev/docs/paths/get-subpaths)\n */\nconst getSubpaths = (path) => {\n const parsed = (0, parse_path_1.parsePath)(path);\n const { segments } = (0, construct_1.constructFromInstructions)(parsed);\n return segments.map((seg) => {\n return (0, serialize_instructions_1.serializeInstructions)(seg);\n });\n};\nexports.getSubpaths = getSubpaths;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getTangentAtLength = void 0;\nconst get_instruction_index_at_length_1 = require(\"./get-instruction-index-at-length\");\nconst construct_1 = require(\"./helpers/construct\");\n/**\n * @description Gets tangent values x and y of a point which is on an SVG path\n * @param {string} path A valid SVG path\n * @param {number} length The length at which the tangent should be sampled\n * @see [Documentation](https://remotion.dev/docs/paths/get-tangent-at-length)\n */\nconst getTangentAtLength = (path, length) => {\n const constructed = (0, construct_1.construct)(path);\n const fractionPart = (0, get_instruction_index_at_length_1.getInstructionIndexAtLengthFromConstructed)(constructed, length);\n const functionAtPart = constructed.functions[fractionPart.index + 1];\n if (functionAtPart) {\n return functionAtPart.getTangentAtLength(fractionPart.lengthIntoInstruction);\n }\n if (constructed.initialPoint) {\n return { x: 0, y: 0 };\n }\n throw new Error('Wrong function at this part.');\n};\nexports.getTangentAtLength = getTangentAtLength;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getEndPosition = void 0;\nconst getEndPosition = (instructions) => {\n let x = 0;\n let y = 0;\n let moveX = 0;\n let moveY = 0;\n for (let i = 0; i < instructions.length; i++) {\n const instruction = instructions[i];\n if (instruction.type === 'M') {\n moveX = instruction.x;\n moveY = instruction.y;\n }\n else if (instruction.type === 'm') {\n moveX += instruction.dx;\n moveY += instruction.dy;\n }\n if (instruction.type === 'A' ||\n instruction.type === 'C' ||\n instruction.type === 'L' ||\n instruction.type === 'M' ||\n instruction.type === 'Q' ||\n instruction.type === 'S' ||\n instruction.type === 'T') {\n x = instruction.x;\n y = instruction.y;\n continue;\n }\n if (instruction.type === 'a' ||\n instruction.type === 'c' ||\n instruction.type === 'l' ||\n instruction.type === 'm' ||\n instruction.type === 'q' ||\n instruction.type === 's' ||\n instruction.type === 't') {\n x += instruction.dx;\n y += instruction.dy;\n continue;\n }\n if (instruction.type === 'H') {\n x = instruction.x;\n continue;\n }\n if (instruction.type === 'V') {\n y = instruction.y;\n continue;\n }\n if (instruction.type === 'Z') {\n x = moveX;\n y = moveY;\n continue;\n }\n if (instruction.type === 'h') {\n x += instruction.dx;\n continue;\n }\n if (instruction.type === 'v') {\n y += instruction.dy;\n continue;\n }\n // @ts-expect-error\n throw new Error('Unknown instruction type: ' + instruction.type);\n }\n return {\n x,\n y,\n };\n};\nexports.getEndPosition = getEndPosition;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.convertToSameInstructionType = convertToSameInstructionType;\nconst convertToLCommand = (command) => {\n if (command.type === 'M' || command.type === 'L' || command.type === 'Z') {\n throw new Error('unexpected');\n }\n return {\n type: 'L',\n x: command.x,\n y: command.y,\n };\n};\nconst convertToCCommand = (command, currentPoint) => {\n if (command.type === 'M' || command.type === 'C' || command.type === 'Z') {\n throw new Error('unexpected');\n }\n if (command.type === 'L') {\n return {\n type: 'C',\n cp1x: currentPoint.x,\n cp1y: currentPoint.y,\n cp2x: command.x,\n cp2y: command.y,\n x: command.x,\n y: command.y,\n };\n }\n throw new Error('all types should be handled');\n};\n/**\n * Converts command A to have the same type as command B.\n *\n * e.g., L0,5 -> C0,5,0,5,0,5\n *\n * Uses these rules:\n * x1 <- x\n * x2 <- x\n * y1 <- y\n * y2 <- y\n * rx <- 0\n * ry <- 0\n * xAxisRotation <- read from B\n * largeArcFlag <- read from B\n * sweepflag <- read from B\n *\n * @param {Object} aCommand Command object from path `d` attribute\n * @param {Object} bCommand Command object from path `d` attribute to match against\n * @return {Object} aCommand converted to type of bCommand\n */\nfunction convertToSameInstructionType(aCommand, bCommand, currentPoint) {\n if (aCommand.type === 'M' || bCommand.type === 'M') {\n return { ...aCommand };\n }\n if (aCommand.type === bCommand.type) {\n return { ...aCommand };\n }\n if (bCommand.type === 'C') {\n return convertToCCommand(aCommand, currentPoint);\n }\n if (bCommand.type === 'L') {\n return convertToLCommand(aCommand);\n }\n if (bCommand.type === 'Z') {\n return {\n type: 'Z',\n };\n }\n throw new TypeError('unhandled');\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.pointsToInstruction = pointsToInstruction;\nconst convert_q_to_c_instruction_1 = require(\"../helpers/convert-q-to-c-instruction\");\n/**\n * Convert segments represented as points back into a command object\n *\n * @param {Number[][]} points Array of [x,y] points: [start, control1, control2, ..., end]\n * Represents a segment\n * @return {Object} A command object representing the segment.\n */\nfunction pointsToInstruction(points) {\n const x = points[points.length - 1][0];\n const y = points[points.length - 1][1];\n if (points.length === 4) {\n const x1 = points[1][0];\n const y1 = points[1][1];\n const x2 = points[2][0];\n const y2 = points[2][1];\n return {\n type: 'C',\n cp1x: x1,\n cp1y: y1,\n cp2x: x2,\n cp2y: y2,\n x,\n y,\n };\n }\n if (points.length === 3) {\n const x1 = points[1][0];\n const y1 = points[1][1];\n return (0, convert_q_to_c_instruction_1.convertQToCInstruction)({\n type: 'Q',\n cpx: x1,\n cpy: y1,\n x,\n y,\n }, {\n x: points[0][0],\n y: points[0][1],\n });\n }\n return {\n type: 'L',\n x,\n y,\n };\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.decasteljau = decasteljau;\n/**\n * de Casteljau's algorithm for drawing and splitting bezier curves.\n * Inspired by https://pomax.github.io/bezierinfo/\n *\n * @param {Number[][]} points Array of [x,y] points: [start, control1, control2, ..., end]\n * The original segment to split.\n * @param {Number} t Where to split the curve (value between [0, 1])\n * @return {Object} An object { left, right } where left is the segment from 0..t and\n * right is the segment from t..1.\n */\nfunction decasteljau(points, t) {\n const left = [];\n const right = [];\n function decasteljauRecurse(_points, _t) {\n if (_points.length === 1) {\n left.push(_points[0]);\n right.push(_points[0]);\n }\n else {\n const newPoints = Array(_points.length - 1);\n for (let i = 0; i < newPoints.length; i++) {\n if (i === 0) {\n left.push(_points[0]);\n }\n if (i === newPoints.length - 1) {\n right.push(_points[i + 1]);\n }\n newPoints[i] = [\n (1 - _t) * _points[i][0] + _t * _points[i + 1][0],\n (1 - _t) * _points[i][1] + _t * _points[i + 1][1],\n ];\n }\n decasteljauRecurse(newPoints, _t);\n }\n }\n if (points.length) {\n decasteljauRecurse(points, t);\n }\n return { left, right: right.reverse() };\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.splitCurveAsPoints = splitCurveAsPoints;\nconst de_casteljau_1 = require(\"./de-casteljau\");\n/**\n * Runs de Casteljau's algorithm enough times to produce the desired number of segments.\n *\n * @param {Number[][]} points Array of [x,y] points for de Casteljau (the initial segment to split)\n * @param {Number} segmentCount Number of segments to split the original into\n * @return {Number[][][]} Array of segments\n */\nfunction splitCurveAsPoints(points, segmentCount = 2) {\n const segments = [];\n let remainingCurve = points;\n const tIncrement = 1 / segmentCount;\n // x-----x-----x-----x\n // t= 0.33 0.66 1\n // x-----o-----------x\n // r= 0.33\n // x-----o-----x\n // r= 0.5 (0.33 / (1 - 0.33)) === tIncrement / (1 - (tIncrement * (i - 1))\n // x-----x-----x-----x----x\n // t= 0.25 0.5 0.75 1\n // x-----o----------------x\n // r= 0.25\n // x-----o----------x\n // r= 0.33 (0.25 / (1 - 0.25))\n // x-----o----x\n // r= 0.5 (0.25 / (1 - 0.5))\n for (let i = 0; i < segmentCount - 1; i++) {\n const tRelative = tIncrement / (1 - tIncrement * i);\n const split = (0, de_casteljau_1.decasteljau)(remainingCurve, tRelative);\n segments.push(split.left);\n remainingCurve = split.right;\n }\n // last segment is just to the end from the last point\n segments.push(remainingCurve);\n return segments;\n}\n","\"use strict\";\n/*\n\nCopied and adapted from https://github.com/pbeshai/d3-interpolate-path:\nCopyright 2016, Peter Beshai\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without modification,\nare permitted provided that the following conditions are met:\n\n* Redistributions of source code must retain the above copyright notice, this\n list of conditions and the following disclaimer.\n\n* Redistributions in binary form must reproduce the above copyright notice,\n this list of conditions and the following disclaimer in the documentation\n and/or other materials provided with the distribution.\n\n* Neither the name of the author nor the names of contributors may be used to\n endorse or promote products derived from this software without specific prior\n written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\nANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\nWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR\nANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\nLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\nANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\nSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n*/\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.splitCurveInstructions = void 0;\nconst points_to_command_1 = require(\"./points-to-command\");\nconst split_curve_as_points_1 = require(\"./split-curve-as-points\");\n/**\n * Convert command objects to arrays of points, run de Casteljau's algorithm on it\n * to split into to the desired number of segments.\n *\n * @param {Object} commandStart The start command object\n * @param {Object} instructionEnd The end command object\n * @param {Number} segmentCount The number of segments to create\n * @return {Object[]} An array of commands representing the segments in sequence\n */\nconst splitCurveInstructions = (instructionStartX, instructionStartY, instructionEnd, segmentCount) => {\n const points = [[instructionStartX, instructionStartY]];\n if (instructionEnd.type === 'Q') {\n points.push([instructionEnd.cpx, instructionEnd.cpy]);\n }\n if (instructionEnd.type === 'C') {\n points.push([instructionEnd.cp1x, instructionEnd.cp1y]);\n points.push([instructionEnd.cp2x, instructionEnd.cp2y]);\n }\n points.push([instructionEnd.x, instructionEnd.y]);\n return (0, split_curve_as_points_1.splitCurveAsPoints)(points, segmentCount).map((p) => {\n return (0, points_to_command_1.pointsToInstruction)(p);\n });\n};\nexports.splitCurveInstructions = splitCurveInstructions;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.splitSegmentInstructions = splitSegmentInstructions;\nconst split_curve_1 = require(\"./split-curve\");\n/**\n * Interpolate between command objects commandStart and commandEnd segmentCount times.\n * If the types are L, Q, or C then the curves are split as per de Casteljau's algorithm.\n * Otherwise we just copy commandStart segmentCount - 1 times, finally ending with commandEnd.\n *\n * @param {Object} commandStart Command object at the beginning of the segment\n * @param {Object} commandEnd Command object at the end of the segment\n * @param {Number} segmentCount The number of segments to split this into. If only 1\n * Then [commandEnd] is returned.\n * @return {Object[]} Array of ~segmentCount command objects between commandStart and\n * commandEnd. (Can be segmentCount+1 objects if commandStart is type M).\n */\nfunction splitSegmentInstructions(commandStart, commandEnd, segmentCount) {\n let segments = [];\n // line, quadratic bezier, or cubic bezier\n if (commandEnd.type === 'L' || commandEnd.type === 'C') {\n if (commandStart.type !== 'Z') {\n segments = segments.concat((0, split_curve_1.splitCurveInstructions)(commandStart.x, commandStart.y, commandEnd, segmentCount));\n }\n // general case - just copy the same point\n }\n else {\n const copyCommand = commandStart.type === 'M'\n ? {\n type: 'L',\n x: commandStart.x,\n y: commandStart.y,\n }\n : commandStart;\n segments = segments.concat(new Array(segmentCount - 1).fill(true).map(() => copyCommand));\n segments.push(commandEnd);\n }\n return segments;\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.extendInstruction = extendInstruction;\nconst split_segment_1 = require(\"./split-segment\");\n/**\n * Extends an array of commandsToExtend to the length of the referenceCommands by\n * splitting segments until the number of commands match. Ensures all the actual\n * points of commandsToExtend are in the extended array.\n *\n * @param {Object[]} commandsToExtend The command object array to extend\n * @param {Object[]} referenceCommands The command object array to match in length\n * @return {Object[]} The extended commandsToExtend array\n */\nfunction extendInstruction(commandsToExtend, referenceCommands) {\n // compute insertion points:\n // number of segments in the path to extend\n const numSegmentsToExtend = commandsToExtend.length - 1;\n // number of segments in the reference path.\n const numReferenceSegments = referenceCommands.length - 1;\n // this value is always between [0, 1].\n const segmentRatio = numSegmentsToExtend / numReferenceSegments;\n // create a map, mapping segments in referenceCommands to how many points\n // should be added in that segment (should always be >= 1 since we need each\n // point itself).\n // 0 = segment 0-1, 1 = segment 1-2, n-1 = last vertex\n const countPointsPerSegment = new Array(numReferenceSegments)\n .fill(undefined)\n .reduce((accum, _d, i) => {\n const insertIndex = Math.floor(segmentRatio * i);\n accum[insertIndex] = (accum[insertIndex] || 0) + 1;\n return accum;\n }, []);\n // extend each segment to have the correct number of points for a smooth interpolation\n const extended = countPointsPerSegment.reduce((_extended, segmentCount, i) => {\n // if last command, just add `segmentCount` number of times\n if (i === commandsToExtend.length - 1) {\n const lastCommandCopies = new Array(segmentCount).fill({\n ...commandsToExtend[commandsToExtend.length - 1],\n });\n // convert M to L\n if (lastCommandCopies[0].type === 'M') {\n lastCommandCopies.forEach((d) => {\n d.type = 'L';\n });\n }\n return _extended.concat(lastCommandCopies);\n }\n // otherwise, split the segment segmentCount times.\n return _extended.concat((0, split_segment_1.splitSegmentInstructions)(commandsToExtend[i], commandsToExtend[i + 1], segmentCount));\n }, []);\n // add in the very first point since splitSegment only adds in the ones after it\n extended.unshift(commandsToExtend[0]);\n return extended;\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.interpolateInstructionOfSameKind = void 0;\nconst interpolateLInstruction = (t, first, second) => {\n return {\n type: 'L',\n x: (1 - t) * first.x + t * second.x,\n y: (1 - t) * first.y + t * second.y,\n };\n};\nconst interpolateCInstructions = (t, first, second) => {\n return {\n type: 'C',\n cp1x: (1 - t) * first.cp1x + t * second.cp1x,\n cp2x: (1 - t) * first.cp2x + t * second.cp2x,\n cp1y: (1 - t) * first.cp1y + t * second.cp1y,\n cp2y: (1 - t) * first.cp2y + t * second.cp2y,\n x: (1 - t) * first.x + t * second.x,\n y: (1 - t) * first.y + t * second.y,\n };\n};\nconst interpolateMInstructions = (t, first, second) => {\n return {\n type: 'M',\n x: (1 - t) * first.x + t * second.x,\n y: (1 - t) * first.y + t * second.y,\n };\n};\nconst interpolateInstructionOfSameKind = (t, first, second) => {\n if (first.type === 'L') {\n if (second.type !== 'L') {\n throw new Error('mismatch');\n }\n return interpolateLInstruction(t, first, second);\n }\n if (first.type === 'C') {\n if (second.type !== 'C') {\n throw new Error('mismatch');\n }\n return interpolateCInstructions(t, first, second);\n }\n if (first.type === 'M') {\n if (second.type !== 'M') {\n throw new Error('mismatch');\n }\n return interpolateMInstructions(t, first, second);\n }\n if (first.type === 'Z') {\n if (second.type !== 'Z') {\n throw new Error('mismatch');\n }\n return {\n type: 'Z',\n };\n }\n throw new Error('mismatch');\n};\nexports.interpolateInstructionOfSameKind = interpolateInstructionOfSameKind;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.interpolateInstructions = interpolateInstructions;\nconst get_end_position_1 = require(\"../get-end-position\");\nconst convert_to_same_instruction_type_1 = require(\"./convert-to-same-instruction-type\");\nconst extend_command_1 = require(\"./extend-command\");\nconst interpolate_instruction_of_same_kind_1 = require(\"./interpolate-instruction-of-same-kind\");\n/**\n * Interpolate from A to B by extending A and B during interpolation to have\n * the same number of points. This allows for a smooth transition when they\n * have a different number of points.\n *\n * Ignores the `Z` command in paths unless both A and B end with it.\n *\n * This function works directly with arrays of command objects instead of with\n * path `d` strings (see interpolatePath for working with `d` strings).\n *\n * @param {Object[]} aCommandsInput Array of path commands\n * @param {Object[]} bCommandsInput Array of path commands\n * @returns {Function} Interpolation function that maps t ([0, 1]) to an array of path commands.\n */\nfunction interpolateInstructions(aCommandsInput, bCommandsInput) {\n // make a copy so we don't mess with the input arrays\n let aCommands = aCommandsInput.slice();\n let bCommands = bCommandsInput.slice();\n // both input sets are empty, so we don't interpolate\n if (!aCommands.length && !bCommands.length) {\n return function () {\n return [];\n };\n }\n // do we add Z during interpolation? yes if both have it. (we'd expect both to have it or not)\n const addZ = (aCommands.length === 0 || aCommands[aCommands.length - 1].type === 'Z') &&\n (bCommands.length === 0 || bCommands[bCommands.length - 1].type === 'Z');\n // we temporarily remove Z\n if (aCommands.length > 0 && aCommands[aCommands.length - 1].type === 'Z') {\n aCommands.pop();\n }\n if (bCommands.length > 0 && bCommands[bCommands.length - 1].type === 'Z') {\n bCommands.pop();\n }\n // if A is empty, treat it as if it used to contain just the first point\n // of B. This makes it so the line extends out of from that first point.\n if (!aCommands.length) {\n aCommands.push(bCommands[0]);\n // otherwise if B is empty, treat it as if it contains the first point\n // of A. This makes it so the line retracts into the first point.\n }\n else if (!bCommands.length) {\n bCommands.push(aCommands[0]);\n }\n // extend to match equal size\n const numPointsToExtend = Math.abs(bCommands.length - aCommands.length);\n if (numPointsToExtend !== 0) {\n // B has more points than A, so add points to A before interpolating\n if (bCommands.length > aCommands.length) {\n aCommands = (0, extend_command_1.extendInstruction)(aCommands, bCommands);\n // else if A has more points than B, add more points to B\n }\n else if (bCommands.length < aCommands.length) {\n bCommands = (0, extend_command_1.extendInstruction)(bCommands, aCommands);\n }\n }\n // commands have same length now.\n // convert commands in A to the same type as those in B\n const aSameType = aCommands.map((aCommand, i) => {\n const commandsUntilNow = aCommands.slice(0, i);\n const point = (0, get_end_position_1.getEndPosition)(commandsUntilNow);\n return (0, convert_to_same_instruction_type_1.convertToSameInstructionType)(aCommand, bCommands[i], point);\n });\n const interpolatedCommands = [];\n if (addZ) {\n aSameType.push({ type: 'Z' }); // required for when returning at t == 0\n bCommands.push({ type: 'Z' });\n }\n return function (t) {\n // at 1 return the final value without the extensions used during interpolation\n if (t === 1) {\n return bCommandsInput;\n }\n // work with aCommands directly since interpolatedCommands are mutated\n if (t === 0) {\n return aSameType;\n }\n // interpolate the commands using the mutable interpolated command objs\n for (let i = 0; i < aSameType.length; ++i) {\n interpolatedCommands.push((0, interpolate_instruction_of_same_kind_1.interpolateInstructionOfSameKind)(t, aSameType[i], bCommands[i]));\n }\n return interpolatedCommands;\n };\n}\n","\"use strict\";\n/*\n\nCopied and adapted from https://github.com/pbeshai/d3-interpolate-path:\nCopyright 2016, Peter Beshai\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without modification,\nare permitted provided that the following conditions are met:\n\n* Redistributions of source code must retain the above copyright notice, this\n list of conditions and the following disclaimer.\n\n* Redistributions in binary form must reproduce the above copyright notice,\n this list of conditions and the following disclaimer in the documentation\n and/or other materials provided with the distribution.\n\n* Neither the name of the author nor the names of contributors may be used to\n endorse or promote products derived from this software without specific prior\n written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\nANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\nWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR\nANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\nLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\nANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\nSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n*/\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.interpolatePath = void 0;\nconst parse_path_1 = require(\"../parse-path\");\nconst reduce_instructions_1 = require(\"../reduce-instructions\");\nconst serialize_instructions_1 = require(\"../serialize-instructions\");\nconst interpolate_instructions_1 = require(\"./interpolate-instructions\");\n/**\n * @description Interpolates between two SVG paths.\n * @param {number} value A number - 0 means first path, 1 means second path, any other values will be interpolated\n * @param {string} firstPath The first valid SVG path\n * @param {string} secondPath The second valid SVG path\n * @see [Documentation](https://remotion.dev/docs/paths/interpolate-path)\n */\nconst interpolatePath = (value, firstPath, secondPath) => {\n // at 1 return the final value without the extensions used during interpolation\n if (value === 1) {\n return secondPath;\n }\n if (value === 0) {\n return firstPath;\n }\n const aCommands = (0, reduce_instructions_1.reduceInstructions)((0, parse_path_1.parsePath)(firstPath));\n if (aCommands.length === 0) {\n throw new TypeError(`SVG Path \"${firstPath}\" is not valid`);\n }\n const bCommands = (0, reduce_instructions_1.reduceInstructions)((0, parse_path_1.parsePath)(secondPath));\n if (bCommands.length === 0) {\n throw new TypeError(`SVG Path \"${secondPath}\" is not valid`);\n }\n const commandInterpolator = (0, interpolate_instructions_1.interpolateInstructions)(aCommands, bCommands);\n return (0, serialize_instructions_1.serializeInstructions)(commandInterpolator(value));\n};\nexports.interpolatePath = interpolatePath;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.translatePath = exports.translateSegments = void 0;\nconst parse_path_1 = require(\"./parse-path\");\nconst serialize_instructions_1 = require(\"./serialize-instructions\");\nconst translateSegments = (segments, x, y) => {\n return segments.map((segment) => {\n // Shift coords only for commands with absolute values\n if (segment.type === 'a' ||\n segment.type === 'c' ||\n segment.type === 'v' ||\n segment.type === 's' ||\n segment.type === 'h' ||\n segment.type === 'l' ||\n segment.type === 'm' ||\n segment.type === 'q' ||\n segment.type === 't') {\n return segment;\n }\n // V is the only command, with shifted coords parity\n if (segment.type === 'V') {\n return {\n type: 'V',\n y: segment.y + y,\n };\n }\n if (segment.type === 'H') {\n return {\n type: 'H',\n x: segment.x + x,\n };\n }\n // ARC is: ['A', rx, ry, x-axis-rotation, large-arc-flag, sweep-flag, x, y]\n // touch x, y only\n if (segment.type === 'A') {\n return {\n type: 'A',\n rx: segment.rx,\n ry: segment.ry,\n largeArcFlag: segment.largeArcFlag,\n sweepFlag: segment.sweepFlag,\n xAxisRotation: segment.xAxisRotation,\n x: segment.x + x,\n y: segment.y + y,\n };\n }\n if (segment.type === 'Z') {\n return segment;\n }\n if (segment.type === 'C') {\n return {\n type: 'C',\n cp1x: segment.cp1x + x,\n cp1y: segment.cp1y + y,\n cp2x: segment.cp2x + x,\n cp2y: segment.cp2y + y,\n x: segment.x + x,\n y: segment.y + y,\n };\n }\n if (segment.type === 'Q') {\n return {\n type: 'Q',\n cpx: segment.cpx + x,\n cpy: segment.cpy + y,\n x: segment.x + x,\n y: segment.y + y,\n };\n }\n if (segment.type === 'S') {\n return {\n type: 'S',\n cpx: segment.cpx + x,\n cpy: segment.cpy + y,\n x: segment.x + x,\n y: segment.y + y,\n };\n }\n if (segment.type === 'T') {\n return {\n type: 'T',\n x: segment.x + x,\n y: segment.y + y,\n };\n }\n if (segment.type === 'L') {\n return {\n type: 'L',\n x: segment.x + x,\n y: segment.y + y,\n };\n }\n if (segment.type === 'M') {\n return {\n type: 'M',\n x: segment.x + x,\n y: segment.y + y,\n };\n }\n // @ts-expect-error\n throw new Error(`Unknown segment type: ${segment.type}`);\n });\n};\nexports.translateSegments = translateSegments;\n/**\n * @description Translates the path by the given x and y coordinates.\n * @param {string} path the originalSVG path\n * @param {Number} x the amount of horizontal translation\n * @param {Number} y the amount of vertical translation\n * @returns a new string containing a path, if it is valid\n * @see [Documentation](https://www.remotion.dev/docs/paths/translate-path)\n */\nconst translatePath = (path, x, y) => {\n return (0, serialize_instructions_1.serializeInstructions)((0, exports.translateSegments)((0, parse_path_1.parsePath)(path), x, y));\n};\nexports.translatePath = translatePath;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.resetPath = void 0;\nconst get_bounding_box_1 = require(\"./get-bounding-box\");\nconst translate_path_1 = require(\"./translate-path\");\n/**\n * @description Translates an SVG path so that the top-left corner of the bounding box is at 0, 0.\n * @param {string} d a valid SVG path\n * @see [Documentation](https://www.remotion.dev/docs/paths/reset-path)\n */\nconst resetPath = (d) => {\n const box = (0, get_bounding_box_1.getBoundingBox)(d);\n return (0, translate_path_1.translatePath)(d, -box.x1, -box.y1);\n};\nexports.resetPath = resetPath;\n","\"use strict\";\n/**\n * https://github.com/Pomax/svg-path-reverse\n *\n * This code is in the public domain, except in jurisdictions that do\n * not recognise the public domain, where this code is MIT licensed.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.reversePath = void 0;\nconst construct_1 = require(\"./helpers/construct\");\nconst normalize_path_1 = require(\"./normalize-path\");\nconst parse_path_1 = require(\"./parse-path\");\nconst reduce_instructions_1 = require(\"./reduce-instructions\");\nconst serialize_instructions_1 = require(\"./serialize-instructions\");\nfunction reverseNormalizedPath(instructions) {\n const reversed = [];\n let nextX = 0;\n let nextY = 0;\n for (const term of instructions) {\n if (term.type === 'A') {\n reversed.unshift({\n type: 'A',\n largeArcFlag: term.largeArcFlag,\n rx: term.rx,\n ry: term.ry,\n xAxisRotation: term.xAxisRotation,\n sweepFlag: !term.sweepFlag,\n x: nextX,\n y: nextY,\n });\n }\n else if (term.type === 'C') {\n reversed.unshift({\n type: 'C',\n cp1x: term.cp2x,\n cp1y: term.cp2y,\n cp2x: term.cp1x,\n cp2y: term.cp1y,\n x: nextX,\n y: nextY,\n });\n }\n else if (term.type === 'Q') {\n reversed.unshift({\n type: 'Q',\n cpx: term.cpx,\n cpy: term.cpy,\n x: nextX,\n y: nextY,\n });\n }\n else if (term.type === 'L') {\n reversed.unshift({\n type: 'L',\n x: nextX,\n y: nextY,\n });\n // Do nothing\n }\n else if (term.type === 'M') {\n // Do nothing\n }\n else if (term.type === 'Z') {\n // Do nothing\n }\n else {\n throw new Error('unnormalized instruction ' + term.type);\n }\n if (term.type !== 'Z') {\n nextX = term.x;\n nextY = term.y;\n }\n }\n reversed.unshift({\n type: 'M',\n x: nextX,\n y: nextY,\n });\n let revstring = (0, serialize_instructions_1.serializeInstructions)(reversed);\n if (instructions[instructions.length - 1].type === 'Z')\n revstring += 'Z';\n revstring = revstring.replace(/M M/g, 'Z M');\n return revstring;\n}\n/**\n * @description Reverses a path so the end and start are switched.\n * @param {string} path A valid SVG path\n * @see [Documentation](https://remotion.dev/docs/paths/reverse-path)\n */\nconst reversePath = (path) => {\n const parsed = (0, parse_path_1.parsePath)(path);\n const normalized = (0, normalize_path_1.normalizeInstructions)(parsed);\n const reduced = (0, reduce_instructions_1.reduceInstructions)(normalized);\n const { segments } = (0, construct_1.constructFromInstructions)(reduced);\n return segments\n .map((spath) => {\n return reverseNormalizedPath(spath);\n })\n .join(' ')\n .replace(/ +/g, ' ')\n .trim();\n};\nexports.reversePath = reversePath;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.scalePath = void 0;\nconst get_bounding_box_1 = require(\"./get-bounding-box\");\nconst parse_path_1 = require(\"./parse-path\");\nconst reduce_instructions_1 = require(\"./reduce-instructions\");\nconst serialize_instructions_1 = require(\"./serialize-instructions\");\nconst translate_path_1 = require(\"./translate-path\");\n/**\n * @description Allows you to grow or shrink the size of a path.\n * @param {string} path A valid SVG path\n * @param {string} d\n * @param {Number} scaleX\n * @param {Number} scaleY\n * @returns a new path with respect to the scale values provided\n * @see [Documentation](https://www.remotion.dev/docs/paths/scale-path)\n */\nconst scalePath = (d, scaleX, scaleY) => {\n const reduced = (0, reduce_instructions_1.reduceInstructions)((0, parse_path_1.parsePath)(d));\n const bounded = (0, get_bounding_box_1.getBoundingBoxFromInstructions)(reduced);\n const zeroed = (0, translate_path_1.translateSegments)(reduced, -bounded.x1, -bounded.y1);\n const mapped = zeroed.map((instruction) => {\n if (instruction.type === 'L') {\n return {\n type: 'L',\n x: scaleX * instruction.x,\n y: scaleY * instruction.y,\n };\n }\n if (instruction.type === 'C') {\n return {\n type: 'C',\n x: scaleX * instruction.x,\n y: scaleY * instruction.y,\n cp1x: scaleX * instruction.cp1x,\n cp1y: scaleY * instruction.cp1y,\n cp2x: scaleX * instruction.cp2x,\n cp2y: scaleY * instruction.cp2y,\n };\n }\n if (instruction.type === 'M') {\n return {\n type: 'M',\n x: scaleX * instruction.x,\n y: scaleY * instruction.y,\n };\n }\n if (instruction.type === 'Q') {\n return {\n type: 'Q',\n x: scaleX * instruction.x,\n y: scaleY * instruction.y,\n cpx: scaleX * instruction.cpx,\n cpy: scaleY * instruction.cpy,\n };\n }\n if (instruction.type === 'Z') {\n return {\n type: 'Z',\n };\n }\n if (instruction.type === 'A') {\n return {\n type: 'A',\n largeArcFlag: instruction.largeArcFlag,\n rx: scaleX * instruction.rx,\n ry: scaleY * instruction.ry,\n sweepFlag: instruction.sweepFlag,\n xAxisRotation: instruction.xAxisRotation,\n x: scaleX * instruction.x,\n y: scaleY * instruction.y,\n };\n }\n if (instruction.type === 'H') {\n return {\n type: 'H',\n x: scaleX * instruction.x,\n };\n }\n if (instruction.type === 'S') {\n return {\n type: 'S',\n cpx: scaleX * instruction.cpx,\n cpy: scaleY * instruction.cpy,\n x: scaleX * instruction.x,\n y: scaleY * instruction.y,\n };\n }\n if (instruction.type === 'T') {\n return {\n type: 'T',\n x: scaleX * instruction.x,\n y: scaleY * instruction.y,\n };\n }\n if (instruction.type === 'V') {\n return {\n type: 'V',\n y: scaleY * instruction.y,\n };\n }\n if (instruction.type === 'a') {\n return {\n type: 'a',\n dx: scaleX * instruction.dx,\n dy: scaleY * instruction.dy,\n largeArcFlag: instruction.largeArcFlag,\n rx: scaleX * instruction.rx,\n ry: scaleY * instruction.ry,\n sweepFlag: instruction.sweepFlag,\n xAxisRotation: instruction.xAxisRotation,\n };\n }\n if (instruction.type === 'c') {\n return {\n type: 'c',\n cp1dx: scaleX * instruction.cp1dx,\n cp1dy: scaleY * instruction.cp1dy,\n cp2dx: scaleX * instruction.cp2dx,\n cp2dy: scaleY * instruction.cp2dy,\n dx: scaleX * instruction.dx,\n dy: scaleY * instruction.dy,\n };\n }\n if (instruction.type === 'h') {\n return {\n type: 'h',\n dx: scaleX * instruction.dx,\n };\n }\n if (instruction.type === 'l') {\n return {\n type: 'l',\n dx: scaleX * instruction.dx,\n dy: scaleY * instruction.dy,\n };\n }\n if (instruction.type === 'm') {\n return {\n type: 'm',\n dx: scaleX * instruction.dx,\n dy: scaleY * instruction.dy,\n };\n }\n if (instruction.type === 'q') {\n return {\n type: 'q',\n cpdx: scaleX * instruction.cpdx,\n cpdy: scaleY * instruction.cpdy,\n dx: scaleX * instruction.dx,\n dy: scaleY * instruction.dy,\n };\n }\n if (instruction.type === 's') {\n return {\n type: 's',\n cpdx: scaleX * instruction.cpdx,\n cpdy: scaleY * instruction.cpdy,\n dx: scaleX * instruction.dx,\n dy: scaleY * instruction.dy,\n };\n }\n if (instruction.type === 't') {\n return {\n type: 't',\n dx: scaleX * instruction.dx,\n dy: scaleY * instruction.dy,\n };\n }\n if (instruction.type === 'v') {\n return {\n type: 'v',\n dy: scaleY * instruction.dy,\n };\n }\n throw new Error('unexpected function');\n });\n return (0, serialize_instructions_1.serializeInstructions)((0, translate_path_1.translateSegments)(mapped, bounded.x1, bounded.y1));\n};\nexports.scalePath = scalePath;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.fixZInstruction = exports.warpTransform = void 0;\nexports.svgPathInterpolate = svgPathInterpolate;\nconst convert_q_to_c_instruction_1 = require(\"../helpers/convert-q-to-c-instruction\");\nconst euclideanDistance = (points) => {\n const startPoint = points[0];\n const endPoint = points[points.length - 1];\n let d2 = 0;\n for (let i = 0; i < startPoint.length; i++) {\n const d = endPoint[i] - startPoint[i];\n d2 += d ** 2;\n }\n return Math.sqrt(d2);\n};\nfunction split(p, t = 0.5) {\n const seg0 = [];\n const seg1 = [];\n const orders = [p];\n while (orders.length < p.length) {\n const q = orders[orders.length - 1];\n const r = [];\n for (let i = 1; i < q.length; i++) {\n const q0 = q[i - 1];\n const q1 = q[i];\n const s = [];\n const dim = Math.max(q0.length, q1.length);\n for (let j = 0; j < dim; j++) {\n const s0 = q0[j] || 0;\n const s1 = q1[j] || 0;\n s.push(s0 + (s1 - s0) * t);\n }\n r.push(s);\n }\n orders.push(r);\n }\n for (let i = 0; i < orders.length; i++) {\n seg0.push(orders[i][0]);\n seg1.push(orders[orders.length - 1 - i][i]);\n }\n return [seg0, seg1];\n}\nfunction interpolateUntil(points, threshold, deltaFunction = euclideanDistance) {\n const stack = [points];\n const segments = [];\n while (stack.length > 0) {\n const currentPoints = stack.pop();\n if (deltaFunction(currentPoints) > threshold) {\n const newPoints = split(currentPoints);\n // Add new segments backwards so they end up in correct order\n for (let i = newPoints.length - 1; i >= 0; i--) {\n stack.push(newPoints[i]);\n }\n }\n else {\n segments.push(currentPoints);\n }\n }\n return segments;\n}\nfunction createLineSegment(points) {\n switch (points.length) {\n case 2:\n return {\n type: 'L',\n x: points[1][0],\n y: points[1][1],\n };\n case 3:\n return (0, convert_q_to_c_instruction_1.convertQToCInstruction)({\n type: 'Q',\n cpx: points[1][0],\n cpy: points[1][1],\n x: points[2][0],\n y: points[2][1],\n }, {\n x: points[0][0],\n y: points[0][1],\n });\n case 4:\n return {\n type: 'C',\n cp1x: points[1][0],\n cp1y: points[1][1],\n cp2x: points[2][0],\n cp2y: points[2][1],\n x: points[3][0],\n y: points[3][1],\n };\n default:\n throw new Error('Expected 2, 3 or 4 points for a line segment, got ' + points.length);\n }\n}\nfunction warpInterpolate(path, threshold, deltaFunction) {\n let prexX = 0;\n let prexY = 0;\n return path\n .map((segment) => {\n const points = [[prexX, prexY]];\n if (segment.type !== 'Z') {\n prexX = segment.x;\n prexY = segment.y;\n }\n if (segment.type === 'C') {\n points.push([segment.cp1x, segment.cp1y]);\n points.push([segment.cp2x, segment.cp2y]);\n points.push([segment.x, segment.y]);\n }\n if (segment.type === 'L') {\n points.push([segment.x, segment.y]);\n }\n if (segment.type === 'C' || segment.type === 'L') {\n return interpolateUntil(points, threshold, deltaFunction).map((rawSegment) => createLineSegment(rawSegment));\n }\n return [segment];\n })\n .flat(1);\n}\nfunction svgPathInterpolate(path, threshold) {\n let didWork = false;\n const deltaFunction = (points) => {\n const linearPoints = [\n points[0].slice(0, 2),\n points[points.length - 1].slice(0, 2),\n ];\n const delta = euclideanDistance(linearPoints);\n didWork = didWork || delta > threshold;\n return delta;\n };\n return warpInterpolate(path, threshold, deltaFunction);\n}\nconst warpTransform = (path, transformer) => {\n return path\n .map((segment) => {\n if (segment.type === 'L') {\n const { x, y } = transformer({ x: segment.x, y: segment.y });\n return [\n {\n type: 'L',\n x,\n y,\n },\n ];\n }\n if (segment.type === 'C') {\n const { x, y } = transformer({ x: segment.x, y: segment.y });\n const { x: cp1x, y: cp1y } = transformer({\n x: segment.cp1x,\n y: segment.cp1y,\n });\n const { x: cp2x, y: cp2y } = transformer({\n x: segment.cp2x,\n y: segment.cp2y,\n });\n return [\n {\n type: 'C',\n x,\n y,\n cp1x,\n cp1y,\n cp2x,\n cp2y,\n },\n ];\n }\n if (segment.type === 'M') {\n const { x, y } = transformer({ x: segment.x, y: segment.y });\n return [\n {\n type: 'M',\n x,\n y,\n },\n ];\n }\n return [segment];\n })\n .flat(1);\n};\nexports.warpTransform = warpTransform;\n// Add a line from second to last point to last point and then keep Z so it can be transformed as well\nconst fixZInstruction = (instructions) => {\n let prevX = 0;\n let prevY = 0;\n return instructions\n .map((instruction) => {\n if (instruction.type === 'Z') {\n return [\n {\n type: 'L',\n x: prevX,\n y: prevY,\n },\n {\n type: 'Z',\n },\n ];\n }\n if (instruction.type === 'M') {\n prevX = instruction.x;\n prevY = instruction.y;\n }\n return [instruction];\n })\n .flat(1);\n};\nexports.fixZInstruction = fixZInstruction;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.warpPath = void 0;\nconst get_bounding_box_1 = require(\"../get-bounding-box\");\nconst parse_path_1 = require(\"../parse-path\");\nconst reduce_instructions_1 = require(\"../reduce-instructions\");\nconst serialize_instructions_1 = require(\"../serialize-instructions\");\nconst warp_helpers_1 = require(\"./warp-helpers\");\nconst getDefaultInterpolationThreshold = (instructions) => {\n const boundingBox = (0, get_bounding_box_1.getBoundingBoxFromInstructions)(instructions);\n const longer = Math.max(boundingBox.y2 - boundingBox.y1, boundingBox.x2 - boundingBox.x1);\n return longer * 0.01;\n};\n/**\n * @description This function works by splitting SVG instructions into many smaller SVG instructions and then remapping the coordinates of each instruction.\n * @param {string} path an SVG path string\n * @see [Documentation](https://www.remotion.dev/docs/paths/warp-path)\n */\nconst warpPath = (path, transformer, options) => {\n var _a;\n const reduced = (0, reduce_instructions_1.reduceInstructions)((0, parse_path_1.parsePath)(path));\n const withZFix = (0, warp_helpers_1.fixZInstruction)(reduced);\n const interpolated = (0, warp_helpers_1.svgPathInterpolate)(withZFix, (_a = options === null || options === void 0 ? void 0 : options.interpolationThreshold) !== null && _a !== void 0 ? _a : getDefaultInterpolationThreshold(withZFix));\n return (0, serialize_instructions_1.serializeInstructions)((0, warp_helpers_1.warpTransform)(interpolated, transformer));\n};\nexports.warpPath = warpPath;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.PathInternals = exports.warpPath = exports.translatePath = exports.serializeInstructions = exports.scalePath = exports.reversePath = exports.resetPath = exports.reduceInstructions = exports.parsePath = exports.normalizePath = exports.interpolatePath = exports.getTangentAtLength = exports.getSubpaths = exports.getPointAtLength = exports.getLength = exports.getInstructionIndexAtLength = exports.getBoundingBox = exports.extendViewBox = exports.evolvePath = void 0;\nconst cut_path_1 = require(\"./cut-path\");\nconst debug_path_1 = require(\"./debug-path\");\nconst get_bounding_box_1 = require(\"./get-bounding-box\");\nvar evolve_path_1 = require(\"./evolve-path\");\nObject.defineProperty(exports, \"evolvePath\", { enumerable: true, get: function () { return evolve_path_1.evolvePath; } });\nvar extend_viewbox_1 = require(\"./extend-viewbox\");\nObject.defineProperty(exports, \"extendViewBox\", { enumerable: true, get: function () { return extend_viewbox_1.extendViewBox; } });\nvar get_bounding_box_2 = require(\"./get-bounding-box\");\nObject.defineProperty(exports, \"getBoundingBox\", { enumerable: true, get: function () { return get_bounding_box_2.getBoundingBox; } });\nvar get_instruction_index_at_length_1 = require(\"./get-instruction-index-at-length\");\nObject.defineProperty(exports, \"getInstructionIndexAtLength\", { enumerable: true, get: function () { return get_instruction_index_at_length_1.getInstructionIndexAtLength; } });\nvar get_length_1 = require(\"./get-length\");\nObject.defineProperty(exports, \"getLength\", { enumerable: true, get: function () { return get_length_1.getLength; } });\nvar get_point_at_length_1 = require(\"./get-point-at-length\");\nObject.defineProperty(exports, \"getPointAtLength\", { enumerable: true, get: function () { return get_point_at_length_1.getPointAtLength; } });\nvar get_subpaths_1 = require(\"./get-subpaths\");\nObject.defineProperty(exports, \"getSubpaths\", { enumerable: true, get: function () { return get_subpaths_1.getSubpaths; } });\nvar get_tangent_at_length_1 = require(\"./get-tangent-at-length\");\nObject.defineProperty(exports, \"getTangentAtLength\", { enumerable: true, get: function () { return get_tangent_at_length_1.getTangentAtLength; } });\nvar interpolate_path_1 = require(\"./interpolate-path/interpolate-path\");\nObject.defineProperty(exports, \"interpolatePath\", { enumerable: true, get: function () { return interpolate_path_1.interpolatePath; } });\nvar normalize_path_1 = require(\"./normalize-path\");\nObject.defineProperty(exports, \"normalizePath\", { enumerable: true, get: function () { return normalize_path_1.normalizePath; } });\nvar parse_path_1 = require(\"./parse-path\");\nObject.defineProperty(exports, \"parsePath\", { enumerable: true, get: function () { return parse_path_1.parsePath; } });\nvar reduce_instructions_1 = require(\"./reduce-instructions\");\nObject.defineProperty(exports, \"reduceInstructions\", { enumerable: true, get: function () { return reduce_instructions_1.reduceInstructions; } });\nvar reset_path_1 = require(\"./reset-path\");\nObject.defineProperty(exports, \"resetPath\", { enumerable: true, get: function () { return reset_path_1.resetPath; } });\nvar reverse_path_1 = require(\"./reverse-path\");\nObject.defineProperty(exports, \"reversePath\", { enumerable: true, get: function () { return reverse_path_1.reversePath; } });\nvar scale_path_1 = require(\"./scale-path\");\nObject.defineProperty(exports, \"scalePath\", { enumerable: true, get: function () { return scale_path_1.scalePath; } });\nvar serialize_instructions_1 = require(\"./serialize-instructions\");\nObject.defineProperty(exports, \"serializeInstructions\", { enumerable: true, get: function () { return serialize_instructions_1.serializeInstructions; } });\nvar translate_path_1 = require(\"./translate-path\");\nObject.defineProperty(exports, \"translatePath\", { enumerable: true, get: function () { return translate_path_1.translatePath; } });\nvar warp_path_1 = require(\"./warp-path\");\nObject.defineProperty(exports, \"warpPath\", { enumerable: true, get: function () { return warp_path_1.warpPath; } });\nexports.PathInternals = {\n getBoundingBoxFromInstructions: get_bounding_box_1.getBoundingBoxFromInstructions,\n debugPath: debug_path_1.debugPath,\n cutPath: cut_path_1.cutPath,\n};\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.makeCircle = void 0;\nconst paths_1 = require(\"@remotion/paths\");\n/**\n * @description Generates a circle SVG path.\n * @param {Number} radius The radius of the circle.\n * @see [Documentation](https://www.remotion.dev/docs/shapes/make-circle)\n */\nconst makeCircle = ({ radius }) => {\n const instructions = [\n {\n type: 'M',\n x: radius,\n y: 0,\n },\n {\n type: 'a',\n rx: radius,\n ry: radius,\n xAxisRotation: 0,\n largeArcFlag: true,\n sweepFlag: true,\n dx: 0,\n dy: radius * 2,\n },\n {\n type: 'a',\n rx: radius,\n ry: radius,\n xAxisRotation: 0,\n largeArcFlag: true,\n sweepFlag: true,\n dx: 0,\n dy: -radius * 2,\n },\n {\n type: 'Z',\n },\n ];\n const path = (0, paths_1.serializeInstructions)(instructions);\n return {\n height: radius * 2,\n width: radius * 2,\n path,\n instructions,\n transformOrigin: `${radius} ${radius}`,\n };\n};\nexports.makeCircle = makeCircle;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.doesReactSupportTransformOriginProperty = void 0;\nconst doesReactSupportTransformOriginProperty = (version) => {\n if (version.includes('canary') || version.includes('experimental')) {\n const last8Chars = parseInt(version.slice(-8), 10);\n return last8Chars > 20230209;\n }\n const [major] = version.split('.').map(Number);\n return major > 18;\n};\nexports.doesReactSupportTransformOriginProperty = doesReactSupportTransformOriginProperty;\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.RenderSvg = void 0;\nconst jsx_runtime_1 = require(\"react/jsx-runtime\");\nconst react_1 = __importStar(require(\"react\"));\nconst react_dom_1 = require(\"react-dom\");\nconst does_react_support_canary_1 = require(\"../utils/does-react-support-canary\");\nconst RenderSvg = ({ width, height, path, style, pathStyle, transformOrigin, debug, instructions, ...props }) => {\n const actualStyle = (0, react_1.useMemo)(() => {\n return {\n overflow: 'visible',\n ...(style !== null && style !== void 0 ? style : {}),\n };\n }, [style]);\n const actualPathStyle = (0, react_1.useMemo)(() => {\n return {\n transformBox: 'fill-box',\n ...(pathStyle !== null && pathStyle !== void 0 ? pathStyle : {}),\n };\n }, [pathStyle]);\n const reactSupportsTransformOrigin = (0, does_react_support_canary_1.doesReactSupportTransformOriginProperty)(react_dom_1.version);\n return ((0, jsx_runtime_1.jsxs)(\"svg\", { width: width, height: height, viewBox: `0 0 ${width} ${height}`, xmlns: \"http://www.w3.org/2000/svg\", style: actualStyle, children: [(0, jsx_runtime_1.jsx)(\"path\", { ...(reactSupportsTransformOrigin\n ? {\n transformOrigin,\n }\n : {\n 'transform-origin': transformOrigin,\n }), d: path, style: actualPathStyle, ...props }), debug\n ? instructions.map((i, index) => {\n if (i.type === 'C') {\n const prevInstruction = index === 0\n ? instructions[instructions.length - 1]\n : instructions[index - 1];\n if (prevInstruction.type === 'V' ||\n prevInstruction.type === 'H' ||\n prevInstruction.type === 'a' ||\n prevInstruction.type === 'Z' ||\n prevInstruction.type === 't' ||\n prevInstruction.type === 'q' ||\n prevInstruction.type === 'l' ||\n prevInstruction.type === 'c' ||\n prevInstruction.type === 'm' ||\n prevInstruction.type === 'h' ||\n prevInstruction.type === 's' ||\n prevInstruction.type === 'v') {\n return null;\n }\n const prevX = prevInstruction.x;\n const prevY = prevInstruction.y;\n return (\n // eslint-disable-next-line react/no-array-index-key\n (0, jsx_runtime_1.jsxs)(react_1.default.Fragment, { children: [(0, jsx_runtime_1.jsx)(\"path\", { d: `M ${prevX} ${prevY} ${i.cp1x} ${i.cp1y}`, strokeWidth: 2, stroke: \"rgba(0, 0, 0, 0.4)\" }), (0, jsx_runtime_1.jsx)(\"path\", { d: `M ${i.x} ${i.y} ${i.cp2x} ${i.cp2y}`, strokeWidth: 2, stroke: \"rgba(0, 0, 0, 0.4)\" }), (0, jsx_runtime_1.jsx)(\"circle\", { cx: i.cp1x, cy: i.cp1y, r: 3, fill: \"white\", strokeWidth: 2, stroke: \"black\" }), (0, jsx_runtime_1.jsx)(\"circle\", { cx: i.cp2x, cy: i.cp2y, r: 3, strokeWidth: 2, fill: \"white\", stroke: \"black\" })] }, index));\n }\n return null;\n })\n : null] }));\n};\nexports.RenderSvg = RenderSvg;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Circle = void 0;\nconst jsx_runtime_1 = require(\"react/jsx-runtime\");\nconst make_circle_1 = require(\"../utils/make-circle\");\nconst render_svg_1 = require(\"./render-svg\");\n/**\n * @description Renders an SVG element drawing a circle.\n * @param {Number} radius The radius of the circle.\n * @see [Documentation](https://www.remotion.dev/docs/shapes/circle)\n */\nconst Circle = ({ radius, ...props }) => {\n return (0, jsx_runtime_1.jsx)(render_svg_1.RenderSvg, { ...(0, make_circle_1.makeCircle)({ radius }), ...props });\n};\nexports.Circle = Circle;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.makeEllipse = void 0;\nconst paths_1 = require(\"@remotion/paths\");\n/**\n * @description Generates an ellipse SVG path.\n * @param {Number} rx The radius of the ellipse on the X axis.\n * @param {Number} ry The radius of the ellipse on the Y axis.\n * @see [Documentation](https://www.remotion.dev/docs/shapes/make-ellipse)\n */\nconst makeEllipse = ({ rx, ry }) => {\n const instructions = [\n {\n type: 'M',\n x: rx,\n y: 0,\n },\n {\n type: 'a',\n rx,\n ry,\n xAxisRotation: 0,\n largeArcFlag: true,\n sweepFlag: false,\n dx: 1,\n dy: 0,\n },\n {\n type: 'Z',\n },\n ];\n const path = (0, paths_1.serializeInstructions)(instructions);\n return {\n width: rx * 2,\n height: ry * 2,\n path,\n instructions,\n transformOrigin: `${rx} ${ry}`,\n };\n};\nexports.makeEllipse = makeEllipse;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Ellipse = void 0;\nconst jsx_runtime_1 = require(\"react/jsx-runtime\");\nconst make_ellipse_1 = require(\"../utils/make-ellipse\");\nconst render_svg_1 = require(\"./render-svg\");\n/**\n * @description Renders an SVG element drawing an ellipse.\n * @param {Number} rx The radius of the ellipse on the X axis.\n * @param {Number} ry The radius of the ellipse on the Y axis.\n * @see [Documentation](https://www.remotion.dev/docs/shapes/ellipse)\n */\nconst Ellipse = ({ rx, ry, ...props }) => {\n return (0, jsx_runtime_1.jsx)(render_svg_1.RenderSvg, { ...(0, make_ellipse_1.makeEllipse)({ rx, ry }), ...props });\n};\nexports.Ellipse = Ellipse;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.makePie = void 0;\nconst paths_1 = require(\"@remotion/paths\");\nconst getCoord = ({ counterClockwise, actualProgress, rotation, radius, coord, }) => {\n const factor = counterClockwise ? -1 : 1;\n const val = Math[coord === 'x' ? 'cos' : 'sin'](factor * actualProgress * Math.PI * 2 + Math.PI * 1.5 + rotation) *\n radius +\n radius;\n const rounded = Math.round(val * 100000) / 100000;\n return rounded;\n};\n/**\n * @description Generates a piece of pie SVG path.\n * @param {Number} radius The radius of the circle..\n * @param {Number} progress The percentage of the circle that is filled. 0 means fully empty, 1 means fully filled.\n * @param {Boolean} closePath If set to false, no path to the middle of the circle will be drawn, leading to an open arc. Default true.\n * @param {Boolean} counterClockwise If set, the circle gets filled counterclockwise instead of clockwise. Default false.\n * @param {Boolean} rotation Add rotation to the path. 0 means no rotation, Math.PI * 2 means 1 full clockwise rotation\n * @see [Documentation](https://www.remotion.dev/docs/shapes/make-pie)\n */\nconst makePie = ({ progress, radius, closePath = true, counterClockwise = false, rotation = 0, }) => {\n const actualProgress = Math.min(Math.max(progress, 0), 1);\n const endAngleX = getCoord({\n actualProgress,\n coord: 'x',\n counterClockwise,\n radius,\n rotation,\n });\n const endAngleY = getCoord({\n actualProgress,\n coord: 'y',\n counterClockwise,\n radius,\n rotation,\n });\n const start = {\n x: getCoord({\n actualProgress: 0,\n coord: 'x',\n counterClockwise,\n radius,\n rotation,\n }),\n y: getCoord({\n actualProgress: 0,\n coord: 'y',\n counterClockwise,\n radius,\n rotation,\n }),\n };\n const end = { x: endAngleX, y: endAngleY };\n const instructions = [\n {\n type: 'M',\n ...start,\n },\n {\n type: 'A',\n rx: radius,\n ry: radius,\n xAxisRotation: 0,\n largeArcFlag: false,\n sweepFlag: !counterClockwise,\n x: actualProgress <= 0.5\n ? endAngleX\n : getCoord({\n actualProgress: 0.5,\n coord: 'x',\n counterClockwise,\n radius,\n rotation,\n }),\n y: actualProgress <= 0.5\n ? endAngleY\n : getCoord({\n actualProgress: 0.5,\n coord: 'y',\n counterClockwise,\n radius,\n rotation,\n }),\n },\n actualProgress > 0.5\n ? {\n type: 'A',\n rx: radius,\n ry: radius,\n xAxisRotation: 0,\n largeArcFlag: false,\n sweepFlag: !counterClockwise,\n ...end,\n }\n : null,\n actualProgress > 0 && actualProgress < 1 && closePath\n ? {\n type: 'L',\n x: radius,\n y: radius,\n }\n : null,\n closePath\n ? {\n type: 'Z',\n }\n : null,\n ].filter(Boolean);\n const path = (0, paths_1.serializeInstructions)(instructions);\n return {\n height: radius * 2,\n width: radius * 2,\n path,\n instructions,\n transformOrigin: `${radius} ${radius}`,\n };\n};\nexports.makePie = makePie;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Pie = void 0;\nconst jsx_runtime_1 = require(\"react/jsx-runtime\");\nconst make_pie_1 = require(\"../utils/make-pie\");\nconst render_svg_1 = require(\"./render-svg\");\n/**\n * @description Renders an SVG element drawing a pie piece.\n * @param {Number} radius The radius of the circle..\n * @param {Number} progress The percentage of the circle that is filled. 0 means fully empty, 1 means fully filled.\n * @param {Boolean} closePath If set to false, no path to the middle of the circle will be drawn, leading to an open arc. Default true.\n * @param {Boolean} counterClockwise If set, the circle gets filled counterclockwise instead of clockwise. Default false.\n * @param {Boolean} rotation Add rotation to the path. 0 means no rotation, Math.PI * 2 means 1 full clockwise rotation\n * @see [Documentation](https://www.remotion.dev/docs/shapes/pie)\n */\nconst Pie = ({ radius, progress, closePath, counterClockwise, rotation, ...props }) => {\n return ((0, jsx_runtime_1.jsx)(render_svg_1.RenderSvg, { ...(0, make_pie_1.makePie)({ radius, progress, closePath, counterClockwise, rotation }), ...props }));\n};\nexports.Pie = Pie;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.joinPoints = void 0;\nconst shortenVector = (vector, radius) => {\n const [x, y] = vector;\n const currentLength = Math.sqrt(x * x + y * y);\n const scalingFactor = (currentLength - radius) / currentLength;\n return [x * scalingFactor, y * scalingFactor];\n};\nconst scaleVectorToLength = (vector, length) => {\n const [x, y] = vector;\n const currentLength = Math.sqrt(x * x + y * y);\n const scalingFactor = length / currentLength;\n return [x * scalingFactor, y * scalingFactor];\n};\nconst joinPoints = (points, { edgeRoundness, cornerRadius, roundCornerStrategy, }) => {\n return points\n .map(([x, y], i) => {\n const prevPointIndex = i === 0 ? points.length - 2 : i - 1;\n const prevPoint = points[prevPointIndex];\n const nextPointIndex = i === points.length - 1 ? 1 : i + 1;\n const nextPoint = points[nextPointIndex];\n const middleOfLine = [(x + nextPoint[0]) / 2, (y + nextPoint[1]) / 2];\n const prevPointMiddleOfLine = [\n (x + prevPoint[0]) / 2,\n (y + prevPoint[1]) / 2,\n ];\n const prevVector = [x - prevPoint[0], y - prevPoint[1]];\n const nextVector = [nextPoint[0] - x, nextPoint[1] - y];\n if (i === 0) {\n if (edgeRoundness !== null) {\n return [\n {\n type: 'M',\n x: middleOfLine[0],\n y: middleOfLine[1],\n },\n ];\n }\n if (cornerRadius !== 0) {\n const computeRadius = shortenVector(nextVector, cornerRadius);\n return [\n {\n type: 'M',\n x: computeRadius[0] + x,\n y: computeRadius[1] + y,\n },\n ];\n }\n return [\n {\n type: 'M',\n x,\n y,\n },\n ];\n }\n if (cornerRadius && edgeRoundness !== null) {\n throw new Error(`\"cornerRadius\" and \"edgeRoundness\" cannot be specified at the same time.`);\n }\n if (edgeRoundness === null) {\n if (cornerRadius === 0) {\n return [\n {\n type: 'L',\n x,\n y,\n },\n ];\n }\n const prevVectorMinusRadius = shortenVector(prevVector, cornerRadius);\n const prevVectorLength = scaleVectorToLength(prevVector, cornerRadius);\n const nextVectorMinusRadius = scaleVectorToLength(nextVector, cornerRadius);\n const firstDraw = [\n prevPoint[0] + prevVectorMinusRadius[0],\n prevPoint[1] + prevVectorMinusRadius[1],\n ];\n return [\n {\n type: 'L',\n x: firstDraw[0],\n y: firstDraw[1],\n },\n roundCornerStrategy === 'arc'\n ? {\n type: 'a',\n rx: cornerRadius,\n ry: cornerRadius,\n xAxisRotation: 0,\n dx: prevVectorLength[0] + nextVectorMinusRadius[0],\n dy: prevVectorLength[1] + nextVectorMinusRadius[1],\n largeArcFlag: false,\n sweepFlag: true,\n }\n : {\n type: 'C',\n x: firstDraw[0] + prevVectorLength[0] + nextVectorMinusRadius[0],\n y: firstDraw[1] + prevVectorLength[1] + nextVectorMinusRadius[1],\n cp1x: x,\n cp1y: y,\n cp2x: x,\n cp2y: y,\n },\n ];\n }\n const controlPoint1 = [\n prevPointMiddleOfLine[0] + prevVector[0] * edgeRoundness * 0.5,\n prevPointMiddleOfLine[1] + prevVector[1] * edgeRoundness * 0.5,\n ];\n const controlPoint2 = [\n middleOfLine[0] - nextVector[0] * edgeRoundness * 0.5,\n middleOfLine[1] - nextVector[1] * edgeRoundness * 0.5,\n ];\n return [\n {\n type: 'C',\n cp1x: controlPoint1[0],\n cp1y: controlPoint1[1],\n cp2x: controlPoint2[0],\n cp2y: controlPoint2[1],\n x: middleOfLine[0],\n y: middleOfLine[1],\n },\n ];\n })\n .flat(1);\n};\nexports.joinPoints = joinPoints;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.makePolygon = void 0;\nconst paths_1 = require(\"@remotion/paths\");\nconst join_points_1 = require(\"./join-points\");\nfunction polygon({ points, radius, centerX, centerY, cornerRadius, edgeRoundness, }) {\n const degreeIncrement = (Math.PI * 2) / points;\n const d = new Array(points).fill(0).map((_, i) => {\n const angle = degreeIncrement * i - Math.PI / 2;\n const point = {\n x: centerX + radius * Math.cos(angle),\n y: centerY + radius * Math.sin(angle),\n };\n return [point.x, point.y];\n });\n return (0, join_points_1.joinPoints)([...d, d[0]], {\n edgeRoundness,\n cornerRadius,\n roundCornerStrategy: cornerRadius > 0 ? 'bezier' : 'arc',\n });\n}\nconst makePolygon = ({ points, radius, cornerRadius = 0, edgeRoundness = null, }) => {\n if (points < 3) {\n throw new Error(`\"points\" should be minimum 3, got ${points}`);\n }\n const width = 2 * radius;\n const height = 2 * radius;\n const centerX = width / 2;\n const centerY = height / 2;\n const polygonPathInstructions = polygon({\n points,\n radius,\n centerX,\n centerY,\n cornerRadius,\n edgeRoundness,\n });\n const reduced = (0, paths_1.reduceInstructions)(polygonPathInstructions);\n const path = (0, paths_1.resetPath)((0, paths_1.serializeInstructions)(reduced));\n const boundingBox = paths_1.PathInternals.getBoundingBoxFromInstructions(reduced);\n return {\n path,\n width: boundingBox.width,\n height: boundingBox.height,\n transformOrigin: `${centerX} ${centerY}`,\n instructions: polygonPathInstructions,\n };\n};\nexports.makePolygon = makePolygon;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Polygon = void 0;\nconst jsx_runtime_1 = require(\"react/jsx-runtime\");\nconst make_polygon_1 = require(\"../utils/make-polygon\");\nconst render_svg_1 = require(\"./render-svg\");\nconst Polygon = ({ points, radius, cornerRadius, edgeRoundness, ...props }) => {\n return ((0, jsx_runtime_1.jsx)(render_svg_1.RenderSvg, { ...(0, make_polygon_1.makePolygon)({\n points,\n cornerRadius,\n edgeRoundness,\n radius,\n }), ...props }));\n};\nexports.Polygon = Polygon;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.makeRect = void 0;\nconst paths_1 = require(\"@remotion/paths\");\nconst join_points_1 = require(\"./join-points\");\n/**\n * @description Generates an SVG rectangle.\n * @param {Number} width The width of the rectangle.\n * @param {Number} height The height of the rectangle\n * @param {Number | null} edgeRoundness Allows to modify the shape by rounding the edges using bezier curves. Default null.\n * @param {Number} cornerRadius * @param {Number} cornerRadius Rounds the corner using an arc. Similar to CSS's border-radius. Cannot be used together with edgeRoundness.\n * @see [Documentation](https://www.remotion.dev/docs/shapes/make-rect)\n */\nconst makeRect = ({ width, height, edgeRoundness = null, cornerRadius = 0, }) => {\n const transformOrigin = [width / 2, height / 2];\n const instructions = [\n ...(0, join_points_1.joinPoints)([\n [cornerRadius, 0],\n [width, 0],\n [width, height],\n [0, height],\n [0, 0],\n ], { edgeRoundness, cornerRadius, roundCornerStrategy: 'arc' }),\n {\n type: 'Z',\n },\n ];\n const path = (0, paths_1.serializeInstructions)(instructions);\n return {\n width,\n height,\n instructions,\n path,\n transformOrigin: transformOrigin.join(' '),\n };\n};\nexports.makeRect = makeRect;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Rect = void 0;\nconst jsx_runtime_1 = require(\"react/jsx-runtime\");\nconst make_rect_1 = require(\"../utils/make-rect\");\nconst render_svg_1 = require(\"./render-svg\");\n/**\n * @description Renders an SVG element containing a rectangle.\n * @param {Number} width The width of the Rectangle\n * @param {Number} height The height of the Rectangle\n * @param {Number} cornerRadius Rounds the corner using an arc. Similar to CSS's border-radius. Cannot be used together with edgeRoundness.\n * @param {null|Number} edgeRoundness Allows to modify the shape by rounding the edges using bezier curves. Default null.\n * @see [Documentation](https://www.remotion.dev/docs/shapes/rect)\n */\nconst Rect = ({ width, edgeRoundness, height, cornerRadius, ...props }) => {\n return ((0, jsx_runtime_1.jsx)(render_svg_1.RenderSvg, { ...(0, make_rect_1.makeRect)({ height, width, edgeRoundness, cornerRadius }), ...props }));\n};\nexports.Rect = Rect;\n","\"use strict\";\n// Copied from https://stackblitz.com/edit/svg-star-generator?file=index.js\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.makeStar = void 0;\nconst paths_1 = require(\"@remotion/paths\");\nconst join_points_1 = require(\"./join-points\");\n/**\n * @description Generates a star SVG path.\n * @param {Number} innerRadius The inner radius of the star.\n * @param {Number} outerRadius The outer radius of the star.\n * @param {Number} points The amount of points of the star.\n * @param {Number} cornerRadius Rounds the corner using an arc. Similar to CSS's border-radius. Cannot be used together with edgeRoundness.\n * @param {null|Number} edgeRoundness Allows to modify the shape by rounding the edges using bezier curves. Default null.\n * @see [Documentation](https://www.remotion.dev/docs/shapes/make-star)\n */\nconst star = ({ centerX, centerY, points, innerRadius, outerRadius, cornerRadius, edgeRoundness, }) => {\n const degreeIncrement = (Math.PI * 2) / (points * 2);\n const d = new Array(points * 2).fill(true).map((_p, i) => {\n const radius = i % 2 === 0 ? outerRadius : innerRadius;\n const angle = degreeIncrement * i - Math.PI / 2;\n const point = {\n x: centerX + radius * Math.cos(angle),\n y: centerY + radius * Math.sin(angle),\n };\n return [point.x, point.y];\n });\n return [\n ...(0, join_points_1.joinPoints)([...d, d[0]], {\n edgeRoundness,\n cornerRadius,\n roundCornerStrategy: cornerRadius > 0 ? 'bezier' : 'arc',\n }),\n { type: 'Z' },\n ];\n};\nconst makeStar = ({ points, innerRadius, outerRadius, cornerRadius = 0, edgeRoundness = null, }) => {\n const width = outerRadius * 2;\n const height = outerRadius * 2;\n const centerX = width / 2;\n const centerY = height / 2;\n const starPathInstructions = star({\n centerX,\n centerY,\n points,\n innerRadius,\n outerRadius,\n cornerRadius,\n edgeRoundness,\n });\n const reduced = (0, paths_1.reduceInstructions)(starPathInstructions);\n const path = (0, paths_1.resetPath)((0, paths_1.serializeInstructions)(reduced));\n const boundingBox = paths_1.PathInternals.getBoundingBoxFromInstructions(reduced);\n return {\n path,\n width: boundingBox.width,\n height: boundingBox.height,\n transformOrigin: `${centerX} ${centerY}`,\n instructions: starPathInstructions,\n };\n};\nexports.makeStar = makeStar;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Star = void 0;\nconst jsx_runtime_1 = require(\"react/jsx-runtime\");\nconst make_star_1 = require(\"../utils/make-star\");\nconst render_svg_1 = require(\"./render-svg\");\n/**\n * @description Renders an SVG element containing a star.\n * @param {Number} innerRadius The inner radius of the star.\n * @param {Number} outerRadius The outer radius of the star.\n * @param {Number} points The amount of points of the star.\n * @param {Number} cornerRadius Rounds the corner using an arc. Similar to CSS's border-radius. Cannot be used together with edgeRoundness.\n * @param {null|Number} edgeRoundness Allows to modify the shape by rounding the edges using bezier curves. Default null.\n * @see [Documentation](https://www.remotion.dev/docs/shapes/star)\n */\nconst Star = ({ innerRadius, outerRadius, points, cornerRadius, edgeRoundness, ...props }) => {\n return ((0, jsx_runtime_1.jsx)(render_svg_1.RenderSvg, { ...(0, make_star_1.makeStar)({\n innerRadius,\n outerRadius,\n points,\n cornerRadius,\n edgeRoundness,\n }), ...props }));\n};\nexports.Star = Star;\n","\"use strict\";\n// Copied from https://stackblitz.com/edit/react-triangle-svg?file=index.js\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.makeTriangle = void 0;\nconst paths_1 = require(\"@remotion/paths\");\nconst join_points_1 = require(\"./join-points\");\n/**\n * @description Generates an SVG path for a triangle with the same length on all sides.\n * @param {Number} length The length of one triangle side.\n * @param {string} direction The direction of the triangle\n * @param {null|Number} edgeRoundness Allows to modify the shape by rounding the edges using bezier curves. Default null.\n * @param {Number} cornerRadius Rounds the corner using an arc. Similar to CSS's border-radius. Cannot be used together with edgeRoundness.\n * @see [Documentation](https://www.remotion.dev/docs/shapes/make-triangle)\n */\nconst makeTriangle = ({ length, direction = 'right', edgeRoundness = null, cornerRadius = 0, }) => {\n if (typeof length !== 'number') {\n throw new Error(`\"length\" of a triangle must be a number, got ${JSON.stringify(length)}`);\n }\n const longerDimension = length;\n const shorterSize = Math.sqrt(length ** 2 * 0.75); // Calculated on paper;\n const points = {\n up: [\n [longerDimension / 2, 0],\n [0, shorterSize],\n [longerDimension, shorterSize],\n [longerDimension / 2, 0],\n ],\n right: [\n [0, 0],\n [0, longerDimension],\n [shorterSize, longerDimension / 2],\n [0, 0],\n ],\n down: [\n [0, 0],\n [longerDimension, 0],\n [longerDimension / 2, shorterSize],\n [0, 0],\n ],\n left: [\n [shorterSize, 0],\n [shorterSize, longerDimension],\n [0, longerDimension / 2],\n [shorterSize, 0],\n ],\n };\n const transformOriginX = {\n left: (shorterSize / 3) * 2,\n right: shorterSize / 3,\n up: longerDimension / 2,\n down: longerDimension / 2,\n }[direction];\n const transformOriginY = {\n up: (shorterSize / 3) * 2,\n down: shorterSize / 3,\n left: longerDimension / 2,\n right: longerDimension / 2,\n }[direction];\n const instructions = [\n ...(0, join_points_1.joinPoints)(points[direction], {\n edgeRoundness,\n cornerRadius,\n roundCornerStrategy: 'bezier',\n }),\n {\n type: 'Z',\n },\n ];\n const path = (0, paths_1.serializeInstructions)(instructions);\n return {\n path,\n instructions,\n width: direction === 'up' || direction === 'down' ? length : shorterSize,\n height: direction === 'up' || direction === 'down' ? shorterSize : length,\n transformOrigin: `${transformOriginX} ${transformOriginY}`,\n };\n};\nexports.makeTriangle = makeTriangle;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Triangle = void 0;\nconst jsx_runtime_1 = require(\"react/jsx-runtime\");\nconst make_triangle_1 = require(\"../utils/make-triangle\");\nconst render_svg_1 = require(\"./render-svg\");\n/**\n * @description Renders an SVG element containing a triangle with same length on all sides.\n * @param {Number} length The length of one triangle side.\n * @param {string} direction The direction of the triangle\n * @param {null|Number} edgeRoundness Allows to modify the shape by rounding the edges using bezier curves. Default null.\n * @param {Number} cornerRadius Rounds the corner using an arc. Similar to CSS's border-radius. Cannot be used together with edgeRoundness.\n * @see [Documentation](https://www.remotion.dev/docs/shapes/triangle)\n */\nconst Triangle = ({ length, direction, edgeRoundness, cornerRadius, ...props }) => {\n return ((0, jsx_runtime_1.jsx)(render_svg_1.RenderSvg, { ...(0, make_triangle_1.makeTriangle)({ length, direction, edgeRoundness, cornerRadius }), ...props }));\n};\nexports.Triangle = Triangle;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.makeTriangle = exports.makeStar = exports.makeRect = exports.makePolygon = exports.makePie = exports.makeEllipse = exports.makeCircle = exports.Triangle = exports.Star = exports.Rect = exports.Polygon = exports.Pie = exports.Ellipse = exports.Circle = void 0;\nvar circle_1 = require(\"./components/circle\");\nObject.defineProperty(exports, \"Circle\", { enumerable: true, get: function () { return circle_1.Circle; } });\nvar ellipse_1 = require(\"./components/ellipse\");\nObject.defineProperty(exports, \"Ellipse\", { enumerable: true, get: function () { return ellipse_1.Ellipse; } });\nvar pie_1 = require(\"./components/pie\");\nObject.defineProperty(exports, \"Pie\", { enumerable: true, get: function () { return pie_1.Pie; } });\nvar polygon_1 = require(\"./components/polygon\");\nObject.defineProperty(exports, \"Polygon\", { enumerable: true, get: function () { return polygon_1.Polygon; } });\nvar rect_1 = require(\"./components/rect\");\nObject.defineProperty(exports, \"Rect\", { enumerable: true, get: function () { return rect_1.Rect; } });\nvar star_1 = require(\"./components/star\");\nObject.defineProperty(exports, \"Star\", { enumerable: true, get: function () { return star_1.Star; } });\nvar triangle_1 = require(\"./components/triangle\");\nObject.defineProperty(exports, \"Triangle\", { enumerable: true, get: function () { return triangle_1.Triangle; } });\nvar make_circle_1 = require(\"./utils/make-circle\");\nObject.defineProperty(exports, \"makeCircle\", { enumerable: true, get: function () { return make_circle_1.makeCircle; } });\nvar make_ellipse_1 = require(\"./utils/make-ellipse\");\nObject.defineProperty(exports, \"makeEllipse\", { enumerable: true, get: function () { return make_ellipse_1.makeEllipse; } });\nvar make_pie_1 = require(\"./utils/make-pie\");\nObject.defineProperty(exports, \"makePie\", { enumerable: true, get: function () { return make_pie_1.makePie; } });\nvar make_polygon_1 = require(\"./utils/make-polygon\");\nObject.defineProperty(exports, \"makePolygon\", { enumerable: true, get: function () { return make_polygon_1.makePolygon; } });\nvar make_rect_1 = require(\"./utils/make-rect\");\nObject.defineProperty(exports, \"makeRect\", { enumerable: true, get: function () { return make_rect_1.makeRect; } });\nvar make_star_1 = require(\"./utils/make-star\");\nObject.defineProperty(exports, \"makeStar\", { enumerable: true, get: function () { return make_star_1.makeStar; } });\nvar make_triangle_1 = require(\"./utils/make-triangle\");\nObject.defineProperty(exports, \"makeTriangle\", { enumerable: true, get: function () { return make_triangle_1.makeTriangle; } });\n","// src/presentations/clock-wipe.tsx\nimport { translatePath } from \"@remotion/paths\";\nimport { makePie } from \"@remotion/shapes\";\nimport { useMemo, useState } from \"react\";\nimport { AbsoluteFill, random } from \"remotion\";\nimport { jsx, jsxs } from \"react/jsx-runtime\";\nvar ClockWipePresentation = ({ children, presentationDirection, presentationProgress, passedProps }) => {\n const finishedRadius = Math.sqrt(passedProps.width ** 2 + passedProps.height ** 2) / 2;\n const { path } = makePie({\n radius: finishedRadius,\n progress: presentationProgress\n });\n const translatedPath = translatePath(path, -(finishedRadius * 2 - passedProps.width) / 2, -(finishedRadius * 2 - passedProps.height) / 2);\n const [clipId] = useState(() => String(random(null)));\n const style = useMemo(() => {\n return {\n width: \"100%\",\n height: \"100%\",\n clipPath: presentationDirection === \"exiting\" ? undefined : `url(#${clipId})`,\n ...presentationDirection === \"entering\" ? passedProps.innerEnterStyle : passedProps.innerExitStyle\n };\n }, [\n clipId,\n passedProps.innerEnterStyle,\n passedProps.innerExitStyle,\n presentationDirection\n ]);\n const outerStyle = useMemo(() => {\n return presentationDirection === \"entering\" ? passedProps.outerEnterStyle : passedProps.outerExitStyle;\n }, [\n passedProps.outerEnterStyle,\n passedProps.outerExitStyle,\n presentationDirection\n ]);\n return /* @__PURE__ */ jsxs(AbsoluteFill, {\n style: outerStyle,\n children: [\n /* @__PURE__ */ jsx(AbsoluteFill, {\n style,\n children\n }),\n presentationDirection === \"exiting\" ? null : /* @__PURE__ */ jsx(AbsoluteFill, {\n children: /* @__PURE__ */ jsx(\"svg\", {\n children: /* @__PURE__ */ jsx(\"defs\", {\n children: /* @__PURE__ */ jsx(\"clipPath\", {\n id: clipId,\n children: /* @__PURE__ */ jsx(\"path\", {\n d: translatedPath,\n fill: \"black\"\n })\n })\n })\n })\n })\n ]\n });\n};\nvar clockWipe = (props) => {\n return { component: ClockWipePresentation, props: props ?? {} };\n};\nexport {\n clockWipe\n};\n","import React, { useMemo, useState } from \"react\";\nimport type {\n TransitionPresentation,\n TransitionPresentationComponentProps\n} from \"@remotion/transitions\";\nimport { AbsoluteFill, random } from \"remotion\";\n\nexport type CustomPresentationProps = {\n width: number;\n height: number;\n};\n\nconst CirclePresentation: React.FC<\n TransitionPresentationComponentProps<CustomPresentationProps>\n> = ({\n children,\n presentationDirection,\n presentationProgress,\n passedProps\n}) => {\n const finishedRadius =\n Math.sqrt(passedProps.width ** 2 + passedProps.height ** 2) / 2;\n const radius = finishedRadius * presentationProgress;\n\n const circlePath = makeCirclePath(\n passedProps.width / 2,\n passedProps.height / 2,\n radius\n );\n\n const [clipId] = useState(() => String(random(null)));\n const style: React.CSSProperties = useMemo(() => {\n return {\n width: \"100%\",\n height: \"100%\",\n clipPath:\n presentationDirection === \"exiting\" ? undefined : `url(#${clipId})`\n };\n }, [clipId, presentationDirection]);\n\n return (\n <AbsoluteFill>\n <AbsoluteFill style={style}>{children}</AbsoluteFill>\n {presentationDirection === \"exiting\" ? null : (\n <AbsoluteFill>\n <svg width={passedProps.width} height={passedProps.height}>\n <defs>\n <clipPath id={clipId}>\n <path d={circlePath} fill=\"black\" />\n </clipPath>\n </defs>\n </svg>\n </AbsoluteFill>\n )}\n </AbsoluteFill>\n );\n};\n\nexport const circle = (\n props: CustomPresentationProps\n): TransitionPresentation<CustomPresentationProps> => {\n return { component: CirclePresentation, props };\n};\n\n// Esta función crea un path de círculo\nconst makeCirclePath = (cx: number, cy: number, radius: number): string => {\n return `M ${cx}, ${cy}\n m -${radius}, 0\n a ${radius},${radius} 0 1,0 ${radius * 2},0\n a ${radius},${radius} 0 1,0 -${radius * 2},0`;\n};\n","import {\n TransitionPresentation,\n TransitionPresentationComponentProps\n} from \"@remotion/transitions\";\nimport React, { useMemo, useState } from \"react\";\nimport { AbsoluteFill, random } from \"remotion\";\n\nexport type CustomPresentationProps = {\n width: number;\n height: number;\n};\n\nconst WindowTransitionPresentation: React.FC<\n TransitionPresentationComponentProps<CustomPresentationProps>\n> = ({\n children,\n presentationDirection,\n presentationProgress,\n passedProps\n}) => {\n const { width, height } = passedProps;\n\n // Calculamos el tamaño de la ventana en función del progreso de la transición\n const windowWidth = width * presentationProgress;\n const windowHeight = height * presentationProgress;\n\n // Calculamos las coordenadas para la ventana que cubrirá la mitad de la pantalla\n const windowX = width / 2 - windowWidth / 2;\n const windowY = height / 2 - windowHeight / 2;\n\n // Creamos un clipPath único para esta transición\n const [clipId] = useState(() => String(random(null)));\n\n // Establecemos el clipPath para el elemento que queremos animar\n const style: React.CSSProperties = useMemo(() => {\n return {\n width: \"100%\",\n height: \"100%\",\n clipPath:\n presentationDirection === \"exiting\" ? undefined : `url(#${clipId})`\n };\n }, [clipId, presentationDirection]);\n\n return (\n <AbsoluteFill>\n <AbsoluteFill style={style}>{children}</AbsoluteFill>\n {presentationDirection === \"exiting\" ? null : (\n <AbsoluteFill>\n <svg>\n <defs>\n <clipPath id={clipId}>\n <rect\n x={windowX}\n y={windowY}\n width={windowWidth}\n height={windowHeight}\n fill=\"black\"\n />\n </clipPath>\n </defs>\n </svg>\n </AbsoluteFill>\n )}\n </AbsoluteFill>\n );\n};\n\nexport const rectangle = (\n props: CustomPresentationProps\n): TransitionPresentation<CustomPresentationProps> => {\n return { component: WindowTransitionPresentation, props };\n};\n","import { getBoundingBox, translatePath } from \"@remotion/paths\";\nimport { makeStar } from \"@remotion/shapes\";\nimport type {\n TransitionPresentation,\n TransitionPresentationComponentProps\n} from \"@remotion/transitions\";\nimport React, { useMemo, useState } from \"react\";\nimport { AbsoluteFill, random } from \"remotion\";\nexport type CustomPresentationProps = {\n width: number;\n height: number;\n};\nconst StarPresentation: React.FC<\n TransitionPresentationComponentProps<CustomPresentationProps>\n> = ({\n children,\n presentationDirection,\n presentationProgress,\n passedProps\n}) => {\n const finishedRadius =\n Math.sqrt(passedProps.width ** 2 + passedProps.height ** 2) / 2;\n const innerRadius = finishedRadius * presentationProgress;\n const outerRadius = finishedRadius * 2 * presentationProgress;\n const { path } = makeStar({\n innerRadius,\n outerRadius,\n points: 5\n });\n const boundingBox = getBoundingBox(path);\n const translatedPath = translatePath(\n path,\n passedProps.width / 2 - boundingBox.width / 2,\n passedProps.height / 2 - boundingBox.height / 2\n );\n const [clipId] = useState(() => String(random(null)));\n const style: React.CSSProperties = useMemo(() => {\n return {\n width: \"100%\",\n height: \"100%\",\n clipPath:\n presentationDirection === \"exiting\" ? undefined : `url(#${clipId})`\n };\n }, [clipId, presentationDirection]);\n return (\n <AbsoluteFill>\n <AbsoluteFill style={style}>{children}</AbsoluteFill>\n {presentationDirection === \"exiting\" ? null : (\n <AbsoluteFill>\n <svg>\n <defs>\n <clipPath id={clipId}>\n <path d={translatedPath} fill=\"black\" />\n </clipPath>\n </defs>\n </svg>\n </AbsoluteFill>\n )}\n </AbsoluteFill>\n );\n};\n\nexport const star = (\n props: CustomPresentationProps\n): TransitionPresentation<CustomPresentationProps> => {\n return { component: StarPresentation, props };\n};\n","import {\n TransitionPresentation,\n TransitionPresentationComponentProps\n} from \"@remotion/transitions\";\nimport React, { useMemo, useState } from \"react\";\nimport { AbsoluteFill, random } from \"remotion\";\n\nexport type CustomPresentationProps = {\n width: number;\n height: number;\n};\n\nconst WindowTransitionPresentation: React.FC<\n TransitionPresentationComponentProps<CustomPresentationProps>\n> = ({\n children,\n presentationDirection,\n presentationProgress,\n passedProps\n}) => {\n const { width, height } = passedProps;\n\n // Calculamos el tamaño de la ventana en función del progreso de la transición\n const windowWidth = width * presentationProgress;\n\n // Calculamos las coordenadas para la ventana que cubrirá la mitad de la pantalla\n const windowX = width / 2 - windowWidth / 2;\n\n // Creamos un clipPath único para esta transición\n const [clipId] = useState(() => String(random(null)));\n\n // Establecemos el clipPath para el elemento que queremos animar\n const style: React.CSSProperties = useMemo(() => {\n return {\n width: \"100%\",\n height: \"100%\",\n clipPath:\n presentationDirection === \"exiting\" ? undefined : `url(#${clipId})`\n };\n }, [clipId, presentationDirection]);\n\n return (\n <AbsoluteFill>\n <AbsoluteFill style={style}>{children}</AbsoluteFill>\n {presentationDirection === \"exiting\" ? null : (\n <AbsoluteFill>\n <svg>\n <defs>\n <clipPath id={clipId}>\n <rect\n x={windowX}\n y={0}\n width={windowWidth}\n height={height}\n fill=\"black\"\n />\n </clipPath>\n </defs>\n </svg>\n </AbsoluteFill>\n )}\n </AbsoluteFill>\n );\n};\n\nexport const slidingDoors = (\n props: CustomPresentationProps\n): TransitionPresentation<CustomPresentationProps> => {\n return { component: WindowTransitionPresentation, props };\n};\n"],"names":["f","require$$0","k","l","m","n","p","q","c","a","g","b","d","e","reactJsxRuntime_production_min","React","REACT_ELEMENT_TYPE","REACT_PORTAL_TYPE","REACT_FRAGMENT_TYPE","REACT_STRICT_MODE_TYPE","REACT_PROFILER_TYPE","REACT_PROVIDER_TYPE","REACT_CONTEXT_TYPE","REACT_FORWARD_REF_TYPE","REACT_SUSPENSE_TYPE","REACT_SUSPENSE_LIST_TYPE","REACT_MEMO_TYPE","REACT_LAZY_TYPE","REACT_OFFSCREEN_TYPE","MAYBE_ITERATOR_SYMBOL","FAUX_ITERATOR_SYMBOL","getIteratorFn","maybeIterable","maybeIterator","ReactSharedInternals","error","format","_len2","args","_key2","printWarning","level","ReactDebugCurrentFrame","stack","argsWithFormat","item","enableScopeAPI","enableCacheElement","enableTransitionTracing","enableLegacyHidden","enableDebugTracing","REACT_MODULE_REFERENCE","isValidElementType","type","getWrappedName","outerType","innerType","wrapperName","displayName","functionName","getContextName","getComponentNameFromType","context","provider","outerName","lazyComponent","payload","init","assign","disabledDepth","prevLog","prevInfo","prevWarn","prevError","prevGroup","prevGroupCollapsed","prevGroupEnd","disabledLog","disableLogs","props","reenableLogs","ReactCurrentDispatcher","prefix","describeBuiltInComponentFrame","name","source","ownerFn","x","match","reentry","componentFrameCache","PossiblyWeakMap","describeNativeComponentFrame","fn","construct","frame","control","previousPrepareStackTrace","previousDispatcher","Fake","sample","sampleLines","controlLines","s","_frame","syntheticFrame","describeFunctionComponentFrame","shouldConstruct","Component","prototype","describeUnknownElementTypeFrameInDEV","hasOwnProperty","loggedTypeFailures","setCurrentlyValidatingElement","element","owner","checkPropTypes","typeSpecs","values","location","componentName","has","typeSpecName","error$1","err","ex","isArrayImpl","isArray","typeName","value","hasToStringTag","willCoercionThrow","testStringCoercion","checkKeyStringCoercion","ReactCurrentOwner","RESERVED_PROPS","specialPropKeyWarningShown","specialPropRefWarningShown","didWarnAboutStringRefs","hasValidRef","config","getter","hasValidKey","warnIfStringRefCannotBeAutoConverted","self","defineKeyPropWarningGetter","warnAboutAccessingKey","defineRefPropWarningGetter","warnAboutAccessingRef","ReactElement","key","ref","jsxDEV","maybeKey","propName","defaultProps","ReactCurrentOwner$1","ReactDebugCurrentFrame$1","setCurrentlyValidatingElement$1","propTypesMisspellWarningShown","isValidElement","object","getDeclarationErrorAddendum","getSourceInfoErrorAddendum","ownerHasKeyUseWarning","getCurrentComponentErrorInfo","parentType","info","parentName","validateExplicitKey","currentComponentErrorInfo","childOwner","validateChildKeys","node","i","child","iteratorFn","iterator","step","validatePropTypes","propTypes","_name","validateFragmentProps","fragment","keys","didWarnAboutKeySpread","jsxWithValidation","isStaticChildren","validType","sourceInfo","typeString","children","beforeExample","afterExample","jsxWithValidationStatic","jsxWithValidationDynamic","jsx","jsxs","reactJsxRuntime_development","jsxRuntimeModule","require$$1","__defProp","__export","target","all","newValue","createContext","NativeLayersContext","createContext2","NativeLayersProvider","clipRegion","setClipRegion","useState","useMemo","useLayoutEffect","getNodeEnvString","getEnvString","getRemotionEnvironment","isPlayer","isRendering","originalCreateElement","componentsToAddStacksTo","enableSequenceStackTraces","proxy","thisArg","argArray","first","rest","newProps","addSequenceStackTraces","component","IsPlayerContext","createContext3","IsPlayerContextProvider","jsx2","useIsPlayer","useContext2","truthy","VERSION","checkMultipleRemotionVersions","alreadyImported","AbsoluteFillRefForwarding","style","other","actualStyle","useMemo2","jsx3","AbsoluteFill","forwardRef","SequenceContext","createContext4","SequenceManager","React3","SequenceVisibilityToggleContext","SequenceManagerProvider","sequences","setSequences","useState2","hidden","setHidden","registerSequence","useCallback","seq","seqs","unregisterSequence","sequenceContext","useMemo3","hiddenContext","jsx4","NonceContext","createContext5","useNonce","useContext4","nonce","setNonce","useState3","lastContext","useRef","useEffect3","exports_timeline_position_state","useTimelineSetFrame","useTimelinePosition","usePlayingState","persistCurrentFrame","getInitialFrameState","getFrameForComposition","TimelineContext","SetTimelineContext","CompositionManager","createContext6","EditorPropsContext","createContext7","editorPropsProviderRef","React4","EditorPropsProvider","setProps","updateProps","useCallback2","id","prev","resetUnsaved","useImperativeHandle","ctx","useMemo4","jsx5","problematicCharacters","didWarn","warnOnce","message","includesHexOfUnsafeChar","path","trimLeadingSlash","inner","encodeBySplitting","staticFile","includesHex","preprocessed","preparsed","DATE_TOKEN","FILE_TOKEN","serializeJSONWithDate","data","indent","staticBase","customDateUsed","customFileUsed","mapUsed","setUsed","deserializeJSONWithCustomFields","_","serializeThenDeserializeInStudio","didWarnSSRImport","warnOnceSSRImport","getInputProps","param","validCodecs","validateDefaultCodec","defaultCodec","validateDimension","amount","nameOfProp","validateDurationInFrames","durationInFrames","options","allowFloats","validateFps","fps","isGif","validateCalculated","calculated","compositionId","compositionFps","compositionHeight","compositionWidth","compositionDurationInFrames","calculateMetadataErrorLocation","defaultErrorLocation","width","height","resolveVideoConfig","calculateMetadata","signal","originalProps","calculatedProm","resolveVideoConfigOrCatch","params","ResolveCompositionContext","createContext8","resolveCompositionsRef","createRef","needsResolution","composition","PROPS_UPDATED_EXTERNALLY","ResolveCompositionConfig","currentRenderModalComposition","setCurrentRenderModalComposition","useState4","compositions","canvasContent","currentCompositionMetadata","useContext5","fastRefreshes","selectedComposition","useMemo5","renderModalComposition","allEditorProps","inputProps","resolvedConfigs","setResolvedConfigs","selectedEditorProps","renderModalProps","hasResolution","doResolution","useCallback3","combinedProps","controller","result","r","promOrNot","currentComposition","useImperativeHandle2","editorProps","isTheSame","currentDefaultProps","canResolve","shouldIgnoreUpdate","useEffect4","resolvedConfigsIncludingStaticOnes","staticComps","acc","curr","jsx6","useResolvedVideoConfig","preferredCompositionId","useVideo","useContext6","selected","resolved","useMemo6","createContext9","makeKey","time","obj","videoConfig","state","useContext7","unclamped","setFrame","playing","imperativePlaying","setPlaying","useMemo7","CanUseRemotionHooks","createContext10","CanUseRemotionHooksProvider","jsx7","useUnsafeVideoConfig","useContext8","ctxWidth","ctxHeight","ctxDuration","video","useMemo8","useVideoConfig","useContext9","useCurrentFrame","useContext10","contextOffset","Freeze","frameToFreeze","active","isActive","useMemo9","timelineContext","useContext11","relativeFrom","timelineValue","jsx8","RegularSequenceRefForwardingFunction","from","showInTimeline","loopDisplay","premountDisplay","layout","useState5","parentSequence","useContext12","rootId","cumulatedFrom","absoluteFrame","parentSequenceDuration","actualDurationInFrames","premounting","useMemo10","contextValue","timelineClipName","useEffect5","endThreshold","content","styleIfThere","defaultStyle","jsx9","RegularSequence","forwardRef2","PremountedSequenceRefForwardingFunction","passedStyle","premountFor","otherProps","premountingActive","Sequence","PremountedSequence","SequenceRefForwardingFunction","validateArtifactFilename","filename","validateContent","validateRenderAsset","artifact","RenderAssetManager","createContext11","RenderAssetManagerProvider","renderAssets","setRenderAssets","useState6","registerRenderAsset","useCallback4","renderAsset","assets","unregisterRenderAsset","assts","useLayoutEffect2","useMemo11","jsx10","getAbsoluteSrc","relativeSrc","calculateLoopDuration","endAt","mediaDuration","playbackRate","startFrom","duration","actualDuration","cancelRender","isErrorLike","LoopContext","createContext12","useLoop","React8","Loop","times","currentFrame","compDuration","maxTimes","actualTimes","maxFrame","start","useMemo12","loopContext","jsx11","PreloadContext","createContext13","preloads","updaters","PrefetchProvider","_preloads","_setPreloads","useState8","useEffect7","updaterFunction","u","jsx12","usePreload","src","useContext14","validateMediaProps","validateStartFromProps","durationReducer","action","absoluteSrc","DurationsContext","createContext14","DurationsContextProvider","durations","setDurations","useReducer","useMemo13","jsx13","mulberry32","hashCode","str","chr","hash","random","seed","dummy","useMediaStartsAt","useContext15","useFrameForVolumeProp","behavior","loop","startsAt","getAssetDisplayName","splitted","playAndHandleNotAllowedError","mediaRef","mediaType","onAutoPlayError","current","prom","evaluateVolume","volume","mediaVolume","allowAmplificationDuringRender","maxVolume","evaluated","didWarn2","warnOnce2","useMediaInTimeline","audioAndVideoTags","useContext16","actualFrom","initialVolume","useState9","doesVolumeChange","volumes","useMemo14","useEffect8","_b","_a","tag","useBufferManager","blocks","setBlocks","useState10","onBufferingCallbacks","setOnBufferingCallbacks","onResumeCallbacks","setOnResumeCallbacks","buffering","useRef2","addBlock","useCallback5","block","newArr","bx","listenForBuffering","callback","cb","listenForResume","useEffect9","useMemo15","BufferingContextReact","React11","BufferingProvider","bufferManager","jsx14","useIsPlayerBuffering","isBuffering","setIsBuffering","onBuffer","onResume","useBufferState","buffer","useContext17","useMemo16","unblock","useBufferUntilFirstFrame","onVariableFpsVideoDetected","pauseWhenBuffering","bufferingRef","useRef3","delayPlayback","bufferUntilFirstFrame","useCallback6","requestedTime","playback","onEndedOrPauseOrCanPlay","useMemo17","useMediaBuffering","shouldBuffer","isPremounting","useState11","useEffect10","cleanupFns","cleanup","onWaiting","onCanPlay","onError","useRequestVideoCallbackTime","lastSeek","currentTime","useRef4","useEffect11","videoTag","cancel","request","difference","differenceToLastSeek","interpolateFunction","input","inputRange","outputRange","extrapolateLeft","extrapolateRight","easing","inputMin","inputMax","outputMin","outputMax","range","findRange","checkValidInputRange","arr","checkInfiniteRange","interpolate","num","getExpectedMediaFrameUncorrected","getMediaTime","expectedFrame","msPerFrame","toSeconds","isIosSafari","isIpadIPodIPhone","isAppleWebKit","isIOSSafariAndBlob","actualSrc","getVideoFragmentStart","getVideoFragmentEnd","appendVideoFragment","withStartHash","isSubsetOfDuration","prevStartFrom","newStartFrom","prevDuration","newDuration","previousFrom","newFrom","previousEnd","newEnd","useAppendVideoFragment","initialActualSrc","initialActualFrom","initialDuration","actualFromRef","useRef5","alreadyWarned","warnAboutNonSeekableMedia","msg","DEFAULT_ACCEPTABLE_TIMESHIFT","seek","timeToSet","useMediaPlayback","localPlaybackRate","onlyWarnForMediaSeekingError","acceptableTimeshift","debugSeeking","globalPlaybackRate","useContext18","mediaStartsAt","lastSeekDueToShift","useRef6","isVariableFpsVideoMap","useCallback7","desiredUnclampedTime","isMediaTagBuffering","acceptableTimeShiftButLessThanDuration","isPlayerBuffering","useEffect12","isMediaTagBufferingOrStalled","tagName","playbackRateToSet","shouldBeTime","mediaTagTime","rvcTime","isVariableFpsVideo","timeShiftMediaTag","timeShiftRvcTag","timeShift","seekThreshold","makesSenseToSeek","isSomethingElseBuffering","useMediaTagVolume","actualVolume","setActualVolume","useState12","useEffect13","onChange","FLOATING_POINT_ERROR_THRESHOLD","isApproximatelyTheSame","num1","num2","useSyncVolumeWithMediaTag","volumePropFrame","useEffect14","userPreferredVolume","MediaVolumeContext","createContext15","SetMediaVolumeContext","useMediaVolumeState","useContext19","setMediaVolume","useMemo18","useMediaMutedState","mediaMuted","setMediaMuted","EMPTY_AUDIO","compareProps","obj1","obj2","keysA","keysB","didPropChange","newProp","prevProp","SharedAudioContext","createContext16","SharedAudioContextProvider","numberOfAudioTags","audios","useRef7","initialNumberOfAudioTags","useState13","refs","useMemo19","createRef2","takenAudios","rerenderAudios","useCallback8","registerAudio","aud","audioId","found","firstFreeAudio","cloned","newElem","unregisterAudio","index","updateAudio","changed","prevA","playAllAudios","resetAudio","useEffect15","jsx15","useSharedAudio","useContext20","elem","React12","effectToUse","AudioForDevelopmentForwardRefFunction","initialShouldPreMountAudioElements","useState14","muted","shouldPreMountAudioTags","onDuration","acceptableTimeShiftInSeconds","_remotionInternalNeedsDurationCalculation","_remotionInternalNativeLoopPassed","_remotionInternalStack","_remotionDebugSeeking","loopVolumeCurveBehavior","nativeProps","useContext21","preloadedSrc","timelineId","isSequenceHidden","propsToPass","useMemo20","audioRef","useImperativeHandle3","currentOnDurationCallback","useRef8","useEffect16","onLoadedMetadata","jsx16","AudioForPreview","forwardRef3","handles","DELAY_RENDER_CALLSTACK_TOKEN","DELAY_RENDER_RETRIES_LEFT","DELAY_RENDER_RETRY_TOKEN","defaultTimeout","delayRender","label","handle","called","timeoutToUse","retriesLeft","continueRender","h","AudioForRenderingRefForwardingFunction","useRef9","volumeProp","toneFrequency","delayRenderRetries","delayRenderTimeoutInMilliseconds","useContext22","useMemo21","useImperativeHandle4","useEffect17","needsToRenderAudioTag","useLayoutEffect3","newHandle","didLoad","jsx17","AudioForRendering","forwardRef4","AudioRefForwardingFunction","audioContext","useContext23","propsOtherThanLoop","environment","useCallback9","errMessage","durationInSeconds","durationFetched","jsx18","Audio","startFromFrameNo","endAtFrameNo","forwardRef5","createContext17","_portalNode","portalNode","containerNode","useLazyComponent","compProps","useMemo23","React16","getRegex2","isCompositionIdValid","invalidCompositionErrorMessage","ClipComposition","useContext25","useMemo24","jsx21","compositionsRef","React18","CompositionManagerProvider","setCompositions","useState15","currentcompositionsRef","useRef10","folders","setFolders","setCanvasContent","setCurrentCompositionMetadata","updateCompositions","useCallback10","updateComps","comps","updated","registerComposition","comp","unregisterComposition","registerFolder","parent","prevFolders","unregisterFolder","useImperativeHandle5","updateCompositionDefaultProps","newDefaultProps","useMemo25","jsx22","IFrameRefForwarding","onLoad","props2","useState16","useCallback11","didGetError","jsx23","forwardRef6","exponentialBackoff","errorCount","ImgRefForwarding","maxRetries","pauseWhenLoading","onImageFrame","imageRef","useRef11","errors","useContext26","useImperativeHandle6","retryIn","useCallback12","timeout","currentSrc","newSrc","_c","_d","backoff","_e","_f","_g","useLayoutEffect4","unmounted","onComplete","newImg","jsx24","forwardRef7","exports_default_css","makeDefaultPreviewCSS","injectCSS","OFFTHREAD_VIDEO_CLASS_NAME","injected","css","head","scope","backgroundColor","REMOTION_STUDIO_CONTAINER_ELEMENT","getPreviewDomElement","Root","listeners","getRoot","waitForRoot","RemotionRoot","remotionRootId","useState17","useRef12","setFastRefreshes","setPlaybackRate","useLayoutEffect5","attempt","asyncUpdate","timelineContextValue","useMemo26","setTimelineContextValue","nonceContext","counter","useEffect20","status","jsx25","getEnvVariables","setupEnvVariables","env","CurrentScaleContext","React22","PreviewSizeContext","createContext18","calculateScale","canvasSize","previewSize","heightRatio","widthRatio","ratio","WATCH_REMOTION_STATIC_FILES","useRemotionContexts","compositionManagerCtx","React23","setTimelineContext","canUseRemotionHooksContext","nativeLayersContext","preloadContext","resolveCompositionContext","renderAssetManagerContext","sequenceManagerContext","bufferManagerContext","useMemo27","RemotionContextProvider","contexts","jsx26","Internals","IsInsideSeriesContext","createContext19","IsNotInsideSeriesProvider","jsx27","useRequireToBeInsideSeries","React25","SeriesSequenceRefForwardingFunction","_ref","jsx28","SeriesSequence","forwardRef8","useEmitVideoFrame","onVideoFrame","useEffect22","VideoForDevelopmentRefForwardingFunction","videoRef","useRef13","acceptableTimeShift","crossOrigin","useContext28","useState19","useImperativeHandle7","useEffect23","errorHandler","useMemo30","crossOriginValue","jsx30","VideoForPreview","forwardRef9","roundTo6Commas","seekToTime","desiredTime","cancelSeeked","resolve","now","metadata","displayIn","waitForSeekedEvent","onDone","seekToTimeMultipleUntilRight","threshold","currentCancel","reject","firstSeek","seekedTo","sign","newSeek","newTime","newDifference","thirdSeek","VideoForRenderingForwardFunction","volumePropsFrame","useRef14","useContext29","useMemo31","useEffect24","useImperativeHandle8","loadedDataHandler","endedHandler","seek2","useLayoutEffect7","jsx32","VideoForRendering","forwardRef10","VideoForwardingFunction","useContext30","useCallback15","jsx33","Video","forwardRef11","proxyObj","Config","prop","call","getMatchers","cachedMatchers","NUMBER","PERCENTAGE","hue2rgb","t","hslToRgb","parse255","int","parse360","parse1","parsePercentage","normalizeColor","color","matchers","colorNames","processColor","normalizedColor","ENABLE_V5_BREAKING_CHANGES","validateFrame","validateDefaultAndInputProps","getOffthreadVideoSource","transparent","toneMapped","NoReactInternals","epsilon","SlidePresentation","presentationProgress","presentationDirection","direction","enterStyle","exitStyle","directionStyle","presentationProgressWithEpsilonCorrection","slide","linearTiming","EnteringContext","React2","ExitingContext","WrapInEnteringProgressContext","WrapInExitingProgressContext","flattenChildren","flatChildren","TransitionSeriesTransition","_props","Fragment","TransitionSeriesChildren","childrenValue","transitionOffsets","startFrame","flattedChildren","Children","hasPrev","nextPrev","next","prevIsTransition","castedChildAgain","debugInfo","durationInFramesProp","_children","passedProps","offset","currentStartFrame","actualStartFrame","nextProgress","prevProgress","nextPresentation","prevPresentation","UppercaseNextPresentation","UppercasePrevPresentation","TransitionSeries","passedLayout","FadePresentation","isEntering","fade","makePathIn","progress","makePathOut","WipePresentation","innerEnterStyle","innerExitStyle","outerEnterStyle","outerExitStyle","clipId","progressInDirection","outerStyle","svgStyle","wipe","Flip","perspective","rotation","outer","flip","cutInstruction_1","cutCInstruction","cutLInstruction","instruction","lastPoint","y","interpolatePoint","pA","pB","factor","p0","p1","p2","p3","p01","p12","p23","p012","p123","p0123","cutInstruction","bezierValues","exports","bezier_values_1","cubicPoint","xs","ys","getDerivative","derivative","vs","_vs","bFunc","xbase","ybase","combined","getCubicArcLength","sx","sy","correctedT","z","sum","quadraticPoint","cubicDerivative","getQuadraticArcLength","ax","ay","by","A","B","C","uuk","bbk","term","quadraticDerivative","t2length","length","totalLength","func","numIterations","increasedTLength","increasedTError","decreasedTLength","decreasedTError","bezier","bezier_functions_1","makeQuadratic","startX","startY","cpx","cpy","len","xy","mdl","tangent","makeCubic","cp1x","cp1y","cp2x","cp2y","linear","makeLinearPosition","x0","x1","y0","y1","pos","fraction","newDeltaX","newDeltaY","module","reducedAnalysis","bezier_1","linear_1","conductAnalysis","instructions","currentPoint","moveStart","segments","curve","parsePath_1","chunkExact","array","chunks","expectedSize","makeInstructions","segmentRegExp","numberRegExp","parseValues","instructionType","numbers","expectedArguments","parsePath","segmentString","command","segmentsArray","convertQToCInstruction_1","convertQToCInstruction","startPoint","iterate","iterateOverSegments","initialX","initialY","cpX","cpY","newSeg","removeASTCurves","convert_q_to_c_instruction_1","iterate_1","TAU","approximate_unit_arc","theta1","delta_theta","alpha","x2","y2","unit_vector_angle","ux","uy","vx","vy","dot","get_arc_center","largeArcFlag","sweepFlag","rx","ry","sin_phi","cos_phi","x1p","y1p","rx_sq","ry_sq","x1p_sq","y1p_sq","radicant","cxp","cyp","cx","cy","v1x","v1y","v2x","v2y","arcToCircle","phi","lambda","cc","xp","yp","removeATSHVQInstructions","segment","prevSegment","nextX","nextY","new_segments","_s","prevControlX","prevControlY","vectorX","vectorY","newControlX","newControlY","serializeInstructions_1","serializeInstruction","serializeInstructions","parse_path_1","serialize_instructions_1","normalizeInstructions","normalized","moveX","moveY","currentX","currentY","normalizePath","reduceInstructions_1","remove_a_s_t_curves_1","normalize_path_1","reduceInstructions","simplified","cutPath_1","cut_instruction_1","reduced_analysis_1","require$$2","reduce_instructions_1","require$$3","require$$4","cutPath","parsed","reduced","constructed","newInstructions","summedUpLength","instructionAndInfo","cut","debugPath_1","debugPath","inst","topLeft","topRight","bottomLeft","bottomRight","triangle","CBEZIER_MINMAX_EPSILON","minmaxQ","min","max","E","minmaxC","K","T","S","L","R","Q","getBoundingBoxFromInstructions","minX","minY","maxX","maxY","lastMoveX","lastMoveY","seg","cxMinMax","cyMinMax","getBoundingBox","unarced","arc","mod","toRadians","angle","distance","clamp","val","angleBetween","v0","v1","pointOnEllipticalArc","xAxisRotation","xAxisRotationRadians","dx","dy","transformedPoint","radiiCheck","cSquareNumerator","cSquareRootDenom","cRadicand","cCoef","transformedCenter","center","startVector","startAngle","endVector","sweepAngle","ellipseComponentX","ellipseComponentY","approximateArcLengthOfCurve","resolution","pointOnCurveFunc","resultantArcLength","arcLengthMap","approximationLines","prevPoint","nextPoint","makeArc","xAxisRotate","LargeArcFlag","SweepFlag","getPointAtLength","fractionLength","position","point_dist","xDist","yDist","dist","arc_1","constructFromInstructions","partialLengths","functions","initialPoint","cur","prev_point","ringStart","prevWasCurve","linearCurve","prevWasQ","arcCurve","string","getLength_1","construct_1","getLength","evolvePath_1","get_length_1","evolvePath","extendedLength","strokeDasharray","strokeDashoffset","extendViewbox","extendViewBox","currentViewBox","scale","relativeScale","part","getInstructionIndexAtLengthFromConstructed","getInstructionIndexAtLength","getPointAtLength_1","get_instruction_index_at_length_1","fractionPart","functionAtPart","getSubpaths_1","getSubpaths","getTangentAtLength_1","getTangentAtLength","getEndPosition_1","getEndPosition","convertToSameInstructionType_1","convertToSameInstructionType","convertToLCommand","convertToCCommand","aCommand","bCommand","pointsToCommand","pointsToInstruction","points","deCasteljau","decasteljau","left","right","decasteljauRecurse","_points","_t","newPoints","splitCurveAsPoints_1","splitCurveAsPoints","de_casteljau_1","segmentCount","remainingCurve","tIncrement","tRelative","split","splitCurve","points_to_command_1","split_curve_as_points_1","splitCurveInstructions","instructionStartX","instructionStartY","instructionEnd","splitSegment","splitSegmentInstructions","split_curve_1","commandStart","commandEnd","copyCommand","extendCommand","extendInstruction","split_segment_1","commandsToExtend","referenceCommands","numSegmentsToExtend","numReferenceSegments","segmentRatio","extended","accum","insertIndex","_extended","lastCommandCopies","interpolateInstructionOfSameKind_1","interpolateLInstruction","second","interpolateCInstructions","interpolateMInstructions","interpolateInstructionOfSameKind","interpolateInstructions_1","interpolateInstructions","get_end_position_1","convert_to_same_instruction_type_1","extend_command_1","interpolate_instruction_of_same_kind_1","aCommandsInput","bCommandsInput","aCommands","bCommands","addZ","aSameType","commandsUntilNow","point","interpolatedCommands","interpolatePath_1","interpolate_instructions_1","interpolatePath","firstPath","secondPath","commandInterpolator","translateSegments","translatePath","resetPath_1","get_bounding_box_1","translate_path_1","resetPath","box","reversePath_1","reverseNormalizedPath","reversed","revstring","reversePath","spath","scalePath_1","scalePath","scaleX","scaleY","bounded","mapped","warpHelpers","svgPathInterpolate","euclideanDistance","endPoint","d2","seg0","seg1","orders","q0","q1","dim","j","s0","s1","interpolateUntil","deltaFunction","currentPoints","createLineSegment","warpInterpolate","prexX","prexY","rawSegment","linearPoints","warpTransform","transformer","fixZInstruction","prevX","prevY","warpPath_1","warp_helpers_1","getDefaultInterpolationThreshold","boundingBox","warpPath","withZFix","interpolated","cut_path_1","debug_path_1","evolve_path_1","extend_viewbox_1","get_bounding_box_2","require$$5","require$$6","get_point_at_length_1","require$$7","get_subpaths_1","require$$8","get_tangent_at_length_1","require$$9","interpolate_path_1","require$$10","require$$11","require$$12","require$$13","reset_path_1","require$$14","reverse_path_1","require$$15","scale_path_1","require$$16","require$$17","require$$18","warp_path_1","require$$19","makeCircle_1","paths_1","makeCircle","radius","doesReactSupportCanary","doesReactSupportTransformOriginProperty","version","major","__createBinding","this","o","k2","desc","__setModuleDefault","v","__importStar","renderSvg","jsx_runtime_1","react_1","react_dom_1","does_react_support_canary_1","RenderSvg","pathStyle","transformOrigin","debug","actualPathStyle","reactSupportsTransformOrigin","prevInstruction","circle","make_circle_1","render_svg_1","Circle","makeEllipse_1","makeEllipse","ellipse","make_ellipse_1","Ellipse","makePie_1","getCoord","counterClockwise","actualProgress","coord","makePie","closePath","endAngleX","endAngleY","end","pie","make_pie_1","Pie","joinPoints_1","shortenVector","vector","currentLength","scalingFactor","scaleVectorToLength","joinPoints","edgeRoundness","cornerRadius","roundCornerStrategy","prevPointIndex","nextPointIndex","middleOfLine","prevPointMiddleOfLine","prevVector","nextVector","computeRadius","prevVectorMinusRadius","prevVectorLength","nextVectorMinusRadius","firstDraw","controlPoint1","controlPoint2","makePolygon_1","join_points_1","polygon","centerX","centerY","degreeIncrement","makePolygon","polygonPathInstructions","make_polygon_1","Polygon","makeRect_1","makeRect","rect","make_rect_1","Rect","makeStar_1","star","innerRadius","outerRadius","_p","makeStar","starPathInstructions","make_star_1","Star","makeTriangle_1","makeTriangle","longerDimension","shorterSize","transformOriginX","transformOriginY","make_triangle_1","Triangle","circle_1","ellipse_1","pie_1","polygon_1","rect_1","star_1","triangle_1","ClockWipePresentation","finishedRadius","translatedPath","clockWipe","CirclePresentation","circlePath","makeCirclePath","WindowTransitionPresentation","windowWidth","windowHeight","windowX","windowY","rectangle","StarPresentation","slidingDoors"],"mappings":";;;;;;;;;;;;;;;;AASa,MAAIA,IAAEC,GAAiBC,IAAE,OAAO,IAAI,eAAe,GAAEC,IAAE,OAAO,IAAI,gBAAgB,GAAEC,IAAE,OAAO,UAAU,gBAAeC,IAAEL,EAAE,mDAAmD,mBAAkBM,IAAE,EAAC,KAAI,IAAG,KAAI,IAAG,QAAO,IAAG,UAAS,GAAE;AAClP,WAASC,EAAEC,GAAEC,GAAEC,GAAE;AAAC,QAAIC,GAAEC,IAAE,IAAGC,IAAE,MAAK,IAAE;AAAK,IAASH,MAAT,WAAaG,IAAE,KAAGH,IAAYD,EAAE,QAAX,WAAiBI,IAAE,KAAGJ,EAAE,MAAcA,EAAE,QAAX,WAAiB,IAAEA,EAAE;AAAK,SAAIE,KAAKF,EAAE,CAAAL,EAAE,KAAKK,GAAEE,CAAC,KAAG,CAACL,EAAE,eAAeK,CAAC,MAAIC,EAAED,CAAC,IAAEF,EAAEE,CAAC;AAAG,QAAGH,KAAGA,EAAE,aAAa,MAAIG,KAAKF,IAAED,EAAE,cAAaC,EAAE,CAASG,EAAED,CAAC,MAAZ,WAAgBC,EAAED,CAAC,IAAEF,EAAEE,CAAC;AAAG,WAAM,EAAC,UAAST,GAAE,MAAKM,GAAE,KAAIK,GAAE,KAAI,GAAE,OAAMD,GAAE,QAAOP,EAAE,QAAO;AAAA,EAAC;AAAC,SAAAS,cAAiBX,GAAEW,GAAW,MAACP,GAAEO,GAAA,OAAaP;;;;;;;;;;;;;;wBCEtW,QAAQ,IAAI,aAAa,gBAC1B,WAAW;AAGd,QAAIQ,IAAQd,GAMRe,IAAqB,OAAO,IAAI,eAAe,GAC/CC,IAAoB,OAAO,IAAI,cAAc,GAC7CC,IAAsB,OAAO,IAAI,gBAAgB,GACjDC,IAAyB,OAAO,IAAI,mBAAmB,GACvDC,IAAsB,OAAO,IAAI,gBAAgB,GACjDC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,EACd,CAAE;AAAA,EACF,CAAE;AAAA,EACF;AAAA,IACI;AAAA,IACA;AAAA,EACH;AAAA,EACD;AAAA,IACI;AAAA,IAAG;AAAA,IACH;AAAA,EACH;AAAA,EACD;AAAA,IACI;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACH;AAAA,EACD;AAAA,IACI;AAAA,IAAG;AAAA,IACH;AAAA,IACA;AAAA,IACA;AAAA,EACH;AAAA,EACD;AAAA,IACI;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACH;AAAA,EACD;AAAA,IACI;AAAA,IAAG;AAAA,IACH;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACH;AAAA,EACD;AAAA,IACI;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACH;AAAA,EACD;AAAA,IACI;AAAA,IAAG;AAAA,IACH;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACH;AAAA,EACD;AAAA,IACI;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACH;AAAA,EACD;AAAA,IACI;AAAA,IAAG;AAAA,IACH;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACH;AAAA,EACD;AAAA,IACI;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACH;AAAA,EACD;AAAA,IACI;AAAA,IAAG;AAAA,IACH;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACH;AAAA,EACD;AAAA,IACI;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACH;AAAA,EACD;AAAA,IACI;AAAA,IAAG;AAAA,IACH;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACH;AAAA,EACD;AAAA,IACI;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACH;AAAA,EACD;AAAA,IACI;AAAA,IAAG;AAAA,IACH;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACH;AAAA,EACD;AAAA,IACI;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACH;AAAA,EACD;AAAA,IACI;AAAA,IAAG;AAAA,IACH;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACH;AAAA,EACD;AAAA,IACI;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACH;AAAA,EACD;AAAA,IACI;AAAA,IAAG;AAAA,IACH;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACH;AAAA,EACD;AAAA,IACI;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACH;AAAA,EACD;AAAA,IACI;AAAA,IAAG;AAAA,IACH;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACH;AAAA,EACD;AAAA,IACI;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACH;AACL;AAEAA,GAAA,UAAkB;AAAA,EACd,CAAE;AAAA,EACF,CAAE;AAAA,EACF,CAAC,GAAK,CAAG;AAAA,EACT;AAAA,IACI;AAAA,IACA;AAAA,IACA;AAAA,EACH;AAAA,EACD;AAAA,IACI;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACH;AAAA,EACD;AAAA,IACI;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACH;AAAA,EACD;AAAA,IACI;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACH;AAAA,EACD;AAAA,IACI;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACH;AAAA,EACD;AAAA,IACI;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACH;AAAA,EACD;AAAA,IACI;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACH;AAAA,EACD;AAAA,IACI;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACH;AAAA,EACD;AAAA,IACI;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACH;AAAA,EACD;AAAA,IACI;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACH;AAAA,EACD;AAAA,IACI;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACH;AAAA,EACD;AAAA,IACI;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACH;AAAA,EACD;AAAA,IACI;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACH;AAAA,EACD;AAAA,IACI;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACH;AAAA,EACD;AAAA,IACI;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACH;AAAA,EACD;AAAA,IACI;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACH;AAAA,EACD;AAAA,IACI;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACH;AAAA,EACD;AAAA,IACI;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACH;AAAA,EACD;AAAA,IACI;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACH;AAAA,EACD;AAAA,IACI;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACH;AAAA,EACD;AAAA,IACI;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACH;AAAA,EACD;AAAA,IACI;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,I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B,OAAA9sD;","x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71]}
1
+ {"version":3,"file":"index.es.js","sources":["../../../node_modules/.pnpm/react@18.3.1/node_modules/react/cjs/react-jsx-runtime.production.min.js","../../../node_modules/.pnpm/react@18.3.1/node_modules/react/cjs/react-jsx-runtime.development.js","../../../node_modules/.pnpm/react@18.3.1/node_modules/react/jsx-runtime.js","../../../node_modules/.pnpm/remotion@4.0.221_react-dom@18.3.1_react@18.3.1/node_modules/remotion/dist/esm/index.mjs","../../../node_modules/.pnpm/remotion@4.0.221_react-dom@18.3.1_react@18.3.1/node_modules/remotion/dist/esm/no-react.mjs","../../../node_modules/.pnpm/@remotion+transitions@4.0.221_react-dom@18.3.1_react@18.3.1/node_modules/@remotion/transitions/dist/esm/index.mjs","../../../node_modules/.pnpm/@remotion+transitions@4.0.221_react-dom@18.3.1_react@18.3.1/node_modules/@remotion/transitions/dist/esm/fade.mjs","../../../node_modules/.pnpm/@remotion+transitions@4.0.221_react-dom@18.3.1_react@18.3.1/node_modules/@remotion/transitions/dist/esm/slide.mjs","../../../node_modules/.pnpm/@remotion+transitions@4.0.221_react-dom@18.3.1_react@18.3.1/node_modules/@remotion/transitions/dist/esm/wipe.mjs","../../../node_modules/.pnpm/@remotion+transitions@4.0.221_react-dom@18.3.1_react@18.3.1/node_modules/@remotion/transitions/dist/esm/flip.mjs","../../../node_modules/.pnpm/@remotion+paths@4.0.221/node_modules/@remotion/paths/dist/cut-instruction.js","../../../node_modules/.pnpm/@remotion+paths@4.0.221/node_modules/@remotion/paths/dist/helpers/bezier-values.js","../../../node_modules/.pnpm/@remotion+paths@4.0.221/node_modules/@remotion/paths/dist/helpers/bezier-functions.js","../../../node_modules/.pnpm/@remotion+paths@4.0.221/node_modules/@remotion/paths/dist/helpers/bezier.js","../../../node_modules/.pnpm/@remotion+paths@4.0.221/node_modules/@remotion/paths/dist/helpers/linear.js","../../../node_modules/.pnpm/@remotion+paths@4.0.221/node_modules/@remotion/paths/dist/helpers/reduced-analysis.js","../../../node_modules/.pnpm/@remotion+paths@4.0.221/node_modules/@remotion/paths/dist/parse-path.js","../../../node_modules/.pnpm/@remotion+paths@4.0.221/node_modules/@remotion/paths/dist/helpers/convert-q-to-c-instruction.js","../../../node_modules/.pnpm/@remotion+paths@4.0.221/node_modules/@remotion/paths/dist/helpers/iterate.js","../../../node_modules/.pnpm/@remotion+paths@4.0.221/node_modules/@remotion/paths/dist/helpers/remove-a-s-t-curves.js","../../../node_modules/.pnpm/@remotion+paths@4.0.221/node_modules/@remotion/paths/dist/serialize-instructions.js","../../../node_modules/.pnpm/@remotion+paths@4.0.221/node_modules/@remotion/paths/dist/normalize-path.js","../../../node_modules/.pnpm/@remotion+paths@4.0.221/node_modules/@remotion/paths/dist/reduce-instructions.js","../../../node_modules/.pnpm/@remotion+paths@4.0.221/node_modules/@remotion/paths/dist/cut-path.js","../../../node_modules/.pnpm/@remotion+paths@4.0.221/node_modules/@remotion/paths/dist/debug-path.js","../../../node_modules/.pnpm/@remotion+paths@4.0.221/node_modules/@remotion/paths/dist/get-bounding-box.js","../../../node_modules/.pnpm/@remotion+paths@4.0.221/node_modules/@remotion/paths/dist/helpers/arc.js","../../../node_modules/.pnpm/@remotion+paths@4.0.221/node_modules/@remotion/paths/dist/helpers/construct.js","../../../node_modules/.pnpm/@remotion+paths@4.0.221/node_modules/@remotion/paths/dist/get-length.js","../../../node_modules/.pnpm/@remotion+paths@4.0.221/node_modules/@remotion/paths/dist/evolve-path.js","../../../node_modules/.pnpm/@remotion+paths@4.0.221/node_modules/@remotion/paths/dist/extend-viewbox.js","../../../node_modules/.pnpm/@remotion+paths@4.0.221/node_modules/@remotion/paths/dist/get-instruction-index-at-length.js","../../../node_modules/.pnpm/@remotion+paths@4.0.221/node_modules/@remotion/paths/dist/get-point-at-length.js","../../../node_modules/.pnpm/@remotion+paths@4.0.221/node_modules/@remotion/paths/dist/get-subpaths.js","../../../node_modules/.pnpm/@remotion+paths@4.0.221/node_modules/@remotion/paths/dist/get-tangent-at-length.js","../../../node_modules/.pnpm/@remotion+paths@4.0.221/node_modules/@remotion/paths/dist/get-end-position.js","../../../node_modules/.pnpm/@remotion+paths@4.0.221/node_modules/@remotion/paths/dist/interpolate-path/convert-to-same-instruction-type.js","../../../node_modules/.pnpm/@remotion+paths@4.0.221/node_modules/@remotion/paths/dist/interpolate-path/points-to-command.js","../../../node_modules/.pnpm/@remotion+paths@4.0.221/node_modules/@remotion/paths/dist/interpolate-path/de-casteljau.js","../../../node_modules/.pnpm/@remotion+paths@4.0.221/node_modules/@remotion/paths/dist/interpolate-path/split-curve-as-points.js","../../../node_modules/.pnpm/@remotion+paths@4.0.221/node_modules/@remotion/paths/dist/interpolate-path/split-curve.js","../../../node_modules/.pnpm/@remotion+paths@4.0.221/node_modules/@remotion/paths/dist/interpolate-path/split-segment.js","../../../node_modules/.pnpm/@remotion+paths@4.0.221/node_modules/@remotion/paths/dist/interpolate-path/extend-command.js","../../../node_modules/.pnpm/@remotion+paths@4.0.221/node_modules/@remotion/paths/dist/interpolate-path/interpolate-instruction-of-same-kind.js","../../../node_modules/.pnpm/@remotion+paths@4.0.221/node_modules/@remotion/paths/dist/interpolate-path/interpolate-instructions.js","../../../node_modules/.pnpm/@remotion+paths@4.0.221/node_modules/@remotion/paths/dist/interpolate-path/interpolate-path.js","../../../node_modules/.pnpm/@remotion+paths@4.0.221/node_modules/@remotion/paths/dist/translate-path.js","../../../node_modules/.pnpm/@remotion+paths@4.0.221/node_modules/@remotion/paths/dist/reset-path.js","../../../node_modules/.pnpm/@remotion+paths@4.0.221/node_modules/@remotion/paths/dist/reverse-path.js","../../../node_modules/.pnpm/@remotion+paths@4.0.221/node_modules/@remotion/paths/dist/scale-path.js","../../../node_modules/.pnpm/@remotion+paths@4.0.221/node_modules/@remotion/paths/dist/warp-path/warp-helpers.js","../../../node_modules/.pnpm/@remotion+paths@4.0.221/node_modules/@remotion/paths/dist/warp-path/index.js","../../../node_modules/.pnpm/@remotion+paths@4.0.221/node_modules/@remotion/paths/dist/index.js","../../../node_modules/.pnpm/@remotion+shapes@4.0.221_react-dom@18.3.1_react@18.3.1/node_modules/@remotion/shapes/dist/utils/make-circle.js","../../../node_modules/.pnpm/@remotion+shapes@4.0.221_react-dom@18.3.1_react@18.3.1/node_modules/@remotion/shapes/dist/utils/does-react-support-canary.js","../../../node_modules/.pnpm/@remotion+shapes@4.0.221_react-dom@18.3.1_react@18.3.1/node_modules/@remotion/shapes/dist/components/render-svg.js","../../../node_modules/.pnpm/@remotion+shapes@4.0.221_react-dom@18.3.1_react@18.3.1/node_modules/@remotion/shapes/dist/components/circle.js","../../../node_modules/.pnpm/@remotion+shapes@4.0.221_react-dom@18.3.1_react@18.3.1/node_modules/@remotion/shapes/dist/utils/make-ellipse.js","../../../node_modules/.pnpm/@remotion+shapes@4.0.221_react-dom@18.3.1_react@18.3.1/node_modules/@remotion/shapes/dist/components/ellipse.js","../../../node_modules/.pnpm/@remotion+shapes@4.0.221_react-dom@18.3.1_react@18.3.1/node_modules/@remotion/shapes/dist/utils/make-pie.js","../../../node_modules/.pnpm/@remotion+shapes@4.0.221_react-dom@18.3.1_react@18.3.1/node_modules/@remotion/shapes/dist/components/pie.js","../../../node_modules/.pnpm/@remotion+shapes@4.0.221_react-dom@18.3.1_react@18.3.1/node_modules/@remotion/shapes/dist/utils/join-points.js","../../../node_modules/.pnpm/@remotion+shapes@4.0.221_react-dom@18.3.1_react@18.3.1/node_modules/@remotion/shapes/dist/utils/make-polygon.js","../../../node_modules/.pnpm/@remotion+shapes@4.0.221_react-dom@18.3.1_react@18.3.1/node_modules/@remotion/shapes/dist/components/polygon.js","../../../node_modules/.pnpm/@remotion+shapes@4.0.221_react-dom@18.3.1_react@18.3.1/node_modules/@remotion/shapes/dist/utils/make-rect.js","../../../node_modules/.pnpm/@remotion+shapes@4.0.221_react-dom@18.3.1_react@18.3.1/node_modules/@remotion/shapes/dist/components/rect.js","../../../node_modules/.pnpm/@remotion+shapes@4.0.221_react-dom@18.3.1_react@18.3.1/node_modules/@remotion/shapes/dist/utils/make-star.js","../../../node_modules/.pnpm/@remotion+shapes@4.0.221_react-dom@18.3.1_react@18.3.1/node_modules/@remotion/shapes/dist/components/star.js","../../../node_modules/.pnpm/@remotion+shapes@4.0.221_react-dom@18.3.1_react@18.3.1/node_modules/@remotion/shapes/dist/utils/make-triangle.js","../../../node_modules/.pnpm/@remotion+shapes@4.0.221_react-dom@18.3.1_react@18.3.1/node_modules/@remotion/shapes/dist/components/triangle.js","../../../node_modules/.pnpm/@remotion+shapes@4.0.221_react-dom@18.3.1_react@18.3.1/node_modules/@remotion/shapes/dist/index.js","../../../node_modules/.pnpm/@remotion+transitions@4.0.221_react-dom@18.3.1_react@18.3.1/node_modules/@remotion/transitions/dist/esm/clock-wipe.mjs","../src/presentations/circle.tsx","../src/presentations/rectangle.tsx","../src/presentations/star.tsx","../src/presentations/sliding-doors.tsx"],"sourcesContent":["/**\n * @license React\n * react-jsx-runtime.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';var f=require(\"react\"),k=Symbol.for(\"react.element\"),l=Symbol.for(\"react.fragment\"),m=Object.prototype.hasOwnProperty,n=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,p={key:!0,ref:!0,__self:!0,__source:!0};\nfunction q(c,a,g){var b,d={},e=null,h=null;void 0!==g&&(e=\"\"+g);void 0!==a.key&&(e=\"\"+a.key);void 0!==a.ref&&(h=a.ref);for(b in a)m.call(a,b)&&!p.hasOwnProperty(b)&&(d[b]=a[b]);if(c&&c.defaultProps)for(b in a=c.defaultProps,a)void 0===d[b]&&(d[b]=a[b]);return{$$typeof:k,type:c,key:e,ref:h,props:d,_owner:n.current}}exports.Fragment=l;exports.jsx=q;exports.jsxs=q;\n","/**\n * @license React\n * react-jsx-runtime.development.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nif (process.env.NODE_ENV !== \"production\") {\n (function() {\n'use strict';\n\nvar React = require('react');\n\n// ATTENTION\n// When adding new symbols to this file,\n// Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'\n// The Symbol used to tag the ReactElement-like types.\nvar REACT_ELEMENT_TYPE = Symbol.for('react.element');\nvar REACT_PORTAL_TYPE = Symbol.for('react.portal');\nvar REACT_FRAGMENT_TYPE = Symbol.for('react.fragment');\nvar REACT_STRICT_MODE_TYPE = Symbol.for('react.strict_mode');\nvar REACT_PROFILER_TYPE = Symbol.for('react.profiler');\nvar REACT_PROVIDER_TYPE = Symbol.for('react.provider');\nvar REACT_CONTEXT_TYPE = Symbol.for('react.context');\nvar REACT_FORWARD_REF_TYPE = Symbol.for('react.forward_ref');\nvar REACT_SUSPENSE_TYPE = Symbol.for('react.suspense');\nvar REACT_SUSPENSE_LIST_TYPE = Symbol.for('react.suspense_list');\nvar REACT_MEMO_TYPE = Symbol.for('react.memo');\nvar REACT_LAZY_TYPE = Symbol.for('react.lazy');\nvar REACT_OFFSCREEN_TYPE = Symbol.for('react.offscreen');\nvar MAYBE_ITERATOR_SYMBOL = Symbol.iterator;\nvar FAUX_ITERATOR_SYMBOL = '@@iterator';\nfunction getIteratorFn(maybeIterable) {\n if (maybeIterable === null || typeof maybeIterable !== 'object') {\n return null;\n }\n\n var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];\n\n if (typeof maybeIterator === 'function') {\n return maybeIterator;\n }\n\n return null;\n}\n\nvar ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;\n\nfunction error(format) {\n {\n {\n for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n args[_key2 - 1] = arguments[_key2];\n }\n\n printWarning('error', format, args);\n }\n }\n}\n\nfunction printWarning(level, format, args) {\n // When changing this logic, you might want to also\n // update consoleWithStackDev.www.js as well.\n {\n var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;\n var stack = ReactDebugCurrentFrame.getStackAddendum();\n\n if (stack !== '') {\n format += '%s';\n args = args.concat([stack]);\n } // eslint-disable-next-line react-internal/safe-string-coercion\n\n\n var argsWithFormat = args.map(function (item) {\n return String(item);\n }); // Careful: RN currently depends on this prefix\n\n argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it\n // breaks IE9: https://github.com/facebook/react/issues/13610\n // eslint-disable-next-line react-internal/no-production-logging\n\n Function.prototype.apply.call(console[level], console, argsWithFormat);\n }\n}\n\n// -----------------------------------------------------------------------------\n\nvar enableScopeAPI = false; // Experimental Create Event Handle API.\nvar enableCacheElement = false;\nvar enableTransitionTracing = false; // No known bugs, but needs performance testing\n\nvar enableLegacyHidden = false; // Enables unstable_avoidThisFallback feature in Fiber\n// stuff. Intended to enable React core members to more easily debug scheduling\n// issues in DEV builds.\n\nvar enableDebugTracing = false; // Track which Fiber(s) schedule render work.\n\nvar REACT_MODULE_REFERENCE;\n\n{\n REACT_MODULE_REFERENCE = Symbol.for('react.module.reference');\n}\n\nfunction isValidElementType(type) {\n if (typeof type === 'string' || typeof type === 'function') {\n return true;\n } // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill).\n\n\n if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing ) {\n return true;\n }\n\n if (typeof type === 'object' && type !== null) {\n if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object\n // types supported by any Flight configuration anywhere since\n // we don't know which Flight build this will end up being used\n // with.\n type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== undefined) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction getWrappedName(outerType, innerType, wrapperName) {\n var displayName = outerType.displayName;\n\n if (displayName) {\n return displayName;\n }\n\n var functionName = innerType.displayName || innerType.name || '';\n return functionName !== '' ? wrapperName + \"(\" + functionName + \")\" : wrapperName;\n} // Keep in sync with react-reconciler/getComponentNameFromFiber\n\n\nfunction getContextName(type) {\n return type.displayName || 'Context';\n} // Note that the reconciler package should generally prefer to use getComponentNameFromFiber() instead.\n\n\nfunction getComponentNameFromType(type) {\n if (type == null) {\n // Host root, text node or just invalid type.\n return null;\n }\n\n {\n if (typeof type.tag === 'number') {\n error('Received an unexpected object in getComponentNameFromType(). ' + 'This is likely a bug in React. Please file an issue.');\n }\n }\n\n if (typeof type === 'function') {\n return type.displayName || type.name || null;\n }\n\n if (typeof type === 'string') {\n return type;\n }\n\n switch (type) {\n case REACT_FRAGMENT_TYPE:\n return 'Fragment';\n\n case REACT_PORTAL_TYPE:\n return 'Portal';\n\n case REACT_PROFILER_TYPE:\n return 'Profiler';\n\n case REACT_STRICT_MODE_TYPE:\n return 'StrictMode';\n\n case REACT_SUSPENSE_TYPE:\n return 'Suspense';\n\n case REACT_SUSPENSE_LIST_TYPE:\n return 'SuspenseList';\n\n }\n\n if (typeof type === 'object') {\n switch (type.$$typeof) {\n case REACT_CONTEXT_TYPE:\n var context = type;\n return getContextName(context) + '.Consumer';\n\n case REACT_PROVIDER_TYPE:\n var provider = type;\n return getContextName(provider._context) + '.Provider';\n\n case REACT_FORWARD_REF_TYPE:\n return getWrappedName(type, type.render, 'ForwardRef');\n\n case REACT_MEMO_TYPE:\n var outerName = type.displayName || null;\n\n if (outerName !== null) {\n return outerName;\n }\n\n return getComponentNameFromType(type.type) || 'Memo';\n\n case REACT_LAZY_TYPE:\n {\n var lazyComponent = type;\n var payload = lazyComponent._payload;\n var init = lazyComponent._init;\n\n try {\n return getComponentNameFromType(init(payload));\n } catch (x) {\n return null;\n }\n }\n\n // eslint-disable-next-line no-fallthrough\n }\n }\n\n return null;\n}\n\nvar assign = Object.assign;\n\n// Helpers to patch console.logs to avoid logging during side-effect free\n// replaying on render function. This currently only patches the object\n// lazily which won't cover if the log function was extracted eagerly.\n// We could also eagerly patch the method.\nvar disabledDepth = 0;\nvar prevLog;\nvar prevInfo;\nvar prevWarn;\nvar prevError;\nvar prevGroup;\nvar prevGroupCollapsed;\nvar prevGroupEnd;\n\nfunction disabledLog() {}\n\ndisabledLog.__reactDisabledLog = true;\nfunction disableLogs() {\n {\n if (disabledDepth === 0) {\n /* eslint-disable react-internal/no-production-logging */\n prevLog = console.log;\n prevInfo = console.info;\n prevWarn = console.warn;\n prevError = console.error;\n prevGroup = console.group;\n prevGroupCollapsed = console.groupCollapsed;\n prevGroupEnd = console.groupEnd; // https://github.com/facebook/react/issues/19099\n\n var props = {\n configurable: true,\n enumerable: true,\n value: disabledLog,\n writable: true\n }; // $FlowFixMe Flow thinks console is immutable.\n\n Object.defineProperties(console, {\n info: props,\n log: props,\n warn: props,\n error: props,\n group: props,\n groupCollapsed: props,\n groupEnd: props\n });\n /* eslint-enable react-internal/no-production-logging */\n }\n\n disabledDepth++;\n }\n}\nfunction reenableLogs() {\n {\n disabledDepth--;\n\n if (disabledDepth === 0) {\n /* eslint-disable react-internal/no-production-logging */\n var props = {\n configurable: true,\n enumerable: true,\n writable: true\n }; // $FlowFixMe Flow thinks console is immutable.\n\n Object.defineProperties(console, {\n log: assign({}, props, {\n value: prevLog\n }),\n info: assign({}, props, {\n value: prevInfo\n }),\n warn: assign({}, props, {\n value: prevWarn\n }),\n error: assign({}, props, {\n value: prevError\n }),\n group: assign({}, props, {\n value: prevGroup\n }),\n groupCollapsed: assign({}, props, {\n value: prevGroupCollapsed\n }),\n groupEnd: assign({}, props, {\n value: prevGroupEnd\n })\n });\n /* eslint-enable react-internal/no-production-logging */\n }\n\n if (disabledDepth < 0) {\n error('disabledDepth fell below zero. ' + 'This is a bug in React. Please file an issue.');\n }\n }\n}\n\nvar ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;\nvar prefix;\nfunction describeBuiltInComponentFrame(name, source, ownerFn) {\n {\n if (prefix === undefined) {\n // Extract the VM specific prefix used by each line.\n try {\n throw Error();\n } catch (x) {\n var match = x.stack.trim().match(/\\n( *(at )?)/);\n prefix = match && match[1] || '';\n }\n } // We use the prefix to ensure our stacks line up with native stack frames.\n\n\n return '\\n' + prefix + name;\n }\n}\nvar reentry = false;\nvar componentFrameCache;\n\n{\n var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map;\n componentFrameCache = new PossiblyWeakMap();\n}\n\nfunction describeNativeComponentFrame(fn, construct) {\n // If something asked for a stack inside a fake render, it should get ignored.\n if ( !fn || reentry) {\n return '';\n }\n\n {\n var frame = componentFrameCache.get(fn);\n\n if (frame !== undefined) {\n return frame;\n }\n }\n\n var control;\n reentry = true;\n var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe It does accept undefined.\n\n Error.prepareStackTrace = undefined;\n var previousDispatcher;\n\n {\n previousDispatcher = ReactCurrentDispatcher.current; // Set the dispatcher in DEV because this might be call in the render function\n // for warnings.\n\n ReactCurrentDispatcher.current = null;\n disableLogs();\n }\n\n try {\n // This should throw.\n if (construct) {\n // Something should be setting the props in the constructor.\n var Fake = function () {\n throw Error();\n }; // $FlowFixMe\n\n\n Object.defineProperty(Fake.prototype, 'props', {\n set: function () {\n // We use a throwing setter instead of frozen or non-writable props\n // because that won't throw in a non-strict mode function.\n throw Error();\n }\n });\n\n if (typeof Reflect === 'object' && Reflect.construct) {\n // We construct a different control for this case to include any extra\n // frames added by the construct call.\n try {\n Reflect.construct(Fake, []);\n } catch (x) {\n control = x;\n }\n\n Reflect.construct(fn, [], Fake);\n } else {\n try {\n Fake.call();\n } catch (x) {\n control = x;\n }\n\n fn.call(Fake.prototype);\n }\n } else {\n try {\n throw Error();\n } catch (x) {\n control = x;\n }\n\n fn();\n }\n } catch (sample) {\n // This is inlined manually because closure doesn't do it for us.\n if (sample && control && typeof sample.stack === 'string') {\n // This extracts the first frame from the sample that isn't also in the control.\n // Skipping one frame that we assume is the frame that calls the two.\n var sampleLines = sample.stack.split('\\n');\n var controlLines = control.stack.split('\\n');\n var s = sampleLines.length - 1;\n var c = controlLines.length - 1;\n\n while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {\n // We expect at least one stack frame to be shared.\n // Typically this will be the root most one. However, stack frames may be\n // cut off due to maximum stack limits. In this case, one maybe cut off\n // earlier than the other. We assume that the sample is longer or the same\n // and there for cut off earlier. So we should find the root most frame in\n // the sample somewhere in the control.\n c--;\n }\n\n for (; s >= 1 && c >= 0; s--, c--) {\n // Next we find the first one that isn't the same which should be the\n // frame that called our sample function and the control.\n if (sampleLines[s] !== controlLines[c]) {\n // In V8, the first line is describing the message but other VMs don't.\n // If we're about to return the first line, and the control is also on the same\n // line, that's a pretty good indicator that our sample threw at same line as\n // the control. I.e. before we entered the sample frame. So we ignore this result.\n // This can happen if you passed a class to function component, or non-function.\n if (s !== 1 || c !== 1) {\n do {\n s--;\n c--; // We may still have similar intermediate frames from the construct call.\n // The next one that isn't the same should be our match though.\n\n if (c < 0 || sampleLines[s] !== controlLines[c]) {\n // V8 adds a \"new\" prefix for native classes. Let's remove it to make it prettier.\n var _frame = '\\n' + sampleLines[s].replace(' at new ', ' at '); // If our component frame is labeled \"<anonymous>\"\n // but we have a user-provided \"displayName\"\n // splice it in to make the stack more readable.\n\n\n if (fn.displayName && _frame.includes('<anonymous>')) {\n _frame = _frame.replace('<anonymous>', fn.displayName);\n }\n\n {\n if (typeof fn === 'function') {\n componentFrameCache.set(fn, _frame);\n }\n } // Return the line we found.\n\n\n return _frame;\n }\n } while (s >= 1 && c >= 0);\n }\n\n break;\n }\n }\n }\n } finally {\n reentry = false;\n\n {\n ReactCurrentDispatcher.current = previousDispatcher;\n reenableLogs();\n }\n\n Error.prepareStackTrace = previousPrepareStackTrace;\n } // Fallback to just using the name if we couldn't make it throw.\n\n\n var name = fn ? fn.displayName || fn.name : '';\n var syntheticFrame = name ? describeBuiltInComponentFrame(name) : '';\n\n {\n if (typeof fn === 'function') {\n componentFrameCache.set(fn, syntheticFrame);\n }\n }\n\n return syntheticFrame;\n}\nfunction describeFunctionComponentFrame(fn, source, ownerFn) {\n {\n return describeNativeComponentFrame(fn, false);\n }\n}\n\nfunction shouldConstruct(Component) {\n var prototype = Component.prototype;\n return !!(prototype && prototype.isReactComponent);\n}\n\nfunction describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {\n\n if (type == null) {\n return '';\n }\n\n if (typeof type === 'function') {\n {\n return describeNativeComponentFrame(type, shouldConstruct(type));\n }\n }\n\n if (typeof type === 'string') {\n return describeBuiltInComponentFrame(type);\n }\n\n switch (type) {\n case REACT_SUSPENSE_TYPE:\n return describeBuiltInComponentFrame('Suspense');\n\n case REACT_SUSPENSE_LIST_TYPE:\n return describeBuiltInComponentFrame('SuspenseList');\n }\n\n if (typeof type === 'object') {\n switch (type.$$typeof) {\n case REACT_FORWARD_REF_TYPE:\n return describeFunctionComponentFrame(type.render);\n\n case REACT_MEMO_TYPE:\n // Memo may contain any component type so we recursively resolve it.\n return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);\n\n case REACT_LAZY_TYPE:\n {\n var lazyComponent = type;\n var payload = lazyComponent._payload;\n var init = lazyComponent._init;\n\n try {\n // Lazy may contain any component type so we recursively resolve it.\n return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);\n } catch (x) {}\n }\n }\n }\n\n return '';\n}\n\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n\nvar loggedTypeFailures = {};\nvar ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;\n\nfunction setCurrentlyValidatingElement(element) {\n {\n if (element) {\n var owner = element._owner;\n var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);\n ReactDebugCurrentFrame.setExtraStackFrame(stack);\n } else {\n ReactDebugCurrentFrame.setExtraStackFrame(null);\n }\n }\n}\n\nfunction checkPropTypes(typeSpecs, values, location, componentName, element) {\n {\n // $FlowFixMe This is okay but Flow doesn't know it.\n var has = Function.call.bind(hasOwnProperty);\n\n for (var typeSpecName in typeSpecs) {\n if (has(typeSpecs, typeSpecName)) {\n var error$1 = void 0; // Prop type validation may throw. In case they do, we don't want to\n // fail the render phase where it didn't fail before. So we log it.\n // After these have been cleaned up, we'll let them throw.\n\n try {\n // This is intentionally an invariant that gets caught. It's the same\n // behavior as without this statement except with a better message.\n if (typeof typeSpecs[typeSpecName] !== 'function') {\n // eslint-disable-next-line react-internal/prod-error-codes\n var err = Error((componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' + 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' + 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.');\n err.name = 'Invariant Violation';\n throw err;\n }\n\n error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED');\n } catch (ex) {\n error$1 = ex;\n }\n\n if (error$1 && !(error$1 instanceof Error)) {\n setCurrentlyValidatingElement(element);\n\n error('%s: type specification of %s' + ' `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error$1);\n\n setCurrentlyValidatingElement(null);\n }\n\n if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {\n // Only monitor this failure once because there tends to be a lot of the\n // same error.\n loggedTypeFailures[error$1.message] = true;\n setCurrentlyValidatingElement(element);\n\n error('Failed %s type: %s', location, error$1.message);\n\n setCurrentlyValidatingElement(null);\n }\n }\n }\n }\n}\n\nvar isArrayImpl = Array.isArray; // eslint-disable-next-line no-redeclare\n\nfunction isArray(a) {\n return isArrayImpl(a);\n}\n\n/*\n * The `'' + value` pattern (used in in perf-sensitive code) throws for Symbol\n * and Temporal.* types. See https://github.com/facebook/react/pull/22064.\n *\n * The functions in this module will throw an easier-to-understand,\n * easier-to-debug exception with a clear errors message message explaining the\n * problem. (Instead of a confusing exception thrown inside the implementation\n * of the `value` object).\n */\n// $FlowFixMe only called in DEV, so void return is not possible.\nfunction typeName(value) {\n {\n // toStringTag is needed for namespaced types like Temporal.Instant\n var hasToStringTag = typeof Symbol === 'function' && Symbol.toStringTag;\n var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || 'Object';\n return type;\n }\n} // $FlowFixMe only called in DEV, so void return is not possible.\n\n\nfunction willCoercionThrow(value) {\n {\n try {\n testStringCoercion(value);\n return false;\n } catch (e) {\n return true;\n }\n }\n}\n\nfunction testStringCoercion(value) {\n // If you ended up here by following an exception call stack, here's what's\n // happened: you supplied an object or symbol value to React (as a prop, key,\n // DOM attribute, CSS property, string ref, etc.) and when React tried to\n // coerce it to a string using `'' + value`, an exception was thrown.\n //\n // The most common types that will cause this exception are `Symbol` instances\n // and Temporal objects like `Temporal.Instant`. But any object that has a\n // `valueOf` or `[Symbol.toPrimitive]` method that throws will also cause this\n // exception. (Library authors do this to prevent users from using built-in\n // numeric operators like `+` or comparison operators like `>=` because custom\n // methods are needed to perform accurate arithmetic or comparison.)\n //\n // To fix the problem, coerce this object or symbol value to a string before\n // passing it to React. The most reliable way is usually `String(value)`.\n //\n // To find which value is throwing, check the browser or debugger console.\n // Before this exception was thrown, there should be `console.error` output\n // that shows the type (Symbol, Temporal.PlainDate, etc.) that caused the\n // problem and how that type was used: key, atrribute, input value prop, etc.\n // In most cases, this console output also shows the component and its\n // ancestor components where the exception happened.\n //\n // eslint-disable-next-line react-internal/safe-string-coercion\n return '' + value;\n}\nfunction checkKeyStringCoercion(value) {\n {\n if (willCoercionThrow(value)) {\n error('The provided key is an unsupported type %s.' + ' This value must be coerced to a string before before using it here.', typeName(value));\n\n return testStringCoercion(value); // throw (to help callers find troubleshooting comments)\n }\n }\n}\n\nvar ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;\nvar RESERVED_PROPS = {\n key: true,\n ref: true,\n __self: true,\n __source: true\n};\nvar specialPropKeyWarningShown;\nvar specialPropRefWarningShown;\nvar didWarnAboutStringRefs;\n\n{\n didWarnAboutStringRefs = {};\n}\n\nfunction hasValidRef(config) {\n {\n if (hasOwnProperty.call(config, 'ref')) {\n var getter = Object.getOwnPropertyDescriptor(config, 'ref').get;\n\n if (getter && getter.isReactWarning) {\n return false;\n }\n }\n }\n\n return config.ref !== undefined;\n}\n\nfunction hasValidKey(config) {\n {\n if (hasOwnProperty.call(config, 'key')) {\n var getter = Object.getOwnPropertyDescriptor(config, 'key').get;\n\n if (getter && getter.isReactWarning) {\n return false;\n }\n }\n }\n\n return config.key !== undefined;\n}\n\nfunction warnIfStringRefCannotBeAutoConverted(config, self) {\n {\n if (typeof config.ref === 'string' && ReactCurrentOwner.current && self && ReactCurrentOwner.current.stateNode !== self) {\n var componentName = getComponentNameFromType(ReactCurrentOwner.current.type);\n\n if (!didWarnAboutStringRefs[componentName]) {\n error('Component \"%s\" contains the string ref \"%s\". ' + 'Support for string refs will be removed in a future major release. ' + 'This case cannot be automatically converted to an arrow function. ' + 'We ask you to manually fix this case by using useRef() or createRef() instead. ' + 'Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-string-ref', getComponentNameFromType(ReactCurrentOwner.current.type), config.ref);\n\n didWarnAboutStringRefs[componentName] = true;\n }\n }\n }\n}\n\nfunction defineKeyPropWarningGetter(props, displayName) {\n {\n var warnAboutAccessingKey = function () {\n if (!specialPropKeyWarningShown) {\n specialPropKeyWarningShown = true;\n\n error('%s: `key` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName);\n }\n };\n\n warnAboutAccessingKey.isReactWarning = true;\n Object.defineProperty(props, 'key', {\n get: warnAboutAccessingKey,\n configurable: true\n });\n }\n}\n\nfunction defineRefPropWarningGetter(props, displayName) {\n {\n var warnAboutAccessingRef = function () {\n if (!specialPropRefWarningShown) {\n specialPropRefWarningShown = true;\n\n error('%s: `ref` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName);\n }\n };\n\n warnAboutAccessingRef.isReactWarning = true;\n Object.defineProperty(props, 'ref', {\n get: warnAboutAccessingRef,\n configurable: true\n });\n }\n}\n/**\n * Factory method to create a new React element. This no longer adheres to\n * the class pattern, so do not use new to call it. Also, instanceof check\n * will not work. Instead test $$typeof field against Symbol.for('react.element') to check\n * if something is a React Element.\n *\n * @param {*} type\n * @param {*} props\n * @param {*} key\n * @param {string|object} ref\n * @param {*} owner\n * @param {*} self A *temporary* helper to detect places where `this` is\n * different from the `owner` when React.createElement is called, so that we\n * can warn. We want to get rid of owner and replace string `ref`s with arrow\n * functions, and as long as `this` and owner are the same, there will be no\n * change in behavior.\n * @param {*} source An annotation object (added by a transpiler or otherwise)\n * indicating filename, line number, and/or other information.\n * @internal\n */\n\n\nvar ReactElement = function (type, key, ref, self, source, owner, props) {\n var element = {\n // This tag allows us to uniquely identify this as a React Element\n $$typeof: REACT_ELEMENT_TYPE,\n // Built-in properties that belong on the element\n type: type,\n key: key,\n ref: ref,\n props: props,\n // Record the component responsible for creating this element.\n _owner: owner\n };\n\n {\n // The validation flag is currently mutative. We put it on\n // an external backing store so that we can freeze the whole object.\n // This can be replaced with a WeakMap once they are implemented in\n // commonly used development environments.\n element._store = {}; // To make comparing ReactElements easier for testing purposes, we make\n // the validation flag non-enumerable (where possible, which should\n // include every environment we run tests in), so the test framework\n // ignores it.\n\n Object.defineProperty(element._store, 'validated', {\n configurable: false,\n enumerable: false,\n writable: true,\n value: false\n }); // self and source are DEV only properties.\n\n Object.defineProperty(element, '_self', {\n configurable: false,\n enumerable: false,\n writable: false,\n value: self\n }); // Two elements created in two different places should be considered\n // equal for testing purposes and therefore we hide it from enumeration.\n\n Object.defineProperty(element, '_source', {\n configurable: false,\n enumerable: false,\n writable: false,\n value: source\n });\n\n if (Object.freeze) {\n Object.freeze(element.props);\n Object.freeze(element);\n }\n }\n\n return element;\n};\n/**\n * https://github.com/reactjs/rfcs/pull/107\n * @param {*} type\n * @param {object} props\n * @param {string} key\n */\n\nfunction jsxDEV(type, config, maybeKey, source, self) {\n {\n var propName; // Reserved names are extracted\n\n var props = {};\n var key = null;\n var ref = null; // Currently, key can be spread in as a prop. This causes a potential\n // issue if key is also explicitly declared (ie. <div {...props} key=\"Hi\" />\n // or <div key=\"Hi\" {...props} /> ). We want to deprecate key spread,\n // but as an intermediary step, we will use jsxDEV for everything except\n // <div {...props} key=\"Hi\" />, because we aren't currently able to tell if\n // key is explicitly declared to be undefined or not.\n\n if (maybeKey !== undefined) {\n {\n checkKeyStringCoercion(maybeKey);\n }\n\n key = '' + maybeKey;\n }\n\n if (hasValidKey(config)) {\n {\n checkKeyStringCoercion(config.key);\n }\n\n key = '' + config.key;\n }\n\n if (hasValidRef(config)) {\n ref = config.ref;\n warnIfStringRefCannotBeAutoConverted(config, self);\n } // Remaining properties are added to a new props object\n\n\n for (propName in config) {\n if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {\n props[propName] = config[propName];\n }\n } // Resolve default props\n\n\n if (type && type.defaultProps) {\n var defaultProps = type.defaultProps;\n\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n }\n\n if (key || ref) {\n var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;\n\n if (key) {\n defineKeyPropWarningGetter(props, displayName);\n }\n\n if (ref) {\n defineRefPropWarningGetter(props, displayName);\n }\n }\n\n return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);\n }\n}\n\nvar ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner;\nvar ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;\n\nfunction setCurrentlyValidatingElement$1(element) {\n {\n if (element) {\n var owner = element._owner;\n var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);\n ReactDebugCurrentFrame$1.setExtraStackFrame(stack);\n } else {\n ReactDebugCurrentFrame$1.setExtraStackFrame(null);\n }\n }\n}\n\nvar propTypesMisspellWarningShown;\n\n{\n propTypesMisspellWarningShown = false;\n}\n/**\n * Verifies the object is a ReactElement.\n * See https://reactjs.org/docs/react-api.html#isvalidelement\n * @param {?object} object\n * @return {boolean} True if `object` is a ReactElement.\n * @final\n */\n\n\nfunction isValidElement(object) {\n {\n return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;\n }\n}\n\nfunction getDeclarationErrorAddendum() {\n {\n if (ReactCurrentOwner$1.current) {\n var name = getComponentNameFromType(ReactCurrentOwner$1.current.type);\n\n if (name) {\n return '\\n\\nCheck the render method of `' + name + '`.';\n }\n }\n\n return '';\n }\n}\n\nfunction getSourceInfoErrorAddendum(source) {\n {\n if (source !== undefined) {\n var fileName = source.fileName.replace(/^.*[\\\\\\/]/, '');\n var lineNumber = source.lineNumber;\n return '\\n\\nCheck your code at ' + fileName + ':' + lineNumber + '.';\n }\n\n return '';\n }\n}\n/**\n * Warn if there's no key explicitly set on dynamic arrays of children or\n * object keys are not valid. This allows us to keep track of children between\n * updates.\n */\n\n\nvar ownerHasKeyUseWarning = {};\n\nfunction getCurrentComponentErrorInfo(parentType) {\n {\n var info = getDeclarationErrorAddendum();\n\n if (!info) {\n var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name;\n\n if (parentName) {\n info = \"\\n\\nCheck the top-level render call using <\" + parentName + \">.\";\n }\n }\n\n return info;\n }\n}\n/**\n * Warn if the element doesn't have an explicit key assigned to it.\n * This element is in an array. The array could grow and shrink or be\n * reordered. All children that haven't already been validated are required to\n * have a \"key\" property assigned to it. Error statuses are cached so a warning\n * will only be shown once.\n *\n * @internal\n * @param {ReactElement} element Element that requires a key.\n * @param {*} parentType element's parent's type.\n */\n\n\nfunction validateExplicitKey(element, parentType) {\n {\n if (!element._store || element._store.validated || element.key != null) {\n return;\n }\n\n element._store.validated = true;\n var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);\n\n if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {\n return;\n }\n\n ownerHasKeyUseWarning[currentComponentErrorInfo] = true; // Usually the current owner is the offender, but if it accepts children as a\n // property, it may be the creator of the child that's responsible for\n // assigning it a key.\n\n var childOwner = '';\n\n if (element && element._owner && element._owner !== ReactCurrentOwner$1.current) {\n // Give the component that originally created this child.\n childOwner = \" It was passed a child from \" + getComponentNameFromType(element._owner.type) + \".\";\n }\n\n setCurrentlyValidatingElement$1(element);\n\n error('Each child in a list should have a unique \"key\" prop.' + '%s%s See https://reactjs.org/link/warning-keys for more information.', currentComponentErrorInfo, childOwner);\n\n setCurrentlyValidatingElement$1(null);\n }\n}\n/**\n * Ensure that every element either is passed in a static location, in an\n * array with an explicit keys property defined, or in an object literal\n * with valid key property.\n *\n * @internal\n * @param {ReactNode} node Statically passed child of any type.\n * @param {*} parentType node's parent's type.\n */\n\n\nfunction validateChildKeys(node, parentType) {\n {\n if (typeof node !== 'object') {\n return;\n }\n\n if (isArray(node)) {\n for (var i = 0; i < node.length; i++) {\n var child = node[i];\n\n if (isValidElement(child)) {\n validateExplicitKey(child, parentType);\n }\n }\n } else if (isValidElement(node)) {\n // This element was passed in a valid location.\n if (node._store) {\n node._store.validated = true;\n }\n } else if (node) {\n var iteratorFn = getIteratorFn(node);\n\n if (typeof iteratorFn === 'function') {\n // Entry iterators used to provide implicit keys,\n // but now we print a separate warning for them later.\n if (iteratorFn !== node.entries) {\n var iterator = iteratorFn.call(node);\n var step;\n\n while (!(step = iterator.next()).done) {\n if (isValidElement(step.value)) {\n validateExplicitKey(step.value, parentType);\n }\n }\n }\n }\n }\n }\n}\n/**\n * Given an element, validate that its props follow the propTypes definition,\n * provided by the type.\n *\n * @param {ReactElement} element\n */\n\n\nfunction validatePropTypes(element) {\n {\n var type = element.type;\n\n if (type === null || type === undefined || typeof type === 'string') {\n return;\n }\n\n var propTypes;\n\n if (typeof type === 'function') {\n propTypes = type.propTypes;\n } else if (typeof type === 'object' && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here.\n // Inner props are checked in the reconciler.\n type.$$typeof === REACT_MEMO_TYPE)) {\n propTypes = type.propTypes;\n } else {\n return;\n }\n\n if (propTypes) {\n // Intentionally inside to avoid triggering lazy initializers:\n var name = getComponentNameFromType(type);\n checkPropTypes(propTypes, element.props, 'prop', name, element);\n } else if (type.PropTypes !== undefined && !propTypesMisspellWarningShown) {\n propTypesMisspellWarningShown = true; // Intentionally inside to avoid triggering lazy initializers:\n\n var _name = getComponentNameFromType(type);\n\n error('Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', _name || 'Unknown');\n }\n\n if (typeof type.getDefaultProps === 'function' && !type.getDefaultProps.isReactClassApproved) {\n error('getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.');\n }\n }\n}\n/**\n * Given a fragment, validate that it can only be provided with fragment props\n * @param {ReactElement} fragment\n */\n\n\nfunction validateFragmentProps(fragment) {\n {\n var keys = Object.keys(fragment.props);\n\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n\n if (key !== 'children' && key !== 'key') {\n setCurrentlyValidatingElement$1(fragment);\n\n error('Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.', key);\n\n setCurrentlyValidatingElement$1(null);\n break;\n }\n }\n\n if (fragment.ref !== null) {\n setCurrentlyValidatingElement$1(fragment);\n\n error('Invalid attribute `ref` supplied to `React.Fragment`.');\n\n setCurrentlyValidatingElement$1(null);\n }\n }\n}\n\nvar didWarnAboutKeySpread = {};\nfunction jsxWithValidation(type, props, key, isStaticChildren, source, self) {\n {\n var validType = isValidElementType(type); // We warn in this case but don't throw. We expect the element creation to\n // succeed and there will likely be errors in render.\n\n if (!validType) {\n var info = '';\n\n if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {\n info += ' You likely forgot to export your component from the file ' + \"it's defined in, or you might have mixed up default and named imports.\";\n }\n\n var sourceInfo = getSourceInfoErrorAddendum(source);\n\n if (sourceInfo) {\n info += sourceInfo;\n } else {\n info += getDeclarationErrorAddendum();\n }\n\n var typeString;\n\n if (type === null) {\n typeString = 'null';\n } else if (isArray(type)) {\n typeString = 'array';\n } else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) {\n typeString = \"<\" + (getComponentNameFromType(type.type) || 'Unknown') + \" />\";\n info = ' Did you accidentally export a JSX literal instead of a component?';\n } else {\n typeString = typeof type;\n }\n\n error('React.jsx: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', typeString, info);\n }\n\n var element = jsxDEV(type, props, key, source, self); // The result can be nullish if a mock or a custom function is used.\n // TODO: Drop this when these are no longer allowed as the type argument.\n\n if (element == null) {\n return element;\n } // Skip key warning if the type isn't valid since our key validation logic\n // doesn't expect a non-string/function type and can throw confusing errors.\n // We don't want exception behavior to differ between dev and prod.\n // (Rendering will throw with a helpful message and as soon as the type is\n // fixed, the key warnings will appear.)\n\n\n if (validType) {\n var children = props.children;\n\n if (children !== undefined) {\n if (isStaticChildren) {\n if (isArray(children)) {\n for (var i = 0; i < children.length; i++) {\n validateChildKeys(children[i], type);\n }\n\n if (Object.freeze) {\n Object.freeze(children);\n }\n } else {\n error('React.jsx: Static children should always be an array. ' + 'You are likely explicitly calling React.jsxs or React.jsxDEV. ' + 'Use the Babel transform instead.');\n }\n } else {\n validateChildKeys(children, type);\n }\n }\n }\n\n {\n if (hasOwnProperty.call(props, 'key')) {\n var componentName = getComponentNameFromType(type);\n var keys = Object.keys(props).filter(function (k) {\n return k !== 'key';\n });\n var beforeExample = keys.length > 0 ? '{key: someKey, ' + keys.join(': ..., ') + ': ...}' : '{key: someKey}';\n\n if (!didWarnAboutKeySpread[componentName + beforeExample]) {\n var afterExample = keys.length > 0 ? '{' + keys.join(': ..., ') + ': ...}' : '{}';\n\n error('A props object containing a \"key\" prop is being spread into JSX:\\n' + ' let props = %s;\\n' + ' <%s {...props} />\\n' + 'React keys must be passed directly to JSX without using spread:\\n' + ' let props = %s;\\n' + ' <%s key={someKey} {...props} />', beforeExample, componentName, afterExample, componentName);\n\n didWarnAboutKeySpread[componentName + beforeExample] = true;\n }\n }\n }\n\n if (type === REACT_FRAGMENT_TYPE) {\n validateFragmentProps(element);\n } else {\n validatePropTypes(element);\n }\n\n return element;\n }\n} // These two functions exist to still get child warnings in dev\n// even with the prod transform. This means that jsxDEV is purely\n// opt-in behavior for better messages but that we won't stop\n// giving you warnings if you use production apis.\n\nfunction jsxWithValidationStatic(type, props, key) {\n {\n return jsxWithValidation(type, props, key, true);\n }\n}\nfunction jsxWithValidationDynamic(type, props, key) {\n {\n return jsxWithValidation(type, props, key, false);\n }\n}\n\nvar jsx = jsxWithValidationDynamic ; // we may want to special case jsxs internally to take advantage of static children.\n// for now we can ship identical prod functions\n\nvar jsxs = jsxWithValidationStatic ;\n\nexports.Fragment = REACT_FRAGMENT_TYPE;\nexports.jsx = jsx;\nexports.jsxs = jsxs;\n })();\n}\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-jsx-runtime.production.min.js');\n} else {\n module.exports = require('./cjs/react-jsx-runtime.development.js');\n}\n","var __defProp = Object.defineProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, {\n get: all[name],\n enumerable: true,\n configurable: true,\n set: (newValue) => all[name] = () => newValue\n });\n};\n\n// src/_check-rsc.ts\nimport { createContext } from \"react\";\nif (typeof createContext !== \"function\") {\n const err = [\n 'Remotion requires React.createContext, but it is \"undefined\".',\n 'If you are in a React Server Component, turn it into a client component by adding \"use client\" at the top of the file.',\n \"\",\n \"Before:\",\n ' import {useCurrentFrame} from \"remotion\";',\n \"\",\n \"After:\",\n ' \"use client\";',\n ' import {useCurrentFrame} from \"remotion\";'\n ];\n throw new Error(err.join(\"\\n\"));\n}\n\n// src/Clipper.tsx\nimport { useContext, useEffect } from \"react\";\n\n// src/NativeLayers.tsx\nimport { createContext as createContext2, useLayoutEffect, useMemo, useState } from \"react\";\nimport { jsx } from \"react/jsx-runtime\";\nvar NativeLayersContext = createContext2({\n setClipRegion: () => {\n throw new Error(\"NativeLayers not set\");\n },\n clipRegion: null\n});\nvar NativeLayersProvider = ({\n children\n}) => {\n const [clipRegion, setClipRegion] = useState(null);\n const context = useMemo(() => {\n return {\n setClipRegion,\n clipRegion\n };\n }, [clipRegion, setClipRegion]);\n if (typeof window !== \"undefined\") {\n useLayoutEffect(() => {\n window.remotion_getClipRegion = () => {\n return clipRegion;\n };\n }, [clipRegion, setClipRegion]);\n }\n return /* @__PURE__ */ jsx(NativeLayersContext.Provider, {\n value: context,\n children\n });\n};\n\n// src/Clipper.tsx\nvar Clipper = ({ height, width, x, y }) => {\n const { setClipRegion } = useContext(NativeLayersContext);\n useEffect(() => {\n setClipRegion((c) => {\n if (c === \"hide\") {\n throw new Error(\"Cannot render <Clipper>, because another <Null> is already rendered\");\n }\n if (c === null) {\n return { height, width, x, y };\n }\n throw new Error(\"Cannot render <Clipper>, because another component clipping the region was already rendered (most likely <Clipper>)\");\n });\n return () => {\n setClipRegion(null);\n };\n }, [height, setClipRegion, width, x, y]);\n return null;\n};\n\n// src/enable-sequence-stack-traces.ts\nimport React from \"react\";\n\n// src/get-remotion-environment.ts\nfunction getNodeEnvString() {\n return [\"NOD\", \"E_EN\", \"V\"].join(\"\");\n}\nvar getEnvString = () => {\n return [\"e\", \"nv\"].join(\"\");\n};\nvar getRemotionEnvironment = () => {\n const isPlayer = typeof window !== \"undefined\" && window.remotion_isPlayer;\n const isRendering = typeof window !== \"undefined\" && typeof window.process !== \"undefined\" && typeof window.process.env !== \"undefined\" && (window.process[getEnvString()][getNodeEnvString()] === \"test\" || window.process[getEnvString()][getNodeEnvString()] === \"production\" && typeof window !== \"undefined\" && typeof window.remotion_puppeteerTimeout !== \"undefined\");\n const isStudio = typeof window !== \"undefined\" && window.remotion_isStudio;\n return {\n isStudio,\n isRendering,\n isPlayer\n };\n};\n\n// src/enable-sequence-stack-traces.ts\nvar originalCreateElement = React.createElement;\nvar componentsToAddStacksTo = [];\nvar enableSequenceStackTraces = () => {\n if (!getRemotionEnvironment().isStudio) {\n return;\n }\n const proxy = new Proxy(originalCreateElement, {\n apply(target, thisArg, argArray) {\n if (componentsToAddStacksTo.includes(argArray[0])) {\n const [first, props, ...rest] = argArray;\n const newProps = {\n ...props ?? {},\n stack: new Error().stack\n };\n return Reflect.apply(target, thisArg, [first, newProps, ...rest]);\n }\n return Reflect.apply(target, thisArg, argArray);\n }\n });\n React.createElement = proxy;\n};\nvar addSequenceStackTraces = (component) => {\n componentsToAddStacksTo.push(component);\n enableSequenceStackTraces();\n};\n\n// src/is-player.tsx\nimport { createContext as createContext3, useContext as useContext2 } from \"react\";\nimport { jsx as jsx2 } from \"react/jsx-runtime\";\nvar IsPlayerContext = createContext3(false);\nvar IsPlayerContextProvider = ({\n children\n}) => {\n return /* @__PURE__ */ jsx2(IsPlayerContext.Provider, {\n value: true,\n children\n });\n};\nvar useIsPlayer = () => {\n return useContext2(IsPlayerContext);\n};\n\n// src/truthy.ts\nfunction truthy(value) {\n return Boolean(value);\n}\n\n// src/version.ts\nvar VERSION = \"4.0.221\";\n\n// src/multiple-versions-warning.ts\nvar checkMultipleRemotionVersions = () => {\n if (typeof globalThis === \"undefined\") {\n return;\n }\n const alreadyImported = globalThis.remotion_imported || typeof window !== \"undefined\" && window.remotion_imported;\n if (alreadyImported) {\n if (alreadyImported === VERSION) {\n return;\n }\n throw new TypeError(`\\uD83D\\uDEA8 Multiple versions of Remotion detected: ${[\n VERSION,\n typeof alreadyImported === \"string\" ? alreadyImported : \"an older version\"\n ].filter(truthy).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.`);\n }\n globalThis.remotion_imported = VERSION;\n if (typeof window !== \"undefined\") {\n window.remotion_imported = VERSION;\n }\n};\n\n// src/Null.tsx\nimport { useContext as useContext3, useEffect as useEffect2 } from \"react\";\nvar Null = () => {\n const { setClipRegion } = useContext3(NativeLayersContext);\n useEffect2(() => {\n setClipRegion((c) => {\n if (c === null) {\n return \"hide\";\n }\n if (c === \"hide\") {\n return \"hide\";\n }\n throw new Error(\"Cannot render <Null>, because another component clipping the region was already rendered (most likely <Clipper>)\");\n });\n return () => {\n setClipRegion(null);\n };\n }, [setClipRegion]);\n return null;\n};\n\n// src/Sequence.tsx\nimport {\n forwardRef as forwardRef2,\n useContext as useContext12,\n useEffect as useEffect5,\n useMemo as useMemo10,\n useState as useState5\n} from \"react\";\n\n// src/AbsoluteFill.tsx\nimport { forwardRef, useMemo as useMemo2 } from \"react\";\nimport { jsx as jsx3 } from \"react/jsx-runtime\";\nvar AbsoluteFillRefForwarding = (props, ref) => {\n const { style, ...other } = props;\n const actualStyle = useMemo2(() => {\n return {\n position: \"absolute\",\n top: 0,\n left: 0,\n right: 0,\n bottom: 0,\n width: \"100%\",\n height: \"100%\",\n display: \"flex\",\n flexDirection: \"column\",\n ...style\n };\n }, [style]);\n return /* @__PURE__ */ jsx3(\"div\", {\n ref,\n style: actualStyle,\n ...other\n });\n};\nvar AbsoluteFill = forwardRef(AbsoluteFillRefForwarding);\n\n// src/SequenceContext.tsx\nimport { createContext as createContext4 } from \"react\";\nvar SequenceContext = createContext4(null);\n\n// src/SequenceManager.tsx\nimport React3, { useCallback, useMemo as useMemo3, useState as useState2 } from \"react\";\nimport { jsx as jsx4 } from \"react/jsx-runtime\";\nvar SequenceManager = React3.createContext({\n registerSequence: () => {\n throw new Error(\"SequenceManagerContext not initialized\");\n },\n unregisterSequence: () => {\n throw new Error(\"SequenceManagerContext not initialized\");\n },\n sequences: []\n});\nvar SequenceVisibilityToggleContext = React3.createContext({\n hidden: {},\n setHidden: () => {\n throw new Error(\"SequenceVisibilityToggle not initialized\");\n }\n});\nvar SequenceManagerProvider = ({ children }) => {\n const [sequences, setSequences] = useState2([]);\n const [hidden, setHidden] = useState2({});\n const registerSequence = useCallback((seq) => {\n setSequences((seqs) => {\n return [...seqs, seq];\n });\n }, []);\n const unregisterSequence = useCallback((seq) => {\n setSequences((seqs) => seqs.filter((s) => s.id !== seq));\n }, []);\n const sequenceContext = useMemo3(() => {\n return {\n registerSequence,\n sequences,\n unregisterSequence\n };\n }, [registerSequence, sequences, unregisterSequence]);\n const hiddenContext = useMemo3(() => {\n return {\n hidden,\n setHidden\n };\n }, [hidden]);\n return /* @__PURE__ */ jsx4(SequenceManager.Provider, {\n value: sequenceContext,\n children: /* @__PURE__ */ jsx4(SequenceVisibilityToggleContext.Provider, {\n value: hiddenContext,\n children\n })\n });\n};\n\n// src/nonce.ts\nimport { createContext as createContext5, useContext as useContext4, useEffect as useEffect3, useRef, useState as useState3 } from \"react\";\nvar NonceContext = createContext5({\n getNonce: () => 0,\n fastRefreshes: 0\n});\nvar useNonce = () => {\n const context = useContext4(NonceContext);\n const [nonce, setNonce] = useState3(() => context.getNonce());\n const lastContext = useRef(context);\n useEffect3(() => {\n if (lastContext.current === context) {\n return;\n }\n lastContext.current = context;\n setNonce(context.getNonce);\n }, [context]);\n return nonce;\n};\n\n// src/timeline-position-state.ts\nvar exports_timeline_position_state = {};\n__export(exports_timeline_position_state, {\n useTimelineSetFrame: () => useTimelineSetFrame,\n useTimelinePosition: () => useTimelinePosition,\n usePlayingState: () => usePlayingState,\n persistCurrentFrame: () => persistCurrentFrame,\n getInitialFrameState: () => getInitialFrameState,\n getFrameForComposition: () => getFrameForComposition,\n TimelineContext: () => TimelineContext,\n SetTimelineContext: () => SetTimelineContext\n});\nimport { createContext as createContext9, useContext as useContext7, useMemo as useMemo7 } from \"react\";\n\n// src/use-video.ts\nimport { useContext as useContext6, useMemo as useMemo6 } from \"react\";\n\n// src/CompositionManagerContext.tsx\nimport { createContext as createContext6 } from \"react\";\nvar CompositionManager = createContext6({\n compositions: [],\n registerComposition: () => {\n return;\n },\n unregisterComposition: () => {\n return;\n },\n registerFolder: () => {\n return;\n },\n unregisterFolder: () => {\n return;\n },\n setCurrentCompositionMetadata: () => {\n return;\n },\n updateCompositionDefaultProps: () => {\n return;\n },\n folders: [],\n currentCompositionMetadata: null,\n canvasContent: null,\n setCanvasContent: () => {\n return;\n }\n});\n\n// src/ResolveCompositionConfig.tsx\nimport {\n createContext as createContext8,\n createRef,\n useCallback as useCallback3,\n useContext as useContext5,\n useEffect as useEffect4,\n useImperativeHandle as useImperativeHandle2,\n useMemo as useMemo5,\n useState as useState4\n} from \"react\";\n\n// src/EditorProps.tsx\nimport React4, {\n createContext as createContext7,\n useCallback as useCallback2,\n useImperativeHandle,\n useMemo as useMemo4\n} from \"react\";\nimport { jsx as jsx5 } from \"react/jsx-runtime\";\nvar EditorPropsContext = createContext7({\n props: {},\n updateProps: () => {\n throw new Error(\"Not implemented\");\n },\n resetUnsaved: () => {\n throw new Error(\"Not implemented\");\n }\n});\nvar editorPropsProviderRef = React4.createRef();\nvar EditorPropsProvider = ({ children }) => {\n const [props, setProps] = React4.useState({});\n const updateProps = useCallback2(({\n defaultProps,\n id,\n newProps\n }) => {\n setProps((prev) => {\n return {\n ...prev,\n [id]: typeof newProps === \"function\" ? newProps(prev[id] ?? defaultProps) : newProps\n };\n });\n }, []);\n const resetUnsaved = useCallback2(() => {\n setProps({});\n }, []);\n useImperativeHandle(editorPropsProviderRef, () => {\n return {\n getProps: () => props,\n setProps\n };\n }, [props]);\n const ctx = useMemo4(() => {\n return { props, updateProps, resetUnsaved };\n }, [props, resetUnsaved, updateProps]);\n return /* @__PURE__ */ jsx5(EditorPropsContext.Provider, {\n value: ctx,\n children\n });\n};\n\n// src/static-file.ts\nvar problematicCharacters = {\n \"%3A\": \":\",\n \"%2F\": \"/\",\n \"%3F\": \"?\",\n \"%23\": \"#\",\n \"%5B\": \"[\",\n \"%5D\": \"]\",\n \"%40\": \"@\",\n \"%21\": \"!\",\n \"%24\": \"$\",\n \"%26\": \"&\",\n \"%27\": \"'\",\n \"%28\": \"(\",\n \"%29\": \")\",\n \"%2A\": \"*\",\n \"%2B\": \"+\",\n \"%2C\": \",\",\n \"%3B\": \";\"\n};\nvar didWarn = {};\nvar warnOnce = (message) => {\n if (didWarn[message]) {\n return;\n }\n console.warn(message);\n didWarn[message] = true;\n};\nvar includesHexOfUnsafeChar = (path) => {\n for (const key of Object.keys(problematicCharacters)) {\n if (path.includes(key)) {\n return { containsHex: true, hexCode: key };\n }\n }\n return { containsHex: false };\n};\nvar trimLeadingSlash = (path) => {\n if (path.startsWith(\"/\")) {\n return trimLeadingSlash(path.substring(1));\n }\n return path;\n};\nvar inner = (path) => {\n if (typeof window !== \"undefined\" && window.remotion_staticBase) {\n if (path.startsWith(window.remotion_staticBase)) {\n throw new Error(`The value \"${path}\" is already prefixed with the static base ${window.remotion_staticBase}. You don't need to call staticFile() on it.`);\n }\n return `${window.remotion_staticBase}/${trimLeadingSlash(path)}`;\n }\n return `/${trimLeadingSlash(path)}`;\n};\nvar encodeBySplitting = (path) => {\n const splitBySlash = path.split(\"/\");\n const encodedArray = splitBySlash.map((element) => {\n return encodeURIComponent(element);\n });\n const merged = encodedArray.join(\"/\");\n return merged;\n};\nvar staticFile = (path) => {\n if (path.startsWith(\"http://\") || path.startsWith(\"https://\")) {\n throw new TypeError(`staticFile() does not support remote URLs - got \"${path}\". Instead, pass the URL without wrapping it in staticFile(). See: https://remotion.dev/docs/staticfile-remote-urls`);\n }\n if (path.startsWith(\"..\") || path.startsWith(\"./\")) {\n throw new TypeError(`staticFile() does not support relative paths - got \"${path}\". Instead, pass the name of a file that is inside the public/ folder. See: https://remotion.dev/docs/staticfile-relative-paths`);\n }\n if (path.startsWith(\"/Users\") || path.startsWith(\"/home\") || path.startsWith(\"/tmp\") || path.startsWith(\"/etc\") || path.startsWith(\"/opt\") || path.startsWith(\"/var\") || path.startsWith(\"C:\") || path.startsWith(\"D:\") || path.startsWith(\"E:\")) {\n throw new TypeError(`staticFile() does not support absolute paths - got \"${path}\". Instead, pass the name of a file that is inside the public/ folder. See: https://remotion.dev/docs/staticfile-relative-paths`);\n }\n if (path.startsWith(\"public/\")) {\n throw new TypeError(`Do not include the public/ prefix when using staticFile() - got \"${path}\". See: https://remotion.dev/docs/staticfile-relative-paths`);\n }\n const includesHex = includesHexOfUnsafeChar(path);\n if (includesHex.containsHex) {\n warnOnce(`WARNING: You seem to pass an already encoded path (path contains ${includesHex.hexCode}). Since Remotion 4.0, the encoding is done by staticFile() itself. You may want to remove a encodeURIComponent() wrapping.`);\n }\n const preprocessed = encodeBySplitting(path);\n const preparsed = inner(preprocessed);\n if (!preparsed.startsWith(\"/\")) {\n return `/${preparsed}`;\n }\n return preparsed;\n};\n\n// src/input-props-serialization.ts\nvar DATE_TOKEN = \"remotion-date:\";\nvar FILE_TOKEN = \"remotion-file:\";\nvar serializeJSONWithDate = ({\n data,\n indent,\n staticBase\n}) => {\n let customDateUsed = false;\n let customFileUsed = false;\n let mapUsed = false;\n let setUsed = false;\n try {\n const serializedString = JSON.stringify(data, function(key, value) {\n const item = this[key];\n if (item instanceof Date) {\n customDateUsed = true;\n return `${DATE_TOKEN}${item.toISOString()}`;\n }\n if (item instanceof Map) {\n mapUsed = true;\n return value;\n }\n if (item instanceof Set) {\n setUsed = true;\n return value;\n }\n if (typeof item === \"string\" && staticBase !== null && item.startsWith(staticBase)) {\n customFileUsed = true;\n return `${FILE_TOKEN}${item.replace(staticBase + \"/\", \"\")}`;\n }\n return value;\n }, indent);\n return { serializedString, customDateUsed, customFileUsed, mapUsed, setUsed };\n } catch (err) {\n throw new Error(\"Could not serialize the passed input props to JSON: \" + err.message);\n }\n};\nvar deserializeJSONWithCustomFields = (data) => {\n return JSON.parse(data, (_, value) => {\n if (typeof value === \"string\" && value.startsWith(DATE_TOKEN)) {\n return new Date(value.replace(DATE_TOKEN, \"\"));\n }\n if (typeof value === \"string\" && value.startsWith(FILE_TOKEN)) {\n return staticFile(value.replace(FILE_TOKEN, \"\"));\n }\n return value;\n });\n};\nvar serializeThenDeserializeInStudio = (props) => {\n if (getRemotionEnvironment().isStudio) {\n return deserializeJSONWithCustomFields(serializeJSONWithDate({\n data: props,\n indent: 2,\n staticBase: window.remotion_staticBase\n }).serializedString);\n }\n return props;\n};\n\n// src/config/input-props.ts\nvar didWarnSSRImport = false;\nvar warnOnceSSRImport = () => {\n if (didWarnSSRImport) {\n return;\n }\n didWarnSSRImport = true;\n console.warn(\"Called `getInputProps()` on the server. This function is not available server-side and has returned an empty object.\");\n console.warn(\"To hide this warning, don't call this function on the server:\");\n console.warn(\" typeof window === 'undefined' ? {} : getInputProps()\");\n};\nvar getInputProps = () => {\n if (typeof window === \"undefined\") {\n warnOnceSSRImport();\n return {};\n }\n if (getRemotionEnvironment().isPlayer) {\n throw new Error(\"You cannot call `getInputProps()` from a <Player>. Instead, the props are available as React props from component that you passed as `component` prop.\");\n }\n const param = window.remotion_inputProps;\n if (!param) {\n return {};\n }\n const parsed = deserializeJSONWithCustomFields(param);\n return parsed;\n};\n\n// src/codec.ts\nvar validCodecs = [\n \"h264\",\n \"h265\",\n \"vp8\",\n \"vp9\",\n \"mp3\",\n \"aac\",\n \"wav\",\n \"prores\",\n \"h264-mkv\",\n \"h264-ts\",\n \"gif\"\n];\n\n// src/validation/validate-default-codec.ts\nfunction validateDefaultCodec(defaultCodec, location) {\n if (typeof defaultCodec === \"undefined\") {\n return;\n }\n if (typeof defaultCodec !== \"string\") {\n throw new TypeError(`The \"defaultCodec\" prop ${location} must be a string, but you passed a value of type ${typeof defaultCodec}.`);\n }\n if (!validCodecs.includes(defaultCodec)) {\n throw new Error(`The \"defaultCodec\" prop ${location} must be one of ${validCodecs.join(\", \")}, but you passed ${defaultCodec}.`);\n }\n}\n\n// src/validation/validate-dimensions.ts\nfunction validateDimension(amount, nameOfProp, location) {\n if (typeof amount !== \"number\") {\n throw new Error(`The \"${nameOfProp}\" prop ${location} must be a number, but you passed a value of type ${typeof amount}`);\n }\n if (isNaN(amount)) {\n throw new TypeError(`The \"${nameOfProp}\" prop ${location} must not be NaN, but is NaN.`);\n }\n if (!Number.isFinite(amount)) {\n throw new TypeError(`The \"${nameOfProp}\" prop ${location} must be finite, but is ${amount}.`);\n }\n if (amount % 1 !== 0) {\n throw new TypeError(`The \"${nameOfProp}\" prop ${location} must be an integer, but is ${amount}.`);\n }\n if (amount <= 0) {\n throw new TypeError(`The \"${nameOfProp}\" prop ${location} must be positive, but got ${amount}.`);\n }\n}\n\n// src/validation/validate-duration-in-frames.ts\nfunction validateDurationInFrames(durationInFrames, options) {\n const { allowFloats, component } = options;\n if (typeof durationInFrames === \"undefined\") {\n throw new Error(`The \"durationInFrames\" prop ${component} is missing.`);\n }\n if (typeof durationInFrames !== \"number\") {\n throw new Error(`The \"durationInFrames\" prop ${component} must be a number, but you passed a value of type ${typeof durationInFrames}`);\n }\n if (durationInFrames <= 0) {\n throw new TypeError(`The \"durationInFrames\" prop ${component} must be positive, but got ${durationInFrames}.`);\n }\n if (!allowFloats && durationInFrames % 1 !== 0) {\n throw new TypeError(`The \"durationInFrames\" prop ${component} must be an integer, but got ${durationInFrames}.`);\n }\n if (!Number.isFinite(durationInFrames)) {\n throw new TypeError(`The \"durationInFrames\" prop ${component} must be finite, but got ${durationInFrames}.`);\n }\n}\n\n// src/validation/validate-fps.ts\nfunction validateFps(fps, location, isGif) {\n if (typeof fps !== \"number\") {\n throw new Error(`\"fps\" must be a number, but you passed a value of type ${typeof fps} ${location}`);\n }\n if (!Number.isFinite(fps)) {\n throw new Error(`\"fps\" must be a finite, but you passed ${fps} ${location}`);\n }\n if (isNaN(fps)) {\n throw new Error(`\"fps\" must not be NaN, but got ${fps} ${location}`);\n }\n if (fps <= 0) {\n throw new TypeError(`\"fps\" must be positive, but got ${fps} ${location}`);\n }\n if (isGif && fps > 50) {\n throw new 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`);\n }\n}\n\n// src/resolve-video-config.ts\nvar validateCalculated = ({\n calculated,\n compositionId,\n compositionFps,\n compositionHeight,\n compositionWidth,\n compositionDurationInFrames\n}) => {\n const calculateMetadataErrorLocation = `calculated by calculateMetadata() for the composition \"${compositionId}\"`;\n const defaultErrorLocation = `of the \"<Composition />\" component with the id \"${compositionId}\"`;\n const width = calculated?.width ?? compositionWidth ?? undefined;\n validateDimension(width, \"width\", calculated?.width ? calculateMetadataErrorLocation : defaultErrorLocation);\n const height = calculated?.height ?? compositionHeight ?? undefined;\n validateDimension(height, \"height\", calculated?.height ? calculateMetadataErrorLocation : defaultErrorLocation);\n const fps = calculated?.fps ?? compositionFps ?? null;\n validateFps(fps, calculated?.fps ? calculateMetadataErrorLocation : defaultErrorLocation, false);\n const durationInFrames = calculated?.durationInFrames ?? compositionDurationInFrames ?? null;\n validateDurationInFrames(durationInFrames, {\n allowFloats: false,\n component: `of the \"<Composition />\" component with the id \"${compositionId}\"`\n });\n const defaultCodec = calculated?.defaultCodec;\n validateDefaultCodec(defaultCodec, calculateMetadataErrorLocation);\n return { width, height, fps, durationInFrames, defaultCodec };\n};\nvar resolveVideoConfig = ({\n calculateMetadata,\n signal,\n defaultProps,\n originalProps,\n compositionId,\n compositionDurationInFrames,\n compositionFps,\n compositionHeight,\n compositionWidth\n}) => {\n const calculatedProm = calculateMetadata ? calculateMetadata({\n defaultProps,\n props: originalProps,\n abortSignal: signal,\n compositionId\n }) : null;\n if (calculatedProm !== null && typeof calculatedProm === \"object\" && \"then\" in calculatedProm) {\n return calculatedProm.then((c) => {\n const { height, width, durationInFrames, fps, defaultCodec } = validateCalculated({\n calculated: c,\n compositionDurationInFrames,\n compositionFps,\n compositionHeight,\n compositionWidth,\n compositionId\n });\n return {\n width,\n height,\n fps,\n durationInFrames,\n id: compositionId,\n defaultProps: serializeThenDeserializeInStudio(defaultProps),\n props: serializeThenDeserializeInStudio(c.props ?? originalProps),\n defaultCodec: defaultCodec ?? null\n };\n });\n }\n const data = validateCalculated({\n calculated: calculatedProm,\n compositionDurationInFrames,\n compositionFps,\n compositionHeight,\n compositionWidth,\n compositionId\n });\n if (calculatedProm === null) {\n return {\n ...data,\n id: compositionId,\n defaultProps: serializeThenDeserializeInStudio(defaultProps ?? {}),\n props: serializeThenDeserializeInStudio(originalProps),\n defaultCodec: null\n };\n }\n return {\n ...data,\n id: compositionId,\n defaultProps: serializeThenDeserializeInStudio(defaultProps ?? {}),\n props: serializeThenDeserializeInStudio(calculatedProm.props ?? originalProps),\n defaultCodec: calculatedProm.defaultCodec ?? null\n };\n};\nvar resolveVideoConfigOrCatch = (params) => {\n try {\n const promiseOrReturnValue = resolveVideoConfig(params);\n return {\n type: \"success\",\n result: promiseOrReturnValue\n };\n } catch (err) {\n return {\n type: \"error\",\n error: err\n };\n }\n};\n\n// src/ResolveCompositionConfig.tsx\nimport { jsx as jsx6 } from \"react/jsx-runtime\";\nvar ResolveCompositionContext = createContext8(null);\nvar resolveCompositionsRef = createRef();\nvar needsResolution = (composition) => {\n return Boolean(composition.calculateMetadata);\n};\nvar PROPS_UPDATED_EXTERNALLY = \"remotion.propsUpdatedExternally\";\nvar ResolveCompositionConfig = ({ children }) => {\n const [currentRenderModalComposition, setCurrentRenderModalComposition] = useState4(null);\n const { compositions, canvasContent, currentCompositionMetadata } = useContext5(CompositionManager);\n const { fastRefreshes } = useContext5(NonceContext);\n const selectedComposition = useMemo5(() => {\n return compositions.find((c) => canvasContent && canvasContent.type === \"composition\" && canvasContent.compositionId === c.id);\n }, [canvasContent, compositions]);\n const renderModalComposition = compositions.find((c) => c.id === currentRenderModalComposition);\n const { props: allEditorProps } = useContext5(EditorPropsContext);\n const inputProps = useMemo5(() => {\n return typeof window === \"undefined\" || getRemotionEnvironment().isPlayer ? {} : getInputProps() ?? {};\n }, []);\n const [resolvedConfigs, setResolvedConfigs] = useState4({});\n const selectedEditorProps = useMemo5(() => {\n return selectedComposition ? allEditorProps[selectedComposition.id] ?? {} : {};\n }, [allEditorProps, selectedComposition]);\n const renderModalProps = useMemo5(() => {\n return renderModalComposition ? allEditorProps[renderModalComposition.id] ?? {} : {};\n }, [allEditorProps, renderModalComposition]);\n const hasResolution = Boolean(currentCompositionMetadata);\n const doResolution = useCallback3(({\n calculateMetadata,\n combinedProps,\n compositionDurationInFrames,\n compositionFps,\n compositionHeight,\n compositionId,\n compositionWidth,\n defaultProps\n }) => {\n const controller = new AbortController;\n if (hasResolution) {\n return controller;\n }\n const { signal } = controller;\n const result = resolveVideoConfigOrCatch({\n compositionId,\n calculateMetadata,\n originalProps: combinedProps,\n signal,\n defaultProps,\n compositionDurationInFrames,\n compositionFps,\n compositionHeight,\n compositionWidth\n });\n if (result.type === \"error\") {\n setResolvedConfigs((r) => ({\n ...r,\n [compositionId]: {\n type: \"error\",\n error: result.error\n }\n }));\n return controller;\n }\n const promOrNot = result.result;\n if (typeof promOrNot === \"object\" && \"then\" in promOrNot) {\n setResolvedConfigs((r) => {\n const prev = r[compositionId];\n if (prev?.type === \"success\" || prev?.type === \"success-and-refreshing\") {\n return {\n ...r,\n [compositionId]: {\n type: \"success-and-refreshing\",\n result: prev.result\n }\n };\n }\n return {\n ...r,\n [compositionId]: {\n type: \"loading\"\n }\n };\n });\n promOrNot.then((c) => {\n if (controller.signal.aborted) {\n return;\n }\n setResolvedConfigs((r) => ({\n ...r,\n [compositionId]: {\n type: \"success\",\n result: c\n }\n }));\n }).catch((err) => {\n if (controller.signal.aborted) {\n return;\n }\n setResolvedConfigs((r) => ({\n ...r,\n [compositionId]: {\n type: \"error\",\n error: err\n }\n }));\n });\n } else {\n setResolvedConfigs((r) => ({\n ...r,\n [compositionId]: {\n type: \"success\",\n result: promOrNot\n }\n }));\n }\n return controller;\n }, [hasResolution]);\n const currentComposition = canvasContent?.type === \"composition\" ? canvasContent.compositionId : null;\n useImperativeHandle2(resolveCompositionsRef, () => {\n return {\n setCurrentRenderModalComposition: (id) => {\n setCurrentRenderModalComposition(id);\n },\n reloadCurrentlySelectedComposition: () => {\n if (!currentComposition) {\n return;\n }\n const composition = compositions.find((c) => c.id === currentComposition);\n if (!composition) {\n throw new Error(`Could not find composition with id ${currentComposition}`);\n }\n const editorProps = allEditorProps[currentComposition] ?? {};\n const defaultProps = {\n ...composition.defaultProps ?? {},\n ...editorProps ?? {}\n };\n const props = {\n ...defaultProps,\n ...inputProps ?? {}\n };\n doResolution({\n defaultProps,\n calculateMetadata: composition.calculateMetadata,\n combinedProps: props,\n compositionDurationInFrames: composition.durationInFrames ?? null,\n compositionFps: composition.fps ?? null,\n compositionHeight: composition.height ?? null,\n compositionWidth: composition.width ?? null,\n compositionId: composition.id\n });\n }\n };\n }, [\n allEditorProps,\n compositions,\n currentComposition,\n doResolution,\n inputProps\n ]);\n const isTheSame = selectedComposition?.id === renderModalComposition?.id;\n const currentDefaultProps = useMemo5(() => {\n return {\n ...selectedComposition?.defaultProps ?? {},\n ...selectedEditorProps ?? {}\n };\n }, [selectedComposition?.defaultProps, selectedEditorProps]);\n const originalProps = useMemo5(() => {\n return {\n ...currentDefaultProps,\n ...inputProps ?? {}\n };\n }, [currentDefaultProps, inputProps]);\n const canResolve = selectedComposition && needsResolution(selectedComposition);\n const shouldIgnoreUpdate = typeof window !== \"undefined\" && window.remotion_ignoreFastRefreshUpdate && fastRefreshes <= window.remotion_ignoreFastRefreshUpdate;\n useEffect4(() => {\n if (shouldIgnoreUpdate) {\n return;\n }\n if (canResolve) {\n const controller = doResolution({\n calculateMetadata: selectedComposition.calculateMetadata,\n combinedProps: originalProps,\n compositionDurationInFrames: selectedComposition.durationInFrames ?? null,\n compositionFps: selectedComposition.fps ?? null,\n compositionHeight: selectedComposition.height ?? null,\n compositionWidth: selectedComposition.width ?? null,\n defaultProps: currentDefaultProps,\n compositionId: selectedComposition.id\n });\n return () => {\n controller.abort();\n };\n }\n }, [\n canResolve,\n currentDefaultProps,\n doResolution,\n originalProps,\n selectedComposition?.calculateMetadata,\n selectedComposition?.durationInFrames,\n selectedComposition?.fps,\n selectedComposition?.height,\n selectedComposition?.id,\n selectedComposition?.width,\n shouldIgnoreUpdate\n ]);\n useEffect4(() => {\n if (shouldIgnoreUpdate) {\n return;\n }\n window.dispatchEvent(new CustomEvent(\"remotion.propsUpdatedExternally\"));\n }, [fastRefreshes]);\n useEffect4(() => {\n if (renderModalComposition && !isTheSame) {\n const combinedProps = {\n ...renderModalComposition.defaultProps ?? {},\n ...renderModalProps ?? {},\n ...inputProps ?? {}\n };\n const controller = doResolution({\n calculateMetadata: renderModalComposition.calculateMetadata,\n compositionDurationInFrames: renderModalComposition.durationInFrames ?? null,\n compositionFps: renderModalComposition.fps ?? null,\n compositionHeight: renderModalComposition.height ?? null,\n compositionId: renderModalComposition.id,\n compositionWidth: renderModalComposition.width ?? null,\n defaultProps: currentDefaultProps,\n combinedProps\n });\n return () => {\n controller.abort();\n };\n }\n }, [\n currentDefaultProps,\n doResolution,\n inputProps,\n isTheSame,\n renderModalComposition,\n renderModalProps\n ]);\n const resolvedConfigsIncludingStaticOnes = useMemo5(() => {\n const staticComps = compositions.filter((c) => {\n return c.calculateMetadata === null;\n });\n return {\n ...resolvedConfigs,\n ...staticComps.reduce((acc, curr) => {\n return {\n ...acc,\n [curr.id]: {\n type: \"success\",\n result: { ...curr, defaultProps: curr.defaultProps ?? {} }\n }\n };\n }, {})\n };\n }, [compositions, resolvedConfigs]);\n return /* @__PURE__ */ jsx6(ResolveCompositionContext.Provider, {\n value: resolvedConfigsIncludingStaticOnes,\n children\n });\n};\nvar useResolvedVideoConfig = (preferredCompositionId) => {\n const context = useContext5(ResolveCompositionContext);\n const { props: allEditorProps } = useContext5(EditorPropsContext);\n const { compositions, canvasContent, currentCompositionMetadata } = useContext5(CompositionManager);\n const currentComposition = canvasContent?.type === \"composition\" ? canvasContent.compositionId : null;\n const compositionId = preferredCompositionId ?? currentComposition;\n const composition = compositions.find((c) => c.id === compositionId);\n const selectedEditorProps = useMemo5(() => {\n return composition ? allEditorProps[composition.id] ?? {} : {};\n }, [allEditorProps, composition]);\n return useMemo5(() => {\n if (!composition) {\n return null;\n }\n if (currentCompositionMetadata) {\n return {\n type: \"success\",\n result: {\n ...currentCompositionMetadata,\n id: composition.id,\n props: currentCompositionMetadata.props,\n defaultProps: composition.defaultProps ?? {},\n defaultCodec: currentCompositionMetadata.defaultCodec\n }\n };\n }\n if (!needsResolution(composition)) {\n validateDurationInFrames(composition.durationInFrames, {\n allowFloats: false,\n component: `in <Composition id=\"${composition.id}\">`\n });\n validateFps(composition.fps, `in <Composition id=\"${composition.id}\">`, false);\n validateDimension(composition.width, \"width\", `in <Composition id=\"${composition.id}\">`);\n validateDimension(composition.height, \"height\", `in <Composition id=\"${composition.id}\">`);\n return {\n type: \"success\",\n result: {\n width: composition.width,\n height: composition.height,\n fps: composition.fps,\n id: composition.id,\n durationInFrames: composition.durationInFrames,\n defaultProps: composition.defaultProps ?? {},\n props: {\n ...composition.defaultProps ?? {},\n ...selectedEditorProps ?? {},\n ...typeof window === \"undefined\" || getRemotionEnvironment().isPlayer ? {} : getInputProps() ?? {}\n },\n defaultCodec: null\n }\n };\n }\n if (!context[composition.id]) {\n return null;\n }\n return context[composition.id];\n }, [composition, context, currentCompositionMetadata, selectedEditorProps]);\n};\n\n// src/use-video.ts\nvar useVideo = () => {\n const { canvasContent, compositions, currentCompositionMetadata } = useContext6(CompositionManager);\n const selected = compositions.find((c) => {\n return canvasContent?.type === \"composition\" && c.id === canvasContent.compositionId;\n });\n const resolved = useResolvedVideoConfig(selected?.id ?? null);\n return useMemo6(() => {\n if (!resolved) {\n return null;\n }\n if (resolved.type === \"error\") {\n return null;\n }\n if (resolved.type === \"loading\") {\n return null;\n }\n if (!selected) {\n return null;\n }\n return {\n ...resolved.result,\n defaultProps: selected.defaultProps ?? {},\n id: selected.id,\n ...currentCompositionMetadata ?? {},\n component: selected.component\n };\n }, [currentCompositionMetadata, resolved, selected]);\n};\n\n// src/timeline-position-state.ts\nvar TimelineContext = createContext9({\n frame: {},\n playing: false,\n playbackRate: 1,\n rootId: \"\",\n imperativePlaying: {\n current: false\n },\n setPlaybackRate: () => {\n throw new Error(\"default\");\n },\n audioAndVideoTags: { current: [] }\n});\nvar SetTimelineContext = createContext9({\n setFrame: () => {\n throw new Error(\"default\");\n },\n setPlaying: () => {\n throw new Error(\"default\");\n }\n});\nvar makeKey = () => {\n return `remotion.time-all`;\n};\nvar persistCurrentFrame = (time) => {\n localStorage.setItem(makeKey(), JSON.stringify(time));\n};\nvar getInitialFrameState = () => {\n const item = localStorage.getItem(makeKey()) ?? \"{}\";\n const obj = JSON.parse(item);\n return obj;\n};\nvar getFrameForComposition = (composition) => {\n const item = localStorage.getItem(makeKey()) ?? \"{}\";\n const obj = JSON.parse(item);\n if (obj[composition] !== undefined) {\n return Number(obj[composition]);\n }\n if (typeof window === \"undefined\") {\n return 0;\n }\n return window.remotion_initialFrame ?? 0;\n};\nvar useTimelinePosition = () => {\n const videoConfig = useVideo();\n const state = useContext7(TimelineContext);\n if (!videoConfig) {\n return typeof window === \"undefined\" ? 0 : window.remotion_initialFrame ?? 0;\n }\n const unclamped = state.frame[videoConfig.id] ?? (getRemotionEnvironment().isPlayer ? 0 : getFrameForComposition(videoConfig.id));\n return Math.min(videoConfig.durationInFrames - 1, unclamped);\n};\nvar useTimelineSetFrame = () => {\n const { setFrame } = useContext7(SetTimelineContext);\n return setFrame;\n};\nvar usePlayingState = () => {\n const { playing, imperativePlaying } = useContext7(TimelineContext);\n const { setPlaying } = useContext7(SetTimelineContext);\n return useMemo7(() => [playing, setPlaying, imperativePlaying], [imperativePlaying, playing, setPlaying]);\n};\n\n// src/use-video-config.ts\nimport { useContext as useContext9 } from \"react\";\n\n// src/CanUseRemotionHooks.tsx\nimport { createContext as createContext10 } from \"react\";\nimport { jsx as jsx7 } from \"react/jsx-runtime\";\nvar CanUseRemotionHooks = createContext10(false);\nvar CanUseRemotionHooksProvider = ({ children }) => {\n return /* @__PURE__ */ jsx7(CanUseRemotionHooks.Provider, {\n value: true,\n children\n });\n};\n\n// src/use-unsafe-video-config.ts\nimport { useContext as useContext8, useMemo as useMemo8 } from \"react\";\nvar useUnsafeVideoConfig = () => {\n const context = useContext8(SequenceContext);\n const ctxWidth = context?.width ?? null;\n const ctxHeight = context?.height ?? null;\n const ctxDuration = context?.durationInFrames ?? null;\n const video = useVideo();\n return useMemo8(() => {\n if (!video) {\n return null;\n }\n const {\n id,\n durationInFrames,\n fps,\n height,\n width,\n defaultProps,\n props,\n defaultCodec\n } = video;\n return {\n id,\n width: ctxWidth ?? width,\n height: ctxHeight ?? height,\n fps,\n durationInFrames: ctxDuration ?? durationInFrames,\n defaultProps,\n props,\n defaultCodec\n };\n }, [ctxDuration, ctxHeight, ctxWidth, video]);\n};\n\n// src/use-video-config.ts\nvar useVideoConfig = () => {\n const videoConfig = useUnsafeVideoConfig();\n const context = useContext9(CanUseRemotionHooks);\n const isPlayer = useIsPlayer();\n if (!videoConfig) {\n if (typeof window !== \"undefined\" && window.remotion_isPlayer || isPlayer) {\n throw new Error([\n \"No video config found. Likely reasons:\",\n \"- 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.\",\n \"- You have multiple versions of Remotion installed which causes the React context to get lost.\"\n ].join(\"-\"));\n }\n throw new 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.\");\n }\n if (!context) {\n throw new Error(\"Called useVideoConfig() outside a Remotion composition.\");\n }\n return videoConfig;\n};\n\n// src/freeze.tsx\nimport { useContext as useContext11, useMemo as useMemo9 } from \"react\";\n\n// src/use-current-frame.ts\nimport { useContext as useContext10 } from \"react\";\nvar useCurrentFrame = () => {\n const canUseRemotionHooks = useContext10(CanUseRemotionHooks);\n if (!canUseRemotionHooks) {\n if (getRemotionEnvironment().isPlayer) {\n throw new Error(`useCurrentFrame can only be called inside a component that was passed to <Player>. See: https://www.remotion.dev/docs/player/examples`);\n }\n throw new 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`);\n }\n const frame = useTimelinePosition();\n const context = useContext10(SequenceContext);\n const contextOffset = context ? context.cumulatedFrom + context.relativeFrom : 0;\n return frame - contextOffset;\n};\n\n// src/freeze.tsx\nimport { jsx as jsx8 } from \"react/jsx-runtime\";\nvar Freeze = ({\n frame: frameToFreeze,\n children,\n active = true\n}) => {\n const frame = useCurrentFrame();\n const videoConfig = useVideoConfig();\n if (typeof frameToFreeze === \"undefined\") {\n throw new Error(`The <Freeze /> component requires a 'frame' prop, but none was passed.`);\n }\n if (typeof frameToFreeze !== \"number\") {\n throw new Error(`The 'frame' prop of <Freeze /> must be a number, but is of type ${typeof frameToFreeze}`);\n }\n if (Number.isNaN(frameToFreeze)) {\n throw new Error(`The 'frame' prop of <Freeze /> must be a real number, but it is NaN.`);\n }\n if (!Number.isFinite(frameToFreeze)) {\n throw new Error(`The 'frame' prop of <Freeze /> must be a finite number, but it is ${frameToFreeze}.`);\n }\n const isActive = useMemo9(() => {\n if (typeof active === \"boolean\") {\n return active;\n }\n if (typeof active === \"function\") {\n return active(frame);\n }\n }, [active, frame]);\n const timelineContext = useContext11(TimelineContext);\n const sequenceContext = useContext11(SequenceContext);\n const relativeFrom = sequenceContext?.relativeFrom ?? 0;\n const timelineValue = useMemo9(() => {\n if (!isActive) {\n return timelineContext;\n }\n return {\n ...timelineContext,\n playing: false,\n imperativePlaying: {\n current: false\n },\n frame: {\n [videoConfig.id]: frameToFreeze + relativeFrom\n }\n };\n }, [isActive, timelineContext, videoConfig.id, frameToFreeze, relativeFrom]);\n return /* @__PURE__ */ jsx8(TimelineContext.Provider, {\n value: timelineValue,\n children\n });\n};\n\n// src/Sequence.tsx\nimport { jsx as jsx9 } from \"react/jsx-runtime\";\nvar RegularSequenceRefForwardingFunction = ({\n from = 0,\n durationInFrames = Infinity,\n children,\n name,\n height,\n width,\n showInTimeline = true,\n _remotionInternalLoopDisplay: loopDisplay,\n _remotionInternalStack: stack,\n _remotionInternalPremountDisplay: premountDisplay,\n ...other\n}, ref) => {\n const { layout = \"absolute-fill\" } = other;\n const [id] = useState5(() => String(Math.random()));\n const parentSequence = useContext12(SequenceContext);\n const { rootId } = useContext12(TimelineContext);\n const cumulatedFrom = parentSequence ? parentSequence.cumulatedFrom + parentSequence.relativeFrom : 0;\n const nonce = useNonce();\n if (layout !== \"absolute-fill\" && layout !== \"none\") {\n throw new TypeError(`The layout prop of <Sequence /> expects either \"absolute-fill\" or \"none\", but you passed: ${layout}`);\n }\n if (layout === \"none\" && typeof other.style !== \"undefined\") {\n throw new TypeError('If layout=\"none\", you may not pass a style.');\n }\n if (typeof durationInFrames !== \"number\") {\n throw new TypeError(`You passed to durationInFrames an argument of type ${typeof durationInFrames}, but it must be a number.`);\n }\n if (durationInFrames <= 0) {\n throw new TypeError(`durationInFrames must be positive, but got ${durationInFrames}`);\n }\n if (typeof from !== \"number\") {\n throw new TypeError(`You passed to the \"from\" props of your <Sequence> an argument of type ${typeof from}, but it must be a number.`);\n }\n if (!Number.isFinite(from)) {\n throw new TypeError(`The \"from\" prop of a sequence must be finite, but got ${from}.`);\n }\n const absoluteFrame = useTimelinePosition();\n const videoConfig = useVideoConfig();\n const parentSequenceDuration = parentSequence ? Math.min(parentSequence.durationInFrames - from, durationInFrames) : durationInFrames;\n const actualDurationInFrames = Math.max(0, Math.min(videoConfig.durationInFrames - from, parentSequenceDuration));\n const { registerSequence, unregisterSequence } = useContext12(SequenceManager);\n const { hidden } = useContext12(SequenceVisibilityToggleContext);\n const premounting = useMemo10(() => {\n return parentSequence?.premounting ?? Boolean(other._remotionInternalIsPremounting);\n }, [other._remotionInternalIsPremounting, parentSequence?.premounting]);\n const contextValue = useMemo10(() => {\n return {\n cumulatedFrom,\n relativeFrom: from,\n durationInFrames: actualDurationInFrames,\n parentFrom: parentSequence?.relativeFrom ?? 0,\n id,\n height: height ?? parentSequence?.height ?? null,\n width: width ?? parentSequence?.width ?? null,\n premounting\n };\n }, [\n cumulatedFrom,\n from,\n actualDurationInFrames,\n parentSequence,\n id,\n height,\n width,\n premounting\n ]);\n const timelineClipName = useMemo10(() => {\n return name ?? \"\";\n }, [name]);\n useEffect5(() => {\n if (!getRemotionEnvironment().isStudio) {\n return;\n }\n registerSequence({\n from,\n duration: actualDurationInFrames,\n id,\n displayName: timelineClipName,\n parent: parentSequence?.id ?? null,\n type: \"sequence\",\n rootId,\n showInTimeline,\n nonce,\n loopDisplay,\n stack: stack ?? null,\n premountDisplay: premountDisplay ?? null\n });\n return () => {\n unregisterSequence(id);\n };\n }, [\n durationInFrames,\n id,\n name,\n registerSequence,\n timelineClipName,\n unregisterSequence,\n parentSequence?.id,\n actualDurationInFrames,\n rootId,\n from,\n showInTimeline,\n nonce,\n loopDisplay,\n stack,\n premountDisplay\n ]);\n const endThreshold = Math.ceil(cumulatedFrom + from + durationInFrames - 1);\n const content = absoluteFrame < cumulatedFrom + from ? null : absoluteFrame > endThreshold ? null : children;\n const styleIfThere = other.layout === \"none\" ? undefined : other.style;\n const defaultStyle = useMemo10(() => {\n return {\n flexDirection: undefined,\n ...width ? { width } : {},\n ...height ? { height } : {},\n ...styleIfThere ?? {}\n };\n }, [height, styleIfThere, width]);\n if (ref !== null && layout === \"none\") {\n throw new TypeError('It is not supported to pass both a `ref` and `layout=\"none\"` to <Sequence />.');\n }\n const isSequenceHidden = hidden[id] ?? false;\n if (isSequenceHidden) {\n return null;\n }\n return /* @__PURE__ */ jsx9(SequenceContext.Provider, {\n value: contextValue,\n children: content === null ? null : other.layout === \"none\" ? content : /* @__PURE__ */ jsx9(AbsoluteFill, {\n ref,\n style: defaultStyle,\n className: other.className,\n children: content\n })\n });\n};\nvar RegularSequence = forwardRef2(RegularSequenceRefForwardingFunction);\nvar PremountedSequenceRefForwardingFunction = (props, ref) => {\n const frame = useCurrentFrame();\n if (props.layout === \"none\") {\n throw new Error('`<Sequence>` with `premountFor` prop does not support layout=\"none\"');\n }\n const { style: passedStyle, from = 0, premountFor = 0, ...otherProps } = props;\n const premountingActive = frame < from && frame >= from - premountFor;\n const style = useMemo10(() => {\n return {\n ...passedStyle,\n opacity: premountingActive ? 0 : 1,\n pointerEvents: premountingActive ? \"none\" : passedStyle?.pointerEvents ?? undefined\n };\n }, [premountingActive, passedStyle]);\n return /* @__PURE__ */ jsx9(Freeze, {\n frame: from,\n active: premountingActive,\n children: /* @__PURE__ */ jsx9(Sequence, {\n ref,\n from,\n style,\n _remotionInternalPremountDisplay: premountFor,\n _remotionInternalIsPremounting: premountingActive,\n ...otherProps\n })\n });\n};\nvar PremountedSequence = forwardRef2(PremountedSequenceRefForwardingFunction);\nvar SequenceRefForwardingFunction = (props, ref) => {\n if (props.layout !== \"none\" && props.premountFor && !getRemotionEnvironment().isRendering) {\n return /* @__PURE__ */ jsx9(PremountedSequence, {\n ...props,\n ref\n });\n }\n return /* @__PURE__ */ jsx9(RegularSequence, {\n ...props,\n ref\n });\n};\nvar Sequence = forwardRef2(SequenceRefForwardingFunction);\n// src/Artifact.tsx\nimport { useContext as useContext13, useEffect as useEffect6, useState as useState7 } from \"react\";\n\n// src/RenderAssetManager.tsx\nimport {\n createContext as createContext11,\n useCallback as useCallback4,\n useLayoutEffect as useLayoutEffect2,\n useMemo as useMemo11,\n useState as useState6\n} from \"react\";\n\n// src/validation/validate-artifact.ts\nvar validateArtifactFilename = (filename) => {\n if (typeof filename !== \"string\") {\n throw new TypeError(`The \"filename\" must be a string, but you passed a value of type ${typeof filename}`);\n }\n if (filename.trim() === \"\") {\n throw new Error(\"The `filename` must not be empty\");\n }\n if (!filename.match(/^([0-9a-zA-Z-!_.*'()/:&$@=;+,?]+)/g)) {\n throw new Error('The `filename` must match \"/^([0-9a-zA-Z-!_.*\\'()/:&$@=;+,?]+)/g\". Use forward slashes only, even on Windows.');\n }\n};\nvar validateContent = (content) => {\n if (typeof content !== \"string\" && !(content instanceof Uint8Array)) {\n throw new TypeError(`The \"content\" must be a string or Uint8Array, but you passed a value of type ${typeof content}`);\n }\n if (typeof content === \"string\" && content.trim() === \"\") {\n throw new Error(\"The `content` must not be empty\");\n }\n};\nvar validateRenderAsset = (artifact) => {\n if (artifact.type !== \"artifact\") {\n return;\n }\n validateArtifactFilename(artifact.filename);\n validateContent(artifact.content);\n};\n\n// src/RenderAssetManager.tsx\nimport { jsx as jsx10 } from \"react/jsx-runtime\";\nvar RenderAssetManager = createContext11({\n registerRenderAsset: () => {\n return;\n },\n unregisterRenderAsset: () => {\n return;\n },\n renderAssets: []\n});\nvar RenderAssetManagerProvider = ({ children }) => {\n const [renderAssets, setRenderAssets] = useState6([]);\n const registerRenderAsset = useCallback4((renderAsset) => {\n validateRenderAsset(renderAsset);\n setRenderAssets((assets) => {\n return [...assets, renderAsset];\n });\n }, []);\n const unregisterRenderAsset = useCallback4((id) => {\n setRenderAssets((assts) => {\n return assts.filter((a) => a.id !== id);\n });\n }, []);\n useLayoutEffect2(() => {\n if (typeof window !== \"undefined\") {\n window.remotion_collectAssets = () => {\n setRenderAssets([]);\n return renderAssets;\n };\n }\n }, [renderAssets]);\n const contextValue = useMemo11(() => {\n return {\n registerRenderAsset,\n unregisterRenderAsset,\n renderAssets\n };\n }, [renderAssets, registerRenderAsset, unregisterRenderAsset]);\n return /* @__PURE__ */ jsx10(RenderAssetManager.Provider, {\n value: contextValue,\n children\n });\n};\n\n// src/Artifact.tsx\nvar Artifact = ({ filename, content }) => {\n const { registerRenderAsset, unregisterRenderAsset } = useContext13(RenderAssetManager);\n const [env] = useState7(() => getRemotionEnvironment());\n const frame = useCurrentFrame();\n const [id] = useState7(() => {\n return String(Math.random());\n });\n useEffect6(() => {\n if (!env.isRendering) {\n return;\n }\n if (content instanceof Uint8Array) {\n registerRenderAsset({\n type: \"artifact\",\n id,\n content: btoa(new TextDecoder(\"utf8\").decode(content)),\n filename,\n frame,\n binary: true\n });\n } else {\n registerRenderAsset({\n type: \"artifact\",\n id,\n content,\n filename,\n frame,\n binary: false\n });\n }\n return () => {\n return unregisterRenderAsset(id);\n };\n }, [\n content,\n env.isRendering,\n filename,\n frame,\n id,\n registerRenderAsset,\n unregisterRenderAsset\n ]);\n return null;\n};\n// src/audio/Audio.tsx\nimport { forwardRef as forwardRef5, useCallback as useCallback9, useContext as useContext23 } from \"react\";\n\n// src/absolute-src.ts\nvar getAbsoluteSrc = (relativeSrc) => {\n if (typeof window === \"undefined\") {\n return relativeSrc;\n }\n return new URL(relativeSrc, window.origin).href;\n};\n\n// src/calculate-loop.ts\nvar calculateLoopDuration = ({\n endAt,\n mediaDuration,\n playbackRate,\n startFrom\n}) => {\n let duration = mediaDuration;\n if (typeof endAt !== \"undefined\") {\n duration = endAt;\n }\n if (typeof startFrom !== \"undefined\") {\n duration -= startFrom;\n }\n const actualDuration = duration / playbackRate;\n return Math.floor(actualDuration);\n};\n\n// src/cancel-render.ts\nfunction cancelRender(err) {\n let error;\n if (isErrorLike(err)) {\n error = err;\n if (!error.stack) {\n error.stack = new Error(error.message).stack;\n }\n } else if (typeof err === \"string\") {\n error = Error(err);\n } else {\n error = Error(\"Rendering was cancelled\");\n }\n window.remotion_cancelledError = error.stack;\n throw error;\n}\nvar isErrorLike = (err) => {\n if (err instanceof Error) {\n return true;\n }\n if (err === null) {\n return false;\n }\n if (typeof err !== \"object\") {\n return false;\n }\n if (!(\"stack\" in err)) {\n return false;\n }\n if (typeof err.stack !== \"string\") {\n return false;\n }\n if (!(\"message\" in err)) {\n return false;\n }\n if (typeof err.message !== \"string\") {\n return false;\n }\n return true;\n};\n\n// src/loop/index.tsx\nimport React8, { createContext as createContext12, useMemo as useMemo12 } from \"react\";\nimport { jsx as jsx11 } from \"react/jsx-runtime\";\nvar LoopContext = createContext12(null);\nvar useLoop = () => {\n return React8.useContext(LoopContext);\n};\nvar Loop = ({ durationInFrames, times = Infinity, children, name, ...props }) => {\n const currentFrame = useCurrentFrame();\n const { durationInFrames: compDuration } = useVideoConfig();\n validateDurationInFrames(durationInFrames, {\n component: \"of the <Loop /> component\",\n allowFloats: true\n });\n if (typeof times !== \"number\") {\n throw new TypeError(`You passed to \"times\" an argument of type ${typeof times}, but it must be a number.`);\n }\n if (times !== Infinity && times % 1 !== 0) {\n throw new TypeError(`The \"times\" prop of a loop must be an integer, but got ${times}.`);\n }\n if (times < 0) {\n throw new TypeError(`The \"times\" prop of a loop must be at least 0, but got ${times}`);\n }\n const maxTimes = Math.ceil(compDuration / durationInFrames);\n const actualTimes = Math.min(maxTimes, times);\n const style = props.layout === \"none\" ? undefined : props.style;\n const maxFrame = durationInFrames * (actualTimes - 1);\n const iteration = Math.floor(currentFrame / durationInFrames);\n const start = iteration * durationInFrames;\n const from = Math.min(start, maxFrame);\n const loopDisplay = useMemo12(() => {\n return {\n numberOfTimes: actualTimes,\n startOffset: -from,\n durationInFrames\n };\n }, [actualTimes, durationInFrames, from]);\n const loopContext = useMemo12(() => {\n return {\n iteration: Math.floor(currentFrame / durationInFrames),\n durationInFrames\n };\n }, [currentFrame, durationInFrames]);\n return /* @__PURE__ */ jsx11(LoopContext.Provider, {\n value: loopContext,\n children: /* @__PURE__ */ jsx11(Sequence, {\n durationInFrames,\n from,\n name: name ?? \"<Loop>\",\n _remotionInternalLoopDisplay: loopDisplay,\n layout: props.layout,\n style,\n children\n })\n });\n};\nLoop.useLoop = useLoop;\n\n// src/prefetch.ts\nimport { useContext as useContext14 } from \"react\";\n\n// src/prefetch-state.tsx\nimport { createContext as createContext13, useEffect as useEffect7, useState as useState8 } from \"react\";\nimport { jsx as jsx12 } from \"react/jsx-runtime\";\nvar PreloadContext = createContext13({});\nvar preloads = {};\nvar updaters = [];\nvar setPreloads = (updater) => {\n preloads = updater(preloads);\n updaters.forEach((u) => u());\n};\nvar PrefetchProvider = ({ children }) => {\n const [_preloads, _setPreloads] = useState8(() => preloads);\n useEffect7(() => {\n const updaterFunction = () => {\n _setPreloads(preloads);\n };\n updaters.push(updaterFunction);\n return () => {\n updaters = updaters.filter((u) => u !== updaterFunction);\n };\n }, []);\n return /* @__PURE__ */ jsx12(PreloadContext.Provider, {\n value: _preloads,\n children\n });\n};\n\n// src/prefetch.ts\nvar usePreload = (src) => {\n const preloads2 = useContext14(PreloadContext);\n return preloads2[src] ?? src;\n};\nvar blobToBase64 = function(blob) {\n const reader = new FileReader;\n return new Promise((resolve, reject) => {\n reader.onload = function() {\n const dataUrl = reader.result;\n resolve(dataUrl);\n };\n reader.onerror = (err) => {\n return reject(err);\n };\n reader.readAsDataURL(blob);\n });\n};\nvar getBlobFromReader = async ({\n reader,\n contentType,\n contentLength,\n onProgress\n}) => {\n let receivedLength = 0;\n const chunks = [];\n while (true) {\n const { done, value } = await reader.read();\n if (done) {\n break;\n }\n chunks.push(value);\n receivedLength += value.length;\n if (onProgress) {\n onProgress({ loadedBytes: receivedLength, totalBytes: contentLength });\n }\n }\n const chunksAll = new Uint8Array(receivedLength);\n let position = 0;\n for (const chunk of chunks) {\n chunksAll.set(chunk, position);\n position += chunk.length;\n }\n return new Blob([chunksAll], {\n type: contentType ?? undefined\n });\n};\nvar prefetch = (src, options) => {\n const method = options?.method ?? \"blob-url\";\n if (getRemotionEnvironment().isRendering) {\n return {\n free: () => {\n return;\n },\n waitUntilDone: () => Promise.resolve(src)\n };\n }\n let canceled = false;\n let objectUrl = null;\n let resolve = () => {\n return;\n };\n let reject = () => {\n return;\n };\n const waitUntilDone = new Promise((res, rej) => {\n resolve = res;\n reject = rej;\n });\n const controller = new AbortController;\n let canBeAborted = true;\n fetch(src, {\n signal: controller.signal\n }).then((res) => {\n canBeAborted = false;\n if (canceled) {\n return null;\n }\n if (!res.ok) {\n throw new Error(`HTTP error, status = ${res.status}`);\n }\n const headerContentType = res.headers.get(\"Content-Type\");\n const contentType = options?.contentType ?? headerContentType;\n const hasProperContentType = contentType && (contentType.startsWith(\"video/\") || contentType.startsWith(\"audio/\") || contentType.startsWith(\"image/\"));\n if (!hasProperContentType) {\n console.warn(`Called prefetch() on ${src} which returned a \"Content-Type\" of ${headerContentType}. Prefetched content should have a proper content type (video/... or audio/...) or a contentType passed the options of prefetch(). Otherwise, prefetching will not work properly in all browsers.`);\n }\n if (!res.body) {\n throw new Error(`HTTP response of ${src} has no body`);\n }\n const reader = res.body.getReader();\n return getBlobFromReader({\n reader,\n contentType: options?.contentType ?? headerContentType ?? null,\n contentLength: res.headers.get(\"Content-Length\") ? parseInt(res.headers.get(\"Content-Length\"), 10) : null,\n onProgress: options?.onProgress\n });\n }).then((buf) => {\n if (!buf) {\n return;\n }\n const actualBlob = options?.contentType ? new Blob([buf], { type: options.contentType }) : buf;\n if (method === \"base64\") {\n return blobToBase64(actualBlob);\n }\n return URL.createObjectURL(actualBlob);\n }).then((url) => {\n if (canceled) {\n return;\n }\n objectUrl = url;\n setPreloads((p) => ({\n ...p,\n [src]: objectUrl\n }));\n resolve(objectUrl);\n }).catch((err) => {\n reject(err);\n });\n return {\n free: () => {\n if (objectUrl) {\n if (method === \"blob-url\") {\n URL.revokeObjectURL(objectUrl);\n }\n setPreloads((p) => {\n const copy = { ...p };\n delete copy[src];\n return copy;\n });\n } else {\n canceled = true;\n if (canBeAborted) {\n try {\n controller.abort(new Error(\"free() called\"));\n } catch (e) {\n }\n }\n }\n },\n waitUntilDone: () => {\n return waitUntilDone;\n }\n };\n};\n\n// src/validate-media-props.ts\nvar validateMediaProps = (props, component) => {\n if (typeof props.volume !== \"number\" && typeof props.volume !== \"function\" && typeof props.volume !== \"undefined\") {\n throw new TypeError(`You have passed a volume of type ${typeof props.volume} to your <${component} /> component. Volume must be a number or a function with the signature '(frame: number) => number' undefined.`);\n }\n if (typeof props.volume === \"number\" && props.volume < 0) {\n throw new TypeError(`You have passed a volume below 0 to your <${component} /> component. Volume must be between 0 and 1`);\n }\n if (typeof props.playbackRate !== \"number\" && typeof props.playbackRate !== \"undefined\") {\n throw new TypeError(`You have passed a playbackRate of type ${typeof props.playbackRate} to your <${component} /> component. Playback rate must a real number or undefined.`);\n }\n if (typeof props.playbackRate === \"number\" && (isNaN(props.playbackRate) || !Number.isFinite(props.playbackRate) || props.playbackRate <= 0)) {\n throw new TypeError(`You have passed a playbackRate of ${props.playbackRate} to your <${component} /> component. Playback rate must be a real number above 0.`);\n }\n};\n\n// src/validate-start-from-props.ts\nvar validateStartFromProps = (startFrom, endAt) => {\n if (typeof startFrom !== \"undefined\") {\n if (typeof startFrom !== \"number\") {\n throw new TypeError(`type of startFrom prop must be a number, instead got type ${typeof startFrom}.`);\n }\n if (isNaN(startFrom) || startFrom === Infinity) {\n throw new TypeError(\"startFrom prop can not be NaN or Infinity.\");\n }\n if (startFrom < 0) {\n throw new TypeError(`startFrom must be greater than equal to 0 instead got ${startFrom}.`);\n }\n }\n if (typeof endAt !== \"undefined\") {\n if (typeof endAt !== \"number\") {\n throw new TypeError(`type of endAt prop must be a number, instead got type ${typeof endAt}.`);\n }\n if (isNaN(endAt)) {\n throw new TypeError(\"endAt prop can not be NaN.\");\n }\n if (endAt <= 0) {\n throw new TypeError(`endAt must be a positive number, instead got ${endAt}.`);\n }\n }\n if (endAt < startFrom) {\n throw new TypeError(\"endAt prop must be greater than startFrom prop.\");\n }\n};\n\n// src/video/duration-state.tsx\nimport { createContext as createContext14, useMemo as useMemo13, useReducer } from \"react\";\nimport { jsx as jsx13 } from \"react/jsx-runtime\";\nvar durationReducer = (state, action) => {\n switch (action.type) {\n case \"got-duration\": {\n const absoluteSrc = getAbsoluteSrc(action.src);\n if (state[absoluteSrc] === action.durationInSeconds) {\n return state;\n }\n return {\n ...state,\n [absoluteSrc]: action.durationInSeconds\n };\n }\n default:\n return state;\n }\n};\nvar DurationsContext = createContext14({\n durations: {},\n setDurations: () => {\n throw new Error(\"context missing\");\n }\n});\nvar DurationsContextProvider = ({ children }) => {\n const [durations, setDurations] = useReducer(durationReducer, {});\n const value = useMemo13(() => {\n return {\n durations,\n setDurations\n };\n }, [durations]);\n return /* @__PURE__ */ jsx13(DurationsContext.Provider, {\n value,\n children\n });\n};\n\n// src/audio/AudioForPreview.tsx\nimport {\n forwardRef as forwardRef3,\n useContext as useContext21,\n useEffect as useEffect16,\n useImperativeHandle as useImperativeHandle3,\n useMemo as useMemo20,\n useRef as useRef8,\n useState as useState14\n} from \"react\";\n\n// src/random.ts\nfunction mulberry32(a) {\n let t = a + 1831565813;\n t = Math.imul(t ^ t >>> 15, t | 1);\n t ^= t + Math.imul(t ^ t >>> 7, t | 61);\n return ((t ^ t >>> 14) >>> 0) / 4294967296;\n}\nfunction hashCode(str) {\n let i = 0;\n let chr = 0;\n let hash = 0;\n for (i = 0;i < str.length; i++) {\n chr = str.charCodeAt(i);\n hash = (hash << 5) - hash + chr;\n hash |= 0;\n }\n return hash;\n}\nvar random = (seed, dummy) => {\n if (dummy !== undefined) {\n throw new TypeError(\"random() takes only one argument\");\n }\n if (seed === null) {\n return Math.random();\n }\n if (typeof seed === \"string\") {\n return mulberry32(hashCode(seed));\n }\n if (typeof seed === \"number\") {\n return mulberry32(seed * 10000000000);\n }\n throw new Error(\"random() argument must be a number or a string\");\n};\n\n// src/use-media-in-timeline.ts\nimport { useContext as useContext16, useEffect as useEffect8, useMemo as useMemo14, useState as useState9 } from \"react\";\n\n// src/audio/use-audio-frame.ts\nimport { useContext as useContext15 } from \"react\";\nvar useMediaStartsAt = () => {\n const parentSequence = useContext15(SequenceContext);\n const startsAt = Math.min(0, parentSequence?.relativeFrom ?? 0);\n return startsAt;\n};\nvar useFrameForVolumeProp = (behavior) => {\n const loop = Loop.useLoop();\n const frame = useCurrentFrame();\n const startsAt = useMediaStartsAt();\n if (behavior === \"repeat\" || loop === null) {\n return frame + startsAt;\n }\n return frame + startsAt + loop.durationInFrames * loop.iteration;\n};\n\n// src/get-asset-file-name.ts\nvar getAssetDisplayName = (filename) => {\n if (/data:|blob:/.test(filename.substring(0, 5))) {\n return \"Data URL\";\n }\n const splitted = filename.split(\"/\").map((s) => s.split(\"\\\\\")).flat(1);\n return splitted[splitted.length - 1];\n};\n\n// src/play-and-handle-not-allowed-error.ts\nvar playAndHandleNotAllowedError = (mediaRef, mediaType, onAutoPlayError) => {\n const { current } = mediaRef;\n if (!current) {\n return;\n }\n const prom = current.play();\n if (prom.catch) {\n prom.catch((err) => {\n if (!current) {\n return;\n }\n if (err.message.includes(\"request was interrupted by a call to pause\")) {\n return;\n }\n if (err.message.includes(\"The operation was aborted.\")) {\n return;\n }\n if (err.message.includes(\"The fetching process for the media resource was aborted by the user agent\")) {\n return;\n }\n if (err.message.includes(\"request was interrupted by a new load request\")) {\n return;\n }\n if (err.message.includes(\"because the media was removed from the document\")) {\n return;\n }\n console.log(`Could not play ${mediaType} due to following error: `, err);\n if (!current.muted) {\n if (onAutoPlayError) {\n onAutoPlayError();\n return;\n }\n console.log(`The video will be muted and we'll retry playing it.`);\n if (mediaType === \"video\" && getRemotionEnvironment().isPlayer) {\n console.log(\"Use onAutoPlayError() to handle this error yourself.\");\n }\n current.muted = true;\n current.play();\n }\n });\n }\n};\n\n// src/volume-prop.ts\nvar evaluateVolume = ({\n frame,\n volume,\n mediaVolume = 1,\n allowAmplificationDuringRender\n}) => {\n const maxVolume = allowAmplificationDuringRender ? Infinity : 1;\n if (typeof volume === \"number\") {\n return Math.min(maxVolume, volume * mediaVolume);\n }\n if (typeof volume === \"undefined\") {\n return Number(mediaVolume);\n }\n const evaluated = volume(frame) * mediaVolume;\n if (typeof evaluated !== \"number\") {\n throw new TypeError(`You passed in a a function to the volume prop but it did not return a number but a value of type ${typeof evaluated} for frame ${frame}`);\n }\n if (Number.isNaN(evaluated)) {\n throw new TypeError(`You passed in a function to the volume prop but it returned NaN for frame ${frame}.`);\n }\n if (!Number.isFinite(evaluated)) {\n throw new TypeError(`You passed in a function to the volume prop but it returned a non-finite number for frame ${frame}.`);\n }\n return Math.max(0, Math.min(maxVolume, evaluated));\n};\n\n// src/use-media-in-timeline.ts\nvar didWarn2 = {};\nvar warnOnce2 = (message) => {\n if (didWarn2[message]) {\n return;\n }\n console.warn(message);\n didWarn2[message] = true;\n};\nvar useMediaInTimeline = ({\n volume,\n mediaVolume,\n mediaRef,\n src,\n mediaType,\n playbackRate,\n displayName,\n id,\n stack,\n showInTimeline,\n premountDisplay,\n onAutoPlayError\n}) => {\n const videoConfig = useVideoConfig();\n const { rootId, audioAndVideoTags } = useContext16(TimelineContext);\n const parentSequence = useContext16(SequenceContext);\n const actualFrom = parentSequence ? parentSequence.relativeFrom + parentSequence.cumulatedFrom : 0;\n const [playing] = usePlayingState();\n const startsAt = useMediaStartsAt();\n const { registerSequence, unregisterSequence } = useContext16(SequenceManager);\n const [initialVolume] = useState9(() => volume);\n const nonce = useNonce();\n const duration = parentSequence ? Math.min(parentSequence.durationInFrames, videoConfig.durationInFrames) : videoConfig.durationInFrames;\n const doesVolumeChange = typeof volume === \"function\";\n const volumes = useMemo14(() => {\n if (typeof volume === \"number\") {\n return volume;\n }\n return new Array(Math.floor(Math.max(0, duration + startsAt))).fill(true).map((_, i) => {\n return evaluateVolume({\n frame: i + startsAt,\n volume,\n mediaVolume,\n allowAmplificationDuringRender: false\n });\n }).join(\",\");\n }, [duration, startsAt, volume, mediaVolume]);\n useEffect8(() => {\n if (typeof volume === \"number\" && volume !== initialVolume) {\n warnOnce2(`Remotion: The ${mediaType} with src ${src} has changed it's volume. Prefer the callback syntax for setting volume to get better timeline display: https://www.remotion.dev/docs/using-audio/#controlling-volume`);\n }\n }, [initialVolume, mediaType, src, volume]);\n useEffect8(() => {\n if (!mediaRef.current) {\n return;\n }\n if (!src) {\n throw new Error(\"No src passed\");\n }\n if (!getRemotionEnvironment().isStudio && window.process?.env?.NODE_ENV !== \"test\") {\n return;\n }\n if (!showInTimeline) {\n return;\n }\n registerSequence({\n type: mediaType,\n src,\n id,\n duration,\n from: 0,\n parent: parentSequence?.id ?? null,\n displayName: displayName ?? getAssetDisplayName(src),\n rootId,\n volume: volumes,\n showInTimeline: true,\n nonce,\n startMediaFrom: 0 - startsAt,\n doesVolumeChange,\n loopDisplay: undefined,\n playbackRate,\n stack,\n premountDisplay\n });\n return () => {\n unregisterSequence(id);\n };\n }, [\n actualFrom,\n duration,\n id,\n parentSequence,\n src,\n registerSequence,\n rootId,\n unregisterSequence,\n videoConfig,\n volumes,\n doesVolumeChange,\n nonce,\n mediaRef,\n mediaType,\n startsAt,\n playbackRate,\n displayName,\n stack,\n showInTimeline,\n premountDisplay\n ]);\n useEffect8(() => {\n const tag = {\n id,\n play: () => {\n if (!playing) {\n return;\n }\n return playAndHandleNotAllowedError(mediaRef, mediaType, onAutoPlayError);\n }\n };\n audioAndVideoTags.current.push(tag);\n return () => {\n audioAndVideoTags.current = audioAndVideoTags.current.filter((a) => a.id !== id);\n };\n }, [audioAndVideoTags, id, mediaRef, mediaType, onAutoPlayError, playing]);\n};\n\n// src/use-media-playback.ts\nimport { useCallback as useCallback7, useContext as useContext18, useEffect as useEffect12, useRef as useRef6 } from \"react\";\n\n// src/buffer-until-first-frame.ts\nimport { useCallback as useCallback6, useMemo as useMemo17, useRef as useRef3 } from \"react\";\n\n// src/use-buffer-state.ts\nimport { useContext as useContext17, useMemo as useMemo16 } from \"react\";\n\n// src/buffering.tsx\nimport React11, { useCallback as useCallback5, useEffect as useEffect9, useMemo as useMemo15, useRef as useRef2, useState as useState10 } from \"react\";\nimport { jsx as jsx14 } from \"react/jsx-runtime\";\nvar useBufferManager = () => {\n const [blocks, setBlocks] = useState10([]);\n const [onBufferingCallbacks, setOnBufferingCallbacks] = useState10([]);\n const [onResumeCallbacks, setOnResumeCallbacks] = useState10([]);\n const buffering = useRef2(false);\n const addBlock = useCallback5((block) => {\n setBlocks((b) => [...b, block]);\n return {\n unblock: () => {\n setBlocks((b) => {\n const newArr = b.filter((bx) => bx !== block);\n if (newArr.length === b.length) {\n return b;\n }\n return newArr;\n });\n }\n };\n }, []);\n const listenForBuffering = useCallback5((callback) => {\n setOnBufferingCallbacks((c) => [...c, callback]);\n return {\n remove: () => {\n setOnBufferingCallbacks((c) => c.filter((cb) => cb !== callback));\n }\n };\n }, []);\n const listenForResume = useCallback5((callback) => {\n setOnResumeCallbacks((c) => [...c, callback]);\n return {\n remove: () => {\n setOnResumeCallbacks((c) => c.filter((cb) => cb !== callback));\n }\n };\n }, []);\n useEffect9(() => {\n if (blocks.length > 0) {\n onBufferingCallbacks.forEach((c) => c());\n }\n }, [blocks]);\n useEffect9(() => {\n if (blocks.length === 0) {\n onResumeCallbacks.forEach((c) => c());\n }\n }, [blocks]);\n return useMemo15(() => {\n return { addBlock, listenForBuffering, listenForResume, buffering };\n }, [addBlock, buffering, listenForBuffering, listenForResume]);\n};\nvar BufferingContextReact = React11.createContext(null);\nvar BufferingProvider = ({ children }) => {\n const bufferManager = useBufferManager();\n return /* @__PURE__ */ jsx14(BufferingContextReact.Provider, {\n value: bufferManager,\n children\n });\n};\nvar useIsPlayerBuffering = (bufferManager) => {\n const [isBuffering, setIsBuffering] = useState10(bufferManager.buffering.current);\n useEffect9(() => {\n const onBuffer = () => {\n setIsBuffering(true);\n };\n const onResume = () => {\n setIsBuffering(false);\n };\n bufferManager.listenForBuffering(onBuffer);\n bufferManager.listenForResume(onResume);\n return () => {\n bufferManager.listenForBuffering(() => {\n return;\n });\n bufferManager.listenForResume(() => {\n return;\n });\n };\n }, [bufferManager]);\n return isBuffering;\n};\n\n// src/use-buffer-state.ts\nvar useBufferState = () => {\n const buffer = useContext17(BufferingContextReact);\n const addBlock = buffer ? buffer.addBlock : null;\n return useMemo16(() => ({\n delayPlayback: () => {\n if (!addBlock) {\n throw new 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\");\n }\n const { unblock } = addBlock({\n id: String(Math.random())\n });\n return { unblock };\n }\n }), [addBlock]);\n};\n\n// src/buffer-until-first-frame.ts\nvar useBufferUntilFirstFrame = ({\n mediaRef,\n mediaType,\n onVariableFpsVideoDetected,\n pauseWhenBuffering\n}) => {\n const bufferingRef = useRef3(false);\n const { delayPlayback } = useBufferState();\n const bufferUntilFirstFrame = useCallback6((requestedTime) => {\n if (mediaType !== \"video\") {\n return;\n }\n if (!pauseWhenBuffering) {\n return;\n }\n const current = mediaRef.current;\n if (!current) {\n return;\n }\n if (!current.requestVideoFrameCallback) {\n return;\n }\n bufferingRef.current = true;\n const playback = delayPlayback();\n const unblock = () => {\n playback.unblock();\n current.removeEventListener(\"ended\", unblock, {\n once: true\n });\n current.removeEventListener(\"pause\", unblock, {\n once: true\n });\n bufferingRef.current = false;\n };\n const onEndedOrPauseOrCanPlay = () => {\n unblock();\n };\n current.requestVideoFrameCallback((_, info) => {\n const differenceFromRequested = Math.abs(info.mediaTime - requestedTime);\n if (differenceFromRequested > 0.5) {\n onVariableFpsVideoDetected();\n }\n unblock();\n });\n current.addEventListener(\"ended\", onEndedOrPauseOrCanPlay, { once: true });\n current.addEventListener(\"pause\", onEndedOrPauseOrCanPlay, { once: true });\n current.addEventListener(\"canplay\", onEndedOrPauseOrCanPlay, {\n once: true\n });\n }, [\n delayPlayback,\n mediaRef,\n mediaType,\n onVariableFpsVideoDetected,\n pauseWhenBuffering\n ]);\n return useMemo17(() => {\n return {\n isBuffering: () => bufferingRef.current,\n bufferUntilFirstFrame\n };\n }, [bufferUntilFirstFrame]);\n};\n\n// src/use-media-buffering.ts\nimport { useEffect as useEffect10, useState as useState11 } from \"react\";\nvar useMediaBuffering = ({\n element,\n shouldBuffer,\n isPremounting\n}) => {\n const buffer = useBufferState();\n const [isBuffering, setIsBuffering] = useState11(false);\n useEffect10(() => {\n let cleanupFns = [];\n const { current } = element;\n if (!current) {\n return;\n }\n if (!shouldBuffer) {\n return;\n }\n if (isPremounting) {\n return;\n }\n const cleanup = () => {\n cleanupFns.forEach((fn) => fn());\n cleanupFns = [];\n setIsBuffering(false);\n };\n const onWaiting = () => {\n setIsBuffering(true);\n const { unblock } = buffer.delayPlayback();\n const onCanPlay = () => {\n cleanup();\n init();\n };\n const onError = () => {\n cleanup();\n init();\n };\n current.addEventListener(\"canplay\", onCanPlay, {\n once: true\n });\n cleanupFns.push(() => {\n current.removeEventListener(\"canplay\", onCanPlay);\n });\n current.addEventListener(\"error\", onError, {\n once: true\n });\n cleanupFns.push(() => {\n current.removeEventListener(\"error\", onError);\n });\n cleanupFns.push(() => {\n unblock();\n });\n };\n const init = () => {\n if (current.readyState < current.HAVE_FUTURE_DATA) {\n onWaiting();\n if (!navigator.userAgent.includes(\"Firefox/\")) {\n current.load();\n }\n } else {\n current.addEventListener(\"waiting\", onWaiting);\n cleanupFns.push(() => {\n current.removeEventListener(\"waiting\", onWaiting);\n });\n }\n };\n init();\n return () => {\n cleanup();\n };\n }, [buffer, element, isPremounting, shouldBuffer]);\n return isBuffering;\n};\n\n// src/use-request-video-callback-time.ts\nimport { useEffect as useEffect11, useRef as useRef4 } from \"react\";\nvar useRequestVideoCallbackTime = ({\n mediaRef,\n mediaType,\n lastSeek,\n onVariableFpsVideoDetected\n}) => {\n const currentTime = useRef4(null);\n useEffect11(() => {\n const { current } = mediaRef;\n if (current) {\n currentTime.current = current.currentTime;\n } else {\n currentTime.current = null;\n return;\n }\n if (mediaType !== \"video\") {\n currentTime.current = null;\n return;\n }\n const videoTag = current;\n if (!videoTag.requestVideoFrameCallback) {\n return;\n }\n let cancel = () => {\n return;\n };\n const request = () => {\n if (!videoTag) {\n return;\n }\n const cb = videoTag.requestVideoFrameCallback((_, info) => {\n if (currentTime.current !== null) {\n const difference = Math.abs(currentTime.current - info.mediaTime);\n const differenceToLastSeek = Math.abs(lastSeek.current === null ? Infinity : info.mediaTime - lastSeek.current);\n if (difference > 0.5 && differenceToLastSeek > 0.5 && info.mediaTime > currentTime.current) {\n onVariableFpsVideoDetected();\n }\n }\n currentTime.current = info.mediaTime;\n request();\n });\n cancel = () => {\n videoTag.cancelVideoFrameCallback(cb);\n cancel = () => {\n return;\n };\n };\n };\n request();\n return () => {\n cancel();\n };\n }, [lastSeek, mediaRef, mediaType, onVariableFpsVideoDetected]);\n return currentTime;\n};\n\n// src/interpolate.ts\nfunction interpolateFunction(input, inputRange, outputRange, options) {\n const { extrapolateLeft, extrapolateRight, easing } = options;\n let result = input;\n const [inputMin, inputMax] = inputRange;\n const [outputMin, outputMax] = outputRange;\n if (result < inputMin) {\n if (extrapolateLeft === \"identity\") {\n return result;\n }\n if (extrapolateLeft === \"clamp\") {\n result = inputMin;\n } else if (extrapolateLeft === \"wrap\") {\n const range = inputMax - inputMin;\n result = ((result - inputMin) % range + range) % range + inputMin;\n } else if (extrapolateLeft === \"extend\") {\n }\n }\n if (result > inputMax) {\n if (extrapolateRight === \"identity\") {\n return result;\n }\n if (extrapolateRight === \"clamp\") {\n result = inputMax;\n } else if (extrapolateRight === \"wrap\") {\n const range = inputMax - inputMin;\n result = ((result - inputMin) % range + range) % range + inputMin;\n } else if (extrapolateRight === \"extend\") {\n }\n }\n if (outputMin === outputMax) {\n return outputMin;\n }\n result = (result - inputMin) / (inputMax - inputMin);\n result = easing(result);\n result = result * (outputMax - outputMin) + outputMin;\n return result;\n}\nfunction findRange(input, inputRange) {\n let i;\n for (i = 1;i < inputRange.length - 1; ++i) {\n if (inputRange[i] >= input) {\n break;\n }\n }\n return i - 1;\n}\nfunction checkValidInputRange(arr) {\n for (let i = 1;i < arr.length; ++i) {\n if (!(arr[i] > arr[i - 1])) {\n throw new Error(`inputRange must be strictly monotonically increasing but got [${arr.join(\",\")}]`);\n }\n }\n}\nfunction checkInfiniteRange(name, arr) {\n if (arr.length < 2) {\n throw new Error(name + \" must have at least 2 elements\");\n }\n for (const element of arr) {\n if (typeof element !== \"number\") {\n throw new Error(`${name} must contain only numbers`);\n }\n if (!Number.isFinite(element)) {\n throw new Error(`${name} must contain only finite numbers, but got [${arr.join(\",\")}]`);\n }\n }\n}\nfunction interpolate(input, inputRange, outputRange, options) {\n if (typeof input === \"undefined\") {\n throw new Error(\"input can not be undefined\");\n }\n if (typeof inputRange === \"undefined\") {\n throw new Error(\"inputRange can not be undefined\");\n }\n if (typeof outputRange === \"undefined\") {\n throw new Error(\"outputRange can not be undefined\");\n }\n if (inputRange.length !== outputRange.length) {\n throw new Error(\"inputRange (\" + inputRange.length + \") and outputRange (\" + outputRange.length + \") must have the same length\");\n }\n checkInfiniteRange(\"inputRange\", inputRange);\n checkInfiniteRange(\"outputRange\", outputRange);\n checkValidInputRange(inputRange);\n const easing = options?.easing ?? ((num) => num);\n let extrapolateLeft = \"extend\";\n if (options?.extrapolateLeft !== undefined) {\n extrapolateLeft = options.extrapolateLeft;\n }\n let extrapolateRight = \"extend\";\n if (options?.extrapolateRight !== undefined) {\n extrapolateRight = options.extrapolateRight;\n }\n if (typeof input !== \"number\") {\n throw new TypeError(\"Cannot interpolate an input which is not a number\");\n }\n const range = findRange(input, inputRange);\n return interpolateFunction(input, [inputRange[range], inputRange[range + 1]], [outputRange[range], outputRange[range + 1]], {\n easing,\n extrapolateLeft,\n extrapolateRight\n });\n}\n\n// src/video/get-current-time.ts\nvar getExpectedMediaFrameUncorrected = ({\n frame,\n playbackRate,\n startFrom\n}) => {\n return interpolate(frame, [-1, startFrom, startFrom + 1], [-1, startFrom, startFrom + playbackRate]);\n};\nvar getMediaTime = ({\n fps,\n frame,\n playbackRate,\n startFrom\n}) => {\n const expectedFrame = getExpectedMediaFrameUncorrected({\n frame,\n playbackRate,\n startFrom\n });\n const msPerFrame = 1000 / fps;\n return expectedFrame * msPerFrame / 1000;\n};\n\n// src/video/video-fragment.ts\nimport { useRef as useRef5 } from \"react\";\nvar toSeconds = (time, fps) => {\n return Math.round(time / fps * 100) / 100;\n};\nvar isIosSafari = () => {\n if (typeof window === \"undefined\") {\n return false;\n }\n const isIpadIPodIPhone = /iP(ad|od|hone)/i.test(window.navigator.userAgent);\n const isAppleWebKit = /AppleWebKit/.test(window.navigator.userAgent);\n return isIpadIPodIPhone && isAppleWebKit;\n};\nvar isIOSSafariAndBlob = (actualSrc) => {\n return isIosSafari() && actualSrc.startsWith(\"blob:\");\n};\nvar getVideoFragmentStart = ({\n actualFrom,\n fps\n}) => {\n return toSeconds(Math.max(0, -actualFrom), fps);\n};\nvar getVideoFragmentEnd = ({\n duration,\n fps\n}) => {\n return toSeconds(duration, fps);\n};\nvar appendVideoFragment = ({\n actualSrc,\n actualFrom,\n duration,\n fps\n}) => {\n if (isIOSSafariAndBlob(actualSrc)) {\n return actualSrc;\n }\n if (actualSrc.startsWith(\"data:\")) {\n return actualSrc;\n }\n const existingHash = Boolean(new URL(actualSrc, (typeof window === \"undefined\" ? null : window.location.href) ?? \"http://localhost:3000\").hash);\n if (existingHash) {\n return actualSrc;\n }\n if (!Number.isFinite(actualFrom)) {\n return actualSrc;\n }\n const withStartHash = `${actualSrc}#t=${getVideoFragmentStart({ actualFrom, fps })}`;\n if (!Number.isFinite(duration)) {\n return withStartHash;\n }\n return `${withStartHash},${getVideoFragmentEnd({ duration, fps })}`;\n};\nvar isSubsetOfDuration = ({\n prevStartFrom,\n newStartFrom,\n prevDuration,\n newDuration,\n fps\n}) => {\n const previousFrom = getVideoFragmentStart({ actualFrom: prevStartFrom, fps });\n const newFrom = getVideoFragmentStart({ actualFrom: newStartFrom, fps });\n const previousEnd = getVideoFragmentEnd({ duration: prevDuration, fps });\n const newEnd = getVideoFragmentEnd({ duration: newDuration, fps });\n if (newFrom < previousFrom) {\n return false;\n }\n if (newEnd > previousEnd) {\n return false;\n }\n return true;\n};\nvar useAppendVideoFragment = ({\n actualSrc: initialActualSrc,\n actualFrom: initialActualFrom,\n duration: initialDuration,\n fps\n}) => {\n const actualFromRef = useRef5(initialActualFrom);\n const actualDuration = useRef5(initialDuration);\n const actualSrc = useRef5(initialActualSrc);\n if (!isSubsetOfDuration({\n prevStartFrom: actualFromRef.current,\n newStartFrom: initialActualFrom,\n prevDuration: actualDuration.current,\n newDuration: initialDuration,\n fps\n }) || initialActualSrc !== actualSrc.current) {\n actualFromRef.current = initialActualFrom;\n actualDuration.current = initialDuration;\n actualSrc.current = initialActualSrc;\n }\n const appended = appendVideoFragment({\n actualSrc: actualSrc.current,\n actualFrom: actualFromRef.current,\n duration: actualDuration.current,\n fps\n });\n return appended;\n};\n\n// src/warn-about-non-seekable-media.ts\nvar alreadyWarned = {};\nvar warnAboutNonSeekableMedia = (ref, type) => {\n if (ref === null) {\n return;\n }\n if (ref.seekable.length === 0) {\n return;\n }\n if (ref.seekable.length > 1) {\n return;\n }\n if (alreadyWarned[ref.src]) {\n return;\n }\n const range = { start: ref.seekable.start(0), end: ref.seekable.end(0) };\n if (range.start === 0 && range.end === 0) {\n const msg = [\n `The media ${ref.src} cannot be seeked. This could be one of few reasons:`,\n \"1) The media resource was replaced while the video is playing but it was not loaded yet.\",\n \"2) The media does not support seeking.\",\n \"3) The media was loaded with security headers prventing it from being included.\",\n \"Please see https://remotion.dev/docs/non-seekable-media for assistance.\"\n ].join(\"\\n\");\n if (type === \"console-error\") {\n console.error(msg);\n } else if (type === \"console-warning\") {\n console.warn(`The media ${ref.src} does not support seeking. The video will render fine, but may not play correctly in the Remotion Studio and in the <Player>. See https://remotion.dev/docs/non-seekable-media for an explanation.`);\n } else {\n throw new Error(msg);\n }\n alreadyWarned[ref.src] = true;\n }\n};\n\n// src/use-media-playback.ts\nvar DEFAULT_ACCEPTABLE_TIMESHIFT = 0.45;\nvar seek = (mediaRef, time) => {\n if (!mediaRef.current) {\n return;\n }\n const timeToSet = isIosSafari() ? Number(time.toFixed(1)) : time;\n mediaRef.current.currentTime = timeToSet;\n};\nvar useMediaPlayback = ({\n mediaRef,\n src,\n mediaType,\n playbackRate: localPlaybackRate,\n onlyWarnForMediaSeekingError,\n acceptableTimeshift,\n pauseWhenBuffering,\n isPremounting,\n debugSeeking,\n onAutoPlayError\n}) => {\n const { playbackRate: globalPlaybackRate } = useContext18(TimelineContext);\n const frame = useCurrentFrame();\n const absoluteFrame = useTimelinePosition();\n const [playing] = usePlayingState();\n const buffering = useContext18(BufferingContextReact);\n const { fps } = useVideoConfig();\n const mediaStartsAt = useMediaStartsAt();\n const lastSeekDueToShift = useRef6(null);\n const lastSeek = useRef6(null);\n if (!buffering) {\n throw new Error(\"useMediaPlayback must be used inside a <BufferingContext>\");\n }\n const isVariableFpsVideoMap = useRef6({});\n const onVariableFpsVideoDetected = useCallback7(() => {\n if (!src) {\n return;\n }\n if (debugSeeking) {\n console.log(`Detected ${src} as a variable FPS video. Disabling buffering while seeking.`);\n }\n isVariableFpsVideoMap.current[src] = true;\n }, [debugSeeking, src]);\n const currentTime = useRequestVideoCallbackTime({\n mediaRef,\n mediaType,\n lastSeek,\n onVariableFpsVideoDetected\n });\n const desiredUnclampedTime = getMediaTime({\n frame,\n playbackRate: localPlaybackRate,\n startFrom: -mediaStartsAt,\n fps\n });\n const isMediaTagBuffering = useMediaBuffering({\n element: mediaRef,\n shouldBuffer: pauseWhenBuffering,\n isPremounting\n });\n const { bufferUntilFirstFrame, isBuffering } = useBufferUntilFirstFrame({\n mediaRef,\n mediaType,\n onVariableFpsVideoDetected,\n pauseWhenBuffering\n });\n const playbackRate = localPlaybackRate * globalPlaybackRate;\n const acceptableTimeShiftButLessThanDuration = (() => {\n if (mediaRef.current?.duration) {\n return Math.min(mediaRef.current.duration, acceptableTimeshift ?? DEFAULT_ACCEPTABLE_TIMESHIFT);\n }\n return acceptableTimeshift;\n })();\n const isPlayerBuffering = useIsPlayerBuffering(buffering);\n useEffect12(() => {\n if (!playing) {\n mediaRef.current?.pause();\n return;\n }\n const isMediaTagBufferingOrStalled = isMediaTagBuffering || isBuffering();\n if (isPlayerBuffering && !isMediaTagBufferingOrStalled) {\n mediaRef.current?.pause();\n }\n }, [isBuffering, isMediaTagBuffering, isPlayerBuffering, mediaRef, playing]);\n useEffect12(() => {\n const tagName = mediaType === \"audio\" ? \"<Audio>\" : \"<Video>\";\n if (!mediaRef.current) {\n throw new Error(`No ${mediaType} ref found`);\n }\n if (!src) {\n throw new Error(`No 'src' attribute was passed to the ${tagName} element.`);\n }\n const playbackRateToSet = Math.max(0, playbackRate);\n if (mediaRef.current.playbackRate !== playbackRateToSet) {\n mediaRef.current.playbackRate = playbackRateToSet;\n }\n const { duration } = mediaRef.current;\n const shouldBeTime = !Number.isNaN(duration) && Number.isFinite(duration) ? Math.min(duration, desiredUnclampedTime) : desiredUnclampedTime;\n const mediaTagTime = mediaRef.current.currentTime;\n const rvcTime = currentTime.current ?? null;\n const isVariableFpsVideo = isVariableFpsVideoMap.current[src];\n const timeShiftMediaTag = Math.abs(shouldBeTime - mediaTagTime);\n const timeShiftRvcTag = rvcTime ? Math.abs(shouldBeTime - rvcTime) : null;\n const timeShift = timeShiftRvcTag && !isVariableFpsVideo ? timeShiftRvcTag : timeShiftMediaTag;\n if (debugSeeking) {\n console.log({\n mediaTagTime,\n rvcTime,\n shouldBeTime,\n state: mediaRef.current.readyState,\n playing: !mediaRef.current.paused,\n isVariableFpsVideo\n });\n }\n if (timeShift > acceptableTimeShiftButLessThanDuration && lastSeekDueToShift.current !== shouldBeTime) {\n if (debugSeeking) {\n console.log(\"Seeking\", {\n shouldBeTime,\n isTime: mediaTagTime,\n rvcTime,\n timeShift,\n isVariableFpsVideo\n });\n }\n seek(mediaRef, shouldBeTime);\n lastSeek.current = shouldBeTime;\n lastSeekDueToShift.current = shouldBeTime;\n if (playing && !isVariableFpsVideo) {\n if (playbackRate > 0) {\n bufferUntilFirstFrame(shouldBeTime);\n }\n if (mediaRef.current.paused) {\n playAndHandleNotAllowedError(mediaRef, mediaType, onAutoPlayError);\n }\n }\n if (!onlyWarnForMediaSeekingError) {\n warnAboutNonSeekableMedia(mediaRef.current, onlyWarnForMediaSeekingError ? \"console-warning\" : \"console-error\");\n }\n return;\n }\n const seekThreshold = playing ? 0.15 : 0.00001;\n const makesSenseToSeek = Math.abs(mediaRef.current.currentTime - shouldBeTime) > seekThreshold;\n const isMediaTagBufferingOrStalled = isMediaTagBuffering || isBuffering();\n const isSomethingElseBuffering = buffering.buffering.current && !isMediaTagBufferingOrStalled;\n if (!playing || isSomethingElseBuffering) {\n if (makesSenseToSeek) {\n seek(mediaRef, shouldBeTime);\n lastSeek.current = shouldBeTime;\n }\n return;\n }\n if (mediaRef.current.paused && !mediaRef.current.ended || absoluteFrame === 0) {\n if (makesSenseToSeek) {\n seek(mediaRef, shouldBeTime);\n lastSeek.current = shouldBeTime;\n }\n playAndHandleNotAllowedError(mediaRef, mediaType, onAutoPlayError);\n if (!isVariableFpsVideo) {\n if (playbackRate > 0) {\n bufferUntilFirstFrame(shouldBeTime);\n }\n }\n }\n }, [\n absoluteFrame,\n acceptableTimeShiftButLessThanDuration,\n bufferUntilFirstFrame,\n buffering.buffering,\n currentTime,\n debugSeeking,\n desiredUnclampedTime,\n isBuffering,\n isMediaTagBuffering,\n mediaRef,\n mediaType,\n onlyWarnForMediaSeekingError,\n playbackRate,\n playing,\n src,\n onAutoPlayError\n ]);\n};\n\n// src/use-media-tag-volume.ts\nimport { useEffect as useEffect13, useState as useState12 } from \"react\";\nvar useMediaTagVolume = (mediaRef) => {\n const [actualVolume, setActualVolume] = useState12(1);\n useEffect13(() => {\n const ref = mediaRef.current;\n if (!ref) {\n return;\n }\n const onChange = () => {\n setActualVolume(ref.volume);\n };\n ref.addEventListener(\"volumechange\", onChange);\n return () => ref.removeEventListener(\"volumechange\", onChange);\n }, [mediaRef]);\n useEffect13(() => {\n const ref = mediaRef.current;\n if (!ref) {\n return;\n }\n if (ref.volume !== actualVolume) {\n setActualVolume(ref.volume);\n }\n }, [actualVolume, mediaRef]);\n return actualVolume;\n};\n\n// src/use-sync-volume-with-media-tag.ts\nimport { useEffect as useEffect14 } from \"react\";\n\n// src/is-approximately-the-same.ts\nvar FLOATING_POINT_ERROR_THRESHOLD = 0.00001;\nvar isApproximatelyTheSame = (num1, num2) => {\n return Math.abs(num1 - num2) < FLOATING_POINT_ERROR_THRESHOLD;\n};\n\n// src/use-sync-volume-with-media-tag.ts\nvar useSyncVolumeWithMediaTag = ({\n volumePropFrame,\n actualVolume,\n volume,\n mediaVolume,\n mediaRef\n}) => {\n useEffect14(() => {\n const userPreferredVolume = evaluateVolume({\n frame: volumePropFrame,\n volume,\n mediaVolume,\n allowAmplificationDuringRender: false\n });\n if (!isApproximatelyTheSame(userPreferredVolume, actualVolume) && mediaRef.current) {\n mediaRef.current.volume = userPreferredVolume;\n }\n }, [actualVolume, volumePropFrame, mediaRef, volume, mediaVolume]);\n};\n\n// src/volume-position-state.ts\nimport { createContext as createContext15, useContext as useContext19, useMemo as useMemo18 } from \"react\";\nvar MediaVolumeContext = createContext15({\n mediaMuted: false,\n mediaVolume: 1\n});\nvar SetMediaVolumeContext = createContext15({\n setMediaMuted: () => {\n throw new Error(\"default\");\n },\n setMediaVolume: () => {\n throw new Error(\"default\");\n }\n});\nvar useMediaVolumeState = () => {\n const { mediaVolume } = useContext19(MediaVolumeContext);\n const { setMediaVolume } = useContext19(SetMediaVolumeContext);\n return useMemo18(() => {\n return [mediaVolume, setMediaVolume];\n }, [mediaVolume, setMediaVolume]);\n};\nvar useMediaMutedState = () => {\n const { mediaMuted } = useContext19(MediaVolumeContext);\n const { setMediaMuted } = useContext19(SetMediaVolumeContext);\n return useMemo18(() => {\n return [mediaMuted, setMediaMuted];\n }, [mediaMuted, setMediaMuted]);\n};\n\n// src/audio/shared-audio-tags.tsx\nimport React12, {\n createContext as createContext16,\n createRef as createRef2,\n useCallback as useCallback8,\n useContext as useContext20,\n useEffect as useEffect15,\n useMemo as useMemo19,\n useRef as useRef7,\n useState as useState13\n} from \"react\";\nimport { jsx as jsx15, jsxs } from \"react/jsx-runtime\";\nvar EMPTY_AUDIO = \"data:audio/mp3;base64,/+MYxAAJcAV8AAgAABn//////+/gQ5BAMA+D4Pg+BAQBAEAwD4Pg+D4EBAEAQDAPg++hYBH///hUFQVBUFREDQNHmf///////+MYxBUGkAGIMAAAAP/29Xt6lUxBTUUzLjEwMFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV/+MYxDUAAANIAAAAAFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV\";\nvar compareProps = (obj1, obj2) => {\n const keysA = Object.keys(obj1).sort();\n const keysB = Object.keys(obj2).sort();\n if (keysA.length !== keysB.length) {\n return false;\n }\n for (let i = 0;i < keysA.length; i++) {\n if (keysA[i] !== keysB[i]) {\n return false;\n }\n if (obj1[keysA[i]] !== obj2[keysB[i]]) {\n return false;\n }\n }\n return true;\n};\nvar didPropChange = (key, newProp, prevProp) => {\n if (key === \"src\" && !prevProp.startsWith(\"data:\") && !newProp.startsWith(\"data:\")) {\n return new URL(prevProp, window.origin).toString() !== new URL(newProp, window.origin).toString();\n }\n if (prevProp === newProp) {\n return false;\n }\n return true;\n};\nvar SharedAudioContext = createContext16(null);\nvar SharedAudioContextProvider = ({ children, numberOfAudioTags, component }) => {\n const audios = useRef7([]);\n const [initialNumberOfAudioTags] = useState13(numberOfAudioTags);\n if (numberOfAudioTags !== initialNumberOfAudioTags) {\n throw new Error(\"The number of shared audio tags has changed dynamically. Once you have set this property, you cannot change it afterwards.\");\n }\n const refs = useMemo19(() => {\n return new Array(numberOfAudioTags).fill(true).map(() => {\n return { id: Math.random(), ref: createRef2() };\n });\n }, [numberOfAudioTags]);\n const takenAudios = useRef7(new Array(numberOfAudioTags).fill(false));\n const rerenderAudios = useCallback8(() => {\n refs.forEach(({ ref, id }) => {\n const data = audios.current?.find((a) => a.id === id);\n const { current } = ref;\n if (!current) {\n return;\n }\n if (data === undefined) {\n current.src = EMPTY_AUDIO;\n return;\n }\n if (!data) {\n throw new TypeError(\"Expected audio data to be there\");\n }\n Object.keys(data.props).forEach((key) => {\n if (didPropChange(key, data.props[key], current[key])) {\n current[key] = data.props[key];\n }\n });\n });\n }, [refs]);\n const registerAudio = useCallback8((aud, audioId) => {\n const found = audios.current?.find((a) => a.audioId === audioId);\n if (found) {\n return found;\n }\n const firstFreeAudio = takenAudios.current.findIndex((a) => a === false);\n if (firstFreeAudio === -1) {\n throw new Error(`Tried to simultaneously mount ${numberOfAudioTags + 1} <Audio /> tags at the same time. With the current settings, the maximum amount of <Audio /> tags is limited to ${numberOfAudioTags} at the same time. Remotion pre-mounts silent audio tags to help avoid browser autoplay restrictions. See https://remotion.dev/docs/player/autoplay#use-the-numberofsharedaudiotags-property for more information on how to increase this limit.`);\n }\n const { id, ref } = refs[firstFreeAudio];\n const cloned = [...takenAudios.current];\n cloned[firstFreeAudio] = id;\n takenAudios.current = cloned;\n const newElem = {\n props: aud,\n id,\n el: ref,\n audioId\n };\n audios.current?.push(newElem);\n rerenderAudios();\n return newElem;\n }, [numberOfAudioTags, refs, rerenderAudios]);\n const unregisterAudio = useCallback8((id) => {\n const cloned = [...takenAudios.current];\n const index = refs.findIndex((r) => r.id === id);\n if (index === -1) {\n throw new TypeError(\"Error occured in \");\n }\n cloned[index] = false;\n takenAudios.current = cloned;\n audios.current = audios.current?.filter((a) => a.id !== id);\n rerenderAudios();\n }, [refs, rerenderAudios]);\n const updateAudio = useCallback8(({\n aud,\n audioId,\n id\n }) => {\n let changed = false;\n audios.current = audios.current?.map((prevA) => {\n if (prevA.id === id) {\n const isTheSame = compareProps(aud, prevA.props);\n if (isTheSame) {\n return prevA;\n }\n changed = true;\n return {\n ...prevA,\n props: aud,\n audioId\n };\n }\n return prevA;\n });\n if (changed) {\n rerenderAudios();\n }\n }, [rerenderAudios]);\n const playAllAudios = useCallback8(() => {\n refs.forEach((ref) => {\n playAndHandleNotAllowedError(ref.ref, \"audio\", null);\n });\n }, [refs]);\n const value = useMemo19(() => {\n return {\n registerAudio,\n unregisterAudio,\n updateAudio,\n playAllAudios,\n numberOfAudioTags\n };\n }, [\n numberOfAudioTags,\n playAllAudios,\n registerAudio,\n unregisterAudio,\n updateAudio\n ]);\n const resetAudio = useCallback8(() => {\n takenAudios.current = new Array(numberOfAudioTags).fill(false);\n audios.current = [];\n rerenderAudios();\n }, [numberOfAudioTags, rerenderAudios]);\n useEffect15(() => {\n return () => {\n resetAudio();\n };\n }, [component, resetAudio]);\n return /* @__PURE__ */ jsxs(SharedAudioContext.Provider, {\n value,\n children: [\n refs.map(({ id, ref }) => {\n return /* @__PURE__ */ jsx15(\"audio\", {\n ref,\n preload: \"metadata\",\n src: EMPTY_AUDIO\n }, id);\n }),\n children\n ]\n });\n};\nvar useSharedAudio = (aud, audioId) => {\n const ctx = useContext20(SharedAudioContext);\n const [elem] = useState13(() => {\n if (ctx && ctx.numberOfAudioTags > 0) {\n return ctx.registerAudio(aud, audioId);\n }\n return {\n el: React12.createRef(),\n id: Math.random(),\n props: aud,\n audioId\n };\n });\n const effectToUse = React12.useInsertionEffect ?? React12.useLayoutEffect;\n if (typeof document !== \"undefined\") {\n effectToUse(() => {\n if (ctx && ctx.numberOfAudioTags > 0) {\n ctx.updateAudio({ id: elem.id, aud, audioId });\n }\n }, [aud, ctx, elem.id, audioId]);\n effectToUse(() => {\n return () => {\n if (ctx && ctx.numberOfAudioTags > 0) {\n ctx.unregisterAudio(elem.id);\n }\n };\n }, [ctx, elem.id]);\n }\n return elem;\n};\n\n// src/audio/AudioForPreview.tsx\nimport { jsx as jsx16 } from \"react/jsx-runtime\";\nvar AudioForDevelopmentForwardRefFunction = (props, ref) => {\n const [initialShouldPreMountAudioElements] = useState14(props.shouldPreMountAudioTags);\n if (props.shouldPreMountAudioTags !== initialShouldPreMountAudioElements) {\n throw new Error(\"Cannot change the behavior for pre-mounting audio tags dynamically.\");\n }\n const {\n volume,\n muted,\n playbackRate,\n shouldPreMountAudioTags,\n src,\n onDuration,\n acceptableTimeShiftInSeconds,\n _remotionInternalNeedsDurationCalculation,\n _remotionInternalNativeLoopPassed,\n _remotionInternalStack,\n _remotionDebugSeeking,\n allowAmplificationDuringRender,\n name,\n pauseWhenBuffering,\n showInTimeline,\n loopVolumeCurveBehavior,\n stack,\n ...nativeProps\n } = props;\n const [mediaVolume] = useMediaVolumeState();\n const [mediaMuted] = useMediaMutedState();\n const volumePropFrame = useFrameForVolumeProp(loopVolumeCurveBehavior ?? \"repeat\");\n const { hidden } = useContext21(SequenceVisibilityToggleContext);\n if (!src) {\n throw new TypeError(\"No 'src' was passed to <Audio>.\");\n }\n const preloadedSrc = usePreload(src);\n const sequenceContext = useContext21(SequenceContext);\n const [timelineId] = useState14(() => String(Math.random()));\n const isSequenceHidden = hidden[timelineId] ?? false;\n const userPreferredVolume = evaluateVolume({\n frame: volumePropFrame,\n volume,\n mediaVolume,\n allowAmplificationDuringRender: false\n });\n const propsToPass = useMemo20(() => {\n return {\n muted: muted || mediaMuted || isSequenceHidden || userPreferredVolume <= 0,\n src: preloadedSrc,\n loop: _remotionInternalNativeLoopPassed,\n ...nativeProps\n };\n }, [\n _remotionInternalNativeLoopPassed,\n isSequenceHidden,\n mediaMuted,\n muted,\n nativeProps,\n preloadedSrc,\n userPreferredVolume\n ]);\n const id = useMemo20(() => `audio-${random(src ?? \"\")}-${sequenceContext?.relativeFrom}-${sequenceContext?.cumulatedFrom}-${sequenceContext?.durationInFrames}-muted:${props.muted}-loop:${props.loop}`, [\n src,\n sequenceContext?.relativeFrom,\n sequenceContext?.cumulatedFrom,\n sequenceContext?.durationInFrames,\n props.muted,\n props.loop\n ]);\n const audioRef = useSharedAudio(propsToPass, id).el;\n const actualVolume = useMediaTagVolume(audioRef);\n useSyncVolumeWithMediaTag({\n volumePropFrame,\n actualVolume,\n volume,\n mediaVolume,\n mediaRef: audioRef\n });\n useMediaInTimeline({\n volume,\n mediaVolume,\n mediaRef: audioRef,\n src,\n mediaType: \"audio\",\n playbackRate: playbackRate ?? 1,\n displayName: name ?? null,\n id: timelineId,\n stack: _remotionInternalStack,\n showInTimeline,\n premountDisplay: null,\n onAutoPlayError: null\n });\n useMediaPlayback({\n mediaRef: audioRef,\n src,\n mediaType: \"audio\",\n playbackRate: playbackRate ?? 1,\n onlyWarnForMediaSeekingError: false,\n acceptableTimeshift: acceptableTimeShiftInSeconds ?? DEFAULT_ACCEPTABLE_TIMESHIFT,\n isPremounting: Boolean(sequenceContext?.premounting),\n pauseWhenBuffering,\n debugSeeking: _remotionDebugSeeking,\n onAutoPlayError: null\n });\n useImperativeHandle3(ref, () => {\n return audioRef.current;\n }, [audioRef]);\n const currentOnDurationCallback = useRef8();\n currentOnDurationCallback.current = onDuration;\n useEffect16(() => {\n const { current } = audioRef;\n if (!current) {\n return;\n }\n if (current.duration) {\n currentOnDurationCallback.current?.(current.src, current.duration);\n return;\n }\n const onLoadedMetadata = () => {\n currentOnDurationCallback.current?.(current.src, current.duration);\n };\n current.addEventListener(\"loadedmetadata\", onLoadedMetadata);\n return () => {\n current.removeEventListener(\"loadedmetadata\", onLoadedMetadata);\n };\n }, [audioRef, src]);\n if (initialShouldPreMountAudioElements) {\n return null;\n }\n return /* @__PURE__ */ jsx16(\"audio\", {\n ref: audioRef,\n preload: \"metadata\",\n ...propsToPass\n });\n};\nvar AudioForPreview = forwardRef3(AudioForDevelopmentForwardRefFunction);\n\n// src/audio/AudioForRendering.tsx\nimport {\n forwardRef as forwardRef4,\n useContext as useContext22,\n useEffect as useEffect17,\n useImperativeHandle as useImperativeHandle4,\n useLayoutEffect as useLayoutEffect3,\n useMemo as useMemo21,\n useRef as useRef9\n} from \"react\";\n\n// src/delay-render.ts\nif (typeof window !== \"undefined\") {\n window.remotion_renderReady = false;\n}\nvar handles = [];\nif (typeof window !== \"undefined\") {\n window.remotion_delayRenderTimeouts = {};\n}\nvar DELAY_RENDER_CALLSTACK_TOKEN = \"The delayRender was called:\";\nvar DELAY_RENDER_RETRIES_LEFT = \"Retries left: \";\nvar DELAY_RENDER_RETRY_TOKEN = \"- Rendering the frame will be retried.\";\nvar defaultTimeout = 30000;\nvar delayRender = (label, options) => {\n if (typeof label !== \"string\" && typeof label !== \"undefined\") {\n throw new Error(\"The label parameter of delayRender() must be a string or undefined, got: \" + JSON.stringify(label));\n }\n const handle = Math.random();\n handles.push(handle);\n const called = Error().stack?.replace(/^Error/g, \"\") ?? \"\";\n if (getRemotionEnvironment().isRendering) {\n const timeoutToUse = (options?.timeoutInMilliseconds ?? (typeof window === \"undefined\" ? defaultTimeout : window.remotion_puppeteerTimeout ?? defaultTimeout)) - 2000;\n if (typeof window !== \"undefined\") {\n const retriesLeft = (options?.retries ?? 0) - (window.remotion_attempt - 1);\n window.remotion_delayRenderTimeouts[handle] = {\n label: label ?? null,\n timeout: setTimeout(() => {\n const message = [\n `A delayRender()`,\n label ? `\"${label}\"` : null,\n `was called but not cleared after ${timeoutToUse}ms. See https://remotion.dev/docs/timeout for help.`,\n retriesLeft > 0 ? DELAY_RENDER_RETRIES_LEFT + retriesLeft : null,\n retriesLeft > 0 ? DELAY_RENDER_RETRY_TOKEN : null,\n DELAY_RENDER_CALLSTACK_TOKEN,\n called\n ].filter(truthy).join(\" \");\n cancelRender(Error(message));\n }, timeoutToUse)\n };\n }\n }\n if (typeof window !== \"undefined\") {\n window.remotion_renderReady = false;\n }\n return handle;\n};\nvar continueRender = (handle) => {\n if (typeof handle === \"undefined\") {\n throw new TypeError(\"The continueRender() method must be called with a parameter that is the return value of delayRender(). No value was passed.\");\n }\n if (typeof handle !== \"number\") {\n throw new TypeError(\"The parameter passed into continueRender() must be the return value of delayRender() which is a number. Got: \" + JSON.stringify(handle));\n }\n handles = handles.filter((h) => {\n if (h === handle) {\n if (getRemotionEnvironment().isRendering) {\n clearTimeout(window.remotion_delayRenderTimeouts[handle].timeout);\n delete window.remotion_delayRenderTimeouts[handle];\n }\n return false;\n }\n return true;\n });\n if (handles.length === 0 && typeof window !== \"undefined\") {\n window.remotion_renderReady = true;\n }\n};\n\n// src/audio/AudioForRendering.tsx\nimport { jsx as jsx17 } from \"react/jsx-runtime\";\nvar AudioForRenderingRefForwardingFunction = (props, ref) => {\n const audioRef = useRef9(null);\n const {\n volume: volumeProp,\n playbackRate,\n allowAmplificationDuringRender,\n onDuration,\n toneFrequency,\n _remotionInternalNeedsDurationCalculation,\n _remotionInternalNativeLoopPassed,\n acceptableTimeShiftInSeconds,\n name,\n onError,\n delayRenderRetries,\n delayRenderTimeoutInMilliseconds,\n loopVolumeCurveBehavior,\n pauseWhenBuffering,\n ...nativeProps\n } = props;\n const absoluteFrame = useTimelinePosition();\n const volumePropFrame = useFrameForVolumeProp(loopVolumeCurveBehavior ?? \"repeat\");\n const frame = useCurrentFrame();\n const sequenceContext = useContext22(SequenceContext);\n const { registerRenderAsset, unregisterRenderAsset } = useContext22(RenderAssetManager);\n const id = useMemo21(() => `audio-${random(props.src ?? \"\")}-${sequenceContext?.relativeFrom}-${sequenceContext?.cumulatedFrom}-${sequenceContext?.durationInFrames}`, [\n props.src,\n sequenceContext?.relativeFrom,\n sequenceContext?.cumulatedFrom,\n sequenceContext?.durationInFrames\n ]);\n const volume = evaluateVolume({\n volume: volumeProp,\n frame: volumePropFrame,\n mediaVolume: 1,\n allowAmplificationDuringRender: allowAmplificationDuringRender ?? false\n });\n useImperativeHandle4(ref, () => {\n return audioRef.current;\n }, []);\n useEffect17(() => {\n if (!props.src) {\n throw new Error(\"No src passed\");\n }\n if (!window.remotion_audioEnabled) {\n return;\n }\n if (props.muted) {\n return;\n }\n if (volume <= 0) {\n return;\n }\n registerRenderAsset({\n type: \"audio\",\n src: getAbsoluteSrc(props.src),\n id,\n frame: absoluteFrame,\n volume,\n mediaFrame: frame,\n playbackRate: props.playbackRate ?? 1,\n allowAmplificationDuringRender: allowAmplificationDuringRender ?? false,\n toneFrequency: toneFrequency ?? null,\n audioStartFrame: Math.max(0, -(sequenceContext?.relativeFrom ?? 0))\n });\n return () => unregisterRenderAsset(id);\n }, [\n props.muted,\n props.src,\n registerRenderAsset,\n absoluteFrame,\n id,\n unregisterRenderAsset,\n volume,\n volumePropFrame,\n frame,\n playbackRate,\n props.playbackRate,\n allowAmplificationDuringRender,\n toneFrequency,\n sequenceContext?.relativeFrom\n ]);\n const { src } = props;\n const needsToRenderAudioTag = ref || _remotionInternalNeedsDurationCalculation;\n useLayoutEffect3(() => {\n if (window.process?.env?.NODE_ENV === \"test\") {\n return;\n }\n if (!needsToRenderAudioTag) {\n return;\n }\n const newHandle = delayRender(\"Loading <Audio> duration with src=\" + src, {\n retries: delayRenderRetries ?? undefined,\n timeoutInMilliseconds: delayRenderTimeoutInMilliseconds ?? undefined\n });\n const { current } = audioRef;\n const didLoad = () => {\n if (current?.duration) {\n onDuration(current.src, current.duration);\n }\n continueRender(newHandle);\n };\n if (current?.duration) {\n onDuration(current.src, current.duration);\n continueRender(newHandle);\n } else {\n current?.addEventListener(\"loadedmetadata\", didLoad, { once: true });\n }\n return () => {\n current?.removeEventListener(\"loadedmetadata\", didLoad);\n continueRender(newHandle);\n };\n }, [\n src,\n onDuration,\n needsToRenderAudioTag,\n delayRenderRetries,\n delayRenderTimeoutInMilliseconds\n ]);\n if (!needsToRenderAudioTag) {\n return null;\n }\n return /* @__PURE__ */ jsx17(\"audio\", {\n ref: audioRef,\n ...nativeProps\n });\n};\nvar AudioForRendering = forwardRef4(AudioForRenderingRefForwardingFunction);\n\n// src/audio/Audio.tsx\nimport { jsx as jsx18 } from \"react/jsx-runtime\";\nvar AudioRefForwardingFunction = (props, ref) => {\n const audioContext = useContext23(SharedAudioContext);\n const {\n startFrom,\n endAt,\n name,\n stack,\n pauseWhenBuffering,\n showInTimeline,\n _remotionDebugSeeking,\n ...otherProps\n } = props;\n const { loop, ...propsOtherThanLoop } = props;\n const { fps } = useVideoConfig();\n const environment = getRemotionEnvironment();\n const { durations, setDurations } = useContext23(DurationsContext);\n if (typeof props.src !== \"string\") {\n throw new TypeError(`The \\`<Audio>\\` tag requires a string for \\`src\\`, but got ${JSON.stringify(props.src)} instead.`);\n }\n const preloadedSrc = usePreload(props.src);\n const onError = useCallback9((e) => {\n console.log(e.currentTarget.error);\n const errMessage = `Could not play audio with src ${preloadedSrc}: ${e.currentTarget.error}. See https://remotion.dev/docs/media-playback-error for help.`;\n if (loop) {\n cancelRender(new Error(errMessage));\n } else {\n console.warn(errMessage);\n }\n }, [loop, preloadedSrc]);\n const onDuration = useCallback9((src, durationInSeconds) => {\n setDurations({ type: \"got-duration\", durationInSeconds, src });\n }, [setDurations]);\n const durationFetched = durations[getAbsoluteSrc(preloadedSrc)] ?? durations[getAbsoluteSrc(props.src)];\n if (loop && durationFetched !== undefined) {\n const duration = durationFetched * fps;\n return /* @__PURE__ */ jsx18(Loop, {\n layout: \"none\",\n durationInFrames: calculateLoopDuration({\n endAt,\n mediaDuration: duration,\n playbackRate: props.playbackRate ?? 1,\n startFrom\n }),\n children: /* @__PURE__ */ jsx18(Audio, {\n ...propsOtherThanLoop,\n ref,\n _remotionInternalNativeLoopPassed: true\n })\n });\n }\n if (typeof startFrom !== \"undefined\" || typeof endAt !== \"undefined\") {\n validateStartFromProps(startFrom, endAt);\n const startFromFrameNo = startFrom ?? 0;\n const endAtFrameNo = endAt ?? Infinity;\n return /* @__PURE__ */ jsx18(Sequence, {\n layout: \"none\",\n from: 0 - startFromFrameNo,\n showInTimeline: false,\n durationInFrames: endAtFrameNo,\n name,\n children: /* @__PURE__ */ jsx18(Audio, {\n _remotionInternalNeedsDurationCalculation: Boolean(loop),\n pauseWhenBuffering: pauseWhenBuffering ?? false,\n ...otherProps,\n ref\n })\n });\n }\n validateMediaProps(props, \"Audio\");\n if (environment.isRendering) {\n return /* @__PURE__ */ jsx18(AudioForRendering, {\n onDuration,\n ...props,\n ref,\n onError,\n _remotionInternalNeedsDurationCalculation: Boolean(loop)\n });\n }\n return /* @__PURE__ */ jsx18(AudioForPreview, {\n _remotionInternalNativeLoopPassed: props._remotionInternalNativeLoopPassed ?? false,\n _remotionDebugSeeking: _remotionDebugSeeking ?? false,\n _remotionInternalStack: stack ?? null,\n shouldPreMountAudioTags: audioContext !== null && audioContext.numberOfAudioTags > 0,\n ...props,\n ref,\n onError,\n onDuration,\n pauseWhenBuffering: pauseWhenBuffering ?? false,\n _remotionInternalNeedsDurationCalculation: Boolean(loop),\n showInTimeline: showInTimeline ?? true\n });\n};\nvar Audio = forwardRef5(AudioRefForwardingFunction);\naddSequenceStackTraces(Audio);\n// src/Composition.tsx\nimport { Suspense, useContext as useContext25, useEffect as useEffect19, useMemo as useMemo24 } from \"react\";\nimport { createPortal } from \"react-dom\";\n\n// src/Folder.tsx\nimport { createContext as createContext17, useContext as useContext24, useEffect as useEffect18, useMemo as useMemo22 } from \"react\";\n\n// src/validation/validate-folder-name.ts\nvar getRegex = () => /^([a-zA-Z0-9-\\u4E00-\\u9FFF])+$/g;\nvar isFolderNameValid = (name) => name.match(getRegex());\nvar validateFolderName = (name) => {\n if (name === undefined || name === null) {\n throw new TypeError(\"You must pass a name to a <Folder />.\");\n }\n if (typeof name !== \"string\") {\n throw new TypeError(`The \"name\" you pass into <Folder /> must be a string. Got: ${typeof name}`);\n }\n if (!isFolderNameValid(name)) {\n throw new Error(`Folder name can only contain a-z, A-Z, 0-9 and -. You passed ${name}`);\n }\n};\nvar invalidFolderNameErrorMessage = `Folder name must match ${String(getRegex())}`;\n\n// src/Folder.tsx\nimport { jsx as jsx19 } from \"react/jsx-runtime\";\nvar FolderContext = createContext17({\n folderName: null,\n parentName: null\n});\nvar Folder = ({\n name,\n children\n}) => {\n const parent = useContext24(FolderContext);\n const { registerFolder, unregisterFolder } = useContext24(CompositionManager);\n validateFolderName(name);\n const parentNameArr = [parent.parentName, parent.folderName].filter(truthy);\n const parentName = parentNameArr.length === 0 ? null : parentNameArr.join(\"/\");\n const value = useMemo22(() => {\n return {\n folderName: name,\n parentName\n };\n }, [name, parentName]);\n useEffect18(() => {\n registerFolder(name, parentName);\n return () => {\n unregisterFolder(name, parentName);\n };\n }, [name, parent.folderName, parentName, registerFolder, unregisterFolder]);\n return /* @__PURE__ */ jsx19(FolderContext.Provider, {\n value,\n children\n });\n};\n\n// src/loading-indicator.tsx\nimport { jsx as jsx20, jsxs as jsxs2 } from \"react/jsx-runtime\";\nvar rotate = {\n transform: `rotate(90deg)`\n};\nvar ICON_SIZE = 40;\nvar label = {\n color: \"white\",\n fontSize: 14,\n fontFamily: \"sans-serif\"\n};\nvar container = {\n justifyContent: \"center\",\n alignItems: \"center\"\n};\nvar Loading = () => {\n return /* @__PURE__ */ jsxs2(AbsoluteFill, {\n style: container,\n id: \"remotion-comp-loading\",\n children: [\n /* @__PURE__ */ jsx20(\"style\", {\n type: \"text/css\",\n children: `\n\t\t\t\t@keyframes anim {\n\t\t\t\t\tfrom {\n\t\t\t\t\t\topacity: 0\n\t\t\t\t\t}\n\t\t\t\t\tto {\n\t\t\t\t\t\topacity: 1\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t#remotion-comp-loading {\n\t\t\t\t\tanimation: anim 2s;\n\t\t\t\t\tanimation-fill-mode: forwards;\n\t\t\t\t}\n\t\t\t`\n }),\n /* @__PURE__ */ jsx20(\"svg\", {\n width: ICON_SIZE,\n height: ICON_SIZE,\n viewBox: \"-100 -100 400 400\",\n style: rotate,\n children: /* @__PURE__ */ jsx20(\"path\", {\n fill: \"#555\",\n stroke: \"#555\",\n strokeWidth: \"100\",\n strokeLinejoin: \"round\",\n 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\"\n })\n }),\n /* @__PURE__ */ jsxs2(\"p\", {\n style: label,\n children: [\n \"Resolving \",\n \"<Suspense>\",\n \"...\"\n ]\n })\n ]\n });\n};\n\n// src/portal-node.ts\nvar _portalNode = null;\nvar portalNode = () => {\n if (!_portalNode) {\n if (typeof document === \"undefined\") {\n throw new Error(\"Tried to call an API that only works in the browser from outside the browser\");\n }\n _portalNode = document.createElement(\"div\");\n _portalNode.style.position = \"absolute\";\n _portalNode.style.top = \"0px\";\n _portalNode.style.left = \"0px\";\n _portalNode.style.right = \"0px\";\n _portalNode.style.bottom = \"0px\";\n _portalNode.style.width = \"100%\";\n _portalNode.style.height = \"100%\";\n _portalNode.style.display = \"flex\";\n _portalNode.style.flexDirection = \"column\";\n const containerNode = document.createElement(\"div\");\n containerNode.style.position = \"fixed\";\n containerNode.style.top = -999999 + \"px\";\n containerNode.appendChild(_portalNode);\n document.body.appendChild(containerNode);\n }\n return _portalNode;\n};\n\n// src/use-lazy-component.ts\nimport React16, { useMemo as useMemo23 } from \"react\";\nvar useLazyComponent = (compProps) => {\n const lazy = useMemo23(() => {\n if (\"lazyComponent\" in compProps && typeof compProps.lazyComponent !== \"undefined\") {\n return React16.lazy(compProps.lazyComponent);\n }\n if (\"component\" in compProps) {\n if (typeof document === \"undefined\") {\n return compProps.component;\n }\n return React16.lazy(() => Promise.resolve({ default: compProps.component }));\n }\n throw new Error(\"You must pass either 'component' or 'lazyComponent'\");\n }, [compProps.component, compProps.lazyComponent]);\n return lazy;\n};\n\n// src/validation/validate-composition-id.ts\nvar getRegex2 = () => /^([a-zA-Z0-9-\\u4E00-\\u9FFF])+$/g;\nvar isCompositionIdValid = (id) => id.match(getRegex2());\nvar validateCompositionId = (id) => {\n if (!isCompositionIdValid(id)) {\n throw new Error(`Composition id can only contain a-z, A-Z, 0-9, CJK characters and -. You passed ${id}`);\n }\n};\nvar invalidCompositionErrorMessage = `Composition ID must match ${String(getRegex2())}`;\n\n// src/validation/validate-default-props.ts\nvar validateDefaultAndInputProps = (defaultProps, name, compositionId) => {\n if (!defaultProps) {\n return;\n }\n if (typeof defaultProps !== \"object\") {\n throw new Error(`\"${name}\" must be an object, but you passed a value of type ${typeof defaultProps}`);\n }\n if (Array.isArray(defaultProps)) {\n throw new Error(`\"${name}\" must be an object, an array was passed ${compositionId ? `for composition \"${compositionId}\"` : \"\"}`);\n }\n};\n\n// src/Composition.tsx\nimport { jsx as jsx21 } from \"react/jsx-runtime\";\nvar ClipComposition = ({ children }) => {\n const { clipRegion } = useContext25(NativeLayersContext);\n const style = useMemo24(() => {\n return {\n display: \"flex\",\n flexDirection: \"row\",\n opacity: clipRegion === \"hide\" ? 0 : 1,\n clipPath: clipRegion && clipRegion !== \"hide\" ? `polygon(${clipRegion.x}px ${clipRegion.y}px, ${clipRegion.x}px ${clipRegion.height + clipRegion.y}px, ${clipRegion.width + clipRegion.x}px ${clipRegion.height + clipRegion.y}px, ${clipRegion.width + clipRegion.x}px ${clipRegion.y}px)` : undefined\n };\n }, [clipRegion]);\n return /* @__PURE__ */ jsx21(AbsoluteFill, {\n style,\n children\n });\n};\nvar Fallback = () => {\n useEffect19(() => {\n const fallback = delayRender(\"Waiting for Root component to unsuspend\");\n return () => continueRender(fallback);\n }, []);\n return null;\n};\nvar Composition = ({\n width,\n height,\n fps,\n durationInFrames,\n id,\n defaultProps,\n schema,\n ...compProps\n}) => {\n const { registerComposition, unregisterComposition } = useContext25(CompositionManager);\n const video = useVideo();\n const lazy = useLazyComponent(compProps);\n const nonce = useNonce();\n const isPlayer = useIsPlayer();\n const environment = getRemotionEnvironment();\n const canUseComposition = useContext25(CanUseRemotionHooks);\n if (canUseComposition) {\n if (isPlayer) {\n throw new Error(\"<Composition> was mounted inside the `component` that was passed to the <Player>. See https://remotion.dev/docs/wrong-composition-mount for help.\");\n }\n throw new Error(\"<Composition> mounted inside another composition. See https://remotion.dev/docs/wrong-composition-mount for help.\");\n }\n const { folderName, parentName } = useContext25(FolderContext);\n useEffect19(() => {\n if (!id) {\n throw new Error(\"No id for composition passed.\");\n }\n validateCompositionId(id);\n validateDefaultAndInputProps(defaultProps, \"defaultProps\", id);\n registerComposition({\n durationInFrames: durationInFrames ?? undefined,\n fps: fps ?? undefined,\n height: height ?? undefined,\n width: width ?? undefined,\n id,\n folderName,\n component: lazy,\n defaultProps: serializeThenDeserializeInStudio(defaultProps ?? {}),\n nonce,\n parentFolderName: parentName,\n schema: schema ?? null,\n calculateMetadata: compProps.calculateMetadata ?? null\n });\n return () => {\n unregisterComposition(id);\n };\n }, [\n durationInFrames,\n fps,\n height,\n lazy,\n id,\n folderName,\n defaultProps,\n registerComposition,\n unregisterComposition,\n width,\n nonce,\n parentName,\n schema,\n compProps.calculateMetadata\n ]);\n const resolved = useResolvedVideoConfig(id);\n if (environment.isStudio && video && video.component === lazy) {\n const Comp = lazy;\n if (resolved === null || resolved.type !== \"success\") {\n return null;\n }\n return createPortal(/* @__PURE__ */ jsx21(ClipComposition, {\n children: /* @__PURE__ */ jsx21(CanUseRemotionHooksProvider, {\n children: /* @__PURE__ */ jsx21(Suspense, {\n fallback: /* @__PURE__ */ jsx21(Loading, {}),\n children: /* @__PURE__ */ jsx21(Comp, {\n ...resolved.result.props ?? {}\n })\n })\n })\n }), portalNode());\n }\n if (environment.isRendering && video && video.component === lazy) {\n const Comp = lazy;\n if (resolved === null || resolved.type !== \"success\") {\n return null;\n }\n return createPortal(/* @__PURE__ */ jsx21(CanUseRemotionHooksProvider, {\n children: /* @__PURE__ */ jsx21(Suspense, {\n fallback: /* @__PURE__ */ jsx21(Fallback, {}),\n children: /* @__PURE__ */ jsx21(Comp, {\n ...resolved.result.props ?? {}\n })\n })\n }), portalNode());\n }\n return null;\n};\n// src/CompositionManager.tsx\nimport React18, {\n useCallback as useCallback10,\n useImperativeHandle as useImperativeHandle5,\n useMemo as useMemo25,\n useRef as useRef10,\n useState as useState15\n} from \"react\";\nimport { jsx as jsx22 } from \"react/jsx-runtime\";\nvar compositionsRef = React18.createRef();\nvar CompositionManagerProvider = ({ children, numberOfAudioTags }) => {\n const [compositions, setCompositions] = useState15([]);\n const currentcompositionsRef = useRef10(compositions);\n const [folders, setFolders] = useState15([]);\n const [canvasContent, setCanvasContent] = useState15(null);\n const [currentCompositionMetadata, setCurrentCompositionMetadata] = useState15(null);\n const updateCompositions = useCallback10((updateComps) => {\n setCompositions((comps) => {\n const updated = updateComps(comps);\n currentcompositionsRef.current = updated;\n return updated;\n });\n }, []);\n const registerComposition = useCallback10((comp) => {\n updateCompositions((comps) => {\n if (comps.find((c) => c.id === comp.id)) {\n throw new Error(`Multiple composition with id ${comp.id} are registered.`);\n }\n const value = [...comps, comp].slice().sort((a, b) => a.nonce - b.nonce);\n return value;\n });\n }, [updateCompositions]);\n const unregisterComposition = useCallback10((id) => {\n setCompositions((comps) => {\n return comps.filter((c) => c.id !== id);\n });\n }, []);\n const registerFolder = useCallback10((name, parent) => {\n setFolders((prevFolders) => {\n return [\n ...prevFolders,\n {\n name,\n parent\n }\n ];\n });\n }, []);\n const unregisterFolder = useCallback10((name, parent) => {\n setFolders((prevFolders) => {\n return prevFolders.filter((p) => !(p.name === name && p.parent === parent));\n });\n }, []);\n useImperativeHandle5(compositionsRef, () => {\n return {\n getCompositions: () => currentcompositionsRef.current\n };\n }, []);\n const composition = compositions.find((c) => canvasContent?.type === \"composition\" ? c.id === canvasContent.compositionId : null);\n const updateCompositionDefaultProps = useCallback10((id, newDefaultProps) => {\n setCompositions((comps) => {\n const updated = comps.map((c) => {\n if (c.id === id) {\n return {\n ...c,\n defaultProps: newDefaultProps\n };\n }\n return c;\n });\n return updated;\n });\n }, []);\n const contextValue = useMemo25(() => {\n return {\n compositions,\n registerComposition,\n unregisterComposition,\n folders,\n registerFolder,\n unregisterFolder,\n currentCompositionMetadata,\n setCurrentCompositionMetadata,\n canvasContent,\n setCanvasContent,\n updateCompositionDefaultProps\n };\n }, [\n compositions,\n registerComposition,\n unregisterComposition,\n folders,\n registerFolder,\n unregisterFolder,\n currentCompositionMetadata,\n canvasContent,\n updateCompositionDefaultProps\n ]);\n return /* @__PURE__ */ jsx22(CompositionManager.Provider, {\n value: contextValue,\n children: /* @__PURE__ */ jsx22(SequenceManagerProvider, {\n children: /* @__PURE__ */ jsx22(RenderAssetManagerProvider, {\n children: /* @__PURE__ */ jsx22(ResolveCompositionConfig, {\n children: /* @__PURE__ */ jsx22(SharedAudioContextProvider, {\n numberOfAudioTags,\n component: composition?.component ?? null,\n children\n })\n })\n })\n })\n });\n};\n// src/bezier.ts\nfunction a(aA1, aA2) {\n return 1 - 3 * aA2 + 3 * aA1;\n}\nfunction b(aA1, aA2) {\n return 3 * aA2 - 6 * aA1;\n}\nfunction c(aA1) {\n return 3 * aA1;\n}\nfunction calcBezier(aT, aA1, aA2) {\n return ((a(aA1, aA2) * aT + b(aA1, aA2)) * aT + c(aA1)) * aT;\n}\nfunction getSlope(aT, aA1, aA2) {\n return 3 * a(aA1, aA2) * aT * aT + 2 * b(aA1, aA2) * aT + c(aA1);\n}\nfunction binarySubdivide({\n aX,\n _aA,\n _aB,\n mX1,\n mX2\n}) {\n let currentX;\n let currentT;\n let i = 0;\n let aA = _aA;\n let aB = _aB;\n do {\n currentT = aA + (aB - aA) / 2;\n currentX = calcBezier(currentT, mX1, mX2) - aX;\n if (currentX > 0) {\n aB = currentT;\n } else {\n aA = currentT;\n }\n } while (Math.abs(currentX) > SUBDIVISION_PRECISION && ++i < SUBDIVISION_MAX_ITERATIONS);\n return currentT;\n}\nfunction newtonRaphsonIterate(aX, _aGuessT, mX1, mX2) {\n let aGuessT = _aGuessT;\n for (let i = 0;i < NEWTON_ITERATIONS; ++i) {\n const currentSlope = getSlope(aGuessT, mX1, mX2);\n if (currentSlope === 0) {\n return aGuessT;\n }\n const currentX = calcBezier(aGuessT, mX1, mX2) - aX;\n aGuessT -= currentX / currentSlope;\n }\n return aGuessT;\n}\nfunction bezier(mX1, mY1, mX2, mY2) {\n if (!(mX1 >= 0 && mX1 <= 1 && mX2 >= 0 && mX2 <= 1)) {\n throw new Error(\"bezier x values must be in [0, 1] range\");\n }\n const sampleValues = float32ArraySupported ? new Float32Array(kSplineTableSize) : new Array(kSplineTableSize);\n if (mX1 !== mY1 || mX2 !== mY2) {\n for (let i = 0;i < kSplineTableSize; ++i) {\n sampleValues[i] = calcBezier(i * kSampleStepSize, mX1, mX2);\n }\n }\n function getTForX(aX) {\n let intervalStart = 0;\n let currentSample = 1;\n const lastSample = kSplineTableSize - 1;\n for (;currentSample !== lastSample && sampleValues[currentSample] <= aX; ++currentSample) {\n intervalStart += kSampleStepSize;\n }\n --currentSample;\n const dist = (aX - sampleValues[currentSample]) / (sampleValues[currentSample + 1] - sampleValues[currentSample]);\n const guessForT = intervalStart + dist * kSampleStepSize;\n const initialSlope = getSlope(guessForT, mX1, mX2);\n if (initialSlope >= NEWTON_MIN_SLOPE) {\n return newtonRaphsonIterate(aX, guessForT, mX1, mX2);\n }\n if (initialSlope === 0) {\n return guessForT;\n }\n return binarySubdivide({\n aX,\n _aA: intervalStart,\n _aB: intervalStart + kSampleStepSize,\n mX1,\n mX2\n });\n }\n return function(x) {\n if (mX1 === mY1 && mX2 === mY2) {\n return x;\n }\n if (x === 0) {\n return 0;\n }\n if (x === 1) {\n return 1;\n }\n return calcBezier(getTForX(x), mY1, mY2);\n };\n}\nvar NEWTON_ITERATIONS = 4;\nvar NEWTON_MIN_SLOPE = 0.001;\nvar SUBDIVISION_PRECISION = 0.0000001;\nvar SUBDIVISION_MAX_ITERATIONS = 10;\nvar kSplineTableSize = 11;\nvar kSampleStepSize = 1 / (kSplineTableSize - 1);\nvar float32ArraySupported = typeof Float32Array === \"function\";\n\n// src/easing.ts\nclass Easing {\n static step0(n) {\n return n > 0 ? 1 : 0;\n }\n static step1(n) {\n return n >= 1 ? 1 : 0;\n }\n static linear(t) {\n return t;\n }\n static ease(t) {\n return Easing.bezier(0.42, 0, 1, 1)(t);\n }\n static quad(t) {\n return t * t;\n }\n static cubic(t) {\n return t * t * t;\n }\n static poly(n) {\n return (t) => t ** n;\n }\n static sin(t) {\n return 1 - Math.cos(t * Math.PI / 2);\n }\n static circle(t) {\n return 1 - Math.sqrt(1 - t * t);\n }\n static exp(t) {\n return 2 ** (10 * (t - 1));\n }\n static elastic(bounciness = 1) {\n const p = bounciness * Math.PI;\n return (t) => 1 - Math.cos(t * Math.PI / 2) ** 3 * Math.cos(t * p);\n }\n static back(s = 1.70158) {\n return (t) => t * t * ((s + 1) * t - s);\n }\n static bounce(t) {\n if (t < 1 / 2.75) {\n return 7.5625 * t * t;\n }\n if (t < 2 / 2.75) {\n const t2_ = t - 1.5 / 2.75;\n return 7.5625 * t2_ * t2_ + 0.75;\n }\n if (t < 2.5 / 2.75) {\n const t2_ = t - 2.25 / 2.75;\n return 7.5625 * t2_ * t2_ + 0.9375;\n }\n const t2 = t - 2.625 / 2.75;\n return 7.5625 * t2 * t2 + 0.984375;\n }\n static bezier(x1, y1, x2, y2) {\n return bezier(x1, y1, x2, y2);\n }\n static in(easing) {\n return easing;\n }\n static out(easing) {\n return (t) => 1 - easing(1 - t);\n }\n static inOut(easing) {\n return (t) => {\n if (t < 0.5) {\n return easing(t * 2) / 2;\n }\n return 1 - easing((1 - t) * 2) / 2;\n };\n }\n}\n// src/v5-flag.ts\nvar ENABLE_V5_BREAKING_CHANGES = false;\n\n// src/get-static-files.ts\nvar warnedServer = false;\nvar warnedPlayer = false;\nvar warnServerOnce = () => {\n if (warnedServer) {\n return;\n }\n warnedServer = true;\n console.warn(\"Called getStaticFiles() on the server. The API is only available in the browser. An empty array was returned.\");\n};\nvar warnPlayerOnce = () => {\n if (warnedPlayer) {\n return;\n }\n warnedPlayer = true;\n console.warn(\"Called getStaticFiles() while using the Remotion Player. The API is only available while using the Remotion Studio. An empty array was returned.\");\n};\nvar getStaticFiles = () => {\n if (ENABLE_V5_BREAKING_CHANGES) {\n throw new Error(\"getStaticFiles() has moved into the `@remotion/studio` package. Update your imports.\");\n }\n if (typeof document === \"undefined\") {\n warnServerOnce();\n return [];\n }\n if (window.remotion_isPlayer) {\n warnPlayerOnce();\n return [];\n }\n return window.remotion_staticFiles;\n};\n// src/IFrame.tsx\nimport { forwardRef as forwardRef6, useCallback as useCallback11, useState as useState16 } from \"react\";\nimport { jsx as jsx23 } from \"react/jsx-runtime\";\nvar IFrameRefForwarding = ({\n onLoad,\n onError,\n delayRenderRetries,\n delayRenderTimeoutInMilliseconds,\n ...props2\n}, ref) => {\n const [handle] = useState16(() => delayRender(`Loading <IFrame> with source ${props2.src}`, {\n retries: delayRenderRetries ?? undefined,\n timeoutInMilliseconds: delayRenderTimeoutInMilliseconds ?? undefined\n }));\n const didLoad = useCallback11((e) => {\n continueRender(handle);\n onLoad?.(e);\n }, [handle, onLoad]);\n const didGetError = useCallback11((e) => {\n continueRender(handle);\n if (onError) {\n onError(e);\n } else {\n console.error(\"Error loading iframe:\", e, \"Handle the event using the onError() prop to make this message disappear.\");\n }\n }, [handle, onError]);\n return /* @__PURE__ */ jsx23(\"iframe\", {\n ...props2,\n ref,\n onError: didGetError,\n onLoad: didLoad\n });\n};\nvar IFrame = forwardRef6(IFrameRefForwarding);\n// src/Img.tsx\nimport {\n forwardRef as forwardRef7,\n useCallback as useCallback12,\n useContext as useContext26,\n useImperativeHandle as useImperativeHandle6,\n useLayoutEffect as useLayoutEffect4,\n useRef as useRef11\n} from \"react\";\nfunction exponentialBackoff(errorCount) {\n return 1000 * 2 ** (errorCount - 1);\n}\nimport { jsx as jsx24 } from \"react/jsx-runtime\";\nvar ImgRefForwarding = ({\n onError,\n maxRetries = 2,\n src,\n pauseWhenLoading,\n delayRenderRetries,\n delayRenderTimeoutInMilliseconds,\n onImageFrame,\n ...props2\n}, ref) => {\n const imageRef = useRef11(null);\n const errors = useRef11({});\n const { delayPlayback } = useBufferState();\n const sequenceContext = useContext26(SequenceContext);\n if (!src) {\n throw new Error('No \"src\" prop was passed to <Img>.');\n }\n useImperativeHandle6(ref, () => {\n return imageRef.current;\n }, []);\n const actualSrc = usePreload(src);\n const retryIn = useCallback12((timeout) => {\n if (!imageRef.current) {\n return;\n }\n const currentSrc = imageRef.current.src;\n setTimeout(() => {\n if (!imageRef.current) {\n return;\n }\n const newSrc = imageRef.current?.src;\n if (newSrc !== currentSrc) {\n return;\n }\n imageRef.current.removeAttribute(\"src\");\n imageRef.current.setAttribute(\"src\", newSrc);\n }, timeout);\n }, []);\n const didGetError = useCallback12((e) => {\n if (!errors.current) {\n return;\n }\n errors.current[imageRef.current?.src] = (errors.current[imageRef.current?.src] ?? 0) + 1;\n if (onError && (errors.current[imageRef.current?.src] ?? 0) > maxRetries) {\n onError(e);\n return;\n }\n if ((errors.current[imageRef.current?.src] ?? 0) <= maxRetries) {\n const backoff = exponentialBackoff(errors.current[imageRef.current?.src] ?? 0);\n console.warn(`Could not load image with source ${imageRef.current?.src}, retrying again in ${backoff}ms`);\n retryIn(backoff);\n return;\n }\n cancelRender(\"Error loading image with src: \" + imageRef.current?.src);\n }, [maxRetries, onError, retryIn]);\n if (typeof window !== \"undefined\") {\n const isPremounting = Boolean(sequenceContext?.premounting);\n useLayoutEffect4(() => {\n if (window.process?.env?.NODE_ENV === \"test\") {\n if (imageRef.current) {\n imageRef.current.src = actualSrc;\n }\n return;\n }\n const newHandle = delayRender(\"Loading <Img> with src=\" + actualSrc, {\n retries: delayRenderRetries ?? undefined,\n timeoutInMilliseconds: delayRenderTimeoutInMilliseconds ?? undefined\n });\n const unblock = pauseWhenLoading && !isPremounting ? delayPlayback().unblock : () => {\n return;\n };\n const { current } = imageRef;\n let unmounted = false;\n const onComplete = () => {\n if (unmounted) {\n return;\n }\n if ((errors.current[imageRef.current?.src] ?? 0) > 0) {\n delete errors.current[imageRef.current?.src];\n console.info(`Retry successful - ${imageRef.current?.src} is now loaded`);\n }\n if (current) {\n current.src = actualSrc;\n onImageFrame?.(current);\n }\n unblock();\n continueRender(newHandle);\n };\n const newImg = new Image;\n newImg.src = actualSrc;\n newImg.decode().then(onComplete).catch((err) => {\n console.warn(err);\n if (newImg.complete) {\n onComplete();\n } else {\n newImg.addEventListener(\"load\", onComplete);\n }\n });\n return () => {\n unmounted = true;\n newImg.removeEventListener(\"load\", onComplete);\n unblock();\n continueRender(newHandle);\n };\n }, [\n actualSrc,\n delayPlayback,\n delayRenderRetries,\n delayRenderTimeoutInMilliseconds,\n pauseWhenLoading,\n isPremounting,\n onImageFrame\n ]);\n }\n return /* @__PURE__ */ jsx24(\"img\", {\n ...props2,\n ref: imageRef,\n onError: didGetError\n });\n};\nvar Img = forwardRef7(ImgRefForwarding);\n// src/default-css.ts\nvar exports_default_css = {};\n__export(exports_default_css, {\n makeDefaultPreviewCSS: () => makeDefaultPreviewCSS,\n injectCSS: () => injectCSS,\n OFFTHREAD_VIDEO_CLASS_NAME: () => OFFTHREAD_VIDEO_CLASS_NAME\n});\nvar injected = {};\nvar injectCSS = (css) => {\n if (typeof document === \"undefined\") {\n return;\n }\n if (injected[css]) {\n return;\n }\n const head = document.head || document.getElementsByTagName(\"head\")[0];\n const style = document.createElement(\"style\");\n style.appendChild(document.createTextNode(css));\n head.prepend(style);\n injected[css] = true;\n};\nvar OFFTHREAD_VIDEO_CLASS_NAME = \"__remotion_offthreadvideo\";\nvar makeDefaultPreviewCSS = (scope, backgroundColor) => {\n if (!scope) {\n return `\n * {\n box-sizing: border-box;\n }\n body {\n margin: 0;\n\t background-color: ${backgroundColor};\n }\n .${OFFTHREAD_VIDEO_CLASS_NAME} {\n object-fit: contain;\n }\n `;\n }\n return `\n ${scope} * {\n box-sizing: border-box;\n }\n ${scope} *:-webkit-full-screen {\n width: 100%;\n height: 100%;\n }\n ${scope} .${OFFTHREAD_VIDEO_CLASS_NAME} {\n object-fit: contain;\n }\n `;\n};\n\n// src/get-preview-dom-element.ts\nvar REMOTION_STUDIO_CONTAINER_ELEMENT = \"__remotion-studio-container\";\nvar getPreviewDomElement = () => {\n return document.getElementById(REMOTION_STUDIO_CONTAINER_ELEMENT);\n};\n\n// src/register-root.ts\nvar Root = null;\nvar listeners = [];\nvar registerRoot = (comp) => {\n if (!comp) {\n throw new Error(`You must pass a React component to registerRoot(), but ${JSON.stringify(comp)} was passed.`);\n }\n if (Root) {\n throw new Error(\"registerRoot() was called more than once.\");\n }\n Root = comp;\n listeners.forEach((l) => {\n l(comp);\n });\n};\nvar getRoot = () => {\n return Root;\n};\nvar waitForRoot = (fn) => {\n if (Root) {\n fn(Root);\n return () => {\n return;\n };\n }\n listeners.push(fn);\n return () => {\n listeners = listeners.filter((l) => l !== fn);\n };\n};\n\n// src/RemotionRoot.tsx\nimport {\n useEffect as useEffect20,\n useLayoutEffect as useLayoutEffect5,\n useMemo as useMemo26,\n useRef as useRef12,\n useState as useState17\n} from \"react\";\nimport { jsx as jsx25 } from \"react/jsx-runtime\";\nvar RemotionRoot = ({ children, numberOfAudioTags }) => {\n const [remotionRootId] = useState17(() => String(random(null)));\n const [frame, setFrame] = useState17(() => getInitialFrameState());\n const [playing, setPlaying] = useState17(false);\n const imperativePlaying = useRef12(false);\n const [fastRefreshes, setFastRefreshes] = useState17(0);\n const [playbackRate, setPlaybackRate] = useState17(1);\n const audioAndVideoTags = useRef12([]);\n if (typeof window !== \"undefined\") {\n useLayoutEffect5(() => {\n window.remotion_setFrame = (f, composition, attempt) => {\n window.remotion_attempt = attempt;\n const id = delayRender(`Setting the current frame to ${f}`);\n let asyncUpdate = true;\n setFrame((s) => {\n const currentFrame = s[composition] ?? window.remotion_initialFrame;\n if (currentFrame === f) {\n asyncUpdate = false;\n return s;\n }\n return {\n ...s,\n [composition]: f\n };\n });\n if (asyncUpdate) {\n requestAnimationFrame(() => continueRender(id));\n } else {\n continueRender(id);\n }\n };\n window.remotion_isPlayer = false;\n }, []);\n }\n const timelineContextValue = useMemo26(() => {\n return {\n frame,\n playing,\n imperativePlaying,\n rootId: remotionRootId,\n playbackRate,\n setPlaybackRate,\n audioAndVideoTags\n };\n }, [frame, playbackRate, playing, remotionRootId]);\n const setTimelineContextValue = useMemo26(() => {\n return {\n setFrame,\n setPlaying\n };\n }, []);\n const nonceContext = useMemo26(() => {\n let counter = 0;\n return {\n getNonce: () => counter++,\n fastRefreshes\n };\n }, [fastRefreshes]);\n useEffect20(() => {\n if (typeof __webpack_module__ !== \"undefined\") {\n if (__webpack_module__.hot) {\n __webpack_module__.hot.addStatusHandler((status) => {\n if (status === \"idle\") {\n setFastRefreshes((i) => i + 1);\n }\n });\n }\n }\n }, []);\n return /* @__PURE__ */ jsx25(NonceContext.Provider, {\n value: nonceContext,\n children: /* @__PURE__ */ jsx25(TimelineContext.Provider, {\n value: timelineContextValue,\n children: /* @__PURE__ */ jsx25(SetTimelineContext.Provider, {\n value: setTimelineContextValue,\n children: /* @__PURE__ */ jsx25(EditorPropsProvider, {\n children: /* @__PURE__ */ jsx25(PrefetchProvider, {\n children: /* @__PURE__ */ jsx25(NativeLayersProvider, {\n children: /* @__PURE__ */ jsx25(CompositionManagerProvider, {\n numberOfAudioTags,\n children: /* @__PURE__ */ jsx25(DurationsContextProvider, {\n children: /* @__PURE__ */ jsx25(BufferingProvider, {\n children\n })\n })\n })\n })\n })\n })\n })\n })\n });\n};\n\n// src/setup-env-variables.ts\nvar getEnvVariables = () => {\n if (getRemotionEnvironment().isRendering) {\n const param = window.remotion_envVariables;\n if (!param) {\n return {};\n }\n return { ...JSON.parse(param), NODE_ENV: \"production\" };\n }\n if (false) {\n }\n return {\n NODE_ENV: \"production\"\n };\n};\nvar setupEnvVariables = () => {\n const env = getEnvVariables();\n if (!window.process) {\n window.process = {};\n }\n if (!window.process.env) {\n window.process.env = {};\n }\n Object.keys(env).forEach((key) => {\n window.process.env[key] = env[key];\n });\n};\n\n// src/use-current-scale.ts\nimport React22, { createContext as createContext18 } from \"react\";\nvar CurrentScaleContext = React22.createContext(null);\nvar PreviewSizeContext = createContext18({\n setSize: () => {\n return;\n },\n size: { size: \"auto\", translation: { x: 0, y: 0 } }\n});\nvar calculateScale = ({\n canvasSize,\n compositionHeight,\n compositionWidth,\n previewSize\n}) => {\n const heightRatio = canvasSize.height / compositionHeight;\n const widthRatio = canvasSize.width / compositionWidth;\n const ratio = Math.min(heightRatio, widthRatio);\n return previewSize === \"auto\" ? ratio : Number(previewSize);\n};\nvar useCurrentScale = (options) => {\n const hasContext = React22.useContext(CurrentScaleContext);\n const zoomContext = React22.useContext(PreviewSizeContext);\n const config = useUnsafeVideoConfig();\n if (hasContext === null || config === null || zoomContext === null) {\n if (options?.dontThrowIfOutsideOfRemotion) {\n return 1;\n }\n if (getRemotionEnvironment().isRendering) {\n return 1;\n }\n throw new Error([\n \"useCurrentScale() was called outside of a Remotion context.\",\n \"This hook can only be called in a component that is being rendered by Remotion.\",\n \"If you want to this hook to return 1 outside of Remotion, pass {dontThrowIfOutsideOfRemotion: true} as an option.\",\n \"If you think you called this hook in a Remotion component, make sure all versions of Remotion are aligned.\"\n ].join(\"\\n\"));\n }\n if (hasContext.type === \"scale\") {\n return hasContext.scale;\n }\n return calculateScale({\n canvasSize: hasContext.canvasSize,\n compositionHeight: config.height,\n compositionWidth: config.width,\n previewSize: zoomContext.size.size\n });\n};\n\n// src/watch-static-file.ts\nvar WATCH_REMOTION_STATIC_FILES = \"remotion_staticFilesChanged\";\nvar watchStaticFile = (fileName, callback) => {\n if (ENABLE_V5_BREAKING_CHANGES) {\n throw new Error(\"watchStaticFile() has moved into the `@remotion/studio` package. Update your imports.\");\n }\n if (!getRemotionEnvironment().isStudio) {\n console.warn(\"The API is only available while using the Remotion Studio.\");\n return { cancel: () => {\n return;\n } };\n }\n const withoutStaticBase = fileName.startsWith(window.remotion_staticBase) ? fileName.replace(window.remotion_staticBase, \"\") : fileName;\n const withoutLeadingSlash = withoutStaticBase.startsWith(\"/\") ? withoutStaticBase.slice(1) : withoutStaticBase;\n let prevFileData = window.remotion_staticFiles.find((file) => file.name === withoutLeadingSlash);\n const checkFile = (event) => {\n const staticFiles = event.detail.files;\n const newFileData = staticFiles.find((file) => file.name === withoutLeadingSlash);\n if (!newFileData) {\n if (prevFileData !== undefined) {\n callback(null);\n }\n prevFileData = undefined;\n return;\n }\n if (prevFileData === undefined || prevFileData.lastModified !== newFileData.lastModified) {\n callback(newFileData);\n prevFileData = newFileData;\n }\n };\n window.addEventListener(WATCH_REMOTION_STATIC_FILES, checkFile);\n const cancel = () => {\n return window.removeEventListener(WATCH_REMOTION_STATIC_FILES, checkFile);\n };\n return { cancel };\n};\n\n// src/wrap-remotion-context.tsx\nimport React23, { useMemo as useMemo27 } from \"react\";\nfunction useRemotionContexts() {\n const compositionManagerCtx = React23.useContext(CompositionManager);\n const timelineContext = React23.useContext(TimelineContext);\n const setTimelineContext = React23.useContext(SetTimelineContext);\n const sequenceContext = React23.useContext(SequenceContext);\n const nonceContext = React23.useContext(NonceContext);\n const canUseRemotionHooksContext = React23.useContext(CanUseRemotionHooks);\n const nativeLayersContext = React23.useContext(NativeLayersContext);\n const preloadContext = React23.useContext(PreloadContext);\n const resolveCompositionContext = React23.useContext(ResolveCompositionContext);\n const renderAssetManagerContext = React23.useContext(RenderAssetManager);\n const sequenceManagerContext = React23.useContext(SequenceManager);\n const bufferManagerContext = React23.useContext(BufferingContextReact);\n return useMemo27(() => ({\n compositionManagerCtx,\n timelineContext,\n setTimelineContext,\n sequenceContext,\n nonceContext,\n canUseRemotionHooksContext,\n nativeLayersContext,\n preloadContext,\n resolveCompositionContext,\n renderAssetManagerContext,\n sequenceManagerContext,\n bufferManagerContext\n }), [\n compositionManagerCtx,\n nonceContext,\n sequenceContext,\n setTimelineContext,\n timelineContext,\n canUseRemotionHooksContext,\n nativeLayersContext,\n preloadContext,\n resolveCompositionContext,\n renderAssetManagerContext,\n sequenceManagerContext,\n bufferManagerContext\n ]);\n}\nimport { jsx as jsx26 } from \"react/jsx-runtime\";\nvar RemotionContextProvider = (props2) => {\n const { children, contexts } = props2;\n return /* @__PURE__ */ jsx26(CanUseRemotionHooks.Provider, {\n value: contexts.canUseRemotionHooksContext,\n children: /* @__PURE__ */ jsx26(NonceContext.Provider, {\n value: contexts.nonceContext,\n children: /* @__PURE__ */ jsx26(NativeLayersContext.Provider, {\n value: contexts.nativeLayersContext,\n children: /* @__PURE__ */ jsx26(PreloadContext.Provider, {\n value: contexts.preloadContext,\n children: /* @__PURE__ */ jsx26(CompositionManager.Provider, {\n value: contexts.compositionManagerCtx,\n children: /* @__PURE__ */ jsx26(SequenceManager.Provider, {\n value: contexts.sequenceManagerContext,\n children: /* @__PURE__ */ jsx26(RenderAssetManager.Provider, {\n value: contexts.renderAssetManagerContext,\n children: /* @__PURE__ */ jsx26(ResolveCompositionContext.Provider, {\n value: contexts.resolveCompositionContext,\n children: /* @__PURE__ */ jsx26(TimelineContext.Provider, {\n value: contexts.timelineContext,\n children: /* @__PURE__ */ jsx26(SetTimelineContext.Provider, {\n value: contexts.setTimelineContext,\n children: /* @__PURE__ */ jsx26(SequenceContext.Provider, {\n value: contexts.sequenceContext,\n children: /* @__PURE__ */ jsx26(BufferingContextReact.Provider, {\n value: contexts.bufferManagerContext,\n children\n })\n })\n })\n })\n })\n })\n })\n })\n })\n })\n })\n });\n};\n\n// src/internals.ts\nvar Internals = {\n useUnsafeVideoConfig,\n Timeline: exports_timeline_position_state,\n CompositionManager,\n SequenceManager,\n SequenceVisibilityToggleContext,\n RemotionRoot,\n useVideo,\n getRoot,\n useMediaVolumeState,\n useMediaMutedState,\n useLazyComponent,\n truthy,\n SequenceContext,\n useRemotionContexts,\n RemotionContextProvider,\n CSSUtils: exports_default_css,\n setupEnvVariables,\n MediaVolumeContext,\n SetMediaVolumeContext,\n getRemotionEnvironment,\n SharedAudioContext,\n SharedAudioContextProvider,\n invalidCompositionErrorMessage,\n isCompositionIdValid,\n getPreviewDomElement,\n compositionsRef,\n portalNode,\n waitForRoot,\n CanUseRemotionHooksProvider,\n CanUseRemotionHooks,\n PrefetchProvider,\n DurationsContextProvider,\n IsPlayerContextProvider,\n useIsPlayer,\n EditorPropsProvider,\n EditorPropsContext,\n usePreload,\n NonceContext,\n resolveVideoConfig,\n useResolvedVideoConfig,\n resolveCompositionsRef,\n ResolveCompositionConfig,\n REMOTION_STUDIO_CONTAINER_ELEMENT,\n RenderAssetManager,\n persistCurrentFrame,\n useTimelineSetFrame,\n NativeLayersProvider,\n ClipComposition,\n isIosSafari,\n WATCH_REMOTION_STATIC_FILES,\n addSequenceStackTraces,\n useMediaStartsAt,\n BufferingProvider,\n BufferingContextReact,\n enableSequenceStackTraces,\n CurrentScaleContext,\n PreviewSizeContext,\n calculateScale,\n editorPropsProviderRef,\n PROPS_UPDATED_EXTERNALLY,\n validateRenderAsset\n};\n// src/interpolate-colors.ts\nfunction call(...args) {\n return \"\\\\(\\\\s*(\" + args.join(\")\\\\s*,\\\\s*(\") + \")\\\\s*\\\\)\";\n}\nfunction getMatchers() {\n const cachedMatchers = {\n rgb: undefined,\n rgba: undefined,\n hsl: undefined,\n hsla: undefined,\n hex3: undefined,\n hex4: undefined,\n hex5: undefined,\n hex6: undefined,\n hex8: undefined\n };\n if (cachedMatchers.rgb === undefined) {\n cachedMatchers.rgb = new RegExp(\"rgb\" + call(NUMBER, NUMBER, NUMBER));\n cachedMatchers.rgba = new RegExp(\"rgba\" + call(NUMBER, NUMBER, NUMBER, NUMBER));\n cachedMatchers.hsl = new RegExp(\"hsl\" + call(NUMBER, PERCENTAGE, PERCENTAGE));\n cachedMatchers.hsla = new RegExp(\"hsla\" + call(NUMBER, PERCENTAGE, PERCENTAGE, NUMBER));\n cachedMatchers.hex3 = /^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/;\n cachedMatchers.hex4 = /^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/;\n cachedMatchers.hex6 = /^#([0-9a-fA-F]{6})$/;\n cachedMatchers.hex8 = /^#([0-9a-fA-F]{8})$/;\n }\n return cachedMatchers;\n}\nfunction hue2rgb(p, q, t) {\n if (t < 0) {\n t += 1;\n }\n if (t > 1) {\n t -= 1;\n }\n if (t < 1 / 6) {\n return p + (q - p) * 6 * t;\n }\n if (t < 1 / 2) {\n return q;\n }\n if (t < 2 / 3) {\n return p + (q - p) * (2 / 3 - t) * 6;\n }\n return p;\n}\nfunction hslToRgb(h, s, l) {\n const q = l < 0.5 ? l * (1 + s) : l + s - l * s;\n const p = 2 * l - q;\n const r = hue2rgb(p, q, h + 1 / 3);\n const g = hue2rgb(p, q, h);\n const b2 = hue2rgb(p, q, h - 1 / 3);\n return Math.round(r * 255) << 24 | Math.round(g * 255) << 16 | Math.round(b2 * 255) << 8;\n}\nfunction parse255(str) {\n const int = Number.parseInt(str, 10);\n if (int < 0) {\n return 0;\n }\n if (int > 255) {\n return 255;\n }\n return int;\n}\nfunction parse360(str) {\n const int = Number.parseFloat(str);\n return (int % 360 + 360) % 360 / 360;\n}\nfunction parse1(str) {\n const num = Number.parseFloat(str);\n if (num < 0) {\n return 0;\n }\n if (num > 1) {\n return 255;\n }\n return Math.round(num * 255);\n}\nfunction parsePercentage(str) {\n const int = Number.parseFloat(str);\n if (int < 0) {\n return 0;\n }\n if (int > 100) {\n return 1;\n }\n return int / 100;\n}\nfunction normalizeColor(color) {\n const matchers = getMatchers();\n let match;\n if (matchers.hex6) {\n if (match = matchers.hex6.exec(color)) {\n return Number.parseInt(match[1] + \"ff\", 16) >>> 0;\n }\n }\n if (colorNames[color] !== undefined) {\n return colorNames[color];\n }\n if (matchers.rgb) {\n if (match = matchers.rgb.exec(color)) {\n return (parse255(match[1]) << 24 | parse255(match[2]) << 16 | parse255(match[3]) << 8 | 255) >>> 0;\n }\n }\n if (matchers.rgba) {\n if (match = matchers.rgba.exec(color)) {\n return (parse255(match[1]) << 24 | parse255(match[2]) << 16 | parse255(match[3]) << 8 | parse1(match[4])) >>> 0;\n }\n }\n if (matchers.hex3) {\n if (match = matchers.hex3.exec(color)) {\n return Number.parseInt(match[1] + match[1] + match[2] + match[2] + match[3] + match[3] + \"ff\", 16) >>> 0;\n }\n }\n if (matchers.hex8) {\n if (match = matchers.hex8.exec(color)) {\n return Number.parseInt(match[1], 16) >>> 0;\n }\n }\n if (matchers.hex4) {\n if (match = matchers.hex4.exec(color)) {\n return Number.parseInt(match[1] + match[1] + match[2] + match[2] + match[3] + match[3] + match[4] + match[4], 16) >>> 0;\n }\n }\n if (matchers.hsl) {\n if (match = matchers.hsl.exec(color)) {\n return (hslToRgb(parse360(match[1]), parsePercentage(match[2]), parsePercentage(match[3])) | 255) >>> 0;\n }\n }\n if (matchers.hsla) {\n if (match = matchers.hsla.exec(color)) {\n return (hslToRgb(parse360(match[1]), parsePercentage(match[2]), parsePercentage(match[3])) | parse1(match[4])) >>> 0;\n }\n }\n throw new Error(`invalid color string ${color} provided`);\n}\nfunction processColor(color) {\n const normalizedColor = normalizeColor(color);\n return (normalizedColor << 24 | normalizedColor >>> 8) >>> 0;\n}\nvar NUMBER = \"[-+]?\\\\d*\\\\.?\\\\d+\";\nvar PERCENTAGE = NUMBER + \"%\";\nvar colorNames = {\n transparent: 0,\n aliceblue: 4042850303,\n antiquewhite: 4209760255,\n aqua: 16777215,\n aquamarine: 2147472639,\n azure: 4043309055,\n beige: 4126530815,\n bisque: 4293182719,\n black: 255,\n blanchedalmond: 4293643775,\n blue: 65535,\n blueviolet: 2318131967,\n brown: 2771004159,\n burlywood: 3736635391,\n burntsienna: 3934150143,\n cadetblue: 1604231423,\n chartreuse: 2147418367,\n chocolate: 3530104575,\n coral: 4286533887,\n cornflowerblue: 1687547391,\n cornsilk: 4294499583,\n crimson: 3692313855,\n cyan: 16777215,\n darkblue: 35839,\n darkcyan: 9145343,\n darkgoldenrod: 3095792639,\n darkgray: 2846468607,\n darkgreen: 6553855,\n darkgrey: 2846468607,\n darkkhaki: 3182914559,\n darkmagenta: 2332068863,\n darkolivegreen: 1433087999,\n darkorange: 4287365375,\n darkorchid: 2570243327,\n darkred: 2332033279,\n darksalmon: 3918953215,\n darkseagreen: 2411499519,\n darkslateblue: 1211993087,\n darkslategray: 793726975,\n darkslategrey: 793726975,\n darkturquoise: 13554175,\n darkviolet: 2483082239,\n deeppink: 4279538687,\n deepskyblue: 12582911,\n dimgray: 1768516095,\n dimgrey: 1768516095,\n dodgerblue: 512819199,\n firebrick: 2988581631,\n floralwhite: 4294635775,\n forestgreen: 579543807,\n fuchsia: 4278255615,\n gainsboro: 3705462015,\n ghostwhite: 4177068031,\n gold: 4292280575,\n goldenrod: 3668254975,\n gray: 2155905279,\n green: 8388863,\n greenyellow: 2919182335,\n grey: 2155905279,\n honeydew: 4043305215,\n hotpink: 4285117695,\n indianred: 3445382399,\n indigo: 1258324735,\n ivory: 4294963455,\n khaki: 4041641215,\n lavender: 3873897215,\n lavenderblush: 4293981695,\n lawngreen: 2096890111,\n lemonchiffon: 4294626815,\n lightblue: 2916673279,\n lightcoral: 4034953471,\n lightcyan: 3774873599,\n lightgoldenrodyellow: 4210742015,\n lightgray: 3553874943,\n lightgreen: 2431553791,\n lightgrey: 3553874943,\n lightpink: 4290167295,\n lightsalmon: 4288707327,\n lightseagreen: 548580095,\n lightskyblue: 2278488831,\n lightslategray: 2005441023,\n lightslategrey: 2005441023,\n lightsteelblue: 2965692159,\n lightyellow: 4294959359,\n lime: 16711935,\n limegreen: 852308735,\n linen: 4210091775,\n magenta: 4278255615,\n maroon: 2147483903,\n mediumaquamarine: 1724754687,\n mediumblue: 52735,\n mediumorchid: 3126187007,\n mediumpurple: 2473647103,\n mediumseagreen: 1018393087,\n mediumslateblue: 2070474495,\n mediumspringgreen: 16423679,\n mediumturquoise: 1221709055,\n mediumvioletred: 3340076543,\n midnightblue: 421097727,\n mintcream: 4127193855,\n mistyrose: 4293190143,\n moccasin: 4293178879,\n navajowhite: 4292783615,\n navy: 33023,\n oldlace: 4260751103,\n olive: 2155872511,\n olivedrab: 1804477439,\n orange: 4289003775,\n orangered: 4282712319,\n orchid: 3664828159,\n palegoldenrod: 4008225535,\n palegreen: 2566625535,\n paleturquoise: 2951671551,\n palevioletred: 3681588223,\n papayawhip: 4293907967,\n peachpuff: 4292524543,\n peru: 3448061951,\n pink: 4290825215,\n plum: 3718307327,\n powderblue: 2967529215,\n purple: 2147516671,\n rebeccapurple: 1714657791,\n red: 4278190335,\n rosybrown: 3163525119,\n royalblue: 1097458175,\n saddlebrown: 2336560127,\n salmon: 4202722047,\n sandybrown: 4104413439,\n seagreen: 780883967,\n seashell: 4294307583,\n sienna: 2689740287,\n silver: 3233857791,\n skyblue: 2278484991,\n slateblue: 1784335871,\n slategray: 1887473919,\n slategrey: 1887473919,\n snow: 4294638335,\n springgreen: 16744447,\n steelblue: 1182971135,\n tan: 3535047935,\n teal: 8421631,\n thistle: 3636451583,\n tomato: 4284696575,\n turquoise: 1088475391,\n violet: 4001558271,\n wheat: 4125012991,\n white: 4294967295,\n whitesmoke: 4126537215,\n yellow: 4294902015,\n yellowgreen: 2597139199\n};\nvar opacity = (c2) => {\n return (c2 >> 24 & 255) / 255;\n};\nvar red = (c2) => {\n return c2 >> 16 & 255;\n};\nvar green = (c2) => {\n return c2 >> 8 & 255;\n};\nvar blue = (c2) => {\n return c2 & 255;\n};\nvar rgbaColor = (r, g, b2, alpha) => {\n return `rgba(${r}, ${g}, ${b2}, ${alpha})`;\n};\nvar interpolateColorsRGB = (value, inputRange, colors) => {\n const [r, g, b2, a2] = [red, green, blue, opacity].map((f) => {\n const unrounded = interpolate(value, inputRange, colors.map((c2) => f(c2)), {\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\"\n });\n if (f === opacity) {\n return Number(unrounded.toFixed(3));\n }\n return Math.round(unrounded);\n });\n return rgbaColor(r, g, b2, a2);\n};\nvar interpolateColors = (input, inputRange, outputRange) => {\n if (typeof input === \"undefined\") {\n throw new TypeError(\"input can not be undefined\");\n }\n if (typeof inputRange === \"undefined\") {\n throw new TypeError(\"inputRange can not be undefined\");\n }\n if (typeof outputRange === \"undefined\") {\n throw new TypeError(\"outputRange can not be undefined\");\n }\n if (inputRange.length !== outputRange.length) {\n throw new TypeError(\"inputRange (\" + inputRange.length + \" values provided) and outputRange (\" + outputRange.length + \" values provided) must have the same length\");\n }\n const processedOutputRange = outputRange.map((c2) => processColor(c2));\n return interpolateColorsRGB(input, inputRange, processedOutputRange);\n};\n// src/validate-frame.ts\nvar validateFrame = ({\n allowFloats,\n durationInFrames,\n frame\n}) => {\n if (typeof frame === \"undefined\") {\n throw new TypeError(`Argument missing for parameter \"frame\"`);\n }\n if (typeof frame !== \"number\") {\n throw new TypeError(`Argument passed for \"frame\" is not a number: ${frame}`);\n }\n if (!Number.isFinite(frame)) {\n throw new RangeError(`Frame ${frame} is not finite`);\n }\n if (frame % 1 !== 0 && !allowFloats) {\n throw new RangeError(`Argument for frame must be an integer, but got ${frame}`);\n }\n if (frame < 0 && frame < -durationInFrames) {\n throw new RangeError(`Cannot use frame ${frame}: Duration of composition is ${durationInFrames}, therefore the lowest frame that can be rendered is ${-durationInFrames}`);\n }\n if (frame > durationInFrames - 1) {\n throw new RangeError(`Cannot use frame ${frame}: Duration of composition is ${durationInFrames}, therefore the highest frame that can be rendered is ${durationInFrames - 1}`);\n }\n};\n\n// src/video/offthread-video-source.ts\nvar getOffthreadVideoSource = ({\n src,\n transparent,\n currentTime,\n toneMapped\n}) => {\n return `http://localhost:${window.remotion_proxyPort}/proxy?src=${encodeURIComponent(getAbsoluteSrc(src))}&time=${encodeURIComponent(currentTime)}&transparent=${String(transparent)}&toneMapped=${String(toneMapped)}`;\n};\n// src/series/index.tsx\nimport { Children, forwardRef as forwardRef8, useMemo as useMemo28 } from \"react\";\n\n// src/series/flatten-children.tsx\nimport React24 from \"react\";\nvar flattenChildren = (children) => {\n const childrenArray = React24.Children.toArray(children);\n return childrenArray.reduce((flatChildren, child) => {\n if (child.type === React24.Fragment) {\n return flatChildren.concat(flattenChildren(child.props.children));\n }\n flatChildren.push(child);\n return flatChildren;\n }, []);\n};\n\n// src/series/is-inside-series.tsx\nimport React25, { createContext as createContext19 } from \"react\";\nimport { jsx as jsx27 } from \"react/jsx-runtime\";\nvar IsInsideSeriesContext = createContext19(false);\nvar IsInsideSeriesContainer = ({ children }) => {\n return /* @__PURE__ */ jsx27(IsInsideSeriesContext.Provider, {\n value: true,\n children\n });\n};\nvar IsNotInsideSeriesProvider = ({ children }) => {\n return /* @__PURE__ */ jsx27(IsInsideSeriesContext.Provider, {\n value: false,\n children\n });\n};\nvar useRequireToBeInsideSeries = () => {\n const isInsideSeries = React25.useContext(IsInsideSeriesContext);\n if (!isInsideSeries) {\n throw new Error(\"This component must be inside a <Series /> component.\");\n }\n};\n\n// src/series/index.tsx\nimport { jsx as jsx28 } from \"react/jsx-runtime\";\nvar SeriesSequenceRefForwardingFunction = ({ children }, _ref) => {\n useRequireToBeInsideSeries();\n return /* @__PURE__ */ jsx28(IsNotInsideSeriesProvider, {\n children\n });\n};\nvar SeriesSequence = forwardRef8(SeriesSequenceRefForwardingFunction);\nvar Series = (props2) => {\n const childrenValue = useMemo28(() => {\n let startFrame = 0;\n const flattenedChildren = flattenChildren(props2.children);\n return Children.map(flattenedChildren, (child, i) => {\n const castedChild = child;\n if (typeof castedChild === \"string\") {\n if (castedChild.trim() === \"\") {\n return null;\n }\n throw new TypeError(`The <Series /> component only accepts a list of <Series.Sequence /> components as its children, but you passed a string \"${castedChild}\"`);\n }\n if (castedChild.type !== SeriesSequence) {\n throw new TypeError(`The <Series /> component only accepts a list of <Series.Sequence /> components as its children, but got ${castedChild} instead`);\n }\n const debugInfo = `index = ${i}, duration = ${castedChild.props.durationInFrames}`;\n if (!castedChild?.props.children) {\n throw new TypeError(`A <Series.Sequence /> component (${debugInfo}) was detected to not have any children. Delete it to fix this error.`);\n }\n const durationInFramesProp = castedChild.props.durationInFrames;\n const {\n durationInFrames,\n children: _children,\n from,\n name,\n ...passedProps\n } = castedChild.props;\n if (i !== flattenedChildren.length - 1 || durationInFramesProp !== Infinity) {\n validateDurationInFrames(durationInFramesProp, {\n component: `of a <Series.Sequence /> component`,\n allowFloats: true\n });\n }\n const offset = castedChild.props.offset ?? 0;\n if (Number.isNaN(offset)) {\n throw new TypeError(`The \"offset\" property of a <Series.Sequence /> must not be NaN, but got NaN (${debugInfo}).`);\n }\n if (!Number.isFinite(offset)) {\n throw new TypeError(`The \"offset\" property of a <Series.Sequence /> must be finite, but got ${offset} (${debugInfo}).`);\n }\n if (offset % 1 !== 0) {\n throw new TypeError(`The \"offset\" property of a <Series.Sequence /> must be finite, but got ${offset} (${debugInfo}).`);\n }\n const currentStartFrame = startFrame + offset;\n startFrame += durationInFramesProp + offset;\n return /* @__PURE__ */ jsx28(Sequence, {\n name: name || \"<Series.Sequence>\",\n from: currentStartFrame,\n durationInFrames: durationInFramesProp,\n ...passedProps,\n ref: castedChild.ref,\n children: child\n });\n });\n }, [props2.children]);\n if (ENABLE_V5_BREAKING_CHANGES) {\n return /* @__PURE__ */ jsx28(IsInsideSeriesContainer, {\n children: /* @__PURE__ */ jsx28(Sequence, {\n ...props2,\n children: childrenValue\n })\n });\n }\n return /* @__PURE__ */ jsx28(IsInsideSeriesContainer, {\n children: childrenValue\n });\n};\nSeries.Sequence = SeriesSequence;\naddSequenceStackTraces(SeriesSequence);\n// src/validation/validation-spring-duration.ts\nvar validateSpringDuration = (dur) => {\n if (typeof dur === \"undefined\") {\n return;\n }\n if (typeof dur !== \"number\") {\n throw new TypeError(`A \"duration\" of a spring must be a \"number\" but is \"${typeof dur}\"`);\n }\n if (Number.isNaN(dur)) {\n throw new TypeError('A \"duration\" of a spring is NaN, which it must not be');\n }\n if (!Number.isFinite(dur)) {\n throw new TypeError('A \"duration\" of a spring must be finite, but is ' + dur);\n }\n if (dur <= 0) {\n throw new TypeError('A \"duration\" of a spring must be positive, but is ' + dur);\n }\n};\n\n// src/spring/spring-utils.ts\nfunction advance({\n animation,\n now,\n config\n}) {\n const { toValue, lastTimestamp, current, velocity } = animation;\n const deltaTime = Math.min(now - lastTimestamp, 64);\n if (config.damping <= 0) {\n throw new Error(\"Spring damping must be greater than 0, otherwise the spring() animation will never end, causing an infinite loop.\");\n }\n const c2 = config.damping;\n const m = config.mass;\n const k = config.stiffness;\n const cacheKey = [\n toValue,\n lastTimestamp,\n current,\n velocity,\n c2,\n m,\n k,\n now\n ].join(\"-\");\n if (advanceCache[cacheKey]) {\n return advanceCache[cacheKey];\n }\n const v0 = -velocity;\n const x0 = toValue - current;\n const zeta = c2 / (2 * Math.sqrt(k * m));\n const omega0 = Math.sqrt(k / m);\n const omega1 = omega0 * Math.sqrt(1 - zeta ** 2);\n const t = deltaTime / 1000;\n const sin1 = Math.sin(omega1 * t);\n const cos1 = Math.cos(omega1 * t);\n const underDampedEnvelope = Math.exp(-zeta * omega0 * t);\n const underDampedFrag1 = underDampedEnvelope * (sin1 * ((v0 + zeta * omega0 * x0) / omega1) + x0 * cos1);\n const underDampedPosition = toValue - underDampedFrag1;\n const underDampedVelocity = zeta * omega0 * underDampedFrag1 - underDampedEnvelope * (cos1 * (v0 + zeta * omega0 * x0) - omega1 * x0 * sin1);\n const criticallyDampedEnvelope = Math.exp(-omega0 * t);\n const criticallyDampedPosition = toValue - criticallyDampedEnvelope * (x0 + (v0 + omega0 * x0) * t);\n const criticallyDampedVelocity = criticallyDampedEnvelope * (v0 * (t * omega0 - 1) + t * x0 * omega0 * omega0);\n const animationNode = {\n toValue,\n prevPosition: current,\n lastTimestamp: now,\n current: zeta < 1 ? underDampedPosition : criticallyDampedPosition,\n velocity: zeta < 1 ? underDampedVelocity : criticallyDampedVelocity\n };\n advanceCache[cacheKey] = animationNode;\n return animationNode;\n}\nfunction springCalculation({\n frame,\n fps,\n config = {}\n}) {\n const from = 0;\n const to = 1;\n const cacheKey = [\n frame,\n fps,\n config.damping,\n config.mass,\n config.overshootClamping,\n config.stiffness\n ].join(\"-\");\n if (calculationCache[cacheKey]) {\n return calculationCache[cacheKey];\n }\n let animation = {\n lastTimestamp: 0,\n current: from,\n toValue: to,\n velocity: 0,\n prevPosition: 0\n };\n const frameClamped = Math.max(0, frame);\n const unevenRest = frameClamped % 1;\n for (let f = 0;f <= Math.floor(frameClamped); f++) {\n if (f === Math.floor(frameClamped)) {\n f += unevenRest;\n }\n const time = f / fps * 1000;\n animation = advance({\n animation,\n now: time,\n config: {\n ...defaultSpringConfig,\n ...config\n }\n });\n }\n calculationCache[cacheKey] = animation;\n return animation;\n}\nvar defaultSpringConfig = {\n damping: 10,\n mass: 1,\n stiffness: 100,\n overshootClamping: false\n};\nvar advanceCache = {};\nvar calculationCache = {};\n\n// src/spring/measure-spring.ts\nfunction measureSpring({\n fps,\n config = {},\n threshold = 0.005\n}) {\n if (typeof threshold !== \"number\") {\n throw new TypeError(`threshold must be a number, got ${threshold} of type ${typeof threshold}`);\n }\n if (threshold === 0) {\n return Infinity;\n }\n if (threshold === 1) {\n return 0;\n }\n if (isNaN(threshold)) {\n throw new TypeError(\"Threshold is NaN\");\n }\n if (!Number.isFinite(threshold)) {\n throw new TypeError(\"Threshold is not finite\");\n }\n if (threshold < 0) {\n throw new TypeError(\"Threshold is below 0\");\n }\n const cacheKey = [\n fps,\n config.damping,\n config.mass,\n config.overshootClamping,\n config.stiffness,\n threshold\n ].join(\"-\");\n if (cache.has(cacheKey)) {\n return cache.get(cacheKey);\n }\n validateFps(fps, \"to the measureSpring() function\", false);\n let frame = 0;\n let finishedFrame = 0;\n const calc = () => {\n return springCalculation({\n fps,\n frame,\n config\n });\n };\n let animation = calc();\n const calcDifference = () => {\n return Math.abs(animation.current - animation.toValue);\n };\n let difference = calcDifference();\n while (difference >= threshold) {\n frame++;\n animation = calc();\n difference = calcDifference();\n }\n finishedFrame = frame;\n for (let i = 0;i < 20; i++) {\n frame++;\n animation = calc();\n difference = calcDifference();\n if (difference >= threshold) {\n i = 0;\n finishedFrame = frame + 1;\n }\n }\n cache.set(cacheKey, finishedFrame);\n return finishedFrame;\n}\nvar cache = new Map;\n\n// src/spring/index.ts\nfunction spring({\n frame: passedFrame,\n fps,\n config = {},\n from = 0,\n to = 1,\n durationInFrames: passedDurationInFrames,\n durationRestThreshold,\n delay = 0,\n reverse = false\n}) {\n validateSpringDuration(passedDurationInFrames);\n validateFrame({\n frame: passedFrame,\n durationInFrames: Infinity,\n allowFloats: true\n });\n validateFps(fps, \"to spring()\", false);\n const needsToCalculateNaturalDuration = reverse || typeof passedDurationInFrames !== \"undefined\";\n const naturalDuration = needsToCalculateNaturalDuration ? measureSpring({\n fps,\n config,\n threshold: durationRestThreshold\n }) : undefined;\n const naturalDurationGetter = needsToCalculateNaturalDuration ? {\n get: () => naturalDuration\n } : {\n get: () => {\n throw new Error(\"did not calculate natural duration, this is an error with Remotion. Please report\");\n }\n };\n const reverseProcessed = reverse ? (passedDurationInFrames ?? naturalDurationGetter.get()) - passedFrame : passedFrame;\n const delayProcessed = reverseProcessed + (reverse ? delay : -delay);\n const durationProcessed = passedDurationInFrames === undefined ? delayProcessed : delayProcessed / (passedDurationInFrames / naturalDurationGetter.get());\n if (passedDurationInFrames && delayProcessed > passedDurationInFrames) {\n return to;\n }\n const spr = springCalculation({\n fps,\n frame: durationProcessed,\n config\n });\n const inner2 = config.overshootClamping ? to >= from ? Math.min(spr.current, to) : Math.max(spr.current, to) : spr.current;\n const interpolated = from === 0 && to === 1 ? inner2 : interpolate(inner2, [0, 1], [from, to]);\n return interpolated;\n}\n// src/Still.tsx\nimport React27 from \"react\";\nvar Still = (props2) => {\n const newProps = {\n ...props2,\n durationInFrames: 1,\n fps: 1\n };\n return React27.createElement(Composition, newProps);\n};\n// src/video/OffthreadVideo.tsx\nimport { useCallback as useCallback14 } from \"react\";\n\n// src/video/OffthreadVideoForRendering.tsx\nimport {\n useCallback as useCallback13,\n useContext as useContext27,\n useEffect as useEffect21,\n useLayoutEffect as useLayoutEffect6,\n useMemo as useMemo29,\n useState as useState18\n} from \"react\";\nimport { jsx as jsx29 } from \"react/jsx-runtime\";\nvar OffthreadVideoForRendering = ({\n onError,\n volume: volumeProp,\n playbackRate,\n src,\n muted,\n allowAmplificationDuringRender,\n transparent = false,\n toneMapped = true,\n toneFrequency,\n name,\n loopVolumeCurveBehavior,\n delayRenderRetries,\n delayRenderTimeoutInMilliseconds,\n onVideoFrame,\n ...props2\n}) => {\n const absoluteFrame = useTimelinePosition();\n const frame = useCurrentFrame();\n const volumePropsFrame = useFrameForVolumeProp(loopVolumeCurveBehavior ?? \"repeat\");\n const videoConfig = useUnsafeVideoConfig();\n const sequenceContext = useContext27(SequenceContext);\n const mediaStartsAt = useMediaStartsAt();\n const { registerRenderAsset, unregisterRenderAsset } = useContext27(RenderAssetManager);\n if (!src) {\n throw new TypeError(\"No `src` was passed to <OffthreadVideo>.\");\n }\n const id = useMemo29(() => `offthreadvideo-${random(src ?? \"\")}-${sequenceContext?.cumulatedFrom}-${sequenceContext?.relativeFrom}-${sequenceContext?.durationInFrames}`, [\n src,\n sequenceContext?.cumulatedFrom,\n sequenceContext?.relativeFrom,\n sequenceContext?.durationInFrames\n ]);\n if (!videoConfig) {\n throw new Error(\"No video config found\");\n }\n const volume = evaluateVolume({\n volume: volumeProp,\n frame: volumePropsFrame,\n mediaVolume: 1,\n allowAmplificationDuringRender: allowAmplificationDuringRender ?? false\n });\n useEffect21(() => {\n if (!src) {\n throw new Error(\"No src passed\");\n }\n if (!window.remotion_audioEnabled) {\n return;\n }\n if (muted) {\n return;\n }\n if (volume <= 0) {\n return;\n }\n registerRenderAsset({\n type: \"video\",\n src: getAbsoluteSrc(src),\n id,\n frame: absoluteFrame,\n volume,\n mediaFrame: frame,\n playbackRate: playbackRate ?? 1,\n allowAmplificationDuringRender: allowAmplificationDuringRender ?? false,\n toneFrequency: toneFrequency ?? null,\n audioStartFrame: Math.max(0, -(sequenceContext?.relativeFrom ?? 0))\n });\n return () => unregisterRenderAsset(id);\n }, [\n muted,\n src,\n registerRenderAsset,\n id,\n unregisterRenderAsset,\n volume,\n frame,\n absoluteFrame,\n playbackRate,\n allowAmplificationDuringRender,\n toneFrequency,\n sequenceContext?.relativeFrom\n ]);\n const currentTime = useMemo29(() => {\n return getExpectedMediaFrameUncorrected({\n frame,\n playbackRate: playbackRate || 1,\n startFrom: -mediaStartsAt\n }) / videoConfig.fps;\n }, [frame, mediaStartsAt, playbackRate, videoConfig.fps]);\n const actualSrc = useMemo29(() => {\n return getOffthreadVideoSource({\n src,\n currentTime,\n transparent,\n toneMapped\n });\n }, [toneMapped, currentTime, src, transparent]);\n const [imageSrc, setImageSrc] = useState18(null);\n useLayoutEffect6(() => {\n if (!window.remotion_videoEnabled) {\n return;\n }\n const cleanup = [];\n setImageSrc(null);\n const controller = new AbortController;\n const newHandle = delayRender(`Fetching ${actualSrc} from server`, {\n retries: delayRenderRetries ?? undefined,\n timeoutInMilliseconds: delayRenderTimeoutInMilliseconds ?? undefined\n });\n const execute = async () => {\n try {\n const res = await fetch(actualSrc, {\n signal: controller.signal\n });\n if (res.status !== 200) {\n if (res.status === 500) {\n const json = await res.json();\n if (json.error) {\n const cleanedUpErrorMessage = json.error.replace(/^Error: /, \"\");\n throw new Error(cleanedUpErrorMessage);\n }\n }\n throw new Error(`Server returned status ${res.status} while fetching ${actualSrc}`);\n }\n const blob = await res.blob();\n const url = URL.createObjectURL(blob);\n cleanup.push(() => URL.revokeObjectURL(url));\n setImageSrc({\n src: url,\n handle: newHandle\n });\n } catch (err) {\n if (err.message.includes(\"aborted\")) {\n continueRender(newHandle);\n return;\n }\n if (controller.signal.aborted) {\n continueRender(newHandle);\n return;\n }\n if (err.message.includes(\"Failed to fetch\")) {\n err = new Error(`Failed to fetch ${actualSrc}. This could be caused by Chrome rejecting the request because the disk space is low. Consider increasing the disk size of your environment.`, { cause: err });\n }\n if (onError) {\n onError(err);\n } else {\n cancelRender(err);\n }\n }\n };\n execute();\n cleanup.push(() => {\n if (controller.signal.aborted) {\n return;\n }\n controller.abort();\n });\n return () => {\n cleanup.forEach((c2) => c2());\n };\n }, [\n actualSrc,\n delayRenderRetries,\n delayRenderTimeoutInMilliseconds,\n onError\n ]);\n const onErr = useCallback13(() => {\n if (onError) {\n onError?.(new Error(\"Failed to load image with src \" + imageSrc));\n } else {\n cancelRender(\"Failed to load image with src \" + imageSrc);\n }\n }, [imageSrc, onError]);\n const className = useMemo29(() => {\n return [OFFTHREAD_VIDEO_CLASS_NAME, props2.className].filter(truthy).join(\" \");\n }, [props2.className]);\n const onImageFrame = useCallback13((img) => {\n if (onVideoFrame) {\n onVideoFrame(img);\n }\n }, [onVideoFrame]);\n if (!imageSrc || !window.remotion_videoEnabled) {\n return null;\n }\n continueRender(imageSrc.handle);\n return /* @__PURE__ */ jsx29(Img, {\n src: imageSrc.src,\n className,\n delayRenderRetries,\n delayRenderTimeoutInMilliseconds,\n onImageFrame,\n ...props2,\n onError: onErr\n });\n};\n\n// src/video/VideoForPreview.tsx\nimport {\n forwardRef as forwardRef9,\n useContext as useContext28,\n useEffect as useEffect23,\n useImperativeHandle as useImperativeHandle7,\n useMemo as useMemo30,\n useRef as useRef13,\n useState as useState19\n} from \"react\";\n\n// src/video/emit-video-frame.ts\nimport { useEffect as useEffect22 } from \"react\";\nvar useEmitVideoFrame = ({\n ref,\n onVideoFrame\n}) => {\n useEffect22(() => {\n const { current } = ref;\n if (!current) {\n return;\n }\n if (!onVideoFrame) {\n return;\n }\n let handle = 0;\n const callback = () => {\n if (!ref.current) {\n return;\n }\n onVideoFrame(ref.current);\n handle = ref.current.requestVideoFrameCallback(callback);\n };\n callback();\n return () => {\n current.cancelVideoFrameCallback(handle);\n };\n }, [onVideoFrame, ref]);\n};\n\n// src/video/VideoForPreview.tsx\nimport { jsx as jsx30 } from \"react/jsx-runtime\";\nvar VideoForDevelopmentRefForwardingFunction = (props2, ref) => {\n const videoRef = useRef13(null);\n const {\n volume,\n muted,\n playbackRate,\n onlyWarnForMediaSeekingError,\n src,\n onDuration,\n acceptableTimeShift,\n acceptableTimeShiftInSeconds,\n toneFrequency,\n name,\n _remotionInternalNativeLoopPassed,\n _remotionInternalStack,\n _remotionDebugSeeking,\n style,\n pauseWhenBuffering,\n showInTimeline,\n loopVolumeCurveBehavior,\n onError,\n onAutoPlayError,\n onVideoFrame,\n crossOrigin,\n ...nativeProps\n } = props2;\n const volumePropFrame = useFrameForVolumeProp(loopVolumeCurveBehavior ?? \"repeat\");\n const { fps, durationInFrames } = useVideoConfig();\n const parentSequence = useContext28(SequenceContext);\n const { hidden } = useContext28(SequenceVisibilityToggleContext);\n const [timelineId] = useState19(() => String(Math.random()));\n const isSequenceHidden = hidden[timelineId] ?? false;\n if (typeof acceptableTimeShift !== \"undefined\") {\n throw new Error(\"acceptableTimeShift has been removed. Use acceptableTimeShiftInSeconds instead.\");\n }\n const actualVolume = useMediaTagVolume(videoRef);\n const [mediaVolume] = useMediaVolumeState();\n const [mediaMuted] = useMediaMutedState();\n useMediaInTimeline({\n mediaRef: videoRef,\n volume,\n mediaVolume,\n mediaType: \"video\",\n src,\n playbackRate: props2.playbackRate ?? 1,\n displayName: name ?? null,\n id: timelineId,\n stack: _remotionInternalStack,\n showInTimeline,\n premountDisplay: null,\n onAutoPlayError: onAutoPlayError ?? null\n });\n useSyncVolumeWithMediaTag({\n volumePropFrame,\n actualVolume,\n volume,\n mediaVolume,\n mediaRef: videoRef\n });\n useMediaPlayback({\n mediaRef: videoRef,\n src,\n mediaType: \"video\",\n playbackRate: props2.playbackRate ?? 1,\n onlyWarnForMediaSeekingError,\n acceptableTimeshift: acceptableTimeShiftInSeconds ?? DEFAULT_ACCEPTABLE_TIMESHIFT,\n isPremounting: Boolean(parentSequence?.premounting),\n pauseWhenBuffering,\n debugSeeking: _remotionDebugSeeking,\n onAutoPlayError: onAutoPlayError ?? null\n });\n const actualFrom = parentSequence ? parentSequence.relativeFrom : 0;\n const duration = parentSequence ? Math.min(parentSequence.durationInFrames, durationInFrames) : durationInFrames;\n const actualSrc = useAppendVideoFragment({\n actualSrc: usePreload(src),\n actualFrom,\n duration,\n fps\n });\n useImperativeHandle7(ref, () => {\n return videoRef.current;\n }, []);\n useEffect23(() => {\n const { current } = videoRef;\n if (!current) {\n return;\n }\n const errorHandler = () => {\n if (current.error) {\n console.error(\"Error occurred in video\", current?.error);\n if (onError) {\n const err = new Error(`Code ${current.error.code}: ${current.error.message}`);\n onError(err);\n return;\n }\n throw new Error(`The browser threw an error while playing the video ${src}: Code ${current.error.code} - ${current?.error?.message}. See https://remotion.dev/docs/media-playback-error for help. Pass an onError() prop to handle the error.`);\n } else {\n if (onError) {\n const err = new Error(`The browser threw an error while playing the video ${src}`);\n onError(err);\n return;\n }\n throw new Error(\"The browser threw an error while playing the video\");\n }\n };\n current.addEventListener(\"error\", errorHandler, { once: true });\n return () => {\n current.removeEventListener(\"error\", errorHandler);\n };\n }, [onError, src]);\n const currentOnDurationCallback = useRef13();\n currentOnDurationCallback.current = onDuration;\n useEmitVideoFrame({ ref: videoRef, onVideoFrame });\n useEffect23(() => {\n const { current } = videoRef;\n if (!current) {\n return;\n }\n if (current.duration) {\n currentOnDurationCallback.current?.(src, current.duration);\n return;\n }\n const onLoadedMetadata = () => {\n currentOnDurationCallback.current?.(src, current.duration);\n };\n current.addEventListener(\"loadedmetadata\", onLoadedMetadata);\n return () => {\n current.removeEventListener(\"loadedmetadata\", onLoadedMetadata);\n };\n }, [src]);\n useEffect23(() => {\n const { current } = videoRef;\n if (!current) {\n return;\n }\n if (isIosSafari()) {\n current.preload = \"metadata\";\n } else {\n current.preload = \"auto\";\n }\n }, []);\n const actualStyle = useMemo30(() => {\n return {\n ...style,\n opacity: isSequenceHidden ? 0 : style?.opacity ?? 1\n };\n }, [isSequenceHidden, style]);\n const crossOriginValue = crossOrigin ?? (onVideoFrame ? \"anonymous\" : undefined);\n return /* @__PURE__ */ jsx30(\"video\", {\n ref: videoRef,\n muted: muted || mediaMuted,\n playsInline: true,\n src: actualSrc,\n loop: _remotionInternalNativeLoopPassed,\n style: actualStyle,\n disableRemotePlayback: true,\n crossOrigin: crossOriginValue,\n ...nativeProps\n });\n};\nvar VideoForPreview = forwardRef9(VideoForDevelopmentRefForwardingFunction);\n\n// src/video/OffthreadVideo.tsx\nimport { jsx as jsx31 } from \"react/jsx-runtime\";\nvar OffthreadVideo = (props2) => {\n const {\n startFrom,\n endAt,\n name,\n pauseWhenBuffering,\n stack,\n showInTimeline,\n ...otherProps\n } = props2;\n const environment = getRemotionEnvironment();\n const onDuration = useCallback14(() => {\n return;\n }, []);\n if (typeof props2.src !== \"string\") {\n throw new TypeError(`The \\`<OffthreadVideo>\\` tag requires a string for \\`src\\`, but got ${JSON.stringify(props2.src)} instead.`);\n }\n if (props2.imageFormat) {\n throw new TypeError(`The \\`<OffthreadVideo>\\` tag does no longer accept \\`imageFormat\\`. Use the \\`transparent\\` prop if you want to render a transparent video.`);\n }\n if (typeof startFrom !== \"undefined\" || typeof endAt !== \"undefined\") {\n validateStartFromProps(startFrom, endAt);\n const startFromFrameNo = startFrom ?? 0;\n const endAtFrameNo = endAt ?? Infinity;\n return /* @__PURE__ */ jsx31(Sequence, {\n layout: \"none\",\n from: 0 - startFromFrameNo,\n showInTimeline: false,\n durationInFrames: endAtFrameNo,\n name,\n children: /* @__PURE__ */ jsx31(OffthreadVideo, {\n pauseWhenBuffering: pauseWhenBuffering ?? false,\n ...otherProps\n })\n });\n }\n validateMediaProps(props2, \"Video\");\n if (environment.isRendering) {\n return /* @__PURE__ */ jsx31(OffthreadVideoForRendering, {\n ...otherProps\n });\n }\n const {\n transparent,\n toneMapped,\n _remotionDebugSeeking,\n onAutoPlayError,\n onVideoFrame,\n crossOrigin,\n ...withoutTransparent\n } = otherProps;\n return /* @__PURE__ */ jsx31(VideoForPreview, {\n _remotionInternalStack: stack ?? null,\n _remotionInternalNativeLoopPassed: false,\n _remotionDebugSeeking: _remotionDebugSeeking ?? false,\n onDuration,\n onlyWarnForMediaSeekingError: true,\n pauseWhenBuffering: pauseWhenBuffering ?? false,\n showInTimeline: showInTimeline ?? true,\n onAutoPlayError: onAutoPlayError ?? undefined,\n onVideoFrame: onVideoFrame ?? null,\n crossOrigin,\n ...withoutTransparent\n });\n};\n// src/video/Video.tsx\nimport { forwardRef as forwardRef11, useCallback as useCallback15, useContext as useContext30 } from \"react\";\n\n// src/video/VideoForRendering.tsx\nimport {\n forwardRef as forwardRef10,\n useContext as useContext29,\n useEffect as useEffect24,\n useImperativeHandle as useImperativeHandle8,\n useLayoutEffect as useLayoutEffect7,\n useMemo as useMemo31,\n useRef as useRef14\n} from \"react\";\n\n// src/video/seek-until-right.ts\nvar roundTo6Commas = (num) => {\n return Math.round(num * 1e5) / 1e5;\n};\nvar seekToTime = (element, desiredTime) => {\n element.currentTime = desiredTime;\n let cancel;\n let cancelSeeked = null;\n const prom = new Promise((resolve) => {\n cancel = element.requestVideoFrameCallback((now, metadata) => {\n const displayIn = metadata.expectedDisplayTime - now;\n if (displayIn <= 0) {\n resolve(metadata.mediaTime);\n return;\n }\n setTimeout(() => {\n resolve(metadata.mediaTime);\n }, displayIn + 150);\n });\n });\n const waitForSeekedEvent = new Promise((resolve) => {\n const onDone = () => {\n resolve();\n };\n element.addEventListener(\"seeked\", onDone, {\n once: true\n });\n cancelSeeked = () => {\n element.removeEventListener(\"seeked\", onDone);\n };\n });\n return {\n wait: Promise.all([prom, waitForSeekedEvent]).then(([time]) => time),\n cancel: () => {\n cancelSeeked?.();\n element.cancelVideoFrameCallback(cancel);\n }\n };\n};\nvar seekToTimeMultipleUntilRight = (element, desiredTime, fps) => {\n const threshold = 1 / fps / 2;\n let currentCancel = () => {\n return;\n };\n if (Number.isFinite(element.duration) && element.currentTime >= element.duration && desiredTime >= element.duration) {\n return {\n prom: Promise.resolve(),\n cancel: () => {\n }\n };\n }\n const prom = new Promise((resolve, reject) => {\n const firstSeek = seekToTime(element, desiredTime + threshold);\n firstSeek.wait.then((seekedTo) => {\n const difference = Math.abs(desiredTime - seekedTo);\n if (difference <= threshold) {\n return resolve();\n }\n const sign = desiredTime > seekedTo ? 1 : -1;\n const newSeek = seekToTime(element, seekedTo + threshold * sign);\n currentCancel = newSeek.cancel;\n newSeek.wait.then((newTime) => {\n const newDifference = Math.abs(desiredTime - newTime);\n if (roundTo6Commas(newDifference) <= roundTo6Commas(threshold)) {\n return resolve();\n }\n const thirdSeek = seekToTime(element, desiredTime + threshold);\n currentCancel = thirdSeek.cancel;\n return thirdSeek.wait.then(() => {\n resolve();\n }).catch((err) => {\n reject(err);\n });\n }).catch((err) => {\n reject(err);\n });\n });\n currentCancel = firstSeek.cancel;\n });\n return {\n prom,\n cancel: () => {\n currentCancel();\n }\n };\n};\n\n// src/video/VideoForRendering.tsx\nimport { jsx as jsx32 } from \"react/jsx-runtime\";\nvar VideoForRenderingForwardFunction = ({\n onError,\n volume: volumeProp,\n allowAmplificationDuringRender,\n playbackRate,\n onDuration,\n toneFrequency,\n name,\n acceptableTimeShiftInSeconds,\n delayRenderRetries,\n delayRenderTimeoutInMilliseconds,\n loopVolumeCurveBehavior,\n ...props2\n}, ref) => {\n const absoluteFrame = useTimelinePosition();\n const frame = useCurrentFrame();\n const volumePropsFrame = useFrameForVolumeProp(loopVolumeCurveBehavior ?? \"repeat\");\n const videoConfig = useUnsafeVideoConfig();\n const videoRef = useRef14(null);\n const sequenceContext = useContext29(SequenceContext);\n const mediaStartsAt = useMediaStartsAt();\n const environment = getRemotionEnvironment();\n const { registerRenderAsset, unregisterRenderAsset } = useContext29(RenderAssetManager);\n const id = useMemo31(() => `video-${random(props2.src ?? \"\")}-${sequenceContext?.cumulatedFrom}-${sequenceContext?.relativeFrom}-${sequenceContext?.durationInFrames}`, [\n props2.src,\n sequenceContext?.cumulatedFrom,\n sequenceContext?.relativeFrom,\n sequenceContext?.durationInFrames\n ]);\n if (!videoConfig) {\n throw new Error(\"No video config found\");\n }\n const volume = evaluateVolume({\n volume: volumeProp,\n frame: volumePropsFrame,\n mediaVolume: 1,\n allowAmplificationDuringRender: allowAmplificationDuringRender ?? false\n });\n useEffect24(() => {\n if (!props2.src) {\n throw new Error(\"No src passed\");\n }\n if (props2.muted) {\n return;\n }\n if (volume <= 0) {\n return;\n }\n if (!window.remotion_audioEnabled) {\n return;\n }\n registerRenderAsset({\n type: \"video\",\n src: getAbsoluteSrc(props2.src),\n id,\n frame: absoluteFrame,\n volume,\n mediaFrame: frame,\n playbackRate: playbackRate ?? 1,\n allowAmplificationDuringRender: allowAmplificationDuringRender ?? false,\n toneFrequency: toneFrequency ?? null,\n audioStartFrame: Math.max(0, -(sequenceContext?.relativeFrom ?? 0))\n });\n return () => unregisterRenderAsset(id);\n }, [\n props2.muted,\n props2.src,\n registerRenderAsset,\n id,\n unregisterRenderAsset,\n volume,\n frame,\n absoluteFrame,\n playbackRate,\n allowAmplificationDuringRender,\n toneFrequency,\n sequenceContext?.relativeFrom\n ]);\n useImperativeHandle8(ref, () => {\n return videoRef.current;\n }, []);\n useEffect24(() => {\n if (!window.remotion_videoEnabled) {\n return;\n }\n const { current } = videoRef;\n if (!current) {\n return;\n }\n const currentTime = getMediaTime({\n frame,\n playbackRate: playbackRate || 1,\n startFrom: -mediaStartsAt,\n fps: videoConfig.fps\n });\n const handle = delayRender(`Rendering <Video /> with src=\"${props2.src}\"`, {\n retries: delayRenderRetries ?? undefined,\n timeoutInMilliseconds: delayRenderTimeoutInMilliseconds ?? undefined\n });\n if (window.process?.env?.NODE_ENV === \"test\") {\n continueRender(handle);\n return;\n }\n if (isApproximatelyTheSame(current.currentTime, currentTime)) {\n if (current.readyState >= 2) {\n continueRender(handle);\n return;\n }\n const loadedDataHandler = () => {\n continueRender(handle);\n };\n current.addEventListener(\"loadeddata\", loadedDataHandler, { once: true });\n return () => {\n current.removeEventListener(\"loadeddata\", loadedDataHandler);\n };\n }\n const endedHandler = () => {\n continueRender(handle);\n };\n const seek2 = seekToTimeMultipleUntilRight(current, currentTime, videoConfig.fps);\n seek2.prom.then(() => {\n continueRender(handle);\n });\n current.addEventListener(\"ended\", endedHandler, { once: true });\n const errorHandler = () => {\n if (current?.error) {\n console.error(\"Error occurred in video\", current?.error);\n if (onError) {\n return;\n }\n throw new Error(`The browser threw an error while playing the video ${props2.src}: Code ${current.error.code} - ${current?.error?.message}. See https://remotion.dev/docs/media-playback-error for help. Pass an onError() prop to handle the error.`);\n } else {\n throw new Error(\"The browser threw an error\");\n }\n };\n current.addEventListener(\"error\", errorHandler, { once: true });\n return () => {\n seek2.cancel();\n current.removeEventListener(\"ended\", endedHandler);\n current.removeEventListener(\"error\", errorHandler);\n continueRender(handle);\n };\n }, [\n volumePropsFrame,\n props2.src,\n playbackRate,\n videoConfig.fps,\n frame,\n mediaStartsAt,\n onError,\n delayRenderRetries,\n delayRenderTimeoutInMilliseconds\n ]);\n const { src } = props2;\n if (environment.isRendering) {\n useLayoutEffect7(() => {\n if (window.process?.env?.NODE_ENV === \"test\") {\n return;\n }\n const newHandle = delayRender(\"Loading <Video> duration with src=\" + src, {\n retries: delayRenderRetries ?? undefined,\n timeoutInMilliseconds: delayRenderTimeoutInMilliseconds ?? undefined\n });\n const { current } = videoRef;\n const didLoad = () => {\n if (current?.duration) {\n onDuration(src, current.duration);\n }\n continueRender(newHandle);\n };\n if (current?.duration) {\n onDuration(src, current.duration);\n continueRender(newHandle);\n } else {\n current?.addEventListener(\"loadedmetadata\", didLoad, { once: true });\n }\n return () => {\n current?.removeEventListener(\"loadedmetadata\", didLoad);\n continueRender(newHandle);\n };\n }, [src, onDuration, delayRenderRetries, delayRenderTimeoutInMilliseconds]);\n }\n return /* @__PURE__ */ jsx32(\"video\", {\n ref: videoRef,\n ...props2\n });\n};\nvar VideoForRendering = forwardRef10(VideoForRenderingForwardFunction);\n\n// src/video/Video.tsx\nimport { jsx as jsx33 } from \"react/jsx-runtime\";\nvar VideoForwardingFunction = (props2, ref) => {\n const {\n startFrom,\n endAt,\n name,\n pauseWhenBuffering,\n stack,\n _remotionInternalNativeLoopPassed,\n showInTimeline,\n onAutoPlayError,\n ...otherProps\n } = props2;\n const { loop, _remotionDebugSeeking, ...propsOtherThanLoop } = props2;\n const { fps } = useVideoConfig();\n const environment = getRemotionEnvironment();\n const { durations, setDurations } = useContext30(DurationsContext);\n if (typeof ref === \"string\") {\n throw new Error(\"string refs are not supported\");\n }\n if (typeof props2.src !== \"string\") {\n throw new TypeError(`The \\`<Video>\\` tag requires a string for \\`src\\`, but got ${JSON.stringify(props2.src)} instead.`);\n }\n const preloadedSrc = usePreload(props2.src);\n const onDuration = useCallback15((src, durationInSeconds) => {\n setDurations({ type: \"got-duration\", durationInSeconds, src });\n }, [setDurations]);\n const onVideoFrame = useCallback15(() => {\n }, []);\n const durationFetched = durations[getAbsoluteSrc(preloadedSrc)] ?? durations[getAbsoluteSrc(props2.src)];\n if (loop && durationFetched !== undefined) {\n const mediaDuration = durationFetched * fps;\n return /* @__PURE__ */ jsx33(Loop, {\n durationInFrames: calculateLoopDuration({\n endAt,\n mediaDuration,\n playbackRate: props2.playbackRate ?? 1,\n startFrom\n }),\n layout: \"none\",\n name,\n children: /* @__PURE__ */ jsx33(Video, {\n ...propsOtherThanLoop,\n ref,\n _remotionInternalNativeLoopPassed: true\n })\n });\n }\n if (typeof startFrom !== \"undefined\" || typeof endAt !== \"undefined\") {\n validateStartFromProps(startFrom, endAt);\n const startFromFrameNo = startFrom ?? 0;\n const endAtFrameNo = endAt ?? Infinity;\n return /* @__PURE__ */ jsx33(Sequence, {\n layout: \"none\",\n from: 0 - startFromFrameNo,\n showInTimeline: false,\n durationInFrames: endAtFrameNo,\n name,\n children: /* @__PURE__ */ jsx33(Video, {\n pauseWhenBuffering: pauseWhenBuffering ?? false,\n ...otherProps,\n ref\n })\n });\n }\n validateMediaProps(props2, \"Video\");\n if (environment.isRendering) {\n return /* @__PURE__ */ jsx33(VideoForRendering, {\n onDuration,\n onVideoFrame: onVideoFrame ?? null,\n ...otherProps,\n ref\n });\n }\n return /* @__PURE__ */ jsx33(VideoForPreview, {\n onlyWarnForMediaSeekingError: false,\n ...otherProps,\n ref,\n onVideoFrame: null,\n pauseWhenBuffering: pauseWhenBuffering ?? false,\n onDuration,\n _remotionInternalStack: stack ?? null,\n _remotionInternalNativeLoopPassed: _remotionInternalNativeLoopPassed ?? false,\n _remotionDebugSeeking: _remotionDebugSeeking ?? false,\n showInTimeline: showInTimeline ?? true,\n onAutoPlayError: onAutoPlayError ?? undefined\n });\n};\nvar Video = forwardRef11(VideoForwardingFunction);\naddSequenceStackTraces(Video);\n// src/index.ts\ncheckMultipleRemotionVersions();\nvar Experimental = {\n Clipper,\n Null,\n useIsPlayer\n};\nvar proxyObj = {};\nvar Config = new Proxy(proxyObj, {\n get(_, prop) {\n if (prop === \"Bundling\" || prop === \"Rendering\" || prop === \"Log\" || prop === \"Puppeteer\" || prop === \"Output\") {\n return Config;\n }\n return () => {\n console.warn(\"\\u26A0\\uFE0F The CLI configuration has been extracted from Remotion Core.\");\n console.warn(\"Update the import from the config file:\");\n console.warn();\n console.warn(\"- Delete:\");\n console.warn('import {Config} from \"remotion\";');\n console.warn(\"+ Replace:\");\n console.warn('import {Config} from \"@remotion/cli/config\";');\n console.warn();\n console.warn(\"For more information, see https://www.remotion.dev/docs/4-0-migration.\");\n process.exit(1);\n };\n }\n});\naddSequenceStackTraces(Sequence);\nexport {\n watchStaticFile,\n useVideoConfig,\n useCurrentScale,\n useCurrentFrame,\n useBufferState,\n staticFile,\n spring,\n registerRoot,\n random,\n prefetch,\n measureSpring,\n interpolateColors,\n interpolate,\n getStaticFiles,\n getRemotionEnvironment,\n getInputProps,\n delayRender,\n continueRender,\n cancelRender,\n Video,\n VERSION,\n Still,\n Series,\n Sequence,\n OffthreadVideo,\n Loop,\n Internals,\n Img,\n IFrame,\n Freeze,\n FolderContext,\n Folder,\n Experimental,\n Easing,\n Config,\n Composition,\n Audio,\n Artifact,\n AbsoluteFill\n};\n","// src/interpolate.ts\nfunction interpolateFunction(input, inputRange, outputRange, options) {\n const { extrapolateLeft, extrapolateRight, easing } = options;\n let result = input;\n const [inputMin, inputMax] = inputRange;\n const [outputMin, outputMax] = outputRange;\n if (result < inputMin) {\n if (extrapolateLeft === \"identity\") {\n return result;\n }\n if (extrapolateLeft === \"clamp\") {\n result = inputMin;\n } else if (extrapolateLeft === \"wrap\") {\n const range = inputMax - inputMin;\n result = ((result - inputMin) % range + range) % range + inputMin;\n } else if (extrapolateLeft === \"extend\") {\n }\n }\n if (result > inputMax) {\n if (extrapolateRight === \"identity\") {\n return result;\n }\n if (extrapolateRight === \"clamp\") {\n result = inputMax;\n } else if (extrapolateRight === \"wrap\") {\n const range = inputMax - inputMin;\n result = ((result - inputMin) % range + range) % range + inputMin;\n } else if (extrapolateRight === \"extend\") {\n }\n }\n if (outputMin === outputMax) {\n return outputMin;\n }\n result = (result - inputMin) / (inputMax - inputMin);\n result = easing(result);\n result = result * (outputMax - outputMin) + outputMin;\n return result;\n}\nfunction findRange(input, inputRange) {\n let i;\n for (i = 1;i < inputRange.length - 1; ++i) {\n if (inputRange[i] >= input) {\n break;\n }\n }\n return i - 1;\n}\nfunction checkValidInputRange(arr) {\n for (let i = 1;i < arr.length; ++i) {\n if (!(arr[i] > arr[i - 1])) {\n throw new Error(`inputRange must be strictly monotonically increasing but got [${arr.join(\",\")}]`);\n }\n }\n}\nfunction checkInfiniteRange(name, arr) {\n if (arr.length < 2) {\n throw new Error(name + \" must have at least 2 elements\");\n }\n for (const element of arr) {\n if (typeof element !== \"number\") {\n throw new Error(`${name} must contain only numbers`);\n }\n if (!Number.isFinite(element)) {\n throw new Error(`${name} must contain only finite numbers, but got [${arr.join(\",\")}]`);\n }\n }\n}\nfunction interpolate(input, inputRange, outputRange, options) {\n if (typeof input === \"undefined\") {\n throw new Error(\"input can not be undefined\");\n }\n if (typeof inputRange === \"undefined\") {\n throw new Error(\"inputRange can not be undefined\");\n }\n if (typeof outputRange === \"undefined\") {\n throw new Error(\"outputRange can not be undefined\");\n }\n if (inputRange.length !== outputRange.length) {\n throw new Error(\"inputRange (\" + inputRange.length + \") and outputRange (\" + outputRange.length + \") must have the same length\");\n }\n checkInfiniteRange(\"inputRange\", inputRange);\n checkInfiniteRange(\"outputRange\", outputRange);\n checkValidInputRange(inputRange);\n const easing = options?.easing ?? ((num) => num);\n let extrapolateLeft = \"extend\";\n if (options?.extrapolateLeft !== undefined) {\n extrapolateLeft = options.extrapolateLeft;\n }\n let extrapolateRight = \"extend\";\n if (options?.extrapolateRight !== undefined) {\n extrapolateRight = options.extrapolateRight;\n }\n if (typeof input !== \"number\") {\n throw new TypeError(\"Cannot interpolate an input which is not a number\");\n }\n const range = findRange(input, inputRange);\n return interpolateFunction(input, [inputRange[range], inputRange[range + 1]], [outputRange[range], outputRange[range + 1]], {\n easing,\n extrapolateLeft,\n extrapolateRight\n });\n}\n// src/random.ts\nfunction mulberry32(a) {\n let t = a + 1831565813;\n t = Math.imul(t ^ t >>> 15, t | 1);\n t ^= t + Math.imul(t ^ t >>> 7, t | 61);\n return ((t ^ t >>> 14) >>> 0) / 4294967296;\n}\nfunction hashCode(str) {\n let i = 0;\n let chr = 0;\n let hash = 0;\n for (i = 0;i < str.length; i++) {\n chr = str.charCodeAt(i);\n hash = (hash << 5) - hash + chr;\n hash |= 0;\n }\n return hash;\n}\nvar random = (seed, dummy) => {\n if (dummy !== undefined) {\n throw new TypeError(\"random() takes only one argument\");\n }\n if (seed === null) {\n return Math.random();\n }\n if (typeof seed === \"string\") {\n return mulberry32(hashCode(seed));\n }\n if (typeof seed === \"number\") {\n return mulberry32(seed * 10000000000);\n }\n throw new Error(\"random() argument must be a number or a string\");\n};\n// src/truthy.ts\nfunction truthy(value) {\n return Boolean(value);\n}\n\n// src/delay-render.ts\nif (typeof window !== \"undefined\") {\n window.remotion_renderReady = false;\n}\nif (typeof window !== \"undefined\") {\n window.remotion_delayRenderTimeouts = {};\n}\nvar DELAY_RENDER_CALLSTACK_TOKEN = \"The delayRender was called:\";\nvar DELAY_RENDER_RETRIES_LEFT = \"Retries left: \";\nvar DELAY_RENDER_RETRY_TOKEN = \"- Rendering the frame will be retried.\";\n\n// src/static-file.ts\nvar problematicCharacters = {\n \"%3A\": \":\",\n \"%2F\": \"/\",\n \"%3F\": \"?\",\n \"%23\": \"#\",\n \"%5B\": \"[\",\n \"%5D\": \"]\",\n \"%40\": \"@\",\n \"%21\": \"!\",\n \"%24\": \"$\",\n \"%26\": \"&\",\n \"%27\": \"'\",\n \"%28\": \"(\",\n \"%29\": \")\",\n \"%2A\": \"*\",\n \"%2B\": \"+\",\n \"%2C\": \",\",\n \"%3B\": \";\"\n};\nvar didWarn = {};\nvar warnOnce = (message) => {\n if (didWarn[message]) {\n return;\n }\n console.warn(message);\n didWarn[message] = true;\n};\nvar includesHexOfUnsafeChar = (path) => {\n for (const key of Object.keys(problematicCharacters)) {\n if (path.includes(key)) {\n return { containsHex: true, hexCode: key };\n }\n }\n return { containsHex: false };\n};\nvar trimLeadingSlash = (path) => {\n if (path.startsWith(\"/\")) {\n return trimLeadingSlash(path.substring(1));\n }\n return path;\n};\nvar inner = (path) => {\n if (typeof window !== \"undefined\" && window.remotion_staticBase) {\n if (path.startsWith(window.remotion_staticBase)) {\n throw new Error(`The value \"${path}\" is already prefixed with the static base ${window.remotion_staticBase}. You don't need to call staticFile() on it.`);\n }\n return `${window.remotion_staticBase}/${trimLeadingSlash(path)}`;\n }\n return `/${trimLeadingSlash(path)}`;\n};\nvar encodeBySplitting = (path) => {\n const splitBySlash = path.split(\"/\");\n const encodedArray = splitBySlash.map((element) => {\n return encodeURIComponent(element);\n });\n const merged = encodedArray.join(\"/\");\n return merged;\n};\nvar staticFile = (path) => {\n if (path.startsWith(\"http://\") || path.startsWith(\"https://\")) {\n throw new TypeError(`staticFile() does not support remote URLs - got \"${path}\". Instead, pass the URL without wrapping it in staticFile(). See: https://remotion.dev/docs/staticfile-remote-urls`);\n }\n if (path.startsWith(\"..\") || path.startsWith(\"./\")) {\n throw new TypeError(`staticFile() does not support relative paths - got \"${path}\". Instead, pass the name of a file that is inside the public/ folder. See: https://remotion.dev/docs/staticfile-relative-paths`);\n }\n if (path.startsWith(\"/Users\") || path.startsWith(\"/home\") || path.startsWith(\"/tmp\") || path.startsWith(\"/etc\") || path.startsWith(\"/opt\") || path.startsWith(\"/var\") || path.startsWith(\"C:\") || path.startsWith(\"D:\") || path.startsWith(\"E:\")) {\n throw new TypeError(`staticFile() does not support absolute paths - got \"${path}\". Instead, pass the name of a file that is inside the public/ folder. See: https://remotion.dev/docs/staticfile-relative-paths`);\n }\n if (path.startsWith(\"public/\")) {\n throw new TypeError(`Do not include the public/ prefix when using staticFile() - got \"${path}\". See: https://remotion.dev/docs/staticfile-relative-paths`);\n }\n const includesHex = includesHexOfUnsafeChar(path);\n if (includesHex.containsHex) {\n warnOnce(`WARNING: You seem to pass an already encoded path (path contains ${includesHex.hexCode}). Since Remotion 4.0, the encoding is done by staticFile() itself. You may want to remove a encodeURIComponent() wrapping.`);\n }\n const preprocessed = encodeBySplitting(path);\n const preparsed = inner(preprocessed);\n if (!preparsed.startsWith(\"/\")) {\n return `/${preparsed}`;\n }\n return preparsed;\n};\n\n// src/input-props-serialization.ts\nvar DATE_TOKEN = \"remotion-date:\";\nvar FILE_TOKEN = \"remotion-file:\";\nvar serializeJSONWithDate = ({\n data,\n indent,\n staticBase\n}) => {\n let customDateUsed = false;\n let customFileUsed = false;\n let mapUsed = false;\n let setUsed = false;\n try {\n const serializedString = JSON.stringify(data, function(key, value) {\n const item = this[key];\n if (item instanceof Date) {\n customDateUsed = true;\n return `${DATE_TOKEN}${item.toISOString()}`;\n }\n if (item instanceof Map) {\n mapUsed = true;\n return value;\n }\n if (item instanceof Set) {\n setUsed = true;\n return value;\n }\n if (typeof item === \"string\" && staticBase !== null && item.startsWith(staticBase)) {\n customFileUsed = true;\n return `${FILE_TOKEN}${item.replace(staticBase + \"/\", \"\")}`;\n }\n return value;\n }, indent);\n return { serializedString, customDateUsed, customFileUsed, mapUsed, setUsed };\n } catch (err) {\n throw new Error(\"Could not serialize the passed input props to JSON: \" + err.message);\n }\n};\nvar deserializeJSONWithCustomFields = (data) => {\n return JSON.parse(data, (_, value) => {\n if (typeof value === \"string\" && value.startsWith(DATE_TOKEN)) {\n return new Date(value.replace(DATE_TOKEN, \"\"));\n }\n if (typeof value === \"string\" && value.startsWith(FILE_TOKEN)) {\n return staticFile(value.replace(FILE_TOKEN, \"\"));\n }\n return value;\n });\n};\n\n// src/interpolate-colors.ts\nfunction call(...args) {\n return \"\\\\(\\\\s*(\" + args.join(\")\\\\s*,\\\\s*(\") + \")\\\\s*\\\\)\";\n}\nfunction getMatchers() {\n const cachedMatchers = {\n rgb: undefined,\n rgba: undefined,\n hsl: undefined,\n hsla: undefined,\n hex3: undefined,\n hex4: undefined,\n hex5: undefined,\n hex6: undefined,\n hex8: undefined\n };\n if (cachedMatchers.rgb === undefined) {\n cachedMatchers.rgb = new RegExp(\"rgb\" + call(NUMBER, NUMBER, NUMBER));\n cachedMatchers.rgba = new RegExp(\"rgba\" + call(NUMBER, NUMBER, NUMBER, NUMBER));\n cachedMatchers.hsl = new RegExp(\"hsl\" + call(NUMBER, PERCENTAGE, PERCENTAGE));\n cachedMatchers.hsla = new RegExp(\"hsla\" + call(NUMBER, PERCENTAGE, PERCENTAGE, NUMBER));\n cachedMatchers.hex3 = /^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/;\n cachedMatchers.hex4 = /^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/;\n cachedMatchers.hex6 = /^#([0-9a-fA-F]{6})$/;\n cachedMatchers.hex8 = /^#([0-9a-fA-F]{8})$/;\n }\n return cachedMatchers;\n}\nfunction hue2rgb(p, q, t) {\n if (t < 0) {\n t += 1;\n }\n if (t > 1) {\n t -= 1;\n }\n if (t < 1 / 6) {\n return p + (q - p) * 6 * t;\n }\n if (t < 1 / 2) {\n return q;\n }\n if (t < 2 / 3) {\n return p + (q - p) * (2 / 3 - t) * 6;\n }\n return p;\n}\nfunction hslToRgb(h, s, l) {\n const q = l < 0.5 ? l * (1 + s) : l + s - l * s;\n const p = 2 * l - q;\n const r = hue2rgb(p, q, h + 1 / 3);\n const g = hue2rgb(p, q, h);\n const b = hue2rgb(p, q, h - 1 / 3);\n return Math.round(r * 255) << 24 | Math.round(g * 255) << 16 | Math.round(b * 255) << 8;\n}\nfunction parse255(str) {\n const int = Number.parseInt(str, 10);\n if (int < 0) {\n return 0;\n }\n if (int > 255) {\n return 255;\n }\n return int;\n}\nfunction parse360(str) {\n const int = Number.parseFloat(str);\n return (int % 360 + 360) % 360 / 360;\n}\nfunction parse1(str) {\n const num = Number.parseFloat(str);\n if (num < 0) {\n return 0;\n }\n if (num > 1) {\n return 255;\n }\n return Math.round(num * 255);\n}\nfunction parsePercentage(str) {\n const int = Number.parseFloat(str);\n if (int < 0) {\n return 0;\n }\n if (int > 100) {\n return 1;\n }\n return int / 100;\n}\nfunction normalizeColor(color) {\n const matchers = getMatchers();\n let match;\n if (matchers.hex6) {\n if (match = matchers.hex6.exec(color)) {\n return Number.parseInt(match[1] + \"ff\", 16) >>> 0;\n }\n }\n if (colorNames[color] !== undefined) {\n return colorNames[color];\n }\n if (matchers.rgb) {\n if (match = matchers.rgb.exec(color)) {\n return (parse255(match[1]) << 24 | parse255(match[2]) << 16 | parse255(match[3]) << 8 | 255) >>> 0;\n }\n }\n if (matchers.rgba) {\n if (match = matchers.rgba.exec(color)) {\n return (parse255(match[1]) << 24 | parse255(match[2]) << 16 | parse255(match[3]) << 8 | parse1(match[4])) >>> 0;\n }\n }\n if (matchers.hex3) {\n if (match = matchers.hex3.exec(color)) {\n return Number.parseInt(match[1] + match[1] + match[2] + match[2] + match[3] + match[3] + \"ff\", 16) >>> 0;\n }\n }\n if (matchers.hex8) {\n if (match = matchers.hex8.exec(color)) {\n return Number.parseInt(match[1], 16) >>> 0;\n }\n }\n if (matchers.hex4) {\n if (match = matchers.hex4.exec(color)) {\n return Number.parseInt(match[1] + match[1] + match[2] + match[2] + match[3] + match[3] + match[4] + match[4], 16) >>> 0;\n }\n }\n if (matchers.hsl) {\n if (match = matchers.hsl.exec(color)) {\n return (hslToRgb(parse360(match[1]), parsePercentage(match[2]), parsePercentage(match[3])) | 255) >>> 0;\n }\n }\n if (matchers.hsla) {\n if (match = matchers.hsla.exec(color)) {\n return (hslToRgb(parse360(match[1]), parsePercentage(match[2]), parsePercentage(match[3])) | parse1(match[4])) >>> 0;\n }\n }\n throw new Error(`invalid color string ${color} provided`);\n}\nfunction processColor(color) {\n const normalizedColor = normalizeColor(color);\n return (normalizedColor << 24 | normalizedColor >>> 8) >>> 0;\n}\nvar NUMBER = \"[-+]?\\\\d*\\\\.?\\\\d+\";\nvar PERCENTAGE = NUMBER + \"%\";\nvar colorNames = {\n transparent: 0,\n aliceblue: 4042850303,\n antiquewhite: 4209760255,\n aqua: 16777215,\n aquamarine: 2147472639,\n azure: 4043309055,\n beige: 4126530815,\n bisque: 4293182719,\n black: 255,\n blanchedalmond: 4293643775,\n blue: 65535,\n blueviolet: 2318131967,\n brown: 2771004159,\n burlywood: 3736635391,\n burntsienna: 3934150143,\n cadetblue: 1604231423,\n chartreuse: 2147418367,\n chocolate: 3530104575,\n coral: 4286533887,\n cornflowerblue: 1687547391,\n cornsilk: 4294499583,\n crimson: 3692313855,\n cyan: 16777215,\n darkblue: 35839,\n darkcyan: 9145343,\n darkgoldenrod: 3095792639,\n darkgray: 2846468607,\n darkgreen: 6553855,\n darkgrey: 2846468607,\n darkkhaki: 3182914559,\n darkmagenta: 2332068863,\n darkolivegreen: 1433087999,\n darkorange: 4287365375,\n darkorchid: 2570243327,\n darkred: 2332033279,\n darksalmon: 3918953215,\n darkseagreen: 2411499519,\n darkslateblue: 1211993087,\n darkslategray: 793726975,\n darkslategrey: 793726975,\n darkturquoise: 13554175,\n darkviolet: 2483082239,\n deeppink: 4279538687,\n deepskyblue: 12582911,\n dimgray: 1768516095,\n dimgrey: 1768516095,\n dodgerblue: 512819199,\n firebrick: 2988581631,\n floralwhite: 4294635775,\n forestgreen: 579543807,\n fuchsia: 4278255615,\n gainsboro: 3705462015,\n ghostwhite: 4177068031,\n gold: 4292280575,\n goldenrod: 3668254975,\n gray: 2155905279,\n green: 8388863,\n greenyellow: 2919182335,\n grey: 2155905279,\n honeydew: 4043305215,\n hotpink: 4285117695,\n indianred: 3445382399,\n indigo: 1258324735,\n ivory: 4294963455,\n khaki: 4041641215,\n lavender: 3873897215,\n lavenderblush: 4293981695,\n lawngreen: 2096890111,\n lemonchiffon: 4294626815,\n lightblue: 2916673279,\n lightcoral: 4034953471,\n lightcyan: 3774873599,\n lightgoldenrodyellow: 4210742015,\n lightgray: 3553874943,\n lightgreen: 2431553791,\n lightgrey: 3553874943,\n lightpink: 4290167295,\n lightsalmon: 4288707327,\n lightseagreen: 548580095,\n lightskyblue: 2278488831,\n lightslategray: 2005441023,\n lightslategrey: 2005441023,\n lightsteelblue: 2965692159,\n lightyellow: 4294959359,\n lime: 16711935,\n limegreen: 852308735,\n linen: 4210091775,\n magenta: 4278255615,\n maroon: 2147483903,\n mediumaquamarine: 1724754687,\n mediumblue: 52735,\n mediumorchid: 3126187007,\n mediumpurple: 2473647103,\n mediumseagreen: 1018393087,\n mediumslateblue: 2070474495,\n mediumspringgreen: 16423679,\n mediumturquoise: 1221709055,\n mediumvioletred: 3340076543,\n midnightblue: 421097727,\n mintcream: 4127193855,\n mistyrose: 4293190143,\n moccasin: 4293178879,\n navajowhite: 4292783615,\n navy: 33023,\n oldlace: 4260751103,\n olive: 2155872511,\n olivedrab: 1804477439,\n orange: 4289003775,\n orangered: 4282712319,\n orchid: 3664828159,\n palegoldenrod: 4008225535,\n palegreen: 2566625535,\n paleturquoise: 2951671551,\n palevioletred: 3681588223,\n papayawhip: 4293907967,\n peachpuff: 4292524543,\n peru: 3448061951,\n pink: 4290825215,\n plum: 3718307327,\n powderblue: 2967529215,\n purple: 2147516671,\n rebeccapurple: 1714657791,\n red: 4278190335,\n rosybrown: 3163525119,\n royalblue: 1097458175,\n saddlebrown: 2336560127,\n salmon: 4202722047,\n sandybrown: 4104413439,\n seagreen: 780883967,\n seashell: 4294307583,\n sienna: 2689740287,\n silver: 3233857791,\n skyblue: 2278484991,\n slateblue: 1784335871,\n slategray: 1887473919,\n slategrey: 1887473919,\n snow: 4294638335,\n springgreen: 16744447,\n steelblue: 1182971135,\n tan: 3535047935,\n teal: 8421631,\n thistle: 3636451583,\n tomato: 4284696575,\n turquoise: 1088475391,\n violet: 4001558271,\n wheat: 4125012991,\n white: 4294967295,\n whitesmoke: 4126537215,\n yellow: 4294902015,\n yellowgreen: 2597139199\n};\n\n// src/v5-flag.ts\nvar ENABLE_V5_BREAKING_CHANGES = false;\n\n// src/validate-frame.ts\nvar validateFrame = ({\n allowFloats,\n durationInFrames,\n frame\n}) => {\n if (typeof frame === \"undefined\") {\n throw new TypeError(`Argument missing for parameter \"frame\"`);\n }\n if (typeof frame !== \"number\") {\n throw new TypeError(`Argument passed for \"frame\" is not a number: ${frame}`);\n }\n if (!Number.isFinite(frame)) {\n throw new RangeError(`Frame ${frame} is not finite`);\n }\n if (frame % 1 !== 0 && !allowFloats) {\n throw new RangeError(`Argument for frame must be an integer, but got ${frame}`);\n }\n if (frame < 0 && frame < -durationInFrames) {\n throw new RangeError(`Cannot use frame ${frame}: Duration of composition is ${durationInFrames}, therefore the lowest frame that can be rendered is ${-durationInFrames}`);\n }\n if (frame > durationInFrames - 1) {\n throw new RangeError(`Cannot use frame ${frame}: Duration of composition is ${durationInFrames}, therefore the highest frame that can be rendered is ${durationInFrames - 1}`);\n }\n};\n\n// src/validation/validate-default-props.ts\nvar validateDefaultAndInputProps = (defaultProps, name, compositionId) => {\n if (!defaultProps) {\n return;\n }\n if (typeof defaultProps !== \"object\") {\n throw new Error(`\"${name}\" must be an object, but you passed a value of type ${typeof defaultProps}`);\n }\n if (Array.isArray(defaultProps)) {\n throw new Error(`\"${name}\" must be an object, an array was passed ${compositionId ? `for composition \"${compositionId}\"` : \"\"}`);\n }\n};\n\n// src/validation/validate-dimensions.ts\nfunction validateDimension(amount, nameOfProp, location) {\n if (typeof amount !== \"number\") {\n throw new Error(`The \"${nameOfProp}\" prop ${location} must be a number, but you passed a value of type ${typeof amount}`);\n }\n if (isNaN(amount)) {\n throw new TypeError(`The \"${nameOfProp}\" prop ${location} must not be NaN, but is NaN.`);\n }\n if (!Number.isFinite(amount)) {\n throw new TypeError(`The \"${nameOfProp}\" prop ${location} must be finite, but is ${amount}.`);\n }\n if (amount % 1 !== 0) {\n throw new TypeError(`The \"${nameOfProp}\" prop ${location} must be an integer, but is ${amount}.`);\n }\n if (amount <= 0) {\n throw new TypeError(`The \"${nameOfProp}\" prop ${location} must be positive, but got ${amount}.`);\n }\n}\n\n// src/validation/validate-duration-in-frames.ts\nfunction validateDurationInFrames(durationInFrames, options) {\n const { allowFloats, component } = options;\n if (typeof durationInFrames === \"undefined\") {\n throw new Error(`The \"durationInFrames\" prop ${component} is missing.`);\n }\n if (typeof durationInFrames !== \"number\") {\n throw new Error(`The \"durationInFrames\" prop ${component} must be a number, but you passed a value of type ${typeof durationInFrames}`);\n }\n if (durationInFrames <= 0) {\n throw new TypeError(`The \"durationInFrames\" prop ${component} must be positive, but got ${durationInFrames}.`);\n }\n if (!allowFloats && durationInFrames % 1 !== 0) {\n throw new TypeError(`The \"durationInFrames\" prop ${component} must be an integer, but got ${durationInFrames}.`);\n }\n if (!Number.isFinite(durationInFrames)) {\n throw new TypeError(`The \"durationInFrames\" prop ${component} must be finite, but got ${durationInFrames}.`);\n }\n}\n\n// src/validation/validate-fps.ts\nfunction validateFps(fps, location, isGif) {\n if (typeof fps !== \"number\") {\n throw new Error(`\"fps\" must be a number, but you passed a value of type ${typeof fps} ${location}`);\n }\n if (!Number.isFinite(fps)) {\n throw new Error(`\"fps\" must be a finite, but you passed ${fps} ${location}`);\n }\n if (isNaN(fps)) {\n throw new Error(`\"fps\" must not be NaN, but got ${fps} ${location}`);\n }\n if (fps <= 0) {\n throw new TypeError(`\"fps\" must be positive, but got ${fps} ${location}`);\n }\n if (isGif && fps > 50) {\n throw new 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`);\n }\n}\n\n// src/video/get-current-time.ts\nvar getExpectedMediaFrameUncorrected = ({\n frame,\n playbackRate,\n startFrom\n}) => {\n return interpolate(frame, [-1, startFrom, startFrom + 1], [-1, startFrom, startFrom + playbackRate]);\n};\n\n// src/absolute-src.ts\nvar getAbsoluteSrc = (relativeSrc) => {\n if (typeof window === \"undefined\") {\n return relativeSrc;\n }\n return new URL(relativeSrc, window.origin).href;\n};\n\n// src/video/offthread-video-source.ts\nvar getOffthreadVideoSource = ({\n src,\n transparent,\n currentTime,\n toneMapped\n}) => {\n return `http://localhost:${window.remotion_proxyPort}/proxy?src=${encodeURIComponent(getAbsoluteSrc(src))}&time=${encodeURIComponent(currentTime)}&transparent=${String(transparent)}&toneMapped=${String(toneMapped)}`;\n};\n\n// src/no-react.ts\nvar NoReactInternals = {\n processColor,\n truthy,\n validateFps,\n validateDimension,\n validateDurationInFrames,\n validateDefaultAndInputProps,\n validateFrame,\n serializeJSONWithDate,\n bundleName: \"bundle.js\",\n bundleMapName: \"bundle.js.map\",\n deserializeJSONWithCustomFields,\n DELAY_RENDER_CALLSTACK_TOKEN,\n DELAY_RENDER_RETRY_TOKEN,\n DELAY_RENDER_ATTEMPT_TOKEN: DELAY_RENDER_RETRIES_LEFT,\n getOffthreadVideoSource,\n getExpectedMediaFrameUncorrected,\n ENABLE_V5_BREAKING_CHANGES,\n MIN_NODE_VERSION: ENABLE_V5_BREAKING_CHANGES ? 18 : 16,\n MIN_BUN_VERSION: ENABLE_V5_BREAKING_CHANGES ? \"1.1.3\" : \"1.0.3\",\n colorNames,\n DATE_TOKEN,\n FILE_TOKEN\n};\nexport {\n random,\n interpolate,\n NoReactInternals\n};\n","// src/presentations/slide.tsx\nimport { useMemo } from \"react\";\nimport { AbsoluteFill } from \"remotion\";\nimport { jsx } from \"react/jsx-runtime\";\nvar epsilon = 0.01;\nvar SlidePresentation = ({\n children,\n presentationProgress,\n presentationDirection,\n passedProps: { direction = \"from-left\", enterStyle, exitStyle }\n}) => {\n const directionStyle = useMemo(() => {\n const presentationProgressWithEpsilonCorrection = presentationProgress === 1 ? presentationProgress * 100 : presentationProgress * 100 - epsilon;\n if (presentationDirection === \"exiting\") {\n switch (direction) {\n case \"from-left\":\n return {\n transform: `translateX(${presentationProgressWithEpsilonCorrection}%)`\n };\n case \"from-right\":\n return {\n transform: `translateX(${-presentationProgress * 100}%)`\n };\n case \"from-top\":\n return {\n transform: `translateY(${presentationProgressWithEpsilonCorrection}%)`\n };\n case \"from-bottom\":\n return {\n transform: `translateY(${-presentationProgress * 100}%)`\n };\n default:\n throw new Error(`Invalid direction: ${direction}`);\n }\n }\n switch (direction) {\n case \"from-left\":\n return {\n transform: `translateX(${-100 + presentationProgress * 100}%)`\n };\n case \"from-right\":\n return {\n transform: `translateX(${100 - presentationProgressWithEpsilonCorrection}%)`\n };\n case \"from-top\":\n return {\n transform: `translateY(${-100 + presentationProgress * 100}%)`\n };\n case \"from-bottom\":\n return {\n transform: `translateY(${100 - presentationProgressWithEpsilonCorrection}%)`\n };\n default:\n throw new Error(`Invalid direction: ${direction}`);\n }\n }, [presentationDirection, presentationProgress, direction]);\n const style = useMemo(() => {\n return {\n width: \"100%\",\n height: \"100%\",\n justifyContent: \"center\",\n alignItems: \"center\",\n ...directionStyle,\n ...presentationDirection === \"entering\" ? enterStyle : exitStyle\n };\n }, [directionStyle, enterStyle, exitStyle, presentationDirection]);\n return /* @__PURE__ */ jsx(AbsoluteFill, {\n style,\n children\n });\n};\nvar slide = (props) => {\n return {\n component: SlidePresentation,\n props: props ?? {}\n };\n};\n\n// src/timings/linear-timing.ts\nimport { interpolate } from \"remotion\";\nvar linearTiming = (options) => {\n return {\n getDurationInFrames: () => {\n return options.durationInFrames;\n },\n getProgress: ({ frame }) => {\n return interpolate(frame, [0, options.durationInFrames], [0, 1], {\n easing: options.easing,\n extrapolateLeft: \"clamp\",\n extrapolateRight: \"clamp\"\n });\n }\n };\n};\n// src/timings/spring-timing.ts\nimport { measureSpring, spring } from \"remotion\";\nvar springTiming = (options = {}) => {\n return {\n getDurationInFrames: ({ fps }) => {\n if (options.durationInFrames) {\n return options.durationInFrames;\n }\n return measureSpring({\n config: options.config,\n threshold: options.durationRestThreshold,\n fps\n });\n },\n getProgress: ({ fps, frame }) => {\n const to = options.reverse ? 0 : 1;\n const from = options.reverse ? 1 : 0;\n return spring({\n fps,\n frame,\n to,\n from,\n config: options.config,\n durationInFrames: options.durationInFrames,\n durationRestThreshold: options.durationRestThreshold,\n reverse: options.reverse\n });\n }\n };\n};\n// src/TransitionSeries.tsx\nimport { Children, useMemo as useMemo3 } from \"react\";\nimport { Internals, Sequence, useCurrentFrame, useVideoConfig } from \"remotion\";\nimport { NoReactInternals as NoReactInternals2 } from \"remotion/no-react\";\n\n// src/context.tsx\nimport React2, { useMemo as useMemo2 } from \"react\";\nimport { jsx as jsx2 } from \"react/jsx-runtime\";\nvar EnteringContext = React2.createContext(null);\nvar ExitingContext = React2.createContext(null);\nvar WrapInEnteringProgressContext = ({ presentationProgress, children }) => {\n const value = useMemo2(() => {\n return {\n enteringProgress: presentationProgress\n };\n }, [presentationProgress]);\n return /* @__PURE__ */ jsx2(EnteringContext.Provider, {\n value,\n children\n });\n};\nvar WrapInExitingProgressContext = ({ presentationProgress, children }) => {\n const value = useMemo2(() => {\n return {\n exitingProgress: presentationProgress\n };\n }, [presentationProgress]);\n return /* @__PURE__ */ jsx2(ExitingContext.Provider, {\n value,\n children\n });\n};\n\n// src/flatten-children.ts\nimport React3 from \"react\";\nvar flattenChildren = (children) => {\n const childrenArray = React3.Children.toArray(children);\n return childrenArray.reduce((flatChildren, child) => {\n if (child.type === React3.Fragment) {\n return flatChildren.concat(flattenChildren(child.props.children));\n }\n flatChildren.push(child);\n return flatChildren;\n }, []);\n};\n\n// src/validate.ts\nimport { NoReactInternals } from \"remotion/no-react\";\nvar validateDurationInFrames = NoReactInternals.validateDurationInFrames;\n\n// src/TransitionSeries.tsx\nimport { jsx as jsx3, Fragment } from \"react/jsx-runtime\";\nvar TransitionSeriesTransition = function(_props) {\n return null;\n};\nvar SeriesSequence = ({ children }) => {\n return /* @__PURE__ */ jsx3(Fragment, {\n children\n });\n};\nvar TransitionSeriesChildren = ({\n children\n}) => {\n const { fps } = useVideoConfig();\n const frame = useCurrentFrame();\n const childrenValue = useMemo3(() => {\n let transitionOffsets = 0;\n let startFrame = 0;\n const flattedChildren = flattenChildren(children);\n return Children.map(flattedChildren, (child, i) => {\n const current = child;\n if (typeof current === \"string\") {\n if (current.trim() === \"\") {\n return null;\n }\n throw new TypeError(`The <TransitionSeries /> component only accepts a list of <TransitionSeries.Sequence /> components as its children, but you passed a string \"${current}\"`);\n }\n const hasPrev = flattedChildren[i - 1];\n const nextPrev = flattedChildren[i + 1];\n const prev = typeof hasPrev === \"string\" || typeof hasPrev === \"undefined\" ? null : hasPrev.type === TransitionSeriesTransition ? hasPrev : null;\n const next = typeof nextPrev === \"string\" || typeof nextPrev === \"undefined\" ? null : nextPrev.type === TransitionSeriesTransition ? nextPrev : null;\n const prevIsTransition = typeof hasPrev === \"string\" || typeof hasPrev === \"undefined\" ? false : hasPrev.type === TransitionSeriesTransition;\n if (current.type === TransitionSeriesTransition) {\n if (prevIsTransition) {\n throw new TypeError(`A <TransitionSeries.Transition /> component must not be followed by another <TransitionSeries.Transition /> component (nth children = ${i - 1} and ${i})`);\n }\n return null;\n }\n if (current.type !== SeriesSequence) {\n throw new TypeError(`The <TransitionSeries /> component only accepts a list of <TransitionSeries.Sequence /> and <TransitionSeries.Transition /> components as its children, but got ${current} instead`);\n }\n const castedChildAgain = current;\n const debugInfo = `index = ${i}, duration = ${castedChildAgain.props.durationInFrames}`;\n if (!castedChildAgain?.props.children) {\n throw new TypeError(`A <TransitionSeries.Sequence /> component (${debugInfo}) was detected to not have any children. Delete it to fix this error.`);\n }\n const durationInFramesProp = castedChildAgain.props.durationInFrames;\n const {\n durationInFrames,\n children: _children,\n ...passedProps\n } = castedChildAgain.props;\n validateDurationInFrames(durationInFramesProp, {\n component: `of a <TransitionSeries.Sequence /> component`,\n allowFloats: true\n });\n const offset = castedChildAgain.props.offset ?? 0;\n if (Number.isNaN(offset)) {\n throw new TypeError(`The \"offset\" property of a <TransitionSeries.Sequence /> must not be NaN, but got NaN (${debugInfo}).`);\n }\n if (!Number.isFinite(offset)) {\n throw new TypeError(`The \"offset\" property of a <TransitionSeries.Sequence /> must be finite, but got ${offset} (${debugInfo}).`);\n }\n if (offset % 1 !== 0) {\n throw new TypeError(`The \"offset\" property of a <TransitionSeries.Sequence /> must be finite, but got ${offset} (${debugInfo}).`);\n }\n const currentStartFrame = startFrame + offset;\n let duration = 0;\n if (prev) {\n duration = prev.props.timing.getDurationInFrames({\n fps\n });\n transitionOffsets -= duration;\n }\n let actualStartFrame = currentStartFrame + transitionOffsets;\n startFrame += durationInFramesProp + offset;\n if (actualStartFrame < 0) {\n startFrame -= actualStartFrame;\n actualStartFrame = 0;\n }\n const nextProgress = next ? next.props.timing.getProgress({\n frame: frame - actualStartFrame - durationInFrames + next.props.timing.getDurationInFrames({ fps }),\n fps\n }) : null;\n const prevProgress = prev ? prev.props.timing.getProgress({\n frame: frame - actualStartFrame,\n fps\n }) : null;\n if (next && durationInFramesProp < next.props.timing.getDurationInFrames({ fps })) {\n throw new Error(`The duration of a <TransitionSeries.Sequence /> must not be shorter than the duration of the next <TransitionSeries.Transition />. The transition is ${next.props.timing.getDurationInFrames({ fps })} frames long, but the sequence is only ${durationInFramesProp} frames long (${debugInfo})`);\n }\n if (prev && durationInFramesProp < prev.props.timing.getDurationInFrames({ fps })) {\n throw new Error(`The duration of a <TransitionSeries.Sequence /> must not be shorter than the duration of the previous <TransitionSeries.Transition />. The transition is ${prev.props.timing.getDurationInFrames({ fps })} frames long, but the sequence is only ${durationInFramesProp} frames long (${debugInfo})`);\n }\n if (next && prev && nextProgress !== null && prevProgress !== null) {\n const nextPresentation = next.props.presentation ?? slide();\n const prevPresentation = prev.props.presentation ?? slide();\n const UppercaseNextPresentation = nextPresentation.component;\n const UppercasePrevPresentation = prevPresentation.component;\n return /* @__PURE__ */ jsx3(Sequence, {\n from: Math.floor(actualStartFrame),\n durationInFrames: durationInFramesProp,\n ...passedProps,\n name: passedProps.name || \"<TS.Sequence>\",\n children: /* @__PURE__ */ jsx3(UppercaseNextPresentation, {\n passedProps: nextPresentation.props ?? {},\n presentationDirection: \"exiting\",\n presentationProgress: nextProgress,\n presentationDurationInFrames: next.props.timing.getDurationInFrames({ fps }),\n children: /* @__PURE__ */ jsx3(WrapInExitingProgressContext, {\n presentationProgress: nextProgress,\n children: /* @__PURE__ */ jsx3(UppercasePrevPresentation, {\n passedProps: prevPresentation.props ?? {},\n presentationDirection: \"entering\",\n presentationProgress: prevProgress,\n presentationDurationInFrames: prev.props.timing.getDurationInFrames({ fps }),\n children: /* @__PURE__ */ jsx3(WrapInEnteringProgressContext, {\n presentationProgress: prevProgress,\n children: child\n })\n })\n })\n })\n }, i);\n }\n if (prevProgress !== null && prev) {\n const prevPresentation = prev.props.presentation ?? slide();\n const UppercasePrevPresentation = prevPresentation.component;\n return /* @__PURE__ */ jsx3(Sequence, {\n from: Math.floor(actualStartFrame),\n durationInFrames: durationInFramesProp,\n ...passedProps,\n name: passedProps.name || \"<TS.Sequence>\",\n children: /* @__PURE__ */ jsx3(UppercasePrevPresentation, {\n passedProps: prevPresentation.props ?? {},\n presentationDirection: \"entering\",\n presentationProgress: prevProgress,\n presentationDurationInFrames: prev.props.timing.getDurationInFrames({ fps }),\n children: /* @__PURE__ */ jsx3(WrapInEnteringProgressContext, {\n presentationProgress: prevProgress,\n children: child\n })\n })\n }, i);\n }\n if (nextProgress !== null && next) {\n const nextPresentation = next.props.presentation ?? slide();\n const UppercaseNextPresentation = nextPresentation.component;\n return /* @__PURE__ */ jsx3(Sequence, {\n from: Math.floor(actualStartFrame),\n durationInFrames: durationInFramesProp,\n ...passedProps,\n name: passedProps.name || \"<TS.Sequence>\",\n children: /* @__PURE__ */ jsx3(UppercaseNextPresentation, {\n passedProps: nextPresentation.props ?? {},\n presentationDirection: \"exiting\",\n presentationProgress: nextProgress,\n presentationDurationInFrames: next.props.timing.getDurationInFrames({ fps }),\n children: /* @__PURE__ */ jsx3(WrapInExitingProgressContext, {\n presentationProgress: nextProgress,\n children: child\n })\n })\n }, i);\n }\n return /* @__PURE__ */ jsx3(Sequence, {\n from: Math.floor(actualStartFrame),\n durationInFrames: durationInFramesProp,\n ...passedProps,\n name: passedProps.name || \"<TS.Sequence>\",\n children: child\n }, i);\n });\n }, [children, fps, frame]);\n return /* @__PURE__ */ jsx3(Fragment, {\n children: childrenValue\n });\n};\nvar TransitionSeries = ({ children, name, layout: passedLayout, ...otherProps }) => {\n const displayName = name ?? \"<TransitionSeries>\";\n const layout = passedLayout ?? \"absolute-fill\";\n if (NoReactInternals2.ENABLE_V5_BREAKING_CHANGES && layout !== \"absolute-fill\") {\n throw new TypeError(`The \"layout\" prop of <TransitionSeries /> is not supported anymore in v5. TransitionSeries' must be absolutely positioned.`);\n }\n return /* @__PURE__ */ jsx3(Sequence, {\n name: displayName,\n layout,\n ...otherProps,\n children: /* @__PURE__ */ jsx3(TransitionSeriesChildren, {\n children\n })\n });\n};\nTransitionSeries.Sequence = SeriesSequence;\nTransitionSeries.Transition = TransitionSeriesTransition;\nInternals.addSequenceStackTraces(TransitionSeries);\nInternals.addSequenceStackTraces(SeriesSequence);\n// src/use-transition-progress.ts\nimport React4 from \"react\";\nvar useTransitionProgress = () => {\n const entering = React4.useContext(EnteringContext);\n const exiting = React4.useContext(ExitingContext);\n if (!entering && !exiting) {\n return {\n isInTransitionSeries: false,\n entering: 1,\n exiting: 0\n };\n }\n return {\n isInTransitionSeries: true,\n entering: entering?.enteringProgress ?? 1,\n exiting: exiting?.exitingProgress ?? 0\n };\n};\nexport {\n useTransitionProgress,\n springTiming,\n linearTiming,\n TransitionSeries\n};\n","// src/presentations/fade.tsx\nimport { useMemo } from \"react\";\nimport { AbsoluteFill } from \"remotion\";\nimport { jsx } from \"react/jsx-runtime\";\nvar FadePresentation = ({ children, presentationDirection, presentationProgress, passedProps }) => {\n const isEntering = presentationDirection === \"entering\";\n const style = useMemo(() => {\n return {\n opacity: isEntering ? presentationProgress : passedProps.shouldFadeOutExitingScene ? 1 - presentationProgress : 1,\n ...presentationDirection === \"entering\" ? passedProps.enterStyle : passedProps.exitStyle\n };\n }, [\n isEntering,\n passedProps.enterStyle,\n passedProps.exitStyle,\n passedProps.shouldFadeOutExitingScene,\n presentationDirection,\n presentationProgress\n ]);\n return /* @__PURE__ */ jsx(AbsoluteFill, {\n style,\n children\n });\n};\nvar fade = (props) => {\n return {\n component: FadePresentation,\n props: props ?? {}\n };\n};\nexport {\n fade\n};\n","// src/presentations/slide.tsx\nimport { useMemo } from \"react\";\nimport { AbsoluteFill } from \"remotion\";\nimport { jsx } from \"react/jsx-runtime\";\nvar epsilon = 0.01;\nvar SlidePresentation = ({\n children,\n presentationProgress,\n presentationDirection,\n passedProps: { direction = \"from-left\", enterStyle, exitStyle }\n}) => {\n const directionStyle = useMemo(() => {\n const presentationProgressWithEpsilonCorrection = presentationProgress === 1 ? presentationProgress * 100 : presentationProgress * 100 - epsilon;\n if (presentationDirection === \"exiting\") {\n switch (direction) {\n case \"from-left\":\n return {\n transform: `translateX(${presentationProgressWithEpsilonCorrection}%)`\n };\n case \"from-right\":\n return {\n transform: `translateX(${-presentationProgress * 100}%)`\n };\n case \"from-top\":\n return {\n transform: `translateY(${presentationProgressWithEpsilonCorrection}%)`\n };\n case \"from-bottom\":\n return {\n transform: `translateY(${-presentationProgress * 100}%)`\n };\n default:\n throw new Error(`Invalid direction: ${direction}`);\n }\n }\n switch (direction) {\n case \"from-left\":\n return {\n transform: `translateX(${-100 + presentationProgress * 100}%)`\n };\n case \"from-right\":\n return {\n transform: `translateX(${100 - presentationProgressWithEpsilonCorrection}%)`\n };\n case \"from-top\":\n return {\n transform: `translateY(${-100 + presentationProgress * 100}%)`\n };\n case \"from-bottom\":\n return {\n transform: `translateY(${100 - presentationProgressWithEpsilonCorrection}%)`\n };\n default:\n throw new Error(`Invalid direction: ${direction}`);\n }\n }, [presentationDirection, presentationProgress, direction]);\n const style = useMemo(() => {\n return {\n width: \"100%\",\n height: \"100%\",\n justifyContent: \"center\",\n alignItems: \"center\",\n ...directionStyle,\n ...presentationDirection === \"entering\" ? enterStyle : exitStyle\n };\n }, [directionStyle, enterStyle, exitStyle, presentationDirection]);\n return /* @__PURE__ */ jsx(AbsoluteFill, {\n style,\n children\n });\n};\nvar slide = (props) => {\n return {\n component: SlidePresentation,\n props: props ?? {}\n };\n};\nexport {\n slide\n};\n","// src/presentations/wipe.tsx\nimport { useMemo, useState } from \"react\";\nimport { AbsoluteFill, random } from \"remotion\";\nimport { jsx, jsxs } from \"react/jsx-runtime\";\nvar makePathIn = (progress, direction) => {\n switch (direction) {\n case \"from-left\":\n return `\nM 0 0\nL ${progress} 0\nL ${progress} 1\nL 0 1\nZ`;\n case \"from-top-left\":\n return `\nM 0 0\nL ${progress * 2} 0\nL 0 ${progress * 2}\nZ`;\n case \"from-top\":\n return `\nM 0 0\nL 1 0\nL 1 ${progress}\nL 0 ${progress}\nZ`;\n case \"from-top-right\":\n return `\nM 1 0\nL ${1 - progress * 2} 0\nL 1 ${progress * 2}\nZ`;\n case \"from-right\":\n return `\nM 1 0\nL 1 1\nL ${1 - progress} 1\nL ${1 - progress} 0\nZ`;\n case \"from-bottom-right\":\n return `\nM 1 1\nL ${1 - progress * 2} 1\nL 1 ${1 - progress * 2}\nZ`;\n case \"from-bottom\":\n return `\nM 0 1\nL 1 1\nL 1 ${1 - progress}\nL 0 ${1 - progress}\nZ`;\n case \"from-bottom-left\":\n return `\nM 0 1\nL 0 ${1 - progress * 2}\nL ${progress * 2} 1\nZ`;\n default:\n throw new Error(`Unknown direction ${JSON.stringify(direction)}`);\n }\n};\nvar makePathOut = (progress, direction) => {\n switch (direction) {\n case \"from-left\":\n return `\nM 1 1\nL ${1 - progress} 1\nL ${1 - progress} 0\nL 1 0\nZ`;\n case \"from-top-left\":\n return `\nM 1 1\nL ${1 - 2 * progress} 1\nL 1 ${1 - 2 * progress}\nZ`;\n case \"from-top\":\n return `\nM 1 1\nL 0 1\nL 0 ${1 - progress}\nL 1 ${1 - progress}\nZ`;\n case \"from-top-right\":\n return `\nM 0 1\nL ${progress * 2} 1\nL 0 ${1 - progress * 2}\nZ`;\n case \"from-right\":\n return `\nM 0 0\nL ${progress} 0\nL ${progress} 1\nL 0 1\nZ`;\n case \"from-bottom-right\":\n return `\nM 0 0\nL ${progress * 2} 0\nL 0 ${progress * 2}\nZ`;\n case \"from-bottom\":\n return `\nM 1 0\nL 0 0\nL 0 ${progress}\nL 1 ${progress}\nZ`;\n case \"from-bottom-left\":\n return `\nM 1 0\nL ${1 - progress * 2} 0\nL 1 ${progress * 2}\nZ`;\n default:\n throw new Error(`Unknown direction ${JSON.stringify(direction)}`);\n }\n};\nvar WipePresentation = ({\n children,\n presentationProgress,\n presentationDirection,\n passedProps: {\n direction = \"from-left\",\n innerEnterStyle,\n innerExitStyle,\n outerEnterStyle,\n outerExitStyle\n }\n}) => {\n const [clipId] = useState(() => String(random(null)));\n const progressInDirection = presentationDirection === \"entering\" ? presentationProgress : 1 - presentationProgress;\n const path = presentationDirection === \"entering\" ? makePathIn(progressInDirection, direction) : makePathOut(progressInDirection, direction);\n const style = useMemo(() => {\n return {\n width: \"100%\",\n height: \"100%\",\n justifyContent: \"center\",\n alignItems: \"center\",\n clipPath: `url(#${clipId})`,\n ...presentationDirection === \"entering\" ? innerEnterStyle : innerExitStyle\n };\n }, [clipId, innerEnterStyle, innerExitStyle, presentationDirection]);\n const outerStyle = useMemo(() => {\n return presentationDirection === \"entering\" ? outerEnterStyle : outerExitStyle;\n }, [outerEnterStyle, outerExitStyle, presentationDirection]);\n const svgStyle = useMemo(() => {\n return {\n width: \"100%\",\n height: \"100%\",\n pointerEvents: \"none\"\n };\n }, []);\n return /* @__PURE__ */ jsxs(AbsoluteFill, {\n style: outerStyle,\n children: [\n /* @__PURE__ */ jsx(AbsoluteFill, {\n style,\n children\n }),\n /* @__PURE__ */ jsx(AbsoluteFill, {\n children: /* @__PURE__ */ jsx(\"svg\", {\n viewBox: \"0 0 1 1\",\n style: svgStyle,\n children: /* @__PURE__ */ jsx(\"defs\", {\n children: /* @__PURE__ */ jsx(\"clipPath\", {\n id: clipId,\n clipPathUnits: \"objectBoundingBox\",\n children: /* @__PURE__ */ jsx(\"path\", {\n d: path,\n fill: \"black\"\n })\n })\n })\n })\n })\n ]\n });\n};\nvar wipe = (props) => {\n return {\n component: WipePresentation,\n props: props ?? {}\n };\n};\nexport {\n wipe\n};\n","// src/presentations/flip.tsx\nimport { useMemo } from \"react\";\nimport { AbsoluteFill, interpolate } from \"remotion\";\nimport { jsx } from \"react/jsx-runtime\";\nvar Flip = ({\n children,\n presentationDirection,\n presentationProgress,\n passedProps: {\n direction = \"from-left\",\n perspective = 1000,\n innerEnterStyle,\n innerExitStyle,\n outerEnterStyle,\n outerExitStyle\n }\n}) => {\n const style = useMemo(() => {\n const startRotationEntering = direction === \"from-right\" || direction === \"from-top\" ? 180 : -180;\n const endRotationEntering = direction === \"from-right\" || direction === \"from-top\" ? -180 : 180;\n const rotation = presentationDirection === \"entering\" ? interpolate(presentationProgress, [0, 1], [startRotationEntering, 0]) : interpolate(presentationProgress, [0, 1], [0, endRotationEntering]);\n const rotateProperty = direction === \"from-top\" || direction === \"from-bottom\" ? \"rotateX\" : \"rotateY\";\n return {\n width: \"100%\",\n height: \"100%\",\n transform: `${rotateProperty}(${rotation}deg)`,\n backfaceVisibility: \"hidden\",\n WebkitBackfaceVisibility: \"hidden\",\n ...presentationDirection === \"entering\" ? innerEnterStyle : innerExitStyle\n };\n }, [\n direction,\n innerEnterStyle,\n innerExitStyle,\n presentationDirection,\n presentationProgress\n ]);\n const outer = useMemo(() => {\n return {\n perspective,\n transformStyle: \"preserve-3d\",\n ...presentationDirection === \"entering\" ? outerEnterStyle : outerExitStyle\n };\n }, [outerEnterStyle, outerExitStyle, perspective, presentationDirection]);\n return /* @__PURE__ */ jsx(AbsoluteFill, {\n style: outer,\n children: /* @__PURE__ */ jsx(AbsoluteFill, {\n style,\n children\n })\n });\n};\nvar flip = (props) => {\n return { component: Flip, props: props ?? {} };\n};\nexport {\n flip\n};\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.cutInstruction = void 0;\nexports.cutCInstruction = cutCInstruction;\nconst cutLInstruction = ({ instruction, lastPoint, progress, }) => {\n const x = lastPoint.x + (instruction.x - lastPoint.x) * progress;\n const y = lastPoint.y + (instruction.y - lastPoint.y) * progress;\n return {\n type: 'L',\n x,\n y,\n };\n};\nfunction interpolatePoint(pA, pB, factor) {\n return {\n x: pA.x + (pB.x - pA.x) * factor,\n y: pA.y + (pB.y - pA.y) * factor,\n };\n}\nfunction cutCInstruction({ progress, lastPoint, instruction, }) {\n // De Casteljau's algorithm for Bezier splitting\n const u = progress;\n // Points of original curve\n const p0 = { x: lastPoint.x, y: lastPoint.y };\n const p1 = { x: instruction.cp1x, y: instruction.cp1y };\n const p2 = { x: instruction.cp2x, y: instruction.cp2y };\n const p3 = { x: instruction.x, y: instruction.y };\n // First level of interpolation\n const p01 = interpolatePoint(p0, p1, u);\n const p12 = interpolatePoint(p1, p2, u);\n const p23 = interpolatePoint(p2, p3, u);\n // Second level of interpolation\n const p012 = interpolatePoint(p01, p12, u);\n const p123 = interpolatePoint(p12, p23, u);\n // Third level of interpolation (this is the mid-point of the curve at u)\n const p0123 = interpolatePoint(p012, p123, u);\n return {\n type: 'C',\n cp1x: p01.x,\n cp1y: p01.y,\n cp2x: p012.x,\n cp2y: p012.y,\n x: p0123.x,\n y: p0123.y,\n };\n}\nconst cutInstruction = ({ instruction, lastPoint, progress, }) => {\n if (instruction.type === 'M') {\n return instruction;\n }\n if (instruction.type === 'L') {\n return cutLInstruction({ instruction, lastPoint, progress });\n }\n if (instruction.type === 'C') {\n return cutCInstruction({ instruction, lastPoint, progress });\n }\n // TODO: Could we cut it as well?\n if (instruction.type === 'Z') {\n return instruction;\n }\n // @ts-expect-error\n throw new TypeError(`${instruction.type} is not supported.`);\n};\nexports.cutInstruction = cutInstruction;\n","\"use strict\";\n// Copied from: https://github.com/rveciana/svg-path-properties\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.binomialCoefficients = exports.cValues = exports.tValues = void 0;\n/* eslint-disable @typescript-eslint/no-loss-of-precision */\n/* eslint-disable no-loss-of-precision */\n// Legendre-Gauss abscissae (xi values, defined at i=n as the roots of the nth order Legendre polynomial Pn(x))\nexports.tValues = [\n [],\n [],\n [\n -0.5773502691896257645091487805019574556476,\n 0.5773502691896257645091487805019574556476,\n ],\n [\n 0, -0.7745966692414833770358530799564799221665,\n 0.7745966692414833770358530799564799221665,\n ],\n [\n -0.3399810435848562648026657591032446872005,\n 0.3399810435848562648026657591032446872005,\n -0.8611363115940525752239464888928095050957,\n 0.8611363115940525752239464888928095050957,\n ],\n [\n 0, -0.5384693101056830910363144207002088049672,\n 0.5384693101056830910363144207002088049672,\n -0.9061798459386639927976268782993929651256,\n 0.9061798459386639927976268782993929651256,\n ],\n [\n 0.6612093864662645136613995950199053470064,\n -0.6612093864662645136613995950199053470064,\n -0.2386191860831969086305017216807119354186,\n 0.2386191860831969086305017216807119354186,\n -0.9324695142031520278123015544939946091347,\n 0.9324695142031520278123015544939946091347,\n ],\n [\n 0, 0.4058451513773971669066064120769614633473,\n -0.4058451513773971669066064120769614633473,\n -0.7415311855993944398638647732807884070741,\n 0.7415311855993944398638647732807884070741,\n -0.9491079123427585245261896840478512624007,\n 0.9491079123427585245261896840478512624007,\n ],\n [\n -0.1834346424956498049394761423601839806667,\n 0.1834346424956498049394761423601839806667,\n -0.5255324099163289858177390491892463490419,\n 0.5255324099163289858177390491892463490419,\n -0.7966664774136267395915539364758304368371,\n 0.7966664774136267395915539364758304368371,\n -0.9602898564975362316835608685694729904282,\n 0.9602898564975362316835608685694729904282,\n ],\n [\n 0, -0.8360311073266357942994297880697348765441,\n 0.8360311073266357942994297880697348765441,\n -0.9681602395076260898355762029036728700494,\n 0.9681602395076260898355762029036728700494,\n -0.3242534234038089290385380146433366085719,\n 0.3242534234038089290385380146433366085719,\n -0.6133714327005903973087020393414741847857,\n 0.6133714327005903973087020393414741847857,\n ],\n [\n -0.1488743389816312108848260011297199846175,\n 0.1488743389816312108848260011297199846175,\n -0.4333953941292471907992659431657841622,\n 0.4333953941292471907992659431657841622,\n -0.6794095682990244062343273651148735757692,\n 0.6794095682990244062343273651148735757692,\n -0.8650633666889845107320966884234930485275,\n 0.8650633666889845107320966884234930485275,\n -0.9739065285171717200779640120844520534282,\n 0.9739065285171717200779640120844520534282,\n ],\n [\n 0, -0.2695431559523449723315319854008615246796,\n 0.2695431559523449723315319854008615246796,\n -0.5190961292068118159257256694586095544802,\n 0.5190961292068118159257256694586095544802,\n -0.7301520055740493240934162520311534580496,\n 0.7301520055740493240934162520311534580496,\n -0.8870625997680952990751577693039272666316,\n 0.8870625997680952990751577693039272666316,\n -0.9782286581460569928039380011228573907714,\n 0.9782286581460569928039380011228573907714,\n ],\n [\n -0.1252334085114689154724413694638531299833,\n 0.1252334085114689154724413694638531299833,\n -0.3678314989981801937526915366437175612563,\n 0.3678314989981801937526915366437175612563,\n -0.587317954286617447296702418940534280369,\n 0.587317954286617447296702418940534280369,\n -0.7699026741943046870368938332128180759849,\n 0.7699026741943046870368938332128180759849,\n -0.9041172563704748566784658661190961925375,\n 0.9041172563704748566784658661190961925375,\n -0.9815606342467192506905490901492808229601,\n 0.9815606342467192506905490901492808229601,\n ],\n [\n 0, -0.2304583159551347940655281210979888352115,\n 0.2304583159551347940655281210979888352115,\n -0.4484927510364468528779128521276398678019,\n 0.4484927510364468528779128521276398678019,\n -0.6423493394403402206439846069955156500716,\n 0.6423493394403402206439846069955156500716,\n -0.8015780907333099127942064895828598903056,\n 0.8015780907333099127942064895828598903056,\n -0.9175983992229779652065478365007195123904,\n 0.9175983992229779652065478365007195123904,\n -0.9841830547185881494728294488071096110649,\n 0.9841830547185881494728294488071096110649,\n ],\n [\n -0.1080549487073436620662446502198347476119,\n 0.1080549487073436620662446502198347476119,\n -0.3191123689278897604356718241684754668342,\n 0.3191123689278897604356718241684754668342,\n -0.5152486363581540919652907185511886623088,\n 0.5152486363581540919652907185511886623088,\n -0.6872929048116854701480198030193341375384,\n 0.6872929048116854701480198030193341375384,\n -0.8272013150697649931897947426503949610397,\n 0.8272013150697649931897947426503949610397,\n -0.928434883663573517336391139377874264477,\n 0.928434883663573517336391139377874264477,\n -0.986283808696812338841597266704052801676,\n 0.986283808696812338841597266704052801676,\n ],\n [\n 0, -0.2011940939974345223006283033945962078128,\n 0.2011940939974345223006283033945962078128,\n -0.3941513470775633698972073709810454683627,\n 0.3941513470775633698972073709810454683627,\n -0.5709721726085388475372267372539106412383,\n 0.5709721726085388475372267372539106412383,\n -0.7244177313601700474161860546139380096308,\n 0.7244177313601700474161860546139380096308,\n -0.8482065834104272162006483207742168513662,\n 0.8482065834104272162006483207742168513662,\n -0.9372733924007059043077589477102094712439,\n 0.9372733924007059043077589477102094712439,\n -0.9879925180204854284895657185866125811469,\n 0.9879925180204854284895657185866125811469,\n ],\n [\n -0.0950125098376374401853193354249580631303,\n 0.0950125098376374401853193354249580631303,\n -0.281603550779258913230460501460496106486,\n 0.281603550779258913230460501460496106486,\n -0.45801677765722738634241944298357757354,\n 0.45801677765722738634241944298357757354,\n -0.6178762444026437484466717640487910189918,\n 0.6178762444026437484466717640487910189918,\n -0.7554044083550030338951011948474422683538,\n 0.7554044083550030338951011948474422683538,\n -0.8656312023878317438804678977123931323873,\n 0.8656312023878317438804678977123931323873,\n -0.9445750230732325760779884155346083450911,\n 0.9445750230732325760779884155346083450911,\n -0.9894009349916499325961541734503326274262,\n 0.9894009349916499325961541734503326274262,\n ],\n [\n 0, -0.1784841814958478558506774936540655574754,\n 0.1784841814958478558506774936540655574754,\n -0.3512317634538763152971855170953460050405,\n 0.3512317634538763152971855170953460050405,\n -0.5126905370864769678862465686295518745829,\n 0.5126905370864769678862465686295518745829,\n -0.6576711592166907658503022166430023351478,\n 0.6576711592166907658503022166430023351478,\n -0.7815140038968014069252300555204760502239,\n 0.7815140038968014069252300555204760502239,\n -0.8802391537269859021229556944881556926234,\n 0.8802391537269859021229556944881556926234,\n -0.9506755217687677612227169578958030214433,\n 0.9506755217687677612227169578958030214433,\n -0.9905754753144173356754340199406652765077,\n 0.9905754753144173356754340199406652765077,\n ],\n [\n -0.0847750130417353012422618529357838117333,\n 0.0847750130417353012422618529357838117333,\n -0.2518862256915055095889728548779112301628,\n 0.2518862256915055095889728548779112301628,\n -0.4117511614628426460359317938330516370789,\n 0.4117511614628426460359317938330516370789,\n -0.5597708310739475346078715485253291369276,\n 0.5597708310739475346078715485253291369276,\n -0.6916870430603532078748910812888483894522,\n 0.6916870430603532078748910812888483894522,\n -0.8037049589725231156824174550145907971032,\n 0.8037049589725231156824174550145907971032,\n -0.8926024664975557392060605911271455154078,\n 0.8926024664975557392060605911271455154078,\n -0.9558239495713977551811958929297763099728,\n 0.9558239495713977551811958929297763099728,\n -0.9915651684209309467300160047061507702525,\n 0.9915651684209309467300160047061507702525,\n ],\n [\n 0, -0.1603586456402253758680961157407435495048,\n 0.1603586456402253758680961157407435495048,\n -0.3165640999636298319901173288498449178922,\n 0.3165640999636298319901173288498449178922,\n -0.4645707413759609457172671481041023679762,\n 0.4645707413759609457172671481041023679762,\n -0.6005453046616810234696381649462392798683,\n 0.6005453046616810234696381649462392798683,\n -0.7209661773352293786170958608237816296571,\n 0.7209661773352293786170958608237816296571,\n -0.8227146565371428249789224867127139017745,\n 0.8227146565371428249789224867127139017745,\n -0.9031559036148179016426609285323124878093,\n 0.9031559036148179016426609285323124878093,\n -0.960208152134830030852778840687651526615,\n 0.960208152134830030852778840687651526615,\n -0.9924068438435844031890176702532604935893,\n 0.9924068438435844031890176702532604935893,\n ],\n [\n -0.0765265211334973337546404093988382110047,\n 0.0765265211334973337546404093988382110047,\n -0.227785851141645078080496195368574624743,\n 0.227785851141645078080496195368574624743,\n -0.3737060887154195606725481770249272373957,\n 0.3737060887154195606725481770249272373957,\n -0.5108670019508270980043640509552509984254,\n 0.5108670019508270980043640509552509984254,\n -0.6360536807265150254528366962262859367433,\n 0.6360536807265150254528366962262859367433,\n -0.7463319064601507926143050703556415903107,\n 0.7463319064601507926143050703556415903107,\n -0.8391169718222188233945290617015206853296,\n 0.8391169718222188233945290617015206853296,\n -0.9122344282513259058677524412032981130491,\n 0.9122344282513259058677524412032981130491,\n -0.963971927277913791267666131197277221912,\n 0.963971927277913791267666131197277221912,\n -0.9931285991850949247861223884713202782226,\n 0.9931285991850949247861223884713202782226,\n ],\n [\n 0, -0.1455618541608950909370309823386863301163,\n 0.1455618541608950909370309823386863301163,\n -0.288021316802401096600792516064600319909,\n 0.288021316802401096600792516064600319909,\n -0.4243421202074387835736688885437880520964,\n 0.4243421202074387835736688885437880520964,\n -0.551618835887219807059018796724313286622,\n 0.551618835887219807059018796724313286622,\n -0.667138804197412319305966669990339162597,\n 0.667138804197412319305966669990339162597,\n -0.7684399634756779086158778513062280348209,\n 0.7684399634756779086158778513062280348209,\n -0.8533633645833172836472506385875676702761,\n 0.8533633645833172836472506385875676702761,\n -0.9200993341504008287901871337149688941591,\n 0.9200993341504008287901871337149688941591,\n -0.9672268385663062943166222149076951614246,\n 0.9672268385663062943166222149076951614246,\n -0.9937521706203895002602420359379409291933,\n 0.9937521706203895002602420359379409291933,\n ],\n [\n -0.0697392733197222212138417961186280818222,\n 0.0697392733197222212138417961186280818222,\n -0.2078604266882212854788465339195457342156,\n 0.2078604266882212854788465339195457342156,\n -0.3419358208920842251581474204273796195591,\n 0.3419358208920842251581474204273796195591,\n -0.4693558379867570264063307109664063460953,\n 0.4693558379867570264063307109664063460953,\n -0.5876404035069115929588769276386473488776,\n 0.5876404035069115929588769276386473488776,\n -0.6944872631866827800506898357622567712673,\n 0.6944872631866827800506898357622567712673,\n -0.7878168059792081620042779554083515213881,\n 0.7878168059792081620042779554083515213881,\n -0.8658125777203001365364256370193787290847,\n 0.8658125777203001365364256370193787290847,\n -0.9269567721871740005206929392590531966353,\n 0.9269567721871740005206929392590531966353,\n -0.9700604978354287271239509867652687108059,\n 0.9700604978354287271239509867652687108059,\n -0.994294585482399292073031421161298980393,\n 0.994294585482399292073031421161298980393,\n ],\n [\n 0, -0.1332568242984661109317426822417661370104,\n 0.1332568242984661109317426822417661370104,\n -0.264135680970344930533869538283309602979,\n 0.264135680970344930533869538283309602979,\n -0.390301038030290831421488872880605458578,\n 0.390301038030290831421488872880605458578,\n -0.5095014778460075496897930478668464305448,\n 0.5095014778460075496897930478668464305448,\n -0.6196098757636461563850973116495956533871,\n 0.6196098757636461563850973116495956533871,\n -0.7186613631319501944616244837486188483299,\n 0.7186613631319501944616244837486188483299,\n -0.8048884016188398921511184069967785579414,\n 0.8048884016188398921511184069967785579414,\n -0.8767523582704416673781568859341456716389,\n 0.8767523582704416673781568859341456716389,\n -0.9329710868260161023491969890384229782357,\n 0.9329710868260161023491969890384229782357,\n -0.9725424712181152319560240768207773751816,\n 0.9725424712181152319560240768207773751816,\n -0.9947693349975521235239257154455743605736,\n 0.9947693349975521235239257154455743605736,\n ],\n [\n -0.0640568928626056260850430826247450385909,\n 0.0640568928626056260850430826247450385909,\n -0.1911188674736163091586398207570696318404,\n 0.1911188674736163091586398207570696318404,\n -0.3150426796961633743867932913198102407864,\n 0.3150426796961633743867932913198102407864,\n -0.4337935076260451384870842319133497124524,\n 0.4337935076260451384870842319133497124524,\n -0.5454214713888395356583756172183723700107,\n 0.5454214713888395356583756172183723700107,\n -0.6480936519369755692524957869107476266696,\n 0.6480936519369755692524957869107476266696,\n -0.7401241915785543642438281030999784255232,\n 0.7401241915785543642438281030999784255232,\n -0.8200019859739029219539498726697452080761,\n 0.8200019859739029219539498726697452080761,\n -0.8864155270044010342131543419821967550873,\n 0.8864155270044010342131543419821967550873,\n -0.9382745520027327585236490017087214496548,\n 0.9382745520027327585236490017087214496548,\n -0.9747285559713094981983919930081690617411,\n 0.9747285559713094981983919930081690617411,\n -0.9951872199970213601799974097007368118745,\n 0.9951872199970213601799974097007368118745,\n ],\n];\n// Legendre-Gauss weights (wi values, defined by a function linked to in the Bezier primer article)\nexports.cValues = [\n [],\n [],\n [1.0, 1.0],\n [\n 0.8888888888888888888888888888888888888888,\n 0.5555555555555555555555555555555555555555,\n 0.5555555555555555555555555555555555555555,\n ],\n [\n 0.6521451548625461426269360507780005927646,\n 0.6521451548625461426269360507780005927646,\n 0.3478548451374538573730639492219994072353,\n 0.3478548451374538573730639492219994072353,\n ],\n [\n 0.5688888888888888888888888888888888888888,\n 0.4786286704993664680412915148356381929122,\n 0.4786286704993664680412915148356381929122,\n 0.2369268850561890875142640407199173626432,\n 0.2369268850561890875142640407199173626432,\n ],\n [\n 0.3607615730481386075698335138377161116615,\n 0.3607615730481386075698335138377161116615,\n 0.4679139345726910473898703439895509948116,\n 0.4679139345726910473898703439895509948116,\n 0.1713244923791703450402961421727328935268,\n 0.1713244923791703450402961421727328935268,\n ],\n [\n 0.4179591836734693877551020408163265306122,\n 0.3818300505051189449503697754889751338783,\n 0.3818300505051189449503697754889751338783,\n 0.2797053914892766679014677714237795824869,\n 0.2797053914892766679014677714237795824869,\n 0.1294849661688696932706114326790820183285,\n 0.1294849661688696932706114326790820183285,\n ],\n [\n 0.3626837833783619829651504492771956121941,\n 0.3626837833783619829651504492771956121941,\n 0.3137066458778872873379622019866013132603,\n 0.3137066458778872873379622019866013132603,\n 0.2223810344533744705443559944262408844301,\n 0.2223810344533744705443559944262408844301,\n 0.1012285362903762591525313543099621901153,\n 0.1012285362903762591525313543099621901153,\n ],\n [\n 0.3302393550012597631645250692869740488788,\n 0.1806481606948574040584720312429128095143,\n 0.1806481606948574040584720312429128095143,\n 0.0812743883615744119718921581105236506756,\n 0.0812743883615744119718921581105236506756,\n 0.3123470770400028400686304065844436655987,\n 0.3123470770400028400686304065844436655987,\n 0.2606106964029354623187428694186328497718,\n 0.2606106964029354623187428694186328497718,\n ],\n [\n 0.295524224714752870173892994651338329421,\n 0.295524224714752870173892994651338329421,\n 0.2692667193099963550912269215694693528597,\n 0.2692667193099963550912269215694693528597,\n 0.2190863625159820439955349342281631924587,\n 0.2190863625159820439955349342281631924587,\n 0.1494513491505805931457763396576973324025,\n 0.1494513491505805931457763396576973324025,\n 0.0666713443086881375935688098933317928578,\n 0.0666713443086881375935688098933317928578,\n ],\n [\n 0.272925086777900630714483528336342189156,\n 0.2628045445102466621806888698905091953727,\n 0.2628045445102466621806888698905091953727,\n 0.2331937645919904799185237048431751394317,\n 0.2331937645919904799185237048431751394317,\n 0.1862902109277342514260976414316558916912,\n 0.1862902109277342514260976414316558916912,\n 0.1255803694649046246346942992239401001976,\n 0.1255803694649046246346942992239401001976,\n 0.0556685671161736664827537204425485787285,\n 0.0556685671161736664827537204425485787285,\n ],\n [\n 0.2491470458134027850005624360429512108304,\n 0.2491470458134027850005624360429512108304,\n 0.2334925365383548087608498989248780562594,\n 0.2334925365383548087608498989248780562594,\n 0.2031674267230659217490644558097983765065,\n 0.2031674267230659217490644558097983765065,\n 0.160078328543346226334652529543359071872,\n 0.160078328543346226334652529543359071872,\n 0.1069393259953184309602547181939962242145,\n 0.1069393259953184309602547181939962242145,\n 0.047175336386511827194615961485017060317,\n 0.047175336386511827194615961485017060317,\n ],\n [\n 0.2325515532308739101945895152688359481566,\n 0.2262831802628972384120901860397766184347,\n 0.2262831802628972384120901860397766184347,\n 0.2078160475368885023125232193060527633865,\n 0.2078160475368885023125232193060527633865,\n 0.1781459807619457382800466919960979955128,\n 0.1781459807619457382800466919960979955128,\n 0.1388735102197872384636017768688714676218,\n 0.1388735102197872384636017768688714676218,\n 0.0921214998377284479144217759537971209236,\n 0.0921214998377284479144217759537971209236,\n 0.0404840047653158795200215922009860600419,\n 0.0404840047653158795200215922009860600419,\n ],\n [\n 0.2152638534631577901958764433162600352749,\n 0.2152638534631577901958764433162600352749,\n 0.2051984637212956039659240656612180557103,\n 0.2051984637212956039659240656612180557103,\n 0.1855383974779378137417165901251570362489,\n 0.1855383974779378137417165901251570362489,\n 0.1572031671581935345696019386238421566056,\n 0.1572031671581935345696019386238421566056,\n 0.1215185706879031846894148090724766259566,\n 0.1215185706879031846894148090724766259566,\n 0.0801580871597602098056332770628543095836,\n 0.0801580871597602098056332770628543095836,\n 0.0351194603317518630318328761381917806197,\n 0.0351194603317518630318328761381917806197,\n ],\n [\n 0.2025782419255612728806201999675193148386,\n 0.1984314853271115764561183264438393248186,\n 0.1984314853271115764561183264438393248186,\n 0.1861610000155622110268005618664228245062,\n 0.1861610000155622110268005618664228245062,\n 0.1662692058169939335532008604812088111309,\n 0.1662692058169939335532008604812088111309,\n 0.1395706779261543144478047945110283225208,\n 0.1395706779261543144478047945110283225208,\n 0.1071592204671719350118695466858693034155,\n 0.1071592204671719350118695466858693034155,\n 0.0703660474881081247092674164506673384667,\n 0.0703660474881081247092674164506673384667,\n 0.0307532419961172683546283935772044177217,\n 0.0307532419961172683546283935772044177217,\n ],\n [\n 0.1894506104550684962853967232082831051469,\n 0.1894506104550684962853967232082831051469,\n 0.1826034150449235888667636679692199393835,\n 0.1826034150449235888667636679692199393835,\n 0.1691565193950025381893120790303599622116,\n 0.1691565193950025381893120790303599622116,\n 0.1495959888165767320815017305474785489704,\n 0.1495959888165767320815017305474785489704,\n 0.1246289712555338720524762821920164201448,\n 0.1246289712555338720524762821920164201448,\n 0.0951585116824927848099251076022462263552,\n 0.0951585116824927848099251076022462263552,\n 0.0622535239386478928628438369943776942749,\n 0.0622535239386478928628438369943776942749,\n 0.0271524594117540948517805724560181035122,\n 0.0271524594117540948517805724560181035122,\n ],\n [\n 0.1794464703562065254582656442618856214487,\n 0.1765627053669926463252709901131972391509,\n 0.1765627053669926463252709901131972391509,\n 0.1680041021564500445099706637883231550211,\n 0.1680041021564500445099706637883231550211,\n 0.1540457610768102880814315948019586119404,\n 0.1540457610768102880814315948019586119404,\n 0.1351363684685254732863199817023501973721,\n 0.1351363684685254732863199817023501973721,\n 0.1118838471934039710947883856263559267358,\n 0.1118838471934039710947883856263559267358,\n 0.0850361483171791808835353701910620738504,\n 0.0850361483171791808835353701910620738504,\n 0.0554595293739872011294401653582446605128,\n 0.0554595293739872011294401653582446605128,\n 0.0241483028685479319601100262875653246916,\n 0.0241483028685479319601100262875653246916,\n ],\n [\n 0.1691423829631435918406564701349866103341,\n 0.1691423829631435918406564701349866103341,\n 0.1642764837458327229860537764659275904123,\n 0.1642764837458327229860537764659275904123,\n 0.1546846751262652449254180038363747721932,\n 0.1546846751262652449254180038363747721932,\n 0.1406429146706506512047313037519472280955,\n 0.1406429146706506512047313037519472280955,\n 0.1225552067114784601845191268002015552281,\n 0.1225552067114784601845191268002015552281,\n 0.1009420441062871655628139849248346070628,\n 0.1009420441062871655628139849248346070628,\n 0.0764257302548890565291296776166365256053,\n 0.0764257302548890565291296776166365256053,\n 0.0497145488949697964533349462026386416808,\n 0.0497145488949697964533349462026386416808,\n 0.0216160135264833103133427102664524693876,\n 0.0216160135264833103133427102664524693876,\n ],\n [\n 0.1610544498487836959791636253209167350399,\n 0.1589688433939543476499564394650472016787,\n 0.1589688433939543476499564394650472016787,\n 0.152766042065859666778855400897662998461,\n 0.152766042065859666778855400897662998461,\n 0.1426067021736066117757461094419029724756,\n 0.1426067021736066117757461094419029724756,\n 0.1287539625393362276755157848568771170558,\n 0.1287539625393362276755157848568771170558,\n 0.1115666455473339947160239016817659974813,\n 0.1115666455473339947160239016817659974813,\n 0.0914900216224499994644620941238396526609,\n 0.0914900216224499994644620941238396526609,\n 0.0690445427376412265807082580060130449618,\n 0.0690445427376412265807082580060130449618,\n 0.0448142267656996003328381574019942119517,\n 0.0448142267656996003328381574019942119517,\n 0.0194617882297264770363120414644384357529,\n 0.0194617882297264770363120414644384357529,\n ],\n [\n 0.1527533871307258506980843319550975934919,\n 0.1527533871307258506980843319550975934919,\n 0.1491729864726037467878287370019694366926,\n 0.1491729864726037467878287370019694366926,\n 0.1420961093183820513292983250671649330345,\n 0.1420961093183820513292983250671649330345,\n 0.1316886384491766268984944997481631349161,\n 0.1316886384491766268984944997481631349161,\n 0.118194531961518417312377377711382287005,\n 0.118194531961518417312377377711382287005,\n 0.1019301198172404350367501354803498761666,\n 0.1019301198172404350367501354803498761666,\n 0.0832767415767047487247581432220462061001,\n 0.0832767415767047487247581432220462061001,\n 0.0626720483341090635695065351870416063516,\n 0.0626720483341090635695065351870416063516,\n 0.040601429800386941331039952274932109879,\n 0.040601429800386941331039952274932109879,\n 0.0176140071391521183118619623518528163621,\n 0.0176140071391521183118619623518528163621,\n ],\n [\n 0.1460811336496904271919851476833711882448,\n 0.1445244039899700590638271665537525436099,\n 0.1445244039899700590638271665537525436099,\n 0.1398873947910731547221334238675831108927,\n 0.1398873947910731547221334238675831108927,\n 0.132268938633337461781052574496775604329,\n 0.132268938633337461781052574496775604329,\n 0.1218314160537285341953671771257335983563,\n 0.1218314160537285341953671771257335983563,\n 0.1087972991671483776634745780701056420336,\n 0.1087972991671483776634745780701056420336,\n 0.0934444234560338615532897411139320884835,\n 0.0934444234560338615532897411139320884835,\n 0.0761001136283793020170516533001831792261,\n 0.0761001136283793020170516533001831792261,\n 0.0571344254268572082836358264724479574912,\n 0.0571344254268572082836358264724479574912,\n 0.0369537897708524937999506682993296661889,\n 0.0369537897708524937999506682993296661889,\n 0.0160172282577743333242246168584710152658,\n 0.0160172282577743333242246168584710152658,\n ],\n [\n 0.1392518728556319933754102483418099578739,\n 0.1392518728556319933754102483418099578739,\n 0.1365414983460151713525738312315173965863,\n 0.1365414983460151713525738312315173965863,\n 0.1311735047870623707329649925303074458757,\n 0.1311735047870623707329649925303074458757,\n 0.1232523768105124242855609861548144719594,\n 0.1232523768105124242855609861548144719594,\n 0.1129322960805392183934006074217843191142,\n 0.1129322960805392183934006074217843191142,\n 0.1004141444428809649320788378305362823508,\n 0.1004141444428809649320788378305362823508,\n 0.0859416062170677274144436813727028661891,\n 0.0859416062170677274144436813727028661891,\n 0.0697964684245204880949614189302176573987,\n 0.0697964684245204880949614189302176573987,\n 0.0522933351526832859403120512732112561121,\n 0.0522933351526832859403120512732112561121,\n 0.0337749015848141547933022468659129013491,\n 0.0337749015848141547933022468659129013491,\n 0.0146279952982722006849910980471854451902,\n 0.0146279952982722006849910980471854451902,\n ],\n [\n 0.1336545721861061753514571105458443385831,\n 0.132462039404696617371642464703316925805,\n 0.132462039404696617371642464703316925805,\n 0.1289057221880821499785953393997936532597,\n 0.1289057221880821499785953393997936532597,\n 0.1230490843067295304675784006720096548158,\n 0.1230490843067295304675784006720096548158,\n 0.1149966402224113649416435129339613014914,\n 0.1149966402224113649416435129339613014914,\n 0.1048920914645414100740861850147438548584,\n 0.1048920914645414100740861850147438548584,\n 0.0929157660600351474770186173697646486034,\n 0.0929157660600351474770186173697646486034,\n 0.0792814117767189549228925247420432269137,\n 0.0792814117767189549228925247420432269137,\n 0.0642324214085258521271696151589109980391,\n 0.0642324214085258521271696151589109980391,\n 0.0480376717310846685716410716320339965612,\n 0.0480376717310846685716410716320339965612,\n 0.0309880058569794443106942196418845053837,\n 0.0309880058569794443106942196418845053837,\n 0.0134118594871417720813094934586150649766,\n 0.0134118594871417720813094934586150649766,\n ],\n [\n 0.1279381953467521569740561652246953718517,\n 0.1279381953467521569740561652246953718517,\n 0.1258374563468282961213753825111836887264,\n 0.1258374563468282961213753825111836887264,\n 0.121670472927803391204463153476262425607,\n 0.121670472927803391204463153476262425607,\n 0.1155056680537256013533444839067835598622,\n 0.1155056680537256013533444839067835598622,\n 0.1074442701159656347825773424466062227946,\n 0.1074442701159656347825773424466062227946,\n 0.0976186521041138882698806644642471544279,\n 0.0976186521041138882698806644642471544279,\n 0.086190161531953275917185202983742667185,\n 0.086190161531953275917185202983742667185,\n 0.0733464814110803057340336152531165181193,\n 0.0733464814110803057340336152531165181193,\n 0.0592985849154367807463677585001085845412,\n 0.0592985849154367807463677585001085845412,\n 0.0442774388174198061686027482113382288593,\n 0.0442774388174198061686027482113382288593,\n 0.0285313886289336631813078159518782864491,\n 0.0285313886289336631813078159518782864491,\n 0.0123412297999871995468056670700372915759,\n 0.0123412297999871995468056670700372915759,\n ],\n];\n// LUT for binomial coefficient arrays per curve order 'n'\nexports.binomialCoefficients = [[1], [1, 1], [1, 2, 1], [1, 3, 3, 1]];\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.t2length = exports.quadraticDerivative = exports.getQuadraticArcLength = exports.cubicDerivative = exports.quadraticPoint = exports.getCubicArcLength = exports.cubicPoint = void 0;\nconst bezier_values_1 = require(\"./bezier-values\");\nconst cubicPoint = (xs, ys, t) => {\n const x = (1 - t) * (1 - t) * (1 - t) * xs[0] +\n 3 * (1 - t) * (1 - t) * t * xs[1] +\n 3 * (1 - t) * t * t * xs[2] +\n t * t * t * xs[3];\n const y = (1 - t) * (1 - t) * (1 - t) * ys[0] +\n 3 * (1 - t) * (1 - t) * t * ys[1] +\n 3 * (1 - t) * t * t * ys[2] +\n t * t * t * ys[3];\n return { x, y };\n};\nexports.cubicPoint = cubicPoint;\n/**\n * Compute the curve derivative (hodograph) at t.\n */\nconst getDerivative = (derivative, t, vs) => {\n // the derivative of any 't'-less function is zero.\n const n = vs.length - 1;\n let value;\n if (n === 0) {\n return 0;\n }\n // direct values? compute!\n if (derivative === 0) {\n value = 0;\n for (let k = 0; k <= n; k++) {\n value += bezier_values_1.binomialCoefficients[n][k] * (1 - t) ** (n - k) * t ** k * vs[k];\n }\n return value;\n }\n // Still some derivative? go down one order, then try\n // for the lower order curve's.\n const _vs = new Array(n);\n for (let k = 0; k < n; k++) {\n _vs[k] = n * (vs[k + 1] - vs[k]);\n }\n return getDerivative(derivative - 1, t, _vs);\n};\nfunction bFunc(xs, ys, t) {\n const xbase = getDerivative(1, t, xs);\n const ybase = getDerivative(1, t, ys);\n const combined = xbase * xbase + ybase * ybase;\n return Math.sqrt(combined);\n}\nconst getCubicArcLength = ({ sx, sy, t, }) => {\n let correctedT;\n const n = 20;\n const z = t / 2;\n let sum = 0;\n for (let i = 0; i < n; i++) {\n correctedT = z * bezier_values_1.tValues[n][i] + z;\n sum += bezier_values_1.cValues[n][i] * bFunc(sx, sy, correctedT);\n }\n return z * sum;\n};\nexports.getCubicArcLength = getCubicArcLength;\nconst quadraticPoint = (xs, ys, t) => {\n const x = (1 - t) * (1 - t) * xs[0] + 2 * (1 - t) * t * xs[1] + t * t * xs[2];\n const y = (1 - t) * (1 - t) * ys[0] + 2 * (1 - t) * t * ys[1] + t * t * ys[2];\n return { x, y };\n};\nexports.quadraticPoint = quadraticPoint;\nconst cubicDerivative = (xs, ys, t) => {\n const derivative = (0, exports.quadraticPoint)([3 * (xs[1] - xs[0]), 3 * (xs[2] - xs[1]), 3 * (xs[3] - xs[2])], [3 * (ys[1] - ys[0]), 3 * (ys[2] - ys[1]), 3 * (ys[3] - ys[2])], t);\n return derivative;\n};\nexports.cubicDerivative = cubicDerivative;\nconst getQuadraticArcLength = (xs, ys, t) => {\n if (t === undefined) {\n t = 1;\n }\n const ax = xs[0] - 2 * xs[1] + xs[2];\n const ay = ys[0] - 2 * ys[1] + ys[2];\n const bx = 2 * xs[1] - 2 * xs[0];\n const by = 2 * ys[1] - 2 * ys[0];\n const A = 4 * (ax * ax + ay * ay);\n const B = 4 * (ax * bx + ay * by);\n const C = bx * bx + by * by;\n if (A === 0) {\n return t * Math.sqrt((xs[2] - xs[0]) ** 2 + (ys[2] - ys[0]) ** 2);\n }\n const b = B / (2 * A);\n const c = C / A;\n const u = t + b;\n const k = c - b * b;\n const uuk = u * u + k > 0 ? Math.sqrt(u * u + k) : 0;\n const bbk = b * b + k > 0 ? Math.sqrt(b * b + k) : 0;\n const term = b + Math.sqrt(b * b + k) === 0\n ? 0\n : k * Math.log(Math.abs((u + uuk) / (b + bbk)));\n return (Math.sqrt(A) / 2) * (u * uuk - b * bbk + term);\n};\nexports.getQuadraticArcLength = getQuadraticArcLength;\nconst quadraticDerivative = (xs, ys, t) => {\n return {\n x: (1 - t) * 2 * (xs[1] - xs[0]) + t * 2 * (xs[2] - xs[1]),\n y: (1 - t) * 2 * (ys[1] - ys[0]) + t * 2 * (ys[2] - ys[1]),\n };\n};\nexports.quadraticDerivative = quadraticDerivative;\nconst t2length = ({ length, totalLength, func, }) => {\n let error = 1;\n let t = length / totalLength;\n let step = (length - func(t)) / totalLength;\n let numIterations = 0;\n while (error > 0.001) {\n const increasedTLength = func(t + step);\n const increasedTError = Math.abs(length - increasedTLength) / totalLength;\n if (increasedTError < error) {\n error = increasedTError;\n t += step;\n }\n else {\n const decreasedTLength = func(t - step);\n const decreasedTError = Math.abs(length - decreasedTLength) / totalLength;\n if (decreasedTError < error) {\n error = decreasedTError;\n t -= step;\n }\n else {\n step /= 2;\n }\n }\n numIterations++;\n if (numIterations > 500) {\n break;\n }\n }\n return t;\n};\nexports.t2length = t2length;\n","\"use strict\";\n// Copied from: https://github.com/rveciana/svg-path-properties\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.makeCubic = exports.makeQuadratic = void 0;\nconst bezier_functions_1 = require(\"./bezier-functions\");\nconst makeQuadratic = ({ startX, startY, cpx, cpy, x, y, }) => {\n const a = { x: startX, y: startY };\n const b = { x: cpx, y: cpy };\n const c = { x, y };\n const length = (0, bezier_functions_1.getQuadraticArcLength)([a.x, b.x, c.x, 0], [a.y, b.y, c.y, 0], 1);\n const getTotalLength = () => {\n return length;\n };\n const getPointAtLength = (len) => {\n const xs = [a.x, b.x, c.x, 0];\n const xy = [a.y, b.y, c.y, 0];\n const t = (0, bezier_functions_1.t2length)({\n length: len,\n totalLength: length,\n func: (i) => (0, bezier_functions_1.getQuadraticArcLength)(xs, xy, i),\n });\n return (0, bezier_functions_1.quadraticPoint)(xs, xy, t);\n };\n const getTangentAtLength = (len) => {\n const xs = [a.x, b.x, c.x, 0];\n const xy = [a.y, b.y, c.y, 0];\n const t = (0, bezier_functions_1.t2length)({\n length: len,\n totalLength: length,\n func: (i) => (0, bezier_functions_1.getQuadraticArcLength)(xs, xy, i),\n });\n const derivative = (0, bezier_functions_1.quadraticDerivative)(xs, xy, t);\n const mdl = Math.sqrt(derivative.x * derivative.x + derivative.y * derivative.y);\n let tangent;\n if (mdl > 0) {\n tangent = { x: derivative.x / mdl, y: derivative.y / mdl };\n }\n else {\n tangent = { x: 0, y: 0 };\n }\n return tangent;\n };\n const getC = () => {\n return c;\n };\n return {\n getPointAtLength,\n getTangentAtLength,\n getTotalLength,\n getC,\n type: 'quadratic-bezier',\n getD: () => ({ x: 0, y: 0 }),\n };\n};\nexports.makeQuadratic = makeQuadratic;\nconst makeCubic = ({ startX, startY, cp1x, cp1y, cp2x, cp2y, x, y, }) => {\n const a = { x: startX, y: startY };\n const b = { x: cp1x, y: cp1y };\n const c = { x: cp2x, y: cp2y };\n const d = { x, y };\n const length = (0, bezier_functions_1.getCubicArcLength)({\n sx: [a.x, b.x, c.x, d.x],\n sy: [a.y, b.y, c.y, d.y],\n t: 1,\n });\n const getTotalLength = () => {\n return length;\n };\n const getPointAtLength = (len) => {\n const sx = [a.x, b.x, c.x, d.x];\n const sy = [a.y, b.y, c.y, d.y];\n const t = (0, bezier_functions_1.t2length)({\n length: len,\n totalLength: length,\n func: (i) => {\n return (0, bezier_functions_1.getCubicArcLength)({ sx, sy, t: i });\n },\n });\n return (0, bezier_functions_1.cubicPoint)(sx, sy, t);\n };\n const getTangentAtLength = (len) => {\n const xs = [a.x, b.x, c.x, d.x];\n const xy = [a.y, b.y, c.y, d.y];\n const t = (0, bezier_functions_1.t2length)({\n length: len,\n totalLength: length,\n func: (i) => (0, bezier_functions_1.getCubicArcLength)({ sx: xs, sy: xy, t: i }),\n });\n const derivative = (0, bezier_functions_1.cubicDerivative)(xs, xy, t);\n const mdl = Math.sqrt(derivative.x * derivative.x + derivative.y * derivative.y);\n let tangent;\n if (mdl > 0) {\n tangent = { x: derivative.x / mdl, y: derivative.y / mdl };\n }\n else {\n tangent = { x: 0, y: 0 };\n }\n return tangent;\n };\n const getC = () => {\n return c;\n };\n const getD = () => {\n return d;\n };\n return {\n getPointAtLength,\n getTangentAtLength,\n getTotalLength,\n getC,\n getD,\n type: 'cubic-bezier',\n };\n};\nexports.makeCubic = makeCubic;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.makeLinearPosition = void 0;\nconst makeLinearPosition = ({ x0, x1, y0, y1, }) => {\n return {\n getTotalLength: () => {\n return Math.sqrt((x0 - x1) ** 2 + (y0 - y1) ** 2);\n },\n getPointAtLength: (pos) => {\n let fraction = pos / Math.sqrt((x0 - x1) ** 2 + (y0 - y1) ** 2);\n fraction = Number.isNaN(fraction) ? 1 : fraction;\n const newDeltaX = (x1 - x0) * fraction;\n const newDeltaY = (y1 - y0) * fraction;\n return { x: x0 + newDeltaX, y: y0 + newDeltaY };\n },\n getTangentAtLength: () => {\n const module = Math.sqrt((x1 - x0) * (x1 - x0) + (y1 - y0) * (y1 - y0));\n return { x: (x1 - x0) / module, y: (y1 - y0) / module };\n },\n type: 'linear',\n };\n};\nexports.makeLinearPosition = makeLinearPosition;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.conductAnalysis = void 0;\nconst bezier_1 = require(\"./bezier\");\nconst linear_1 = require(\"./linear\");\nconst conductAnalysis = (instructions) => {\n let currentPoint = { x: 0, y: 0 };\n let moveStart = { x: 0, y: 0 };\n const segments = [];\n for (let i = 0; i < instructions.length; i++) {\n const instruction = instructions[i];\n // moveTo\n if (instruction.type === 'M') {\n currentPoint = { x: instruction.x, y: instruction.y };\n moveStart = { x: currentPoint.x, y: currentPoint.y };\n segments.push({\n startPoint: { x: instruction.x, y: instruction.y },\n instructionsAndInfo: [\n {\n instruction,\n function: null,\n length: 0,\n startPoint: currentPoint,\n },\n ],\n });\n }\n if (instruction.type === 'L') {\n if (segments.length > 0) {\n const length = Math.sqrt((currentPoint.x - instruction.x) ** 2 +\n (currentPoint.y - instruction.y) ** 2);\n segments[segments.length - 1].instructionsAndInfo.push({\n instruction,\n length,\n function: (0, linear_1.makeLinearPosition)({\n x0: currentPoint.x,\n x1: instruction.x,\n y0: currentPoint.y,\n y1: instruction.y,\n }),\n startPoint: currentPoint,\n });\n }\n currentPoint = { x: instruction.x, y: instruction.y };\n }\n if (instruction.type === 'Z') {\n if (segments.length > 0) {\n const length = Math.sqrt((segments[segments.length - 1].startPoint.x - currentPoint.x) ** 2 +\n (segments[segments.length - 1].startPoint.y - currentPoint.y) ** 2);\n segments[segments.length - 1].instructionsAndInfo.push({\n instruction,\n function: (0, linear_1.makeLinearPosition)({\n x0: currentPoint.x,\n x1: moveStart.x,\n y0: currentPoint.y,\n y1: moveStart.y,\n }),\n length,\n startPoint: { ...currentPoint },\n });\n }\n currentPoint = { x: moveStart.x, y: moveStart.y };\n }\n if (instruction.type === 'C') {\n const curve = (0, bezier_1.makeCubic)({\n startX: currentPoint.x,\n startY: currentPoint.y,\n cp1x: instruction.cp1x,\n cp1y: instruction.cp1y,\n cp2x: instruction.cp2x,\n cp2y: instruction.cp2y,\n x: instruction.x,\n y: instruction.y,\n });\n const length = curve.getTotalLength();\n if (segments.length > 0) {\n segments[segments.length - 1].instructionsAndInfo.push({\n instruction,\n length,\n function: curve,\n startPoint: { ...currentPoint },\n });\n }\n currentPoint = { x: instruction.x, y: instruction.y };\n }\n }\n return segments;\n};\nexports.conductAnalysis = conductAnalysis;\n","\"use strict\";\n// Copied from: https://github.com/rveciana/svg-path-properties\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.parsePath = void 0;\nconst length = {\n a: 7,\n A: 7,\n C: 6,\n c: 6,\n H: 1,\n h: 1,\n L: 2,\n l: 2,\n M: 2,\n m: 2,\n Q: 4,\n q: 4,\n S: 4,\n s: 4,\n T: 2,\n t: 2,\n V: 1,\n v: 1,\n Z: 0,\n z: 0,\n};\nconst chunkExact = (array, instruction) => {\n const chunks = [];\n const expectedSize = length[instruction];\n if (array.length % expectedSize !== 0) {\n throw new Error(`Expected number of arguments of SVG instruction \"${instruction} ${array.join(' ')}\" to be a multiple of ${expectedSize}`);\n }\n for (let i = 0; i < array.length; i += expectedSize) {\n chunks.push(array.slice(i, i + expectedSize));\n }\n return chunks;\n};\nconst makeInstructions = (arr, instruction, cb) => {\n return chunkExact(arr, instruction).map((args) => {\n return cb(args);\n });\n};\nconst segmentRegExp = /([astvzqmhlc])([^astvzqmhlc]*)/gi;\nconst numberRegExp = /-?[0-9]*\\.?[0-9]+(?:e[-+]?\\d+)?/gi;\nconst parseValues = (args, instructionType) => {\n const numbers = args.match(numberRegExp);\n if (!numbers) {\n if (instructionType === 'Z' || instructionType === 'z') {\n return [];\n }\n throw new Error(`Malformed path data: ${instructionType} was expected to have numbers afterwards`);\n }\n const expectedArguments = length[instructionType];\n if (numbers.length % expectedArguments !== 0) {\n throw new Error(`Malformed path data: ${instructionType} was expected to have a multiple of ${expectedArguments} numbers, but got \"${instructionType} ${numbers.join(' ')} instead\"`);\n }\n return numbers.map(Number);\n};\n/**\n * @description Parses an SVG string path into an array of Instruction's.\n * @param {string} path\n * @returns an array of objects containing the Instructions\n * @see [Documentation](https://www.remotion.dev/docs/paths/parse-path)\n */\nconst parsePath = (path) => {\n if (!path) {\n throw new Error('No path provided');\n }\n const segments = path.match(segmentRegExp);\n if (!segments) {\n throw new Error(`No path elements found in string ${path}`);\n }\n return segments\n .map((segmentString) => {\n const command = segmentString.charAt(0);\n const args = parseValues(segmentString.substring(1), command);\n // overloaded moveTo\n if (command === 'M' && args.length > 2) {\n const segmentsArray = [];\n segmentsArray.push({\n type: command,\n x: args[0],\n y: args[1],\n });\n segmentsArray.push(...makeInstructions(args.slice(2), 'L', (numbers) => ({\n type: 'L',\n x: numbers[0],\n y: numbers[1],\n })));\n return segmentsArray;\n }\n if (command === 'm' && args.length > 2) {\n const segmentsArray = [];\n segmentsArray.push({\n type: command,\n dx: args[0],\n dy: args[1],\n });\n segmentsArray.push(...makeInstructions(args.slice(2), 'l', (numbers) => ({\n type: 'l',\n dx: numbers[0],\n dy: numbers[1],\n })));\n return segmentsArray;\n }\n if (command === 'Z' || command === 'z') {\n return [\n {\n type: 'Z',\n },\n ];\n }\n if (command === 'A') {\n return makeInstructions(args, command, (numbers) => ({\n type: command,\n rx: numbers[0],\n ry: numbers[1],\n xAxisRotation: numbers[2],\n largeArcFlag: numbers[3] === 1,\n sweepFlag: numbers[4] === 1,\n x: numbers[5],\n y: numbers[6],\n }));\n }\n if (command === 'a') {\n return makeInstructions(args, command, (numbers) => ({\n type: command,\n rx: numbers[0],\n ry: numbers[1],\n xAxisRotation: numbers[2],\n largeArcFlag: numbers[3] === 1,\n sweepFlag: numbers[4] === 1,\n dx: numbers[5],\n dy: numbers[6],\n }));\n }\n if (command === 'C') {\n return makeInstructions(args, command, (numbers) => ({\n type: command,\n cp1x: numbers[0],\n cp1y: numbers[1],\n cp2x: numbers[2],\n cp2y: numbers[3],\n x: numbers[4],\n y: numbers[5],\n }));\n }\n if (command === 'c') {\n return makeInstructions(args, command, (numbers) => ({\n type: command,\n cp1dx: numbers[0],\n cp1dy: numbers[1],\n cp2dx: numbers[2],\n cp2dy: numbers[3],\n dx: numbers[4],\n dy: numbers[5],\n }));\n }\n if (command === 'S') {\n return makeInstructions(args, command, (numbers) => ({\n type: command,\n cpx: numbers[0],\n cpy: numbers[1],\n x: numbers[2],\n y: numbers[3],\n }));\n }\n if (command === 's') {\n return makeInstructions(args, command, (numbers) => ({\n type: command,\n cpdx: numbers[0],\n cpdy: numbers[1],\n dx: numbers[2],\n dy: numbers[3],\n }));\n }\n if (command === 'H') {\n return makeInstructions(args, command, (numbers) => ({\n type: command,\n x: numbers[0],\n }));\n }\n if (command === 'h') {\n return makeInstructions(args, command, (numbers) => ({\n type: command,\n dx: numbers[0],\n }));\n }\n if (command === 'V') {\n return makeInstructions(args, command, (numbers) => ({\n type: command,\n y: numbers[0],\n }));\n }\n if (command === 'v') {\n return makeInstructions(args, command, (numbers) => ({\n type: command,\n dy: numbers[0],\n }));\n }\n if (command === 'L') {\n return makeInstructions(args, command, (numbers) => ({\n type: command,\n x: numbers[0],\n y: numbers[1],\n }));\n }\n if (command === 'M') {\n return makeInstructions(args, command, (numbers) => ({\n type: command,\n x: numbers[0],\n y: numbers[1],\n }));\n }\n if (command === 'm') {\n return makeInstructions(args, command, (numbers) => ({\n type: command,\n dx: numbers[0],\n dy: numbers[1],\n }));\n }\n if (command === 'l') {\n return makeInstructions(args, command, (numbers) => ({\n type: command,\n dx: numbers[0],\n dy: numbers[1],\n }));\n }\n if (command === 'Q') {\n return makeInstructions(args, command, (numbers) => ({\n type: command,\n cpx: numbers[0],\n cpy: numbers[1],\n x: numbers[2],\n y: numbers[3],\n }));\n }\n if (command === 'q') {\n return makeInstructions(args, command, (numbers) => ({\n type: command,\n cpdx: numbers[0],\n cpdy: numbers[1],\n dx: numbers[2],\n dy: numbers[3],\n }));\n }\n if (command === 'T') {\n return makeInstructions(args, command, (numbers) => ({\n type: command,\n x: numbers[0],\n y: numbers[1],\n }));\n }\n if (command === 't') {\n return makeInstructions(args, command, (numbers) => ({\n type: command,\n dx: numbers[0],\n dy: numbers[1],\n }));\n }\n throw new Error(`Invalid path element ${segmentString}`);\n }, [])\n .flat(1);\n};\nexports.parsePath = parsePath;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.convertQToCInstruction = void 0;\nconst convertQToCInstruction = (instruction, startPoint) => {\n const cp1x = startPoint.x + (2 / 3) * (instruction.cpx - startPoint.x);\n const cp1y = startPoint.y + (2 / 3) * (instruction.cpy - startPoint.y);\n const cp2x = instruction.x + (2 / 3) * (instruction.cpx - instruction.x);\n const cp2y = instruction.y + (2 / 3) * (instruction.cpy - instruction.y);\n return {\n type: 'C',\n cp1x,\n cp1y,\n cp2x,\n cp2y,\n x: instruction.x,\n y: instruction.y,\n };\n};\nexports.convertQToCInstruction = convertQToCInstruction;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.iterateOverSegments = void 0;\nconst iterateOverSegments = ({ segments, iterate, }) => {\n let x = 0;\n let y = 0;\n let initialX = 0;\n let initialY = 0;\n let cpX = null;\n let cpY = null;\n const newSegments = segments.map((s, i) => {\n var _a;\n const newSeg = iterate({\n segment: s,\n x,\n y,\n prevSegment: (_a = segments[i - 1]) !== null && _a !== void 0 ? _a : null,\n initialX,\n initialY,\n cpX,\n cpY,\n });\n switch (s.type) {\n case 'M':\n initialX = s.x;\n initialY = s.y;\n x = s.x;\n y = s.y;\n cpX = null;\n cpY = null;\n break;\n case 'Q':\n x = s.x;\n y = s.y;\n cpX = s.cpx;\n cpY = s.cpy;\n break;\n case 'A':\n x = s.x;\n y = s.y;\n cpX = null;\n cpY = null;\n break;\n case 'C':\n x = s.x;\n y = s.y;\n cpX = s.cp2x;\n cpY = s.cp2y;\n break;\n case 'S':\n x = s.x;\n y = s.y;\n cpX = s.cpx;\n cpY = s.cpy;\n break;\n case 'T':\n // Order of if statement is important here\n if (cpX !== null && cpY !== null) {\n cpX = x - (cpX - x);\n cpY = y - (cpY - y);\n }\n x = s.x;\n y = s.y;\n break;\n case 'L':\n x = s.x;\n y = s.y;\n cpX = null;\n cpY = null;\n break;\n case 'V':\n y = s.y;\n cpX = null;\n cpY = null;\n break;\n case 'H':\n x = s.x;\n cpX = null;\n cpY = null;\n break;\n case 'Z':\n x = initialX;\n y = initialY;\n cpX = null;\n cpY = null;\n break;\n default:\n // @ts-expect-error\n throw new Error(`Unexpected instruction ${s.type}`);\n }\n return newSeg;\n });\n return newSegments.flat(1);\n};\nexports.iterateOverSegments = iterateOverSegments;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.removeATSHVQInstructions = void 0;\nconst convert_q_to_c_instruction_1 = require(\"./convert-q-to-c-instruction\");\nconst iterate_1 = require(\"./iterate\");\nconst TAU = Math.PI * 2;\nfunction approximate_unit_arc(theta1, delta_theta) {\n const alpha = (4 / 3) * Math.tan(delta_theta / 4);\n const x1 = Math.cos(theta1);\n const y1 = Math.sin(theta1);\n const x2 = Math.cos(theta1 + delta_theta);\n const y2 = Math.sin(theta1 + delta_theta);\n return [\n x1,\n y1,\n x1 - y1 * alpha,\n y1 + x1 * alpha,\n x2 + y2 * alpha,\n y2 - x2 * alpha,\n x2,\n y2,\n ];\n}\nfunction unit_vector_angle(ux, uy, vx, vy) {\n const sign = ux * vy - uy * vx < 0 ? -1 : 1;\n let dot = ux * vx + uy * vy;\n // Add this to work with arbitrary vectors:\n // dot /= Math.sqrt(ux * ux + uy * uy) * Math.sqrt(vx * vx + vy * vy);\n // rounding errors, e.g. -1.0000000000000002 can screw up this\n if (dot > 1.0) {\n dot = 1.0;\n }\n if (dot < -1.0) {\n dot = -1.0;\n }\n return sign * Math.acos(dot);\n}\nfunction get_arc_center({ x1, y1, x2, y2, largeArcFlag, sweepFlag, rx, ry, sin_phi, cos_phi, }) {\n // Step 1.\n //\n // Moving an ellipse so origin will be the middlepoint between our two\n // points. After that, rotate it to line up ellipse axes with coordinate\n // axes.\n //\n const x1p = (cos_phi * (x1 - x2)) / 2 + (sin_phi * (y1 - y2)) / 2;\n const y1p = (-sin_phi * (x1 - x2)) / 2 + (cos_phi * (y1 - y2)) / 2;\n const rx_sq = rx * rx;\n const ry_sq = ry * ry;\n const x1p_sq = x1p * x1p;\n const y1p_sq = y1p * y1p;\n // Step 2.\n //\n // Compute coordinates of the centre of this ellipse (cx', cy')\n // in the new coordinate system.\n //\n let radicant = rx_sq * ry_sq - rx_sq * y1p_sq - ry_sq * x1p_sq;\n if (radicant < 0) {\n // due to rounding errors it might be e.g. -1.3877787807814457e-17\n radicant = 0;\n }\n radicant /= rx_sq * y1p_sq + ry_sq * x1p_sq;\n radicant = Math.sqrt(radicant) * (largeArcFlag === sweepFlag ? -1 : 1);\n const cxp = ((radicant * rx) / ry) * y1p;\n const cyp = ((radicant * -ry) / rx) * x1p;\n // Step 3.\n //\n // Transform back to get centre coordinates (cx, cy) in the original\n // coordinate system.\n //\n const cx = cos_phi * cxp - sin_phi * cyp + (x1 + x2) / 2;\n const cy = sin_phi * cxp + cos_phi * cyp + (y1 + y2) / 2;\n // Step 4.\n //\n // Compute angles (theta1, delta_theta).\n //\n const v1x = (x1p - cxp) / rx;\n const v1y = (y1p - cyp) / ry;\n const v2x = (-x1p - cxp) / rx;\n const v2y = (-y1p - cyp) / ry;\n const theta1 = unit_vector_angle(1, 0, v1x, v1y);\n let delta_theta = unit_vector_angle(v1x, v1y, v2x, v2y);\n if (sweepFlag === false && delta_theta > 0) {\n delta_theta -= TAU;\n }\n if (sweepFlag === true && delta_theta < 0) {\n delta_theta += TAU;\n }\n return [cx, cy, theta1, delta_theta];\n}\nfunction arcToCircle({ x1, y1, x2, y2, largeArcFlag, sweepFlag, rx, ry, phi, }) {\n const sin_phi = Math.sin((phi * TAU) / 360);\n const cos_phi = Math.cos((phi * TAU) / 360);\n // Make sure radii are valid\n //\n const x1p = (cos_phi * (x1 - x2)) / 2 + (sin_phi * (y1 - y2)) / 2;\n const y1p = (-sin_phi * (x1 - x2)) / 2 + (cos_phi * (y1 - y2)) / 2;\n if (x1p === 0 && y1p === 0) {\n // we're asked to draw line to itself\n return [];\n }\n if (rx === 0 || ry === 0) {\n // one of the radii is zero\n return [];\n }\n // Compensate out-of-range radii\n //\n rx = Math.abs(rx);\n ry = Math.abs(ry);\n const lambda = (x1p * x1p) / (rx * rx) + (y1p * y1p) / (ry * ry);\n if (lambda > 1) {\n rx *= Math.sqrt(lambda);\n ry *= Math.sqrt(lambda);\n }\n // Get center parameters (cx, cy, theta1, delta_theta)\n //\n const cc = get_arc_center({\n x1,\n y1,\n x2,\n y2,\n largeArcFlag,\n sweepFlag,\n rx,\n ry,\n sin_phi,\n cos_phi,\n });\n const result = [];\n let theta1 = cc[2];\n let delta_theta = cc[3];\n // Split an arc to multiple segments, so each segment\n // will be less than τ/4 (= 90°)\n //\n const segments = Math.max(Math.ceil(Math.abs(delta_theta) / (TAU / 4)), 1);\n delta_theta /= segments;\n for (let i = 0; i < segments; i++) {\n result.push(approximate_unit_arc(theta1, delta_theta));\n theta1 += delta_theta;\n }\n // We have a bezier approximation of a unit circle,\n // now need to transform back to the original ellipse\n //\n return result.map((curve) => {\n for (let i = 0; i < curve.length; i += 2) {\n let x = curve[i + 0];\n let y = curve[i + 1];\n // scale\n x *= rx;\n y *= ry;\n // rotate\n const xp = cos_phi * x - sin_phi * y;\n const yp = sin_phi * x + cos_phi * y;\n // translate\n curve[i + 0] = xp + cc[0];\n curve[i + 1] = yp + cc[1];\n }\n return curve;\n });\n}\n// Requires path to be normalized\nconst removeATSHVQInstructions = (segments) => {\n return (0, iterate_1.iterateOverSegments)({\n segments,\n iterate: ({ segment, prevSegment, x, y, cpX, cpY }) => {\n if (segment.type === 'H') {\n return [{ type: 'L', x: segment.x, y }];\n }\n if (segment.type === 'V') {\n return [{ type: 'L', x, y: segment.y }];\n }\n if (segment.type === 'A') {\n const nextX = segment.x;\n const nextY = segment.y;\n const new_segments = arcToCircle({\n x1: x,\n y1: y,\n x2: nextX,\n y2: nextY,\n largeArcFlag: segment.largeArcFlag,\n sweepFlag: segment.sweepFlag,\n rx: segment.rx,\n ry: segment.ry,\n phi: segment.xAxisRotation,\n });\n // Degenerated arcs can be ignored by renderer, but should not be dropped\n // to avoid collisions with `S A S` and so on. Replace with empty line.\n if (new_segments.length === 0) {\n return [\n {\n type: 'L',\n x: segment.x,\n y: segment.y,\n },\n ];\n }\n const result = new_segments.map((_s) => {\n return {\n type: 'C',\n cp1x: _s[2],\n cp1y: _s[3],\n cp2x: _s[4],\n cp2y: _s[5],\n x: _s[6],\n y: _s[7],\n };\n });\n return result;\n }\n if (segment.type === 'T') {\n let prevControlX = 0;\n let prevControlY = 0;\n if (prevSegment &&\n (prevSegment.type === 'Q' || prevSegment.type === 'T')) {\n prevControlX = cpX;\n prevControlY = cpY;\n }\n else {\n prevControlX = x;\n prevControlY = y;\n }\n // New first control point is reflection of previous second control point\n const vectorX = prevControlX - x;\n const vectorY = prevControlY - y;\n const newControlX = x - vectorX;\n const newControlY = y - vectorY;\n return [\n (0, convert_q_to_c_instruction_1.convertQToCInstruction)({\n type: 'Q',\n cpx: newControlX,\n cpy: newControlY,\n x: segment.x,\n y: segment.y,\n }, { x, y }),\n ];\n }\n if (segment.type === 'S') {\n let prevControlX = 0;\n let prevControlY = 0;\n if (prevSegment && prevSegment.type === 'C') {\n prevControlX = prevSegment.cp2x;\n prevControlY = prevSegment.cp2y;\n }\n else if (prevSegment && prevSegment.type === 'S') {\n prevControlX = prevSegment.cpx;\n prevControlY = prevSegment.cpy;\n }\n else {\n prevControlX = x;\n prevControlY = y;\n }\n // New first control point is reflection of previous second control point\n const vectorX = prevControlX - x;\n const vectorY = prevControlY - y;\n const newControlX = x - vectorX;\n const newControlY = y - vectorY;\n return [\n {\n type: 'C',\n cp1x: newControlX,\n cp1y: newControlY,\n cp2x: segment.cpx,\n cp2y: segment.cpy,\n x: segment.x,\n y: segment.y,\n },\n ];\n }\n if (segment.type === 'Q') {\n return [(0, convert_q_to_c_instruction_1.convertQToCInstruction)(segment, { x, y })];\n }\n return [segment];\n },\n });\n};\nexports.removeATSHVQInstructions = removeATSHVQInstructions;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.serializeInstructions = void 0;\n/**\n * @description Takes an array of Instruction's and serializes it into an SVG path string.\n * @param {Array} instruction\n * @returns a serialized SVG path string\n * @see [Documentation](https://www.remotion.dev/docs/paths/serialize-instructions)\n */\nconst serializeInstruction = (instruction) => {\n if (instruction.type === 'A') {\n return `A ${instruction.rx} ${instruction.ry} ${instruction.xAxisRotation} ${Number(instruction.largeArcFlag)} ${Number(instruction.sweepFlag)} ${instruction.x} ${instruction.y}`;\n }\n if (instruction.type === 'a') {\n return `a ${instruction.rx} ${instruction.ry} ${instruction.xAxisRotation} ${Number(instruction.largeArcFlag)} ${Number(instruction.sweepFlag)} ${instruction.dx} ${instruction.dy}`;\n }\n if (instruction.type === 'C') {\n return `C ${instruction.cp1x} ${instruction.cp1y} ${instruction.cp2x} ${instruction.cp2y} ${instruction.x} ${instruction.y}`;\n }\n if (instruction.type === 'c') {\n return `c ${instruction.cp1dx} ${instruction.cp1dy} ${instruction.cp2dx} ${instruction.cp2dy} ${instruction.dx} ${instruction.dy}`;\n }\n if (instruction.type === 'S') {\n return `S ${instruction.cpx} ${instruction.cpy} ${instruction.x} ${instruction.y}`;\n }\n if (instruction.type === 's') {\n return `s ${instruction.cpdx} ${instruction.cpdy} ${instruction.dx} ${instruction.dy}`;\n }\n if (instruction.type === 'Q') {\n return `Q ${instruction.cpx} ${instruction.cpy} ${instruction.x} ${instruction.y}`;\n }\n if (instruction.type === 'q') {\n return `q ${instruction.cpdx} ${instruction.cpdy} ${instruction.dx} ${instruction.dy}`;\n }\n if (instruction.type === 'Z') {\n return 'Z';\n }\n if (instruction.type === 'H') {\n return `H ${instruction.x}`;\n }\n if (instruction.type === 'h') {\n return `h ${instruction.dx}`;\n }\n if (instruction.type === 'V') {\n return `V ${instruction.y}`;\n }\n if (instruction.type === 'v') {\n return `v ${instruction.dy}`;\n }\n if (instruction.type === 'L') {\n return `L ${instruction.x} ${instruction.y}`;\n }\n if (instruction.type === 'l') {\n return `l ${instruction.dx} ${instruction.dy}`;\n }\n if (instruction.type === 'M') {\n return `M ${instruction.x} ${instruction.y}`;\n }\n if (instruction.type === 'm') {\n return `m ${instruction.dx} ${instruction.dy}`;\n }\n if (instruction.type === 'T') {\n return `T ${instruction.x} ${instruction.y}`;\n }\n if (instruction.type === 't') {\n return `t ${instruction.dx} ${instruction.dy}`;\n }\n // @ts-expect-error\n throw new Error(`Unknown instruction type: ${instruction.type}`);\n};\nconst serializeInstructions = (path) => {\n return path\n .map((p) => {\n return serializeInstruction(p);\n })\n .join(' ');\n};\nexports.serializeInstructions = serializeInstructions;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.normalizePath = exports.normalizeInstructions = void 0;\nconst parse_path_1 = require(\"./parse-path\");\nconst serialize_instructions_1 = require(\"./serialize-instructions\");\nconst normalizeInstructions = (instructions) => {\n // Extended properties must already be normalized\n const normalized = [];\n let x = 0;\n let y = 0;\n let moveX = 0;\n let moveY = 0;\n for (let i = 0; i < instructions.length; i++) {\n const instruction = instructions[i];\n if (instruction.type === 'M') {\n moveX = instruction.x;\n moveY = instruction.y;\n }\n else if (instruction.type === 'm') {\n moveX += instruction.dx;\n moveY += instruction.dy;\n }\n if (instruction.type === 'A' ||\n instruction.type === 'C' ||\n instruction.type === 'L' ||\n instruction.type === 'M' ||\n instruction.type === 'Q' ||\n instruction.type === 'S' ||\n instruction.type === 'T') {\n normalized.push(instruction);\n x = instruction.x;\n y = instruction.y;\n continue;\n }\n if (instruction.type === 'a' ||\n instruction.type === 'c' ||\n instruction.type === 'l' ||\n instruction.type === 'm' ||\n instruction.type === 'q' ||\n instruction.type === 's' ||\n instruction.type === 't') {\n const currentX = x;\n const currentY = y;\n x += instruction.dx;\n y += instruction.dy;\n if (instruction.type === 'a') {\n normalized.push({\n type: 'A',\n largeArcFlag: instruction.largeArcFlag,\n rx: instruction.rx,\n ry: instruction.ry,\n sweepFlag: instruction.sweepFlag,\n xAxisRotation: instruction.xAxisRotation,\n x,\n y,\n });\n continue;\n }\n if (instruction.type === 'c') {\n normalized.push({\n type: 'C',\n cp1x: instruction.cp1dx + currentX,\n cp1y: instruction.cp1dy + currentY,\n cp2x: instruction.cp2dx + currentX,\n cp2y: instruction.cp2dy + currentY,\n x,\n y,\n });\n continue;\n }\n if (instruction.type === 'l') {\n normalized.push({\n type: 'L',\n x,\n y,\n });\n continue;\n }\n if (instruction.type === 'm') {\n normalized.push({\n type: 'M',\n x,\n y,\n });\n continue;\n }\n if (instruction.type === 'q') {\n normalized.push({\n type: 'Q',\n cpx: instruction.cpdx + currentX,\n cpy: instruction.cpdy + currentY,\n x,\n y,\n });\n continue;\n }\n if (instruction.type === 's') {\n normalized.push({\n type: 'S',\n cpx: instruction.cpdx + currentX,\n cpy: instruction.cpdy + currentY,\n x,\n y,\n });\n continue;\n }\n if (instruction.type === 't') {\n normalized.push({\n type: 'T',\n x,\n y,\n });\n continue;\n }\n }\n if (instruction.type === 'H') {\n normalized.push(instruction);\n x = instruction.x;\n continue;\n }\n if (instruction.type === 'V') {\n normalized.push(instruction);\n y = instruction.y;\n continue;\n }\n if (instruction.type === 'Z') {\n normalized.push(instruction);\n x = moveX;\n y = moveY;\n continue;\n }\n if (instruction.type === 'h') {\n x += instruction.dx;\n normalized.push({\n type: 'H',\n x,\n });\n continue;\n }\n if (instruction.type === 'v') {\n y += instruction.dy;\n normalized.push({\n type: 'V',\n y,\n });\n continue;\n }\n // @ts-expect-error\n throw new Error('Unknown instruction type: ' + instruction.type);\n }\n return normalized;\n};\nexports.normalizeInstructions = normalizeInstructions;\n/**\n * @description Removes all relative coordinates from an SVG path and converts them into absolute coordinates.\n * @see [Documentation](https://remotion.dev/docs/paths/normalize-path)\n * @param {string} path A valid SVG path\n * @returns {string} A string representation of the SVG path with absolute coordinates.\n */\nconst normalizePath = (path) => {\n const instructions = (0, parse_path_1.parsePath)(path);\n const normalized = (0, exports.normalizeInstructions)(instructions);\n return (0, serialize_instructions_1.serializeInstructions)(normalized);\n};\nexports.normalizePath = normalizePath;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.reduceInstructions = void 0;\nconst remove_a_s_t_curves_1 = require(\"./helpers/remove-a-s-t-curves\");\nconst normalize_path_1 = require(\"./normalize-path\");\n/**\n * @description Takes an array of Instruction's and reduces the amount of instruction types them so the path only consists of M, L, C, Q and Z instructions.\n * @param {Array} instruction\n * @see [Documentation](https://www.remotion.dev/docs/paths/reduce-instructions)\n */\nconst reduceInstructions = (instruction) => {\n const simplified = (0, normalize_path_1.normalizeInstructions)(instruction);\n return (0, remove_a_s_t_curves_1.removeATSHVQInstructions)(simplified);\n};\nexports.reduceInstructions = reduceInstructions;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.cutPath = void 0;\nconst cut_instruction_1 = require(\"./cut-instruction\");\nconst reduced_analysis_1 = require(\"./helpers/reduced-analysis\");\nconst parse_path_1 = require(\"./parse-path\");\nconst reduce_instructions_1 = require(\"./reduce-instructions\");\nconst serialize_instructions_1 = require(\"./serialize-instructions\");\nconst cutPath = (d, length) => {\n const parsed = (0, parse_path_1.parsePath)(d);\n const reduced = (0, reduce_instructions_1.reduceInstructions)(parsed);\n const constructed = (0, reduced_analysis_1.conductAnalysis)(reduced);\n const newInstructions = [];\n let summedUpLength = 0;\n for (const segment of constructed) {\n for (const instructionAndInfo of segment.instructionsAndInfo) {\n if (summedUpLength + instructionAndInfo.length > length) {\n const remainingLength = length - summedUpLength;\n const progress = remainingLength / instructionAndInfo.length;\n // cut\n const cut = (0, cut_instruction_1.cutInstruction)({\n instruction: instructionAndInfo.instruction,\n lastPoint: instructionAndInfo.startPoint,\n progress,\n });\n newInstructions.push(cut);\n return (0, serialize_instructions_1.serializeInstructions)(newInstructions);\n }\n summedUpLength += instructionAndInfo.length;\n newInstructions.push(instructionAndInfo.instruction);\n if (summedUpLength === length) {\n return (0, serialize_instructions_1.serializeInstructions)(newInstructions);\n }\n }\n }\n return (0, serialize_instructions_1.serializeInstructions)(newInstructions);\n};\nexports.cutPath = cutPath;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.debugPath = void 0;\nconst normalize_path_1 = require(\"./normalize-path\");\nconst parse_path_1 = require(\"./parse-path\");\nconst serialize_instructions_1 = require(\"./serialize-instructions\");\nconst debugPath = (d) => {\n const instructions = (0, normalize_path_1.normalizeInstructions)((0, parse_path_1.parsePath)(d));\n return instructions\n .map((inst, i) => {\n if (inst.type === 'Z') {\n return null;\n }\n if (inst.type === 'H' || inst.type === 'V') {\n return null;\n }\n const topLeft = [inst.x - 5, inst.y - 5];\n const topRight = [inst.x + 5, inst.y - 5];\n const bottomLeft = [inst.x - 5, inst.y + 5];\n const bottomRight = [inst.x + 5, inst.y + 5];\n const triangle = [\n {\n type: 'M',\n x: topLeft[0],\n y: topLeft[1],\n },\n {\n type: 'L',\n x: topRight[0],\n y: topRight[1],\n },\n {\n type: 'L',\n x: bottomRight[0],\n y: bottomRight[1],\n },\n {\n type: 'L',\n x: bottomLeft[0],\n y: bottomLeft[1],\n },\n {\n type: 'Z',\n },\n ];\n return {\n d: (0, serialize_instructions_1.serializeInstructions)(triangle),\n color: i === instructions.length - 1\n ? 'red'\n : inst.type === 'M'\n ? 'blue'\n : 'green',\n };\n })\n .filter(Boolean);\n};\nexports.debugPath = debugPath;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getBoundingBox = exports.getBoundingBoxFromInstructions = void 0;\nconst remove_a_s_t_curves_1 = require(\"./helpers/remove-a-s-t-curves\");\nconst normalize_path_1 = require(\"./normalize-path\");\nconst parse_path_1 = require(\"./parse-path\");\n// Precision for consider cubic polynom as quadratic one\nconst CBEZIER_MINMAX_EPSILON = 0.00000001;\n// https://github.com/kpym/SVGPathy/blob/acd1a50c626b36d81969f6e98e8602e128ba4302/lib/box.js#L89\nfunction minmaxQ(A) {\n const min = Math.min(A[0], A[2]);\n const max = Math.max(A[0], A[2]);\n if (A[1] > A[0] ? A[2] >= A[1] : A[2] <= A[1]) {\n // if no extremum in ]0,1[\n return [min, max];\n }\n // check if the extremum E is min or max\n const E = (A[0] * A[2] - A[1] * A[1]) / (A[0] - 2 * A[1] + A[2]);\n return E < min ? [E, max] : [min, E];\n}\n// https://github.com/kpym/SVGPathy/blob/acd1a50c626b36d81969f6e98e8602e128ba4302/lib/box.js#L127\nfunction minmaxC(A) {\n const K = A[0] - 3 * A[1] + 3 * A[2] - A[3];\n // if the polynomial is (almost) quadratic and not cubic\n if (Math.abs(K) < CBEZIER_MINMAX_EPSILON) {\n if (A[0] === A[3] && A[0] === A[1]) {\n // no curve, point targeting same location\n return [A[0], A[3]];\n }\n return minmaxQ([\n A[0],\n -0.5 * A[0] + 1.5 * A[1],\n A[0] - 3 * A[1] + 3 * A[2],\n ]);\n }\n // the reduced discriminant of the derivative\n const T = -A[0] * A[2] +\n A[0] * A[3] -\n A[1] * A[2] -\n A[1] * A[3] +\n A[1] * A[1] +\n A[2] * A[2];\n // if the polynomial is monotone in [0,1]\n if (T <= 0) {\n return [Math.min(A[0], A[3]), Math.max(A[0], A[3])];\n }\n const S = Math.sqrt(T);\n // potential extrema\n let min = Math.min(A[0], A[3]);\n let max = Math.max(A[0], A[3]);\n const L = A[0] - 2 * A[1] + A[2];\n // check local extrema\n for (let R = (L + S) / K, i = 1; i <= 2; R = (L - S) / K, i++) {\n if (R > 0 && R < 1) {\n // if the extrema is for R in [0,1]\n const Q = A[0] * (1 - R) * (1 - R) * (1 - R) +\n A[1] * 3 * (1 - R) * (1 - R) * R +\n A[2] * 3 * (1 - R) * R * R +\n A[3] * R * R * R;\n if (Q < min) {\n min = Q;\n }\n if (Q > max) {\n max = Q;\n }\n }\n }\n return [min, max];\n}\nconst getBoundingBoxFromInstructions = (instructions) => {\n let minX = Infinity;\n let minY = Infinity;\n let maxX = -Infinity;\n let maxY = -Infinity;\n let x = 0;\n let y = 0;\n let lastMoveX = 0;\n let lastMoveY = 0;\n for (const seg of instructions) {\n switch (seg.type) {\n case 'M': {\n lastMoveX = seg.x;\n lastMoveY = seg.y;\n if (minX > seg.x) {\n minX = seg.x;\n }\n if (minY > seg.y) {\n minY = seg.y;\n }\n if (maxX < seg.x) {\n maxX = seg.x;\n }\n if (maxY < seg.y) {\n maxY = seg.y;\n }\n x = seg.x;\n y = seg.y;\n break;\n }\n case 'L': {\n if (minX > seg.x) {\n minX = seg.x;\n }\n if (minY > seg.y) {\n minY = seg.y;\n }\n if (maxX < seg.x) {\n maxX = seg.x;\n }\n if (maxY < seg.y) {\n maxY = seg.y;\n }\n x = seg.x;\n y = seg.y;\n break;\n }\n case 'C': {\n const cxMinMax = minmaxC([x, seg.cp1x, seg.cp2x, seg.x]);\n if (minX > cxMinMax[0]) {\n minX = cxMinMax[0];\n }\n if (maxX < cxMinMax[1]) {\n maxX = cxMinMax[1];\n }\n const cyMinMax = minmaxC([y, seg.cp1y, seg.cp2y, seg.y]);\n if (minY > cyMinMax[0]) {\n minY = cyMinMax[0];\n }\n if (maxY < cyMinMax[1]) {\n maxY = cyMinMax[1];\n }\n x = seg.x;\n y = seg.y;\n break;\n }\n case 'Z':\n x = lastMoveX;\n y = lastMoveY;\n break;\n default:\n // @ts-expect-error\n throw new Error(`Unknown instruction ${seg.type}`);\n }\n }\n return {\n x1: minX,\n y1: minY,\n x2: maxX,\n y2: maxY,\n viewBox: `${minX} ${minY} ${maxX - minX} ${maxY - minY}`,\n width: maxX - minX,\n height: maxY - minY,\n };\n};\nexports.getBoundingBoxFromInstructions = getBoundingBoxFromInstructions;\n/**\n * @description Returns the bounding box of the given path, suitable for calculating the viewBox value that you need to pass to an SVG.\n * @param {string} d\n * @see [Documentation](https://www.remotion.dev/docs/paths/get-bounding-box)\n */\nconst getBoundingBox = (d) => {\n const parsed = (0, parse_path_1.parsePath)(d);\n const unarced = (0, remove_a_s_t_curves_1.removeATSHVQInstructions)((0, normalize_path_1.normalizeInstructions)(parsed));\n return (0, exports.getBoundingBoxFromInstructions)(unarced);\n};\nexports.getBoundingBox = getBoundingBox;\n","\"use strict\";\n// Copied from: https://github.com/rveciana/svg-path-properties\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.makeArc = void 0;\nconst mod = (x, m) => {\n return ((x % m) + m) % m;\n};\nconst toRadians = (angle) => {\n return angle * (Math.PI / 180);\n};\nconst distance = (p0, p1) => {\n return Math.sqrt((p1.x - p0.x) ** 2 + (p1.y - p0.y) ** 2);\n};\nconst clamp = (val, min, max) => {\n return Math.min(Math.max(val, min), max);\n};\nconst angleBetween = (v0, v1) => {\n const p = v0.x * v1.x + v0.y * v1.y;\n const n = Math.sqrt((v0.x ** 2 + v0.y ** 2) * (v1.x ** 2 + v1.y ** 2));\n const sign = v0.x * v1.y - v0.y * v1.x < 0 ? -1 : 1;\n const angle = sign * Math.acos(p / n);\n return angle;\n};\nconst pointOnEllipticalArc = ({ p0, rx, ry, xAxisRotation, largeArcFlag, sweepFlag, p1, t, }) => {\n // In accordance to: http://www.w3.org/TR/SVG/implnote.html#ArcOutOfRangeParameters\n rx = Math.abs(rx);\n ry = Math.abs(ry);\n xAxisRotation = mod(xAxisRotation, 360);\n const xAxisRotationRadians = toRadians(xAxisRotation);\n // If the endpoints are identical, then this is equivalent to omitting the elliptical arc segment entirely.\n if (p0.x === p1.x && p0.y === p1.y) {\n return { x: p0.x, y: p0.y, ellipticalArcAngle: 0 }; // Check if angle is correct\n }\n // If rx = 0 or ry = 0 then this arc is treated as a straight line segment joining the endpoints.\n if (rx === 0 || ry === 0) {\n // return this.pointOnLine(p0, p1, t);\n return { x: 0, y: 0, ellipticalArcAngle: 0 }; // Check if angle is correct\n }\n // Following \"Conversion from endpoint to center parameterization\"\n // http://www.w3.org/TR/SVG/implnote.html#ArcConversionEndpointToCenter\n // Step #1: Compute transformedPoint\n const dx = (p0.x - p1.x) / 2;\n const dy = (p0.y - p1.y) / 2;\n const transformedPoint = {\n x: Math.cos(xAxisRotationRadians) * dx + Math.sin(xAxisRotationRadians) * dy,\n y: -Math.sin(xAxisRotationRadians) * dx +\n Math.cos(xAxisRotationRadians) * dy,\n };\n // Ensure radii are large enough\n const radiiCheck = transformedPoint.x ** 2 / rx ** 2 + transformedPoint.y ** 2 / ry ** 2;\n if (radiiCheck > 1) {\n rx *= Math.sqrt(radiiCheck);\n ry *= Math.sqrt(radiiCheck);\n }\n // Step #2: Compute transformedCenter\n const cSquareNumerator = rx ** 2 * ry ** 2 -\n rx ** 2 * transformedPoint.y ** 2 -\n ry ** 2 * transformedPoint.x ** 2;\n const cSquareRootDenom = rx ** 2 * transformedPoint.y ** 2 + ry ** 2 * transformedPoint.x ** 2;\n let cRadicand = cSquareNumerator / cSquareRootDenom;\n // Make sure this never drops below zero because of precision\n cRadicand = cRadicand < 0 ? 0 : cRadicand;\n const cCoef = (largeArcFlag === sweepFlag ? -1 : 1) * Math.sqrt(cRadicand);\n const transformedCenter = {\n x: cCoef * ((rx * transformedPoint.y) / ry),\n y: cCoef * (-(ry * transformedPoint.x) / rx),\n };\n // Step #3: Compute center\n const center = {\n x: Math.cos(xAxisRotationRadians) * transformedCenter.x -\n Math.sin(xAxisRotationRadians) * transformedCenter.y +\n (p0.x + p1.x) / 2,\n y: Math.sin(xAxisRotationRadians) * transformedCenter.x +\n Math.cos(xAxisRotationRadians) * transformedCenter.y +\n (p0.y + p1.y) / 2,\n };\n // Step #4: Compute start/sweep angles\n // Start angle of the elliptical arc prior to the stretch and rotate operations.\n // Difference between the start and end angles\n const startVector = {\n x: (transformedPoint.x - transformedCenter.x) / rx,\n y: (transformedPoint.y - transformedCenter.y) / ry,\n };\n const startAngle = angleBetween({\n x: 1,\n y: 0,\n }, startVector);\n const endVector = {\n x: (-transformedPoint.x - transformedCenter.x) / rx,\n y: (-transformedPoint.y - transformedCenter.y) / ry,\n };\n let sweepAngle = angleBetween(startVector, endVector);\n if (!sweepFlag && sweepAngle > 0) {\n sweepAngle -= 2 * Math.PI;\n }\n else if (sweepFlag && sweepAngle < 0) {\n sweepAngle += 2 * Math.PI;\n }\n // We use % instead of `mod(..)` because we want it to be -360deg to 360deg(but actually in radians)\n sweepAngle %= 2 * Math.PI;\n // From http://www.w3.org/TR/SVG/implnote.html#ArcParameterizationAlternatives\n const angle = startAngle + sweepAngle * t;\n const ellipseComponentX = rx * Math.cos(angle);\n const ellipseComponentY = ry * Math.sin(angle);\n const point = {\n x: Math.cos(xAxisRotationRadians) * ellipseComponentX -\n Math.sin(xAxisRotationRadians) * ellipseComponentY +\n center.x,\n y: Math.sin(xAxisRotationRadians) * ellipseComponentX +\n Math.cos(xAxisRotationRadians) * ellipseComponentY +\n center.y,\n ellipticalArcStartAngle: startAngle,\n ellipticalArcEndAngle: startAngle + sweepAngle,\n ellipticalArcAngle: angle,\n ellipticalArcCenter: center,\n resultantRx: rx,\n resultantRy: ry,\n };\n return point;\n};\nconst approximateArcLengthOfCurve = (resolution, pointOnCurveFunc) => {\n // Resolution is the number of segments we use\n resolution = resolution ? resolution : 500;\n let resultantArcLength = 0;\n const arcLengthMap = [];\n const approximationLines = [];\n let prevPoint = pointOnCurveFunc(0);\n let nextPoint;\n for (let i = 0; i < resolution; i++) {\n const t = clamp(i * (1 / resolution), 0, 1);\n nextPoint = pointOnCurveFunc(t);\n resultantArcLength += distance(prevPoint, nextPoint);\n approximationLines.push([prevPoint, nextPoint]);\n arcLengthMap.push({\n t,\n arcLength: resultantArcLength,\n });\n prevPoint = nextPoint;\n }\n // Last stretch to the endpoint\n nextPoint = pointOnCurveFunc(1);\n approximationLines.push([prevPoint, nextPoint]);\n resultantArcLength += distance(prevPoint, nextPoint);\n arcLengthMap.push({\n t: 1,\n arcLength: resultantArcLength,\n });\n return {\n arcLength: resultantArcLength,\n arcLengthMap,\n approximationLines,\n };\n};\nconst makeArc = ({ x0, y0, rx, ry, xAxisRotate, LargeArcFlag, SweepFlag, x1, y1, }) => {\n const lengthProperties = approximateArcLengthOfCurve(300, (t) => {\n return pointOnEllipticalArc({\n p0: { x: x0, y: y0 },\n rx,\n ry,\n xAxisRotation: xAxisRotate,\n largeArcFlag: LargeArcFlag,\n sweepFlag: SweepFlag,\n p1: { x: x1, y: y1 },\n t,\n });\n });\n const length = lengthProperties.arcLength;\n const getPointAtLength = (fractionLength) => {\n if (fractionLength < 0) {\n fractionLength = 0;\n }\n else if (fractionLength > length) {\n fractionLength = length;\n }\n const position = pointOnEllipticalArc({\n p0: { x: x0, y: y0 },\n rx,\n ry,\n xAxisRotation: xAxisRotate,\n largeArcFlag: LargeArcFlag,\n sweepFlag: SweepFlag,\n p1: { x: x1, y: y1 },\n t: fractionLength / length,\n });\n return { x: position.x, y: position.y };\n };\n return {\n getPointAtLength,\n getTangentAtLength: (fractionLength) => {\n if (fractionLength < 0) {\n fractionLength = 0;\n }\n else if (fractionLength > length) {\n fractionLength = length;\n }\n const point_dist = 0.05; // needs testing\n const p1 = getPointAtLength(fractionLength);\n let p2;\n if (fractionLength < 0) {\n fractionLength = 0;\n }\n else if (fractionLength > length) {\n fractionLength = length;\n }\n if (fractionLength < length - point_dist) {\n p2 = getPointAtLength(fractionLength + point_dist);\n }\n else {\n p2 = getPointAtLength(fractionLength - point_dist);\n }\n const xDist = p2.x - p1.x;\n const yDist = p2.y - p1.y;\n const dist = Math.sqrt(xDist * xDist + yDist * yDist);\n if (fractionLength < length - point_dist) {\n return { x: -xDist / dist, y: -yDist / dist };\n }\n return { x: xDist / dist, y: yDist / dist };\n },\n getTotalLength: () => {\n return length;\n },\n type: 'arc',\n };\n};\nexports.makeArc = makeArc;\n","\"use strict\";\n// Copied from: https://github.com/rveciana/svg-path-properties\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.construct = exports.constructFromInstructions = void 0;\nconst parse_path_1 = require(\"../parse-path\");\nconst arc_1 = require(\"./arc\");\nconst bezier_1 = require(\"./bezier\");\nconst linear_1 = require(\"./linear\");\nconst constructFromInstructions = (instructions) => {\n let totalLength = 0;\n const partialLengths = [];\n const functions = [];\n let initialPoint = null;\n let cur = [0, 0];\n let prev_point = [0, 0];\n let curve;\n let ringStart = [0, 0];\n const segments = [];\n for (let i = 0; i < instructions.length; i++) {\n const instruction = instructions[i];\n if (instruction.type !== 'm' &&\n instruction.type !== 'M' &&\n segments.length > 0) {\n segments[segments.length - 1].push(instruction);\n }\n // moveTo\n if (instruction.type === 'M') {\n cur = [instruction.x, instruction.y];\n ringStart = [cur[0], cur[1]];\n segments.push([instruction]);\n functions.push(null);\n if (i === 0) {\n initialPoint = { x: instruction.x, y: instruction.y };\n }\n }\n if (instruction.type === 'm') {\n cur = [instruction.dx + cur[0], instruction.dy + cur[1]];\n ringStart = [cur[0], cur[1]];\n segments.push([{ type: 'M', x: cur[0], y: cur[1] }]);\n functions.push(null);\n // lineTo\n }\n if (instruction.type === 'L') {\n totalLength += Math.sqrt((cur[0] - instruction.x) ** 2 + (cur[1] - instruction.y) ** 2);\n functions.push((0, linear_1.makeLinearPosition)({\n x0: cur[0],\n x1: instruction.x,\n y0: cur[1],\n y1: instruction.y,\n }));\n cur = [instruction.x, instruction.y];\n }\n if (instruction.type === 'l') {\n totalLength += Math.sqrt(instruction.dx ** 2 + instruction.dy ** 2);\n functions.push((0, linear_1.makeLinearPosition)({\n x0: cur[0],\n x1: instruction.dx + cur[0],\n y0: cur[1],\n y1: instruction.dy + cur[1],\n }));\n cur = [instruction.dx + cur[0], instruction.dy + cur[1]];\n }\n if (instruction.type === 'H') {\n totalLength += Math.abs(cur[0] - instruction.x);\n functions.push((0, linear_1.makeLinearPosition)({\n x0: cur[0],\n x1: instruction.x,\n y0: cur[1],\n y1: cur[1],\n }));\n cur[0] = instruction.x;\n }\n if (instruction.type === 'h') {\n totalLength += Math.abs(instruction.dx);\n functions.push((0, linear_1.makeLinearPosition)({\n x0: cur[0],\n x1: cur[0] + instruction.dx,\n y0: cur[1],\n y1: cur[1],\n }));\n cur[0] = instruction.dx + cur[0];\n }\n else if (instruction.type === 'V') {\n totalLength += Math.abs(cur[1] - instruction.y);\n functions.push((0, linear_1.makeLinearPosition)({\n x0: cur[0],\n x1: cur[0],\n y0: cur[1],\n y1: instruction.y,\n }));\n cur[1] = instruction.y;\n }\n if (instruction.type === 'v') {\n totalLength += Math.abs(instruction.dy);\n functions.push((0, linear_1.makeLinearPosition)({\n x0: cur[0],\n x1: cur[0],\n y0: cur[1],\n y1: cur[1] + instruction.dy,\n }));\n cur[1] = instruction.dy + cur[1];\n // Close path\n }\n else if (instruction.type === 'Z') {\n totalLength += Math.sqrt((ringStart[0] - cur[0]) ** 2 + (ringStart[1] - cur[1]) ** 2);\n functions.push((0, linear_1.makeLinearPosition)({\n x0: cur[0],\n x1: ringStart[0],\n y0: cur[1],\n y1: ringStart[1],\n }));\n cur = [ringStart[0], ringStart[1]];\n // Cubic Bezier curves\n }\n if (instruction.type === 'C') {\n curve = (0, bezier_1.makeCubic)({\n startX: cur[0],\n startY: cur[1],\n cp1x: instruction.cp1x,\n cp1y: instruction.cp1y,\n cp2x: instruction.cp2x,\n cp2y: instruction.cp2y,\n x: instruction.x,\n y: instruction.y,\n });\n totalLength += curve.getTotalLength();\n cur = [instruction.x, instruction.y];\n functions.push(curve);\n }\n else if (instruction.type === 'c') {\n curve = (0, bezier_1.makeCubic)({\n startX: cur[0],\n startY: cur[1],\n cp1x: cur[0] + instruction.cp1dx,\n cp1y: cur[1] + instruction.cp1dy,\n cp2x: cur[0] + instruction.cp2dx,\n cp2y: cur[1] + instruction.cp2dy,\n x: cur[0] + instruction.dx,\n y: cur[1] + instruction.dy,\n });\n if (curve.getTotalLength() > 0) {\n totalLength += curve.getTotalLength();\n functions.push(curve);\n cur = [instruction.dx + cur[0], instruction.dy + cur[1]];\n }\n else {\n functions.push((0, linear_1.makeLinearPosition)({ x0: cur[0], x1: cur[0], y0: cur[1], y1: cur[1] }));\n }\n }\n if (instruction.type === 'S') {\n const prev = instructions[i - 1];\n const prevWasCurve = prev.type === 'C' ||\n prev.type === 'c' ||\n prev.type === 'S' ||\n prev.type === 's';\n if (i > 0 && prevWasCurve) {\n if (curve) {\n const c = curve.getC();\n curve = (0, bezier_1.makeCubic)({\n startX: cur[0],\n startY: cur[1],\n cp1x: 2 * cur[0] - c.x,\n cp1y: 2 * cur[1] - c.y,\n cp2x: instruction.cpx,\n cp2y: instruction.cpy,\n x: instruction.x,\n y: instruction.y,\n });\n }\n }\n else {\n curve = (0, bezier_1.makeCubic)({\n startX: cur[0],\n startY: cur[1],\n cp1x: cur[0],\n cp1y: cur[1],\n cp2x: instruction.cpx,\n cp2y: instruction.cpy,\n x: instruction.x,\n y: instruction.y,\n });\n }\n if (curve) {\n totalLength += curve.getTotalLength();\n cur = [instruction.x, instruction.y];\n functions.push(curve);\n }\n }\n if (instruction.type === 's') {\n const prev = instructions[i - 1];\n const prevWasCurve = prev.type === 'C' ||\n prev.type === 'c' ||\n prev.type === 'S' ||\n prev.type === 's';\n if (i > 0 && prevWasCurve) {\n if (curve) {\n const c = curve.getC();\n const d = curve.getD();\n curve = (0, bezier_1.makeCubic)({\n startX: cur[0],\n startY: cur[1],\n cp1x: cur[0] + d.x - c.x,\n cp1y: cur[1] + d.y - c.y,\n cp2x: cur[0] + instruction.cpdx,\n cp2y: cur[1] + instruction.cpdy,\n x: cur[0] + instruction.dx,\n y: cur[1] + instruction.dy,\n });\n }\n }\n else {\n curve = (0, bezier_1.makeCubic)({\n startX: cur[0],\n startY: cur[1],\n cp1x: cur[0],\n cp1y: cur[1],\n cp2x: cur[0] + instruction.cpdx,\n cp2y: cur[1] + instruction.cpdy,\n x: cur[0] + instruction.dx,\n y: cur[1] + instruction.dy,\n });\n }\n if (curve) {\n totalLength += curve.getTotalLength();\n cur = [instruction.dx + cur[0], instruction.dy + cur[1]];\n functions.push(curve);\n }\n }\n // Quadratic Bezier curves\n if (instruction.type === 'Q') {\n if (cur[0] === instruction.cpx && cur[1] === instruction.cpy) {\n const linearCurve = (0, linear_1.makeLinearPosition)({\n x0: instruction.cpx,\n x1: instruction.x,\n y0: instruction.cpy,\n y1: instruction.y,\n });\n totalLength += linearCurve.getTotalLength();\n functions.push(linearCurve);\n }\n else {\n curve = (0, bezier_1.makeQuadratic)({\n startX: cur[0],\n startY: cur[1],\n cpx: instruction.cpx,\n cpy: instruction.cpy,\n x: instruction.x,\n y: instruction.y,\n });\n totalLength += curve.getTotalLength();\n functions.push(curve);\n }\n cur = [instruction.x, instruction.y];\n prev_point = [instruction.cpx, instruction.cpy];\n }\n if (instruction.type === 'q') {\n if (instruction.cpdx === 0 && instruction.cpdy === 0) {\n const linearCurve = (0, linear_1.makeLinearPosition)({\n x0: cur[0] + instruction.cpdx,\n x1: cur[0] + instruction.cpdy,\n y0: cur[1] + instruction.dx,\n y1: cur[1] + instruction.dy,\n });\n totalLength += linearCurve.getTotalLength();\n functions.push(linearCurve);\n }\n else {\n curve = (0, bezier_1.makeQuadratic)({\n startX: cur[0],\n startY: cur[1],\n cpx: cur[0] + instruction.cpdx,\n cpy: cur[1] + instruction.cpdy,\n x: cur[0] + instruction.dx,\n y: cur[1] + instruction.dy,\n });\n totalLength += curve.getTotalLength();\n functions.push(curve);\n }\n prev_point = [cur[0] + instruction.cpdx, cur[1] + instruction.cpdy];\n cur = [instruction.dx + cur[0], instruction.dy + cur[1]];\n }\n if (instruction.type === 'T') {\n const prev = instructions[i - 1];\n const prevWasQ = prev.type === 'Q' ||\n prev.type === 'q' ||\n prev.type === 'T' ||\n prev.type === 't';\n if (i > 0 && prevWasQ) {\n curve = (0, bezier_1.makeQuadratic)({\n startX: cur[0],\n startY: cur[1],\n cpx: 2 * cur[0] - prev_point[0],\n cpy: 2 * cur[1] - prev_point[1],\n x: instruction.x,\n y: instruction.y,\n });\n functions.push(curve);\n totalLength += curve.getTotalLength();\n }\n else {\n const linearCurve = (0, linear_1.makeLinearPosition)({\n x0: cur[0],\n x1: instruction.x,\n y0: cur[1],\n y1: instruction.y,\n });\n functions.push(linearCurve);\n totalLength += linearCurve.getTotalLength();\n }\n prev_point = [2 * cur[0] - prev_point[0], 2 * cur[1] - prev_point[1]];\n cur = [instruction.x, instruction.y];\n }\n if (instruction.type === 't') {\n const prev = instructions[i - 1];\n const prevWasQ = prev.type === 'Q' ||\n prev.type === 'q' ||\n prev.type === 'T' ||\n prev.type === 't';\n if (i > 0 && prevWasQ) {\n curve = (0, bezier_1.makeQuadratic)({\n startX: cur[0],\n startY: cur[1],\n cpx: 2 * cur[0] - prev_point[0],\n cpy: 2 * cur[1] - prev_point[1],\n x: cur[0] + instruction.dx,\n y: cur[1] + instruction.dy,\n });\n totalLength += curve.getTotalLength();\n functions.push(curve);\n }\n else {\n const linearCurve = (0, linear_1.makeLinearPosition)({\n x0: cur[0],\n x1: cur[0] + instruction.dx,\n y0: cur[1],\n y1: cur[1] + instruction.dy,\n });\n totalLength += linearCurve.getTotalLength();\n functions.push(linearCurve);\n }\n prev_point = [2 * cur[0] - prev_point[0], 2 * cur[1] - prev_point[1]];\n cur = [instruction.dx + cur[0], instruction.dy + cur[1]];\n }\n if (instruction.type === 'A') {\n const arcCurve = (0, arc_1.makeArc)({\n x0: cur[0],\n y0: cur[1],\n rx: instruction.rx,\n ry: instruction.ry,\n xAxisRotate: instruction.xAxisRotation,\n LargeArcFlag: instruction.largeArcFlag,\n SweepFlag: instruction.sweepFlag,\n x1: instruction.x,\n y1: instruction.y,\n });\n totalLength += arcCurve.getTotalLength();\n cur = [instruction.x, instruction.y];\n functions.push(arcCurve);\n }\n if (instruction.type === 'a') {\n const arcCurve = (0, arc_1.makeArc)({\n x0: cur[0],\n y0: cur[1],\n rx: instruction.rx,\n ry: instruction.ry,\n xAxisRotate: instruction.xAxisRotation,\n LargeArcFlag: instruction.largeArcFlag,\n SweepFlag: instruction.sweepFlag,\n x1: cur[0] + instruction.dx,\n y1: cur[1] + instruction.dy,\n });\n totalLength += arcCurve.getTotalLength();\n cur = [cur[0] + instruction.dx, cur[1] + instruction.dy];\n functions.push(arcCurve);\n }\n partialLengths.push(totalLength);\n }\n return {\n segments,\n initialPoint,\n totalLength,\n partialLengths,\n functions,\n };\n};\nexports.constructFromInstructions = constructFromInstructions;\nconst construct = (string) => {\n const parsed = (0, parse_path_1.parsePath)(string);\n return (0, exports.constructFromInstructions)(parsed);\n};\nexports.construct = construct;\n","\"use strict\";\n// Copied from: https://github.com/rveciana/svg-path-properties\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getLength = void 0;\nconst construct_1 = require(\"./helpers/construct\");\n/**\n * @description Gets the length of an SVG path.\n * @param {string} path A valid SVG path\n * @see [Documentation](https://remotion.dev/docs/paths/get-length)\n */\nconst getLength = (path) => {\n const constructucted = (0, construct_1.construct)(path);\n return constructucted.totalLength;\n};\nexports.getLength = getLength;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.evolvePath = void 0;\nconst get_length_1 = require(\"./get-length\");\n/**\n * @description Animates an SVG from being invisible to it's full length.\n * @param {string} path A valid SVG path\n * @param {number} progress The first valid SVG path\n * @see [Documentation](https://remotion.dev/docs/paths/evolve-path)\n */\nconst evolvePath = (progress, path) => {\n const length = (0, get_length_1.getLength)(path);\n if (progress === 0) {\n // Because Remotion has not the same rounding as the browser, the length may be a bit too short.\n // This causes a browser artifact https://github.com/remotion-dev/remotion/issues/3960\n // But any line inbetween length and length * 2 will be invisible.\n // So we just select the middle I guess!\n const extendedLength = length * 1.5;\n return {\n strokeDasharray: `${extendedLength} ${extendedLength}`,\n strokeDashoffset: extendedLength,\n };\n }\n const strokeDasharray = `${length} ${length}`;\n const strokeDashoffset = length - progress * length;\n return { strokeDasharray, strokeDashoffset };\n};\nexports.evolvePath = evolvePath;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.extendViewBox = void 0;\n/**\n * @description Extends a viewbox in all directions by a scale factor.\n * @param {string} currentViewBox A valid SVG viewBox\n * @see [Documentation](https://remotion.dev/docs/paths/extend-viewbox)\n */\nconst extendViewBox = (currentViewBox, scale) => {\n const relativeScale = scale - 1;\n const splitted = currentViewBox\n .split(' ')\n .map((a) => a.trim())\n .filter((a) => a !== '')\n .map(Number);\n if (splitted.length !== 4) {\n throw new Error(`currentViewBox must be 4 valid numbers, but got \"${currentViewBox}\"`);\n }\n for (const part of splitted) {\n if (Number.isNaN(part)) {\n throw new Error(`currentViewBox must be 4 valid numbers, but got \"${currentViewBox}\"`);\n }\n if (!Number.isFinite(part)) {\n throw new Error(`currentViewBox must be 4 valid numbers, but got \"${currentViewBox}\"`);\n }\n }\n const [x, y, width, height] = splitted;\n return [\n x - (relativeScale * width) / 2,\n y - (relativeScale * height) / 2,\n width + relativeScale * width,\n height + relativeScale * height,\n ].join(' ');\n};\nexports.extendViewBox = extendViewBox;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getInstructionIndexAtLength = exports.getInstructionIndexAtLengthFromConstructed = void 0;\nconst construct_1 = require(\"./helpers/construct\");\nconst getInstructionIndexAtLengthFromConstructed = (constructed, fractionLength) => {\n if (fractionLength < 0) {\n throw new Error('Length less than 0 was passed');\n }\n if (fractionLength > constructed.totalLength) {\n fractionLength = constructed.totalLength;\n }\n let index = constructed.partialLengths.length - 1;\n while (constructed.partialLengths[index] >= fractionLength && index > 0) {\n index--;\n }\n return {\n lengthIntoInstruction: fractionLength - constructed.partialLengths[index],\n index,\n };\n};\nexports.getInstructionIndexAtLengthFromConstructed = getInstructionIndexAtLengthFromConstructed;\n/**\n * @description Gets the index of the instruction and the part length into the instruction at a specified length along an SVG path.\n * @see [Documentation](https://remotion.dev/docs/paths/get-instruction-index-at-length)\n * @param path The SVG path data as a string.\n * @param length The length along the path at which to find the instruction index and the part length into the instruction.\n * @returns {InstructionAtLength} Object containing the index of the instruction and the part length into the instruction at the given length.\n * @throws {Error} If the given length is less than 0 or greater than the total length of the path, or if the path is invalid.\n */\nconst getInstructionIndexAtLength = (path, length) => {\n const constructed = (0, construct_1.construct)(path);\n if (length > constructed.totalLength) {\n throw new Error(`A length of ${length} was passed to getInstructionIndexAtLength() but the total length of the path is only ${constructed.totalLength}`);\n }\n return (0, exports.getInstructionIndexAtLengthFromConstructed)(constructed, length);\n};\nexports.getInstructionIndexAtLength = getInstructionIndexAtLength;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getPointAtLength = void 0;\nconst get_instruction_index_at_length_1 = require(\"./get-instruction-index-at-length\");\nconst construct_1 = require(\"./helpers/construct\");\n/**\n * @description Gets the coordinates of a point which is on an SVG path.\n * @param {string} path A valid SVG path\n * @param {number} length The length at which the point should be sampled\n * @see [Documentation](https://remotion.dev/docs/paths/get-point-at-length)\n */\nconst getPointAtLength = (path, length) => {\n const constructed = (0, construct_1.construct)(path);\n const fractionPart = (0, get_instruction_index_at_length_1.getInstructionIndexAtLengthFromConstructed)(constructed, length);\n const functionAtPart = constructed.functions[fractionPart.index + 1];\n if (functionAtPart) {\n return functionAtPart.getPointAtLength(fractionPart.lengthIntoInstruction);\n }\n if (constructed.initialPoint) {\n return constructed.initialPoint;\n }\n throw new Error('Wrong function at this part.');\n};\nexports.getPointAtLength = getPointAtLength;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getSubpaths = void 0;\nconst construct_1 = require(\"./helpers/construct\");\nconst parse_path_1 = require(\"./parse-path\");\nconst serialize_instructions_1 = require(\"./serialize-instructions\");\n/**\n * @description Splits a valid SVG path into it's parts.\n * @param {string} path A valid SVG path\n * @see [Documentation](https://remotion.dev/docs/paths/get-subpaths)\n */\nconst getSubpaths = (path) => {\n const parsed = (0, parse_path_1.parsePath)(path);\n const { segments } = (0, construct_1.constructFromInstructions)(parsed);\n return segments.map((seg) => {\n return (0, serialize_instructions_1.serializeInstructions)(seg);\n });\n};\nexports.getSubpaths = getSubpaths;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getTangentAtLength = void 0;\nconst get_instruction_index_at_length_1 = require(\"./get-instruction-index-at-length\");\nconst construct_1 = require(\"./helpers/construct\");\n/**\n * @description Gets tangent values x and y of a point which is on an SVG path\n * @param {string} path A valid SVG path\n * @param {number} length The length at which the tangent should be sampled\n * @see [Documentation](https://remotion.dev/docs/paths/get-tangent-at-length)\n */\nconst getTangentAtLength = (path, length) => {\n const constructed = (0, construct_1.construct)(path);\n const fractionPart = (0, get_instruction_index_at_length_1.getInstructionIndexAtLengthFromConstructed)(constructed, length);\n const functionAtPart = constructed.functions[fractionPart.index + 1];\n if (functionAtPart) {\n return functionAtPart.getTangentAtLength(fractionPart.lengthIntoInstruction);\n }\n if (constructed.initialPoint) {\n return { x: 0, y: 0 };\n }\n throw new Error('Wrong function at this part.');\n};\nexports.getTangentAtLength = getTangentAtLength;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getEndPosition = void 0;\nconst getEndPosition = (instructions) => {\n let x = 0;\n let y = 0;\n let moveX = 0;\n let moveY = 0;\n for (let i = 0; i < instructions.length; i++) {\n const instruction = instructions[i];\n if (instruction.type === 'M') {\n moveX = instruction.x;\n moveY = instruction.y;\n }\n else if (instruction.type === 'm') {\n moveX += instruction.dx;\n moveY += instruction.dy;\n }\n if (instruction.type === 'A' ||\n instruction.type === 'C' ||\n instruction.type === 'L' ||\n instruction.type === 'M' ||\n instruction.type === 'Q' ||\n instruction.type === 'S' ||\n instruction.type === 'T') {\n x = instruction.x;\n y = instruction.y;\n continue;\n }\n if (instruction.type === 'a' ||\n instruction.type === 'c' ||\n instruction.type === 'l' ||\n instruction.type === 'm' ||\n instruction.type === 'q' ||\n instruction.type === 's' ||\n instruction.type === 't') {\n x += instruction.dx;\n y += instruction.dy;\n continue;\n }\n if (instruction.type === 'H') {\n x = instruction.x;\n continue;\n }\n if (instruction.type === 'V') {\n y = instruction.y;\n continue;\n }\n if (instruction.type === 'Z') {\n x = moveX;\n y = moveY;\n continue;\n }\n if (instruction.type === 'h') {\n x += instruction.dx;\n continue;\n }\n if (instruction.type === 'v') {\n y += instruction.dy;\n continue;\n }\n // @ts-expect-error\n throw new Error('Unknown instruction type: ' + instruction.type);\n }\n return {\n x,\n y,\n };\n};\nexports.getEndPosition = getEndPosition;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.convertToSameInstructionType = convertToSameInstructionType;\nconst convertToLCommand = (command) => {\n if (command.type === 'M' || command.type === 'L' || command.type === 'Z') {\n throw new Error('unexpected');\n }\n return {\n type: 'L',\n x: command.x,\n y: command.y,\n };\n};\nconst convertToCCommand = (command, currentPoint) => {\n if (command.type === 'M' || command.type === 'C' || command.type === 'Z') {\n throw new Error('unexpected');\n }\n if (command.type === 'L') {\n return {\n type: 'C',\n cp1x: currentPoint.x,\n cp1y: currentPoint.y,\n cp2x: command.x,\n cp2y: command.y,\n x: command.x,\n y: command.y,\n };\n }\n throw new Error('all types should be handled');\n};\n/**\n * Converts command A to have the same type as command B.\n *\n * e.g., L0,5 -> C0,5,0,5,0,5\n *\n * Uses these rules:\n * x1 <- x\n * x2 <- x\n * y1 <- y\n * y2 <- y\n * rx <- 0\n * ry <- 0\n * xAxisRotation <- read from B\n * largeArcFlag <- read from B\n * sweepflag <- read from B\n *\n * @param {Object} aCommand Command object from path `d` attribute\n * @param {Object} bCommand Command object from path `d` attribute to match against\n * @return {Object} aCommand converted to type of bCommand\n */\nfunction convertToSameInstructionType(aCommand, bCommand, currentPoint) {\n if (aCommand.type === 'M' || bCommand.type === 'M') {\n return { ...aCommand };\n }\n if (aCommand.type === bCommand.type) {\n return { ...aCommand };\n }\n if (bCommand.type === 'C') {\n return convertToCCommand(aCommand, currentPoint);\n }\n if (bCommand.type === 'L') {\n return convertToLCommand(aCommand);\n }\n if (bCommand.type === 'Z') {\n return {\n type: 'Z',\n };\n }\n throw new TypeError('unhandled');\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.pointsToInstruction = pointsToInstruction;\nconst convert_q_to_c_instruction_1 = require(\"../helpers/convert-q-to-c-instruction\");\n/**\n * Convert segments represented as points back into a command object\n *\n * @param {Number[][]} points Array of [x,y] points: [start, control1, control2, ..., end]\n * Represents a segment\n * @return {Object} A command object representing the segment.\n */\nfunction pointsToInstruction(points) {\n const x = points[points.length - 1][0];\n const y = points[points.length - 1][1];\n if (points.length === 4) {\n const x1 = points[1][0];\n const y1 = points[1][1];\n const x2 = points[2][0];\n const y2 = points[2][1];\n return {\n type: 'C',\n cp1x: x1,\n cp1y: y1,\n cp2x: x2,\n cp2y: y2,\n x,\n y,\n };\n }\n if (points.length === 3) {\n const x1 = points[1][0];\n const y1 = points[1][1];\n return (0, convert_q_to_c_instruction_1.convertQToCInstruction)({\n type: 'Q',\n cpx: x1,\n cpy: y1,\n x,\n y,\n }, {\n x: points[0][0],\n y: points[0][1],\n });\n }\n return {\n type: 'L',\n x,\n y,\n };\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.decasteljau = decasteljau;\n/**\n * de Casteljau's algorithm for drawing and splitting bezier curves.\n * Inspired by https://pomax.github.io/bezierinfo/\n *\n * @param {Number[][]} points Array of [x,y] points: [start, control1, control2, ..., end]\n * The original segment to split.\n * @param {Number} t Where to split the curve (value between [0, 1])\n * @return {Object} An object { left, right } where left is the segment from 0..t and\n * right is the segment from t..1.\n */\nfunction decasteljau(points, t) {\n const left = [];\n const right = [];\n function decasteljauRecurse(_points, _t) {\n if (_points.length === 1) {\n left.push(_points[0]);\n right.push(_points[0]);\n }\n else {\n const newPoints = Array(_points.length - 1);\n for (let i = 0; i < newPoints.length; i++) {\n if (i === 0) {\n left.push(_points[0]);\n }\n if (i === newPoints.length - 1) {\n right.push(_points[i + 1]);\n }\n newPoints[i] = [\n (1 - _t) * _points[i][0] + _t * _points[i + 1][0],\n (1 - _t) * _points[i][1] + _t * _points[i + 1][1],\n ];\n }\n decasteljauRecurse(newPoints, _t);\n }\n }\n if (points.length) {\n decasteljauRecurse(points, t);\n }\n return { left, right: right.reverse() };\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.splitCurveAsPoints = splitCurveAsPoints;\nconst de_casteljau_1 = require(\"./de-casteljau\");\n/**\n * Runs de Casteljau's algorithm enough times to produce the desired number of segments.\n *\n * @param {Number[][]} points Array of [x,y] points for de Casteljau (the initial segment to split)\n * @param {Number} segmentCount Number of segments to split the original into\n * @return {Number[][][]} Array of segments\n */\nfunction splitCurveAsPoints(points, segmentCount = 2) {\n const segments = [];\n let remainingCurve = points;\n const tIncrement = 1 / segmentCount;\n // x-----x-----x-----x\n // t= 0.33 0.66 1\n // x-----o-----------x\n // r= 0.33\n // x-----o-----x\n // r= 0.5 (0.33 / (1 - 0.33)) === tIncrement / (1 - (tIncrement * (i - 1))\n // x-----x-----x-----x----x\n // t= 0.25 0.5 0.75 1\n // x-----o----------------x\n // r= 0.25\n // x-----o----------x\n // r= 0.33 (0.25 / (1 - 0.25))\n // x-----o----x\n // r= 0.5 (0.25 / (1 - 0.5))\n for (let i = 0; i < segmentCount - 1; i++) {\n const tRelative = tIncrement / (1 - tIncrement * i);\n const split = (0, de_casteljau_1.decasteljau)(remainingCurve, tRelative);\n segments.push(split.left);\n remainingCurve = split.right;\n }\n // last segment is just to the end from the last point\n segments.push(remainingCurve);\n return segments;\n}\n","\"use strict\";\n/*\n\nCopied and adapted from https://github.com/pbeshai/d3-interpolate-path:\nCopyright 2016, Peter Beshai\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without modification,\nare permitted provided that the following conditions are met:\n\n* Redistributions of source code must retain the above copyright notice, this\n list of conditions and the following disclaimer.\n\n* Redistributions in binary form must reproduce the above copyright notice,\n this list of conditions and the following disclaimer in the documentation\n and/or other materials provided with the distribution.\n\n* Neither the name of the author nor the names of contributors may be used to\n endorse or promote products derived from this software without specific prior\n written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\nANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\nWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR\nANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\nLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\nANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\nSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n*/\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.splitCurveInstructions = void 0;\nconst points_to_command_1 = require(\"./points-to-command\");\nconst split_curve_as_points_1 = require(\"./split-curve-as-points\");\n/**\n * Convert command objects to arrays of points, run de Casteljau's algorithm on it\n * to split into to the desired number of segments.\n *\n * @param {Object} commandStart The start command object\n * @param {Object} instructionEnd The end command object\n * @param {Number} segmentCount The number of segments to create\n * @return {Object[]} An array of commands representing the segments in sequence\n */\nconst splitCurveInstructions = (instructionStartX, instructionStartY, instructionEnd, segmentCount) => {\n const points = [[instructionStartX, instructionStartY]];\n if (instructionEnd.type === 'Q') {\n points.push([instructionEnd.cpx, instructionEnd.cpy]);\n }\n if (instructionEnd.type === 'C') {\n points.push([instructionEnd.cp1x, instructionEnd.cp1y]);\n points.push([instructionEnd.cp2x, instructionEnd.cp2y]);\n }\n points.push([instructionEnd.x, instructionEnd.y]);\n return (0, split_curve_as_points_1.splitCurveAsPoints)(points, segmentCount).map((p) => {\n return (0, points_to_command_1.pointsToInstruction)(p);\n });\n};\nexports.splitCurveInstructions = splitCurveInstructions;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.splitSegmentInstructions = splitSegmentInstructions;\nconst split_curve_1 = require(\"./split-curve\");\n/**\n * Interpolate between command objects commandStart and commandEnd segmentCount times.\n * If the types are L, Q, or C then the curves are split as per de Casteljau's algorithm.\n * Otherwise we just copy commandStart segmentCount - 1 times, finally ending with commandEnd.\n *\n * @param {Object} commandStart Command object at the beginning of the segment\n * @param {Object} commandEnd Command object at the end of the segment\n * @param {Number} segmentCount The number of segments to split this into. If only 1\n * Then [commandEnd] is returned.\n * @return {Object[]} Array of ~segmentCount command objects between commandStart and\n * commandEnd. (Can be segmentCount+1 objects if commandStart is type M).\n */\nfunction splitSegmentInstructions(commandStart, commandEnd, segmentCount) {\n let segments = [];\n // line, quadratic bezier, or cubic bezier\n if (commandEnd.type === 'L' || commandEnd.type === 'C') {\n if (commandStart.type !== 'Z') {\n segments = segments.concat((0, split_curve_1.splitCurveInstructions)(commandStart.x, commandStart.y, commandEnd, segmentCount));\n }\n // general case - just copy the same point\n }\n else {\n const copyCommand = commandStart.type === 'M'\n ? {\n type: 'L',\n x: commandStart.x,\n y: commandStart.y,\n }\n : commandStart;\n segments = segments.concat(new Array(segmentCount - 1).fill(true).map(() => copyCommand));\n segments.push(commandEnd);\n }\n return segments;\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.extendInstruction = extendInstruction;\nconst split_segment_1 = require(\"./split-segment\");\n/**\n * Extends an array of commandsToExtend to the length of the referenceCommands by\n * splitting segments until the number of commands match. Ensures all the actual\n * points of commandsToExtend are in the extended array.\n *\n * @param {Object[]} commandsToExtend The command object array to extend\n * @param {Object[]} referenceCommands The command object array to match in length\n * @return {Object[]} The extended commandsToExtend array\n */\nfunction extendInstruction(commandsToExtend, referenceCommands) {\n // compute insertion points:\n // number of segments in the path to extend\n const numSegmentsToExtend = commandsToExtend.length - 1;\n // number of segments in the reference path.\n const numReferenceSegments = referenceCommands.length - 1;\n // this value is always between [0, 1].\n const segmentRatio = numSegmentsToExtend / numReferenceSegments;\n // create a map, mapping segments in referenceCommands to how many points\n // should be added in that segment (should always be >= 1 since we need each\n // point itself).\n // 0 = segment 0-1, 1 = segment 1-2, n-1 = last vertex\n const countPointsPerSegment = new Array(numReferenceSegments)\n .fill(undefined)\n .reduce((accum, _d, i) => {\n const insertIndex = Math.floor(segmentRatio * i);\n accum[insertIndex] = (accum[insertIndex] || 0) + 1;\n return accum;\n }, []);\n // extend each segment to have the correct number of points for a smooth interpolation\n const extended = countPointsPerSegment.reduce((_extended, segmentCount, i) => {\n // if last command, just add `segmentCount` number of times\n if (i === commandsToExtend.length - 1) {\n const lastCommandCopies = new Array(segmentCount).fill({\n ...commandsToExtend[commandsToExtend.length - 1],\n });\n // convert M to L\n if (lastCommandCopies[0].type === 'M') {\n lastCommandCopies.forEach((d) => {\n d.type = 'L';\n });\n }\n return _extended.concat(lastCommandCopies);\n }\n // otherwise, split the segment segmentCount times.\n return _extended.concat((0, split_segment_1.splitSegmentInstructions)(commandsToExtend[i], commandsToExtend[i + 1], segmentCount));\n }, []);\n // add in the very first point since splitSegment only adds in the ones after it\n extended.unshift(commandsToExtend[0]);\n return extended;\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.interpolateInstructionOfSameKind = void 0;\nconst interpolateLInstruction = (t, first, second) => {\n return {\n type: 'L',\n x: (1 - t) * first.x + t * second.x,\n y: (1 - t) * first.y + t * second.y,\n };\n};\nconst interpolateCInstructions = (t, first, second) => {\n return {\n type: 'C',\n cp1x: (1 - t) * first.cp1x + t * second.cp1x,\n cp2x: (1 - t) * first.cp2x + t * second.cp2x,\n cp1y: (1 - t) * first.cp1y + t * second.cp1y,\n cp2y: (1 - t) * first.cp2y + t * second.cp2y,\n x: (1 - t) * first.x + t * second.x,\n y: (1 - t) * first.y + t * second.y,\n };\n};\nconst interpolateMInstructions = (t, first, second) => {\n return {\n type: 'M',\n x: (1 - t) * first.x + t * second.x,\n y: (1 - t) * first.y + t * second.y,\n };\n};\nconst interpolateInstructionOfSameKind = (t, first, second) => {\n if (first.type === 'L') {\n if (second.type !== 'L') {\n throw new Error('mismatch');\n }\n return interpolateLInstruction(t, first, second);\n }\n if (first.type === 'C') {\n if (second.type !== 'C') {\n throw new Error('mismatch');\n }\n return interpolateCInstructions(t, first, second);\n }\n if (first.type === 'M') {\n if (second.type !== 'M') {\n throw new Error('mismatch');\n }\n return interpolateMInstructions(t, first, second);\n }\n if (first.type === 'Z') {\n if (second.type !== 'Z') {\n throw new Error('mismatch');\n }\n return {\n type: 'Z',\n };\n }\n throw new Error('mismatch');\n};\nexports.interpolateInstructionOfSameKind = interpolateInstructionOfSameKind;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.interpolateInstructions = interpolateInstructions;\nconst get_end_position_1 = require(\"../get-end-position\");\nconst convert_to_same_instruction_type_1 = require(\"./convert-to-same-instruction-type\");\nconst extend_command_1 = require(\"./extend-command\");\nconst interpolate_instruction_of_same_kind_1 = require(\"./interpolate-instruction-of-same-kind\");\n/**\n * Interpolate from A to B by extending A and B during interpolation to have\n * the same number of points. This allows for a smooth transition when they\n * have a different number of points.\n *\n * Ignores the `Z` command in paths unless both A and B end with it.\n *\n * This function works directly with arrays of command objects instead of with\n * path `d` strings (see interpolatePath for working with `d` strings).\n *\n * @param {Object[]} aCommandsInput Array of path commands\n * @param {Object[]} bCommandsInput Array of path commands\n * @returns {Function} Interpolation function that maps t ([0, 1]) to an array of path commands.\n */\nfunction interpolateInstructions(aCommandsInput, bCommandsInput) {\n // make a copy so we don't mess with the input arrays\n let aCommands = aCommandsInput.slice();\n let bCommands = bCommandsInput.slice();\n // both input sets are empty, so we don't interpolate\n if (!aCommands.length && !bCommands.length) {\n return function () {\n return [];\n };\n }\n // do we add Z during interpolation? yes if both have it. (we'd expect both to have it or not)\n const addZ = (aCommands.length === 0 || aCommands[aCommands.length - 1].type === 'Z') &&\n (bCommands.length === 0 || bCommands[bCommands.length - 1].type === 'Z');\n // we temporarily remove Z\n if (aCommands.length > 0 && aCommands[aCommands.length - 1].type === 'Z') {\n aCommands.pop();\n }\n if (bCommands.length > 0 && bCommands[bCommands.length - 1].type === 'Z') {\n bCommands.pop();\n }\n // if A is empty, treat it as if it used to contain just the first point\n // of B. This makes it so the line extends out of from that first point.\n if (!aCommands.length) {\n aCommands.push(bCommands[0]);\n // otherwise if B is empty, treat it as if it contains the first point\n // of A. This makes it so the line retracts into the first point.\n }\n else if (!bCommands.length) {\n bCommands.push(aCommands[0]);\n }\n // extend to match equal size\n const numPointsToExtend = Math.abs(bCommands.length - aCommands.length);\n if (numPointsToExtend !== 0) {\n // B has more points than A, so add points to A before interpolating\n if (bCommands.length > aCommands.length) {\n aCommands = (0, extend_command_1.extendInstruction)(aCommands, bCommands);\n // else if A has more points than B, add more points to B\n }\n else if (bCommands.length < aCommands.length) {\n bCommands = (0, extend_command_1.extendInstruction)(bCommands, aCommands);\n }\n }\n // commands have same length now.\n // convert commands in A to the same type as those in B\n const aSameType = aCommands.map((aCommand, i) => {\n const commandsUntilNow = aCommands.slice(0, i);\n const point = (0, get_end_position_1.getEndPosition)(commandsUntilNow);\n return (0, convert_to_same_instruction_type_1.convertToSameInstructionType)(aCommand, bCommands[i], point);\n });\n const interpolatedCommands = [];\n if (addZ) {\n aSameType.push({ type: 'Z' }); // required for when returning at t == 0\n bCommands.push({ type: 'Z' });\n }\n return function (t) {\n // at 1 return the final value without the extensions used during interpolation\n if (t === 1) {\n return bCommandsInput;\n }\n // work with aCommands directly since interpolatedCommands are mutated\n if (t === 0) {\n return aSameType;\n }\n // interpolate the commands using the mutable interpolated command objs\n for (let i = 0; i < aSameType.length; ++i) {\n interpolatedCommands.push((0, interpolate_instruction_of_same_kind_1.interpolateInstructionOfSameKind)(t, aSameType[i], bCommands[i]));\n }\n return interpolatedCommands;\n };\n}\n","\"use strict\";\n/*\n\nCopied and adapted from https://github.com/pbeshai/d3-interpolate-path:\nCopyright 2016, Peter Beshai\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without modification,\nare permitted provided that the following conditions are met:\n\n* Redistributions of source code must retain the above copyright notice, this\n list of conditions and the following disclaimer.\n\n* Redistributions in binary form must reproduce the above copyright notice,\n this list of conditions and the following disclaimer in the documentation\n and/or other materials provided with the distribution.\n\n* Neither the name of the author nor the names of contributors may be used to\n endorse or promote products derived from this software without specific prior\n written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\nANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\nWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR\nANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\nLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\nANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\nSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n*/\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.interpolatePath = void 0;\nconst parse_path_1 = require(\"../parse-path\");\nconst reduce_instructions_1 = require(\"../reduce-instructions\");\nconst serialize_instructions_1 = require(\"../serialize-instructions\");\nconst interpolate_instructions_1 = require(\"./interpolate-instructions\");\n/**\n * @description Interpolates between two SVG paths.\n * @param {number} value A number - 0 means first path, 1 means second path, any other values will be interpolated\n * @param {string} firstPath The first valid SVG path\n * @param {string} secondPath The second valid SVG path\n * @see [Documentation](https://remotion.dev/docs/paths/interpolate-path)\n */\nconst interpolatePath = (value, firstPath, secondPath) => {\n // at 1 return the final value without the extensions used during interpolation\n if (value === 1) {\n return secondPath;\n }\n if (value === 0) {\n return firstPath;\n }\n const aCommands = (0, reduce_instructions_1.reduceInstructions)((0, parse_path_1.parsePath)(firstPath));\n if (aCommands.length === 0) {\n throw new TypeError(`SVG Path \"${firstPath}\" is not valid`);\n }\n const bCommands = (0, reduce_instructions_1.reduceInstructions)((0, parse_path_1.parsePath)(secondPath));\n if (bCommands.length === 0) {\n throw new TypeError(`SVG Path \"${secondPath}\" is not valid`);\n }\n const commandInterpolator = (0, interpolate_instructions_1.interpolateInstructions)(aCommands, bCommands);\n return (0, serialize_instructions_1.serializeInstructions)(commandInterpolator(value));\n};\nexports.interpolatePath = interpolatePath;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.translatePath = exports.translateSegments = void 0;\nconst parse_path_1 = require(\"./parse-path\");\nconst serialize_instructions_1 = require(\"./serialize-instructions\");\nconst translateSegments = (segments, x, y) => {\n return segments.map((segment) => {\n // Shift coords only for commands with absolute values\n if (segment.type === 'a' ||\n segment.type === 'c' ||\n segment.type === 'v' ||\n segment.type === 's' ||\n segment.type === 'h' ||\n segment.type === 'l' ||\n segment.type === 'm' ||\n segment.type === 'q' ||\n segment.type === 't') {\n return segment;\n }\n // V is the only command, with shifted coords parity\n if (segment.type === 'V') {\n return {\n type: 'V',\n y: segment.y + y,\n };\n }\n if (segment.type === 'H') {\n return {\n type: 'H',\n x: segment.x + x,\n };\n }\n // ARC is: ['A', rx, ry, x-axis-rotation, large-arc-flag, sweep-flag, x, y]\n // touch x, y only\n if (segment.type === 'A') {\n return {\n type: 'A',\n rx: segment.rx,\n ry: segment.ry,\n largeArcFlag: segment.largeArcFlag,\n sweepFlag: segment.sweepFlag,\n xAxisRotation: segment.xAxisRotation,\n x: segment.x + x,\n y: segment.y + y,\n };\n }\n if (segment.type === 'Z') {\n return segment;\n }\n if (segment.type === 'C') {\n return {\n type: 'C',\n cp1x: segment.cp1x + x,\n cp1y: segment.cp1y + y,\n cp2x: segment.cp2x + x,\n cp2y: segment.cp2y + y,\n x: segment.x + x,\n y: segment.y + y,\n };\n }\n if (segment.type === 'Q') {\n return {\n type: 'Q',\n cpx: segment.cpx + x,\n cpy: segment.cpy + y,\n x: segment.x + x,\n y: segment.y + y,\n };\n }\n if (segment.type === 'S') {\n return {\n type: 'S',\n cpx: segment.cpx + x,\n cpy: segment.cpy + y,\n x: segment.x + x,\n y: segment.y + y,\n };\n }\n if (segment.type === 'T') {\n return {\n type: 'T',\n x: segment.x + x,\n y: segment.y + y,\n };\n }\n if (segment.type === 'L') {\n return {\n type: 'L',\n x: segment.x + x,\n y: segment.y + y,\n };\n }\n if (segment.type === 'M') {\n return {\n type: 'M',\n x: segment.x + x,\n y: segment.y + y,\n };\n }\n // @ts-expect-error\n throw new Error(`Unknown segment type: ${segment.type}`);\n });\n};\nexports.translateSegments = translateSegments;\n/**\n * @description Translates the path by the given x and y coordinates.\n * @param {string} path the originalSVG path\n * @param {Number} x the amount of horizontal translation\n * @param {Number} y the amount of vertical translation\n * @returns a new string containing a path, if it is valid\n * @see [Documentation](https://www.remotion.dev/docs/paths/translate-path)\n */\nconst translatePath = (path, x, y) => {\n return (0, serialize_instructions_1.serializeInstructions)((0, exports.translateSegments)((0, parse_path_1.parsePath)(path), x, y));\n};\nexports.translatePath = translatePath;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.resetPath = void 0;\nconst get_bounding_box_1 = require(\"./get-bounding-box\");\nconst translate_path_1 = require(\"./translate-path\");\n/**\n * @description Translates an SVG path so that the top-left corner of the bounding box is at 0, 0.\n * @param {string} d a valid SVG path\n * @see [Documentation](https://www.remotion.dev/docs/paths/reset-path)\n */\nconst resetPath = (d) => {\n const box = (0, get_bounding_box_1.getBoundingBox)(d);\n return (0, translate_path_1.translatePath)(d, -box.x1, -box.y1);\n};\nexports.resetPath = resetPath;\n","\"use strict\";\n/**\n * https://github.com/Pomax/svg-path-reverse\n *\n * This code is in the public domain, except in jurisdictions that do\n * not recognise the public domain, where this code is MIT licensed.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.reversePath = void 0;\nconst construct_1 = require(\"./helpers/construct\");\nconst normalize_path_1 = require(\"./normalize-path\");\nconst parse_path_1 = require(\"./parse-path\");\nconst reduce_instructions_1 = require(\"./reduce-instructions\");\nconst serialize_instructions_1 = require(\"./serialize-instructions\");\nfunction reverseNormalizedPath(instructions) {\n const reversed = [];\n let nextX = 0;\n let nextY = 0;\n for (const term of instructions) {\n if (term.type === 'A') {\n reversed.unshift({\n type: 'A',\n largeArcFlag: term.largeArcFlag,\n rx: term.rx,\n ry: term.ry,\n xAxisRotation: term.xAxisRotation,\n sweepFlag: !term.sweepFlag,\n x: nextX,\n y: nextY,\n });\n }\n else if (term.type === 'C') {\n reversed.unshift({\n type: 'C',\n cp1x: term.cp2x,\n cp1y: term.cp2y,\n cp2x: term.cp1x,\n cp2y: term.cp1y,\n x: nextX,\n y: nextY,\n });\n }\n else if (term.type === 'Q') {\n reversed.unshift({\n type: 'Q',\n cpx: term.cpx,\n cpy: term.cpy,\n x: nextX,\n y: nextY,\n });\n }\n else if (term.type === 'L') {\n reversed.unshift({\n type: 'L',\n x: nextX,\n y: nextY,\n });\n // Do nothing\n }\n else if (term.type === 'M') {\n // Do nothing\n }\n else if (term.type === 'Z') {\n // Do nothing\n }\n else {\n throw new Error('unnormalized instruction ' + term.type);\n }\n if (term.type !== 'Z') {\n nextX = term.x;\n nextY = term.y;\n }\n }\n reversed.unshift({\n type: 'M',\n x: nextX,\n y: nextY,\n });\n let revstring = (0, serialize_instructions_1.serializeInstructions)(reversed);\n if (instructions[instructions.length - 1].type === 'Z')\n revstring += 'Z';\n revstring = revstring.replace(/M M/g, 'Z M');\n return revstring;\n}\n/**\n * @description Reverses a path so the end and start are switched.\n * @param {string} path A valid SVG path\n * @see [Documentation](https://remotion.dev/docs/paths/reverse-path)\n */\nconst reversePath = (path) => {\n const parsed = (0, parse_path_1.parsePath)(path);\n const normalized = (0, normalize_path_1.normalizeInstructions)(parsed);\n const reduced = (0, reduce_instructions_1.reduceInstructions)(normalized);\n const { segments } = (0, construct_1.constructFromInstructions)(reduced);\n return segments\n .map((spath) => {\n return reverseNormalizedPath(spath);\n })\n .join(' ')\n .replace(/ +/g, ' ')\n .trim();\n};\nexports.reversePath = reversePath;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.scalePath = void 0;\nconst get_bounding_box_1 = require(\"./get-bounding-box\");\nconst parse_path_1 = require(\"./parse-path\");\nconst reduce_instructions_1 = require(\"./reduce-instructions\");\nconst serialize_instructions_1 = require(\"./serialize-instructions\");\nconst translate_path_1 = require(\"./translate-path\");\n/**\n * @description Allows you to grow or shrink the size of a path.\n * @param {string} path A valid SVG path\n * @param {string} d\n * @param {Number} scaleX\n * @param {Number} scaleY\n * @returns a new path with respect to the scale values provided\n * @see [Documentation](https://www.remotion.dev/docs/paths/scale-path)\n */\nconst scalePath = (d, scaleX, scaleY) => {\n const reduced = (0, reduce_instructions_1.reduceInstructions)((0, parse_path_1.parsePath)(d));\n const bounded = (0, get_bounding_box_1.getBoundingBoxFromInstructions)(reduced);\n const zeroed = (0, translate_path_1.translateSegments)(reduced, -bounded.x1, -bounded.y1);\n const mapped = zeroed.map((instruction) => {\n if (instruction.type === 'L') {\n return {\n type: 'L',\n x: scaleX * instruction.x,\n y: scaleY * instruction.y,\n };\n }\n if (instruction.type === 'C') {\n return {\n type: 'C',\n x: scaleX * instruction.x,\n y: scaleY * instruction.y,\n cp1x: scaleX * instruction.cp1x,\n cp1y: scaleY * instruction.cp1y,\n cp2x: scaleX * instruction.cp2x,\n cp2y: scaleY * instruction.cp2y,\n };\n }\n if (instruction.type === 'M') {\n return {\n type: 'M',\n x: scaleX * instruction.x,\n y: scaleY * instruction.y,\n };\n }\n if (instruction.type === 'Q') {\n return {\n type: 'Q',\n x: scaleX * instruction.x,\n y: scaleY * instruction.y,\n cpx: scaleX * instruction.cpx,\n cpy: scaleY * instruction.cpy,\n };\n }\n if (instruction.type === 'Z') {\n return {\n type: 'Z',\n };\n }\n if (instruction.type === 'A') {\n return {\n type: 'A',\n largeArcFlag: instruction.largeArcFlag,\n rx: scaleX * instruction.rx,\n ry: scaleY * instruction.ry,\n sweepFlag: instruction.sweepFlag,\n xAxisRotation: instruction.xAxisRotation,\n x: scaleX * instruction.x,\n y: scaleY * instruction.y,\n };\n }\n if (instruction.type === 'H') {\n return {\n type: 'H',\n x: scaleX * instruction.x,\n };\n }\n if (instruction.type === 'S') {\n return {\n type: 'S',\n cpx: scaleX * instruction.cpx,\n cpy: scaleY * instruction.cpy,\n x: scaleX * instruction.x,\n y: scaleY * instruction.y,\n };\n }\n if (instruction.type === 'T') {\n return {\n type: 'T',\n x: scaleX * instruction.x,\n y: scaleY * instruction.y,\n };\n }\n if (instruction.type === 'V') {\n return {\n type: 'V',\n y: scaleY * instruction.y,\n };\n }\n if (instruction.type === 'a') {\n return {\n type: 'a',\n dx: scaleX * instruction.dx,\n dy: scaleY * instruction.dy,\n largeArcFlag: instruction.largeArcFlag,\n rx: scaleX * instruction.rx,\n ry: scaleY * instruction.ry,\n sweepFlag: instruction.sweepFlag,\n xAxisRotation: instruction.xAxisRotation,\n };\n }\n if (instruction.type === 'c') {\n return {\n type: 'c',\n cp1dx: scaleX * instruction.cp1dx,\n cp1dy: scaleY * instruction.cp1dy,\n cp2dx: scaleX * instruction.cp2dx,\n cp2dy: scaleY * instruction.cp2dy,\n dx: scaleX * instruction.dx,\n dy: scaleY * instruction.dy,\n };\n }\n if (instruction.type === 'h') {\n return {\n type: 'h',\n dx: scaleX * instruction.dx,\n };\n }\n if (instruction.type === 'l') {\n return {\n type: 'l',\n dx: scaleX * instruction.dx,\n dy: scaleY * instruction.dy,\n };\n }\n if (instruction.type === 'm') {\n return {\n type: 'm',\n dx: scaleX * instruction.dx,\n dy: scaleY * instruction.dy,\n };\n }\n if (instruction.type === 'q') {\n return {\n type: 'q',\n cpdx: scaleX * instruction.cpdx,\n cpdy: scaleY * instruction.cpdy,\n dx: scaleX * instruction.dx,\n dy: scaleY * instruction.dy,\n };\n }\n if (instruction.type === 's') {\n return {\n type: 's',\n cpdx: scaleX * instruction.cpdx,\n cpdy: scaleY * instruction.cpdy,\n dx: scaleX * instruction.dx,\n dy: scaleY * instruction.dy,\n };\n }\n if (instruction.type === 't') {\n return {\n type: 't',\n dx: scaleX * instruction.dx,\n dy: scaleY * instruction.dy,\n };\n }\n if (instruction.type === 'v') {\n return {\n type: 'v',\n dy: scaleY * instruction.dy,\n };\n }\n throw new Error('unexpected function');\n });\n return (0, serialize_instructions_1.serializeInstructions)((0, translate_path_1.translateSegments)(mapped, bounded.x1, bounded.y1));\n};\nexports.scalePath = scalePath;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.fixZInstruction = exports.warpTransform = void 0;\nexports.svgPathInterpolate = svgPathInterpolate;\nconst convert_q_to_c_instruction_1 = require(\"../helpers/convert-q-to-c-instruction\");\nconst euclideanDistance = (points) => {\n const startPoint = points[0];\n const endPoint = points[points.length - 1];\n let d2 = 0;\n for (let i = 0; i < startPoint.length; i++) {\n const d = endPoint[i] - startPoint[i];\n d2 += d ** 2;\n }\n return Math.sqrt(d2);\n};\nfunction split(p, t = 0.5) {\n const seg0 = [];\n const seg1 = [];\n const orders = [p];\n while (orders.length < p.length) {\n const q = orders[orders.length - 1];\n const r = [];\n for (let i = 1; i < q.length; i++) {\n const q0 = q[i - 1];\n const q1 = q[i];\n const s = [];\n const dim = Math.max(q0.length, q1.length);\n for (let j = 0; j < dim; j++) {\n const s0 = q0[j] || 0;\n const s1 = q1[j] || 0;\n s.push(s0 + (s1 - s0) * t);\n }\n r.push(s);\n }\n orders.push(r);\n }\n for (let i = 0; i < orders.length; i++) {\n seg0.push(orders[i][0]);\n seg1.push(orders[orders.length - 1 - i][i]);\n }\n return [seg0, seg1];\n}\nfunction interpolateUntil(points, threshold, deltaFunction = euclideanDistance) {\n const stack = [points];\n const segments = [];\n while (stack.length > 0) {\n const currentPoints = stack.pop();\n if (deltaFunction(currentPoints) > threshold) {\n const newPoints = split(currentPoints);\n // Add new segments backwards so they end up in correct order\n for (let i = newPoints.length - 1; i >= 0; i--) {\n stack.push(newPoints[i]);\n }\n }\n else {\n segments.push(currentPoints);\n }\n }\n return segments;\n}\nfunction createLineSegment(points) {\n switch (points.length) {\n case 2:\n return {\n type: 'L',\n x: points[1][0],\n y: points[1][1],\n };\n case 3:\n return (0, convert_q_to_c_instruction_1.convertQToCInstruction)({\n type: 'Q',\n cpx: points[1][0],\n cpy: points[1][1],\n x: points[2][0],\n y: points[2][1],\n }, {\n x: points[0][0],\n y: points[0][1],\n });\n case 4:\n return {\n type: 'C',\n cp1x: points[1][0],\n cp1y: points[1][1],\n cp2x: points[2][0],\n cp2y: points[2][1],\n x: points[3][0],\n y: points[3][1],\n };\n default:\n throw new Error('Expected 2, 3 or 4 points for a line segment, got ' + points.length);\n }\n}\nfunction warpInterpolate(path, threshold, deltaFunction) {\n let prexX = 0;\n let prexY = 0;\n return path\n .map((segment) => {\n const points = [[prexX, prexY]];\n if (segment.type !== 'Z') {\n prexX = segment.x;\n prexY = segment.y;\n }\n if (segment.type === 'C') {\n points.push([segment.cp1x, segment.cp1y]);\n points.push([segment.cp2x, segment.cp2y]);\n points.push([segment.x, segment.y]);\n }\n if (segment.type === 'L') {\n points.push([segment.x, segment.y]);\n }\n if (segment.type === 'C' || segment.type === 'L') {\n return interpolateUntil(points, threshold, deltaFunction).map((rawSegment) => createLineSegment(rawSegment));\n }\n return [segment];\n })\n .flat(1);\n}\nfunction svgPathInterpolate(path, threshold) {\n let didWork = false;\n const deltaFunction = (points) => {\n const linearPoints = [\n points[0].slice(0, 2),\n points[points.length - 1].slice(0, 2),\n ];\n const delta = euclideanDistance(linearPoints);\n didWork = didWork || delta > threshold;\n return delta;\n };\n return warpInterpolate(path, threshold, deltaFunction);\n}\nconst warpTransform = (path, transformer) => {\n return path\n .map((segment) => {\n if (segment.type === 'L') {\n const { x, y } = transformer({ x: segment.x, y: segment.y });\n return [\n {\n type: 'L',\n x,\n y,\n },\n ];\n }\n if (segment.type === 'C') {\n const { x, y } = transformer({ x: segment.x, y: segment.y });\n const { x: cp1x, y: cp1y } = transformer({\n x: segment.cp1x,\n y: segment.cp1y,\n });\n const { x: cp2x, y: cp2y } = transformer({\n x: segment.cp2x,\n y: segment.cp2y,\n });\n return [\n {\n type: 'C',\n x,\n y,\n cp1x,\n cp1y,\n cp2x,\n cp2y,\n },\n ];\n }\n if (segment.type === 'M') {\n const { x, y } = transformer({ x: segment.x, y: segment.y });\n return [\n {\n type: 'M',\n x,\n y,\n },\n ];\n }\n return [segment];\n })\n .flat(1);\n};\nexports.warpTransform = warpTransform;\n// Add a line from second to last point to last point and then keep Z so it can be transformed as well\nconst fixZInstruction = (instructions) => {\n let prevX = 0;\n let prevY = 0;\n return instructions\n .map((instruction) => {\n if (instruction.type === 'Z') {\n return [\n {\n type: 'L',\n x: prevX,\n y: prevY,\n },\n {\n type: 'Z',\n },\n ];\n }\n if (instruction.type === 'M') {\n prevX = instruction.x;\n prevY = instruction.y;\n }\n return [instruction];\n })\n .flat(1);\n};\nexports.fixZInstruction = fixZInstruction;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.warpPath = void 0;\nconst get_bounding_box_1 = require(\"../get-bounding-box\");\nconst parse_path_1 = require(\"../parse-path\");\nconst reduce_instructions_1 = require(\"../reduce-instructions\");\nconst serialize_instructions_1 = require(\"../serialize-instructions\");\nconst warp_helpers_1 = require(\"./warp-helpers\");\nconst getDefaultInterpolationThreshold = (instructions) => {\n const boundingBox = (0, get_bounding_box_1.getBoundingBoxFromInstructions)(instructions);\n const longer = Math.max(boundingBox.y2 - boundingBox.y1, boundingBox.x2 - boundingBox.x1);\n return longer * 0.01;\n};\n/**\n * @description This function works by splitting SVG instructions into many smaller SVG instructions and then remapping the coordinates of each instruction.\n * @param {string} path an SVG path string\n * @see [Documentation](https://www.remotion.dev/docs/paths/warp-path)\n */\nconst warpPath = (path, transformer, options) => {\n var _a;\n const reduced = (0, reduce_instructions_1.reduceInstructions)((0, parse_path_1.parsePath)(path));\n const withZFix = (0, warp_helpers_1.fixZInstruction)(reduced);\n const interpolated = (0, warp_helpers_1.svgPathInterpolate)(withZFix, (_a = options === null || options === void 0 ? void 0 : options.interpolationThreshold) !== null && _a !== void 0 ? _a : getDefaultInterpolationThreshold(withZFix));\n return (0, serialize_instructions_1.serializeInstructions)((0, warp_helpers_1.warpTransform)(interpolated, transformer));\n};\nexports.warpPath = warpPath;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.PathInternals = exports.warpPath = exports.translatePath = exports.serializeInstructions = exports.scalePath = exports.reversePath = exports.resetPath = exports.reduceInstructions = exports.parsePath = exports.normalizePath = exports.interpolatePath = exports.getTangentAtLength = exports.getSubpaths = exports.getPointAtLength = exports.getLength = exports.getInstructionIndexAtLength = exports.getBoundingBox = exports.extendViewBox = exports.evolvePath = void 0;\nconst cut_path_1 = require(\"./cut-path\");\nconst debug_path_1 = require(\"./debug-path\");\nconst get_bounding_box_1 = require(\"./get-bounding-box\");\nvar evolve_path_1 = require(\"./evolve-path\");\nObject.defineProperty(exports, \"evolvePath\", { enumerable: true, get: function () { return evolve_path_1.evolvePath; } });\nvar extend_viewbox_1 = require(\"./extend-viewbox\");\nObject.defineProperty(exports, \"extendViewBox\", { enumerable: true, get: function () { return extend_viewbox_1.extendViewBox; } });\nvar get_bounding_box_2 = require(\"./get-bounding-box\");\nObject.defineProperty(exports, \"getBoundingBox\", { enumerable: true, get: function () { return get_bounding_box_2.getBoundingBox; } });\nvar get_instruction_index_at_length_1 = require(\"./get-instruction-index-at-length\");\nObject.defineProperty(exports, \"getInstructionIndexAtLength\", { enumerable: true, get: function () { return get_instruction_index_at_length_1.getInstructionIndexAtLength; } });\nvar get_length_1 = require(\"./get-length\");\nObject.defineProperty(exports, \"getLength\", { enumerable: true, get: function () { return get_length_1.getLength; } });\nvar get_point_at_length_1 = require(\"./get-point-at-length\");\nObject.defineProperty(exports, \"getPointAtLength\", { enumerable: true, get: function () { return get_point_at_length_1.getPointAtLength; } });\nvar get_subpaths_1 = require(\"./get-subpaths\");\nObject.defineProperty(exports, \"getSubpaths\", { enumerable: true, get: function () { return get_subpaths_1.getSubpaths; } });\nvar get_tangent_at_length_1 = require(\"./get-tangent-at-length\");\nObject.defineProperty(exports, \"getTangentAtLength\", { enumerable: true, get: function () { return get_tangent_at_length_1.getTangentAtLength; } });\nvar interpolate_path_1 = require(\"./interpolate-path/interpolate-path\");\nObject.defineProperty(exports, \"interpolatePath\", { enumerable: true, get: function () { return interpolate_path_1.interpolatePath; } });\nvar normalize_path_1 = require(\"./normalize-path\");\nObject.defineProperty(exports, \"normalizePath\", { enumerable: true, get: function () { return normalize_path_1.normalizePath; } });\nvar parse_path_1 = require(\"./parse-path\");\nObject.defineProperty(exports, \"parsePath\", { enumerable: true, get: function () { return parse_path_1.parsePath; } });\nvar reduce_instructions_1 = require(\"./reduce-instructions\");\nObject.defineProperty(exports, \"reduceInstructions\", { enumerable: true, get: function () { return reduce_instructions_1.reduceInstructions; } });\nvar reset_path_1 = require(\"./reset-path\");\nObject.defineProperty(exports, \"resetPath\", { enumerable: true, get: function () { return reset_path_1.resetPath; } });\nvar reverse_path_1 = require(\"./reverse-path\");\nObject.defineProperty(exports, \"reversePath\", { enumerable: true, get: function () { return reverse_path_1.reversePath; } });\nvar scale_path_1 = require(\"./scale-path\");\nObject.defineProperty(exports, \"scalePath\", { enumerable: true, get: function () { return scale_path_1.scalePath; } });\nvar serialize_instructions_1 = require(\"./serialize-instructions\");\nObject.defineProperty(exports, \"serializeInstructions\", { enumerable: true, get: function () { return serialize_instructions_1.serializeInstructions; } });\nvar translate_path_1 = require(\"./translate-path\");\nObject.defineProperty(exports, \"translatePath\", { enumerable: true, get: function () { return translate_path_1.translatePath; } });\nvar warp_path_1 = require(\"./warp-path\");\nObject.defineProperty(exports, \"warpPath\", { enumerable: true, get: function () { return warp_path_1.warpPath; } });\nexports.PathInternals = {\n getBoundingBoxFromInstructions: get_bounding_box_1.getBoundingBoxFromInstructions,\n debugPath: debug_path_1.debugPath,\n cutPath: cut_path_1.cutPath,\n};\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.makeCircle = void 0;\nconst paths_1 = require(\"@remotion/paths\");\n/**\n * @description Generates a circle SVG path.\n * @param {Number} radius The radius of the circle.\n * @see [Documentation](https://www.remotion.dev/docs/shapes/make-circle)\n */\nconst makeCircle = ({ radius }) => {\n const instructions = [\n {\n type: 'M',\n x: radius,\n y: 0,\n },\n {\n type: 'a',\n rx: radius,\n ry: radius,\n xAxisRotation: 0,\n largeArcFlag: true,\n sweepFlag: true,\n dx: 0,\n dy: radius * 2,\n },\n {\n type: 'a',\n rx: radius,\n ry: radius,\n xAxisRotation: 0,\n largeArcFlag: true,\n sweepFlag: true,\n dx: 0,\n dy: -radius * 2,\n },\n {\n type: 'Z',\n },\n ];\n const path = (0, paths_1.serializeInstructions)(instructions);\n return {\n height: radius * 2,\n width: radius * 2,\n path,\n instructions,\n transformOrigin: `${radius} ${radius}`,\n };\n};\nexports.makeCircle = makeCircle;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.doesReactSupportTransformOriginProperty = void 0;\nconst doesReactSupportTransformOriginProperty = (version) => {\n if (version.includes('canary') || version.includes('experimental')) {\n const last8Chars = parseInt(version.slice(-8), 10);\n return last8Chars > 20230209;\n }\n const [major] = version.split('.').map(Number);\n return major > 18;\n};\nexports.doesReactSupportTransformOriginProperty = doesReactSupportTransformOriginProperty;\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.RenderSvg = void 0;\nconst jsx_runtime_1 = require(\"react/jsx-runtime\");\nconst react_1 = __importStar(require(\"react\"));\nconst react_dom_1 = require(\"react-dom\");\nconst does_react_support_canary_1 = require(\"../utils/does-react-support-canary\");\nconst RenderSvg = ({ width, height, path, style, pathStyle, transformOrigin, debug, instructions, ...props }) => {\n const actualStyle = (0, react_1.useMemo)(() => {\n return {\n overflow: 'visible',\n ...(style !== null && style !== void 0 ? style : {}),\n };\n }, [style]);\n const actualPathStyle = (0, react_1.useMemo)(() => {\n return {\n transformBox: 'fill-box',\n ...(pathStyle !== null && pathStyle !== void 0 ? pathStyle : {}),\n };\n }, [pathStyle]);\n const reactSupportsTransformOrigin = (0, does_react_support_canary_1.doesReactSupportTransformOriginProperty)(react_dom_1.version);\n return ((0, jsx_runtime_1.jsxs)(\"svg\", { width: width, height: height, viewBox: `0 0 ${width} ${height}`, xmlns: \"http://www.w3.org/2000/svg\", style: actualStyle, children: [(0, jsx_runtime_1.jsx)(\"path\", { ...(reactSupportsTransformOrigin\n ? {\n transformOrigin,\n }\n : {\n 'transform-origin': transformOrigin,\n }), d: path, style: actualPathStyle, ...props }), debug\n ? instructions.map((i, index) => {\n if (i.type === 'C') {\n const prevInstruction = index === 0\n ? instructions[instructions.length - 1]\n : instructions[index - 1];\n if (prevInstruction.type === 'V' ||\n prevInstruction.type === 'H' ||\n prevInstruction.type === 'a' ||\n prevInstruction.type === 'Z' ||\n prevInstruction.type === 't' ||\n prevInstruction.type === 'q' ||\n prevInstruction.type === 'l' ||\n prevInstruction.type === 'c' ||\n prevInstruction.type === 'm' ||\n prevInstruction.type === 'h' ||\n prevInstruction.type === 's' ||\n prevInstruction.type === 'v') {\n return null;\n }\n const prevX = prevInstruction.x;\n const prevY = prevInstruction.y;\n return (\n // eslint-disable-next-line react/no-array-index-key\n (0, jsx_runtime_1.jsxs)(react_1.default.Fragment, { children: [(0, jsx_runtime_1.jsx)(\"path\", { d: `M ${prevX} ${prevY} ${i.cp1x} ${i.cp1y}`, strokeWidth: 2, stroke: \"rgba(0, 0, 0, 0.4)\" }), (0, jsx_runtime_1.jsx)(\"path\", { d: `M ${i.x} ${i.y} ${i.cp2x} ${i.cp2y}`, strokeWidth: 2, stroke: \"rgba(0, 0, 0, 0.4)\" }), (0, jsx_runtime_1.jsx)(\"circle\", { cx: i.cp1x, cy: i.cp1y, r: 3, fill: \"white\", strokeWidth: 2, stroke: \"black\" }), (0, jsx_runtime_1.jsx)(\"circle\", { cx: i.cp2x, cy: i.cp2y, r: 3, strokeWidth: 2, fill: \"white\", stroke: \"black\" })] }, index));\n }\n return null;\n })\n : null] }));\n};\nexports.RenderSvg = RenderSvg;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Circle = void 0;\nconst jsx_runtime_1 = require(\"react/jsx-runtime\");\nconst make_circle_1 = require(\"../utils/make-circle\");\nconst render_svg_1 = require(\"./render-svg\");\n/**\n * @description Renders an SVG element drawing a circle.\n * @param {Number} radius The radius of the circle.\n * @see [Documentation](https://www.remotion.dev/docs/shapes/circle)\n */\nconst Circle = ({ radius, ...props }) => {\n return (0, jsx_runtime_1.jsx)(render_svg_1.RenderSvg, { ...(0, make_circle_1.makeCircle)({ radius }), ...props });\n};\nexports.Circle = Circle;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.makeEllipse = void 0;\nconst paths_1 = require(\"@remotion/paths\");\n/**\n * @description Generates an ellipse SVG path.\n * @param {Number} rx The radius of the ellipse on the X axis.\n * @param {Number} ry The radius of the ellipse on the Y axis.\n * @see [Documentation](https://www.remotion.dev/docs/shapes/make-ellipse)\n */\nconst makeEllipse = ({ rx, ry }) => {\n const instructions = [\n {\n type: 'M',\n x: rx,\n y: 0,\n },\n {\n type: 'a',\n rx,\n ry,\n xAxisRotation: 0,\n largeArcFlag: true,\n sweepFlag: false,\n dx: 1,\n dy: 0,\n },\n {\n type: 'Z',\n },\n ];\n const path = (0, paths_1.serializeInstructions)(instructions);\n return {\n width: rx * 2,\n height: ry * 2,\n path,\n instructions,\n transformOrigin: `${rx} ${ry}`,\n };\n};\nexports.makeEllipse = makeEllipse;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Ellipse = void 0;\nconst jsx_runtime_1 = require(\"react/jsx-runtime\");\nconst make_ellipse_1 = require(\"../utils/make-ellipse\");\nconst render_svg_1 = require(\"./render-svg\");\n/**\n * @description Renders an SVG element drawing an ellipse.\n * @param {Number} rx The radius of the ellipse on the X axis.\n * @param {Number} ry The radius of the ellipse on the Y axis.\n * @see [Documentation](https://www.remotion.dev/docs/shapes/ellipse)\n */\nconst Ellipse = ({ rx, ry, ...props }) => {\n return (0, jsx_runtime_1.jsx)(render_svg_1.RenderSvg, { ...(0, make_ellipse_1.makeEllipse)({ rx, ry }), ...props });\n};\nexports.Ellipse = Ellipse;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.makePie = void 0;\nconst paths_1 = require(\"@remotion/paths\");\nconst getCoord = ({ counterClockwise, actualProgress, rotation, radius, coord, }) => {\n const factor = counterClockwise ? -1 : 1;\n const val = Math[coord === 'x' ? 'cos' : 'sin'](factor * actualProgress * Math.PI * 2 + Math.PI * 1.5 + rotation) *\n radius +\n radius;\n const rounded = Math.round(val * 100000) / 100000;\n return rounded;\n};\n/**\n * @description Generates a piece of pie SVG path.\n * @param {Number} radius The radius of the circle..\n * @param {Number} progress The percentage of the circle that is filled. 0 means fully empty, 1 means fully filled.\n * @param {Boolean} closePath If set to false, no path to the middle of the circle will be drawn, leading to an open arc. Default true.\n * @param {Boolean} counterClockwise If set, the circle gets filled counterclockwise instead of clockwise. Default false.\n * @param {Boolean} rotation Add rotation to the path. 0 means no rotation, Math.PI * 2 means 1 full clockwise rotation\n * @see [Documentation](https://www.remotion.dev/docs/shapes/make-pie)\n */\nconst makePie = ({ progress, radius, closePath = true, counterClockwise = false, rotation = 0, }) => {\n const actualProgress = Math.min(Math.max(progress, 0), 1);\n const endAngleX = getCoord({\n actualProgress,\n coord: 'x',\n counterClockwise,\n radius,\n rotation,\n });\n const endAngleY = getCoord({\n actualProgress,\n coord: 'y',\n counterClockwise,\n radius,\n rotation,\n });\n const start = {\n x: getCoord({\n actualProgress: 0,\n coord: 'x',\n counterClockwise,\n radius,\n rotation,\n }),\n y: getCoord({\n actualProgress: 0,\n coord: 'y',\n counterClockwise,\n radius,\n rotation,\n }),\n };\n const end = { x: endAngleX, y: endAngleY };\n const instructions = [\n {\n type: 'M',\n ...start,\n },\n {\n type: 'A',\n rx: radius,\n ry: radius,\n xAxisRotation: 0,\n largeArcFlag: false,\n sweepFlag: !counterClockwise,\n x: actualProgress <= 0.5\n ? endAngleX\n : getCoord({\n actualProgress: 0.5,\n coord: 'x',\n counterClockwise,\n radius,\n rotation,\n }),\n y: actualProgress <= 0.5\n ? endAngleY\n : getCoord({\n actualProgress: 0.5,\n coord: 'y',\n counterClockwise,\n radius,\n rotation,\n }),\n },\n actualProgress > 0.5\n ? {\n type: 'A',\n rx: radius,\n ry: radius,\n xAxisRotation: 0,\n largeArcFlag: false,\n sweepFlag: !counterClockwise,\n ...end,\n }\n : null,\n actualProgress > 0 && actualProgress < 1 && closePath\n ? {\n type: 'L',\n x: radius,\n y: radius,\n }\n : null,\n closePath\n ? {\n type: 'Z',\n }\n : null,\n ].filter(Boolean);\n const path = (0, paths_1.serializeInstructions)(instructions);\n return {\n height: radius * 2,\n width: radius * 2,\n path,\n instructions,\n transformOrigin: `${radius} ${radius}`,\n };\n};\nexports.makePie = makePie;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Pie = void 0;\nconst jsx_runtime_1 = require(\"react/jsx-runtime\");\nconst make_pie_1 = require(\"../utils/make-pie\");\nconst render_svg_1 = require(\"./render-svg\");\n/**\n * @description Renders an SVG element drawing a pie piece.\n * @param {Number} radius The radius of the circle..\n * @param {Number} progress The percentage of the circle that is filled. 0 means fully empty, 1 means fully filled.\n * @param {Boolean} closePath If set to false, no path to the middle of the circle will be drawn, leading to an open arc. Default true.\n * @param {Boolean} counterClockwise If set, the circle gets filled counterclockwise instead of clockwise. Default false.\n * @param {Boolean} rotation Add rotation to the path. 0 means no rotation, Math.PI * 2 means 1 full clockwise rotation\n * @see [Documentation](https://www.remotion.dev/docs/shapes/pie)\n */\nconst Pie = ({ radius, progress, closePath, counterClockwise, rotation, ...props }) => {\n return ((0, jsx_runtime_1.jsx)(render_svg_1.RenderSvg, { ...(0, make_pie_1.makePie)({ radius, progress, closePath, counterClockwise, rotation }), ...props }));\n};\nexports.Pie = Pie;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.joinPoints = void 0;\nconst shortenVector = (vector, radius) => {\n const [x, y] = vector;\n const currentLength = Math.sqrt(x * x + y * y);\n const scalingFactor = (currentLength - radius) / currentLength;\n return [x * scalingFactor, y * scalingFactor];\n};\nconst scaleVectorToLength = (vector, length) => {\n const [x, y] = vector;\n const currentLength = Math.sqrt(x * x + y * y);\n const scalingFactor = length / currentLength;\n return [x * scalingFactor, y * scalingFactor];\n};\nconst joinPoints = (points, { edgeRoundness, cornerRadius, roundCornerStrategy, }) => {\n return points\n .map(([x, y], i) => {\n const prevPointIndex = i === 0 ? points.length - 2 : i - 1;\n const prevPoint = points[prevPointIndex];\n const nextPointIndex = i === points.length - 1 ? 1 : i + 1;\n const nextPoint = points[nextPointIndex];\n const middleOfLine = [(x + nextPoint[0]) / 2, (y + nextPoint[1]) / 2];\n const prevPointMiddleOfLine = [\n (x + prevPoint[0]) / 2,\n (y + prevPoint[1]) / 2,\n ];\n const prevVector = [x - prevPoint[0], y - prevPoint[1]];\n const nextVector = [nextPoint[0] - x, nextPoint[1] - y];\n if (i === 0) {\n if (edgeRoundness !== null) {\n return [\n {\n type: 'M',\n x: middleOfLine[0],\n y: middleOfLine[1],\n },\n ];\n }\n if (cornerRadius !== 0) {\n const computeRadius = shortenVector(nextVector, cornerRadius);\n return [\n {\n type: 'M',\n x: computeRadius[0] + x,\n y: computeRadius[1] + y,\n },\n ];\n }\n return [\n {\n type: 'M',\n x,\n y,\n },\n ];\n }\n if (cornerRadius && edgeRoundness !== null) {\n throw new Error(`\"cornerRadius\" and \"edgeRoundness\" cannot be specified at the same time.`);\n }\n if (edgeRoundness === null) {\n if (cornerRadius === 0) {\n return [\n {\n type: 'L',\n x,\n y,\n },\n ];\n }\n const prevVectorMinusRadius = shortenVector(prevVector, cornerRadius);\n const prevVectorLength = scaleVectorToLength(prevVector, cornerRadius);\n const nextVectorMinusRadius = scaleVectorToLength(nextVector, cornerRadius);\n const firstDraw = [\n prevPoint[0] + prevVectorMinusRadius[0],\n prevPoint[1] + prevVectorMinusRadius[1],\n ];\n return [\n {\n type: 'L',\n x: firstDraw[0],\n y: firstDraw[1],\n },\n roundCornerStrategy === 'arc'\n ? {\n type: 'a',\n rx: cornerRadius,\n ry: cornerRadius,\n xAxisRotation: 0,\n dx: prevVectorLength[0] + nextVectorMinusRadius[0],\n dy: prevVectorLength[1] + nextVectorMinusRadius[1],\n largeArcFlag: false,\n sweepFlag: true,\n }\n : {\n type: 'C',\n x: firstDraw[0] + prevVectorLength[0] + nextVectorMinusRadius[0],\n y: firstDraw[1] + prevVectorLength[1] + nextVectorMinusRadius[1],\n cp1x: x,\n cp1y: y,\n cp2x: x,\n cp2y: y,\n },\n ];\n }\n const controlPoint1 = [\n prevPointMiddleOfLine[0] + prevVector[0] * edgeRoundness * 0.5,\n prevPointMiddleOfLine[1] + prevVector[1] * edgeRoundness * 0.5,\n ];\n const controlPoint2 = [\n middleOfLine[0] - nextVector[0] * edgeRoundness * 0.5,\n middleOfLine[1] - nextVector[1] * edgeRoundness * 0.5,\n ];\n return [\n {\n type: 'C',\n cp1x: controlPoint1[0],\n cp1y: controlPoint1[1],\n cp2x: controlPoint2[0],\n cp2y: controlPoint2[1],\n x: middleOfLine[0],\n y: middleOfLine[1],\n },\n ];\n })\n .flat(1);\n};\nexports.joinPoints = joinPoints;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.makePolygon = void 0;\nconst paths_1 = require(\"@remotion/paths\");\nconst join_points_1 = require(\"./join-points\");\nfunction polygon({ points, radius, centerX, centerY, cornerRadius, edgeRoundness, }) {\n const degreeIncrement = (Math.PI * 2) / points;\n const d = new Array(points).fill(0).map((_, i) => {\n const angle = degreeIncrement * i - Math.PI / 2;\n const point = {\n x: centerX + radius * Math.cos(angle),\n y: centerY + radius * Math.sin(angle),\n };\n return [point.x, point.y];\n });\n return (0, join_points_1.joinPoints)([...d, d[0]], {\n edgeRoundness,\n cornerRadius,\n roundCornerStrategy: cornerRadius > 0 ? 'bezier' : 'arc',\n });\n}\nconst makePolygon = ({ points, radius, cornerRadius = 0, edgeRoundness = null, }) => {\n if (points < 3) {\n throw new Error(`\"points\" should be minimum 3, got ${points}`);\n }\n const width = 2 * radius;\n const height = 2 * radius;\n const centerX = width / 2;\n const centerY = height / 2;\n const polygonPathInstructions = polygon({\n points,\n radius,\n centerX,\n centerY,\n cornerRadius,\n edgeRoundness,\n });\n const reduced = (0, paths_1.reduceInstructions)(polygonPathInstructions);\n const path = (0, paths_1.resetPath)((0, paths_1.serializeInstructions)(reduced));\n const boundingBox = paths_1.PathInternals.getBoundingBoxFromInstructions(reduced);\n return {\n path,\n width: boundingBox.width,\n height: boundingBox.height,\n transformOrigin: `${centerX} ${centerY}`,\n instructions: polygonPathInstructions,\n };\n};\nexports.makePolygon = makePolygon;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Polygon = void 0;\nconst jsx_runtime_1 = require(\"react/jsx-runtime\");\nconst make_polygon_1 = require(\"../utils/make-polygon\");\nconst render_svg_1 = require(\"./render-svg\");\nconst Polygon = ({ points, radius, cornerRadius, edgeRoundness, ...props }) => {\n return ((0, jsx_runtime_1.jsx)(render_svg_1.RenderSvg, { ...(0, make_polygon_1.makePolygon)({\n points,\n cornerRadius,\n edgeRoundness,\n radius,\n }), ...props }));\n};\nexports.Polygon = Polygon;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.makeRect = void 0;\nconst paths_1 = require(\"@remotion/paths\");\nconst join_points_1 = require(\"./join-points\");\n/**\n * @description Generates an SVG rectangle.\n * @param {Number} width The width of the rectangle.\n * @param {Number} height The height of the rectangle\n * @param {Number | null} edgeRoundness Allows to modify the shape by rounding the edges using bezier curves. Default null.\n * @param {Number} cornerRadius * @param {Number} cornerRadius Rounds the corner using an arc. Similar to CSS's border-radius. Cannot be used together with edgeRoundness.\n * @see [Documentation](https://www.remotion.dev/docs/shapes/make-rect)\n */\nconst makeRect = ({ width, height, edgeRoundness = null, cornerRadius = 0, }) => {\n const transformOrigin = [width / 2, height / 2];\n const instructions = [\n ...(0, join_points_1.joinPoints)([\n [cornerRadius, 0],\n [width, 0],\n [width, height],\n [0, height],\n [0, 0],\n ], { edgeRoundness, cornerRadius, roundCornerStrategy: 'arc' }),\n {\n type: 'Z',\n },\n ];\n const path = (0, paths_1.serializeInstructions)(instructions);\n return {\n width,\n height,\n instructions,\n path,\n transformOrigin: transformOrigin.join(' '),\n };\n};\nexports.makeRect = makeRect;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Rect = void 0;\nconst jsx_runtime_1 = require(\"react/jsx-runtime\");\nconst make_rect_1 = require(\"../utils/make-rect\");\nconst render_svg_1 = require(\"./render-svg\");\n/**\n * @description Renders an SVG element containing a rectangle.\n * @param {Number} width The width of the Rectangle\n * @param {Number} height The height of the Rectangle\n * @param {Number} cornerRadius Rounds the corner using an arc. Similar to CSS's border-radius. Cannot be used together with edgeRoundness.\n * @param {null|Number} edgeRoundness Allows to modify the shape by rounding the edges using bezier curves. Default null.\n * @see [Documentation](https://www.remotion.dev/docs/shapes/rect)\n */\nconst Rect = ({ width, edgeRoundness, height, cornerRadius, ...props }) => {\n return ((0, jsx_runtime_1.jsx)(render_svg_1.RenderSvg, { ...(0, make_rect_1.makeRect)({ height, width, edgeRoundness, cornerRadius }), ...props }));\n};\nexports.Rect = Rect;\n","\"use strict\";\n// Copied from https://stackblitz.com/edit/svg-star-generator?file=index.js\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.makeStar = void 0;\nconst paths_1 = require(\"@remotion/paths\");\nconst join_points_1 = require(\"./join-points\");\n/**\n * @description Generates a star SVG path.\n * @param {Number} innerRadius The inner radius of the star.\n * @param {Number} outerRadius The outer radius of the star.\n * @param {Number} points The amount of points of the star.\n * @param {Number} cornerRadius Rounds the corner using an arc. Similar to CSS's border-radius. Cannot be used together with edgeRoundness.\n * @param {null|Number} edgeRoundness Allows to modify the shape by rounding the edges using bezier curves. Default null.\n * @see [Documentation](https://www.remotion.dev/docs/shapes/make-star)\n */\nconst star = ({ centerX, centerY, points, innerRadius, outerRadius, cornerRadius, edgeRoundness, }) => {\n const degreeIncrement = (Math.PI * 2) / (points * 2);\n const d = new Array(points * 2).fill(true).map((_p, i) => {\n const radius = i % 2 === 0 ? outerRadius : innerRadius;\n const angle = degreeIncrement * i - Math.PI / 2;\n const point = {\n x: centerX + radius * Math.cos(angle),\n y: centerY + radius * Math.sin(angle),\n };\n return [point.x, point.y];\n });\n return [\n ...(0, join_points_1.joinPoints)([...d, d[0]], {\n edgeRoundness,\n cornerRadius,\n roundCornerStrategy: cornerRadius > 0 ? 'bezier' : 'arc',\n }),\n { type: 'Z' },\n ];\n};\nconst makeStar = ({ points, innerRadius, outerRadius, cornerRadius = 0, edgeRoundness = null, }) => {\n const width = outerRadius * 2;\n const height = outerRadius * 2;\n const centerX = width / 2;\n const centerY = height / 2;\n const starPathInstructions = star({\n centerX,\n centerY,\n points,\n innerRadius,\n outerRadius,\n cornerRadius,\n edgeRoundness,\n });\n const reduced = (0, paths_1.reduceInstructions)(starPathInstructions);\n const path = (0, paths_1.resetPath)((0, paths_1.serializeInstructions)(reduced));\n const boundingBox = paths_1.PathInternals.getBoundingBoxFromInstructions(reduced);\n return {\n path,\n width: boundingBox.width,\n height: boundingBox.height,\n transformOrigin: `${centerX} ${centerY}`,\n instructions: starPathInstructions,\n };\n};\nexports.makeStar = makeStar;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Star = void 0;\nconst jsx_runtime_1 = require(\"react/jsx-runtime\");\nconst make_star_1 = require(\"../utils/make-star\");\nconst render_svg_1 = require(\"./render-svg\");\n/**\n * @description Renders an SVG element containing a star.\n * @param {Number} innerRadius The inner radius of the star.\n * @param {Number} outerRadius The outer radius of the star.\n * @param {Number} points The amount of points of the star.\n * @param {Number} cornerRadius Rounds the corner using an arc. Similar to CSS's border-radius. Cannot be used together with edgeRoundness.\n * @param {null|Number} edgeRoundness Allows to modify the shape by rounding the edges using bezier curves. Default null.\n * @see [Documentation](https://www.remotion.dev/docs/shapes/star)\n */\nconst Star = ({ innerRadius, outerRadius, points, cornerRadius, edgeRoundness, ...props }) => {\n return ((0, jsx_runtime_1.jsx)(render_svg_1.RenderSvg, { ...(0, make_star_1.makeStar)({\n innerRadius,\n outerRadius,\n points,\n cornerRadius,\n edgeRoundness,\n }), ...props }));\n};\nexports.Star = Star;\n","\"use strict\";\n// Copied from https://stackblitz.com/edit/react-triangle-svg?file=index.js\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.makeTriangle = void 0;\nconst paths_1 = require(\"@remotion/paths\");\nconst join_points_1 = require(\"./join-points\");\n/**\n * @description Generates an SVG path for a triangle with the same length on all sides.\n * @param {Number} length The length of one triangle side.\n * @param {string} direction The direction of the triangle\n * @param {null|Number} edgeRoundness Allows to modify the shape by rounding the edges using bezier curves. Default null.\n * @param {Number} cornerRadius Rounds the corner using an arc. Similar to CSS's border-radius. Cannot be used together with edgeRoundness.\n * @see [Documentation](https://www.remotion.dev/docs/shapes/make-triangle)\n */\nconst makeTriangle = ({ length, direction = 'right', edgeRoundness = null, cornerRadius = 0, }) => {\n if (typeof length !== 'number') {\n throw new Error(`\"length\" of a triangle must be a number, got ${JSON.stringify(length)}`);\n }\n const longerDimension = length;\n const shorterSize = Math.sqrt(length ** 2 * 0.75); // Calculated on paper;\n const points = {\n up: [\n [longerDimension / 2, 0],\n [0, shorterSize],\n [longerDimension, shorterSize],\n [longerDimension / 2, 0],\n ],\n right: [\n [0, 0],\n [0, longerDimension],\n [shorterSize, longerDimension / 2],\n [0, 0],\n ],\n down: [\n [0, 0],\n [longerDimension, 0],\n [longerDimension / 2, shorterSize],\n [0, 0],\n ],\n left: [\n [shorterSize, 0],\n [shorterSize, longerDimension],\n [0, longerDimension / 2],\n [shorterSize, 0],\n ],\n };\n const transformOriginX = {\n left: (shorterSize / 3) * 2,\n right: shorterSize / 3,\n up: longerDimension / 2,\n down: longerDimension / 2,\n }[direction];\n const transformOriginY = {\n up: (shorterSize / 3) * 2,\n down: shorterSize / 3,\n left: longerDimension / 2,\n right: longerDimension / 2,\n }[direction];\n const instructions = [\n ...(0, join_points_1.joinPoints)(points[direction], {\n edgeRoundness,\n cornerRadius,\n roundCornerStrategy: 'bezier',\n }),\n {\n type: 'Z',\n },\n ];\n const path = (0, paths_1.serializeInstructions)(instructions);\n return {\n path,\n instructions,\n width: direction === 'up' || direction === 'down' ? length : shorterSize,\n height: direction === 'up' || direction === 'down' ? shorterSize : length,\n transformOrigin: `${transformOriginX} ${transformOriginY}`,\n };\n};\nexports.makeTriangle = makeTriangle;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Triangle = void 0;\nconst jsx_runtime_1 = require(\"react/jsx-runtime\");\nconst make_triangle_1 = require(\"../utils/make-triangle\");\nconst render_svg_1 = require(\"./render-svg\");\n/**\n * @description Renders an SVG element containing a triangle with same length on all sides.\n * @param {Number} length The length of one triangle side.\n * @param {string} direction The direction of the triangle\n * @param {null|Number} edgeRoundness Allows to modify the shape by rounding the edges using bezier curves. Default null.\n * @param {Number} cornerRadius Rounds the corner using an arc. Similar to CSS's border-radius. Cannot be used together with edgeRoundness.\n * @see [Documentation](https://www.remotion.dev/docs/shapes/triangle)\n */\nconst Triangle = ({ length, direction, edgeRoundness, cornerRadius, ...props }) => {\n return ((0, jsx_runtime_1.jsx)(render_svg_1.RenderSvg, { ...(0, make_triangle_1.makeTriangle)({ length, direction, edgeRoundness, cornerRadius }), ...props }));\n};\nexports.Triangle = Triangle;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.makeTriangle = exports.makeStar = exports.makeRect = exports.makePolygon = exports.makePie = exports.makeEllipse = exports.makeCircle = exports.Triangle = exports.Star = exports.Rect = exports.Polygon = exports.Pie = exports.Ellipse = exports.Circle = void 0;\nvar circle_1 = require(\"./components/circle\");\nObject.defineProperty(exports, \"Circle\", { enumerable: true, get: function () { return circle_1.Circle; } });\nvar ellipse_1 = require(\"./components/ellipse\");\nObject.defineProperty(exports, \"Ellipse\", { enumerable: true, get: function () { return ellipse_1.Ellipse; } });\nvar pie_1 = require(\"./components/pie\");\nObject.defineProperty(exports, \"Pie\", { enumerable: true, get: function () { return pie_1.Pie; } });\nvar polygon_1 = require(\"./components/polygon\");\nObject.defineProperty(exports, \"Polygon\", { enumerable: true, get: function () { return polygon_1.Polygon; } });\nvar rect_1 = require(\"./components/rect\");\nObject.defineProperty(exports, \"Rect\", { enumerable: true, get: function () { return rect_1.Rect; } });\nvar star_1 = require(\"./components/star\");\nObject.defineProperty(exports, \"Star\", { enumerable: true, get: function () { return star_1.Star; } });\nvar triangle_1 = require(\"./components/triangle\");\nObject.defineProperty(exports, \"Triangle\", { enumerable: true, get: function () { return triangle_1.Triangle; } });\nvar make_circle_1 = require(\"./utils/make-circle\");\nObject.defineProperty(exports, \"makeCircle\", { enumerable: true, get: function () { return make_circle_1.makeCircle; } });\nvar make_ellipse_1 = require(\"./utils/make-ellipse\");\nObject.defineProperty(exports, \"makeEllipse\", { enumerable: true, get: function () { return make_ellipse_1.makeEllipse; } });\nvar make_pie_1 = require(\"./utils/make-pie\");\nObject.defineProperty(exports, \"makePie\", { enumerable: true, get: function () { return make_pie_1.makePie; } });\nvar make_polygon_1 = require(\"./utils/make-polygon\");\nObject.defineProperty(exports, \"makePolygon\", { enumerable: true, get: function () { return make_polygon_1.makePolygon; } });\nvar make_rect_1 = require(\"./utils/make-rect\");\nObject.defineProperty(exports, \"makeRect\", { enumerable: true, get: function () { return make_rect_1.makeRect; } });\nvar make_star_1 = require(\"./utils/make-star\");\nObject.defineProperty(exports, \"makeStar\", { enumerable: true, get: function () { return make_star_1.makeStar; } });\nvar make_triangle_1 = require(\"./utils/make-triangle\");\nObject.defineProperty(exports, \"makeTriangle\", { enumerable: true, get: function () { return make_triangle_1.makeTriangle; } });\n","// src/presentations/clock-wipe.tsx\nimport { translatePath } from \"@remotion/paths\";\nimport { makePie } from \"@remotion/shapes\";\nimport { useMemo, useState } from \"react\";\nimport { AbsoluteFill, random } from \"remotion\";\nimport { jsx, jsxs } from \"react/jsx-runtime\";\nvar ClockWipePresentation = ({ children, presentationDirection, presentationProgress, passedProps }) => {\n const finishedRadius = Math.sqrt(passedProps.width ** 2 + passedProps.height ** 2) / 2;\n const { path } = makePie({\n radius: finishedRadius,\n progress: presentationProgress\n });\n const translatedPath = translatePath(path, -(finishedRadius * 2 - passedProps.width) / 2, -(finishedRadius * 2 - passedProps.height) / 2);\n const [clipId] = useState(() => String(random(null)));\n const style = useMemo(() => {\n return {\n width: \"100%\",\n height: \"100%\",\n clipPath: presentationDirection === \"exiting\" ? undefined : `url(#${clipId})`,\n ...presentationDirection === \"entering\" ? passedProps.innerEnterStyle : passedProps.innerExitStyle\n };\n }, [\n clipId,\n passedProps.innerEnterStyle,\n passedProps.innerExitStyle,\n presentationDirection\n ]);\n const outerStyle = useMemo(() => {\n return presentationDirection === \"entering\" ? passedProps.outerEnterStyle : passedProps.outerExitStyle;\n }, [\n passedProps.outerEnterStyle,\n passedProps.outerExitStyle,\n presentationDirection\n ]);\n return /* @__PURE__ */ jsxs(AbsoluteFill, {\n style: outerStyle,\n children: [\n /* @__PURE__ */ jsx(AbsoluteFill, {\n style,\n children\n }),\n presentationDirection === \"exiting\" ? null : /* @__PURE__ */ jsx(AbsoluteFill, {\n children: /* @__PURE__ */ jsx(\"svg\", {\n children: /* @__PURE__ */ jsx(\"defs\", {\n children: /* @__PURE__ */ jsx(\"clipPath\", {\n id: clipId,\n children: /* @__PURE__ */ jsx(\"path\", {\n d: translatedPath,\n fill: \"black\"\n })\n })\n })\n })\n })\n ]\n });\n};\nvar clockWipe = (props) => {\n return { component: ClockWipePresentation, props: props ?? {} };\n};\nexport {\n clockWipe\n};\n","import React, { useMemo, useState } from \"react\";\nimport type {\n TransitionPresentation,\n TransitionPresentationComponentProps\n} from \"@remotion/transitions\";\nimport { AbsoluteFill, random } from \"remotion\";\n\nexport type CustomPresentationProps = {\n width: number;\n height: number;\n};\n\nconst CirclePresentation: React.FC<\n TransitionPresentationComponentProps<CustomPresentationProps>\n> = ({\n children,\n presentationDirection,\n presentationProgress,\n passedProps\n}) => {\n const finishedRadius =\n Math.sqrt(passedProps.width ** 2 + passedProps.height ** 2) / 2;\n const radius = finishedRadius * presentationProgress;\n\n const circlePath = makeCirclePath(\n passedProps.width / 2,\n passedProps.height / 2,\n radius\n );\n\n const [clipId] = useState(() => String(random(null)));\n const style: React.CSSProperties = useMemo(() => {\n return {\n width: \"100%\",\n height: \"100%\",\n clipPath:\n presentationDirection === \"exiting\" ? undefined : `url(#${clipId})`\n };\n }, [clipId, presentationDirection]);\n\n return (\n <AbsoluteFill>\n <AbsoluteFill style={style}>{children}</AbsoluteFill>\n {presentationDirection === \"exiting\" ? null : (\n <AbsoluteFill>\n <svg width={passedProps.width} height={passedProps.height}>\n <defs>\n <clipPath id={clipId}>\n <path d={circlePath} fill=\"black\" />\n </clipPath>\n </defs>\n </svg>\n </AbsoluteFill>\n )}\n </AbsoluteFill>\n );\n};\n\nexport const circle = (\n props: CustomPresentationProps\n): TransitionPresentation<CustomPresentationProps> => {\n return { component: CirclePresentation, props };\n};\n\n// Esta función crea un path de círculo\nconst makeCirclePath = (cx: number, cy: number, radius: number): string => {\n return `M ${cx}, ${cy}\n m -${radius}, 0\n a ${radius},${radius} 0 1,0 ${radius * 2},0\n a ${radius},${radius} 0 1,0 -${radius * 2},0`;\n};\n","import {\n TransitionPresentation,\n TransitionPresentationComponentProps\n} from \"@remotion/transitions\";\nimport React, { useMemo, useState } from \"react\";\nimport { AbsoluteFill, random } from \"remotion\";\n\nexport type CustomPresentationProps = {\n width: number;\n height: number;\n};\n\nconst WindowTransitionPresentation: React.FC<\n TransitionPresentationComponentProps<CustomPresentationProps>\n> = ({\n children,\n presentationDirection,\n presentationProgress,\n passedProps\n}) => {\n const { width, height } = passedProps;\n\n // Calculamos el tamaño de la ventana en función del progreso de la transición\n const windowWidth = width * presentationProgress;\n const windowHeight = height * presentationProgress;\n\n // Calculamos las coordenadas para la ventana que cubrirá la mitad de la pantalla\n const windowX = width / 2 - windowWidth / 2;\n const windowY = height / 2 - windowHeight / 2;\n\n // Creamos un clipPath único para esta transición\n const [clipId] = useState(() => String(random(null)));\n\n // Establecemos el clipPath para el elemento que queremos animar\n const style: React.CSSProperties = useMemo(() => {\n return {\n width: \"100%\",\n height: \"100%\",\n clipPath:\n presentationDirection === \"exiting\" ? undefined : `url(#${clipId})`\n };\n }, [clipId, presentationDirection]);\n\n return (\n <AbsoluteFill>\n <AbsoluteFill style={style}>{children}</AbsoluteFill>\n {presentationDirection === \"exiting\" ? null : (\n <AbsoluteFill>\n <svg>\n <defs>\n <clipPath id={clipId}>\n <rect\n x={windowX}\n y={windowY}\n width={windowWidth}\n height={windowHeight}\n fill=\"black\"\n />\n </clipPath>\n </defs>\n </svg>\n </AbsoluteFill>\n )}\n </AbsoluteFill>\n );\n};\n\nexport const rectangle = (\n props: CustomPresentationProps\n): TransitionPresentation<CustomPresentationProps> => {\n return { component: WindowTransitionPresentation, props };\n};\n","import { getBoundingBox, translatePath } from \"@remotion/paths\";\nimport { makeStar } from \"@remotion/shapes\";\nimport type {\n TransitionPresentation,\n TransitionPresentationComponentProps\n} from \"@remotion/transitions\";\nimport React, { useMemo, useState } from \"react\";\nimport { AbsoluteFill, random } from \"remotion\";\nexport type CustomPresentationProps = {\n width: number;\n height: number;\n};\nconst StarPresentation: React.FC<\n TransitionPresentationComponentProps<CustomPresentationProps>\n> = ({\n children,\n presentationDirection,\n presentationProgress,\n passedProps\n}) => {\n const finishedRadius =\n Math.sqrt(passedProps.width ** 2 + passedProps.height ** 2) / 2;\n const innerRadius = finishedRadius * presentationProgress;\n const outerRadius = finishedRadius * 2 * presentationProgress;\n const { path } = makeStar({\n innerRadius,\n outerRadius,\n points: 5\n });\n const boundingBox = getBoundingBox(path);\n const translatedPath = translatePath(\n path,\n passedProps.width / 2 - boundingBox.width / 2,\n passedProps.height / 2 - boundingBox.height / 2\n );\n const [clipId] = useState(() => String(random(null)));\n const style: React.CSSProperties = useMemo(() => {\n return {\n width: \"100%\",\n height: \"100%\",\n clipPath:\n presentationDirection === \"exiting\" ? undefined : `url(#${clipId})`\n };\n }, [clipId, presentationDirection]);\n return (\n <AbsoluteFill>\n <AbsoluteFill style={style}>{children}</AbsoluteFill>\n {presentationDirection === \"exiting\" ? null : (\n <AbsoluteFill>\n <svg>\n <defs>\n <clipPath id={clipId}>\n <path d={translatedPath} fill=\"black\" />\n </clipPath>\n </defs>\n </svg>\n </AbsoluteFill>\n )}\n </AbsoluteFill>\n );\n};\n\nexport const star = (\n props: CustomPresentationProps\n): TransitionPresentation<CustomPresentationProps> => {\n return { component: StarPresentation, props };\n};\n","import {\n TransitionPresentation,\n TransitionPresentationComponentProps\n} from \"@remotion/transitions\";\nimport React, { useMemo, useState } from \"react\";\nimport { AbsoluteFill, random } from \"remotion\";\n\nexport type CustomPresentationProps = {\n width: number;\n height: number;\n};\n\nconst WindowTransitionPresentation: React.FC<\n TransitionPresentationComponentProps<CustomPresentationProps>\n> = ({\n children,\n presentationDirection,\n presentationProgress,\n passedProps\n}) => {\n const { width, height } = passedProps;\n\n // Calculamos el tamaño de la ventana en función del progreso de la transición\n const windowWidth = width * presentationProgress;\n\n // Calculamos las coordenadas para la ventana que cubrirá la mitad de la pantalla\n const windowX = width / 2 - windowWidth / 2;\n\n // Creamos un clipPath único para esta transición\n const [clipId] = useState(() => String(random(null)));\n\n // Establecemos el clipPath para el elemento que queremos animar\n const style: React.CSSProperties = useMemo(() => {\n return {\n width: \"100%\",\n height: \"100%\",\n clipPath:\n presentationDirection === \"exiting\" ? undefined : `url(#${clipId})`\n };\n }, [clipId, presentationDirection]);\n\n return (\n <AbsoluteFill>\n <AbsoluteFill style={style}>{children}</AbsoluteFill>\n {presentationDirection === \"exiting\" ? null : (\n <AbsoluteFill>\n <svg>\n <defs>\n <clipPath id={clipId}>\n <rect\n x={windowX}\n y={0}\n width={windowWidth}\n height={height}\n fill=\"black\"\n />\n </clipPath>\n </defs>\n </svg>\n </AbsoluteFill>\n )}\n </AbsoluteFill>\n );\n};\n\nexport const slidingDoors = (\n props: CustomPresentationProps\n): TransitionPresentation<CustomPresentationProps> => {\n return { component: WindowTransitionPresentation, props };\n};\n"],"names":["f","require$$0","k","l","m","n","p","q","c","a","g","b","d","e","h","reactJsxRuntime_production_min","React","REACT_ELEMENT_TYPE","REACT_PORTAL_TYPE","REACT_FRAGMENT_TYPE","REACT_STRICT_MODE_TYPE","REACT_PROFILER_TYPE","REACT_PROVIDER_TYPE","REACT_CONTEXT_TYPE","REACT_FORWARD_REF_TYPE","REACT_SUSPENSE_TYPE","REACT_SUSPENSE_LIST_TYPE","REACT_MEMO_TYPE","REACT_LAZY_TYPE","REACT_OFFSCREEN_TYPE","MAYBE_ITERATOR_SYMBOL","FAUX_ITERATOR_SYMBOL","getIteratorFn","maybeIterable","maybeIterator","ReactSharedInternals","error","format","_len2","args","_key2","printWarning","level","ReactDebugCurrentFrame","stack","argsWithFormat","item","enableScopeAPI","enableCacheElement","enableTransitionTracing","enableLegacyHidden","enableDebugTracing","REACT_MODULE_REFERENCE","isValidElementType","type","getWrappedName","outerType","innerType","wrapperName","displayName","functionName","getContextName","getComponentNameFromType","context","provider","outerName","lazyComponent","payload","init","assign","disabledDepth","prevLog","prevInfo","prevWarn","prevError","prevGroup","prevGroupCollapsed","prevGroupEnd","disabledLog","disableLogs","props","reenableLogs","ReactCurrentDispatcher","prefix","describeBuiltInComponentFrame","name","source","ownerFn","x","match","reentry","componentFrameCache","PossiblyWeakMap","describeNativeComponentFrame","fn","construct","frame","control","previousPrepareStackTrace","previousDispatcher","Fake","sample","sampleLines","controlLines","s","_frame","syntheticFrame","describeFunctionComponentFrame","shouldConstruct","Component","prototype","describeUnknownElementTypeFrameInDEV","hasOwnProperty","loggedTypeFailures","setCurrentlyValidatingElement","element","owner","checkPropTypes","typeSpecs","values","location","componentName","has","typeSpecName","error$1","err","ex","isArrayImpl","isArray","typeName","value","hasToStringTag","willCoercionThrow","testStringCoercion","checkKeyStringCoercion","ReactCurrentOwner","RESERVED_PROPS","specialPropKeyWarningShown","specialPropRefWarningShown","hasValidRef","config","getter","hasValidKey","warnIfStringRefCannotBeAutoConverted","self","defineKeyPropWarningGetter","warnAboutAccessingKey","defineRefPropWarningGetter","warnAboutAccessingRef","ReactElement","key","ref","jsxDEV","maybeKey","propName","defaultProps","ReactCurrentOwner$1","ReactDebugCurrentFrame$1","setCurrentlyValidatingElement$1","propTypesMisspellWarningShown","isValidElement","object","getDeclarationErrorAddendum","getSourceInfoErrorAddendum","ownerHasKeyUseWarning","getCurrentComponentErrorInfo","parentType","info","parentName","validateExplicitKey","currentComponentErrorInfo","childOwner","validateChildKeys","node","i","child","iteratorFn","iterator","step","validatePropTypes","propTypes","_name","validateFragmentProps","fragment","keys","didWarnAboutKeySpread","jsxWithValidation","isStaticChildren","validType","sourceInfo","typeString","children","beforeExample","afterExample","jsxWithValidationStatic","jsxWithValidationDynamic","jsx","jsxs","reactJsxRuntime_development","jsxRuntimeModule","require$$1","__defProp","__export","target","all","newValue","createContext","NativeLayersContext","createContext2","NativeLayersProvider","clipRegion","setClipRegion","useState","useMemo","useLayoutEffect","getNodeEnvString","getEnvString","getRemotionEnvironment","isPlayer","isRendering","originalCreateElement","componentsToAddStacksTo","enableSequenceStackTraces","proxy","thisArg","argArray","first","rest","newProps","addSequenceStackTraces","component","IsPlayerContext","createContext3","IsPlayerContextProvider","jsx2","useIsPlayer","useContext2","truthy","VERSION","checkMultipleRemotionVersions","alreadyImported","AbsoluteFillRefForwarding","style","other","actualStyle","useMemo2","jsx3","AbsoluteFill","forwardRef","SequenceContext","createContext4","SequenceManager","React3","SequenceVisibilityToggleContext","SequenceManagerProvider","sequences","setSequences","useState2","hidden","setHidden","registerSequence","useCallback","seq","seqs","unregisterSequence","sequenceContext","useMemo3","hiddenContext","jsx4","NonceContext","createContext5","useNonce","useContext4","nonce","setNonce","useState3","lastContext","useRef","useEffect3","exports_timeline_position_state","useTimelineSetFrame","useTimelinePosition","usePlayingState","persistCurrentFrame","getInitialFrameState","getFrameForComposition","TimelineContext","SetTimelineContext","CompositionManager","createContext6","EditorPropsContext","createContext7","editorPropsProviderRef","React4","EditorPropsProvider","setProps","updateProps","useCallback2","id","prev","resetUnsaved","useImperativeHandle","ctx","useMemo4","jsx5","problematicCharacters","didWarn","warnOnce","message","includesHexOfUnsafeChar","path","trimLeadingSlash","inner","encodeBySplitting","staticFile","includesHex","preprocessed","preparsed","DATE_TOKEN","FILE_TOKEN","serializeJSONWithDate","data","indent","staticBase","customDateUsed","customFileUsed","mapUsed","setUsed","deserializeJSONWithCustomFields","_","serializeThenDeserializeInStudio","didWarnSSRImport","warnOnceSSRImport","getInputProps","param","validCodecs","validateDefaultCodec","defaultCodec","validateDimension","amount","nameOfProp","validateDurationInFrames","durationInFrames","options","allowFloats","validateFps","fps","isGif","validateCalculated","calculated","compositionId","compositionFps","compositionHeight","compositionWidth","compositionDurationInFrames","calculateMetadataErrorLocation","defaultErrorLocation","width","height","resolveVideoConfig","calculateMetadata","signal","originalProps","calculatedProm","resolveVideoConfigOrCatch","params","ResolveCompositionContext","createContext8","resolveCompositionsRef","createRef","needsResolution","composition","PROPS_UPDATED_EXTERNALLY","ResolveCompositionConfig","currentRenderModalComposition","setCurrentRenderModalComposition","useState4","compositions","canvasContent","currentCompositionMetadata","useContext5","fastRefreshes","selectedComposition","useMemo5","renderModalComposition","allEditorProps","inputProps","resolvedConfigs","setResolvedConfigs","selectedEditorProps","renderModalProps","hasResolution","doResolution","useCallback3","combinedProps","controller","result","r","promOrNot","currentComposition","useImperativeHandle2","editorProps","isTheSame","currentDefaultProps","canResolve","shouldIgnoreUpdate","useEffect4","resolvedConfigsIncludingStaticOnes","staticComps","acc","curr","jsx6","useResolvedVideoConfig","preferredCompositionId","useVideo","useContext6","selected","resolved","useMemo6","createContext9","makeKey","time","obj","videoConfig","state","useContext7","unclamped","setFrame","playing","imperativePlaying","setPlaying","useMemo7","CanUseRemotionHooks","createContext10","CanUseRemotionHooksProvider","jsx7","useUnsafeVideoConfig","useContext8","ctxWidth","ctxHeight","ctxDuration","video","useMemo8","useVideoConfig","useContext9","useCurrentFrame","useContext10","contextOffset","Freeze","frameToFreeze","active","isActive","useMemo9","timelineContext","useContext11","relativeFrom","timelineValue","jsx8","RegularSequenceRefForwardingFunction","from","showInTimeline","loopDisplay","premountDisplay","layout","useState5","parentSequence","useContext12","rootId","cumulatedFrom","absoluteFrame","parentSequenceDuration","actualDurationInFrames","premounting","useMemo10","contextValue","timelineClipName","useEffect5","endThreshold","content","styleIfThere","defaultStyle","jsx9","RegularSequence","forwardRef2","PremountedSequenceRefForwardingFunction","passedStyle","premountFor","otherProps","premountingActive","Sequence","PremountedSequence","SequenceRefForwardingFunction","validateArtifactFilename","filename","validateContent","validateRenderAsset","artifact","RenderAssetManager","createContext11","RenderAssetManagerProvider","renderAssets","setRenderAssets","useState6","registerRenderAsset","useCallback4","renderAsset","assets","unregisterRenderAsset","assts","useLayoutEffect2","useMemo11","jsx10","getAbsoluteSrc","relativeSrc","calculateLoopDuration","endAt","mediaDuration","playbackRate","startFrom","duration","actualDuration","cancelRender","isErrorLike","LoopContext","createContext12","useLoop","React8","Loop","times","currentFrame","compDuration","maxTimes","actualTimes","maxFrame","start","useMemo12","loopContext","jsx11","PreloadContext","createContext13","preloads","updaters","PrefetchProvider","_preloads","_setPreloads","useState8","useEffect7","updaterFunction","u","jsx12","usePreload","src","useContext14","validateMediaProps","validateStartFromProps","durationReducer","action","absoluteSrc","DurationsContext","createContext14","DurationsContextProvider","durations","setDurations","useReducer","useMemo13","jsx13","mulberry32","hashCode","str","chr","hash","random","seed","dummy","useMediaStartsAt","useContext15","useFrameForVolumeProp","behavior","loop","startsAt","getAssetDisplayName","splitted","playAndHandleNotAllowedError","mediaRef","mediaType","onAutoPlayError","current","prom","evaluateVolume","volume","mediaVolume","allowAmplificationDuringRender","maxVolume","evaluated","didWarn2","warnOnce2","useMediaInTimeline","audioAndVideoTags","useContext16","actualFrom","initialVolume","useState9","doesVolumeChange","volumes","useMemo14","useEffect8","_b","_a","tag","useBufferManager","blocks","setBlocks","useState10","onBufferingCallbacks","setOnBufferingCallbacks","onResumeCallbacks","setOnResumeCallbacks","buffering","useRef2","addBlock","useCallback5","block","newArr","bx","listenForBuffering","callback","cb","listenForResume","useEffect9","useMemo15","BufferingContextReact","React11","BufferingProvider","bufferManager","jsx14","useIsPlayerBuffering","isBuffering","setIsBuffering","onBuffer","onResume","useBufferState","buffer","useContext17","useMemo16","unblock","useBufferUntilFirstFrame","onVariableFpsVideoDetected","pauseWhenBuffering","bufferingRef","useRef3","delayPlayback","bufferUntilFirstFrame","useCallback6","requestedTime","playback","onEndedOrPauseOrCanPlay","useMemo17","useMediaBuffering","shouldBuffer","isPremounting","useState11","useEffect10","cleanupFns","cleanup","onWaiting","onCanPlay","onError","useRequestVideoCallbackTime","lastSeek","currentTime","useRef4","useEffect11","videoTag","cancel","request","difference","differenceToLastSeek","interpolateFunction","input","inputRange","outputRange","extrapolateLeft","extrapolateRight","easing","inputMin","inputMax","outputMin","outputMax","range","findRange","checkValidInputRange","arr","checkInfiniteRange","interpolate","num","getExpectedMediaFrameUncorrected","getMediaTime","expectedFrame","msPerFrame","toSeconds","isIosSafari","isIpadIPodIPhone","isAppleWebKit","isIOSSafariAndBlob","actualSrc","getVideoFragmentStart","getVideoFragmentEnd","appendVideoFragment","withStartHash","isSubsetOfDuration","prevStartFrom","newStartFrom","prevDuration","newDuration","previousFrom","newFrom","previousEnd","newEnd","useAppendVideoFragment","initialActualSrc","initialActualFrom","initialDuration","actualFromRef","useRef5","alreadyWarned","warnAboutNonSeekableMedia","msg","DEFAULT_ACCEPTABLE_TIMESHIFT","seek","timeToSet","useMediaPlayback","localPlaybackRate","onlyWarnForMediaSeekingError","acceptableTimeshift","debugSeeking","globalPlaybackRate","useContext18","mediaStartsAt","lastSeekDueToShift","useRef6","isVariableFpsVideoMap","useCallback7","desiredUnclampedTime","isMediaTagBuffering","acceptableTimeShiftButLessThanDuration","isPlayerBuffering","useEffect12","isMediaTagBufferingOrStalled","tagName","playbackRateToSet","shouldBeTime","mediaTagTime","rvcTime","isVariableFpsVideo","timeShiftMediaTag","timeShiftRvcTag","timeShift","seekThreshold","makesSenseToSeek","isSomethingElseBuffering","useMediaTagVolume","actualVolume","setActualVolume","useState12","useEffect13","onChange","FLOATING_POINT_ERROR_THRESHOLD","isApproximatelyTheSame","num1","num2","useSyncVolumeWithMediaTag","volumePropFrame","useEffect14","userPreferredVolume","MediaVolumeContext","createContext15","SetMediaVolumeContext","useMediaVolumeState","useContext19","setMediaVolume","useMemo18","useMediaMutedState","mediaMuted","setMediaMuted","EMPTY_AUDIO","compareProps","obj1","obj2","keysA","keysB","didPropChange","newProp","prevProp","SharedAudioContext","createContext16","SharedAudioContextProvider","numberOfAudioTags","audios","useRef7","initialNumberOfAudioTags","useState13","refs","useMemo19","createRef2","takenAudios","rerenderAudios","useCallback8","registerAudio","aud","audioId","found","firstFreeAudio","cloned","newElem","unregisterAudio","index","updateAudio","changed","prevA","playAllAudios","resetAudio","useEffect15","jsx15","useSharedAudio","useContext20","elem","React12","effectToUse","AudioForDevelopmentForwardRefFunction","initialShouldPreMountAudioElements","useState14","muted","shouldPreMountAudioTags","onDuration","acceptableTimeShiftInSeconds","_remotionInternalNeedsDurationCalculation","_remotionInternalNativeLoopPassed","_remotionInternalStack","_remotionDebugSeeking","loopVolumeCurveBehavior","nativeProps","useContext21","preloadedSrc","timelineId","isSequenceHidden","propsToPass","useMemo20","audioRef","useImperativeHandle3","currentOnDurationCallback","useRef8","useEffect16","onLoadedMetadata","jsx16","AudioForPreview","forwardRef3","handles","DELAY_RENDER_CALLSTACK_TOKEN","DELAY_RENDER_RETRIES_LEFT","DELAY_RENDER_RETRY_TOKEN","defaultTimeout","delayRender","label","handle","called","timeoutToUse","retriesLeft","continueRender","AudioForRenderingRefForwardingFunction","useRef9","volumeProp","toneFrequency","delayRenderRetries","delayRenderTimeoutInMilliseconds","useContext22","useMemo21","useImperativeHandle4","useEffect17","needsToRenderAudioTag","useLayoutEffect3","newHandle","didLoad","jsx17","AudioForRendering","forwardRef4","AudioRefForwardingFunction","audioContext","useContext23","propsOtherThanLoop","environment","useCallback9","errMessage","durationInSeconds","durationFetched","jsx18","Audio","startFromFrameNo","endAtFrameNo","forwardRef5","createContext17","_portalNode","portalNode","containerNode","useLazyComponent","compProps","useMemo23","React16","getRegex2","isCompositionIdValid","invalidCompositionErrorMessage","ClipComposition","useContext25","useMemo24","jsx21","compositionsRef","React18","CompositionManagerProvider","setCompositions","useState15","currentcompositionsRef","useRef10","folders","setFolders","setCanvasContent","setCurrentCompositionMetadata","updateCompositions","useCallback10","updateComps","comps","updated","registerComposition","comp","unregisterComposition","registerFolder","parent","prevFolders","unregisterFolder","useImperativeHandle5","updateCompositionDefaultProps","newDefaultProps","useMemo25","jsx22","IFrameRefForwarding","onLoad","props2","useState16","useCallback11","didGetError","jsx23","forwardRef6","exponentialBackoff","errorCount","ImgRefForwarding","maxRetries","pauseWhenLoading","onImageFrame","imageRef","useRef11","errors","useContext26","useImperativeHandle6","retryIn","useCallback12","timeout","currentSrc","newSrc","_c","_d","backoff","_e","_f","_g","useLayoutEffect4","unmounted","onComplete","newImg","jsx24","forwardRef7","exports_default_css","makeDefaultPreviewCSS","injectCSS","OFFTHREAD_VIDEO_CLASS_NAME","injected","css","head","scope","backgroundColor","REMOTION_STUDIO_CONTAINER_ELEMENT","getPreviewDomElement","Root","listeners","getRoot","waitForRoot","RemotionRoot","remotionRootId","useState17","useRef12","setFastRefreshes","setPlaybackRate","useLayoutEffect5","attempt","asyncUpdate","timelineContextValue","useMemo26","setTimelineContextValue","nonceContext","counter","useEffect20","status","jsx25","getEnvVariables","setupEnvVariables","env","CurrentScaleContext","React22","PreviewSizeContext","createContext18","calculateScale","canvasSize","previewSize","heightRatio","widthRatio","ratio","WATCH_REMOTION_STATIC_FILES","useRemotionContexts","compositionManagerCtx","React23","setTimelineContext","canUseRemotionHooksContext","nativeLayersContext","preloadContext","resolveCompositionContext","renderAssetManagerContext","sequenceManagerContext","bufferManagerContext","useMemo27","RemotionContextProvider","contexts","jsx26","Internals","IsInsideSeriesContext","createContext19","IsNotInsideSeriesProvider","jsx27","useRequireToBeInsideSeries","React25","SeriesSequenceRefForwardingFunction","_ref","jsx28","SeriesSequence","forwardRef8","useEmitVideoFrame","onVideoFrame","useEffect22","VideoForDevelopmentRefForwardingFunction","videoRef","useRef13","acceptableTimeShift","crossOrigin","useContext28","useState19","useImperativeHandle7","useEffect23","errorHandler","useMemo30","crossOriginValue","jsx30","VideoForPreview","forwardRef9","roundTo6Commas","seekToTime","desiredTime","cancelSeeked","resolve","now","metadata","displayIn","waitForSeekedEvent","onDone","seekToTimeMultipleUntilRight","threshold","currentCancel","reject","firstSeek","seekedTo","sign","newSeek","newTime","newDifference","thirdSeek","VideoForRenderingForwardFunction","volumePropsFrame","useRef14","useContext29","useMemo31","useEffect24","useImperativeHandle8","loadedDataHandler","endedHandler","seek2","useLayoutEffect7","jsx32","VideoForRendering","forwardRef10","VideoForwardingFunction","useContext30","useCallback15","jsx33","Video","forwardRef11","proxyObj","Config","prop","NoReactInternals","epsilon","SlidePresentation","presentationProgress","presentationDirection","direction","enterStyle","exitStyle","directionStyle","presentationProgressWithEpsilonCorrection","slide","linearTiming","EnteringContext","React2","ExitingContext","WrapInEnteringProgressContext","WrapInExitingProgressContext","flattenChildren","flatChildren","TransitionSeriesTransition","_props","Fragment","TransitionSeriesChildren","childrenValue","transitionOffsets","startFrame","flattedChildren","Children","hasPrev","nextPrev","next","prevIsTransition","castedChildAgain","debugInfo","durationInFramesProp","_children","passedProps","offset","currentStartFrame","actualStartFrame","nextProgress","prevProgress","nextPresentation","prevPresentation","UppercaseNextPresentation","UppercasePrevPresentation","TransitionSeries","passedLayout","FadePresentation","isEntering","fade","makePathIn","progress","makePathOut","WipePresentation","innerEnterStyle","innerExitStyle","outerEnterStyle","outerExitStyle","clipId","progressInDirection","outerStyle","svgStyle","wipe","Flip","perspective","rotation","outer","flip","cutInstruction_1","cutCInstruction","cutLInstruction","instruction","lastPoint","y","interpolatePoint","pA","pB","factor","p0","p1","p2","p3","p01","p12","p23","p012","p123","p0123","cutInstruction","bezierValues","exports","bezier_values_1","cubicPoint","xs","ys","t","getDerivative","derivative","vs","_vs","bFunc","xbase","ybase","combined","getCubicArcLength","sx","sy","correctedT","z","sum","quadraticPoint","cubicDerivative","getQuadraticArcLength","ax","ay","by","A","B","C","uuk","bbk","term","quadraticDerivative","t2length","length","totalLength","func","numIterations","increasedTLength","increasedTError","decreasedTLength","decreasedTError","bezier","bezier_functions_1","makeQuadratic","startX","startY","cpx","cpy","len","xy","mdl","tangent","makeCubic","cp1x","cp1y","cp2x","cp2y","linear","makeLinearPosition","x0","x1","y0","y1","pos","fraction","newDeltaX","newDeltaY","module","reducedAnalysis","bezier_1","linear_1","conductAnalysis","instructions","currentPoint","moveStart","segments","curve","parsePath_1","chunkExact","array","chunks","expectedSize","makeInstructions","segmentRegExp","numberRegExp","parseValues","instructionType","numbers","expectedArguments","parsePath","segmentString","command","segmentsArray","convertQToCInstruction_1","convertQToCInstruction","startPoint","iterate","iterateOverSegments","initialX","initialY","cpX","cpY","newSeg","removeASTCurves","convert_q_to_c_instruction_1","iterate_1","TAU","approximate_unit_arc","theta1","delta_theta","alpha","x2","y2","unit_vector_angle","ux","uy","vx","vy","dot","get_arc_center","largeArcFlag","sweepFlag","rx","ry","sin_phi","cos_phi","x1p","y1p","rx_sq","ry_sq","x1p_sq","y1p_sq","radicant","cxp","cyp","cx","cy","v1x","v1y","v2x","v2y","arcToCircle","phi","lambda","cc","xp","yp","removeATSHVQInstructions","segment","prevSegment","nextX","nextY","new_segments","_s","prevControlX","prevControlY","vectorX","vectorY","newControlX","newControlY","serializeInstructions_1","serializeInstruction","serializeInstructions","parse_path_1","serialize_instructions_1","normalizeInstructions","normalized","moveX","moveY","currentX","currentY","normalizePath","reduceInstructions_1","remove_a_s_t_curves_1","normalize_path_1","reduceInstructions","simplified","cutPath_1","cut_instruction_1","reduced_analysis_1","require$$2","reduce_instructions_1","require$$3","require$$4","cutPath","parsed","reduced","constructed","newInstructions","summedUpLength","instructionAndInfo","cut","debugPath_1","debugPath","inst","topLeft","topRight","bottomLeft","bottomRight","triangle","CBEZIER_MINMAX_EPSILON","minmaxQ","min","max","E","minmaxC","K","T","S","L","R","Q","getBoundingBoxFromInstructions","minX","minY","maxX","maxY","lastMoveX","lastMoveY","seg","cxMinMax","cyMinMax","getBoundingBox","unarced","arc","mod","toRadians","angle","distance","clamp","val","angleBetween","v0","v1","pointOnEllipticalArc","xAxisRotation","xAxisRotationRadians","dx","dy","transformedPoint","radiiCheck","cSquareNumerator","cSquareRootDenom","cRadicand","cCoef","transformedCenter","center","startVector","startAngle","endVector","sweepAngle","ellipseComponentX","ellipseComponentY","approximateArcLengthOfCurve","resolution","pointOnCurveFunc","resultantArcLength","arcLengthMap","approximationLines","prevPoint","nextPoint","makeArc","xAxisRotate","LargeArcFlag","SweepFlag","getPointAtLength","fractionLength","position","point_dist","xDist","yDist","dist","arc_1","constructFromInstructions","partialLengths","functions","initialPoint","cur","prev_point","ringStart","prevWasCurve","linearCurve","prevWasQ","arcCurve","string","getLength_1","construct_1","getLength","evolvePath_1","get_length_1","evolvePath","extendedLength","strokeDasharray","strokeDashoffset","extendViewbox","extendViewBox","currentViewBox","scale","relativeScale","part","getInstructionIndexAtLengthFromConstructed","getInstructionIndexAtLength","getPointAtLength_1","get_instruction_index_at_length_1","fractionPart","functionAtPart","getSubpaths_1","getSubpaths","getTangentAtLength_1","getTangentAtLength","getEndPosition_1","getEndPosition","convertToSameInstructionType_1","convertToSameInstructionType","convertToLCommand","convertToCCommand","aCommand","bCommand","pointsToCommand","pointsToInstruction","points","deCasteljau","decasteljau","left","right","decasteljauRecurse","_points","_t","newPoints","splitCurveAsPoints_1","splitCurveAsPoints","de_casteljau_1","segmentCount","remainingCurve","tIncrement","tRelative","split","splitCurve","points_to_command_1","split_curve_as_points_1","splitCurveInstructions","instructionStartX","instructionStartY","instructionEnd","splitSegment","splitSegmentInstructions","split_curve_1","commandStart","commandEnd","copyCommand","extendCommand","extendInstruction","split_segment_1","commandsToExtend","referenceCommands","numSegmentsToExtend","numReferenceSegments","segmentRatio","extended","accum","insertIndex","_extended","lastCommandCopies","interpolateInstructionOfSameKind_1","interpolateLInstruction","second","interpolateCInstructions","interpolateMInstructions","interpolateInstructionOfSameKind","interpolateInstructions_1","interpolateInstructions","get_end_position_1","convert_to_same_instruction_type_1","extend_command_1","interpolate_instruction_of_same_kind_1","aCommandsInput","bCommandsInput","aCommands","bCommands","addZ","aSameType","commandsUntilNow","point","interpolatedCommands","interpolatePath_1","interpolate_instructions_1","interpolatePath","firstPath","secondPath","commandInterpolator","translateSegments","translatePath","resetPath_1","get_bounding_box_1","translate_path_1","resetPath","box","reversePath_1","reverseNormalizedPath","reversed","revstring","reversePath","spath","scalePath_1","scalePath","scaleX","scaleY","bounded","mapped","warpHelpers","svgPathInterpolate","euclideanDistance","endPoint","d2","seg0","seg1","orders","q0","q1","dim","j","s0","s1","interpolateUntil","deltaFunction","currentPoints","createLineSegment","warpInterpolate","prexX","prexY","rawSegment","linearPoints","warpTransform","transformer","fixZInstruction","prevX","prevY","warpPath_1","warp_helpers_1","getDefaultInterpolationThreshold","boundingBox","warpPath","withZFix","interpolated","cut_path_1","debug_path_1","evolve_path_1","extend_viewbox_1","get_bounding_box_2","require$$5","require$$6","get_point_at_length_1","require$$7","get_subpaths_1","require$$8","get_tangent_at_length_1","require$$9","interpolate_path_1","require$$10","require$$11","require$$12","require$$13","reset_path_1","require$$14","reverse_path_1","require$$15","scale_path_1","require$$16","require$$17","require$$18","warp_path_1","require$$19","makeCircle_1","paths_1","makeCircle","radius","doesReactSupportCanary","doesReactSupportTransformOriginProperty","version","major","__createBinding","this","o","k2","desc","__setModuleDefault","v","__importStar","renderSvg","jsx_runtime_1","react_1","react_dom_1","does_react_support_canary_1","RenderSvg","pathStyle","transformOrigin","debug","actualPathStyle","reactSupportsTransformOrigin","prevInstruction","circle","make_circle_1","render_svg_1","Circle","makeEllipse_1","makeEllipse","ellipse","make_ellipse_1","Ellipse","makePie_1","getCoord","counterClockwise","actualProgress","coord","makePie","closePath","endAngleX","endAngleY","end","pie","make_pie_1","Pie","joinPoints_1","shortenVector","vector","currentLength","scalingFactor","scaleVectorToLength","joinPoints","edgeRoundness","cornerRadius","roundCornerStrategy","prevPointIndex","nextPointIndex","middleOfLine","prevPointMiddleOfLine","prevVector","nextVector","computeRadius","prevVectorMinusRadius","prevVectorLength","nextVectorMinusRadius","firstDraw","controlPoint1","controlPoint2","makePolygon_1","join_points_1","polygon","centerX","centerY","degreeIncrement","makePolygon","polygonPathInstructions","make_polygon_1","Polygon","makeRect_1","makeRect","rect","make_rect_1","Rect","makeStar_1","star","innerRadius","outerRadius","_p","makeStar","starPathInstructions","make_star_1","Star","makeTriangle_1","makeTriangle","longerDimension","shorterSize","transformOriginX","transformOriginY","make_triangle_1","Triangle","circle_1","ellipse_1","pie_1","polygon_1","rect_1","star_1","triangle_1","ClockWipePresentation","finishedRadius","translatedPath","clockWipe","CirclePresentation","circlePath","makeCirclePath","WindowTransitionPresentation","windowWidth","windowHeight","windowX","windowY","rectangle","StarPresentation","slidingDoors"],"mappings":";;;;;;;;;;;;;;;;AASa,MAAIA,IAAEC,GAAiBC,IAAE,OAAO,IAAI,eAAe,GAAEC,IAAE,OAAO,IAAI,gBAAgB,GAAEC,IAAE,OAAO,UAAU,gBAAeC,IAAEL,EAAE,mDAAmD,mBAAkBM,IAAE,EAAC,KAAI,IAAG,KAAI,IAAG,QAAO,IAAG,UAAS,GAAE;AAClP,WAASC,EAAEC,GAAEC,GAAEC,GAAE;AAAC,QAAIC,GAAEC,IAAE,C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,IACA;AAAA,EACH;AAAA,EACD;AAAA,IACI;AAAA,IAAG;AAAA,IACH;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACH;AAAA,EACD;AAAA,IACI;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACH;AAAA,EACD;AAAA,IACI;AAAA,IAAG;AAAA,IACH;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACH;AAAA,EACD;AAAA,IACI;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACH;AAAA,EACD;AAAA,IACI;AAAA,IAAG;AAAA,IACH;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACH;AAAA,EACD;AAAA,IACI;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACH;AAAA,EACD;AAAA,IACI;AAAA,IAAG;AAAA,IACH;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACH;AAAA,EACD;AAAA,IACI;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACH;AAAA,EACD;AAAA,IACI;AAAA,IAAG;AAAA,IACH;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACH;AAAA,EACD;AAAA,IACI;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACH;AAAA,EACD;AAAA,IACI;AAAA,IAAG;AAAA,IACH;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACH;AAAA,EACD;AAAA,IACI;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACH;AAAA,EACD;AAAA,IACI;AAAA,IAAG;AAAA,IACH;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACH;AAAA,EACD;AAAA,IACI;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACH;AACL;AAEAA,GAAA,UAAkB;AAAA,EACd,CAAE;AAAA,EACF,CAAE;AAAA,EACF,CAAC,GAAK,CAAG;AAAA,EACT;AAAA,IACI;AAAA,IACA;AAAA,IACA;AAAA,EACH;AAAA,EACD;AAAA,IACI;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACH;AAAA,EACD;AAAA,IACI;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACH;AAAA,EACD;AAAA,IACI;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACH;AAAA,EACD;AAAA,IACI;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACH;AAAA,EACD;AAAA,IACI;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACH;AAAA,EACD;AAAA,IACI;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACH;AAAA,EACD;AAAA,IACI;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACH;AAAA,EACD;AAAA,IACI;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACH;AAAA,EACD;AAAA,IACI;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACH;AAAA,EACD;AAAA,IACI;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACH;AAAA,EACD;AAAA,IACI;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACH;AAAA,EACD;AAAA,IACI;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACH;AAAA,EACD;AAAA,IACI;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACH;AAAA,EACD;AAAA,IACI;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACH;AAAA,EACD;AAAA,IACI;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACH;AAAA,EACD;AAAA,IACI;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACH;AAAA,EACD;AAAA,IACI;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACH;AAAA,EACD;AAAA,IACI;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACH;AAAA,EACD;AAAA,IACI;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA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AS,CAAA;AAAA,IACrC85B,MAA0B,YAAY,OACrCz5B,gBAAAA,EAAA,IAACmD,GACC,EAAA,UAAAnD,gBAAAA,MAAC,OACC,EAAA,UAAAA,gBAAAA,EAAAA,IAAC,QACC,EAAA,UAAAA,gBAAAA,EAAA,IAAC,YAAS,EAAA,IAAIg9B,GACZ,UAAAh9B,gBAAAA,EAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,GAAGmkD;AAAA,QACH,GAAG;AAAA,QACH,OAAOF;AAAA,QACP,QAAA/5C;AAAA,QACA,MAAK;AAAA,MAAA;AAAA,IAAA,GAET,EACF,CAAA,EAAA,CACF,EACF,CAAA;AAAA,EAAA,GAEJ;AAEJ,GAEaq6C,KAAe,CAC1B3rD,OAEO,EAAE,WAAWorD,IAA8B,OAAAprD,EAAM;","x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71]}