@cliquify.me/transitions 0.11.9 → 0.11.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.umd.js CHANGED
@@ -1,131 +1,26 @@
1
- (function(ee,f){typeof exports=="object"&&typeof module<"u"?f(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],f):(ee=typeof globalThis<"u"?globalThis:ee||self,f(ee.transitions={},ee.React,ee.ReactDOM))})(this,function(ee,f,Ro){"use strict";var Fe=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},lr={exports:{}},Je={};/**
1
+ (function(h,a){typeof exports=="object"&&typeof module<"u"?a(exports,require("remotion"),require("react"),require("@remotion/paths"),require("@remotion/shapes")):typeof define=="function"&&define.amd?define(["exports","remotion","react","@remotion/paths","@remotion/shapes"],a):(h=typeof globalThis<"u"?globalThis:h||self,a(h.transitions={},h.Remotion,h.React,h.RemotionPaths,h.RemotionShapes))})(this,function(h,a,m,Z,se){"use strict";const _=r=>({getDurationInFrames:()=>r.durationInFrames,getProgress:({frame:t})=>a.interpolate(t,[0,r.durationInFrames],[0,1],{easing:r.easing,extrapolateLeft:"clamp",extrapolateRight:"clamp"})}),Se=(r={})=>({getDurationInFrames:({fps:t})=>r.durationInFrames?r.durationInFrames:a.measureSpring({config:r.config,threshold:r.durationRestThreshold,fps:t}),getProgress:({fps:t,frame:e})=>{const o=r.reverse?0:1,i=r.reverse?1:0;return a.spring({fps:t,frame:e,to:o,from:i,config:r.config,durationInFrames:r.durationInFrames,durationRestThreshold:r.durationRestThreshold,reverse:r.reverse})}});var Q={exports:{}},W={};/**
2
2
  * @license React
3
- * react-jsx-runtime.production.min.js
3
+ * react-jsx-runtime.production.js
4
4
  *
5
- * Copyright (c) Facebook, Inc. and its affiliates.
5
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
6
6
  *
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
- */var rn;function Ho(){if(rn)return Je;rn=1;var e=f,t=Symbol.for("react.element"),r=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,i=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function c(a,u,d){var p,y={},s=null,h=null;d!==void 0&&(s=""+d),u.key!==void 0&&(s=""+u.key),u.ref!==void 0&&(h=u.ref);for(p in u)n.call(u,p)&&!o.hasOwnProperty(p)&&(y[p]=u[p]);if(a&&a.defaultProps)for(p in u=a.defaultProps,u)y[p]===void 0&&(y[p]=u[p]);return{$$typeof:t,type:a,key:s,ref:h,props:y,_owner:i.current}}return Je.Fragment=r,Je.jsx=c,Je.jsxs=c,Je}var Ke={};/**
9
+ */var ie;function ve(){if(ie)return W;ie=1;var r=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function e(o,i,c){var d=null;if(c!==void 0&&(d=""+c),i.key!==void 0&&(d=""+i.key),"key"in i){c={};for(var f in i)f!=="key"&&(c[f]=i[f])}else c=i;return i=c.ref,{$$typeof:r,type:o,key:d,ref:i!==void 0?i:null,props:c}}return W.Fragment=t,W.jsx=e,W.jsxs=e,W}var D={};/**
10
10
  * @license React
11
11
  * react-jsx-runtime.development.js
12
12
  *
13
- * Copyright (c) Facebook, Inc. and its affiliates.
13
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
14
14
  *
15
15
  * This source code is licensed under the MIT license found in the
16
16
  * LICENSE file in the root directory of this source tree.
17
- */var nn;function Zo(){return nn||(nn=1,process.env.NODE_ENV!=="production"&&function(){var e=f,t=Symbol.for("react.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),c=Symbol.for("react.provider"),a=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),p=Symbol.for("react.suspense_list"),y=Symbol.for("react.memo"),s=Symbol.for("react.lazy"),h=Symbol.for("react.offscreen"),g=Symbol.iterator,P="@@iterator";function x(m){if(m===null||typeof m!="object")return null;var M=g&&m[g]||m[P];return typeof M=="function"?M:null}var v=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function l(m){{for(var M=arguments.length,I=new Array(M>1?M-1:0),L=1;L<M;L++)I[L-1]=arguments[L];w("error",m,I)}}function w(m,M,I){{var L=v.ReactDebugCurrentFrame,B=L.getStackAddendum();B!==""&&(M+="%s",I=I.concat([B]));var U=I.map(function(D){return String(D)});U.unshift("Warning: "+M),Function.prototype.apply.call(console[m],console,U)}}var E=!1,_=!1,$=!1,S=!1,T=!1,k;k=Symbol.for("react.module.reference");function C(m){return!!(typeof m=="string"||typeof m=="function"||m===n||m===o||T||m===i||m===d||m===p||S||m===h||E||_||$||typeof m=="object"&&m!==null&&(m.$$typeof===s||m.$$typeof===y||m.$$typeof===c||m.$$typeof===a||m.$$typeof===u||m.$$typeof===k||m.getModuleId!==void 0))}function F(m,M,I){var L=m.displayName;if(L)return L;var B=M.displayName||M.name||"";return B!==""?I+"("+B+")":I}function V(m){return m.displayName||"Context"}function j(m){if(m==null)return null;if(typeof m.tag=="number"&&l("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof m=="function")return m.displayName||m.name||null;if(typeof m=="string")return m;switch(m){case n:return"Fragment";case r:return"Portal";case o:return"Profiler";case i:return"StrictMode";case d:return"Suspense";case p:return"SuspenseList"}if(typeof m=="object")switch(m.$$typeof){case a:var M=m;return V(M)+".Consumer";case c:var I=m;return V(I._context)+".Provider";case u:return F(m,m.render,"ForwardRef");case y:var L=m.displayName||null;return L!==null?L:j(m.type)||"Memo";case s:{var B=m,U=B._payload,D=B._init;try{return j(D(U))}catch{return null}}}return null}var N=Object.assign,q=0,A,te,W,H,Y,Z,re;function Ze(){}Ze.__reactDisabledLog=!0;function Ye(){{if(q===0){A=console.log,te=console.info,W=console.warn,H=console.error,Y=console.group,Z=console.groupCollapsed,re=console.groupEnd;var m={configurable:!0,enumerable:!0,value:Ze,writable:!0};Object.defineProperties(console,{info:m,log:m,warn:m,error:m,group:m,groupCollapsed:m,groupEnd:m})}q++}}function z(){{if(q--,q===0){var m={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:N({},m,{value:A}),info:N({},m,{value:te}),warn:N({},m,{value:W}),error:N({},m,{value:H}),group:N({},m,{value:Y}),groupCollapsed:N({},m,{value:Z}),groupEnd:N({},m,{value:re})})}q<0&&l("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var pe=v.ReactCurrentDispatcher,we;function ye(m,M,I){{if(we===void 0)try{throw Error()}catch(B){var L=B.stack.trim().match(/\n( *(at )?)/);we=L&&L[1]||""}return`
18
- `+we+m}}var Xr=!1,sr;{var yc=typeof WeakMap=="function"?WeakMap:Map;sr=new yc}function Io(m,M){if(!m||Xr)return"";{var I=sr.get(m);if(I!==void 0)return I}var L;Xr=!0;var B=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var U;U=pe.current,pe.current=null,Ye();try{if(M){var D=function(){throw Error()};if(Object.defineProperty(D.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(D,[])}catch(se){L=se}Reflect.construct(m,[],D)}else{try{D.call()}catch(se){L=se}m.call(D.prototype)}}else{try{throw Error()}catch(se){L=se}m()}}catch(se){if(se&&L&&typeof se.stack=="string"){for(var O=se.stack.split(`
19
- `),ie=L.stack.split(`
20
- `),Q=O.length-1,J=ie.length-1;Q>=1&&J>=0&&O[Q]!==ie[J];)J--;for(;Q>=1&&J>=0;Q--,J--)if(O[Q]!==ie[J]){if(Q!==1||J!==1)do if(Q--,J--,J<0||O[Q]!==ie[J]){var le=`
21
- `+O[Q].replace(" at new "," at ");return m.displayName&&le.includes("<anonymous>")&&(le=le.replace("<anonymous>",m.displayName)),typeof m=="function"&&sr.set(m,le),le}while(Q>=1&&J>=0);break}}}finally{Xr=!1,pe.current=U,z(),Error.prepareStackTrace=B}var Xe=m?m.displayName||m.name:"",Ie=Xe?ye(Xe):"";return typeof m=="function"&&sr.set(m,Ie),Ie}function hc(m,M,I){return Io(m,!1)}function mc(m){var M=m.prototype;return!!(M&&M.isReactComponent)}function ur(m,M,I){if(m==null)return"";if(typeof m=="function")return Io(m,mc(m));if(typeof m=="string")return ye(m);switch(m){case d:return ye("Suspense");case p:return ye("SuspenseList")}if(typeof m=="object")switch(m.$$typeof){case u:return hc(m.render);case y:return ur(m.type,M,I);case s:{var L=m,B=L._payload,U=L._init;try{return ur(U(B),M,I)}catch{}}}return""}var mt=Object.prototype.hasOwnProperty,Fo={},ko=v.ReactDebugCurrentFrame;function cr(m){if(m){var M=m._owner,I=ur(m.type,m._source,M?M.type:null);ko.setExtraStackFrame(I)}else ko.setExtraStackFrame(null)}function gc(m,M,I,L,B){{var U=Function.call.bind(mt);for(var D in m)if(U(m,D)){var O=void 0;try{if(typeof m[D]!="function"){var ie=Error((L||"React class")+": "+I+" type `"+D+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof m[D]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw ie.name="Invariant Violation",ie}O=m[D](M,D,L,I,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(Q){O=Q}O&&!(O instanceof Error)&&(cr(B),l("%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).",L||"React class",I,D,typeof O),cr(null)),O instanceof Error&&!(O.message in Fo)&&(Fo[O.message]=!0,cr(B),l("Failed %s type: %s",I,O.message),cr(null))}}}var vc=Array.isArray;function Jr(m){return vc(m)}function xc(m){{var M=typeof Symbol=="function"&&Symbol.toStringTag,I=M&&m[Symbol.toStringTag]||m.constructor.name||"Object";return I}}function wc(m){try{return jo(m),!1}catch{return!0}}function jo(m){return""+m}function Lo(m){if(wc(m))return l("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",xc(m)),jo(m)}var Ao=v.ReactCurrentOwner,bc={key:!0,ref:!0,__self:!0,__source:!0},Vo,Oo;function _c(m){if(mt.call(m,"ref")){var M=Object.getOwnPropertyDescriptor(m,"ref").get;if(M&&M.isReactWarning)return!1}return m.ref!==void 0}function Pc(m){if(mt.call(m,"key")){var M=Object.getOwnPropertyDescriptor(m,"key").get;if(M&&M.isReactWarning)return!1}return m.key!==void 0}function Ec(m,M){typeof m.ref=="string"&&Ao.current}function Cc(m,M){{var I=function(){Vo||(Vo=!0,l("%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)",M))};I.isReactWarning=!0,Object.defineProperty(m,"key",{get:I,configurable:!0})}}function Mc(m,M){{var I=function(){Oo||(Oo=!0,l("%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)",M))};I.isReactWarning=!0,Object.defineProperty(m,"ref",{get:I,configurable:!0})}}var $c=function(m,M,I,L,B,U,D){var O={$$typeof:t,type:m,key:M,ref:I,props:D,_owner:U};return O._store={},Object.defineProperty(O._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(O,"_self",{configurable:!1,enumerable:!1,writable:!1,value:L}),Object.defineProperty(O,"_source",{configurable:!1,enumerable:!1,writable:!1,value:B}),Object.freeze&&(Object.freeze(O.props),Object.freeze(O)),O};function Tc(m,M,I,L,B){{var U,D={},O=null,ie=null;I!==void 0&&(Lo(I),O=""+I),Pc(M)&&(Lo(M.key),O=""+M.key),_c(M)&&(ie=M.ref,Ec(M,B));for(U in M)mt.call(M,U)&&!bc.hasOwnProperty(U)&&(D[U]=M[U]);if(m&&m.defaultProps){var Q=m.defaultProps;for(U in Q)D[U]===void 0&&(D[U]=Q[U])}if(O||ie){var J=typeof m=="function"?m.displayName||m.name||"Unknown":m;O&&Cc(D,J),ie&&Mc(D,J)}return $c(m,O,ie,B,L,Ao.current,D)}}var Kr=v.ReactCurrentOwner,No=v.ReactDebugCurrentFrame;function Qe(m){if(m){var M=m._owner,I=ur(m.type,m._source,M?M.type:null);No.setExtraStackFrame(I)}else No.setExtraStackFrame(null)}var Gr;Gr=!1;function en(m){return typeof m=="object"&&m!==null&&m.$$typeof===t}function Do(){{if(Kr.current){var m=j(Kr.current.type);if(m)return`
22
-
23
- Check the render method of \``+m+"`."}return""}}function Sc(m){return""}var Bo={};function Ic(m){{var M=Do();if(!M){var I=typeof m=="string"?m:m.displayName||m.name;I&&(M=`
24
-
25
- Check the top-level render call using <`+I+">.")}return M}}function zo(m,M){{if(!m._store||m._store.validated||m.key!=null)return;m._store.validated=!0;var I=Ic(M);if(Bo[I])return;Bo[I]=!0;var L="";m&&m._owner&&m._owner!==Kr.current&&(L=" It was passed a child from "+j(m._owner.type)+"."),Qe(m),l('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',I,L),Qe(null)}}function qo(m,M){{if(typeof m!="object")return;if(Jr(m))for(var I=0;I<m.length;I++){var L=m[I];en(L)&&zo(L,M)}else if(en(m))m._store&&(m._store.validated=!0);else if(m){var B=x(m);if(typeof B=="function"&&B!==m.entries)for(var U=B.call(m),D;!(D=U.next()).done;)en(D.value)&&zo(D.value,M)}}}function Fc(m){{var M=m.type;if(M==null||typeof M=="string")return;var I;if(typeof M=="function")I=M.propTypes;else if(typeof M=="object"&&(M.$$typeof===u||M.$$typeof===y))I=M.propTypes;else return;if(I){var L=j(M);gc(I,m.props,"prop",L,m)}else if(M.PropTypes!==void 0&&!Gr){Gr=!0;var B=j(M);l("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",B||"Unknown")}typeof M.getDefaultProps=="function"&&!M.getDefaultProps.isReactClassApproved&&l("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function kc(m){{for(var M=Object.keys(m.props),I=0;I<M.length;I++){var L=M[I];if(L!=="children"&&L!=="key"){Qe(m),l("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",L),Qe(null);break}}m.ref!==null&&(Qe(m),l("Invalid attribute `ref` supplied to `React.Fragment`."),Qe(null))}}var Wo={};function Uo(m,M,I,L,B,U){{var D=C(m);if(!D){var O="";(m===void 0||typeof m=="object"&&m!==null&&Object.keys(m).length===0)&&(O+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var ie=Sc();ie?O+=ie:O+=Do();var Q;m===null?Q="null":Jr(m)?Q="array":m!==void 0&&m.$$typeof===t?(Q="<"+(j(m.type)||"Unknown")+" />",O=" Did you accidentally export a JSX literal instead of a component?"):Q=typeof m,l("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Q,O)}var J=Tc(m,M,I,B,U);if(J==null)return J;if(D){var le=M.children;if(le!==void 0)if(L)if(Jr(le)){for(var Xe=0;Xe<le.length;Xe++)qo(le[Xe],m);Object.freeze&&Object.freeze(le)}else l("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else qo(le,m)}if(mt.call(M,"key")){var Ie=j(m),se=Object.keys(M).filter(function(Nc){return Nc!=="key"}),tn=se.length>0?"{key: someKey, "+se.join(": ..., ")+": ...}":"{key: someKey}";if(!Wo[Ie+tn]){var Oc=se.length>0?"{"+se.join(": ..., ")+": ...}":"{}";l(`A props object containing a "key" prop is being spread into JSX:
17
+ */var ae;function Ee(){return ae||(ae=1,process.env.NODE_ENV!=="production"&&function(){function r(n){if(n==null)return null;if(typeof n=="function")return n.$$typeof===re?null:n.displayName||n.name||null;if(typeof n=="string")return n;switch(n){case k:return"Fragment";case I:return"Profiler";case F:return"StrictMode";case te:return"Suspense";case X:return"SuspenseList";case N:return"Activity"}if(typeof n=="object")switch(typeof n.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),n.$$typeof){case M:return"Portal";case A:return n.displayName||"Context";case we:return(n._context.displayName||"Context")+".Consumer";case C:var u=n.render;return n=n.displayName,n||(n=u.displayName||u.name||"",n=n!==""?"ForwardRef("+n+")":"ForwardRef"),n;case T:return u=n.displayName||null,u!==null?u:r(n.type)||"Memo";case q:u=n._payload,n=n._init;try{return r(n(u))}catch{}}return null}function t(n){return""+n}function e(n){try{t(n);var u=!1}catch{u=!0}if(u){u=console;var p=u.error,x=typeof Symbol=="function"&&Symbol.toStringTag&&n[Symbol.toStringTag]||n.constructor.name||"Object";return p.call(u,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",x),t(n)}}function o(n){if(n===k)return"<>";if(typeof n=="object"&&n!==null&&n.$$typeof===q)return"<...>";try{var u=r(n);return u?"<"+u+">":"<...>"}catch{return"<...>"}}function i(){var n=j.A;return n===null?null:n.getOwner()}function c(){return Error("react-stack-top-frame")}function d(n){if(P.call(n,"key")){var u=Object.getOwnPropertyDescriptor(n,"key").get;if(u&&u.isReactWarning)return!1}return n.key!==void 0}function f(n,u){function p(){O||(O=!0,console.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://react.dev/link/special-props)",u))}p.isReactWarning=!0,Object.defineProperty(n,"key",{get:p,configurable:!0})}function l(){var n=r(this.type);return Y[n]||(Y[n]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),n=this.props.ref,n!==void 0?n:null}function w(n,u,p,x,H,ne){var S=p.ref;return n={$$typeof:B,type:n,key:u,props:p,_owner:x},(S!==void 0?S:null)!==null?Object.defineProperty(n,"ref",{enumerable:!1,get:l}):Object.defineProperty(n,"ref",{enumerable:!1,value:null}),n._store={},Object.defineProperty(n._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(n,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(n,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:H}),Object.defineProperty(n,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:ne}),Object.freeze&&(Object.freeze(n.props),Object.freeze(n)),n}function g(n,u,p,x,H,ne){var S=u.children;if(S!==void 0)if(x)if(R(S)){for(x=0;x<S.length;x++)v(S[x]);Object.freeze&&Object.freeze(S)}else console.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.");else v(S);if(P.call(u,"key")){S=r(n);var L=Object.keys(u).filter(function(rt){return rt!=="key"});x=0<L.length?"{key: someKey, "+L.join(": ..., ")+": ...}":"{key: someKey}",G[S+x]||(L=0<L.length?"{"+L.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
26
18
  let props = %s;
27
19
  <%s {...props} />
28
20
  React keys must be passed directly to JSX without using spread:
29
21
  let props = %s;
30
- <%s key={someKey} {...props} />`,tn,Ie,Oc,Ie),Wo[Ie+tn]=!0}}return m===n?kc(J):Fc(J),J}}function jc(m,M,I){return Uo(m,M,I,!0)}function Lc(m,M,I){return Uo(m,M,I,!1)}var Ac=Lc,Vc=jc;Ke.Fragment=n,Ke.jsx=Ac,Ke.jsxs=Vc}()),Ke}process.env.NODE_ENV==="production"?lr.exports=Ho():lr.exports=Zo();var b=lr.exports,Yo=Object.defineProperty,on=(e,t)=>{for(var r in t)Yo(e,r,{get:t[r],enumerable:!0,configurable:!0,set:n=>t[r]=()=>n})};if(typeof f.createContext!="function"){const e=['Remotion requires React.createContext, but it is "undefined".','If you are in a React Server Component, turn it into a client component by adding "use client" at the top of the file.',"","Before:",' import {useCurrentFrame} from "remotion";',"","After:",' "use client";',' import {useCurrentFrame} from "remotion";'];throw new Error(e.join(`
31
- `))}var gt=f.createContext({setClipRegion:()=>{throw new Error("NativeLayers not set")},clipRegion:null}),an=({children:e})=>{const[t,r]=f.useState(null),n=f.useMemo(()=>({setClipRegion:r,clipRegion:t}),[t,r]);return typeof window<"u"&&f.useLayoutEffect(()=>{window.remotion_getClipRegion=()=>t},[t,r]),b.jsx(gt.Provider,{value:n,children:e})};function sn(){return["NOD","E_EN","V"].join("")}var un=()=>["e","nv"].join(""),K=()=>{const e=typeof window<"u"&&window.remotion_isPlayer,t=typeof window<"u"&&typeof window.process<"u"&&typeof window.process.env<"u"&&(window.process[un()][sn()]==="test"||window.process[un()][sn()]==="production"&&typeof window<"u"&&typeof window.remotion_puppeteerTimeout<"u");return{isStudio:typeof window<"u"&&window.remotion_isStudio,isRendering:t,isPlayer:e}},Qo=f.createElement,cn=[],ln=()=>{if(!K().isStudio)return;const e=new Proxy(Qo,{apply(t,r,n){if(cn.includes(n[0])){const[i,o,...c]=n,a={...o??{},stack:new Error().stack};return Reflect.apply(t,r,[i,a,...c])}return Reflect.apply(t,r,n)}});f.createElement=e},Ge=e=>{cn.push(e),ln()},dn=f.createContext(!1),Xo=({children:e})=>b.jsx(dn.Provider,{value:!0,children:e}),fn=()=>f.useContext(dn);function dr(e){return!!e}var vt="4.0.221",Jo=()=>{if(typeof globalThis>"u")return;const e=globalThis.remotion_imported||typeof window<"u"&&window.remotion_imported;if(e){if(e===vt)return;throw new TypeError(`🚨 Multiple versions of Remotion detected: ${[vt,typeof e=="string"?e:"an older version"].filter(dr).join(" and ")}. This will cause things to break in an unexpected way.
32
- Check that all your Remotion packages are on the same version. If your dependencies depend on Remotion, make them peer dependencies. You can also run \`npx remotion versions\` from your terminal to see which versions are mismatching.`)}globalThis.remotion_imported=vt,typeof window<"u"&&(window.remotion_imported=vt)},Ko=(e,t)=>{const{style:r,...n}=e,i=f.useMemo(()=>({position:"absolute",top:0,left:0,right:0,bottom:0,width:"100%",height:"100%",display:"flex",flexDirection:"column",...r}),[r]);return b.jsx("div",{ref:t,style:i,...n})},R=f.forwardRef(Ko),ne=f.createContext(null),ke=f.createContext({registerSequence:()=>{throw new Error("SequenceManagerContext not initialized")},unregisterSequence:()=>{throw new Error("SequenceManagerContext not initialized")},sequences:[]}),et=f.createContext({hidden:{},setHidden:()=>{throw new Error("SequenceVisibilityToggle not initialized")}}),Go=({children:e})=>{const[t,r]=f.useState([]),[n,i]=f.useState({}),o=f.useCallback(d=>{r(p=>[...p,d])},[]),c=f.useCallback(d=>{r(p=>p.filter(y=>y.id!==d))},[]),a=f.useMemo(()=>({registerSequence:o,sequences:t,unregisterSequence:c}),[o,t,c]),u=f.useMemo(()=>({hidden:n,setHidden:i}),[n]);return b.jsx(ke.Provider,{value:a,children:b.jsx(et.Provider,{value:u,children:e})})},je=f.createContext({getNonce:()=>0,fastRefreshes:0}),pn=()=>{const e=f.useContext(je),[t,r]=f.useState(()=>e.getNonce()),n=f.useRef(e);return f.useEffect(()=>{n.current!==e&&(n.current=e,r(e.getNonce))},[e]),t},yn={};on(yn,{useTimelineSetFrame:()=>kn,useTimelinePosition:()=>Ve,usePlayingState:()=>vr,persistCurrentFrame:()=>Sn,getInitialFrameState:()=>In,getFrameForComposition:()=>Fn,TimelineContext:()=>de,SetTimelineContext:()=>Ae});var Pe=f.createContext({compositions:[],registerComposition:()=>{},unregisterComposition:()=>{},registerFolder:()=>{},unregisterFolder:()=>{},setCurrentCompositionMetadata:()=>{},updateCompositionDefaultProps:()=>{},folders:[],currentCompositionMetadata:null,canvasContent:null,setCanvasContent:()=>{}}),xt=f.createContext({props:{},updateProps:()=>{throw new Error("Not implemented")},resetUnsaved:()=>{throw new Error("Not implemented")}}),hn=f.createRef(),mn=({children:e})=>{const[t,r]=f.useState({}),n=f.useCallback(({defaultProps:c,id:a,newProps:u})=>{r(d=>({...d,[a]:typeof u=="function"?u(d[a]??c):u}))},[]),i=f.useCallback(()=>{r({})},[]);f.useImperativeHandle(hn,()=>({getProps:()=>t,setProps:r}),[t]);const o=f.useMemo(()=>({props:t,updateProps:n,resetUnsaved:i}),[t,i,n]);return b.jsx(xt.Provider,{value:o,children:e})},ei={"%3A":":","%2F":"/","%3F":"?","%23":"#","%5B":"[","%5D":"]","%40":"@","%21":"!","%24":"$","%26":"&","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";"},gn={},ti=e=>{gn[e]||(console.warn(e),gn[e]=!0)},ri=e=>{for(const t of Object.keys(ei))if(e.includes(t))return{containsHex:!0,hexCode:t};return{containsHex:!1}},fr=e=>e.startsWith("/")?fr(e.substring(1)):e,ni=e=>{if(typeof window<"u"&&window.remotion_staticBase){if(e.startsWith(window.remotion_staticBase))throw new Error(`The value "${e}" is already prefixed with the static base ${window.remotion_staticBase}. You don't need to call staticFile() on it.`);return`${window.remotion_staticBase}/${fr(e)}`}return`/${fr(e)}`},oi=e=>e.split("/").map(i=>encodeURIComponent(i)).join("/"),ii=e=>{if(e.startsWith("http://")||e.startsWith("https://"))throw new TypeError(`staticFile() does not support remote URLs - got "${e}". Instead, pass the URL without wrapping it in staticFile(). See: https://remotion.dev/docs/staticfile-remote-urls`);if(e.startsWith("..")||e.startsWith("./"))throw new TypeError(`staticFile() does not support relative paths - got "${e}". Instead, pass the name of a file that is inside the public/ folder. See: https://remotion.dev/docs/staticfile-relative-paths`);if(e.startsWith("/Users")||e.startsWith("/home")||e.startsWith("/tmp")||e.startsWith("/etc")||e.startsWith("/opt")||e.startsWith("/var")||e.startsWith("C:")||e.startsWith("D:")||e.startsWith("E:"))throw new TypeError(`staticFile() does not support absolute paths - got "${e}". Instead, pass the name of a file that is inside the public/ folder. See: https://remotion.dev/docs/staticfile-relative-paths`);if(e.startsWith("public/"))throw new TypeError(`Do not include the public/ prefix when using staticFile() - got "${e}". See: https://remotion.dev/docs/staticfile-relative-paths`);const t=ri(e);t.containsHex&&ti(`WARNING: You seem to pass an already encoded path (path contains ${t.hexCode}). Since Remotion 4.0, the encoding is done by staticFile() itself. You may want to remove a encodeURIComponent() wrapping.`);const r=oi(e),n=ni(r);return n.startsWith("/")?n:`/${n}`},pr="remotion-date:",yr="remotion-file:",ai=({data:e,indent:t,staticBase:r})=>{let n=!1,i=!1,o=!1,c=!1;try{return{serializedString:JSON.stringify(e,function(u,d){const p=this[u];return p instanceof Date?(n=!0,`${pr}${p.toISOString()}`):p instanceof Map?(o=!0,d):p instanceof Set?(c=!0,d):typeof p=="string"&&r!==null&&p.startsWith(r)?(i=!0,`${yr}${p.replace(r+"/","")}`):d},t),customDateUsed:n,customFileUsed:i,mapUsed:o,setUsed:c}}catch(a){throw new Error("Could not serialize the passed input props to JSON: "+a.message)}},vn=e=>JSON.parse(e,(t,r)=>typeof r=="string"&&r.startsWith(pr)?new Date(r.replace(pr,"")):typeof r=="string"&&r.startsWith(yr)?ii(r.replace(yr,"")):r),Le=e=>K().isStudio?vn(ai({data:e,indent:2,staticBase:window.remotion_staticBase}).serializedString):e,xn=!1,si=()=>{xn||(xn=!0,console.warn("Called `getInputProps()` on the server. This function is not available server-side and has returned an empty object."),console.warn("To hide this warning, don't call this function on the server:"),console.warn(" typeof window === 'undefined' ? {} : getInputProps()"))},wn=()=>{if(typeof window>"u")return si(),{};if(K().isPlayer)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.");const e=window.remotion_inputProps;return e?vn(e):{}},bn=["h264","h265","vp8","vp9","mp3","aac","wav","prores","h264-mkv","h264-ts","gif"];function ui(e,t){if(!(typeof e>"u")){if(typeof e!="string")throw new TypeError(`The "defaultCodec" prop ${t} must be a string, but you passed a value of type ${typeof e}.`);if(!bn.includes(e))throw new Error(`The "defaultCodec" prop ${t} must be one of ${bn.join(", ")}, but you passed ${e}.`)}}function wt(e,t,r){if(typeof e!="number")throw new Error(`The "${t}" prop ${r} must be a number, but you passed a value of type ${typeof e}`);if(isNaN(e))throw new TypeError(`The "${t}" prop ${r} must not be NaN, but is NaN.`);if(!Number.isFinite(e))throw new TypeError(`The "${t}" prop ${r} must be finite, but is ${e}.`);if(e%1!==0)throw new TypeError(`The "${t}" prop ${r} must be an integer, but is ${e}.`);if(e<=0)throw new TypeError(`The "${t}" prop ${r} must be positive, but got ${e}.`)}function hr(e,t){const{allowFloats:r,component:n}=t;if(typeof e>"u")throw new Error(`The "durationInFrames" prop ${n} is missing.`);if(typeof e!="number")throw new Error(`The "durationInFrames" prop ${n} must be a number, but you passed a value of type ${typeof e}`);if(e<=0)throw new TypeError(`The "durationInFrames" prop ${n} must be positive, but got ${e}.`);if(!r&&e%1!==0)throw new TypeError(`The "durationInFrames" prop ${n} must be an integer, but got ${e}.`);if(!Number.isFinite(e))throw new TypeError(`The "durationInFrames" prop ${n} must be finite, but got ${e}.`)}function _n(e,t,r){if(typeof e!="number")throw new Error(`"fps" must be a number, but you passed a value of type ${typeof e} ${t}`);if(!Number.isFinite(e))throw new Error(`"fps" must be a finite, but you passed ${e} ${t}`);if(isNaN(e))throw new Error(`"fps" must not be NaN, but got ${e} ${t}`);if(e<=0)throw new TypeError(`"fps" must be positive, but got ${e} ${t}`)}var Pn=({calculated:e,compositionId:t,compositionFps:r,compositionHeight:n,compositionWidth:i,compositionDurationInFrames:o})=>{const c=`calculated by calculateMetadata() for the composition "${t}"`,a=`of the "<Composition />" component with the id "${t}"`,u=(e==null?void 0:e.width)??i??void 0;wt(u,"width",e!=null&&e.width?c:a);const d=(e==null?void 0:e.height)??n??void 0;wt(d,"height",e!=null&&e.height?c:a);const p=(e==null?void 0:e.fps)??r??null;_n(p,e!=null&&e.fps?c:a);const y=(e==null?void 0:e.durationInFrames)??o??null;hr(y,{allowFloats:!1,component:`of the "<Composition />" component with the id "${t}"`});const s=e==null?void 0:e.defaultCodec;return ui(s,c),{width:u,height:d,fps:p,durationInFrames:y,defaultCodec:s}},En=({calculateMetadata:e,signal:t,defaultProps:r,originalProps:n,compositionId:i,compositionDurationInFrames:o,compositionFps:c,compositionHeight:a,compositionWidth:u})=>{const d=e?e({defaultProps:r,props:n,abortSignal:t,compositionId:i}):null;if(d!==null&&typeof d=="object"&&"then"in d)return d.then(y=>{const{height:s,width:h,durationInFrames:g,fps:P,defaultCodec:x}=Pn({calculated:y,compositionDurationInFrames:o,compositionFps:c,compositionHeight:a,compositionWidth:u,compositionId:i});return{width:h,height:s,fps:P,durationInFrames:g,id:i,defaultProps:Le(r),props:Le(y.props??n),defaultCodec:x??null}});const p=Pn({calculated:d,compositionDurationInFrames:o,compositionFps:c,compositionHeight:a,compositionWidth:u,compositionId:i});return d===null?{...p,id:i,defaultProps:Le(r??{}),props:Le(n),defaultCodec:null}:{...p,id:i,defaultProps:Le(r??{}),props:Le(d.props??n),defaultCodec:d.defaultCodec??null}},ci=e=>{try{return{type:"success",result:En(e)}}catch(t){return{type:"error",error:t}}},bt=f.createContext(null),Cn=f.createRef(),Mn=e=>!!e.calculateMetadata,li="remotion.propsUpdatedExternally",$n=({children:e})=>{const[t,r]=f.useState(null),{compositions:n,canvasContent:i,currentCompositionMetadata:o}=f.useContext(Pe),{fastRefreshes:c}=f.useContext(je),a=f.useMemo(()=>n.find(T=>i&&i.type==="composition"&&i.compositionId===T.id),[i,n]),u=n.find(T=>T.id===t),{props:d}=f.useContext(xt),p=f.useMemo(()=>typeof window>"u"||K().isPlayer?{}:wn()??{},[]),[y,s]=f.useState({}),h=f.useMemo(()=>a?d[a.id]??{}:{},[d,a]),g=f.useMemo(()=>u?d[u.id]??{}:{},[d,u]),P=!!o,x=f.useCallback(({calculateMetadata:T,combinedProps:k,compositionDurationInFrames:C,compositionFps:F,compositionHeight:V,compositionId:j,compositionWidth:N,defaultProps:q})=>{const A=new AbortController;if(P)return A;const{signal:te}=A,W=ci({compositionId:j,calculateMetadata:T,originalProps:k,signal:te,defaultProps:q,compositionDurationInFrames:C,compositionFps:F,compositionHeight:V,compositionWidth:N});if(W.type==="error")return s(Y=>({...Y,[j]:{type:"error",error:W.error}})),A;const H=W.result;return typeof H=="object"&&"then"in H?(s(Y=>{const Z=Y[j];return(Z==null?void 0:Z.type)==="success"||(Z==null?void 0:Z.type)==="success-and-refreshing"?{...Y,[j]:{type:"success-and-refreshing",result:Z.result}}:{...Y,[j]:{type:"loading"}}}),H.then(Y=>{A.signal.aborted||s(Z=>({...Z,[j]:{type:"success",result:Y}}))}).catch(Y=>{A.signal.aborted||s(Z=>({...Z,[j]:{type:"error",error:Y}}))})):s(Y=>({...Y,[j]:{type:"success",result:H}})),A},[P]),v=(i==null?void 0:i.type)==="composition"?i.compositionId:null;f.useImperativeHandle(Cn,()=>({setCurrentRenderModalComposition:T=>{r(T)},reloadCurrentlySelectedComposition:()=>{if(!v)return;const T=n.find(V=>V.id===v);if(!T)throw new Error(`Could not find composition with id ${v}`);const k=d[v]??{},C={...T.defaultProps??{},...k??{}},F={...C,...p??{}};x({defaultProps:C,calculateMetadata:T.calculateMetadata,combinedProps:F,compositionDurationInFrames:T.durationInFrames??null,compositionFps:T.fps??null,compositionHeight:T.height??null,compositionWidth:T.width??null,compositionId:T.id})}}),[d,n,v,x,p]);const l=(a==null?void 0:a.id)===(u==null?void 0:u.id),w=f.useMemo(()=>({...(a==null?void 0:a.defaultProps)??{},...h??{}}),[a==null?void 0:a.defaultProps,h]),E=f.useMemo(()=>({...w,...p??{}}),[w,p]),_=a&&Mn(a),$=typeof window<"u"&&window.remotion_ignoreFastRefreshUpdate&&c<=window.remotion_ignoreFastRefreshUpdate;f.useEffect(()=>{if(!$&&_){const T=x({calculateMetadata:a.calculateMetadata,combinedProps:E,compositionDurationInFrames:a.durationInFrames??null,compositionFps:a.fps??null,compositionHeight:a.height??null,compositionWidth:a.width??null,defaultProps:w,compositionId:a.id});return()=>{T.abort()}}},[_,w,x,E,a==null?void 0:a.calculateMetadata,a==null?void 0:a.durationInFrames,a==null?void 0:a.fps,a==null?void 0:a.height,a==null?void 0:a.id,a==null?void 0:a.width,$]),f.useEffect(()=>{$||window.dispatchEvent(new CustomEvent("remotion.propsUpdatedExternally"))},[c]),f.useEffect(()=>{if(u&&!l){const T={...u.defaultProps??{},...g??{},...p??{}},k=x({calculateMetadata:u.calculateMetadata,compositionDurationInFrames:u.durationInFrames??null,compositionFps:u.fps??null,compositionHeight:u.height??null,compositionId:u.id,compositionWidth:u.width??null,defaultProps:w,combinedProps:T});return()=>{k.abort()}}},[w,x,p,l,u,g]);const S=f.useMemo(()=>{const T=n.filter(k=>k.calculateMetadata===null);return{...y,...T.reduce((k,C)=>({...k,[C.id]:{type:"success",result:{...C,defaultProps:C.defaultProps??{}}}}),{})}},[n,y]);return b.jsx(bt.Provider,{value:S,children:e})},Tn=e=>{const t=f.useContext(bt),{props:r}=f.useContext(xt),{compositions:n,canvasContent:i,currentCompositionMetadata:o}=f.useContext(Pe),c=(i==null?void 0:i.type)==="composition"?i.compositionId:null,a=e??c,u=n.find(p=>p.id===a),d=f.useMemo(()=>u?r[u.id]??{}:{},[r,u]);return f.useMemo(()=>u?o?{type:"success",result:{...o,id:u.id,props:o.props,defaultProps:u.defaultProps??{},defaultCodec:o.defaultCodec}}:Mn(u)?t[u.id]?t[u.id]:null:(hr(u.durationInFrames,{allowFloats:!1,component:`in <Composition id="${u.id}">`}),_n(u.fps,`in <Composition id="${u.id}">`),wt(u.width,"width",`in <Composition id="${u.id}">`),wt(u.height,"height",`in <Composition id="${u.id}">`),{type:"success",result:{width:u.width,height:u.height,fps:u.fps,id:u.id,durationInFrames:u.durationInFrames,defaultProps:u.defaultProps??{},props:{...u.defaultProps??{},...d??{},...typeof window>"u"||K().isPlayer?{}:wn()??{}},defaultCodec:null}}):null,[u,t,o,d])},mr=()=>{const{canvasContent:e,compositions:t,currentCompositionMetadata:r}=f.useContext(Pe),n=t.find(o=>(e==null?void 0:e.type)==="composition"&&o.id===e.compositionId),i=Tn((n==null?void 0:n.id)??null);return f.useMemo(()=>!i||i.type==="error"||i.type==="loading"||!n?null:{...i.result,defaultProps:n.defaultProps??{},id:n.id,...r??{},component:n.component},[r,i,n])},de=f.createContext({frame:{},playing:!1,playbackRate:1,rootId:"",imperativePlaying:{current:!1},setPlaybackRate:()=>{throw new Error("default")},audioAndVideoTags:{current:[]}}),Ae=f.createContext({setFrame:()=>{throw new Error("default")},setPlaying:()=>{throw new Error("default")}}),gr=()=>"remotion.time-all",Sn=e=>{localStorage.setItem(gr(),JSON.stringify(e))},In=()=>{const e=localStorage.getItem(gr())??"{}";return JSON.parse(e)},Fn=e=>{const t=localStorage.getItem(gr())??"{}",r=JSON.parse(t);return r[e]!==void 0?Number(r[e]):typeof window>"u"?0:window.remotion_initialFrame??0},Ve=()=>{const e=mr(),t=f.useContext(de);if(!e)return typeof window>"u"?0:window.remotion_initialFrame??0;const r=t.frame[e.id]??(K().isPlayer?0:Fn(e.id));return Math.min(e.durationInFrames-1,r)},kn=()=>{const{setFrame:e}=f.useContext(Ae);return e},vr=()=>{const{playing:e,imperativePlaying:t}=f.useContext(de),{setPlaying:r}=f.useContext(Ae);return f.useMemo(()=>[e,r,t],[t,e,r])},Oe=f.createContext(!1),di=({children:e})=>b.jsx(Oe.Provider,{value:!0,children:e}),xr=()=>{const e=f.useContext(ne),t=(e==null?void 0:e.width)??null,r=(e==null?void 0:e.height)??null,n=(e==null?void 0:e.durationInFrames)??null,i=mr();return f.useMemo(()=>{if(!i)return null;const{id:o,durationInFrames:c,fps:a,height:u,width:d,defaultProps:p,props:y,defaultCodec:s}=i;return{id:o,width:t??d,height:r??u,fps:a,durationInFrames:n??c,defaultProps:p,props:y,defaultCodec:s}},[n,r,t,i])},ve=()=>{const e=xr(),t=f.useContext(Oe),r=fn();if(!e)throw typeof window<"u"&&window.remotion_isPlayer||r?new Error(["No video config found. Likely reasons:","- You are probably calling useVideoConfig() from outside the component passed to <Player />. See https://www.remotion.dev/docs/player/examples for how to set up the Player correctly.","- You have multiple versions of Remotion installed which causes the React context to get lost."].join("-")):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.");if(!t)throw new Error("Called useVideoConfig() outside a Remotion composition.");return e},be=()=>{if(!f.useContext(Oe))throw K().isPlayer?new Error("useCurrentFrame can only be called inside a component that was passed to <Player>. See: https://www.remotion.dev/docs/player/examples"):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");const t=Ve(),r=f.useContext(ne),n=r?r.cumulatedFrom+r.relativeFrom:0;return t-n},fi=({frame:e,children:t,active:r=!0})=>{const n=be(),i=ve();if(typeof e>"u")throw new Error("The <Freeze /> component requires a 'frame' prop, but none was passed.");if(typeof e!="number")throw new Error(`The 'frame' prop of <Freeze /> must be a number, but is of type ${typeof e}`);if(Number.isNaN(e))throw new Error("The 'frame' prop of <Freeze /> must be a real number, but it is NaN.");if(!Number.isFinite(e))throw new Error(`The 'frame' prop of <Freeze /> must be a finite number, but it is ${e}.`);const o=f.useMemo(()=>{if(typeof r=="boolean")return r;if(typeof r=="function")return r(n)},[r,n]),c=f.useContext(de),a=f.useContext(ne),u=(a==null?void 0:a.relativeFrom)??0,d=f.useMemo(()=>o?{...c,playing:!1,imperativePlaying:{current:!1},frame:{[i.id]:e+u}}:c,[o,c,i.id,e,u]);return b.jsx(de.Provider,{value:d,children:t})},pi=({from:e=0,durationInFrames:t=1/0,children:r,name:n,height:i,width:o,showInTimeline:c=!0,_remotionInternalLoopDisplay:a,_remotionInternalStack:u,_remotionInternalPremountDisplay:d,...p},y)=>{const{layout:s="absolute-fill"}=p,[h]=f.useState(()=>String(Math.random())),g=f.useContext(ne),{rootId:P}=f.useContext(de),x=g?g.cumulatedFrom+g.relativeFrom:0,v=pn();if(s!=="absolute-fill"&&s!=="none")throw new TypeError(`The layout prop of <Sequence /> expects either "absolute-fill" or "none", but you passed: ${s}`);if(s==="none"&&typeof p.style<"u")throw new TypeError('If layout="none", you may not pass a style.');if(typeof t!="number")throw new TypeError(`You passed to durationInFrames an argument of type ${typeof t}, but it must be a number.`);if(t<=0)throw new TypeError(`durationInFrames must be positive, but got ${t}`);if(typeof e!="number")throw new TypeError(`You passed to the "from" props of your <Sequence> an argument of type ${typeof e}, but it must be a number.`);if(!Number.isFinite(e))throw new TypeError(`The "from" prop of a sequence must be finite, but got ${e}.`);const l=Ve(),w=ve(),E=g?Math.min(g.durationInFrames-e,t):t,_=Math.max(0,Math.min(w.durationInFrames-e,E)),{registerSequence:$,unregisterSequence:S}=f.useContext(ke),{hidden:T}=f.useContext(et),k=f.useMemo(()=>(g==null?void 0:g.premounting)??!!p._remotionInternalIsPremounting,[p._remotionInternalIsPremounting,g==null?void 0:g.premounting]),C=f.useMemo(()=>({cumulatedFrom:x,relativeFrom:e,durationInFrames:_,parentFrom:(g==null?void 0:g.relativeFrom)??0,id:h,height:i??(g==null?void 0:g.height)??null,width:o??(g==null?void 0:g.width)??null,premounting:k}),[x,e,_,g,h,i,o,k]),F=f.useMemo(()=>n??"",[n]);f.useEffect(()=>{if(K().isStudio)return $({from:e,duration:_,id:h,displayName:F,parent:(g==null?void 0:g.id)??null,type:"sequence",rootId:P,showInTimeline:c,nonce:v,loopDisplay:a,stack:u??null,premountDisplay:d??null}),()=>{S(h)}},[t,h,n,$,F,S,g==null?void 0:g.id,_,P,e,c,v,a,u,d]);const V=Math.ceil(x+e+t-1),j=l<x+e||l>V?null:r,N=p.layout==="none"?void 0:p.style,q=f.useMemo(()=>({flexDirection:void 0,...o?{width:o}:{},...i?{height:i}:{},...N??{}}),[i,N,o]);if(y!==null&&s==="none")throw new TypeError('It is not supported to pass both a `ref` and `layout="none"` to <Sequence />.');return T[h]??!1?null:b.jsx(ne.Provider,{value:C,children:j===null?null:p.layout==="none"?j:b.jsx(R,{ref:y,style:q,className:p.className,children:j})})},yi=f.forwardRef(pi),hi=(e,t)=>{const r=be();if(e.layout==="none")throw new Error('`<Sequence>` with `premountFor` prop does not support layout="none"');const{style:n,from:i=0,premountFor:o=0,...c}=e,a=r<i&&r>=i-o,u=f.useMemo(()=>({...n,opacity:a?0:1,pointerEvents:a?"none":(n==null?void 0:n.pointerEvents)??void 0}),[a,n]);return b.jsx(fi,{frame:i,active:a,children:b.jsx(he,{ref:t,from:i,style:u,_remotionInternalPremountDisplay:o,_remotionInternalIsPremounting:a,...c})})},mi=f.forwardRef(hi),gi=(e,t)=>e.layout!=="none"&&e.premountFor&&!K().isRendering?b.jsx(mi,{...e,ref:t}):b.jsx(yi,{...e,ref:t}),he=f.forwardRef(gi),vi=e=>{if(typeof e!="string")throw new TypeError(`The "filename" must be a string, but you passed a value of type ${typeof e}`);if(e.trim()==="")throw new Error("The `filename` must not be empty");if(!e.match(/^([0-9a-zA-Z-!_.*'()/:&$@=;+,?]+)/g))throw new Error('The `filename` must match "/^([0-9a-zA-Z-!_.*\'()/:&$@=;+,?]+)/g". Use forward slashes only, even on Windows.')},xi=e=>{if(typeof e!="string"&&!(e instanceof Uint8Array))throw new TypeError(`The "content" must be a string or Uint8Array, but you passed a value of type ${typeof e}`);if(typeof e=="string"&&e.trim()==="")throw new Error("The `content` must not be empty")},jn=e=>{e.type==="artifact"&&(vi(e.filename),xi(e.content))},Ne=f.createContext({registerRenderAsset:()=>{},unregisterRenderAsset:()=>{},renderAssets:[]}),wi=({children:e})=>{const[t,r]=f.useState([]),n=f.useCallback(c=>{jn(c),r(a=>[...a,c])},[]),i=f.useCallback(c=>{r(a=>a.filter(u=>u.id!==c))},[]);f.useLayoutEffect(()=>{typeof window<"u"&&(window.remotion_collectAssets=()=>(r([]),t))},[t]);const o=f.useMemo(()=>({registerRenderAsset:n,unregisterRenderAsset:i,renderAssets:t}),[t,n,i]);return b.jsx(Ne.Provider,{value:o,children:e})},Ee=e=>typeof window>"u"?e:new URL(e,window.origin).href,Ln=({endAt:e,mediaDuration:t,playbackRate:r,startFrom:n})=>{let i=t;typeof e<"u"&&(i=e),typeof n<"u"&&(i-=n);const o=i/r;return Math.floor(o)};function wr(e){let t;throw bi(e)?(t=e,t.stack||(t.stack=new Error(t.message).stack)):typeof e=="string"?t=Error(e):t=Error("Rendering was cancelled"),window.remotion_cancelledError=t.stack,t}var bi=e=>e instanceof Error?!0:!(e===null||typeof e!="object"||!("stack"in e)||typeof e.stack!="string"||!("message"in e)||typeof e.message!="string"),An=f.createContext(null),_i=()=>f.useContext(An),_t=({durationInFrames:e,times:t=1/0,children:r,name:n,...i})=>{const o=be(),{durationInFrames:c}=ve();if(hr(e,{component:"of the <Loop /> component",allowFloats:!0}),typeof t!="number")throw new TypeError(`You passed to "times" an argument of type ${typeof t}, but it must be a number.`);if(t!==1/0&&t%1!==0)throw new TypeError(`The "times" prop of a loop must be an integer, but got ${t}.`);if(t<0)throw new TypeError(`The "times" prop of a loop must be at least 0, but got ${t}`);const a=Math.ceil(c/e),u=Math.min(a,t),d=i.layout==="none"?void 0:i.style,p=e*(u-1),s=Math.floor(o/e)*e,h=Math.min(s,p),g=f.useMemo(()=>({numberOfTimes:u,startOffset:-h,durationInFrames:e}),[u,e,h]),P=f.useMemo(()=>({iteration:Math.floor(o/e),durationInFrames:e}),[o,e]);return b.jsx(An.Provider,{value:P,children:b.jsx(he,{durationInFrames:e,from:h,name:n??"<Loop>",_remotionInternalLoopDisplay:g,layout:i.layout,style:d,children:r})})};_t.useLoop=_i;var Pt=f.createContext({}),Vn={},br=[],On=({children:e})=>{const[t,r]=f.useState(()=>Vn);return f.useEffect(()=>{const n=()=>{r(Vn)};return br.push(n),()=>{br=br.filter(i=>i!==n)}},[]),b.jsx(Pt.Provider,{value:t,children:e})},De=e=>f.useContext(Pt)[e]??e,Nn=(e,t)=>{if(typeof e.volume!="number"&&typeof e.volume!="function"&&typeof e.volume<"u")throw new TypeError(`You have passed a volume of type ${typeof e.volume} to your <${t} /> component. Volume must be a number or a function with the signature '(frame: number) => number' undefined.`);if(typeof e.volume=="number"&&e.volume<0)throw new TypeError(`You have passed a volume below 0 to your <${t} /> component. Volume must be between 0 and 1`);if(typeof e.playbackRate!="number"&&typeof e.playbackRate<"u")throw new TypeError(`You have passed a playbackRate of type ${typeof e.playbackRate} to your <${t} /> component. Playback rate must a real number or undefined.`);if(typeof e.playbackRate=="number"&&(isNaN(e.playbackRate)||!Number.isFinite(e.playbackRate)||e.playbackRate<=0))throw new TypeError(`You have passed a playbackRate of ${e.playbackRate} to your <${t} /> component. Playback rate must be a real number above 0.`)},Dn=(e,t)=>{if(typeof e<"u"){if(typeof e!="number")throw new TypeError(`type of startFrom prop must be a number, instead got type ${typeof e}.`);if(isNaN(e)||e===1/0)throw new TypeError("startFrom prop can not be NaN or Infinity.");if(e<0)throw new TypeError(`startFrom must be greater than equal to 0 instead got ${e}.`)}if(typeof t<"u"){if(typeof t!="number")throw new TypeError(`type of endAt prop must be a number, instead got type ${typeof t}.`);if(isNaN(t))throw new TypeError("endAt prop can not be NaN.");if(t<=0)throw new TypeError(`endAt must be a positive number, instead got ${t}.`)}if(t<e)throw new TypeError("endAt prop must be greater than startFrom prop.")},Pi=(e,t)=>{switch(t.type){case"got-duration":{const r=Ee(t.src);return e[r]===t.durationInSeconds?e:{...e,[r]:t.durationInSeconds}}default:return e}},_r=f.createContext({durations:{},setDurations:()=>{throw new Error("context missing")}}),Bn=({children:e})=>{const[t,r]=f.useReducer(Pi,{}),n=f.useMemo(()=>({durations:t,setDurations:r}),[t]);return b.jsx(_r.Provider,{value:n,children:e})};function zn(e){let t=e+1831565813;return t=Math.imul(t^t>>>15,t|1),t^=t+Math.imul(t^t>>>7,t|61),((t^t>>>14)>>>0)/4294967296}function Ei(e){let t=0,r=0,n=0;for(t=0;t<e.length;t++)r=e.charCodeAt(t),n=(n<<5)-n+r,n|=0;return n}var me=(e,t)=>{if(e===null)return Math.random();if(typeof e=="string")return zn(Ei(e));if(typeof e=="number")return zn(e*1e10);throw new Error("random() argument must be a number or a string")},tt=()=>{const e=f.useContext(ne);return Math.min(0,(e==null?void 0:e.relativeFrom)??0)},Et=e=>{const t=_t.useLoop(),r=be(),n=tt();return e==="repeat"||t===null?r+n:r+n+t.durationInFrames*t.iteration},Ci=e=>{if(/data:|blob:/.test(e.substring(0,5)))return"Data URL";const t=e.split("/").map(r=>r.split("\\")).flat(1);return t[t.length-1]},Ct=(e,t,r)=>{const{current:n}=e;if(!n)return;const i=n.play();i.catch&&i.catch(o=>{if(n&&!o.message.includes("request was interrupted by a call to pause")&&!o.message.includes("The operation was aborted.")&&!o.message.includes("The fetching process for the media resource was aborted by the user agent")&&!o.message.includes("request was interrupted by a new load request")&&!o.message.includes("because the media was removed from the document")&&(console.log(`Could not play ${t} due to following error: `,o),!n.muted)){if(r){r();return}console.log("The video will be muted and we'll retry playing it."),t==="video"&&K().isPlayer&&console.log("Use onAutoPlayError() to handle this error yourself."),n.muted=!0,n.play()}})},rt=({frame:e,volume:t,mediaVolume:r=1,allowAmplificationDuringRender:n})=>{const i=n?1/0:1;if(typeof t=="number")return Math.min(i,t*r);if(typeof t>"u")return Number(r);const o=t(e)*r;if(typeof o!="number")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 o} for frame ${e}`);if(Number.isNaN(o))throw new TypeError(`You passed in a function to the volume prop but it returned NaN for frame ${e}.`);if(!Number.isFinite(o))throw new TypeError(`You passed in a function to the volume prop but it returned a non-finite number for frame ${e}.`);return Math.max(0,Math.min(i,o))},qn={},Mi=e=>{qn[e]||(console.warn(e),qn[e]=!0)},Wn=({volume:e,mediaVolume:t,mediaRef:r,src:n,mediaType:i,playbackRate:o,displayName:c,id:a,stack:u,showInTimeline:d,premountDisplay:p,onAutoPlayError:y})=>{const s=ve(),{rootId:h,audioAndVideoTags:g}=f.useContext(de),P=f.useContext(ne),x=P?P.relativeFrom+P.cumulatedFrom:0,[v]=vr(),l=tt(),{registerSequence:w,unregisterSequence:E}=f.useContext(ke),[_]=f.useState(()=>e),$=pn(),S=P?Math.min(P.durationInFrames,s.durationInFrames):s.durationInFrames,T=typeof e=="function",k=f.useMemo(()=>typeof e=="number"?e:new Array(Math.floor(Math.max(0,S+l))).fill(!0).map((C,F)=>rt({frame:F+l,volume:e,mediaVolume:t,allowAmplificationDuringRender:!1})).join(","),[S,l,e,t]);f.useEffect(()=>{typeof e=="number"&&e!==_&&Mi(`Remotion: The ${i} with src ${n} 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`)},[_,i,n,e]),f.useEffect(()=>{var C,F;if(r.current){if(!n)throw new Error("No src passed");if(!(!K().isStudio&&((F=(C=window.process)==null?void 0:C.env)==null?void 0:F.NODE_ENV)!=="test")&&d)return w({type:i,src:n,id:a,duration:S,from:0,parent:(P==null?void 0:P.id)??null,displayName:c??Ci(n),rootId:h,volume:k,showInTimeline:!0,nonce:$,startMediaFrom:0-l,doesVolumeChange:T,loopDisplay:void 0,playbackRate:o,stack:u,premountDisplay:p}),()=>{E(a)}}},[x,S,a,P,n,w,h,E,s,k,T,$,r,i,l,o,c,u,d,p]),f.useEffect(()=>{const C={id:a,play:()=>{if(v)return Ct(r,i,y)}};return g.current.push(C),()=>{g.current=g.current.filter(F=>F.id!==a)}},[g,a,r,i,y,v])},$i=()=>{const[e,t]=f.useState([]),[r,n]=f.useState([]),[i,o]=f.useState([]),c=f.useRef(!1),a=f.useCallback(p=>(t(y=>[...y,p]),{unblock:()=>{t(y=>{const s=y.filter(h=>h!==p);return s.length===y.length?y:s})}}),[]),u=f.useCallback(p=>(n(y=>[...y,p]),{remove:()=>{n(y=>y.filter(s=>s!==p))}}),[]),d=f.useCallback(p=>(o(y=>[...y,p]),{remove:()=>{o(y=>y.filter(s=>s!==p))}}),[]);return f.useEffect(()=>{e.length>0&&r.forEach(p=>p())},[e]),f.useEffect(()=>{e.length===0&&i.forEach(p=>p())},[e]),f.useMemo(()=>({addBlock:a,listenForBuffering:u,listenForResume:d,buffering:c}),[a,c,u,d])},Be=f.createContext(null),Un=({children:e})=>{const t=$i();return b.jsx(Be.Provider,{value:t,children:e})},Ti=e=>{const[t,r]=f.useState(e.buffering.current);return f.useEffect(()=>{const n=()=>{r(!0)},i=()=>{r(!1)};return e.listenForBuffering(n),e.listenForResume(i),()=>{e.listenForBuffering(()=>{}),e.listenForResume(()=>{})}},[e]),t},Pr=()=>{const e=f.useContext(Be),t=e?e.addBlock:null;return f.useMemo(()=>({delayPlayback:()=>{if(!t)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");const{unblock:r}=t({id:String(Math.random())});return{unblock:r}}}),[t])},Si=({mediaRef:e,mediaType:t,onVariableFpsVideoDetected:r,pauseWhenBuffering:n})=>{const i=f.useRef(!1),{delayPlayback:o}=Pr(),c=f.useCallback(a=>{if(t!=="video"||!n)return;const u=e.current;if(!u||!u.requestVideoFrameCallback)return;i.current=!0;const d=o(),p=()=>{d.unblock(),u.removeEventListener("ended",p,{once:!0}),u.removeEventListener("pause",p,{once:!0}),i.current=!1},y=()=>{p()};u.requestVideoFrameCallback((s,h)=>{Math.abs(h.mediaTime-a)>.5&&r(),p()}),u.addEventListener("ended",y,{once:!0}),u.addEventListener("pause",y,{once:!0}),u.addEventListener("canplay",y,{once:!0})},[o,e,t,r,n]);return f.useMemo(()=>({isBuffering:()=>i.current,bufferUntilFirstFrame:c}),[c])},Ii=({element:e,shouldBuffer:t,isPremounting:r})=>{const n=Pr(),[i,o]=f.useState(!1);return f.useEffect(()=>{let c=[];const{current:a}=e;if(!a||!t||r)return;const u=()=>{c.forEach(y=>y()),c=[],o(!1)},d=()=>{o(!0);const{unblock:y}=n.delayPlayback(),s=()=>{u(),p()},h=()=>{u(),p()};a.addEventListener("canplay",s,{once:!0}),c.push(()=>{a.removeEventListener("canplay",s)}),a.addEventListener("error",h,{once:!0}),c.push(()=>{a.removeEventListener("error",h)}),c.push(()=>{y()})},p=()=>{a.readyState<a.HAVE_FUTURE_DATA?(d(),navigator.userAgent.includes("Firefox/")||a.load()):(a.addEventListener("waiting",d),c.push(()=>{a.removeEventListener("waiting",d)}))};return p(),()=>{u()}},[n,e,r,t]),i},Fi=({mediaRef:e,mediaType:t,lastSeek:r,onVariableFpsVideoDetected:n})=>{const i=f.useRef(null);return f.useEffect(()=>{const{current:o}=e;if(o)i.current=o.currentTime;else{i.current=null;return}if(t!=="video"){i.current=null;return}const c=o;if(!c.requestVideoFrameCallback)return;let a=()=>{};const u=()=>{if(!c)return;const d=c.requestVideoFrameCallback((p,y)=>{if(i.current!==null){const s=Math.abs(i.current-y.mediaTime),h=Math.abs(r.current===null?1/0:y.mediaTime-r.current);s>.5&&h>.5&&y.mediaTime>i.current&&n()}i.current=y.mediaTime,u()});a=()=>{c.cancelVideoFrameCallback(d),a=()=>{}}};return u(),()=>{a()}},[r,e,t,n]),i};function ki(e,t,r,n){const{extrapolateLeft:i,extrapolateRight:o,easing:c}=n;let a=e;const[u,d]=t,[p,y]=r;if(a<u){if(i==="identity")return a;if(i==="clamp")a=u;else if(i==="wrap"){const s=d-u;a=((a-u)%s+s)%s+u}}if(a>d){if(o==="identity")return a;if(o==="clamp")a=d;else if(o==="wrap"){const s=d-u;a=((a-u)%s+s)%s+u}}return p===y?p:(a=(a-u)/(d-u),a=c(a),a=a*(y-p)+p,a)}function ji(e,t){let r;for(r=1;r<t.length-1&&!(t[r]>=e);++r);return r-1}function Li(e){for(let t=1;t<e.length;++t)if(!(e[t]>e[t-1]))throw new Error(`inputRange must be strictly monotonically increasing but got [${e.join(",")}]`)}function Rn(e,t){if(t.length<2)throw new Error(e+" must have at least 2 elements");for(const r of t){if(typeof r!="number")throw new Error(`${e} must contain only numbers`);if(!Number.isFinite(r))throw new Error(`${e} must contain only finite numbers, but got [${t.join(",")}]`)}}function Mt(e,t,r,n){if(typeof e>"u")throw new Error("input can not be undefined");if(typeof t>"u")throw new Error("inputRange can not be undefined");if(typeof r>"u")throw new Error("outputRange can not be undefined");if(t.length!==r.length)throw new Error("inputRange ("+t.length+") and outputRange ("+r.length+") must have the same length");Rn("inputRange",t),Rn("outputRange",r),Li(t);const i=(n==null?void 0:n.easing)??(u=>u);let o="extend";(n==null?void 0:n.extrapolateLeft)!==void 0&&(o=n.extrapolateLeft);let c="extend";if((n==null?void 0:n.extrapolateRight)!==void 0&&(c=n.extrapolateRight),typeof e!="number")throw new TypeError("Cannot interpolate an input which is not a number");const a=ji(e,t);return ki(e,[t[a],t[a+1]],[r[a],r[a+1]],{easing:i,extrapolateLeft:o,extrapolateRight:c})}var Ai=({frame:e,playbackRate:t,startFrom:r})=>Mt(e,[-1,r,r+1],[-1,r,r+t]),Hn=({fps:e,frame:t,playbackRate:r,startFrom:n})=>{const i=Ai({frame:t,playbackRate:r,startFrom:n}),o=1e3/e;return i*o/1e3},Zn=(e,t)=>Math.round(e/t*100)/100,$t=()=>{if(typeof window>"u")return!1;const e=/iP(ad|od|hone)/i.test(window.navigator.userAgent),t=/AppleWebKit/.test(window.navigator.userAgent);return e&&t},Vi=e=>$t()&&e.startsWith("blob:"),Er=({actualFrom:e,fps:t})=>Zn(Math.max(0,-e),t),Cr=({duration:e,fps:t})=>Zn(e,t),Oi=({actualSrc:e,actualFrom:t,duration:r,fps:n})=>{if(Vi(e)||e.startsWith("data:")||!!new URL(e,(typeof window>"u"?null:window.location.href)??"http://localhost:3000").hash||!Number.isFinite(t))return e;const o=`${e}#t=${Er({actualFrom:t,fps:n})}`;return Number.isFinite(r)?`${o},${Cr({duration:r,fps:n})}`:o},Ni=({prevStartFrom:e,newStartFrom:t,prevDuration:r,newDuration:n,fps:i})=>{const o=Er({actualFrom:e,fps:i}),c=Er({actualFrom:t,fps:i}),a=Cr({duration:r,fps:i}),u=Cr({duration:n,fps:i});return!(c<o||u>a)},Di=({actualSrc:e,actualFrom:t,duration:r,fps:n})=>{const i=f.useRef(t),o=f.useRef(r),c=f.useRef(e);return(!Ni({prevStartFrom:i.current,newStartFrom:t,prevDuration:o.current,newDuration:r,fps:n})||e!==c.current)&&(i.current=t,o.current=r,c.current=e),Oi({actualSrc:c.current,actualFrom:i.current,duration:o.current,fps:n})},Yn={},Bi=(e,t)=>{if(e===null||e.seekable.length===0||e.seekable.length>1||Yn[e.src])return;const r={start:e.seekable.start(0),end:e.seekable.end(0)};if(r.start===0&&r.end===0){const n=[`The media ${e.src} cannot be seeked. This could be one of few reasons:`,"1) The media resource was replaced while the video is playing but it was not loaded yet.","2) The media does not support seeking.","3) The media was loaded with security headers prventing it from being included.","Please see https://remotion.dev/docs/non-seekable-media for assistance."].join(`
33
- `);if(t==="console-error")console.error(n);else if(t==="console-warning")console.warn(`The media ${e.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.`);else throw new Error(n);Yn[e.src]=!0}},Mr=.45,$r=(e,t)=>{if(!e.current)return;const r=$t()?Number(t.toFixed(1)):t;e.current.currentTime=r},Qn=({mediaRef:e,src:t,mediaType:r,playbackRate:n,onlyWarnForMediaSeekingError:i,acceptableTimeshift:o,pauseWhenBuffering:c,isPremounting:a,debugSeeking:u,onAutoPlayError:d})=>{const{playbackRate:p}=f.useContext(de),y=be(),s=Ve(),[h]=vr(),g=f.useContext(Be),{fps:P}=ve(),x=tt(),v=f.useRef(null),l=f.useRef(null);if(!g)throw new Error("useMediaPlayback must be used inside a <BufferingContext>");const w=f.useRef({}),E=f.useCallback(()=>{t&&(u&&console.log(`Detected ${t} as a variable FPS video. Disabling buffering while seeking.`),w.current[t]=!0)},[u,t]),_=Fi({mediaRef:e,mediaType:r,lastSeek:l,onVariableFpsVideoDetected:E}),$=Hn({frame:y,playbackRate:n,startFrom:-x,fps:P}),S=Ii({element:e,shouldBuffer:c,isPremounting:a}),{bufferUntilFirstFrame:T,isBuffering:k}=Si({mediaRef:e,mediaType:r,onVariableFpsVideoDetected:E,pauseWhenBuffering:c}),C=n*p,F=(()=>{var j;return(j=e.current)!=null&&j.duration?Math.min(e.current.duration,o??Mr):o})(),V=Ti(g);f.useEffect(()=>{var N,q;if(!h){(N=e.current)==null||N.pause();return}const j=S||k();V&&!j&&((q=e.current)==null||q.pause())},[k,S,V,e,h]),f.useEffect(()=>{const j=r==="audio"?"<Audio>":"<Video>";if(!e.current)throw new Error(`No ${r} ref found`);if(!t)throw new Error(`No 'src' attribute was passed to the ${j} element.`);const N=Math.max(0,C);e.current.playbackRate!==N&&(e.current.playbackRate=N);const{duration:q}=e.current,A=!Number.isNaN(q)&&Number.isFinite(q)?Math.min(q,$):$,te=e.current.currentTime,W=_.current??null,H=w.current[t],Y=Math.abs(A-te),Z=W?Math.abs(A-W):null,re=Z&&!H?Z:Y;if(u&&console.log({mediaTagTime:te,rvcTime:W,shouldBeTime:A,state:e.current.readyState,playing:!e.current.paused,isVariableFpsVideo:H}),re>F&&v.current!==A){u&&console.log("Seeking",{shouldBeTime:A,isTime:te,rvcTime:W,timeShift:re,isVariableFpsVideo:H}),$r(e,A),l.current=A,v.current=A,h&&!H&&(C>0&&T(A),e.current.paused&&Ct(e,r,d)),i||Bi(e.current,i?"console-warning":"console-error");return}const Ze=h?.15:1e-5,Ye=Math.abs(e.current.currentTime-A)>Ze,z=S||k(),pe=g.buffering.current&&!z;if(!h||pe){Ye&&($r(e,A),l.current=A);return}(e.current.paused&&!e.current.ended||s===0)&&(Ye&&($r(e,A),l.current=A),Ct(e,r,d),H||C>0&&T(A))},[s,F,T,g.buffering,_,u,$,k,S,e,r,i,C,h,t,d])},Xn=e=>{const[t,r]=f.useState(1);return f.useEffect(()=>{const n=e.current;if(!n)return;const i=()=>{r(n.volume)};return n.addEventListener("volumechange",i),()=>n.removeEventListener("volumechange",i)},[e]),f.useEffect(()=>{const n=e.current;n&&n.volume!==t&&r(n.volume)},[t,e]),t},zi=1e-5,Jn=(e,t)=>Math.abs(e-t)<zi,Kn=({volumePropFrame:e,actualVolume:t,volume:r,mediaVolume:n,mediaRef:i})=>{f.useEffect(()=>{const o=rt({frame:e,volume:r,mediaVolume:n,allowAmplificationDuringRender:!1});!Jn(o,t)&&i.current&&(i.current.volume=o)},[t,e,i,r,n])},Tr=f.createContext({mediaMuted:!1,mediaVolume:1}),Sr=f.createContext({setMediaMuted:()=>{throw new Error("default")},setMediaVolume:()=>{throw new Error("default")}}),Ir=()=>{const{mediaVolume:e}=f.useContext(Tr),{setMediaVolume:t}=f.useContext(Sr);return f.useMemo(()=>[e,t],[e,t])},Fr=()=>{const{mediaMuted:e}=f.useContext(Tr),{setMediaMuted:t}=f.useContext(Sr);return f.useMemo(()=>[e,t],[e,t])},Gn="data:audio/mp3;base64,/+MYxAAJcAV8AAgAABn//////+/gQ5BAMA+D4Pg+BAQBAEAwD4Pg+D4EBAEAQDAPg++hYBH///hUFQVBUFREDQNHmf///////+MYxBUGkAGIMAAAAP/29Xt6lUxBTUUzLjEwMFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV/+MYxDUAAANIAAAAAFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV",qi=(e,t)=>{const r=Object.keys(e).sort(),n=Object.keys(t).sort();if(r.length!==n.length)return!1;for(let i=0;i<r.length;i++)if(r[i]!==n[i]||e[r[i]]!==t[n[i]])return!1;return!0},Wi=(e,t,r)=>e==="src"&&!r.startsWith("data:")&&!t.startsWith("data:")?new URL(r,window.origin).toString()!==new URL(t,window.origin).toString():r!==t,Tt=f.createContext(null),eo=({children:e,numberOfAudioTags:t,component:r})=>{const n=f.useRef([]),[i]=f.useState(t);if(t!==i)throw new Error("The number of shared audio tags has changed dynamically. Once you have set this property, you cannot change it afterwards.");const o=f.useMemo(()=>new Array(t).fill(!0).map(()=>({id:Math.random(),ref:f.createRef()})),[t]),c=f.useRef(new Array(t).fill(!1)),a=f.useCallback(()=>{o.forEach(({ref:g,id:P})=>{var l;const x=(l=n.current)==null?void 0:l.find(w=>w.id===P),{current:v}=g;if(v){if(x===void 0){v.src=Gn;return}if(!x)throw new TypeError("Expected audio data to be there");Object.keys(x.props).forEach(w=>{Wi(w,x.props[w],v[w])&&(v[w]=x.props[w])})}})},[o]),u=f.useCallback((g,P)=>{var $,S;const x=($=n.current)==null?void 0:$.find(T=>T.audioId===P);if(x)return x;const v=c.current.findIndex(T=>T===!1);if(v===-1)throw new Error(`Tried to simultaneously mount ${t+1} <Audio /> tags at the same time. With the current settings, the maximum amount of <Audio /> tags is limited to ${t} 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.`);const{id:l,ref:w}=o[v],E=[...c.current];E[v]=l,c.current=E;const _={props:g,id:l,el:w,audioId:P};return(S=n.current)==null||S.push(_),a(),_},[t,o,a]),d=f.useCallback(g=>{var v;const P=[...c.current],x=o.findIndex(l=>l.id===g);if(x===-1)throw new TypeError("Error occured in ");P[x]=!1,c.current=P,n.current=(v=n.current)==null?void 0:v.filter(l=>l.id!==g),a()},[o,a]),p=f.useCallback(({aud:g,audioId:P,id:x})=>{var l;let v=!1;n.current=(l=n.current)==null?void 0:l.map(w=>w.id===x?qi(g,w.props)?w:(v=!0,{...w,props:g,audioId:P}):w),v&&a()},[a]),y=f.useCallback(()=>{o.forEach(g=>{Ct(g.ref,"audio",null)})},[o]),s=f.useMemo(()=>({registerAudio:u,unregisterAudio:d,updateAudio:p,playAllAudios:y,numberOfAudioTags:t}),[t,y,u,d,p]),h=f.useCallback(()=>{c.current=new Array(t).fill(!1),n.current=[],a()},[t,a]);return f.useEffect(()=>()=>{h()},[r,h]),b.jsxs(Tt.Provider,{value:s,children:[o.map(({id:g,ref:P})=>b.jsx("audio",{ref:P,preload:"metadata",src:Gn},g)),e]})},Ui=(e,t)=>{const r=f.useContext(Tt),[n]=f.useState(()=>r&&r.numberOfAudioTags>0?r.registerAudio(e,t):{el:f.createRef(),id:Math.random(),props:e,audioId:t}),i=f.useInsertionEffect??f.useLayoutEffect;return typeof document<"u"&&(i(()=>{r&&r.numberOfAudioTags>0&&r.updateAudio({id:n.id,aud:e,audioId:t})},[e,r,n.id,t]),i(()=>()=>{r&&r.numberOfAudioTags>0&&r.unregisterAudio(n.id)},[r,n.id])),n},Ri=(e,t)=>{const[r]=f.useState(e.shouldPreMountAudioTags);if(e.shouldPreMountAudioTags!==r)throw new Error("Cannot change the behavior for pre-mounting audio tags dynamically.");const{volume:n,muted:i,playbackRate:o,shouldPreMountAudioTags:c,src:a,onDuration:u,acceptableTimeShiftInSeconds:d,_remotionInternalNeedsDurationCalculation:p,_remotionInternalNativeLoopPassed:y,_remotionInternalStack:s,_remotionDebugSeeking:h,allowAmplificationDuringRender:g,name:P,pauseWhenBuffering:x,showInTimeline:v,loopVolumeCurveBehavior:l,stack:w,...E}=e,[_]=Ir(),[$]=Fr(),S=Et(l??"repeat"),{hidden:T}=f.useContext(et);if(!a)throw new TypeError("No 'src' was passed to <Audio>.");const k=De(a),C=f.useContext(ne),[F]=f.useState(()=>String(Math.random())),V=T[F]??!1,j=rt({frame:S,volume:n,mediaVolume:_,allowAmplificationDuringRender:!1}),N=f.useMemo(()=>({muted:i||$||V||j<=0,src:k,loop:y,...E}),[y,V,$,i,E,k,j]),q=f.useMemo(()=>`audio-${me(a??"")}-${C==null?void 0:C.relativeFrom}-${C==null?void 0:C.cumulatedFrom}-${C==null?void 0:C.durationInFrames}-muted:${e.muted}-loop:${e.loop}`,[a,C==null?void 0:C.relativeFrom,C==null?void 0:C.cumulatedFrom,C==null?void 0:C.durationInFrames,e.muted,e.loop]),A=Ui(N,q).el,te=Xn(A);Kn({volumePropFrame:S,actualVolume:te,volume:n,mediaVolume:_,mediaRef:A}),Wn({volume:n,mediaVolume:_,mediaRef:A,src:a,mediaType:"audio",playbackRate:o??1,displayName:P??null,id:F,stack:s,showInTimeline:v,premountDisplay:null,onAutoPlayError:null}),Qn({mediaRef:A,src:a,mediaType:"audio",playbackRate:o??1,onlyWarnForMediaSeekingError:!1,acceptableTimeshift:d??Mr,isPremounting:!!(C!=null&&C.premounting),pauseWhenBuffering:x,debugSeeking:h,onAutoPlayError:null}),f.useImperativeHandle(t,()=>A.current,[A]);const W=f.useRef();return W.current=u,f.useEffect(()=>{var Z;const{current:H}=A;if(!H)return;if(H.duration){(Z=W.current)==null||Z.call(W,H.src,H.duration);return}const Y=()=>{var re;(re=W.current)==null||re.call(W,H.src,H.duration)};return H.addEventListener("loadedmetadata",Y),()=>{H.removeEventListener("loadedmetadata",Y)}},[A,a]),r?null:b.jsx("audio",{ref:A,preload:"metadata",...N})},Hi=f.forwardRef(Ri);typeof window<"u"&&(window.remotion_renderReady=!1);var St=[];typeof window<"u"&&(window.remotion_delayRenderTimeouts={});var Zi="The delayRender was called:",Yi="Retries left: ",Qi="- Rendering the frame will be retried.",to=3e4,ze=(e,t)=>{var i;if(typeof e!="string"&&typeof e<"u")throw new Error("The label parameter of delayRender() must be a string or undefined, got: "+JSON.stringify(e));const r=Math.random();St.push(r);const n=((i=Error().stack)==null?void 0:i.replace(/^Error/g,""))??"";if(K().isRendering){const o=((t==null?void 0:t.timeoutInMilliseconds)??(typeof window>"u"?to:window.remotion_puppeteerTimeout??to))-2e3;if(typeof window<"u"){const c=((t==null?void 0:t.retries)??0)-(window.remotion_attempt-1);window.remotion_delayRenderTimeouts[r]={label:e??null,timeout:setTimeout(()=>{const a=["A delayRender()",e?`"${e}"`:null,`was called but not cleared after ${o}ms. See https://remotion.dev/docs/timeout for help.`,c>0?Yi+c:null,c>0?Qi:null,Zi,n].filter(dr).join(" ");wr(Error(a))},o)}}}return typeof window<"u"&&(window.remotion_renderReady=!1),r},G=e=>{if(typeof e>"u")throw new TypeError("The continueRender() method must be called with a parameter that is the return value of delayRender(). No value was passed.");if(typeof e!="number")throw new TypeError("The parameter passed into continueRender() must be the return value of delayRender() which is a number. Got: "+JSON.stringify(e));St=St.filter(t=>t===e?(K().isRendering&&(clearTimeout(window.remotion_delayRenderTimeouts[e].timeout),delete window.remotion_delayRenderTimeouts[e]),!1):!0),St.length===0&&typeof window<"u"&&(window.remotion_renderReady=!0)},Xi=(e,t)=>{const r=f.useRef(null),{volume:n,playbackRate:i,allowAmplificationDuringRender:o,onDuration:c,toneFrequency:a,_remotionInternalNeedsDurationCalculation:u,_remotionInternalNativeLoopPassed:d,acceptableTimeShiftInSeconds:p,name:y,onError:s,delayRenderRetries:h,delayRenderTimeoutInMilliseconds:g,loopVolumeCurveBehavior:P,pauseWhenBuffering:x,...v}=e,l=Ve(),w=Et(P??"repeat"),E=be(),_=f.useContext(ne),{registerRenderAsset:$,unregisterRenderAsset:S}=f.useContext(Ne),T=f.useMemo(()=>`audio-${me(e.src??"")}-${_==null?void 0:_.relativeFrom}-${_==null?void 0:_.cumulatedFrom}-${_==null?void 0:_.durationInFrames}`,[e.src,_==null?void 0:_.relativeFrom,_==null?void 0:_.cumulatedFrom,_==null?void 0:_.durationInFrames]),k=rt({volume:n,frame:w,mediaVolume:1,allowAmplificationDuringRender:o??!1});f.useImperativeHandle(t,()=>r.current,[]),f.useEffect(()=>{if(!e.src)throw new Error("No src passed");if(window.remotion_audioEnabled&&!e.muted&&!(k<=0))return $({type:"audio",src:Ee(e.src),id:T,frame:l,volume:k,mediaFrame:E,playbackRate:e.playbackRate??1,allowAmplificationDuringRender:o??!1,toneFrequency:a??null,audioStartFrame:Math.max(0,-((_==null?void 0:_.relativeFrom)??0))}),()=>S(T)},[e.muted,e.src,$,l,T,S,k,w,E,i,e.playbackRate,o,a,_==null?void 0:_.relativeFrom]);const{src:C}=e,F=t||u;return f.useLayoutEffect(()=>{var q,A;if(((A=(q=window.process)==null?void 0:q.env)==null?void 0:A.NODE_ENV)==="test"||!F)return;const V=ze("Loading <Audio> duration with src="+C,{retries:h??void 0,timeoutInMilliseconds:g??void 0}),{current:j}=r,N=()=>{j!=null&&j.duration&&c(j.src,j.duration),G(V)};return j!=null&&j.duration?(c(j.src,j.duration),G(V)):j==null||j.addEventListener("loadedmetadata",N,{once:!0}),()=>{j==null||j.removeEventListener("loadedmetadata",N),G(V)}},[C,c,F,h,g]),F?b.jsx("audio",{ref:r,...v}):null},Ji=f.forwardRef(Xi),Ki=(e,t)=>{const r=f.useContext(Tt),{startFrom:n,endAt:i,name:o,stack:c,pauseWhenBuffering:a,showInTimeline:u,_remotionDebugSeeking:d,...p}=e,{loop:y,...s}=e,{fps:h}=ve(),g=K(),{durations:P,setDurations:x}=f.useContext(_r);if(typeof e.src!="string")throw new TypeError(`The \`<Audio>\` tag requires a string for \`src\`, but got ${JSON.stringify(e.src)} instead.`);const v=De(e.src),l=f.useCallback(_=>{console.log(_.currentTarget.error);const $=`Could not play audio with src ${v}: ${_.currentTarget.error}. See https://remotion.dev/docs/media-playback-error for help.`;y?wr(new Error($)):console.warn($)},[y,v]),w=f.useCallback((_,$)=>{x({type:"got-duration",durationInSeconds:$,src:_})},[x]),E=P[Ee(v)]??P[Ee(e.src)];if(y&&E!==void 0){const _=E*h;return b.jsx(_t,{layout:"none",durationInFrames:Ln({endAt:i,mediaDuration:_,playbackRate:e.playbackRate??1,startFrom:n}),children:b.jsx(kr,{...s,ref:t,_remotionInternalNativeLoopPassed:!0})})}if(typeof n<"u"||typeof i<"u"){Dn(n,i);const _=n??0,$=i??1/0;return b.jsx(he,{layout:"none",from:0-_,showInTimeline:!1,durationInFrames:$,name:o,children:b.jsx(kr,{_remotionInternalNeedsDurationCalculation:!!y,pauseWhenBuffering:a??!1,...p,ref:t})})}return Nn(e,"Audio"),g.isRendering?b.jsx(Ji,{onDuration:w,...e,ref:t,onError:l,_remotionInternalNeedsDurationCalculation:!!y}):b.jsx(Hi,{_remotionInternalNativeLoopPassed:e._remotionInternalNativeLoopPassed??!1,_remotionDebugSeeking:d??!1,_remotionInternalStack:c??null,shouldPreMountAudioTags:r!==null&&r.numberOfAudioTags>0,...e,ref:t,onError:l,onDuration:w,pauseWhenBuffering:a??!1,_remotionInternalNeedsDurationCalculation:!!y,showInTimeline:u??!0})},kr=f.forwardRef(Ki);Ge(kr),f.createContext({folderName:null,parentName:null});var ue=null,Gi=()=>{if(!ue){if(typeof document>"u")throw new Error("Tried to call an API that only works in the browser from outside the browser");ue=document.createElement("div"),ue.style.position="absolute",ue.style.top="0px",ue.style.left="0px",ue.style.right="0px",ue.style.bottom="0px",ue.style.width="100%",ue.style.height="100%",ue.style.display="flex",ue.style.flexDirection="column";const e=document.createElement("div");e.style.position="fixed",e.style.top="-999999px",e.appendChild(ue),document.body.appendChild(e)}return ue},ea=e=>f.useMemo(()=>{if("lazyComponent"in e&&typeof e.lazyComponent<"u")return f.lazy(e.lazyComponent);if("component"in e)return typeof document>"u"?e.component:f.lazy(()=>Promise.resolve({default:e.component}));throw new Error("You must pass either 'component' or 'lazyComponent'")},[e.component,e.lazyComponent]),ro=()=>/^([a-zA-Z0-9-\u4E00-\u9FFF])+$/g,ta=e=>e.match(ro()),ra=`Composition ID must match ${String(ro())}`,na=({children:e})=>{const{clipRegion:t}=f.useContext(gt),r=f.useMemo(()=>({display:"flex",flexDirection:"row",opacity:t==="hide"?0:1,clipPath:t&&t!=="hide"?`polygon(${t.x}px ${t.y}px, ${t.x}px ${t.height+t.y}px, ${t.width+t.x}px ${t.height+t.y}px, ${t.width+t.x}px ${t.y}px)`:void 0}),[t]);return b.jsx(R,{style:r,children:e})},no=f.createRef(),oa=({children:e,numberOfAudioTags:t})=>{const[r,n]=f.useState([]),i=f.useRef(r),[o,c]=f.useState([]),[a,u]=f.useState(null),[d,p]=f.useState(null),y=f.useCallback(w=>{n(E=>{const _=w(E);return i.current=_,_})},[]),s=f.useCallback(w=>{y(E=>{if(E.find($=>$.id===w.id))throw new Error(`Multiple composition with id ${w.id} are registered.`);return[...E,w].slice().sort(($,S)=>$.nonce-S.nonce)})},[y]),h=f.useCallback(w=>{n(E=>E.filter(_=>_.id!==w))},[]),g=f.useCallback((w,E)=>{c(_=>[..._,{name:w,parent:E}])},[]),P=f.useCallback((w,E)=>{c(_=>_.filter($=>!($.name===w&&$.parent===E)))},[]);f.useImperativeHandle(no,()=>({getCompositions:()=>i.current}),[]);const x=r.find(w=>(a==null?void 0:a.type)==="composition"?w.id===a.compositionId:null),v=f.useCallback((w,E)=>{n(_=>_.map(S=>S.id===w?{...S,defaultProps:E}:S))},[]),l=f.useMemo(()=>({compositions:r,registerComposition:s,unregisterComposition:h,folders:o,registerFolder:g,unregisterFolder:P,currentCompositionMetadata:d,setCurrentCompositionMetadata:p,canvasContent:a,setCanvasContent:u,updateCompositionDefaultProps:v}),[r,s,h,o,g,P,d,a,v]);return b.jsx(Pe.Provider,{value:l,children:b.jsx(Go,{children:b.jsx(wi,{children:b.jsx($n,{children:b.jsx(eo,{numberOfAudioTags:t,component:(x==null?void 0:x.component)??null,children:e})})})})})},ia=({onLoad:e,onError:t,delayRenderRetries:r,delayRenderTimeoutInMilliseconds:n,...i},o)=>{const[c]=f.useState(()=>ze(`Loading <IFrame> with source ${i.src}`,{retries:r??void 0,timeoutInMilliseconds:n??void 0})),a=f.useCallback(d=>{G(c),e==null||e(d)},[c,e]),u=f.useCallback(d=>{G(c),t?t(d):console.error("Error loading iframe:",d,"Handle the event using the onError() prop to make this message disappear.")},[c,t]);return b.jsx("iframe",{...i,ref:o,onError:u,onLoad:a})};f.forwardRef(ia);function aa(e){return 1e3*2**(e-1)}var sa=({onError:e,maxRetries:t=2,src:r,pauseWhenLoading:n,delayRenderRetries:i,delayRenderTimeoutInMilliseconds:o,onImageFrame:c,...a},u)=>{const d=f.useRef(null),p=f.useRef({}),{delayPlayback:y}=Pr(),s=f.useContext(ne);if(!r)throw new Error('No "src" prop was passed to <Img>.');f.useImperativeHandle(u,()=>d.current,[]);const h=De(r),g=f.useCallback(x=>{if(!d.current)return;const v=d.current.src;setTimeout(()=>{var w;if(!d.current)return;const l=(w=d.current)==null?void 0:w.src;l===v&&(d.current.removeAttribute("src"),d.current.setAttribute("src",l))},x)},[]),P=f.useCallback(x=>{var v,l,w,E,_,$,S;if(p.current){if(p.current[(v=d.current)==null?void 0:v.src]=(p.current[(l=d.current)==null?void 0:l.src]??0)+1,e&&(p.current[(w=d.current)==null?void 0:w.src]??0)>t){e(x);return}if((p.current[(E=d.current)==null?void 0:E.src]??0)<=t){const T=aa(p.current[(_=d.current)==null?void 0:_.src]??0);console.warn(`Could not load image with source ${($=d.current)==null?void 0:$.src}, retrying again in ${T}ms`),g(T);return}wr("Error loading image with src: "+((S=d.current)==null?void 0:S.src))}},[t,e,g]);if(typeof window<"u"){const x=!!(s!=null&&s.premounting);f.useLayoutEffect(()=>{var S,T;if(((T=(S=window.process)==null?void 0:S.env)==null?void 0:T.NODE_ENV)==="test"){d.current&&(d.current.src=h);return}const v=ze("Loading <Img> with src="+h,{retries:i??void 0,timeoutInMilliseconds:o??void 0}),l=n&&!x?y().unblock:()=>{},{current:w}=d;let E=!1;const _=()=>{var k,C,F;E||((p.current[(k=d.current)==null?void 0:k.src]??0)>0&&(delete p.current[(C=d.current)==null?void 0:C.src],console.info(`Retry successful - ${(F=d.current)==null?void 0:F.src} is now loaded`)),w&&(w.src=h,c==null||c(w)),l(),G(v))},$=new Image;return $.src=h,$.decode().then(_).catch(k=>{console.warn(k),$.complete?_():$.addEventListener("load",_)}),()=>{E=!0,$.removeEventListener("load",_),l(),G(v)}},[h,y,i,o,n,x,c])}return b.jsx("img",{...a,ref:d,onError:P})};f.forwardRef(sa);var oo={};on(oo,{makeDefaultPreviewCSS:()=>ca,injectCSS:()=>ua,OFFTHREAD_VIDEO_CLASS_NAME:()=>jr});var io={},ua=e=>{if(typeof document>"u"||io[e])return;const t=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.appendChild(document.createTextNode(e)),t.prepend(r),io[e]=!0},jr="__remotion_offthreadvideo",ca=(e,t)=>e?`
34
- ${e} * {
35
- box-sizing: border-box;
36
- }
37
- ${e} *:-webkit-full-screen {
38
- width: 100%;
39
- height: 100%;
40
- }
41
- ${e} .${jr} {
42
- object-fit: contain;
43
- }
44
- `:`
45
- * {
46
- box-sizing: border-box;
47
- }
48
- body {
49
- margin: 0;
50
- background-color: ${t};
51
- }
52
- .${jr} {
53
- object-fit: contain;
54
- }
55
- `,ao="__remotion-studio-container",la=()=>document.getElementById(ao),da=null,Lr=[],fa=()=>da,pa=e=>(Lr.push(e),()=>{Lr=Lr.filter(t=>t!==e)}),ya=({children:e,numberOfAudioTags:t})=>{const[r]=f.useState(()=>String(me(null))),[n,i]=f.useState(()=>In()),[o,c]=f.useState(!1),a=f.useRef(!1),[u,d]=f.useState(0),[p,y]=f.useState(1),s=f.useRef([]);typeof window<"u"&&f.useLayoutEffect(()=>{window.remotion_setFrame=(x,v,l)=>{window.remotion_attempt=l;const w=ze(`Setting the current frame to ${x}`);let E=!0;i(_=>(_[v]??window.remotion_initialFrame)===x?(E=!1,_):{..._,[v]:x}),E?requestAnimationFrame(()=>G(w)):G(w)},window.remotion_isPlayer=!1},[]);const h=f.useMemo(()=>({frame:n,playing:o,imperativePlaying:a,rootId:r,playbackRate:p,setPlaybackRate:y,audioAndVideoTags:s}),[n,p,o,r]),g=f.useMemo(()=>({setFrame:i,setPlaying:c}),[]),P=f.useMemo(()=>{let x=0;return{getNonce:()=>x++,fastRefreshes:u}},[u]);return f.useEffect(()=>{typeof __webpack_module__<"u"&&__webpack_module__.hot&&__webpack_module__.hot.addStatusHandler(x=>{x==="idle"&&d(v=>v+1)})},[]),b.jsx(je.Provider,{value:P,children:b.jsx(de.Provider,{value:h,children:b.jsx(Ae.Provider,{value:g,children:b.jsx(mn,{children:b.jsx(On,{children:b.jsx(an,{children:b.jsx(oa,{numberOfAudioTags:t,children:b.jsx(Bn,{children:b.jsx(Un,{children:e})})})})})})})})})},ha=()=>{if(K().isRendering){const e=window.remotion_envVariables;return e?{...JSON.parse(e),NODE_ENV:"production"}:{}}return{NODE_ENV:"production"}},ma=()=>{const e=ha();window.process||(window.process={}),window.process.env||(window.process.env={}),Object.keys(e).forEach(t=>{window.process.env[t]=e[t]})},ga=f.createContext(null),va=f.createContext({setSize:()=>{},size:{size:"auto",translation:{x:0,y:0}}}),xa=({canvasSize:e,compositionHeight:t,compositionWidth:r,previewSize:n})=>{const i=e.height/t,o=e.width/r,c=Math.min(i,o);return n==="auto"?c:Number(n)},wa="remotion_staticFilesChanged";function ba(){const e=f.useContext(Pe),t=f.useContext(de),r=f.useContext(Ae),n=f.useContext(ne),i=f.useContext(je),o=f.useContext(Oe),c=f.useContext(gt),a=f.useContext(Pt),u=f.useContext(bt),d=f.useContext(Ne),p=f.useContext(ke),y=f.useContext(Be);return f.useMemo(()=>({compositionManagerCtx:e,timelineContext:t,setTimelineContext:r,sequenceContext:n,nonceContext:i,canUseRemotionHooksContext:o,nativeLayersContext:c,preloadContext:a,resolveCompositionContext:u,renderAssetManagerContext:d,sequenceManagerContext:p,bufferManagerContext:y}),[e,i,n,r,t,o,c,a,u,d,p,y])}var _a=e=>{const{children:t,contexts:r}=e;return b.jsx(Oe.Provider,{value:r.canUseRemotionHooksContext,children:b.jsx(je.Provider,{value:r.nonceContext,children:b.jsx(gt.Provider,{value:r.nativeLayersContext,children:b.jsx(Pt.Provider,{value:r.preloadContext,children:b.jsx(Pe.Provider,{value:r.compositionManagerCtx,children:b.jsx(ke.Provider,{value:r.sequenceManagerContext,children:b.jsx(Ne.Provider,{value:r.renderAssetManagerContext,children:b.jsx(bt.Provider,{value:r.resolveCompositionContext,children:b.jsx(de.Provider,{value:r.timelineContext,children:b.jsx(Ae.Provider,{value:r.setTimelineContext,children:b.jsx(ne.Provider,{value:r.sequenceContext,children:b.jsx(Be.Provider,{value:r.bufferManagerContext,children:t})})})})})})})})})})})})},so={useUnsafeVideoConfig:xr,Timeline:yn,CompositionManager:Pe,SequenceManager:ke,SequenceVisibilityToggleContext:et,RemotionRoot:ya,useVideo:mr,getRoot:fa,useMediaVolumeState:Ir,useMediaMutedState:Fr,useLazyComponent:ea,truthy:dr,SequenceContext:ne,useRemotionContexts:ba,RemotionContextProvider:_a,CSSUtils:oo,setupEnvVariables:ma,MediaVolumeContext:Tr,SetMediaVolumeContext:Sr,getRemotionEnvironment:K,SharedAudioContext:Tt,SharedAudioContextProvider:eo,invalidCompositionErrorMessage:ra,isCompositionIdValid:ta,getPreviewDomElement:la,compositionsRef:no,portalNode:Gi,waitForRoot:pa,CanUseRemotionHooksProvider:di,CanUseRemotionHooks:Oe,PrefetchProvider:On,DurationsContextProvider:Bn,IsPlayerContextProvider:Xo,useIsPlayer:fn,EditorPropsProvider:mn,EditorPropsContext:xt,usePreload:De,NonceContext:je,resolveVideoConfig:En,useResolvedVideoConfig:Tn,resolveCompositionsRef:Cn,ResolveCompositionConfig:$n,REMOTION_STUDIO_CONTAINER_ELEMENT:ao,RenderAssetManager:Ne,persistCurrentFrame:Sn,useTimelineSetFrame:kn,NativeLayersProvider:an,ClipComposition:na,isIosSafari:$t,WATCH_REMOTION_STATIC_FILES:wa,addSequenceStackTraces:Ge,useMediaStartsAt:tt,BufferingProvider:Un,BufferingContextReact:Be,enableSequenceStackTraces:ln,CurrentScaleContext:ga,PreviewSizeContext:va,calculateScale:xa,editorPropsProviderRef:hn,PROPS_UPDATED_EXTERNALLY:li,validateRenderAsset:jn},uo=f.createContext(!1),Pa=({children:e})=>b.jsx(uo.Provider,{value:!1,children:e}),Ea=()=>{if(!f.useContext(uo))throw new Error("This component must be inside a <Series /> component.")},Ca=({children:e},t)=>(Ea(),b.jsx(Pa,{children:e})),Ma=f.forwardRef(Ca);Ge(Ma);var $a=({ref:e,onVideoFrame:t})=>{f.useEffect(()=>{const{current:r}=e;if(!r||!t)return;let n=0;const i=()=>{e.current&&(t(e.current),n=e.current.requestVideoFrameCallback(i))};return i(),()=>{r.cancelVideoFrameCallback(n)}},[t,e])},Ta=(e,t)=>{const r=f.useRef(null),{volume:n,muted:i,playbackRate:o,onlyWarnForMediaSeekingError:c,src:a,onDuration:u,acceptableTimeShift:d,acceptableTimeShiftInSeconds:p,toneFrequency:y,name:s,_remotionInternalNativeLoopPassed:h,_remotionInternalStack:g,_remotionDebugSeeking:P,style:x,pauseWhenBuffering:v,showInTimeline:l,loopVolumeCurveBehavior:w,onError:E,onAutoPlayError:_,onVideoFrame:$,crossOrigin:S,...T}=e,k=Et(w??"repeat"),{fps:C,durationInFrames:F}=ve(),V=f.useContext(ne),{hidden:j}=f.useContext(et),[N]=f.useState(()=>String(Math.random())),q=j[N]??!1;if(typeof d<"u")throw new Error("acceptableTimeShift has been removed. Use acceptableTimeShiftInSeconds instead.");const A=Xn(r),[te]=Ir(),[W]=Fr();Wn({mediaRef:r,volume:n,mediaVolume:te,mediaType:"video",src:a,playbackRate:e.playbackRate??1,displayName:s??null,id:N,stack:g,showInTimeline:l,premountDisplay:null,onAutoPlayError:_??null}),Kn({volumePropFrame:k,actualVolume:A,volume:n,mediaVolume:te,mediaRef:r}),Qn({mediaRef:r,src:a,mediaType:"video",playbackRate:e.playbackRate??1,onlyWarnForMediaSeekingError:c,acceptableTimeshift:p??Mr,isPremounting:!!(V!=null&&V.premounting),pauseWhenBuffering:v,debugSeeking:P,onAutoPlayError:_??null});const H=V?V.relativeFrom:0,Y=V?Math.min(V.durationInFrames,F):F,Z=Di({actualSrc:De(a),actualFrom:H,duration:Y,fps:C});f.useImperativeHandle(t,()=>r.current,[]),f.useEffect(()=>{const{current:z}=r;if(!z)return;const pe=()=>{var we;if(z.error){if(console.error("Error occurred in video",z==null?void 0:z.error),E){const ye=new Error(`Code ${z.error.code}: ${z.error.message}`);E(ye);return}throw new Error(`The browser threw an error while playing the video ${a}: Code ${z.error.code} - ${(we=z==null?void 0:z.error)==null?void 0:we.message}. See https://remotion.dev/docs/media-playback-error for help. Pass an onError() prop to handle the error.`)}else{if(E){const ye=new Error(`The browser threw an error while playing the video ${a}`);E(ye);return}throw new Error("The browser threw an error while playing the video")}};return z.addEventListener("error",pe,{once:!0}),()=>{z.removeEventListener("error",pe)}},[E,a]);const re=f.useRef();re.current=u,$a({ref:r,onVideoFrame:$}),f.useEffect(()=>{var we;const{current:z}=r;if(!z)return;if(z.duration){(we=re.current)==null||we.call(re,a,z.duration);return}const pe=()=>{var ye;(ye=re.current)==null||ye.call(re,a,z.duration)};return z.addEventListener("loadedmetadata",pe),()=>{z.removeEventListener("loadedmetadata",pe)}},[a]),f.useEffect(()=>{const{current:z}=r;z&&($t()?z.preload="metadata":z.preload="auto")},[]);const Ze=f.useMemo(()=>({...x,opacity:q?0:(x==null?void 0:x.opacity)??1}),[q,x]),Ye=S??($?"anonymous":void 0);return b.jsx("video",{ref:r,muted:i||W,playsInline:!0,src:Z,loop:h,style:Ze,disableRemotePlayback:!0,crossOrigin:Ye,...T})},Sa=f.forwardRef(Ta),co=e=>Math.round(e*1e5)/1e5,Ar=(e,t)=>{e.currentTime=t;let r,n=null;const i=new Promise(c=>{r=e.requestVideoFrameCallback((a,u)=>{const d=u.expectedDisplayTime-a;if(d<=0){c(u.mediaTime);return}setTimeout(()=>{c(u.mediaTime)},d+150)})}),o=new Promise(c=>{const a=()=>{c()};e.addEventListener("seeked",a,{once:!0}),n=()=>{e.removeEventListener("seeked",a)}});return{wait:Promise.all([i,o]).then(([c])=>c),cancel:()=>{n==null||n(),e.cancelVideoFrameCallback(r)}}},Ia=(e,t,r)=>{const n=1/r/2;let i=()=>{};return Number.isFinite(e.duration)&&e.currentTime>=e.duration&&t>=e.duration?{prom:Promise.resolve(),cancel:()=>{}}:{prom:new Promise((c,a)=>{const u=Ar(e,t+n);u.wait.then(d=>{if(Math.abs(t-d)<=n)return c();const y=t>d?1:-1,s=Ar(e,d+n*y);i=s.cancel,s.wait.then(h=>{const g=Math.abs(t-h);if(co(g)<=co(n))return c();const P=Ar(e,t+n);return i=P.cancel,P.wait.then(()=>{c()}).catch(x=>{a(x)})}).catch(h=>{a(h)})}),i=u.cancel}),cancel:()=>{i()}}},Fa=({onError:e,volume:t,allowAmplificationDuringRender:r,playbackRate:n,onDuration:i,toneFrequency:o,name:c,acceptableTimeShiftInSeconds:a,delayRenderRetries:u,delayRenderTimeoutInMilliseconds:d,loopVolumeCurveBehavior:p,...y},s)=>{const h=Ve(),g=be(),P=Et(p??"repeat"),x=xr(),v=f.useRef(null),l=f.useContext(ne),w=tt(),E=K(),{registerRenderAsset:_,unregisterRenderAsset:$}=f.useContext(Ne),S=f.useMemo(()=>`video-${me(y.src??"")}-${l==null?void 0:l.cumulatedFrom}-${l==null?void 0:l.relativeFrom}-${l==null?void 0:l.durationInFrames}`,[y.src,l==null?void 0:l.cumulatedFrom,l==null?void 0:l.relativeFrom,l==null?void 0:l.durationInFrames]);if(!x)throw new Error("No video config found");const T=rt({volume:t,frame:P,mediaVolume:1,allowAmplificationDuringRender:r??!1});f.useEffect(()=>{if(!y.src)throw new Error("No src passed");if(!y.muted&&!(T<=0)&&window.remotion_audioEnabled)return _({type:"video",src:Ee(y.src),id:S,frame:h,volume:T,mediaFrame:g,playbackRate:n??1,allowAmplificationDuringRender:r??!1,toneFrequency:o??null,audioStartFrame:Math.max(0,-((l==null?void 0:l.relativeFrom)??0))}),()=>$(S)},[y.muted,y.src,_,S,$,T,g,h,n,r,o,l==null?void 0:l.relativeFrom]),f.useImperativeHandle(s,()=>v.current,[]),f.useEffect(()=>{var A,te;if(!window.remotion_videoEnabled)return;const{current:C}=v;if(!C)return;const F=Hn({frame:g,playbackRate:n||1,startFrom:-w,fps:x.fps}),V=ze(`Rendering <Video /> with src="${y.src}"`,{retries:u??void 0,timeoutInMilliseconds:d??void 0});if(((te=(A=window.process)==null?void 0:A.env)==null?void 0:te.NODE_ENV)==="test"){G(V);return}if(Jn(C.currentTime,F)){if(C.readyState>=2){G(V);return}const W=()=>{G(V)};return C.addEventListener("loadeddata",W,{once:!0}),()=>{C.removeEventListener("loadeddata",W)}}const j=()=>{G(V)},N=Ia(C,F,x.fps);N.prom.then(()=>{G(V)}),C.addEventListener("ended",j,{once:!0});const q=()=>{var W;if(C!=null&&C.error){if(console.error("Error occurred in video",C==null?void 0:C.error),e)return;throw new Error(`The browser threw an error while playing the video ${y.src}: Code ${C.error.code} - ${(W=C==null?void 0:C.error)==null?void 0:W.message}. See https://remotion.dev/docs/media-playback-error for help. Pass an onError() prop to handle the error.`)}else throw new Error("The browser threw an error")};return C.addEventListener("error",q,{once:!0}),()=>{N.cancel(),C.removeEventListener("ended",j),C.removeEventListener("error",q),G(V)}},[P,y.src,n,x.fps,g,w,e,u,d]);const{src:k}=y;return E.isRendering&&f.useLayoutEffect(()=>{var j,N;if(((N=(j=window.process)==null?void 0:j.env)==null?void 0:N.NODE_ENV)==="test")return;const C=ze("Loading <Video> duration with src="+k,{retries:u??void 0,timeoutInMilliseconds:d??void 0}),{current:F}=v,V=()=>{F!=null&&F.duration&&i(k,F.duration),G(C)};return F!=null&&F.duration?(i(k,F.duration),G(C)):F==null||F.addEventListener("loadedmetadata",V,{once:!0}),()=>{F==null||F.removeEventListener("loadedmetadata",V),G(C)}},[k,i,u,d]),b.jsx("video",{ref:v,...y})},ka=f.forwardRef(Fa),ja=(e,t)=>{const{startFrom:r,endAt:n,name:i,pauseWhenBuffering:o,stack:c,_remotionInternalNativeLoopPassed:a,showInTimeline:u,onAutoPlayError:d,...p}=e,{loop:y,_remotionDebugSeeking:s,...h}=e,{fps:g}=ve(),P=K(),{durations:x,setDurations:v}=f.useContext(_r);if(typeof t=="string")throw new Error("string refs are not supported");if(typeof e.src!="string")throw new TypeError(`The \`<Video>\` tag requires a string for \`src\`, but got ${JSON.stringify(e.src)} instead.`);const l=De(e.src),w=f.useCallback(($,S)=>{v({type:"got-duration",durationInSeconds:S,src:$})},[v]),E=f.useCallback(()=>{},[]),_=x[Ee(l)]??x[Ee(e.src)];if(y&&_!==void 0){const $=_*g;return b.jsx(_t,{durationInFrames:Ln({endAt:n,mediaDuration:$,playbackRate:e.playbackRate??1,startFrom:r}),layout:"none",name:i,children:b.jsx(Vr,{...h,ref:t,_remotionInternalNativeLoopPassed:!0})})}if(typeof r<"u"||typeof n<"u"){Dn(r,n);const $=r??0,S=n??1/0;return b.jsx(he,{layout:"none",from:0-$,showInTimeline:!1,durationInFrames:S,name:i,children:b.jsx(Vr,{pauseWhenBuffering:o??!1,...p,ref:t})})}return Nn(e,"Video"),P.isRendering?b.jsx(ka,{onDuration:w,onVideoFrame:E??null,...p,ref:t}):b.jsx(Sa,{onlyWarnForMediaSeekingError:!1,...p,ref:t,onVideoFrame:null,pauseWhenBuffering:o??!1,onDuration:w,_remotionInternalStack:c??null,_remotionInternalNativeLoopPassed:a??!1,_remotionDebugSeeking:s??!1,showInTimeline:u??!0,onAutoPlayError:d??void 0})},Vr=f.forwardRef(ja);Ge(Vr),Jo();var La={},Aa=new Proxy(La,{get(e,t){return t==="Bundling"||t==="Rendering"||t==="Log"||t==="Puppeteer"||t==="Output"?Aa:()=>{console.warn("⚠️ The CLI configuration has been extracted from Remotion Core."),console.warn("Update the import from the config file:"),console.warn(),console.warn("- Delete:"),console.warn('import {Config} from "remotion";'),console.warn("+ Replace:"),console.warn('import {Config} from "@remotion/cli/config";'),console.warn(),console.warn("For more information, see https://www.remotion.dev/docs/4-0-migration."),process.exit(1)}}});Ge(he),typeof window<"u"&&(window.remotion_renderReady=!1),typeof window<"u"&&(window.remotion_delayRenderTimeouts={});function Va(e,t){const{allowFloats:r,component:n}=t;if(typeof e>"u")throw new Error(`The "durationInFrames" prop ${n} is missing.`);if(typeof e!="number")throw new Error(`The "durationInFrames" prop ${n} must be a number, but you passed a value of type ${typeof e}`);if(e<=0)throw new TypeError(`The "durationInFrames" prop ${n} must be positive, but got ${e}.`);if(!r&&e%1!==0)throw new TypeError(`The "durationInFrames" prop ${n} must be an integer, but got ${e}.`);if(!Number.isFinite(e))throw new TypeError(`The "durationInFrames" prop ${n} must be finite, but got ${e}.`)}var Oa={validateDurationInFrames:Va},Na=.01,Da=({children:e,presentationProgress:t,presentationDirection:r,passedProps:{direction:n="from-left",enterStyle:i,exitStyle:o}})=>{const c=f.useMemo(()=>{const u=t===1?t*100:t*100-Na;if(r==="exiting")switch(n){case"from-left":return{transform:`translateX(${u}%)`};case"from-right":return{transform:`translateX(${-t*100}%)`};case"from-top":return{transform:`translateY(${u}%)`};case"from-bottom":return{transform:`translateY(${-t*100}%)`};default:throw new Error(`Invalid direction: ${n}`)}switch(n){case"from-left":return{transform:`translateX(${-100+t*100}%)`};case"from-right":return{transform:`translateX(${100-u}%)`};case"from-top":return{transform:`translateY(${-100+t*100}%)`};case"from-bottom":return{transform:`translateY(${100-u}%)`};default:throw new Error(`Invalid direction: ${n}`)}},[r,t,n]),a=f.useMemo(()=>({width:"100%",height:"100%",justifyContent:"center",alignItems:"center",...c,...r==="entering"?i:o}),[c,i,o,r]);return b.jsx(R,{style:a,children:e})},It=e=>({component:Da,props:{}}),Ba=e=>({getDurationInFrames:()=>e.durationInFrames,getProgress:({frame:t})=>Mt(t,[0,e.durationInFrames],[0,1],{easing:e.easing,extrapolateLeft:"clamp",extrapolateRight:"clamp"})}),za=f.createContext(null),qa=f.createContext(null),lo=({presentationProgress:e,children:t})=>{const r=f.useMemo(()=>({enteringProgress:e}),[e]);return b.jsx(za.Provider,{value:r,children:t})},fo=({presentationProgress:e,children:t})=>{const r=f.useMemo(()=>({exitingProgress:e}),[e]);return b.jsx(qa.Provider,{value:r,children:t})},po=e=>f.Children.toArray(e).reduce((r,n)=>n.type===f.Fragment?r.concat(po(n.props.children)):(r.push(n),r),[]),Wa=Oa.validateDurationInFrames,nt=function(e){return null},Or=({children:e})=>b.jsx(b.Fragment,{children:e}),Ua=({children:e})=>{const{fps:t}=ve(),r=be(),n=f.useMemo(()=>{let i=0,o=0;const c=po(e);return f.Children.map(c,(a,u)=>{const d=a;if(typeof d=="string"){if(d.trim()==="")return null;throw new TypeError(`The <TransitionSeries /> component only accepts a list of <TransitionSeries.Sequence /> components as its children, but you passed a string "${d}"`)}const p=c[u-1],y=c[u+1],s=typeof p=="string"||typeof p>"u"?null:p.type===nt?p:null,h=typeof y=="string"||typeof y>"u"?null:y.type===nt?y:null,g=typeof p=="string"||typeof p>"u"?!1:p.type===nt;if(d.type===nt){if(g)throw new TypeError(`A <TransitionSeries.Transition /> component must not be followed by another <TransitionSeries.Transition /> component (nth children = ${u-1} and ${u})`);return null}if(d.type!==Or)throw new TypeError(`The <TransitionSeries /> component only accepts a list of <TransitionSeries.Sequence /> and <TransitionSeries.Transition /> components as its children, but got ${d} instead`);const P=d,x=`index = ${u}, duration = ${P.props.durationInFrames}`;if(!(P!=null&&P.props.children))throw new TypeError(`A <TransitionSeries.Sequence /> component (${x}) was detected to not have any children. Delete it to fix this error.`);const v=P.props.durationInFrames,{durationInFrames:l,children:w,...E}=P.props;Wa(v,{component:"of a <TransitionSeries.Sequence /> component",allowFloats:!0});const _=P.props.offset??0;if(Number.isNaN(_))throw new TypeError(`The "offset" property of a <TransitionSeries.Sequence /> must not be NaN, but got NaN (${x}).`);if(!Number.isFinite(_))throw new TypeError(`The "offset" property of a <TransitionSeries.Sequence /> must be finite, but got ${_} (${x}).`);if(_%1!==0)throw new TypeError(`The "offset" property of a <TransitionSeries.Sequence /> must be finite, but got ${_} (${x}).`);const $=o+_;let S=0;s&&(S=s.props.timing.getDurationInFrames({fps:t}),i-=S);let T=$+i;o+=v+_,T<0&&(o-=T,T=0);const k=h?h.props.timing.getProgress({frame:r-T-l+h.props.timing.getDurationInFrames({fps:t}),fps:t}):null,C=s?s.props.timing.getProgress({frame:r-T,fps:t}):null;if(h&&v<h.props.timing.getDurationInFrames({fps:t}))throw new Error(`The duration of a <TransitionSeries.Sequence /> must not be shorter than the duration of the next <TransitionSeries.Transition />. The transition is ${h.props.timing.getDurationInFrames({fps:t})} frames long, but the sequence is only ${v} frames long (${x})`);if(s&&v<s.props.timing.getDurationInFrames({fps:t}))throw new Error(`The duration of a <TransitionSeries.Sequence /> must not be shorter than the duration of the previous <TransitionSeries.Transition />. The transition is ${s.props.timing.getDurationInFrames({fps:t})} frames long, but the sequence is only ${v} frames long (${x})`);if(h&&s&&k!==null&&C!==null){const F=h.props.presentation??It(),V=s.props.presentation??It(),j=F.component,N=V.component;return b.jsx(he,{from:Math.floor(T),durationInFrames:v,...E,name:E.name||"<TS.Sequence>",children:b.jsx(j,{passedProps:F.props??{},presentationDirection:"exiting",presentationProgress:k,presentationDurationInFrames:h.props.timing.getDurationInFrames({fps:t}),children:b.jsx(fo,{presentationProgress:k,children:b.jsx(N,{passedProps:V.props??{},presentationDirection:"entering",presentationProgress:C,presentationDurationInFrames:s.props.timing.getDurationInFrames({fps:t}),children:b.jsx(lo,{presentationProgress:C,children:a})})})})},u)}if(C!==null&&s){const F=s.props.presentation??It(),V=F.component;return b.jsx(he,{from:Math.floor(T),durationInFrames:v,...E,name:E.name||"<TS.Sequence>",children:b.jsx(V,{passedProps:F.props??{},presentationDirection:"entering",presentationProgress:C,presentationDurationInFrames:s.props.timing.getDurationInFrames({fps:t}),children:b.jsx(lo,{presentationProgress:C,children:a})})},u)}if(k!==null&&h){const F=h.props.presentation??It(),V=F.component;return b.jsx(he,{from:Math.floor(T),durationInFrames:v,...E,name:E.name||"<TS.Sequence>",children:b.jsx(V,{passedProps:F.props??{},presentationDirection:"exiting",presentationProgress:k,presentationDurationInFrames:h.props.timing.getDurationInFrames({fps:t}),children:b.jsx(fo,{presentationProgress:k,children:a})})},u)}return b.jsx(he,{from:Math.floor(T),durationInFrames:v,...E,name:E.name||"<TS.Sequence>",children:a},u)})},[e,t,r]);return b.jsx(b.Fragment,{children:n})},Nr=({children:e,name:t,layout:r,...n})=>{const i=t??"<TransitionSeries>",o=r??"absolute-fill";return b.jsx(he,{name:i,layout:o,...n,children:b.jsx(Ua,{children:e})})};Nr.Sequence=Or,Nr.Transition=nt,so.addSequenceStackTraces(Nr),so.addSequenceStackTraces(Or);var Ra=({children:e,presentationDirection:t,presentationProgress:r,passedProps:n})=>{const i=t==="entering",o=f.useMemo(()=>({opacity:i?r:n.shouldFadeOutExitingScene?1-r:1,...t==="entering"?n.enterStyle:n.exitStyle}),[i,n.enterStyle,n.exitStyle,n.shouldFadeOutExitingScene,t,r]);return b.jsx(R,{style:o,children:e})},Ha=e=>({component:Ra,props:e??{}}),Za=.01,Ya=({children:e,presentationProgress:t,presentationDirection:r,passedProps:{direction:n="from-left",enterStyle:i,exitStyle:o}})=>{const c=f.useMemo(()=>{const u=t===1?t*100:t*100-Za;if(r==="exiting")switch(n){case"from-left":return{transform:`translateX(${u}%)`};case"from-right":return{transform:`translateX(${-t*100}%)`};case"from-top":return{transform:`translateY(${u}%)`};case"from-bottom":return{transform:`translateY(${-t*100}%)`};default:throw new Error(`Invalid direction: ${n}`)}switch(n){case"from-left":return{transform:`translateX(${-100+t*100}%)`};case"from-right":return{transform:`translateX(${100-u}%)`};case"from-top":return{transform:`translateY(${-100+t*100}%)`};case"from-bottom":return{transform:`translateY(${100-u}%)`};default:throw new Error(`Invalid direction: ${n}`)}},[r,t,n]),a=f.useMemo(()=>({width:"100%",height:"100%",justifyContent:"center",alignItems:"center",...c,...r==="entering"?i:o}),[c,i,o,r]);return b.jsx(R,{style:a,children:e})},Qa=e=>({component:Ya,props:e??{}}),Xa=(e,t)=>{switch(t){case"from-left":return`
56
- M 0 0
57
- L ${e} 0
58
- L ${e} 1
59
- L 0 1
60
- Z`;case"from-top-left":return`
61
- M 0 0
62
- L ${e*2} 0
63
- L 0 ${e*2}
64
- Z`;case"from-top":return`
65
- M 0 0
66
- L 1 0
67
- L 1 ${e}
68
- L 0 ${e}
69
- Z`;case"from-top-right":return`
70
- M 1 0
71
- L ${1-e*2} 0
72
- L 1 ${e*2}
73
- Z`;case"from-right":return`
74
- M 1 0
75
- L 1 1
76
- L ${1-e} 1
77
- L ${1-e} 0
78
- Z`;case"from-bottom-right":return`
79
- M 1 1
80
- L ${1-e*2} 1
81
- L 1 ${1-e*2}
82
- Z`;case"from-bottom":return`
83
- M 0 1
84
- L 1 1
85
- L 1 ${1-e}
86
- L 0 ${1-e}
87
- Z`;case"from-bottom-left":return`
88
- M 0 1
89
- L 0 ${1-e*2}
90
- L ${e*2} 1
91
- Z`;default:throw new Error(`Unknown direction ${JSON.stringify(t)}`)}},Ja=(e,t)=>{switch(t){case"from-left":return`
92
- M 1 1
93
- L ${1-e} 1
94
- L ${1-e} 0
95
- L 1 0
96
- Z`;case"from-top-left":return`
97
- M 1 1
98
- L ${1-2*e} 1
99
- L 1 ${1-2*e}
100
- Z`;case"from-top":return`
101
- M 1 1
102
- L 0 1
103
- L 0 ${1-e}
104
- L 1 ${1-e}
105
- Z`;case"from-top-right":return`
106
- M 0 1
107
- L ${e*2} 1
108
- L 0 ${1-e*2}
109
- Z`;case"from-right":return`
110
- M 0 0
111
- L ${e} 0
112
- L ${e} 1
113
- L 0 1
114
- Z`;case"from-bottom-right":return`
115
- M 0 0
116
- L ${e*2} 0
117
- L 0 ${e*2}
118
- Z`;case"from-bottom":return`
119
- M 1 0
120
- L 0 0
121
- L 0 ${e}
122
- L 1 ${e}
123
- Z`;case"from-bottom-left":return`
124
- M 1 0
125
- L ${1-e*2} 0
126
- L 1 ${e*2}
127
- Z`;default:throw new Error(`Unknown direction ${JSON.stringify(t)}`)}},Ka=({children:e,presentationProgress:t,presentationDirection:r,passedProps:{direction:n="from-left",innerEnterStyle:i,innerExitStyle:o,outerEnterStyle:c,outerExitStyle:a}})=>{const[u]=f.useState(()=>String(me(null))),d=r==="entering"?t:1-t,p=r==="entering"?Xa(d,n):Ja(d,n),y=f.useMemo(()=>({width:"100%",height:"100%",justifyContent:"center",alignItems:"center",clipPath:`url(#${u})`,...r==="entering"?i:o}),[u,i,o,r]),s=f.useMemo(()=>r==="entering"?c:a,[c,a,r]),h=f.useMemo(()=>({width:"100%",height:"100%",pointerEvents:"none"}),[]);return b.jsxs(R,{style:s,children:[b.jsx(R,{style:y,children:e}),b.jsx(R,{children:b.jsx("svg",{viewBox:"0 0 1 1",style:h,children:b.jsx("defs",{children:b.jsx("clipPath",{id:u,clipPathUnits:"objectBoundingBox",children:b.jsx("path",{d:p,fill:"black"})})})})})]})},Ga=e=>({component:Ka,props:e??{}}),es=({children:e,presentationDirection:t,presentationProgress:r,passedProps:{direction:n="from-left",perspective:i=1e3,innerEnterStyle:o,innerExitStyle:c,outerEnterStyle:a,outerExitStyle:u}})=>{const d=f.useMemo(()=>{const h=t==="entering"?Mt(r,[0,1],[n==="from-right"||n==="from-top"?180:-180,0]):Mt(r,[0,1],[0,n==="from-right"||n==="from-top"?-180:180]);return{width:"100%",height:"100%",transform:`${n==="from-top"||n==="from-bottom"?"rotateX":"rotateY"}(${h}deg)`,backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",...t==="entering"?o:c}},[n,o,c,t,r]),p=f.useMemo(()=>({perspective:i,transformStyle:"preserve-3d",...t==="entering"?a:u}),[a,u,i,t]);return b.jsx(R,{style:p,children:b.jsx(R,{style:d,children:e})})},ts=e=>({component:es,props:e??{}}),fe={},Ft={},ot={};Object.defineProperty(ot,"__esModule",{value:!0}),ot.cutInstruction=void 0,ot.cutCInstruction=yo;const rs=({instruction:e,lastPoint:t,progress:r})=>{const n=t.x+(e.x-t.x)*r,i=t.y+(e.y-t.y)*r;return{type:"L",x:n,y:i}};function qe(e,t,r){return{x:e.x+(t.x-e.x)*r,y:e.y+(t.y-e.y)*r}}function yo({progress:e,lastPoint:t,instruction:r}){const n=e,i={x:t.x,y:t.y},o={x:r.cp1x,y:r.cp1y},c={x:r.cp2x,y:r.cp2y},a={x:r.x,y:r.y},u=qe(i,o,n),d=qe(o,c,n),p=qe(c,a,n),y=qe(u,d,n),s=qe(d,p,n),h=qe(y,s,n);return{type:"C",cp1x:u.x,cp1y:u.y,cp2x:y.x,cp2y:y.y,x:h.x,y:h.y}}const ns=({instruction:e,lastPoint:t,progress:r})=>{if(e.type==="M")return e;if(e.type==="L")return rs({instruction:e,lastPoint:t,progress:r});if(e.type==="C")return yo({instruction:e,lastPoint:t,progress:r});if(e.type==="Z")return e;throw new TypeError(`${e.type} is not supported.`)};ot.cutInstruction=ns;var kt={},Ce={},ho={},_e={};Object.defineProperty(_e,"__esModule",{value:!0}),_e.binomialCoefficients=_e.cValues=_e.tValues=void 0,_e.tValues=[[],[],[-.5773502691896257,.5773502691896257],[0,-.7745966692414834,.7745966692414834],[-.33998104358485626,.33998104358485626,-.8611363115940526,.8611363115940526],[0,-.5384693101056831,.5384693101056831,-.906179845938664,.906179845938664],[.6612093864662645,-.6612093864662645,-.2386191860831969,.2386191860831969,-.932469514203152,.932469514203152],[0,.4058451513773972,-.4058451513773972,-.7415311855993945,.7415311855993945,-.9491079123427585,.9491079123427585],[-.1834346424956498,.1834346424956498,-.525532409916329,.525532409916329,-.7966664774136267,.7966664774136267,-.9602898564975363,.9602898564975363],[0,-.8360311073266358,.8360311073266358,-.9681602395076261,.9681602395076261,-.3242534234038089,.3242534234038089,-.6133714327005904,.6133714327005904],[-.14887433898163122,.14887433898163122,-.4333953941292472,.4333953941292472,-.6794095682990244,.6794095682990244,-.8650633666889845,.8650633666889845,-.9739065285171717,.9739065285171717],[0,-.26954315595234496,.26954315595234496,-.5190961292068118,.5190961292068118,-.7301520055740494,.7301520055740494,-.8870625997680953,.8870625997680953,-.978228658146057,.978228658146057],[-.1252334085114689,.1252334085114689,-.3678314989981802,.3678314989981802,-.5873179542866175,.5873179542866175,-.7699026741943047,.7699026741943047,-.9041172563704749,.9041172563704749,-.9815606342467192,.9815606342467192],[0,-.2304583159551348,.2304583159551348,-.44849275103644687,.44849275103644687,-.6423493394403402,.6423493394403402,-.8015780907333099,.8015780907333099,-.9175983992229779,.9175983992229779,-.9841830547185881,.9841830547185881],[-.10805494870734367,.10805494870734367,-.31911236892788974,.31911236892788974,-.5152486363581541,.5152486363581541,-.6872929048116855,.6872929048116855,-.827201315069765,.827201315069765,-.9284348836635735,.9284348836635735,-.9862838086968123,.9862838086968123],[0,-.20119409399743451,.20119409399743451,-.3941513470775634,.3941513470775634,-.5709721726085388,.5709721726085388,-.7244177313601701,.7244177313601701,-.8482065834104272,.8482065834104272,-.937273392400706,.937273392400706,-.9879925180204854,.9879925180204854],[-.09501250983763744,.09501250983763744,-.2816035507792589,.2816035507792589,-.45801677765722737,.45801677765722737,-.6178762444026438,.6178762444026438,-.755404408355003,.755404408355003,-.8656312023878318,.8656312023878318,-.9445750230732326,.9445750230732326,-.9894009349916499,.9894009349916499],[0,-.17848418149584785,.17848418149584785,-.3512317634538763,.3512317634538763,-.5126905370864769,.5126905370864769,-.6576711592166907,.6576711592166907,-.7815140038968014,.7815140038968014,-.8802391537269859,.8802391537269859,-.9506755217687678,.9506755217687678,-.9905754753144174,.9905754753144174],[-.0847750130417353,.0847750130417353,-.2518862256915055,.2518862256915055,-.41175116146284263,.41175116146284263,-.5597708310739475,.5597708310739475,-.6916870430603532,.6916870430603532,-.8037049589725231,.8037049589725231,-.8926024664975557,.8926024664975557,-.9558239495713977,.9558239495713977,-.9915651684209309,.9915651684209309],[0,-.16035864564022537,.16035864564022537,-.31656409996362983,.31656409996362983,-.46457074137596094,.46457074137596094,-.600545304661681,.600545304661681,-.7209661773352294,.7209661773352294,-.8227146565371428,.8227146565371428,-.9031559036148179,.9031559036148179,-.96020815213483,.96020815213483,-.9924068438435844,.9924068438435844],[-.07652652113349734,.07652652113349734,-.22778585114164507,.22778585114164507,-.37370608871541955,.37370608871541955,-.5108670019508271,.5108670019508271,-.636053680726515,.636053680726515,-.7463319064601508,.7463319064601508,-.8391169718222188,.8391169718222188,-.912234428251326,.912234428251326,-.9639719272779138,.9639719272779138,-.9931285991850949,.9931285991850949],[0,-.1455618541608951,.1455618541608951,-.2880213168024011,.2880213168024011,-.4243421202074388,.4243421202074388,-.5516188358872198,.5516188358872198,-.6671388041974123,.6671388041974123,-.7684399634756779,.7684399634756779,-.8533633645833173,.8533633645833173,-.9200993341504008,.9200993341504008,-.9672268385663063,.9672268385663063,-.9937521706203895,.9937521706203895],[-.06973927331972223,.06973927331972223,-.20786042668822127,.20786042668822127,-.34193582089208424,.34193582089208424,-.469355837986757,.469355837986757,-.5876404035069116,.5876404035069116,-.6944872631866827,.6944872631866827,-.7878168059792081,.7878168059792081,-.8658125777203002,.8658125777203002,-.926956772187174,.926956772187174,-.9700604978354287,.9700604978354287,-.9942945854823992,.9942945854823992],[0,-.1332568242984661,.1332568242984661,-.26413568097034495,.26413568097034495,-.3903010380302908,.3903010380302908,-.5095014778460075,.5095014778460075,-.6196098757636461,.6196098757636461,-.7186613631319502,.7186613631319502,-.8048884016188399,.8048884016188399,-.8767523582704416,.8767523582704416,-.9329710868260161,.9329710868260161,-.9725424712181152,.9725424712181152,-.9947693349975522,.9947693349975522],[-.06405689286260563,.06405689286260563,-.1911188674736163,.1911188674736163,-.3150426796961634,.3150426796961634,-.4337935076260451,.4337935076260451,-.5454214713888396,.5454214713888396,-.6480936519369755,.6480936519369755,-.7401241915785544,.7401241915785544,-.820001985973903,.820001985973903,-.8864155270044011,.8864155270044011,-.9382745520027328,.9382745520027328,-.9747285559713095,.9747285559713095,-.9951872199970213,.9951872199970213]],_e.cValues=[[],[],[1,1],[.8888888888888888,.5555555555555556,.5555555555555556],[.6521451548625461,.6521451548625461,.34785484513745385,.34785484513745385],[.5688888888888889,.47862867049936647,.47862867049936647,.23692688505618908,.23692688505618908],[.3607615730481386,.3607615730481386,.46791393457269104,.46791393457269104,.17132449237917036,.17132449237917036],[.4179591836734694,.3818300505051189,.3818300505051189,.27970539148927664,.27970539148927664,.1294849661688697,.1294849661688697],[.362683783378362,.362683783378362,.31370664587788727,.31370664587788727,.22238103445337448,.22238103445337448,.10122853629037626,.10122853629037626],[.3302393550012598,.1806481606948574,.1806481606948574,.08127438836157441,.08127438836157441,.31234707704000286,.31234707704000286,.26061069640293544,.26061069640293544],[.29552422471475287,.29552422471475287,.26926671930999635,.26926671930999635,.21908636251598204,.21908636251598204,.1494513491505806,.1494513491505806,.06667134430868814,.06667134430868814],[.2729250867779006,.26280454451024665,.26280454451024665,.23319376459199048,.23319376459199048,.18629021092773426,.18629021092773426,.1255803694649046,.1255803694649046,.05566856711617366,.05566856711617366],[.24914704581340277,.24914704581340277,.2334925365383548,.2334925365383548,.20316742672306592,.20316742672306592,.16007832854334622,.16007832854334622,.10693932599531843,.10693932599531843,.04717533638651183,.04717533638651183],[.2325515532308739,.22628318026289723,.22628318026289723,.2078160475368885,.2078160475368885,.17814598076194574,.17814598076194574,.13887351021978725,.13887351021978725,.09212149983772845,.09212149983772845,.04048400476531588,.04048400476531588],[.2152638534631578,.2152638534631578,.2051984637212956,.2051984637212956,.18553839747793782,.18553839747793782,.15720316715819355,.15720316715819355,.12151857068790319,.12151857068790319,.08015808715976021,.08015808715976021,.03511946033175186,.03511946033175186],[.2025782419255613,.19843148532711158,.19843148532711158,.1861610000155622,.1861610000155622,.16626920581699392,.16626920581699392,.13957067792615432,.13957067792615432,.10715922046717194,.10715922046717194,.07036604748810812,.07036604748810812,.03075324199611727,.03075324199611727],[.1894506104550685,.1894506104550685,.18260341504492358,.18260341504492358,.16915651939500254,.16915651939500254,.14959598881657674,.14959598881657674,.12462897125553388,.12462897125553388,.09515851168249279,.09515851168249279,.062253523938647894,.062253523938647894,.027152459411754096,.027152459411754096],[.17944647035620653,.17656270536699264,.17656270536699264,.16800410215645004,.16800410215645004,.15404576107681028,.15404576107681028,.13513636846852548,.13513636846852548,.11188384719340397,.11188384719340397,.08503614831717918,.08503614831717918,.0554595293739872,.0554595293739872,.02414830286854793,.02414830286854793],[.1691423829631436,.1691423829631436,.16427648374583273,.16427648374583273,.15468467512626524,.15468467512626524,.14064291467065065,.14064291467065065,.12255520671147846,.12255520671147846,.10094204410628717,.10094204410628717,.07642573025488905,.07642573025488905,.0497145488949698,.0497145488949698,.02161601352648331,.02161601352648331],[.1610544498487837,.15896884339395434,.15896884339395434,.15276604206585967,.15276604206585967,.1426067021736066,.1426067021736066,.12875396253933621,.12875396253933621,.11156664554733399,.11156664554733399,.09149002162245,.09149002162245,.06904454273764123,.06904454273764123,.0448142267656996,.0448142267656996,.019461788229726478,.019461788229726478],[.15275338713072584,.15275338713072584,.14917298647260374,.14917298647260374,.14209610931838204,.14209610931838204,.13168863844917664,.13168863844917664,.11819453196151841,.11819453196151841,.10193011981724044,.10193011981724044,.08327674157670475,.08327674157670475,.06267204833410907,.06267204833410907,.04060142980038694,.04060142980038694,.017614007139152118,.017614007139152118],[.14608113364969041,.14452440398997005,.14452440398997005,.13988739479107315,.13988739479107315,.13226893863333747,.13226893863333747,.12183141605372853,.12183141605372853,.10879729916714838,.10879729916714838,.09344442345603386,.09344442345603386,.0761001136283793,.0761001136283793,.057134425426857205,.057134425426857205,.036953789770852494,.036953789770852494,.016017228257774335,.016017228257774335],[.13925187285563198,.13925187285563198,.13654149834601517,.13654149834601517,.13117350478706238,.13117350478706238,.12325237681051242,.12325237681051242,.11293229608053922,.11293229608053922,.10041414444288096,.10041414444288096,.08594160621706773,.08594160621706773,.06979646842452049,.06979646842452049,.052293335152683286,.052293335152683286,.03377490158481415,.03377490158481415,.0146279952982722,.0146279952982722],[.13365457218610619,.1324620394046966,.1324620394046966,.12890572218808216,.12890572218808216,.12304908430672953,.12304908430672953,.11499664022241136,.11499664022241136,.10489209146454141,.10489209146454141,.09291576606003515,.09291576606003515,.07928141177671895,.07928141177671895,.06423242140852585,.06423242140852585,.04803767173108467,.04803767173108467,.030988005856979445,.030988005856979445,.013411859487141771,.013411859487141771],[.12793819534675216,.12793819534675216,.1258374563468283,.1258374563468283,.12167047292780339,.12167047292780339,.1155056680537256,.1155056680537256,.10744427011596563,.10744427011596563,.09761865210411388,.09761865210411388,.08619016153195327,.08619016153195327,.0733464814110803,.0733464814110803,.05929858491543678,.05929858491543678,.04427743881741981,.04427743881741981,.028531388628933663,.028531388628933663,.0123412297999872,.0123412297999872]],_e.binomialCoefficients=[[1],[1,1],[1,2,1],[1,3,3,1]],function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.t2length=e.quadraticDerivative=e.getQuadraticArcLength=e.cubicDerivative=e.quadraticPoint=e.getCubicArcLength=e.cubicPoint=void 0;const t=_e,r=(y,s,h)=>{const g=(1-h)*(1-h)*(1-h)*y[0]+3*(1-h)*(1-h)*h*y[1]+3*(1-h)*h*h*y[2]+h*h*h*y[3],P=(1-h)*(1-h)*(1-h)*s[0]+3*(1-h)*(1-h)*h*s[1]+3*(1-h)*h*h*s[2]+h*h*h*s[3];return{x:g,y:P}};e.cubicPoint=r;const n=(y,s,h)=>{const g=h.length-1;let P;if(g===0)return 0;if(y===0){P=0;for(let v=0;v<=g;v++)P+=t.binomialCoefficients[g][v]*(1-s)**(g-v)*s**v*h[v];return P}const x=new Array(g);for(let v=0;v<g;v++)x[v]=g*(h[v+1]-h[v]);return n(y-1,s,x)};function i(y,s,h){const g=n(1,h,y),P=n(1,h,s),x=g*g+P*P;return Math.sqrt(x)}const o=({sx:y,sy:s,t:h})=>{let g;const x=h/2;let v=0;for(let l=0;l<20;l++)g=x*t.tValues[20][l]+x,v+=t.cValues[20][l]*i(y,s,g);return x*v};e.getCubicArcLength=o;const c=(y,s,h)=>{const g=(1-h)*(1-h)*y[0]+2*(1-h)*h*y[1]+h*h*y[2],P=(1-h)*(1-h)*s[0]+2*(1-h)*h*s[1]+h*h*s[2];return{x:g,y:P}};e.quadraticPoint=c;const a=(y,s,h)=>(0,e.quadraticPoint)([3*(y[1]-y[0]),3*(y[2]-y[1]),3*(y[3]-y[2])],[3*(s[1]-s[0]),3*(s[2]-s[1]),3*(s[3]-s[2])],h);e.cubicDerivative=a;const u=(y,s,h)=>{h===void 0&&(h=1);const g=y[0]-2*y[1]+y[2],P=s[0]-2*s[1]+s[2],x=2*y[1]-2*y[0],v=2*s[1]-2*s[0],l=4*(g*g+P*P),w=4*(g*x+P*v),E=x*x+v*v;if(l===0)return h*Math.sqrt((y[2]-y[0])**2+(s[2]-s[0])**2);const _=w/(2*l),$=E/l,S=h+_,T=$-_*_,k=S*S+T>0?Math.sqrt(S*S+T):0,C=_*_+T>0?Math.sqrt(_*_+T):0,F=_+Math.sqrt(_*_+T)===0?0:T*Math.log(Math.abs((S+k)/(_+C)));return Math.sqrt(l)/2*(S*k-_*C+F)};e.getQuadraticArcLength=u;const d=(y,s,h)=>({x:(1-h)*2*(y[1]-y[0])+h*2*(y[2]-y[1]),y:(1-h)*2*(s[1]-s[0])+h*2*(s[2]-s[1])});e.quadraticDerivative=d;const p=({length:y,totalLength:s,func:h})=>{let g=1,P=y/s,x=(y-h(P))/s,v=0;for(;g>.001;){const l=h(P+x),w=Math.abs(y-l)/s;if(w<g)g=w,P+=x;else{const E=h(P-x),_=Math.abs(y-E)/s;_<g?(g=_,P-=x):x/=2}if(v++,v>500)break}return P};e.t2length=p}(ho),Object.defineProperty(Ce,"__esModule",{value:!0}),Ce.makeCubic=Ce.makeQuadratic=void 0;const ae=ho,os=({startX:e,startY:t,cpx:r,cpy:n,x:i,y:o})=>{const c={x:e,y:t},a={x:r,y:n},u={x:i,y:o},d=(0,ae.getQuadraticArcLength)([c.x,a.x,u.x,0],[c.y,a.y,u.y,0],1);return{getPointAtLength:g=>{const P=[c.x,a.x,u.x,0],x=[c.y,a.y,u.y,0],v=(0,ae.t2length)({length:g,totalLength:d,func:l=>(0,ae.getQuadraticArcLength)(P,x,l)});return(0,ae.quadraticPoint)(P,x,v)},getTangentAtLength:g=>{const P=[c.x,a.x,u.x,0],x=[c.y,a.y,u.y,0],v=(0,ae.t2length)({length:g,totalLength:d,func:_=>(0,ae.getQuadraticArcLength)(P,x,_)}),l=(0,ae.quadraticDerivative)(P,x,v),w=Math.sqrt(l.x*l.x+l.y*l.y);let E;return w>0?E={x:l.x/w,y:l.y/w}:E={x:0,y:0},E},getTotalLength:()=>d,getC:()=>u,type:"quadratic-bezier",getD:()=>({x:0,y:0})}};Ce.makeQuadratic=os;const is=({startX:e,startY:t,cp1x:r,cp1y:n,cp2x:i,cp2y:o,x:c,y:a})=>{const u={x:e,y:t},d={x:r,y:n},p={x:i,y:o},y={x:c,y:a},s=(0,ae.getCubicArcLength)({sx:[u.x,d.x,p.x,y.x],sy:[u.y,d.y,p.y,y.y],t:1});return{getPointAtLength:l=>{const w=[u.x,d.x,p.x,y.x],E=[u.y,d.y,p.y,y.y],_=(0,ae.t2length)({length:l,totalLength:s,func:$=>(0,ae.getCubicArcLength)({sx:w,sy:E,t:$})});return(0,ae.cubicPoint)(w,E,_)},getTangentAtLength:l=>{const w=[u.x,d.x,p.x,y.x],E=[u.y,d.y,p.y,y.y],_=(0,ae.t2length)({length:l,totalLength:s,func:k=>(0,ae.getCubicArcLength)({sx:w,sy:E,t:k})}),$=(0,ae.cubicDerivative)(w,E,_),S=Math.sqrt($.x*$.x+$.y*$.y);let T;return S>0?T={x:$.x/S,y:$.y/S}:T={x:0,y:0},T},getTotalLength:()=>s,getC:()=>p,getD:()=>y,type:"cubic-bezier"}};Ce.makeCubic=is;var it={};Object.defineProperty(it,"__esModule",{value:!0}),it.makeLinearPosition=void 0;const as=({x0:e,x1:t,y0:r,y1:n})=>({getTotalLength:()=>Math.sqrt((e-t)**2+(r-n)**2),getPointAtLength:i=>{let o=i/Math.sqrt((e-t)**2+(r-n)**2);o=Number.isNaN(o)?1:o;const c=(t-e)*o,a=(n-r)*o;return{x:e+c,y:r+a}},getTangentAtLength:()=>{const i=Math.sqrt((t-e)*(t-e)+(n-r)*(n-r));return{x:(t-e)/i,y:(n-r)/i}},type:"linear"});it.makeLinearPosition=as,Object.defineProperty(kt,"__esModule",{value:!0}),kt.conductAnalysis=void 0;const ss=Ce,mo=it,us=e=>{let t={x:0,y:0},r={x:0,y:0};const n=[];for(let i=0;i<e.length;i++){const o=e[i];if(o.type==="M"&&(t={x:o.x,y:o.y},r={x:t.x,y:t.y},n.push({startPoint:{x:o.x,y:o.y},instructionsAndInfo:[{instruction:o,function:null,length:0,startPoint:t}]})),o.type==="L"){if(n.length>0){const c=Math.sqrt((t.x-o.x)**2+(t.y-o.y)**2);n[n.length-1].instructionsAndInfo.push({instruction:o,length:c,function:(0,mo.makeLinearPosition)({x0:t.x,x1:o.x,y0:t.y,y1:o.y}),startPoint:t})}t={x:o.x,y:o.y}}if(o.type==="Z"){if(n.length>0){const c=Math.sqrt((n[n.length-1].startPoint.x-t.x)**2+(n[n.length-1].startPoint.y-t.y)**2);n[n.length-1].instructionsAndInfo.push({instruction:o,function:(0,mo.makeLinearPosition)({x0:t.x,x1:r.x,y0:t.y,y1:r.y}),length:c,startPoint:{...t}})}t={x:r.x,y:r.y}}if(o.type==="C"){const c=(0,ss.makeCubic)({startX:t.x,startY:t.y,cp1x:o.cp1x,cp1y:o.cp1y,cp2x:o.cp2x,cp2y:o.cp2y,x:o.x,y:o.y}),a=c.getTotalLength();n.length>0&&n[n.length-1].instructionsAndInfo.push({instruction:o,length:a,function:c,startPoint:{...t}}),t={x:o.x,y:o.y}}}return n};kt.conductAnalysis=us;var oe={};Object.defineProperty(oe,"__esModule",{value:!0}),oe.parsePath=void 0;const go={a:7,A:7,C:6,c:6,H:1,h:1,L:2,l:2,M:2,m:2,Q:4,q:4,S:4,s:4,T:2,t:2,V:1,v:1,Z:0,z:0},cs=(e,t)=>{const r=[],n=go[t];if(e.length%n!==0)throw new Error(`Expected number of arguments of SVG instruction "${t} ${e.join(" ")}" to be a multiple of ${n}`);for(let i=0;i<e.length;i+=n)r.push(e.slice(i,i+n));return r},X=(e,t,r)=>cs(e,t).map(n=>r(n)),ls=/([astvzqmhlc])([^astvzqmhlc]*)/gi,ds=/-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/gi,fs=(e,t)=>{const r=e.match(ds);if(!r){if(t==="Z"||t==="z")return[];throw new Error(`Malformed path data: ${t} was expected to have numbers afterwards`)}const n=go[t];if(r.length%n!==0)throw new Error(`Malformed path data: ${t} was expected to have a multiple of ${n} numbers, but got "${t} ${r.join(" ")} instead"`);return r.map(Number)},ps=e=>{if(!e)throw new Error("No path provided");const t=e.match(ls);if(!t)throw new Error(`No path elements found in string ${e}`);return t.map(r=>{const n=r.charAt(0),i=fs(r.substring(1),n);if(n==="M"&&i.length>2){const o=[];return o.push({type:n,x:i[0],y:i[1]}),o.push(...X(i.slice(2),"L",c=>({type:"L",x:c[0],y:c[1]}))),o}if(n==="m"&&i.length>2){const o=[];return o.push({type:n,dx:i[0],dy:i[1]}),o.push(...X(i.slice(2),"l",c=>({type:"l",dx:c[0],dy:c[1]}))),o}if(n==="Z"||n==="z")return[{type:"Z"}];if(n==="A")return X(i,n,o=>({type:n,rx:o[0],ry:o[1],xAxisRotation:o[2],largeArcFlag:o[3]===1,sweepFlag:o[4]===1,x:o[5],y:o[6]}));if(n==="a")return X(i,n,o=>({type:n,rx:o[0],ry:o[1],xAxisRotation:o[2],largeArcFlag:o[3]===1,sweepFlag:o[4]===1,dx:o[5],dy:o[6]}));if(n==="C")return X(i,n,o=>({type:n,cp1x:o[0],cp1y:o[1],cp2x:o[2],cp2y:o[3],x:o[4],y:o[5]}));if(n==="c")return X(i,n,o=>({type:n,cp1dx:o[0],cp1dy:o[1],cp2dx:o[2],cp2dy:o[3],dx:o[4],dy:o[5]}));if(n==="S")return X(i,n,o=>({type:n,cpx:o[0],cpy:o[1],x:o[2],y:o[3]}));if(n==="s")return X(i,n,o=>({type:n,cpdx:o[0],cpdy:o[1],dx:o[2],dy:o[3]}));if(n==="H")return X(i,n,o=>({type:n,x:o[0]}));if(n==="h")return X(i,n,o=>({type:n,dx:o[0]}));if(n==="V")return X(i,n,o=>({type:n,y:o[0]}));if(n==="v")return X(i,n,o=>({type:n,dy:o[0]}));if(n==="L")return X(i,n,o=>({type:n,x:o[0],y:o[1]}));if(n==="M")return X(i,n,o=>({type:n,x:o[0],y:o[1]}));if(n==="m")return X(i,n,o=>({type:n,dx:o[0],dy:o[1]}));if(n==="l")return X(i,n,o=>({type:n,dx:o[0],dy:o[1]}));if(n==="Q")return X(i,n,o=>({type:n,cpx:o[0],cpy:o[1],x:o[2],y:o[3]}));if(n==="q")return X(i,n,o=>({type:n,cpdx:o[0],cpdy:o[1],dx:o[2],dy:o[3]}));if(n==="T")return X(i,n,o=>({type:n,x:o[0],y:o[1]}));if(n==="t")return X(i,n,o=>({type:n,dx:o[0],dy:o[1]}));throw new Error(`Invalid path element ${r}`)},[]).flat(1)};oe.parsePath=ps;var xe={},at={},We={};Object.defineProperty(We,"__esModule",{value:!0}),We.convertQToCInstruction=void 0;const ys=(e,t)=>{const r=t.x+.6666666666666666*(e.cpx-t.x),n=t.y+2/3*(e.cpy-t.y),i=e.x+2/3*(e.cpx-e.x),o=e.y+2/3*(e.cpy-e.y);return{type:"C",cp1x:r,cp1y:n,cp2x:i,cp2y:o,x:e.x,y:e.y}};We.convertQToCInstruction=ys;var jt={};Object.defineProperty(jt,"__esModule",{value:!0}),jt.iterateOverSegments=void 0;const hs=({segments:e,iterate:t})=>{let r=0,n=0,i=0,o=0,c=null,a=null;return e.map((d,p)=>{var y;const s=t({segment:d,x:r,y:n,prevSegment:(y=e[p-1])!==null&&y!==void 0?y:null,initialX:i,initialY:o,cpX:c,cpY:a});switch(d.type){case"M":i=d.x,o=d.y,r=d.x,n=d.y,c=null,a=null;break;case"Q":r=d.x,n=d.y,c=d.cpx,a=d.cpy;break;case"A":r=d.x,n=d.y,c=null,a=null;break;case"C":r=d.x,n=d.y,c=d.cp2x,a=d.cp2y;break;case"S":r=d.x,n=d.y,c=d.cpx,a=d.cpy;break;case"T":c!==null&&a!==null&&(c=r-(c-r),a=n-(a-n)),r=d.x,n=d.y;break;case"L":r=d.x,n=d.y,c=null,a=null;break;case"V":n=d.y,c=null,a=null;break;case"H":r=d.x,c=null,a=null;break;case"Z":r=i,n=o,c=null,a=null;break;default:throw new Error(`Unexpected instruction ${d.type}`)}return s}).flat(1)};jt.iterateOverSegments=hs,Object.defineProperty(at,"__esModule",{value:!0}),at.removeATSHVQInstructions=void 0;const vo=We,ms=jt,st=Math.PI*2;function gs(e,t){const r=1.3333333333333333*Math.tan(t/4),n=Math.cos(e),i=Math.sin(e),o=Math.cos(e+t),c=Math.sin(e+t);return[n,i,n-i*r,i+n*r,o+c*r,c-o*r,o,c]}function xo(e,t,r,n){const i=e*n-t*r<0?-1:1;let o=e*r+t*n;return o>1&&(o=1),o<-1&&(o=-1),i*Math.acos(o)}function vs({x1:e,y1:t,x2:r,y2:n,largeArcFlag:i,sweepFlag:o,rx:c,ry:a,sin_phi:u,cos_phi:d}){const p=d*(e-r)/2+u*(t-n)/2,y=-u*(e-r)/2+d*(t-n)/2,s=c*c,h=a*a,g=p*p,P=y*y;let x=s*h-s*P-h*g;x<0&&(x=0),x/=s*P+h*g,x=Math.sqrt(x)*(i===o?-1:1);const v=x*c/a*y,l=x*-a/c*p,w=d*v-u*l+(e+r)/2,E=u*v+d*l+(t+n)/2,_=(p-v)/c,$=(y-l)/a,S=(-p-v)/c,T=(-y-l)/a,k=xo(1,0,_,$);let C=xo(_,$,S,T);return o===!1&&C>0&&(C-=st),o===!0&&C<0&&(C+=st),[w,E,k,C]}function xs({x1:e,y1:t,x2:r,y2:n,largeArcFlag:i,sweepFlag:o,rx:c,ry:a,phi:u}){const d=Math.sin(u*st/360),p=Math.cos(u*st/360),y=p*(e-r)/2+d*(t-n)/2,s=-d*(e-r)/2+p*(t-n)/2;if(y===0&&s===0)return[];if(c===0||a===0)return[];c=Math.abs(c),a=Math.abs(a);const h=y*y/(c*c)+s*s/(a*a);h>1&&(c*=Math.sqrt(h),a*=Math.sqrt(h));const g=vs({x1:e,y1:t,x2:r,y2:n,largeArcFlag:i,sweepFlag:o,rx:c,ry:a,sin_phi:d,cos_phi:p}),P=[];let x=g[2],v=g[3];const l=Math.max(Math.ceil(Math.abs(v)/(st/4)),1);v/=l;for(let w=0;w<l;w++)P.push(gs(x,v)),x+=v;return P.map(w=>{for(let E=0;E<w.length;E+=2){let _=w[E+0],$=w[E+1];_*=c,$*=a;const S=p*_-d*$,T=d*_+p*$;w[E+0]=S+g[0],w[E+1]=T+g[1]}return w})}const ws=e=>(0,ms.iterateOverSegments)({segments:e,iterate:({segment:t,prevSegment:r,x:n,y:i,cpX:o,cpY:c})=>{if(t.type==="H")return[{type:"L",x:t.x,y:i}];if(t.type==="V")return[{type:"L",x:n,y:t.y}];if(t.type==="A"){const a=t.x,u=t.y,d=xs({x1:n,y1:i,x2:a,y2:u,largeArcFlag:t.largeArcFlag,sweepFlag:t.sweepFlag,rx:t.rx,ry:t.ry,phi:t.xAxisRotation});return d.length===0?[{type:"L",x:t.x,y:t.y}]:d.map(y=>({type:"C",cp1x:y[2],cp1y:y[3],cp2x:y[4],cp2y:y[5],x:y[6],y:y[7]}))}if(t.type==="T"){let a=0,u=0;r&&(r.type==="Q"||r.type==="T")?(a=o,u=c):(a=n,u=i);const d=a-n,p=u-i,y=n-d,s=i-p;return[(0,vo.convertQToCInstruction)({type:"Q",cpx:y,cpy:s,x:t.x,y:t.y},{x:n,y:i})]}if(t.type==="S"){let a=0,u=0;r&&r.type==="C"?(a=r.cp2x,u=r.cp2y):r&&r.type==="S"?(a=r.cpx,u=r.cpy):(a=n,u=i);const d=a-n,p=u-i,y=n-d,s=i-p;return[{type:"C",cp1x:y,cp1y:s,cp2x:t.cpx,cp2y:t.cpy,x:t.x,y:t.y}]}return t.type==="Q"?[(0,vo.convertQToCInstruction)(t,{x:n,y:i})]:[t]}});at.removeATSHVQInstructions=ws;var Ue={},ce={};Object.defineProperty(ce,"__esModule",{value:!0}),ce.serializeInstructions=void 0;const bs=e=>{if(e.type==="A")return`A ${e.rx} ${e.ry} ${e.xAxisRotation} ${Number(e.largeArcFlag)} ${Number(e.sweepFlag)} ${e.x} ${e.y}`;if(e.type==="a")return`a ${e.rx} ${e.ry} ${e.xAxisRotation} ${Number(e.largeArcFlag)} ${Number(e.sweepFlag)} ${e.dx} ${e.dy}`;if(e.type==="C")return`C ${e.cp1x} ${e.cp1y} ${e.cp2x} ${e.cp2y} ${e.x} ${e.y}`;if(e.type==="c")return`c ${e.cp1dx} ${e.cp1dy} ${e.cp2dx} ${e.cp2dy} ${e.dx} ${e.dy}`;if(e.type==="S")return`S ${e.cpx} ${e.cpy} ${e.x} ${e.y}`;if(e.type==="s")return`s ${e.cpdx} ${e.cpdy} ${e.dx} ${e.dy}`;if(e.type==="Q")return`Q ${e.cpx} ${e.cpy} ${e.x} ${e.y}`;if(e.type==="q")return`q ${e.cpdx} ${e.cpdy} ${e.dx} ${e.dy}`;if(e.type==="Z")return"Z";if(e.type==="H")return`H ${e.x}`;if(e.type==="h")return`h ${e.dx}`;if(e.type==="V")return`V ${e.y}`;if(e.type==="v")return`v ${e.dy}`;if(e.type==="L")return`L ${e.x} ${e.y}`;if(e.type==="l")return`l ${e.dx} ${e.dy}`;if(e.type==="M")return`M ${e.x} ${e.y}`;if(e.type==="m")return`m ${e.dx} ${e.dy}`;if(e.type==="T")return`T ${e.x} ${e.y}`;if(e.type==="t")return`t ${e.dx} ${e.dy}`;throw new Error(`Unknown instruction type: ${e.type}`)},_s=e=>e.map(t=>bs(t)).join(" ");ce.serializeInstructions=_s,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.normalizePath=e.normalizeInstructions=void 0;const t=oe,r=ce,n=o=>{const c=[];let a=0,u=0,d=0,p=0;for(let y=0;y<o.length;y++){const s=o[y];if(s.type==="M"?(d=s.x,p=s.y):s.type==="m"&&(d+=s.dx,p+=s.dy),s.type==="A"||s.type==="C"||s.type==="L"||s.type==="M"||s.type==="Q"||s.type==="S"||s.type==="T"){c.push(s),a=s.x,u=s.y;continue}if(s.type==="a"||s.type==="c"||s.type==="l"||s.type==="m"||s.type==="q"||s.type==="s"||s.type==="t"){const h=a,g=u;if(a+=s.dx,u+=s.dy,s.type==="a"){c.push({type:"A",largeArcFlag:s.largeArcFlag,rx:s.rx,ry:s.ry,sweepFlag:s.sweepFlag,xAxisRotation:s.xAxisRotation,x:a,y:u});continue}if(s.type==="c"){c.push({type:"C",cp1x:s.cp1dx+h,cp1y:s.cp1dy+g,cp2x:s.cp2dx+h,cp2y:s.cp2dy+g,x:a,y:u});continue}if(s.type==="l"){c.push({type:"L",x:a,y:u});continue}if(s.type==="m"){c.push({type:"M",x:a,y:u});continue}if(s.type==="q"){c.push({type:"Q",cpx:s.cpdx+h,cpy:s.cpdy+g,x:a,y:u});continue}if(s.type==="s"){c.push({type:"S",cpx:s.cpdx+h,cpy:s.cpdy+g,x:a,y:u});continue}if(s.type==="t"){c.push({type:"T",x:a,y:u});continue}}if(s.type==="H"){c.push(s),a=s.x;continue}if(s.type==="V"){c.push(s),u=s.y;continue}if(s.type==="Z"){c.push(s),a=d,u=p;continue}if(s.type==="h"){a+=s.dx,c.push({type:"H",x:a});continue}if(s.type==="v"){u+=s.dy,c.push({type:"V",y:u});continue}throw new Error("Unknown instruction type: "+s.type)}return c};e.normalizeInstructions=n;const i=o=>{const c=(0,t.parsePath)(o),a=(0,e.normalizeInstructions)(c);return(0,r.serializeInstructions)(a)};e.normalizePath=i}(Ue),Object.defineProperty(xe,"__esModule",{value:!0}),xe.reduceInstructions=void 0;const Ps=at,Es=Ue,Cs=e=>{const t=(0,Es.normalizeInstructions)(e);return(0,Ps.removeATSHVQInstructions)(t)};xe.reduceInstructions=Cs,Object.defineProperty(Ft,"__esModule",{value:!0}),Ft.cutPath=void 0;const Ms=ot,$s=kt,Ts=oe,Ss=xe,Dr=ce,Is=(e,t)=>{const r=(0,Ts.parsePath)(e),n=(0,Ss.reduceInstructions)(r),i=(0,$s.conductAnalysis)(n),o=[];let c=0;for(const a of i)for(const u of a.instructionsAndInfo){if(c+u.length>t){const p=(t-c)/u.length,y=(0,Ms.cutInstruction)({instruction:u.instruction,lastPoint:u.startPoint,progress:p});return o.push(y),(0,Dr.serializeInstructions)(o)}if(c+=u.length,o.push(u.instruction),c===t)return(0,Dr.serializeInstructions)(o)}return(0,Dr.serializeInstructions)(o)};Ft.cutPath=Is;var Lt={};Object.defineProperty(Lt,"__esModule",{value:!0}),Lt.debugPath=void 0;const Fs=Ue,ks=oe,js=ce,Ls=e=>{const t=(0,Fs.normalizeInstructions)((0,ks.parsePath)(e));return t.map((r,n)=>{if(r.type==="Z"||r.type==="H"||r.type==="V")return null;const i=[r.x-5,r.y-5],o=[r.x+5,r.y-5],c=[r.x-5,r.y+5],a=[r.x+5,r.y+5],u=[{type:"M",x:i[0],y:i[1]},{type:"L",x:o[0],y:o[1]},{type:"L",x:a[0],y:a[1]},{type:"L",x:c[0],y:c[1]},{type:"Z"}];return{d:(0,js.serializeInstructions)(u),color:n===t.length-1?"red":r.type==="M"?"blue":"green"}}).filter(Boolean)};Lt.debugPath=Ls;var Re={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getBoundingBox=e.getBoundingBoxFromInstructions=void 0;const t=at,r=Ue,n=oe,i=1e-8;function o(d){const p=Math.min(d[0],d[2]),y=Math.max(d[0],d[2]);if(d[1]>d[0]?d[2]>=d[1]:d[2]<=d[1])return[p,y];const s=(d[0]*d[2]-d[1]*d[1])/(d[0]-2*d[1]+d[2]);return s<p?[s,y]:[p,s]}function c(d){const p=d[0]-3*d[1]+3*d[2]-d[3];if(Math.abs(p)<i)return d[0]===d[3]&&d[0]===d[1]?[d[0],d[3]]:o([d[0],-.5*d[0]+1.5*d[1],d[0]-3*d[1]+3*d[2]]);const y=-d[0]*d[2]+d[0]*d[3]-d[1]*d[2]-d[1]*d[3]+d[1]*d[1]+d[2]*d[2];if(y<=0)return[Math.min(d[0],d[3]),Math.max(d[0],d[3])];const s=Math.sqrt(y);let h=Math.min(d[0],d[3]),g=Math.max(d[0],d[3]);const P=d[0]-2*d[1]+d[2];for(let x=(P+s)/p,v=1;v<=2;x=(P-s)/p,v++)if(x>0&&x<1){const l=d[0]*(1-x)*(1-x)*(1-x)+d[1]*3*(1-x)*(1-x)*x+d[2]*3*(1-x)*x*x+d[3]*x*x*x;l<h&&(h=l),l>g&&(g=l)}return[h,g]}const a=d=>{let p=1/0,y=1/0,s=-1/0,h=-1/0,g=0,P=0,x=0,v=0;for(const l of d)switch(l.type){case"M":{x=l.x,v=l.y,p>l.x&&(p=l.x),y>l.y&&(y=l.y),s<l.x&&(s=l.x),h<l.y&&(h=l.y),g=l.x,P=l.y;break}case"L":{p>l.x&&(p=l.x),y>l.y&&(y=l.y),s<l.x&&(s=l.x),h<l.y&&(h=l.y),g=l.x,P=l.y;break}case"C":{const w=c([g,l.cp1x,l.cp2x,l.x]);p>w[0]&&(p=w[0]),s<w[1]&&(s=w[1]);const E=c([P,l.cp1y,l.cp2y,l.y]);y>E[0]&&(y=E[0]),h<E[1]&&(h=E[1]),g=l.x,P=l.y;break}case"Z":g=x,P=v;break;default:throw new Error(`Unknown instruction ${l.type}`)}return{x1:p,y1:y,x2:s,y2:h,viewBox:`${p} ${y} ${s-p} ${h-y}`,width:s-p,height:h-y}};e.getBoundingBoxFromInstructions=a;const u=d=>{const p=(0,n.parsePath)(d),y=(0,t.removeATSHVQInstructions)((0,r.normalizeInstructions)(p));return(0,e.getBoundingBoxFromInstructions)(y)};e.getBoundingBox=u})(Re);var At={},ut={},Me={},Vt={};Object.defineProperty(Vt,"__esModule",{value:!0}),Vt.makeArc=void 0;const As=(e,t)=>(e%t+t)%t,Vs=e=>e*(Math.PI/180),wo=(e,t)=>Math.sqrt((t.x-e.x)**2+(t.y-e.y)**2),Os=(e,t,r)=>Math.min(Math.max(e,t),r),bo=(e,t)=>{const r=e.x*t.x+e.y*t.y,n=Math.sqrt((e.x**2+e.y**2)*(t.x**2+t.y**2));return(e.x*t.y-e.y*t.x<0?-1:1)*Math.acos(r/n)},_o=({p0:e,rx:t,ry:r,xAxisRotation:n,largeArcFlag:i,sweepFlag:o,p1:c,t:a})=>{t=Math.abs(t),r=Math.abs(r),n=As(n,360);const u=Vs(n);if(e.x===c.x&&e.y===c.y)return{x:e.x,y:e.y,ellipticalArcAngle:0};if(t===0||r===0)return{x:0,y:0,ellipticalArcAngle:0};const d=(e.x-c.x)/2,p=(e.y-c.y)/2,y={x:Math.cos(u)*d+Math.sin(u)*p,y:-Math.sin(u)*d+Math.cos(u)*p},s=y.x**2/t**2+y.y**2/r**2;s>1&&(t*=Math.sqrt(s),r*=Math.sqrt(s));const h=t**2*r**2-t**2*y.y**2-r**2*y.x**2,g=t**2*y.y**2+r**2*y.x**2;let P=h/g;P=P<0?0:P;const x=(i===o?-1:1)*Math.sqrt(P),v={x:x*(t*y.y/r),y:x*(-(r*y.x)/t)},l={x:Math.cos(u)*v.x-Math.sin(u)*v.y+(e.x+c.x)/2,y:Math.sin(u)*v.x+Math.cos(u)*v.y+(e.y+c.y)/2},w={x:(y.x-v.x)/t,y:(y.y-v.y)/r},E=bo({x:1,y:0},w),_={x:(-y.x-v.x)/t,y:(-y.y-v.y)/r};let $=bo(w,_);!o&&$>0?$-=2*Math.PI:o&&$<0&&($+=2*Math.PI),$%=2*Math.PI;const S=E+$*a,T=t*Math.cos(S),k=r*Math.sin(S);return{x:Math.cos(u)*T-Math.sin(u)*k+l.x,y:Math.sin(u)*T+Math.cos(u)*k+l.y,ellipticalArcStartAngle:E,ellipticalArcEndAngle:E+$,ellipticalArcAngle:S,ellipticalArcCenter:l,resultantRx:t,resultantRy:r}},Ns=(e,t)=>{e=e||500;let r=0;const n=[],i=[];let o=t(0),c;for(let a=0;a<e;a++){const u=Os(a*(1/e),0,1);c=t(u),r+=wo(o,c),i.push([o,c]),n.push({t:u,arcLength:r}),o=c}return c=t(1),i.push([o,c]),r+=wo(o,c),n.push({t:1,arcLength:r}),{arcLength:r,arcLengthMap:n,approximationLines:i}},Ds=({x0:e,y0:t,rx:r,ry:n,xAxisRotate:i,LargeArcFlag:o,SweepFlag:c,x1:a,y1:u})=>{const p=Ns(300,s=>_o({p0:{x:e,y:t},rx:r,ry:n,xAxisRotation:i,largeArcFlag:o,sweepFlag:c,p1:{x:a,y:u},t:s})).arcLength,y=s=>{s<0?s=0:s>p&&(s=p);const h=_o({p0:{x:e,y:t},rx:r,ry:n,xAxisRotation:i,largeArcFlag:o,sweepFlag:c,p1:{x:a,y:u},t:s/p});return{x:h.x,y:h.y}};return{getPointAtLength:y,getTangentAtLength:s=>{s<0?s=0:s>p&&(s=p);const h=.05,g=y(s);let P;s<0?s=0:s>p&&(s=p),s<p-h?P=y(s+h):P=y(s-h);const x=P.x-g.x,v=P.y-g.y,l=Math.sqrt(x*x+v*v);return s<p-h?{x:-x/l,y:-v/l}:{x:x/l,y:v/l}},getTotalLength:()=>p,type:"arc"}};Vt.makeArc=Ds,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.construct=e.constructFromInstructions=void 0;const t=oe,r=Vt,n=Ce,i=it,o=a=>{let u=0;const d=[],p=[];let y=null,s=[0,0],h=[0,0],g,P=[0,0];const x=[];for(let v=0;v<a.length;v++){const l=a[v];if(l.type!=="m"&&l.type!=="M"&&x.length>0&&x[x.length-1].push(l),l.type==="M"&&(s=[l.x,l.y],P=[s[0],s[1]],x.push([l]),p.push(null),v===0&&(y={x:l.x,y:l.y})),l.type==="m"&&(s=[l.dx+s[0],l.dy+s[1]],P=[s[0],s[1]],x.push([{type:"M",x:s[0],y:s[1]}]),p.push(null)),l.type==="L"&&(u+=Math.sqrt((s[0]-l.x)**2+(s[1]-l.y)**2),p.push((0,i.makeLinearPosition)({x0:s[0],x1:l.x,y0:s[1],y1:l.y})),s=[l.x,l.y]),l.type==="l"&&(u+=Math.sqrt(l.dx**2+l.dy**2),p.push((0,i.makeLinearPosition)({x0:s[0],x1:l.dx+s[0],y0:s[1],y1:l.dy+s[1]})),s=[l.dx+s[0],l.dy+s[1]]),l.type==="H"&&(u+=Math.abs(s[0]-l.x),p.push((0,i.makeLinearPosition)({x0:s[0],x1:l.x,y0:s[1],y1:s[1]})),s[0]=l.x),l.type==="h"?(u+=Math.abs(l.dx),p.push((0,i.makeLinearPosition)({x0:s[0],x1:s[0]+l.dx,y0:s[1],y1:s[1]})),s[0]=l.dx+s[0]):l.type==="V"&&(u+=Math.abs(s[1]-l.y),p.push((0,i.makeLinearPosition)({x0:s[0],x1:s[0],y0:s[1],y1:l.y})),s[1]=l.y),l.type==="v"?(u+=Math.abs(l.dy),p.push((0,i.makeLinearPosition)({x0:s[0],x1:s[0],y0:s[1],y1:s[1]+l.dy})),s[1]=l.dy+s[1]):l.type==="Z"&&(u+=Math.sqrt((P[0]-s[0])**2+(P[1]-s[1])**2),p.push((0,i.makeLinearPosition)({x0:s[0],x1:P[0],y0:s[1],y1:P[1]})),s=[P[0],P[1]]),l.type==="C"?(g=(0,n.makeCubic)({startX:s[0],startY:s[1],cp1x:l.cp1x,cp1y:l.cp1y,cp2x:l.cp2x,cp2y:l.cp2y,x:l.x,y:l.y}),u+=g.getTotalLength(),s=[l.x,l.y],p.push(g)):l.type==="c"&&(g=(0,n.makeCubic)({startX:s[0],startY:s[1],cp1x:s[0]+l.cp1dx,cp1y:s[1]+l.cp1dy,cp2x:s[0]+l.cp2dx,cp2y:s[1]+l.cp2dy,x:s[0]+l.dx,y:s[1]+l.dy}),g.getTotalLength()>0?(u+=g.getTotalLength(),p.push(g),s=[l.dx+s[0],l.dy+s[1]]):p.push((0,i.makeLinearPosition)({x0:s[0],x1:s[0],y0:s[1],y1:s[1]}))),l.type==="S"){const w=a[v-1],E=w.type==="C"||w.type==="c"||w.type==="S"||w.type==="s";if(v>0&&E){if(g){const _=g.getC();g=(0,n.makeCubic)({startX:s[0],startY:s[1],cp1x:2*s[0]-_.x,cp1y:2*s[1]-_.y,cp2x:l.cpx,cp2y:l.cpy,x:l.x,y:l.y})}}else g=(0,n.makeCubic)({startX:s[0],startY:s[1],cp1x:s[0],cp1y:s[1],cp2x:l.cpx,cp2y:l.cpy,x:l.x,y:l.y});g&&(u+=g.getTotalLength(),s=[l.x,l.y],p.push(g))}if(l.type==="s"){const w=a[v-1],E=w.type==="C"||w.type==="c"||w.type==="S"||w.type==="s";if(v>0&&E){if(g){const _=g.getC(),$=g.getD();g=(0,n.makeCubic)({startX:s[0],startY:s[1],cp1x:s[0]+$.x-_.x,cp1y:s[1]+$.y-_.y,cp2x:s[0]+l.cpdx,cp2y:s[1]+l.cpdy,x:s[0]+l.dx,y:s[1]+l.dy})}}else g=(0,n.makeCubic)({startX:s[0],startY:s[1],cp1x:s[0],cp1y:s[1],cp2x:s[0]+l.cpdx,cp2y:s[1]+l.cpdy,x:s[0]+l.dx,y:s[1]+l.dy});g&&(u+=g.getTotalLength(),s=[l.dx+s[0],l.dy+s[1]],p.push(g))}if(l.type==="Q"){if(s[0]===l.cpx&&s[1]===l.cpy){const w=(0,i.makeLinearPosition)({x0:l.cpx,x1:l.x,y0:l.cpy,y1:l.y});u+=w.getTotalLength(),p.push(w)}else g=(0,n.makeQuadratic)({startX:s[0],startY:s[1],cpx:l.cpx,cpy:l.cpy,x:l.x,y:l.y}),u+=g.getTotalLength(),p.push(g);s=[l.x,l.y],h=[l.cpx,l.cpy]}if(l.type==="q"){if(l.cpdx===0&&l.cpdy===0){const w=(0,i.makeLinearPosition)({x0:s[0]+l.cpdx,x1:s[0]+l.cpdy,y0:s[1]+l.dx,y1:s[1]+l.dy});u+=w.getTotalLength(),p.push(w)}else g=(0,n.makeQuadratic)({startX:s[0],startY:s[1],cpx:s[0]+l.cpdx,cpy:s[1]+l.cpdy,x:s[0]+l.dx,y:s[1]+l.dy}),u+=g.getTotalLength(),p.push(g);h=[s[0]+l.cpdx,s[1]+l.cpdy],s=[l.dx+s[0],l.dy+s[1]]}if(l.type==="T"){const w=a[v-1],E=w.type==="Q"||w.type==="q"||w.type==="T"||w.type==="t";if(v>0&&E)g=(0,n.makeQuadratic)({startX:s[0],startY:s[1],cpx:2*s[0]-h[0],cpy:2*s[1]-h[1],x:l.x,y:l.y}),p.push(g),u+=g.getTotalLength();else{const _=(0,i.makeLinearPosition)({x0:s[0],x1:l.x,y0:s[1],y1:l.y});p.push(_),u+=_.getTotalLength()}h=[2*s[0]-h[0],2*s[1]-h[1]],s=[l.x,l.y]}if(l.type==="t"){const w=a[v-1],E=w.type==="Q"||w.type==="q"||w.type==="T"||w.type==="t";if(v>0&&E)g=(0,n.makeQuadratic)({startX:s[0],startY:s[1],cpx:2*s[0]-h[0],cpy:2*s[1]-h[1],x:s[0]+l.dx,y:s[1]+l.dy}),u+=g.getTotalLength(),p.push(g);else{const _=(0,i.makeLinearPosition)({x0:s[0],x1:s[0]+l.dx,y0:s[1],y1:s[1]+l.dy});u+=_.getTotalLength(),p.push(_)}h=[2*s[0]-h[0],2*s[1]-h[1]],s=[l.dx+s[0],l.dy+s[1]]}if(l.type==="A"){const w=(0,r.makeArc)({x0:s[0],y0:s[1],rx:l.rx,ry:l.ry,xAxisRotate:l.xAxisRotation,LargeArcFlag:l.largeArcFlag,SweepFlag:l.sweepFlag,x1:l.x,y1:l.y});u+=w.getTotalLength(),s=[l.x,l.y],p.push(w)}if(l.type==="a"){const w=(0,r.makeArc)({x0:s[0],y0:s[1],rx:l.rx,ry:l.ry,xAxisRotate:l.xAxisRotation,LargeArcFlag:l.largeArcFlag,SweepFlag:l.sweepFlag,x1:s[0]+l.dx,y1:s[1]+l.dy});u+=w.getTotalLength(),s=[s[0]+l.dx,s[1]+l.dy],p.push(w)}d.push(u)}return{segments:x,initialPoint:y,totalLength:u,partialLengths:d,functions:p}};e.constructFromInstructions=o;const c=a=>{const u=(0,t.parsePath)(a);return(0,e.constructFromInstructions)(u)};e.construct=c}(Me),Object.defineProperty(ut,"__esModule",{value:!0}),ut.getLength=void 0;const Bs=Me,zs=e=>(0,Bs.construct)(e).totalLength;ut.getLength=zs,Object.defineProperty(At,"__esModule",{value:!0}),At.evolvePath=void 0;const qs=ut,Ws=(e,t)=>{const r=(0,qs.getLength)(t);if(e===0){const o=r*1.5;return{strokeDasharray:`${o} ${o}`,strokeDashoffset:o}}const n=`${r} ${r}`,i=r-e*r;return{strokeDasharray:n,strokeDashoffset:i}};At.evolvePath=Ws;var Ot={};Object.defineProperty(Ot,"__esModule",{value:!0}),Ot.extendViewBox=void 0;const Us=(e,t)=>{const r=t-1,n=e.split(" ").map(u=>u.trim()).filter(u=>u!=="").map(Number);if(n.length!==4)throw new Error(`currentViewBox must be 4 valid numbers, but got "${e}"`);for(const u of n){if(Number.isNaN(u))throw new Error(`currentViewBox must be 4 valid numbers, but got "${e}"`);if(!Number.isFinite(u))throw new Error(`currentViewBox must be 4 valid numbers, but got "${e}"`)}const[i,o,c,a]=n;return[i-r*c/2,o-r*a/2,c+r*c,a+r*a].join(" ")};Ot.extendViewBox=Us;var Nt={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getInstructionIndexAtLength=e.getInstructionIndexAtLengthFromConstructed=void 0;const t=Me,r=(i,o)=>{if(o<0)throw new Error("Length less than 0 was passed");o>i.totalLength&&(o=i.totalLength);let c=i.partialLengths.length-1;for(;i.partialLengths[c]>=o&&c>0;)c--;return{lengthIntoInstruction:o-i.partialLengths[c],index:c}};e.getInstructionIndexAtLengthFromConstructed=r;const n=(i,o)=>{const c=(0,t.construct)(i);if(o>c.totalLength)throw new Error(`A length of ${o} was passed to getInstructionIndexAtLength() but the total length of the path is only ${c.totalLength}`);return(0,e.getInstructionIndexAtLengthFromConstructed)(c,o)};e.getInstructionIndexAtLength=n})(Nt);var Dt={};Object.defineProperty(Dt,"__esModule",{value:!0}),Dt.getPointAtLength=void 0;const Rs=Nt,Hs=Me,Zs=(e,t)=>{const r=(0,Hs.construct)(e),n=(0,Rs.getInstructionIndexAtLengthFromConstructed)(r,t),i=r.functions[n.index+1];if(i)return i.getPointAtLength(n.lengthIntoInstruction);if(r.initialPoint)return r.initialPoint;throw new Error("Wrong function at this part.")};Dt.getPointAtLength=Zs;var Bt={};Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.getSubpaths=void 0;const Ys=Me,Qs=oe,Xs=ce,Js=e=>{const t=(0,Qs.parsePath)(e),{segments:r}=(0,Ys.constructFromInstructions)(t);return r.map(n=>(0,Xs.serializeInstructions)(n))};Bt.getSubpaths=Js;var zt={};Object.defineProperty(zt,"__esModule",{value:!0}),zt.getTangentAtLength=void 0;const Ks=Nt,Gs=Me,eu=(e,t)=>{const r=(0,Gs.construct)(e),n=(0,Ks.getInstructionIndexAtLengthFromConstructed)(r,t),i=r.functions[n.index+1];if(i)return i.getTangentAtLength(n.lengthIntoInstruction);if(r.initialPoint)return{x:0,y:0};throw new Error("Wrong function at this part.")};zt.getTangentAtLength=eu;var qt={},Br={},Wt={};Object.defineProperty(Wt,"__esModule",{value:!0}),Wt.getEndPosition=void 0;const tu=e=>{let t=0,r=0,n=0,i=0;for(let o=0;o<e.length;o++){const c=e[o];if(c.type==="M"?(n=c.x,i=c.y):c.type==="m"&&(n+=c.dx,i+=c.dy),c.type==="A"||c.type==="C"||c.type==="L"||c.type==="M"||c.type==="Q"||c.type==="S"||c.type==="T"){t=c.x,r=c.y;continue}if(c.type==="a"||c.type==="c"||c.type==="l"||c.type==="m"||c.type==="q"||c.type==="s"||c.type==="t"){t+=c.dx,r+=c.dy;continue}if(c.type==="H"){t=c.x;continue}if(c.type==="V"){r=c.y;continue}if(c.type==="Z"){t=n,r=i;continue}if(c.type==="h"){t+=c.dx;continue}if(c.type==="v"){r+=c.dy;continue}throw new Error("Unknown instruction type: "+c.type)}return{x:t,y:r}};Wt.getEndPosition=tu;var zr={};Object.defineProperty(zr,"__esModule",{value:!0}),zr.convertToSameInstructionType=ou;const ru=e=>{if(e.type==="M"||e.type==="L"||e.type==="Z")throw new Error("unexpected");return{type:"L",x:e.x,y:e.y}},nu=(e,t)=>{if(e.type==="M"||e.type==="C"||e.type==="Z")throw new Error("unexpected");if(e.type==="L")return{type:"C",cp1x:t.x,cp1y:t.y,cp2x:e.x,cp2y:e.y,x:e.x,y:e.y};throw new Error("all types should be handled")};function ou(e,t,r){if(e.type==="M"||t.type==="M")return{...e};if(e.type===t.type)return{...e};if(t.type==="C")return nu(e,r);if(t.type==="L")return ru(e);if(t.type==="Z")return{type:"Z"};throw new TypeError("unhandled")}var qr={},Wr={},Ut={},Ur={};Object.defineProperty(Ur,"__esModule",{value:!0}),Ur.pointsToInstruction=au;const iu=We;function au(e){const t=e[e.length-1][0],r=e[e.length-1][1];if(e.length===4){const n=e[1][0],i=e[1][1],o=e[2][0],c=e[2][1];return{type:"C",cp1x:n,cp1y:i,cp2x:o,cp2y:c,x:t,y:r}}if(e.length===3){const n=e[1][0],i=e[1][1];return(0,iu.convertQToCInstruction)({type:"Q",cpx:n,cpy:i,x:t,y:r},{x:e[0][0],y:e[0][1]})}return{type:"L",x:t,y:r}}var Rr={},Hr={};Object.defineProperty(Hr,"__esModule",{value:!0}),Hr.decasteljau=su;function su(e,t){const r=[],n=[];function i(o,c){if(o.length===1)r.push(o[0]),n.push(o[0]);else{const a=Array(o.length-1);for(let u=0;u<a.length;u++)u===0&&r.push(o[0]),u===a.length-1&&n.push(o[u+1]),a[u]=[(1-c)*o[u][0]+c*o[u+1][0],(1-c)*o[u][1]+c*o[u+1][1]];i(a,c)}}return e.length&&i(e,t),{left:r,right:n.reverse()}}Object.defineProperty(Rr,"__esModule",{value:!0}),Rr.splitCurveAsPoints=cu;const uu=Hr;function cu(e,t=2){const r=[];let n=e;const i=1/t;for(let o=0;o<t-1;o++){const c=i/(1-i*o),a=(0,uu.decasteljau)(n,c);r.push(a.left),n=a.right}return r.push(n),r}Object.defineProperty(Ut,"__esModule",{value:!0}),Ut.splitCurveInstructions=void 0;const lu=Ur,du=Rr,fu=(e,t,r,n)=>{const i=[[e,t]];return r.type==="Q"&&i.push([r.cpx,r.cpy]),r.type==="C"&&(i.push([r.cp1x,r.cp1y]),i.push([r.cp2x,r.cp2y])),i.push([r.x,r.y]),(0,du.splitCurveAsPoints)(i,n).map(o=>(0,lu.pointsToInstruction)(o))};Ut.splitCurveInstructions=fu,Object.defineProperty(Wr,"__esModule",{value:!0}),Wr.splitSegmentInstructions=yu;const pu=Ut;function yu(e,t,r){let n=[];if(t.type==="L"||t.type==="C")e.type!=="Z"&&(n=n.concat((0,pu.splitCurveInstructions)(e.x,e.y,t,r)));else{const i=e.type==="M"?{type:"L",x:e.x,y:e.y}:e;n=n.concat(new Array(r-1).fill(!0).map(()=>i)),n.push(t)}return n}Object.defineProperty(qr,"__esModule",{value:!0}),qr.extendInstruction=mu;const hu=Wr;function mu(e,t){const r=e.length-1,n=t.length-1,i=r/n,c=new Array(n).fill(void 0).reduce((a,u,d)=>{const p=Math.floor(i*d);return a[p]=(a[p]||0)+1,a},[]).reduce((a,u,d)=>{if(d===e.length-1){const p=new Array(u).fill({...e[e.length-1]});return p[0].type==="M"&&p.forEach(y=>{y.type="L"}),a.concat(p)}return a.concat((0,hu.splitSegmentInstructions)(e[d],e[d+1],u))},[]);return c.unshift(e[0]),c}var Rt={};Object.defineProperty(Rt,"__esModule",{value:!0}),Rt.interpolateInstructionOfSameKind=void 0;const gu=(e,t,r)=>({type:"L",x:(1-e)*t.x+e*r.x,y:(1-e)*t.y+e*r.y}),vu=(e,t,r)=>({type:"C",cp1x:(1-e)*t.cp1x+e*r.cp1x,cp2x:(1-e)*t.cp2x+e*r.cp2x,cp1y:(1-e)*t.cp1y+e*r.cp1y,cp2y:(1-e)*t.cp2y+e*r.cp2y,x:(1-e)*t.x+e*r.x,y:(1-e)*t.y+e*r.y}),xu=(e,t,r)=>({type:"M",x:(1-e)*t.x+e*r.x,y:(1-e)*t.y+e*r.y}),wu=(e,t,r)=>{if(t.type==="L"){if(r.type!=="L")throw new Error("mismatch");return gu(e,t,r)}if(t.type==="C"){if(r.type!=="C")throw new Error("mismatch");return vu(e,t,r)}if(t.type==="M"){if(r.type!=="M")throw new Error("mismatch");return xu(e,t,r)}if(t.type==="Z"){if(r.type!=="Z")throw new Error("mismatch");return{type:"Z"}}throw new Error("mismatch")};Rt.interpolateInstructionOfSameKind=wu,Object.defineProperty(Br,"__esModule",{value:!0}),Br.interpolateInstructions=Eu;const bu=Wt,_u=zr,Po=qr,Pu=Rt;function Eu(e,t){let r=e.slice(),n=t.slice();if(!r.length&&!n.length)return function(){return[]};const i=(r.length===0||r[r.length-1].type==="Z")&&(n.length===0||n[n.length-1].type==="Z");r.length>0&&r[r.length-1].type==="Z"&&r.pop(),n.length>0&&n[n.length-1].type==="Z"&&n.pop(),r.length?n.length||n.push(r[0]):r.push(n[0]),Math.abs(n.length-r.length)!==0&&(n.length>r.length?r=(0,Po.extendInstruction)(r,n):n.length<r.length&&(n=(0,Po.extendInstruction)(n,r)));const c=r.map((u,d)=>{const p=r.slice(0,d),y=(0,bu.getEndPosition)(p);return(0,_u.convertToSameInstructionType)(u,n[d],y)}),a=[];return i&&(c.push({type:"Z"}),n.push({type:"Z"})),function(u){if(u===1)return t;if(u===0)return c;for(let d=0;d<c.length;++d)a.push((0,Pu.interpolateInstructionOfSameKind)(u,c[d],n[d]));return a}}Object.defineProperty(qt,"__esModule",{value:!0}),qt.interpolatePath=void 0;const Eo=oe,Co=xe,Cu=ce,Mu=Br,$u=(e,t,r)=>{if(e===1)return r;if(e===0)return t;const n=(0,Co.reduceInstructions)((0,Eo.parsePath)(t));if(n.length===0)throw new TypeError(`SVG Path "${t}" is not valid`);const i=(0,Co.reduceInstructions)((0,Eo.parsePath)(r));if(i.length===0)throw new TypeError(`SVG Path "${r}" is not valid`);const o=(0,Mu.interpolateInstructions)(n,i);return(0,Cu.serializeInstructions)(o(e))};qt.interpolatePath=$u;var Ht={},Zt={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.translatePath=e.translateSegments=void 0;const t=oe,r=ce,n=(o,c,a)=>o.map(u=>{if(u.type==="a"||u.type==="c"||u.type==="v"||u.type==="s"||u.type==="h"||u.type==="l"||u.type==="m"||u.type==="q"||u.type==="t")return u;if(u.type==="V")return{type:"V",y:u.y+a};if(u.type==="H")return{type:"H",x:u.x+c};if(u.type==="A")return{type:"A",rx:u.rx,ry:u.ry,largeArcFlag:u.largeArcFlag,sweepFlag:u.sweepFlag,xAxisRotation:u.xAxisRotation,x:u.x+c,y:u.y+a};if(u.type==="Z")return u;if(u.type==="C")return{type:"C",cp1x:u.cp1x+c,cp1y:u.cp1y+a,cp2x:u.cp2x+c,cp2y:u.cp2y+a,x:u.x+c,y:u.y+a};if(u.type==="Q")return{type:"Q",cpx:u.cpx+c,cpy:u.cpy+a,x:u.x+c,y:u.y+a};if(u.type==="S")return{type:"S",cpx:u.cpx+c,cpy:u.cpy+a,x:u.x+c,y:u.y+a};if(u.type==="T")return{type:"T",x:u.x+c,y:u.y+a};if(u.type==="L")return{type:"L",x:u.x+c,y:u.y+a};if(u.type==="M")return{type:"M",x:u.x+c,y:u.y+a};throw new Error(`Unknown segment type: ${u.type}`)});e.translateSegments=n;const i=(o,c,a)=>(0,r.serializeInstructions)((0,e.translateSegments)((0,t.parsePath)(o),c,a));e.translatePath=i})(Zt),Object.defineProperty(Ht,"__esModule",{value:!0}),Ht.resetPath=void 0;const Tu=Re,Su=Zt,Iu=e=>{const t=(0,Tu.getBoundingBox)(e);return(0,Su.translatePath)(e,-t.x1,-t.y1)};Ht.resetPath=Iu;var Yt={};Object.defineProperty(Yt,"__esModule",{value:!0}),Yt.reversePath=void 0;const Fu=Me,ku=Ue,ju=oe,Lu=xe,Au=ce;function Vu(e){const t=[];let r=0,n=0;for(const o of e){if(o.type==="A")t.unshift({type:"A",largeArcFlag:o.largeArcFlag,rx:o.rx,ry:o.ry,xAxisRotation:o.xAxisRotation,sweepFlag:!o.sweepFlag,x:r,y:n});else if(o.type==="C")t.unshift({type:"C",cp1x:o.cp2x,cp1y:o.cp2y,cp2x:o.cp1x,cp2y:o.cp1y,x:r,y:n});else if(o.type==="Q")t.unshift({type:"Q",cpx:o.cpx,cpy:o.cpy,x:r,y:n});else if(o.type==="L")t.unshift({type:"L",x:r,y:n});else if(o.type!=="M"){if(o.type!=="Z")throw new Error("unnormalized instruction "+o.type)}o.type!=="Z"&&(r=o.x,n=o.y)}t.unshift({type:"M",x:r,y:n});let i=(0,Au.serializeInstructions)(t);return e[e.length-1].type==="Z"&&(i+="Z"),i=i.replace(/M M/g,"Z M"),i}const Ou=e=>{const t=(0,ju.parsePath)(e),r=(0,ku.normalizeInstructions)(t),n=(0,Lu.reduceInstructions)(r),{segments:i}=(0,Fu.constructFromInstructions)(n);return i.map(o=>Vu(o)).join(" ").replace(/ +/g," ").trim()};Yt.reversePath=Ou;var Qt={};Object.defineProperty(Qt,"__esModule",{value:!0}),Qt.scalePath=void 0;const Nu=Re,Du=oe,Bu=xe,zu=ce,Mo=Zt,qu=(e,t,r)=>{const n=(0,Bu.reduceInstructions)((0,Du.parsePath)(e)),i=(0,Nu.getBoundingBoxFromInstructions)(n),c=(0,Mo.translateSegments)(n,-i.x1,-i.y1).map(a=>{if(a.type==="L")return{type:"L",x:t*a.x,y:r*a.y};if(a.type==="C")return{type:"C",x:t*a.x,y:r*a.y,cp1x:t*a.cp1x,cp1y:r*a.cp1y,cp2x:t*a.cp2x,cp2y:r*a.cp2y};if(a.type==="M")return{type:"M",x:t*a.x,y:r*a.y};if(a.type==="Q")return{type:"Q",x:t*a.x,y:r*a.y,cpx:t*a.cpx,cpy:r*a.cpy};if(a.type==="Z")return{type:"Z"};if(a.type==="A")return{type:"A",largeArcFlag:a.largeArcFlag,rx:t*a.rx,ry:r*a.ry,sweepFlag:a.sweepFlag,xAxisRotation:a.xAxisRotation,x:t*a.x,y:r*a.y};if(a.type==="H")return{type:"H",x:t*a.x};if(a.type==="S")return{type:"S",cpx:t*a.cpx,cpy:r*a.cpy,x:t*a.x,y:r*a.y};if(a.type==="T")return{type:"T",x:t*a.x,y:r*a.y};if(a.type==="V")return{type:"V",y:r*a.y};if(a.type==="a")return{type:"a",dx:t*a.dx,dy:r*a.dy,largeArcFlag:a.largeArcFlag,rx:t*a.rx,ry:r*a.ry,sweepFlag:a.sweepFlag,xAxisRotation:a.xAxisRotation};if(a.type==="c")return{type:"c",cp1dx:t*a.cp1dx,cp1dy:r*a.cp1dy,cp2dx:t*a.cp2dx,cp2dy:r*a.cp2dy,dx:t*a.dx,dy:r*a.dy};if(a.type==="h")return{type:"h",dx:t*a.dx};if(a.type==="l")return{type:"l",dx:t*a.dx,dy:r*a.dy};if(a.type==="m")return{type:"m",dx:t*a.dx,dy:r*a.dy};if(a.type==="q")return{type:"q",cpdx:t*a.cpdx,cpdy:r*a.cpdy,dx:t*a.dx,dy:r*a.dy};if(a.type==="s")return{type:"s",cpdx:t*a.cpdx,cpdy:r*a.cpdy,dx:t*a.dx,dy:r*a.dy};if(a.type==="t")return{type:"t",dx:t*a.dx,dy:r*a.dy};if(a.type==="v")return{type:"v",dy:r*a.dy};throw new Error("unexpected function")});return(0,zu.serializeInstructions)((0,Mo.translateSegments)(c,i.x1,i.y1))};Qt.scalePath=qu;var Xt={},$e={};Object.defineProperty($e,"__esModule",{value:!0}),$e.fixZInstruction=$e.warpTransform=void 0,$e.svgPathInterpolate=Yu;const Wu=We,$o=e=>{const t=e[0],r=e[e.length-1];let n=0;for(let i=0;i<t.length;i++){const o=r[i]-t[i];n+=o**2}return Math.sqrt(n)};function Uu(e,t=.5){const r=[],n=[],i=[e];for(;i.length<e.length;){const o=i[i.length-1],c=[];for(let a=1;a<o.length;a++){const u=o[a-1],d=o[a],p=[],y=Math.max(u.length,d.length);for(let s=0;s<y;s++){const h=u[s]||0,g=d[s]||0;p.push(h+(g-h)*t)}c.push(p)}i.push(c)}for(let o=0;o<i.length;o++)r.push(i[o][0]),n.push(i[i.length-1-o][o]);return[r,n]}function Ru(e,t,r=$o){const n=[e],i=[];for(;n.length>0;){const o=n.pop();if(r(o)>t){const c=Uu(o);for(let a=c.length-1;a>=0;a--)n.push(c[a])}else i.push(o)}return i}function Hu(e){switch(e.length){case 2:return{type:"L",x:e[1][0],y:e[1][1]};case 3:return(0,Wu.convertQToCInstruction)({type:"Q",cpx:e[1][0],cpy:e[1][1],x:e[2][0],y:e[2][1]},{x:e[0][0],y:e[0][1]});case 4:return{type:"C",cp1x:e[1][0],cp1y:e[1][1],cp2x:e[2][0],cp2y:e[2][1],x:e[3][0],y:e[3][1]};default:throw new Error("Expected 2, 3 or 4 points for a line segment, got "+e.length)}}function Zu(e,t,r){let n=0,i=0;return e.map(o=>{const c=[[n,i]];return o.type!=="Z"&&(n=o.x,i=o.y),o.type==="C"&&(c.push([o.cp1x,o.cp1y]),c.push([o.cp2x,o.cp2y]),c.push([o.x,o.y])),o.type==="L"&&c.push([o.x,o.y]),o.type==="C"||o.type==="L"?Ru(c,t,r).map(a=>Hu(a)):[o]}).flat(1)}function Yu(e,t){return Zu(e,t,n=>{const i=[n[0].slice(0,2),n[n.length-1].slice(0,2)];return $o(i)})}const Qu=(e,t)=>e.map(r=>{if(r.type==="L"){const{x:n,y:i}=t({x:r.x,y:r.y});return[{type:"L",x:n,y:i}]}if(r.type==="C"){const{x:n,y:i}=t({x:r.x,y:r.y}),{x:o,y:c}=t({x:r.cp1x,y:r.cp1y}),{x:a,y:u}=t({x:r.cp2x,y:r.cp2y});return[{type:"C",x:n,y:i,cp1x:o,cp1y:c,cp2x:a,cp2y:u}]}if(r.type==="M"){const{x:n,y:i}=t({x:r.x,y:r.y});return[{type:"M",x:n,y:i}]}return[r]}).flat(1);$e.warpTransform=Qu;const Xu=e=>{let t=0,r=0;return e.map(n=>n.type==="Z"?[{type:"L",x:t,y:r},{type:"Z"}]:(n.type==="M"&&(t=n.x,r=n.y),[n])).flat(1)};$e.fixZInstruction=Xu,Object.defineProperty(Xt,"__esModule",{value:!0}),Xt.warpPath=void 0;const Ju=Re,Ku=oe,Gu=xe,e0=ce,Zr=$e,t0=e=>{const t=(0,Ju.getBoundingBoxFromInstructions)(e);return Math.max(t.y2-t.y1,t.x2-t.x1)*.01},r0=(e,t,r)=>{var n;const i=(0,Gu.reduceInstructions)((0,Ku.parsePath)(e)),o=(0,Zr.fixZInstruction)(i),c=(0,Zr.svgPathInterpolate)(o,(n=r==null?void 0:r.interpolationThreshold)!==null&&n!==void 0?n:t0(o));return(0,e0.serializeInstructions)((0,Zr.warpTransform)(c,t))};Xt.warpPath=r0,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.PathInternals=e.warpPath=e.translatePath=e.serializeInstructions=e.scalePath=e.reversePath=e.resetPath=e.reduceInstructions=e.parsePath=e.normalizePath=e.interpolatePath=e.getTangentAtLength=e.getSubpaths=e.getPointAtLength=e.getLength=e.getInstructionIndexAtLength=e.getBoundingBox=e.extendViewBox=e.evolvePath=void 0;const t=Ft,r=Lt,n=Re;var i=At;Object.defineProperty(e,"evolvePath",{enumerable:!0,get:function(){return i.evolvePath}});var o=Ot;Object.defineProperty(e,"extendViewBox",{enumerable:!0,get:function(){return o.extendViewBox}});var c=Re;Object.defineProperty(e,"getBoundingBox",{enumerable:!0,get:function(){return c.getBoundingBox}});var a=Nt;Object.defineProperty(e,"getInstructionIndexAtLength",{enumerable:!0,get:function(){return a.getInstructionIndexAtLength}});var u=ut;Object.defineProperty(e,"getLength",{enumerable:!0,get:function(){return u.getLength}});var d=Dt;Object.defineProperty(e,"getPointAtLength",{enumerable:!0,get:function(){return d.getPointAtLength}});var p=Bt;Object.defineProperty(e,"getSubpaths",{enumerable:!0,get:function(){return p.getSubpaths}});var y=zt;Object.defineProperty(e,"getTangentAtLength",{enumerable:!0,get:function(){return y.getTangentAtLength}});var s=qt;Object.defineProperty(e,"interpolatePath",{enumerable:!0,get:function(){return s.interpolatePath}});var h=Ue;Object.defineProperty(e,"normalizePath",{enumerable:!0,get:function(){return h.normalizePath}});var g=oe;Object.defineProperty(e,"parsePath",{enumerable:!0,get:function(){return g.parsePath}});var P=xe;Object.defineProperty(e,"reduceInstructions",{enumerable:!0,get:function(){return P.reduceInstructions}});var x=Ht;Object.defineProperty(e,"resetPath",{enumerable:!0,get:function(){return x.resetPath}});var v=Yt;Object.defineProperty(e,"reversePath",{enumerable:!0,get:function(){return v.reversePath}});var l=Qt;Object.defineProperty(e,"scalePath",{enumerable:!0,get:function(){return l.scalePath}});var w=ce;Object.defineProperty(e,"serializeInstructions",{enumerable:!0,get:function(){return w.serializeInstructions}});var E=Zt;Object.defineProperty(e,"translatePath",{enumerable:!0,get:function(){return E.translatePath}});var _=Xt;Object.defineProperty(e,"warpPath",{enumerable:!0,get:function(){return _.warpPath}}),e.PathInternals={getBoundingBoxFromInstructions:n.getBoundingBoxFromInstructions,debugPath:r.debugPath,cutPath:t.cutPath}}(fe);var Yr={},Jt={},ct={};Object.defineProperty(ct,"__esModule",{value:!0}),ct.makeCircle=void 0;const n0=fe,o0=({radius:e})=>{const t=[{type:"M",x:e,y:0},{type:"a",rx:e,ry:e,xAxisRotation:0,largeArcFlag:!0,sweepFlag:!0,dx:0,dy:e*2},{type:"a",rx:e,ry:e,xAxisRotation:0,largeArcFlag:!0,sweepFlag:!0,dx:0,dy:-e*2},{type:"Z"}],r=(0,n0.serializeInstructions)(t);return{height:e*2,width:e*2,path:r,instructions:t,transformOrigin:`${e} ${e}`}};ct.makeCircle=o0;var ge={},Kt={};Object.defineProperty(Kt,"__esModule",{value:!0}),Kt.doesReactSupportTransformOriginProperty=void 0;const i0=e=>{if(e.includes("canary")||e.includes("experimental"))return parseInt(e.slice(-8),10)>20230209;const[t]=e.split(".").map(Number);return t>18};Kt.doesReactSupportTransformOriginProperty=i0;var a0=Fe&&Fe.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),s0=Fe&&Fe.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),u0=Fe&&Fe.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&a0(t,e,r);return s0(t,e),t};Object.defineProperty(ge,"__esModule",{value:!0}),ge.RenderSvg=void 0;const Te=b,Qr=u0(f),c0=Ro,l0=Kt,d0=({width:e,height:t,path:r,style:n,pathStyle:i,transformOrigin:o,debug:c,instructions:a,...u})=>{const d=(0,Qr.useMemo)(()=>({overflow:"visible",...n??{}}),[n]),p=(0,Qr.useMemo)(()=>({transformBox:"fill-box",...i??{}}),[i]),y=(0,l0.doesReactSupportTransformOriginProperty)(c0.version);return(0,Te.jsxs)("svg",{width:e,height:t,viewBox:`0 0 ${e} ${t}`,xmlns:"http://www.w3.org/2000/svg",style:d,children:[(0,Te.jsx)("path",{...y?{transformOrigin:o}:{"transform-origin":o},d:r,style:p,...u}),c?a.map((s,h)=>{if(s.type==="C"){const g=h===0?a[a.length-1]:a[h-1];if(g.type==="V"||g.type==="H"||g.type==="a"||g.type==="Z"||g.type==="t"||g.type==="q"||g.type==="l"||g.type==="c"||g.type==="m"||g.type==="h"||g.type==="s"||g.type==="v")return null;const P=g.x,x=g.y;return(0,Te.jsxs)(Qr.default.Fragment,{children:[(0,Te.jsx)("path",{d:`M ${P} ${x} ${s.cp1x} ${s.cp1y}`,strokeWidth:2,stroke:"rgba(0, 0, 0, 0.4)"}),(0,Te.jsx)("path",{d:`M ${s.x} ${s.y} ${s.cp2x} ${s.cp2y}`,strokeWidth:2,stroke:"rgba(0, 0, 0, 0.4)"}),(0,Te.jsx)("circle",{cx:s.cp1x,cy:s.cp1y,r:3,fill:"white",strokeWidth:2,stroke:"black"}),(0,Te.jsx)("circle",{cx:s.cp2x,cy:s.cp2y,r:3,strokeWidth:2,fill:"white",stroke:"black"})]},h)}return null}):null]})};ge.RenderSvg=d0,Object.defineProperty(Jt,"__esModule",{value:!0}),Jt.Circle=void 0;const f0=b,p0=ct,y0=ge,h0=({radius:e,...t})=>(0,f0.jsx)(y0.RenderSvg,{...(0,p0.makeCircle)({radius:e}),...t});Jt.Circle=h0;var Gt={},lt={};Object.defineProperty(lt,"__esModule",{value:!0}),lt.makeEllipse=void 0;const m0=fe,g0=({rx:e,ry:t})=>{const r=[{type:"M",x:e,y:0},{type:"a",rx:e,ry:t,xAxisRotation:0,largeArcFlag:!0,sweepFlag:!1,dx:1,dy:0},{type:"Z"}],n=(0,m0.serializeInstructions)(r);return{width:e*2,height:t*2,path:n,instructions:r,transformOrigin:`${e} ${t}`}};lt.makeEllipse=g0,Object.defineProperty(Gt,"__esModule",{value:!0}),Gt.Ellipse=void 0;const v0=b,x0=lt,w0=ge,b0=({rx:e,ry:t,...r})=>(0,v0.jsx)(w0.RenderSvg,{...(0,x0.makeEllipse)({rx:e,ry:t}),...r});Gt.Ellipse=b0;var er={},dt={};Object.defineProperty(dt,"__esModule",{value:!0}),dt.makePie=void 0;const _0=fe,He=({counterClockwise:e,actualProgress:t,rotation:r,radius:n,coord:i})=>{const o=e?-1:1,c=Math[i==="x"?"cos":"sin"](o*t*Math.PI*2+Math.PI*1.5+r)*n+n;return Math.round(c*1e5)/1e5},P0=({progress:e,radius:t,closePath:r=!0,counterClockwise:n=!1,rotation:i=0})=>{const o=Math.min(Math.max(e,0),1),c=He({actualProgress:o,coord:"x",counterClockwise:n,radius:t,rotation:i}),a=He({actualProgress:o,coord:"y",counterClockwise:n,radius:t,rotation:i}),u={x:He({actualProgress:0,coord:"x",counterClockwise:n,radius:t,rotation:i}),y:He({actualProgress:0,coord:"y",counterClockwise:n,radius:t,rotation:i})},d={x:c,y:a},p=[{type:"M",...u},{type:"A",rx:t,ry:t,xAxisRotation:0,largeArcFlag:!1,sweepFlag:!n,x:o<=.5?c:He({actualProgress:.5,coord:"x",counterClockwise:n,radius:t,rotation:i}),y:o<=.5?a:He({actualProgress:.5,coord:"y",counterClockwise:n,radius:t,rotation:i})},o>.5?{type:"A",rx:t,ry:t,xAxisRotation:0,largeArcFlag:!1,sweepFlag:!n,...d}:null,o>0&&o<1&&r?{type:"L",x:t,y:t}:null,r?{type:"Z"}:null].filter(Boolean),y=(0,_0.serializeInstructions)(p);return{height:t*2,width:t*2,path:y,instructions:p,transformOrigin:`${t} ${t}`}};dt.makePie=P0,Object.defineProperty(er,"__esModule",{value:!0}),er.Pie=void 0;const E0=b,C0=dt,M0=ge,$0=({radius:e,progress:t,closePath:r,counterClockwise:n,rotation:i,...o})=>(0,E0.jsx)(M0.RenderSvg,{...(0,C0.makePie)({radius:e,progress:t,closePath:r,counterClockwise:n,rotation:i}),...o});er.Pie=$0;var tr={},ft={},Se={};Object.defineProperty(Se,"__esModule",{value:!0}),Se.joinPoints=void 0;const To=(e,t)=>{const[r,n]=e,i=Math.sqrt(r*r+n*n),o=(i-t)/i;return[r*o,n*o]},So=(e,t)=>{const[r,n]=e,i=Math.sqrt(r*r+n*n),o=t/i;return[r*o,n*o]},T0=(e,{edgeRoundness:t,cornerRadius:r,roundCornerStrategy:n})=>e.map(([i,o],c)=>{const a=c===0?e.length-2:c-1,u=e[a],d=c===e.length-1?1:c+1,p=e[d],y=[(i+p[0])/2,(o+p[1])/2],s=[(i+u[0])/2,(o+u[1])/2],h=[i-u[0],o-u[1]],g=[p[0]-i,p[1]-o];if(c===0){if(t!==null)return[{type:"M",x:y[0],y:y[1]}];if(r!==0){const v=To(g,r);return[{type:"M",x:v[0]+i,y:v[1]+o}]}return[{type:"M",x:i,y:o}]}if(r&&t!==null)throw new Error('"cornerRadius" and "edgeRoundness" cannot be specified at the same time.');if(t===null){if(r===0)return[{type:"L",x:i,y:o}];const v=To(h,r),l=So(h,r),w=So(g,r),E=[u[0]+v[0],u[1]+v[1]];return[{type:"L",x:E[0],y:E[1]},n==="arc"?{type:"a",rx:r,ry:r,xAxisRotation:0,dx:l[0]+w[0],dy:l[1]+w[1],largeArcFlag:!1,sweepFlag:!0}:{type:"C",x:E[0]+l[0]+w[0],y:E[1]+l[1]+w[1],cp1x:i,cp1y:o,cp2x:i,cp2y:o}]}const P=[s[0]+h[0]*t*.5,s[1]+h[1]*t*.5],x=[y[0]-g[0]*t*.5,y[1]-g[1]*t*.5];return[{type:"C",cp1x:P[0],cp1y:P[1],cp2x:x[0],cp2y:x[1],x:y[0],y:y[1]}]}).flat(1);Se.joinPoints=T0,Object.defineProperty(ft,"__esModule",{value:!0}),ft.makePolygon=void 0;const rr=fe,S0=Se;function I0({points:e,radius:t,centerX:r,centerY:n,cornerRadius:i,edgeRoundness:o}){const c=Math.PI*2/e,a=new Array(e).fill(0).map((u,d)=>{const p=c*d-Math.PI/2,y={x:r+t*Math.cos(p),y:n+t*Math.sin(p)};return[y.x,y.y]});return(0,S0.joinPoints)([...a,a[0]],{edgeRoundness:o,cornerRadius:i,roundCornerStrategy:i>0?"bezier":"arc"})}const F0=({points:e,radius:t,cornerRadius:r=0,edgeRoundness:n=null})=>{if(e<3)throw new Error(`"points" should be minimum 3, got ${e}`);const i=2*t,o=2*t,c=i/2,a=o/2,u=I0({points:e,radius:t,centerX:c,centerY:a,cornerRadius:r,edgeRoundness:n}),d=(0,rr.reduceInstructions)(u),p=(0,rr.resetPath)((0,rr.serializeInstructions)(d)),y=rr.PathInternals.getBoundingBoxFromInstructions(d);return{path:p,width:y.width,height:y.height,transformOrigin:`${c} ${a}`,instructions:u}};ft.makePolygon=F0,Object.defineProperty(tr,"__esModule",{value:!0}),tr.Polygon=void 0;const k0=b,j0=ft,L0=ge,A0=({points:e,radius:t,cornerRadius:r,edgeRoundness:n,...i})=>(0,k0.jsx)(L0.RenderSvg,{...(0,j0.makePolygon)({points:e,cornerRadius:r,edgeRoundness:n,radius:t}),...i});tr.Polygon=A0;var nr={},pt={};Object.defineProperty(pt,"__esModule",{value:!0}),pt.makeRect=void 0;const V0=fe,O0=Se,N0=({width:e,height:t,edgeRoundness:r=null,cornerRadius:n=0})=>{const i=[e/2,t/2],o=[...(0,O0.joinPoints)([[n,0],[e,0],[e,t],[0,t],[0,0]],{edgeRoundness:r,cornerRadius:n,roundCornerStrategy:"arc"}),{type:"Z"}],c=(0,V0.serializeInstructions)(o);return{width:e,height:t,instructions:o,path:c,transformOrigin:i.join(" ")}};pt.makeRect=N0,Object.defineProperty(nr,"__esModule",{value:!0}),nr.Rect=void 0;const D0=b,B0=pt,z0=ge,q0=({width:e,edgeRoundness:t,height:r,cornerRadius:n,...i})=>(0,D0.jsx)(z0.RenderSvg,{...(0,B0.makeRect)({height:r,width:e,edgeRoundness:t,cornerRadius:n}),...i});nr.Rect=q0;var or={},yt={};Object.defineProperty(yt,"__esModule",{value:!0}),yt.makeStar=void 0;const ir=fe,W0=Se,U0=({centerX:e,centerY:t,points:r,innerRadius:n,outerRadius:i,cornerRadius:o,edgeRoundness:c})=>{const a=Math.PI*2/(r*2),u=new Array(r*2).fill(!0).map((d,p)=>{const y=p%2===0?i:n,s=a*p-Math.PI/2,h={x:e+y*Math.cos(s),y:t+y*Math.sin(s)};return[h.x,h.y]});return[...(0,W0.joinPoints)([...u,u[0]],{edgeRoundness:c,cornerRadius:o,roundCornerStrategy:o>0?"bezier":"arc"}),{type:"Z"}]},R0=({points:e,innerRadius:t,outerRadius:r,cornerRadius:n=0,edgeRoundness:i=null})=>{const o=r*2,c=r*2,a=o/2,u=c/2,d=U0({centerX:a,centerY:u,points:e,innerRadius:t,outerRadius:r,cornerRadius:n,edgeRoundness:i}),p=(0,ir.reduceInstructions)(d),y=(0,ir.resetPath)((0,ir.serializeInstructions)(p)),s=ir.PathInternals.getBoundingBoxFromInstructions(p);return{path:y,width:s.width,height:s.height,transformOrigin:`${a} ${u}`,instructions:d}};yt.makeStar=R0,Object.defineProperty(or,"__esModule",{value:!0}),or.Star=void 0;const H0=b,Z0=yt,Y0=ge,Q0=({innerRadius:e,outerRadius:t,points:r,cornerRadius:n,edgeRoundness:i,...o})=>(0,H0.jsx)(Y0.RenderSvg,{...(0,Z0.makeStar)({innerRadius:e,outerRadius:t,points:r,cornerRadius:n,edgeRoundness:i}),...o});or.Star=Q0;var ar={},ht={};Object.defineProperty(ht,"__esModule",{value:!0}),ht.makeTriangle=void 0;const X0=fe,J0=Se,K0=({length:e,direction:t="right",edgeRoundness:r=null,cornerRadius:n=0})=>{if(typeof e!="number")throw new Error(`"length" of a triangle must be a number, got ${JSON.stringify(e)}`);const i=e,o=Math.sqrt(e**2*.75),c={up:[[i/2,0],[0,o],[i,o],[i/2,0]],right:[[0,0],[0,i],[o,i/2],[0,0]],down:[[0,0],[i,0],[i/2,o],[0,0]],left:[[o,0],[o,i],[0,i/2],[o,0]]},a={left:o/3*2,right:o/3,up:i/2,down:i/2}[t],u={up:o/3*2,down:o/3,left:i/2,right:i/2}[t],d=[...(0,J0.joinPoints)(c[t],{edgeRoundness:r,cornerRadius:n,roundCornerStrategy:"bezier"}),{type:"Z"}];return{path:(0,X0.serializeInstructions)(d),instructions:d,width:t==="up"||t==="down"?e:o,height:t==="up"||t==="down"?o:e,transformOrigin:`${a} ${u}`}};ht.makeTriangle=K0,Object.defineProperty(ar,"__esModule",{value:!0}),ar.Triangle=void 0;const G0=b,ec=ht,tc=ge,rc=({length:e,direction:t,edgeRoundness:r,cornerRadius:n,...i})=>(0,G0.jsx)(tc.RenderSvg,{...(0,ec.makeTriangle)({length:e,direction:t,edgeRoundness:r,cornerRadius:n}),...i});ar.Triangle=rc,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.makeTriangle=e.makeStar=e.makeRect=e.makePolygon=e.makePie=e.makeEllipse=e.makeCircle=e.Triangle=e.Star=e.Rect=e.Polygon=e.Pie=e.Ellipse=e.Circle=void 0;var t=Jt;Object.defineProperty(e,"Circle",{enumerable:!0,get:function(){return t.Circle}});var r=Gt;Object.defineProperty(e,"Ellipse",{enumerable:!0,get:function(){return r.Ellipse}});var n=er;Object.defineProperty(e,"Pie",{enumerable:!0,get:function(){return n.Pie}});var i=tr;Object.defineProperty(e,"Polygon",{enumerable:!0,get:function(){return i.Polygon}});var o=nr;Object.defineProperty(e,"Rect",{enumerable:!0,get:function(){return o.Rect}});var c=or;Object.defineProperty(e,"Star",{enumerable:!0,get:function(){return c.Star}});var a=ar;Object.defineProperty(e,"Triangle",{enumerable:!0,get:function(){return a.Triangle}});var u=ct;Object.defineProperty(e,"makeCircle",{enumerable:!0,get:function(){return u.makeCircle}});var d=lt;Object.defineProperty(e,"makeEllipse",{enumerable:!0,get:function(){return d.makeEllipse}});var p=dt;Object.defineProperty(e,"makePie",{enumerable:!0,get:function(){return p.makePie}});var y=ft;Object.defineProperty(e,"makePolygon",{enumerable:!0,get:function(){return y.makePolygon}});var s=pt;Object.defineProperty(e,"makeRect",{enumerable:!0,get:function(){return s.makeRect}});var h=yt;Object.defineProperty(e,"makeStar",{enumerable:!0,get:function(){return h.makeStar}});var g=ht;Object.defineProperty(e,"makeTriangle",{enumerable:!0,get:function(){return g.makeTriangle}})}(Yr);var nc=({children:e,presentationDirection:t,presentationProgress:r,passedProps:n})=>{const i=Math.sqrt(n.width**2+n.height**2)/2,{path:o}=Yr.makePie({radius:i,progress:r}),c=fe.translatePath(o,-(i*2-n.width)/2,-(i*2-n.height)/2),[a]=f.useState(()=>String(me(null))),u=f.useMemo(()=>({width:"100%",height:"100%",clipPath:t==="exiting"?void 0:`url(#${a})`,...t==="entering"?n.innerEnterStyle:n.innerExitStyle}),[a,n.innerEnterStyle,n.innerExitStyle,t]),d=f.useMemo(()=>t==="entering"?n.outerEnterStyle:n.outerExitStyle,[n.outerEnterStyle,n.outerExitStyle,t]);return b.jsxs(R,{style:d,children:[b.jsx(R,{style:u,children:e}),t==="exiting"?null:b.jsx(R,{children:b.jsx("svg",{children:b.jsx("defs",{children:b.jsx("clipPath",{id:a,children:b.jsx("path",{d:c,fill:"black"})})})})})]})},oc=e=>({component:nc,props:e??{}});const ic=({children:e,presentationDirection:t,presentationProgress:r,passedProps:n})=>{const o=Math.sqrt(n.width**2+n.height**2)/2*r,c=sc(n.width/2,n.height/2,o),[a]=f.useState(()=>String(me(null))),u=f.useMemo(()=>({width:"100%",height:"100%",clipPath:t==="exiting"?void 0:`url(#${a})`}),[a,t]);return b.jsxs(R,{children:[b.jsx(R,{style:u,children:e}),t==="exiting"?null:b.jsx(R,{children:b.jsx("svg",{width:n.width,height:n.height,children:b.jsx("defs",{children:b.jsx("clipPath",{id:a,children:b.jsx("path",{d:c,fill:"black"})})})})})]})},ac=e=>({component:ic,props:e}),sc=(e,t,r)=>`M ${e}, ${t}
128
- m -${r}, 0
129
- a ${r},${r} 0 1,0 ${r*2},0
130
- a ${r},${r} 0 1,0 -${r*2},0`,uc=({children:e,presentationDirection:t,presentationProgress:r,passedProps:n})=>{const{width:i,height:o}=n,c=i*r,a=o*r,u=i/2-c/2,d=o/2-a/2,[p]=f.useState(()=>String(me(null))),y=f.useMemo(()=>({width:"100%",height:"100%",clipPath:t==="exiting"?void 0:`url(#${p})`}),[p,t]);return b.jsxs(R,{children:[b.jsx(R,{style:y,children:e}),t==="exiting"?null:b.jsx(R,{children:b.jsx("svg",{children:b.jsx("defs",{children:b.jsx("clipPath",{id:p,children:b.jsx("rect",{x:u,y:d,width:c,height:a,fill:"black"})})})})})]})},cc=e=>({component:uc,props:e}),lc=({children:e,presentationDirection:t,presentationProgress:r,passedProps:n})=>{const i=Math.sqrt(n.width**2+n.height**2)/2,o=i*r,c=i*2*r,{path:a}=Yr.makeStar({innerRadius:o,outerRadius:c,points:5}),u=fe.getBoundingBox(a),d=fe.translatePath(a,n.width/2-u.width/2,n.height/2-u.height/2),[p]=f.useState(()=>String(me(null))),y=f.useMemo(()=>({width:"100%",height:"100%",clipPath:t==="exiting"?void 0:`url(#${p})`}),[p,t]);return b.jsxs(R,{children:[b.jsx(R,{style:y,children:e}),t==="exiting"?null:b.jsx(R,{children:b.jsx("svg",{children:b.jsx("defs",{children:b.jsx("clipPath",{id:p,children:b.jsx("path",{d,fill:"black"})})})})})]})},dc=e=>({component:lc,props:e}),fc=({children:e,presentationDirection:t,presentationProgress:r,passedProps:n})=>{const{width:i,height:o}=n,c=i*r,a=i/2-c/2,[u]=f.useState(()=>String(me(null))),d=f.useMemo(()=>({width:"100%",height:"100%",clipPath:t==="exiting"?void 0:`url(#${u})`}),[u,t]);return b.jsxs(R,{children:[b.jsx(R,{style:d,children:e}),t==="exiting"?null:b.jsx(R,{children:b.jsx("svg",{children:b.jsx("defs",{children:b.jsx("clipPath",{id:u,children:b.jsx("rect",{x:a,y:0,width:c,height:o,fill:"black"})})})})})]})},pc=e=>({component:fc,props:e});ee.circle=ac,ee.clockWipe=oc,ee.fade=Ha,ee.flip=ts,ee.linearTiming=Ba,ee.rectangle=cc,ee.slide=Qa,ee.slidingDoors=pc,ee.star=dc,ee.wipe=Ga,Object.defineProperty(ee,Symbol.toStringTag,{value:"Module"})});
22
+ <%s key={someKey} {...props} />`,x,S,L,S),G[S+x]=!0)}if(S=null,p!==void 0&&(e(p),S=""+p),d(u)&&(e(u.key),S=""+u.key),"key"in u){p={};for(var oe in u)oe!=="key"&&(p[oe]=u[oe])}else p=u;return S&&f(p,typeof n=="function"?n.displayName||n.name||"Unknown":n),w(n,S,p,i(),H,ne)}function v(n){y(n)?n._store&&(n._store.validated=1):typeof n=="object"&&n!==null&&n.$$typeof===q&&(n._payload.status==="fulfilled"?y(n._payload.value)&&n._payload.value._store&&(n._payload.value._store.validated=1):n._store&&(n._store.validated=1))}function y(n){return typeof n=="object"&&n!==null&&n.$$typeof===B}var b=m,B=Symbol.for("react.transitional.element"),M=Symbol.for("react.portal"),k=Symbol.for("react.fragment"),F=Symbol.for("react.strict_mode"),I=Symbol.for("react.profiler"),we=Symbol.for("react.consumer"),A=Symbol.for("react.context"),C=Symbol.for("react.forward_ref"),te=Symbol.for("react.suspense"),X=Symbol.for("react.suspense_list"),T=Symbol.for("react.memo"),q=Symbol.for("react.lazy"),N=Symbol.for("react.activity"),re=Symbol.for("react.client.reference"),j=b.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,P=Object.prototype.hasOwnProperty,R=Array.isArray,$=console.createTask?console.createTask:function(){return null};b={react_stack_bottom_frame:function(n){return n()}};var O,Y={},z=b.react_stack_bottom_frame.bind(b,c)(),V=$(o(c)),G={};D.Fragment=k,D.jsx=function(n,u,p){var x=1e4>j.recentlyCreatedOwnerStacks++;return g(n,u,p,!1,x?Error("react-stack-top-frame"):z,x?$(o(n)):V)},D.jsxs=function(n,u,p){var x=1e4>j.recentlyCreatedOwnerStacks++;return g(n,u,p,!0,x?Error("react-stack-top-frame"):z,x?$(o(n)):V)}}()),D}process.env.NODE_ENV==="production"?Q.exports=ve():Q.exports=Ee();var s=Q.exports;typeof window<"u"&&(window.remotion_renderReady=!1,window.remotion_delayRenderTimeouts||(window.remotion_delayRenderTimeouts={}),window.remotion_delayRenderHandles=[]);var $e={"style.transformOrigin":{type:"transform-origin",step:1,default:"50% 50%",description:"Transform origin"},"style.translate":{type:"translate",step:1,default:"0px 0px",description:"Offset"},"style.scale":{type:"scale",max:100,step:.01,default:1,description:"Scale",defaultKeyframeOutput:"perceptual-scale"},"style.rotate":{type:"rotation-css",step:1,default:"0deg",description:"Rotation"},"style.opacity":{type:"number",min:0,max:1,step:.01,default:1,description:"Opacity",hiddenFromList:!1}},Fe={"style.borderWidth":{type:"number",default:void 0,min:0,step:1,description:"Border width",hiddenFromList:!1},"style.borderStyle":{type:"enum",default:"none",description:"Border style",variants:{none:{},hidden:{},solid:{},dashed:{},dotted:{},double:{},groove:{},ridge:{},inset:{},outset:{}}},"style.borderColor":{type:"color",default:void 0,description:"Border color"}},je={"style.borderRadius":{type:"number",default:0,min:0,step:1,description:"Border radius",hiddenFromList:!1,keyframable:!0},"style.borderTopLeftRadius":{type:"number",default:0,min:0,step:1,description:"Top left radius",hiddenFromList:!1},"style.borderTopRightRadius":{type:"number",default:0,min:0,step:1,description:"Top right radius",hiddenFromList:!1},"style.borderBottomRightRadius":{type:"number",default:0,min:0,step:1,description:"Bottom right radius",hiddenFromList:!1},"style.borderBottomLeftRadius":{type:"number",default:0,min:0,step:1,description:"Bottom left radius",hiddenFromList:!1}},_e={"style.backgroundColor":{type:"color",default:"transparent",description:"Color"}},Ie={premountFor:{type:"number",default:0,description:"Premount For",min:0,step:1,hiddenFromList:!1,keyframable:!1},postmountFor:{type:"number",default:0,min:0,step:1,hiddenFromList:!0,keyframable:!1}},Pe={...Ie},ke={cropLeft:{type:"number",default:0,description:"Crop left",min:0,max:1,step:.01,hiddenFromList:!1,keyframable:!0},cropRight:{type:"number",default:0,description:"Crop right",min:0,max:1,step:.01,hiddenFromList:!1,keyframable:!0},cropTop:{type:"number",default:0,description:"Crop top",min:0,max:1,step:.01,hiddenFromList:!1,keyframable:!0},cropBottom:{type:"number",default:0,description:"Crop bottom",min:0,max:1,step:.01,hiddenFromList:!1,keyframable:!0}},Ae=ke,Re={...Ae,...$e,..._e,...Fe,...je,...Pe},Oe={layout:{type:"enum",default:"absolute-fill",description:"Layout",variants:{"absolute-fill":Re,none:{}}}};({...Oe.layout});function Me(r,t){const{allowFloats:e,component:o}=t;if(typeof r>"u")throw new Error(`The "durationInFrames" prop ${o} is missing.`);if(typeof r!="number")throw new Error(`The "durationInFrames" prop ${o} must be a number, but you passed a value of type ${typeof r}`);if(r<=0)throw new TypeError(`The "durationInFrames" prop ${o} must be positive, but got ${r}.`);if(!e&&r%1!==0)throw new TypeError(`The "durationInFrames" prop ${o} must be an integer, but got ${r}.`);if(!Number.isFinite(r))throw new TypeError(`The "durationInFrames" prop ${o} must be finite, but got ${r}.`)}var Ce={validateDurationInFrames:Me};const le=m.createContext(null),ue=m.createContext(null),ce=({presentationProgress:r,children:t})=>{const e=m.useMemo(()=>({enteringProgress:r}),[r]);return s.jsx(le.Provider,{value:e,children:t})},fe=({presentationProgress:r,children:t})=>{const e=m.useMemo(()=>({exitingProgress:r}),[r]);return s.jsx(ue.Provider,{value:e,children:t})},de=r=>m.Children.toArray(r).reduce((e,o)=>o.type===m.Fragment?e.concat(de(o.props.children)):(e.push(o),e),[]),Ne=.01,qe=({children:r,presentationProgress:t,presentationDirection:e,passedProps:{direction:o="from-left",enterStyle:i,exitStyle:c}})=>{const d=m.useMemo(()=>{const l=t===1?t*100:t*100-Ne;if(e==="exiting")switch(o){case"from-left":return{transform:`translateX(${l}%)`};case"from-right":return{transform:`translateX(${-t*100}%)`};case"from-top":return{transform:`translateY(${l}%)`};case"from-bottom":return{transform:`translateY(${-t*100}%)`};default:throw new Error(`Invalid direction: ${o}`)}switch(o){case"from-left":return{transform:`translateX(${-100+t*100}%)`};case"from-right":return{transform:`translateX(${100-l}%)`};case"from-top":return{transform:`translateY(${-100+t*100}%)`};case"from-bottom":return{transform:`translateY(${100-l}%)`};default:throw new Error(`Invalid direction: ${o}`)}},[e,t,o]),f=m.useMemo(()=>({width:"100%",height:"100%",justifyContent:"center",alignItems:"center",...d,...e==="entering"?i:c}),[d,i,c,e]);return s.jsx(a.AbsoluteFill,{style:f,children:r})},J=r=>({component:qe,props:{}}),Ye=Ce.validateDurationInFrames,U=function(r){return null},K=({children:r})=>s.jsx(s.Fragment,{children:r}),Le=({children:r})=>{const{fps:t}=a.useVideoConfig(),e=a.useCurrentFrame(),o=m.useMemo(()=>{let i=0,c=0;const d=de(r);return m.Children.map(d,(f,l)=>{const w=f;if(typeof w=="string"){if(w.trim()==="")return null;throw new TypeError(`The <TransitionSeries /> component only accepts a list of <TransitionSeries.Sequence /> components as its children, but you passed a string "${w}"`)}const g=d[l-1],v=d[l+1],y=typeof g=="string"||typeof g>"u"?null:g.type===U?g:null,b=typeof v=="string"||typeof v>"u"?null:v.type===U?v:null,B=typeof g=="string"||typeof g>"u"?!1:g.type===U;if(w.type===U){if(B)throw new TypeError(`A <TransitionSeries.Transition /> component must not be followed by another <TransitionSeries.Transition /> component (nth children = ${l-1} and ${l})`);return null}if(w.type!==K)throw new TypeError(`The <TransitionSeries /> component only accepts a list of <TransitionSeries.Sequence /> and <TransitionSeries.Transition /> components as its children, but got ${w} instead`);const M=w,k=`index = ${l}, duration = ${M.props.durationInFrames}`;if(!(M!=null&&M.props.children))throw new TypeError(`A <TransitionSeries.Sequence /> component (${k}) was detected to not have any children. Delete it to fix this error.`);const F=M.props.durationInFrames,{durationInFrames:I,children:we,...A}=M.props;Ye(F,{component:"of a <TransitionSeries.Sequence /> component",allowFloats:!0});const C=M.props.offset??0;if(Number.isNaN(C))throw new TypeError(`The "offset" property of a <TransitionSeries.Sequence /> must not be NaN, but got NaN (${k}).`);if(!Number.isFinite(C))throw new TypeError(`The "offset" property of a <TransitionSeries.Sequence /> must be finite, but got ${C} (${k}).`);if(C%1!==0)throw new TypeError(`The "offset" property of a <TransitionSeries.Sequence /> must be finite, but got ${C} (${k}).`);const te=c+C;let X=0;y&&(X=y.props.timing.getDurationInFrames({fps:t}),i-=X/2);let T=te-X/2;c+=F+C,T<0&&(T=0);const q=b?b.props.timing.getProgress({frame:e-T-I+b.props.timing.getDurationInFrames({fps:t})/2+i,fps:t}):null,N=y?y.props.timing.getProgress({frame:e-T,fps:t}):null,re=y?y.props.timing.getProgress({frame:e-(T+I),fps:t}):null;if(b&&F<b.props.timing.getDurationInFrames({fps:t})/2)throw new Error(`The duration of a <TransitionSeries.Sequence /> must not be shorter than the duration of the next <TransitionSeries.Transition />. The transition is ${b.props.timing.getDurationInFrames({fps:t})} frames long, but the sequence is only ${F} frames long (${k})`);if(y&&F<y.props.timing.getDurationInFrames({fps:t})/2)throw new Error(`The duration of a <TransitionSeries.Sequence /> must not be shorter than the duration of the previous <TransitionSeries.Transition />. The transition is ${y.props.timing.getDurationInFrames({fps:t})} frames long, but the sequence is only ${F} frames long (${k})`);if(b&&y&&re!==null&&N!==null){const j=b.props.presentation??J(),P=y.props.presentation??J(),R=y.props.timing.getDurationInFrames({fps:t}),$=b.props.timing.getDurationInFrames({fps:t}),O=j.component,Y=P.component,z=e<+Math.floor(T)+R/2,V=e>Math.floor(T)+Math.floor(I)+R/2,G=V?Math.floor(T)+Math.floor(I)+Math.floor($/2):Math.floor(T),n=z?Math.floor(T):Math.floor(T)+R/2,u=b.props.timing.getProgress({frame:e-(n+I-$/2),fps:t}),p=e>T,x=e<T+I+$/2+R/2;return s.jsx(a.Freeze,{active:x&&p&&(z||V),frame:G,children:s.jsx(a.Sequence,{from:n,durationInFrames:F+$/2,...A,name:A.name||"<TS.Sequence>",children:s.jsx(O,{passedProps:j.props??{},presentationDirection:"exiting",presentationProgress:u,presentationDurationInFrames:b.props.timing.getDurationInFrames({fps:t}),onElementImage:()=>{},onUnmount:()=>{},bothEnteringAndExiting:!1,children:s.jsx(fe,{presentationProgress:u,children:s.jsx(Y,{passedProps:P.props??{},presentationDirection:"entering",presentationProgress:N,presentationDurationInFrames:y.props.timing.getDurationInFrames({fps:t}),onElementImage:()=>{},onUnmount:()=>{},bothEnteringAndExiting:!1,children:s.jsx(ce,{presentationProgress:N,children:f})})})})},l)},l)}if(N!==null&&y){const j=y.props.timing.getDurationInFrames({fps:t})/2,P=y.props.presentation??J(),R=P.component,$=e<T+j,O=$?Math.floor(T):Math.floor(T)+j,Y=e>O;return s.jsx(a.Freeze,{active:Y&&$,frame:O,children:s.jsx(a.Sequence,{from:O,durationInFrames:F,...A,name:A.name||"<TS.Sequence>",children:s.jsx(R,{passedProps:P.props??{},presentationDirection:"entering",presentationProgress:N,presentationDurationInFrames:y.props.timing.getDurationInFrames({fps:t}),onElementImage:()=>{},onUnmount:()=>{},bothEnteringAndExiting:!1,children:s.jsx(ce,{presentationProgress:N,children:f})})},l)},l)}if(q!==null&&b){const j=b.props.timing.getDurationInFrames({fps:t})/2,P=b.props.presentation??J(),R=P.component,$=e>Math.floor(I)+Math.floor(T),O=e<Math.floor(I)+Math.floor(T)+j;return s.jsx(a.Freeze,{active:O&&$,frame:Math.floor(I),children:s.jsx(a.Sequence,{from:Math.floor(T),durationInFrames:F+j,...A,name:A.name||"<TS.Sequence>",children:s.jsx(R,{passedProps:P.props??{},presentationDirection:"exiting",presentationProgress:q,presentationDurationInFrames:b.props.timing.getDurationInFrames({fps:t}),onElementImage:()=>{},onUnmount:()=>{},bothEnteringAndExiting:!1,children:s.jsx(fe,{presentationProgress:q,children:f})})},l)},l)}return s.jsx(a.Sequence,{from:Math.floor(T),durationInFrames:F,...A,name:A.name||"<TS.Sequence>",children:f},l)})},[r,t,e]);return s.jsx(s.Fragment,{children:o})},E=({children:r,name:t,layout:e,...o})=>{const i=t??"<TransitionSeries>",c=e??"absolute-fill";return s.jsx(a.Sequence,{name:i,layout:c,...o,children:s.jsx(Le,{children:r})})};E.Sequence=K,E.Transition=U,a.Internals.addSequenceStackTraces(E),a.Internals.addSequenceStackTraces(K);const We=()=>{const r=m.useContext(le),t=m.useContext(ue);return!r&&!t?{isInTransitionSeries:!1,entering:1,exiting:0}:{isInTransitionSeries:!0,entering:(r==null?void 0:r.enteringProgress)??1,exiting:(t==null?void 0:t.exitingProgress)??0}},De=({children:r,presentationDirection:t,presentationProgress:e,passedProps:o})=>{const c=Math.sqrt(o.width**2+o.height**2)/2*e,d=Ue(o.width/2,o.height/2,c),[f]=m.useState(()=>String(a.random(null))),l=m.useMemo(()=>({width:"100%",height:"100%",clipPath:t==="exiting"?void 0:`url(#${f})`}),[f,t]);return s.jsxs(a.AbsoluteFill,{children:[s.jsx(a.AbsoluteFill,{style:l,children:r}),t==="exiting"?null:s.jsx(a.AbsoluteFill,{children:s.jsx("svg",{width:o.width,height:o.height,children:s.jsx("defs",{children:s.jsx("clipPath",{id:f,children:s.jsx("path",{d,fill:"black"})})})})})]})},me=r=>({component:De,props:r}),Ue=(r,t,e)=>`M ${r}, ${t}
23
+ m -${e}, 0
24
+ a ${e},${e} 0 1,0 ${e*2},0
25
+ a ${e},${e} 0 1,0 -${e*2},0`,Be=({children:r,presentationDirection:t,presentationProgress:e,passedProps:o})=>{const{width:i,height:c}=o,d=i*e,f=c*e,l=i/2-d/2,w=c/2-f/2,[g]=m.useState(()=>String(a.random(null))),v=m.useMemo(()=>({width:"100%",height:"100%",clipPath:t==="exiting"?void 0:`url(#${g})`}),[g,t]);return s.jsxs(a.AbsoluteFill,{children:[s.jsx(a.AbsoluteFill,{style:v,children:r}),t==="exiting"?null:s.jsx(a.AbsoluteFill,{children:s.jsx("svg",{children:s.jsx("defs",{children:s.jsx("clipPath",{id:g,children:s.jsx("rect",{x:l,y:w,width:d,height:f,fill:"black"})})})})})]})},pe=r=>({component:Be,props:r}),Xe=({children:r,presentationDirection:t,presentationProgress:e,passedProps:o})=>{const i=Math.sqrt(o.width**2+o.height**2)/2,c=i*e,d=i*2*e,{path:f}=se.makeStar({innerRadius:c,outerRadius:d,points:5}),l=Z.getBoundingBox(f),w=Z.translatePath(f,o.width/2-l.width/2,o.height/2-l.height/2),[g]=m.useState(()=>String(a.random(null))),v=m.useMemo(()=>({width:"100%",height:"100%",clipPath:t==="exiting"?void 0:`url(#${g})`}),[g,t]);return s.jsxs(a.AbsoluteFill,{children:[s.jsx(a.AbsoluteFill,{style:v,children:r}),t==="exiting"?null:s.jsx(a.AbsoluteFill,{children:s.jsx("svg",{children:s.jsx("defs",{children:s.jsx("clipPath",{id:g,children:s.jsx("path",{d:w,fill:"black"})})})})})]})},he=r=>({component:Xe,props:r}),ze=({children:r,presentationDirection:t,presentationProgress:e,passedProps:o})=>{const{width:i,height:c}=o,d=i*e,f=i/2-d/2,[l]=m.useState(()=>String(a.random(null))),w=m.useMemo(()=>({width:"100%",height:"100%",clipPath:t==="exiting"?void 0:`url(#${l})`}),[l,t]);return s.jsxs(a.AbsoluteFill,{children:[s.jsx(a.AbsoluteFill,{style:w,children:r}),t==="exiting"?null:s.jsx(a.AbsoluteFill,{children:s.jsx("svg",{children:s.jsx("defs",{children:s.jsx("clipPath",{id:l,children:s.jsx("rect",{x:f,y:0,width:d,height:c,fill:"black"})})})})})]})},ge=r=>({component:ze,props:r});var Ve=({children:r,presentationDirection:t,presentationProgress:e,passedProps:o})=>{const i=t==="entering",c=m.useMemo(()=>({opacity:i?e:o.shouldFadeOutExitingScene?1-e:1,...t==="entering"?o.enterStyle:o.exitStyle}),[i,o.enterStyle,o.exitStyle,o.shouldFadeOutExitingScene,t,e]);return s.jsx(a.AbsoluteFill,{style:c,children:r})},ee=r=>({component:Ve,props:r??{}}),Je=.01,Ge=({children:r,presentationProgress:t,presentationDirection:e,passedProps:{direction:o="from-left",enterStyle:i,exitStyle:c}})=>{const d=m.useMemo(()=>{const l=t===1?t*100:t*100-Je;if(e==="exiting")switch(o){case"from-left":return{transform:`translateX(${l}%)`};case"from-right":return{transform:`translateX(${-t*100}%)`};case"from-top":return{transform:`translateY(${l}%)`};case"from-bottom":return{transform:`translateY(${-t*100}%)`};default:throw new Error(`Invalid direction: ${o}`)}switch(o){case"from-left":return{transform:`translateX(${-100+t*100}%)`};case"from-right":return{transform:`translateX(${100-l}%)`};case"from-top":return{transform:`translateY(${-100+t*100}%)`};case"from-bottom":return{transform:`translateY(${100-l}%)`};default:throw new Error(`Invalid direction: ${o}`)}},[e,t,o]),f=m.useMemo(()=>({width:"100%",height:"100%",justifyContent:"center",alignItems:"center",...d,...e==="entering"?i:c}),[d,i,c,e]);return s.jsx(a.AbsoluteFill,{style:f,children:r})},ye=r=>({component:Ge,props:r??{}}),He=(r,t)=>{const e=r*100;switch(t){case"from-left":return`polygon(0% 0%, ${e}% 0%, ${e}% 100%, 0% 100%)`;case"from-top-left":return`polygon(0% 0%, ${e*2}% 0%, 0% ${e*2}%)`;case"from-top":return`polygon(0% 0%, 100% 0%, 100% ${e}%, 0% ${e}%)`;case"from-top-right":return`polygon(100% 0%, ${100-e*2}% 0%, 100% ${e*2}%)`;case"from-right":return`polygon(100% 0%, 100% 100%, ${100-e}% 100%, ${100-e}% 0%)`;case"from-bottom-right":return`polygon(100% 100%, ${100-e*2}% 100%, 100% ${100-e*2}%)`;case"from-bottom":return`polygon(0% 100%, 100% 100%, 100% ${100-e}%, 0% ${100-e}%)`;case"from-bottom-left":return`polygon(0% 100%, 0% ${100-e*2}%, ${e*2}% 100%)`;default:throw new Error(`Unknown direction ${JSON.stringify(t)}`)}},Ze=(r,t)=>{const e=r*100;switch(t){case"from-left":return`polygon(100% 100%, ${100-e}% 100%, ${100-e}% 0%, 100% 0%)`;case"from-top-left":return`polygon(100% 100%, ${100-e*2}% 100%, 100% ${100-e*2}%)`;case"from-top":return`polygon(100% 100%, 0% 100%, 0% ${100-e}%, 100% ${100-e}%)`;case"from-top-right":return`polygon(0% 100%, ${e*2}% 100%, 0% ${100-e*2}%)`;case"from-right":return`polygon(0% 0%, ${e}% 0%, ${e}% 100%, 0% 100%)`;case"from-bottom-right":return`polygon(0% 0%, ${e*2}% 0%, 0% ${e*2}%)`;case"from-bottom":return`polygon(100% 0%, 0% 0%, 0% ${e}%, 100% ${e}%)`;case"from-bottom-left":return`polygon(100% 0%, ${100-e*2}% 0%, 100% ${e*2}%)`;default:throw new Error(`Unknown direction ${JSON.stringify(t)}`)}},Qe=({children:r,presentationProgress:t,presentationDirection:e,passedProps:{direction:o="from-left",innerEnterStyle:i,innerExitStyle:c,outerEnterStyle:d,outerExitStyle:f}})=>{const l=e==="entering"?t:1-t,w=e==="entering"?He(l,o):Ze(l,o),g=m.useMemo(()=>({width:"100%",height:"100%",justifyContent:"center",alignItems:"center",clipPath:w,...e==="entering"?i:c}),[w,i,c,e]),v=m.useMemo(()=>e==="entering"?d:f,[d,f,e]);return s.jsx(a.AbsoluteFill,{style:v,children:s.jsx(a.AbsoluteFill,{style:g,children:r})})},be=r=>({component:Qe,props:r??{}}),Ke=({children:r,presentationDirection:t,presentationProgress:e,passedProps:{direction:o="from-left",perspective:i=1e3,innerEnterStyle:c,innerExitStyle:d,outerEnterStyle:f,outerExitStyle:l}})=>{const w=m.useMemo(()=>{const v=o==="from-right"||o==="from-top"?180:-180,y=o==="from-right"||o==="from-top"?-180:180,b=t==="entering"?a.interpolate(e,[0,1],[v,0]):a.interpolate(e,[0,1],[0,y]);return{width:"100%",height:"100%",transform:`${o==="from-top"||o==="from-bottom"?"rotateX":"rotateY"}(${b}deg)`,backfaceVisibility:"hidden",WebkitBackfaceVisibility:"hidden",...t==="entering"?c:d}},[o,c,d,t,e]),g=m.useMemo(()=>({perspective:i,transformStyle:"preserve-3d",...t==="entering"?f:l}),[f,l,i,t]);return s.jsx(a.AbsoluteFill,{style:g,children:s.jsx(a.AbsoluteFill,{style:w,children:r})})},Te=r=>({component:Ke,props:r??{}}),et=({children:r,presentationDirection:t,presentationProgress:e,passedProps:o})=>{const i=Math.sqrt(o.width**2+o.height**2)/2,{path:c}=se.makePie({radius:i,progress:e}),d=Z.translatePath(c,-(i*2-o.width)/2,-(i*2-o.height)/2),f=m.useMemo(()=>({width:"100%",height:"100%",clipPath:t==="exiting"?void 0:`path("${d}")`,...t==="entering"?o.innerEnterStyle:o.innerExitStyle}),[d,o.innerEnterStyle,o.innerExitStyle,t]),l=m.useMemo(()=>t==="entering"?o.outerEnterStyle:o.outerExitStyle,[o.outerEnterStyle,o.outerExitStyle,t]);return s.jsx(a.AbsoluteFill,{style:l,children:s.jsx(a.AbsoluteFill,{style:f,children:r})})},xe=r=>({component:et,props:r??{}});const tt={none:({id:r})=>s.jsx(E.Transition,{presentation:ee(),timing:_({durationInFrames:1})},r),fade:({durationInFrames:r,id:t})=>s.jsx(E.Transition,{presentation:ee(),timing:_({durationInFrames:r})},t),slide:({durationInFrames:r,id:t,direction:e})=>s.jsx(E.Transition,{presentation:ye({direction:e}),timing:_({durationInFrames:r})},t),wipe:({durationInFrames:r,id:t,direction:e})=>s.jsx(E.Transition,{presentation:be({direction:e}),timing:_({durationInFrames:r})},t),flip:({durationInFrames:r,id:t})=>s.jsx(E.Transition,{presentation:Te(),timing:_({durationInFrames:r})},t),clockWipe:({width:r,height:t,durationInFrames:e,id:o})=>s.jsx(E.Transition,{presentation:xe({width:r,height:t}),timing:_({durationInFrames:e})},o),star:({width:r,height:t,durationInFrames:e,id:o})=>s.jsx(E.Transition,{presentation:he({width:r,height:t}),timing:_({durationInFrames:e})},o),circle:({width:r,height:t,durationInFrames:e,id:o})=>s.jsx(E.Transition,{presentation:me({width:r,height:t}),timing:_({durationInFrames:e})},o),rectangle:({width:r,height:t,durationInFrames:e,id:o})=>s.jsx(E.Transition,{presentation:pe({width:r,height:t}),timing:_({durationInFrames:e})},o),slidingDoors:({width:r,height:t,durationInFrames:e,id:o})=>s.jsx(E.Transition,{presentation:ge({width:r,height:t}),timing:_({durationInFrames:e})},o)};h.TransitionSeries=E,h.Transitions=tt,h.circle=me,h.clockWipe=xe,h.fade=ee,h.flip=Te,h.linearTiming=_,h.rectangle=pe,h.slide=ye,h.slidingDoors=ge,h.springTiming=Se,h.star=he,h.useTransitionProgress=We,h.wipe=be,Object.defineProperty(h,Symbol.toStringTag,{value:"Module"})});
131
26
  //# sourceMappingURL=index.umd.js.map